diff --git a/app/public/dist/client/pokechess/assets/index-B97BWeg9.js b/app/public/dist/client/pokechess/assets/index-D-6Z49j3.js similarity index 82% rename from app/public/dist/client/pokechess/assets/index-B97BWeg9.js rename to app/public/dist/client/pokechess/assets/index-D-6Z49j3.js index adeb16f5c..1e4358210 100644 --- a/app/public/dist/client/pokechess/assets/index-B97BWeg9.js +++ b/app/public/dist/client/pokechess/assets/index-D-6Z49j3.js @@ -6342,13 +6342,13 @@ return new `+this.key+`(); * @author Richard Davey * @copyright 2013-2024 Phaser Studio Inc. * @license {@link https://opensource.org/licenses/MIT|MIT License} - */v.exports={Format:t(27902),Pad:t(41836),RemoveAt:t(33628),Reverse:t(27671),UppercaseFirst:t(35355),UUID:t(45650)}}},R={};function F(v){var y=R[v];if(y!==void 0)return y.exports;var t=R[v]={exports:{}};return C[v](t,t.exports,F),t.exports}F.g=function(){if(typeof globalThis=="object")return globalThis;try{return this||new Function("return this")()}catch{if(typeof window=="object")return window}}();var B=F(85454);return B})())}(Ar)),Ar.exports}var bd=Nd();const At=Mu(bd),Wo=["POKEBALL","SUPERBALL","HYPERBALL","MASTERBALL","SAFARIBALL"],Bd={POKEBALL:"green",SUPERBALL:"blue",HYPERBALL:"#B8860B",MASTERBALL:"fuschia",SAFARIBALL:"#228B22"},Gd={POKEBALL:1,SUPERBALL:2,HYPERBALL:3,MASTERBALL:5,SAFARIBALL:1},Ud="useandom-26T198340PX75pxJACKVERYMINDBUSHWOLF_GQZbfghjklqvwyzrict";let Vd=(E=21)=>{let A="",C=crypto.getRandomValues(new Uint8Array(E|=0));for(;E--;)A+=Ud[C[E]&63];return A};const Ut={ref:"COMBAT",frameIndex:4},qt={ref:"DRAGON",frameIndex:2},wt={ref:"EAU",frameIndex:15},$t={ref:"ELECTRIQUE",frameIndex:1},se={ref:"FEE",frameIndex:3},Ht={ref:"FEU",frameIndex:5},_t={ref:"GLACE",frameIndex:10},Xt={ref:"INSECTE",frameIndex:0},Ft={ref:"NORMAL",frameIndex:11},kt={ref:"PLANTE",frameIndex:8},Qt={ref:"POISON",frameIndex:12},Kt={ref:"PSY",frameIndex:13},bt={ref:"ROCHE",frameIndex:14},Vt={ref:"SOL",frameIndex:9},Yt={ref:"SPECTRE",frameIndex:7},Jt={ref:"VOL",frameIndex:6},$={[Ut.ref]:Ut,[qt.ref]:qt,[wt.ref]:wt,[$t.ref]:$t,[se.ref]:se,[Ht.ref]:Ht,[_t.ref]:_t,[Xt.ref]:Xt,[Ft.ref]:Ft,[kt.ref]:kt,[Qt.ref]:Qt,[Kt.ref]:Kt,[bt.ref]:bt,[Vt.ref]:Vt,[Yt.ref]:Yt,[Jt.ref]:Jt},Yd=new Map([[Ft,new Map([[Ft,1],[Ht,1],[wt,1],[kt,1],[$t,1],[_t,1],[Ut,1],[Qt,1],[Vt,1],[Jt,1],[Kt,1],[Xt,1],[bt,.5],[Yt,.2],[qt,1],[se,1]])],[Ht,new Map([[Ft,1],[Ht,.5],[wt,.5],[kt,2],[$t,1],[_t,2],[Ut,1],[Qt,1],[Vt,1],[Jt,1],[Kt,1],[Xt,2],[bt,.5],[Yt,1],[qt,.5],[se,1]])],[wt,new Map([[Ft,1],[Ht,2],[wt,.5],[kt,.5],[$t,1],[_t,1],[Ut,1],[Qt,1],[Vt,2],[Jt,1],[Kt,1],[Xt,1],[bt,2],[Yt,1],[qt,.5],[se,1]])],[kt,new Map([[Ft,1],[Ht,.5],[wt,2],[kt,.5],[$t,1],[_t,1],[Ut,1],[Qt,.5],[Vt,2],[Jt,.5],[Kt,1],[Xt,.5],[bt,2],[Yt,1],[qt,.5],[se,1]])],[$t,new Map([[Ft,1],[Ht,1],[wt,2],[kt,.5],[$t,.5],[_t,1],[Ut,1],[Qt,1],[Vt,.2],[Jt,2],[Kt,1],[Xt,1],[bt,1],[Yt,1],[qt,.5],[se,1]])],[_t,new Map([[Ft,1],[Ht,.5],[wt,.5],[kt,2],[$t,1],[_t,.5],[Ut,1],[Qt,1],[Vt,2],[Jt,2],[Kt,1],[Xt,1],[bt,1],[Yt,1],[qt,2],[se,1]])],[Ut,new Map([[Ft,2],[Ht,1],[wt,1],[kt,1],[$t,1],[_t,2],[Ut,1],[Qt,.5],[Vt,1],[Jt,.5],[Kt,.5],[Xt,.5],[bt,2],[Yt,.2],[qt,1],[se,.5]])],[Qt,new Map([[Ft,1],[Ht,1],[wt,1],[kt,2],[$t,1],[_t,1],[Ut,1],[Qt,.5],[Vt,.5],[Jt,1],[Kt,1],[Xt,1],[bt,.5],[Yt,.5],[qt,1],[se,2]])],[Vt,new Map([[Ft,1],[Ht,2],[wt,1],[kt,.5],[$t,2],[_t,1],[Ut,1],[Qt,2],[Vt,1],[Jt,.2],[Kt,1],[Xt,.5],[bt,2],[Yt,1],[qt,1],[se,1]])],[Jt,new Map([[Ft,1],[Ht,1],[wt,1],[kt,2],[$t,.5],[_t,1],[Ut,2],[Qt,1],[Vt,1],[Jt,1],[Kt,1],[Xt,2],[bt,.5],[Yt,1],[qt,1],[se,1]])],[Kt,new Map([[Ft,1],[Ht,1],[wt,1],[kt,1],[$t,1],[_t,1],[Ut,2],[Qt,2],[Vt,1],[Jt,1],[Kt,.5],[Xt,1],[bt,1],[Yt,1],[qt,1],[se,1]])],[Xt,new Map([[Ft,1],[Ht,.5],[wt,1],[kt,2],[$t,1],[_t,1],[Ut,.5],[Qt,.5],[Vt,1],[Jt,.5],[Kt,2],[Xt,1],[bt,1],[Yt,.5],[qt,1],[se,.5]])],[bt,new Map([[Ft,1],[Ht,2],[wt,1],[kt,1],[$t,1],[_t,2],[Ut,.5],[Qt,1],[Vt,.5],[Jt,2],[Kt,1],[Xt,2],[bt,1],[Yt,1],[qt,1],[se,1]])],[Yt,new Map([[Ft,.5],[Ht,1],[wt,1],[kt,1],[$t,1],[_t,1],[Ut,1],[Qt,1],[Vt,1],[Jt,1],[Kt,.2],[Xt,1],[bt,1],[Yt,2],[qt,1],[se,1]])],[qt,new Map([[Ft,1],[Ht,1],[wt,1],[kt,1],[$t,1],[_t,1],[Ut,1],[Qt,1],[Vt,1],[Jt,1],[Kt,1],[Xt,1],[bt,1],[Yt,1],[qt,2],[se,1]])],[se,new Map([[Ft,1],[Ht,.5],[wt,1],[kt,1],[$t,1],[_t,1],[Ut,2],[Qt,.5],[Vt,1],[Jt,1],[Kt,1],[Xt,1],[bt,1],[Yt,1],[qt,2],[se,1]])]]),He=0,xe=1,zd=100,Dt=101,Wd=102;function Iu(E){return E**3}function Ho(E){return Math.floor(Math.pow(E+.1,1/3))}function Hd(E){return(E.owner===He?1:1.5)*E.baseXP*E.level}var ht=(E=>(E[E.DIRECT_HIT=0]="DIRECT_HIT",E[E.SPECIAL=1]="SPECIAL",E[E.PROJECTILE=2]="PROJECTILE",E[E.AREA_OF_EFFECT=3]="AREA_OF_EFFECT",E))(ht||{}),at=(E=>(E.POISON="POISON",E.BRULURE="BRULURE",E.GEL="GEL",E.PARALYSIE="PARALYSIE",E.PEUR="PEUR",E.SOMMEIL="SOMMEIL",E.CONFUSION="CONFUSION",E.SECRETION="SECRETION",E.LIGOTAGE="LIGOTAGE",E.TOURBILLON="TOURBILLON",E.SOIN="SOIN",E.REPOS="REPOS",E.POUVOIR_ANTIQUE="POUVOIR_ANTIQUE",E.FURIE="FURIE",E.ARMURE="ARMURE",E.HATE="HATE",E.ACIDE="ACIDE",E.RUGISSEMENT="RUGISSEMENT",E.AVEUGLE="AVEUGLE",E.EXECUTION="EXECUTION",E.DAMAGE_OVER_TIME="DAMAGE_OVER_TIME",E.INVULNERABLE="INVULNERABLE",E.ADAPTATION="ADAPTATION",E.RAGE="RAGE",E))(at||{});const ft={GRID:10,GRID_ACTIVE_TILE:11,SKILL_EFFECT_BELOW_POKEMON:14,POKEMON:15,SKILL_EFFECT_ABOVE_POKEMON:16,POKEMON_BARS:20,MAP_HIGHLIGHT:30,TRAINER:35,GUI_BUTTON:41,TEAM_SIZE_COUNTER:42,CENTER_TEXT:43,DIALOG:45,MENU:50,MENU_LAYOUT:51,MENU_OBJECTS:52,MENU_TOOLTIPS:53,MENU_CURSOR:59,PLAYER:60,SPRITE_DRAGGED:90,JUST_BELOW_CURSOR:99,CURSOR:100},rt={PISTOLET_A_O:{key:"pistolet_a_o",frames:[0],frameRate:8,scale:.5},PISTOLET_A_O_HIT:{key:"pistolet_a_o_hit",frames:[1,2],frameRate:8,scale:.5},HYDROCANON:{key:"hydrocanon",frames:[3,4,5,6],frameRate:8,repeat:3,scale:1,position:"target_ground",delta:0},TREMPETTE:{key:"trempette",frames:[7,8,9,10,11,12,13,14],frameRate:8,scale:1,position:"source_ground"},BULLES_D_O:{key:"bulles_d_o",frames:[15],frameRate:8,scale:.5},BULLES_D_O_HIT:{key:"bulles_d_o_hit",frames:[16,17,18],frameRate:8,scale:.5},SECRETION_HIT:{key:"secretion_hit",frames:[19],frameRate:1,scale:1},POUDREUSE:{key:"poudreuse",frames:[20,21,22,23,24,25,26],frameRate:8,position:"target"},HYPNOSE:{key:"hypnose",frames:[27,28,29,30,31],frameRate:6,scale:1,position:"source"},GRELON:{key:"grelon",frames:[32],frameRate:8,scale:1,depth:ft.SKILL_EFFECT_ABOVE_POKEMON},GRELON_HIT:{key:"grelon_hit",frames:[33,34,35],frameRate:8},LIGOTAGE:{key:"ligotage",frames:[36,37],frameRate:6,repeat:2,scale:.5,position:"target_ground",delta:-4},CHARGE_HIT:{key:"charge_hit",frames:[38],frameRate:8,scale:.5,position:"target"},FROZEN:{key:"frozen",frames:[39],frameRate:8,scale:1,opacity:.5,depth:ft.SKILL_EFFECT_ABOVE_POKEMON,repeat:Number.POSITIVE_INFINITY,position:"source_ground"},LANCE_FLAMMES:{key:"lance_flammes",frames:[40,41,42,43,44,45,46,47,48],frameRate:8,scale:1,position:"source",delta:32},LECHOUILLE:{key:"lechouille",frames:[49,50,51,52,51,50],frameRate:8,position:"source",delta:10},DEVOREVE:{key:"devoreve",frames:[53,54],frameRate:16,repeat:3,position:"target_ground",delta:-4},FLAMMECHE:{key:"flammeche",frames:[55,56,57,58,59],frameRate:8,scale:1,position:"target"},BURN:{key:"burn",frames:[60,61,62,63],frameRate:8,repeat:Number.POSITIVE_INFINITY,scale:1,depth:ft.SKILL_EFFECT_BELOW_POKEMON,position:"source_ground"},TORGNOLES:{key:"torgnoles",frames:[64],frameRate:8,scale:1,position:"target"},CROCS_FEU:{key:"crocs_feu",frames:[65,66,67,68,69],frameRate:8,scale:1,position:"target"},CROC_DE_MORT:{key:"croc_de_mort",frames:[70,71,72,73],frameRate:8,position:"target_ground"},POUVOIR_ANTIQUE:{key:"pouvoir_antique",frames:[74,75,76,77,78,79],frameRate:8,position:"source_ground"},DESTRUCTION:{key:"destruction",frames:[80,81,82,83],frameRate:8,scale:2,position:"source_ground"},NITROCHARGE_HIT:{key:"nitrocharge_hit",frames:[84,85,86,87,88],frameRate:8,position:"target"},LANCE_SOLEIL:{key:"lance_soleil",frames:[89,90,91,92,93,94,93,94,93,94,93,94,93,94,93,94,93,94,93,94,93,94,93,94,93,94,93,94,93,94,93,94,93,94,93,94,93,94,93,94,93,94,93,94],frameRate:8},CRUAILE:{key:"cruaile",frames:[95,96,97,98],frameRate:8,position:"target"},PIQURE:{key:"piqure",frames:[100,101,102,103],frameRate:8,position:"target"},SECRETION:{key:"secretion",frames:[104,105,106],frameRate:8},POUDRE_TOXIK:{key:"poudre_toxik",frames:[107,108,109,110,111,112,113,114],frameRate:8,scale:1,position:"source_ground"},PARASPORE:{key:"paraspore",frames:[107,108,109,110,111,112,113,114],frameRate:6,scale:1,tint:16750848,position:"source_ground"},PARALYSIE:{key:"paralysie",frames:[115,116,117,118],frameRate:8,repeat:Number.POSITIVE_INFINITY,position:"source_ground"},CHOC_MENTAL:{key:"choc_mental",frames:[119],frameRate:8,delta:8},JET_PIERRES:{key:"jet_pierres",frames:[120],frameRate:8,scale:.5},JET_PIERRES_HIT:{key:"jet_pierres_hit",frames:[120,121,122,123,124],frameRate:8,scale:.5},ECLAIR:{key:"eclair",frames:[125,126,127,128,129],frameRate:16,pattern:"eclair"},CAGE_ECLAIR:{key:"elec_ball",frames:[130,131,132,133,134,135],frameRate:8,repeat:2,position:"source_ground"},VIVE_ATTAQUE:{key:"vive_attaque",frames:[136,137,138,139,140,141,142,143],frameRate:16,position:"target"},POING_KARATE:{key:"poing_karate",frames:[99,144],frameRate:8,position:"target"},DOUBLE_PIED:{key:"double_pied",frames:[145,146],frameRate:8,position:"target"},RAFALE_PSY:{key:"rafale_psy",frames:[147],frameRate:8,scale:1,delta:8},PROVOCATED:{key:"provocated",frames:[148],frameRate:8},MASSDOS:{key:"massdos",frames:[149,150],frameRate:8,repeat:Number.POSITIVE_INFINITY},PROVOCATION:{key:"provocation",frames:[151,152,153,152,153],frameRate:8,scale:1,position:"source_ground",delta:-24},PICPIC:{key:"picpic",frames:[157,156,155,154],frameRate:8,position:"target_ground"},PINCE_MASSE:{key:"pince_masse",frames:[158,159,158],frameRate:8,scale:.5,position:"target",delta:8},FOUET_LIANES:{key:"fouet_lianes",frames:[160,161,162,163,164],frameRate:8,scale:.75,position:"source"},TELEPORT:{key:"teleport",frames:[165,166,167,168,169],frameRate:8,position:"source_ground"},ETINCELLE:{key:"etincelle",frames:[170,171,172,173,174,175,176],frameRate:16,position:"target",delta:4},DETRITUS:{key:"detritus",frames:[177,178,179],frameRate:8},GUILLOTINE:{key:"guillotine",frames:[180,181,182,183],frameRate:4,position:"target"},ULTRASON:{key:"ultrason",frames:[184,185,186,187,188,188,188,188,188,188,188,188,188,188,188,188,188,188,188,188,188,188,188,188,188,188,188,188,188,188],frameRate:8,delta:8},SOMMEIL:{key:"sommeil",frames:[189,190,191,190],frameRate:4,repeat:Number.POSITIVE_INFINITY,position:"source_ground"},GRIFFE:{key:"griffe",frames:[192,193,194,195],frameRate:8,scale:1,position:"target"},MORSURE:{key:"morsure",frames:[198,197,196,197,198,199],frameRate:12,scale:.5,position:"target"},VAMPIRISME:{key:"vampirisme",frames:[200,201,202],frameRate:8,scale:1,position:"source"},SOIN:{key:"soin",frames:[203,204,205,206,207,208,209,210],frameRate:8,repeat:Number.POSITIVE_INFINITY,scale:1,position:"source_ground"},SURF:{key:"surf",frames:[211,212,213,214,215,216,217,218],frameRate:8,repeat:Number.POSITIVE_INFINITY,scale:1},DARD_VENIN:{key:"dard_venin",frames:[219],frameRate:8,scale:1,delta:8},POISON:{key:"poison",frames:[220,221,222,223,224,225,226,227,228,229,230,231],frameRate:10,repeat:Number.POSITIVE_INFINITY,scale:.5,position:"target_ground"},ACIDE:{key:"acide",frames:[232,233,232,234],frameRate:8,repeat:Number.POSITIVE_INFINITY,position:"parabolic_to_target"},ACIDE_HIT:{key:"acide_hit",frames:[235,236,237,238],frameRate:8,depth:ft.SKILL_EFFECT_BELOW_POKEMON,position:"target_ground"},DARD_VENIN_HIT:{key:"dard_venin_hit",frames:[239],frameRate:8},VOL_VIE:{key:"vol_vie",frames:[240,241,242,243],frameRate:8,repeat:Number.POSITIVE_INFINITY,position:"target_to_source"},COUD_BOUE:{key:"coud_boue",frames:[244],frameRate:8,scale:.5},COUD_BOUE_HIT:{key:"coud_boue_hit",frames:[245,246,247,248,249,250],frameRate:8},JET_DE_SABLE:{key:"jet_de_sable",frames:[246,247,248,249,250],frameRate:8,tint:16768400,scale:1.5,position:"target"},BOMB_BEURK:{key:"bomb_beurk",frames:[251,252,253,254,255,256,257,258],frameRate:8,repeat:Number.POSITIVE_INFINITY,position:"parabolic_to_target"},METRONOME:{key:"metronome",frames:[259],frameRate:1,position:"source",delta:16},BOMB_BEURK_HIT:{key:"bomb_beurk_hit",frames:[260,261,262,263,264,265],frameRate:8,depth:ft.SKILL_EFFECT_BELOW_POKEMON},OURAGAN:{key:"ouragan",frames:[266,267,268],frameRate:8,repeat:Number.POSITIVE_INFINITY},DANSE_FLAMMES:{key:"danseflammes",frames:[269,270,271,272],frameRate:8,repeat:5,position:"source_ground"},ARMURE:{key:"armure",frames:[273,274,275,276,277,278,279],frameRate:12,position:"source_ground"},HATE:{key:"hate",frames:[280,281,282],frameRate:8,scale:.5,position:"source_ground"},DANSE_LAMES:{key:"danse_lames",frames:[283,284,285,286,287,288],frameRate:8,position:"source_ground"},FURIE:{key:"furie",frames:[289,290,291,292,293],frameRate:8,position:"source"},DRACORAGE:{key:"dracorage",frames:[294,295,296,297],frameRate:12,repeat:3,depth:ft.SKILL_EFFECT_BELOW_POKEMON,position:"target_ground",tint:11197951},BLIZZARD:{key:"blizzard",frames:[294,295,296,297],frameRate:12,repeat:3,depth:ft.SKILL_EFFECT_BELOW_POKEMON,position:"target_ground"},DRACOCHARGE:{key:"dracocharge",frames:[298,299],frameRate:8,repeat:Number.POSITIVE_INFINITY,delta:8},PEUR:{key:"peur",frames:[300,301,302,301],frameRate:8,repeat:Number.POSITIVE_INFINITY,position:"source_ground"},BERCEUSE:{key:"berceuse",frames:[303,304,305,304],frameRate:8,repeat:5,position:"source_ground"},ENCORE:{key:"encore",frames:[306,307,308,307],frameRate:8,repeat:1,position:"source",delta:12},TONNERRE:{key:"tonnerre",frames:[309,310,311,312,313,314],frameRate:8,position:"source_ground"},ULTIMAPOING:{key:"ultimapoing",frames:[315,316,315,316,317],frameRate:8,position:"target"},BROUILLARD:{key:"brouillard",frames:[318,319,320,321,322,323,324],frameRate:8,position:"source_ground"},BALAYAGE:{key:"balayage",frames:[325,326,327,328],frameRate:8,position:"source",delta:12},E_COQUE:{key:"e_coque",frames:[329,330,331,332,333,334,335,336,337,338,339,340,341,341,341,341],frameRate:8,position:"source_ground"},RUGISSEMENT:{key:"rugissement",frames:[342,343,344,345,346],frameRate:8,position:"source",delta:12},CROCHET_VENIN:{key:"crochet_venin",frames:[347,348,349,350],frameRate:8,position:"target"},KOUD_KORNE:{key:"koud_korne",frames:[351,352,353,354],frameRate:8,position:"target"},MAWASHI_GERI:{key:"mawashi_geri",frames:[355,356,357,358],frameRate:8,position:"source",delta:12},EMPAL_KORNE:{key:"empal_korne",frames:[359,360,361,362,363,364,365,366,367,367,367],frameRate:8,position:"target_ground"},ABRI:{key:"abri",frames:[368,369,370,371,372],frameRate:8,repeat:2,opacity:.3,position:"source_ground"},AMNESIE:{key:"amnesie",frames:[373,374,375,376,377,378,379,379,379],frameRate:8,position:"source_ground",delta:-16},BOMB_OEUF:{key:"bomb_oeuf",frames:[380,381,382,383,384,385,386],frameRate:8,repeat:Number.POSITIVE_INFINITY,scale:1,position:"parabolic_to_target"},PILONNAGE:{key:"pilonnage",frames:[380,381,382,383,384,385,386],frameRate:8,repeat:Number.POSITIVE_INFINITY,scale:.5,position:"parabolic_to_target"},ULTRALASER_START:{key:"ultralaser_start",frames:[387,388],frameRate:8,repeat:2},ULTRALASER_BEAM:{key:"ultralaser_beam",frames:[389,390],frameRate:8,repeat:2},LASER_GLACE_START:{key:"laser_glace_start",frames:[391,392],frameRate:8,repeat:2},LASER_GLACE_BEAM:{key:"laser_glace_beam",frames:[393,394],frameRate:8,repeat:2},JACKPOT_WIN:{key:"jackpot_win",frames:[395,396],frameRate:8,repeat:2},JACKPOT_LOSE:{key:"jackpot_lose",frames:[397,398],frameRate:8,repeat:2},JACKPOT_START:{key:"jackpot_start",frames:[399],frameRate:2,position:"target_to_source"},BOMB_OEUF_HIT:{key:"bomb_oeuf_hit",frames:[400,401,402,403,404,405,406,407],frameRate:8},GROBISOU:{key:"grobisou",frames:[408,409,410,411,409,408],frameRate:8,position:"source",delta:16},METEORES:{key:"meteores",frames:[412,413,414,415,416,417,418,419,420,421,422,423,424,425,426,427],frameRate:8,repeat:Number.POSITIVE_INFINITY},POUVOIR_LUNAIRE:{key:"pouvoir_lunaire",frames:[428,429,430,431,432,433,434,435,436],frameRate:8,position:"target_ground"},EVOLUTION:{key:"evolution",frames:[437,438,439,440,441,442,443,444,445,446,447,448,449,450,451],frameRate:8,depth:ft.SKILL_EFFECT_ABOVE_POKEMON,position:"source_ground"},ADAPTATION:{key:"adaptation",frames:[452,453,454,455,456,457,458,459,460,461,462,463],frameRate:8,depth:ft.SKILL_EFFECT_BELOW_POKEMON,position:"source_ground"},TUNNEL:{key:"tunnel",frames:[464,465,466,467,468,469,469,469,468,467,466,465,464],frameRate:8,depth:ft.SKILL_EFFECT_BELOW_POKEMON,position:"source_ground"},PSYKO:{key:"psyko",frames:[470,471,472,473],frameRate:8,depth:ft.SKILL_EFFECT_BELOW_POKEMON,position:"source_ground",repeat:6},DEFLAGRATION:{key:"deflagration",frames:[474,475,476,477],frameRate:8,depth:ft.SKILL_EFFECT_BELOW_POKEMON,position:"source_ground",repeat:4},ERUPTION_PENDING:{key:"eruption_pending",frames:[478,479],frameRate:8,depth:ft.SKILL_EFFECT_BELOW_POKEMON,position:"source_ground",repeat:Number.POSITIVE_INFINITY},ERUPTION:{key:"eruption",frames:[480,481,482,483,484,483,482,481,480],frameRate:8,depth:ft.SKILL_EFFECT_BELOW_POKEMON,position:"source_ground"},FATAL_FOUDRE:{key:"fatal_foudre",frames:[485,486,487],frameRate:8,depth:ft.SKILL_EFFECT_ABOVE_POKEMON,position:"source_ground",repeat:8},CONFUSION:{key:"confusion",frames:[488,489,490,491],frameRate:8,depth:ft.SKILL_EFFECT_ABOVE_POKEMON,position:"source_ground",repeat:Number.POSITIVE_INFINITY},CASCADE:{key:"cascade_skill",frames:[493,492,493,494,495,496,497,498,499],frameRate:8,depth:ft.SKILL_EFFECT_ABOVE_POKEMON,position:"target_ground"},TRIPLATTAQUE:{key:"triplattaque",frames:[500,501,502,503,504,505,506,507],frameRate:8},TRIPLATTAQUE_HIT:{key:"triplattaque_hit",frames:[508,509,510,511,512],frameRate:8}},Xd={ref:"abri",attackRange:9,behavior:ht.SPECIAL,type:$.NORMAL,effect:rt.ABRI,power:0,hitDelay:0,selfAlteration:{type:at.INVULNERABLE,stacks:20}},kd={ref:"acide",type:$.POISON,attackRange:3,behavior:ht.AREA_OF_EFFECT,getTilesImpacted(E,A){const[C,R]=[A.x,A.y];return[[C-1,R],[C,R],[C+1,R]]},power:40,effect:rt.ACIDE,hitDelay:500,hitEffect:rt.ACIDE_HIT,hitAlteration:{type:at.ACIDE,stacks:100}},Kd={ref:"adaptation",attackRange:9,behavior:ht.SPECIAL,type:$.NORMAL,effect:rt.ADAPTATION,power:0,hitDelay:0,selfAlteration:{type:at.ADAPTATION,stacks:60}},Jd={ref:"amnesie",attackRange:9,effect:rt.AMNESIE,behavior:ht.SPECIAL,power:0,type:$.PSY,triggerSpecial:"amnesie"},jd={ref:"armure",attackRange:9,behavior:ht.SPECIAL,type:$.ROCHE,effect:rt.ARMURE,power:0,hitDelay:0,selfAlteration:{type:at.ARMURE,stacks:1,keepStacks:!0}},Zd={ref:"balayage",attackRange:1,behavior:ht.AREA_OF_EFFECT,type:$.COMBAT,getTilesImpacted(E,A){const[C,R]=[A.x,A.y];return A.x===E.x?[[C-1,R],[C,R],[C+1,R]]:[[C,R-1],[C,R],[C,R+1]]},effect:rt.BALAYAGE,power:100,hitDelay:100,rotateSprite:!0},$d={ref:"belier",type:$.NORMAL,behavior:ht.DIRECT_HIT,hitDelay:150,hitEffect:rt.CHARGE_HIT,chargeDelta:12,power:120,selfDamage:30,rotateSprite:!1,attackRange:1},Qd={ref:"berceuse",attackRange:1,behavior:ht.AREA_OF_EFFECT,type:$.NORMAL,getTilesImpacted(E){const[A,C]=[E.x,E.y];return[[A-1,C-1],[A,C-1],[A+1,C-1],[A-1,C],[A+1,C],[A-1,C+1],[A,C+1],[A+1,C+1]]},effect:rt.BERCEUSE,power:0,hitDelay:1e3,hitAlteration:{type:at.SOMMEIL,stacks:40}},qd={ref:"blizzard",attackRange:9,effect:rt.BLIZZARD,behavior:ht.SPECIAL,hitDelay:100,power:200,type:$.GLACE,triggerSpecial:"blizzard"},yh={ref:"blizzard",behavior:ht.PROJECTILE,effect:rt.GRELON,hitEffect:rt.GRELON_HIT,power:300,travelSpeed:5,rotateProjectile:!1,projectileRadius:8,type:$.GLACE,attackRange:9},_d={ref:"bomb_beurk",type:$.POISON,attackRange:4,behavior:ht.AREA_OF_EFFECT,getTilesImpacted(E,A){const[C,R]=[A.x,A.y];return[[C-1,R],[C,R],[C+1,R]]},power:80,effect:rt.BOMB_BEURK,hitDelay:750,hitEffect:rt.BOMB_BEURK_HIT,hitAlteration:{type:at.POISON,stacks:80}},tc={ref:"bomb_oeuf",type:$.NORMAL,attackRange:4,behavior:ht.AREA_OF_EFFECT,getTilesImpacted(E,A){const[C,R]=[A.x,A.y];return[[C-1,R-1],[C,R-1],[C+1,R-1],[C-1,R],[C,R],[C+1,R],[C-1,R+1],[C,R+1],[C+1,R+1]]},power:200,effect:rt.BOMB_OEUF,hitDelay:1e3,hitEffect:rt.BOMB_OEUF_HIT},ec={ref:"brouillard",attackRange:1,behavior:ht.AREA_OF_EFFECT,type:$.NORMAL,getTilesImpacted(E){const[A,C]=[E.x,E.y];return[[A-1,C-1],[A,C-1],[A+1,C-1],[A-1,C],[A+1,C],[A-1,C+1],[A,C+1],[A+1,C+1]]},effect:rt.BROUILLARD,power:0,hitDelay:200,hitAlteration:{type:at.AVEUGLE,stacks:50}},ic={ref:"bulles_d_o",type:$.EAU,effect:rt.BULLES_D_O,behavior:ht.PROJECTILE,travelSpeed:2,attackRange:3,power:65,projectileRadius:8,rotateProjectile:!1,hitEffect:rt.BULLES_D_O_HIT},sc={ref:"cage_eclair",attackRange:1,behavior:ht.AREA_OF_EFFECT,type:$.ELECTRIQUE,getTilesImpacted(E){const[A,C]=[E.x,E.y];return[[A-1,C-1],[A,C-1],[A+1,C-1],[A-1,C],[A+1,C],[A-1,C+1],[A,C+1],[A+1,C+1]]},effect:rt.CAGE_ECLAIR,power:0,hitDelay:100,hitAlteration:{type:at.PARALYSIE,stacks:100}},nc={ref:"cascade",type:$.EAU,effect:rt.CASCADE,behavior:ht.DIRECT_HIT,hitDelay:500,power:220,rotateSprite:!1,attackRange:1,knockback:!0},rc={ref:"charge",type:$.NORMAL,behavior:ht.DIRECT_HIT,hitDelay:150,hitEffect:rt.CHARGE_HIT,chargeDelta:12,power:40,rotateSprite:!1,attackRange:1},ac={ref:"choc_mental",type:$.PSY,effect:rt.CHOC_MENTAL,behavior:ht.PROJECTILE,travelSpeed:8,projectileRadius:8,rotateProjectile:!0,power:50,attackRange:4},oc={ref:"coud_boue",type:$.SOL,effect:rt.COUD_BOUE,behavior:ht.PROJECTILE,travelSpeed:5,attackRange:3,power:20,projectileRadius:8,rotateProjectile:!1,hitEffect:rt.COUD_BOUE_HIT,hitAlteration:{type:at.AVEUGLE,stacks:10}},lc={ref:"croc_de_mort",type:$.NORMAL,effect:rt.CROC_DE_MORT,behavior:ht.DIRECT_HIT,hitDelay:200,hitAlteration:{type:at.PEUR,stacks:30},power:250,rotateSprite:!1,attackRange:1,chargeDelta:0},hc={ref:"crochet_venin",type:$.POISON,effect:rt.CROCHET_VENIN,behavior:ht.DIRECT_HIT,hitDelay:150,hitAlteration:{type:at.POISON,stacks:10},power:50,rotateSprite:!1,attackRange:1,chargeDelta:8},uc={ref:"crocs_feu",type:$.FEU,effect:rt.CROCS_FEU,behavior:ht.DIRECT_HIT,power:100,hitDelay:200,hitAlteration:{type:at.BRULURE,stacks:100},rotateSprite:!1,attackRange:1,chargeDelta:10},fc={ref:"cruaile",type:$.VOL,effect:rt.CRUAILE,behavior:ht.DIRECT_HIT,hitDelay:200,power:60,rotateSprite:!1,attackRange:1,chargeDelta:4},dc={ref:"danse_flammes",attackRange:1,behavior:ht.AREA_OF_EFFECT,type:$.FEU,getTilesImpacted(E){const[A,C]=[E.x,E.y];return[[A-1,C-1],[A,C-1],[A+1,C-1],[A-1,C],[A+1,C],[A-1,C+1],[A,C+1],[A+1,C+1]]},effect:rt.DANSE_FLAMMES,power:50,hitDelay:0,hitAlteration:{type:at.BRULURE,stacks:50}},cc={ref:"danse_lames",attackRange:1,behavior:ht.AREA_OF_EFFECT,type:$.NORMAL,getTilesImpacted(E){const[A,C]=[E.x,E.y];return[[A-1,C-1],[A,C-1],[A+1,C-1],[A-1,C],[A+1,C],[A-1,C+1],[A,C+1],[A+1,C+1]]},effect:rt.DANSE_LAMES,power:80,hitDelay:100},vc={ref:"dard_venin",type:$.POISON,effect:rt.DARD_VENIN,behavior:ht.PROJECTILE,travelSpeed:6,power:30,projectileRadius:5,hitEffect:rt.DARD_VENIN_HIT,hitAlteration:{type:at.POISON,stacks:30},rotateProjectile:!0,attackRange:2},pc={ref:"deflagration",attackRange:9,effect:rt.DEFLAGRATION,behavior:ht.SPECIAL,power:300,type:$.FEU,triggerSpecial:"deflagration",hitDelay:200},mc={ref:"destruction",attackRange:1,behavior:ht.AREA_OF_EFFECT,type:$.NORMAL,getTilesImpacted(E){const[A,C]=[E.x,E.y];return[[A-1,C-1],[A,C-1],[A+1,C-1],[A-1,C],[A+1,C],[A-1,C+1],[A,C+1],[A+1,C+1]]},effect:rt.DESTRUCTION,power:300,selfDamage:99999,hitDelay:50},gc={ref:"detritus",type:$.POISON,effect:rt.DETRITUS,behavior:ht.PROJECTILE,travelSpeed:3,attackRange:3,power:30,hitAlteration:{type:at.POISON,stacks:20},hitEffect:rt.DETRITUS_HIT,projectileRadius:6,rotateProjectile:!0},xc={ref:"devoreve",type:$.SPECTRE,effect:rt.DEVOREVE,behavior:ht.DIRECT_HIT,hitDelay:350,power:100,rotateSprite:!1,attackRange:4,hitAlteration:{type:at.PEUR,stacks:30}},yc={ref:"double_pied",type:$.COMBAT,effect:rt.DOUBLE_PIED,behavior:ht.DIRECT_HIT,hitDelay:150,power:40,rotateSprite:!1,attackRange:1,chargeDelta:4},Ec={ref:"dracocharge",type:$.DRAGON,effect:rt.DRACOCHARGE,hitEffect:rt.BULLES_D_O_HIT,behavior:ht.PROJECTILE,travelSpeed:8,projectileRadius:6,rotateProjectile:!0,power:50,attackRange:3},Tc={ref:"dracorage",attackRange:2,behavior:ht.AREA_OF_EFFECT,type:$.DRAGON,getTilesImpacted(E,A){const[C,R]=[A.x,A.y];return[[C-1,R-1],[C,R-1],[C+1,R-1],[C-1,R],[C,R],[C+1,R],[C-1,R+1],[C,R+1],[C+1,R+1]]},effect:rt.DRACORAGE,power:0,hitDelay:0,hitAlteration:{type:at.DAMAGE_OVER_TIME,stacks:30}},Sc={ref:"e_coque",attackRange:9,effect:rt.E_COQUE,behavior:ht.SPECIAL,power:0,type:$.PSY,triggerSpecial:"e-coque",triggerSpecialDelay:250},Ac={ref:"eclair",type:$.ELECTRIQUE,behavior:ht.SPECIAL,attackRange:9,power:250,effect:rt.ECLAIR,triggerSpecial:"eclair"},Cc={ref:"empal_korne",type:$.SOL,effect:rt.EMPAL_KORNE,behavior:ht.DIRECT_HIT,hitDelay:400,power:120,rotateSprite:!1,triggerAlteration:{type:at.TOURBILLON,stacks:14},attackRange:2},Pc={ref:"encore",attackRange:9,effect:rt.ENCORE,behavior:ht.SPECIAL,power:0,type:$.NORMAL,triggerSpecial:"encore"},Rc={ref:"etincelle",type:$.ELECTRIQUE,effect:rt.ETINCELLE,behavior:ht.DIRECT_HIT,hitDelay:100,triggerAlteration:{type:at.PARALYSIE,stacks:15},power:65,rotateSprite:!0,attackRange:1,chargeDelta:4},Lc={ref:"evolution",attackRange:9,effect:rt.EVOLUTION,behavior:ht.SPECIAL,power:0,type:$.NORMAL,triggerSpecial:"evolution",triggerSpecialDelay:1e3},Oc={ref:"fatal_foudre",attackRange:9,effect:rt.FATAL_FOUDRE,behavior:ht.SPECIAL,power:200,type:$.ELECTRIQUE,triggerSpecial:"fatal_foudre",hitDelay:100},Mc={ref:"flammeche",type:$.FEU,effect:rt.FLAMMECHE,behavior:ht.DIRECT_HIT,hitDelay:100,triggerAlteration:{type:at.BRULURE,stacks:12},power:40,rotateSprite:!0,attackRange:1},Ic={ref:"fouet_lianes",type:$.PLANTE,effect:rt.FOUET_LIANES,behavior:ht.DIRECT_HIT,hitDelay:250,power:45,rotateSprite:!0,attackRange:1},Fc={ref:"furie",type:$.NORMAL,attackRange:9,effect:rt.FURIE,behavior:ht.AREA_OF_EFFECT,getTilesImpacted(){return[]},power:0,hitDelay:0,selfAlteration:{type:at.FURIE,stacks:1,keepStacks:!0}},wc={ref:"griffe",type:$.NORMAL,effect:rt.GRIFFE,behavior:ht.DIRECT_HIT,hitDelay:100,power:40,rotateSprite:!0,attackRange:1,chargeDelta:8},Dc={ref:"grobisou",type:$.PSY,effect:rt.GROBISOU,behavior:ht.DIRECT_HIT,hitDelay:200,hitAlteration:{type:at.GEL,stacks:80},power:0,rotateSprite:!1,attackRange:2},Nc={ref:"guillotine",type:$.NORMAL,effect:rt.GUILLOTINE,behavior:ht.DIRECT_HIT,hitDelay:250,hitAlteration:{type:at.EXECUTION,stacks:1},power:150,rotateSprite:!1,attackRange:1,chargeDelta:6},bc={ref:"hate",attackRange:9,behavior:ht.AREA_OF_EFFECT,type:$.PSY,getTilesImpacted(){return[]},effect:rt.HATE,power:0,hitDelay:0,selfAlteration:{type:at.HATE,stacks:1,keepStacks:!0}},Bc={ref:"hydrocanon",type:$.EAU,effect:rt.HYDROCANON,behavior:ht.DIRECT_HIT,hitDelay:2e3,power:300,rotateSprite:!1,triggerAlteration:{type:at.TOURBILLON,stacks:30},attackRange:4},Gc={ref:"hypnose",type:$.PSY,effect:rt.HYPNOSE,behavior:ht.DIRECT_HIT,hitDelay:500,hitAlteration:{type:at.SOMMEIL,stacks:70},power:0,rotateSprite:!1,attackRange:4},Uc={ref:"jackpot",attackRange:1,behavior:ht.SPECIAL,type:$.NORMAL,effect:rt.JACKPOT_START,power:0,triggerSpecial:"jackpot",triggerSpecialDelay:250},Vc={ref:"jet_pierres",type:$.ROCHE,effect:rt.JET_PIERRES,behavior:ht.PROJECTILE,travelSpeed:6,power:50,projectileRadius:5,hitEffect:rt.JET_PIERRES_HIT,rotateProjectile:!1,attackRange:3},Yc={ref:"jet_de_sable",type:$.SOL,effect:rt.JET_DE_SABLE,behavior:ht.DIRECT_HIT,hitDelay:100,power:10,rotateSprite:!1,attackRange:1,chargeDelta:4,hitAlteration:{type:at.AVEUGLE,stacks:80}},zc={ref:"koud_korne",type:$.NORMAL,effect:rt.KOUD_KORNE,behavior:ht.DIRECT_HIT,hitDelay:100,power:40,rotateSprite:!0,attackRange:1,chargeDelta:8},Wc={ref:"lance_flammes",type:$.FEU,effect:rt.LANCE_FLAMMES,behavior:ht.DIRECT_HIT,hitDelay:300,triggerAlteration:{type:at.BRULURE,stacks:100},power:200,rotateSprite:!0,attackRange:1},Hc={ref:"lance_soleil",type:$.PLANTE,effect:rt.LANCE_SOLEIL,behavior:ht.PROJECTILE,power:120,travelSpeed:2,pierceThrough:!0,projectileRadius:8,hitAlteration:{type:at.BRULURE,stacks:10},rotateProjectile:!1,attackRange:4},Xc={ref:"laser_glace",type:$.GLACE,behavior:ht.SPECIAL,attackRange:1,power:80,triggerSpecial:"laser_glace"},kc={ref:"lechouille",type:$.SPECTRE,effect:rt.LECHOUILLE,behavior:ht.DIRECT_HIT,hitDelay:200,hitAlteration:{type:at.PARALYSIE,stacks:20},power:35,rotateSprite:!0,attackRange:1},Kc={ref:"ligotage",type:$.NORMAL,effect:rt.LIGOTAGE,behavior:ht.DIRECT_HIT,hitDelay:300,power:15,rotateSprite:!1,triggerAlteration:{type:at.LIGOTAGE,stacks:120},attackRange:4},Jc={ref:"massdos",type:$.SOL,effect:rt.MASSDOS,behavior:ht.PROJECTILE,travelSpeed:4,power:65,projectileRadius:5,hitEffect:rt.CHARGE_HIT,rotateProjectile:!1,attackRange:3},jc={ref:"mawashi_geri",attackRange:1,behavior:ht.AREA_OF_EFFECT,type:$.COMBAT,getTilesImpacted(E,A){const C=[[A.x,A.y]];return A.x===E.x-1&&C.push([A.x+2,A.y]),A.x===E.x+1&&C.push([A.x-2,A.y]),A.y===E.y-1&&C.push([A.x,A.y+2]),A.y===E.y+1&&C.push([A.x,A.y-2]),C},effect:rt.MAWASHI_GERI,power:100,hitDelay:100,rotateSprite:!0},Zc={ref:"meteores",type:$.NORMAL,effect:rt.METEORES,behavior:ht.PROJECTILE,travelSpeed:4,projectileRadius:8,pierceThrough:!0,rotateProjectile:!0,power:50,precision:10,attackRange:9},$c={ref:"metronome",attackRange:9,effect:rt.METRONOME,behavior:ht.SPECIAL,power:0,type:$.NORMAL,triggerSpecial:"metronome"},Qc={ref:"morphing",attackRange:9,effect:rt.EVOLUTION,behavior:ht.SPECIAL,power:0,type:$.NORMAL,triggerSpecial:"morphing",triggerSpecialDelay:1e3},qc={ref:"morsure",type:$.NORMAL,effect:rt.MORSURE,behavior:ht.DIRECT_HIT,hitDelay:140,power:50,rotateSprite:!1,attackRange:1,chargeDelta:10},_c={ref:"nitrocharge",type:$.FEU,behavior:ht.DIRECT_HIT,hitDelay:150,hitEffect:rt.NITROCHARGE_HIT,hitAlteration:{type:at.BRULURE,stacks:30},chargeDelta:12,power:100,selfDamage:30,rotateSprite:!1,attackRange:1},tv={ref:"ouragan",type:$.DRAGON,effect:rt.OURAGAN,behavior:ht.PROJECTILE,power:120,travelSpeed:2,pierceThrough:!0,projectileRadius:12,rotateProjectile:!1,attackRange:4,hitAlteration:{type:at.TOURBILLON,stacks:15}},ev={ref:"paraspore",attackRange:1,behavior:ht.AREA_OF_EFFECT,type:$.PLANTE,getTilesImpacted(E){const[A,C]=[E.x,E.y];return[[A-1,C-1],[A,C-1],[A+1,C-1],[A-1,C],[A+1,C],[A-1,C+1],[A,C+1],[A+1,C+1]]},effect:rt.PARASPORE,power:0,hitDelay:300,hitAlteration:{type:at.PARALYSIE,stacks:100}},iv={ref:"picpic",type:$.VOL,effect:rt.PICPIC,behavior:ht.DIRECT_HIT,hitDelay:100,power:35,rotateSprite:!0,attackRange:1,chargeDelta:8},sv={ref:"pilonnage",type:$.NORMAL,effect:rt.PILONNAGE,behavior:ht.PROJECTILE,travelSpeed:6,power:30,projectileRadius:6,hitEffect:rt.CHARGE_HIT,rotateProjectile:!0,attackRange:4},nv={ref:"pince_masse",type:$.EAU,effect:rt.PINCE_MASSE,behavior:ht.DIRECT_HIT,hitDelay:100,power:40,rotateSprite:!1,attackRange:1,chargeDelta:8},rv={ref:"piqure",type:$.INSECTE,effect:rt.PIQURE,behavior:ht.DIRECT_HIT,hitDelay:100,power:60,rotateSprite:!0,attackRange:1,chargeDelta:10},av={ref:"pistolet_a_o",type:$.EAU,effect:rt.PISTOLET_A_O,behavior:ht.PROJECTILE,travelSpeed:3,power:40,projectileRadius:3,hitEffect:rt.PISTOLET_A_O_HIT,rotateProjectile:!1,attackRange:3},ov={ref:"poing_karate",type:$.COMBAT,effect:rt.POING_KARATE,behavior:ht.DIRECT_HIT,hitDelay:10,power:50,rotateSprite:!1,attackRange:1,chargeDelta:8},lv={ref:"poudre_toxik",attackRange:1,behavior:ht.AREA_OF_EFFECT,type:$.PLANTE,getTilesImpacted(E){const[A,C]=[E.x,E.y];return[[A-1,C-1],[A,C-1],[A+1,C-1],[A-1,C],[A+1,C],[A-1,C+1],[A,C+1],[A+1,C+1]]},effect:rt.POUDRE_TOXIK,power:0,hitDelay:400,hitAlteration:{type:at.POISON,stacks:100}},hv={ref:"poudreuse",type:$.GLACE,effect:rt.POUDREUSE,behavior:ht.DIRECT_HIT,hitDelay:200,power:40,rotateSprite:!0,attackRange:1,chargeDelta:2},uv={ref:"pouvoir_antique",attackRange:1,behavior:ht.AREA_OF_EFFECT,type:$.ROCHE,getTilesImpacted(E){const[A,C]=[E.x,E.y];return[[A-1,C-1],[A,C-1],[A+1,C-1],[A-1,C],[A+1,C],[A-1,C+1],[A,C+1],[A+1,C+1]]},effect:rt.POUVOIR_ANTIQUE,power:60,hitDelay:200,selfAlteration:{type:at.POUVOIR_ANTIQUE,stacks:1,keepStacks:!0}},fv={ref:"pouvoir_lunaire",type:$.FEE,effect:rt.POUVOIR_LUNAIRE,behavior:ht.DIRECT_HIT,hitDelay:200,power:120,rotateSprite:!1,attackRange:4},dv={ref:"provoc",attackRange:9,effect:rt.PROVOCATION,behavior:ht.SPECIAL,power:0,type:$.COMBAT,triggerSpecial:"provoc"},cv={ref:"psyko",attackRange:9,effect:rt.PSYKO,behavior:ht.SPECIAL,power:120,hitDelay:4e3,type:$.PSY,triggerSpecial:"psyko"},vv={ref:"rafale_psy",type:$.PSY,effect:rt.RAFALE_PSY,behavior:ht.PROJECTILE,travelSpeed:6,projectileRadius:16,pierceThrough:!0,rotateProjectile:!0,power:100,attackRange:4},pv={ref:"repos",attackRange:9,behavior:ht.SPECIAL,power:0,type:$.NORMAL,selfAlteration:{type:at.REPOS,stacks:100}},mv={ref:"rugissement",attackRange:1,behavior:ht.AREA_OF_EFFECT,type:$.NORMAL,getTilesImpacted(E){const[A,C]=[E.x,E.y];return[[A-1,C-1],[A,C-1],[A+1,C-1],[A-1,C],[A+1,C],[A-1,C+1],[A,C+1],[A+1,C+1]]},effect:rt.RUGISSEMENT,power:0,hitDelay:50,hitAlteration:{type:at.RUGISSEMENT,stacks:100}},gv={ref:"secretion",type:$.INSECTE,effect:rt.SECRETION,behavior:ht.PROJECTILE,travelSpeed:4,attackRange:4,power:50,projectileRadius:3,rotateProjectile:!0,hitEffect:rt.SECRETION_HIT,hitAlteration:{type:at.SECRETION,stacks:100}},xv={ref:"surf",type:$.EAU,effect:rt.SURF,behavior:ht.PROJECTILE,travelSpeed:4,projectileRadius:16,pierceThrough:!0,rotateProjectile:!0,power:100,attackRange:9,knockback:!0},yv={ref:"teleport",attackRange:9,effect:rt.TELEPORT,behavior:ht.SPECIAL,power:0,type:$.PSY,triggerSpecial:"teleport"},Ev={ref:"tonnerre",attackRange:1,behavior:ht.AREA_OF_EFFECT,type:$.ELECTRIQUE,getTilesImpacted(E){const[A,C]=[E.x,E.y];return[[A-1,C-1],[A,C-1],[A+1,C-1],[A-1,C],[A+1,C],[A-1,C+1],[A,C+1],[A+1,C+1]]},effect:rt.TONNERRE,power:95,hitDelay:250,triggerAlteration:{type:at.PARALYSIE,stacks:10}},Tv={ref:"torgnoles",type:$.NORMAL,effect:rt.TORGNOLES,behavior:ht.DIRECT_HIT,hitDelay:10,power:35,rotateSprite:!1,attackRange:1,chargeDelta:8},Sv={ref:"trempette",behavior:ht.SPECIAL,type:$.EAU,power:0,effect:rt.TREMPETTE,attackRange:9},Av={ref:"triplattaque",type:$.NORMAL,effect:rt.TRIPLATTAQUE,behavior:ht.PROJECTILE,travelSpeed:3,attackRange:3,power:65,projectileRadius:7,rotateProjectile:!0,hitEffect:rt.TRIPLATTAQUE_HIT,get hitAlteration(){const E=Math.random();if(E<1/15)return{type:at.PARALYSIE,stacks:15};if(E<2/15)return{type:at.BRULURE,stacks:15};if(E<3/15)return{type:at.GEL,stacks:15}}},Cv={ref:"tunnel",attackRange:9,effect:rt.TUNNEL,behavior:ht.SPECIAL,power:100,type:$.SOL,triggerSpecial:"tunnel",hitDelay:500},Pv={ref:"ultimapoing",type:$.COMBAT,effect:rt.ULTIMAPOING,behavior:ht.DIRECT_HIT,hitDelay:100,power:250,rotateSprite:!1,attackRange:1,chargeDelta:12},Rv={ref:"ultralaser",type:$.DRAGON,behavior:ht.SPECIAL,attackRange:1,power:200,triggerSpecial:"ultralaser"},Lv={ref:"ultrason",type:$.NORMAL,effect:rt.ULTRASON,behavior:ht.PROJECTILE,travelSpeed:4,projectileRadius:8,pierceThrough:!0,rotateProjectile:!0,power:0,hitAlteration:{type:at.CONFUSION,stacks:30},attackRange:2},Ov={ref:"vampirisme",type:$.INSECTE,effect:rt.VAMPIRISME,behavior:ht.DIRECT_HIT,hitDelay:150,chargeDelta:0,power:35,rotateSprite:!0,selfAlteration:{type:at.SOIN,stacks:5},attackRange:1},Mv={ref:"vive_attaque",type:$.NORMAL,effect:rt.VIVE_ATTAQUE,behavior:ht.DIRECT_HIT,hitDelay:20,power:40,rotateSprite:!0,attackRange:1,chargeDelta:10},Iv={ref:"vol_vie",type:$.PLANTE,effect:rt.VOL_VIE,behavior:ht.DIRECT_HIT,hitDelay:400,chargeDelta:0,power:20,rotateSprite:!0,selfAlteration:{type:at.SOIN,stacks:10},attackRange:3},Q={CHARGE:rc,FOUET_LIANES:Ic,LANCE_SOLEIL:Hc,FLAMMECHE:Mc,NITROCHARGE:_c,GRIFFE:wc,PISTOLET_A_O:av,BULLES_D_O:ic,HYDROCANON:Bc,LANCE_FLAMMES:Wc,TREMPETTE:Sv,POUDREUSE:hv,PIQURE:rv,SECRETION:gv,CHOC_MENTAL:ac,POUDRE_TOXIK:lv,PARASPORE:ev,MORSURE:qc,LIGOTAGE:Kc,HYPNOSE:Gc,TELEPORT:yv,ETINCELLE:Rc,CAGE_ECLAIR:sc,MASSDOS:Jc,VIVE_ATTAQUE:Mv,ECLAIR:Ac,RAFALE_PSY:vv,CROCS_FEU:uc,CROC_DE_MORT:lc,VAMPIRISME:Ov,REPOS:pv,PROVOC:dv,SURF:xv,CASCADE:nc,POUVOIR_ANTIQUE:uv,DARD_VENIN:vc,ACIDE:kd,CRUAILE:fc,VOL_VIE:Iv,COUD_BOUE:oc,JET_DE_SABLE:Yc,DETRITUS:gc,GUILLOTINE:Nc,PINCE_MASSE:nv,OURAGAN:tv,BOMB_BEURK:_d,LECHOUILLE:kc,DEVOREVE:xc,BELIER:$d,JET_PIERRES:Vc,ARMURE:jd,HATE:bc,DANSE_LAMES:cc,PICPIC:iv,DESTRUCTION:mc,FURIE:Fc,DRACORAGE:Tc,DRACOCHARGE:Ec,DANSE_FLAMMES:dc,ULTRASON:Lv,TORGNOLES:Tv,BERCEUSE:Qd,ENCORE:Pc,METRONOME:$c,TONNERRE:Ev,POING_KARATE:ov,DOUBLE_PIED:yc,ULTIMAPOING:Pv,BROUILLARD:ec,BALAYAGE:Zd,E_COQUE:Sc,RUGISSEMENT:mv,CROCHET_VENIN:hc,KOUD_KORNE:zc,EMPAL_KORNE:Cc,MAWASHI_GERI:jc,ABRI:Xd,AMNESIE:Jd,PILONNAGE:sv,BOMB_OEUF:tc,ULTRALASER:Rv,LASER_GLACE:Xc,JACKPOT:Uc,GROBISOU:Dc,METEORES:Zc,POUVOIR_LUNAIRE:fv,MORPHING:Qc,EVOLUTION:Lc,TRIPLATTAQUE:Av,ADAPTATION:Kd,TUNNEL:Cv,PSYKO:cv,DEFLAGRATION:pc,BLIZZARD:qd,FATAL_FOUDRE:Oc},_i={ref:"arbok",maxPV:60,maxPP:20,attack:95,defense:69,speed:65,types:[$.POISON],rank:2,baseSkill:Q.CROCHET_VENIN,ppSkill:Q.LIGOTAGE,wildEncounterChance:0,portraitCropY:5},Jn={ref:"abo",maxPV:35,maxPP:20,attack:60,defense:44,speed:55,types:[$.POISON],evolution:_i,evolutionLevel:22,rank:1,baseSkill:Q.CROCHET_VENIN,ppSkill:Q.LIGOTAGE,wildEncounterChance:1,portraitCropY:14},na={ref:"alakazam",maxPV:55,maxPP:10,attack:40,defense:45,speed:120,types:[$.PSY],rank:3,baseSkill:Q.CHOC_MENTAL,ppSkill:Q.TELEPORT,wildEncounterChance:0},Mr={ref:"kadabra",maxPV:40,maxPP:10,attack:35,defense:30,speed:105,types:[$.PSY],evolution:na,evolutionLevel:33,rank:2,baseSkill:Q.CHOC_MENTAL,ppSkill:Q.TELEPORT,wildEncounterChance:0},ts={ref:"abra",maxPV:25,maxPP:10,attack:20,defense:15,speed:90,types:[$.PSY],evolution:Mr,evolutionLevel:16,rank:1,baseSkill:Q.CHOC_MENTAL,ppSkill:Q.TELEPORT,wildEncounterChance:1,portraitCropY:13},Ri={ref:"aeromite",maxPV:70,maxPP:10,attack:65,defense:60,speed:90,types:[$.INSECTE,$.POISON],rank:2,baseSkill:Q.VAMPIRISME,ppSkill:Q.RAFALE_PSY,wildEncounterChance:0},ra={ref:"akwakwak",maxPV:80,maxPP:16,attack:82,defense:78,speed:85,types:[$.EAU,$.PSY],rank:2,baseSkill:Q.CHOC_MENTAL,ppSkill:Q.SURF,wildEncounterChance:0,portraitCropY:14},Xo={ref:"amonistar",maxPV:70,maxPP:20,attack:60,defense:125,speed:55,types:[$.EAU,$.ROCHE],rank:3,baseSkill:Q.PISTOLET_A_O,ppSkill:Q.POUVOIR_ANTIQUE,wildEncounterChance:0,portraitCropY:26},Fu={ref:"amonita",maxPV:35,maxPP:20,attack:40,defense:100,speed:35,types:[$.EAU,$.ROCHE],evolution:Xo,evolutionLevel:40,rank:1,baseSkill:Q.PISTOLET_A_O,ppSkill:Q.POUVOIR_ANTIQUE,wildEncounterChance:.1,portraitCropY:25},fi={ref:"evoli",maxPV:55,maxPP:40,attack:55,defense:50,speed:55,types:[$.NORMAL],rank:1,baseSkill:Q.VIVE_ATTAQUE,ppSkill:Q.EVOLUTION,wildEncounterChance:1},ze={ref:"aquali",maxPV:130,maxPP:20,attack:65,defense:60,speed:65,types:[$.EAU],devolution:fi,rank:1,baseSkill:Q.PISTOLET_A_O,ppSkill:Q.HYDROCANON,wildEncounterChance:1,portraitCropY:24},ko={ref:"arcanin",maxPV:90,maxPP:20,attack:110,defense:80,speed:95,types:[$.FEU],rank:2,baseSkill:Q.MORSURE,ppSkill:Q.CROCS_FEU,wildEncounterChance:0,portraitCropY:10},yo={ref:"artikodin",maxPV:90,maxPP:30,attack:95,defense:100,speed:85,types:[$.VOL,$.GLACE],rank:5,baseSkill:Q.POUDREUSE,ppSkill:Q.BLIZZARD,wildEncounterChance:0,portraitCropY:7},Ko={ref:"dardargnan",maxPV:65,maxPP:10,attack:80,defense:40,speed:75,types:[$.INSECTE,$.POISON],rank:3,baseSkill:Q.DARD_VENIN,ppSkill:Q.FURIE,wildEncounterChance:0},Jo={ref:"coconfort",maxPV:45,maxPP:20,attack:25,defense:50,speed:35,types:[$.INSECTE,$.POISON],evolution:Ko,evolutionLevel:10,rank:2,baseSkill:Q.DARD_VENIN,ppSkill:Q.ARMURE,wildEncounterChance:0},aa={ref:"aspicot",maxPV:40,maxPP:20,attack:35,defense:30,speed:50,types:[$.INSECTE,$.POISON],evolution:Jo,evolutionLevel:7,rank:1,baseSkill:Q.DARD_VENIN,ppSkill:Q.SECRETION,wildEncounterChance:1,portraitCropY:23},jo={ref:"empiflor",maxPV:80,maxPP:20,attack:105,defense:65,speed:70,types:[$.PLANTE,$.POISON],rank:3,baseSkill:Q.FOUET_LIANES,ppSkill:Q.ACIDE,wildEncounterChance:0},oa={ref:"boustiflor",maxPV:65,maxPP:20,attack:90,defense:50,speed:55,types:[$.PLANTE,$.POISON],evolution:jo,evolutionLevel:38,rank:2,baseSkill:Q.FOUET_LIANES,ppSkill:Q.ACIDE,wildEncounterChance:0,portraitCropY:26},Zo={ref:"florizarre",maxPV:80,maxPP:20,attack:82,defense:83,speed:80,types:[$.PLANTE,$.POISON],rank:3,baseSkill:Q.FOUET_LIANES,ppSkill:Q.LANCE_SOLEIL,wildEncounterChance:0,portraitCropY:38},$o={ref:"herbizarre",maxPV:60,maxPP:20,attack:62,defense:63,speed:60,types:[$.PLANTE,$.POISON],evolution:Zo,evolutionLevel:32,rank:2,baseSkill:Q.FOUET_LIANES,ppSkill:Q.LANCE_SOLEIL,wildEncounterChance:0,portraitCropY:24},jn={ref:"bulbizarre",maxPV:45,maxPP:20,attack:49,defense:49,speed:45,types:[$.PLANTE,$.POISON],evolution:$o,evolutionLevel:16,rank:1,baseSkill:Q.FOUET_LIANES,ppSkill:Q.LANCE_SOLEIL,wildEncounterChance:1,portraitCropY:24},wu={ref:"canarticho",maxPV:52,maxPP:15,attack:90,defense:55,speed:60,types:[$.NORMAL,$.VOL],rank:1,baseSkill:Q.PICPIC,ppSkill:Q.DANSE_LAMES,wildEncounterChance:1,portraitCropY:19},Ms={ref:"caninos",maxPV:55,maxPP:20,attack:70,defense:45,speed:60,types:[$.FEU],evolution:ko,evolutionLevel:30,rank:1,baseSkill:Q.MORSURE,ppSkill:Q.CROCS_FEU,wildEncounterChance:1},Du={ref:"tortank",maxPV:79,maxPP:20,attack:83,defense:80,speed:58,types:[$.EAU],rank:3,baseSkill:Q.PISTOLET_A_O,ppSkill:Q.HYDROCANON,wildEncounterChance:0,portraitCropY:8},Nu={ref:"carabaffe",maxPV:59,maxPP:20,attack:63,defense:80,speed:58,types:[$.EAU],evolution:Du,evolutionLevel:36,rank:2,baseSkill:Q.PISTOLET_A_O,ppSkill:Q.HYDROCANON,wildEncounterChance:0},Zn={ref:"carapuce",maxPV:44,maxPP:20,attack:48,defense:65,speed:43,types:[$.EAU],evolution:Nu,evolutionLevel:16,rank:1,baseSkill:Q.PISTOLET_A_O,ppSkill:Q.HYDROCANON,wildEncounterChance:1},Is={ref:"papillusion",maxPV:45,maxPP:30,attack:49,defense:49,speed:45,types:[$.INSECTE,$.VOL],rank:3,baseSkill:Q.CHOC_MENTAL,ppSkill:Q.POUDRE_TOXIK,wildEncounterChance:0,portraitCropY:22},bu={ref:"chrysacier",maxPV:50,maxPP:20,attack:20,defense:55,speed:30,types:[$.INSECTE],evolution:Is,evolutionLevel:10,rank:2,baseSkill:Q.PIQURE,ppSkill:Q.SECRETION,wildEncounterChance:0,portraitCropY:18},la={ref:"chenipan",maxPV:45,maxPP:20,attack:30,defense:35,speed:45,types:[$.INSECTE],evolution:bu,evolutionLevel:7,rank:1,baseSkill:Q.PIQURE,ppSkill:Q.SECRETION,wildEncounterChance:1},$n={ref:"chetiflor",maxPV:50,maxPP:20,attack:75,defense:35,speed:40,types:[$.PLANTE,$.POISON],evolution:oa,evolutionLevel:21,rank:1,baseSkill:Q.FOUET_LIANES,ppSkill:Q.ACIDE,wildEncounterChance:1,portraitCropY:11},Qo={ref:"colossinge",maxPV:65,maxPP:20,attack:105,defense:60,speed:95,types:[$.COMBAT],rank:2,baseSkill:Q.GRIFFE,ppSkill:Q.PROVOC,wildEncounterChance:0},qo={ref:"crustabri",maxPV:50,maxPP:20,attack:95,defense:180,speed:70,types:[$.EAU,$.GLACE],rank:3,baseSkill:Q.PISTOLET_A_O,ppSkill:Q.ABRI,wildEncounterChance:0,portraitCropY:21},Bu={ref:"dodrio",maxPV:60,maxPP:10,attack:110,defense:70,speed:110,types:[$.NORMAL,$.VOL],rank:2,baseSkill:Q.TRIPLATTAQUE,ppSkill:Q.FURIE,wildEncounterChance:0},Gu={ref:"doduo",maxPV:35,maxPP:10,attack:85,defense:45,speed:75,types:[$.NORMAL,$.VOL],evolution:Bu,evolutionLevel:31,rank:1,baseSkill:Q.VIVE_ATTAQUE,ppSkill:Q.FURIE,wildEncounterChance:1},_o={ref:"dracaufeu",maxPV:78,maxPP:20,attack:84,defense:78,speed:100,types:[$.FEU,$.DRAGON],rank:3,baseSkill:Q.FLAMMECHE,ppSkill:Q.LANCE_FLAMMES,wildEncounterChance:0,portraitCropY:8},tl={ref:"dracolosse",maxPV:91,maxPP:20,attack:134,defense:95,speed:80,types:[$.DRAGON,$.VOL],rank:3,baseSkill:Q.CRUAILE,ppSkill:Q.ULTRALASER,wildEncounterChance:0,portraitCropY:1},Ir={ref:"draco",maxPV:61,maxPP:20,attack:84,defense:65,speed:70,types:[$.DRAGON],evolution:tl,evolutionLevel:55,rank:2,baseSkill:Q.DRACOCHARGE,ppSkill:Q.OURAGAN,wildEncounterChance:0,portraitCropY:10},Fr={ref:"ectoplasma",maxPV:60,maxPP:16,attack:65,defense:60,speed:110,types:[$.SPECTRE,$.POISON],rank:3,baseSkill:Q.LECHOUILLE,ppSkill:Q.DEVOREVE,wildEncounterChance:0,portraitCropY:23},Eo={ref:"electhor",maxPV:90,maxPP:30,attack:90,defense:85,speed:100,types:[$.VOL,$.ELECTRIQUE],rank:5,baseSkill:Q.ETINCELLE,ppSkill:Q.FATAL_FOUDRE,wildEncounterChance:0},el={ref:"electrode",maxPV:60,maxPP:50,attack:50,defense:70,speed:150,types:[$.ELECTRIQUE],rank:2,baseSkill:Q.CHARGE,ppSkill:Q.DESTRUCTION,wildEncounterChance:0,portraitCropY:24},sn={ref:"elektek",maxPV:65,maxPP:20,attack:83,defense:57,speed:105,types:[$.ELECTRIQUE],rank:2,baseSkill:Q.ETINCELLE,ppSkill:Q.TONNERRE,wildEncounterChance:.5},Uu={ref:"excelangue",maxPV:50,maxPP:20,attack:105,defense:79,speed:76,types:[$.NORMAL],rank:2,baseSkill:Q.LECHOUILLE,ppSkill:Q.ULTRASON,wildEncounterChance:1},wr={ref:"spectrum",maxPV:45,maxPP:16,attack:50,defense:45,speed:95,types:[$.SPECTRE,$.POISON],evolution:Fr,evolutionLevel:40,rank:2,baseSkill:Q.LECHOUILLE,ppSkill:Q.DEVOREVE,wildEncounterChance:0,portraitCropY:19},li={ref:"fantominus",maxPV:30,maxPP:16,attack:35,defense:30,speed:80,types:[$.SPECTRE,$.POISON],evolution:wr,evolutionLevel:25,rank:1,baseSkill:Q.LECHOUILLE,ppSkill:Q.DEVOREVE,wildEncounterChance:1,portraitCropY:26},il={ref:"ferosinge",maxPV:40,maxPP:20,attack:80,defense:35,speed:70,types:[$.COMBAT],evolution:Qo,evolutionLevel:28,rank:1,baseSkill:Q.GRIFFE,ppSkill:Q.PROVOC,wildEncounterChance:1},ha={ref:"feunard",maxPV:73,maxPP:20,attack:76,defense:75,speed:100,types:[$.FEU],rank:3,baseSkill:Q.FLAMMECHE,ppSkill:Q.DANSE_FLAMMES,wildEncounterChance:0,portraitCropY:13},sl={ref:"flagadoss",maxPV:95,maxPP:20,attack:75,defense:110,speed:30,types:[$.EAU,$.PSY],rank:2,baseSkill:Q.PISTOLET_A_O,ppSkill:Q.AMNESIE,wildEncounterChance:0},nl={ref:"galopa",maxPV:65,maxPP:20,attack:100,defense:70,speed:105,types:[$.FEU],rank:2,baseSkill:Q.CHARGE,ppSkill:Q.NITROCHARGE,wildEncounterChance:0,portraitCropY:9},ua={ref:"goupix",maxPV:38,maxPP:20,attack:41,defense:40,speed:65,types:[$.FEU],evolution:ha,evolutionLevel:20,rank:1,baseSkill:Q.FLAMMECHE,ppSkill:Q.DANSE_FLAMMES,wildEncounterChance:1},fa={ref:"grolem",maxPV:80,maxPP:20,attack:120,defense:130,speed:45,types:[$.ROCHE,$.SOL],rank:3,baseSkill:Q.JET_PIERRES,ppSkill:Q.ARMURE,wildEncounterChance:0,portraitCropY:20},rl={ref:"gravalanch",maxPV:55,maxPP:20,attack:95,defense:115,speed:35,types:[$.ROCHE,$.SOL],evolution:fa,evolutionLevel:38,rank:2,baseSkill:Q.JET_PIERRES,ppSkill:Q.ARMURE,wildEncounterChance:0,portraitCropY:20},al={ref:"grodoudou",maxPV:140,maxPP:20,attack:70,defense:45,speed:45,types:[$.FEE],rank:2,baseSkill:Q.TORGNOLES,ppSkill:Q.BERCEUSE,wildEncounterChance:0,portraitCropY:14},nn={ref:"grotadmorv",maxPV:105,maxPP:20,attack:105,defense:75,speed:50,types:[$.POISON],rank:2,baseSkill:Q.COUD_BOUE,ppSkill:Q.BOMB_BEURK,wildEncounterChance:0},Dr={ref:"hypnomade",maxPV:85,maxPP:20,attack:73,defense:70,speed:67,types:[$.PSY],rank:2,baseSkill:Q.CHOC_MENTAL,ppSkill:Q.HYPNOSE,wildEncounterChance:0,portraitCropY:17},ol={ref:"hypocean",maxPV:55,maxPP:20,attack:65,defense:95,speed:85,types:[$.EAU],rank:2,baseSkill:Q.BULLES_D_O,ppSkill:Q.OURAGAN,wildEncounterChance:0},da={ref:"hypotrempe",maxPV:30,maxPP:20,attack:40,defense:70,speed:60,types:[$.EAU],evolution:ol,evolutionLevel:32,rank:1,baseSkill:Q.BULLES_D_O,ppSkill:Q.OURAGAN,wildEncounterChance:1},Nr={ref:"insecateur",maxPV:70,maxPP:10,attack:110,defense:80,speed:105,types:[$.INSECTE,$.VOL],rank:3,baseSkill:Q.VIVE_ATTAQUE,ppSkill:Q.DANSE_LAMES,wildEncounterChance:.5,portraitCropY:20},ll={ref:"kabutops",maxPV:60,maxPP:20,attack:115,defense:105,speed:70,types:[$.EAU,$.ROCHE],rank:3,baseSkill:Q.GRIFFE,ppSkill:Q.POUVOIR_ANTIQUE,wildEncounterChance:0,portraitCropY:18},hl={ref:"kabuto",maxPV:30,maxPP:20,attack:80,defense:90,speed:55,types:[$.EAU,$.ROCHE],evolution:ll,evolutionLevel:40,rank:1,baseSkill:Q.GRIFFE,ppSkill:Q.POUVOIR_ANTIQUE,wildEncounterChance:.1,portraitCropY:19},ul={ref:"kangourex",maxPV:105,maxPP:20,attack:95,defense:80,speed:90,types:[$.NORMAL],rank:2,baseSkill:Q.MORSURE,ppSkill:Q.ULTIMAPOING,wildEncounterChance:1,portraitCropY:8},br={ref:"kicklee",maxPV:50,maxPP:12,attack:120,defense:53,speed:87,types:[$.COMBAT],rank:2,baseSkill:Q.DOUBLE_PIED,ppSkill:Q.MAWASHI_GERI,wildEncounterChance:.75},Di={ref:"kokiyas",maxPV:30,maxPP:20,attack:65,defense:100,speed:40,types:[$.EAU],evolution:qo,evolutionLevel:27,rank:1,baseSkill:Q.PISTOLET_A_O,ppSkill:Q.ABRI,wildEncounterChance:1,portraitCropY:24},Vu={ref:"krabboss",maxPV:55,maxPP:30,attack:130,defense:115,speed:75,types:[$.EAU],rank:2,baseSkill:Q.PINCE_MASSE,ppSkill:Q.GUILLOTINE,wildEncounterChance:0,portraitCropY:21},Fs={ref:"krabby",maxPV:30,maxPP:30,attack:105,defense:90,speed:50,types:[$.EAU],evolution:Vu,evolutionLevel:28,rank:1,baseSkill:Q.PINCE_MASSE,ppSkill:Q.GUILLOTINE,wildEncounterChance:1,portraitCropY:18},Br={ref:"lamantine",maxPV:90,maxPP:20,attack:70,defense:80,speed:70,types:[$.EAU,$.GLACE],rank:2,baseSkill:Q.POUDREUSE,ppSkill:Q.LASER_GLACE,wildEncounterChance:0,portraitCropY:8},fl={ref:"leveinard",maxPV:250,maxPP:20,attack:5,defense:5,speed:50,types:[$.NORMAL],rank:3,baseSkill:Q.TORGNOLES,ppSkill:Q.E_COQUE,wildEncounterChance:.5},rn={ref:"leviator",maxPV:95,maxPP:25,attack:125,defense:79,speed:81,types:[$.EAU,$.VOL],rank:3,baseSkill:Q.MORSURE,ppSkill:Q.DRACORAGE,wildEncounterChance:0,portraitCropY:22},ca={ref:"lippoutou",maxPV:65,maxPP:20,attack:50,defense:35,speed:95,types:[$.GLACE,$.PSY],rank:2,baseSkill:Q.POUDREUSE,ppSkill:Q.GROBISOU,wildEncounterChance:1},es={ref:"lokhlass",maxPV:130,maxPP:16,attack:85,defense:80,speed:60,types:[$.EAU,$.GLACE],rank:3,baseSkill:Q.PISTOLET_A_O,ppSkill:Q.SURF,wildEncounterChance:.5,portraitCropY:6},dl={ref:"mackogneur",maxPV:90,maxPP:20,attack:130,defense:80,speed:55,types:[$.COMBAT],rank:3,baseSkill:Q.POING_KARATE,ppSkill:Q.BALAYAGE,wildEncounterChance:0,portraitCropY:8},cl={ref:"machopeur",maxPV:80,maxPP:20,attack:100,defense:70,speed:45,types:[$.COMBAT],evolution:dl,evolutionLevel:40,rank:2,baseSkill:Q.POING_KARATE,ppSkill:Q.BALAYAGE,wildEncounterChance:0,portraitCropY:12},ws={ref:"machoc",maxPV:70,maxPP:20,attack:80,defense:50,speed:35,types:[$.COMBAT],evolution:cl,evolutionLevel:28,rank:1,baseSkill:Q.POING_KARATE,ppSkill:Q.BALAYAGE,wildEncounterChance:1,portraitCropY:12},Ds={ref:"magicarpe",maxPV:20,maxPP:0,attack:10,defense:55,speed:80,types:[$.EAU],evolution:rn,evolutionLevel:20,rank:1,baseSkill:Q.TREMPETTE,wildEncounterChance:1,portraitCropY:21},Qn={ref:"magmar",maxPV:65,maxPP:20,attack:95,defense:57,speed:93,types:[$.FEU],rank:2,baseSkill:Q.FLAMMECHE,ppSkill:Q.BROUILLARD,wildEncounterChance:.5,portraitCropY:12},va={ref:"magneton",maxPV:50,maxPP:20,attack:60,defense:95,speed:70,types:[$.ELECTRIQUE],rank:2,baseSkill:Q.ETINCELLE,ppSkill:Q.CAGE_ECLAIR,wildEncounterChance:0,portraitCropY:21},an={ref:"magneti",maxPV:25,maxPP:20,attack:35,defense:70,speed:45,types:[$.ELECTRIQUE],evolution:va,evolutionLevel:30,rank:1,baseSkill:Q.ETINCELLE,ppSkill:Q.CAGE_ECLAIR,wildEncounterChance:1,portraitCropY:22},vl={ref:"melodelfe",maxPV:95,maxPP:20,attack:70,defense:73,speed:60,types:[$.FEE],rank:1,baseSkill:Q.TORGNOLES,ppSkill:Q.POUVOIR_LUNAIRE,wildEncounterChance:0},is={ref:"melofee",maxPV:70,maxPP:20,attack:45,defense:48,speed:35,types:[$.FEE],evolution:vl,evolutionLevel:26,rank:1,baseSkill:Q.TORGNOLES,ppSkill:Q.POUVOIR_LUNAIRE,wildEncounterChance:1},Gr={ref:"metamorph",maxPV:48,maxPP:1,attack:48,defense:48,speed:48,types:[$.NORMAL],rank:2,baseSkill:Q.MORPHING,wildEncounterChance:1},Yu={ref:"mew",maxPV:100,maxPP:5,attack:100,defense:100,speed:100,types:[$.PSY],rank:5,baseSkill:Q.CHOC_MENTAL,ppSkill:Q.METRONOME,wildEncounterChance:.02},To={ref:"mewtwo",maxPV:106,maxPP:20,attack:110,defense:90,speed:130,types:[$.PSY],rank:5,baseSkill:Q.CHOC_MENTAL,ppSkill:Q.PSYKO,wildEncounterChance:0,portraitCropY:5},zu={ref:"persian",maxPV:65,maxPP:20,attack:70,defense:60,speed:115,types:[$.NORMAL],rank:1,baseSkill:Q.GRIFFE,ppSkill:Q.JACKPOT,wildEncounterChance:0,portraitCropY:12},Ni={ref:"miaouss",maxPV:40,maxPP:20,attack:45,defense:35,speed:90,types:[$.NORMAL],evolution:zu,evolutionLevel:28,rank:1,baseSkill:Q.GRIFFE,ppSkill:Q.JACKPOT,wildEncounterChance:1},on={ref:"mimitoss",maxPV:60,maxPP:10,attack:55,defense:50,speed:45,types:[$.INSECTE,$.POISON],evolution:Ri,evolutionLevel:31,rank:1,baseSkill:Q.CHARGE,ppSkill:Q.RAFALE_PSY,wildEncounterChance:1,portraitCropY:20},Ur={ref:"minidraco",maxPV:41,maxPP:20,attack:64,defense:45,speed:50,types:[$.DRAGON],evolution:Ir,evolutionLevel:30,rank:1,baseSkill:Q.DRACOCHARGE,ppSkill:Q.OURAGAN,wildEncounterChance:1},ss={ref:"mrmime",maxPV:40,maxPP:15,attack:45,defense:65,speed:90,types:[$.PSY,$.FEE],rank:1,baseSkill:Q.TORGNOLES,ppSkill:Q.ENCORE,wildEncounterChance:1},ns={ref:"rafflesia",maxPV:75,maxPP:20,attack:80,defense:85,speed:50,types:[$.PLANTE,$.POISON],rank:3,baseSkill:Q.VOL_VIE,ppSkill:Q.POUDRE_TOXIK,wildEncounterChance:0,portraitCropY:19},pl={ref:"ortide",maxPV:60,maxPP:20,attack:65,defense:70,speed:40,types:[$.PLANTE,$.POISON],evolution:ns,evolutionLevel:37,rank:2,baseSkill:Q.VOL_VIE,ppSkill:Q.POUDRE_TOXIK,wildEncounterChance:0,portraitCropY:22},rs={ref:"mystherbe",maxPV:45,maxPP:20,attack:50,defense:55,speed:30,types:[$.PLANTE,$.POISON],evolution:pl,evolutionLevel:21,rank:1,baseSkill:Q.VOL_VIE,ppSkill:Q.POUDRE_TOXIK,wildEncounterChance:1,portraitCropY:28},ml={ref:"nidoking",maxPV:81,maxPP:20,attack:102,defense:77,speed:85,types:[$.POISON,$.SOL],rank:1,baseSkill:Q.DOUBLE_PIED,ppSkill:Q.EMPAL_KORNE,wildEncounterChance:0},gl={ref:"nidoqueen",maxPV:90,maxPP:20,attack:82,defense:87,speed:76,types:[$.POISON,$.SOL],rank:1,baseSkill:Q.DOUBLE_PIED,ppSkill:Q.RUGISSEMENT,wildEncounterChance:0,portraitCropY:9},Wu={ref:"nidorina",maxPV:70,maxPP:20,attack:62,defense:67,speed:56,types:[$.POISON],evolution:gl,evolutionLevel:32,rank:1,baseSkill:Q.DARD_VENIN,ppSkill:Q.RUGISSEMENT,wildEncounterChance:0,portraitCropY:19},Hu={ref:"nidoranf",maxPV:55,maxPP:20,attack:47,defense:52,speed:41,types:[$.POISON],evolution:Wu,evolutionLevel:16,rank:1,baseSkill:Q.GRIFFE,ppSkill:Q.RUGISSEMENT,wildEncounterChance:1},Xu={ref:"nidorino",maxPV:61,maxPP:20,attack:72,defense:57,speed:65,types:[$.POISON],evolution:ml,evolutionLevel:32,rank:1,baseSkill:Q.DARD_VENIN,ppSkill:Q.EMPAL_KORNE,wildEncounterChance:0,portraitCropY:26},xl={ref:"nidoranm",maxPV:46,maxPP:20,attack:57,defense:40,speed:50,types:[$.POISON],evolution:Xu,evolutionLevel:16,rank:1,baseSkill:Q.DARD_VENIN,ppSkill:Q.EMPAL_KORNE,wildEncounterChance:1,portraitCropY:26},Ns={ref:"noadkoko",maxPV:60,maxPP:15,attack:95,defense:85,speed:55,types:[$.PLANTE,$.PSY],rank:2,baseSkill:Q.PILONNAGE,ppSkill:Q.BOMB_OEUF,wildEncounterChance:0,portraitCropY:20},pa={ref:"noeufnoeuf",maxPV:60,maxPP:20,attack:40,defense:80,speed:40,types:[$.PLANTE,$.PSY],evolution:Ns,evolutionLevel:40,rank:1,baseSkill:Q.PILONNAGE,ppSkill:Q.BOMB_OEUF,wildEncounterChance:1},yl={ref:"nosferalto",maxPV:75,maxPP:20,attack:80,defense:70,speed:90,types:[$.VOL,$.POISON],rank:2,baseSkill:Q.VAMPIRISME,ppSkill:Q.ULTRASON,wildEncounterChance:0,portraitCropY:24},ma={ref:"nosferapti",maxPV:40,maxPP:20,attack:45,defense:35,speed:55,types:[$.VOL,$.POISON],evolution:yl,evolutionLevel:25,rank:1,baseSkill:Q.VAMPIRISME,ppSkill:Q.ULTRASON,wildEncounterChance:1,portraitCropY:24},Li={ref:"onix",maxPV:35,maxPP:20,attack:45,defense:160,speed:70,types:[$.ROCHE,$.SOL],rank:1,baseSkill:Q.JET_PIERRES,ppSkill:Q.ARMURE,wildEncounterChance:1,portraitCropY:30},El={ref:"ossatueur",maxPV:60,maxPP:20,attack:80,defense:110,speed:45,types:[$.SOL],rank:2,baseSkill:Q.MASSDOS,ppSkill:Q.RUGISSEMENT,wildEncounterChance:0,portraitCropY:10},ga={ref:"osselait",maxPV:50,maxPP:20,attack:50,defense:95,speed:35,types:[$.SOL],evolution:El,evolutionLevel:28,rank:1,baseSkill:Q.MASSDOS,ppSkill:Q.RUGISSEMENT,wildEncounterChance:1,portraitCropY:14},qn={ref:"otaria",maxPV:65,maxPP:20,attack:45,defense:55,speed:45,types:[$.EAU,$.GLACE],evolution:Br,evolutionLevel:34,rank:1,baseSkill:Q.POUDREUSE,ppSkill:Q.LASER_GLACE,wildEncounterChance:1,portraitCropY:34},Tl={ref:"parasect",maxPV:60,maxPP:20,attack:95,defense:80,speed:30,types:[$.INSECTE,$.PLANTE],rank:2,baseSkill:Q.GRIFFE,ppSkill:Q.PARASPORE,wildEncounterChance:0,portraitCropY:24},_n={ref:"paras",maxPV:35,maxPP:20,attack:70,defense:55,speed:25,types:[$.INSECTE,$.PLANTE],evolution:Tl,evolutionLevel:24,rank:1,baseSkill:Q.GRIFFE,ppSkill:Q.PARASPORE,wildEncounterChance:1,portraitCropY:21},ku={ref:"rapasdepic",maxPV:65,maxPP:10,attack:90,defense:65,speed:100,types:[$.VOL,$.NORMAL],rank:2,baseSkill:Q.CRUAILE,ppSkill:Q.HATE,wildEncounterChance:0,portraitCropY:30},Sl={ref:"piafabec",maxPV:40,maxPP:10,attack:60,defense:30,speed:70,types:[$.VOL,$.NORMAL],evolution:ku,evolutionLevel:20,rank:1,baseSkill:Q.PICPIC,ppSkill:Q.HATE,wildEncounterChance:1},Al={ref:"raichu",maxPV:60,maxPP:30,attack:90,defense:55,speed:100,types:[$.ELECTRIQUE],rank:2,baseSkill:Q.VIVE_ATTAQUE,ppSkill:Q.ECLAIR,wildEncounterChance:0},as={ref:"pikachu",maxPV:35,maxPP:30,attack:55,defense:40,speed:90,types:[$.ELECTRIQUE],evolution:Al,evolutionLevel:22,rank:1,baseSkill:Q.VIVE_ATTAQUE,ppSkill:Q.ECLAIR,wildEncounterChance:1},Ku={ref:"poissoroy",maxPV:80,maxPP:20,attack:92,defense:65,speed:68,types:[$.EAU],rank:2,baseSkill:Q.KOUD_KORNE,ppSkill:Q.CASCADE,wildEncounterChance:0,portraitCropY:14},tr={ref:"poissirene",maxPV:45,maxPP:20,attack:67,defense:60,speed:63,types:[$.EAU],evolution:Ku,evolutionLevel:33,rank:1,baseSkill:Q.KOUD_KORNE,ppSkill:Q.CASCADE,wildEncounterChance:1,portraitCropY:27},Cl={ref:"ponyta",maxPV:50,maxPP:20,attack:85,defense:55,speed:90,types:[$.FEU],evolution:nl,evolutionLevel:40,rank:1,baseSkill:Q.CHARGE,ppSkill:Q.NITROCHARGE,wildEncounterChance:1,portraitCropY:13},xa={ref:"porygon",maxPV:65,maxPP:20,attack:60,defense:70,speed:40,types:[$.NORMAL],rank:2,baseSkill:Q.TRIPLATTAQUE,ppSkill:Q.ADAPTATION,wildEncounterChance:1,portraitCropY:15},Oi={ref:"psykokwak",maxPV:50,maxPP:16,attack:52,defense:48,speed:55,types:[$.EAU,$.PSY],evolution:ra,evolutionLevel:33,rank:1,baseSkill:Q.CHOC_MENTAL,ppSkill:Q.SURF,wildEncounterChance:1},Pl={ref:"ptera",maxPV:80,maxPP:20,attack:105,defense:65,speed:130,types:[$.DRAGON,$.ROCHE],rank:3,baseSkill:Q.CRUAILE,ppSkill:Q.POUVOIR_ANTIQUE,wildEncounterChance:.1,portraitCropY:22},Rl={ref:"tartard",maxPV:90,maxPP:20,attack:95,defense:95,speed:70,types:[$.EAU],rank:3,baseSkill:Q.TORGNOLES,ppSkill:Q.HYPNOSE,wildEncounterChance:0,portraitCropY:11},Ju={ref:"tetarte",maxPV:65,maxPP:20,attack:65,defense:65,speed:90,types:[$.EAU],evolution:Rl,evolutionLevel:35,rank:2,baseSkill:Q.TORGNOLES,ppSkill:Q.HYPNOSE,wildEncounterChance:0,portraitCropY:13},ya={ref:"ptitard",maxPV:40,maxPP:20,attack:50,defense:40,speed:90,types:[$.EAU],evolution:Ju,evolutionLevel:25,rank:1,baseSkill:Q.BULLES_D_O,ppSkill:Q.HYPNOSE,wildEncounterChance:1},si={ref:"pyroli",maxPV:65,maxPP:20,attack:130,defense:60,speed:65,types:[$.FEU],devolution:fi,rank:1,baseSkill:Q.FLAMMECHE,ppSkill:Q.CROCS_FEU,wildEncounterChance:1,portraitCropY:15},gi={ref:"racaillou",maxPV:40,maxPP:20,attack:80,defense:100,speed:20,types:[$.ROCHE,$.SOL],evolution:rl,evolutionLevel:25,rank:1,baseSkill:Q.JET_PIERRES,ppSkill:Q.ARMURE,wildEncounterChance:1,portraitCropY:25},Ll={ref:"ramoloss",maxPV:90,maxPP:20,attack:65,defense:65,speed:15,types:[$.EAU,$.PSY],evolution:sl,evolutionLevel:37,rank:1,baseSkill:Q.PISTOLET_A_O,ppSkill:Q.AMNESIE,wildEncounterChance:1,portraitCropY:28},ju={ref:"rattatac",maxPV:55,maxPP:20,attack:81,defense:60,speed:97,types:[$.NORMAL],rank:2,baseSkill:Q.MORSURE,ppSkill:Q.CROC_DE_MORT,wildEncounterChance:0,portraitCropY:18},Ea={ref:"rattata",maxPV:30,maxPP:20,attack:56,defense:35,speed:72,types:[$.NORMAL],evolution:ju,evolutionLevel:20,rank:1,baseSkill:Q.MORSURE,ppSkill:Q.CROC_DE_MORT,wildEncounterChance:1,portraitCropY:24},Ol={ref:"reptincel",maxPV:58,maxPP:20,attack:64,defense:58,speed:80,types:[$.FEU],evolution:_o,evolutionLevel:36,rank:2,baseSkill:Q.FLAMMECHE,ppSkill:Q.LANCE_FLAMMES,wildEncounterChance:0},Ta={ref:"rhinoferos",maxPV:105,maxPP:20,attack:130,defense:120,speed:40,types:[$.ROCHE,$.SOL],rank:3,baseSkill:Q.KOUD_KORNE,ppSkill:Q.EMPAL_KORNE,wildEncounterChance:0},os={ref:"rhinocorne",maxPV:80,maxPP:20,attack:85,defense:95,speed:25,types:[$.ROCHE,$.SOL],evolution:Ta,evolutionLevel:42,rank:1,baseSkill:Q.KOUD_KORNE,ppSkill:Q.EMPAL_KORNE,wildEncounterChance:1,portraitCropY:32},ln={ref:"rondoudou",maxPV:115,maxPP:20,attack:45,defense:20,speed:20,types:[$.FEE],evolution:al,evolutionLevel:25,rank:1,baseSkill:Q.TORGNOLES,ppSkill:Q.BERCEUSE,wildEncounterChance:1},Ml={ref:"ronflex",maxPV:160,maxPP:30,attack:110,defense:65,speed:30,types:[$.NORMAL],rank:3,baseSkill:Q.CHARGE,ppSkill:Q.REPOS,wildEncounterChance:1,portraitCropY:8},Zu={ref:"roucarnage",maxPV:83,maxPP:20,attack:80,defense:75,speed:91,types:[$.VOL,$.NORMAL],rank:3,baseSkill:Q.CRUAILE,ppSkill:Q.OURAGAN,wildEncounterChance:0},$u={ref:"roucoups",maxPV:63,maxPP:20,attack:60,defense:55,speed:71,types:[$.VOL,$.NORMAL],evolution:Zu,evolutionLevel:36,rank:2,baseSkill:Q.PICPIC,ppSkill:Q.OURAGAN,wildEncounterChance:0,portraitCropY:8},Il={ref:"roucool",maxPV:40,maxPP:20,attack:45,defense:40,speed:56,types:[$.VOL,$.NORMAL],evolution:$u,evolutionLevel:18,rank:1,baseSkill:Q.PICPIC,ppSkill:Q.OURAGAN,wildEncounterChance:1},Fl={ref:"sablaireau",maxPV:75,maxPP:15,attack:100,defense:110,speed:65,types:[$.SOL],rank:2,baseSkill:Q.GRIFFE,ppSkill:Q.JET_DE_SABLE,wildEncounterChance:0,portraitCropY:15},bs={ref:"sabelette",maxPV:50,maxPP:15,attack:75,defense:85,speed:40,types:[$.SOL],evolution:Fl,evolutionLevel:22,rank:1,baseSkill:Q.GRIFFE,ppSkill:Q.JET_DE_SABLE,wildEncounterChance:1},er={ref:"salameche",maxPV:39,maxPP:20,attack:52,defense:43,speed:65,types:[$.FEU],evolution:Ol,evolutionLevel:16,rank:1,baseSkill:Q.FLAMMECHE,ppSkill:Q.LANCE_FLAMMES,wildEncounterChance:1,portraitCropY:13},ls={ref:"saquedeneu",maxPV:65,maxPP:20,attack:55,defense:115,speed:60,types:[$.PLANTE],rank:3,baseSkill:Q.FOUET_LIANES,ppSkill:Q.LIGOTAGE,wildEncounterChance:1,portraitCropY:22},hn={ref:"scarabrute",maxPV:65,maxPP:25,attack:125,defense:100,speed:85,types:[$.INSECTE],rank:3,baseSkill:Q.GRIFFE,ppSkill:Q.GUILLOTINE,wildEncounterChance:.75,portraitCropY:20},un={ref:"smogogo",maxPV:65,maxPP:20,attack:90,defense:120,speed:60,types:[$.POISON],rank:2,baseSkill:Q.DETRITUS,ppSkill:Q.BROUILLARD,wildEncounterChance:0},hi={ref:"smogo",maxPV:40,maxPP:20,attack:65,defense:95,speed:35,types:[$.POISON],evolution:un,evolutionLevel:35,rank:1,baseSkill:Q.DETRITUS,ppSkill:Q.BROUILLARD,wildEncounterChance:1},fn={ref:"soporifik",maxPV:60,maxPP:20,attack:48,defense:45,speed:42,types:[$.PSY],evolution:Dr,evolutionLevel:26,rank:1,baseSkill:Q.CHOC_MENTAL,ppSkill:Q.HYPNOSE,wildEncounterChance:1},wl={ref:"staross",maxPV:60,maxPP:20,attack:75,defense:85,speed:115,types:[$.EAU,$.PSY],rank:3,baseSkill:Q.PISTOLET_A_O,ppSkill:Q.METEORES,wildEncounterChance:0},Mi={ref:"stari",maxPV:30,maxPP:10,attack:45,defense:55,speed:85,types:[$.EAU],evolution:wl,evolutionLevel:40,rank:1,baseSkill:Q.PISTOLET_A_O,ppSkill:Q.METEORES,wildEncounterChance:1,portraitCropY:22},So={ref:"sulfura",maxPV:90,maxPP:30,attack:100,defense:90,speed:90,types:[$.VOL,$.FEU],rank:5,baseSkill:Q.FLAMMECHE,ppSkill:Q.DEFLAGRATION,wildEncounterChance:0,portraitCropY:31},Ii={ref:"tadmorv",maxPV:80,maxPP:20,attack:80,defense:50,speed:25,types:[$.POISON],evolution:nn,evolutionLevel:38,rank:1,baseSkill:Q.COUD_BOUE,ppSkill:Q.BOMB_BEURK,wildEncounterChance:1},Dl={ref:"triopikeur",maxPV:35,maxPP:15,attack:100,defense:50,speed:120,types:[$.SOL],rank:2,baseSkill:Q.TRIPLATTAQUE,ppSkill:Q.TUNNEL,wildEncounterChance:0,portraitCropY:18},hs={ref:"taupiqueur",maxPV:10,maxPP:15,attack:55,defense:25,speed:95,types:[$.SOL],evolution:Dl,evolutionLevel:26,rank:1,baseSkill:Q.COUD_BOUE,ppSkill:Q.TUNNEL,wildEncounterChance:1,portraitCropY:22},Nl={ref:"tauros",maxPV:75,maxPP:20,attack:100,defense:95,speed:110,types:[$.NORMAL],rank:2,baseSkill:Q.CHARGE,ppSkill:Q.BELIER,wildEncounterChance:1,portraitCropY:22},dn={ref:"tentacruel",maxPV:80,maxPP:20,attack:70,defense:65,speed:100,types:[$.EAU,$.POISON],rank:2,baseSkill:Q.DARD_VENIN,ppSkill:Q.ACIDE,wildEncounterChance:0},Qu={ref:"tentacool",maxPV:40,maxPP:20,attack:40,defense:35,speed:70,types:[$.EAU,$.POISON],evolution:dn,evolutionLevel:30,rank:1,baseSkill:Q.DARD_VENIN,ppSkill:Q.ACIDE,wildEncounterChance:1},Vr={ref:"tygnon",maxPV:50,maxPP:20,attack:105,defense:79,speed:76,types:[$.COMBAT],rank:2,baseSkill:Q.POING_KARATE,ppSkill:Q.ULTIMAPOING,wildEncounterChance:.75},$e={ref:"voltali",maxPV:65,maxPP:20,attack:65,defense:60,speed:130,types:[$.ELECTRIQUE],devolution:fi,rank:2,baseSkill:Q.ETINCELLE,ppSkill:Q.ECLAIR,wildEncounterChance:1,portraitCropY:21},Xi={ref:"voltorbe",maxPV:40,maxPP:50,attack:30,defense:50,speed:100,types:[$.ELECTRIQUE],evolution:el,evolutionLevel:22,rank:1,baseSkill:Q.CHARGE,ppSkill:Q.DESTRUCTION,wildEncounterChance:1,portraitCropY:23};var $s=(E=>(E[E.Holdable=0]="Holdable",E[E.Usable=1]="Usable",E[E.Trade=2]="Trade",E))($s||{});const We={ref:"pokeball",type:2},cn={ref:"baie_sitrus",cost:1,type:0},vn={ref:"baie_ceriz",cost:1,type:0},pn={ref:"baie_oran",cost:1,type:0},mn={ref:"baie_mepo",cost:1,type:0},gn={ref:"attaque+",cost:2,type:0},xn={ref:"defense+",cost:2,type:0},yn={ref:"vitesse+",cost:2,type:0},En={ref:"pv+",cost:2,type:0},Tn={ref:"pokeflute",cost:2,type:0},Sn={ref:"repousse",cost:2,type:1},us={ref:"gemme_draco",cost:3,type:0},fs={ref:"gemme_hydro",cost:3,type:0},ds={ref:"gemme_flamme",cost:3,type:0},cs={ref:"gemme_herbe",cost:3,type:0},vs={ref:"gemme_volt",cost:3,type:0},ps={ref:"gemme_terre",cost:3,type:0},ms={ref:"gemme_insecte",cost:3,type:0},gs={ref:"gemme_pixie",cost:3,type:0},xs={ref:"gemme_ciel",cost:3,type:0},ys={ref:"gemme_poing",cost:3,type:0},Es={ref:"gemme_glace",cost:3,type:0},Ts={ref:"gemme_psy",cost:3,type:0},Ss={ref:"gemme_toxic",cost:3,type:0},As={ref:"gemme_roc",cost:3,type:0},Cs={ref:"gemme_ombre",cost:3,type:0},Ps={ref:"gemme_grise",cost:3,type:0},Fv=[xs,us,ds,Es,Ps,cs,fs,ms,Cs,gs,ys,Ts,As,ps,Ss,vs],An={ref:"grelot_coque",cost:4,type:0},Cn={ref:"boule_fumee",cost:4,type:0},Pn={ref:"multi_exp",cost:4,type:0},Rn={ref:"max_elixir",cost:4,type:0},Ln={ref:"encens_fleur",cost:5,type:0},On={ref:"orbe_toxique",cost:5,type:0},Mn={ref:"orbe_flamme",cost:5,type:0},In={ref:"orbe_foudre",cost:5,type:0},Fn={ref:"super_bonbon",cost:5,type:0},wn={ref:"fossile_amonita",type:2},Dn={ref:"fossile_kabuto",type:2},Nn={ref:"fossile_ptera",type:2},qu=[wn,Dn,Nn],bn={ref:"filet",type:0},Bn={ref:"parapluie",type:0},ke={[We.ref]:We,[vn.ref]:vn,[pn.ref]:pn,[mn.ref]:mn,[cn.ref]:cn,[gn.ref]:gn,[xn.ref]:xn,[yn.ref]:yn,[En.ref]:En,[Tn.ref]:Tn,[Sn.ref]:Sn,[xs.ref]:xs,[us.ref]:us,[ds.ref]:ds,[As.ref]:As,[Es.ref]:Es,[cs.ref]:cs,[fs.ref]:fs,[ms.ref]:ms,[Cs.ref]:Cs,[gs.ref]:gs,[ys.ref]:ys,[Ts.ref]:Ts,[ps.ref]:ps,[Ss.ref]:Ss,[vs.ref]:vs,[Ps.ref]:Ps,[An.ref]:An,[Cn.ref]:Cn,[Pn.ref]:Pn,[Rn.ref]:Rn,[Ln.ref]:Ln,[Mn.ref]:Mn,[On.ref]:On,[In.ref]:In,[Fn.ref]:Fn,[wn.ref]:wn,[Dn.ref]:Dn,[Nn.ref]:Nn,[Bn.ref]:Bn,[bn.ref]:bn};Object.values(ke);const _u=[We,vn,mn,pn,cn,En,yn,gn,xn,Sn,Tn,us,ys,xs,vs,cs,fs,ds,Ss,Ts,ms,As,Cs,Es,Ps,gs,ps,An,Cn,Pn,Rn,Fn,wn,Dn,Nn,Ln,On,Mn,In,bn,Bn];function Ao(E,A){return E.evolution&&E.evolutionLevel&&A>E.evolutionLevel?Ao(E.evolution,A):E.devolution&&A(E.MOVE="MOVE",E.ATTACK="ATTACK",E.IDLE="IDLE",E.JUMP="JUMP",E))(Ge||{});const De=[jn,$o,Zo,er,Ol,_o,Zn,Nu,Du,la,bu,Is,aa,Jo,Ko,Il,$u,Zu,Ea,ju,Sl,ku,Jn,_i,as,Al,bs,Fl,Hu,Wu,gl,xl,Xu,ml,is,vl,ua,ha,ln,al,ma,yl,rs,pl,ns,_n,Tl,on,Ri,hs,Dl,Ni,zu,Oi,ra,il,Qo,Ms,ko,ya,Ju,Rl,ts,Mr,na,ws,cl,dl,$n,oa,jo,Qu,dn,gi,rl,fa,Cl,nl,Ll,sl,an,va,wu,Gu,Bu,qn,Br,Ii,nn,Di,qo,li,wr,Fr,Li,fn,Dr,Fs,Vu,Xi,el,pa,Ns,ga,El,br,Vr,Uu,hi,un,os,Ta,fl,ls,ul,da,ol,tr,Ku,Mi,wl,ss,Nr,ca,sn,Qn,hn,Nl,Ds,rn,es,Gr,fi,ze,$e,si,xa,Fu,Xo,hl,ll,Pl,Ml,yo,Eo,So,Ur,Ir,tl,To,Yu];De.forEach(E=>{const A=De.find(C=>C.evolution===E);A&&(E.devolution=A)});function tf(E){return De.filter(A=>A.types.includes(E))}function ef(){return De.filter(E=>E.rank<5)}function wv(E){return tf(E).filter(A=>A.rank<5)}function sf(E){return`00${De.indexOf(E)+1}`.slice(-3)}function Sa(E){return`cry${sf(E)}`}function bi(E){E.load.spritesheet("pokemon","assets/sprites/pokemon_gen1.png",{frameWidth:32,frameHeight:32,spacing:0,margin:0}),E.load.spritesheet("pokemon_portraits","assets/sprites/pokemon_portraits.png",{frameWidth:64,frameHeight:64,spacing:1,margin:0}),E.load.spritesheet("effects","assets/sprites/effects.png",{frameWidth:64,frameHeight:64,spacing:0,margin:0}),E.load.spritesheet("pokeball","assets/sprites/pokeballs.png",{frameWidth:64,frameHeight:64,spacing:0,margin:0}),E.load.spritesheet("trainer","assets/sprites/trainers.png",{frameWidth:64,frameHeight:64,spacing:0,margin:0}),E.load.spritesheet("trainers_intros","assets/sprites/trainers_intros.png",{frameWidth:320,frameHeight:128,spacing:0,margin:0}),E.load.spritesheet("gui","assets/sprites/gui.png",{frameWidth:32,frameHeight:32,spacing:0,margin:0}),E.load.spritesheet("icons16x16","assets/sprites/icons_16x16.png",{frameWidth:16,frameHeight:16,spacing:0,margin:0}),E.load.spritesheet("buttons","assets/sprites/buttons.png",{frameWidth:64,frameHeight:32,spacing:0,margin:0}),E.load.spritesheet("buttons_big","assets/sprites/buttons_big.png",{frameWidth:96,frameHeight:32,spacing:0,margin:0}),E.load.spritesheet("texts","assets/sprites/texts.png",{frameWidth:256,frameHeight:64,spacing:0,margin:0}),E.load.spritesheet("map","assets/sprites/map.png",{frameWidth:16,frameHeight:16,spacing:0,margin:0}),E.load.spritesheet("characters","assets/sprites/characters.png",{frameWidth:24,frameHeight:24,spacing:0,margin:0}),E.load.spritesheet("interactions","assets/sprites/interactions.png",{frameWidth:16,frameHeight:16,spacing:0,margin:0}),E.load.spritesheet("collisions","assets/sprites/collisions.png",{frameWidth:16,frameHeight:16,spacing:0,margin:0}),E.load.spritesheet("items","assets/sprites/items.png",{frameWidth:32,frameHeight:32,spacing:1,margin:0})}const bl={ref:"badge_roche",frameIndex:22},ir={ref:"badge_cascade",frameIndex:23},Bl={ref:"badge_foudre",frameIndex:24},Gl={ref:"badge_prisme",frameIndex:25},Ul={ref:"badge_ame",frameIndex:26},Vl={ref:"badge_marais",frameIndex:27},Yl={ref:"badge_volcan",frameIndex:28},Aa={ref:"badge_terre",frameIndex:29},Co=[bl,ir,Bl,Gl,Ul,Vl,Yl,Aa];function Dv(E,A,C,R,F=0,B=-1){E.create({key:C,frames:E.generateFrameNumbers(A,{frames:R}),frameRate:F,repeat:B})}function zl(E,A,C){C.forEach(R=>Dv(E,A,...R))}var mt=(E=>(E.UP="UP",E.DOWN="DOWN",E.LEFT="LEFT",E.RIGHT="RIGHT",E))(mt||{});function Eh(){return{UP:null,DOWN:null,LEFT:null,RIGHT:null}}function Wl(E){const A=Math.PI/2;return E==="DOWN"?A:E==="LEFT"?2*A:E==="UP"?3*A:0}function Ca(E,A){return Hl(new Phaser.Math.Vector2(E,A))}function Hl(E){if(E.length()===0)return null;const A=E.angle(),C=Math.PI/4;return A>=0&&A<1*C?"RIGHT":A>=1*C&&A<3*C?"DOWN":A>=3*C&&A<5*C?"LEFT":A>=5*C&&A<7*C?"UP":A>=7*C&&A<8*C?"RIGHT":null}function Nv(E){const A=Math.PI*2,C=Math.PI/4;return E=(E+A)%A,E>C&&E<3*C?"UP":E>3*C&&E<5*C?"LEFT":E>5*C&&E<7*C?"DOWN":"RIGHT"}function sr(E){return E==="UP"?[0,-1]:E==="DOWN"?[0,1]:E==="LEFT"?[-1,0]:E==="RIGHT"?[1,0]:[0,0]}const nf=[mt.UP,mt.LEFT,mt.DOWN,mt.RIGHT];function Pa(E,A){return E>0?mt.RIGHT:E<0?mt.LEFT:A<0?mt.UP:mt.DOWN}let Th=!1;function Ra(E,A){Th||(rf(E),Bv(E,A),bv(E,A),Gv(E,A),Vv(E),Yv(E),Uv(E,A),Th=!0)}function bv(E,A){Object.values(rt).forEach(C=>{E.create({key:C.key,frames:E.generateFrameNumbers("effects",{frames:C.frames}),frameRate:C.frameRate,repeat:A?-1:C.repeat??0})})}let Sh=!1;function rf(E){Sh||(De.forEach((A,C)=>{E.create({key:`${A.ref}_portrait`,frames:E.generateFrameNumbers("pokemon_portraits",{start:C,end:C})}),nf.forEach((R,F)=>{const B=C%15*2+Math.floor(C/15)*120;E.create({key:`${A.ref}_${R}`,frames:E.generateFrameNumbers("pokemon",{frames:[B+F%2+(F>1?60:0),B+30+F%2+(F>1?60:0)]}),frameRate:5,repeat:-1})})}),Sh=!0)}function Bv(E,A){Wo.forEach((C,R)=>{E.create({key:`${C}_idle`,frames:E.generateFrameNumbers("pokeball",{frames:[R+3*5]})}),E.create({key:`${C}_launch`,frames:E.generateFrameNumbers("pokeball",{frames:Array.from({length:3}).map((F,B)=>B*5+R)}),frameRate:12,repeat:-1}),E.create({key:`${C}_in`,frames:E.generateFrameNumbers("pokeball",{frames:[...Array.from({length:12}).map((F,B)=>(B+3)*5+R),R+3*5]}),frameRate:16,repeat:A?-1:0}),E.create({key:`${C}_jiggle`,frames:E.generateFrameNumbers("pokeball",{frames:Array.from({length:5}).map((F,B)=>(B+15)*5+R)}),frameRate:16,repeat:-1,yoyo:!0}),E.create({key:`${C}_jiggle_once`,frames:E.generateFrameNumbers("pokeball",{frames:[R+17*5,R+16*5,R+15*5,R+16*5,R+3*5]}),frameRate:16,repeat:0}),E.create({key:`${C}_out`,frames:E.generateFrameNumbers("pokeball",{frames:Array.from({length:6}).map((F,B)=>(B+20)*5+R)}),frameRate:16,repeat:A?-1:0}),E.create({key:`${C}_catch`,frames:E.generateFrameNumbers("pokeball",{frames:[...Array.from({length:5}).map((F,B)=>(B+26)*5+R),R+3*5]}),frameRate:16,repeat:A?-1:0})})}function Gv(E,A){E.create({key:"trainer_launch",frames:E.generateFrameNumbers("trainer",{frames:[0,1,2,3,4,0]}),frameRate:8,repeat:A?-1:0}),E.create({key:"trainer_idle",frames:E.generateFrameNumbers("trainer",{frames:[0]})}),E.create({key:"trainer_victory",frames:E.generateFrameNumbers("trainer",{frames:[5]})}),E.create({key:"trainer_defeat",frames:E.generateFrameNumbers("trainer",{frames:[6]})})}function Uv(E,A){E.create({key:"cursor_wave",frames:E.generateFrameNumbers("gui",{frames:[0,1]}),frameRate:8,repeat:A?-1:0}),E.create({key:"cursor_drag",frames:E.generateFrameNumbers("gui",{frames:[2,3,4,5]}),frameRate:16,repeat:A?-1:0}),E.create({key:"cursor_drop",frames:E.generateFrameNumbers("gui",{frames:[5,4,3,2,6]}),frameRate:16,repeat:A?-1:0}),E.create({key:"cursor_click",frames:E.generateFrameNumbers("gui",{frames:[7,8,9,6]}),frameRate:16,repeat:A?-1:0}),E.create({key:"cursor_point",frames:E.generateFrameNumbers("gui",{frames:[6]}),frameRate:8,repeat:A?-1:0}),E.create({key:"stat_attack",frames:E.generateFrameNumbers("gui",{frames:[10]})}),E.create({key:"stat_speed",frames:E.generateFrameNumbers("gui",{frames:[11]})}),E.create({key:"stat_defense",frames:E.generateFrameNumbers("gui",{frames:[12]})}),E.create({key:"stat_range",frames:E.generateFrameNumbers("gui",{frames:[13]})}),Object.values($).forEach(C=>{E.create({key:`type_${C.ref}`,frames:E.generateFrameNumbers("icons16x16",{frames:[C.frameIndex]})})}),Object.values(Co).forEach(C=>{E.create({key:C.ref,frames:E.generateFrameNumbers("icons16x16",{frames:[C.frameIndex]})})}),E.create({key:"icon_pokeball",frames:E.generateFrameNumbers("icons16x16",{frames:[20]})}),E.create({key:"text_victoire",frames:E.generateFrameNumbers("texts",{frames:[0]})}),E.create({key:"text_defaite",frames:E.generateFrameNumbers("texts",{frames:[1]})}),E.create({key:"text_fight",frames:E.generateFrameNumbers("texts",{frames:[2]})}),E.create({key:"text_capture",frames:E.generateFrameNumbers("texts",{frames:[3]})})}function Vv(E,A){zl(E,"map",[["player_idle",[4]],["player_right",[0,1],8,-1],["player_left",[2,3],8,-1],["player_down",[5,6],8,-1],["player_up_idle",[7]],["player_up",[8,9],8,-1],["cascade",[10,11,12,13],8,-1],["boat",[14,15],1,-1],["ronflex",[16]],["highlight",[17,18,19],4,-1],["map_direction_arrow",[20]],["gift",[21]],["safari",[22]],["cave_entrance",[23]],["icon_ligue",[24]]])}function Yv(E,A){zl(E,"interactions",[["interaction_talk",[0,1,2,3],3,-1],["interaction_loot",[4,5,6,7,6,5],6,-1]])}class af extends At.Scene{constructor(){super("TestAnimsScene")}preload(){bi(this)}create(){Ra(this.anims,!0);const A=this.add.graphics();A.setDepth(100);const C=this.add.graphics();De.forEach((R,F)=>{nf.forEach((B,v)=>{const y=30+35*v+150*Math.floor(F/15),t=15+35*(F%15);C.fillStyle(v%2?16711782:6684927).fillRect(y-16,t-16,32,32),this.add.sprite(y,t,"pokemon").play(`${R.ref}_${B}`),A.fillStyle(0,1).fillPoint(y,t,4),A.fillStyle(16777215,1).fillPoint(y,t,2)})}),this.add.sprite(20,550,"effects").play("water_bubble"),this.add.sprite(60,550,"effects").play("water_jet"),this.add.sprite(100,550,"effects").play("water_drop"),this.add.sprite(140,550,"effects").play("water_bubble2"),this.add.sprite(180,550,"effects").play("water_shield"),this.add.sprite(220,550,"effects").play("ice_star"),this.add.sprite(260,550,"effects").play("ice_square"),this.add.sprite(300,550,"effects").play("ice_shard"),this.add.sprite(340,550,"effects").play("ice_tear"),this.add.sprite(380,550,"effects").play("ice_shield"),this.add.sprite(420,550,"effects").play("ice_crystal"),this.add.sprite(460,550,"pokemon").play("dracaufeu_DOWN"),this.add.sprite(460,550,"effects").play("frozen"),this.add.sprite(500,550,"effects").play("fire_ground_explosion"),this.add.sprite(540,550,"effects").play("fire_explosion_circle"),this.add.sprite(580,550,"effects").play("fire_flamethrower"),this.add.sprite(620,550,"effects").play("fire_blaze"),this.add.sprite(660,550,"effects").play("fire_blast"),this.add.sprite(700,550,"effects").play("fire_ball"),this.add.sprite(740,550,"effects").play("fire_arrow"),this.add.sprite(780,550,"effects").play("fire_jet"),this.add.sprite(820,550,"effects").play("fire_claw"),this.add.sprite(860,550,"effects").play("fire_explosion"),this.add.sprite(900,550,"effects").play("fire_pierce"),this.add.sprite(940,550,"effects").play("fire_hit"),this.add.sprite(980,550,"effects").play("fire_slice"),this.add.sprite(1020,550,"effects").play("fire_swurl"),this.add.sprite(1060,550,"effects").play("energy_ball"),this.add.sprite(1100,550,"effects").play("paralyze"),this.add.sprite(1140,550,"effects").play("elec_sparks"),this.add.sprite(1180,550,"effects").play("elec_thunder"),this.add.sprite(1220,550,"effects").play("elec_ball"),this.add.sprite(1300,550,"effects").play("vampire_seed"),this.add.sprite(1340,550,"effects").play("vine_whip"),this.add.sprite(1380,550,"effects").play("thorn_spear"),this.add.sprite(1420,550,"effects").play("roots"),this.add.sprite(1460,550,"effects").play("poison_ball"),this.add.sprite(30,600,"effects").play("dark_slice"),this.add.sprite(60,600,"effects").play("hit_star_big"),this.add.sprite(100,600,"effects").play("hit_star"),this.add.sprite(140,600,"effects").play("claw_left"),this.add.sprite(180,600,"effects").play("claw_right"),this.add.sprite(220,600,"effects").play("fist"),this.add.sprite(260,600,"effects").play("paw"),this.add.sprite(300,600,"effects").play("foot"),this.add.sprite(340,600,"effects").play("hand"),this.add.sprite(380,600,"effects").play("provocation"),this.add.sprite(400,600,"effects").play("provocated"),this.add.sprite(460,600,"effects").play("bone"),this.add.sprite(520,600,"effects").play("sweep"),this.add.sprite(30,950,"gui").play("cursor_point"),this.add.sprite(60,950,"gui").play("cursor_click"),this.add.sprite(90,950,"gui").play("cursor_drag"),this.add.sprite(120,950,"gui").play("cursor_drop"),this.add.sprite(150,950,"gui").play("cursor_wave"),Wo.forEach((R,F)=>{this.add.sprite(30+F*64,700,"pokeball").play(`${R}_launch`),this.add.sprite(30+F*64,750,"pokeball").play(`${R}_in`),this.add.sprite(30+F*64,800,"pokeball").play(`${R}_out`),this.add.sprite(30+F*64,850,"pokeball").play(`${R}_jiggle`),this.add.sprite(30+F*64,900,"pokeball").play(`${R}_catch`)})}}function zv(){document.getElementById("gameboy").remove(),document.getElementById("game").setAttribute("style","width: 1920px; height: 1080px; left: auto; position: static");const E=new At.Game({type:At.AUTO,parent:"game",backgroundColor:"#33A5E7",scale:{width:1920,height:1080,mode:At.Scale.FIT,autoCenter:At.Scale.CENTER_BOTH},scene:[af]});globalThis.game=E}const Pt=E=>typeof E=="string",Hs=()=>{let E,A;const C=new Promise((R,F)=>{E=R,A=F});return C.resolve=E,C.reject=A,C},Ah=E=>E==null?"":""+E,Wv=(E,A,C)=>{E.forEach(R=>{A[R]&&(C[R]=A[R])})},Hv=/###/g,Ch=E=>E&&E.indexOf("###")>-1?E.replace(Hv,"."):E,Ph=E=>!E||Pt(E),Qs=(E,A,C)=>{const R=Pt(A)?A.split("."):A;let F=0;for(;F{const{obj:R,k:F}=Qs(E,A,Object);if(R!==void 0||A.length===1){R[F]=C;return}let B=A[A.length-1],v=A.slice(0,A.length-1),y=Qs(E,v,Object);for(;y.obj===void 0&&v.length;)B=`${v[v.length-1]}.${B}`,v=v.slice(0,v.length-1),y=Qs(E,v,Object),y&&y.obj&&typeof y.obj[`${y.k}.${B}`]<"u"&&(y.obj=void 0);y.obj[`${y.k}.${B}`]=C},Xv=(E,A,C,R)=>{const{obj:F,k:B}=Qs(E,A,Object);F[B]=F[B]||[],F[B].push(C)},Yr=(E,A)=>{const{obj:C,k:R}=Qs(E,A);if(C)return C[R]},kv=(E,A,C)=>{const R=Yr(E,C);return R!==void 0?R:Yr(A,C)},of=(E,A,C)=>{for(const R in A)R!=="__proto__"&&R!=="constructor"&&(R in E?Pt(E[R])||E[R]instanceof String||Pt(A[R])||A[R]instanceof String?C&&(E[R]=A[R]):of(E[R],A[R],C):E[R]=A[R]);return E},Vi=E=>E.replace(/[\-\[\]\/\{\}\(\)\*\+\?\.\\\^\$\|]/g,"\\$&");var Kv={"&":"&","<":"<",">":">",'"':""","'":"'","/":"/"};const Jv=E=>Pt(E)?E.replace(/[&<>"'\/]/g,A=>Kv[A]):E;class jv{constructor(A){this.capacity=A,this.regExpMap=new Map,this.regExpQueue=[]}getRegExp(A){const C=this.regExpMap.get(A);if(C!==void 0)return C;const R=new RegExp(A);return this.regExpQueue.length===this.capacity&&this.regExpMap.delete(this.regExpQueue.shift()),this.regExpMap.set(A,R),this.regExpQueue.push(A),R}}const Zv=[" ",",","?","!",";"],$v=new jv(20),Qv=(E,A,C)=>{A=A||"",C=C||"";const R=Zv.filter(v=>A.indexOf(v)<0&&C.indexOf(v)<0);if(R.length===0)return!0;const F=$v.getRegExp(`(${R.map(v=>v==="?"?"\\?":v).join("|")})`);let B=!F.test(E);if(!B){const v=E.indexOf(C);v>0&&!F.test(E.substring(0,v))&&(B=!0)}return B},Po=function(E,A){let C=arguments.length>2&&arguments[2]!==void 0?arguments[2]:".";if(!E)return;if(E[A])return E[A];const R=A.split(C);let F=E;for(let B=0;B-1&&tE&&E.replace("_","-"),qv={type:"logger",log(E){this.output("log",E)},warn(E){this.output("warn",E)},error(E){this.output("error",E)},output(E,A){console&&console[E]&&console[E].apply(console,A)}};class Wr{constructor(A){let C=arguments.length>1&&arguments[1]!==void 0?arguments[1]:{};this.init(A,C)}init(A){let C=arguments.length>1&&arguments[1]!==void 0?arguments[1]:{};this.prefix=C.prefix||"i18next:",this.logger=A||qv,this.options=C,this.debug=C.debug}log(){for(var A=arguments.length,C=new Array(A),R=0;R{this.observers[R]||(this.observers[R]=new Map);const F=this.observers[R].get(C)||0;this.observers[R].set(C,F+1)}),this}off(A,C){if(this.observers[A]){if(!C){delete this.observers[A];return}this.observers[A].delete(C)}}emit(A){for(var C=arguments.length,R=new Array(C>1?C-1:0),F=1;F{let[y,t]=v;for(let h=0;h{let[y,t]=v;for(let h=0;h1&&arguments[1]!==void 0?arguments[1]:{ns:["translation"],defaultNS:"translation"};super(),this.data=A||{},this.options=C,this.options.keySeparator===void 0&&(this.options.keySeparator="."),this.options.ignoreJSONStructure===void 0&&(this.options.ignoreJSONStructure=!0)}addNamespaces(A){this.options.ns.indexOf(A)<0&&this.options.ns.push(A)}removeNamespaces(A){const C=this.options.ns.indexOf(A);C>-1&&this.options.ns.splice(C,1)}getResource(A,C,R){let F=arguments.length>3&&arguments[3]!==void 0?arguments[3]:{};const B=F.keySeparator!==void 0?F.keySeparator:this.options.keySeparator,v=F.ignoreJSONStructure!==void 0?F.ignoreJSONStructure:this.options.ignoreJSONStructure;let y;A.indexOf(".")>-1?y=A.split("."):(y=[A,C],R&&(Array.isArray(R)?y.push(...R):Pt(R)&&B?y.push(...R.split(B)):y.push(R)));const t=Yr(this.data,y);return!t&&!C&&!R&&A.indexOf(".")>-1&&(A=y[0],C=y[1],R=y.slice(2).join(".")),t||!v||!Pt(R)?t:Po(this.data&&this.data[A]&&this.data[A][C],R,B)}addResource(A,C,R,F){let B=arguments.length>4&&arguments[4]!==void 0?arguments[4]:{silent:!1};const v=B.keySeparator!==void 0?B.keySeparator:this.options.keySeparator;let y=[A,C];R&&(y=y.concat(v?R.split(v):R)),A.indexOf(".")>-1&&(y=A.split("."),F=C,C=y[1]),this.addNamespaces(C),Rh(this.data,y,F),B.silent||this.emit("added",A,C,R,F)}addResources(A,C,R){let F=arguments.length>3&&arguments[3]!==void 0?arguments[3]:{silent:!1};for(const B in R)(Pt(R[B])||Array.isArray(R[B]))&&this.addResource(A,C,B,R[B],{silent:!0});F.silent||this.emit("added",A,C,R)}addResourceBundle(A,C,R,F,B){let v=arguments.length>5&&arguments[5]!==void 0?arguments[5]:{silent:!1,skipCopy:!1},y=[A,C];A.indexOf(".")>-1&&(y=A.split("."),F=R,R=C,C=y[1]),this.addNamespaces(C);let t=Yr(this.data,y)||{};v.skipCopy||(R=JSON.parse(JSON.stringify(R))),F?of(t,R,B):t={...t,...R},Rh(this.data,y,t),v.silent||this.emit("added",A,C,R)}removeResourceBundle(A,C){this.hasResourceBundle(A,C)&&delete this.data[A][C],this.removeNamespaces(C),this.emit("removed",A,C)}hasResourceBundle(A,C){return this.getResource(A,C)!==void 0}getResourceBundle(A,C){return C||(C=this.options.defaultNS),this.options.compatibilityAPI==="v1"?{...this.getResource(A,C)}:this.getResource(A,C)}getDataByLanguage(A){return this.data[A]}hasLanguageSomeTranslations(A){const C=this.getDataByLanguage(A);return!!(C&&Object.keys(C)||[]).find(F=>C[F]&&Object.keys(C[F]).length>0)}toJSON(){return this.data}}var lf={processors:{},addPostProcessor(E){this.processors[E.name]=E},handle(E,A,C,R,F){return E.forEach(B=>{this.processors[B]&&(A=this.processors[B].process(A,C,R,F))}),A}};const Oh={};class Hr extends La{constructor(A){let C=arguments.length>1&&arguments[1]!==void 0?arguments[1]:{};super(),Wv(["resourceStore","languageUtils","pluralResolver","interpolator","backendConnector","i18nFormat","utils"],A,this),this.options=C,this.options.keySeparator===void 0&&(this.options.keySeparator="."),this.logger=Qe.create("translator")}changeLanguage(A){A&&(this.language=A)}exists(A){let C=arguments.length>1&&arguments[1]!==void 0?arguments[1]:{interpolation:{}};if(A==null)return!1;const R=this.resolve(A,C);return R&&R.res!==void 0}extractFromKey(A,C){let R=C.nsSeparator!==void 0?C.nsSeparator:this.options.nsSeparator;R===void 0&&(R=":");const F=C.keySeparator!==void 0?C.keySeparator:this.options.keySeparator;let B=C.ns||this.options.defaultNS||[];const v=R&&A.indexOf(R)>-1,y=!this.options.userDefinedKeySeparator&&!C.keySeparator&&!this.options.userDefinedNsSeparator&&!C.nsSeparator&&!Qv(A,R,F);if(v&&!y){const t=A.match(this.interpolator.nestingRegexp);if(t&&t.length>0)return{key:A,namespaces:Pt(B)?[B]:B};const h=A.split(R);(R!==F||R===F&&this.options.ns.indexOf(h[0])>-1)&&(B=h.shift()),A=h.join(F)}return{key:A,namespaces:Pt(B)?[B]:B}}translate(A,C,R){if(typeof C!="object"&&this.options.overloadTranslationOptionHandler&&(C=this.options.overloadTranslationOptionHandler(arguments)),typeof C=="object"&&(C={...C}),C||(C={}),A==null)return"";Array.isArray(A)||(A=[String(A)]);const F=C.returnDetails!==void 0?C.returnDetails:this.options.returnDetails,B=C.keySeparator!==void 0?C.keySeparator:this.options.keySeparator,{key:v,namespaces:y}=this.extractFromKey(A[A.length-1],C),t=y[y.length-1],h=C.lng||this.language,p=C.appendNamespaceToCIMode||this.options.appendNamespaceToCIMode;if(h&&h.toLowerCase()==="cimode"){if(p){const f=C.nsSeparator||this.options.nsSeparator;return F?{res:`${t}${f}${v}`,usedKey:v,exactUsedKey:v,usedLng:h,usedNS:t,usedParams:this.getUsedParamsDetails(C)}:`${t}${f}${v}`}return F?{res:v,usedKey:v,exactUsedKey:v,usedLng:h,usedNS:t,usedParams:this.getUsedParamsDetails(C)}:v}const a=this.resolve(A,C);let n=a&&a.res;const r=a&&a.usedKey||v,e=a&&a.exactUsedKey||v,s=Object.prototype.toString.apply(n),o=["[object Number]","[object Function]","[object RegExp]"],i=C.joinArrays!==void 0?C.joinArrays:this.options.joinArrays,l=!this.i18nFormat||this.i18nFormat.handleAsObject,u=!Pt(n)&&typeof n!="boolean"&&typeof n!="number";if(l&&n&&u&&o.indexOf(s)<0&&!(Pt(i)&&Array.isArray(n))){if(!C.returnObjects&&!this.options.returnObjects){this.options.returnedObjectHandler||this.logger.warn("accessing an object - but returnObjects options is not enabled!");const f=this.options.returnedObjectHandler?this.options.returnedObjectHandler(r,n,{...C,ns:y}):`key '${v} (${this.language})' returned an object instead of string.`;return F?(a.res=f,a.usedParams=this.getUsedParamsDetails(C),a):f}if(B){const f=Array.isArray(n),d=f?[]:{},c=f?e:r;for(const m in n)if(Object.prototype.hasOwnProperty.call(n,m)){const g=`${c}${B}${m}`;d[m]=this.translate(g,{...C,joinArrays:!1,ns:y}),d[m]===g&&(d[m]=n[m])}n=d}}else if(l&&Pt(i)&&Array.isArray(n))n=n.join(i),n&&(n=this.extendTranslation(n,A,C,R));else{let f=!1,d=!1;const c=C.count!==void 0&&!Pt(C.count),m=Hr.hasDefaultValue(C),g=c?this.pluralResolver.getSuffix(h,C.count,C):"",x=C.ordinal&&c?this.pluralResolver.getSuffix(h,C.count,{ordinal:!1}):"",T=c&&!C.ordinal&&C.count===0&&this.pluralResolver.shouldUseIntlApi(),S=T&&C[`defaultValue${this.options.pluralSeparator}zero`]||C[`defaultValue${g}`]||C[`defaultValue${x}`]||C.defaultValue;!this.isValidLookup(n)&&m&&(f=!0,n=S),this.isValidLookup(n)||(d=!0,n=v);const L=(C.missingKeyNoValueFallbackToKey||this.options.missingKeyNoValueFallbackToKey)&&d?void 0:n,I=m&&S!==n&&this.options.updateMissing;if(d||f||I){if(this.logger.log(I?"updateKey":"missingKey",h,t,v,I?S:n),B){const D=this.resolve(v,{...C,keySeparator:!1});D&&D.res&&this.logger.warn("Seems the loaded translations were in flat JSON format instead of nested. Either set keySeparator: false on init or make sure your translations are published in nested format.")}let O=[];const M=this.languageUtils.getFallbackCodes(this.options.fallbackLng,C.lng||this.language);if(this.options.saveMissingTo==="fallback"&&M&&M[0])for(let D=0;D{const H=m&&Y!==n?Y:L;this.options.missingKeyHandler?this.options.missingKeyHandler(D,t,U,H,I,C):this.backendConnector&&this.backendConnector.saveMissing&&this.backendConnector.saveMissing(D,t,U,H,I,C),this.emit("missingKey",D,t,U,n)};this.options.saveMissing&&(this.options.saveMissingPlurals&&c?O.forEach(D=>{const U=this.pluralResolver.getSuffixes(D,C);T&&C[`defaultValue${this.options.pluralSeparator}zero`]&&U.indexOf(`${this.options.pluralSeparator}zero`)<0&&U.push(`${this.options.pluralSeparator}zero`),U.forEach(Y=>{w([D],v+Y,C[`defaultValue${Y}`]||S)})}):w(O,v,S))}n=this.extendTranslation(n,A,C,a,R),d&&n===v&&this.options.appendNamespaceToMissingKey&&(n=`${t}:${v}`),(d||f)&&this.options.parseMissingKeyHandler&&(this.options.compatibilityAPI!=="v1"?n=this.options.parseMissingKeyHandler(this.options.appendNamespaceToMissingKey?`${t}:${v}`:v,f?n:void 0):n=this.options.parseMissingKeyHandler(n))}return F?(a.res=n,a.usedParams=this.getUsedParamsDetails(C),a):n}extendTranslation(A,C,R,F,B){var v=this;if(this.i18nFormat&&this.i18nFormat.parse)A=this.i18nFormat.parse(A,{...this.options.interpolation.defaultVariables,...R},R.lng||this.language||F.usedLng,F.usedNS,F.usedKey,{resolved:F});else if(!R.skipInterpolation){R.interpolation&&this.interpolator.init({...R,interpolation:{...this.options.interpolation,...R.interpolation}});const h=Pt(A)&&(R&&R.interpolation&&R.interpolation.skipOnVariables!==void 0?R.interpolation.skipOnVariables:this.options.interpolation.skipOnVariables);let p;if(h){const n=A.match(this.interpolator.nestingRegexp);p=n&&n.length}let a=R.replace&&!Pt(R.replace)?R.replace:R;if(this.options.interpolation.defaultVariables&&(a={...this.options.interpolation.defaultVariables,...a}),A=this.interpolator.interpolate(A,a,R.lng||this.language||F.usedLng,R),h){const n=A.match(this.interpolator.nestingRegexp),r=n&&n.length;p1&&arguments[1]!==void 0?arguments[1]:{},R,F,B,v,y;return Pt(A)&&(A=[A]),A.forEach(t=>{if(this.isValidLookup(R))return;const h=this.extractFromKey(t,C),p=h.key;F=p;let a=h.namespaces;this.options.fallbackNS&&(a=a.concat(this.options.fallbackNS));const n=C.count!==void 0&&!Pt(C.count),r=n&&!C.ordinal&&C.count===0&&this.pluralResolver.shouldUseIntlApi(),e=C.context!==void 0&&(Pt(C.context)||typeof C.context=="number")&&C.context!=="",s=C.lngs?C.lngs:this.languageUtils.toResolveHierarchy(C.lng||this.language,C.fallbackLng);a.forEach(o=>{this.isValidLookup(R)||(y=o,!Oh[`${s[0]}-${o}`]&&this.utils&&this.utils.hasLoadedNamespace&&!this.utils.hasLoadedNamespace(y)&&(Oh[`${s[0]}-${o}`]=!0,this.logger.warn(`key "${F}" for languages "${s.join(", ")}" won't get resolved as namespace "${y}" was not yet loaded`,"This means something IS WRONG in your setup. You access the t function before i18next.init / i18next.loadNamespace / i18next.changeLanguage was done. Wait for the callback or Promise to resolve before accessing it!!!")),s.forEach(i=>{if(this.isValidLookup(R))return;v=i;const l=[p];if(this.i18nFormat&&this.i18nFormat.addLookupKeys)this.i18nFormat.addLookupKeys(l,p,i,o,C);else{let f;n&&(f=this.pluralResolver.getSuffix(i,C.count,C));const d=`${this.options.pluralSeparator}zero`,c=`${this.options.pluralSeparator}ordinal${this.options.pluralSeparator}`;if(n&&(l.push(p+f),C.ordinal&&f.indexOf(c)===0&&l.push(p+f.replace(c,this.options.pluralSeparator)),r&&l.push(p+d)),e){const m=`${p}${this.options.contextSeparator}${C.context}`;l.push(m),n&&(l.push(m+f),C.ordinal&&f.indexOf(c)===0&&l.push(m+f.replace(c,this.options.pluralSeparator)),r&&l.push(m+d))}}let u;for(;u=l.pop();)this.isValidLookup(R)||(B=u,R=this.getResource(i,o,u,C))}))})}),{res:R,usedKey:F,exactUsedKey:B,usedLng:v,usedNS:y}}isValidLookup(A){return A!==void 0&&!(!this.options.returnNull&&A===null)&&!(!this.options.returnEmptyString&&A==="")}getResource(A,C,R){let F=arguments.length>3&&arguments[3]!==void 0?arguments[3]:{};return this.i18nFormat&&this.i18nFormat.getResource?this.i18nFormat.getResource(A,C,R,F):this.resourceStore.getResource(A,C,R,F)}getUsedParamsDetails(){let A=arguments.length>0&&arguments[0]!==void 0?arguments[0]:{};const C=["defaultValue","ordinal","context","replace","lng","lngs","fallbackLng","ns","keySeparator","nsSeparator","returnObjects","returnDetails","joinArrays","postProcess","interpolation"],R=A.replace&&!Pt(A.replace);let F=R?A.replace:A;if(R&&typeof A.count<"u"&&(F.count=A.count),this.options.interpolation.defaultVariables&&(F={...this.options.interpolation.defaultVariables,...F}),!R){F={...F};for(const B of C)delete F[B]}return F}static hasDefaultValue(A){const C="defaultValue";for(const R in A)if(Object.prototype.hasOwnProperty.call(A,R)&&C===R.substring(0,C.length)&&A[R]!==void 0)return!0;return!1}}const Va=E=>E.charAt(0).toUpperCase()+E.slice(1);class Mh{constructor(A){this.options=A,this.supportedLngs=this.options.supportedLngs||!1,this.logger=Qe.create("languageUtils")}getScriptPartFromCode(A){if(A=zr(A),!A||A.indexOf("-")<0)return null;const C=A.split("-");return C.length===2||(C.pop(),C[C.length-1].toLowerCase()==="x")?null:this.formatLanguageCode(C.join("-"))}getLanguagePartFromCode(A){if(A=zr(A),!A||A.indexOf("-")<0)return A;const C=A.split("-");return this.formatLanguageCode(C[0])}formatLanguageCode(A){if(Pt(A)&&A.indexOf("-")>-1){if(typeof Intl<"u"&&typeof Intl.getCanonicalLocales<"u")try{let F=Intl.getCanonicalLocales(A)[0];if(F&&this.options.lowerCaseLng&&(F=F.toLowerCase()),F)return F}catch{}const C=["hans","hant","latn","cyrl","cans","mong","arab"];let R=A.split("-");return this.options.lowerCaseLng?R=R.map(F=>F.toLowerCase()):R.length===2?(R[0]=R[0].toLowerCase(),R[1]=R[1].toUpperCase(),C.indexOf(R[1].toLowerCase())>-1&&(R[1]=Va(R[1].toLowerCase()))):R.length===3&&(R[0]=R[0].toLowerCase(),R[1].length===2&&(R[1]=R[1].toUpperCase()),R[0]!=="sgn"&&R[2].length===2&&(R[2]=R[2].toUpperCase()),C.indexOf(R[1].toLowerCase())>-1&&(R[1]=Va(R[1].toLowerCase())),C.indexOf(R[2].toLowerCase())>-1&&(R[2]=Va(R[2].toLowerCase()))),R.join("-")}return this.options.cleanCode||this.options.lowerCaseLng?A.toLowerCase():A}isSupportedCode(A){return(this.options.load==="languageOnly"||this.options.nonExplicitSupportedLngs)&&(A=this.getLanguagePartFromCode(A)),!this.supportedLngs||!this.supportedLngs.length||this.supportedLngs.indexOf(A)>-1}getBestMatchFromCodes(A){if(!A)return null;let C;return A.forEach(R=>{if(C)return;const F=this.formatLanguageCode(R);(!this.options.supportedLngs||this.isSupportedCode(F))&&(C=F)}),!C&&this.options.supportedLngs&&A.forEach(R=>{if(C)return;const F=this.getLanguagePartFromCode(R);if(this.isSupportedCode(F))return C=F;C=this.options.supportedLngs.find(B=>{if(B===F)return B;if(!(B.indexOf("-")<0&&F.indexOf("-")<0)&&(B.indexOf("-")>0&&F.indexOf("-")<0&&B.substring(0,B.indexOf("-"))===F||B.indexOf(F)===0&&F.length>1))return B})}),C||(C=this.getFallbackCodes(this.options.fallbackLng)[0]),C}getFallbackCodes(A,C){if(!A)return[];if(typeof A=="function"&&(A=A(C)),Pt(A)&&(A=[A]),Array.isArray(A))return A;if(!C)return A.default||[];let R=A[C];return R||(R=A[this.getScriptPartFromCode(C)]),R||(R=A[this.formatLanguageCode(C)]),R||(R=A[this.getLanguagePartFromCode(C)]),R||(R=A.default),R||[]}toResolveHierarchy(A,C){const R=this.getFallbackCodes(C||this.options.fallbackLng||[],A),F=[],B=v=>{v&&(this.isSupportedCode(v)?F.push(v):this.logger.warn(`rejecting language code not found in supportedLngs: ${v}`))};return Pt(A)&&(A.indexOf("-")>-1||A.indexOf("_")>-1)?(this.options.load!=="languageOnly"&&B(this.formatLanguageCode(A)),this.options.load!=="languageOnly"&&this.options.load!=="currentOnly"&&B(this.getScriptPartFromCode(A)),this.options.load!=="currentOnly"&&B(this.getLanguagePartFromCode(A))):Pt(A)&&B(this.formatLanguageCode(A)),R.forEach(v=>{F.indexOf(v)<0&&B(this.formatLanguageCode(v))}),F}}let _v=[{lngs:["ach","ak","am","arn","br","fil","gun","ln","mfe","mg","mi","oc","pt","pt-BR","tg","tl","ti","tr","uz","wa"],nr:[1,2],fc:1},{lngs:["af","an","ast","az","bg","bn","ca","da","de","dev","el","en","eo","es","et","eu","fi","fo","fur","fy","gl","gu","ha","hi","hu","hy","ia","it","kk","kn","ku","lb","mai","ml","mn","mr","nah","nap","nb","ne","nl","nn","no","nso","pa","pap","pms","ps","pt-PT","rm","sco","se","si","so","son","sq","sv","sw","ta","te","tk","ur","yo"],nr:[1,2],fc:2},{lngs:["ay","bo","cgg","fa","ht","id","ja","jbo","ka","km","ko","ky","lo","ms","sah","su","th","tt","ug","vi","wo","zh"],nr:[1],fc:3},{lngs:["be","bs","cnr","dz","hr","ru","sr","uk"],nr:[1,2,5],fc:4},{lngs:["ar"],nr:[0,1,2,3,11,100],fc:5},{lngs:["cs","sk"],nr:[1,2,5],fc:6},{lngs:["csb","pl"],nr:[1,2,5],fc:7},{lngs:["cy"],nr:[1,2,3,8],fc:8},{lngs:["fr"],nr:[1,2],fc:9},{lngs:["ga"],nr:[1,2,3,7,11],fc:10},{lngs:["gd"],nr:[1,2,3,20],fc:11},{lngs:["is"],nr:[1,2],fc:12},{lngs:["jv"],nr:[0,1],fc:13},{lngs:["kw"],nr:[1,2,3,4],fc:14},{lngs:["lt"],nr:[1,2,10],fc:15},{lngs:["lv"],nr:[1,2,0],fc:16},{lngs:["mk"],nr:[1,2],fc:17},{lngs:["mnk"],nr:[0,1,2],fc:18},{lngs:["mt"],nr:[1,2,11,20],fc:19},{lngs:["or"],nr:[2,1],fc:2},{lngs:["ro"],nr:[1,2,20],fc:20},{lngs:["sl"],nr:[5,1,2,3],fc:21},{lngs:["he","iw"],nr:[1,2,20,21],fc:22}],tp={1:E=>+(E>1),2:E=>+(E!=1),3:E=>0,4:E=>E%10==1&&E%100!=11?0:E%10>=2&&E%10<=4&&(E%100<10||E%100>=20)?1:2,5:E=>E==0?0:E==1?1:E==2?2:E%100>=3&&E%100<=10?3:E%100>=11?4:5,6:E=>E==1?0:E>=2&&E<=4?1:2,7:E=>E==1?0:E%10>=2&&E%10<=4&&(E%100<10||E%100>=20)?1:2,8:E=>E==1?0:E==2?1:E!=8&&E!=11?2:3,9:E=>+(E>=2),10:E=>E==1?0:E==2?1:E<7?2:E<11?3:4,11:E=>E==1||E==11?0:E==2||E==12?1:E>2&&E<20?2:3,12:E=>+(E%10!=1||E%100==11),13:E=>+(E!==0),14:E=>E==1?0:E==2?1:E==3?2:3,15:E=>E%10==1&&E%100!=11?0:E%10>=2&&(E%100<10||E%100>=20)?1:2,16:E=>E%10==1&&E%100!=11?0:E!==0?1:2,17:E=>E==1||E%10==1&&E%100!=11?0:1,18:E=>E==0?0:E==1?1:2,19:E=>E==1?0:E==0||E%100>1&&E%100<11?1:E%100>10&&E%100<20?2:3,20:E=>E==1?0:E==0||E%100>0&&E%100<20?1:2,21:E=>E%100==1?1:E%100==2?2:E%100==3||E%100==4?3:0,22:E=>E==1?0:E==2?1:(E<0||E>10)&&E%10==0?2:3};const ep=["v1","v2","v3"],ip=["v4"],Ih={zero:0,one:1,two:2,few:3,many:4,other:5},sp=()=>{const E={};return _v.forEach(A=>{A.lngs.forEach(C=>{E[C]={numbers:A.nr,plurals:tp[A.fc]}})}),E};class np{constructor(A){let C=arguments.length>1&&arguments[1]!==void 0?arguments[1]:{};this.languageUtils=A,this.options=C,this.logger=Qe.create("pluralResolver"),(!this.options.compatibilityJSON||ip.includes(this.options.compatibilityJSON))&&(typeof Intl>"u"||!Intl.PluralRules)&&(this.options.compatibilityJSON="v3",this.logger.error("Your environment seems not to be Intl API compatible, use an Intl.PluralRules polyfill. Will fallback to the compatibilityJSON v3 format handling.")),this.rules=sp(),this.pluralRulesCache={}}addRule(A,C){this.rules[A]=C}clearCache(){this.pluralRulesCache={}}getRule(A){let C=arguments.length>1&&arguments[1]!==void 0?arguments[1]:{};if(this.shouldUseIntlApi()){const R=zr(A==="dev"?"en":A),F=C.ordinal?"ordinal":"cardinal",B=JSON.stringify({cleanedCode:R,type:F});if(B in this.pluralRulesCache)return this.pluralRulesCache[B];let v;try{v=new Intl.PluralRules(R,{type:F})}catch{if(!A.match(/-|_/))return;const t=this.languageUtils.getLanguagePartFromCode(A);v=this.getRule(t,C)}return this.pluralRulesCache[B]=v,v}return this.rules[A]||this.rules[this.languageUtils.getLanguagePartFromCode(A)]}needsPlural(A){let C=arguments.length>1&&arguments[1]!==void 0?arguments[1]:{};const R=this.getRule(A,C);return this.shouldUseIntlApi()?R&&R.resolvedOptions().pluralCategories.length>1:R&&R.numbers.length>1}getPluralFormsOfKey(A,C){let R=arguments.length>2&&arguments[2]!==void 0?arguments[2]:{};return this.getSuffixes(A,R).map(F=>`${C}${F}`)}getSuffixes(A){let C=arguments.length>1&&arguments[1]!==void 0?arguments[1]:{};const R=this.getRule(A,C);return R?this.shouldUseIntlApi()?R.resolvedOptions().pluralCategories.sort((F,B)=>Ih[F]-Ih[B]).map(F=>`${this.options.prepend}${C.ordinal?`ordinal${this.options.prepend}`:""}${F}`):R.numbers.map(F=>this.getSuffix(A,F,C)):[]}getSuffix(A,C){let R=arguments.length>2&&arguments[2]!==void 0?arguments[2]:{};const F=this.getRule(A,R);return F?this.shouldUseIntlApi()?`${this.options.prepend}${R.ordinal?`ordinal${this.options.prepend}`:""}${F.select(C)}`:this.getSuffixRetroCompatible(F,C):(this.logger.warn(`no plural rule found for: ${A}`),"")}getSuffixRetroCompatible(A,C){const R=A.noAbs?A.plurals(C):A.plurals(Math.abs(C));let F=A.numbers[R];this.options.simplifyPluralSuffix&&A.numbers.length===2&&A.numbers[0]===1&&(F===2?F="plural":F===1&&(F=""));const B=()=>this.options.prepend&&F.toString()?this.options.prepend+F.toString():F.toString();return this.options.compatibilityJSON==="v1"?F===1?"":typeof F=="number"?`_plural_${F.toString()}`:B():this.options.compatibilityJSON==="v2"||this.options.simplifyPluralSuffix&&A.numbers.length===2&&A.numbers[0]===1?B():this.options.prepend&&R.toString()?this.options.prepend+R.toString():R.toString()}shouldUseIntlApi(){return!ep.includes(this.options.compatibilityJSON)}}const Fh=function(E,A,C){let R=arguments.length>3&&arguments[3]!==void 0?arguments[3]:".",F=arguments.length>4&&arguments[4]!==void 0?arguments[4]:!0,B=kv(E,A,C);return!B&&F&&Pt(C)&&(B=Po(E,C,R),B===void 0&&(B=Po(A,C,R))),B},Ya=E=>E.replace(/\$/g,"$$$$");class rp{constructor(){let A=arguments.length>0&&arguments[0]!==void 0?arguments[0]:{};this.logger=Qe.create("interpolator"),this.options=A,this.format=A.interpolation&&A.interpolation.format||(C=>C),this.init(A)}init(){let A=arguments.length>0&&arguments[0]!==void 0?arguments[0]:{};A.interpolation||(A.interpolation={escapeValue:!0});const{escape:C,escapeValue:R,useRawValueToEscape:F,prefix:B,prefixEscaped:v,suffix:y,suffixEscaped:t,formatSeparator:h,unescapeSuffix:p,unescapePrefix:a,nestingPrefix:n,nestingPrefixEscaped:r,nestingSuffix:e,nestingSuffixEscaped:s,nestingOptionsSeparator:o,maxReplaces:i,alwaysFormat:l}=A.interpolation;this.escape=C!==void 0?C:Jv,this.escapeValue=R!==void 0?R:!0,this.useRawValueToEscape=F!==void 0?F:!1,this.prefix=B?Vi(B):v||"{{",this.suffix=y?Vi(y):t||"}}",this.formatSeparator=h||",",this.unescapePrefix=p?"":a||"-",this.unescapeSuffix=this.unescapePrefix?"":p||"",this.nestingPrefix=n?Vi(n):r||Vi("$t("),this.nestingSuffix=e?Vi(e):s||Vi(")"),this.nestingOptionsSeparator=o||",",this.maxReplaces=i||1e3,this.alwaysFormat=l!==void 0?l:!1,this.resetRegExp()}reset(){this.options&&this.init(this.options)}resetRegExp(){const A=(C,R)=>C&&C.source===R?(C.lastIndex=0,C):new RegExp(R,"g");this.regexp=A(this.regexp,`${this.prefix}(.+?)${this.suffix}`),this.regexpUnescape=A(this.regexpUnescape,`${this.prefix}${this.unescapePrefix}(.+?)${this.unescapeSuffix}${this.suffix}`),this.nestingRegexp=A(this.nestingRegexp,`${this.nestingPrefix}(.+?)${this.nestingSuffix}`)}interpolate(A,C,R,F){let B,v,y;const t=this.options&&this.options.interpolation&&this.options.interpolation.defaultVariables||{},h=r=>{if(r.indexOf(this.formatSeparator)<0){const i=Fh(C,t,r,this.options.keySeparator,this.options.ignoreJSONStructure);return this.alwaysFormat?this.format(i,void 0,R,{...F,...C,interpolationkey:r}):i}const e=r.split(this.formatSeparator),s=e.shift().trim(),o=e.join(this.formatSeparator).trim();return this.format(Fh(C,t,s,this.options.keySeparator,this.options.ignoreJSONStructure),o,R,{...F,...C,interpolationkey:s})};this.resetRegExp();const p=F&&F.missingInterpolationHandler||this.options.missingInterpolationHandler,a=F&&F.interpolation&&F.interpolation.skipOnVariables!==void 0?F.interpolation.skipOnVariables:this.options.interpolation.skipOnVariables;return[{regex:this.regexpUnescape,safeValue:r=>Ya(r)},{regex:this.regexp,safeValue:r=>this.escapeValue?Ya(this.escape(r)):Ya(r)}].forEach(r=>{for(y=0;B=r.regex.exec(A);){const e=B[1].trim();if(v=h(e),v===void 0)if(typeof p=="function"){const o=p(A,B,F);v=Pt(o)?o:""}else if(F&&Object.prototype.hasOwnProperty.call(F,e))v="";else if(a){v=B[0];continue}else this.logger.warn(`missed to pass in variable ${e} for interpolating ${A}`),v="";else!Pt(v)&&!this.useRawValueToEscape&&(v=Ah(v));const s=r.safeValue(v);if(A=A.replace(B[0],s),a?(r.regex.lastIndex+=v.length,r.regex.lastIndex-=B[0].length):r.regex.lastIndex=0,y++,y>=this.maxReplaces)break}}),A}nest(A,C){let R=arguments.length>2&&arguments[2]!==void 0?arguments[2]:{},F,B,v;const y=(t,h)=>{const p=this.nestingOptionsSeparator;if(t.indexOf(p)<0)return t;const a=t.split(new RegExp(`${p}[ ]*{`));let n=`{${a[1]}`;t=a[0],n=this.interpolate(n,v);const r=n.match(/'/g),e=n.match(/"/g);(r&&r.length%2===0&&!e||e.length%2!==0)&&(n=n.replace(/'/g,'"'));try{v=JSON.parse(n),h&&(v={...h,...v})}catch(s){return this.logger.warn(`failed parsing options string in nesting for key ${t}`,s),`${t}${p}${n}`}return v.defaultValue&&v.defaultValue.indexOf(this.prefix)>-1&&delete v.defaultValue,t};for(;F=this.nestingRegexp.exec(A);){let t=[];v={...R},v=v.replace&&!Pt(v.replace)?v.replace:v,v.applyPostProcessor=!1,delete v.defaultValue;let h=!1;if(F[0].indexOf(this.formatSeparator)!==-1&&!/{.*}/.test(F[1])){const p=F[1].split(this.formatSeparator).map(a=>a.trim());F[1]=p.shift(),t=p,h=!0}if(B=C(y.call(this,F[1].trim(),v),v),B&&F[0]===A&&!Pt(B))return B;Pt(B)||(B=Ah(B)),B||(this.logger.warn(`missed to resolve ${F[1]} for nesting ${A}`),B=""),h&&(B=t.reduce((p,a)=>this.format(p,a,R.lng,{...R,interpolationkey:F[1].trim()}),B.trim())),A=A.replace(F[0],B),this.regexp.lastIndex=0}return A}}const ap=E=>{let A=E.toLowerCase().trim();const C={};if(E.indexOf("(")>-1){const R=E.split("(");A=R[0].toLowerCase().trim();const F=R[1].substring(0,R[1].length-1);A==="currency"&&F.indexOf(":")<0?C.currency||(C.currency=F.trim()):A==="relativetime"&&F.indexOf(":")<0?C.range||(C.range=F.trim()):F.split(";").forEach(v=>{if(v){const[y,...t]=v.split(":"),h=t.join(":").trim().replace(/^'+|'+$/g,""),p=y.trim();C[p]||(C[p]=h),h==="false"&&(C[p]=!1),h==="true"&&(C[p]=!0),isNaN(h)||(C[p]=parseInt(h,10))}})}return{formatName:A,formatOptions:C}},Yi=E=>{const A={};return(C,R,F)=>{let B=F;F&&F.interpolationkey&&F.formatParams&&F.formatParams[F.interpolationkey]&&F[F.interpolationkey]&&(B={...B,[F.interpolationkey]:void 0});const v=R+JSON.stringify(B);let y=A[v];return y||(y=E(zr(R),F),A[v]=y),y(C)}};class op{constructor(){let A=arguments.length>0&&arguments[0]!==void 0?arguments[0]:{};this.logger=Qe.create("formatter"),this.options=A,this.formats={number:Yi((C,R)=>{const F=new Intl.NumberFormat(C,{...R});return B=>F.format(B)}),currency:Yi((C,R)=>{const F=new Intl.NumberFormat(C,{...R,style:"currency"});return B=>F.format(B)}),datetime:Yi((C,R)=>{const F=new Intl.DateTimeFormat(C,{...R});return B=>F.format(B)}),relativetime:Yi((C,R)=>{const F=new Intl.RelativeTimeFormat(C,{...R});return B=>F.format(B,R.range||"day")}),list:Yi((C,R)=>{const F=new Intl.ListFormat(C,{...R});return B=>F.format(B)})},this.init(A)}init(A){let C=arguments.length>1&&arguments[1]!==void 0?arguments[1]:{interpolation:{}};this.formatSeparator=C.interpolation.formatSeparator||","}add(A,C){this.formats[A.toLowerCase().trim()]=C}addCached(A,C){this.formats[A.toLowerCase().trim()]=Yi(C)}format(A,C,R){let F=arguments.length>3&&arguments[3]!==void 0?arguments[3]:{};const B=C.split(this.formatSeparator);if(B.length>1&&B[0].indexOf("(")>1&&B[0].indexOf(")")<0&&B.find(y=>y.indexOf(")")>-1)){const y=B.findIndex(t=>t.indexOf(")")>-1);B[0]=[B[0],...B.splice(1,y)].join(this.formatSeparator)}return B.reduce((y,t)=>{const{formatName:h,formatOptions:p}=ap(t);if(this.formats[h]){let a=y;try{const n=F&&F.formatParams&&F.formatParams[F.interpolationkey]||{},r=n.locale||n.lng||F.locale||F.lng||R;a=this.formats[h](y,r,{...p,...F,...n})}catch(n){this.logger.warn(n)}return a}else this.logger.warn(`there was no format function for ${h}`);return y},A)}}const lp=(E,A)=>{E.pending[A]!==void 0&&(delete E.pending[A],E.pendingCount--)};class hp extends La{constructor(A,C,R){let F=arguments.length>3&&arguments[3]!==void 0?arguments[3]:{};super(),this.backend=A,this.store=C,this.services=R,this.languageUtils=R.languageUtils,this.options=F,this.logger=Qe.create("backendConnector"),this.waitingReads=[],this.maxParallelReads=F.maxParallelReads||10,this.readingCalls=0,this.maxRetries=F.maxRetries>=0?F.maxRetries:5,this.retryTimeout=F.retryTimeout>=1?F.retryTimeout:350,this.state={},this.queue=[],this.backend&&this.backend.init&&this.backend.init(R,F.backend,F)}queueLoad(A,C,R,F){const B={},v={},y={},t={};return A.forEach(h=>{let p=!0;C.forEach(a=>{const n=`${h}|${a}`;!R.reload&&this.store.hasResourceBundle(h,a)?this.state[n]=2:this.state[n]<0||(this.state[n]===1?v[n]===void 0&&(v[n]=!0):(this.state[n]=1,p=!1,v[n]===void 0&&(v[n]=!0),B[n]===void 0&&(B[n]=!0),t[a]===void 0&&(t[a]=!0)))}),p||(y[h]=!0)}),(Object.keys(B).length||Object.keys(v).length)&&this.queue.push({pending:v,pendingCount:Object.keys(v).length,loaded:{},errors:[],callback:F}),{toLoad:Object.keys(B),pending:Object.keys(v),toLoadLanguages:Object.keys(y),toLoadNamespaces:Object.keys(t)}}loaded(A,C,R){const F=A.split("|"),B=F[0],v=F[1];C&&this.emit("failedLoading",B,v,C),!C&&R&&this.store.addResourceBundle(B,v,R,void 0,void 0,{skipCopy:!0}),this.state[A]=C?-1:2,C&&R&&(this.state[A]=0);const y={};this.queue.forEach(t=>{Xv(t.loaded,[B],v),lp(t,A),C&&t.errors.push(C),t.pendingCount===0&&!t.done&&(Object.keys(t.loaded).forEach(h=>{y[h]||(y[h]={});const p=t.loaded[h];p.length&&p.forEach(a=>{y[h][a]===void 0&&(y[h][a]=!0)})}),t.done=!0,t.errors.length?t.callback(t.errors):t.callback())}),this.emit("loaded",y),this.queue=this.queue.filter(t=>!t.done)}read(A,C,R){let F=arguments.length>3&&arguments[3]!==void 0?arguments[3]:0,B=arguments.length>4&&arguments[4]!==void 0?arguments[4]:this.retryTimeout,v=arguments.length>5?arguments[5]:void 0;if(!A.length)return v(null,{});if(this.readingCalls>=this.maxParallelReads){this.waitingReads.push({lng:A,ns:C,fcName:R,tried:F,wait:B,callback:v});return}this.readingCalls++;const y=(h,p)=>{if(this.readingCalls--,this.waitingReads.length>0){const a=this.waitingReads.shift();this.read(a.lng,a.ns,a.fcName,a.tried,a.wait,a.callback)}if(h&&p&&F{this.read.call(this,A,C,R,F+1,B*2,v)},B);return}v(h,p)},t=this.backend[R].bind(this.backend);if(t.length===2){try{const h=t(A,C);h&&typeof h.then=="function"?h.then(p=>y(null,p)).catch(y):y(null,h)}catch(h){y(h)}return}return t(A,C,y)}prepareLoading(A,C){let R=arguments.length>2&&arguments[2]!==void 0?arguments[2]:{},F=arguments.length>3?arguments[3]:void 0;if(!this.backend)return this.logger.warn("No backend was added via i18next.use. Will not load resources."),F&&F();Pt(A)&&(A=this.languageUtils.toResolveHierarchy(A)),Pt(C)&&(C=[C]);const B=this.queueLoad(A,C,R,F);if(!B.toLoad.length)return B.pending.length||F(),null;B.toLoad.forEach(v=>{this.loadOne(v)})}load(A,C,R){this.prepareLoading(A,C,{},R)}reload(A,C,R){this.prepareLoading(A,C,{reload:!0},R)}loadOne(A){let C=arguments.length>1&&arguments[1]!==void 0?arguments[1]:"";const R=A.split("|"),F=R[0],B=R[1];this.read(F,B,"read",void 0,void 0,(v,y)=>{v&&this.logger.warn(`${C}loading namespace ${B} for language ${F} failed`,v),!v&&y&&this.logger.log(`${C}loaded namespace ${B} for language ${F}`,y),this.loaded(A,v,y)})}saveMissing(A,C,R,F,B){let v=arguments.length>5&&arguments[5]!==void 0?arguments[5]:{},y=arguments.length>6&&arguments[6]!==void 0?arguments[6]:()=>{};if(this.services.utils&&this.services.utils.hasLoadedNamespace&&!this.services.utils.hasLoadedNamespace(C)){this.logger.warn(`did not save key "${R}" as the namespace "${C}" was not yet loaded`,"This means something IS WRONG in your setup. You access the t function before i18next.init / i18next.loadNamespace / i18next.changeLanguage was done. Wait for the callback or Promise to resolve before accessing it!!!");return}if(!(R==null||R==="")){if(this.backend&&this.backend.create){const t={...v,isUpdate:B},h=this.backend.create.bind(this.backend);if(h.length<6)try{let p;h.length===5?p=h(A,C,R,F,t):p=h(A,C,R,F),p&&typeof p.then=="function"?p.then(a=>y(null,a)).catch(y):y(null,p)}catch(p){y(p)}else h(A,C,R,F,y,t)}!A||!A[0]||this.store.addResource(A[0],C,R,F)}}}const wh=()=>({debug:!1,initImmediate:!0,ns:["translation"],defaultNS:["translation"],fallbackLng:["dev"],fallbackNS:!1,supportedLngs:!1,nonExplicitSupportedLngs:!1,load:"all",preload:!1,simplifyPluralSuffix:!0,keySeparator:".",nsSeparator:":",pluralSeparator:"_",contextSeparator:"_",partialBundledLanguages:!1,saveMissing:!1,updateMissing:!1,saveMissingTo:"fallback",saveMissingPlurals:!0,missingKeyHandler:!1,missingInterpolationHandler:!1,postProcess:!1,postProcessPassResolved:!1,returnNull:!1,returnEmptyString:!0,returnObjects:!1,joinArrays:!1,returnedObjectHandler:!1,parseMissingKeyHandler:!1,appendNamespaceToMissingKey:!1,appendNamespaceToCIMode:!1,overloadTranslationOptionHandler:E=>{let A={};if(typeof E[1]=="object"&&(A=E[1]),Pt(E[1])&&(A.defaultValue=E[1]),Pt(E[2])&&(A.tDescription=E[2]),typeof E[2]=="object"||typeof E[3]=="object"){const C=E[3]||E[2];Object.keys(C).forEach(R=>{A[R]=C[R]})}return A},interpolation:{escapeValue:!0,format:E=>E,prefix:"{{",suffix:"}}",formatSeparator:",",unescapePrefix:"-",nestingPrefix:"$t(",nestingSuffix:")",nestingOptionsSeparator:",",maxReplaces:1e3,skipOnVariables:!0}}),Dh=E=>(Pt(E.ns)&&(E.ns=[E.ns]),Pt(E.fallbackLng)&&(E.fallbackLng=[E.fallbackLng]),Pt(E.fallbackNS)&&(E.fallbackNS=[E.fallbackNS]),E.supportedLngs&&E.supportedLngs.indexOf("cimode")<0&&(E.supportedLngs=E.supportedLngs.concat(["cimode"])),E),pr=()=>{},up=E=>{Object.getOwnPropertyNames(Object.getPrototypeOf(E)).forEach(C=>{typeof E[C]=="function"&&(E[C]=E[C].bind(E))})};class Gn extends La{constructor(){let A=arguments.length>0&&arguments[0]!==void 0?arguments[0]:{},C=arguments.length>1?arguments[1]:void 0;if(super(),this.options=Dh(A),this.services={},this.logger=Qe,this.modules={external:[]},up(this),C&&!this.isInitialized&&!A.isClone){if(!this.options.initImmediate)return this.init(A,C),this;setTimeout(()=>{this.init(A,C)},0)}}init(){var A=this;let C=arguments.length>0&&arguments[0]!==void 0?arguments[0]:{},R=arguments.length>1?arguments[1]:void 0;this.isInitializing=!0,typeof C=="function"&&(R=C,C={}),!C.defaultNS&&C.defaultNS!==!1&&C.ns&&(Pt(C.ns)?C.defaultNS=C.ns:C.ns.indexOf("translation")<0&&(C.defaultNS=C.ns[0]));const F=wh();this.options={...F,...this.options,...Dh(C)},this.options.compatibilityAPI!=="v1"&&(this.options.interpolation={...F.interpolation,...this.options.interpolation}),C.keySeparator!==void 0&&(this.options.userDefinedKeySeparator=C.keySeparator),C.nsSeparator!==void 0&&(this.options.userDefinedNsSeparator=C.nsSeparator);const B=p=>p?typeof p=="function"?new p:p:null;if(!this.options.isClone){this.modules.logger?Qe.init(B(this.modules.logger),this.options):Qe.init(null,this.options);let p;this.modules.formatter?p=this.modules.formatter:typeof Intl<"u"&&(p=op);const a=new Mh(this.options);this.store=new Lh(this.options.resources,this.options);const n=this.services;n.logger=Qe,n.resourceStore=this.store,n.languageUtils=a,n.pluralResolver=new np(a,{prepend:this.options.pluralSeparator,compatibilityJSON:this.options.compatibilityJSON,simplifyPluralSuffix:this.options.simplifyPluralSuffix}),p&&(!this.options.interpolation.format||this.options.interpolation.format===F.interpolation.format)&&(n.formatter=B(p),n.formatter.init(n,this.options),this.options.interpolation.format=n.formatter.format.bind(n.formatter)),n.interpolator=new rp(this.options),n.utils={hasLoadedNamespace:this.hasLoadedNamespace.bind(this)},n.backendConnector=new hp(B(this.modules.backend),n.resourceStore,n,this.options),n.backendConnector.on("*",function(r){for(var e=arguments.length,s=new Array(e>1?e-1:0),o=1;o1?e-1:0),o=1;o{r.init&&r.init(this)})}if(this.format=this.options.interpolation.format,R||(R=pr),this.options.fallbackLng&&!this.services.languageDetector&&!this.options.lng){const p=this.services.languageUtils.getFallbackCodes(this.options.fallbackLng);p.length>0&&p[0]!=="dev"&&(this.options.lng=p[0])}!this.services.languageDetector&&!this.options.lng&&this.logger.warn("init: no languageDetector is used and no lng is defined"),["getResource","hasResourceBundle","getResourceBundle","getDataByLanguage"].forEach(p=>{this[p]=function(){return A.store[p](...arguments)}}),["addResource","addResources","addResourceBundle","removeResourceBundle"].forEach(p=>{this[p]=function(){return A.store[p](...arguments),A}});const t=Hs(),h=()=>{const p=(a,n)=>{this.isInitializing=!1,this.isInitialized&&!this.initializedStoreOnce&&this.logger.warn("init: i18next is already initialized. You should call init just once!"),this.isInitialized=!0,this.options.isClone||this.logger.log("initialized",this.options),this.emit("initialized",this.options),t.resolve(n),R(a,n)};if(this.languages&&this.options.compatibilityAPI!=="v1"&&!this.isInitialized)return p(null,this.t.bind(this));this.changeLanguage(this.options.lng,p)};return this.options.resources||!this.options.initImmediate?h():setTimeout(h,0),t}loadResources(A){let R=arguments.length>1&&arguments[1]!==void 0?arguments[1]:pr;const F=Pt(A)?A:this.language;if(typeof A=="function"&&(R=A),!this.options.resources||this.options.partialBundledLanguages){if(F&&F.toLowerCase()==="cimode"&&(!this.options.preload||this.options.preload.length===0))return R();const B=[],v=y=>{if(!y||y==="cimode")return;this.services.languageUtils.toResolveHierarchy(y).forEach(h=>{h!=="cimode"&&B.indexOf(h)<0&&B.push(h)})};F?v(F):this.services.languageUtils.getFallbackCodes(this.options.fallbackLng).forEach(t=>v(t)),this.options.preload&&this.options.preload.forEach(y=>v(y)),this.services.backendConnector.load(B,this.options.ns,y=>{!y&&!this.resolvedLanguage&&this.language&&this.setResolvedLanguage(this.language),R(y)})}else R(null)}reloadResources(A,C,R){const F=Hs();return typeof A=="function"&&(R=A,A=void 0),typeof C=="function"&&(R=C,C=void 0),A||(A=this.languages),C||(C=this.options.ns),R||(R=pr),this.services.backendConnector.reload(A,C,B=>{F.resolve(),R(B)}),F}use(A){if(!A)throw new Error("You are passing an undefined module! Please check the object you are passing to i18next.use()");if(!A.type)throw new Error("You are passing a wrong module! Please check the object you are passing to i18next.use()");return A.type==="backend"&&(this.modules.backend=A),(A.type==="logger"||A.log&&A.warn&&A.error)&&(this.modules.logger=A),A.type==="languageDetector"&&(this.modules.languageDetector=A),A.type==="i18nFormat"&&(this.modules.i18nFormat=A),A.type==="postProcessor"&&lf.addPostProcessor(A),A.type==="formatter"&&(this.modules.formatter=A),A.type==="3rdParty"&&this.modules.external.push(A),this}setResolvedLanguage(A){if(!(!A||!this.languages)&&!(["cimode","dev"].indexOf(A)>-1))for(let C=0;C-1)&&this.store.hasLanguageSomeTranslations(R)){this.resolvedLanguage=R;break}}}changeLanguage(A,C){var R=this;this.isLanguageChangingTo=A;const F=Hs();this.emit("languageChanging",A);const B=t=>{this.language=t,this.languages=this.services.languageUtils.toResolveHierarchy(t),this.resolvedLanguage=void 0,this.setResolvedLanguage(t)},v=(t,h)=>{h?(B(h),this.translator.changeLanguage(h),this.isLanguageChangingTo=void 0,this.emit("languageChanged",h),this.logger.log("languageChanged",h)):this.isLanguageChangingTo=void 0,F.resolve(function(){return R.t(...arguments)}),C&&C(t,function(){return R.t(...arguments)})},y=t=>{!A&&!t&&this.services.languageDetector&&(t=[]);const h=Pt(t)?t:this.services.languageUtils.getBestMatchFromCodes(t);h&&(this.language||B(h),this.translator.language||this.translator.changeLanguage(h),this.services.languageDetector&&this.services.languageDetector.cacheUserLanguage&&this.services.languageDetector.cacheUserLanguage(h)),this.loadResources(h,p=>{v(p,h)})};return!A&&this.services.languageDetector&&!this.services.languageDetector.async?y(this.services.languageDetector.detect()):!A&&this.services.languageDetector&&this.services.languageDetector.async?this.services.languageDetector.detect.length===0?this.services.languageDetector.detect().then(y):this.services.languageDetector.detect(y):y(A),F}getFixedT(A,C,R){var F=this;const B=function(v,y){let t;if(typeof y!="object"){for(var h=arguments.length,p=new Array(h>2?h-2:0),a=2;a`${t.keyPrefix}${n}${e}`):r=t.keyPrefix?`${t.keyPrefix}${n}${v}`:v,F.t(r,t)};return Pt(A)?B.lng=A:B.lngs=A,B.ns=C,B.keyPrefix=R,B}t(){return this.translator&&this.translator.translate(...arguments)}exists(){return this.translator&&this.translator.exists(...arguments)}setDefaultNamespace(A){this.options.defaultNS=A}hasLoadedNamespace(A){let C=arguments.length>1&&arguments[1]!==void 0?arguments[1]:{};if(!this.isInitialized)return this.logger.warn("hasLoadedNamespace: i18next was not initialized",this.languages),!1;if(!this.languages||!this.languages.length)return this.logger.warn("hasLoadedNamespace: i18n.languages were undefined or empty",this.languages),!1;const R=C.lng||this.resolvedLanguage||this.languages[0],F=this.options?this.options.fallbackLng:!1,B=this.languages[this.languages.length-1];if(R.toLowerCase()==="cimode")return!0;const v=(y,t)=>{const h=this.services.backendConnector.state[`${y}|${t}`];return h===-1||h===0||h===2};if(C.precheck){const y=C.precheck(this,v);if(y!==void 0)return y}return!!(this.hasResourceBundle(R,A)||!this.services.backendConnector.backend||this.options.resources&&!this.options.partialBundledLanguages||v(R,A)&&(!F||v(B,A)))}loadNamespaces(A,C){const R=Hs();return this.options.ns?(Pt(A)&&(A=[A]),A.forEach(F=>{this.options.ns.indexOf(F)<0&&this.options.ns.push(F)}),this.loadResources(F=>{R.resolve(),C&&C(F)}),R):(C&&C(),Promise.resolve())}loadLanguages(A,C){const R=Hs();Pt(A)&&(A=[A]);const F=this.options.preload||[],B=A.filter(v=>F.indexOf(v)<0&&this.services.languageUtils.isSupportedCode(v));return B.length?(this.options.preload=F.concat(B),this.loadResources(v=>{R.resolve(),C&&C(v)}),R):(C&&C(),Promise.resolve())}dir(A){if(A||(A=this.resolvedLanguage||(this.languages&&this.languages.length>0?this.languages[0]:this.language)),!A)return"rtl";const C=["ar","shu","sqr","ssh","xaa","yhd","yud","aao","abh","abv","acm","acq","acw","acx","acy","adf","ads","aeb","aec","afb","ajp","apc","apd","arb","arq","ars","ary","arz","auz","avl","ayh","ayl","ayn","ayp","bbz","pga","he","iw","ps","pbt","pbu","pst","prp","prd","ug","ur","ydd","yds","yih","ji","yi","hbo","men","xmn","fa","jpr","peo","pes","prs","dv","sam","ckb"],R=this.services&&this.services.languageUtils||new Mh(wh());return C.indexOf(R.getLanguagePartFromCode(A))>-1||A.toLowerCase().indexOf("-arab")>1?"rtl":"ltr"}static createInstance(){let A=arguments.length>0&&arguments[0]!==void 0?arguments[0]:{},C=arguments.length>1?arguments[1]:void 0;return new Gn(A,C)}cloneInstance(){let A=arguments.length>0&&arguments[0]!==void 0?arguments[0]:{},C=arguments.length>1&&arguments[1]!==void 0?arguments[1]:pr;const R=A.forkResourceStore;R&&delete A.forkResourceStore;const F={...this.options,...A,isClone:!0},B=new Gn(F);return(A.debug!==void 0||A.prefix!==void 0)&&(B.logger=B.logger.clone(A)),["store","services","language"].forEach(y=>{B[y]=this[y]}),B.services={...this.services},B.services.utils={hasLoadedNamespace:B.hasLoadedNamespace.bind(B)},R&&(B.store=new Lh(this.store.data,F),B.services.resourceStore=B.store),B.translator=new Hr(B.services,F),B.translator.on("*",function(y){for(var t=arguments.length,h=new Array(t>1?t-1:0),p=1;p{if(A)for(const C in A)E[C]===void 0&&(E[C]=A[C])}),E}const Nh=/^[\u0009\u0020-\u007e\u0080-\u00ff]+$/,vp=(E,A,C)=>{const R=C||{};R.path=R.path||"/";const F=encodeURIComponent(A);let B=`${E}=${F}`;if(R.maxAge>0){const v=R.maxAge-0;if(Number.isNaN(v))throw new Error("maxAge should be a Number");B+=`; Max-Age=${Math.floor(v)}`}if(R.domain){if(!Nh.test(R.domain))throw new TypeError("option domain is invalid");B+=`; Domain=${R.domain}`}if(R.path){if(!Nh.test(R.path))throw new TypeError("option path is invalid");B+=`; Path=${R.path}`}if(R.expires){if(typeof R.expires.toUTCString!="function")throw new TypeError("option expires is invalid");B+=`; Expires=${R.expires.toUTCString()}`}if(R.httpOnly&&(B+="; HttpOnly"),R.secure&&(B+="; Secure"),R.sameSite)switch(typeof R.sameSite=="string"?R.sameSite.toLowerCase():R.sameSite){case!0:B+="; SameSite=Strict";break;case"lax":B+="; SameSite=Lax";break;case"strict":B+="; SameSite=Strict";break;case"none":B+="; SameSite=None";break;default:throw new TypeError("option sameSite is invalid")}return B},bh={create(E,A,C,R){let F=arguments.length>4&&arguments[4]!==void 0?arguments[4]:{path:"/",sameSite:"strict"};C&&(F.expires=new Date,F.expires.setTime(F.expires.getTime()+C*60*1e3)),R&&(F.domain=R),document.cookie=vp(E,encodeURIComponent(A),F)},read(E){const A=`${E}=`,C=document.cookie.split(";");for(let R=0;R-1&&(F=window.location.hash.substring(window.location.hash.indexOf("?")));const v=F.substring(1).split("&");for(let y=0;y0&&v[y].substring(0,t)===A&&(C=v[y].substring(t+1))}}return C}};let Xs=null;const Bh=()=>{if(Xs!==null)return Xs;try{Xs=window!=="undefined"&&window.localStorage!==null;const E="i18next.translate.boo";window.localStorage.setItem(E,"foo"),window.localStorage.removeItem(E)}catch{Xs=!1}return Xs};var gp={name:"localStorage",lookup(E){let{lookupLocalStorage:A}=E;if(A&&Bh())return window.localStorage.getItem(A)||void 0},cacheUserLanguage(E,A){let{lookupLocalStorage:C}=A;C&&Bh()&&window.localStorage.setItem(C,E)}};let ks=null;const Gh=()=>{if(ks!==null)return ks;try{ks=window!=="undefined"&&window.sessionStorage!==null;const E="i18next.translate.boo";window.sessionStorage.setItem(E,"foo"),window.sessionStorage.removeItem(E)}catch{ks=!1}return ks};var xp={name:"sessionStorage",lookup(E){let{lookupSessionStorage:A}=E;if(A&&Gh())return window.sessionStorage.getItem(A)||void 0},cacheUserLanguage(E,A){let{lookupSessionStorage:C}=A;C&&Gh()&&window.sessionStorage.setItem(C,E)}},yp={name:"navigator",lookup(E){const A=[];if(typeof navigator<"u"){const{languages:C,userLanguage:R,language:F}=navigator;if(C)for(let B=0;B0?A:void 0}},Ep={name:"htmlTag",lookup(E){let{htmlTag:A}=E,C;const R=A||(typeof document<"u"?document.documentElement:null);return R&&typeof R.getAttribute=="function"&&(C=R.getAttribute("lang")),C}},Tp={name:"path",lookup(E){var F;let{lookupFromPathIndex:A}=E;if(typeof window>"u")return;const C=window.location.pathname.match(/\/([a-zA-Z-]*)/g);return Array.isArray(C)?(F=C[typeof A=="number"?A:0])==null?void 0:F.replace("/",""):void 0}},Sp={name:"subdomain",lookup(E){var F,B;let{lookupFromSubdomainIndex:A}=E;const C=typeof A=="number"?A+1:1,R=typeof window<"u"&&((B=(F=window.location)==null?void 0:F.hostname)==null?void 0:B.match(/^(\w{2,5})\.(([a-z0-9-]{1,63}\.[a-z]{2,6})|localhost)/i));if(R)return R[C]}};function Ap(){return{order:["querystring","cookie","localStorage","sessionStorage","navigator","htmlTag"],lookupQuerystring:"lng",lookupCookie:"i18next",lookupLocalStorage:"i18nextLng",lookupSessionStorage:"i18nextLng",caches:["localStorage"],excludeCacheFor:["cimode"],convertDetectedLanguage:E=>E}}class hf{constructor(A){let C=arguments.length>1&&arguments[1]!==void 0?arguments[1]:{};this.type="languageDetector",this.detectors={},this.init(A,C)}init(A){let C=arguments.length>1&&arguments[1]!==void 0?arguments[1]:{},R=arguments.length>2&&arguments[2]!==void 0?arguments[2]:{};this.services=A||{languageUtils:{}},this.options=cp(C,this.options||{},Ap()),typeof this.options.convertDetectedLanguage=="string"&&this.options.convertDetectedLanguage.indexOf("15897")>-1&&(this.options.convertDetectedLanguage=F=>F.replace("-","_")),this.options.lookupFromUrlIndex&&(this.options.lookupFromPathIndex=this.options.lookupFromUrlIndex),this.i18nOptions=R,this.addDetector(pp),this.addDetector(mp),this.addDetector(gp),this.addDetector(xp),this.addDetector(yp),this.addDetector(Ep),this.addDetector(Tp),this.addDetector(Sp)}addDetector(A){return this.detectors[A.name]=A,this}detect(A){A||(A=this.options.order);let C=[];return A.forEach(R=>{if(this.detectors[R]){let F=this.detectors[R].lookup(this.options);F&&typeof F=="string"&&(F=[F]),F&&(C=C.concat(F))}}),C=C.map(R=>this.options.convertDetectedLanguage(R)),this.services.languageUtils.getBestMatchFromCodes?C:C.length>0?C[0]:null}cacheUserLanguage(A,C){C||(C=this.options.caches),C&&(this.options.excludeCacheFor&&this.options.excludeCacheFor.indexOf(A)>-1||C.forEach(R=>{this.detectors[R]&&this.detectors[R].cacheUserLanguage(A,this.options)}))}}hf.type="languageDetector";const Cp={COMBAT:"Fighting Pokémon know no fear and have their stats increased with the number of opponents targeting them.",COMBAT2:"+5% ATK and DEF per opponent",COMBAT4:"+10% ATK and DEF per opponent",COMBAT6:"+20% ATK and DEF per opponent",DRAGON:"When a Dragon Pokémon is the last Pokémon of the team on the board, it gains large bonuses to all of its stats.",DRAGON1:"+20% to the stats of the last dragon",DRAGON2:"+40% to the stats of the last dragon",DRAGON3:"+60% to the stats of the last dragon",EAU:"Water Pokémon are immune to Burn. Water moves can push the target back one or more tiles.",EAU2:"Push back one tile",EAU4:"Push back 2 tiles",EAU6:"Push back 3 tiles",ELEC2:"+10% SPD; 2 damage per hit received",ELEC4:"+20% SPD; 4 damage per hit received",ELEC6:"+30% SPD; 6 damage per hit received",ELECTRIQUE:"Electric Pokémon gain Speed and deal Electric damage with each hit they received on contact.",FEE:"Fairy Pokémon gradually gain PP for your entire team.",FEE1:"+1 PP per second",FEE2:"+2 PP per second",FEE3:"+3 PP per second",FEU:"Fire Pokémon are immune to Freeze. Their attacks apply a burn that deals damage over time and reduces the effectiveness of healing by 50%.",FEU2:"2 burns per attack",FEU4:"3 burns per attack",FEU6:"4 burns per attack",GLACE:"Ice Pokémon are surrounded by an aura of frost that slows opponents on adjacent tiles.",GLACE2:"-20% speed",GLACE3:"-30% speed",GLACE4:"-40% speed",INSECTE:"Bug Pokémon grow and evolve faster, and gain bonus experience with each battle.",INSECTE2:"+20% to experience gains",INSECTE4:"+40% to experience gains",INSECTE6:"+60% to experience gains",NORMAL:"Normal Pokémon reduce damage penalties taken from type weaknesses.",NORMAL2:"-30% weakness damage received",NORMAL4:"-60% weakness damage received",NORMAL6:"-90% weakness damage received",PLANTE:"Grass Pokémon cannot be knocked back by enemy skills and regenerate naturally.",PLANTE2:"Regen 1% of max HP per second",PLANTE4:"Regen 2% of max HP per second",PLANTE6:"Regen 3% of max HP per second",POISON:"Poison Pokémon poison their targets, dealing damage over time proportional to their max HP.",POISON2:"Poison damage dealt +40%",POISON4:"Poison damage dealt +80%",POISON6:"Poison damage dealt +120%",PSY:"Psychic Pokémon are immune to Confusion, and their attacks cause their target to lose PP.",PSY2:"Target loses 2 PP per attack",PSY4:"The target loses 4 PP per attack",PSY6:"The target loses 6 PP per attack",ROCHE:"Rock Pokémon reduce damage received from status affliction (poison, burn).",ROCHE2:"-30% affliction damage",ROCHE4:"-60% affliction damage",ROCHE6:"-90% affliction damage",SOL:"Ground Pokémon dig a tunnel to temporarily protect themselves when they fall below a certain HP threshold.",SOL2:"Tunnel at 20% of HP",SOL4:"Tunnel at 20% and 50% of HP",SOL6:"Tunnel at 20%, 50% and 80% of HP",SPECTRE:"Ghost Pokémon cannot be put to sleep and their attacks scare their target, reducing their Attack.",SPECTRE2:"2 stacks of Fear per attack",SPECTRE4:"4 stacks of Fear per attack",SPECTRE6:"6 stacks of Fear per attack",VOL:"Flying Pokémon fly away from the board at the start of the battle, and can dodge incoming attacks.",VOL2:"20% chance to dodge",VOL4:"40% chance to dodge",VOL6:"60% chance to dodge"},Pp={0:"Your team is KO !",1:"You run to the nearest Pokémon Center."},Rp={bed:"This is not the time to go to sleep!",boat:"This is a model of the S.S. Anne, the famous cruise ship.",book:{0:"This is my Pokémon study course notebook.",1:"Normal Pokémon are versatile, but get beaten by Fighting specialists.",2:"Rock-type Pokémon don't like water.",3:"Water Pokémon fear electricity.",4:"Fire-type Pokémon are powerless against water.",5:"Fire is deadly to Grass Pokémon.",6:"Flying Pokémon fear lightning.",7:"Electric Pokémon are neutralized by Ground.",8:"Ice Pokémon are shattered by Rock.",9:"Fighting Pokémon have one weakness: Psychic attacks.",10:"Ground Pokémon are highly resistant to Poison.",11:"Grass Pokémon win against Ground Pokémon in the long run.",12:"Psychic Pokémon are strangely afraid of Bugs.",13:"Bug Pokémon are pecked by birds.",14:"Only a Spectre can truly face another Spectre.",15:"Dragons can be trapped by Ice."},book_insect:{0:"This is a notebook about Pokémon evolutions.",1:"It is written that {{name}} evolves at the level {{level}}",2:"Interesting. I should keep that in mind!"},frigo:{0:"MAM: Are you still hungry? What a glutton!"},map:"This is the map of the Kanto region.",pc_end:{0:"Record the team in the record books?",1:"Registering team...",2:"Congratulations! You and your Pokémon are famous!",3:"... End of session."},pc_record:{0:"Bzzz... Opening the record book...",1:"No data available.",2:`Last league master recorded: + */v.exports={Format:t(27902),Pad:t(41836),RemoveAt:t(33628),Reverse:t(27671),UppercaseFirst:t(35355),UUID:t(45650)}}},R={};function F(v){var y=R[v];if(y!==void 0)return y.exports;var t=R[v]={exports:{}};return C[v](t,t.exports,F),t.exports}F.g=function(){if(typeof globalThis=="object")return globalThis;try{return this||new Function("return this")()}catch{if(typeof window=="object")return window}}();var B=F(85454);return B})())}(Ar)),Ar.exports}var bd=Nd();const At=Mu(bd),Wo=["POKEBALL","SUPERBALL","HYPERBALL","MASTERBALL","SAFARIBALL"],Bd={POKEBALL:"green",SUPERBALL:"blue",HYPERBALL:"#B8860B",MASTERBALL:"fuschia",SAFARIBALL:"#228B22"},Gd={POKEBALL:1,SUPERBALL:2,HYPERBALL:3,MASTERBALL:5,SAFARIBALL:1},Ud="useandom-26T198340PX75pxJACKVERYMINDBUSHWOLF_GQZbfghjklqvwyzrict";let Vd=(E=21)=>{let A="",C=crypto.getRandomValues(new Uint8Array(E|=0));for(;E--;)A+=Ud[C[E]&63];return A};const Ut={ref:"COMBAT",frameIndex:4},qt={ref:"DRAGON",frameIndex:2},wt={ref:"EAU",frameIndex:15},$t={ref:"ELECTRIQUE",frameIndex:1},se={ref:"FEE",frameIndex:3},Ht={ref:"FEU",frameIndex:5},_t={ref:"GLACE",frameIndex:10},Xt={ref:"INSECTE",frameIndex:0},Ft={ref:"NORMAL",frameIndex:11},kt={ref:"PLANTE",frameIndex:8},Qt={ref:"POISON",frameIndex:12},Kt={ref:"PSY",frameIndex:13},bt={ref:"ROCHE",frameIndex:14},Vt={ref:"SOL",frameIndex:9},Yt={ref:"SPECTRE",frameIndex:7},Jt={ref:"VOL",frameIndex:6},$={[Ut.ref]:Ut,[qt.ref]:qt,[wt.ref]:wt,[$t.ref]:$t,[se.ref]:se,[Ht.ref]:Ht,[_t.ref]:_t,[Xt.ref]:Xt,[Ft.ref]:Ft,[kt.ref]:kt,[Qt.ref]:Qt,[Kt.ref]:Kt,[bt.ref]:bt,[Vt.ref]:Vt,[Yt.ref]:Yt,[Jt.ref]:Jt},Yd=new Map([[Ft,new Map([[Ft,1],[Ht,1],[wt,1],[kt,1],[$t,1],[_t,1],[Ut,1],[Qt,1],[Vt,1],[Jt,1],[Kt,1],[Xt,1],[bt,.5],[Yt,.2],[qt,1],[se,1]])],[Ht,new Map([[Ft,1],[Ht,.5],[wt,.5],[kt,2],[$t,1],[_t,2],[Ut,1],[Qt,1],[Vt,1],[Jt,1],[Kt,1],[Xt,2],[bt,.5],[Yt,1],[qt,.5],[se,1]])],[wt,new Map([[Ft,1],[Ht,2],[wt,.5],[kt,.5],[$t,1],[_t,1],[Ut,1],[Qt,1],[Vt,2],[Jt,1],[Kt,1],[Xt,1],[bt,2],[Yt,1],[qt,.5],[se,1]])],[kt,new Map([[Ft,1],[Ht,.5],[wt,2],[kt,.5],[$t,1],[_t,1],[Ut,1],[Qt,.5],[Vt,2],[Jt,.5],[Kt,1],[Xt,.5],[bt,2],[Yt,1],[qt,.5],[se,1]])],[$t,new Map([[Ft,1],[Ht,1],[wt,2],[kt,.5],[$t,.5],[_t,1],[Ut,1],[Qt,1],[Vt,.2],[Jt,2],[Kt,1],[Xt,1],[bt,1],[Yt,1],[qt,.5],[se,1]])],[_t,new Map([[Ft,1],[Ht,.5],[wt,.5],[kt,2],[$t,1],[_t,.5],[Ut,1],[Qt,1],[Vt,2],[Jt,2],[Kt,1],[Xt,1],[bt,1],[Yt,1],[qt,2],[se,1]])],[Ut,new Map([[Ft,2],[Ht,1],[wt,1],[kt,1],[$t,1],[_t,2],[Ut,1],[Qt,.5],[Vt,1],[Jt,.5],[Kt,.5],[Xt,.5],[bt,2],[Yt,.2],[qt,1],[se,.5]])],[Qt,new Map([[Ft,1],[Ht,1],[wt,1],[kt,2],[$t,1],[_t,1],[Ut,1],[Qt,.5],[Vt,.5],[Jt,1],[Kt,1],[Xt,1],[bt,.5],[Yt,.5],[qt,1],[se,2]])],[Vt,new Map([[Ft,1],[Ht,2],[wt,1],[kt,.5],[$t,2],[_t,1],[Ut,1],[Qt,2],[Vt,1],[Jt,.2],[Kt,1],[Xt,.5],[bt,2],[Yt,1],[qt,1],[se,1]])],[Jt,new Map([[Ft,1],[Ht,1],[wt,1],[kt,2],[$t,.5],[_t,1],[Ut,2],[Qt,1],[Vt,1],[Jt,1],[Kt,1],[Xt,2],[bt,.5],[Yt,1],[qt,1],[se,1]])],[Kt,new Map([[Ft,1],[Ht,1],[wt,1],[kt,1],[$t,1],[_t,1],[Ut,2],[Qt,2],[Vt,1],[Jt,1],[Kt,.5],[Xt,1],[bt,1],[Yt,1],[qt,1],[se,1]])],[Xt,new Map([[Ft,1],[Ht,.5],[wt,1],[kt,2],[$t,1],[_t,1],[Ut,.5],[Qt,.5],[Vt,1],[Jt,.5],[Kt,2],[Xt,1],[bt,1],[Yt,.5],[qt,1],[se,.5]])],[bt,new Map([[Ft,1],[Ht,2],[wt,1],[kt,1],[$t,1],[_t,2],[Ut,.5],[Qt,1],[Vt,.5],[Jt,2],[Kt,1],[Xt,2],[bt,1],[Yt,1],[qt,1],[se,1]])],[Yt,new Map([[Ft,.5],[Ht,1],[wt,1],[kt,1],[$t,1],[_t,1],[Ut,1],[Qt,1],[Vt,1],[Jt,1],[Kt,.2],[Xt,1],[bt,1],[Yt,2],[qt,1],[se,1]])],[qt,new Map([[Ft,1],[Ht,1],[wt,1],[kt,1],[$t,1],[_t,1],[Ut,1],[Qt,1],[Vt,1],[Jt,1],[Kt,1],[Xt,1],[bt,1],[Yt,1],[qt,2],[se,1]])],[se,new Map([[Ft,1],[Ht,.5],[wt,1],[kt,1],[$t,1],[_t,1],[Ut,2],[Qt,.5],[Vt,1],[Jt,1],[Kt,1],[Xt,1],[bt,1],[Yt,1],[qt,2],[se,1]])]]),He=0,xe=1,zd=100,Dt=101,Wd=102;function Iu(E){return E**3}function Ho(E){return Math.floor((E+.1)**(1/3))}function Hd(E){return(E.owner===He?1:1.5)*E.baseXP*E.level}var ht=(E=>(E[E.DIRECT_HIT=0]="DIRECT_HIT",E[E.SPECIAL=1]="SPECIAL",E[E.PROJECTILE=2]="PROJECTILE",E[E.AREA_OF_EFFECT=3]="AREA_OF_EFFECT",E))(ht||{}),at=(E=>(E.POISON="POISON",E.BRULURE="BRULURE",E.GEL="GEL",E.PARALYSIE="PARALYSIE",E.PEUR="PEUR",E.SOMMEIL="SOMMEIL",E.CONFUSION="CONFUSION",E.SECRETION="SECRETION",E.LIGOTAGE="LIGOTAGE",E.TOURBILLON="TOURBILLON",E.SOIN="SOIN",E.REPOS="REPOS",E.POUVOIR_ANTIQUE="POUVOIR_ANTIQUE",E.FURIE="FURIE",E.ARMURE="ARMURE",E.HATE="HATE",E.ACIDE="ACIDE",E.RUGISSEMENT="RUGISSEMENT",E.AVEUGLE="AVEUGLE",E.EXECUTION="EXECUTION",E.DAMAGE_OVER_TIME="DAMAGE_OVER_TIME",E.INVULNERABLE="INVULNERABLE",E.ADAPTATION="ADAPTATION",E.RAGE="RAGE",E))(at||{});const ft={GRID:10,GRID_ACTIVE_TILE:11,SKILL_EFFECT_BELOW_POKEMON:14,POKEMON:15,SKILL_EFFECT_ABOVE_POKEMON:16,POKEMON_BARS:20,MAP_HIGHLIGHT:30,TRAINER:35,GUI_BUTTON:41,TEAM_SIZE_COUNTER:42,CENTER_TEXT:43,DIALOG:45,MENU:50,MENU_LAYOUT:51,MENU_OBJECTS:52,MENU_TOOLTIPS:53,MENU_CURSOR:59,PLAYER:60,SPRITE_DRAGGED:90,JUST_BELOW_CURSOR:99,CURSOR:100},rt={PISTOLET_A_O:{key:"pistolet_a_o",frames:[0],frameRate:8,scale:.5},PISTOLET_A_O_HIT:{key:"pistolet_a_o_hit",frames:[1,2],frameRate:8,scale:.5},HYDROCANON:{key:"hydrocanon",frames:[3,4,5,6],frameRate:8,repeat:3,scale:1,position:"target_ground",delta:0},TREMPETTE:{key:"trempette",frames:[7,8,9,10,11,12,13,14],frameRate:8,scale:1,position:"source_ground"},BULLES_D_O:{key:"bulles_d_o",frames:[15],frameRate:8,scale:.5},BULLES_D_O_HIT:{key:"bulles_d_o_hit",frames:[16,17,18],frameRate:8,scale:.5},SECRETION_HIT:{key:"secretion_hit",frames:[19],frameRate:1,scale:1},POUDREUSE:{key:"poudreuse",frames:[20,21,22,23,24,25,26],frameRate:8,position:"target"},HYPNOSE:{key:"hypnose",frames:[27,28,29,30,31],frameRate:6,scale:1,position:"source"},GRELON:{key:"grelon",frames:[32],frameRate:8,scale:1,depth:ft.SKILL_EFFECT_ABOVE_POKEMON},GRELON_HIT:{key:"grelon_hit",frames:[33,34,35],frameRate:8},LIGOTAGE:{key:"ligotage",frames:[36,37],frameRate:6,repeat:2,scale:.5,position:"target_ground",delta:-4},CHARGE_HIT:{key:"charge_hit",frames:[38],frameRate:8,scale:.5,position:"target"},FROZEN:{key:"frozen",frames:[39],frameRate:8,scale:1,opacity:.5,depth:ft.SKILL_EFFECT_ABOVE_POKEMON,repeat:Number.POSITIVE_INFINITY,position:"source_ground"},LANCE_FLAMMES:{key:"lance_flammes",frames:[40,41,42,43,44,45,46,47,48],frameRate:8,scale:1,position:"source",delta:32},LECHOUILLE:{key:"lechouille",frames:[49,50,51,52,51,50],frameRate:8,position:"source",delta:10},DEVOREVE:{key:"devoreve",frames:[53,54],frameRate:16,repeat:3,position:"target_ground",delta:-4},FLAMMECHE:{key:"flammeche",frames:[55,56,57,58,59],frameRate:8,scale:1,position:"target"},BURN:{key:"burn",frames:[60,61,62,63],frameRate:8,repeat:Number.POSITIVE_INFINITY,scale:1,depth:ft.SKILL_EFFECT_BELOW_POKEMON,position:"source_ground"},TORGNOLES:{key:"torgnoles",frames:[64],frameRate:8,scale:1,position:"target"},CROCS_FEU:{key:"crocs_feu",frames:[65,66,67,68,69],frameRate:8,scale:1,position:"target"},CROC_DE_MORT:{key:"croc_de_mort",frames:[70,71,72,73],frameRate:8,position:"target_ground"},POUVOIR_ANTIQUE:{key:"pouvoir_antique",frames:[74,75,76,77,78,79],frameRate:8,position:"source_ground"},DESTRUCTION:{key:"destruction",frames:[80,81,82,83],frameRate:8,scale:2,position:"source_ground"},NITROCHARGE_HIT:{key:"nitrocharge_hit",frames:[84,85,86,87,88],frameRate:8,position:"target"},LANCE_SOLEIL:{key:"lance_soleil",frames:[89,90,91,92,93,94,93,94,93,94,93,94,93,94,93,94,93,94,93,94,93,94,93,94,93,94,93,94,93,94,93,94,93,94,93,94,93,94,93,94,93,94,93,94],frameRate:8},CRUAILE:{key:"cruaile",frames:[95,96,97,98],frameRate:8,position:"target"},PIQURE:{key:"piqure",frames:[100,101,102,103],frameRate:8,position:"target"},SECRETION:{key:"secretion",frames:[104,105,106],frameRate:8},POUDRE_TOXIK:{key:"poudre_toxik",frames:[107,108,109,110,111,112,113,114],frameRate:8,scale:1,position:"source_ground"},PARASPORE:{key:"paraspore",frames:[107,108,109,110,111,112,113,114],frameRate:6,scale:1,tint:16750848,position:"source_ground"},PARALYSIE:{key:"paralysie",frames:[115,116,117,118],frameRate:8,repeat:Number.POSITIVE_INFINITY,position:"source_ground"},CHOC_MENTAL:{key:"choc_mental",frames:[119],frameRate:8,delta:8},JET_PIERRES:{key:"jet_pierres",frames:[120],frameRate:8,scale:.5},JET_PIERRES_HIT:{key:"jet_pierres_hit",frames:[120,121,122,123,124],frameRate:8,scale:.5},ECLAIR:{key:"eclair",frames:[125,126,127,128,129],frameRate:16,pattern:"eclair"},CAGE_ECLAIR:{key:"elec_ball",frames:[130,131,132,133,134,135],frameRate:8,repeat:2,position:"source_ground"},VIVE_ATTAQUE:{key:"vive_attaque",frames:[136,137,138,139,140,141,142,143],frameRate:16,position:"target"},POING_KARATE:{key:"poing_karate",frames:[99,144],frameRate:8,position:"target"},DOUBLE_PIED:{key:"double_pied",frames:[145,146],frameRate:8,position:"target"},RAFALE_PSY:{key:"rafale_psy",frames:[147],frameRate:8,scale:1,delta:8},PROVOCATED:{key:"provocated",frames:[148],frameRate:8},MASSDOS:{key:"massdos",frames:[149,150],frameRate:8,repeat:Number.POSITIVE_INFINITY},PROVOCATION:{key:"provocation",frames:[151,152,153,152,153],frameRate:8,scale:1,position:"source_ground",delta:-24},PICPIC:{key:"picpic",frames:[157,156,155,154],frameRate:8,position:"target_ground"},PINCE_MASSE:{key:"pince_masse",frames:[158,159,158],frameRate:8,scale:.5,position:"target",delta:8},FOUET_LIANES:{key:"fouet_lianes",frames:[160,161,162,163,164],frameRate:8,scale:.75,position:"source"},TELEPORT:{key:"teleport",frames:[165,166,167,168,169],frameRate:8,position:"source_ground"},ETINCELLE:{key:"etincelle",frames:[170,171,172,173,174,175,176],frameRate:16,position:"target",delta:4},DETRITUS:{key:"detritus",frames:[177,178,179],frameRate:8},GUILLOTINE:{key:"guillotine",frames:[180,181,182,183],frameRate:4,position:"target"},ULTRASON:{key:"ultrason",frames:[184,185,186,187,188,188,188,188,188,188,188,188,188,188,188,188,188,188,188,188,188,188,188,188,188,188,188,188,188,188],frameRate:8,delta:8},SOMMEIL:{key:"sommeil",frames:[189,190,191,190],frameRate:4,repeat:Number.POSITIVE_INFINITY,position:"source_ground"},GRIFFE:{key:"griffe",frames:[192,193,194,195],frameRate:8,scale:1,position:"target"},MORSURE:{key:"morsure",frames:[198,197,196,197,198,199],frameRate:12,scale:.5,position:"target"},VAMPIRISME:{key:"vampirisme",frames:[200,201,202],frameRate:8,scale:1,position:"source"},SOIN:{key:"soin",frames:[203,204,205,206,207,208,209,210],frameRate:8,repeat:Number.POSITIVE_INFINITY,scale:1,position:"source_ground"},SURF:{key:"surf",frames:[211,212,213,214,215,216,217,218],frameRate:8,repeat:Number.POSITIVE_INFINITY,scale:1},DARD_VENIN:{key:"dard_venin",frames:[219],frameRate:8,scale:1,delta:8},POISON:{key:"poison",frames:[220,221,222,223,224,225,226,227,228,229,230,231],frameRate:10,repeat:Number.POSITIVE_INFINITY,scale:.5,position:"target_ground"},ACIDE:{key:"acide",frames:[232,233,232,234],frameRate:8,repeat:Number.POSITIVE_INFINITY,position:"parabolic_to_target"},ACIDE_HIT:{key:"acide_hit",frames:[235,236,237,238],frameRate:8,depth:ft.SKILL_EFFECT_BELOW_POKEMON,position:"target_ground"},DARD_VENIN_HIT:{key:"dard_venin_hit",frames:[239],frameRate:8},VOL_VIE:{key:"vol_vie",frames:[240,241,242,243],frameRate:8,repeat:Number.POSITIVE_INFINITY,position:"target_to_source"},COUD_BOUE:{key:"coud_boue",frames:[244],frameRate:8,scale:.5},COUD_BOUE_HIT:{key:"coud_boue_hit",frames:[245,246,247,248,249,250],frameRate:8},JET_DE_SABLE:{key:"jet_de_sable",frames:[246,247,248,249,250],frameRate:8,tint:16768400,scale:1.5,position:"target"},BOMB_BEURK:{key:"bomb_beurk",frames:[251,252,253,254,255,256,257,258],frameRate:8,repeat:Number.POSITIVE_INFINITY,position:"parabolic_to_target"},METRONOME:{key:"metronome",frames:[259],frameRate:1,position:"source",delta:16},BOMB_BEURK_HIT:{key:"bomb_beurk_hit",frames:[260,261,262,263,264,265],frameRate:8,depth:ft.SKILL_EFFECT_BELOW_POKEMON},OURAGAN:{key:"ouragan",frames:[266,267,268],frameRate:8,repeat:Number.POSITIVE_INFINITY},DANSE_FLAMMES:{key:"danseflammes",frames:[269,270,271,272],frameRate:8,repeat:5,position:"source_ground"},ARMURE:{key:"armure",frames:[273,274,275,276,277,278,279],frameRate:12,position:"source_ground"},HATE:{key:"hate",frames:[280,281,282],frameRate:8,scale:.5,position:"source_ground"},DANSE_LAMES:{key:"danse_lames",frames:[283,284,285,286,287,288],frameRate:8,position:"source_ground"},FURIE:{key:"furie",frames:[289,290,291,292,293],frameRate:8,position:"source"},DRACORAGE:{key:"dracorage",frames:[294,295,296,297],frameRate:12,repeat:3,depth:ft.SKILL_EFFECT_BELOW_POKEMON,position:"target_ground",tint:11197951},BLIZZARD:{key:"blizzard",frames:[294,295,296,297],frameRate:12,repeat:3,depth:ft.SKILL_EFFECT_BELOW_POKEMON,position:"target_ground"},DRACOCHARGE:{key:"dracocharge",frames:[298,299],frameRate:8,repeat:Number.POSITIVE_INFINITY,delta:8},PEUR:{key:"peur",frames:[300,301,302,301],frameRate:8,repeat:Number.POSITIVE_INFINITY,position:"source_ground"},BERCEUSE:{key:"berceuse",frames:[303,304,305,304],frameRate:8,repeat:5,position:"source_ground"},ENCORE:{key:"encore",frames:[306,307,308,307],frameRate:8,repeat:1,position:"source",delta:12},TONNERRE:{key:"tonnerre",frames:[309,310,311,312,313,314],frameRate:8,position:"source_ground"},ULTIMAPOING:{key:"ultimapoing",frames:[315,316,315,316,317],frameRate:8,position:"target"},BROUILLARD:{key:"brouillard",frames:[318,319,320,321,322,323,324],frameRate:8,position:"source_ground"},BALAYAGE:{key:"balayage",frames:[325,326,327,328],frameRate:8,position:"source",delta:12},E_COQUE:{key:"e_coque",frames:[329,330,331,332,333,334,335,336,337,338,339,340,341,341,341,341],frameRate:8,position:"source_ground"},RUGISSEMENT:{key:"rugissement",frames:[342,343,344,345,346],frameRate:8,position:"source",delta:12},CROCHET_VENIN:{key:"crochet_venin",frames:[347,348,349,350],frameRate:8,position:"target"},KOUD_KORNE:{key:"koud_korne",frames:[351,352,353,354],frameRate:8,position:"target"},MAWASHI_GERI:{key:"mawashi_geri",frames:[355,356,357,358],frameRate:8,position:"source",delta:12},EMPAL_KORNE:{key:"empal_korne",frames:[359,360,361,362,363,364,365,366,367,367,367],frameRate:8,position:"target_ground"},ABRI:{key:"abri",frames:[368,369,370,371,372],frameRate:8,repeat:2,opacity:.3,position:"source_ground"},AMNESIE:{key:"amnesie",frames:[373,374,375,376,377,378,379,379,379],frameRate:8,position:"source_ground",delta:-16},BOMB_OEUF:{key:"bomb_oeuf",frames:[380,381,382,383,384,385,386],frameRate:8,repeat:Number.POSITIVE_INFINITY,scale:1,position:"parabolic_to_target"},PILONNAGE:{key:"pilonnage",frames:[380,381,382,383,384,385,386],frameRate:8,repeat:Number.POSITIVE_INFINITY,scale:.5,position:"parabolic_to_target"},ULTRALASER_START:{key:"ultralaser_start",frames:[387,388],frameRate:8,repeat:2},ULTRALASER_BEAM:{key:"ultralaser_beam",frames:[389,390],frameRate:8,repeat:2},LASER_GLACE_START:{key:"laser_glace_start",frames:[391,392],frameRate:8,repeat:2},LASER_GLACE_BEAM:{key:"laser_glace_beam",frames:[393,394],frameRate:8,repeat:2},JACKPOT_WIN:{key:"jackpot_win",frames:[395,396],frameRate:8,repeat:2},JACKPOT_LOSE:{key:"jackpot_lose",frames:[397,398],frameRate:8,repeat:2},JACKPOT_START:{key:"jackpot_start",frames:[399],frameRate:2,position:"target_to_source"},BOMB_OEUF_HIT:{key:"bomb_oeuf_hit",frames:[400,401,402,403,404,405,406,407],frameRate:8},GROBISOU:{key:"grobisou",frames:[408,409,410,411,409,408],frameRate:8,position:"source",delta:16},METEORES:{key:"meteores",frames:[412,413,414,415,416,417,418,419,420,421,422,423,424,425,426,427],frameRate:8,repeat:Number.POSITIVE_INFINITY},POUVOIR_LUNAIRE:{key:"pouvoir_lunaire",frames:[428,429,430,431,432,433,434,435,436],frameRate:8,position:"target_ground"},EVOLUTION:{key:"evolution",frames:[437,438,439,440,441,442,443,444,445,446,447,448,449,450,451],frameRate:8,depth:ft.SKILL_EFFECT_ABOVE_POKEMON,position:"source_ground"},ADAPTATION:{key:"adaptation",frames:[452,453,454,455,456,457,458,459,460,461,462,463],frameRate:8,depth:ft.SKILL_EFFECT_BELOW_POKEMON,position:"source_ground"},TUNNEL:{key:"tunnel",frames:[464,465,466,467,468,469,469,469,468,467,466,465,464],frameRate:8,depth:ft.SKILL_EFFECT_BELOW_POKEMON,position:"source_ground"},PSYKO:{key:"psyko",frames:[470,471,472,473],frameRate:8,depth:ft.SKILL_EFFECT_BELOW_POKEMON,position:"source_ground",repeat:6},DEFLAGRATION:{key:"deflagration",frames:[474,475,476,477],frameRate:8,depth:ft.SKILL_EFFECT_BELOW_POKEMON,position:"source_ground",repeat:4},ERUPTION_PENDING:{key:"eruption_pending",frames:[478,479],frameRate:8,depth:ft.SKILL_EFFECT_BELOW_POKEMON,position:"source_ground",repeat:Number.POSITIVE_INFINITY},ERUPTION:{key:"eruption",frames:[480,481,482,483,484,483,482,481,480],frameRate:8,depth:ft.SKILL_EFFECT_BELOW_POKEMON,position:"source_ground"},FATAL_FOUDRE:{key:"fatal_foudre",frames:[485,486,487],frameRate:8,depth:ft.SKILL_EFFECT_ABOVE_POKEMON,position:"source_ground",repeat:8},CONFUSION:{key:"confusion",frames:[488,489,490,491],frameRate:8,depth:ft.SKILL_EFFECT_ABOVE_POKEMON,position:"source_ground",repeat:Number.POSITIVE_INFINITY},CASCADE:{key:"cascade_skill",frames:[493,492,493,494,495,496,497,498,499],frameRate:8,depth:ft.SKILL_EFFECT_ABOVE_POKEMON,position:"target_ground"},TRIPLATTAQUE:{key:"triplattaque",frames:[500,501,502,503,504,505,506,507],frameRate:8},TRIPLATTAQUE_HIT:{key:"triplattaque_hit",frames:[508,509,510,511,512],frameRate:8}},Xd={ref:"abri",attackRange:9,behavior:ht.SPECIAL,type:$.NORMAL,effect:rt.ABRI,power:0,hitDelay:0,selfAlteration:{type:at.INVULNERABLE,stacks:20}},kd={ref:"acide",type:$.POISON,attackRange:3,behavior:ht.AREA_OF_EFFECT,getTilesImpacted(E,A){const[C,R]=[A.x,A.y];return[[C-1,R],[C,R],[C+1,R]]},power:40,effect:rt.ACIDE,hitDelay:500,hitEffect:rt.ACIDE_HIT,hitAlteration:{type:at.ACIDE,stacks:100}},Kd={ref:"adaptation",attackRange:9,behavior:ht.SPECIAL,type:$.NORMAL,effect:rt.ADAPTATION,power:0,hitDelay:0,selfAlteration:{type:at.ADAPTATION,stacks:60}},Jd={ref:"amnesie",attackRange:9,effect:rt.AMNESIE,behavior:ht.SPECIAL,power:0,type:$.PSY,triggerSpecial:"amnesie"},jd={ref:"armure",attackRange:9,behavior:ht.SPECIAL,type:$.ROCHE,effect:rt.ARMURE,power:0,hitDelay:0,selfAlteration:{type:at.ARMURE,stacks:1,keepStacks:!0}},Zd={ref:"balayage",attackRange:1,behavior:ht.AREA_OF_EFFECT,type:$.COMBAT,getTilesImpacted(E,A){const[C,R]=[A.x,A.y];return A.x===E.x?[[C-1,R],[C,R],[C+1,R]]:[[C,R-1],[C,R],[C,R+1]]},effect:rt.BALAYAGE,power:100,hitDelay:100,rotateSprite:!0},$d={ref:"belier",type:$.NORMAL,behavior:ht.DIRECT_HIT,hitDelay:150,hitEffect:rt.CHARGE_HIT,chargeDelta:12,power:120,selfDamage:30,rotateSprite:!1,attackRange:1},Qd={ref:"berceuse",attackRange:1,behavior:ht.AREA_OF_EFFECT,type:$.NORMAL,getTilesImpacted(E){const[A,C]=[E.x,E.y];return[[A-1,C-1],[A,C-1],[A+1,C-1],[A-1,C],[A+1,C],[A-1,C+1],[A,C+1],[A+1,C+1]]},effect:rt.BERCEUSE,power:0,hitDelay:1e3,hitAlteration:{type:at.SOMMEIL,stacks:40}},qd={ref:"blizzard",attackRange:9,effect:rt.BLIZZARD,behavior:ht.SPECIAL,hitDelay:100,power:200,type:$.GLACE,triggerSpecial:"blizzard"},yh={ref:"blizzard",behavior:ht.PROJECTILE,effect:rt.GRELON,hitEffect:rt.GRELON_HIT,power:300,travelSpeed:5,rotateProjectile:!1,projectileRadius:8,type:$.GLACE,attackRange:9},_d={ref:"bomb_beurk",type:$.POISON,attackRange:4,behavior:ht.AREA_OF_EFFECT,getTilesImpacted(E,A){const[C,R]=[A.x,A.y];return[[C-1,R],[C,R],[C+1,R]]},power:80,effect:rt.BOMB_BEURK,hitDelay:750,hitEffect:rt.BOMB_BEURK_HIT,hitAlteration:{type:at.POISON,stacks:80}},tc={ref:"bomb_oeuf",type:$.NORMAL,attackRange:4,behavior:ht.AREA_OF_EFFECT,getTilesImpacted(E,A){const[C,R]=[A.x,A.y];return[[C-1,R-1],[C,R-1],[C+1,R-1],[C-1,R],[C,R],[C+1,R],[C-1,R+1],[C,R+1],[C+1,R+1]]},power:200,effect:rt.BOMB_OEUF,hitDelay:1e3,hitEffect:rt.BOMB_OEUF_HIT},ec={ref:"brouillard",attackRange:1,behavior:ht.AREA_OF_EFFECT,type:$.NORMAL,getTilesImpacted(E){const[A,C]=[E.x,E.y];return[[A-1,C-1],[A,C-1],[A+1,C-1],[A-1,C],[A+1,C],[A-1,C+1],[A,C+1],[A+1,C+1]]},effect:rt.BROUILLARD,power:0,hitDelay:200,hitAlteration:{type:at.AVEUGLE,stacks:50}},ic={ref:"bulles_d_o",type:$.EAU,effect:rt.BULLES_D_O,behavior:ht.PROJECTILE,travelSpeed:2,attackRange:3,power:65,projectileRadius:8,rotateProjectile:!1,hitEffect:rt.BULLES_D_O_HIT},sc={ref:"cage_eclair",attackRange:1,behavior:ht.AREA_OF_EFFECT,type:$.ELECTRIQUE,getTilesImpacted(E){const[A,C]=[E.x,E.y];return[[A-1,C-1],[A,C-1],[A+1,C-1],[A-1,C],[A+1,C],[A-1,C+1],[A,C+1],[A+1,C+1]]},effect:rt.CAGE_ECLAIR,power:0,hitDelay:100,hitAlteration:{type:at.PARALYSIE,stacks:100}},nc={ref:"cascade",type:$.EAU,effect:rt.CASCADE,behavior:ht.DIRECT_HIT,hitDelay:500,power:220,rotateSprite:!1,attackRange:1,knockback:!0},rc={ref:"charge",type:$.NORMAL,behavior:ht.DIRECT_HIT,hitDelay:150,hitEffect:rt.CHARGE_HIT,chargeDelta:12,power:40,rotateSprite:!1,attackRange:1},ac={ref:"choc_mental",type:$.PSY,effect:rt.CHOC_MENTAL,behavior:ht.PROJECTILE,travelSpeed:8,projectileRadius:8,rotateProjectile:!0,power:50,attackRange:4},oc={ref:"coud_boue",type:$.SOL,effect:rt.COUD_BOUE,behavior:ht.PROJECTILE,travelSpeed:5,attackRange:3,power:20,projectileRadius:8,rotateProjectile:!1,hitEffect:rt.COUD_BOUE_HIT,hitAlteration:{type:at.AVEUGLE,stacks:10}},lc={ref:"croc_de_mort",type:$.NORMAL,effect:rt.CROC_DE_MORT,behavior:ht.DIRECT_HIT,hitDelay:200,hitAlteration:{type:at.PEUR,stacks:30},power:250,rotateSprite:!1,attackRange:1,chargeDelta:0},hc={ref:"crochet_venin",type:$.POISON,effect:rt.CROCHET_VENIN,behavior:ht.DIRECT_HIT,hitDelay:150,hitAlteration:{type:at.POISON,stacks:10},power:50,rotateSprite:!1,attackRange:1,chargeDelta:8},uc={ref:"crocs_feu",type:$.FEU,effect:rt.CROCS_FEU,behavior:ht.DIRECT_HIT,power:100,hitDelay:200,hitAlteration:{type:at.BRULURE,stacks:100},rotateSprite:!1,attackRange:1,chargeDelta:10},fc={ref:"cruaile",type:$.VOL,effect:rt.CRUAILE,behavior:ht.DIRECT_HIT,hitDelay:200,power:60,rotateSprite:!1,attackRange:1,chargeDelta:4},dc={ref:"danse_flammes",attackRange:1,behavior:ht.AREA_OF_EFFECT,type:$.FEU,getTilesImpacted(E){const[A,C]=[E.x,E.y];return[[A-1,C-1],[A,C-1],[A+1,C-1],[A-1,C],[A+1,C],[A-1,C+1],[A,C+1],[A+1,C+1]]},effect:rt.DANSE_FLAMMES,power:50,hitDelay:0,hitAlteration:{type:at.BRULURE,stacks:50}},cc={ref:"danse_lames",attackRange:1,behavior:ht.AREA_OF_EFFECT,type:$.NORMAL,getTilesImpacted(E){const[A,C]=[E.x,E.y];return[[A-1,C-1],[A,C-1],[A+1,C-1],[A-1,C],[A+1,C],[A-1,C+1],[A,C+1],[A+1,C+1]]},effect:rt.DANSE_LAMES,power:80,hitDelay:100},vc={ref:"dard_venin",type:$.POISON,effect:rt.DARD_VENIN,behavior:ht.PROJECTILE,travelSpeed:6,power:30,projectileRadius:5,hitEffect:rt.DARD_VENIN_HIT,hitAlteration:{type:at.POISON,stacks:30},rotateProjectile:!0,attackRange:2},pc={ref:"deflagration",attackRange:9,effect:rt.DEFLAGRATION,behavior:ht.SPECIAL,power:300,type:$.FEU,triggerSpecial:"deflagration",hitDelay:200},mc={ref:"destruction",attackRange:1,behavior:ht.AREA_OF_EFFECT,type:$.NORMAL,getTilesImpacted(E){const[A,C]=[E.x,E.y];return[[A-1,C-1],[A,C-1],[A+1,C-1],[A-1,C],[A+1,C],[A-1,C+1],[A,C+1],[A+1,C+1]]},effect:rt.DESTRUCTION,power:300,selfDamage:99999,hitDelay:50},gc={ref:"detritus",type:$.POISON,effect:rt.DETRITUS,behavior:ht.PROJECTILE,travelSpeed:3,attackRange:3,power:30,hitAlteration:{type:at.POISON,stacks:20},hitEffect:rt.DETRITUS_HIT,projectileRadius:6,rotateProjectile:!0},xc={ref:"devoreve",type:$.SPECTRE,effect:rt.DEVOREVE,behavior:ht.DIRECT_HIT,hitDelay:350,power:100,rotateSprite:!1,attackRange:4,hitAlteration:{type:at.PEUR,stacks:30}},yc={ref:"double_pied",type:$.COMBAT,effect:rt.DOUBLE_PIED,behavior:ht.DIRECT_HIT,hitDelay:150,power:40,rotateSprite:!1,attackRange:1,chargeDelta:4},Ec={ref:"dracocharge",type:$.DRAGON,effect:rt.DRACOCHARGE,hitEffect:rt.BULLES_D_O_HIT,behavior:ht.PROJECTILE,travelSpeed:8,projectileRadius:6,rotateProjectile:!0,power:50,attackRange:3},Tc={ref:"dracorage",attackRange:2,behavior:ht.AREA_OF_EFFECT,type:$.DRAGON,getTilesImpacted(E,A){const[C,R]=[A.x,A.y];return[[C-1,R-1],[C,R-1],[C+1,R-1],[C-1,R],[C,R],[C+1,R],[C-1,R+1],[C,R+1],[C+1,R+1]]},effect:rt.DRACORAGE,power:0,hitDelay:0,hitAlteration:{type:at.DAMAGE_OVER_TIME,stacks:30}},Sc={ref:"e_coque",attackRange:9,effect:rt.E_COQUE,behavior:ht.SPECIAL,power:0,type:$.PSY,triggerSpecial:"e-coque",triggerSpecialDelay:250},Ac={ref:"eclair",type:$.ELECTRIQUE,behavior:ht.SPECIAL,attackRange:9,power:250,effect:rt.ECLAIR,triggerSpecial:"eclair"},Cc={ref:"empal_korne",type:$.SOL,effect:rt.EMPAL_KORNE,behavior:ht.DIRECT_HIT,hitDelay:400,power:120,rotateSprite:!1,triggerAlteration:{type:at.TOURBILLON,stacks:14},attackRange:2},Pc={ref:"encore",attackRange:9,effect:rt.ENCORE,behavior:ht.SPECIAL,power:0,type:$.NORMAL,triggerSpecial:"encore"},Rc={ref:"etincelle",type:$.ELECTRIQUE,effect:rt.ETINCELLE,behavior:ht.DIRECT_HIT,hitDelay:100,triggerAlteration:{type:at.PARALYSIE,stacks:15},power:65,rotateSprite:!0,attackRange:1,chargeDelta:4},Lc={ref:"evolution",attackRange:9,effect:rt.EVOLUTION,behavior:ht.SPECIAL,power:0,type:$.NORMAL,triggerSpecial:"evolution",triggerSpecialDelay:1e3},Oc={ref:"fatal_foudre",attackRange:9,effect:rt.FATAL_FOUDRE,behavior:ht.SPECIAL,power:200,type:$.ELECTRIQUE,triggerSpecial:"fatal_foudre",hitDelay:100},Mc={ref:"flammeche",type:$.FEU,effect:rt.FLAMMECHE,behavior:ht.DIRECT_HIT,hitDelay:100,triggerAlteration:{type:at.BRULURE,stacks:12},power:40,rotateSprite:!0,attackRange:1},Ic={ref:"fouet_lianes",type:$.PLANTE,effect:rt.FOUET_LIANES,behavior:ht.DIRECT_HIT,hitDelay:250,power:45,rotateSprite:!0,attackRange:1},Fc={ref:"furie",type:$.NORMAL,attackRange:9,effect:rt.FURIE,behavior:ht.AREA_OF_EFFECT,getTilesImpacted(){return[]},power:0,hitDelay:0,selfAlteration:{type:at.FURIE,stacks:1,keepStacks:!0}},wc={ref:"griffe",type:$.NORMAL,effect:rt.GRIFFE,behavior:ht.DIRECT_HIT,hitDelay:100,power:40,rotateSprite:!0,attackRange:1,chargeDelta:8},Dc={ref:"grobisou",type:$.PSY,effect:rt.GROBISOU,behavior:ht.DIRECT_HIT,hitDelay:200,hitAlteration:{type:at.GEL,stacks:80},power:0,rotateSprite:!1,attackRange:2},Nc={ref:"guillotine",type:$.NORMAL,effect:rt.GUILLOTINE,behavior:ht.DIRECT_HIT,hitDelay:250,hitAlteration:{type:at.EXECUTION,stacks:1},power:150,rotateSprite:!1,attackRange:1,chargeDelta:6},bc={ref:"hate",attackRange:9,behavior:ht.AREA_OF_EFFECT,type:$.PSY,getTilesImpacted(){return[]},effect:rt.HATE,power:0,hitDelay:0,selfAlteration:{type:at.HATE,stacks:1,keepStacks:!0}},Bc={ref:"hydrocanon",type:$.EAU,effect:rt.HYDROCANON,behavior:ht.DIRECT_HIT,hitDelay:2e3,power:300,rotateSprite:!1,triggerAlteration:{type:at.TOURBILLON,stacks:30},attackRange:4},Gc={ref:"hypnose",type:$.PSY,effect:rt.HYPNOSE,behavior:ht.DIRECT_HIT,hitDelay:500,hitAlteration:{type:at.SOMMEIL,stacks:70},power:0,rotateSprite:!1,attackRange:4},Uc={ref:"jackpot",attackRange:1,behavior:ht.SPECIAL,type:$.NORMAL,effect:rt.JACKPOT_START,power:0,triggerSpecial:"jackpot",triggerSpecialDelay:250},Vc={ref:"jet_pierres",type:$.ROCHE,effect:rt.JET_PIERRES,behavior:ht.PROJECTILE,travelSpeed:6,power:50,projectileRadius:5,hitEffect:rt.JET_PIERRES_HIT,rotateProjectile:!1,attackRange:3},Yc={ref:"jet_de_sable",type:$.SOL,effect:rt.JET_DE_SABLE,behavior:ht.DIRECT_HIT,hitDelay:100,power:10,rotateSprite:!1,attackRange:1,chargeDelta:4,hitAlteration:{type:at.AVEUGLE,stacks:80}},zc={ref:"koud_korne",type:$.NORMAL,effect:rt.KOUD_KORNE,behavior:ht.DIRECT_HIT,hitDelay:100,power:40,rotateSprite:!0,attackRange:1,chargeDelta:8},Wc={ref:"lance_flammes",type:$.FEU,effect:rt.LANCE_FLAMMES,behavior:ht.DIRECT_HIT,hitDelay:300,triggerAlteration:{type:at.BRULURE,stacks:100},power:200,rotateSprite:!0,attackRange:1},Hc={ref:"lance_soleil",type:$.PLANTE,effect:rt.LANCE_SOLEIL,behavior:ht.PROJECTILE,power:120,travelSpeed:2,pierceThrough:!0,projectileRadius:8,hitAlteration:{type:at.BRULURE,stacks:10},rotateProjectile:!1,attackRange:4},Xc={ref:"laser_glace",type:$.GLACE,behavior:ht.SPECIAL,attackRange:1,power:80,triggerSpecial:"laser_glace"},kc={ref:"lechouille",type:$.SPECTRE,effect:rt.LECHOUILLE,behavior:ht.DIRECT_HIT,hitDelay:200,hitAlteration:{type:at.PARALYSIE,stacks:20},power:35,rotateSprite:!0,attackRange:1},Kc={ref:"ligotage",type:$.NORMAL,effect:rt.LIGOTAGE,behavior:ht.DIRECT_HIT,hitDelay:300,power:15,rotateSprite:!1,triggerAlteration:{type:at.LIGOTAGE,stacks:120},attackRange:4},Jc={ref:"massdos",type:$.SOL,effect:rt.MASSDOS,behavior:ht.PROJECTILE,travelSpeed:4,power:65,projectileRadius:5,hitEffect:rt.CHARGE_HIT,rotateProjectile:!1,attackRange:3},jc={ref:"mawashi_geri",attackRange:1,behavior:ht.AREA_OF_EFFECT,type:$.COMBAT,getTilesImpacted(E,A){const C=[[A.x,A.y]];return A.x===E.x-1&&C.push([A.x+2,A.y]),A.x===E.x+1&&C.push([A.x-2,A.y]),A.y===E.y-1&&C.push([A.x,A.y+2]),A.y===E.y+1&&C.push([A.x,A.y-2]),C},effect:rt.MAWASHI_GERI,power:100,hitDelay:100,rotateSprite:!0},Zc={ref:"meteores",type:$.NORMAL,effect:rt.METEORES,behavior:ht.PROJECTILE,travelSpeed:4,projectileRadius:8,pierceThrough:!0,rotateProjectile:!0,power:50,precision:10,attackRange:9},$c={ref:"metronome",attackRange:9,effect:rt.METRONOME,behavior:ht.SPECIAL,power:0,type:$.NORMAL,triggerSpecial:"metronome"},Qc={ref:"morphing",attackRange:9,effect:rt.EVOLUTION,behavior:ht.SPECIAL,power:0,type:$.NORMAL,triggerSpecial:"morphing",triggerSpecialDelay:1e3},qc={ref:"morsure",type:$.NORMAL,effect:rt.MORSURE,behavior:ht.DIRECT_HIT,hitDelay:140,power:50,rotateSprite:!1,attackRange:1,chargeDelta:10},_c={ref:"nitrocharge",type:$.FEU,behavior:ht.DIRECT_HIT,hitDelay:150,hitEffect:rt.NITROCHARGE_HIT,hitAlteration:{type:at.BRULURE,stacks:30},chargeDelta:12,power:100,selfDamage:30,rotateSprite:!1,attackRange:1},tv={ref:"ouragan",type:$.DRAGON,effect:rt.OURAGAN,behavior:ht.PROJECTILE,power:120,travelSpeed:2,pierceThrough:!0,projectileRadius:12,rotateProjectile:!1,attackRange:4,hitAlteration:{type:at.TOURBILLON,stacks:15}},ev={ref:"paraspore",attackRange:1,behavior:ht.AREA_OF_EFFECT,type:$.PLANTE,getTilesImpacted(E){const[A,C]=[E.x,E.y];return[[A-1,C-1],[A,C-1],[A+1,C-1],[A-1,C],[A+1,C],[A-1,C+1],[A,C+1],[A+1,C+1]]},effect:rt.PARASPORE,power:0,hitDelay:300,hitAlteration:{type:at.PARALYSIE,stacks:100}},iv={ref:"picpic",type:$.VOL,effect:rt.PICPIC,behavior:ht.DIRECT_HIT,hitDelay:100,power:35,rotateSprite:!0,attackRange:1,chargeDelta:8},sv={ref:"pilonnage",type:$.NORMAL,effect:rt.PILONNAGE,behavior:ht.PROJECTILE,travelSpeed:6,power:30,projectileRadius:6,hitEffect:rt.CHARGE_HIT,rotateProjectile:!0,attackRange:4},nv={ref:"pince_masse",type:$.EAU,effect:rt.PINCE_MASSE,behavior:ht.DIRECT_HIT,hitDelay:100,power:40,rotateSprite:!1,attackRange:1,chargeDelta:8},rv={ref:"piqure",type:$.INSECTE,effect:rt.PIQURE,behavior:ht.DIRECT_HIT,hitDelay:100,power:60,rotateSprite:!0,attackRange:1,chargeDelta:10},av={ref:"pistolet_a_o",type:$.EAU,effect:rt.PISTOLET_A_O,behavior:ht.PROJECTILE,travelSpeed:3,power:40,projectileRadius:3,hitEffect:rt.PISTOLET_A_O_HIT,rotateProjectile:!1,attackRange:3},ov={ref:"poing_karate",type:$.COMBAT,effect:rt.POING_KARATE,behavior:ht.DIRECT_HIT,hitDelay:10,power:50,rotateSprite:!1,attackRange:1,chargeDelta:8},lv={ref:"poudre_toxik",attackRange:1,behavior:ht.AREA_OF_EFFECT,type:$.PLANTE,getTilesImpacted(E){const[A,C]=[E.x,E.y];return[[A-1,C-1],[A,C-1],[A+1,C-1],[A-1,C],[A+1,C],[A-1,C+1],[A,C+1],[A+1,C+1]]},effect:rt.POUDRE_TOXIK,power:0,hitDelay:400,hitAlteration:{type:at.POISON,stacks:100}},hv={ref:"poudreuse",type:$.GLACE,effect:rt.POUDREUSE,behavior:ht.DIRECT_HIT,hitDelay:200,power:40,rotateSprite:!0,attackRange:1,chargeDelta:2},uv={ref:"pouvoir_antique",attackRange:1,behavior:ht.AREA_OF_EFFECT,type:$.ROCHE,getTilesImpacted(E){const[A,C]=[E.x,E.y];return[[A-1,C-1],[A,C-1],[A+1,C-1],[A-1,C],[A+1,C],[A-1,C+1],[A,C+1],[A+1,C+1]]},effect:rt.POUVOIR_ANTIQUE,power:60,hitDelay:200,selfAlteration:{type:at.POUVOIR_ANTIQUE,stacks:1,keepStacks:!0}},fv={ref:"pouvoir_lunaire",type:$.FEE,effect:rt.POUVOIR_LUNAIRE,behavior:ht.DIRECT_HIT,hitDelay:200,power:120,rotateSprite:!1,attackRange:4},dv={ref:"provoc",attackRange:9,effect:rt.PROVOCATION,behavior:ht.SPECIAL,power:0,type:$.COMBAT,triggerSpecial:"provoc"},cv={ref:"psyko",attackRange:9,effect:rt.PSYKO,behavior:ht.SPECIAL,power:120,hitDelay:4e3,type:$.PSY,triggerSpecial:"psyko"},vv={ref:"rafale_psy",type:$.PSY,effect:rt.RAFALE_PSY,behavior:ht.PROJECTILE,travelSpeed:6,projectileRadius:16,pierceThrough:!0,rotateProjectile:!0,power:100,attackRange:4},pv={ref:"repos",attackRange:9,behavior:ht.SPECIAL,power:0,type:$.NORMAL,selfAlteration:{type:at.REPOS,stacks:100}},mv={ref:"rugissement",attackRange:1,behavior:ht.AREA_OF_EFFECT,type:$.NORMAL,getTilesImpacted(E){const[A,C]=[E.x,E.y];return[[A-1,C-1],[A,C-1],[A+1,C-1],[A-1,C],[A+1,C],[A-1,C+1],[A,C+1],[A+1,C+1]]},effect:rt.RUGISSEMENT,power:0,hitDelay:50,hitAlteration:{type:at.RUGISSEMENT,stacks:100}},gv={ref:"secretion",type:$.INSECTE,effect:rt.SECRETION,behavior:ht.PROJECTILE,travelSpeed:4,attackRange:4,power:50,projectileRadius:3,rotateProjectile:!0,hitEffect:rt.SECRETION_HIT,hitAlteration:{type:at.SECRETION,stacks:100}},xv={ref:"surf",type:$.EAU,effect:rt.SURF,behavior:ht.PROJECTILE,travelSpeed:4,projectileRadius:16,pierceThrough:!0,rotateProjectile:!0,power:100,attackRange:9,knockback:!0},yv={ref:"teleport",attackRange:9,effect:rt.TELEPORT,behavior:ht.SPECIAL,power:0,type:$.PSY,triggerSpecial:"teleport"},Ev={ref:"tonnerre",attackRange:1,behavior:ht.AREA_OF_EFFECT,type:$.ELECTRIQUE,getTilesImpacted(E){const[A,C]=[E.x,E.y];return[[A-1,C-1],[A,C-1],[A+1,C-1],[A-1,C],[A+1,C],[A-1,C+1],[A,C+1],[A+1,C+1]]},effect:rt.TONNERRE,power:95,hitDelay:250,triggerAlteration:{type:at.PARALYSIE,stacks:10}},Tv={ref:"torgnoles",type:$.NORMAL,effect:rt.TORGNOLES,behavior:ht.DIRECT_HIT,hitDelay:10,power:35,rotateSprite:!1,attackRange:1,chargeDelta:8},Sv={ref:"trempette",behavior:ht.SPECIAL,type:$.EAU,power:0,effect:rt.TREMPETTE,attackRange:9},Av={ref:"triplattaque",type:$.NORMAL,effect:rt.TRIPLATTAQUE,behavior:ht.PROJECTILE,travelSpeed:3,attackRange:3,power:65,projectileRadius:7,rotateProjectile:!0,hitEffect:rt.TRIPLATTAQUE_HIT,get hitAlteration(){const E=Math.random();if(E<1/15)return{type:at.PARALYSIE,stacks:15};if(E<2/15)return{type:at.BRULURE,stacks:15};if(E<3/15)return{type:at.GEL,stacks:15}}},Cv={ref:"tunnel",attackRange:9,effect:rt.TUNNEL,behavior:ht.SPECIAL,power:100,type:$.SOL,triggerSpecial:"tunnel",hitDelay:500},Pv={ref:"ultimapoing",type:$.COMBAT,effect:rt.ULTIMAPOING,behavior:ht.DIRECT_HIT,hitDelay:100,power:250,rotateSprite:!1,attackRange:1,chargeDelta:12},Rv={ref:"ultralaser",type:$.DRAGON,behavior:ht.SPECIAL,attackRange:1,power:200,triggerSpecial:"ultralaser"},Lv={ref:"ultrason",type:$.NORMAL,effect:rt.ULTRASON,behavior:ht.PROJECTILE,travelSpeed:4,projectileRadius:8,pierceThrough:!0,rotateProjectile:!0,power:0,hitAlteration:{type:at.CONFUSION,stacks:30},attackRange:2},Ov={ref:"vampirisme",type:$.INSECTE,effect:rt.VAMPIRISME,behavior:ht.DIRECT_HIT,hitDelay:150,chargeDelta:0,power:35,rotateSprite:!0,selfAlteration:{type:at.SOIN,stacks:5},attackRange:1},Mv={ref:"vive_attaque",type:$.NORMAL,effect:rt.VIVE_ATTAQUE,behavior:ht.DIRECT_HIT,hitDelay:20,power:40,rotateSprite:!0,attackRange:1,chargeDelta:10},Iv={ref:"vol_vie",type:$.PLANTE,effect:rt.VOL_VIE,behavior:ht.DIRECT_HIT,hitDelay:400,chargeDelta:0,power:20,rotateSprite:!0,selfAlteration:{type:at.SOIN,stacks:10},attackRange:3},Q={CHARGE:rc,FOUET_LIANES:Ic,LANCE_SOLEIL:Hc,FLAMMECHE:Mc,NITROCHARGE:_c,GRIFFE:wc,PISTOLET_A_O:av,BULLES_D_O:ic,HYDROCANON:Bc,LANCE_FLAMMES:Wc,TREMPETTE:Sv,POUDREUSE:hv,PIQURE:rv,SECRETION:gv,CHOC_MENTAL:ac,POUDRE_TOXIK:lv,PARASPORE:ev,MORSURE:qc,LIGOTAGE:Kc,HYPNOSE:Gc,TELEPORT:yv,ETINCELLE:Rc,CAGE_ECLAIR:sc,MASSDOS:Jc,VIVE_ATTAQUE:Mv,ECLAIR:Ac,RAFALE_PSY:vv,CROCS_FEU:uc,CROC_DE_MORT:lc,VAMPIRISME:Ov,REPOS:pv,PROVOC:dv,SURF:xv,CASCADE:nc,POUVOIR_ANTIQUE:uv,DARD_VENIN:vc,ACIDE:kd,CRUAILE:fc,VOL_VIE:Iv,COUD_BOUE:oc,JET_DE_SABLE:Yc,DETRITUS:gc,GUILLOTINE:Nc,PINCE_MASSE:nv,OURAGAN:tv,BOMB_BEURK:_d,LECHOUILLE:kc,DEVOREVE:xc,BELIER:$d,JET_PIERRES:Vc,ARMURE:jd,HATE:bc,DANSE_LAMES:cc,PICPIC:iv,DESTRUCTION:mc,FURIE:Fc,DRACORAGE:Tc,DRACOCHARGE:Ec,DANSE_FLAMMES:dc,ULTRASON:Lv,TORGNOLES:Tv,BERCEUSE:Qd,ENCORE:Pc,METRONOME:$c,TONNERRE:Ev,POING_KARATE:ov,DOUBLE_PIED:yc,ULTIMAPOING:Pv,BROUILLARD:ec,BALAYAGE:Zd,E_COQUE:Sc,RUGISSEMENT:mv,CROCHET_VENIN:hc,KOUD_KORNE:zc,EMPAL_KORNE:Cc,MAWASHI_GERI:jc,ABRI:Xd,AMNESIE:Jd,PILONNAGE:sv,BOMB_OEUF:tc,ULTRALASER:Rv,LASER_GLACE:Xc,JACKPOT:Uc,GROBISOU:Dc,METEORES:Zc,POUVOIR_LUNAIRE:fv,MORPHING:Qc,EVOLUTION:Lc,TRIPLATTAQUE:Av,ADAPTATION:Kd,TUNNEL:Cv,PSYKO:cv,DEFLAGRATION:pc,BLIZZARD:qd,FATAL_FOUDRE:Oc},_i={ref:"arbok",maxPV:60,maxPP:20,attack:95,defense:69,speed:65,types:[$.POISON],rank:2,baseSkill:Q.CROCHET_VENIN,ppSkill:Q.LIGOTAGE,wildEncounterChance:0,portraitCropY:5},Jn={ref:"abo",maxPV:35,maxPP:20,attack:60,defense:44,speed:55,types:[$.POISON],evolution:_i,evolutionLevel:22,rank:1,baseSkill:Q.CROCHET_VENIN,ppSkill:Q.LIGOTAGE,wildEncounterChance:1,portraitCropY:14},na={ref:"alakazam",maxPV:55,maxPP:10,attack:40,defense:45,speed:120,types:[$.PSY],rank:3,baseSkill:Q.CHOC_MENTAL,ppSkill:Q.TELEPORT,wildEncounterChance:0},Mr={ref:"kadabra",maxPV:40,maxPP:10,attack:35,defense:30,speed:105,types:[$.PSY],evolution:na,evolutionLevel:33,rank:2,baseSkill:Q.CHOC_MENTAL,ppSkill:Q.TELEPORT,wildEncounterChance:0},ts={ref:"abra",maxPV:25,maxPP:10,attack:20,defense:15,speed:90,types:[$.PSY],evolution:Mr,evolutionLevel:16,rank:1,baseSkill:Q.CHOC_MENTAL,ppSkill:Q.TELEPORT,wildEncounterChance:1,portraitCropY:13},Ri={ref:"aeromite",maxPV:70,maxPP:10,attack:65,defense:60,speed:90,types:[$.INSECTE,$.POISON],rank:2,baseSkill:Q.VAMPIRISME,ppSkill:Q.RAFALE_PSY,wildEncounterChance:0},ra={ref:"akwakwak",maxPV:80,maxPP:16,attack:82,defense:78,speed:85,types:[$.EAU,$.PSY],rank:2,baseSkill:Q.CHOC_MENTAL,ppSkill:Q.SURF,wildEncounterChance:0,portraitCropY:14},Xo={ref:"amonistar",maxPV:70,maxPP:20,attack:60,defense:125,speed:55,types:[$.EAU,$.ROCHE],rank:3,baseSkill:Q.PISTOLET_A_O,ppSkill:Q.POUVOIR_ANTIQUE,wildEncounterChance:0,portraitCropY:26},Fu={ref:"amonita",maxPV:35,maxPP:20,attack:40,defense:100,speed:35,types:[$.EAU,$.ROCHE],evolution:Xo,evolutionLevel:40,rank:1,baseSkill:Q.PISTOLET_A_O,ppSkill:Q.POUVOIR_ANTIQUE,wildEncounterChance:.1,portraitCropY:25},fi={ref:"evoli",maxPV:55,maxPP:40,attack:55,defense:50,speed:55,types:[$.NORMAL],rank:1,baseSkill:Q.VIVE_ATTAQUE,ppSkill:Q.EVOLUTION,wildEncounterChance:1},ze={ref:"aquali",maxPV:130,maxPP:20,attack:65,defense:60,speed:65,types:[$.EAU],devolution:fi,rank:1,baseSkill:Q.PISTOLET_A_O,ppSkill:Q.HYDROCANON,wildEncounterChance:1,portraitCropY:24},ko={ref:"arcanin",maxPV:90,maxPP:20,attack:110,defense:80,speed:95,types:[$.FEU],rank:2,baseSkill:Q.MORSURE,ppSkill:Q.CROCS_FEU,wildEncounterChance:0,portraitCropY:10},yo={ref:"artikodin",maxPV:90,maxPP:30,attack:95,defense:100,speed:85,types:[$.VOL,$.GLACE],rank:5,baseSkill:Q.POUDREUSE,ppSkill:Q.BLIZZARD,wildEncounterChance:0,portraitCropY:7},Ko={ref:"dardargnan",maxPV:65,maxPP:10,attack:80,defense:40,speed:75,types:[$.INSECTE,$.POISON],rank:3,baseSkill:Q.DARD_VENIN,ppSkill:Q.FURIE,wildEncounterChance:0},Jo={ref:"coconfort",maxPV:45,maxPP:20,attack:25,defense:50,speed:35,types:[$.INSECTE,$.POISON],evolution:Ko,evolutionLevel:10,rank:2,baseSkill:Q.DARD_VENIN,ppSkill:Q.ARMURE,wildEncounterChance:0},aa={ref:"aspicot",maxPV:40,maxPP:20,attack:35,defense:30,speed:50,types:[$.INSECTE,$.POISON],evolution:Jo,evolutionLevel:7,rank:1,baseSkill:Q.DARD_VENIN,ppSkill:Q.SECRETION,wildEncounterChance:1,portraitCropY:23},jo={ref:"empiflor",maxPV:80,maxPP:20,attack:105,defense:65,speed:70,types:[$.PLANTE,$.POISON],rank:3,baseSkill:Q.FOUET_LIANES,ppSkill:Q.ACIDE,wildEncounterChance:0},oa={ref:"boustiflor",maxPV:65,maxPP:20,attack:90,defense:50,speed:55,types:[$.PLANTE,$.POISON],evolution:jo,evolutionLevel:38,rank:2,baseSkill:Q.FOUET_LIANES,ppSkill:Q.ACIDE,wildEncounterChance:0,portraitCropY:26},Zo={ref:"florizarre",maxPV:80,maxPP:20,attack:82,defense:83,speed:80,types:[$.PLANTE,$.POISON],rank:3,baseSkill:Q.FOUET_LIANES,ppSkill:Q.LANCE_SOLEIL,wildEncounterChance:0,portraitCropY:38},$o={ref:"herbizarre",maxPV:60,maxPP:20,attack:62,defense:63,speed:60,types:[$.PLANTE,$.POISON],evolution:Zo,evolutionLevel:32,rank:2,baseSkill:Q.FOUET_LIANES,ppSkill:Q.LANCE_SOLEIL,wildEncounterChance:0,portraitCropY:24},jn={ref:"bulbizarre",maxPV:45,maxPP:20,attack:49,defense:49,speed:45,types:[$.PLANTE,$.POISON],evolution:$o,evolutionLevel:16,rank:1,baseSkill:Q.FOUET_LIANES,ppSkill:Q.LANCE_SOLEIL,wildEncounterChance:1,portraitCropY:24},wu={ref:"canarticho",maxPV:52,maxPP:15,attack:90,defense:55,speed:60,types:[$.NORMAL,$.VOL],rank:1,baseSkill:Q.PICPIC,ppSkill:Q.DANSE_LAMES,wildEncounterChance:1,portraitCropY:19},Ms={ref:"caninos",maxPV:55,maxPP:20,attack:70,defense:45,speed:60,types:[$.FEU],evolution:ko,evolutionLevel:30,rank:1,baseSkill:Q.MORSURE,ppSkill:Q.CROCS_FEU,wildEncounterChance:1},Du={ref:"tortank",maxPV:79,maxPP:20,attack:83,defense:80,speed:58,types:[$.EAU],rank:3,baseSkill:Q.PISTOLET_A_O,ppSkill:Q.HYDROCANON,wildEncounterChance:0,portraitCropY:8},Nu={ref:"carabaffe",maxPV:59,maxPP:20,attack:63,defense:80,speed:58,types:[$.EAU],evolution:Du,evolutionLevel:36,rank:2,baseSkill:Q.PISTOLET_A_O,ppSkill:Q.HYDROCANON,wildEncounterChance:0},Zn={ref:"carapuce",maxPV:44,maxPP:20,attack:48,defense:65,speed:43,types:[$.EAU],evolution:Nu,evolutionLevel:16,rank:1,baseSkill:Q.PISTOLET_A_O,ppSkill:Q.HYDROCANON,wildEncounterChance:1},Is={ref:"papillusion",maxPV:45,maxPP:30,attack:49,defense:49,speed:45,types:[$.INSECTE,$.VOL],rank:3,baseSkill:Q.CHOC_MENTAL,ppSkill:Q.POUDRE_TOXIK,wildEncounterChance:0,portraitCropY:22},bu={ref:"chrysacier",maxPV:50,maxPP:20,attack:20,defense:55,speed:30,types:[$.INSECTE],evolution:Is,evolutionLevel:10,rank:2,baseSkill:Q.PIQURE,ppSkill:Q.SECRETION,wildEncounterChance:0,portraitCropY:18},la={ref:"chenipan",maxPV:45,maxPP:20,attack:30,defense:35,speed:45,types:[$.INSECTE],evolution:bu,evolutionLevel:7,rank:1,baseSkill:Q.PIQURE,ppSkill:Q.SECRETION,wildEncounterChance:1},$n={ref:"chetiflor",maxPV:50,maxPP:20,attack:75,defense:35,speed:40,types:[$.PLANTE,$.POISON],evolution:oa,evolutionLevel:21,rank:1,baseSkill:Q.FOUET_LIANES,ppSkill:Q.ACIDE,wildEncounterChance:1,portraitCropY:11},Qo={ref:"colossinge",maxPV:65,maxPP:20,attack:105,defense:60,speed:95,types:[$.COMBAT],rank:2,baseSkill:Q.GRIFFE,ppSkill:Q.PROVOC,wildEncounterChance:0},qo={ref:"crustabri",maxPV:50,maxPP:20,attack:95,defense:180,speed:70,types:[$.EAU,$.GLACE],rank:3,baseSkill:Q.PISTOLET_A_O,ppSkill:Q.ABRI,wildEncounterChance:0,portraitCropY:21},Bu={ref:"dodrio",maxPV:60,maxPP:10,attack:110,defense:70,speed:110,types:[$.NORMAL,$.VOL],rank:2,baseSkill:Q.TRIPLATTAQUE,ppSkill:Q.FURIE,wildEncounterChance:0},Gu={ref:"doduo",maxPV:35,maxPP:10,attack:85,defense:45,speed:75,types:[$.NORMAL,$.VOL],evolution:Bu,evolutionLevel:31,rank:1,baseSkill:Q.VIVE_ATTAQUE,ppSkill:Q.FURIE,wildEncounterChance:1},_o={ref:"dracaufeu",maxPV:78,maxPP:20,attack:84,defense:78,speed:100,types:[$.FEU,$.DRAGON],rank:3,baseSkill:Q.FLAMMECHE,ppSkill:Q.LANCE_FLAMMES,wildEncounterChance:0,portraitCropY:8},tl={ref:"dracolosse",maxPV:91,maxPP:20,attack:134,defense:95,speed:80,types:[$.DRAGON,$.VOL],rank:3,baseSkill:Q.CRUAILE,ppSkill:Q.ULTRALASER,wildEncounterChance:0,portraitCropY:1},Ir={ref:"draco",maxPV:61,maxPP:20,attack:84,defense:65,speed:70,types:[$.DRAGON],evolution:tl,evolutionLevel:55,rank:2,baseSkill:Q.DRACOCHARGE,ppSkill:Q.OURAGAN,wildEncounterChance:0,portraitCropY:10},Fr={ref:"ectoplasma",maxPV:60,maxPP:16,attack:65,defense:60,speed:110,types:[$.SPECTRE,$.POISON],rank:3,baseSkill:Q.LECHOUILLE,ppSkill:Q.DEVOREVE,wildEncounterChance:0,portraitCropY:23},Eo={ref:"electhor",maxPV:90,maxPP:30,attack:90,defense:85,speed:100,types:[$.VOL,$.ELECTRIQUE],rank:5,baseSkill:Q.ETINCELLE,ppSkill:Q.FATAL_FOUDRE,wildEncounterChance:0},el={ref:"electrode",maxPV:60,maxPP:50,attack:50,defense:70,speed:150,types:[$.ELECTRIQUE],rank:2,baseSkill:Q.CHARGE,ppSkill:Q.DESTRUCTION,wildEncounterChance:0,portraitCropY:24},sn={ref:"elektek",maxPV:65,maxPP:20,attack:83,defense:57,speed:105,types:[$.ELECTRIQUE],rank:2,baseSkill:Q.ETINCELLE,ppSkill:Q.TONNERRE,wildEncounterChance:.5},Uu={ref:"excelangue",maxPV:50,maxPP:20,attack:105,defense:79,speed:76,types:[$.NORMAL],rank:2,baseSkill:Q.LECHOUILLE,ppSkill:Q.ULTRASON,wildEncounterChance:1},wr={ref:"spectrum",maxPV:45,maxPP:16,attack:50,defense:45,speed:95,types:[$.SPECTRE,$.POISON],evolution:Fr,evolutionLevel:40,rank:2,baseSkill:Q.LECHOUILLE,ppSkill:Q.DEVOREVE,wildEncounterChance:0,portraitCropY:19},li={ref:"fantominus",maxPV:30,maxPP:16,attack:35,defense:30,speed:80,types:[$.SPECTRE,$.POISON],evolution:wr,evolutionLevel:25,rank:1,baseSkill:Q.LECHOUILLE,ppSkill:Q.DEVOREVE,wildEncounterChance:1,portraitCropY:26},il={ref:"ferosinge",maxPV:40,maxPP:20,attack:80,defense:35,speed:70,types:[$.COMBAT],evolution:Qo,evolutionLevel:28,rank:1,baseSkill:Q.GRIFFE,ppSkill:Q.PROVOC,wildEncounterChance:1},ha={ref:"feunard",maxPV:73,maxPP:20,attack:76,defense:75,speed:100,types:[$.FEU],rank:3,baseSkill:Q.FLAMMECHE,ppSkill:Q.DANSE_FLAMMES,wildEncounterChance:0,portraitCropY:13},sl={ref:"flagadoss",maxPV:95,maxPP:20,attack:75,defense:110,speed:30,types:[$.EAU,$.PSY],rank:2,baseSkill:Q.PISTOLET_A_O,ppSkill:Q.AMNESIE,wildEncounterChance:0},nl={ref:"galopa",maxPV:65,maxPP:20,attack:100,defense:70,speed:105,types:[$.FEU],rank:2,baseSkill:Q.CHARGE,ppSkill:Q.NITROCHARGE,wildEncounterChance:0,portraitCropY:9},ua={ref:"goupix",maxPV:38,maxPP:20,attack:41,defense:40,speed:65,types:[$.FEU],evolution:ha,evolutionLevel:20,rank:1,baseSkill:Q.FLAMMECHE,ppSkill:Q.DANSE_FLAMMES,wildEncounterChance:1},fa={ref:"grolem",maxPV:80,maxPP:20,attack:120,defense:130,speed:45,types:[$.ROCHE,$.SOL],rank:3,baseSkill:Q.JET_PIERRES,ppSkill:Q.ARMURE,wildEncounterChance:0,portraitCropY:20},rl={ref:"gravalanch",maxPV:55,maxPP:20,attack:95,defense:115,speed:35,types:[$.ROCHE,$.SOL],evolution:fa,evolutionLevel:38,rank:2,baseSkill:Q.JET_PIERRES,ppSkill:Q.ARMURE,wildEncounterChance:0,portraitCropY:20},al={ref:"grodoudou",maxPV:140,maxPP:20,attack:70,defense:45,speed:45,types:[$.FEE],rank:2,baseSkill:Q.TORGNOLES,ppSkill:Q.BERCEUSE,wildEncounterChance:0,portraitCropY:14},nn={ref:"grotadmorv",maxPV:105,maxPP:20,attack:105,defense:75,speed:50,types:[$.POISON],rank:2,baseSkill:Q.COUD_BOUE,ppSkill:Q.BOMB_BEURK,wildEncounterChance:0},Dr={ref:"hypnomade",maxPV:85,maxPP:20,attack:73,defense:70,speed:67,types:[$.PSY],rank:2,baseSkill:Q.CHOC_MENTAL,ppSkill:Q.HYPNOSE,wildEncounterChance:0,portraitCropY:17},ol={ref:"hypocean",maxPV:55,maxPP:20,attack:65,defense:95,speed:85,types:[$.EAU],rank:2,baseSkill:Q.BULLES_D_O,ppSkill:Q.OURAGAN,wildEncounterChance:0},da={ref:"hypotrempe",maxPV:30,maxPP:20,attack:40,defense:70,speed:60,types:[$.EAU],evolution:ol,evolutionLevel:32,rank:1,baseSkill:Q.BULLES_D_O,ppSkill:Q.OURAGAN,wildEncounterChance:1},Nr={ref:"insecateur",maxPV:70,maxPP:10,attack:110,defense:80,speed:105,types:[$.INSECTE,$.VOL],rank:3,baseSkill:Q.VIVE_ATTAQUE,ppSkill:Q.DANSE_LAMES,wildEncounterChance:.5,portraitCropY:20},ll={ref:"kabutops",maxPV:60,maxPP:20,attack:115,defense:105,speed:70,types:[$.EAU,$.ROCHE],rank:3,baseSkill:Q.GRIFFE,ppSkill:Q.POUVOIR_ANTIQUE,wildEncounterChance:0,portraitCropY:18},hl={ref:"kabuto",maxPV:30,maxPP:20,attack:80,defense:90,speed:55,types:[$.EAU,$.ROCHE],evolution:ll,evolutionLevel:40,rank:1,baseSkill:Q.GRIFFE,ppSkill:Q.POUVOIR_ANTIQUE,wildEncounterChance:.1,portraitCropY:19},ul={ref:"kangourex",maxPV:105,maxPP:20,attack:95,defense:80,speed:90,types:[$.NORMAL],rank:2,baseSkill:Q.MORSURE,ppSkill:Q.ULTIMAPOING,wildEncounterChance:1,portraitCropY:8},br={ref:"kicklee",maxPV:50,maxPP:12,attack:120,defense:53,speed:87,types:[$.COMBAT],rank:2,baseSkill:Q.DOUBLE_PIED,ppSkill:Q.MAWASHI_GERI,wildEncounterChance:.75},Di={ref:"kokiyas",maxPV:30,maxPP:20,attack:65,defense:100,speed:40,types:[$.EAU],evolution:qo,evolutionLevel:27,rank:1,baseSkill:Q.PISTOLET_A_O,ppSkill:Q.ABRI,wildEncounterChance:1,portraitCropY:24},Vu={ref:"krabboss",maxPV:55,maxPP:30,attack:130,defense:115,speed:75,types:[$.EAU],rank:2,baseSkill:Q.PINCE_MASSE,ppSkill:Q.GUILLOTINE,wildEncounterChance:0,portraitCropY:21},Fs={ref:"krabby",maxPV:30,maxPP:30,attack:105,defense:90,speed:50,types:[$.EAU],evolution:Vu,evolutionLevel:28,rank:1,baseSkill:Q.PINCE_MASSE,ppSkill:Q.GUILLOTINE,wildEncounterChance:1,portraitCropY:18},Br={ref:"lamantine",maxPV:90,maxPP:20,attack:70,defense:80,speed:70,types:[$.EAU,$.GLACE],rank:2,baseSkill:Q.POUDREUSE,ppSkill:Q.LASER_GLACE,wildEncounterChance:0,portraitCropY:8},fl={ref:"leveinard",maxPV:250,maxPP:20,attack:5,defense:5,speed:50,types:[$.NORMAL],rank:3,baseSkill:Q.TORGNOLES,ppSkill:Q.E_COQUE,wildEncounterChance:.5},rn={ref:"leviator",maxPV:95,maxPP:25,attack:125,defense:79,speed:81,types:[$.EAU,$.VOL],rank:3,baseSkill:Q.MORSURE,ppSkill:Q.DRACORAGE,wildEncounterChance:0,portraitCropY:22},ca={ref:"lippoutou",maxPV:65,maxPP:20,attack:50,defense:35,speed:95,types:[$.GLACE,$.PSY],rank:2,baseSkill:Q.POUDREUSE,ppSkill:Q.GROBISOU,wildEncounterChance:1},es={ref:"lokhlass",maxPV:130,maxPP:16,attack:85,defense:80,speed:60,types:[$.EAU,$.GLACE],rank:3,baseSkill:Q.PISTOLET_A_O,ppSkill:Q.SURF,wildEncounterChance:.5,portraitCropY:6},dl={ref:"mackogneur",maxPV:90,maxPP:20,attack:130,defense:80,speed:55,types:[$.COMBAT],rank:3,baseSkill:Q.POING_KARATE,ppSkill:Q.BALAYAGE,wildEncounterChance:0,portraitCropY:8},cl={ref:"machopeur",maxPV:80,maxPP:20,attack:100,defense:70,speed:45,types:[$.COMBAT],evolution:dl,evolutionLevel:40,rank:2,baseSkill:Q.POING_KARATE,ppSkill:Q.BALAYAGE,wildEncounterChance:0,portraitCropY:12},ws={ref:"machoc",maxPV:70,maxPP:20,attack:80,defense:50,speed:35,types:[$.COMBAT],evolution:cl,evolutionLevel:28,rank:1,baseSkill:Q.POING_KARATE,ppSkill:Q.BALAYAGE,wildEncounterChance:1,portraitCropY:12},Ds={ref:"magicarpe",maxPV:20,maxPP:0,attack:10,defense:55,speed:80,types:[$.EAU],evolution:rn,evolutionLevel:20,rank:1,baseSkill:Q.TREMPETTE,wildEncounterChance:1,portraitCropY:21},Qn={ref:"magmar",maxPV:65,maxPP:20,attack:95,defense:57,speed:93,types:[$.FEU],rank:2,baseSkill:Q.FLAMMECHE,ppSkill:Q.BROUILLARD,wildEncounterChance:.5,portraitCropY:12},va={ref:"magneton",maxPV:50,maxPP:20,attack:60,defense:95,speed:70,types:[$.ELECTRIQUE],rank:2,baseSkill:Q.ETINCELLE,ppSkill:Q.CAGE_ECLAIR,wildEncounterChance:0,portraitCropY:21},an={ref:"magneti",maxPV:25,maxPP:20,attack:35,defense:70,speed:45,types:[$.ELECTRIQUE],evolution:va,evolutionLevel:30,rank:1,baseSkill:Q.ETINCELLE,ppSkill:Q.CAGE_ECLAIR,wildEncounterChance:1,portraitCropY:22},vl={ref:"melodelfe",maxPV:95,maxPP:20,attack:70,defense:73,speed:60,types:[$.FEE],rank:1,baseSkill:Q.TORGNOLES,ppSkill:Q.POUVOIR_LUNAIRE,wildEncounterChance:0},is={ref:"melofee",maxPV:70,maxPP:20,attack:45,defense:48,speed:35,types:[$.FEE],evolution:vl,evolutionLevel:26,rank:1,baseSkill:Q.TORGNOLES,ppSkill:Q.POUVOIR_LUNAIRE,wildEncounterChance:1},Gr={ref:"metamorph",maxPV:48,maxPP:1,attack:48,defense:48,speed:48,types:[$.NORMAL],rank:2,baseSkill:Q.MORPHING,wildEncounterChance:1},Yu={ref:"mew",maxPV:100,maxPP:5,attack:100,defense:100,speed:100,types:[$.PSY],rank:5,baseSkill:Q.CHOC_MENTAL,ppSkill:Q.METRONOME,wildEncounterChance:.02},To={ref:"mewtwo",maxPV:106,maxPP:20,attack:110,defense:90,speed:130,types:[$.PSY],rank:5,baseSkill:Q.CHOC_MENTAL,ppSkill:Q.PSYKO,wildEncounterChance:0,portraitCropY:5},zu={ref:"persian",maxPV:65,maxPP:20,attack:70,defense:60,speed:115,types:[$.NORMAL],rank:1,baseSkill:Q.GRIFFE,ppSkill:Q.JACKPOT,wildEncounterChance:0,portraitCropY:12},Ni={ref:"miaouss",maxPV:40,maxPP:20,attack:45,defense:35,speed:90,types:[$.NORMAL],evolution:zu,evolutionLevel:28,rank:1,baseSkill:Q.GRIFFE,ppSkill:Q.JACKPOT,wildEncounterChance:1},on={ref:"mimitoss",maxPV:60,maxPP:10,attack:55,defense:50,speed:45,types:[$.INSECTE,$.POISON],evolution:Ri,evolutionLevel:31,rank:1,baseSkill:Q.CHARGE,ppSkill:Q.RAFALE_PSY,wildEncounterChance:1,portraitCropY:20},Ur={ref:"minidraco",maxPV:41,maxPP:20,attack:64,defense:45,speed:50,types:[$.DRAGON],evolution:Ir,evolutionLevel:30,rank:1,baseSkill:Q.DRACOCHARGE,ppSkill:Q.OURAGAN,wildEncounterChance:1},ss={ref:"mrmime",maxPV:40,maxPP:15,attack:45,defense:65,speed:90,types:[$.PSY,$.FEE],rank:1,baseSkill:Q.TORGNOLES,ppSkill:Q.ENCORE,wildEncounterChance:1},ns={ref:"rafflesia",maxPV:75,maxPP:20,attack:80,defense:85,speed:50,types:[$.PLANTE,$.POISON],rank:3,baseSkill:Q.VOL_VIE,ppSkill:Q.POUDRE_TOXIK,wildEncounterChance:0,portraitCropY:19},pl={ref:"ortide",maxPV:60,maxPP:20,attack:65,defense:70,speed:40,types:[$.PLANTE,$.POISON],evolution:ns,evolutionLevel:37,rank:2,baseSkill:Q.VOL_VIE,ppSkill:Q.POUDRE_TOXIK,wildEncounterChance:0,portraitCropY:22},rs={ref:"mystherbe",maxPV:45,maxPP:20,attack:50,defense:55,speed:30,types:[$.PLANTE,$.POISON],evolution:pl,evolutionLevel:21,rank:1,baseSkill:Q.VOL_VIE,ppSkill:Q.POUDRE_TOXIK,wildEncounterChance:1,portraitCropY:28},ml={ref:"nidoking",maxPV:81,maxPP:20,attack:102,defense:77,speed:85,types:[$.POISON,$.SOL],rank:1,baseSkill:Q.DOUBLE_PIED,ppSkill:Q.EMPAL_KORNE,wildEncounterChance:0},gl={ref:"nidoqueen",maxPV:90,maxPP:20,attack:82,defense:87,speed:76,types:[$.POISON,$.SOL],rank:1,baseSkill:Q.DOUBLE_PIED,ppSkill:Q.RUGISSEMENT,wildEncounterChance:0,portraitCropY:9},Wu={ref:"nidorina",maxPV:70,maxPP:20,attack:62,defense:67,speed:56,types:[$.POISON],evolution:gl,evolutionLevel:32,rank:1,baseSkill:Q.DARD_VENIN,ppSkill:Q.RUGISSEMENT,wildEncounterChance:0,portraitCropY:19},Hu={ref:"nidoranf",maxPV:55,maxPP:20,attack:47,defense:52,speed:41,types:[$.POISON],evolution:Wu,evolutionLevel:16,rank:1,baseSkill:Q.GRIFFE,ppSkill:Q.RUGISSEMENT,wildEncounterChance:1},Xu={ref:"nidorino",maxPV:61,maxPP:20,attack:72,defense:57,speed:65,types:[$.POISON],evolution:ml,evolutionLevel:32,rank:1,baseSkill:Q.DARD_VENIN,ppSkill:Q.EMPAL_KORNE,wildEncounterChance:0,portraitCropY:26},xl={ref:"nidoranm",maxPV:46,maxPP:20,attack:57,defense:40,speed:50,types:[$.POISON],evolution:Xu,evolutionLevel:16,rank:1,baseSkill:Q.DARD_VENIN,ppSkill:Q.EMPAL_KORNE,wildEncounterChance:1,portraitCropY:26},Ns={ref:"noadkoko",maxPV:60,maxPP:15,attack:95,defense:85,speed:55,types:[$.PLANTE,$.PSY],rank:2,baseSkill:Q.PILONNAGE,ppSkill:Q.BOMB_OEUF,wildEncounterChance:0,portraitCropY:20},pa={ref:"noeufnoeuf",maxPV:60,maxPP:20,attack:40,defense:80,speed:40,types:[$.PLANTE,$.PSY],evolution:Ns,evolutionLevel:40,rank:1,baseSkill:Q.PILONNAGE,ppSkill:Q.BOMB_OEUF,wildEncounterChance:1},yl={ref:"nosferalto",maxPV:75,maxPP:20,attack:80,defense:70,speed:90,types:[$.VOL,$.POISON],rank:2,baseSkill:Q.VAMPIRISME,ppSkill:Q.ULTRASON,wildEncounterChance:0,portraitCropY:24},ma={ref:"nosferapti",maxPV:40,maxPP:20,attack:45,defense:35,speed:55,types:[$.VOL,$.POISON],evolution:yl,evolutionLevel:25,rank:1,baseSkill:Q.VAMPIRISME,ppSkill:Q.ULTRASON,wildEncounterChance:1,portraitCropY:24},Li={ref:"onix",maxPV:35,maxPP:20,attack:45,defense:160,speed:70,types:[$.ROCHE,$.SOL],rank:1,baseSkill:Q.JET_PIERRES,ppSkill:Q.ARMURE,wildEncounterChance:1,portraitCropY:30},El={ref:"ossatueur",maxPV:60,maxPP:20,attack:80,defense:110,speed:45,types:[$.SOL],rank:2,baseSkill:Q.MASSDOS,ppSkill:Q.RUGISSEMENT,wildEncounterChance:0,portraitCropY:10},ga={ref:"osselait",maxPV:50,maxPP:20,attack:50,defense:95,speed:35,types:[$.SOL],evolution:El,evolutionLevel:28,rank:1,baseSkill:Q.MASSDOS,ppSkill:Q.RUGISSEMENT,wildEncounterChance:1,portraitCropY:14},qn={ref:"otaria",maxPV:65,maxPP:20,attack:45,defense:55,speed:45,types:[$.EAU,$.GLACE],evolution:Br,evolutionLevel:34,rank:1,baseSkill:Q.POUDREUSE,ppSkill:Q.LASER_GLACE,wildEncounterChance:1,portraitCropY:34},Tl={ref:"parasect",maxPV:60,maxPP:20,attack:95,defense:80,speed:30,types:[$.INSECTE,$.PLANTE],rank:2,baseSkill:Q.GRIFFE,ppSkill:Q.PARASPORE,wildEncounterChance:0,portraitCropY:24},_n={ref:"paras",maxPV:35,maxPP:20,attack:70,defense:55,speed:25,types:[$.INSECTE,$.PLANTE],evolution:Tl,evolutionLevel:24,rank:1,baseSkill:Q.GRIFFE,ppSkill:Q.PARASPORE,wildEncounterChance:1,portraitCropY:21},ku={ref:"rapasdepic",maxPV:65,maxPP:10,attack:90,defense:65,speed:100,types:[$.VOL,$.NORMAL],rank:2,baseSkill:Q.CRUAILE,ppSkill:Q.HATE,wildEncounterChance:0,portraitCropY:30},Sl={ref:"piafabec",maxPV:40,maxPP:10,attack:60,defense:30,speed:70,types:[$.VOL,$.NORMAL],evolution:ku,evolutionLevel:20,rank:1,baseSkill:Q.PICPIC,ppSkill:Q.HATE,wildEncounterChance:1},Al={ref:"raichu",maxPV:60,maxPP:30,attack:90,defense:55,speed:100,types:[$.ELECTRIQUE],rank:2,baseSkill:Q.VIVE_ATTAQUE,ppSkill:Q.ECLAIR,wildEncounterChance:0},as={ref:"pikachu",maxPV:35,maxPP:30,attack:55,defense:40,speed:90,types:[$.ELECTRIQUE],evolution:Al,evolutionLevel:22,rank:1,baseSkill:Q.VIVE_ATTAQUE,ppSkill:Q.ECLAIR,wildEncounterChance:1},Ku={ref:"poissoroy",maxPV:80,maxPP:20,attack:92,defense:65,speed:68,types:[$.EAU],rank:2,baseSkill:Q.KOUD_KORNE,ppSkill:Q.CASCADE,wildEncounterChance:0,portraitCropY:14},tr={ref:"poissirene",maxPV:45,maxPP:20,attack:67,defense:60,speed:63,types:[$.EAU],evolution:Ku,evolutionLevel:33,rank:1,baseSkill:Q.KOUD_KORNE,ppSkill:Q.CASCADE,wildEncounterChance:1,portraitCropY:27},Cl={ref:"ponyta",maxPV:50,maxPP:20,attack:85,defense:55,speed:90,types:[$.FEU],evolution:nl,evolutionLevel:40,rank:1,baseSkill:Q.CHARGE,ppSkill:Q.NITROCHARGE,wildEncounterChance:1,portraitCropY:13},xa={ref:"porygon",maxPV:65,maxPP:20,attack:60,defense:70,speed:40,types:[$.NORMAL],rank:2,baseSkill:Q.TRIPLATTAQUE,ppSkill:Q.ADAPTATION,wildEncounterChance:1,portraitCropY:15},Oi={ref:"psykokwak",maxPV:50,maxPP:16,attack:52,defense:48,speed:55,types:[$.EAU,$.PSY],evolution:ra,evolutionLevel:33,rank:1,baseSkill:Q.CHOC_MENTAL,ppSkill:Q.SURF,wildEncounterChance:1},Pl={ref:"ptera",maxPV:80,maxPP:20,attack:105,defense:65,speed:130,types:[$.DRAGON,$.ROCHE],rank:3,baseSkill:Q.CRUAILE,ppSkill:Q.POUVOIR_ANTIQUE,wildEncounterChance:.1,portraitCropY:22},Rl={ref:"tartard",maxPV:90,maxPP:20,attack:95,defense:95,speed:70,types:[$.EAU],rank:3,baseSkill:Q.TORGNOLES,ppSkill:Q.HYPNOSE,wildEncounterChance:0,portraitCropY:11},Ju={ref:"tetarte",maxPV:65,maxPP:20,attack:65,defense:65,speed:90,types:[$.EAU],evolution:Rl,evolutionLevel:35,rank:2,baseSkill:Q.TORGNOLES,ppSkill:Q.HYPNOSE,wildEncounterChance:0,portraitCropY:13},ya={ref:"ptitard",maxPV:40,maxPP:20,attack:50,defense:40,speed:90,types:[$.EAU],evolution:Ju,evolutionLevel:25,rank:1,baseSkill:Q.BULLES_D_O,ppSkill:Q.HYPNOSE,wildEncounterChance:1},si={ref:"pyroli",maxPV:65,maxPP:20,attack:130,defense:60,speed:65,types:[$.FEU],devolution:fi,rank:1,baseSkill:Q.FLAMMECHE,ppSkill:Q.CROCS_FEU,wildEncounterChance:1,portraitCropY:15},gi={ref:"racaillou",maxPV:40,maxPP:20,attack:80,defense:100,speed:20,types:[$.ROCHE,$.SOL],evolution:rl,evolutionLevel:25,rank:1,baseSkill:Q.JET_PIERRES,ppSkill:Q.ARMURE,wildEncounterChance:1,portraitCropY:25},Ll={ref:"ramoloss",maxPV:90,maxPP:20,attack:65,defense:65,speed:15,types:[$.EAU,$.PSY],evolution:sl,evolutionLevel:37,rank:1,baseSkill:Q.PISTOLET_A_O,ppSkill:Q.AMNESIE,wildEncounterChance:1,portraitCropY:28},ju={ref:"rattatac",maxPV:55,maxPP:20,attack:81,defense:60,speed:97,types:[$.NORMAL],rank:2,baseSkill:Q.MORSURE,ppSkill:Q.CROC_DE_MORT,wildEncounterChance:0,portraitCropY:18},Ea={ref:"rattata",maxPV:30,maxPP:20,attack:56,defense:35,speed:72,types:[$.NORMAL],evolution:ju,evolutionLevel:20,rank:1,baseSkill:Q.MORSURE,ppSkill:Q.CROC_DE_MORT,wildEncounterChance:1,portraitCropY:24},Ol={ref:"reptincel",maxPV:58,maxPP:20,attack:64,defense:58,speed:80,types:[$.FEU],evolution:_o,evolutionLevel:36,rank:2,baseSkill:Q.FLAMMECHE,ppSkill:Q.LANCE_FLAMMES,wildEncounterChance:0},Ta={ref:"rhinoferos",maxPV:105,maxPP:20,attack:130,defense:120,speed:40,types:[$.ROCHE,$.SOL],rank:3,baseSkill:Q.KOUD_KORNE,ppSkill:Q.EMPAL_KORNE,wildEncounterChance:0},os={ref:"rhinocorne",maxPV:80,maxPP:20,attack:85,defense:95,speed:25,types:[$.ROCHE,$.SOL],evolution:Ta,evolutionLevel:42,rank:1,baseSkill:Q.KOUD_KORNE,ppSkill:Q.EMPAL_KORNE,wildEncounterChance:1,portraitCropY:32},ln={ref:"rondoudou",maxPV:115,maxPP:20,attack:45,defense:20,speed:20,types:[$.FEE],evolution:al,evolutionLevel:25,rank:1,baseSkill:Q.TORGNOLES,ppSkill:Q.BERCEUSE,wildEncounterChance:1},Ml={ref:"ronflex",maxPV:160,maxPP:30,attack:110,defense:65,speed:30,types:[$.NORMAL],rank:3,baseSkill:Q.CHARGE,ppSkill:Q.REPOS,wildEncounterChance:1,portraitCropY:8},Zu={ref:"roucarnage",maxPV:83,maxPP:20,attack:80,defense:75,speed:91,types:[$.VOL,$.NORMAL],rank:3,baseSkill:Q.CRUAILE,ppSkill:Q.OURAGAN,wildEncounterChance:0},$u={ref:"roucoups",maxPV:63,maxPP:20,attack:60,defense:55,speed:71,types:[$.VOL,$.NORMAL],evolution:Zu,evolutionLevel:36,rank:2,baseSkill:Q.PICPIC,ppSkill:Q.OURAGAN,wildEncounterChance:0,portraitCropY:8},Il={ref:"roucool",maxPV:40,maxPP:20,attack:45,defense:40,speed:56,types:[$.VOL,$.NORMAL],evolution:$u,evolutionLevel:18,rank:1,baseSkill:Q.PICPIC,ppSkill:Q.OURAGAN,wildEncounterChance:1},Fl={ref:"sablaireau",maxPV:75,maxPP:15,attack:100,defense:110,speed:65,types:[$.SOL],rank:2,baseSkill:Q.GRIFFE,ppSkill:Q.JET_DE_SABLE,wildEncounterChance:0,portraitCropY:15},bs={ref:"sabelette",maxPV:50,maxPP:15,attack:75,defense:85,speed:40,types:[$.SOL],evolution:Fl,evolutionLevel:22,rank:1,baseSkill:Q.GRIFFE,ppSkill:Q.JET_DE_SABLE,wildEncounterChance:1},er={ref:"salameche",maxPV:39,maxPP:20,attack:52,defense:43,speed:65,types:[$.FEU],evolution:Ol,evolutionLevel:16,rank:1,baseSkill:Q.FLAMMECHE,ppSkill:Q.LANCE_FLAMMES,wildEncounterChance:1,portraitCropY:13},ls={ref:"saquedeneu",maxPV:65,maxPP:20,attack:55,defense:115,speed:60,types:[$.PLANTE],rank:3,baseSkill:Q.FOUET_LIANES,ppSkill:Q.LIGOTAGE,wildEncounterChance:1,portraitCropY:22},hn={ref:"scarabrute",maxPV:65,maxPP:25,attack:125,defense:100,speed:85,types:[$.INSECTE],rank:3,baseSkill:Q.GRIFFE,ppSkill:Q.GUILLOTINE,wildEncounterChance:.75,portraitCropY:20},un={ref:"smogogo",maxPV:65,maxPP:20,attack:90,defense:120,speed:60,types:[$.POISON],rank:2,baseSkill:Q.DETRITUS,ppSkill:Q.BROUILLARD,wildEncounterChance:0},hi={ref:"smogo",maxPV:40,maxPP:20,attack:65,defense:95,speed:35,types:[$.POISON],evolution:un,evolutionLevel:35,rank:1,baseSkill:Q.DETRITUS,ppSkill:Q.BROUILLARD,wildEncounterChance:1},fn={ref:"soporifik",maxPV:60,maxPP:20,attack:48,defense:45,speed:42,types:[$.PSY],evolution:Dr,evolutionLevel:26,rank:1,baseSkill:Q.CHOC_MENTAL,ppSkill:Q.HYPNOSE,wildEncounterChance:1},wl={ref:"staross",maxPV:60,maxPP:20,attack:75,defense:85,speed:115,types:[$.EAU,$.PSY],rank:3,baseSkill:Q.PISTOLET_A_O,ppSkill:Q.METEORES,wildEncounterChance:0},Mi={ref:"stari",maxPV:30,maxPP:10,attack:45,defense:55,speed:85,types:[$.EAU],evolution:wl,evolutionLevel:40,rank:1,baseSkill:Q.PISTOLET_A_O,ppSkill:Q.METEORES,wildEncounterChance:1,portraitCropY:22},So={ref:"sulfura",maxPV:90,maxPP:30,attack:100,defense:90,speed:90,types:[$.VOL,$.FEU],rank:5,baseSkill:Q.FLAMMECHE,ppSkill:Q.DEFLAGRATION,wildEncounterChance:0,portraitCropY:31},Ii={ref:"tadmorv",maxPV:80,maxPP:20,attack:80,defense:50,speed:25,types:[$.POISON],evolution:nn,evolutionLevel:38,rank:1,baseSkill:Q.COUD_BOUE,ppSkill:Q.BOMB_BEURK,wildEncounterChance:1},Dl={ref:"triopikeur",maxPV:35,maxPP:15,attack:100,defense:50,speed:120,types:[$.SOL],rank:2,baseSkill:Q.TRIPLATTAQUE,ppSkill:Q.TUNNEL,wildEncounterChance:0,portraitCropY:18},hs={ref:"taupiqueur",maxPV:10,maxPP:15,attack:55,defense:25,speed:95,types:[$.SOL],evolution:Dl,evolutionLevel:26,rank:1,baseSkill:Q.COUD_BOUE,ppSkill:Q.TUNNEL,wildEncounterChance:1,portraitCropY:22},Nl={ref:"tauros",maxPV:75,maxPP:20,attack:100,defense:95,speed:110,types:[$.NORMAL],rank:2,baseSkill:Q.CHARGE,ppSkill:Q.BELIER,wildEncounterChance:1,portraitCropY:22},dn={ref:"tentacruel",maxPV:80,maxPP:20,attack:70,defense:65,speed:100,types:[$.EAU,$.POISON],rank:2,baseSkill:Q.DARD_VENIN,ppSkill:Q.ACIDE,wildEncounterChance:0},Qu={ref:"tentacool",maxPV:40,maxPP:20,attack:40,defense:35,speed:70,types:[$.EAU,$.POISON],evolution:dn,evolutionLevel:30,rank:1,baseSkill:Q.DARD_VENIN,ppSkill:Q.ACIDE,wildEncounterChance:1},Vr={ref:"tygnon",maxPV:50,maxPP:20,attack:105,defense:79,speed:76,types:[$.COMBAT],rank:2,baseSkill:Q.POING_KARATE,ppSkill:Q.ULTIMAPOING,wildEncounterChance:.75},$e={ref:"voltali",maxPV:65,maxPP:20,attack:65,defense:60,speed:130,types:[$.ELECTRIQUE],devolution:fi,rank:2,baseSkill:Q.ETINCELLE,ppSkill:Q.ECLAIR,wildEncounterChance:1,portraitCropY:21},Xi={ref:"voltorbe",maxPV:40,maxPP:50,attack:30,defense:50,speed:100,types:[$.ELECTRIQUE],evolution:el,evolutionLevel:22,rank:1,baseSkill:Q.CHARGE,ppSkill:Q.DESTRUCTION,wildEncounterChance:1,portraitCropY:23};var $s=(E=>(E[E.Holdable=0]="Holdable",E[E.Usable=1]="Usable",E[E.Trade=2]="Trade",E))($s||{});const We={ref:"pokeball",type:2},cn={ref:"baie_sitrus",cost:1,type:0},vn={ref:"baie_ceriz",cost:1,type:0},pn={ref:"baie_oran",cost:1,type:0},mn={ref:"baie_mepo",cost:1,type:0},gn={ref:"attaque+",cost:2,type:0},xn={ref:"defense+",cost:2,type:0},yn={ref:"vitesse+",cost:2,type:0},En={ref:"pv+",cost:2,type:0},Tn={ref:"pokeflute",cost:2,type:0},Sn={ref:"repousse",cost:2,type:1},us={ref:"gemme_draco",cost:3,type:0},fs={ref:"gemme_hydro",cost:3,type:0},ds={ref:"gemme_flamme",cost:3,type:0},cs={ref:"gemme_herbe",cost:3,type:0},vs={ref:"gemme_volt",cost:3,type:0},ps={ref:"gemme_terre",cost:3,type:0},ms={ref:"gemme_insecte",cost:3,type:0},gs={ref:"gemme_pixie",cost:3,type:0},xs={ref:"gemme_ciel",cost:3,type:0},ys={ref:"gemme_poing",cost:3,type:0},Es={ref:"gemme_glace",cost:3,type:0},Ts={ref:"gemme_psy",cost:3,type:0},Ss={ref:"gemme_toxic",cost:3,type:0},As={ref:"gemme_roc",cost:3,type:0},Cs={ref:"gemme_ombre",cost:3,type:0},Ps={ref:"gemme_grise",cost:3,type:0},Fv=[xs,us,ds,Es,Ps,cs,fs,ms,Cs,gs,ys,Ts,As,ps,Ss,vs],An={ref:"grelot_coque",cost:4,type:0},Cn={ref:"boule_fumee",cost:4,type:0},Pn={ref:"multi_exp",cost:4,type:0},Rn={ref:"max_elixir",cost:4,type:0},Ln={ref:"encens_fleur",cost:5,type:0},On={ref:"orbe_toxique",cost:5,type:0},Mn={ref:"orbe_flamme",cost:5,type:0},In={ref:"orbe_foudre",cost:5,type:0},Fn={ref:"super_bonbon",cost:5,type:0},wn={ref:"fossile_amonita",type:2},Dn={ref:"fossile_kabuto",type:2},Nn={ref:"fossile_ptera",type:2},qu=[wn,Dn,Nn],bn={ref:"filet",type:0},Bn={ref:"parapluie",type:0},ke={[We.ref]:We,[vn.ref]:vn,[pn.ref]:pn,[mn.ref]:mn,[cn.ref]:cn,[gn.ref]:gn,[xn.ref]:xn,[yn.ref]:yn,[En.ref]:En,[Tn.ref]:Tn,[Sn.ref]:Sn,[xs.ref]:xs,[us.ref]:us,[ds.ref]:ds,[As.ref]:As,[Es.ref]:Es,[cs.ref]:cs,[fs.ref]:fs,[ms.ref]:ms,[Cs.ref]:Cs,[gs.ref]:gs,[ys.ref]:ys,[Ts.ref]:Ts,[ps.ref]:ps,[Ss.ref]:Ss,[vs.ref]:vs,[Ps.ref]:Ps,[An.ref]:An,[Cn.ref]:Cn,[Pn.ref]:Pn,[Rn.ref]:Rn,[Ln.ref]:Ln,[Mn.ref]:Mn,[On.ref]:On,[In.ref]:In,[Fn.ref]:Fn,[wn.ref]:wn,[Dn.ref]:Dn,[Nn.ref]:Nn,[Bn.ref]:Bn,[bn.ref]:bn};Object.values(ke);const _u=[We,vn,mn,pn,cn,En,yn,gn,xn,Sn,Tn,us,ys,xs,vs,cs,fs,ds,Ss,Ts,ms,As,Cs,Es,Ps,gs,ps,An,Cn,Pn,Rn,Fn,wn,Dn,Nn,Ln,On,Mn,In,bn,Bn];function Ao(E,A){return E.evolution&&E.evolutionLevel&&A>E.evolutionLevel?Ao(E.evolution,A):E.devolution&&A(E.MOVE="MOVE",E.ATTACK="ATTACK",E.IDLE="IDLE",E.JUMP="JUMP",E))(Ge||{});const De=[jn,$o,Zo,er,Ol,_o,Zn,Nu,Du,la,bu,Is,aa,Jo,Ko,Il,$u,Zu,Ea,ju,Sl,ku,Jn,_i,as,Al,bs,Fl,Hu,Wu,gl,xl,Xu,ml,is,vl,ua,ha,ln,al,ma,yl,rs,pl,ns,_n,Tl,on,Ri,hs,Dl,Ni,zu,Oi,ra,il,Qo,Ms,ko,ya,Ju,Rl,ts,Mr,na,ws,cl,dl,$n,oa,jo,Qu,dn,gi,rl,fa,Cl,nl,Ll,sl,an,va,wu,Gu,Bu,qn,Br,Ii,nn,Di,qo,li,wr,Fr,Li,fn,Dr,Fs,Vu,Xi,el,pa,Ns,ga,El,br,Vr,Uu,hi,un,os,Ta,fl,ls,ul,da,ol,tr,Ku,Mi,wl,ss,Nr,ca,sn,Qn,hn,Nl,Ds,rn,es,Gr,fi,ze,$e,si,xa,Fu,Xo,hl,ll,Pl,Ml,yo,Eo,So,Ur,Ir,tl,To,Yu];De.forEach(E=>{const A=De.find(C=>C.evolution===E);A&&(E.devolution=A)});function tf(E){return De.filter(A=>A.types.includes(E))}function ef(){return De.filter(E=>E.rank<5)}function wv(E){return tf(E).filter(A=>A.rank<5)}function sf(E){return`00${De.indexOf(E)+1}`.slice(-3)}function Sa(E){return`cry${sf(E)}`}function bi(E){E.load.spritesheet("pokemon","assets/sprites/pokemon_gen1.png",{frameWidth:32,frameHeight:32,spacing:0,margin:0}),E.load.spritesheet("pokemon_portraits","assets/sprites/pokemon_portraits.png",{frameWidth:64,frameHeight:64,spacing:1,margin:0}),E.load.spritesheet("effects","assets/sprites/effects.png",{frameWidth:64,frameHeight:64,spacing:0,margin:0}),E.load.spritesheet("pokeball","assets/sprites/pokeballs.png",{frameWidth:64,frameHeight:64,spacing:0,margin:0}),E.load.spritesheet("trainer","assets/sprites/trainers.png",{frameWidth:64,frameHeight:64,spacing:0,margin:0}),E.load.spritesheet("trainers_intros","assets/sprites/trainers_intros.png",{frameWidth:320,frameHeight:128,spacing:0,margin:0}),E.load.spritesheet("gui","assets/sprites/gui.png",{frameWidth:32,frameHeight:32,spacing:0,margin:0}),E.load.spritesheet("icons16x16","assets/sprites/icons_16x16.png",{frameWidth:16,frameHeight:16,spacing:0,margin:0}),E.load.spritesheet("buttons","assets/sprites/buttons.png",{frameWidth:64,frameHeight:32,spacing:0,margin:0}),E.load.spritesheet("buttons_big","assets/sprites/buttons_big.png",{frameWidth:96,frameHeight:32,spacing:0,margin:0}),E.load.spritesheet("texts","assets/sprites/texts.png",{frameWidth:256,frameHeight:64,spacing:0,margin:0}),E.load.spritesheet("map","assets/sprites/map.png",{frameWidth:16,frameHeight:16,spacing:0,margin:0}),E.load.spritesheet("characters","assets/sprites/characters.png",{frameWidth:24,frameHeight:24,spacing:0,margin:0}),E.load.spritesheet("interactions","assets/sprites/interactions.png",{frameWidth:16,frameHeight:16,spacing:0,margin:0}),E.load.spritesheet("collisions","assets/sprites/collisions.png",{frameWidth:16,frameHeight:16,spacing:0,margin:0}),E.load.spritesheet("items","assets/sprites/items.png",{frameWidth:32,frameHeight:32,spacing:1,margin:0})}const bl={ref:"badge_roche",frameIndex:22},ir={ref:"badge_cascade",frameIndex:23},Bl={ref:"badge_foudre",frameIndex:24},Gl={ref:"badge_prisme",frameIndex:25},Ul={ref:"badge_ame",frameIndex:26},Vl={ref:"badge_marais",frameIndex:27},Yl={ref:"badge_volcan",frameIndex:28},Aa={ref:"badge_terre",frameIndex:29},Co=[bl,ir,Bl,Gl,Ul,Vl,Yl,Aa];function Dv(E,A,C,R,F=0,B=-1){E.create({key:C,frames:E.generateFrameNumbers(A,{frames:R}),frameRate:F,repeat:B})}function zl(E,A,C){C.forEach(R=>Dv(E,A,...R))}var mt=(E=>(E.UP="UP",E.DOWN="DOWN",E.LEFT="LEFT",E.RIGHT="RIGHT",E))(mt||{});function Eh(){return{UP:null,DOWN:null,LEFT:null,RIGHT:null}}function Wl(E){const A=Math.PI/2;return E==="DOWN"?A:E==="LEFT"?2*A:E==="UP"?3*A:0}function Ca(E,A){return Hl(new Phaser.Math.Vector2(E,A))}function Hl(E){if(E.length()===0)return null;const A=E.angle(),C=Math.PI/4;return A>=0&&A<1*C?"RIGHT":A>=1*C&&A<3*C?"DOWN":A>=3*C&&A<5*C?"LEFT":A>=5*C&&A<7*C?"UP":A>=7*C&&A<8*C?"RIGHT":null}function Nv(E){const A=Math.PI*2,C=Math.PI/4;return E=(E+A)%A,E>C&&E<3*C?"UP":E>3*C&&E<5*C?"LEFT":E>5*C&&E<7*C?"DOWN":"RIGHT"}function sr(E){return E==="UP"?[0,-1]:E==="DOWN"?[0,1]:E==="LEFT"?[-1,0]:E==="RIGHT"?[1,0]:[0,0]}const nf=[mt.UP,mt.LEFT,mt.DOWN,mt.RIGHT];function Pa(E,A){return E>0?mt.RIGHT:E<0?mt.LEFT:A<0?mt.UP:mt.DOWN}let Th=!1;function Ra(E,A){Th||(rf(E),Bv(E,A),bv(E,A),Gv(E,A),Vv(E),Yv(E),Uv(E,A),Th=!0)}function bv(E,A){Object.values(rt).forEach(C=>{E.create({key:C.key,frames:E.generateFrameNumbers("effects",{frames:C.frames}),frameRate:C.frameRate,repeat:A?-1:C.repeat??0})})}let Sh=!1;function rf(E){Sh||(De.forEach((A,C)=>{E.create({key:`${A.ref}_portrait`,frames:E.generateFrameNumbers("pokemon_portraits",{start:C,end:C})}),nf.forEach((R,F)=>{const B=C%15*2+Math.floor(C/15)*120;E.create({key:`${A.ref}_${R}`,frames:E.generateFrameNumbers("pokemon",{frames:[B+F%2+(F>1?60:0),B+30+F%2+(F>1?60:0)]}),frameRate:5,repeat:-1})})}),Sh=!0)}function Bv(E,A){Wo.forEach((C,R)=>{E.create({key:`${C}_idle`,frames:E.generateFrameNumbers("pokeball",{frames:[R+3*5]})}),E.create({key:`${C}_launch`,frames:E.generateFrameNumbers("pokeball",{frames:Array.from({length:3}).map((F,B)=>B*5+R)}),frameRate:12,repeat:-1}),E.create({key:`${C}_in`,frames:E.generateFrameNumbers("pokeball",{frames:[...Array.from({length:12}).map((F,B)=>(B+3)*5+R),R+3*5]}),frameRate:16,repeat:A?-1:0}),E.create({key:`${C}_jiggle`,frames:E.generateFrameNumbers("pokeball",{frames:Array.from({length:5}).map((F,B)=>(B+15)*5+R)}),frameRate:16,repeat:-1,yoyo:!0}),E.create({key:`${C}_jiggle_once`,frames:E.generateFrameNumbers("pokeball",{frames:[R+17*5,R+16*5,R+15*5,R+16*5,R+3*5]}),frameRate:16,repeat:0}),E.create({key:`${C}_out`,frames:E.generateFrameNumbers("pokeball",{frames:Array.from({length:6}).map((F,B)=>(B+20)*5+R)}),frameRate:16,repeat:A?-1:0}),E.create({key:`${C}_catch`,frames:E.generateFrameNumbers("pokeball",{frames:[...Array.from({length:5}).map((F,B)=>(B+26)*5+R),R+3*5]}),frameRate:16,repeat:A?-1:0})})}function Gv(E,A){E.create({key:"trainer_launch",frames:E.generateFrameNumbers("trainer",{frames:[0,1,2,3,4,0]}),frameRate:8,repeat:A?-1:0}),E.create({key:"trainer_idle",frames:E.generateFrameNumbers("trainer",{frames:[0]})}),E.create({key:"trainer_victory",frames:E.generateFrameNumbers("trainer",{frames:[5]})}),E.create({key:"trainer_defeat",frames:E.generateFrameNumbers("trainer",{frames:[6]})})}function Uv(E,A){E.create({key:"cursor_wave",frames:E.generateFrameNumbers("gui",{frames:[0,1]}),frameRate:8,repeat:A?-1:0}),E.create({key:"cursor_drag",frames:E.generateFrameNumbers("gui",{frames:[2,3,4,5]}),frameRate:16,repeat:A?-1:0}),E.create({key:"cursor_drop",frames:E.generateFrameNumbers("gui",{frames:[5,4,3,2,6]}),frameRate:16,repeat:A?-1:0}),E.create({key:"cursor_click",frames:E.generateFrameNumbers("gui",{frames:[7,8,9,6]}),frameRate:16,repeat:A?-1:0}),E.create({key:"cursor_point",frames:E.generateFrameNumbers("gui",{frames:[6]}),frameRate:8,repeat:A?-1:0}),E.create({key:"stat_attack",frames:E.generateFrameNumbers("gui",{frames:[10]})}),E.create({key:"stat_speed",frames:E.generateFrameNumbers("gui",{frames:[11]})}),E.create({key:"stat_defense",frames:E.generateFrameNumbers("gui",{frames:[12]})}),E.create({key:"stat_range",frames:E.generateFrameNumbers("gui",{frames:[13]})}),Object.values($).forEach(C=>{E.create({key:`type_${C.ref}`,frames:E.generateFrameNumbers("icons16x16",{frames:[C.frameIndex]})})}),Object.values(Co).forEach(C=>{E.create({key:C.ref,frames:E.generateFrameNumbers("icons16x16",{frames:[C.frameIndex]})})}),E.create({key:"icon_pokeball",frames:E.generateFrameNumbers("icons16x16",{frames:[20]})}),E.create({key:"text_victoire",frames:E.generateFrameNumbers("texts",{frames:[0]})}),E.create({key:"text_defaite",frames:E.generateFrameNumbers("texts",{frames:[1]})}),E.create({key:"text_fight",frames:E.generateFrameNumbers("texts",{frames:[2]})}),E.create({key:"text_capture",frames:E.generateFrameNumbers("texts",{frames:[3]})})}function Vv(E,A){zl(E,"map",[["player_idle",[4]],["player_right",[0,1],8,-1],["player_left",[2,3],8,-1],["player_down",[5,6],8,-1],["player_up_idle",[7]],["player_up",[8,9],8,-1],["cascade",[10,11,12,13],8,-1],["boat",[14,15],1,-1],["ronflex",[16]],["highlight",[17,18,19],4,-1],["map_direction_arrow",[20]],["gift",[21]],["safari",[22]],["cave_entrance",[23]],["icon_ligue",[24]]])}function Yv(E,A){zl(E,"interactions",[["interaction_talk",[0,1,2,3],3,-1],["interaction_loot",[4,5,6,7,6,5],6,-1]])}class af extends At.Scene{constructor(){super("TestAnimsScene")}preload(){bi(this)}create(){Ra(this.anims,!0);const A=this.add.graphics();A.setDepth(100);const C=this.add.graphics();De.forEach((R,F)=>{nf.forEach((B,v)=>{const y=30+35*v+150*Math.floor(F/15),t=15+35*(F%15);C.fillStyle(v%2?16711782:6684927).fillRect(y-16,t-16,32,32),this.add.sprite(y,t,"pokemon").play(`${R.ref}_${B}`),A.fillStyle(0,1).fillPoint(y,t,4),A.fillStyle(16777215,1).fillPoint(y,t,2)})}),this.add.sprite(20,550,"effects").play("water_bubble"),this.add.sprite(60,550,"effects").play("water_jet"),this.add.sprite(100,550,"effects").play("water_drop"),this.add.sprite(140,550,"effects").play("water_bubble2"),this.add.sprite(180,550,"effects").play("water_shield"),this.add.sprite(220,550,"effects").play("ice_star"),this.add.sprite(260,550,"effects").play("ice_square"),this.add.sprite(300,550,"effects").play("ice_shard"),this.add.sprite(340,550,"effects").play("ice_tear"),this.add.sprite(380,550,"effects").play("ice_shield"),this.add.sprite(420,550,"effects").play("ice_crystal"),this.add.sprite(460,550,"pokemon").play("dracaufeu_DOWN"),this.add.sprite(460,550,"effects").play("frozen"),this.add.sprite(500,550,"effects").play("fire_ground_explosion"),this.add.sprite(540,550,"effects").play("fire_explosion_circle"),this.add.sprite(580,550,"effects").play("fire_flamethrower"),this.add.sprite(620,550,"effects").play("fire_blaze"),this.add.sprite(660,550,"effects").play("fire_blast"),this.add.sprite(700,550,"effects").play("fire_ball"),this.add.sprite(740,550,"effects").play("fire_arrow"),this.add.sprite(780,550,"effects").play("fire_jet"),this.add.sprite(820,550,"effects").play("fire_claw"),this.add.sprite(860,550,"effects").play("fire_explosion"),this.add.sprite(900,550,"effects").play("fire_pierce"),this.add.sprite(940,550,"effects").play("fire_hit"),this.add.sprite(980,550,"effects").play("fire_slice"),this.add.sprite(1020,550,"effects").play("fire_swurl"),this.add.sprite(1060,550,"effects").play("energy_ball"),this.add.sprite(1100,550,"effects").play("paralyze"),this.add.sprite(1140,550,"effects").play("elec_sparks"),this.add.sprite(1180,550,"effects").play("elec_thunder"),this.add.sprite(1220,550,"effects").play("elec_ball"),this.add.sprite(1300,550,"effects").play("vampire_seed"),this.add.sprite(1340,550,"effects").play("vine_whip"),this.add.sprite(1380,550,"effects").play("thorn_spear"),this.add.sprite(1420,550,"effects").play("roots"),this.add.sprite(1460,550,"effects").play("poison_ball"),this.add.sprite(30,600,"effects").play("dark_slice"),this.add.sprite(60,600,"effects").play("hit_star_big"),this.add.sprite(100,600,"effects").play("hit_star"),this.add.sprite(140,600,"effects").play("claw_left"),this.add.sprite(180,600,"effects").play("claw_right"),this.add.sprite(220,600,"effects").play("fist"),this.add.sprite(260,600,"effects").play("paw"),this.add.sprite(300,600,"effects").play("foot"),this.add.sprite(340,600,"effects").play("hand"),this.add.sprite(380,600,"effects").play("provocation"),this.add.sprite(400,600,"effects").play("provocated"),this.add.sprite(460,600,"effects").play("bone"),this.add.sprite(520,600,"effects").play("sweep"),this.add.sprite(30,950,"gui").play("cursor_point"),this.add.sprite(60,950,"gui").play("cursor_click"),this.add.sprite(90,950,"gui").play("cursor_drag"),this.add.sprite(120,950,"gui").play("cursor_drop"),this.add.sprite(150,950,"gui").play("cursor_wave"),Wo.forEach((R,F)=>{this.add.sprite(30+F*64,700,"pokeball").play(`${R}_launch`),this.add.sprite(30+F*64,750,"pokeball").play(`${R}_in`),this.add.sprite(30+F*64,800,"pokeball").play(`${R}_out`),this.add.sprite(30+F*64,850,"pokeball").play(`${R}_jiggle`),this.add.sprite(30+F*64,900,"pokeball").play(`${R}_catch`)})}}function zv(){document.getElementById("gameboy").remove(),document.getElementById("game").setAttribute("style","width: 1920px; height: 1080px; left: auto; position: static");const E=new At.Game({type:At.AUTO,parent:"game",backgroundColor:"#33A5E7",scale:{width:1920,height:1080,mode:At.Scale.FIT,autoCenter:At.Scale.CENTER_BOTH},scene:[af]});globalThis.game=E}const Pt=E=>typeof E=="string",Hs=()=>{let E,A;const C=new Promise((R,F)=>{E=R,A=F});return C.resolve=E,C.reject=A,C},Ah=E=>E==null?"":""+E,Wv=(E,A,C)=>{E.forEach(R=>{A[R]&&(C[R]=A[R])})},Hv=/###/g,Ch=E=>E&&E.indexOf("###")>-1?E.replace(Hv,"."):E,Ph=E=>!E||Pt(E),Qs=(E,A,C)=>{const R=Pt(A)?A.split("."):A;let F=0;for(;F{const{obj:R,k:F}=Qs(E,A,Object);if(R!==void 0||A.length===1){R[F]=C;return}let B=A[A.length-1],v=A.slice(0,A.length-1),y=Qs(E,v,Object);for(;y.obj===void 0&&v.length;)B=`${v[v.length-1]}.${B}`,v=v.slice(0,v.length-1),y=Qs(E,v,Object),y&&y.obj&&typeof y.obj[`${y.k}.${B}`]<"u"&&(y.obj=void 0);y.obj[`${y.k}.${B}`]=C},Xv=(E,A,C,R)=>{const{obj:F,k:B}=Qs(E,A,Object);F[B]=F[B]||[],F[B].push(C)},Yr=(E,A)=>{const{obj:C,k:R}=Qs(E,A);if(C)return C[R]},kv=(E,A,C)=>{const R=Yr(E,C);return R!==void 0?R:Yr(A,C)},of=(E,A,C)=>{for(const R in A)R!=="__proto__"&&R!=="constructor"&&(R in E?Pt(E[R])||E[R]instanceof String||Pt(A[R])||A[R]instanceof String?C&&(E[R]=A[R]):of(E[R],A[R],C):E[R]=A[R]);return E},Vi=E=>E.replace(/[\-\[\]\/\{\}\(\)\*\+\?\.\\\^\$\|]/g,"\\$&");var Kv={"&":"&","<":"<",">":">",'"':""","'":"'","/":"/"};const Jv=E=>Pt(E)?E.replace(/[&<>"'\/]/g,A=>Kv[A]):E;class jv{constructor(A){this.capacity=A,this.regExpMap=new Map,this.regExpQueue=[]}getRegExp(A){const C=this.regExpMap.get(A);if(C!==void 0)return C;const R=new RegExp(A);return this.regExpQueue.length===this.capacity&&this.regExpMap.delete(this.regExpQueue.shift()),this.regExpMap.set(A,R),this.regExpQueue.push(A),R}}const Zv=[" ",",","?","!",";"],$v=new jv(20),Qv=(E,A,C)=>{A=A||"",C=C||"";const R=Zv.filter(v=>A.indexOf(v)<0&&C.indexOf(v)<0);if(R.length===0)return!0;const F=$v.getRegExp(`(${R.map(v=>v==="?"?"\\?":v).join("|")})`);let B=!F.test(E);if(!B){const v=E.indexOf(C);v>0&&!F.test(E.substring(0,v))&&(B=!0)}return B},Po=function(E,A){let C=arguments.length>2&&arguments[2]!==void 0?arguments[2]:".";if(!E)return;if(E[A])return E[A];const R=A.split(C);let F=E;for(let B=0;B-1&&tE&&E.replace("_","-"),qv={type:"logger",log(E){this.output("log",E)},warn(E){this.output("warn",E)},error(E){this.output("error",E)},output(E,A){console&&console[E]&&console[E].apply(console,A)}};class Wr{constructor(A){let C=arguments.length>1&&arguments[1]!==void 0?arguments[1]:{};this.init(A,C)}init(A){let C=arguments.length>1&&arguments[1]!==void 0?arguments[1]:{};this.prefix=C.prefix||"i18next:",this.logger=A||qv,this.options=C,this.debug=C.debug}log(){for(var A=arguments.length,C=new Array(A),R=0;R{this.observers[R]||(this.observers[R]=new Map);const F=this.observers[R].get(C)||0;this.observers[R].set(C,F+1)}),this}off(A,C){if(this.observers[A]){if(!C){delete this.observers[A];return}this.observers[A].delete(C)}}emit(A){for(var C=arguments.length,R=new Array(C>1?C-1:0),F=1;F{let[y,t]=v;for(let h=0;h{let[y,t]=v;for(let h=0;h1&&arguments[1]!==void 0?arguments[1]:{ns:["translation"],defaultNS:"translation"};super(),this.data=A||{},this.options=C,this.options.keySeparator===void 0&&(this.options.keySeparator="."),this.options.ignoreJSONStructure===void 0&&(this.options.ignoreJSONStructure=!0)}addNamespaces(A){this.options.ns.indexOf(A)<0&&this.options.ns.push(A)}removeNamespaces(A){const C=this.options.ns.indexOf(A);C>-1&&this.options.ns.splice(C,1)}getResource(A,C,R){let F=arguments.length>3&&arguments[3]!==void 0?arguments[3]:{};const B=F.keySeparator!==void 0?F.keySeparator:this.options.keySeparator,v=F.ignoreJSONStructure!==void 0?F.ignoreJSONStructure:this.options.ignoreJSONStructure;let y;A.indexOf(".")>-1?y=A.split("."):(y=[A,C],R&&(Array.isArray(R)?y.push(...R):Pt(R)&&B?y.push(...R.split(B)):y.push(R)));const t=Yr(this.data,y);return!t&&!C&&!R&&A.indexOf(".")>-1&&(A=y[0],C=y[1],R=y.slice(2).join(".")),t||!v||!Pt(R)?t:Po(this.data&&this.data[A]&&this.data[A][C],R,B)}addResource(A,C,R,F){let B=arguments.length>4&&arguments[4]!==void 0?arguments[4]:{silent:!1};const v=B.keySeparator!==void 0?B.keySeparator:this.options.keySeparator;let y=[A,C];R&&(y=y.concat(v?R.split(v):R)),A.indexOf(".")>-1&&(y=A.split("."),F=C,C=y[1]),this.addNamespaces(C),Rh(this.data,y,F),B.silent||this.emit("added",A,C,R,F)}addResources(A,C,R){let F=arguments.length>3&&arguments[3]!==void 0?arguments[3]:{silent:!1};for(const B in R)(Pt(R[B])||Array.isArray(R[B]))&&this.addResource(A,C,B,R[B],{silent:!0});F.silent||this.emit("added",A,C,R)}addResourceBundle(A,C,R,F,B){let v=arguments.length>5&&arguments[5]!==void 0?arguments[5]:{silent:!1,skipCopy:!1},y=[A,C];A.indexOf(".")>-1&&(y=A.split("."),F=R,R=C,C=y[1]),this.addNamespaces(C);let t=Yr(this.data,y)||{};v.skipCopy||(R=JSON.parse(JSON.stringify(R))),F?of(t,R,B):t={...t,...R},Rh(this.data,y,t),v.silent||this.emit("added",A,C,R)}removeResourceBundle(A,C){this.hasResourceBundle(A,C)&&delete this.data[A][C],this.removeNamespaces(C),this.emit("removed",A,C)}hasResourceBundle(A,C){return this.getResource(A,C)!==void 0}getResourceBundle(A,C){return C||(C=this.options.defaultNS),this.options.compatibilityAPI==="v1"?{...this.getResource(A,C)}:this.getResource(A,C)}getDataByLanguage(A){return this.data[A]}hasLanguageSomeTranslations(A){const C=this.getDataByLanguage(A);return!!(C&&Object.keys(C)||[]).find(F=>C[F]&&Object.keys(C[F]).length>0)}toJSON(){return this.data}}var lf={processors:{},addPostProcessor(E){this.processors[E.name]=E},handle(E,A,C,R,F){return E.forEach(B=>{this.processors[B]&&(A=this.processors[B].process(A,C,R,F))}),A}};const Oh={};class Hr extends La{constructor(A){let C=arguments.length>1&&arguments[1]!==void 0?arguments[1]:{};super(),Wv(["resourceStore","languageUtils","pluralResolver","interpolator","backendConnector","i18nFormat","utils"],A,this),this.options=C,this.options.keySeparator===void 0&&(this.options.keySeparator="."),this.logger=Qe.create("translator")}changeLanguage(A){A&&(this.language=A)}exists(A){let C=arguments.length>1&&arguments[1]!==void 0?arguments[1]:{interpolation:{}};if(A==null)return!1;const R=this.resolve(A,C);return R&&R.res!==void 0}extractFromKey(A,C){let R=C.nsSeparator!==void 0?C.nsSeparator:this.options.nsSeparator;R===void 0&&(R=":");const F=C.keySeparator!==void 0?C.keySeparator:this.options.keySeparator;let B=C.ns||this.options.defaultNS||[];const v=R&&A.indexOf(R)>-1,y=!this.options.userDefinedKeySeparator&&!C.keySeparator&&!this.options.userDefinedNsSeparator&&!C.nsSeparator&&!Qv(A,R,F);if(v&&!y){const t=A.match(this.interpolator.nestingRegexp);if(t&&t.length>0)return{key:A,namespaces:Pt(B)?[B]:B};const h=A.split(R);(R!==F||R===F&&this.options.ns.indexOf(h[0])>-1)&&(B=h.shift()),A=h.join(F)}return{key:A,namespaces:Pt(B)?[B]:B}}translate(A,C,R){if(typeof C!="object"&&this.options.overloadTranslationOptionHandler&&(C=this.options.overloadTranslationOptionHandler(arguments)),typeof C=="object"&&(C={...C}),C||(C={}),A==null)return"";Array.isArray(A)||(A=[String(A)]);const F=C.returnDetails!==void 0?C.returnDetails:this.options.returnDetails,B=C.keySeparator!==void 0?C.keySeparator:this.options.keySeparator,{key:v,namespaces:y}=this.extractFromKey(A[A.length-1],C),t=y[y.length-1],h=C.lng||this.language,p=C.appendNamespaceToCIMode||this.options.appendNamespaceToCIMode;if(h&&h.toLowerCase()==="cimode"){if(p){const f=C.nsSeparator||this.options.nsSeparator;return F?{res:`${t}${f}${v}`,usedKey:v,exactUsedKey:v,usedLng:h,usedNS:t,usedParams:this.getUsedParamsDetails(C)}:`${t}${f}${v}`}return F?{res:v,usedKey:v,exactUsedKey:v,usedLng:h,usedNS:t,usedParams:this.getUsedParamsDetails(C)}:v}const a=this.resolve(A,C);let n=a&&a.res;const r=a&&a.usedKey||v,e=a&&a.exactUsedKey||v,s=Object.prototype.toString.apply(n),o=["[object Number]","[object Function]","[object RegExp]"],i=C.joinArrays!==void 0?C.joinArrays:this.options.joinArrays,l=!this.i18nFormat||this.i18nFormat.handleAsObject,u=!Pt(n)&&typeof n!="boolean"&&typeof n!="number";if(l&&n&&u&&o.indexOf(s)<0&&!(Pt(i)&&Array.isArray(n))){if(!C.returnObjects&&!this.options.returnObjects){this.options.returnedObjectHandler||this.logger.warn("accessing an object - but returnObjects options is not enabled!");const f=this.options.returnedObjectHandler?this.options.returnedObjectHandler(r,n,{...C,ns:y}):`key '${v} (${this.language})' returned an object instead of string.`;return F?(a.res=f,a.usedParams=this.getUsedParamsDetails(C),a):f}if(B){const f=Array.isArray(n),d=f?[]:{},c=f?e:r;for(const m in n)if(Object.prototype.hasOwnProperty.call(n,m)){const g=`${c}${B}${m}`;d[m]=this.translate(g,{...C,joinArrays:!1,ns:y}),d[m]===g&&(d[m]=n[m])}n=d}}else if(l&&Pt(i)&&Array.isArray(n))n=n.join(i),n&&(n=this.extendTranslation(n,A,C,R));else{let f=!1,d=!1;const c=C.count!==void 0&&!Pt(C.count),m=Hr.hasDefaultValue(C),g=c?this.pluralResolver.getSuffix(h,C.count,C):"",x=C.ordinal&&c?this.pluralResolver.getSuffix(h,C.count,{ordinal:!1}):"",T=c&&!C.ordinal&&C.count===0&&this.pluralResolver.shouldUseIntlApi(),S=T&&C[`defaultValue${this.options.pluralSeparator}zero`]||C[`defaultValue${g}`]||C[`defaultValue${x}`]||C.defaultValue;!this.isValidLookup(n)&&m&&(f=!0,n=S),this.isValidLookup(n)||(d=!0,n=v);const L=(C.missingKeyNoValueFallbackToKey||this.options.missingKeyNoValueFallbackToKey)&&d?void 0:n,I=m&&S!==n&&this.options.updateMissing;if(d||f||I){if(this.logger.log(I?"updateKey":"missingKey",h,t,v,I?S:n),B){const D=this.resolve(v,{...C,keySeparator:!1});D&&D.res&&this.logger.warn("Seems the loaded translations were in flat JSON format instead of nested. Either set keySeparator: false on init or make sure your translations are published in nested format.")}let O=[];const M=this.languageUtils.getFallbackCodes(this.options.fallbackLng,C.lng||this.language);if(this.options.saveMissingTo==="fallback"&&M&&M[0])for(let D=0;D{const H=m&&Y!==n?Y:L;this.options.missingKeyHandler?this.options.missingKeyHandler(D,t,U,H,I,C):this.backendConnector&&this.backendConnector.saveMissing&&this.backendConnector.saveMissing(D,t,U,H,I,C),this.emit("missingKey",D,t,U,n)};this.options.saveMissing&&(this.options.saveMissingPlurals&&c?O.forEach(D=>{const U=this.pluralResolver.getSuffixes(D,C);T&&C[`defaultValue${this.options.pluralSeparator}zero`]&&U.indexOf(`${this.options.pluralSeparator}zero`)<0&&U.push(`${this.options.pluralSeparator}zero`),U.forEach(Y=>{w([D],v+Y,C[`defaultValue${Y}`]||S)})}):w(O,v,S))}n=this.extendTranslation(n,A,C,a,R),d&&n===v&&this.options.appendNamespaceToMissingKey&&(n=`${t}:${v}`),(d||f)&&this.options.parseMissingKeyHandler&&(this.options.compatibilityAPI!=="v1"?n=this.options.parseMissingKeyHandler(this.options.appendNamespaceToMissingKey?`${t}:${v}`:v,f?n:void 0):n=this.options.parseMissingKeyHandler(n))}return F?(a.res=n,a.usedParams=this.getUsedParamsDetails(C),a):n}extendTranslation(A,C,R,F,B){var v=this;if(this.i18nFormat&&this.i18nFormat.parse)A=this.i18nFormat.parse(A,{...this.options.interpolation.defaultVariables,...R},R.lng||this.language||F.usedLng,F.usedNS,F.usedKey,{resolved:F});else if(!R.skipInterpolation){R.interpolation&&this.interpolator.init({...R,interpolation:{...this.options.interpolation,...R.interpolation}});const h=Pt(A)&&(R&&R.interpolation&&R.interpolation.skipOnVariables!==void 0?R.interpolation.skipOnVariables:this.options.interpolation.skipOnVariables);let p;if(h){const n=A.match(this.interpolator.nestingRegexp);p=n&&n.length}let a=R.replace&&!Pt(R.replace)?R.replace:R;if(this.options.interpolation.defaultVariables&&(a={...this.options.interpolation.defaultVariables,...a}),A=this.interpolator.interpolate(A,a,R.lng||this.language||F.usedLng,R),h){const n=A.match(this.interpolator.nestingRegexp),r=n&&n.length;p1&&arguments[1]!==void 0?arguments[1]:{},R,F,B,v,y;return Pt(A)&&(A=[A]),A.forEach(t=>{if(this.isValidLookup(R))return;const h=this.extractFromKey(t,C),p=h.key;F=p;let a=h.namespaces;this.options.fallbackNS&&(a=a.concat(this.options.fallbackNS));const n=C.count!==void 0&&!Pt(C.count),r=n&&!C.ordinal&&C.count===0&&this.pluralResolver.shouldUseIntlApi(),e=C.context!==void 0&&(Pt(C.context)||typeof C.context=="number")&&C.context!=="",s=C.lngs?C.lngs:this.languageUtils.toResolveHierarchy(C.lng||this.language,C.fallbackLng);a.forEach(o=>{this.isValidLookup(R)||(y=o,!Oh[`${s[0]}-${o}`]&&this.utils&&this.utils.hasLoadedNamespace&&!this.utils.hasLoadedNamespace(y)&&(Oh[`${s[0]}-${o}`]=!0,this.logger.warn(`key "${F}" for languages "${s.join(", ")}" won't get resolved as namespace "${y}" was not yet loaded`,"This means something IS WRONG in your setup. You access the t function before i18next.init / i18next.loadNamespace / i18next.changeLanguage was done. Wait for the callback or Promise to resolve before accessing it!!!")),s.forEach(i=>{if(this.isValidLookup(R))return;v=i;const l=[p];if(this.i18nFormat&&this.i18nFormat.addLookupKeys)this.i18nFormat.addLookupKeys(l,p,i,o,C);else{let f;n&&(f=this.pluralResolver.getSuffix(i,C.count,C));const d=`${this.options.pluralSeparator}zero`,c=`${this.options.pluralSeparator}ordinal${this.options.pluralSeparator}`;if(n&&(l.push(p+f),C.ordinal&&f.indexOf(c)===0&&l.push(p+f.replace(c,this.options.pluralSeparator)),r&&l.push(p+d)),e){const m=`${p}${this.options.contextSeparator}${C.context}`;l.push(m),n&&(l.push(m+f),C.ordinal&&f.indexOf(c)===0&&l.push(m+f.replace(c,this.options.pluralSeparator)),r&&l.push(m+d))}}let u;for(;u=l.pop();)this.isValidLookup(R)||(B=u,R=this.getResource(i,o,u,C))}))})}),{res:R,usedKey:F,exactUsedKey:B,usedLng:v,usedNS:y}}isValidLookup(A){return A!==void 0&&!(!this.options.returnNull&&A===null)&&!(!this.options.returnEmptyString&&A==="")}getResource(A,C,R){let F=arguments.length>3&&arguments[3]!==void 0?arguments[3]:{};return this.i18nFormat&&this.i18nFormat.getResource?this.i18nFormat.getResource(A,C,R,F):this.resourceStore.getResource(A,C,R,F)}getUsedParamsDetails(){let A=arguments.length>0&&arguments[0]!==void 0?arguments[0]:{};const C=["defaultValue","ordinal","context","replace","lng","lngs","fallbackLng","ns","keySeparator","nsSeparator","returnObjects","returnDetails","joinArrays","postProcess","interpolation"],R=A.replace&&!Pt(A.replace);let F=R?A.replace:A;if(R&&typeof A.count<"u"&&(F.count=A.count),this.options.interpolation.defaultVariables&&(F={...this.options.interpolation.defaultVariables,...F}),!R){F={...F};for(const B of C)delete F[B]}return F}static hasDefaultValue(A){const C="defaultValue";for(const R in A)if(Object.prototype.hasOwnProperty.call(A,R)&&C===R.substring(0,C.length)&&A[R]!==void 0)return!0;return!1}}const Va=E=>E.charAt(0).toUpperCase()+E.slice(1);class Mh{constructor(A){this.options=A,this.supportedLngs=this.options.supportedLngs||!1,this.logger=Qe.create("languageUtils")}getScriptPartFromCode(A){if(A=zr(A),!A||A.indexOf("-")<0)return null;const C=A.split("-");return C.length===2||(C.pop(),C[C.length-1].toLowerCase()==="x")?null:this.formatLanguageCode(C.join("-"))}getLanguagePartFromCode(A){if(A=zr(A),!A||A.indexOf("-")<0)return A;const C=A.split("-");return this.formatLanguageCode(C[0])}formatLanguageCode(A){if(Pt(A)&&A.indexOf("-")>-1){if(typeof Intl<"u"&&typeof Intl.getCanonicalLocales<"u")try{let F=Intl.getCanonicalLocales(A)[0];if(F&&this.options.lowerCaseLng&&(F=F.toLowerCase()),F)return F}catch{}const C=["hans","hant","latn","cyrl","cans","mong","arab"];let R=A.split("-");return this.options.lowerCaseLng?R=R.map(F=>F.toLowerCase()):R.length===2?(R[0]=R[0].toLowerCase(),R[1]=R[1].toUpperCase(),C.indexOf(R[1].toLowerCase())>-1&&(R[1]=Va(R[1].toLowerCase()))):R.length===3&&(R[0]=R[0].toLowerCase(),R[1].length===2&&(R[1]=R[1].toUpperCase()),R[0]!=="sgn"&&R[2].length===2&&(R[2]=R[2].toUpperCase()),C.indexOf(R[1].toLowerCase())>-1&&(R[1]=Va(R[1].toLowerCase())),C.indexOf(R[2].toLowerCase())>-1&&(R[2]=Va(R[2].toLowerCase()))),R.join("-")}return this.options.cleanCode||this.options.lowerCaseLng?A.toLowerCase():A}isSupportedCode(A){return(this.options.load==="languageOnly"||this.options.nonExplicitSupportedLngs)&&(A=this.getLanguagePartFromCode(A)),!this.supportedLngs||!this.supportedLngs.length||this.supportedLngs.indexOf(A)>-1}getBestMatchFromCodes(A){if(!A)return null;let C;return A.forEach(R=>{if(C)return;const F=this.formatLanguageCode(R);(!this.options.supportedLngs||this.isSupportedCode(F))&&(C=F)}),!C&&this.options.supportedLngs&&A.forEach(R=>{if(C)return;const F=this.getLanguagePartFromCode(R);if(this.isSupportedCode(F))return C=F;C=this.options.supportedLngs.find(B=>{if(B===F)return B;if(!(B.indexOf("-")<0&&F.indexOf("-")<0)&&(B.indexOf("-")>0&&F.indexOf("-")<0&&B.substring(0,B.indexOf("-"))===F||B.indexOf(F)===0&&F.length>1))return B})}),C||(C=this.getFallbackCodes(this.options.fallbackLng)[0]),C}getFallbackCodes(A,C){if(!A)return[];if(typeof A=="function"&&(A=A(C)),Pt(A)&&(A=[A]),Array.isArray(A))return A;if(!C)return A.default||[];let R=A[C];return R||(R=A[this.getScriptPartFromCode(C)]),R||(R=A[this.formatLanguageCode(C)]),R||(R=A[this.getLanguagePartFromCode(C)]),R||(R=A.default),R||[]}toResolveHierarchy(A,C){const R=this.getFallbackCodes(C||this.options.fallbackLng||[],A),F=[],B=v=>{v&&(this.isSupportedCode(v)?F.push(v):this.logger.warn(`rejecting language code not found in supportedLngs: ${v}`))};return Pt(A)&&(A.indexOf("-")>-1||A.indexOf("_")>-1)?(this.options.load!=="languageOnly"&&B(this.formatLanguageCode(A)),this.options.load!=="languageOnly"&&this.options.load!=="currentOnly"&&B(this.getScriptPartFromCode(A)),this.options.load!=="currentOnly"&&B(this.getLanguagePartFromCode(A))):Pt(A)&&B(this.formatLanguageCode(A)),R.forEach(v=>{F.indexOf(v)<0&&B(this.formatLanguageCode(v))}),F}}let _v=[{lngs:["ach","ak","am","arn","br","fil","gun","ln","mfe","mg","mi","oc","pt","pt-BR","tg","tl","ti","tr","uz","wa"],nr:[1,2],fc:1},{lngs:["af","an","ast","az","bg","bn","ca","da","de","dev","el","en","eo","es","et","eu","fi","fo","fur","fy","gl","gu","ha","hi","hu","hy","ia","it","kk","kn","ku","lb","mai","ml","mn","mr","nah","nap","nb","ne","nl","nn","no","nso","pa","pap","pms","ps","pt-PT","rm","sco","se","si","so","son","sq","sv","sw","ta","te","tk","ur","yo"],nr:[1,2],fc:2},{lngs:["ay","bo","cgg","fa","ht","id","ja","jbo","ka","km","ko","ky","lo","ms","sah","su","th","tt","ug","vi","wo","zh"],nr:[1],fc:3},{lngs:["be","bs","cnr","dz","hr","ru","sr","uk"],nr:[1,2,5],fc:4},{lngs:["ar"],nr:[0,1,2,3,11,100],fc:5},{lngs:["cs","sk"],nr:[1,2,5],fc:6},{lngs:["csb","pl"],nr:[1,2,5],fc:7},{lngs:["cy"],nr:[1,2,3,8],fc:8},{lngs:["fr"],nr:[1,2],fc:9},{lngs:["ga"],nr:[1,2,3,7,11],fc:10},{lngs:["gd"],nr:[1,2,3,20],fc:11},{lngs:["is"],nr:[1,2],fc:12},{lngs:["jv"],nr:[0,1],fc:13},{lngs:["kw"],nr:[1,2,3,4],fc:14},{lngs:["lt"],nr:[1,2,10],fc:15},{lngs:["lv"],nr:[1,2,0],fc:16},{lngs:["mk"],nr:[1,2],fc:17},{lngs:["mnk"],nr:[0,1,2],fc:18},{lngs:["mt"],nr:[1,2,11,20],fc:19},{lngs:["or"],nr:[2,1],fc:2},{lngs:["ro"],nr:[1,2,20],fc:20},{lngs:["sl"],nr:[5,1,2,3],fc:21},{lngs:["he","iw"],nr:[1,2,20,21],fc:22}],tp={1:E=>+(E>1),2:E=>+(E!=1),3:E=>0,4:E=>E%10==1&&E%100!=11?0:E%10>=2&&E%10<=4&&(E%100<10||E%100>=20)?1:2,5:E=>E==0?0:E==1?1:E==2?2:E%100>=3&&E%100<=10?3:E%100>=11?4:5,6:E=>E==1?0:E>=2&&E<=4?1:2,7:E=>E==1?0:E%10>=2&&E%10<=4&&(E%100<10||E%100>=20)?1:2,8:E=>E==1?0:E==2?1:E!=8&&E!=11?2:3,9:E=>+(E>=2),10:E=>E==1?0:E==2?1:E<7?2:E<11?3:4,11:E=>E==1||E==11?0:E==2||E==12?1:E>2&&E<20?2:3,12:E=>+(E%10!=1||E%100==11),13:E=>+(E!==0),14:E=>E==1?0:E==2?1:E==3?2:3,15:E=>E%10==1&&E%100!=11?0:E%10>=2&&(E%100<10||E%100>=20)?1:2,16:E=>E%10==1&&E%100!=11?0:E!==0?1:2,17:E=>E==1||E%10==1&&E%100!=11?0:1,18:E=>E==0?0:E==1?1:2,19:E=>E==1?0:E==0||E%100>1&&E%100<11?1:E%100>10&&E%100<20?2:3,20:E=>E==1?0:E==0||E%100>0&&E%100<20?1:2,21:E=>E%100==1?1:E%100==2?2:E%100==3||E%100==4?3:0,22:E=>E==1?0:E==2?1:(E<0||E>10)&&E%10==0?2:3};const ep=["v1","v2","v3"],ip=["v4"],Ih={zero:0,one:1,two:2,few:3,many:4,other:5},sp=()=>{const E={};return _v.forEach(A=>{A.lngs.forEach(C=>{E[C]={numbers:A.nr,plurals:tp[A.fc]}})}),E};class np{constructor(A){let C=arguments.length>1&&arguments[1]!==void 0?arguments[1]:{};this.languageUtils=A,this.options=C,this.logger=Qe.create("pluralResolver"),(!this.options.compatibilityJSON||ip.includes(this.options.compatibilityJSON))&&(typeof Intl>"u"||!Intl.PluralRules)&&(this.options.compatibilityJSON="v3",this.logger.error("Your environment seems not to be Intl API compatible, use an Intl.PluralRules polyfill. Will fallback to the compatibilityJSON v3 format handling.")),this.rules=sp(),this.pluralRulesCache={}}addRule(A,C){this.rules[A]=C}clearCache(){this.pluralRulesCache={}}getRule(A){let C=arguments.length>1&&arguments[1]!==void 0?arguments[1]:{};if(this.shouldUseIntlApi()){const R=zr(A==="dev"?"en":A),F=C.ordinal?"ordinal":"cardinal",B=JSON.stringify({cleanedCode:R,type:F});if(B in this.pluralRulesCache)return this.pluralRulesCache[B];let v;try{v=new Intl.PluralRules(R,{type:F})}catch{if(!A.match(/-|_/))return;const t=this.languageUtils.getLanguagePartFromCode(A);v=this.getRule(t,C)}return this.pluralRulesCache[B]=v,v}return this.rules[A]||this.rules[this.languageUtils.getLanguagePartFromCode(A)]}needsPlural(A){let C=arguments.length>1&&arguments[1]!==void 0?arguments[1]:{};const R=this.getRule(A,C);return this.shouldUseIntlApi()?R&&R.resolvedOptions().pluralCategories.length>1:R&&R.numbers.length>1}getPluralFormsOfKey(A,C){let R=arguments.length>2&&arguments[2]!==void 0?arguments[2]:{};return this.getSuffixes(A,R).map(F=>`${C}${F}`)}getSuffixes(A){let C=arguments.length>1&&arguments[1]!==void 0?arguments[1]:{};const R=this.getRule(A,C);return R?this.shouldUseIntlApi()?R.resolvedOptions().pluralCategories.sort((F,B)=>Ih[F]-Ih[B]).map(F=>`${this.options.prepend}${C.ordinal?`ordinal${this.options.prepend}`:""}${F}`):R.numbers.map(F=>this.getSuffix(A,F,C)):[]}getSuffix(A,C){let R=arguments.length>2&&arguments[2]!==void 0?arguments[2]:{};const F=this.getRule(A,R);return F?this.shouldUseIntlApi()?`${this.options.prepend}${R.ordinal?`ordinal${this.options.prepend}`:""}${F.select(C)}`:this.getSuffixRetroCompatible(F,C):(this.logger.warn(`no plural rule found for: ${A}`),"")}getSuffixRetroCompatible(A,C){const R=A.noAbs?A.plurals(C):A.plurals(Math.abs(C));let F=A.numbers[R];this.options.simplifyPluralSuffix&&A.numbers.length===2&&A.numbers[0]===1&&(F===2?F="plural":F===1&&(F=""));const B=()=>this.options.prepend&&F.toString()?this.options.prepend+F.toString():F.toString();return this.options.compatibilityJSON==="v1"?F===1?"":typeof F=="number"?`_plural_${F.toString()}`:B():this.options.compatibilityJSON==="v2"||this.options.simplifyPluralSuffix&&A.numbers.length===2&&A.numbers[0]===1?B():this.options.prepend&&R.toString()?this.options.prepend+R.toString():R.toString()}shouldUseIntlApi(){return!ep.includes(this.options.compatibilityJSON)}}const Fh=function(E,A,C){let R=arguments.length>3&&arguments[3]!==void 0?arguments[3]:".",F=arguments.length>4&&arguments[4]!==void 0?arguments[4]:!0,B=kv(E,A,C);return!B&&F&&Pt(C)&&(B=Po(E,C,R),B===void 0&&(B=Po(A,C,R))),B},Ya=E=>E.replace(/\$/g,"$$$$");class rp{constructor(){let A=arguments.length>0&&arguments[0]!==void 0?arguments[0]:{};this.logger=Qe.create("interpolator"),this.options=A,this.format=A.interpolation&&A.interpolation.format||(C=>C),this.init(A)}init(){let A=arguments.length>0&&arguments[0]!==void 0?arguments[0]:{};A.interpolation||(A.interpolation={escapeValue:!0});const{escape:C,escapeValue:R,useRawValueToEscape:F,prefix:B,prefixEscaped:v,suffix:y,suffixEscaped:t,formatSeparator:h,unescapeSuffix:p,unescapePrefix:a,nestingPrefix:n,nestingPrefixEscaped:r,nestingSuffix:e,nestingSuffixEscaped:s,nestingOptionsSeparator:o,maxReplaces:i,alwaysFormat:l}=A.interpolation;this.escape=C!==void 0?C:Jv,this.escapeValue=R!==void 0?R:!0,this.useRawValueToEscape=F!==void 0?F:!1,this.prefix=B?Vi(B):v||"{{",this.suffix=y?Vi(y):t||"}}",this.formatSeparator=h||",",this.unescapePrefix=p?"":a||"-",this.unescapeSuffix=this.unescapePrefix?"":p||"",this.nestingPrefix=n?Vi(n):r||Vi("$t("),this.nestingSuffix=e?Vi(e):s||Vi(")"),this.nestingOptionsSeparator=o||",",this.maxReplaces=i||1e3,this.alwaysFormat=l!==void 0?l:!1,this.resetRegExp()}reset(){this.options&&this.init(this.options)}resetRegExp(){const A=(C,R)=>C&&C.source===R?(C.lastIndex=0,C):new RegExp(R,"g");this.regexp=A(this.regexp,`${this.prefix}(.+?)${this.suffix}`),this.regexpUnescape=A(this.regexpUnescape,`${this.prefix}${this.unescapePrefix}(.+?)${this.unescapeSuffix}${this.suffix}`),this.nestingRegexp=A(this.nestingRegexp,`${this.nestingPrefix}(.+?)${this.nestingSuffix}`)}interpolate(A,C,R,F){let B,v,y;const t=this.options&&this.options.interpolation&&this.options.interpolation.defaultVariables||{},h=r=>{if(r.indexOf(this.formatSeparator)<0){const i=Fh(C,t,r,this.options.keySeparator,this.options.ignoreJSONStructure);return this.alwaysFormat?this.format(i,void 0,R,{...F,...C,interpolationkey:r}):i}const e=r.split(this.formatSeparator),s=e.shift().trim(),o=e.join(this.formatSeparator).trim();return this.format(Fh(C,t,s,this.options.keySeparator,this.options.ignoreJSONStructure),o,R,{...F,...C,interpolationkey:s})};this.resetRegExp();const p=F&&F.missingInterpolationHandler||this.options.missingInterpolationHandler,a=F&&F.interpolation&&F.interpolation.skipOnVariables!==void 0?F.interpolation.skipOnVariables:this.options.interpolation.skipOnVariables;return[{regex:this.regexpUnescape,safeValue:r=>Ya(r)},{regex:this.regexp,safeValue:r=>this.escapeValue?Ya(this.escape(r)):Ya(r)}].forEach(r=>{for(y=0;B=r.regex.exec(A);){const e=B[1].trim();if(v=h(e),v===void 0)if(typeof p=="function"){const o=p(A,B,F);v=Pt(o)?o:""}else if(F&&Object.prototype.hasOwnProperty.call(F,e))v="";else if(a){v=B[0];continue}else this.logger.warn(`missed to pass in variable ${e} for interpolating ${A}`),v="";else!Pt(v)&&!this.useRawValueToEscape&&(v=Ah(v));const s=r.safeValue(v);if(A=A.replace(B[0],s),a?(r.regex.lastIndex+=v.length,r.regex.lastIndex-=B[0].length):r.regex.lastIndex=0,y++,y>=this.maxReplaces)break}}),A}nest(A,C){let R=arguments.length>2&&arguments[2]!==void 0?arguments[2]:{},F,B,v;const y=(t,h)=>{const p=this.nestingOptionsSeparator;if(t.indexOf(p)<0)return t;const a=t.split(new RegExp(`${p}[ ]*{`));let n=`{${a[1]}`;t=a[0],n=this.interpolate(n,v);const r=n.match(/'/g),e=n.match(/"/g);(r&&r.length%2===0&&!e||e.length%2!==0)&&(n=n.replace(/'/g,'"'));try{v=JSON.parse(n),h&&(v={...h,...v})}catch(s){return this.logger.warn(`failed parsing options string in nesting for key ${t}`,s),`${t}${p}${n}`}return v.defaultValue&&v.defaultValue.indexOf(this.prefix)>-1&&delete v.defaultValue,t};for(;F=this.nestingRegexp.exec(A);){let t=[];v={...R},v=v.replace&&!Pt(v.replace)?v.replace:v,v.applyPostProcessor=!1,delete v.defaultValue;let h=!1;if(F[0].indexOf(this.formatSeparator)!==-1&&!/{.*}/.test(F[1])){const p=F[1].split(this.formatSeparator).map(a=>a.trim());F[1]=p.shift(),t=p,h=!0}if(B=C(y.call(this,F[1].trim(),v),v),B&&F[0]===A&&!Pt(B))return B;Pt(B)||(B=Ah(B)),B||(this.logger.warn(`missed to resolve ${F[1]} for nesting ${A}`),B=""),h&&(B=t.reduce((p,a)=>this.format(p,a,R.lng,{...R,interpolationkey:F[1].trim()}),B.trim())),A=A.replace(F[0],B),this.regexp.lastIndex=0}return A}}const ap=E=>{let A=E.toLowerCase().trim();const C={};if(E.indexOf("(")>-1){const R=E.split("(");A=R[0].toLowerCase().trim();const F=R[1].substring(0,R[1].length-1);A==="currency"&&F.indexOf(":")<0?C.currency||(C.currency=F.trim()):A==="relativetime"&&F.indexOf(":")<0?C.range||(C.range=F.trim()):F.split(";").forEach(v=>{if(v){const[y,...t]=v.split(":"),h=t.join(":").trim().replace(/^'+|'+$/g,""),p=y.trim();C[p]||(C[p]=h),h==="false"&&(C[p]=!1),h==="true"&&(C[p]=!0),isNaN(h)||(C[p]=parseInt(h,10))}})}return{formatName:A,formatOptions:C}},Yi=E=>{const A={};return(C,R,F)=>{let B=F;F&&F.interpolationkey&&F.formatParams&&F.formatParams[F.interpolationkey]&&F[F.interpolationkey]&&(B={...B,[F.interpolationkey]:void 0});const v=R+JSON.stringify(B);let y=A[v];return y||(y=E(zr(R),F),A[v]=y),y(C)}};class op{constructor(){let A=arguments.length>0&&arguments[0]!==void 0?arguments[0]:{};this.logger=Qe.create("formatter"),this.options=A,this.formats={number:Yi((C,R)=>{const F=new Intl.NumberFormat(C,{...R});return B=>F.format(B)}),currency:Yi((C,R)=>{const F=new Intl.NumberFormat(C,{...R,style:"currency"});return B=>F.format(B)}),datetime:Yi((C,R)=>{const F=new Intl.DateTimeFormat(C,{...R});return B=>F.format(B)}),relativetime:Yi((C,R)=>{const F=new Intl.RelativeTimeFormat(C,{...R});return B=>F.format(B,R.range||"day")}),list:Yi((C,R)=>{const F=new Intl.ListFormat(C,{...R});return B=>F.format(B)})},this.init(A)}init(A){let C=arguments.length>1&&arguments[1]!==void 0?arguments[1]:{interpolation:{}};this.formatSeparator=C.interpolation.formatSeparator||","}add(A,C){this.formats[A.toLowerCase().trim()]=C}addCached(A,C){this.formats[A.toLowerCase().trim()]=Yi(C)}format(A,C,R){let F=arguments.length>3&&arguments[3]!==void 0?arguments[3]:{};const B=C.split(this.formatSeparator);if(B.length>1&&B[0].indexOf("(")>1&&B[0].indexOf(")")<0&&B.find(y=>y.indexOf(")")>-1)){const y=B.findIndex(t=>t.indexOf(")")>-1);B[0]=[B[0],...B.splice(1,y)].join(this.formatSeparator)}return B.reduce((y,t)=>{const{formatName:h,formatOptions:p}=ap(t);if(this.formats[h]){let a=y;try{const n=F&&F.formatParams&&F.formatParams[F.interpolationkey]||{},r=n.locale||n.lng||F.locale||F.lng||R;a=this.formats[h](y,r,{...p,...F,...n})}catch(n){this.logger.warn(n)}return a}else this.logger.warn(`there was no format function for ${h}`);return y},A)}}const lp=(E,A)=>{E.pending[A]!==void 0&&(delete E.pending[A],E.pendingCount--)};class hp extends La{constructor(A,C,R){let F=arguments.length>3&&arguments[3]!==void 0?arguments[3]:{};super(),this.backend=A,this.store=C,this.services=R,this.languageUtils=R.languageUtils,this.options=F,this.logger=Qe.create("backendConnector"),this.waitingReads=[],this.maxParallelReads=F.maxParallelReads||10,this.readingCalls=0,this.maxRetries=F.maxRetries>=0?F.maxRetries:5,this.retryTimeout=F.retryTimeout>=1?F.retryTimeout:350,this.state={},this.queue=[],this.backend&&this.backend.init&&this.backend.init(R,F.backend,F)}queueLoad(A,C,R,F){const B={},v={},y={},t={};return A.forEach(h=>{let p=!0;C.forEach(a=>{const n=`${h}|${a}`;!R.reload&&this.store.hasResourceBundle(h,a)?this.state[n]=2:this.state[n]<0||(this.state[n]===1?v[n]===void 0&&(v[n]=!0):(this.state[n]=1,p=!1,v[n]===void 0&&(v[n]=!0),B[n]===void 0&&(B[n]=!0),t[a]===void 0&&(t[a]=!0)))}),p||(y[h]=!0)}),(Object.keys(B).length||Object.keys(v).length)&&this.queue.push({pending:v,pendingCount:Object.keys(v).length,loaded:{},errors:[],callback:F}),{toLoad:Object.keys(B),pending:Object.keys(v),toLoadLanguages:Object.keys(y),toLoadNamespaces:Object.keys(t)}}loaded(A,C,R){const F=A.split("|"),B=F[0],v=F[1];C&&this.emit("failedLoading",B,v,C),!C&&R&&this.store.addResourceBundle(B,v,R,void 0,void 0,{skipCopy:!0}),this.state[A]=C?-1:2,C&&R&&(this.state[A]=0);const y={};this.queue.forEach(t=>{Xv(t.loaded,[B],v),lp(t,A),C&&t.errors.push(C),t.pendingCount===0&&!t.done&&(Object.keys(t.loaded).forEach(h=>{y[h]||(y[h]={});const p=t.loaded[h];p.length&&p.forEach(a=>{y[h][a]===void 0&&(y[h][a]=!0)})}),t.done=!0,t.errors.length?t.callback(t.errors):t.callback())}),this.emit("loaded",y),this.queue=this.queue.filter(t=>!t.done)}read(A,C,R){let F=arguments.length>3&&arguments[3]!==void 0?arguments[3]:0,B=arguments.length>4&&arguments[4]!==void 0?arguments[4]:this.retryTimeout,v=arguments.length>5?arguments[5]:void 0;if(!A.length)return v(null,{});if(this.readingCalls>=this.maxParallelReads){this.waitingReads.push({lng:A,ns:C,fcName:R,tried:F,wait:B,callback:v});return}this.readingCalls++;const y=(h,p)=>{if(this.readingCalls--,this.waitingReads.length>0){const a=this.waitingReads.shift();this.read(a.lng,a.ns,a.fcName,a.tried,a.wait,a.callback)}if(h&&p&&F{this.read.call(this,A,C,R,F+1,B*2,v)},B);return}v(h,p)},t=this.backend[R].bind(this.backend);if(t.length===2){try{const h=t(A,C);h&&typeof h.then=="function"?h.then(p=>y(null,p)).catch(y):y(null,h)}catch(h){y(h)}return}return t(A,C,y)}prepareLoading(A,C){let R=arguments.length>2&&arguments[2]!==void 0?arguments[2]:{},F=arguments.length>3?arguments[3]:void 0;if(!this.backend)return this.logger.warn("No backend was added via i18next.use. Will not load resources."),F&&F();Pt(A)&&(A=this.languageUtils.toResolveHierarchy(A)),Pt(C)&&(C=[C]);const B=this.queueLoad(A,C,R,F);if(!B.toLoad.length)return B.pending.length||F(),null;B.toLoad.forEach(v=>{this.loadOne(v)})}load(A,C,R){this.prepareLoading(A,C,{},R)}reload(A,C,R){this.prepareLoading(A,C,{reload:!0},R)}loadOne(A){let C=arguments.length>1&&arguments[1]!==void 0?arguments[1]:"";const R=A.split("|"),F=R[0],B=R[1];this.read(F,B,"read",void 0,void 0,(v,y)=>{v&&this.logger.warn(`${C}loading namespace ${B} for language ${F} failed`,v),!v&&y&&this.logger.log(`${C}loaded namespace ${B} for language ${F}`,y),this.loaded(A,v,y)})}saveMissing(A,C,R,F,B){let v=arguments.length>5&&arguments[5]!==void 0?arguments[5]:{},y=arguments.length>6&&arguments[6]!==void 0?arguments[6]:()=>{};if(this.services.utils&&this.services.utils.hasLoadedNamespace&&!this.services.utils.hasLoadedNamespace(C)){this.logger.warn(`did not save key "${R}" as the namespace "${C}" was not yet loaded`,"This means something IS WRONG in your setup. You access the t function before i18next.init / i18next.loadNamespace / i18next.changeLanguage was done. Wait for the callback or Promise to resolve before accessing it!!!");return}if(!(R==null||R==="")){if(this.backend&&this.backend.create){const t={...v,isUpdate:B},h=this.backend.create.bind(this.backend);if(h.length<6)try{let p;h.length===5?p=h(A,C,R,F,t):p=h(A,C,R,F),p&&typeof p.then=="function"?p.then(a=>y(null,a)).catch(y):y(null,p)}catch(p){y(p)}else h(A,C,R,F,y,t)}!A||!A[0]||this.store.addResource(A[0],C,R,F)}}}const wh=()=>({debug:!1,initImmediate:!0,ns:["translation"],defaultNS:["translation"],fallbackLng:["dev"],fallbackNS:!1,supportedLngs:!1,nonExplicitSupportedLngs:!1,load:"all",preload:!1,simplifyPluralSuffix:!0,keySeparator:".",nsSeparator:":",pluralSeparator:"_",contextSeparator:"_",partialBundledLanguages:!1,saveMissing:!1,updateMissing:!1,saveMissingTo:"fallback",saveMissingPlurals:!0,missingKeyHandler:!1,missingInterpolationHandler:!1,postProcess:!1,postProcessPassResolved:!1,returnNull:!1,returnEmptyString:!0,returnObjects:!1,joinArrays:!1,returnedObjectHandler:!1,parseMissingKeyHandler:!1,appendNamespaceToMissingKey:!1,appendNamespaceToCIMode:!1,overloadTranslationOptionHandler:E=>{let A={};if(typeof E[1]=="object"&&(A=E[1]),Pt(E[1])&&(A.defaultValue=E[1]),Pt(E[2])&&(A.tDescription=E[2]),typeof E[2]=="object"||typeof E[3]=="object"){const C=E[3]||E[2];Object.keys(C).forEach(R=>{A[R]=C[R]})}return A},interpolation:{escapeValue:!0,format:E=>E,prefix:"{{",suffix:"}}",formatSeparator:",",unescapePrefix:"-",nestingPrefix:"$t(",nestingSuffix:")",nestingOptionsSeparator:",",maxReplaces:1e3,skipOnVariables:!0}}),Dh=E=>(Pt(E.ns)&&(E.ns=[E.ns]),Pt(E.fallbackLng)&&(E.fallbackLng=[E.fallbackLng]),Pt(E.fallbackNS)&&(E.fallbackNS=[E.fallbackNS]),E.supportedLngs&&E.supportedLngs.indexOf("cimode")<0&&(E.supportedLngs=E.supportedLngs.concat(["cimode"])),E),pr=()=>{},up=E=>{Object.getOwnPropertyNames(Object.getPrototypeOf(E)).forEach(C=>{typeof E[C]=="function"&&(E[C]=E[C].bind(E))})};class Gn extends La{constructor(){let A=arguments.length>0&&arguments[0]!==void 0?arguments[0]:{},C=arguments.length>1?arguments[1]:void 0;if(super(),this.options=Dh(A),this.services={},this.logger=Qe,this.modules={external:[]},up(this),C&&!this.isInitialized&&!A.isClone){if(!this.options.initImmediate)return this.init(A,C),this;setTimeout(()=>{this.init(A,C)},0)}}init(){var A=this;let C=arguments.length>0&&arguments[0]!==void 0?arguments[0]:{},R=arguments.length>1?arguments[1]:void 0;this.isInitializing=!0,typeof C=="function"&&(R=C,C={}),!C.defaultNS&&C.defaultNS!==!1&&C.ns&&(Pt(C.ns)?C.defaultNS=C.ns:C.ns.indexOf("translation")<0&&(C.defaultNS=C.ns[0]));const F=wh();this.options={...F,...this.options,...Dh(C)},this.options.compatibilityAPI!=="v1"&&(this.options.interpolation={...F.interpolation,...this.options.interpolation}),C.keySeparator!==void 0&&(this.options.userDefinedKeySeparator=C.keySeparator),C.nsSeparator!==void 0&&(this.options.userDefinedNsSeparator=C.nsSeparator);const B=p=>p?typeof p=="function"?new p:p:null;if(!this.options.isClone){this.modules.logger?Qe.init(B(this.modules.logger),this.options):Qe.init(null,this.options);let p;this.modules.formatter?p=this.modules.formatter:typeof Intl<"u"&&(p=op);const a=new Mh(this.options);this.store=new Lh(this.options.resources,this.options);const n=this.services;n.logger=Qe,n.resourceStore=this.store,n.languageUtils=a,n.pluralResolver=new np(a,{prepend:this.options.pluralSeparator,compatibilityJSON:this.options.compatibilityJSON,simplifyPluralSuffix:this.options.simplifyPluralSuffix}),p&&(!this.options.interpolation.format||this.options.interpolation.format===F.interpolation.format)&&(n.formatter=B(p),n.formatter.init(n,this.options),this.options.interpolation.format=n.formatter.format.bind(n.formatter)),n.interpolator=new rp(this.options),n.utils={hasLoadedNamespace:this.hasLoadedNamespace.bind(this)},n.backendConnector=new hp(B(this.modules.backend),n.resourceStore,n,this.options),n.backendConnector.on("*",function(r){for(var e=arguments.length,s=new Array(e>1?e-1:0),o=1;o1?e-1:0),o=1;o{r.init&&r.init(this)})}if(this.format=this.options.interpolation.format,R||(R=pr),this.options.fallbackLng&&!this.services.languageDetector&&!this.options.lng){const p=this.services.languageUtils.getFallbackCodes(this.options.fallbackLng);p.length>0&&p[0]!=="dev"&&(this.options.lng=p[0])}!this.services.languageDetector&&!this.options.lng&&this.logger.warn("init: no languageDetector is used and no lng is defined"),["getResource","hasResourceBundle","getResourceBundle","getDataByLanguage"].forEach(p=>{this[p]=function(){return A.store[p](...arguments)}}),["addResource","addResources","addResourceBundle","removeResourceBundle"].forEach(p=>{this[p]=function(){return A.store[p](...arguments),A}});const t=Hs(),h=()=>{const p=(a,n)=>{this.isInitializing=!1,this.isInitialized&&!this.initializedStoreOnce&&this.logger.warn("init: i18next is already initialized. You should call init just once!"),this.isInitialized=!0,this.options.isClone||this.logger.log("initialized",this.options),this.emit("initialized",this.options),t.resolve(n),R(a,n)};if(this.languages&&this.options.compatibilityAPI!=="v1"&&!this.isInitialized)return p(null,this.t.bind(this));this.changeLanguage(this.options.lng,p)};return this.options.resources||!this.options.initImmediate?h():setTimeout(h,0),t}loadResources(A){let R=arguments.length>1&&arguments[1]!==void 0?arguments[1]:pr;const F=Pt(A)?A:this.language;if(typeof A=="function"&&(R=A),!this.options.resources||this.options.partialBundledLanguages){if(F&&F.toLowerCase()==="cimode"&&(!this.options.preload||this.options.preload.length===0))return R();const B=[],v=y=>{if(!y||y==="cimode")return;this.services.languageUtils.toResolveHierarchy(y).forEach(h=>{h!=="cimode"&&B.indexOf(h)<0&&B.push(h)})};F?v(F):this.services.languageUtils.getFallbackCodes(this.options.fallbackLng).forEach(t=>v(t)),this.options.preload&&this.options.preload.forEach(y=>v(y)),this.services.backendConnector.load(B,this.options.ns,y=>{!y&&!this.resolvedLanguage&&this.language&&this.setResolvedLanguage(this.language),R(y)})}else R(null)}reloadResources(A,C,R){const F=Hs();return typeof A=="function"&&(R=A,A=void 0),typeof C=="function"&&(R=C,C=void 0),A||(A=this.languages),C||(C=this.options.ns),R||(R=pr),this.services.backendConnector.reload(A,C,B=>{F.resolve(),R(B)}),F}use(A){if(!A)throw new Error("You are passing an undefined module! Please check the object you are passing to i18next.use()");if(!A.type)throw new Error("You are passing a wrong module! Please check the object you are passing to i18next.use()");return A.type==="backend"&&(this.modules.backend=A),(A.type==="logger"||A.log&&A.warn&&A.error)&&(this.modules.logger=A),A.type==="languageDetector"&&(this.modules.languageDetector=A),A.type==="i18nFormat"&&(this.modules.i18nFormat=A),A.type==="postProcessor"&&lf.addPostProcessor(A),A.type==="formatter"&&(this.modules.formatter=A),A.type==="3rdParty"&&this.modules.external.push(A),this}setResolvedLanguage(A){if(!(!A||!this.languages)&&!(["cimode","dev"].indexOf(A)>-1))for(let C=0;C-1)&&this.store.hasLanguageSomeTranslations(R)){this.resolvedLanguage=R;break}}}changeLanguage(A,C){var R=this;this.isLanguageChangingTo=A;const F=Hs();this.emit("languageChanging",A);const B=t=>{this.language=t,this.languages=this.services.languageUtils.toResolveHierarchy(t),this.resolvedLanguage=void 0,this.setResolvedLanguage(t)},v=(t,h)=>{h?(B(h),this.translator.changeLanguage(h),this.isLanguageChangingTo=void 0,this.emit("languageChanged",h),this.logger.log("languageChanged",h)):this.isLanguageChangingTo=void 0,F.resolve(function(){return R.t(...arguments)}),C&&C(t,function(){return R.t(...arguments)})},y=t=>{!A&&!t&&this.services.languageDetector&&(t=[]);const h=Pt(t)?t:this.services.languageUtils.getBestMatchFromCodes(t);h&&(this.language||B(h),this.translator.language||this.translator.changeLanguage(h),this.services.languageDetector&&this.services.languageDetector.cacheUserLanguage&&this.services.languageDetector.cacheUserLanguage(h)),this.loadResources(h,p=>{v(p,h)})};return!A&&this.services.languageDetector&&!this.services.languageDetector.async?y(this.services.languageDetector.detect()):!A&&this.services.languageDetector&&this.services.languageDetector.async?this.services.languageDetector.detect.length===0?this.services.languageDetector.detect().then(y):this.services.languageDetector.detect(y):y(A),F}getFixedT(A,C,R){var F=this;const B=function(v,y){let t;if(typeof y!="object"){for(var h=arguments.length,p=new Array(h>2?h-2:0),a=2;a`${t.keyPrefix}${n}${e}`):r=t.keyPrefix?`${t.keyPrefix}${n}${v}`:v,F.t(r,t)};return Pt(A)?B.lng=A:B.lngs=A,B.ns=C,B.keyPrefix=R,B}t(){return this.translator&&this.translator.translate(...arguments)}exists(){return this.translator&&this.translator.exists(...arguments)}setDefaultNamespace(A){this.options.defaultNS=A}hasLoadedNamespace(A){let C=arguments.length>1&&arguments[1]!==void 0?arguments[1]:{};if(!this.isInitialized)return this.logger.warn("hasLoadedNamespace: i18next was not initialized",this.languages),!1;if(!this.languages||!this.languages.length)return this.logger.warn("hasLoadedNamespace: i18n.languages were undefined or empty",this.languages),!1;const R=C.lng||this.resolvedLanguage||this.languages[0],F=this.options?this.options.fallbackLng:!1,B=this.languages[this.languages.length-1];if(R.toLowerCase()==="cimode")return!0;const v=(y,t)=>{const h=this.services.backendConnector.state[`${y}|${t}`];return h===-1||h===0||h===2};if(C.precheck){const y=C.precheck(this,v);if(y!==void 0)return y}return!!(this.hasResourceBundle(R,A)||!this.services.backendConnector.backend||this.options.resources&&!this.options.partialBundledLanguages||v(R,A)&&(!F||v(B,A)))}loadNamespaces(A,C){const R=Hs();return this.options.ns?(Pt(A)&&(A=[A]),A.forEach(F=>{this.options.ns.indexOf(F)<0&&this.options.ns.push(F)}),this.loadResources(F=>{R.resolve(),C&&C(F)}),R):(C&&C(),Promise.resolve())}loadLanguages(A,C){const R=Hs();Pt(A)&&(A=[A]);const F=this.options.preload||[],B=A.filter(v=>F.indexOf(v)<0&&this.services.languageUtils.isSupportedCode(v));return B.length?(this.options.preload=F.concat(B),this.loadResources(v=>{R.resolve(),C&&C(v)}),R):(C&&C(),Promise.resolve())}dir(A){if(A||(A=this.resolvedLanguage||(this.languages&&this.languages.length>0?this.languages[0]:this.language)),!A)return"rtl";const C=["ar","shu","sqr","ssh","xaa","yhd","yud","aao","abh","abv","acm","acq","acw","acx","acy","adf","ads","aeb","aec","afb","ajp","apc","apd","arb","arq","ars","ary","arz","auz","avl","ayh","ayl","ayn","ayp","bbz","pga","he","iw","ps","pbt","pbu","pst","prp","prd","ug","ur","ydd","yds","yih","ji","yi","hbo","men","xmn","fa","jpr","peo","pes","prs","dv","sam","ckb"],R=this.services&&this.services.languageUtils||new Mh(wh());return C.indexOf(R.getLanguagePartFromCode(A))>-1||A.toLowerCase().indexOf("-arab")>1?"rtl":"ltr"}static createInstance(){let A=arguments.length>0&&arguments[0]!==void 0?arguments[0]:{},C=arguments.length>1?arguments[1]:void 0;return new Gn(A,C)}cloneInstance(){let A=arguments.length>0&&arguments[0]!==void 0?arguments[0]:{},C=arguments.length>1&&arguments[1]!==void 0?arguments[1]:pr;const R=A.forkResourceStore;R&&delete A.forkResourceStore;const F={...this.options,...A,isClone:!0},B=new Gn(F);return(A.debug!==void 0||A.prefix!==void 0)&&(B.logger=B.logger.clone(A)),["store","services","language"].forEach(y=>{B[y]=this[y]}),B.services={...this.services},B.services.utils={hasLoadedNamespace:B.hasLoadedNamespace.bind(B)},R&&(B.store=new Lh(this.store.data,F),B.services.resourceStore=B.store),B.translator=new Hr(B.services,F),B.translator.on("*",function(y){for(var t=arguments.length,h=new Array(t>1?t-1:0),p=1;p{if(A)for(const C in A)E[C]===void 0&&(E[C]=A[C])}),E}const Nh=/^[\u0009\u0020-\u007e\u0080-\u00ff]+$/,vp=(E,A,C)=>{const R=C||{};R.path=R.path||"/";const F=encodeURIComponent(A);let B=`${E}=${F}`;if(R.maxAge>0){const v=R.maxAge-0;if(Number.isNaN(v))throw new Error("maxAge should be a Number");B+=`; Max-Age=${Math.floor(v)}`}if(R.domain){if(!Nh.test(R.domain))throw new TypeError("option domain is invalid");B+=`; Domain=${R.domain}`}if(R.path){if(!Nh.test(R.path))throw new TypeError("option path is invalid");B+=`; Path=${R.path}`}if(R.expires){if(typeof R.expires.toUTCString!="function")throw new TypeError("option expires is invalid");B+=`; Expires=${R.expires.toUTCString()}`}if(R.httpOnly&&(B+="; HttpOnly"),R.secure&&(B+="; Secure"),R.sameSite)switch(typeof R.sameSite=="string"?R.sameSite.toLowerCase():R.sameSite){case!0:B+="; SameSite=Strict";break;case"lax":B+="; SameSite=Lax";break;case"strict":B+="; SameSite=Strict";break;case"none":B+="; SameSite=None";break;default:throw new TypeError("option sameSite is invalid")}return B},bh={create(E,A,C,R){let F=arguments.length>4&&arguments[4]!==void 0?arguments[4]:{path:"/",sameSite:"strict"};C&&(F.expires=new Date,F.expires.setTime(F.expires.getTime()+C*60*1e3)),R&&(F.domain=R),document.cookie=vp(E,encodeURIComponent(A),F)},read(E){const A=`${E}=`,C=document.cookie.split(";");for(let R=0;R-1&&(F=window.location.hash.substring(window.location.hash.indexOf("?")));const v=F.substring(1).split("&");for(let y=0;y0&&v[y].substring(0,t)===A&&(C=v[y].substring(t+1))}}return C}};let Xs=null;const Bh=()=>{if(Xs!==null)return Xs;try{Xs=window!=="undefined"&&window.localStorage!==null;const E="i18next.translate.boo";window.localStorage.setItem(E,"foo"),window.localStorage.removeItem(E)}catch{Xs=!1}return Xs};var gp={name:"localStorage",lookup(E){let{lookupLocalStorage:A}=E;if(A&&Bh())return window.localStorage.getItem(A)||void 0},cacheUserLanguage(E,A){let{lookupLocalStorage:C}=A;C&&Bh()&&window.localStorage.setItem(C,E)}};let ks=null;const Gh=()=>{if(ks!==null)return ks;try{ks=window!=="undefined"&&window.sessionStorage!==null;const E="i18next.translate.boo";window.sessionStorage.setItem(E,"foo"),window.sessionStorage.removeItem(E)}catch{ks=!1}return ks};var xp={name:"sessionStorage",lookup(E){let{lookupSessionStorage:A}=E;if(A&&Gh())return window.sessionStorage.getItem(A)||void 0},cacheUserLanguage(E,A){let{lookupSessionStorage:C}=A;C&&Gh()&&window.sessionStorage.setItem(C,E)}},yp={name:"navigator",lookup(E){const A=[];if(typeof navigator<"u"){const{languages:C,userLanguage:R,language:F}=navigator;if(C)for(let B=0;B0?A:void 0}},Ep={name:"htmlTag",lookup(E){let{htmlTag:A}=E,C;const R=A||(typeof document<"u"?document.documentElement:null);return R&&typeof R.getAttribute=="function"&&(C=R.getAttribute("lang")),C}},Tp={name:"path",lookup(E){var F;let{lookupFromPathIndex:A}=E;if(typeof window>"u")return;const C=window.location.pathname.match(/\/([a-zA-Z-]*)/g);return Array.isArray(C)?(F=C[typeof A=="number"?A:0])==null?void 0:F.replace("/",""):void 0}},Sp={name:"subdomain",lookup(E){var F,B;let{lookupFromSubdomainIndex:A}=E;const C=typeof A=="number"?A+1:1,R=typeof window<"u"&&((B=(F=window.location)==null?void 0:F.hostname)==null?void 0:B.match(/^(\w{2,5})\.(([a-z0-9-]{1,63}\.[a-z]{2,6})|localhost)/i));if(R)return R[C]}};function Ap(){return{order:["querystring","cookie","localStorage","sessionStorage","navigator","htmlTag"],lookupQuerystring:"lng",lookupCookie:"i18next",lookupLocalStorage:"i18nextLng",lookupSessionStorage:"i18nextLng",caches:["localStorage"],excludeCacheFor:["cimode"],convertDetectedLanguage:E=>E}}class hf{constructor(A){let C=arguments.length>1&&arguments[1]!==void 0?arguments[1]:{};this.type="languageDetector",this.detectors={},this.init(A,C)}init(A){let C=arguments.length>1&&arguments[1]!==void 0?arguments[1]:{},R=arguments.length>2&&arguments[2]!==void 0?arguments[2]:{};this.services=A||{languageUtils:{}},this.options=cp(C,this.options||{},Ap()),typeof this.options.convertDetectedLanguage=="string"&&this.options.convertDetectedLanguage.indexOf("15897")>-1&&(this.options.convertDetectedLanguage=F=>F.replace("-","_")),this.options.lookupFromUrlIndex&&(this.options.lookupFromPathIndex=this.options.lookupFromUrlIndex),this.i18nOptions=R,this.addDetector(pp),this.addDetector(mp),this.addDetector(gp),this.addDetector(xp),this.addDetector(yp),this.addDetector(Ep),this.addDetector(Tp),this.addDetector(Sp)}addDetector(A){return this.detectors[A.name]=A,this}detect(A){A||(A=this.options.order);let C=[];return A.forEach(R=>{if(this.detectors[R]){let F=this.detectors[R].lookup(this.options);F&&typeof F=="string"&&(F=[F]),F&&(C=C.concat(F))}}),C=C.map(R=>this.options.convertDetectedLanguage(R)),this.services.languageUtils.getBestMatchFromCodes?C:C.length>0?C[0]:null}cacheUserLanguage(A,C){C||(C=this.options.caches),C&&(this.options.excludeCacheFor&&this.options.excludeCacheFor.indexOf(A)>-1||C.forEach(R=>{this.detectors[R]&&this.detectors[R].cacheUserLanguage(A,this.options)}))}}hf.type="languageDetector";const Cp={COMBAT:"Fighting Pokémon know no fear and have their stats increased with the number of opponents targeting them.",COMBAT2:"+5% ATK and DEF per opponent",COMBAT4:"+10% ATK and DEF per opponent",COMBAT6:"+20% ATK and DEF per opponent",DRAGON:"When a Dragon Pokémon is the last Pokémon of the team on the board, it gains large bonuses to all of its stats.",DRAGON1:"+20% to the stats of the last dragon",DRAGON2:"+40% to the stats of the last dragon",DRAGON3:"+60% to the stats of the last dragon",EAU:"Water Pokémon are immune to Burn. Water moves can push the target back one or more tiles.",EAU2:"Push back one tile",EAU4:"Push back 2 tiles",EAU6:"Push back 3 tiles",ELEC2:"+10% SPD; 2 damage per hit received",ELEC4:"+20% SPD; 4 damage per hit received",ELEC6:"+30% SPD; 6 damage per hit received",ELECTRIQUE:"Electric Pokémon gain Speed and deal Electric damage with each hit they received on contact.",FEE:"Fairy Pokémon gradually gain PP for your entire team.",FEE1:"+1 PP per second",FEE2:"+2 PP per second",FEE3:"+3 PP per second",FEU:"Fire Pokémon are immune to Freeze. Their attacks apply a burn that deals damage over time and reduces the effectiveness of healing by 50%.",FEU2:"2 burns per attack",FEU4:"3 burns per attack",FEU6:"4 burns per attack",GLACE:"Ice Pokémon are surrounded by an aura of frost that slows opponents on adjacent tiles.",GLACE2:"-20% speed",GLACE3:"-30% speed",GLACE4:"-40% speed",INSECTE:"Bug Pokémon grow and evolve faster, and gain bonus experience with each battle.",INSECTE2:"+20% to experience gains",INSECTE4:"+40% to experience gains",INSECTE6:"+60% to experience gains",NORMAL:"Normal Pokémon reduce damage penalties taken from type weaknesses.",NORMAL2:"-30% weakness damage received",NORMAL4:"-60% weakness damage received",NORMAL6:"-90% weakness damage received",PLANTE:"Grass Pokémon cannot be knocked back by enemy skills and regenerate naturally.",PLANTE2:"Regen 1% of max HP per second",PLANTE4:"Regen 2% of max HP per second",PLANTE6:"Regen 3% of max HP per second",POISON:"Poison Pokémon poison their targets, dealing damage over time proportional to their max HP.",POISON2:"Poison damage dealt +40%",POISON4:"Poison damage dealt +80%",POISON6:"Poison damage dealt +120%",PSY:"Psychic Pokémon are immune to Confusion, and their attacks cause their target to lose PP.",PSY2:"Target loses 2 PP per attack",PSY4:"The target loses 4 PP per attack",PSY6:"The target loses 6 PP per attack",ROCHE:"Rock Pokémon reduce damage received from status affliction (poison, burn).",ROCHE2:"-30% affliction damage",ROCHE4:"-60% affliction damage",ROCHE6:"-90% affliction damage",SOL:"Ground Pokémon dig a tunnel to temporarily protect themselves when they fall below a certain HP threshold.",SOL2:"Tunnel at 20% of HP",SOL4:"Tunnel at 20% and 50% of HP",SOL6:"Tunnel at 20%, 50% and 80% of HP",SPECTRE:"Ghost Pokémon cannot be put to sleep and their attacks scare their target, reducing their Attack.",SPECTRE2:"2 stacks of Fear per attack",SPECTRE4:"4 stacks of Fear per attack",SPECTRE6:"6 stacks of Fear per attack",VOL:"Flying Pokémon fly away from the board at the start of the battle, and can dodge incoming attacks.",VOL2:"20% chance to dodge",VOL4:"40% chance to dodge",VOL6:"60% chance to dodge"},Pp={0:"Your team is KO !",1:"You run to the nearest Pokémon Center."},Rp={bed:"This is not the time to go to sleep!",boat:"This is a model of the S.S. Anne, the famous cruise ship.",book:{0:"This is my Pokémon study course notebook.",1:"Normal Pokémon are versatile, but get beaten by Fighting specialists.",2:"Rock-type Pokémon don't like water.",3:"Water Pokémon fear electricity.",4:"Fire-type Pokémon are powerless against water.",5:"Fire is deadly to Grass Pokémon.",6:"Flying Pokémon fear lightning.",7:"Electric Pokémon are neutralized by Ground.",8:"Ice Pokémon are shattered by Rock.",9:"Fighting Pokémon have one weakness: Psychic attacks.",10:"Ground Pokémon are highly resistant to Poison.",11:"Grass Pokémon win against Ground Pokémon in the long run.",12:"Psychic Pokémon are strangely afraid of Bugs.",13:"Bug Pokémon are pecked by birds.",14:"Only a Spectre can truly face another Spectre.",15:"Dragons can be trapped by Ice."},book_insect:{0:"This is a notebook about Pokémon evolutions.",1:"It is written that {{name}} evolves at the level {{level}}",2:"Interesting. I should keep that in mind!"},frigo:{0:"MAM: Are you still hungry? What a glutton!"},map:"This is the map of the Kanto region.",pc_end:{0:"Record the team in the record books?",1:"Registering team...",2:"Congratulations! You and your Pokémon are famous!",3:"... End of session."},pc_record:{0:"Bzzz... Opening the record book...",1:"No data available.",2:`Last league master recorded: Master in {{nbTours}} tours`,3:`{{nbCaptured}} Pokémon captured -{{nbSeen}} Pokémon seen`,4:"Favorite team:",5:"Bzzz.. The screen went off..."},tv:{0:"The TV broadcasts the news of the day...",1:"BREAKING NEWS!",2:"A Zapdos was spotted at the power plant!",3:"An Articuno has been seen in the Foam Islands!",4:"Mount Ember is said to be the lair of a Moltres!",5:"Our reporters are trying to find out more."}},Lp={ARGENTA:"Pewter City",ARGENTA_ARENA:"Pewter City Arena",ARGENTA_SHOP:"Pewter City Shop",AZURIA:"Cerulean City",AZURIA_ARENA:"Cerulean City Arena",AZURIA_SHOP:"Cerulean City Shop",BOURG_PALETTE:"Pallet Town",BOURG_PALETTE_ROAD:"Pallet Town Road",CAMP_NOMADE:"Nomad Camp",CAMP_NOMADE_ARENA:"Wild Arena",CARMIN:"Vermilion City",CARMIN_ARENA:"Vermilion City Arena",CARMIN_SHOP:"Vermilion City Shop",CAVE_TAUPIQUEUR:"Diglett's Cave",CAVE_TAUPIQUEUR_EAST:"Diglett's Cave (East entrance)",CAVE_TAUPIQUEUR_WEST:"Diglett's Cave (West entrance)",CELADOPOLE:"Celadon City",CELADOPOLE_ARENA:"Celadon City Arena",CELADOPOLE_SHOP:"Celadon City Shop",CENTRALE:"Power plant",CHAMPS_VERDOYANTS:"Green fields",CHEMIN_COLLINE:"Path to the Hill",COLLINE_ROYALE:"Dragon Hill",COL_MONTAGNE:"Mountain Pass",CRAMOISILE:"Cinnabar Island",CRAMOISILE_ARENA:"Cinnabar Island Arena",CRAMOISILE_SHOP:"Cinnabar Island Shop",DOJO:"Dojo",FALAISES:"Cliffs",FORET_JADE:"Viridian Forest",GROTTE_AZUREE:"Cerulean Cave",HOME:"At home",ILES_ECUME:"Seafoam Islands",JADIELLE:"Viridian City",JADIELLE_ARENA:"Viridian City Arena",JADIELLE_SHOP:"Viridian City Shop",LABO_CHEN:"Prof. Oak Laboratory",LAVANVILLE:"Lavender Town",LAVANVILLE_ARENA:"Lavender Town Arena",LAVANVILLE_SHOP:"Lavender Town Shop",LIGUE:"Indigo League",LIGUE_FLOOR1:"Indigo League - 1st floor",LIGUE_FLOOR2:"Indigo League - 2nd floor",LIGUE_FLOOR3:"Indigo League - 3rd floor",LIGUE_FLOOR4:"Indigo League - 4th floor",LIGUE_FLOOR5:"Indigo League - Top floor",LIGUE_HALL:"Indigo League Hall",MAISON_PSY:"Mr. Psychic's House",MONT_BRAISE:"Mt. Ember",MONT_SELENITE:"Mt. Moon",OCEANE:"S.S. Anne",OCEANE_DECK:"On the S.S. Anne",PARC_SAFARI:"Safari Zone",PARMANIE:"Fuchsia City",PARMANIE_ARENA:"Fuchsia City Arena",PARMANIE_SHOP:"Fuchsia City Shop",PENSION:"Pokémon Day Care",PISTE_CYCLABLE:"Cycling Road",ROUTE_VICTOIRE:"Victory Road",ROUTE_VICTOIRE_ENTREE:"Victory Road (Entrance)",ROUTE_VICTOIRE_SORTIE:"Victory Road (Exit)",SAFRANIA:"Saffron City",SAFRANIA_ARENA:"Saffron City Arena",SAFRANIA_SHOP:"Saffron City Shop",TOUR_POKEMON:"Pokémon Tower"},Op={ARENA:"Arena",BOURG_PALETTE:"Mom",CAPTURE:"Capture",CONSEIL_DES_4:"Elite Four",FIGHT:"Fight",SAFARI:"Catch'em all",fast_travel:"Fast travel",fast_travel_AZURIA:"Fast travel to Cerulean City",fast_travel_CARMIN:"Fast travel to Vermilion City",fast_travel_CRAMOISILE:"Fast travel to Cinnabar Island"},Mp=JSON.parse(`{"aftercapture":{"0":"The wild {{name}} shares his experience before being released.","1":"Your {{name}} gains {{xp}} XP"},"agatha":{"defeat":{"0":"You have talent, but it's not enough!"},"start":{"0":"Gnnn... Hello my little one.","1":"I'm Agatha from the Elite Four!","2":"Oak has high hopes for you, son!","3":"Do you know that this old thing was once a handsome boy?","4":"Well... A long time ago!","5":"He just wants to show off his Pokedex!","6":"But that's stupid! Pokémon are for fighting!","7":"I'll show you how great Trainers fight!"},"victory":{"0":"Mmmm... I see why Oak likes you so much!","1":"My shadows have lost. You can pass."}},"aldo":{"defeat":{"0":"Bang! In the teeth!"},"start":{"0":"My name is Bruno from the Elite Four!","1":"My passion for me and my Pokémon is bodybuilding!","2":"To show off on the beach or to box the midgets,","3":"nothing like a dream body!","4":"Your team... I'm going to make yogurt out of it! Let's eat!"},"victory":{"0":"Well done, kiddo! The next one is waiting for you!"}},"assistant1":{"0":"I put the square root, I retain five...","1":"Hmm? What's that for?","q1":"Who are you ?","q2":"Where am I?","q3":"What are you doing ?","r1":"I assist PROF. OAK. So I am his... ASSISTANT!","r2":"You are at the Pokémon Lab in Pallet Town.","r3":"Here we study the different species of Pokémon from Kanto.","r4":"I'm gathering the latest data collected by trainers like you.","r5":"By studying your battles, we collect information about Pokémon.","r6":"This information is then grouped into the Pokédex.","r7":"This is useful for our research, but also for your combat strategies."},"assistant2":{"0":"This machine keeps track of the Pokémon teams that have distinguished themselves","1":"by defeating the Pokémon League Elite Four.","2":"Analyzing the best teams allows us to learn a lot!","3":"If you manage to beat the league, we will happily add your team."},"assistant_tuto":{"defeat":{"0":"Next time, use my Pokéballs!","1":"You will significantly increase your chances of victory!"},"start":{"0":"Wait a minute! If you want to build a team, you need Pokéballs!","1":"Here are 5 Pokéballs to catch your first Pokémon.","2":"Do you know how to use it?","no0":"You can capture a wild Pokémon instead of battling it.","no1":"The more powerful the Pokémon, the more Pokéballs you will need to capture it.","no2":"A captured Pokémon joins your box, which can contain up to 8 Pokémon.","no3":"You can then move them from your box to the field for them to fight.","no4":"Go ahead, try to capture these wild Pokémon!","yes0":"Alright, then catch these wild Pokémon. Or knock them out, whatever you want!"},"step2":{"0":"Your Pokémon become stronger by gaining experience after a battle.","1":"But there is another way to increase the experience of a Pokémon.","2":"All you need to do is capture a wild Pokémon of the same species.","3":"They will share his experience with your Pokémon before being released.","4":"Here, try it right now. Try to capture my {{name}} ."},"step3":{"0":"The higher the level of the captured Pokémon, the more experience they will give.","1":"Remember, this only works if the Pokémon are the same species!","2":"Well, you know everything. Have a good trip and good luck!"},"victory":{"0":"Well, you seem to be doing great!"}},"auguste":{"defeat":{"0":"Now you know what I'm made of!"},"start":{"0":"Greetings. My name is... Blaine!","1":"I am the Champion of the Cinnabar Island!","2":"My fiery Pokémon will burn you to ashes!","3":"Haha! It's going to be very hot soon!"},"victory":{"0":"Phew! I got vaporized!","1":"You have earned the VOLCANO BADGE!","2":"The more badges you have, the tougher the fights!","3":"This is the price to pay to climb up the League!"}},"bob":{"defeat":{"0":"Ha! Your defeat was lightning fast!","1":"A word of advice, kid! Electricity is very powerful!","2":"But it is powerless against Ground Pokémon !"},"start":{"0":"Hey, kid! What are you doing here?","1":"You wouldn't last long in war!","2":"I'll tell you, my Electric Pokémon saved my life!","3":"Yeah! They paralyzed my enemies with their lightning!","4":"A real butchery! The same thing will happen to you!","5":"Count your teeth! You're going to suffer!"},"victory":{"0":"Whoo! Watch out! You're tough, little guy!","1":"Alright, take the LIGHTNING BADGE!","2":"You'll need it to enter the Pokémon League."}},"chen":{"0":"Hello Red! So today is the big day!","1":"The day of your initiatory journey as a Pokémon trainer!","2":"You will travel throughout Kanto, capturing Pokémon,","3":"build a team and face the 8 gym leaders.","4":"Maybe even take on the Pokemon League if you're up for it!","5":"But first, you need to adopt your first Pokémon.","6":"We caught three of them in the pokeballs behind me.","7":"There's one for you. Come on! Pick one!","8":"Go ahead, you can take one of the pokeballs on the table behind me.","9":"{{pokemon}} ? Excellent choice!","10":"Your Pokémon will protect you from wild Pokémon.","11":"But alone he will be no match for the gym leaders!","12":"You will need to capture wild Pokémon to form a team.","13":"Each species of Pokémon has its strengths and weaknesses. Remember this:","14":"The key to victory is a balanced and well-positioned team.","15":"You should go to a nearby town to catch more Pokémon.","16":"Have a good trip and good luck!","17":"Go ahead, save your team on the computer for posterity!","18":"Hum-hum! Congratulations!","19":"This floor is reserved for Pokémon trainers celebrities!","20":"The Champions League are consecrated here!","21":"Their Pokémon are registered as Celebrities!","22":"Your journey to victory was long! Well done again."},"dresseur_argenta":{"defeat":{"0":"You sink like a stone !"},"start":{"0":"You defeated Brock, but I am as solid as a rock!"},"victory":{"0":"I think I have a pebble in my shoe..."}},"dresseur_azuria":{"defeat":{"0":"Keep your head above water!"},"start":{"0":"You won against Misty, but that's water under the bridge!","1":"I'm fresher than ever! Expect a tidal wave!"},"victory":{"0":"Man, I'm washed up!"}},"dresseur_camp_nomade":{"defeat":{"0":"Your Pokémon dropped like flies!"},"start":{"0":"Wait a minute butterfly!","1":"You look like you have ants in your pants.","2":"Let me show you my insect collection!"},"victory":{"0":"Ouch! I got bitten by a mosquito!"}},"dresseur_carmin":{"defeat":{"0":"This is rock'n roll baby!!!"},"start":{"0":"Hey, did you come to my concert? The atmosphere is electric here!","1":"What do you mean, no? You've never listened to my CD?!","2":"I'm not gonna let you ruin the party!"},"victory":{"0":"That's it, you've ruined the mood!"}},"dresseur_cave_taupiqueur":{"defeat":{"0":"That'll teach you to come snooping around in dark corners!"},"start":{"0":"Huh? No, it's not me!","1":"I have an alibi! I was at the movies!"},"victory":{"0":"No need to get upset! Here, take these Pokéballs!","1":"And... they say you've never seen me, okay?"}},"dresseur_celadopole":{"defeat":{"0":"Finally I don't really want us to hang out together anymore, haha!"},"start":{"0":"I've seen you around town before, right?","1":"I can get you into the fanciest trainer clubs here!","2":"But first you have to prove you deserve it! Attack!"},"victory":{"0":"But uh! You were supposed to let me win!","1":"Countryside people have no manners!"}},"dresseur_centrale":{"defeat":{"0":"It was a lightning victory!"},"start":{"0":"Hey, did you blacked out ?","1":"This is not a place for children!","2":"My Electric Pokémon team will blast you!"},"victory":{"0":"I'm shocked! You made me blow a fuse!"}},"dresseur_champs_verdoyants":{"defeat":{"0":"I'm going to do you a favor and give you some advice:","1":"Even the most beautiful roses need thorns.","2":"You need a good attack if you want to win."},"start":{"0":"Hey? Who are you little flower?","1":"This is my garden! I'll send you pushing up daisies!"},"victory":{"0":"Looks like my team is in need of some pruning!","1":"Well played, you're a real gardener!"}},"dresseur_col_de_montagne":{"defeat":{"0":"Another feather in my cap!"},"start":{"0":"Hey kid, are you lost! Well, I rule the roost here!","1":"A little birdie told me you’re about to lose this fight","2":"Let me show you how FLY my bird pokemon are!"},"victory":{"0":"Ouch, I'm dead as a dodo ! Bye, flying away!"}},"dresseur_colline_royale":{"defeat":{"0":"My dragons are so strong! so terrifying!","1":"so powerful! so... ah, he's gone."},"start":{"0":"Are you looking for Dragon Pokémon?","1":"Me too! Me too!","2":"They are so big! so beautiful! so majestic!","3":"They're mine! Do you hear me? Mine alone!"},"victory":{"0":"The dragon's ancestral force has abandoned me!"}},"dresseur_cramoisile":{"defeat":{"0":"Eureka!"},"start":{"0":"Ah, a new subject for experiment!","1":"Let me show you the fruit of my research..."},"victory":{"0":"My calculations are wrong!"}},"dresseur_dojo":{"defeat":{"0":"Your training is not enough yet! Ayaaaaa!"},"start":{"0":"Little weakling! I am the GRAND MASTER of KARATE!","1":"Are you provoking me? Do you want to fight?","2":"Are you looking for close combat? HAHAHA! Ayaaaaa!"},"victory":{"0":"STOP! You beat me! I'm ashamed!","1":"Okay, you win! You fought tooth and nail!"}},"dresseur_falaises":{"defeat":{"0":"So, you still have to learn the ropes!"},"start":{"0":"Hey little guy! I'm the greatest climber in Kanto!","1":"And I fully intend to rise to the top!","2":"Hang on tight cuz it's gonna get bumpy!"},"victory":{"0":"That battle rocked! I can see you climb the league!"}},"dresseur_foret_jade":{"defeat":{"0":"Yeeeesss I won for the first time!"},"start":{"0":"Are you a Pokemon trainer? Me too!","1":"I caught a lot of bug Pokémon!","2":"Now we have to have a fight, that's the rule!"},"victory":{"0":"I'll tell my mother!"}},"dresseur_grotte_azuree":{"defeat":{"0":"Hmm... Your team got cold feet.","1":"What are you still doing here? Are you waiting for the thaw?"},"start":{"0":"Hmmm... Strange place for a meeting.","1":"Let me break the ice. On guard!"},"victory":{"0":"My defense melted like snow in the sun!"}},"dresseur_iles_ecume":{"defeat":{"0":"I’ve got you now! You’re hooked!"},"start":{"0":"Don't make any noise, you'll scare away the fish!"},"victory":{"0":"Aw, man! My line snapped!"}},"dresseur_lavanville":{"defeat":{"0":"Go and rest. Continue to believe in your dreams!"},"start":{"0":"Sally has told me a lot about you.","1":"Will you do me the honor of a fight?"},"victory":{"0":"It was a magical fight, I couldn't have dreamed of anything better."}},"dresseur_mont_braise":{"defeat":{"0":"You see what it's like to be caught in the crossfire!"},"start":{"0":"Well what is a young boy doing in a place like this?","1":"You're in hot water, kid!","2":"Hey Ron, how about we give him a baptism by fire?"},"victory":{"0":"Ceasefire! Come on Ron, let's go!"}},"dresseur_mont_selenite":{"defeat":{"0":"You won't live long here, you'd better leave."},"start":{"0":"I'm looking for fossils, have you seen any?"},"victory":{"0":"It seems I'm the fossil..."}},"dresseur_oceane":{"defeat":{"0":"Loser has to walk the plank!","1":"Ha ha, I'm just kidding!"},"start":{"0":"Ahoy, a challenger ahead!","1":"The crossing is going to be long...","2":"Let's have a fight to pass the time!","3":"Ready? Drop the anchors, it's time to battle!"},"victory":{"0":"I'll just get back to setting the sails for our next destination..."}},"dresseur_parmanie":{"defeat":{"0":"To protect the world from devastation...\`, \`To unite all peoples within our nation..."},"start":{"0":"Get out you dirty brat!","1":"Team Rocket is conducting covert operations here!"},"victory":{"0":"Team Rocket is blasting off again!"}},"dresseur_pension":{"bye":{"0":"I'll take care of your Pokémon while you're away!","1":"Come back whenever you want!"},"start":{"0":"Hey, it's you! You want us to train some of your Pokémon?","1":"Ah, there you are again! Your Pokémon have grown up a lot, look!","2":"Welcome to the Pokémon Day Care!","3":"Here we take care of Pokémon when their owners have to go away.","4":"You can lend us some of your Pokémon if you want.","5":"There are also Pokémon that are just looking to be adopted!","6":"Their type is ordinary so they don't interest other trainers..."}},"dresseur_piste_cyclable":{"defeat":{"0":"You were just a bump in the road. See you loser!"},"start":{"0":"Come on kid, show me what you got! I'm gonna roll you over!","1":"Don't try to run away! Check out my bike!","2":"You won't get far with your little bicycle!"},"victory":{"0":"Raaah you scratched the bodywork! Quick, to the garage!"}},"dresseur_safrania":{"defeat":{"0":"Brute force is no match for the power of intellect!"},"start":{"0":"You dare to come back here? Have you lost your mind?","1":"We Psychic fight with our mental !","2":"My power will make your head spin!"},"victory":{"0":"You gave me a migraine!"}},"dresseur_tour_pokemon":{"defeat":{"0":"Did it...? Did it work?","1":"Demons don't usually take hits..."},"start":{"0":"Back off, demon!!!"},"victory":{"0":"AaAaaaAaaah!!! Run for your lives!!!"}},"erika":{"defeat":{"0":"Losing always hurts a little but...","1":"Fighting a good opponent is stimulating... ","2":"Come on, don't take root here!"},"start":{"0":"Hello and welcome. The weather is nice, isn't it?","1":"I love life. I love flowers and songs. It's cute, isn't it?","2":"I'm ERIKA, the Champion of the Celadon Arena.","3":"Flower arrangement is my specialty.","4":"My Pokémon are grass type.","5":"It was very cold yesterday, so I put on a sweater.","6":"Huh? You want to fight? Well... Say it, then!","7":"You know what? You're gonna lose!"},"victory":{"0":"Oh! I lost? Well done. It's deserved.","1":"I entrust you with the PRISM BADGE.","2":"Each badge you earn makes you face stronger Pokémon.","3":"Did you notice?"}},"evolve":"{{old}} evolves into {{new}} !","exitlab":{"0":"Professor Oak promised to give me my first Pokémon today.","1":"I don't plan on leaving here without him!"},"find":"find","giovanni":{"defeat":{"0":"You raise your Pokémon too carefully.","1":"A kid like you can't understand my plans!"},"start":{"0":"I have to say I'm surprised you made it this far!","1":"Here you are in my lair! I plan to reform Team Rocket here!","2":"You dare to challenge me, the great Giovanni? You're going to suffer!"},"victory":{"0":"Ah! Now that's what I call a fight! You won!","1":"As a reward, here is the EARTH BADGE!","2":"Once you have obtained all 8 badges, you can compete in the Pokémon League.","3":"You can access it via Victory Road west of here.","4":"I'm not worthy of being the leader of Team Rocket!","5":"So his existence ends with my defeat!","6":"I'm going to retreat, far away, as a hermit, to study Pokémon!","7":"One day our paths will cross again! Goodbye!"}},"guide":{"argenta":{"0":"The mountain that peaks above Pewter City is Mount Moon.","1":"This is one of the oldest regions in Kanto!","2":"It is said that many fossils of extinct Pokémon can be found there.","3":"Imagine if we could bring them back to life..."},"azuria":{"0":"This boat, there, is the S.S. Anne!","1":"What a beauty, huh?","2":"It goes on a permanent cruise between Cerulean, Vermillion and Cinnabar Island.","3":"If you want to get in at the right time, you should memorize this roadmap !"},"carmin":{"0":"I took the shortcut through Diglett's cave to get here faster.","1":"But I still missed the boat departure, so I'm waiting here..."},"celadopole":{"0":"The Dragon Hill overlooking Celadon is a legendary place.","1":"It is said that you can come across Dragon Pokémon there!","2":"But the path is blocked by a huge sleeping Pokémon...","3":"If only we could find a way to wake him up..."},"cramoisile":{"0":"I work at Dr. Fuji's Pokémon Research Lab.","1":"I study rare Pokémon fossils.","2":"What? You found a fossil?","3":"Show it to me, come on show it!","4":"Amazing! It's in perfect condition!","5":"Maybe I could even... bring him back to life!","6":"What do you say? Can I take it?","7":"Excellent! I'll be back soon!","8":"Amazing !","9":"It's a {{name}} ! I thought they were gone!","10":"Hmm? What?","11":"Ah, yes, I guess it's yours...","12":"You receive a {{ name }} brought back to life!\`,","13":"Come back to me if you find any more specimens!","14":"But... but... it's for science!","15":"I built a Pokemon Fossil Resurrection Machine!","16":"But I don't have any specimens of good enough quality yet."},"jadielle":{"0":"I wanted to go to the Victory Road to the west, but they wouldn't let me pass...","1":"Only those with all eight Arena Badges can access the Indigo League.","2":"It's not fair! I want to go see the Elite Four!"},"lavanville":{"0":"Lavender Town is a rather quiet town, stuck between the mountains...","1":"But there are some places of interest, like the Pokémon Tower or the Power Plant."},"ligue":{"0":"Ah, so you want information on the League champions?","1":"To claim the title of Pokémon League Master,","2":"You will have to face the Elite Four one after the other.","3":"First you will face Lorelei, the Ice Queen!","4":"Get rid of her quickly before your team is turned into ice cubes.","5":"Next comes Bruno, a specialist in combat and brute force.","6":"His Pokémon are tough, you'll have to be cunning to defeat him!","7":"Third, the terrifying Agatha and her Ghost Pokémon!","8":"They confuse your team, so refine your placement.","9":"Finally you will face Lance, master of the Dragons.","10":"Dragons are very tenacious. You'll have to give it your all!","11":"Well, I don't know what's next. I could never go any further!","12":"Ah, I thought that... no, never mind."},"parmanie":{"0":"The Safari Zone is the big attraction of Fuschia City.","1":"It attracts lots of Pokémon trainers from all over Kanto!","2":"There is a wide variety of Pokémon of all types.","3":"But fighting is forbidden there to preserve their tranquility."},"safrania":{"0":"I left my Pokemon at the Day Care in the north for a few days.","1":"After that, I found him in great shape, stronger than ever!","2":"The breeder at the Day Care really does a remarkable job."}},"healer":{"0":"Battles in the League are very exhausting for your Pokémon.","1":"But we take care to heal your entire team between each fight."},"hector":{"defeat":{"0":"Bug Pokémon have hidden abilities.","1":"It will take some time to discover them all.","2":"Study them carefully."},"start":{"0":"Hey, did you find my camp? I'm Bugsy!","1":"I came to study the Bug Pokémon of this region.","2":"No one knows Bug Pokémon better than me!","3":"When I grow up, I'll be a great expert in Bug Pokémon!","4":"Do you want me to show you?","5":"Prepare yourself to admire the result of my research!"},"victory":{"0":"Wow, wow! You really know Pokémon!","1":"Ah, I still have a lot to learn! ... ","2":"Yes, I know! Take my insect net as a reward!","3":"You'll see, it will be very useful to you!","4":"Well, I'm going to break camp. I've finished what I had to do here.","5":"This area is full of exotic Pokémon, you should come back!"}},"item_no_use":"It won't work here...","item_received":"You {{verb}} : {{label}} {{quantity}}","item_use":"Use {{item}}?","koga":{"defeat":{"0":"Ha ha! It's time to teach you that some Pokémon","1":"cannot be defeated by pure force!"},"start":{"0":"Gwahahaha! A dwarf dares to challenge me?","1":"Me, the big, the handsome, the terrible Koga?","2":"By hell, by blood, by steel, I will win!","3":"May the grip of my poisons petrify your little Pokémon with fear!"},"victory":{"0":"Gwaha... huh? You've proven your worth!","1":"Open your hand, for here is... the SOUL BADGE!","2":"I fought with all my strength...","3":"But... I'm not strong enough.","4":"Go to the next arena! Explore your limits!","5":"Good luck !"}},"levelup":"{{name}} is now level {{level}}","mom":{"after_gift":"Good luck in your adventure!","gift1":"Here, before you go... I found this under your bed.","gift10":"It allows you to add a new type to one of your Pokémon!","gift11":"I hope this is useful to you.","gift12":"You've been gone for a while. Have you made any new friends?","gift13":"I stopped by the store and found something for you.","gift14":"The seller told me that all the best trainers had one!","gift15":"But you have to choose the right Pokémon to give it to.","gift16":"It's been so long since you left home!","gift17":"You must have a lot of stories to tell.","gift18":"For your return, I would like to offer you a gift:","gift19":"All the savings went into it! But it's a special occasion.","gift2":"You haven't been gone long. How are you?","gift20":"You are so close to your goal! I believe in you my darling!","gift3":"I picked some berries from the garden. Your Pokémon will love them!","gift4":"How is your adventure going?","gift5":"Hey, I found this for you at Prof. Oak's Lab.","gift6":"Is the trip going well?","gift7":"Have you caught a lot of Pokémon?","gift8":"Here, I have something to offer you.","gift9":"This is a very rare gem.","hello":"Hello, my dear!"},"morgane":{"defeat":{"0":"This is exactly what I predicted."},"start":{"0":"I predicted your arrival!","1":"I have had psychic powers since childhood.","2":"I learned to bend spoons by the power of my mind.","3":"It's not super useful, but it looks cool!","4":"I don't like fighting, but if you insist, I'll show you my powers!"},"victory":{"0":"Ha! I'm surprised! You won.","1":"That's right, I didn't do my best!","2":"You deserve your victory! You win the MARSH BADGE!","3":"The Marsh Badge strengthens occult powers...","4":"And that... It's not a small thing.","5":"You will become a Master! I feel it!"}},"mr_psy":{"defeat":{"0":"What a disappointment!","1":"Come back to me and I'll let you catch more Psychic Pokémon.","2":"Your team needs to improve its mental!"},"start":{"0":"Ah, here you are again! So, have you trained your Pokémon's minds?","1":"It's time for... the Mr Psychic exam!"},"victory":{"0":"That's a 10/10! You graduated from Mr. Psychic's school!"}},"olga":{"defeat":{"0":"Zis is not enough!"},"start":{"0":"Welcome to the Pokémon League!","1":"I am Lorelei of ze Elite Four!","2":"I am the master of Ize Pokémon!","3":"And the Ize... It'z really ztrong!","4":"Your Pokemon will be frozen to my mercy!","5":"Ach! Ach! Ach! Letz go!"},"victory":{"0":"You are ztrong. It's good.","1":"But the Pokémon League has other zurprizes for you!"}},"ondine":{"defeat":{"0":"Haha, looks like your team took on water!","1":"You're going to have to find another tactic."},"start":{"0":"Hi! Are you new?","1":"If you want to be a real trainer, you need a strategy!","2":"What is your tactic for capturing wild Pokémon?","3":"I'm charging into them with my water Pokémon!"},"victory":{"0":"Whoa! You're super strong! Very good!","1":"I give you the CASCADE BADGE for beating me!","2":"This badge opens the way to the cave north of Cerulean City."}},"peter":{"defeat":{"0":"I never give up. What about you?"},"start":{"0":"Ah! Finally... I heard about you!","1":"I reign over the Elite Four!","2":"My name is Lance the Dragon Trainer!","3":"Dragons are mystical Pokémon!","4":"Capturing and training them is difficult but their powers are superior!","5":"They are almost invincible!","6":"The bell of defeat and shame tolls for you...","7":"Do you hear it?"},"victory":{"0":"How could my dragons succumb to your attacks?","1":"You are now the Master of the Pokémon League!","2":"Well... not quite.","3":"A final test you must still pass...","4":"Another great Trainer awaits you.","5":"He defeated the Elite Four before you!","6":"He's the real Master of the Pokémon League!"}},"pierre":{"defeat":{"0":"Your Pokémon couldn't get past my rock defense...","1":"Train them and come back and fight me when you're strong enough."},"start":{"0":"I am Brock! I am the Champion of Pewter City!","1":"I believe in the great resistance of stone!","2":"That's why my Pokémon are stone elementals!","3":"You still want to fight me? Fine. On guard!"},"victory":{"0":"Hmm... Nice fight.","1":"You seem to be an exceptional Trainer!","2":"In recognition of your victory, here is the ROCK BADGE!","3":"This is an official Pokémon League Badge!","4":"You will need eight of them to be able to face the Elite Four."}},"receive":"receive","relacher":"Release {{name}} and retrieve {{cost}} Pokéball?","rival":{"defeat":{"0":"You amused me a little!","1":"You're really a loser!","2":"But I think you're starting to know, you loser!"},"start":{"0":"Hi, loser. I've been waiting for you for ages!","1":"Your duty as a rival is to train my Pokémon.","2":"While improving my Pokédex, I searched for the overpowered Pokémon!","3":"I created the ultimate team, effective against all types of Pokémon!","4":"That impresses you, doesn't it?","5":"I am the Master! Do you know what that means?","6":"I'm the most powerful trainer in the world! Yaaa!"},"victory":{"0":"Wha... Com... Huh? Me? Why? WHAAAAAAAAAAA!","1":"I trained my Pokémon to perfection... Oh my!","2":"You're the new Master! So that... That blows my mind"}},"sally":{"defeat":{"0":"It’s beautiful, the energy of youth.","1":"But the power of the attacks is not everything...","2":"Are you finally beginning to understand what magic is?"},"start":{"0":"Well, well. I've heard of you, my child.","1":"I am Sally, the Ballonlea Gym Leader in the Galar region.","2":"I came to Lavenderville to visit an old friend...","3":"This place has something magical to it for me.","4":"Well, how about a fight?","5":"I'd be interested to see how you fight..."},"victory":{"0":"Congratulations on this victory! I had a blast!","1":"Even though I'm too old for that kind of thing...","2":"You remind me of my husband in his younger years.","3":"You know what? You should get that umbrella.","4":"It was very useful to me during my travels.","5":"Come on, get out! You have a League to face!"}},"salut":"Hi ?","sbire_rocket":{"defeat":{"0":"Mouahaha! It's the rebirth of Team Rocket!"},"start":{"0":"Giovanni may be gone, but Team Rocket never dies!","1":"I intend to take his seat! Let's battle!"},"victory":{"0":"Looks like Team Rocket's blasting off again!"}},"sbire_rocket_tuto":{"defeat":{"0":"Come on, get out of here, little one, and come back when you have a real team!"},"start":{"0":"Hey you, what are you doing here?","1":"This is the territory of Giovanni, our master and gym leader!","2":"What? You're going to compete with him? Let me laugh!","3":"I'll show you the power of Team Rocket!"},"victory":{"0":"Hmpff! You're tougher than you look... ","1":"But it doesn't change anything! Giovanni will settle your score!","2":"Come back later when you have a real team."}},"sellerf":{"hello":"Hello! What do you want?"},"sellerm":{"hello":"Hello! Are you interested in something?"},"shop":{"confirm_one":"1 {{item}} for {{count}} ball, right?","confirm_other":"1 {{item}} for {{count}} balls, right?","nomoney":"You don't have enough Pokéballs, kid!"},"sleeping_pokemon":{"0":"A sleeping Pokémon is blocking the path.","1":"Wake it up with the Poké Flute?"},"starter":{"after":"Maybe I should have taken {{name}} ...","choose":"Choose {{name}} as starter?","chosen":"You choose {{name}} !"},"trader":{"aftertrade":"So cool, a {{name}} !","nopokemon":{"0":"Hi, do you want to trade Pokemon?","1":"If you have any Pokémon in reserve in your box, we can trade them!"},"tradeaccepted":"You exchange {{ given }} for {{ received }} !","tradepropose":"Hi, do you want to trade your {{ given }} for my {{ received }} ?","traderefused":"Ah, well, too bad."}}`),Ip={caught:"Taken: {{number}}",duree:"Game duration: {{duree}} rounds",seen:"Seen: {{number}}"},Fp={controls:"Controls",description:{0:"Pokéchess is the game prototype Curry was working on before joining Pokemon Auto Chess team. It was intended as a fangame remake of Pokemon Red/Blue as an autobattler.",1:"Although the game simulates a Gameboy to play on nostalgia, it does not respect the screen resolution and hardware constraints of the original Gameboy Color, and the game is also playable with keyboard, gamepad or mouse for convenience.",2:"Your progression is automatically saved every time you reached the overworld map.",3:"This project quickly demonstrated the limitations of the Gameboy format for a genre as complex as the autobattler, but also allowed the exploration of some ideas that were later used in Pokémon Auto Chess."},gamepad:"Gamepad",keyboard:"Keyboard",language:"Language",mouse:"Mouse",music:"Music",sfx:"Sound effects",volume:"Volume"},wp={"attaque+":"X Attack",baie_ceriz:"Cheri Berry",baie_mepo:"Leppa Berry",baie_oran:"Oran Berry",baie_sitrus:"Sitrus Berry",boule_fumee:"Smoke Ball","defense+":"X Défense",encens_fleur:"Rose Incense",filet:"Hector's net",fossile_amonita:"Helix Fossil",fossile_kabuto:"Dome Fossil",fossile_ptera:"Old Amber",gemme_ciel:"Sky Gem",gemme_draco:"Draco Gem",gemme_flamme:"Flame Gem",gemme_glace:"Ice Gem",gemme_grise:"Grey Gem",gemme_herbe:"Grass Gem",gemme_hydro:"Hydro Gem",gemme_insecte:"Bug Gem",gemme_ombre:"Shadow Gem",gemme_pixie:"Pixie Gem",gemme_poing:"Battle Gem",gemme_psy:"Psy Gem",gemme_roc:"Rock Gem",gemme_terre:"Earth Gem",gemme_toxic:"Toxic Gem",gemme_volt:"Volt Gem",grelot_coque:"Shell Bell",max_elixir:"Max Elixir",multi_exp:"Exp. Share",orbe_flamme:"Flame Orb",orbe_foudre:"Lightning Orb",orbe_toxique:"Toxic Orb",parapluie:"Sally's umbrella",pokeball:"Pokéball",pokeflute:"Poké Flute","pv+":"HP Up",repousse:"Repel",super_bonbon:"Rare Candy","vitesse+":"X Speed"},Dp={"attaque+":"+20% Attack",baie_ceriz:"Consumed on first status affliction suffered - Heals afflictions for 10 seconds",baie_mepo:"Consumed on first hit received - Gain 2 extra PP per hit received",baie_oran:"Def +30% - Consumed when HP falls below 50% the first time",baie_sitrus:"Heals 25% of max HP - Consumed when HP drops below 50% the first time",boule_fumee:"Makes the Pokémon untargetable for 3s when HP drops below 30%.","defense+":"+20% Defense",encens_fleur:"Heals 1% of the wearer's and allies' max HP on an adjacent tile every second",filet:"Collects one Pokéball for each Pokémon eliminated by its holder",fossile_amonita:"An ancient snail-shaped Pokémon fossil",fossile_kabuto:"An ancient Pokémon shell-shaped fossil",fossile_ptera:"An ancient Pokémon egg-shaped fossil",gemme_ciel:"Gives the wearer the Flying type",gemme_draco:"Gives the wearer the Dragon type",gemme_flamme:"Gives the wearer the Fire type",gemme_glace:"Gives the wearer the Ice type",gemme_grise:"Gives the wearer the Normal type",gemme_herbe:"Gives the wearer the Grass type",gemme_hydro:"Gives the wearer the Water type",gemme_insecte:"Gives the wearer the Bug type",gemme_ombre:"Gives the wearer the Ghost type",gemme_pixie:"Gives the wearer the Fairy type",gemme_poing:"Gives the wearer the Fighting type",gemme_psy:"Gives the wearer the Psychic type",gemme_roc:"Gives the wearer the Rock type",gemme_terre:"Gives the wearer the Ground type",gemme_toxic:"Gives the wearer the Poison type",gemme_volt:"Gives the wearer the Electric type",grelot_coque:"Restores 20% of damage dealt as HP",max_elixir:"Gain 4PP on each attack",multi_exp:"Increases experience gains by 30%",orbe_flamme:"Inflicts the Burn affliction on every hit received or landed",orbe_foudre:"Inflicts the Paralysis affliction on every hit received or landed",orbe_toxique:"Inflicts the Poison affliction on every hit received or landed",parapluie:"Protects the wearer from all alterations",pokeball:"The capture tool for any trainer and currency in stores",pokeflute:"Wakes up the most deeply sleeping Pokémon","pv+":"+20% HP",repousse:"Scares away wild Pokémon and brings back new ones",super_bonbon:"Gain an additional level at the end of each fight","vitesse+":"+20% Speed"},Np={change_place:"Change place",no_item:"{{ name }} does not hold an object",quit:"Quit",release_pokemon:"Release {{name}}",remove_pokemon:"Remove {{name}}",retrieve_item:"Retrieve {{item}}",see_pokemon:"See {{name}}",stock_item:"Stock {{item}}"},bp="New game",Bp="NO",Gp="Pokedex",Up={abo:"Ekans",abra:"Abra",aeromite:"Venomoth",akwakwak:"Golduck",alakazam:"Alakazam",amonistar:"Omastar",amonita:"Omanyte",aquali:"Vaporeon",arbok:"Arbok",arcanin:"Arcanine",artikodin:"Articuno",aspicot:"Weedle",boustiflor:"Weepinbell",bulbizarre:"Bulbasaur",canarticho:"Farfetch'd",caninos:"Growlithe",carabaffe:"Wartortle",carapuce:"Squirtle",chenipan:"Caterpie",chetiflor:"Bellsprout",chrysacier:"Metapod",coconfort:"Kakuna",colossinge:"Primeape",crustabri:"Cloyster",dardargnan:"Beedrill",dodrio:"Dodrio",doduo:"Doduo",dracaufeu:"Charizard",draco:"Dragonair",dracolosse:"Dragonite",ectoplasma:"Gengar",electhor:"Zapdos",electrode:"Electrode",elektek:"Electabuzz",empiflor:"Victreebel",evoli:"Eevee",excelangue:"Lickitung",fantominus:"Gastly",ferosinge:"Mankey",feunard:"Ninetales",flagadoss:"Slowbro",florizarre:"Venusaur",galopa:"Rapidash",goupix:"Vulpix",gravalanch:"Graveler",grodoudou:"Wigglytuff",grolem:"Golem",grotadmorv:"Muk",herbizarre:"Ivysaur",hypnomade:"Hypno",hypocean:"Seadra",hypotrempe:"Horsea",insecateur:"Scyther",kabuto:"Kabuto",kabutops:"Kabutops",kadabra:"Kadabra",kangourex:"Kangaskhan",kicklee:"Hitmonlee",kokiyas:"Shellder",krabboss:"Kingler",krabby:"Krabby",lamantine:"Dewgong",leveinard:"Chansey",leviator:"Gyarados",lippoutou:"Jynx",lokhlass:"Lapras",machoc:"Machop",machopeur:"Machoke",mackogneur:"Machamp",magicarpe:"Magikarp",magmar:"Magmar",magneti:"Magnemite",magneton:"Magneton",melodelfe:"Clefable",melofee:"Clefairy",metamorph:"Ditto",mew:"Mew",mewtwo:"Mewtwo",miaouss:"Meowth",mimitoss:"Venonat",minidraco:"Dratini",mrmime:"Mr. Mime",mystherbe:"Oddish",nidoking:"Nidoking",nidoqueen:"Nidoqueen",nidoranf:"Nidoran ♀",nidoranm:"Nidoran ♂",nidorina:"Nidorina",nidorino:"Nidorino",noadkoko:"Exeggutor",noeufnoeuf:"Exeggcute",nosferalto:"Golbat",nosferapti:"Zubat",onix:"Onix",ortide:"Gloom",ossatueur:"Marowak",osselait:"Cubone",otaria:"Seel",papillusion:"Butterfree",paras:"Paras",parasect:"Parasect",persian:"Persian",piafabec:"Spearow",pikachu:"Pikachu",poissirene:"Goldeen",poissoroy:"Seaking",ponyta:"Ponyta",porygon:"Porygon",psykokwak:"Psyduck",ptera:"Aerodactyl",ptitard:"Poliwag",pyroli:"Flareon",racaillou:"Geodude",rafflesia:"Vileplume",raichu:"Raichu",ramoloss:"Slowpoke",rapasdepic:"Fearow",rattata:"Rattata",rattatac:"Raticate",reptincel:"Charmeleon",rhinocorne:"Rhyhorn",rhinoferos:"Rhydon",rondoudou:"Jigglypuff",ronflex:"Snorlax",roucarnage:"Pidgeot",roucool:"Pidgey",roucoups:"Pidgeotto",sabelette:"Sandshrew",sablaireau:"Sandslash",salameche:"Charmander",saquedeneu:"Tangela",scarabrute:"Pinsir",smogo:"Koffing",smogogo:"Weezing",soporifik:"Drowzee",spectrum:"Haunter",stari:"Staryu",staross:"Starmie",sulfura:"Moltres",tadmorv:"Grimer",tartard:"Poliwrath",taupiqueur:"Diglett",tauros:"Tauros",tentacool:"Tentacool",tentacruel:"Tentacruel",tetarte:"Poliwhirl",tortank:"Blastoise",triopikeur:"Dugtrio",tygnon:"Hitmonchan",voltali:"Jolteon",voltorbe:"Voltorb"},Vp={home:"Home",ligueendroom:"Indigo League - Pantheon",oaklab:"Prof. Oak's Lab"},Yp={abri:"Protect",acide:"Acid",adaptation:"Conversion",amnesie:"Amnesia",armure:"Harden",balayage:"Low Kick",belier:"Take Down",berceuse:"Sing",blizzard:"Blizzard",bomb_beurk:"Sludge Bomb",bomb_oeuf:"Egg Bomb",brouillard:"Smokescreen",bulles_d_o:"Bubble Beam",cage_eclair:"Thunder Wave",cascade:"Waterfall",charge:"Tackle",choc_mental:"Confusion",coud_boue:"Mud-Slap",croc_de_mort:"Hyper Fang",crochet_venin:"Poison Fang",crocs_feu:"Fire Fang",cruaile:"Wing Attack",danse_flammes:"Fire Spin",danse_lames:"Swords Dance",dard_venin:"Poison Sting",deflagration:"Fire Blast",destruction:"Self-Destruct",detritus:"Sludge",devoreve:"Dream Eater",double_pied:"Double Kick",dracocharge:"Dragon Rush",dracorage:"Dragon Rage",e_coque:"Soft-Boiled",eclair:"Thunder Shock",eclat_glace:"Ice Shard",empal_korne:"Horn Drill",encore:"Encore",etincelle:"Spark",evolution:"Evolution",fatal_foudre:"Thunder",flammeche:"Ember",fouet_lianes:"Vine Whip",furie:"Fury Attack",griffe:"Scratch",grobisou:"Lovely Kiss",guillotine:"Guillotine",hate:"Agility",hydrocanon:"Hydro Pump",hypnose:"Hypnosis",jackpot:"Pay Day",jet_de_sable:"Sand Attack",jet_pierres:"Rock Throw",koud_korne:"Horn Attack",lance_flammes:"Flamethrower",lance_soleil:"Solar Beam",laser_glace:"Ice Beam",lechouille:"Lick",ligotage:"Wrap",massdos:"Bone Club",mawashi_geri:"Rolling Kick",meteores:"Swift",metronome:"Metronome",morphing:"Transform",morsure:"Bite",nitrocharge:"Flame Charge",ouragan:"Twister",paraspore:"Stun Spore",picpic:"Peck",pilonnage:"Barrage",pince_masse:"Crabhammer",piqure:"Bug Bite",pistolet_a_o:"Water Gun",poing_karate:"Karate Chop",poudre_dodo:"Sleep Powder",poudre_toxik:"Poison Powder",poudreuse:"Powder Snow",pouvoir_antique:"Ancient Power",pouvoir_lunaire:"Moonblast",provoc:"Taunt",psyko:"Psychic",rafale_psy:"Psybeam",repos:"Rest",rugissement:"Growl",secretion:"String Shot",surf:"Surf",teleport:"Teleport",tonnerre:"Thunderbolt",torgnoles:"Double Slap",trempette:"Splash",triplattaque:"Tri Attack",tunnel:"Dig",ultimapoing:"Mega Punch",ultralaser:"Hyper Beam",ultrason:"Supersonic",vampirisme:"Leech Life",vive_attaque:"Quick Attack",vol_vie:"Absorb"},zp={abri:"Makes the user invulnerable for a short time.",acide:"Gastric juice jet greatly reducing the targets defense",adaptation:"Temporarily changes its type to that of the attacks received.",amnesie:"Heals all current ailments of the caster",armure:"Increases the user's defense until the end of the fight - Stackable",balayage:"Wide attack that can hit up to 3 opponents in front",belier:"A violent charge that also injures the caster",berceuse:"Puts opponents around the user to sleep",blizzard:"Freezes all enemies and rains devastating hailstones",bomb_beurk:"Toxic bomb poisoning the area where it falls",bomb_oeuf:"Throws an explosive egg that deals damage in a wide area",brouillard:"Reduces the accuracy of opponents around the caster",cage_eclair:"Paralyzes all opponents around the user",cascade:"Drops a torrent of water that pushes the opponent back.",coud_boue:"Reduces target accuracy",croc_de_mort:"Powerful bite that scares the target for 3 seconds",crocs_feu:"A bite inflicting severe burns",danse_flammes:"Inflicts burns on all opponents around the user",danse_lames:"Circular attack dealing damage to all enemies around",deflagration:"Ignites the entire field and triggers eruptions on 8 random tiles",destruction:"Self-destruction pulverizing everything around",devoreve:"Terrifies the opponent with nightmare visions",dracorage:"Summons a storm that deals true damage in the area",e_coque:"Releases a magic egg that heals your entire team",eclair:"Lightning strikes a randomly selected opponent",empal_korne:"Impales the target with a stalagmite that rises from the ground",encore:"Reproduces the last special attack observed on the field",evolution:"Temporarily evolves into Flareon, Jolteon or Vaporeon depending on the target's type",fatal_foudre:"Causes lightning to strike 3 enemies and paralyzes all others",furie:"Increases the user's attack until the end of the battle - Stackable",grobisou:"An icy kiss that temporarily freezes the target",guillotine:"Deadly blow executing the target if less than 30% of their max HP",hate:"Increases the caster's speed until the end of the fight - Stackable",hydrocanon:"Geyser propelling the opponent into the air",hypnose:"Puts the target to deep sleep",jackpot:"Has a 50% chance of getting you a Pokéball",jet_de_sable:"Blinds the enemy and reduces their accuracy by 50% for 8 seconds",lance_flammes:"Flame jet inflicting severe burns on the target",lance_soleil:"Absorbs solar energy then releases it in a powerful orb",laser_glace:"Freezes opponents for a short time on a straight line",ligotage:"Prevents the target from moving and deals damage over time",mawashi_geri:"A roundhouse kick that also hits the opponent behind the caster",meteores:"A shower of stars that hits every time",metronome:"Triggers a random ability from all existing ones",morphing:"Transforms into a copy of the target Pokémon - Keeps the same level and item",nitrocharge:"A violent flaming charge that also injures the caster",ouragan:"A tornado lifting all opponents in its path",paraspore:"Cloud of spores that paralyzes all enemies around the user",poudre_dodo:"Projects a powder that puts all nearby opponents to sleep",poudre_toxik:"Toxins poisoning all opponents around the caster",pouvoir_antique:"A prehistoric attack that increases all of the user's stats",pouvoir_lunaire:"Taunts all opponents within a 2-square radius",provoc:"Taunts all opponents within a 2-square radius",psyko:"Confuses the entire enemy team for 4 seconds before dealing heavy Psy damage",rafale_psy:"Psy energy wave passing through opponents",repos:"Falls asleep and regains a large portion of his HP while asleep",rugissement:"Temporarily reduces the attack of all nearby opponents",secretion:"Creates a sticky trap that slows the opponent's speed",surf:"Creates a giant wave that sweeps away everything in its path",teleport:"Teleports the user to a random tile on the board",tonnerre:"Deals heavy electrical damage around the user",trempette:"But nothing happened.",tunnel:"Dig a tunnel to a free tile on the board, attacking from the ground as you go",ultimapoing:"A devastating uppercut",ultralaser:"A powerful laser that pulverizes everything in a line",ultrason:"Sound wave that confuses affected Pokémon"},Wp={agatha:"Agatha",aldo:"Bruno",assistant_tuto:"Prof Oak Assistant",auguste:"Blaine",major_bob:"Lt. Surge",dresseur_argenta:"Roche the geologist",dresseur_azuria:"Anya the Swimmer",dresseur_camp_nomade:"Nancy the scout",dresseur_carmin:"Elton the Rocker",dresseur_cave_taupiqueur:"Joe the Burglar",dresseur_celadopole:"Valentine the City Girl",dresseur_centrale:"George the Mechanic",dresseur_champs_verdoyants:"Isabella the Florist",dresseur_col_de_montagne:"Bird Keeper Bret",dresseur_colline_royale:"Norbert the Dragon Fan",dresseur_cramoisile:"Isaac the Scientist",dresseur_dojo:"Koichi the Karate Master",dresseur_falaises:"Bob the Mountaineer",dresseur_foret_jade:"Calvin the Kid",dresseur_grotte_azuree:"Ugo the wise old man",dresseur_iles_ecume:"Jerry the Fisherman",dresseur_lavanville:"Henry the Gentleman",dresseur_mont_braise:"Duo Ron & Mya the Daredevils",dresseur_mont_selenite:"Arthur the Paleontologist",dresseur_oceane:"Firmin the Sailor",dresseur_pension:"Gale of the Pension",dresseur_piste_cyclable:"Karl the Thug",dresseur_safrania:"Polo the Physiotherapist",dresseur_tour_pokemon:"Gwen the Exorcist",erika:"Erika",giovanni:"Giovanni",hector:"Bugsy",koga:"Koga",morgane:"Sabrina",mr_psy:"Mister Psychic",olga:"Lorelei",ondine:"Misty",peter:"Lance",pierre:"Brock",rival:"Blue",sally:"Sally",sbire_rocket:"Team Rocket Grunt"},Hp={COMBAT:"Fighting",DRAGON:"Dragon",EAU:"Water",ELECTRIQUE:"Electric",FEE:"Fairy",FEU:"Fire",GLACE:"Ice",INSECTE:"Bug",NORMAL:"Normal",PLANTE:"Grass",POISON:"Poison",PSY:"Psychic",ROCHE:"Rock",SOL:"Ground",SPECTRE:"Ghost",VOL:"Flying"},Xp="You beated {{trainer}} !",kp="Your Pokémon gain {{xp}}xp",Kp="YES",Jp={alliance_desc:Cp,continue:"Continue",defeat:Pp,descriptions:Rp,destination:Lp,destination_subtext:Op,dialog:Mp,gameover:Ip,home:Fp,item:wp,item_desc:Dp,menu:Np,new_game:bp,no:Bp,pokedex:Gp,pokemon:Up,room:Vp,skill:Yp,skill_desc:zp,trainer:Wp,type:Hp,victory:Xp,victory_xp:kp,yes:Kp},jp={COMBAT:"Les Pokémon Combat ne connaissent pas la peur et ont leurs stats augmentées avec le nombre d'adversaires les ciblant.",COMBAT2:"+5% ATK et DEF par adversaire",COMBAT4:"+10% ATK et DEF par adversaire",COMBAT6:"+20% ATK et DEF par adversaire",DRAGON:"Quand un Pokémon Dragon est le dernier Pokémon de l'équipe sur le plateau, il gagne de gros bonus à toutes ses statistiques.",DRAGON1:"+20% aux stats du dernier dragon",DRAGON2:"+40% aux stats du dernier dragon",DRAGON3:"+60% aux stats du dernier dragon",EAU:"Les Pokémon Eau sont insensibles aux Brûlures. Les compétences Eau peuvent repousser la cible d'une ou plusieurs cases.",EAU2:"Repousse d'une case",EAU4:"Repousse de 2 cases",EAU6:"Repousse de 3 cases",ELEC2:"+10% VIT ; 2 dégats par coup reçu",ELEC4:"+20% VIT ; 4 dégats par coup reçu",ELEC6:"+30% VIT ; 6 dégats par coup reçu",ELECTRIQUE:"Les Pokémon Electrique gagnent en Vitesse et infligent des dégats électriques à chaque coup reçu au contact.",FEE:"Les Pokémon Fée font gagner progressivement des PP à toute votre équipe.",FEE1:"+1 PP par seconde",FEE2:"+2 PP par seconde",FEE3:"+3 PP par seconde",FEU:"Les Pokémon Feu sont insensibles au Gel. Leurs attaques appliquent une brûlure qui inflige des dégâts sur la durée et réduit de 50% l'efficacité des soins.",FEU2:"2 brûlures par attaque",FEU4:"3 brûlures par attaque",FEU6:"4 brûlures par attaque",GLACE:"Les Pokémon Glace sont entourés d'une aura de gel qui ralentit les adversaires des cases adjacentes.",GLACE2:"-20% vitesse",GLACE3:"-30% vitesse",GLACE4:"-40% vitesse",INSECTE:"Les Pokémon Insecte grandissent et évoluent plus rapidement. Ils gagnent un bonus d'expérience à chaque combat.",INSECTE2:"+20% aux gains d'expérience",INSECTE4:"+40% aux gains d'expérience",INSECTE6:"+60% aux gains d'expérience",NORMAL:"Les Pokémon normaux réduisent les pénalités de dégâts reçus liés aux faiblesses de types.",NORMAL2:"-30% de dégâts de faiblesse reçus",NORMAL4:"-60% de dégâts de faiblesse reçus",NORMAL6:"-90% de dégâts de faiblesse reçus",PLANTE:"Les Pokémon Plante ne peuvent pas être repoussés par les compétences adverses et se regénèrent naturellement.",PLANTE2:"Regen 1% des HP max par seconde",PLANTE4:"Regen 2% des HP max par seconde",PLANTE6:"Regen 3% des HP max par seconde",POISON:"Les Pokémon Poison empoisonnent leurs cibles, infligeant des dégâts sur la durée proportionnels à leurs PV max.",POISON2:"Dégâts de poison infligés +40%",POISON4:"Dégâts de poison infligés +80%",POISON6:"Dégâts de poison infligés +120%",PSY:"Les Pokémon Psy sont insensibles à la Confusion, et leurs attaques font perdre des PP à leur cible.",PSY2:"La cible perd 2 PP par attaque",PSY4:"La cible perd 4 PP par attaque",PSY6:"La cible perd 6 PP par attaque",ROCHE:"Les Pokémon Roche réduisent les dégâts reçus liés aux altérations (poison, brûlure).",ROCHE2:"-30% dégats d'altération",ROCHE4:"-60% dégats d'altération",ROCHE6:"-90% dégats d'altération",SOL:"Les Pokémon Sol creusent un tunnel pour se protéger temporairement lorsqu'ils tombent sous un certain seuil de PV.",SOL2:"Tunnel à 20% des PV",SOL4:"Tunnel à 20% et 50% des PV",SOL6:"Tunnel à 20%, 50% et 80% des PV",SPECTRE:"Les Pokémon Spectre ne peuvent pas être endormis et leurs attaques effrayent leur cible, réduisant leur attaque.",SPECTRE2:"2 stacks de Peur par attaque",SPECTRE4:"4 stacks de Peur par attaque",SPECTRE6:"6 stacks de Peur par attaque",VOL:"Les Pokémon Vol s'envolent à l'opposé du plateau au début du combat, et peuvent esquiver les attaques reçues.",VOL2:"20% de chances d'esquive",VOL4:"40% de chances d'esquive",VOL6:"60% de chances d'esquive"},Zp={0:"Votre équipe est KO !",1:"Vous courrez jusqu'au centre Pokémon le plus proche."},$p={bed:"Ce n'est pas le moment d'aller dormir !",boat:"C'est une maquette de l'Océane, le célèbre bateau de croisière.",book:{0:"C'est mon cahier de cours d'études des Pokémon",1:"Les Pokémon normaux sont polyvalents, mais se font battre par les spécialistes du Combat.",2:"Les Pokémon de type Roche n'aiment pas l'eau.",3:"Les Pokémon aquatiques craignent l'électricité.",4:"Les Pokémon de type Feu sont impuissants face à l'eau.",5:"Le feu est mortel pour les pokémon Plante.",6:"Les Pokémon Vol craignent la foudre.",7:"Les Pokémon électriques sont neutralisés par la Terre.",8:"Les Pokémon Glace sont brisés par la Roche.",9:"Les Pokémon Combat ont une faiblesse: les attaques Psy.",10:"Les Pokémon Sol résistent bien au Poison.",11:"Les Pokémon Plante gagnent contre les Pokémon Sol au long terme.",12:"Les Pokémon Psy ont étrangement peur des Insectes.",13:"Les Pokémon Insecte se font picorer par les oiseaux.",14:"Seul un Spectre peut vraiment faire face à un autre Spectre.",15:"Les Dragons peuvent être piégés par la Glace."},book_insect:{0:"C'est un cahier de notes sur les évolutions des Pokémon.",1:"Il est écrit que {{name}} évolue au niveau {{level}}",2:"Intéressant. Je devrais garder ça en mémoire !"},frigo:{0:"MAM: Tu as encore faim ? Un vrai estomac sur pattes !"},map:"C'est la carte de la région de Kanto.",pc_end:{0:"Enregistrer l'équipe dans le livre des records ?",1:"Enregistrement...",2:"Félicitations ! Vous et vos Pokémon êtes célèbres !",3:"... Fin de session."},pc_record:{0:"Bzzz... Ouverture du livre des records...",1:"Aucune donnée disponible.",2:`Dernier maître de la ligue recensé: +{{nbSeen}} Pokémon seen`,4:"Favorite team:",5:"Bzzz.. The screen went off..."},tv:{0:"The TV broadcasts the news of the day...",1:"BREAKING NEWS!",2:"A Zapdos was spotted at the power plant!",3:"An Articuno has been seen in the Foam Islands!",4:"Mount Ember is said to be the lair of a Moltres!",5:"Our reporters are trying to find out more."}},Lp={ARGENTA:"Pewter City",ARGENTA_ARENA:"Pewter City Arena",ARGENTA_SHOP:"Pewter City Shop",AZURIA:"Cerulean City",AZURIA_ARENA:"Cerulean City Arena",AZURIA_SHOP:"Cerulean City Shop",BOURG_PALETTE:"Pallet Town",BOURG_PALETTE_ROAD:"Pallet Town Road",CAMP_NOMADE:"Nomad Camp",CAMP_NOMADE_ARENA:"Wild Arena",CARMIN:"Vermilion City",CARMIN_ARENA:"Vermilion City Arena",CARMIN_SHOP:"Vermilion City Shop",CAVE_TAUPIQUEUR:"Diglett's Cave",CAVE_TAUPIQUEUR_EAST:"Diglett's Cave (East entrance)",CAVE_TAUPIQUEUR_WEST:"Diglett's Cave (West entrance)",CELADOPOLE:"Celadon City",CELADOPOLE_ARENA:"Celadon City Arena",CELADOPOLE_SHOP:"Celadon City Shop",CENTRALE:"Power plant",CHAMPS_VERDOYANTS:"Green fields",CHEMIN_COLLINE:"Path to the Hill",COLLINE_ROYALE:"Dragon Hill",COL_MONTAGNE:"Mountain Pass",CRAMOISILE:"Cinnabar Island",CRAMOISILE_ARENA:"Cinnabar Island Arena",CRAMOISILE_SHOP:"Cinnabar Island Shop",DOJO:"Dojo",FALAISES:"Cliffs",FORET_JADE:"Viridian Forest",GROTTE_AZUREE:"Cerulean Cave",HOME:"At home",ILES_ECUME:"Seafoam Islands",JADIELLE:"Viridian City",JADIELLE_ARENA:"Viridian City Arena",JADIELLE_SHOP:"Viridian City Shop",LABO_CHEN:"Prof. Oak Laboratory",LAVANVILLE:"Lavender Town",LAVANVILLE_ARENA:"Lavender Town Arena",LAVANVILLE_SHOP:"Lavender Town Shop",LIGUE:"Indigo League",LIGUE_FLOOR1:"Indigo League - 1st floor",LIGUE_FLOOR2:"Indigo League - 2nd floor",LIGUE_FLOOR3:"Indigo League - 3rd floor",LIGUE_FLOOR4:"Indigo League - 4th floor",LIGUE_FLOOR5:"Indigo League - Top floor",LIGUE_HALL:"Indigo League Hall",MAISON_PSY:"Mr. Psychic's House",MONT_BRAISE:"Mt. Ember",MONT_SELENITE:"Mt. Moon",OCEANE:"S.S. Anne",OCEANE_DECK:"On the S.S. Anne",PARC_SAFARI:"Safari Zone",PARMANIE:"Fuchsia City",PARMANIE_ARENA:"Fuchsia City Arena",PARMANIE_SHOP:"Fuchsia City Shop",PENSION:"Pokémon Day Care",PISTE_CYCLABLE:"Cycling Road",ROUTE_VICTOIRE:"Victory Road",ROUTE_VICTOIRE_ENTREE:"Victory Road (Entrance)",ROUTE_VICTOIRE_SORTIE:"Victory Road (Exit)",SAFRANIA:"Saffron City",SAFRANIA_ARENA:"Saffron City Arena",SAFRANIA_SHOP:"Saffron City Shop",TOUR_POKEMON:"Pokémon Tower"},Op={ARENA:"Arena",BOURG_PALETTE:"Mom",CAPTURE:"Capture",CONSEIL_DES_4:"Elite Four",FIGHT:"Fight",SAFARI:"Catch'em all",fast_travel:"Fast travel",fast_travel_AZURIA:"Fast travel to Cerulean City",fast_travel_CARMIN:"Fast travel to Vermilion City",fast_travel_CRAMOISILE:"Fast travel to Cinnabar Island"},Mp=JSON.parse(`{"aftercapture":{"0":"The wild {{name}} shares his experience before being released.","1":"Your {{name}} gains {{xp}} XP"},"agatha":{"defeat":{"0":"You have talent, but it's not enough!"},"start":{"0":"Gnnn... Hello my little one.","1":"I'm Agatha from the Elite Four!","2":"Oak has high hopes for you, son!","3":"Do you know that this old thing was once a handsome boy?","4":"Well... A long time ago!","5":"He just wants to show off his Pokedex!","6":"But that's stupid! Pokémon are for fighting!","7":"I'll show you how great Trainers fight!"},"victory":{"0":"Mmmm... I see why Oak likes you so much!","1":"My shadows have lost. You can pass."}},"aldo":{"defeat":{"0":"Bang! In the teeth!"},"start":{"0":"My name is Bruno from the Elite Four!","1":"My passion for me and my Pokémon is bodybuilding!","2":"To show off on the beach or to box the midgets,","3":"nothing like a dream body!","4":"Your team... I'm going to make yogurt out of it! Let's eat!"},"victory":{"0":"Well done, kiddo! The next one is waiting for you!"}},"assistant1":{"0":"I put the square root, I retain five...","1":"Hmm? What's that for?","q1":"Who are you ?","q2":"Where am I?","q3":"What are you doing ?","r1":"I assist PROF. OAK. So I am his... ASSISTANT!","r2":"You are at the Pokémon Lab in Pallet Town.","r3":"Here we study the different species of Pokémon from Kanto.","r4":"I'm gathering the latest data collected by trainers like you.","r5":"By studying your battles, we collect information about Pokémon.","r6":"This information is then grouped into the Pokédex.","r7":"This is useful for our research, but also for your combat strategies."},"assistant2":{"0":"This machine keeps track of the Pokémon teams that have distinguished themselves","1":"by defeating the Pokémon League Elite Four.","2":"Analyzing the best teams allows us to learn a lot!","3":"If you manage to beat the league, we will happily add your team."},"assistant_tuto":{"defeat":{"0":"Next time, use my Pokéballs!","1":"You will significantly increase your chances of victory!"},"start":{"0":"Wait a minute! If you want to build a team, you need Pokéballs!","1":"Here are 5 Pokéballs to catch your first Pokémon.","2":"Do you know how to use it?","no0":"You can capture a wild Pokémon instead of battling it.","no1":"The more powerful the Pokémon, the more Pokéballs you will need to capture it.","no2":"A captured Pokémon joins your box, which can contain up to 8 Pokémon.","no3":"You can then move them from your box to the field for them to fight.","no4":"Go ahead, try to capture these wild Pokémon!","yes0":"Alright, then catch these wild Pokémon. Or knock them out, whatever you want!"},"step2":{"0":"Your Pokémon become stronger by gaining experience after a battle.","1":"But there is another way to increase the experience of a Pokémon.","2":"All you need to do is capture a wild Pokémon of the same species.","3":"They will share his experience with your Pokémon before being released.","4":"Here, try it right now. Try to capture my {{name}} ."},"step3":{"0":"The higher the level of the captured Pokémon, the more experience they will give.","1":"Remember, this only works if the Pokémon are the same species!","2":"Well, you know everything. Have a good trip and good luck!"},"victory":{"0":"Well, you seem to be doing great!"}},"auguste":{"defeat":{"0":"Now you know what I'm made of!"},"start":{"0":"Greetings. My name is... Blaine!","1":"I am the Champion of the Cinnabar Island!","2":"My fiery Pokémon will burn you to ashes!","3":"Haha! It's going to be very hot soon!"},"victory":{"0":"Phew! I got vaporized!","1":"You have earned the VOLCANO BADGE!","2":"The more badges you have, the tougher the fights!","3":"This is the price to pay to climb up the League!"}},"bob":{"defeat":{"0":"Ha! Your defeat was lightning fast!","1":"A word of advice, kid! Electricity is very powerful!","2":"But it is powerless against Ground Pokémon !"},"start":{"0":"Hey, kid! What are you doing here?","1":"You wouldn't last long in war!","2":"I'll tell you, my Electric Pokémon saved my life!","3":"Yeah! They paralyzed my enemies with their lightning!","4":"A real butchery! The same thing will happen to you!","5":"Count your teeth! You're going to suffer!"},"victory":{"0":"Whoo! Watch out! You're tough, little guy!","1":"Alright, take the LIGHTNING BADGE!","2":"You'll need it to enter the Pokémon League."}},"chen":{"0":"Hello Red! So today is the big day!","1":"The day of your initiatory journey as a Pokémon trainer!","2":"You will travel throughout Kanto, capturing Pokémon,","3":"build a team and face the 8 gym leaders.","4":"Maybe even take on the Pokemon League if you're up for it!","5":"But first, you need to adopt your first Pokémon.","6":"We caught three of them in the pokeballs behind me.","7":"There's one for you. Come on! Pick one!","8":"Go ahead, you can take one of the pokeballs on the table behind me.","9":"{{pokemon}} ? Excellent choice!","10":"Your Pokémon will protect you from wild Pokémon.","11":"But alone he will be no match for the gym leaders!","12":"You will need to capture wild Pokémon to form a team.","13":"Each species of Pokémon has its strengths and weaknesses. Remember this:","14":"The key to victory is a balanced and well-positioned team.","15":"You should go to a nearby town to catch more Pokémon.","16":"Have a good trip and good luck!","17":"Go ahead, save your team on the computer for posterity!","18":"Hum-hum! Congratulations!","19":"This floor is reserved for Pokémon trainers celebrities!","20":"The Champions League are consecrated here!","21":"Their Pokémon are registered as Celebrities!","22":"Your journey to victory was long! Well done again."},"dresseur_argenta":{"defeat":{"0":"You sink like a stone !"},"start":{"0":"You defeated Brock, but I am as solid as a rock!"},"victory":{"0":"I think I have a pebble in my shoe..."}},"dresseur_azuria":{"defeat":{"0":"Keep your head above water!"},"start":{"0":"You won against Misty, but that's water under the bridge!","1":"I'm fresher than ever! Expect a tidal wave!"},"victory":{"0":"Man, I'm washed up!"}},"dresseur_camp_nomade":{"defeat":{"0":"Your Pokémon dropped like flies!"},"start":{"0":"Wait a minute butterfly!","1":"You look like you have ants in your pants.","2":"Let me show you my insect collection!"},"victory":{"0":"Ouch! I got bitten by a mosquito!"}},"dresseur_carmin":{"defeat":{"0":"This is rock'n roll baby!!!"},"start":{"0":"Hey, did you come to my concert? The atmosphere is electric here!","1":"What do you mean, no? You've never listened to my CD?!","2":"I'm not gonna let you ruin the party!"},"victory":{"0":"That's it, you've ruined the mood!"}},"dresseur_cave_taupiqueur":{"defeat":{"0":"That'll teach you to come snooping around in dark corners!"},"start":{"0":"Huh? No, it's not me!","1":"I have an alibi! I was at the movies!"},"victory":{"0":"No need to get upset! Here, take these Pokéballs!","1":"And... they say you've never seen me, okay?"}},"dresseur_celadopole":{"defeat":{"0":"Finally I don't really want us to hang out together anymore, haha!"},"start":{"0":"I've seen you around town before, right?","1":"I can get you into the fanciest trainer clubs here!","2":"But first you have to prove you deserve it! Attack!"},"victory":{"0":"But uh! You were supposed to let me win!","1":"Countryside people have no manners!"}},"dresseur_centrale":{"defeat":{"0":"It was a lightning victory!"},"start":{"0":"Hey, did you blacked out ?","1":"This is not a place for children!","2":"My Electric Pokémon team will blast you!"},"victory":{"0":"I'm shocked! You made me blow a fuse!"}},"dresseur_champs_verdoyants":{"defeat":{"0":"I'm going to do you a favor and give you some advice:","1":"Even the most beautiful roses need thorns.","2":"You need a good attack if you want to win."},"start":{"0":"Hey? Who are you little flower?","1":"This is my garden! I'll send you pushing up daisies!"},"victory":{"0":"Looks like my team is in need of some pruning!","1":"Well played, you're a real gardener!"}},"dresseur_col_de_montagne":{"defeat":{"0":"Another feather in my cap!"},"start":{"0":"Hey kid, are you lost! Well, I rule the roost here!","1":"A little birdie told me you’re about to lose this fight","2":"Let me show you how FLY my bird pokemon are!"},"victory":{"0":"Ouch, I'm dead as a dodo ! Bye, flying away!"}},"dresseur_colline_royale":{"defeat":{"0":"My dragons are so strong! so terrifying!","1":"so powerful! so... ah, he's gone."},"start":{"0":"Are you looking for Dragon Pokémon?","1":"Me too! Me too!","2":"They are so big! so beautiful! so majestic!","3":"They're mine! Do you hear me? Mine alone!"},"victory":{"0":"The dragon's ancestral force has abandoned me!"}},"dresseur_cramoisile":{"defeat":{"0":"Eureka!"},"start":{"0":"Ah, a new subject for experiment!","1":"Let me show you the fruit of my research..."},"victory":{"0":"My calculations are wrong!"}},"dresseur_dojo":{"defeat":{"0":"Your training is not enough yet! Ayaaaaa!"},"start":{"0":"Little weakling! I am the GRAND MASTER of KARATE!","1":"Are you provoking me? Do you want to fight?","2":"Are you looking for close combat? HAHAHA! Ayaaaaa!"},"victory":{"0":"STOP! You beat me! I'm ashamed!","1":"Okay, you win! You fought tooth and nail!"}},"dresseur_falaises":{"defeat":{"0":"So, you still have to learn the ropes!"},"start":{"0":"Hey little guy! I'm the greatest climber in Kanto!","1":"And I fully intend to rise to the top!","2":"Hang on tight cuz it's gonna get bumpy!"},"victory":{"0":"That battle rocked! I can see you climb the league!"}},"dresseur_foret_jade":{"defeat":{"0":"Yeeeesss I won for the first time!"},"start":{"0":"Are you a Pokemon trainer? Me too!","1":"I caught a lot of bug Pokémon!","2":"Now we have to have a fight, that's the rule!"},"victory":{"0":"I'll tell my mother!"}},"dresseur_grotte_azuree":{"defeat":{"0":"Hmm... Your team got cold feet.","1":"What are you still doing here? Are you waiting for the thaw?"},"start":{"0":"Hmmm... Strange place for a meeting.","1":"Let me break the ice. On guard!"},"victory":{"0":"My defense melted like snow in the sun!"}},"dresseur_iles_ecume":{"defeat":{"0":"I’ve got you now! You’re hooked!"},"start":{"0":"Don't make any noise, you'll scare away the fish!"},"victory":{"0":"Aw, man! My line snapped!"}},"dresseur_lavanville":{"defeat":{"0":"Go and rest. Continue to believe in your dreams!"},"start":{"0":"Sally has told me a lot about you.","1":"Will you do me the honor of a fight?"},"victory":{"0":"It was a magical fight, I couldn't have dreamed of anything better."}},"dresseur_mont_braise":{"defeat":{"0":"You see what it's like to be caught in the crossfire!"},"start":{"0":"Well what is a young boy doing in a place like this?","1":"You're in hot water, kid!","2":"Hey Ron, how about we give him a baptism by fire?"},"victory":{"0":"Ceasefire! Come on Ron, let's go!"}},"dresseur_mont_selenite":{"defeat":{"0":"You won't live long here, you'd better leave."},"start":{"0":"I'm looking for fossils, have you seen any?"},"victory":{"0":"It seems I'm the fossil..."}},"dresseur_oceane":{"defeat":{"0":"Loser has to walk the plank!","1":"Ha ha, I'm just kidding!"},"start":{"0":"Ahoy, a challenger ahead!","1":"The crossing is going to be long...","2":"Let's have a fight to pass the time!","3":"Ready? Drop the anchors, it's time to battle!"},"victory":{"0":"I'll just get back to setting the sails for our next destination..."}},"dresseur_parmanie":{"defeat":{"0":"To protect the world from devastation...\`, \`To unite all peoples within our nation..."},"start":{"0":"Get out you dirty brat!","1":"Team Rocket is conducting covert operations here!"},"victory":{"0":"Team Rocket is blasting off again!"}},"dresseur_pension":{"bye":{"0":"I'll take care of your Pokémon while you're away!","1":"Come back whenever you want!"},"start":{"0":"Hey, it's you! You want us to train some of your Pokémon?","1":"Ah, there you are again! Your Pokémon have grown up a lot, look!","2":"Welcome to the Pokémon Day Care!","3":"Here we take care of Pokémon when their owners have to go away.","4":"You can lend us some of your Pokémon if you want.","5":"There are also Pokémon that are just looking to be adopted!","6":"Their type is ordinary so they don't interest other trainers..."}},"dresseur_piste_cyclable":{"defeat":{"0":"You were just a bump in the road. See you loser!"},"start":{"0":"Come on kid, show me what you got! I'm gonna roll you over!","1":"Don't try to run away! Check out my bike!","2":"You won't get far with your little bicycle!"},"victory":{"0":"Raaah you scratched the bodywork! Quick, to the garage!"}},"dresseur_safrania":{"defeat":{"0":"Brute force is no match for the power of intellect!"},"start":{"0":"You dare to come back here? Have you lost your mind?","1":"We Psychic fight with our mental !","2":"My power will make your head spin!"},"victory":{"0":"You gave me a migraine!"}},"dresseur_tour_pokemon":{"defeat":{"0":"Did it...? Did it work?","1":"Demons don't usually take hits..."},"start":{"0":"Back off, demon!!!"},"victory":{"0":"AaAaaaAaaah!!! Run for your lives!!!"}},"erika":{"defeat":{"0":"Losing always hurts a little but...","1":"Fighting a good opponent is stimulating... ","2":"Come on, don't take root here!"},"start":{"0":"Hello and welcome. The weather is nice, isn't it?","1":"I love life. I love flowers and songs. It's cute, isn't it?","2":"I'm ERIKA, the Champion of the Celadon Arena.","3":"Flower arrangement is my specialty.","4":"My Pokémon are grass type.","5":"It was very cold yesterday, so I put on a sweater.","6":"Huh? You want to fight? Well... Say it, then!","7":"You know what? You're gonna lose!"},"victory":{"0":"Oh! I lost? Well done. It's deserved.","1":"I entrust you with the PRISM BADGE.","2":"Each badge you earn makes you face stronger Pokémon.","3":"Did you notice?"}},"evolve":"{{old}} evolves into {{new}} !","exitlab":{"0":"Professor Oak promised to give me my first Pokémon today.","1":"I don't plan on leaving here without him!"},"find":"find","giovanni":{"defeat":{"0":"You raise your Pokémon too carefully.","1":"A kid like you can't understand my plans!"},"start":{"0":"I have to say I'm surprised you made it this far!","1":"Here you are in my lair! I plan to reform Team Rocket here!","2":"You dare to challenge me, the great Giovanni? You're going to suffer!"},"victory":{"0":"Ah! Now that's what I call a fight! You won!","1":"As a reward, here is the EARTH BADGE!","2":"Once you have obtained all 8 badges, you can compete in the Pokémon League.","3":"You can access it via Victory Road west of here.","4":"I'm not worthy of being the leader of Team Rocket!","5":"So his existence ends with my defeat!","6":"I'm going to retreat, far away, as a hermit, to study Pokémon!","7":"One day our paths will cross again! Goodbye!"}},"guide":{"argenta":{"0":"The mountain that peaks above Pewter City is Mount Moon.","1":"This is one of the oldest regions in Kanto!","2":"It is said that many fossils of extinct Pokémon can be found there.","3":"Imagine if we could bring them back to life..."},"azuria":{"0":"This boat, there, is the S.S. Anne!","1":"What a beauty, huh?","2":"It goes on a permanent cruise between Cerulean, Vermillion and Cinnabar Island.","3":"If you want to get in at the right time, you should memorize this roadmap !"},"carmin":{"0":"I took the shortcut through Diglett's cave to get here faster.","1":"But I still missed the boat departure, so I'm waiting here..."},"celadopole":{"0":"The Dragon Hill overlooking Celadon is a legendary place.","1":"It is said that you can come across Dragon Pokémon there!","2":"But the path is blocked by a huge sleeping Pokémon...","3":"If only we could find a way to wake him up..."},"cramoisile":{"0":"I work at Dr. Fuji's Pokémon Research Lab.","1":"I study rare Pokémon fossils.","2":"What? You found a fossil?","3":"Show it to me, come on show it!","4":"Amazing! It's in perfect condition!","5":"Maybe I could even... bring him back to life!","6":"What do you say? Can I take it?","7":"Excellent! I'll be back soon!","8":"Amazing !","9":"It's a {{name}} ! I thought they were gone!","10":"Hmm? What?","11":"Ah, yes, I guess it's yours...","12":"You receive a {{ name }} brought back to life!\`,","13":"Come back to me if you find any more specimens!","14":"But... but... it's for science!","15":"I built a Pokemon Fossil Resurrection Machine!","16":"But I don't have any specimens of good enough quality yet."},"jadielle":{"0":"I wanted to go to the Victory Road to the west, but they wouldn't let me pass...","1":"Only those with all eight Arena Badges can access the Indigo League.","2":"It's not fair! I want to go see the Elite Four!"},"lavanville":{"0":"Lavender Town is a rather quiet town, stuck between the mountains...","1":"But there are some places of interest, like the Pokémon Tower or the Power Plant."},"ligue":{"0":"Ah, so you want information on the League champions?","1":"To claim the title of Pokémon League Master,","2":"You will have to face the Elite Four one after the other.","3":"First you will face Lorelei, the Ice Queen!","4":"Get rid of her quickly before your team is turned into ice cubes.","5":"Next comes Bruno, a specialist in combat and brute force.","6":"His Pokémon are tough, you'll have to be cunning to defeat him!","7":"Third, the terrifying Agatha and her Ghost Pokémon!","8":"They confuse your team, so refine your placement.","9":"Finally you will face Lance, master of the Dragons.","10":"Dragons are very tenacious. You'll have to give it your all!","11":"Well, I don't know what's next. I could never go any further!","12":"Ah, I thought that... no, never mind."},"parmanie":{"0":"The Safari Zone is the big attraction of Fuschia City.","1":"It attracts lots of Pokémon trainers from all over Kanto!","2":"There is a wide variety of Pokémon of all types.","3":"But fighting is forbidden there to preserve their tranquility."},"safrania":{"0":"I left my Pokemon at the Day Care in the north for a few days.","1":"After that, I found him in great shape, stronger than ever!","2":"The breeder at the Day Care really does a remarkable job."}},"healer":{"0":"Battles in the League are very exhausting for your Pokémon.","1":"But we take care to heal your entire team between each fight."},"hector":{"defeat":{"0":"Bug Pokémon have hidden abilities.","1":"It will take some time to discover them all.","2":"Study them carefully."},"start":{"0":"Hey, did you find my camp? I'm Bugsy!","1":"I came to study the Bug Pokémon of this region.","2":"No one knows Bug Pokémon better than me!","3":"When I grow up, I'll be a great expert in Bug Pokémon!","4":"Do you want me to show you?","5":"Prepare yourself to admire the result of my research!"},"victory":{"0":"Wow, wow! You really know Pokémon!","1":"Ah, I still have a lot to learn! ... ","2":"Yes, I know! Take my insect net as a reward!","3":"You'll see, it will be very useful to you!","4":"Well, I'm going to break camp. I've finished what I had to do here.","5":"This area is full of exotic Pokémon, you should come back!"}},"item_no_use":"It won't work here...","item_received":"You {{verb}} : {{label}} {{quantity}}","item_use":"Use {{item}}?","koga":{"defeat":{"0":"Ha ha! It's time to teach you that some Pokémon","1":"cannot be defeated by pure force!"},"start":{"0":"Gwahahaha! A dwarf dares to challenge me?","1":"Me, the big, the handsome, the terrible Koga?","2":"By hell, by blood, by steel, I will win!","3":"May the grip of my poisons petrify your little Pokémon with fear!"},"victory":{"0":"Gwaha... huh? You've proven your worth!","1":"Open your hand, for here is... the SOUL BADGE!","2":"I fought with all my strength...","3":"But... I'm not strong enough.","4":"Go to the next arena! Explore your limits!","5":"Good luck !"}},"levelup":"{{name}} is now level {{level}}","mom":{"after_gift":"Good luck in your adventure!","gift1":"Here, before you go... I found this under your bed.","gift10":"It allows you to add a new type to one of your Pokémon!","gift11":"I hope this is useful to you.","gift12":"You've been gone for a while. Have you made any new friends?","gift13":"I stopped by the store and found something for you.","gift14":"The seller told me that all the best trainers had one!","gift15":"But you have to choose the right Pokémon to give it to.","gift16":"It's been so long since you left home!","gift17":"You must have a lot of stories to tell.","gift18":"For your return, I would like to offer you a gift:","gift19":"All the savings went into it! But it's a special occasion.","gift2":"You haven't been gone long. How are you?","gift20":"You are so close to your goal! I believe in you my darling!","gift3":"I picked some berries from the garden. Your Pokémon will love them!","gift4":"How is your adventure going?","gift5":"Hey, I found this for you at Prof. Oak's Lab.","gift6":"Is the trip going well?","gift7":"Have you caught a lot of Pokémon?","gift8":"Here, I have something to offer you.","gift9":"This is a very rare gem.","hello":"Hello, my dear!"},"morgane":{"defeat":{"0":"This is exactly what I predicted."},"start":{"0":"I predicted your arrival!","1":"I have had psychic powers since childhood.","2":"I learned to bend spoons by the power of my mind.","3":"It's not super useful, but it looks cool!","4":"I don't like fighting, but if you insist, I'll show you my powers!"},"victory":{"0":"Ha! I'm surprised! You won.","1":"That's right, I didn't do my best!","2":"You deserve your victory! You win the MARSH BADGE!","3":"The Marsh Badge strengthens occult powers...","4":"And that... It's not a small thing.","5":"You will become a Master! I feel it!"}},"mr_psy":{"defeat":{"0":"What a disappointment!","1":"Come back to me and I'll let you catch more Psychic Pokémon.","2":"Your team needs to improve its mental!"},"start":{"0":"Ah, here you are again! So, have you trained your Pokémon's minds?","1":"It's time for... the Mr Psychic exam!"},"victory":{"0":"That's a 10/10! You graduated from Mr. Psychic's school!"}},"olga":{"defeat":{"0":"Zis is not enough!"},"start":{"0":"Welcome to the Pokémon League!","1":"I am Lorelei of ze Elite Four!","2":"I am the master of Ize Pokémon!","3":"And the Ize... It'z really ztrong!","4":"Your Pokemon will be frozen to my mercy!","5":"Ach! Ach! Ach! Letz go!"},"victory":{"0":"You are ztrong. It's good.","1":"But the Pokémon League has other zurprizes for you!"}},"ondine":{"defeat":{"0":"Haha, looks like your team took on water!","1":"You're going to have to find another tactic."},"start":{"0":"Hi! Are you new?","1":"If you want to be a real trainer, you need a strategy!","2":"What is your tactic for capturing wild Pokémon?","3":"I'm charging into them with my water Pokémon!"},"victory":{"0":"Whoa! You're super strong! Very good!","1":"I give you the CASCADE BADGE for beating me!","2":"This badge opens the way to the cave north of Cerulean City."}},"peter":{"defeat":{"0":"I never give up. What about you?"},"start":{"0":"Ah! Finally... I heard about you!","1":"I reign over the Elite Four!","2":"My name is Lance the Dragon Trainer!","3":"Dragons are mystical Pokémon!","4":"Capturing and training them is difficult but their powers are superior!","5":"They are almost invincible!","6":"The bell of defeat and shame tolls for you...","7":"Do you hear it?"},"victory":{"0":"How could my dragons succumb to your attacks?","1":"You are now the Master of the Pokémon League!","2":"Well... not quite.","3":"A final test you must still pass...","4":"Another great Trainer awaits you.","5":"He defeated the Elite Four before you!","6":"He's the real Master of the Pokémon League!"}},"pierre":{"defeat":{"0":"Your Pokémon couldn't get past my rock defense...","1":"Train them and come back and fight me when you're strong enough."},"start":{"0":"I am Brock! I am the Champion of Pewter City!","1":"I believe in the great resistance of stone!","2":"That's why my Pokémon are stone elementals!","3":"You still want to fight me? Fine. On guard!"},"victory":{"0":"Hmm... Nice fight.","1":"You seem to be an exceptional Trainer!","2":"In recognition of your victory, here is the ROCK BADGE!","3":"This is an official Pokémon League Badge!","4":"You will need eight of them to be able to face the Elite Four."}},"receive":"receive","relacher":"Release {{name}} and retrieve {{cost}} Pokéball?","rival":{"defeat":{"0":"You amused me a little!","1":"You're really a loser!","2":"But I think you're starting to know, you loser!"},"start":{"0":"Hi, loser. I've been waiting for you for ages!","1":"Your duty as a rival is to train my Pokémon.","2":"While improving my Pokédex, I searched for the overpowered Pokémon!","3":"I created the ultimate team, effective against all types of Pokémon!","4":"That impresses you, doesn't it?","5":"I am the Master! Do you know what that means?","6":"I'm the most powerful trainer in the world! Yaaa!"},"victory":{"0":"Wha... Com... Huh? Me? Why? WHAAAAAAAAAAA!","1":"I trained my Pokémon to perfection... Oh my!","2":"You're the new Master! So that... That blows my mind"}},"sally":{"defeat":{"0":"It’s beautiful, the energy of youth.","1":"But the power of the attacks is not everything...","2":"Are you finally beginning to understand what magic is?"},"start":{"0":"Well, well. I've heard of you, my child.","1":"I am Sally, the Ballonlea Gym Leader in the Galar region.","2":"I came to Lavenderville to visit an old friend...","3":"This place has something magical to it for me.","4":"Well, how about a fight?","5":"I'd be interested to see how you fight..."},"victory":{"0":"Congratulations on this victory! I had a blast!","1":"Even though I'm too old for that kind of thing...","2":"You remind me of my husband in his younger years.","3":"You know what? You should get that umbrella.","4":"It was very useful to me during my travels.","5":"Come on, get out! You have a League to face!"}},"salut":"Hi ?","sbire_rocket":{"defeat":{"0":"Mouahaha! It's the rebirth of Team Rocket!"},"start":{"0":"Giovanni may be gone, but Team Rocket never dies!","1":"I intend to take his seat! Let's battle!"},"victory":{"0":"Looks like Team Rocket's blasting off again!"}},"sbire_rocket_tuto":{"defeat":{"0":"Come on, get out of here, little one, and come back when you have a real team!"},"start":{"0":"Hey you, what are you doing here?","1":"This is the territory of Giovanni, our master and gym leader!","2":"What? You're going to compete with him? Let me laugh!","3":"I'll show you the power of Team Rocket!"},"victory":{"0":"Hmpff! You're tougher than you look... ","1":"But it doesn't change anything! Giovanni will settle your score!","2":"Come back later when you have a real team."}},"sellerf":{"hello":"Hello! What do you want?"},"sellerm":{"hello":"Hello! Are you interested in something?"},"shop":{"confirm_one":"1 {{item}} for {{count}} ball, right?","confirm_other":"1 {{item}} for {{count}} balls, right?","nomoney":"You don't have enough Pokéballs, kid!"},"sleeping_pokemon":{"0":"A sleeping Pokémon is blocking the path.","1":"Wake it up with the Poké Flute?"},"starter":{"after":"Maybe I should have taken {{name}} ...","choose":"Choose {{name}} as starter?","chosen":"You choose {{name}} !"},"trader":{"aftertrade":"So cool, a {{name}} !","nopokemon":{"0":"Hi, do you want to trade Pokemon?","1":"If you have any Pokémon in reserve in your box, we can trade them!"},"tradeaccepted":"You exchange {{ given }} for {{ received }} !","tradepropose":"Hi, do you want to trade your {{ given }} for my {{ received }} ?","traderefused":"Ah, well, too bad."}}`),Ip={caught:"Taken: {{number}}",duree:"Game duration: {{duree}} rounds",seen:"Seen: {{number}}"},Fp={controls:"Controls",description:{0:"Pokéchess is the game prototype Curry was working on before joining Pokemon Auto Chess team. It was intended as a fangame remake of Pokemon Red/Blue as an autobattler.",1:"Although the game simulates a Gameboy to play on nostalgia, it does not respect the screen resolution and hardware constraints of the original Gameboy Color, and the game is also playable with keyboard, gamepad or mouse for convenience.",2:"Your progression is automatically saved every time you reached the overworld map.",3:"This project quickly demonstrated the limitations of the Gameboy format for a genre as complex as the autobattler, but also allowed the exploration of some ideas that were later used in Pokémon Auto Chess."},gamepad:"Gamepad",keyboard:"Keyboard",language:"Language",mouse:"Mouse",music:"Music",sfx:"Sound effects",volume:"Volume"},wp={"attaque+":"X Attack",baie_ceriz:"Cheri Berry",baie_mepo:"Leppa Berry",baie_oran:"Oran Berry",baie_sitrus:"Sitrus Berry",boule_fumee:"Smoke Ball","defense+":"X Défense",encens_fleur:"Rose Incense",filet:"Hector's net",fossile_amonita:"Helix Fossil",fossile_kabuto:"Dome Fossil",fossile_ptera:"Old Amber",gemme_ciel:"Sky Gem",gemme_draco:"Draco Gem",gemme_flamme:"Flame Gem",gemme_glace:"Ice Gem",gemme_grise:"Grey Gem",gemme_herbe:"Grass Gem",gemme_hydro:"Hydro Gem",gemme_insecte:"Bug Gem",gemme_ombre:"Shadow Gem",gemme_pixie:"Pixie Gem",gemme_poing:"Battle Gem",gemme_psy:"Psy Gem",gemme_roc:"Rock Gem",gemme_terre:"Earth Gem",gemme_toxic:"Toxic Gem",gemme_volt:"Volt Gem",grelot_coque:"Shell Bell",max_elixir:"Max Elixir",multi_exp:"Exp. Share",orbe_flamme:"Flame Orb",orbe_foudre:"Lightning Orb",orbe_toxique:"Toxic Orb",parapluie:"Sally's umbrella",pokeball:"Pokéball",pokeflute:"Poké Flute","pv+":"HP Up",repousse:"Repel",super_bonbon:"Rare Candy","vitesse+":"X Speed"},Dp={"attaque+":"+20% Attack",baie_ceriz:"Consumed on first status affliction suffered - Heals afflictions for 10 seconds",baie_mepo:"Consumed on first hit received - Gain 2 extra PP per hit received",baie_oran:"Def +30% - Consumed when HP falls below 50% the first time",baie_sitrus:"Heals 25% of max HP - Consumed when HP drops below 50% the first time",boule_fumee:"Makes the Pokémon untargetable for 3s when HP drops below 30%.","defense+":"+20% Defense",encens_fleur:"Heals 1% of the wearer's and allies' max HP on an adjacent tile every second",filet:"Collects one Pokéball for each Pokémon eliminated by its holder",fossile_amonita:"An ancient snail-shaped Pokémon fossil",fossile_kabuto:"An ancient Pokémon shell-shaped fossil",fossile_ptera:"An ancient Pokémon egg-shaped fossil",gemme_ciel:"Gives the wearer the Flying type",gemme_draco:"Gives the wearer the Dragon type",gemme_flamme:"Gives the wearer the Fire type",gemme_glace:"Gives the wearer the Ice type",gemme_grise:"Gives the wearer the Normal type",gemme_herbe:"Gives the wearer the Grass type",gemme_hydro:"Gives the wearer the Water type",gemme_insecte:"Gives the wearer the Bug type",gemme_ombre:"Gives the wearer the Ghost type",gemme_pixie:"Gives the wearer the Fairy type",gemme_poing:"Gives the wearer the Fighting type",gemme_psy:"Gives the wearer the Psychic type",gemme_roc:"Gives the wearer the Rock type",gemme_terre:"Gives the wearer the Ground type",gemme_toxic:"Gives the wearer the Poison type",gemme_volt:"Gives the wearer the Electric type",grelot_coque:"Restores 20% of damage dealt as HP",max_elixir:"Gain 4PP on each attack",multi_exp:"Increases experience gains by 30%",orbe_flamme:"Inflicts the Burn affliction on every hit received or landed",orbe_foudre:"Inflicts the Paralysis affliction on every hit received or landed",orbe_toxique:"Inflicts the Poison affliction on every hit received or landed",parapluie:"Protects the wearer from all alterations",pokeball:"The capture tool for any trainer and currency in stores",pokeflute:"Wakes up the most deeply sleeping Pokémon","pv+":"+20% HP",repousse:"Scares away wild Pokémon and brings back new ones",super_bonbon:"Gain an additional level at the end of each fight","vitesse+":"+20% Speed"},Np={change_place:"Change place",no_item:"{{ name }} does not hold an object",quit:"Quit",release_pokemon:"Release {{name}}",remove_pokemon:"Remove {{name}}",retrieve_item:"Retrieve {{item}}",see_pokemon:"See {{name}}",stock_item:"Stock {{item}}"},bp="New game",Bp="NO",Gp="Pokedex",Up={abo:"Ekans",abra:"Abra",aeromite:"Venomoth",akwakwak:"Golduck",alakazam:"Alakazam",amonistar:"Omastar",amonita:"Omanyte",aquali:"Vaporeon",arbok:"Arbok",arcanin:"Arcanine",artikodin:"Articuno",aspicot:"Weedle",boustiflor:"Weepinbell",bulbizarre:"Bulbasaur",canarticho:"Farfetch'd",caninos:"Growlithe",carabaffe:"Wartortle",carapuce:"Squirtle",chenipan:"Caterpie",chetiflor:"Bellsprout",chrysacier:"Metapod",coconfort:"Kakuna",colossinge:"Primeape",crustabri:"Cloyster",dardargnan:"Beedrill",dodrio:"Dodrio",doduo:"Doduo",dracaufeu:"Charizard",draco:"Dragonair",dracolosse:"Dragonite",ectoplasma:"Gengar",electhor:"Zapdos",electrode:"Electrode",elektek:"Electabuzz",empiflor:"Victreebel",evoli:"Eevee",excelangue:"Lickitung",fantominus:"Gastly",ferosinge:"Mankey",feunard:"Ninetales",flagadoss:"Slowbro",florizarre:"Venusaur",galopa:"Rapidash",goupix:"Vulpix",gravalanch:"Graveler",grodoudou:"Wigglytuff",grolem:"Golem",grotadmorv:"Muk",herbizarre:"Ivysaur",hypnomade:"Hypno",hypocean:"Seadra",hypotrempe:"Horsea",insecateur:"Scyther",kabuto:"Kabuto",kabutops:"Kabutops",kadabra:"Kadabra",kangourex:"Kangaskhan",kicklee:"Hitmonlee",kokiyas:"Shellder",krabboss:"Kingler",krabby:"Krabby",lamantine:"Dewgong",leveinard:"Chansey",leviator:"Gyarados",lippoutou:"Jynx",lokhlass:"Lapras",machoc:"Machop",machopeur:"Machoke",mackogneur:"Machamp",magicarpe:"Magikarp",magmar:"Magmar",magneti:"Magnemite",magneton:"Magneton",melodelfe:"Clefable",melofee:"Clefairy",metamorph:"Ditto",mew:"Mew",mewtwo:"Mewtwo",miaouss:"Meowth",mimitoss:"Venonat",minidraco:"Dratini",mrmime:"Mr. Mime",mystherbe:"Oddish",nidoking:"Nidoking",nidoqueen:"Nidoqueen",nidoranf:"Nidoran ♀",nidoranm:"Nidoran ♂",nidorina:"Nidorina",nidorino:"Nidorino",noadkoko:"Exeggutor",noeufnoeuf:"Exeggcute",nosferalto:"Golbat",nosferapti:"Zubat",onix:"Onix",ortide:"Gloom",ossatueur:"Marowak",osselait:"Cubone",otaria:"Seel",papillusion:"Butterfree",paras:"Paras",parasect:"Parasect",persian:"Persian",piafabec:"Spearow",pikachu:"Pikachu",poissirene:"Goldeen",poissoroy:"Seaking",ponyta:"Ponyta",porygon:"Porygon",psykokwak:"Psyduck",ptera:"Aerodactyl",ptitard:"Poliwag",pyroli:"Flareon",racaillou:"Geodude",rafflesia:"Vileplume",raichu:"Raichu",ramoloss:"Slowpoke",rapasdepic:"Fearow",rattata:"Rattata",rattatac:"Raticate",reptincel:"Charmeleon",rhinocorne:"Rhyhorn",rhinoferos:"Rhydon",rondoudou:"Jigglypuff",ronflex:"Snorlax",roucarnage:"Pidgeot",roucool:"Pidgey",roucoups:"Pidgeotto",sabelette:"Sandshrew",sablaireau:"Sandslash",salameche:"Charmander",saquedeneu:"Tangela",scarabrute:"Pinsir",smogo:"Koffing",smogogo:"Weezing",soporifik:"Drowzee",spectrum:"Haunter",stari:"Staryu",staross:"Starmie",sulfura:"Moltres",tadmorv:"Grimer",tartard:"Poliwrath",taupiqueur:"Diglett",tauros:"Tauros",tentacool:"Tentacool",tentacruel:"Tentacruel",tetarte:"Poliwhirl",tortank:"Blastoise",triopikeur:"Dugtrio",tygnon:"Hitmonchan",voltali:"Jolteon",voltorbe:"Voltorb"},Vp={home:"Home",ligueendroom:"Indigo League - Pantheon",oaklab:"Prof. Oak's Lab"},Yp={abri:"Protect",acide:"Acid",adaptation:"Conversion",amnesie:"Amnesia",armure:"Harden",balayage:"Low Kick",belier:"Take Down",berceuse:"Sing",blizzard:"Blizzard",bomb_beurk:"Sludge Bomb",bomb_oeuf:"Egg Bomb",brouillard:"Smokescreen",bulles_d_o:"Bubble Beam",cage_eclair:"Thunder Wave",cascade:"Waterfall",charge:"Tackle",choc_mental:"Confusion",coud_boue:"Mud-Slap",croc_de_mort:"Hyper Fang",crochet_venin:"Poison Fang",crocs_feu:"Fire Fang",cruaile:"Wing Attack",danse_flammes:"Fire Spin",danse_lames:"Swords Dance",dard_venin:"Poison Sting",deflagration:"Fire Blast",destruction:"Self-Destruct",detritus:"Sludge",devoreve:"Dream Eater",double_pied:"Double Kick",dracocharge:"Dragon Rush",dracorage:"Dragon Rage",e_coque:"Soft-Boiled",eclair:"Thunder Shock",eclat_glace:"Ice Shard",empal_korne:"Horn Drill",encore:"Encore",etincelle:"Spark",evolution:"Evolution",fatal_foudre:"Thunder",flammeche:"Ember",fouet_lianes:"Vine Whip",furie:"Fury Attack",griffe:"Scratch",grobisou:"Lovely Kiss",guillotine:"Guillotine",hate:"Agility",hydrocanon:"Hydro Pump",hypnose:"Hypnosis",jackpot:"Pay Day",jet_de_sable:"Sand Attack",jet_pierres:"Rock Throw",koud_korne:"Horn Attack",lance_flammes:"Flamethrower",lance_soleil:"Solar Beam",laser_glace:"Ice Beam",lechouille:"Lick",ligotage:"Wrap",massdos:"Bone Club",mawashi_geri:"Rolling Kick",meteores:"Swift",metronome:"Metronome",morphing:"Transform",morsure:"Bite",nitrocharge:"Flame Charge",ouragan:"Twister",paraspore:"Stun Spore",picpic:"Peck",pilonnage:"Barrage",pince_masse:"Crabhammer",piqure:"Bug Bite",pistolet_a_o:"Water Gun",poing_karate:"Karate Chop",poudre_dodo:"Sleep Powder",poudre_toxik:"Poison Powder",poudreuse:"Powder Snow",pouvoir_antique:"Ancient Power",pouvoir_lunaire:"Moonblast",provoc:"Taunt",psyko:"Psychic",rafale_psy:"Psybeam",repos:"Rest",rugissement:"Growl",secretion:"String Shot",surf:"Surf",teleport:"Teleport",tonnerre:"Thunderbolt",torgnoles:"Double Slap",trempette:"Splash",triplattaque:"Tri Attack",tunnel:"Dig",ultimapoing:"Mega Punch",ultralaser:"Hyper Beam",ultrason:"Supersonic",vampirisme:"Leech Life",vive_attaque:"Quick Attack",vol_vie:"Absorb"},zp={abri:"Makes the user invulnerable for a short time.",acide:"Gastric juice jet greatly reducing the targets defense",adaptation:"Temporarily changes its type to that of the attacks received.",amnesie:"Heals all current ailments of the caster",armure:"Increases the user's defense until the end of the fight - Stackable",balayage:"Wide attack that can hit up to 3 opponents in front",belier:"A violent charge that also injures the caster",berceuse:"Puts opponents around the user to sleep",blizzard:"Freezes all enemies and rains devastating hailstones",bomb_beurk:"Toxic bomb poisoning the area where it falls",bomb_oeuf:"Throws an explosive egg that deals damage in a wide area",brouillard:"Reduces the accuracy of opponents around the caster",cage_eclair:"Paralyzes all opponents around the user",cascade:"Drops a torrent of water that pushes the opponent back.",coud_boue:"Reduces target accuracy",croc_de_mort:"Powerful bite that scares the target for 3 seconds",crocs_feu:"A bite inflicting severe burns",danse_flammes:"Inflicts burns on all opponents around the user",danse_lames:"Circular attack dealing damage to all enemies around",deflagration:"Ignites the entire field and triggers eruptions on 8 random tiles",destruction:"Self-destruction pulverizing everything around",devoreve:"Terrifies the opponent with nightmare visions",dracorage:"Summons a storm that deals true damage in the area",e_coque:"Releases a magic egg that heals your entire team",eclair:"Lightning strikes a randomly selected opponent",empal_korne:"Impales the target with a stalagmite that rises from the ground",encore:"Reproduces the last special attack observed on the field",evolution:"Temporarily evolves into Flareon, Jolteon or Vaporeon depending on the target's type",fatal_foudre:"Causes lightning to strike 3 enemies and paralyzes all others",furie:"Increases the user's attack until the end of the battle - Stackable",grobisou:"An icy kiss that temporarily freezes the target",guillotine:"Deadly blow executing the target if less than 30% of their max HP",hate:"Increases the caster's speed until the end of the fight - Stackable",hydrocanon:"Geyser propelling the opponent into the air",hypnose:"Puts the target to deep sleep",jackpot:"Has a 50% chance of getting you a Pokéball",jet_de_sable:"Blinds the enemy and reduces their accuracy by 50% for 8 seconds",lance_flammes:"Flame jet inflicting severe burns on the target",lance_soleil:"Absorbs solar energy then releases it in a powerful orb",laser_glace:"Freezes opponents for a short time on a straight line",ligotage:"Prevents the target from moving and deals damage over time",mawashi_geri:"A roundhouse kick that also hits the opponent behind the caster",meteores:"A shower of stars that hits every time",metronome:"Triggers a random ability from all existing ones",morphing:"Transforms into a copy of the target Pokémon - Keeps the same level and item",nitrocharge:"A violent flaming charge that also injures the caster",ouragan:"A tornado lifting all opponents in its path",paraspore:"Cloud of spores that paralyzes all enemies around the user",poudre_dodo:"Projects a powder that puts all nearby opponents to sleep",poudre_toxik:"Toxins poisoning all opponents around the caster",pouvoir_antique:"A prehistoric attack that increases all of the user's stats",pouvoir_lunaire:"Taunts all opponents within a 2-square radius",provoc:"Taunts all opponents within a 2-square radius",psyko:"Confuses the entire enemy team for 4 seconds before dealing heavy Psy damage",rafale_psy:"Psy energy wave passing through opponents",repos:"Falls asleep and regains a large portion of his HP while asleep",rugissement:"Temporarily reduces the attack of all nearby opponents",secretion:"Creates a sticky trap that slows the opponent's speed",surf:"Creates a giant wave that sweeps away everything in its path",teleport:"Teleports the user to a random tile on the board",tonnerre:"Deals heavy electrical damage around the user",trempette:"But nothing happened.",tunnel:"Dig a tunnel to a free tile on the board, attacking from the ground as you go",ultimapoing:"A devastating uppercut",ultralaser:"A powerful laser that pulverizes everything in a line",ultrason:"Sound wave that confuses affected Pokémon"},Wp={agatha:"Agatha",aldo:"Bruno",assistant_tuto:"Prof Oak Assistant",auguste:"Blaine",major_bob:"Lt. Surge",dresseur_argenta:"Roche the geologist",dresseur_azuria:"Anya the Swimmer",dresseur_camp_nomade:"Nancy the scout",dresseur_carmin:"Elton the Rocker",dresseur_cave_taupiqueur:"Joe the Burglar",dresseur_celadopole:"Valentine the City Girl",dresseur_centrale:"George the Mechanic",dresseur_champs_verdoyants:"Isabella the Florist",dresseur_col_de_montagne:"Bird Keeper Bret",dresseur_colline_royale:"Norbert the Dragon Fan",dresseur_cramoisile:"Isaac the Scientist",dresseur_dojo:"Koichi the Karate Master",dresseur_falaises:"Bob the Mountaineer",dresseur_foret_jade:"Calvin the Kid",dresseur_grotte_azuree:"Ugo the wise old man",dresseur_iles_ecume:"Jerry the Fisherman",dresseur_lavanville:"Henry the Gentleman",dresseur_mont_braise:"Duo Ron & Mya the Daredevils",dresseur_mont_selenite:"Arthur the Paleontologist",dresseur_oceane:"Firmin the Sailor",dresseur_pension:"Gale of the Pension",dresseur_piste_cyclable:"Karl the Thug",dresseur_safrania:"Polo the Physiotherapist",dresseur_tour_pokemon:"Gwen the Exorcist",erika:"Erika",giovanni:"Giovanni",hector:"Bugsy",koga:"Koga",morgane:"Sabrina",mr_psy:"Mister Psychic",olga:"Lorelei",ondine:"Misty",peter:"Lance",pierre:"Brock",rival:"Blue",sally:"Sally",sbire_rocket:"Team Rocket Grunt"},Hp={COMBAT:"Fighting",DRAGON:"Dragon",EAU:"Water",ELECTRIQUE:"Electric",FEE:"Fairy",FEU:"Fire",GLACE:"Ice",INSECTE:"Bug",NORMAL:"Normal",PLANTE:"Grass",POISON:"Poison",PSY:"Psychic",ROCHE:"Rock",SOL:"Ground",SPECTRE:"Ghost",VOL:"Flying"},Xp="You beat {{trainer}} !",kp="Your Pokémon gain {{xp}}xp",Kp="YES",Jp={not_enough_balls:{0:"Not enough",1:"pokeballs!"},box_full:{0:"Pokémon Box",1:"is full!"},capture_with:"Capture with"},jp="Loading...",Zp="Day {{day}}",$p={alliance_desc:Cp,continue:"Continue",defeat:Pp,descriptions:Rp,destination:Lp,destination_subtext:Op,dialog:Mp,gameover:Ip,home:Fp,item:wp,item_desc:Dp,menu:Np,new_game:bp,no:Bp,pokedex:Gp,pokemon:Up,room:Vp,skill:Yp,skill_desc:zp,trainer:Wp,type:Hp,victory:Xp,victory_xp:kp,yes:Kp,capture:Jp,loading:jp,day_number:Zp},Qp={COMBAT:"Les Pokémon Combat ne connaissent pas la peur et ont leurs stats augmentées avec le nombre d'adversaires les ciblant.",COMBAT2:"+5% ATK et DEF par adversaire",COMBAT4:"+10% ATK et DEF par adversaire",COMBAT6:"+20% ATK et DEF par adversaire",DRAGON:"Quand un Pokémon Dragon est le dernier Pokémon de l'équipe sur le plateau, il gagne de gros bonus à toutes ses statistiques.",DRAGON1:"+20% aux stats du dernier dragon",DRAGON2:"+40% aux stats du dernier dragon",DRAGON3:"+60% aux stats du dernier dragon",EAU:"Les Pokémon Eau sont insensibles aux Brûlures. Les compétences Eau peuvent repousser la cible d'une ou plusieurs cases.",EAU2:"Repousse d'une case",EAU4:"Repousse de 2 cases",EAU6:"Repousse de 3 cases",ELEC2:"+10% VIT ; 2 dégats par coup reçu",ELEC4:"+20% VIT ; 4 dégats par coup reçu",ELEC6:"+30% VIT ; 6 dégats par coup reçu",ELECTRIQUE:"Les Pokémon Electrique gagnent en Vitesse et infligent des dégats électriques à chaque coup reçu au contact.",FEE:"Les Pokémon Fée font gagner progressivement des PP à toute votre équipe.",FEE1:"+1 PP par seconde",FEE2:"+2 PP par seconde",FEE3:"+3 PP par seconde",FEU:"Les Pokémon Feu sont insensibles au Gel. Leurs attaques appliquent une brûlure qui inflige des dégâts sur la durée et réduit de 50% l'efficacité des soins.",FEU2:"2 brûlures par attaque",FEU4:"3 brûlures par attaque",FEU6:"4 brûlures par attaque",GLACE:"Les Pokémon Glace sont entourés d'une aura de gel qui ralentit les adversaires des cases adjacentes.",GLACE2:"-20% vitesse",GLACE3:"-30% vitesse",GLACE4:"-40% vitesse",INSECTE:"Les Pokémon Insecte grandissent et évoluent plus rapidement. Ils gagnent un bonus d'expérience à chaque combat.",INSECTE2:"+20% aux gains d'expérience",INSECTE4:"+40% aux gains d'expérience",INSECTE6:"+60% aux gains d'expérience",NORMAL:"Les Pokémon normaux réduisent les pénalités de dégâts reçus liés aux faiblesses de types.",NORMAL2:"-30% de dégâts de faiblesse reçus",NORMAL4:"-60% de dégâts de faiblesse reçus",NORMAL6:"-90% de dégâts de faiblesse reçus",PLANTE:"Les Pokémon Plante ne peuvent pas être repoussés par les compétences adverses et se regénèrent naturellement.",PLANTE2:"Regen 1% des HP max par seconde",PLANTE4:"Regen 2% des HP max par seconde",PLANTE6:"Regen 3% des HP max par seconde",POISON:"Les Pokémon Poison empoisonnent leurs cibles, infligeant des dégâts sur la durée proportionnels à leurs PV max.",POISON2:"Dégâts de poison infligés +40%",POISON4:"Dégâts de poison infligés +80%",POISON6:"Dégâts de poison infligés +120%",PSY:"Les Pokémon Psy sont insensibles à la Confusion, et leurs attaques font perdre des PP à leur cible.",PSY2:"La cible perd 2 PP par attaque",PSY4:"La cible perd 4 PP par attaque",PSY6:"La cible perd 6 PP par attaque",ROCHE:"Les Pokémon Roche réduisent les dégâts reçus liés aux altérations (poison, brûlure).",ROCHE2:"-30% dégats d'altération",ROCHE4:"-60% dégats d'altération",ROCHE6:"-90% dégats d'altération",SOL:"Les Pokémon Sol creusent un tunnel pour se protéger temporairement lorsqu'ils tombent sous un certain seuil de PV.",SOL2:"Tunnel à 20% des PV",SOL4:"Tunnel à 20% et 50% des PV",SOL6:"Tunnel à 20%, 50% et 80% des PV",SPECTRE:"Les Pokémon Spectre ne peuvent pas être endormis et leurs attaques effrayent leur cible, réduisant leur attaque.",SPECTRE2:"2 stacks de Peur par attaque",SPECTRE4:"4 stacks de Peur par attaque",SPECTRE6:"6 stacks de Peur par attaque",VOL:"Les Pokémon Vol s'envolent à l'opposé du plateau au début du combat, et peuvent esquiver les attaques reçues.",VOL2:"20% de chances d'esquive",VOL4:"40% de chances d'esquive",VOL6:"60% de chances d'esquive"},qp={0:"Votre équipe est KO !",1:"Vous courrez jusqu'au centre Pokémon le plus proche."},_p={bed:"Ce n'est pas le moment d'aller dormir !",boat:"C'est une maquette de l'Océane, le célèbre bateau de croisière.",book:{0:"C'est mon cahier de cours d'études des Pokémon",1:"Les Pokémon normaux sont polyvalents, mais se font battre par les spécialistes du Combat.",2:"Les Pokémon de type Roche n'aiment pas l'eau.",3:"Les Pokémon aquatiques craignent l'électricité.",4:"Les Pokémon de type Feu sont impuissants face à l'eau.",5:"Le feu est mortel pour les pokémon Plante.",6:"Les Pokémon Vol craignent la foudre.",7:"Les Pokémon électriques sont neutralisés par la Terre.",8:"Les Pokémon Glace sont brisés par la Roche.",9:"Les Pokémon Combat ont une faiblesse: les attaques Psy.",10:"Les Pokémon Sol résistent bien au Poison.",11:"Les Pokémon Plante gagnent contre les Pokémon Sol au long terme.",12:"Les Pokémon Psy ont étrangement peur des Insectes.",13:"Les Pokémon Insecte se font picorer par les oiseaux.",14:"Seul un Spectre peut vraiment faire face à un autre Spectre.",15:"Les Dragons peuvent être piégés par la Glace."},book_insect:{0:"C'est un cahier de notes sur les évolutions des Pokémon.",1:"Il est écrit que {{name}} évolue au niveau {{level}}",2:"Intéressant. Je devrais garder ça en mémoire !"},frigo:{0:"MAM: Tu as encore faim ? Un vrai estomac sur pattes !"},map:"C'est la carte de la région de Kanto.",pc_end:{0:"Enregistrer l'équipe dans le livre des records ?",1:"Enregistrement...",2:"Félicitations ! Vous et vos Pokémon êtes célèbres !",3:"... Fin de session."},pc_record:{0:"Bzzz... Ouverture du livre des records...",1:"Aucune donnée disponible.",2:`Dernier maître de la ligue recensé: Maître en {{nbTours}} tours`,3:`{{nbCaptured}} Pokémon capturés -{{nbSeen}} Pokémon observés`,4:"Equipe de prédilection:",5:"Bzzz.. L'écran s'est éteint..."},tv:{0:"La TV diffuse les actualités du jour...",1:"FLASH SPECIAL !",2:"On aurait aperçu un Electhor à la centrale !",3:"Un Artikodin a été vu aux Îles Ecume !",4:"Le Mont Braise serait le repère d'un Sulfura !",5:"Nos journalistes tâchent d'en savoir plus."}},Qp={ARGENTA:"Argenta",ARGENTA_ARENA:"Arène d'Argenta",ARGENTA_SHOP:"Magasin d'Argenta",AZURIA:"Azuria",AZURIA_ARENA:"Arène d'Azuria",AZURIA_SHOP:"Magasin d'Azuria",BOURG_PALETTE:"Bourg Palette",BOURG_PALETTE_ROAD:"Route de Bourg Palette",CAMP_NOMADE:"Camp Nomade",CAMP_NOMADE_ARENA:"Arène sauvage",CARMIN:"Carmin sur mer",CARMIN_ARENA:"Arène de Carmin s.mer",CARMIN_SHOP:"Magasin de Carmin s.mer",CAVE_TAUPIQUEUR:"Grotte Taupiqueur",CAVE_TAUPIQUEUR_EAST:"Grotte Taupiqueur (Entrée Est)",CAVE_TAUPIQUEUR_WEST:"Grotte Taupiqueur (Entrée Ouest)",CELADOPOLE:"Céladopole",CELADOPOLE_ARENA:"Arène de Céladopole",CELADOPOLE_SHOP:"Magasin de Céladopole",CENTRALE:"Centrale électrique",CHAMPS_VERDOYANTS:"Champs verdoyants",CHEMIN_COLLINE:"Chemin vers la Colline",COLLINE_ROYALE:"Colline des Rois",COL_MONTAGNE:"Col de Montagne",CRAMOISILE:"Cramois'Île",CRAMOISILE_ARENA:"Arène de Cramois'Île",CRAMOISILE_SHOP:"Magasin de Cramois'Île",DOJO:"Dojo",FALAISES:"Falaises",FORET_JADE:"Forêt de Jade",GROTTE_AZUREE:"Grotte Azurée",HOME:"Chez Maman",ILES_ECUME:"Îles Écume",JADIELLE:"Jadielle",JADIELLE_ARENA:"Arène de Jadielle",JADIELLE_SHOP:"Magasin de Jadielle",LABO_CHEN:"Labo du Prof. Chen",LAVANVILLE:"Lavanville",LAVANVILLE_ARENA:"Arène de Lavanville",LAVANVILLE_SHOP:"Maison Pokémon de Lavanville",LIGUE:"Ligue Indigo",LIGUE_FLOOR1:"Ligue Indigo - 1er étage",LIGUE_FLOOR2:"Ligue Indigo - 2ème étage",LIGUE_FLOOR3:"Ligue Indigo - 3ème étage",LIGUE_FLOOR4:"Ligue Indigo - 4ème étage",LIGUE_FLOOR5:"Ligue Indigo - Dernier étage",LIGUE_HALL:"Hall de la Ligue",MAISON_PSY:"Maison de Mr Psy",MONT_BRAISE:"Mont Braise",MONT_SELENITE:"Mont Sélénite",OCEANE:"L'Océane",OCEANE_DECK:"Sur l'Océane",PARC_SAFARI:"Parc Safari",PARMANIE:"Parmanie",PARMANIE_ARENA:"Arène de Parmanie",PARMANIE_SHOP:"Magasin de Parmanie",PENSION:"Pension Pokémon",PISTE_CYCLABLE:"Piste cyclable",ROUTE_VICTOIRE:"Route Victoire",ROUTE_VICTOIRE_ENTREE:"Route Victoire (Entrée)",ROUTE_VICTOIRE_SORTIE:"Route Victoire (Sortie)",SAFRANIA:"Safrania",SAFRANIA_ARENA:"Arène de Safrania",SAFRANIA_SHOP:"Magasin de Safrania",TOUR_POKEMON:"Tour Pokémon"},qp={ARENA:"Arène",BOURG_PALETTE:"Maman",CAPTURE:"Capture",CONSEIL_DES_4:"Conseil des 4",FIGHT:"Combat",SAFARI:"Capture à gogo",fast_travel:"Voyage rapide",fast_travel_AZURIA:"Voyage rapide vers Azuria",fast_travel_CARMIN:"Voyage rapide vers Carmin",fast_travel_CRAMOISILE:"Voyage rapide vers Cramois'Île"},_p=JSON.parse(`{"aftercapture":{"0":"Le {{name}} sauvage partage son expérience avant d'être relaché.","1":"Votre {{name}} gagne {{xp}} XP"},"agatha":{"defeat":{"0":"Tu as du talent, mais c'est insuffisant !"},"start":{"0":"Gnnn... Bonjour mon tout petit.","1":"Je suis Agatha du Conseil des 4 !","2":"Chen mise de grands espoirs sur toi, fiston !","3":"Sais-tu que ce vieux machin était jadis un beau garçon ?","4":"Enfin... Il y a très longtemps !","5":"Il veut juste frimer avec son Pokédex !","6":"Mais c'est débile ! Les Pokémon servent à combattre !","7":"Je vais te montrer comment les grands Dresseurs combattent !"},"victory":{"0":"Mmmm... Je vois pourquoi le vieux Chen t'apprécie autant !","1":"Mes ombres ont perdu. Tu peux passer."}},"aldo":{"defeat":{"0":"Vlan ! Dans les dents !"},"start":{"0":"Mon nom est Aldo du Conseil des 4 !","1":"Ma passion à moi et à mes Pokémon, c'est la muscu !","2":"Pour frimer sur la plage ou pour boxer les nabots,","3":"rien de tel qu'un corps de rêve !","4":"Ton équipe... J'vais en faire du yaourt ! A table !"},"victory":{"0":"Bien joué, p'tit ! La prochaine t'attend !"}},"assistant1":{"0":"Je pose la racine carrée, je retiens cinq...","1":" \\"Hmm ? C'est pour quoi ?\\"","q1":"Qui êtes-vous ?","q2":"Où suis-je ?","q3":"Que faites-vous ?","r1":"\\"J'assiste le PROF. CHEN. Je suis donc son... ASSISTANT !\\",","r2":"Tu te trouves au labo Pokémon de Bourg Palette.","r3":"Nous étudions ici les différentes espèces de Pokémon de Kanto.","r4":"Je regroupe les dernières données recueillies par les dresseurs comme toi.","r5":"En étudiant vos combats, nous recueillons des informations sur les Pokémon.","r6":"Ces informations sont ensuite regroupées dans le Pokédex.","r7":"C'est utile pour nos recherches, mais aussi pour vos stratégies de combat."},"assistant2":{"0":"Cette machine garde en mémoire les équipes de Pokémon qui se sont illustrées","1":"en battant le Conseil des 4 de la Ligue Pokémon.","2":"Analyser les meilleures équipes nous permet d'en apprendre un maximum !","3":"Si tu parviens à battre la ligue, nous ajouterons avec plaisir ton équipe."},"assistant_tuto":{"defeat":{"0":"La prochaine fois, sers-toi de mes Pokéballs !","1":"Tu augmenteras nettement tes chances de victoire !"},"start":{"0":"Une minute ! Si tu veux monter une équipe, il te faut des Pokéballs !","1":"Tiens, voilà 5 Pokéballs pour capturer tes premiers Pokémon.","2":"Sais-tu comment on s'en sert ?","no0":"Tu peux capturer un Pokémon sauvage plutôt que de l'affronter.","no1":"Plus le Pokémon est puissant, plus il te faudra de Pokéballs pour le capturer.","no2":"Un Pokémon capturé rejoint ta box, qui peut contenir jusqu'à 8 Pokémon.","no3":"Tu peux ensuite les déplacer de ta box vers le terrain pour qu'ils combattent.","no4":"Vas-y, essaie de capturer ces Pokémon sauvages !","yes0":"Très bien, alors capture ces Pokémon sauvages. Ou mets-les KO, comme tu veux !"},"step2":{"0":"Tes Pokémon deviennnent plus fort en gagnant de l'expérience après un combat.","1":"Mais il existe une autre manière de faire monter en expérience un Pokémon.","2":"Il suffit de capturer un Pokémon sauvage de la même espèce.","3":"Il partagera son expérience avec ton Pokémon avant d'être relâché.","4":"Tiens, essaie tout de suite. Essaie de capturer mon {{name}}."},"step3":{"0":"Plus le niveau du Pokémon capturé est élevé, plus il donnera d'expérience","1":"Rappelle-toi, cela marche uniquement si les Pokémon sont de la même espèce !","2":"Bien, tu sais tout. Bon voyage et bonne chance!"},"victory":{"0":"Bien, tu sembles te débrouiller comme un chef !"}},"auguste":{"defeat":{"0":"Maintenant tu sais de quel bois je me chauffe !"},"start":{"0":"Salutations. Mon nom est... Auguste !","1":"Je suis le Champion de l'Arène de Cramois'Île !","2":"Mes Pokémon flamboyants vont te réduire en cendres !","3":"Haha ! Il va bientôt faire très chaud !"},"victory":{"0":"Vlouff ! Je me suis fait vaporiser !","1":"Tu as gagné le badge Volcan !","2":"Plus tu possèdes de badges, plus les combats sont coriaces !","3":"C'est le prix à payer pour monter jusqu'à la Ligue !"}},"bob":{"defeat":{"0":"Ha ! Une défaite foudroyante !","1":"Un p'tit conseil, gamin ! L'électricité est très puissante !","2":"Mais elle est impuissante face aux Pokémon de la terre !"},"start":{"0":"Hé, gamin ! Tu fais quoi là ?","1":"Tu ne résisterais pas longtemps en temps de guerre !","2":"Je vais te dire, mes Pokémon Électriques m'ont sauvé la vie !","3":"Et ouais ! Ils ont paralysé mes ennemis avec leurs éclairs !","4":"Une vraie boucherie ! Y va t'arriver la même chose !","5":"Compte tes dents ! Tu vas morfler !"},"victory":{"0":"Whoo ! Gard'vous ! T'es un dur, mon p'tit gars !","1":"Très bien, prends le BADGE FOUDRE !","2":"T'en auras besoin pour rentrer dans la Ligue Pokémon."}},"chen":{"0":"Bonjour Red ! Alors c'est aujourd'hui le grand jour !","1":"Le jour de ton voyage initiatique comme dresseur Pokémon !","2":"Tu vas voyager à travers tout Kanto, capturer des Pokémon,","3":"monter une équipe et affronter les 8 champions d'arènes.","4":"Peut-être même te confronter à la ligue Pokémon si tu en es capable !","5":"Mais d'abord, il te faut adopter ton premier Pokémon.","6":"Nous en avons capturé trois dans les pokeballs derrière moi.","7":"Il y en a un pour toi. Allez ! Choisis-en un !","8":"Vas-y, tu peux prendre une des pokéballs sur la table derrière moi.","9":"{{pokemon}} ? Excellent choix !","10":"Ton Pokémon te protégera des Pokémon sauvages.","11":"Mais tout seul il ne sera pas de taille face aux champions d'arène!","12":"Il te faudra capturer des Pokémon sauvages pour composer une équipe.","13":"Chaque espèce de Pokémon a ses forces et faiblesses. N'oublie pas ça:","14":"La clé de la victoire est une équipe équilibrée et bien positionnée.","15":"Tu devrais te rendre dans une ville voisine pour capturer d'autres Pokémon.","16":"Bon voyage et bonne chance !","17":"Vas-y, enregistre ton équipe sur l'ordinateur pour la postérité !","18":"Hum-hum! Félicitations !","19":"Cet étage est réservé aux célébrités Pokémon !","20":"Les Champions de la Ligue sont consacrés ici !","21":"Leurs Pokémon sont enregistrés en tant que Célébrités !","22":"Long fut ton périple jusqu'à la victoire ! Encore bravo."},"dresseur_argenta":{"defeat":{"0":"Alors, on a un coup de calcaire ?"},"start":{"0":"Tu as vaincu Pierre, mais moi je suis solide comme un roc !"},"victory":{"0":"Je crois que j'ai un caillou dans ma chaussure..."}},"dresseur_azuria":{"defeat":{"0":"Alors, ta stratégie a pris l'eau ?"},"start":{"0":"De l'eau a coulé sous les ponts depuis ta victoire contre Ondine.","1":"Je suis plus fraîche que jamais ! Attends-toi à un raz de marée !"},"victory":{"0":"Gloups, j'ai bu la tasse !"}},"dresseur_camp_nomade":{"defeat":{"0":"Alors, tu as des fourmis dans les jambes ?"},"start":{"0":"Minute Papillon !","1":"Je vais te montrer ma collection d'insectes !","2":"Attends-toi à un combat pas piqué des hannetons !"},"victory":{"0":"Aïe ! Je me suis fait piquer par un moustique !"}},"dresseur_carmin":{"defeat":{"0":"Ça c'est du rock !!!"},"start":{"0":"Hey t'es venu pour mon concert ? L'ambiance est électrique ici !","1":"Comment ça, non ? T'as jamais écouté mon CD ?!","2":"Je vais pas te laisser gâcher la fête !"},"victory":{"0":"Ça y est t'as ruiné l'ambiance !"}},"dresseur_cave_taupiqueur":{"defeat":{"0":"Ça t'apprendra à venir fouiner dans les coins sombres !"},"start":{"0":"Hein ? Non, c'est pas moi !","1":"J'ai un alibi ! J'étais au cinéma !"},"victory":{"0":"Pas la peine de s'énerver ! Tiens, prends ces Pokéballs !","1":"Et... on dit que tu ne m'as jamais vu, OK ?"}},"dresseur_celadopole":{"defeat":{"0":"Finalement je n'ai plus trop envie qu'on traîne ensemble, hi hi !"},"start":{"0":"Je t'ai déjà croisé en ville, non ?","1":"Je peux te faire entrer dans les clubs de dresseurs les plus chics ici !","2":"Mais tu dois d'abord prouver que tu le mérites ! À l'attaque !"},"victory":{"0":"Mais euh ! Tu étais censé me laisser gagner !","1":"Vous autres provinciaux n'avez aucun savoir vivre !"}},"dresseur_centrale":{"defeat":{"0":"C'était une victoire éclair !"},"start":{"0":"Hé, t'as pété les plombs ?","1":"C'est pas un endroit pour les enfants ici !","2":"Mon équipe de Pokémon va te foudroyer !"},"victory":{"0":"Je me suis pris un sacré coup de jus !"}},"dresseur_champs_verdoyants":{"defeat":{"0":"Je vais te faire une fleur et te donner un conseil:","1":"Même les plus belles roses ont besoin d'épines.","2":"Il te faut une bonne attaque si tu veux gagner."},"start":{"0":"Tiens ? Qui es-tu à arriver comme une fleur ?","1":"C'est mon coin ici ! Je vais t'envoyer sur les roses !"},"victory":{"0":"Mon équipe a été envoyée dans les pâquerettes !","1":"Raaaah tu m'as mis les nerfs à fleur de peau !"}},"dresseur_col_de_montagne":{"defeat":{"0":"Va-t'en à tire-d'aile avant d'y laisser des plumes !"},"start":{"0":"Salut blanc-bec, tu t'es perdu ?","1":"Ne compte pas sur moi pour te prendre sous mon aile !","2":"Moi je cherche plutôt la prise de bec !"},"victory":{"0":"Ouille, j'ai du plomb dans l'aile ! Bisous je m'envole !"}},"dresseur_colline_royale":{"defeat":{"0":"Mes dragons sont si forts ! si terrifiants !","1":"si puissants ! si... ah, il est parti."},"start":{"0":"Tu cherches des Pokémon Dragons ?","1":"Moi aussi ! Moi aussi !","2":"Ils sont si grands ! si beaux ! si majestueux !","3":"Ils sont à moi ! Tu m'entends ? À moi seul !"},"victory":{"0":"La force ancestrale du dragon m'a abandonné !"}},"dresseur_cramoisile":{"defeat":{"0":"Euréka !"},"start":{"0":"Ah, un nouveau sujet d'expérience !","1":"Laisse-moi te montrer le fruit de mes recherches..."},"victory":{"0":"Mes calculs ne sont pas bons !"}},"dresseur_dojo":{"defeat":{"0":"Ton entraînement n'est pas encore suffisant ! Ayaaaaa !"},"start":{"0":"P'tit faiblard ! Je suis le GRAND MAITRE de KARATE !","1":"Tu me provoques ? Tu veux t'battre ?","2":"Tu cherches le contact ? HAHAHA ! Ayaaaaa !"},"victory":{"0":"STOP ! Tu m'as battu ! J'ai honte !","1":"OK, tu as gagné ! Mais ne va pas le crier sur tous les toits !"}},"dresseur_falaises":{"defeat":{"0":"Alors, on est sur la corde raide ?"},"start":{"0":"Salut petit gars ! Je suis le plus grand grimpeur de Kanto !","1":"Et j'ai bien l'intention de me hisser au sommet !","2":"Un combat ? C'est dans mes cordes !"},"victory":{"0":"Bon, j'ai perdu, on va pas en faire toute une montagne !"}},"dresseur_foret_jade":{"defeat":{"0":"Ouaiiiis j'ai gagné pour la première fois !"},"start":{"0":"T'es un dresseur Pokémon ? Moi aussi !","1":"J'ai capturé plein de Pokémon insectes !","2":"Maintenant on doit faire un combat, c'est la règle !"},"victory":{"0":"Je vais le dire à ma mère !"}},"dresseur_grotte_azuree":{"defeat":{"0":"Hmm... Ton équipe s'est fait refroidir.","1":"Que fais-tu encore ici ? Tu attends le dégel ?"},"start":{"0":"Hmmm... Drôle d'endroit pour une rencontre.","1":"Laisse moi briser la glace. En garde !"},"victory":{"0":"Ma défense a fondu comme neige au soleil !"}},"dresseur_iles_ecume":{"defeat":{"0":"Je suis frais comme un gardon !"},"start":{"0":"Fais pas de bruit, tu fais fuir les poissons !"},"victory":{"0":"J'aurais pas de belles prises aujourd'hui..."}},"dresseur_lavanville":{"defeat":{"0":"Allez vous reposer, la nuit porte conseil. Et croyez en vos rêves !"},"start":{"0":"Sally m'a beaucoup parlé de vous.","1":"Me ferez-vous l'honneur d'un combat ?"},"victory":{"0":"C'était un combat magique, je n'aurais pas rêvé mieux."}},"dresseur_mont_braise":{"defeat":{"0":"Tu vois ce que ça fait d'être pris entre deux feux !"},"start":{"0":"Eh bien que fait un jeune garçon dans un endroit pareil ?","1":"Tu n'as pas froid aux yeux, toi !","2":"Hé Ron, si on lui faisait un baptême du feu ?"},"victory":{"0":"Cessez-le-feu ! Viens Ron, on s'en va !"}},"dresseur_mont_selenite":{"defeat":{"0":"Tu ne feras pas de vieux os ici, mieux vaut que tu partes."},"start":{"0":"Je suis à la recherche de fossiles, tu n'en aurais pas vu ?"},"victory":{"0":"Il semblerait que ce soit moi le fossile..."}},"dresseur_oceane":{"defeat":{"0":"J'ai le vent en poupe aujourd'hui !","1":"Allez, les perdants à la cale ! Ha ha, je rigole !"},"start":{"0":"Ahoy, marin d'eau douce !","1":"La traversée va être longue...","2":"Faisons un combat pour passer le temps !","3":"Prêt ? Larguez les amarres !"},"victory":{"0":"Bon, je dois aller souquer les artimuses... Bon vent !"}},"dresseur_parmanie":{"defeat":{"0":"Nous sommes de retour...\`, \`Pour vous jouer un mauvais tour..."},"start":{"0":"Dégage sale morveux !","1":"La Team Rocket mène des opérations secrètes ici !"},"victory":{"0":"La team Rocket s'envole vers d'autres cieux !"}},"dresseur_pension":{"bye":{"0":"Je prendrais soin de tes Pokémon en ton absence !","1":"Reviens quand tu veux !"},"start":{"0":"Tiens, c'est toi ! Tu viens nous confier des Pokémon ?","1":"Ah, te revoilà ! Tes Pokémon ont bien grandi, regarde !","2":"Bienvenue à la Pension !","3":"Ici on prend soin des Pokémon quand leur propriétaire doit s'absenter.","4":"Tu peux nous confier certains de tes Pokémon si tu veux.","5":"Il y a aussi des Pokémon qui ne cherchent qu'à être adoptés !","6":"Leur type est banal alors ils n'intéressent pas les autres dresseurs..."}},"dresseur_piste_cyclable":{"defeat":{"0":"Allez, je mets les gaz, à plus gros naze !"},"start":{"0":"Allez gamin, aboule ton quatre heures ! J'ai faim !","1":"Essaie pas de fuir ! Mate un peu ma bécane !","2":"Tu n'iras pas loin avec ta petite bicyclette !"},"victory":{"0":"Raaah t'as rayé la carroserie ! Vite, au garage !"}},"dresseur_safrania":{"defeat":{"0":"La force brute ne vaut rien contre la puissance de l'intellect !"},"start":{"0":"Tu oses revenir ici ? Tu as perdu l'esprit ?","1":"Nous autres adeptes Psy nous battons à la force du mental !","2":"Ma puissance va te faire tourner la tête !"},"victory":{"0":"Tu m'as donné la migraine !"}},"dresseur_tour_pokemon":{"defeat":{"0":"Ça... ? Ça a marché ?","1":"Les démons ne prennent pas les coups d'habitude..."},"start":{"0":"Arrière, démon !!!"},"victory":{"0":"AaAaaaAaaah !!! Fuyez pour vos vies !!!"}},"erika":{"defeat":{"0":"Perdre fait toujours un peu mal mais...","1":"Combattre un bon adversaire est stimulant... ","2":"Allez, ne reste pas planté là !"},"start":{"0":"Bonjour et sois le bienvenu. Il fait beau, n'est-ce pas?","1":"J'aime la vie. J'aime les fleurs et les chansons. C'est chou, non?","2":"Moi, c'est ERIKA, la Championne de l'arène de Céladopole.","3":"L'arrangement floral est ma spécialité.","4":"Mes Pokémon sont du type plante.","5":"Il fit grand froid hier, alors j'ai mis un pull.","6":"Hein? Tu veux te battre? Bah... Dis-le, mon vieux !","7":"Tu sais quoi? Tu vas perdre!"},"victory":{"0":"Oh! J'ai perdu? Bien joué. C'est mérité.","1":"Je te confie le BADGE PRISME.","2":"Chaque badge obtenu te fait affronter des Pokémon plus forts.","3":"Tu l'avais remarqué ?"}},"evolve":"{{old}} évolue en {{new}} !","exitlab":{"0":"Le prof Chen m'a promis de me confier mon premier Pokémon aujourd'hui.","1":"Je ne compte pas repartir d'ici sans lui !"},"find":"trouvez","giovanni":{"defeat":{"0":"Tu élèves tes Pokémon trop soigneusement.","1":"Un gosse comme toi ne peut pas comprendre mes plans !"},"start":{"0":"Je dois dire que je suis surpris que tu sois arrivé jusqu'ici !","1":"Te voici dans mon repaire ! Je compte reformer la Team Rocket ici !","2":"Tu oses me défier, moi, le grand Giovanni ? Tu vas déguster !"},"victory":{"0":"Ah ! Voilà ce que j'appelle du combat ! Tu as gagné !","1":"En récompense voici le badge Terre !","2":"Une fois les 8 badges obtenus, tu peux te confronter à la Ligue Pokémon.","3":"Tu peux y accéder par la Route Victoire à l'ouest d'ici.","4":"Je ne suis pas digne d'être le chef de la Team Rocket !","5":"Ainsi, son existence s'achève avec ma défaite !","6":"Je vais me retirer, loin, en ermite, pour étudier les Pokémon !","7":"Un jour, nos chemins se croiseront à nouveau ! Adieu !"}},"guide":{"argenta":{"0":"La montagne qui culmine au dessus d'Argenta est le Mont Sélénite.","1":"Il s'agit d'une des régions les plus anciennes de Kanto !","2":"On dit qu'on peut y trouver de nombreux fossiles de Pokémon disparus.","3":"Imagine si on pouvait leur redonner vie..."},"azuria":{"0":"Ce bateau, là, c'est l'Océane !","1":"Il est beau, hein ?","2":"Il va en croisière permanente entre Azuria, Carmin sur Mer et Cramois'Île.","3":"Si tu veux monter dedans au bon moment, tu devrais mémoriser ce trajet !"},"carmin":{"0":"J'ai pris le raccourci de la Cave Taupiqueur pour venir ici plus vite.","1":"Mais j'ai quand même raté le départ du bateau, alors j'attends ici..."},"celadopole":{"0":"La Colline Royale qui surplombe Céladopole est un endroit légendaire.","1":"On raconte qu'on peut y croiser des Pokémons Dragon !","2":"Mais le chemin est bloqué par un énorme Pokémon endormi...","3":"Si seulement on trouvait un moyen de le réveiller..."},"cramoisile":{"0":"Je travaille au Laboratoire d'étude des Pokémon du Dr. Fuji.","1":"J'étudie les fossiles rares de Pokémon.","2":"Comment ? Tu as trouvé un fossile ?","3":"Montre-le moi, allez montre-le !","4":"Incroyable ! Il est en parfait état !","5":"Je pourrais peut-être même... le ramener à la vie !","6":"Tu veux bien me le confier ?","7":"Excellent ! Je reviens vite !","8":"Incroyable !","9":"C'est un {{name}} ! Je les croyais disparus !","10":"Hmm ? Quoi ?","11":"Ah, oui, je suppose qu'il est à toi...","12":"Vous recevez un {{ name }} ramené à la vie !\`,","13":"Reviens me voir si tu trouves d'autres spécimens !","14":"Mais... mais... c'est pour la science !","15":"J'ai conçu une machine de résurrection des fossiles Pokémon !","16":"Mais je n'ai pas encore de spécimens d'assez bonne qualité."},"jadielle":{"0":"J'ai voulu aller sur la route Victoire à l'ouest, mais on ne m'a pas laissé passer...","1":"Seuls ceux qui ont les huit badges d'arène peuvent accéder au plateau Indigo.","2":"C'est pas juste ! Je veux aller voir les Champions de la Ligue !"},"lavanville":{"0":"Lavanville est une ville plutôt tranquille, coincée entre les montagnes...","1":"Mais il y a quelques lieux d'intérêt, comme la Tour Pokémon ou la Centrale."},"ligue":{"0":"Ah, alors tu veux des infos sur les Champions de la Ligue ?","1":"Pour prétendre au titre de maître de la Ligue Pokémon,","2":"tu devras affronter les 4 membres du Conseil des 4 l'un après l'autre.","3":"Tout d'abord tu affronteras Olga, la reine de la glace !","4":"Débarasse-toi en rapidement avec que ton équipe soit transformée en glaçon.","5":"Ensuite vient Aldo, spécialiste du combat et de la force brute.","6":"Ses Pokémon sont costauds, il va falloir ruser pour le vaincre !","7":"En troisième, la terrifiante Agatha et ses Pokémon Spectre !","8":"Ils sèment la confusion dans ton équipe, alors peaufine ton placement.","9":"Enfin tu affronteras Peter, maître des Dragons.","10":"Les Dragons sont très tenaces. Il te faudra donner tout ce que tu as !","11":"Voilà, je ne sais pas ce qu'il y a après. Je n'ai jamais pu aller plus loin !","12":"Ah, je croyais que... non, laisse tomber."},"parmanie":{"0":"Le Parc Safari est la grande attraction de Parmanie.","1":"Il attire plein de dresseurs Pokémon de tout Kanto !","2":"On y trouve une grande variété de Pokémon de tous types.","3":"Mais les combats y sont interdits pour préserver leur tranquilité."},"safrania":{"0":"J'ai laissé mon Pokémon à la Pension au nord pendant quelques jours.","1":"Je l'ai retrouvé en pleine forme, plus fort que jamais !","2":"L'éleveur de la Pension fait vraiment un travail remarquable."}},"healer":{"0":"Les combats dans la Ligue sont très éprouvants pour tes Pokémon.","1":"Mais nous prenons soin de soigner toute ton équipe entre chaque combat."},"hector":{"defeat":{"0":"Les Pokémon insecte ont des talents cachés.","1":"Il faudra encore du temps pour tous les découvrir.","2":"Étudies-les minutieusement."},"start":{"0":"Tiens, tu as trouvé mon camp ? Moi, c'est Hector!","1":"Je suis venu étudier les Pokémon Insecte de cette région.","2":"Personne ne connait mieux les Pokémon Insecte que moi!","3":"Quand je serai adulte, je serai un grand expert en Pokémon Insecte!","4":"Tu veux que je te montre ?","5":"Prépare toi à admirer le résultat de mes recherches!"},"victory":{"0":"Wah, Ça alors ! Tu connais vraiment bien les Pokémon !","1":"Ah, j'ai encore beaucoup à apprendre! ... ","2":"Oui, je sais ! Prends mon filet à insecte comme récompense !","3":"Tu verras, il te sera très utile !","4":"Bien, je vais lever le camp. J'ai fini ce que j'avais à faire ici.","5":"Ce coin regorge de Pokémon exotiques, tu devrais y repasser !"}},"item_no_use":"Ça ne marchera pas ici...","item_received":"Vous {{verb}}: {{label}} {{quantity}}","item_use":"Utiliser {{item}} ?","koga":{"defeat":{"0":"Ha ha ! Il est temps de t'apprendre que certains Pokémon","1":"ne peuvent pas être vaincus par la force pure !"},"start":{"0":"Gwahahaha ! Un nain ose me défier ?","1":"Moi, le grand le beau le terrible Koga ?","2":"Par l'enfer, par le sang, par l'acier, j'vais gagner !","3":"Puisse la poigne de mes poisons pétrifier de peur tes petits Pokémon !"},"victory":{"0":"Gwaha... heu ? Tu as prouvé ta valeur !","1":"Ouvre ta mimine, car voici... le BADGE ÂME !","2":"J'ai combattu de toutes mes forces...","3":"Mais... Je ne suis pas assez fort.","4":"Va dans la prochaine arène ! Explore tes limites !","5":"Bonne chance !"}},"levelup":"{{name}} passe au niveau {{level}}","mom":{"after_gift":"Bon courage dans ton aventure !","gift1":"Tiens, avant que tu partes... J'ai retrouvé ça sous ton lit.","gift10":"Elle permet d'ajouter un nouveau type à un de tes Pokémon !","gift11":"J'espère que ça te sera utile.","gift12":"Tu es parti depuis un bon moment. Tu t'es fait de nouveaux amis ?","gift13":"Je suis passée au magasin et j'ai trouvé quelque-chose pour toi.","gift14":"Le vendeur m'a dit que tous les meilleurs dresseurs en avaient un !","gift15":"Mais il faut bien choisir le Pokémon à qui le donner.","gift16":"Cela fait si longtemps que tu as quitté la maison !","gift17":"Tu dois avoir beaucoup d'histoires à raconter.","gift18":"Pour ton retour, je voudrais t'offrir un cadeau:","gift19":"Toutes les économies y sont passées ! Mais c'est une occasion spéciale.","gift2":"Tu n'es pas parti longtemps. Comment ça va ?","gift20":"Tu es si proche de ton but ! Je crois en toi mon chéri !","gift3":"J'ai cueilli des baies au jardin. Tes Pokémon vont adorer !","gift4":"Comment se passe ton aventure ?","gift5":"Tiens, j'ai trouvé ça pour toi au Labo du Prof Chen.","gift6":"Le voyage se passe bien ?","gift7":"As-tu capturé beaucoup de Pokémon ?","gift8":"Tiens, j'ai quelque-chose à t'offrir.","gift9":"C'est une gemme très rare.","hello":"Bonjour, mon chéri !"},"morgane":{"defeat":{"0":"C'est exactement ce que j'avais prédit."},"start":{"0":"J'avais prédit ton arrivée !","1":"J'ai des pouvoirs psychiques depuis l'enfance.","2":"J'ai appris à plier les cuillères par la force de mon esprit.","3":"C'est pas super utile, mais ça en jette !","4":"Je n'aime pas les combats, mais si tu insistes, je vais te montrer mes pouvoirs !"},"victory":{"0":"Ha! Je suis surprise ! Tu as gagné.","1":"C'est vrai, je n'ai pas fait de mon mieux !","2":"Tu mérites ta victoire ! Tu gagnes le BADGE MARAIS !","3":"Le Badge Marais renforce les pouvoirs occultes...","4":"Et ça... C'est pas de la gnognotte.","5":"Tu deviendras un Maître ! Je le sens !"}},"mr_psy":{"defeat":{"0":"Quelle déception !","1":"Reviens me voir et je te laisserai capturer d'autres Pokémon Psy","2":"Ton équipe a besoin d'améliorer son mental !"},"start":{"0":"Ah, te revoilà ! Alors, as-tu entraîné le mental de tes Pokémon ?","1":"C'est l'heure de... l'évaluation !"},"victory":{"0":"C'est un 10/10 ! Tu es diplômé de l'école de Monsieur Psy !"}},"olga":{"defeat":{"0":"Comment as-tu ozé venir ici ?"},"start":{"0":"Bienvenue à la Ligue Pokémon !","1":"Je zuis Olga du Conzeil des 4 !","2":"Je zuis la maîtrezze des Pokémon de glaze !","3":"Et la glaze... Z'est drop fort !","4":"Tes Pokémon zeront à ma merzi une fois gelés !","5":"Ach ! Ach ! Ach ! Z'est parti !"},"victory":{"0":"Tu es fort. Z'est bien.","1":"Mais la Ligue Pokémon te rézerve d'autre zurprizes !"}},"ondine":{"defeat":{"0":"Haha, on dirait que ton équipe a pris l'eau !","1":"Il va te falloir trouver une autre tactique."},"start":{"0":"Salut ! T'es un nouveau ?","1":"Si tu veux être un vrai dresseur, il te faut une stratégie !","2":"C'est quoi ta tactique pour capturer les Pokémon sauvages ?","3":"Moi je leur fonce dans le tas avec mes Pokémon aquatiques !"},"victory":{"0":"Whouha ! T'es super fort ! Très bien !","1":"Je te donne le BADGE CASCADE pour m'avoir battue!","2":"Ce badge t'ouvre le chemin vers la grotte au nord d'Azuria."}},"peter":{"defeat":{"0":"Je n'abandonne jamais. Et toi ?"},"start":{"0":"Ah ! Enfin... J'ai entendu parler de toi !","1":"Je règne sur le Conseil des 4 !","2":"Mon nom est Peter le Dresseur de Dragons !","3":"Les dragons sont des Pokémon mystiques !","4":"Les capturer et les entraîner est difficile mais leurs pouvoirs sont supérieurs !","5":"Ils sont presque invincibles !","6":"Le glas de la défaite et de la honte sonne pour toi...","7":"L'entends-tu ?"},"victory":{"0":"Comment mes dragons ont-il pu succomber à tes attaques?","1":"Tu es désormais le Maître de la Ligue Pokémon !","2":"Enfin... Pas tout à fait.","3":"Une épreuve doit encore t'être imposée...","4":"Un autre grand Dresseur t'attend.","5":"Il a vaincu le Conseil des 4 avant toi !","6":"C'est le vrai Maître de la Ligue Pokémon !"}},"pierre":{"defeat":{"0":"Tes Pokémon n'ont pas pu passer ma défense de pierre...","1":"Entraîne-les et reviens m'affronter quand tu seras assez fort."},"start":{"0":"Je suis Pierre ! Je suis le Champion d'Argenta !","1":"Je crois en la grande résistance de la pierre !","2":"C'est pourquoi mes Pokémon sont des élémentaires de pierre !","3":"Tu veux toujours te battre avec moi ? Très bien. En garde !"},"victory":{"0":"Hmm... Beau combat.","1":"Tu sembles être un Dresseur d'exception !","2":"En reconnaissance de ta victoire, voici le BADGE ROCHE !","3":"C'est un Badge officiel de la Ligue Pokémon !","4":"Il t'en faudra huit pour pouvoir affronter le Conseil des 4."}},"receive":"recevez","relacher":"Relâcher {{name}} et récupérer {{cost}} Pokéball ?","rival":{"defeat":{"0":"Tu m'as amusé un peu !","1":"T'es vraiment un minable !","2":"Mais je crois que tu commences à le savoir, minable!"},"start":{"0":"Salut minable. Je t'attends depuis une bonne plombe !","1":"Ton devoir en tant que rival est d'entraîner mes Pokémon.","2":"En améliorant mon Pokédex, j'ai recherché les Pokémon surpuissants!","3":"J'ai créé l'équipe ultime, efficace contre tous les types de Pokémon!","4":"Ça t'épate, hein ?","5":"Je suis le Maître! Tu sais c'que ça veut dire?","6":"Je suis le dresseur le plus puissant du monde! Yaaa!"},"victory":{"0":"Qu... Comm... Hein? Moi? Pourquoi? WHAAAAAAAAAAA!","1":"J'ai entraîné mes Pokémon à la perfection... Et zut alors!","2":"Tu es le nouveau Maître! Alors ça... Ça me la coupe"}},"sally":{"defeat":{"0":"C'est beau, l'énergie de la jeunesse.","1":"Mais la puissance des attaques ne fait pas tout...","2":"Commencerais-tu enfin à comprendre ce qu'est la féérie ?"},"start":{"0":"Tiens, tiens. J'ai entendu parler de toi, mon enfant.","1":"Je suis Sally, la championne d'arène de Corrifey de la région de Galar.","2":"Je suis venu à Lavanville pour rendre visite à un vieil ami...","3":"Cet endroit a quelque-chose de féérique à mes yeux.","4":"Bien, que dirais-tu d'un combat ?","5":"Ça m'intéresserait de voir comment tu te bats..."},"victory":{"0":"Félicitations pour cette victoire! Je me suis follement amusée !","1":"Même si j'ai passé l’âge pour ce genre de choses...","2":"Tu me rappelles mon mari dans ces jeunes années.","3":"Tu sais quoi ? Tu devrais prendre ce parapluie.","4":"Il m'a été très utile lors de mes voyages","5":"Allez, ouste ! Tu as une Ligue à affronter !"}},"salut":"Salut ?","sbire_rocket":{"defeat":{"0":"Mouahaha ! C'est la renaissance de la team Rocket !"},"start":{"0":"Giovanni est peut-être parti, mais la Team Rocket ne meurt jamais !","1":"J'ai bien l'intention de prendre sa place ! A l'attaque !"},"victory":{"0":"La Team Rocket s'envole vers d'autres cieux ! "}},"sbire_rocket_tuto":{"defeat":{"0":"Allez, dégage d'ici minus, et reviens quand tu auras une vraie équipe !"},"start":{"0":"Eh toi là, qu'est-ce que tu fiches ici ?","1":"Ici c'est le territoire de Giovanni, notre chef et maître de l'arène !","2":"Quoi ? Tu comptes te mesurer à lui ? Laisse-moi rire !","3":"Je vais te montrer la puissance de la Team Rocket !"},"victory":{"0":"Hmpff ! Tu es plus coriace que tu en as l'air... ","1":"Mais ça ne change rien ! Giovanni va te régler ton compte !","2":"Reviens plus tard quand tu auras une vraie équipe."}},"sellerf":{"hello":"Bonjour ! Que désirez-vous ?"},"sellerm":{"hello":"Bonjour ! Quelque-chose vous intéresse ?"},"shop":{"confirm_one":"1 {{item}} pour {{count}} ball, c'est ça ?","confirm_other":"1 {{item}} pour {{count}} balls, c'est ça ?","nomoney":"Tu n'as pas assez de Pokéballs, gamin !"},"sleeping_pokemon":{"0":"Un Pokémon endormi bloque le chemin.","1":"Le réveiller avec la Poké Flute ?"},"starter":{"after":"J'aurais peut-être dû prendre {{name}}...","choose":"Choisir {{name}} comme starter ?","chosen":"Vous choisissez {{name}} !"},"trader":{"aftertrade":"Trop cool, un {{name}} !","nopokemon":{"0":"Salut, tu veux échanger des Pokémon ?","1":"Si tu as des Pokémon en réserve dans ta box, on peut se les échanger !"},"tradeaccepted":"Vous échangez {{ given }} contre {{ received }} !","tradepropose":"Salut, tu veux échanger ton {{ given }} contre mon {{ received }} ?","traderefused":"Ah, bon tant pis."}}`),tm={caught:"Pris: {{number}}",duree:"Durée jeu: {{duree}} tours",seen:"Vus: {{number}}"},em={controls:"Contrôles",description:{0:"Pokéchess est le prototype de jeu sur lequel Curry travaillait avant de rejoindre le projet Pokemon Auto Chess. Il s'agit d'un remake fangame de Pokemon Rouge/Bleu en tant qu'autobattler.",1:"Bien que le jeu simule le format et le style d'une gameboy pour jouer sur la corde de la nostalgie, il ne respecte pas la résolution et les contraintes matérielles de la Gameboy Color, et le jeu est également jouable au clavier, à la manette ou à la souris pour plus de commodité.",2:"Votre progression est automatiquement sauvegardée chaque fois que vous arrivez sur l'écran de la carte du monde.",3:"Ce projet a rapidement montré les limites du format gameboy pour un genre aussi complexe que l'autobattler, mais a également permis d'explorer certaines idées qui ont été utilisées par la suite dans Pokémon Auto Chess."},gamepad:"Manette",keyboard:"Clavier",language:"Langue",mouse:"Souris",music:"Musique",sfx:"Effets sonores",volume:"Volume"},im={"attaque+":"Attaque+",baie_ceriz:"Baie Ceriz",baie_mepo:"Baie Mepo",baie_oran:"Baie Oran",baie_sitrus:"Baie Sitrus",boule_fumee:"Boule Fumée","defense+":"Défense+",encens_fleur:"Encens Fleur",filet:"Filet d'Hector",fossile_amonita:"Nautile",fossile_kabuto:"Fossile Dôme",fossile_ptera:"Vieil Ambre",gemme_ciel:"Gemme Ciel",gemme_draco:"Gemme Draco",gemme_flamme:"Gemme Flamme",gemme_glace:"Gemme Glace",gemme_grise:"Gemme Grise",gemme_herbe:"Gemme Herbe",gemme_hydro:"Gemme Hydro",gemme_insecte:"Gemme Insecte",gemme_ombre:"Gemme Ombre",gemme_pixie:"Gemme Pixie",gemme_poing:"Gemme Poing",gemme_psy:"Gemme Psy",gemme_roc:"Gemme Roc",gemme_terre:"Gemme Terre",gemme_toxic:"Gemme Toxic",gemme_volt:"Gemme Volt",grelot_coque:"Grelot Coque",max_elixir:"Max Elixir",multi_exp:"Multi Exp",orbe_flamme:"Orbe Flamme",orbe_foudre:"Orbe Foudre",orbe_toxique:"Orbe Toxique",parapluie:"Parapluie de Sally",pokeball:"Pokéball",pokeflute:"Pokéflute","pv+":"PV Plus",repousse:"Repousse",super_bonbon:"Super Bonbon","vitesse+":"Vitesse+"},sm={"attaque+":"+20% Attaque",baie_ceriz:"Consommé à la première altération subie - Soigne les altérations pendant 10 secondes",baie_mepo:"Consommé au premier coup reçu - Gagne 2PP supplémentaires par coup reçu",baie_oran:"Def +30% - Consommé quand les PV tombent sous les 50% la première fois",baie_sitrus:"Soigne 25% des PV max - Consommé quand les PV tombent sous les 50% la première fois",boule_fumee:"Rend le Pokémon impossible à cibler pendant 3s quand les PV tombent sous les 30%","defense+":"+20% Défense",encens_fleur:"Soigne chaque seconde 1% des PV max du porteur et des alliés sur une case adjacente",filet:"Récupère une Pokéball par Pokémon éliminé par son porteur",fossile_amonita:"Un fossile de Pokémon antique en forme d'escargot",fossile_kabuto:"Un fossile de Pokémon antique en forme de carapace",fossile_ptera:"Un fossile de Pokémon antique en forme d'oeuf",gemme_ciel:"Donne le type Vol au porteur",gemme_draco:"Donne le type Dragon au porteur",gemme_flamme:"Donne le type Feu au porteur",gemme_glace:"Donne le type Glace au porteur",gemme_grise:"Donne le type Normal au porteur",gemme_herbe:"Donne le type Plante au porteur",gemme_hydro:"Donne le type Eau au porteur",gemme_insecte:"Donne le type Insecte au porteur",gemme_ombre:"Donne le type Spectre au porteur",gemme_pixie:"Donne le type Fée au porteur",gemme_poing:"Donne le type Combat au porteur",gemme_psy:"Donne le type Psy au porteur",gemme_roc:"Donne le type Roche au porteur",gemme_terre:"Donne le type Sol au porteur",gemme_toxic:"Donne le type Poison au porteur",gemme_volt:"Donne le type Électrique au porteur",grelot_coque:"Restaure 20% des dégâts infligés en PV",max_elixir:"Gagne 4PP à chaque attaque",multi_exp:"Augmente les gains d'expérience de 30%",orbe_flamme:"Inflige l'altération Brûlure à chaque coup reçu ou porté",orbe_foudre:"Inflige l'altération Paralysie à chaque coup reçu ou porté",orbe_toxique:"Inflige l'altération Poison à chaque coup reçu ou porté",parapluie:"Protège le porteur de toutes les altérations",pokeball:"L'outil de capture de tout dresseur et monnaie d'échange dans les magasins",pokeflute:"Réveille les Pokémon les plus profondément endormis","pv+":"+20% PV",repousse:"Fait fuir les Pokémon sauvages et en ramène de nouveaux",super_bonbon:"Gagne un niveau supplémentaire à chaque fin de combat","vitesse+":"+20% Vitesse"},nm={change_place:"Changer d'endroit",no_item:"{{ name }} ne tient pas d'objet",quit:"Quitter",release_pokemon:"Libérer {{name}}",remove_pokemon:"Retirer {{name}}",retrieve_item:"Récupérer {{item}}",see_pokemon:"Voir {{name}}",stock_item:"Ranger {{item}}"},rm="Nouvelle partie",am="NON",om="Pokédex",lm={abo:"Abo",abra:"Abra",aeromite:"Aéromite",akwakwak:"Akwakwak",alakazam:"Alakazam",amonistar:"Amonistar",amonita:"Amonita",aquali:"Aquali",arbok:"Arbok",arcanin:"Arcanin",artikodin:"Artikodin",aspicot:"Aspicot",boustiflor:"Boustiflor",bulbizarre:"Bulbizarre",canarticho:"Canarticho",caninos:"Caninos",carabaffe:"Carabaffe",carapuce:"Carapuce",chenipan:"Chenipan",chetiflor:"Chétiflor",chrysacier:"Chrysacier",coconfort:"Coconfort",colossinge:"Colossinge",crustabri:"Crustabri",dardargnan:"Dardargnan",dodrio:"Dodrio",doduo:"Doduo",dracaufeu:"Dracaufeu",draco:"Draco",dracolosse:"Dracolosse",ectoplasma:"Ectoplasma",electhor:"Electhor",electrode:"Electrode",elektek:"Elektek",empiflor:"Empiflor",evoli:"Evoli",excelangue:"Excelangue",fantominus:"Fantominus",ferosinge:"Férosinge",feunard:"Feunard",flagadoss:"Flagadoss",florizarre:"Florizarre",galopa:"Galopa",goupix:"Goupix",gravalanch:"Gravalanch",grodoudou:"Grodoudou",grolem:"Grolem",grotadmorv:"Grotadmorv",herbizarre:"Herbizarre",hypnomade:"Hypnomade",hypocean:"Hypocean",hypotrempe:"Hypotrempe",insecateur:"Insecateur",kabuto:"Kabuto",kabutops:"Kabutops",kadabra:"Kadabra",kangourex:"Kangourex",kicklee:"Kicklee",kokiyas:"Kokiyas",krabboss:"Krabboss",krabby:"Krabby",lamantine:"Lamantine",leveinard:"Leveinard",leviator:"Leviator",lippoutou:"Lippoutou",lokhlass:"Lokhlass",machoc:"Machoc",machopeur:"Machopeur",mackogneur:"Mackogneur",magicarpe:"Magicarpe",magmar:"Magmar",magneti:"Magneti",magneton:"Magneton",melodelfe:"Mélodelfe",melofee:"Mélofée",metamorph:"Metamorph",mew:"Mew",mewtwo:"Mewtwo",miaouss:"Miaouss",mimitoss:"Mimitoss",minidraco:"Minidraco",mrmime:"Mr. Mime",mystherbe:"Mystherbe",nidoking:"Nidoking",nidoqueen:"Nidoqueen",nidoranf:"Nidoran ♀",nidoranm:"Nidoran ♂",nidorina:"Nidorina",nidorino:"Nidorino",noadkoko:"Noadkoko",noeufnoeuf:"Noeufnoeuf",nosferalto:"Nosferalto",nosferapti:"Nosferapti",onix:"Onix",ortide:"Ortide",ossatueur:"Ossatueur",osselait:"Osselait",otaria:"Otaria",papillusion:"Papilusion",paras:"Paras",parasect:"Parasect",persian:"Persian",piafabec:"Piafabec",pikachu:"Pikachu",poissirene:"Poissirène",poissoroy:"Poissoroy",ponyta:"Ponyta",porygon:"Porygon",psykokwak:"Psykokwak",ptera:"Ptéra",ptitard:"Ptitard",pyroli:"Pyroli",racaillou:"Racaillou",rafflesia:"Rafflesia",raichu:"Raichu",ramoloss:"Ramoloss",rapasdepic:"Rapasdepic",rattata:"Rattata",rattatac:"Rattatac",reptincel:"Reptincel",rhinocorne:"Rhinocorne",rhinoferos:"Rhinoféros",rondoudou:"Rondoudou",ronflex:"Ronflex",roucarnage:"Roucarnage",roucool:"Roucool",roucoups:"Roucoups",sabelette:"Sabelette",sablaireau:"Sablaireau",salameche:"Salamèche",saquedeneu:"Saquedeneu",scarabrute:"Scarabrute",smogo:"Smogo",smogogo:"Smogogo",soporifik:"Soporifik",spectrum:"Spectrum",stari:"Stari",staross:"Staross",sulfura:"Sulfura",tadmorv:"Tadmorv",tartard:"Tartard",taupiqueur:"Taupiqueur",tauros:"Tauros",tentacool:"Tentacool",tentacruel:"Tentacruel",tetarte:"Tetarte",tortank:"Tortank",triopikeur:"Triopikeur",tygnon:"Tygnon",voltali:"Voltali",voltorbe:"Voltorbe"},hm={home:"Maison",ligueendroom:"Ligue Indigo - Panthéon",oaklab:"Laboratoire de Chen"},um={abri:"Abri",acide:"Acide",adaptation:"Adaptation",amnesie:"Amnésie",armure:"Armure",balayage:"Balayage",belier:"Bélier",berceuse:"Berceuse",blizzard:"Blizzard",bomb_beurk:"Bomb Beurk",bomb_oeuf:"Bomb'Œuf",brouillard:"Brouillard",bulles_d_o:"Bulles d'O",cage_eclair:"Cage-Éclair",cascade:"Cascade",charge:"Charge",choc_mental:"Choc Mental",coud_boue:"Coud'Boue",croc_de_mort:"Croc de Mort",crochet_venin:"Crochet Venin",crocs_feu:"Crocs Feu",cruaile:"Cru-Ailes",danse_flammes:"Danse-Flammes",danse_lames:"Danse-Lames",dard_venin:"Dard-Venin",deflagration:"Déflagration",destruction:"Destruction",detritus:"Détritus",devoreve:"Dévorêve",double_pied:"Double-Pied",dracocharge:"Dracocharge",dracorage:"Draco-Rage",e_coque:"E-Coque",eclair:"Éclair",eclat_glace:"Éclats Glace",empal_korne:"Empal'Korne",encore:"Encore",etincelle:"Étincelle",evolution:"Évolution",fatal_foudre:"Fatal Foudre",flammeche:"Flammèche",fouet_lianes:"Fouet-Lianes",furie:"Furie",griffe:"Griffe",grobisou:"Grobisou",guillotine:"Guillotine",hate:"Hâte",hydrocanon:"Hydrocanon",hypnose:"Hypnose",jackpot:"Jackpot",jet_de_sable:"Jet de Sable",jet_pierres:"Jet-Pierres",koud_korne:"Koud'Korne",lance_flammes:"Lance-Flammes",lance_soleil:"Lance-Soleil",laser_glace:"Laser Glace",lechouille:"Léchouille",ligotage:"Ligotage",massdos:"Massd'Os",mawashi_geri:"Mawashi Geri",meteores:"Météores",metronome:"Métronome",morphing:"Morphing",morsure:"Morsure",nitrocharge:"Nitrocharge",ouragan:"Ouragan",paraspore:"Para Spore",picpic:"Picpic",pilonnage:"Pilonnage",pince_masse:"Pince-Masse",piqure:"Piqûre",pistolet_a_o:"Pistolet à O",poing_karate:"Poing-Karaté",poudre_dodo:"Poudre Dodo",poudre_toxik:"Poudre Toxik",poudreuse:"Poudreuse",pouvoir_antique:"Pouvoir Antique",pouvoir_lunaire:"Pouvoir Lunaire",provoc:"Provoc",psyko:"Psyko",rafale_psy:"Rafale Psy",repos:"Repos",rugissement:"Rugissement",secretion:"Sécrétion",surf:"Surf",teleport:"Téléport",tonnerre:"Tonnerre",torgnoles:"Torgnoles",trempette:"Trempette",triplattaque:"Triplattaque",tunnel:"Tunnel",ultimapoing:"Ultimapoing",ultralaser:"Ultralaser",ultrason:"Ultrason",vampirisme:"Vampirisme",vive_attaque:"Vive-Attaque",vol_vie:"Vol-Vie"},fm={abri:"Rend le lanceur invulnérable pendant un court instant",acide:"Jet de suc gastrique réduisant fortement la défense des cibles",adaptation:"Remplace temporairement son type par celui des attaques reçues",amnesie:"Soigne toutes les altérations actuelles du lanceur",armure:"Augmente la défense du lanceur jusqu'à la fin du combat - Accumulable",balayage:"Attaque large pouvant toucher jusqu'à 3 adversaires en face",belier:"Une violente charge qui blesse également le lanceur",berceuse:"Endort les adversaires autour du lanceur",blizzard:"Gèle tous les adversaires et fait tomber une pluie de grêlons dévastateurs",bomb_beurk:"Bombe toxique empoisonnant la zone où elle tombe",bomb_oeuf:"Lance un oeuf explosif infligeant des dégâts dans une large zone",brouillard:"Réduit la précision des adversaires autour du lanceur",cage_eclair:"Paralyse tous les adversaires autour du lanceur",cascade:"Fait tomber une trombe d'eau qui repousse l'adversaire",coud_boue:"Réduit la précision de la cible",croc_de_mort:"Puissante morsure qui apeure la cible pendant 3 secondes",crocs_feu:"Une morsure infligeant de grosses brulures",danse_flammes:"Inflige des brûlures à tous les adversaires autour du lanceur",danse_lames:"Attaque circulaire infligeant des dégâts à tous les adversaires autour",deflagration:"Enflamme tout le terrain et déclenche des éruptions sur 8 cases aléatoires",destruction:"Autodestruction pulvérisant tout aux alentours",devoreve:"Appeure l'adversaire avec des visions de cauchemar",dracorage:"Invoque une tempête qui inflige des dégâts bruts dans la zone",e_coque:"Libère un oeuf magique qui soigne toute votre équipe",eclair:"La foudre s'abat sur un Pokémon adverse tiré au hasard",empal_korne:"Empale la cible avec une stalagmite surgissant du sol",encore:"Reproduit la dernière attaque spéciale observée sur le terrain",evolution:"Evolue temporairement en Pyroli, Voltali ou Aquali selon le type de la cible",fatal_foudre:"Fait tomber la foudre sur 3 ennemis et paralyse tous les autres",furie:"Augmente l'attaque du lanceur jusqu'à la fin du combat - Accumulable",grobisou:"Un bisou glacé qui gèle la cible temporairement",guillotine:"Coup mortel exécutant l'adversaire s'il a moins de 30% de ses PV max",hate:"Augmente la vitesse du lanceur jusqu'à la fin du combat - Accumulable",hydrocanon:"Geyser propulsant l'adversaire dans les airs",hypnose:"Endort profondément la cible",jackpot:"A 50% de chance de vous rapporter une Pokéball",jet_de_sable:"Aveugle l'ennemi et réduit sa précision de 50% pendant 8 secondes",lance_flammes:"Jet de flammes infligeant de grosses brulures à la cible",lance_soleil:"Absorbe l'énergie solaire puis la relâche en un puissant orbe",laser_glace:"Gèle les adversaires un court instant sur une ligne droite",ligotage:"Empêche la cible de bouger et inflige des dégâts sur la durée",mawashi_geri:"Un coup de pied circulaire qui touche également l'adversaire derrière le lanceur",meteores:"Une pluie d'étoiles qui touche à tous les coups",metronome:"Déclenche une capacité aléatoire parmi toutes celles existantes",morphing:"Se transforme en une copie du Pokémon cible - Garde le même niveau et objet",nitrocharge:"Une violente charge enflammée qui blesse également le lanceur",ouragan:"Une tornade soulevant tous les adversaires sur son passage",paraspore:"Nuage de spores qui paralyse tous les adversaires autour du lanceur",poudre_dodo:"Projète un somnifère qui endort tous les adversaires autour",poudre_toxik:"Toxines empoisonnant tous les adversaires autour du lanceur",pouvoir_antique:"Une attaque préhistorique qui augmente toutes les stats du lanceur",pouvoir_lunaire:"Provoque tous les adversaires dans un rayon de 2 cases",provoc:"Provoque tous les adversaires dans un rayon de 2 cases",psyko:"Rend confus toute l'équipe adverse pendant 4 secondes avant d'infliger de lourds dégâts Psy",rafale_psy:"Vague d'énergie Psy traversant les adversaires",repos:"S'endort et regagne une grosse partie de ses PV tant qu'il est endormi",rugissement:"Réduit temporairement l'attaque de tous les adversaires autour",secretion:"Crée un piège collant qui ralentit la vitesse de l'adversaire",surf:"Crée une vague géante qui emporte tout sur son passage",teleport:"Téléporte le lanceur sur une case aléatoire du plateau",tonnerre:"Inflige de gros dégâts électriques autour du lanceur",trempette:"Mais rien ne se passe.",tunnel:"Creuse un tunnel vers une case libre du plateau, attaquant par le sol au passage",ultimapoing:"Un uppercut dévastateur",ultralaser:"Un laser surpuissant qui pulvérise tout sur une ligne droite",ultrason:"Onde sonore rendant confus les Pokémon touchés"},dm={agatha:"Agatha",aldo:"Aldo",assistant_tuto:"Assistant du Prof Chen",auguste:"Auguste",major_bob:"Major Bob",dresseur_argenta:"Roche le géologue",dresseur_azuria:"Anya la nageuse",dresseur_camp_nomade:"Nancy la scout",dresseur_carmin:"Elton le Rocker",dresseur_cave_taupiqueur:"Joe le Cambrioleur",dresseur_celadopole:"Valentine la Citadine",dresseur_centrale:"Bernard le mécano",dresseur_champs_verdoyants:"Isabelle la Fleuriste",dresseur_col_de_montagne:"Sébastien l'ornithologue",dresseur_colline_royale:"Norbert le Fan de Dragons",dresseur_cramoisile:"Isaac le Scientifique",dresseur_dojo:"Koichi le Karatéka",dresseur_falaises:"Maurice le Montagnard",dresseur_foret_jade:"Calvin le Gamin",dresseur_grotte_azuree:"Ugo le vieux sage",dresseur_iles_ecume:"Fabien le Pêcheur",dresseur_lavanville:"Henri le gentilhomme",dresseur_mont_braise:"Duo Ron & Mya les Casse-Cous",dresseur_mont_selenite:"Arthur le paléontologue",dresseur_oceane:"Firmin le Marin",dresseur_pension:"Gaël de la Pension",dresseur_piste_cyclable:"Karl le Loubard",dresseur_safrania:"Polo le Kinésiste",dresseur_tour_pokemon:"Gwen l'Exorciste",erika:"Erika",giovanni:"Giovanni",hector:"Hector",koga:"Koga",morgane:"Morgane",mr_psy:"Monsieur Psy",olga:"Olga",ondine:"Ondine",peter:"Peter",pierre:"Pierre",rival:"Blue",sally:"Sally",sbire_rocket:"Sbire Rocket"},cm={COMBAT:"Combat",DRAGON:"Dragon",EAU:"Eau",ELECTRIQUE:"Electrique",FEE:"Fée",FEU:"Feu",GLACE:"Glace",INSECTE:"Insecte",NORMAL:"Normal",PLANTE:"Plante",POISON:"Poison",PSY:"Psy",ROCHE:"Roche",SOL:"Sol",SPECTRE:"Spectre",VOL:"Vol"},vm="Vous avez vaincu {{trainer}} !",pm="Vos Pokémon gagnent {{xp}}xp",mm="OUI",gm={alliance_desc:jp,continue:"Continuer",defeat:Zp,descriptions:$p,destination:Qp,destination_subtext:qp,dialog:_p,gameover:tm,home:em,item:im,item_desc:sm,menu:nm,new_game:rm,no:am,pokedex:om,pokemon:lm,room:hm,skill:um,skill_desc:fm,trainer:dm,type:cm,victory:vm,victory_xp:pm,yes:mm},xm=Ee.use(hf).init({fallbackLng:"en",debug:!1,resources:{en:{translation:Jp},fr:{translation:gm}}}),V=Ee.t.bind(Ee),Uh=Ee,Ro=(E,A)=>Math.floor(Math.random()*(A-E))+E;let di=new AudioContext;function ym(E=440+Ro(-40,40),A={},C=.5){let{voice:R="sawtooth",pitch:F=30,resonance:B=25,volume:v=10}=A,y=di.currentTime,t=di.createOscillator();if(t.frequency.value=E+(F-55)*8,["sine","square","triangle","sawtooth"].includes(R))t.type=R;else if(R in Un)t.setPeriodicWave(Un[R]);else throw new Error(`Unknown voice "${R}". Did you load it first ?`);let h=di.createGain();h.connect(di.destination);let p=.01,a=.1;if(h.gain.cancelScheduledValues(y),h.gain.setValueAtTime(0,y),h.gain.linearRampToValueAtTime(v/100,y+p),h.gain.linearRampToValueAtTime(0,y+p+a),t.connect(h),B>0){let n=di.createGain();n.connect(di.destination);let r=.05+.01*(B/100),e=.02,s=.2+.25*(B/100),o=v/100*(B/200);n.gain.cancelScheduledValues(y),n.gain.setValueAtTime(0,y),n.gain.setValueAtTime(0,r+y),n.gain.linearRampToValueAtTime(o,y+r+e),n.gain.linearRampToValueAtTime(1e-5,y+r+e+s),t.connect(n)}t.start(0),t.stop(di.currentTime+C)}const Un={};async function Em(){return fetch("voices/index.json").then(E=>E.json())}async function Tm(E){return fetch(`voices/${E}.json`).then(A=>A.json()).then(A=>{let C=A.real.length,R=new Float32Array(C),F=new Float32Array(C);for(let B=0;B=4&&(t+=Ro(-R/4,R/4));let s=440+t+Ro(-R,R);p.push(setTimeout(()=>{ym(s,this.options,.5*h),this.pronouncedText+=n.slice(e*3,e{this.pronouncedText+=n,F&&F(this.pronouncedText,y)},y+1)),n.trim()){case"":y+=50*h,t=100-Math.min(R/30,1)*10;break;case",":case";":y+=400*h,t=100;break;case".":case"?":case"!":case` -`:y+=800*h;break;case"...":y+=1200*h;break}}p.push(setTimeout(()=>B&&B(E,y),y)),this.stop=function(){p.forEach(a=>clearTimeout(a)),B&&B(E,y)}}Object.assign(Xr,{loadVoice:Tm,loadVoicesList:Em,voices:Un});const vi=new Proxy({MUSIC_VOLUME:.2,SFX_VOLUME:.2},{get(E,A){return typeof A=="string"&&localStorage.getItem(A)!=null?JSON.parse(localStorage.getItem(A)):Reflect.get(E,A)},set(E,A,C){return typeof A=="string"&&localStorage.setItem(A,JSON.stringify(C)),Reflect.set(E,A,C)}});function Nt(E,A){const C=k.activeScene;C.cache.audio.has(E)||(C.load.audio(E,[A]),C.load.start())}function Fe(E,A={}){const C=k.activeScene;return new Promise((R,F)=>{var B,v;if(A=Object.assign({volume:vi.MUSIC_VOLUME},A),(B=k.music)!=null&&B.isPlaying){if(k.music.key===E)return;k.music.stop()}try{C.cache.audio.has(E)?(k.music=(v=k.activeScene)==null?void 0:v.sound.add(E,A),k.music.play(),k.music.on(Phaser.Sound.Events.COMPLETE,()=>R())):C.load.once("filecomplete",()=>Fe(E))}catch(y){F(y)}})}let mr=null;function Rs(E){var R;(R=k.music)==null||R.pause(),mr!=null&&mr.stop();const{sound:A,waitEnd:C}=zt(E);mr=A,C.then(()=>{var F;(F=k.music)==null||F.resume(),mr=null})}function zt(E,A={}){var R;A=Object.assign({volume:vi.SFX_VOLUME},A);const C=(R=k.activeScene)==null?void 0:R.sound.add(E,A);return C.play(),{sound:C,waitEnd:new Promise(F=>{C.on(Phaser.Sound.Events.COMPLETE,()=>F())})}}function Sm(){const E=document.getElementById("volume_music");E.value=(vi.MUSIC_VOLUME*100).toString(),E.onchange=()=>{var C;vi.MUSIC_VOLUME=+E.value/100,(C=k.music)==null||C.setVolume(vi.MUSIC_VOLUME)};const A=document.getElementById("volume_sfx");A.value=(vi.SFX_VOLUME*100).toString(),A.onchange=()=>{vi.SFX_VOLUME=+A.value/100}}function Am(E){var A;return Xr(E,Object.assign({onNote(C){var R;(R=k.activeDialog)==null||R.textSprite.setText(C)},onEnd(C){var R,F;(R=k.activeDialog)==null||R.textSprite.setText(C),(F=k.activeDialog)==null||delete F.speech}},(A=k.activeDialog)==null?void 0:A.voice,{volume:vi.SFX_VOLUME*100}))}function gt(E,A,C,R={}){return k.activeScene.add.text(E,A,C,{align:"left",color:"black",fontSize:"12px",fontFamily:"Pokemon",strokeThickness:0,shadow:{offsetX:0,offsetY:0,color:"#000",blur:0,stroke:!1,fill:!1},...R}).setScrollFactor(0)}const Cm={steps:[{numberRequired:2,ref:"COMBAT2"},{numberRequired:4,ref:"COMBAT4"},{numberRequired:6,ref:"COMBAT6"}]},Pm={steps:[{numberRequired:1,ref:"DRAGON1"},{numberRequired:2,ref:"DRAGON2"},{numberRequired:3,ref:"DRAGON3"}]},Rm={steps:[{numberRequired:2,ref:"EAU2"},{numberRequired:4,ref:"EAU4"},{numberRequired:6,ref:"EAU6"}]},Lm={steps:[{numberRequired:2,ref:"ELEC2"},{numberRequired:4,ref:"ELEC4"},{numberRequired:6,ref:"ELEC6"}]},Om={steps:[{numberRequired:1,ref:"FEE1"},{numberRequired:2,ref:"FEE2"},{numberRequired:3,ref:"FEE3"}]},Mm={steps:[{numberRequired:2,ref:"FEU2"},{numberRequired:4,ref:"FEU4"},{numberRequired:6,ref:"FEU6"}]},Im={steps:[{numberRequired:2,ref:"GLACE2"},{numberRequired:3,ref:"GLACE3"},{numberRequired:4,ref:"GLACE4"}]},Fm={steps:[{numberRequired:2,ref:"INSECTE2"},{numberRequired:4,ref:"INSECTE4"},{numberRequired:6,ref:"INSECTE6"}]},wm={steps:[{numberRequired:2,ref:"NORMAL2"},{numberRequired:4,ref:"NORMAL4"},{numberRequired:6,ref:"NORMAL6"}]},Dm={steps:[{numberRequired:2,ref:"PLANTE2"},{numberRequired:4,ref:"PLANTE4"},{numberRequired:6,ref:"PLANTE6"}]},Nm={steps:[{numberRequired:2,ref:"POISON2"},{numberRequired:4,ref:"POISON4"},{numberRequired:6,ref:"POISON6"}]},bm={steps:[{numberRequired:2,ref:"PSY2"},{numberRequired:4,ref:"PSY4"},{numberRequired:6,ref:"PSY6"}]},Bm={steps:[{numberRequired:2,ref:"ROCHE2"},{numberRequired:4,ref:"ROCHE4"},{numberRequired:6,ref:"ROCHE6"}]},Gm={steps:[{numberRequired:2,ref:"SOL2"},{numberRequired:4,ref:"SOL4"},{numberRequired:6,ref:"SOL6"}]},Um={steps:[{numberRequired:2,ref:"SPECTRE2"},{numberRequired:4,ref:"SPECTRE4"},{numberRequired:6,ref:"SPECTRE6"}]},Vm={steps:[{numberRequired:2,ref:"VOL2"},{numberRequired:4,ref:"VOL4"},{numberRequired:6,ref:"VOL6"}]},uf={[Ut.ref]:Cm,[qt.ref]:Pm,[wt.ref]:Rm,[$t.ref]:Lm,[se.ref]:Om,[Ht.ref]:Mm,[_t.ref]:Im,[Xt.ref]:Fm,[Ft.ref]:wm,[kt.ref]:Dm,[Qt.ref]:Nm,[Kt.ref]:bm,[bt.ref]:Bm,[Vt.ref]:Gm,[Yt.ref]:Um,[Jt.ref]:Vm};let Cr,je;function Ym(E,A){const C=k.activeScene;if(k.activeMenu!=null||Cr===E&&k.stage!==Se.FIGHT)return;Cr!=null&&Xl(),Cr=E,je=C.add.group();const R=20,F=game.scale.width/2,B=C.add.nineslice(F,R,"box1",void 0,200,140,8,8,8,8).setOrigin(.5,0).setScrollFactor(0);je.add(B);const v=gt(F-60,R+16,V(`type.${E.ref}`));je.add(v);const y=C.add.sprite(F-78,R+24,"icons16x16",E.frameIndex);y.setScrollFactor(0),je.add(y);const t=uf[E.ref];let h=R+40;const p=gt(F-86,h,V(`alliance_desc.${E.ref}`),{color:"black",fontSize:"10px",wordWrap:{width:180}});je.add(p);const n=(A===0?k.board.playerAlliances:k.board.otherTeamAlliances).get(E);h+=p.height+10,t.steps.forEach((r,e)=>{var o;const s=gt(F-86,h,`[${r.numberRequired}] ${V(`alliance_desc.${r.ref}`)}`,{color:((o=n.stepReached)==null?void 0:o.ref)===r.ref?"blue":"gray",fontSize:"10px",wordWrap:{width:172}});je.add(s),h+=s.height}),je.setDepth(ft.MENU)}function Xl(){je&&(je.destroy(!0),je=null,Cr=null)}const pi={hello:0,after_hello:1,after_starter_choice:2,end:3},zm=()=>k.dialogStates.chen===pi.hello?Mt([V("dialog.chen.0"),V("dialog.chen.1"),V("dialog.chen.2"),V("dialog.chen.3"),V("dialog.chen.4"),V("dialog.chen.5"),V("dialog.chen.6"),V("dialog.chen.7")],{speaker:"chen"}).then(()=>{k.dialogStates.chen=pi.after_hello}):k.dialogStates.chen===pi.after_hello?Mt([V("dialog.chen.8")],{speaker:"chen"}):k.dialogStates.chen===pi.after_starter_choice?(k.dialogStates.chen=pi.end,Mt([V("dialog.chen.9",{pokemon:V(`pokemon.${k.player.team[0].entry.ref}`)}),V("dialog.chen.10"),V("dialog.chen.11"),V("dialog.chen.12"),V("dialog.chen.13"),V("dialog.chen.14")],{speaker:"chen"})):Mt([V("dialog.chen.15"),V("dialog.chen.16")],{speaker:"chen"}),Wm=()=>k.dialogStates.chen===pi.after_hello?Mt([V("dialog.chen.17")],{speaker:"chen"}):Mt([V("dialog.chen.18"),V("dialog.chen.19"),V("dialog.chen.20"),V("dialog.chen.21"),V("dialog.chen.22")],{speaker:"chen"}).then(()=>{k.dialogStates.chen=pi.after_hello}),Hm=()=>Mt([V("dialog.assistant1.0"),V("dialog.assistant1.1"),{[V("dialog.assistant1.q1")]:()=>[V("dialog.assistant1.r1")],[V("dialog.assistant1.q2")]:()=>[V("dialog.assistant1.r2"),V("dialog.assistant1.r3")],[V("dialog.assistant1.q3")]:()=>[V("dialog.assistant1.r4"),V("dialog.assistant1.r5"),V("dialog.assistant1.r6"),V("dialog.assistant1.r7")]}],{speaker:"assistant1"}),Xm=()=>Mt([V("dialog.assistant2.0"),V("dialog.assistant2.1"),V("dialog.assistant2.2"),V("dialog.assistant2.3")],{speaker:"assistant2"}),ff={title:V("room.home"),tilemap:"bourg_palette",tilesets:["tileset_inside"],startAt:"home_exit"};function Bs(E){E.load.image("logo","assets/logo.png"),E.load.image("box1","assets/sprites/box1.png"),E.load.image("box2","assets/sprites/box2.png")}function Oa(E){E.load.image("overworld","assets/maps/Overworld_Tileset.png"),E.load.image("interior","assets/maps/interior_sd.png"),E.load.image("ground","assets/maps/ground.png"),E.load.tilemapTiledJSON("overworld","assets/maps/overworld.json"),E.load.tilemapTiledJSON("labo_chen","assets/maps/labo_chen.json"),E.load.tilemapTiledJSON("foret_de_jade","assets/maps/foret_de_jade.json"),E.load.tilemapTiledJSON("shop_jadielle","assets/maps/shop_jadielle.json")}const df=new Map([[At.Input.Gamepad.Configs.XBOX_360.A,{id:"bouton_A",downColor:"#E71A07",upColor:"#2b2b2b"}],[At.Input.Gamepad.Configs.XBOX_360.B,{id:"bouton_B",downColor:"#00AD3E",upColor:"#2b2b2b"}],[At.Input.Gamepad.Configs.XBOX_360.START,{id:"bouton_START",downColor:"#666",upColor:"#2b2b2b"}],[At.Input.Gamepad.Configs.XBOX_360.BACK,{id:"bouton_SELECT",downColor:"#666",upColor:"#2b2b2b"}],[At.Input.Gamepad.Configs.XBOX_360.UP,{id:"fleche_HAUT",downColor:"#666",upColor:"#3a3a3a"}],[At.Input.Gamepad.Configs.XBOX_360.LEFT,{id:"fleche_GAUCHE",downColor:"#666",upColor:"#3a3a3a"}],[At.Input.Gamepad.Configs.XBOX_360.RIGHT,{id:"fleche_DROITE",downColor:"#666",upColor:"#3a3a3a"}],[At.Input.Gamepad.Configs.XBOX_360.DOWN,{id:"fleche_BAS",downColor:"#666",upColor:"#3a3a3a"}]]),gr=new Map([["f",At.Input.Gamepad.Configs.XBOX_360.A],["e",At.Input.Gamepad.Configs.XBOX_360.A],[" ",At.Input.Gamepad.Configs.XBOX_360.A],["b",At.Input.Gamepad.Configs.XBOX_360.B],["x",At.Input.Gamepad.Configs.XBOX_360.B],["Escape",At.Input.Gamepad.Configs.XBOX_360.B],["Enter",At.Input.Gamepad.Configs.XBOX_360.START],["Backspace",At.Input.Gamepad.Configs.XBOX_360.BACK],["w",At.Input.Gamepad.Configs.XBOX_360.UP],["z",At.Input.Gamepad.Configs.XBOX_360.UP],["a",At.Input.Gamepad.Configs.XBOX_360.LEFT],["q",At.Input.Gamepad.Configs.XBOX_360.LEFT],["s",At.Input.Gamepad.Configs.XBOX_360.DOWN],["d",At.Input.Gamepad.Configs.XBOX_360.RIGHT]]);let Si=null;function km(){df.forEach(({id:E},A)=>{const C=document.getElementById(E);C!=null&&(C.addEventListener("pointerdown",()=>{E.startsWith("fleche")&&(Si=E),Vn(A,!0),Lo(A)}),C.addEventListener("pointerup",()=>{Vn(A,!1),E===Si&&(Si=null)}))})}function Vn(E,A){const C=df.get(E);if(C!=null){const R=document.getElementById(C.id);R!=null&&(R.style.fill=A?C.downColor:C.upColor)}}let Ti,js,xr=!1,za;const Vh=3,Yh=300;function nr(E){js=E.input.keyboard.createCursorKeys(),E.input.gamepad.once("connected",A=>{console.log("gamepad connected",A.id)}),E.input.gamepad.on("down",(A,C)=>{Lo(C.index)}),E.input.gamepad.on("up",(A,C)=>{Vn(C.index,!1)}),E.input.keyboard.on("keydown",A=>{A.preventDefault(),gr.has(A.key)&&Lo(gr.get(A.key))}),E.input.keyboard.on("keyup",A=>{A.preventDefault(),gr.has(A.key)&&Vn(gr.get(A.key),!1)}),Ti=E.input.keyboard.addKeys("W,A,S,D,Z,Q"),Km(E)}function Km(E){E.input.setDefaultCursor("none"),E.input.dragDistanceThreshold=Vh,E.input.dragTimeThreshold=Yh,E.add.zone(32,32,320,320),E.input.on("pointerup",A=>{E.input.activePointer.getDuration(){Jm(E,A)}),E.input.on("dragstart",(A,C)=>{Na(C)&&zs(C,E)}),E.input.on("dragend",A=>{Ui(E)}),E.input.on("drag",(A,C,R,F)=>{fd(E)})}function kl(E){let A=new At.Math.Vector2(0,0),C=!1;if(E.input.gamepad.total>0){const R=E.input.gamepad.getPad(0);if(R.axes.length){const F=new At.Math.Vector2(R.axes[0].getValue(),R.axes[1].getValue());if(F.length()>.5)return A=F.scale(5),C=!0,{moveVector:A,useAnalogMovement:C}}R.isButtonDown(At.Input.Gamepad.Configs.XBOX_360.LEFT)?A.x=-32:R.isButtonDown(At.Input.Gamepad.Configs.XBOX_360.RIGHT)&&(A.x=32),R.isButtonDown(At.Input.Gamepad.Configs.XBOX_360.UP)?A.y=-32:R.isButtonDown(At.Input.Gamepad.Configs.XBOX_360.DOWN)&&(A.y=32)}return js.left.isDown||Ti.Q.isDown||Ti.A.isDown||Si==="fleche_GAUCHE"?A.x=-32:(js.right.isDown||Ti.D.isDown||Si==="fleche_DROITE")&&(A.x=32),js.up.isDown||Ti.W.isDown||Ti.Z.isDown||Si==="fleche_HAUT"?A.y=-32:(js.down.isDown||Ti.S.isDown||Si==="fleche_BAS")&&(A.y=32),{moveVector:A,useAnalogMovement:C}}function Ma(E){const{moveVector:A,useAnalogMovement:C}=kl(E);return C?Cu(A,E,!1):(A.length()===0?(za&&za.destroy(),xr=!1):A.length()>0&&!xr&&(xr=!0,za=E.time.addEvent({delay:150,callback:()=>{xr=!1}}),k.activeMenu!=null&&k.activeMenu.handleMove!=null?k.activeMenu.handleMove(A):E.scene.key!=="MapScene"&&Cu(A,E,!0)),null)}function Lo(E){switch(Vn(E,!0),E){case(At.Input.Gamepad.Configs.XBOX_360.A??0):jm();break;case(At.Input.Gamepad.Configs.XBOX_360.B??1):Zm();break;case(At.Input.Gamepad.Configs.XBOX_360.START??9):$m();break}}function Jm(E,A){var C;(C=E.sprites.get("cursor"))==null||C.setPosition(At.Math.Clamp(A.x,0,E.scale.width-15),At.Math.Clamp(A.y,0,E.scale.height-15)),fh()}function jm(){var E;(E=k.activeScene)!=null&&E.onPressA&&k.activeScene.onPressA()}function Zm(){var E;(E=k.activeScene)!=null&&E.onPressB&&k.activeScene.onPressB()}function $m(){var E;(E=k.activeScene)!=null&&E.onPressStart&&k.activeScene.onPressStart()}const kr=new Set;function Et(E=0){return new Promise(A=>{const C=setTimeout(()=>{A(),kr.delete(C)},E);kr.add(C)})}function ki(E){return Promise.resolve().then(E)}function cf(){kr.forEach(E=>clearTimeout(E)),kr.clear()}function Qm(...E){return E.reduce((A,C)=>A+C,0)}function ni(E,A){return E.splice(E.indexOf(A),1)}function qm(E,A){return Array(Math.ceil(E.length/A)).fill("").map((C,R)=>E.slice(A*R,A*(R+1)))}function Xe(E){return E[Math.floor(Math.random()*E.length)]}function Ia(E,A=1){let C=[],R=[...E],F=0;for(;F0;){const B=Math.floor(Math.random()*R.length);C.push(R[B]),R.splice(B,1),F++}return C}function Oo(E,A){const C=E.map(A),R=Qm(...C),F=Math.random()*R;for(let B=0,v=0;BC?C:E}function yr(E,A,C){return E>=A&&E<=C}function vf(E,A){return A.sort((C,R)=>Math.abs(C-E)-Math.abs(R-E))[0]}function _m(E,A){return E.length===A.length&&E.every((C,R)=>A[R]===C)}const St={LEFT:mt.LEFT,RIGHT:mt.RIGHT,UP:mt.UP,DOWN:mt.DOWN,WALKING_LEFT:`WALKING_${mt.LEFT}`,WALKING_RIGHT:`WALKING_${mt.RIGHT}`,WALKING_UP:`WALKING_${mt.UP}`,WALKING_DOWN:`WALKING_${mt.DOWN}`},t0={[St.DOWN]:"_idle_down",[St.UP]:"_idle_up",[St.LEFT]:"_idle_side",[St.RIGHT]:"_idle_side",[St.WALKING_DOWN]:"_walk_down",[St.WALKING_UP]:"_walk_up",[St.WALKING_LEFT]:"_walk_side",[St.WALKING_RIGHT]:"_walk_side"},Er=128,Wa=8;class rr{constructor(A,C,R=St.DOWN,F=1){ut(this,"sprite");ut(this,"state");ut(this,"walkingDirection");ut(this,"isForceMoving");ut(this,"forceMoveTimeout");ut(this,"name");this.name=C;const B=k.activeScene;this.sprite=B.physics.add.sprite(A.x*ye+ye/2,A.y*ye,"characters"),this.sprite.setScale(2),this.state=R,this.sprite.setOrigin(.5,.5),B.physics.world.enable(this.sprite),this.sprite.setBodySize(16,16).setOffset(4,12),this.sprite.setData("character",this),this.sprite.setData("interactionDistance",F),this.walkingDirection=null,this.isForceMoving=!1,this.addAnimations(),rr.prototype.update.call(this)}get isMoving(){return this.walkingDirection!==null}get spriteRowIndex(){if(this.name.startsWith("assistant"))return 3;switch(this.name){case"player":return 0;case"mam":return 1;case"chen":case"chen_end":return 2;case"seller_male":return 4;case"seller_female":return 5;case"trader":return 6+(k.currentDestination.shopId??0)%10;case"healer":return 26;case"info":default:return 16+(k.currentDestination.shopId??0)%10}}get direction(){switch(this.state){case St.LEFT:case St.WALKING_LEFT:return mt.LEFT;case St.RIGHT:case St.WALKING_RIGHT:return mt.RIGHT;case St.UP:case St.WALKING_UP:return mt.UP;case St.DOWN:case St.WALKING_DOWN:default:return mt.DOWN}}update(){this.sprite.play(this.name+t0[this.state],!0),this.sprite.flipX=this.state===St.WALKING_RIGHT||this.state===St.RIGHT}addAnimations(){const A=this.spriteRowIndex*9;zl(this.sprite.anims,"characters",[[`${this.name}_idle_down`,[A]],[`${this.name}_idle_up`,[A+1]],[`${this.name}_idle_side`,[A+2]],[`${this.name}_walk_down`,[A+3,A,A+4,A],Wa],[`${this.name}_walk_up`,[A+5,A+1,A+6,A+1],Wa],[`${this.name}_walk_side`,[A+7,A+2,A+8,A+2],Wa]])}stopMoving(){var A;switch(this.walkingDirection=null,(A=this.sprite.body)==null||A.stop(),this.alignOnGrid(),this.state){case St.WALKING_LEFT:this.state=St.LEFT;break;case St.WALKING_RIGHT:this.state=St.RIGHT;break;case St.WALKING_UP:this.state=St.UP;break;case St.WALKING_DOWN:this.state=St.DOWN;break}}move(A){switch(this.walkingDirection=A,this.alignOnGrid(),A){case mt.DOWN:this.state=St.WALKING_DOWN,this.sprite.setVelocity(0,Er);break;case mt.UP:this.state=St.WALKING_UP,this.sprite.setVelocity(0,-Er);break;case mt.LEFT:this.state=St.WALKING_LEFT,this.sprite.setVelocity(-Er,0);break;case mt.RIGHT:this.state=St.WALKING_RIGHT,this.sprite.setVelocity(Er,0);break}}moveBack(A){let C=mt.UP;switch(this.direction){case mt.LEFT:C=mt.RIGHT;break;case mt.RIGHT:C=mt.LEFT;break;case mt.UP:C=mt.DOWN;break;case mt.DOWN:default:C=mt.UP;break}return this.forceMove(C,A*300)}forceMove(A,C=500){return this.isForceMoving=!0,this.move(A),new Promise(R=>{clearTimeout(this.forceMoveTimeout),this.forceMoveTimeout=setTimeout(()=>{this.isForceMoving=!1,R()},C)})}alignOnGrid(){this.sprite.body!=null&&(this.sprite.body.x=Math.round(this.sprite.body.x),this.sprite.body.y=Math.round(this.sprite.body.y))}}class e0 extends rr{constructor(C,R,F=St.DOWN,B=1){super(C,R,F,B);ut(this,"pokemonToGive");ut(this,"pokemonToReceive");ut(this,"hasExchanged");this.hasExchanged=!1,this.pokemonToGive=Xe(k.player.box.filter(v=>v!=null)),this.pokemonToReceive=Xe(ef())}}class i0{constructor(A){ut(this,"name");ut(this,"sprite");const C=k.activeScene;this.sprite=C.physics.add.sprite(A.x*ri+ye/2,A.y*ri+ye/2,"icons16x16"),this.name=A.name,this.sprite.setSize(A.width,A.height),this.sprite.body.setSize(10,10),this.sprite.body.immovable=!0,this.sprite.type="description",this.sprite.setData("name",this.name),this.sprite.setData("description",this),A.properties.anim?this.sprite.play(A.properties.anim):this.sprite.setAlpha(0)}}function Bi(E){var A,C;return(C=(A=k.activeScene)==null?void 0:A.cameras.main)==null||C.fadeOut(E,202,205,184),Et(E)}function pf(E){var A,C;return(C=(A=k.activeScene)==null?void 0:A.cameras.main)==null||C.fadeIn(E,202,205,184),Et(E)}class s0{constructor(A){ut(this,"sprite");const C=k.activeScene;this.sprite=C.physics.add.sprite(A.x*ri,A.y*ri,"collisions").setOrigin(0,0).setAlpha(0),this.sprite.body.setSize(A.width*ri,A.height*ri,!1),this.sprite.setData("type","door"),this.sprite.setData("action",()=>{var R;if(A.properties.to){if(A.properties.to==="exit"&&C.level.canExit()===!1){(R=C.player)==null||R.moveBack(1),setTimeout(()=>{C.disableTriggers=!1},500);return}zt("door"),C.disableTriggers=!0,Bi(250).then(()=>{A.properties.to==="exit"?C.level.exit():(pf(250),C.player.goToDoor(A.properties.to))})}})}}function Pr(E,A){return A.objects[0].objects.filter(C=>{if(C.type===E)return C.tiledY||(C.tiledY=C.y),C.y=C.tiledY-C.height,C.properties=C.properties||{},Object.values(C.properties).forEach(R=>{R&&R.name&&(C.properties[R.name]=R.value)}),C})}function n0(E,A,C){return Pr(A,C).find(R=>R.name===E)}const ri=2,ye=16*ri;class zh{constructor(A){ut(this,"config");ut(this,"tilemap");ut(this,"layer_collisions");ut(this,"layer_ground0");this.config=A}create(){var A,C;this.tilemap=k.activeScene.add.tilemap(this.config.tilemap),this.tilemap.addTilesetImage("interior"),this.layer_collisions=this.tilemap.createLayer("collisions","interior"),(A=this.layer_collisions)==null||A.setVisible(!1).setScale(2),this.layer_ground0=this.tilemap.createLayer("ground0","interior"),(C=this.layer_ground0)==null||C.setScale(2),this.layer_collisions.setCollisionBetween(0,999),this.createGroups(),this.createCharacters(),this.createObjects(),this.createTriggers(),this.config.init&&this.config.init.call(this)}clearTileMap(){var A,C,R;(A=this.tilemap)==null||A.destroy(),(C=this.layer_ground0)==null||C.destroy(),(R=this.layer_collisions)==null||R.destroy()}createGroups(){var C,R;const A=k.activeScene;if((C=A.groups)!=null&&C.render){const F=A.groups.render;setTimeout(()=>F.destroy(),100)}A.groups={},A.groups.characters=A.add.group(),A.groups.characters.enableBody=!0,A.groups.characters.add((R=A.player)==null?void 0:R.sprite),A.groups.objects=A.add.group(),A.groups.objects.enableBody=!0,A.groups.triggers=A.add.group(),A.groups.triggers.enableBody=!0,A.groups.hud=A.add.group()}createCharacters(){const A=k.activeScene;for(const C of Pr("character",this.tilemap)){const R=C.name,F=C.properties.state,B=C.properties.interactionDistance??1;let v;R==="trader"?v=new e0({x:C.x/16,y:C.y/16},R,F,B):v=new rr({x:C.x/16,y:C.y/16},R,F,B),C.sprite=v.sprite,A.groups.characters.add(v.sprite)}}createObjects(){const A=k.activeScene;for(const C of Pr("description",this.tilemap)){const R=new i0(C);A.groups.objects.add(R.sprite)}}createTriggers(){const A=k.activeScene,C=Pr("door",this.tilemap);for(const R of C){const F=new s0(R);A.groups.triggers.add(F.sprite)}}canExit(){return this.config.canExit?this.config.canExit():!0}exit(){var A;this.clearTileMap(),k.activeScene.physics.world.colliders.destroy(),(A=this.config.exit)==null||A.call(this),k.afterEnd(!0)}}let qe=0,Ai=null;function Mo(E){k.activeMenu===null||!k.activeMenu.entries||(qe=(E+k.activeMenu.entries.length)%k.activeMenu.entries.length,Ai==null||Ai.setPosition(k.activeMenu.x+k.activeMenu.entries[qe].x+2,k.activeMenu.y+k.activeMenu.entries[qe].y+12),zt("tick"),k.activeMenu.onSelect&&k.activeMenu.onSelect(k.activeMenu.entries[qe]))}function ar(){var R;if(!k.activeMenu)return!1;let E=null;(R=k.activeMenu)!=null&&R.entries&&(E=k.activeMenu.entries[qe]);const A=k.activeMenu;let C=!1;return A.handleChoice&&E?(C=A.handleChoice(E)!==!1,C&&Le(),!0):(zt(C?"menu_close":"press_ab"),!1)}function Gs(E){E=Object.assign({handleMove:r0,handleCancel:()=>Le(),background:"box2",offset:4},E);const A=k.activeScene;k.activeMenu=E,E.container=A.add.container();const C=A.add.nineslice(E.x,E.y,E.background,void 0,E.width,E.height,E.offset,E.offset,E.offset,E.offset).setOrigin(0,0).setScrollFactor(0);return E.container.add(C),E.draw&&E.draw(E.container),E.entries!=null&&(qe=0,Ai=A.add.sprite(E.x+E.entries[qe].x+2,E.y+E.entries[qe].y+12,"gui",16),A.sprites.set("menuCursor",Ai),Ai.setScrollFactor(0).setScale(.5),E.container.add(Ai),E.entries.forEach((R,F)=>{const B=gt(E.x+8+R.x,E.y+4+R.y,R.label,{color:R.color??"black"});B.setInteractive(),pe(B),B.on("pointerover",()=>Mo(F)),B.on("click",()=>ar()),E.container.add(B)}),E.onSelect&&E.onSelect(E.entries[0])),E.container.setDepth(ft.MENU),E}function Le(){var E,A;!k.activeMenu||!k.activeMenu.container||(zt("menu_close"),(A=(E=k.activeMenu).onClose)==null||A.call(E),k.activeMenu.container.destroy(!0),k.activeMenu=null)}function r0(E){E.y>0?Mo(qe+1):E.y<0&&Mo(qe-1)}const Yn=new Set;function a0(E,A,C,R){if(!E.effect)return console.error("Missing projectile effect",E);const[F,B]=A.position,v=Math.atan2(C.y-A.y,C.x-A.x),y=Math.round(F+Math.cos(v)*12*32),t=Math.round(B+Math.sin(v)*12*32);o0(E,A,F,B,y,t,R)}function o0(E,A,C,R,F,B,v){const y={sprite:ve(E.effect,C,R,v,!0),skill:E,attacker:A,impactedPokemonIds:[]};if(Yn.add(y),E.rotateProjectile){const h=Math.atan2(B-R,F-C);y.sprite.rotation=h}const t=1e3*12/E.travelSpeed;return y.tween=v.tweens.add({targets:y.sprite,x:F,y:B,duration:t,ease:"Linear",onComplete(){Yn.has(y)&&mf(y)}}),y}function mf(E){if(!Yn.has(E))return;const A=k.activeScene;Yn.delete(E),E.tween&&A.tweens.remove(E.tween),E.skill.hitEffect?(E.sprite.setDepth(E.skill.hitEffect.depth??ft.SKILL_EFFECT_ABOVE_POKEMON),E.sprite.play(E.skill.hitEffect.key),E.sprite.once(Phaser.Animations.Events.ANIMATION_COMPLETE,()=>{E.sprite.destroy()})):E.sprite.destroy()}function l0(E){for(const A of Yn){let{x:C,y:R}=A.sprite;C+=8,R+=8;const F=A.skill.projectileRadius,{attacker:B,skill:v}=A,t=B.opponents.filter(h=>{const[p,a]=h.position;return Math.sqrt((p-C)**2+(a-R)**2)i?1:0},h=function(o,i,l,u,f){var d;if(l==null&&(l=0),f==null&&(f=C),l<0)throw new Error("lo must be non-negative");for(u==null&&(u=o.length);lx;0<=x?g++:g--)m.push(g);return m}).apply(this).reverse(),c=[],u=0,f=d.length;uT;0<=T?++m:--m)S.push(B(o,l));return S},e=function(o,i,l,u){var f,d,c;for(u==null&&(u=C),f=o[l];l>i;){if(c=l-1>>1,d=o[c],u(f,d)<0){o[l]=d,l=c;continue}break}return o[l]=f},s=function(o,i,l){var u,f,d,c,m;for(l==null&&(l=C),f=o.length,m=i,d=o[i],u=2*i+1;u=0&&R=0&&F-o&&(i=i-o,y=y+r),l0&&new Date().getTime()-h>this.timeLimit*1e3)return 1/0;var g=f+p(u,e)*this.weight;if(g>d)return g;if(u==e)return c[m]=[u.x,u.y],u;var x,T,S,P,L=t.getNeighbors(u,this.diagonalMovement);for(S=0,x=1/0;P=L[S];++S){if(this.trackRecursion&&(P.retainCount=P.retainCount+1||1,P.tested!==!0&&(P.tested=!0)),T=n(P,f+a(u,P),d,c,m+1),T instanceof A)return c[m]=[u.x,u.y],T;this.trackRecursion&&--P.retainCount===0&&(P.tested=!1),T!A.includes(R));return E.hasAlteration(at.CONFUSION)&&(C=E.team.filter(R=>R!==E)),C=C.filter(R=>!R.untargettable),C.length===0?null:C.reduce((R,F)=>Kr(E,R)C.length&&(R++,F=0)}while(Oe(B,v)!=null||!Xn(B,v));return xf(E,null,B,v)}function O0(E,A,C,R){switch(E){case"teleport":return M0(A,R);case"tunnel":return Tf(A,C,R);case"eclair":return I0(A,R);case"provoc":return F0(A,R);case"encore":return D0(A,C,R);case"metronome":return b0(A,C,R);case"e-coque":return B0(A,R);case"amnesie":return G0(A);case"ultralaser":return U0(A,C,R);case"laser_glace":return V0(A,C,R);case"jackpot":return Y0(A,R);case"morphing":return z0(A,C,R);case"evolution":return W0(A,C,R);case"psyko":return H0(A,R);case"deflagration":return X0(A,R);case"blizzard":return k0(A,R);case"fatal_foudre":return K0(A,R)}}function M0(E,A){const{x:C,y:R}=E;let F,B;do F=Ce(0,6),B=Ce(0,7);while(F===C||B===R||Oe(F,B)!=null);E.makeUntargettable(150);const[v,y]=Ue(F,B),t=ve(rt.TELEPORT,v,y,A);t.once(At.Animations.Events.ANIMATION_COMPLETE,()=>{t.destroy(),yd(E,F,B,A)})}function Tf(E,A,C){const{x:R,y:F}=E;let B,v;do B=Ce(0,6),v=Ce(0,7);while(B===R||v===F||Oe(B,v)!=null);const y=C.sprites.get(E.uid);C.tweens.add({targets:y,scale:0,duration:250,easing:"Linear"}),ve(rt.TUNNEL,y.x,y.y+8,C),Et(150).then(()=>E.makeUntargettable(850)),A&&Et(450).then(()=>{const t=C.sprites.get(A.uid);t&&ve(rt.TUNNEL,t.x,t.y+8,C)}),Et(850).then(()=>{if(!E.alive)return;const[t,h]=Ue(B,v);ve(rt.TUNNEL,t,h,C),yd(E,B,v,C),C.tweens.add({targets:y,scale:1,duration:250,easing:"Linear"})})}function I0(E,A){const C=Xe(k.board.otherTeam),[R,F]=C.position;Sf(E,R,F,A);const B=_e(Q.ECLAIR,C,E);Ae(B,C,E),re(C,{type:at.PARALYSIE,stacks:50,attacker:E},A)}function Sf(E,A,C,R){for(C-=16;C>=0;)ve(rt.ECLAIR,A,C,R),C-=32}function F0(E,A){const C=k.board.otherTeam.filter(R=>Kr(E,R)<=Math.sqrt(8));for(const R of C){const F=ve(rt.PROVOCATED,R.x+8,R.y,A);Et(500).then(()=>F.destroy()),R.nextAction.timer?Et(R.nextAction.timer.getRemaining()).then(()=>{R.resetTarget(E)}):R.resetTarget(E)}}let Zl=Q.TREMPETTE;function w0(E){E!==Q.ENCORE&&(Zl=E)}function D0(E,A,C){return Et(500).then(()=>$l(Zl,E,A,C))}const N0=Object.values(Q).filter(E=>De.some(A=>A.ppSkill===E));function b0(E,A,C){const R=Xe(N0);return Zl=R,$l(R,E,A,C)}function B0(E,A){E.team.forEach(C=>re(C,{type:at.SOIN,stacks:60,attacker:E},A))}function G0(E){E.alterations.forEach(A=>lr(E,A))}function U0(E,A,C){const R=Ca(A.x-E.x,A.y-E.y)??mt.UP;let[F,B]=E.position;const[v,y]=sr(R);F+=v*16,B+=y*16;let t=0;for(;B>=0&&B<=C.scale.height&&F>=0&&F<=C.scale.width;){ve(t===0?rt.ULTRALASER_START:rt.ULTRALASER_BEAM,F,B,C).setRotation(Wl(R));const[p,a]=Ws(F,B),n=Oe(p,a);if(n&&n.owner!==E.owner){const r=_e(Q.ULTRALASER,n,E);Ae(r,n,E)}B+=y*32,F+=v*32,t++}}function V0(E,A,C){const R=Ca(A.x-E.x,A.y-E.y)??mt.UP;let[F,B]=E.position;const[v,y]=sr(R);F+=v*16,B+=y*16;let t=0;for(;B>=0&&B<=C.scale.height&&F>=0&&F<=C.scale.width;){ve(t===0?rt.LASER_GLACE_START:rt.LASER_GLACE_BEAM,F,B,C).setRotation(Wl(R));const[p,a]=Ws(F,B),n=Oe(p,a);if(n&&n.owner!==E.owner){const r=_e(Q.LASER_GLACE,n,E);Ae(r,n,E),re(n,{type:at.GEL,stacks:50,attacker:E},C)}B+=y*32,F+=v*32,t++}}function Y0(E,A){const C=Math.random()<.5,[R,F]=E.position;ve(C?rt.JACKPOT_WIN:rt.JACKPOT_LOSE,R,F-24,A),C&&(k.player.inventory.pokeball+=1,Ei())}function z0(E,A,C){E.initialEntry=E.entry,E.entry=A.entry,Ba(E,C);const R=yi(E,C);R.play(`${E.entry.ref}_${E.facingDirection}`),C.sprites.set(E.uid,R)}function W0(E,A,C){const R=new Map([[Ut,ze],[qt,$e],[wt,$e],[$t,si],[se,$e],[Ht,ze],[_t,si],[Xt,si],[Ft,$e],[kt,si],[Qt,$e],[Kt,ze],[bt,ze],[Vt,ze],[Yt,si],[Jt,$e]]);E.entry=R.get(A.types[0])??si,Ci(E,.2*E.maxPV),Ba(E,C);const F=yi(E,C);F.play(`${E.entry.ref}_${E.facingDirection}`),C.sprites.set(E.uid,F)}function H0(E,A){E.opponents.forEach(C=>{A.cameras.main.flash(250,255,0,255),re(C,{type:at.CONFUSION,stacks:40,attacker:E},A),Et(Q.PSYKO.hitDelay).then(()=>{const R=_e(Q.PSYKO,C,E);Ae(R,C,E)})})}function X0(E,A){const C=[];E.opponents.forEach(R=>{re(R,{type:at.BRULURE,stacks:60,attacker:E},A),C.push([R.x,R.y])}),A.cameras.main.flash(250,255,0,0),C.reduce((R,[F,B])=>R.then(()=>{const[v,y]=Ue(F,B),t=ve(rt.ERUPTION_PENDING,v,y-16,A);return Et(1500).then(()=>{t.play(rt.ERUPTION)}).then(()=>Et(100)).then(()=>{const h=Oe(F,B);if(h){const p=_e(Q.DEFLAGRATION,h,E);Ae(p,h,E)}}),Et(100)}),Et(10))}function k0(E,A){const C=[];return E.opponents.forEach(R=>{re(R,{type:at.GEL,stacks:jt(80-R.speed,20,60),attacker:E},A),C.push([R.x,R.y])}),A.cameras.main.flash(250,64,128,255),C.reduce((R,[F,B])=>{const[v,y]=Ue(F,B),t=v-A.scale.width/2,h=y-A.scale.height;return R.then(()=>Et(100)).then(()=>{const p=ve(rt.GRELON,t,h,A,!0),a=A.tweens.add({targets:p,x:v,y,duration:1500,ease:"Linear",onComplete(){A.tweens.remove(a),yh.hitEffect&&(p.play(yh.hitEffect.key),p.once(At.Animations.Events.ANIMATION_COMPLETE,()=>p.destroy()));const n=Oe(F,B);if(n){const r=_e(Q.BLIZZARD,n,E);Ae(r,n,E)}}})})},Et(10))}function K0(E,A){E.opponents.forEach(F=>{re(F,{type:at.PARALYSIE,stacks:40,attacker:E},A)});const R=Ia(E.opponents,3);return A.cameras.main.flash(255,255,192,192),R.reduce((F,B)=>{const[v,y]=B.position;return F.then(()=>{Sf(E,v,y,A);const t=_e(Q.FATAL_FOUDRE,B,E);Ae(t,B,E)}).then(()=>Et(Ce(300,500)))},Et(250))}function $l(E,A,C,R){if(E.behavior===ht.DIRECT_HIT)return J0(E,A,C,R);if(E.behavior===ht.PROJECTILE)return a0(E,A,C,R);if(E.behavior===ht.SPECIAL)return j0(E,A,C,R);if(E.behavior===ht.AREA_OF_EFFECT)return Z0(E,A,C,R);console.error(`Not yet implemented: ${E.ref}`)}function ve(E,A,C,R,F){const B=R.add.sprite(A,C,"effects");return B.scale=(E==null?void 0:E.scale)??1,B.blendMode=Phaser.BlendModes.OVERLAY,B.tint=(E==null?void 0:E.tint)??16777215,B.setDepth(E.depth??ft.SKILL_EFFECT_ABOVE_POKEMON),B.alpha=(E==null?void 0:E.opacity)??1,B.play(E.key),F||B.once(Phaser.Animations.Events.ANIMATION_COMPLETE,()=>{B.destroy()}),B}function Da(E,A,C,R){const F=E.effect;if(!F)return;let[B,v]=C.position,y=0,t=0;const h=Math.atan2(C.y-A.y,C.x-A.x);F.position==="source"||F.position==="parabolic_to_target"?([B,v]=A.position,y=Math.round(Math.cos(h)*(F.delta??8)),t=Math.round(Math.sin(h)*(F.delta??8))):F.position==="target"||F.position==="target_to_source"?(y=Math.round(Math.cos(h+Math.PI)*(F.delta??8)),t=Math.round(Math.sin(h+Math.PI)*(F.delta??8))):F.position==="target_ground"?t=F.delta??0:F.position==="source_ground"&&([B,v]=A.position,t=F.delta??0);const p=ve(F,B+y,v+t,R);if(E.rotateSprite&&(p.rotation=h),F.position==="target_to_source"){const[a,n]=A.position;R.tweens.add({targets:p,x:a,y:n,duration:E.hitDelay??250,ease:"Linear",onComplete(){E.hitEffect||p.destroy()}})}if(F.position==="parabolic_to_target"){const[a,n]=A.position,[r,e]=C.position,s=new Phaser.Math.Vector2(a,n),o=new Phaser.Math.Vector2(a+(r-a)*.2,n-20),i=new Phaser.Math.Vector2(a+(r-a)*.8,e-20),l=new Phaser.Math.Vector2(r,e),u=new Phaser.Curves.CubicBezier(s,o,i,l),f={t:0},d=E.hitDelay??250;R.tweens.add({targets:f,t:1,duration:d,ease:"Linear",onComplete(){E.hitEffect||p.destroy()},onUpdate:(c,m)=>{const g=u.getPoint(m.t);p.x=g.x,p.y=g.y}})}Et(E.hitDelay??0).then(()=>{if(E.hitEffect){const a=E.hitEffect;p.scale=a.scale??1,p.play(a.key),p.setDepth(a.depth??ft.SKILL_EFFECT_ABOVE_POKEMON),p.once(Phaser.Animations.Events.ANIMATION_COMPLETE,()=>{p.destroy()})}if(E.knockback){const a=Math.atan2(A.y-C.y,C.x-A.x);Af(C,a,R)}})}function J0(E,A,C,R){Da(E,A,C,R),E.triggerAlteration&&re(C,{...E.triggerAlteration,attacker:A},R),E.chargeDelta&&Q0(A,C,E.chargeDelta,R),Et(E.hitDelay??0).then(()=>{const F=_e(E,C,A);if(cg(A,C,E)){for(const B of A.buffs.onHit)B({target:C,attacker:A,damage:F,skill:E});for(const B of C.buffs.onHitReceived)B({damage:F,attacker:A,skill:E});Ae(F,C,A),E.selfDamage&&Ae(Lf(E,A),A,A)}E.hitAlteration&&re(C,{...E.hitAlteration,attacker:A},R),E.selfAlteration&&re(A,{...E.selfAlteration,attacker:A},R)})}function j0(E,A,C,R){Da(E,A,C,R),E.triggerSpecial&&Et(E.triggerSpecialDelay??0).then(()=>O0(E.triggerSpecial,A,C,R)),E.triggerAlteration&&re(C,{...E.triggerAlteration,attacker:A},R),E.selfAlteration&&re(A,{...E.selfAlteration,attacker:A},R)}function Z0(E,A,C,R){Da(E,A,C,R),E.selfAlteration&&re(A,{...E.selfAlteration,attacker:A},R);const F=E.getTilesImpacted(A,C).filter(([v,y])=>Xn(v,y));let B=!1;Et(E.hitDelay??0).then(()=>{for(const[v,y]of F){const t=Oe(v,y);if(t&&t.owner!==A.owner){const h=_e(E,t,A);for(const p of t.buffs.onHitReceived)p({damage:h,attacker:A,skill:E});if(!B){B=!0;for(const p of A.buffs.onHit)p({target:t,attacker:A,damage:h,skill:E})}Ae(h,t,A),E.hitAlteration&&re(t,{...E.hitAlteration,attacker:A},R)}}E.selfDamage&&Ae(Lf(E,A),A,A)})}function $0(E,A,C){const R=C.sprites.get(E.uid);if(!R)return;const[F,B]=E.position,v=new Phaser.Math.Vector2(F,B),y=new Phaser.Math.Vector2(F,B-20),t=new Phaser.Curves.CubicBezier(v,y,y,v),h={t:0},p=250+A*C.gameSpeed;R.anims.resume(),Et(p).then(()=>{E.alive&&R.anims.pause()}),C.tweens.add({targets:h,t:1,duration:p,ease:Phaser.Math.Easing.Circular.InOut,onUpdate:(a,n)=>{const r=t.getPoint(n.t);R.x=r.x,R.y=r.y}})}function Q0(E,A,C,R){const F=Math.atan2(A.y-E.y,A.x-E.x),B=R.sprites.get(E.uid);if(!B)return;const{x:v,y}=B,t=1e7/(E.speed+40)/R.gameSpeed;B.anims.resume(),R.tweens.add({targets:B,x:v+C*Math.cos(F),y:y+C*Math.sin(F),duration:Math.min(150,t),ease:Phaser.Math.Easing.Cubic.In,onComplete(){var h;R.tweens.add({targets:B,x:v,y,duration:250,ease:Phaser.Math.Easing.Linear}),E.alive&&((h=B.anims)!=null&&h.isPlaying)&&B.anims.pause()}})}function Af(E,A,C){var e;const R=C.sprites.get(E.uid);let F=((e=E.alliances.get(wt))==null?void 0:e.stepReachedN)??0;if(!R||F===0||E.untargettable)return;const B=Nv(A),[v,y]=sr(B);let{x:t,y:h}=E,p=0;for(;Xn(t+v,h+y)&&Oe(t+v,h+y)==null&&F>0;)t+=v,h+=y,F--,p++;if(p===0)return;const a=p*500;E.makeUntargettable(a),Cf(E,a,C),E.x=t,E.y=h;const[n,r]=Ue(t,h);C.tweens.add({targets:R,x:n,y:r,duration:a,ease:Phaser.Math.Easing.Expo.Out,onComplete(){E.alive&&E.resetAction()}})}function Cf(E,A,C){E.resetAction({type:Ge.IDLE,timer:C.time.addEvent({delay:A,callback:()=>E.resetAction()})})}function q0(E,A){E.alterations.forEach(C=>{if(_0(E,C),C.keepStacks||C.stacks--,C.stacks<=0)lr(E,C);else if(C.effectSprite){const R=A.sprites.get(E.uid);R?C.effectSprite.setPosition(R.x,R.y+(C.effectDelta??0)):C.effectSprite.destroy()}})}function _0(E,A){const C=k.activeScene,R=C.sprites.get(E.uid),F=C.gameSpeed/1e3;switch(A.type){case at.POISON:{const B=vg(E,A,C);Ae(B,E,A.attacker,!0,!0);break}case at.BRULURE:{const B=pg(E,C);Ae(B,E,A.attacker,!0,!1);const v=E.alterations.find(y=>y.type===at.GEL);v&&(v.stacks-=3);break}case at.SOMMEIL:R==null||R.anims.pause();break;case at.LIGOTAGE:{const B=E.maxPV*.02*F;Ae(B,E,A.attacker,!0,!1);break}case at.SOIN:Ci(E,.1*F*E.level);break;case at.REPOS:Ci(E,5/100*F*E.maxPV);break;case at.EXECUTION:E.pv<30/100*E.maxPV&&Of(E);break;case at.DAMAGE_OVER_TIME:Ae(5*F,E,A.attacker);break;case at.TOURBILLON:switch(E.facingDirection){case mt.UP:E.facingDirection=mt.RIGHT;break;case mt.RIGHT:E.facingDirection=mt.DOWN;break;case mt.DOWN:E.facingDirection=mt.LEFT;break;case mt.LEFT:default:E.facingDirection=mt.UP;break}R==null||R.play(`${E.entry.ref}_${E.facingDirection}`);break}}function tg(E){return E.hasAlteration(at.TOURBILLON)||E.hasAlteration(at.SOMMEIL)}function re(E,A,C){if(!E.alive||E.unalterable&&[at.BRULURE,at.CONFUSION,at.GEL,at.PARALYSIE,at.PEUR,at.POISON,at.SOMMEIL].includes(A.type))return;E.item===vn&&(E.unalterable=!0,setTimeout(()=>{E.unalterable=!1},10*1e3),E.item=null,zt("heal_ailment"));const R=E.alterations.find(F=>F.type===A.type);if(R){if([at.SOMMEIL,at.PEUR,at.CONFUSION].includes(A.type))return;if(R.stacks+=A.stacks,A.type===at.RAGE){const F=C.sprites.get(E.uid);if(!F)return console.error(`Error, can't find pokemon sprite uid ${E.uid}`);F.setTint(Phaser.Display.Color.GetColor(255,jt(200-A.stacks*40,0,255),jt(128-A.stacks*30,0,255)))}}else{const F=C.sprites.get(E.uid);if(!F)return console.error(`Error, can't find pokemon sprite uid ${E.uid}`);switch(A.type){case at.TOURBILLON:{E.resetAction();const B=A.stacks*C.gameSpeed;E.makeUntargettable(B),Cf(E,B,C),$0(E,A.stacks,C);break}case at.BRULURE:if(E.hasType(wt))return;A.effectSprite=ve(rt.BURN,F.x,F.y,C);break;case at.GEL:if(E.hasType(Ht))return;A.effectSprite=ve(rt.FROZEN,F.x,F.y,C),E.makeUntargettable(A.stacks*C.gameSpeed);break;case at.SOMMEIL:if(E.item===Tn||E.hasType(Yt))return;E.resetAction(),A.effectSprite=ve(rt.SOMMEIL,F.x,F.y,C);break;case at.CONFUSION:if(E.hasType(Kt))return;E.resetAction(),A.effectSprite=ve(rt.CONFUSION,F.x,F.y,C);break;case at.PARALYSIE:A.effectSprite=ve(rt.PARALYSIE,F.x,F.y,C);break;case at.PEUR:if(E.hasType(Ut))return;E.resetAction(),A.effectSprite=ve(rt.PEUR,F.x,F.y,C);break;case at.POISON:A.effectSprite=ve(rt.POISON,F.x,F.y-8,C),A.effectDelta=-8;break;case at.SOIN:case at.REPOS:A.effectSprite=ve(rt.SOIN,F.x,F.y-8,C);break;case at.RAGE:F.setTint(Phaser.Display.Color.GetColor(255,200,200));break}E.alterations.push({...A})}A.type===at.REPOS&&re(E,{type:at.SOMMEIL,stacks:A.stacks,attacker:E},C)}function lr(E,A){if(ni(E.alterations,A),A.effectSprite&&A.effectSprite.destroy(),A.type===at.SOMMEIL){const R=k.activeScene.sprites.get(E.uid);R==null||R.anims.resume();const F=E.alterations.find(B=>B.type===at.REPOS);F&&lr(E,F)}(A.type===at.CONFUSION||A.type===at.GEL)&&E.resetAction()}function eg(){k.allPokemonsOnBoard.forEach(E=>{E.alterations.forEach(A=>{lr(E,A)})})}let Ie={pokemons:[],damageDone:new Map,damageReceived:new Map,heal:new Map};function ig(){return Ie}function sg(){Ie={pokemons:k.allPokemonsOnBoard,damageDone:new Map,damageReceived:new Map,heal:new Map}}function ng(){for(const[E,A]of Ie.damageDone)if(!Ie.pokemons.find(R=>R.uid===E)){console.error(`Unknown pokemon UID: ${E}`);continue}for(const[E,A]of Ie.damageReceived)if(!Ie.pokemons.find(R=>R.uid===E)){console.error(`Unknown pokemon UID: ${E}`);continue}for(const[E,A]of Ie.heal)if(!Ie.pokemons.find(R=>R.uid===E)){console.error(`Unknown pokemon UID: ${E}`);continue}}function rg(E,A){Ie.damageDone.set(E.uid,(Ie.damageDone.get(E.uid)??0)+A)}function ag(E,A){Ie.damageReceived.set(E.uid,(Ie.damageReceived.get(E.uid)??0)+A)}function og(E,A){Ie.heal.set(E.uid,(Ie.heal.get(E.uid)??0)+A)}function Pf(E,A){const C=At.Math.Distance.Snake(E.x,E.y,A.x,A.y),R=C<=E.entry.baseSkill.attackRange||E.entry.ppSkill&&E.pp>=E.entry.maxPP&&C<=E.entry.ppSkill.attackRange,F=E.hasAlteration(at.GEL)||E.hasAlteration(at.PEUR)||E.hasAlteration(at.SOMMEIL);return R&&!F}function lg(E){return!(E.hasAlteration(at.GEL)||E.hasAlteration(at.LIGOTAGE)||E.hasAlteration(at.SOMMEIL)||E.hasAlteration(at.PARALYSIE))}function hg(E,A){if(E.nextAction.timer)return;if(E.nextAction.type===Ge.JUMP)return dg(E,A);if(E.nextAction.type!==Ge.IDLE||!E.alive||tg(E))return;const C=gf(E);C==null||!C.alive?E.resetAction():Pf(E,C)?ug(E,C,A):lg(E)&&Rf(E,C,A)}function cu(E,A,C){const R=C.sprites.get(E.uid);if(R==null)return console.error(`Sprite not found for pokemon ${E.uid}`);E.facingDirection=Pa(A.x-E.x,A.y-E.y),R.play(`${E.entry.ref}_${E.facingDirection}`,!0)}function Rf(E,A,C){const R=C.sprites.get(E.uid);if(R==null){console.error(`Sprite not found for pokemon ${E.uid}`);return}if(A.nextAction.type===Ge.MOVE&&A.nextAction.target===E&&Kr(E,A)<2){E.resetAction({type:Ge.IDLE,target:A});return}let F=yf(E,A);if(F.length===0){const B=Ef(E,[A]);if(B!=null){Rf(E,B,C);return}F=L0(E,A)}if(E.resetAction({type:Ge.MOVE,path:F,target:A}),E.nextAction.path&&E.nextAction.path.length>=3){const[B,v]=E.nextAction.path[1],[y,t]=Ue(B,v);E.facingDirection=Pa(B-E.x,v-E.y),R.play(`${E.entry.ref}_${E.facingDirection}`,!0),R.anims.resume(),E.x=B,E.y=v;const h=25e5/(E.speed+30)/C.gameSpeed;C.tweens.add({targets:R,x:y,y:t,duration:h,ease:"Linear"}),C.time.addEvent({delay:h,callback:()=>{E.alive&&E.resetTarget(A)}})}else E.resetTarget(A)}function ug(E,A,C){if(C.sprites.get(E.uid)==null)return console.error(`Sprite not found for pokemon ${E.uid}`);const F=100+1e7/(E.speed+50)/C.gameSpeed;E.resetAction({type:Ge.ATTACK,target:A}),cu(E,A,C),E.nextAction.timer=C.time.addEvent({delay:F,loop:!0,callback:()=>{if(!E.alive)return;if(!A.alive||A.untargettable||!Pf(E,A))return E.resetAction();E.facingDirection=Pa(A.x-E.x,A.y-E.y),E.pp=Math.min(E.entry.maxPP,E.pp+1),cu(E,A,C);let B=E.entry.baseSkill;E.entry.ppSkill&&E.pp>=E.entry.maxPP&&(B=E.entry.ppSkill,w0(B),E.pp=0),$l(B,E,A,C)}})}function fg(){const E=new Set;for(const A of k.allPokemonsOnBoard){if(!A.hasType(Jt))continue;let C=A.placementX,R=A.owner===xe?0:7,F=1,B=0;for(;Oe(C,R)!=null||E.has([C,R].join(","));){do C+=F,F=-1*(Math.abs(F)+1)*Math.sign(F);while((C<0||C>=7)&&Math.abs(F)<=8);if(Math.abs(F)>8&&(R=A.owner===xe?B:7-B,C=A.placementX,F=1,B++),B>4)return}A.resetAction({type:Ge.JUMP,path:[[C,R]]}),E.add([C,R].join(","))}}function dg(E,A){if(!E.nextAction||!E.nextAction.path)return;const C=A.sprites.get(E.uid);if(C==null)return console.error(`Sprite not found for pokemon ${E.uid}`);const[R,F]=E.nextAction.path[0],[B,v]=Ue(R,F);E.facingDirection=Pa(R-E.x,F-E.y),C.play(`${E.entry.ref}_${E.facingDirection}`),E.x=R,E.y=F;const y=1e3;E.makeUntargettable(y),A.tweens.add({targets:C,x:{value:B,duration:y,ease:At.Math.Easing.Circular.InOut},y:{value:v,duration:y,ease:At.Math.Easing.Circular.InOut},scale:{value:1.25,duration:y/2,ease:At.Math.Easing.Circular.InOut,yoyo:!0}}),E.resetAction({type:Ge.IDLE,timer:A.time.addEvent({delay:y,callback:()=>E.resetAction()})})}function cg(E,A,C){const R=(E.precision-(A.dodge??0))*(C.precision??1);return R>=1?!0:Math.random()<=R}function Ae(E,A,C,R=!1,F=!1){if(!A.hasAlteration(at.INVULNERABLE))if(A.pv=Math.max(0,A.pv-E),C&&C!==A&&rg(C,E),ag(A,E),R||(A.pp=Math.min(A.entry.maxPP,A.pp+jt(E/A.maxPV*25,2,5))),A.pv===0)Of(A),C&&C.item===bn&&C.owner===xe&&(k.player.inventory.pokeball+=1,Ei());else{const B=A.alterations.find(v=>v.type===at.SOMMEIL);if(B&&!F){const v=Math.ceil(E/A.maxPV*200);B.stacks-=v,console.log(`reducing sommeil stacks by ${v}`),B.stacks<=0&&lr(A,B)}}}function _e(E,A,C){let R=A.types;A.hasAlteration(at.ADAPTATION)&&(R=[E.type]);let F=R.map(B=>{var v;return((v=Yd.get(E.type))==null?void 0:v.get(B))??1}).reduce((B,v)=>B*v);if(F>1){const B=A.alliances.get(Ft);B&&(F=Math.max(1,F-.3*B.stepReachedN))}return C.attack*(1+E.power/50)*F/A.defense}function Lf(E,A){return A.attack*(1+(E.selfDamage??0)/100)/A.defense}function vg(E,A,C){const R=C.gameSpeed/1e3;let F=jt(A.stacks,1,300)*R*(.025/100)*E.maxPV;const B=E.alliances.get(bt),v=E.owner===xe?k.board.otherTeamAlliances.get(Qt):k.board.playerAlliances.get(Qt);let y=1;return E.hasType(Qt)&&(y-=.5),v&&(y+=.4*v.stepReachedN),B&&(y-=.3*B.stepReachedN),F*=jt(y,0,10),F}function pg(E,A){let R=.1*(A.gameSpeed/1e3)*E.level,F=1;const B=E.alliances.get(bt);return B&&(F-=.3*B.stepReachedN),R*=F,R}function Of(E){const A=k.board,C=E.owner===1?A.playerTeam:A.otherTeam,R=C.indexOf(E);R!==-1&&(zt(Sa(E.entry)),Io(E),C.splice(R,1),C.length===0&&k.stage===Se.FIGHT&&k.endFight(E.owner))}function Io(E){const A=k.activeScene,C=A.sprites.get(E.uid);if(C==null)return console.error(`Sprite not found for pokemon ${E.uid}`);const R=A.add.sprite(C.x,C.y,"pokeball");R.play(`${E.pokeball}_in`),R.once(At.Animations.Events.ANIMATION_COMPLETE,()=>{R.destroy()}),E.alterations.filter(F=>F.effectSprite!=null).forEach(F=>{var B;return(B=F.effectSprite)==null?void 0:B.destroy()}),Ba(E,A)}function Ci(E,A){(E.hasAlteration(at.BRULURE)||E.hasAlteration(at.RAGE))&&(A*=.5),E.pv=Math.min(E.maxPV,E.pv+A),og(E,A)}function Mf(E,A){const C=k.activeScene,R=E.level;let F=1;const B=E.owner===xe?k.board.playerAlliances.get(Xt):k.board.otherTeamAlliances.get(Xt);if(E.hasType(Xt)&&B&&(F+=.2*B.stepReachedN),E.item===Pn&&(F+=.3),E.xp+=A*F,E.level=Ho(E.xp),E.item===Fn&&(E.level++,E.xp=Iu(E.level)),R!==E.level){Rs("level_up");const v=[V("dialog.levelup",{name:V(`pokemon.${E.entry.ref}`),level:E.level})];return E.entry.evolution&&E.level>=(E.entry.evolutionLevel??50)&&v.push(()=>{const y=E.entry;E.entry=E.entry.evolution,Rs("success");const t=C.sprites.get(E.uid);if(t!=null){const h=k.board.playerTeam.find(r=>r.uid===E.uid);Da(Q.EVOLUTION,h,h,C);const{x:p,y:a}=t;Ba(h,C);const n=yi(h,C);n.setPosition(p,a),n.play(`${E.entry.ref}_${h.facingDirection}`),C.sprites.set(E.uid,n),(k.stage===Se.PLACEMENT||k.stage===Se.CAPTURE)&&(n.anims.pause(),n.setAlpha(.5))}return V("dialog.evolve",{old:V(`pokemon.${y.ref}`),new:V(`pokemon.${E.entry.ref}`)})}),Mt(v,{speaker:"system"})}return Promise.resolve(E.level)}function mg(){const E=k.activeScene;E.cameras.main.flash(250,255,0,0),zt("rage");for(const A of k.allPokemonsOnBoard)re(A,{type:at.RAGE,stacks:1,keepStacks:!0},E)}const If={ref:"pierre",frameIndex:8,introFrameIndex:0,dialogs:{start:[V("dialog.pierre.start.0"),V("dialog.pierre.start.1"),V("dialog.pierre.start.2"),V("dialog.pierre.start.3")],victory:[V("dialog.pierre.victory.0"),V("dialog.pierre.victory.1"),V("dialog.pierre.victory.2"),()=>(k.receiveBadge(bl),V("dialog.pierre.victory.3")),V("dialog.pierre.victory.4")],defeat:[V("dialog.pierre.defeat.0"),V("dialog.pierre.defeat.1")]}},Ff={ref:"ondine",frameIndex:9,introFrameIndex:1,dialogs:{start:[V("dialog.ondine.start.0"),V("dialog.ondine.start.1"),V("dialog.ondine.start.2"),V("dialog.ondine.start.3")],victory:[V("dialog.ondine.victory.0"),V("dialog.ondine.victory.1"),()=>(k.receiveBadge(ir),V("dialog.ondine.victory.2"))],defeat:[V("dialog.ondine.defeat.0"),V("dialog.ondine.defeat.1")]}},wf={ref:"major_bob",frameIndex:10,introFrameIndex:2,dialogs:{start:[V("dialog.bob.start.0"),V("dialog.bob.start.1"),V("dialog.bob.start.2"),V("dialog.bob.start.3"),V("dialog.bob.start.4"),V("dialog.bob.start.5")],victory:[V("dialog.bob.victory.0"),V("dialog.bob.victory.1"),()=>(k.receiveBadge(Bl),V("dialog.bob.victory.2"))],defeat:[V("dialog.bob.defeat.0"),V("dialog.bob.defeat.1"),V("dialog.bob.defeat.2")]}},Df={ref:"erika",frameIndex:11,introFrameIndex:3,dialogs:{start:[V("dialog.erika.start.0"),V("dialog.erika.start.1"),V("dialog.erika.start.2"),V("dialog.erika.start.3"),V("dialog.erika.start.4"),V("dialog.erika.start.5"),V("dialog.erika.start.6"),V("dialog.erika.start.7")],victory:[V("dialog.erika.victory.0"),V("dialog.erika.victory.1"),()=>(k.receiveBadge(Gl),[V("dialog.erika.victory.2"),V("dialog.erika.victory.3")])],defeat:[V("dialog.erika.defeat.0"),V("dialog.erika.defeat.1"),V("dialog.erika.defeat.2")]}},Nf={ref:"koga",frameIndex:12,introFrameIndex:4,dialogs:{start:[V("dialog.koga.start.0"),V("dialog.koga.start.1"),V("dialog.koga.start.2"),V("dialog.koga.start.3")],victory:[V("dialog.koga.victory.0"),V("dialog.koga.victory.1"),()=>(k.receiveBadge(Ul),[V("dialog.koga.victory.2"),V("dialog.koga.victory.3"),V("dialog.koga.victory.4"),V("dialog.koga.victory.5")])],defeat:[V("dialog.koga.defeat.0"),V("dialog.koga.defeat.1")]}},bf={ref:"morgane",frameIndex:13,introFrameIndex:5,dialogs:{start:[V("dialog.morgane.start.0"),V("dialog.morgane.start.1"),V("dialog.morgane.start.2"),V("dialog.morgane.start.3"),V("dialog.morgane.start.4")],victory:[V("dialog.morgane.victory.0"),V("dialog.morgane.victory.1"),V("dialog.morgane.victory.2"),()=>(k.receiveBadge(Vl),[V("dialog.morgane.victory.3"),V("dialog.morgane.victory.4"),V("dialog.morgane.victory.5")])],defeat:[V("dialog.morgane.defeat.0")]}},Bf={ref:"auguste",frameIndex:14,introFrameIndex:6,dialogs:{start:[V("dialog.auguste.start.0"),V("dialog.auguste.start.1"),V("dialog.auguste.start.2"),V("dialog.auguste.start.3")],victory:[V("dialog.auguste.victory.0"),V("dialog.auguste.victory.1"),()=>(k.receiveBadge(Yl),[V("dialog.auguste.victory.2"),V("dialog.auguste.victory.3")])],defeat:[V("dialog.auguste.defeat.0")]}},Gf={ref:"giovanni",frameIndex:15,introFrameIndex:7,dialogs:{start:[V("dialog.giovanni.start.0"),V("dialog.giovanni.start.1"),V("dialog.giovanni.start.2")],victory:[V("dialog.giovanni.victory.0"),V("dialog.giovanni.victory.1"),()=>(k.receiveBadge(Aa),[V("dialog.giovanni.victory.2"),V("dialog.giovanni.victory.3")]),V("dialog.giovanni.victory.4"),V("dialog.giovanni.victory.5"),V("dialog.giovanni.victory.6"),V("dialog.giovanni.victory.7")],defeat:[V("dialog.giovanni.defeat.0"),V("dialog.giovanni.defeat.1")]}};var Uf=(E=>(E[E.MET=0]="MET",E[E.BEATEN=1]="BEATEN",E))(Uf||{});const Vf={ref:"hector",frameIndex:16,introFrameIndex:8,dialogs:{start:[()=>(k.dialogStates.hector=0,V("dialog.hector.start.0")),V("dialog.hector.start.1"),V("dialog.hector.start.2"),V("dialog.hector.start.3"),V("dialog.hector.start.4"),V("dialog.hector.start.5")],victory:[V("dialog.hector.victory.0"),V("dialog.hector.victory.1"),V("dialog.hector.victory.2"),()=>(k.dialogStates.hector=1,Ye(bn).then(()=>V("dialog.hector.victory.3"))),V("dialog.hector.victory.4"),V("dialog.hector.victory.5")],defeat:[V("dialog.hector.defeat.0"),V("dialog.hector.defeat.1"),V("dialog.hector.defeat.2")]}};var Yf=(E=>(E[E.MET=0]="MET",E[E.BEATEN=1]="BEATEN",E))(Yf||{});const zf={ref:"sally",frameIndex:17,introFrameIndex:9,dialogs:{start:[()=>(k.dialogStates.sally=0,V("dialog.sally.start.0")),V("dialog.sally.start.1"),V("dialog.sally.start.2"),V("dialog.sally.start.3"),V("dialog.sally.start.4"),V("dialog.sally.start.5")],victory:[V("dialog.sally.victory.0"),V("dialog.sally.victory.1"),V("dialog.sally.victory.2"),V("dialog.sally.victory.3"),()=>(k.dialogStates.sally=1,Ye(Bn).then(()=>V("dialog.sally.victory.4"))),V("dialog.sally.victory.5")],defeat:[V("dialog.sally.defeat.0"),V("dialog.sally.defeat.1"),V("dialog.sally.defeat.2")]}},Fo=[If,Ff,wf,Df,Nf,bf,Gf,Bf,zf,Vf],Wf={ref:"olga",frameIndex:45,introFrameIndex:null,dialogs:{start:[V("dialog.olga.start.0"),V("dialog.olga.start.1"),V("dialog.olga.start.2"),V("dialog.olga.start.3"),V("dialog.olga.start.4"),V("dialog.olga.start.5")],victory:[V("dialog.olga.victory.0"),V("dialog.olga.victory.1")],defeat:[V("dialog.olga.defeat.0")]}},Hf={ref:"aldo",frameIndex:46,introFrameIndex:null,dialogs:{start:[V("dialog.aldo.start.0"),V("dialog.aldo.start.1"),V("dialog.aldo.start.2"),V("dialog.aldo.start.3"),V("dialog.aldo.start.4")],victory:[V("dialog.aldo.victory.0")],defeat:[V("dialog.aldo.defeat.0")]}},Xf={ref:"agatha",frameIndex:47,introFrameIndex:null,dialogs:{start:[V("dialog.agatha.start.0"),V("dialog.agatha.start.1"),V("dialog.agatha.start.2"),V("dialog.agatha.start.3"),V("dialog.agatha.start.4"),V("dialog.agatha.start.5"),V("dialog.agatha.start.6"),V("dialog.agatha.start.7")],victory:[V("dialog.agatha.victory.0"),V("dialog.agatha.victory.1")],defeat:[V("dialog.agatha.defeat.0")]}},kf={ref:"peter",frameIndex:48,introFrameIndex:null,dialogs:{start:[V("dialog.peter.start.0"),V("dialog.peter.start.1"),V("dialog.peter.start.2"),V("dialog.peter.start.3"),V("dialog.peter.start.4"),V("dialog.peter.start.5"),V("dialog.peter.start.6"),V("dialog.peter.start.7")],victory:[V("dialog.peter.victory.0"),V("dialog.peter.victory.1"),V("dialog.peter.victory.2"),V("dialog.peter.victory.3"),V("dialog.peter.victory.4"),V("dialog.peter.victory.5"),V("dialog.peter.victory.6")],defeat:[V("dialog.peter.defeat.0")]}},Kf={ref:"rival",frameIndex:49,introFrameIndex:null,dialogs:{start:[V("dialog.rival.start.0"),V("dialog.rival.start.1"),V("dialog.rival.start.2"),V("dialog.rival.start.3"),V("dialog.rival.start.4"),V("dialog.rival.start.5"),V("dialog.rival.start.6")],victory:[V("dialog.rival.victory.0"),V("dialog.rival.victory.1"),V("dialog.rival.victory.2")],defeat:[V("dialog.rival.defeat.0"),V("dialog.rival.defeat.1"),V("dialog.rival.defeat.2")]}},Jf=[Wf,Hf,Xf,kf,Kf],zn={BEFORE_WILD:0,AFTER_WILD:1,AFTER_CAPTURE_SELF:2},gg={ref:"assistant_tuto",frameIndex:19,introFrameIndex:null,dialogs:{start:[V("dialog.assistant_tuto.start.0"),V("dialog.assistant_tuto.start.1"),()=>(k.dialogStates.assistant_tuto=zn.BEFORE_WILD,Ye(We,5)),V("dialog.assistant_tuto.start.2"),{[V("yes")]:()=>[V("dialog.assistant_tuto.start.yes0")],[V("no")]:()=>[V("dialog.assistant_tuto.start.no0"),V("dialog.assistant_tuto.start.no1"),V("dialog.assistant_tuto.start.no2"),V("dialog.assistant_tuto.start.no3"),V("dialog.assistant_tuto.start.no4")]}],victory:[V("dialog.assistant_tuto.victory.0")],defeat:[()=>{for(const E of k.board.otherTeam)Io(E);return V("dialog.assistant_tuto.defeat.0")},V("dialog.assistant_tuto.defeat.1")],step2:[()=>(Fe("music_guide"),V("dialog.assistant_tuto.step2.0")),V("dialog.assistant_tuto.step2.1"),V("dialog.assistant_tuto.step2.2"),V("dialog.assistant_tuto.step2.3"),()=>{const E=k.player.team[0].entry;for(const A of k.board.otherTeam)Io(A);return k.dialogStates.assistant_tuto=zn.AFTER_WILD,Et(500).then(()=>{const A=k.activeScene;k.stage=Se.CAPTURE,k.board.otherTeam=Dx(E),zo(k.board.otherTeam[0],A)}),V("dialog.assistant_tuto.step2.4",{name:V(`pokemon.${E.ref}`)})}],step3:[V("dialog.assistant_tuto.step3.0"),V("dialog.assistant_tuto.step3.1"),V("dialog.assistant_tuto.step3.2")]}},xg={ref:"sbire_rocket",frameIndex:18,introFrameIndex:null,dialogs:{start:[V("dialog.sbire_rocket.start.0"),V("dialog.sbire_rocket.start.1")],victory:[V("dialog.sbire_rocket.victory.0")],defeat:[V("dialog.sbire_rocket.defeat.0")]}},yg={ref:"sbire_rocket",frameIndex:18,introFrameIndex:null,dialogs:{start:[V("dialog.sbire_rocket_tuto.start.0"),V("dialog.sbire_rocket_tuto.start.1"),V("dialog.sbire_rocket_tuto.start.2"),V("dialog.sbire_rocket_tuto.start.3")],victory:[V("dialog.sbire_rocket_tuto.victory.0"),V("dialog.sbire_rocket_tuto.victory.1"),V("dialog.sbire_rocket_tuto.victory.2")],defeat:[V("dialog.sbire_rocket_tuto.defeat.0")]}},Eg={ref:"dresseur_col_de_montagne",frameIndex:20,introFrameIndex:null,dialogs:{start:[V("dialog.dresseur_col_de_montagne.start.0"),V("dialog.dresseur_col_de_montagne.start.1"),V("dialog.dresseur_col_de_montagne.start.2")],victory:[V("dialog.dresseur_col_de_montagne.victory.0")],defeat:[V("dialog.dresseur_col_de_montagne.defeat.0")]}},Tg={ref:"dresseur_dojo",frameIndex:21,introFrameIndex:null,dialogs:{start:[V("dialog.dresseur_dojo.start.0"),V("dialog.dresseur_dojo.start.1"),V("dialog.dresseur_dojo.start.2")],victory:[V("dialog.dresseur_dojo.victory.0"),V("dialog.dresseur_dojo.victory.1")],defeat:[V("dialog.dresseur_dojo.defeat.0")]}},Sg={ref:"dresseur_falaises",frameIndex:22,introFrameIndex:null,dialogs:{start:[V("dialog.dresseur_falaises.start.0"),V("dialog.dresseur_falaises.start.1"),V("dialog.dresseur_falaises.start.2")],victory:[V("dialog.dresseur_falaises.victory.0")],defeat:[V("dialog.dresseur_falaises.defeat.0")]}},Ag={ref:"dresseur_safrania",frameIndex:23,introFrameIndex:null,dialogs:{start:[V("dialog.dresseur_safrania.start.0"),V("dialog.dresseur_safrania.start.1"),V("dialog.dresseur_safrania.start.2")],victory:[V("dialog.dresseur_safrania.victory.0")],defeat:[V("dialog.dresseur_safrania.defeat.0")]}},Cg={ref:"dresseur_piste_cyclable",frameIndex:24,introFrameIndex:null,dialogs:{start:[V("dialog.dresseur_piste_cyclable.start.0"),V("dialog.dresseur_piste_cyclable.start.1"),V("dialog.dresseur_piste_cyclable.start.2")],victory:[V("dialog.dresseur_piste_cyclable.victory.0")],defeat:[V("dialog.dresseur_piste_cyclable.defeat.0")]}},Pg={ref:"dresseur_iles_ecume",frameIndex:25,introFrameIndex:null,dialogs:{start:[V("dialog.dresseur_iles_ecume.start.0")],victory:[V("dialog.dresseur_iles_ecume.victory.0")],defeat:[V("dialog.dresseur_iles_ecume.defeat.0")]}},Rg={ref:"dresseur_centrale",frameIndex:26,introFrameIndex:null,dialogs:{start:[V("dialog.dresseur_centrale.start.0"),V("dialog.dresseur_centrale.start.1"),V("dialog.dresseur_centrale.start.2")],victory:[V("dialog.dresseur_centrale.victory.0")],defeat:[V("dialog.dresseur_centrale.defeat.0")]}},Lg={ref:"dresseur_foret_jade",frameIndex:27,introFrameIndex:null,dialogs:{start:[V("dialog.dresseur_foret_jade.start.0"),V("dialog.dresseur_foret_jade.start.1"),V("dialog.dresseur_foret_jade.start.2")],victory:[V("dialog.dresseur_foret_jade.victory.0")],defeat:[V("dialog.dresseur_foret_jade.defeat.0")]}},Og={ref:"dresseur_azuria",frameIndex:28,introFrameIndex:null,dialogs:{start:[V("dialog.dresseur_azuria.start.0"),V("dialog.dresseur_azuria.start.1")],victory:[V("dialog.dresseur_azuria.victory.0")],defeat:[V("dialog.dresseur_azuria.defeat.0")]}},Mg={ref:"dresseur_lavanville",frameIndex:29,introFrameIndex:null,dialogs:{start:[V("dialog.dresseur_lavanville.start.0"),V("dialog.dresseur_lavanville.start.1")],victory:[V("dialog.dresseur_lavanville.victory.0")],defeat:[V("dialog.dresseur_lavanville.defeat.0")]}},Ig={ref:"dresseur_mont_selenite",frameIndex:30,introFrameIndex:null,dialogs:{start:[V("dialog.dresseur_mont_selenite.start.0")],victory:[V("dialog.dresseur_mont_selenite.victory.0")],defeat:[V("dialog.dresseur_mont_selenite.defeat.0")]}},Fg={ref:"dresseur_oceane",frameIndex:31,introFrameIndex:null,dialogs:{start:[V("dialog.dresseur_oceane.start.0"),V("dialog.dresseur_oceane.start.1"),V("dialog.dresseur_oceane.start.2"),V("dialog.dresseur_oceane.start.3")],victory:[V("dialog.dresseur_oceane.victory.0")],defeat:[V("dialog.dresseur_oceane.defeat.0"),V("dialog.dresseur_oceane.defeat.1")]}},wg={ref:"mr_psy",frameIndex:32,introFrameIndex:null,dialogs:{start:[V("dialog.mr_psy.start.0"),V("dialog.mr_psy.start.1")],victory:[V("dialog.mr_psy.victory.0")],defeat:[V("dialog.mr_psy.defeat.0"),V("dialog.mr_psy.defeat.1"),V("dialog.mr_psy.defeat.2")]}},Dg={ref:"dresseur_champs_verdoyants",frameIndex:33,introFrameIndex:null,dialogs:{start:[V("dialog.dresseur_champs_verdoyants.start.0"),V("dialog.dresseur_champs_verdoyants.start.1")],victory:[V("dialog.dresseur_champs_verdoyants.victory.0"),V("dialog.dresseur_champs_verdoyants.victory.1")],defeat:[V("dialog.dresseur_champs_verdoyants.defeat.0"),V("dialog.dresseur_champs_verdoyants.defeat.1"),V("dialog.dresseur_champs_verdoyants.defeat.2")]}},Ng={ref:"dresseur_camp_nomade",frameIndex:34,introFrameIndex:null,dialogs:{start:[V("dialog.dresseur_camp_nomade.start.0"),V("dialog.dresseur_camp_nomade.start.1"),V("dialog.dresseur_camp_nomade.start.2")],victory:[V("dialog.dresseur_camp_nomade.victory.0")],defeat:[V("dialog.dresseur_camp_nomade.defeat.0")]}},bg={ref:"dresseur_celadopole",frameIndex:35,introFrameIndex:null,dialogs:{start:[V("dialog.dresseur_celadopole.start.0"),V("dialog.dresseur_celadopole.start.1"),V("dialog.dresseur_celadopole.start.2")],victory:[V("dialog.dresseur_celadopole.victory.0"),V("dialog.dresseur_celadopole.victory.1")],defeat:[V("dialog.dresseur_celadopole.defeat.0")]}},Bg={ref:"dresseur_argenta",frameIndex:36,introFrameIndex:null,dialogs:{start:[V("dialog.dresseur_argenta.start.0")],victory:[V("dialog.dresseur_argenta.victory.0")],defeat:[V("dialog.dresseur_argenta.defeat.0")]}},Gg={ref:"dresseur_grotte_azuree",frameIndex:37,introFrameIndex:null,dialogs:{start:[V("dialog.dresseur_grotte_azuree.start.0"),V("dialog.dresseur_grotte_azuree.start.1")],victory:[V("dialog.dresseur_grotte_azuree.victory.0")],defeat:[V("dialog.dresseur_grotte_azuree.defeat.0"),V("dialog.dresseur_grotte_azuree.defeat.1")]}},Ug={ref:"dresseur_carmin",frameIndex:38,introFrameIndex:null,dialogs:{start:[V("dialog.dresseur_carmin.start.0"),V("dialog.dresseur_carmin.start.1"),V("dialog.dresseur_carmin.start.2")],victory:[V("dialog.dresseur_carmin.victory.0")],defeat:[V("dialog.dresseur_carmin.defeat.0")]}},Vg={ref:"dresseur_tour_pokemon",frameIndex:39,introFrameIndex:null,dialogs:{start:[V("dialog.dresseur_tour_pokemon.start.0")],victory:[V("dialog.dresseur_tour_pokemon.victory.0")],defeat:[V("dialog.dresseur_tour_pokemon.defeat.0"),V("dialog.dresseur_tour_pokemon.defeat.1")]}},zi={hello:0,has_met:1,has_deposed:2},Yg={ref:"dresseur_pension",frameIndex:40,introFrameIndex:null,dialogs:{start(){return k.dialogStates.pension===zi.has_met?[V("dialog.dresseur_pension.start.0")]:k.dialogStates.pension===zi.has_deposed?[V("dialog.dresseur_pension.start.1")]:(k.dialogStates.pension=zi.has_met,[V("dialog.dresseur_pension.start.2"),V("dialog.dresseur_pension.start.3"),V("dialog.dresseur_pension.start.4"),V("dialog.dresseur_pension.start.5"),V("dialog.dresseur_pension.start.6")])},bye(){return k.dialogStates.pension===zi.has_deposed?[V("dialog.dresseur_pension.bye.0")]:[V("dialog.dresseur_pension.bye.1")]}}},zg={ref:"dresseur_cave_taupiqueur",frameIndex:41,introFrameIndex:null,dialogs:{start:[V("dialog.dresseur_cave_taupiqueur.start.0"),V("dialog.dresseur_cave_taupiqueur.start.1")],victory:[V("dialog.dresseur_cave_taupiqueur.victory.0"),V("dialog.dresseur_cave_taupiqueur.victory.1")],defeat:[V("dialog.dresseur_cave_taupiqueur.defeat.0")]}},Wg={ref:"dresseur_colline_royale",frameIndex:42,introFrameIndex:null,dialogs:{start:[V("dialog.dresseur_colline_royale.start.0"),V("dialog.dresseur_colline_royale.start.1"),V("dialog.dresseur_colline_royale.start.2"),V("dialog.dresseur_colline_royale.start.3")],victory:[V("dialog.dresseur_colline_royale.victory.0")],defeat:[V("dialog.dresseur_colline_royale.defeat.0"),V("dialog.dresseur_colline_royale.defeat.1")]}},Hg={ref:"dresseur_mont_braise",frameIndex:43,introFrameIndex:null,dialogs:{start:[V("dialog.dresseur_mont_braise.start.0"),V("dialog.dresseur_mont_braise.start.1"),V("dialog.dresseur_mont_braise.start.2")],victory:[V("dialog.dresseur_mont_braise.victory.0")],defeat:[V("dialog.dresseur_mont_braise.defeat.0")]}},Xg={ref:"sbire_rocket",frameIndex:44,introFrameIndex:null,dialogs:{start:[V("dialog.dresseur_parmanie.start.0"),V("dialog.dresseur_parmanie.start.1")],victory:[V("dialog.dresseur_parmanie.victory.0")],defeat:[V("dialog.dresseur_parmanie.defeat.0")]}},kg={ref:"dresseur_cramoisile",frameIndex:19,introFrameIndex:null,dialogs:{start:[V("dialog.dresseur_cramoisile.start.0"),V("dialog.dresseur_cramoisile.start.1")],victory:[V("dialog.dresseur_cramoisile.victory.0")],defeat:[V("dialog.dresseur_cramoisile.defeat.0")]}};class wo{constructor(A){ut(this,"ref");ut(this,"name");ut(this,"team");ut(this,"box");ut(this,"inventory");ut(this,"badges");this.ref=A,this.name=`Player ${A}`,this.team=[],this.inventory={[We.ref]:0},this.box=[null,null,null,null,null,null,null,null],this.badges=[]}resetTeam(){return this.team.map(A=>A.reset())}get averagePokemonLevel(){const A=[...this.team,...this.box].sort((R,F)=>(F?F.level:0)-(R?R.level:0)).slice(0,8).filter(R=>R instanceof Fi),C=A.reduce((R,F)=>R+F.level,0);return Math.max(1,Math.floor(C/A.length))}get boxScore(){return[...this.team,...this.box].reduce((A,C)=>C?A+C.level:A,0)}get hasBoxFull(){return this.box.every(A=>A!=null)}get boardAndBox(){return[...this.team,...this.box.filter(A=>A!=null)]}}function xi(E){const A=new Set(E.flatMap(C=>C.types));return new Map([...A].map(C=>[C,Kg(E,C)]))}function Kg(E,A){const C=uf[A.ref],R=E.filter(B=>B.hasType(A)).length,F=[...C.steps].reverse().find(B=>B.numberRequired<=R)||null;return{type:A,ref:F==null?void 0:F.ref,steps:C.steps,stepReached:F,stepReachedN:F?C.steps.indexOf(F)+1:0,numberOfThatTypeInTeam:R}}const Ql="pokechess_save",jf="pokechess_record";function Jg(){var A;if(k.dialogStates.assistant_tuto!==zn.AFTER_WILD)return;const E={day:k.day,currentDestinationRef:k.currentDestination.ref,currentRoomIndex:k.currentRoomIndex,roomOrder:k.roomOrder,players:k.players.map(C=>qg(C)),stage:k.stage,dialogStates:k.dialogStates,seed:k.seed,lastCaptureDestinationRef:(A=k.lastCaptureDestination)==null?void 0:A.ref,lastTourMam:k.lastTourMam,pension:k.pension.map(C=>ql(C)),pokedexSeen:[...k.pokedexSeen],pokedexCaptured:[...k.pokedexCaptured],wokeUpRonflex:k.wokeUpRonflex};localStorage.setItem(Ql,JSON.stringify(E))}function jg(){return localStorage.getItem(Ql)!=null}function Zg(){const E=localStorage.getItem(Ql);if(!E)return!1;let A;try{A=JSON.parse(E)}catch(C){return console.error(`Corrupted save :${C}`),!1}return k.day=A.day,k.currentDestination=en[A.currentDestinationRef],k.currentRoomIndex=A.currentRoomIndex,k.roomOrder=A.roomOrder,k.players=A.players.map(C=>vu(C)),k.board=cd(vu(A.players[0])),k.stage=A.stage,k.dialogStates=A.dialogStates,k.seed=A.seed,k.lastCaptureDestination=A.lastCaptureDestinationRef?en[A.lastCaptureDestinationRef]:null,k.lastTourMam=A.lastTourMam,k.pension=A.pension.map(C=>_l(C)),k.pokedexCaptured=new Set(A.pokedexCaptured),k.pokedexSeen=new Set(A.pokedexSeen),k.wokeUpRonflex=A.wokeUpRonflex,!0}function $g(){const E=localStorage.getItem(jf);if(!E)return null;let A;try{return A=JSON.parse(E),{team:A.team.map(C=>_l(C)),pokedexSeen:A.pokedexSeen,pokedexCaptured:A.pokedexCaptured,nbTours:A.nbTours}}catch(C){return console.error(`Corrupted record save :${C}`),null}}function Qg(){const E={team:k.player.team.map(A=>ql(A)),pokedexSeen:k.pokedexSeen.size,pokedexCaptured:k.pokedexCaptured.size,nbTours:k.day};localStorage.setItem(jf,JSON.stringify(E))}function qg(E){return{ref:E.ref,name:E.name,team:E.team.map(A=>ql(A)),box:E.box.map(A=>A?Zf(A):null),inventory:E.inventory,badges:E.badges}}function vu(E){return Object.assign(new wo(E.ref),{name:E.name,team:E.team.map(A=>_l(A)),box:E.box.map(A=>A?_g(A):null),inventory:E.inventory,badges:E.badges})}function Zf(E){var A;return{ref:E.entry.ref,xp:E.xp,itemRef:(A=E.item)==null?void 0:A.ref,owner:E.owner}}function _g(E){return new Fi({entry:De.find(C=>C.ref===E.ref)??Ds,owner:E.owner,xp:E.xp,item:E.itemRef?ke[E.itemRef]:void 0})}function ql(E){return{...Zf(E),x:E.placementX,y:E.placementY}}function _l(E){return new Tt({entry:De.find(A=>A.ref===E.ref)??Ds,owner:E.owner,xp:E.xp,item:E.itemRef?ke[E.itemRef]:void 0,x:E.x,y:E.y})}let Pi,he;function Us(E){const A=k.activeScene;if(Pi===E&&k.stage!==Se.FIGHT)return;Pi!=null&&ui(),Pi=E,he=A.add.group();const C=E instanceof Tt&&E.y<4,R=C?game.scale.height-42:42,F=C?game.scale.width/2+20:game.scale.width/2,B=A.add.nineslice(F,R,"box1",void 0,280,84,8,8,8,8).setOrigin(.5,.5).setScrollFactor(0);he.add(B);let v=E.entry.ref;E instanceof Tt&&E.initialEntry===Gr&&(v=Gr.ref);const y=gt(F-50,R-28,`${V(`pokemon.${v}`)} Lv${E.level}`);he.add(y);const t=A.add.sprite(F-92,R-1,"pokemon_portraits");t.play(`${E.entry.ref}_portrait`),t.setScrollFactor(0),he.add(t);const h=gt(F-50,R-12,"HP");he.add(h);const p=gt(F+48,R-12,`${Math.ceil(E.pv).toString().padStart(3)} / ${E.maxPV}`);he.add(p);const a=72,n=A.add.graphics();n.setDepth(ft.MENU_OBJECTS).setScrollFactor(0),n.fillStyle(0).fillRoundedRect(F-30,R-8,a+2,6,4),n.fillStyle(13684896,1).fillRoundedRect(F-29,R-7,a,4,2),n.fillStyle(47872).fillRoundedRect(F-29,R-7,Math.ceil(a*E.pv/E.maxPV),4,2);const r=gt(F-50,R-1,"PP");he.add(r);const e=gt(F+48,R-1,`${Math.floor(E.pp).toString().padStart(3)} / ${E.entry.maxPP}`);he.add(e),n.fillStyle(0).fillRoundedRect(F-30,R+2,a+2,6,4),n.fillStyle(13684896,1).fillRoundedRect(F-29,R+3,a,4,2),n.fillStyle(255,1).fillRoundedRect(F-29,R+3,Math.ceil(a*E.pp/E.entry.maxPP),4,2),he.add(n);const s=A.add.sprite(F-50,R+14,"icons16x16",16);s.setAlpha(.25).setOrigin(0,0).setScrollFactor(0),he.add(s);const o=gt(F-30,R+15,E.attack.toFixed(0));he.add(o);const i=A.add.sprite(F-2,R+14,"icons16x16",17);i.setAlpha(.25).setOrigin(0,0).setScrollFactor(0),he.add(i);const l=gt(F+18,R+15,E.defense.toFixed(0));he.add(l);const u=A.add.sprite(F+46,R+14,"icons16x16",18);u.setAlpha(.25).setOrigin(0,0).setScrollFactor(0),he.add(u);const f=gt(F+66,R+15,E.speed.toFixed(0));he.add(f);const d=A.add.sprite(F+94,R+14,"icons16x16",19);d.setAlpha(.25).setOrigin(0,0).setScrollFactor(0),he.add(d);const c=gt(F+114,R+15,E.entry.baseSkill.attackRange.toFixed(0));he.add(c);for(let m=0;mA=>k.player.team.length>0?[V("dialog.starter.after",{name:V(`pokemon.${k.starters[E].ref}`)})]:[()=>{const C=k.starters[E];return Us(new Fi({entry:C,owner:Wd,level:5})),V("dialog.starter.choose",{name:V(`pokemon.${C.ref}`)})},{[V("yes")]:()=>{const C=k.starters[E];return No(new Tt({entry:C,owner:xe,level:5,x:3,y:6})),ui(),A.sprite.destroy(!0),k.dialogStates.chen=pi.after_starter_choice,Rs("pokemon_received"),hh(2e3),V("dialog.starter.chosen",{name:V(`pokemon.${C.ref}`)})},[V("no")]:()=>ui()}];function Ye(E,A=1,C=!0,R="trainer"){C&&Rs("item_received"),Object.prototype.hasOwnProperty.call(k.player.inventory,E.ref)||(k.player.inventory[E.ref]=0),k.player.inventory[E.ref]+=A;const F=V(`item.${E.ref}`,{defaultValue:"???"});return E===We&&Ei(),hh(2e3),Mt([V("dialog.item_received",{verb:V(R==="finding"?"dialog.find":"dialog.receive"),label:F,quantity:A>1?`x${A}`:""})],{speaker:"system"})}let Tr=0;const pu={unknown:["..?"],tv:[V("descriptions.tv.0"),V("descriptions.tv.1"),()=>[V("descriptions.tv.2"),V("descriptions.tv.3"),V("descriptions.tv.4")][++Tr%3],V("descriptions.tv.5")],frigo:[V("descriptions.frigo.0")],book:[V("descriptions.book.0"),()=>{const E=[V("descriptions.book.1"),V("descriptions.book.2"),V("descriptions.book.3"),V("descriptions.book.4"),V("descriptions.book.5"),V("descriptions.book.6"),V("descriptions.book.7"),V("descriptions.book.8"),V("descriptions.book.9"),V("descriptions.book.10"),V("descriptions.book.11"),V("descriptions.book.12"),V("descriptions.book.13"),V("descriptions.book.14"),V("descriptions.book.15")];return E[++Tr%E.length]}],book_insect:[V("descriptions.book_insect.0"),()=>{let E=k.player.boardAndBox.map(C=>C.entry).filter(C=>C.evolution!=null);E.length===0&&(E=ef().filter(C=>C.evolution!=null));const A=E[Tr%E.length];return Tr++,V("descriptions.book_insect.1",{name:V(`pokemon.${A.ref}`),level:A.evolutionLevel})},V("descriptions.book_insect.2")],map:[V("descriptions.map")],bed:[V("descriptions.bed")],boat:[V("descriptions.boat")],starter1:fo(0),starter2:fo(1),starter3:fo(2),pc_end:[V("descriptions.pc_end.0"),{[V("yes")]:()=>[V("descriptions.pc_end.1"),()=>(Qg(),Et(2e3).then(()=>Bi(2e3)).then(()=>{k.activeScene.scene.start("GameOverScene")}),V("descriptions.pc_end.2"))],[V("no")]:()=>[V("descriptions.pc_end.3")]}],pc_record:[V("descriptions.pc_record.0"),()=>{const E=$g();return E?[V("descriptions.pc_record.2",{nbTours:E.nbTours}),V("descriptions.pc_record.3",{nbCaptured:E.pokedexCaptured,nbSeen:E.pokedexSeen}),V("descriptions.pc_record.4"),...qm(E.team.map(A=>`${V(`pokemon.${A.entry.ref}`)} lvl ${A.level}`),2).map(A=>`${A[0]} -${A[1]}`)]:V("descriptions.pc_record.1")},V("descriptions.pc_record.5")]};let co=null;class n1 extends rr{constructor(){super({x:0,y:0},"player");ut(this,"movesBeforeTp");ut(this,"interactionSprite");this.movesBeforeTp=0,this.sprite.setCollideWorldBounds(!0),this.interactionSprite=k.activeScene.make.sprite({x:0,y:0,key:"interactions"}),this.interactionSprite.setVisible(!1).setDepth(ft.DIALOG),k.activeScene.time.addEvent({delay:300,callback:()=>this.checkInFrontOfPlayer(),loop:!0}),window.player=this}update(){super.update(),this.updateControls();const{x:C=0,y:R=0}=this.sprite.getCenter();this.interactionSprite.setPosition(C+8,R-8)}getWatchingPoint(C=1){let{x:R=0,y:F=0}=this.sprite.getCenter();switch(F+=ye/2,this.state){case St.LEFT:case St.WALKING_LEFT:R-=ye*C;break;case St.RIGHT:case St.WALKING_RIGHT:R+=ye*C;break;case St.UP:case St.WALKING_UP:F-=ye*C;break;case St.DOWN:case St.WALKING_DOWN:default:F+=ye*C;break}return{x:R,y:F}}get canInteract(){return!k.activeDialog&&!k.activeMenu}get canMove(){return!k.activeDialog&&!k.activeMenu&&!this.isForceMoving}checkInFrontOfPlayer(){const C=k.activeScene;if(!C.groups)return;const R=this.getObjectWatched(C.groups.characters),F=this.getObjectWatched(C.groups.objects);this.interactionSprite.setVisible(this.canInteract&&!!(R||F)),R?this.interactionSprite.anims.play("interaction_talk",!0):F&&this.interactionSprite.anims.play("interaction_loot",!0)}updateControls(){const{x:C=0,y:R=0}=this.sprite.body??{},F=yr((C+ye/2)%ye,ye/2-1,ye/2+1)&&yr((R+ye/2)%ye,ye/2-1,ye/2+1),{moveVector:B}=kl(this.sprite.scene),v=Hl(B);v===null&&this.isMoving&&!this.isForceMoving&&F?this.stopMoving():v!=null&&v!==this.walkingDirection&&this.canMove&&F&&this.move(v),this.isMoving&&this.movesBeforeTp>0&&this.movesBeforeTp--}getObjectWatched(C){return C.getChildren().find(F=>{if(F instanceof Phaser.GameObjects.Sprite){let{x:B=0,y:v=0}=F.getBottomCenter();const y=F.getData("interactionDistance")??1,{x:t,y:h}=this.getWatchingPoint(y);return v-=8,yr(t,B-4,B+4)&&yr(h,v-4,v+4)}return!1})}doAction(){if(co)return;if(co=setTimeout(()=>{co=null},250),k.activeDialog)return ur();const C=k.activeScene,R=this.getObjectWatched(C.groups.characters);if(R&&this.canInteract)return dx(R.getData("character"),this.state);const F=this.getObjectWatched(C.groups.objects);if(F&&this.canInteract){let B=pu[F.getData("name")]||pu.unknown;typeof B=="function"&&(B=B(F.getData("description"))),Mt(B,{speaker:F.getData("name")}).then(()=>{})}}goToDoor(C){var v;const R=k.activeScene,F=n0(C,"door",R.level.tilemap);(v=this.sprite.body)==null||v.reset(F.x*ri+ye/2,F.y*ri),this.alignOnGrid();const B=mt[F.properties.outDirection]??mt.UP;R.disableTriggers=!0,this.forceMove(B,350).then(()=>{R.disableTriggers=!1})}}function $f(){const E=k.activeScene,A=k.currentRoom,C=E.add.nineslice(E.scale.width/2,-32,"box2",void 0,160,0,4,4,4,4);C.setOrigin(.5,.5);const R=gt(E.scale.width/2,-30,A.name,{color:"#000"});R.setOrigin(.5,.5),R.setScrollFactor(0),C.setSize(R.width+24,R.height+12),C.setScrollFactor(0),C.setDepth(ft.MENU_TOOLTIPS),R.setDepth(ft.MENU_TOOLTIPS+1),E.add.tween({targets:[C,R],duration:400,y:"+=38",ease:"Linear"}),E.add.tween({targets:[C,R],duration:400,y:-36,ease:"Linear",delay:2e3})}class Vs extends At.Scene{constructor(C){super(C);ut(this,"sprites");ut(this,"objects");ut(this,"graphics");this.sprites=new Map,this.objects=new Map}onPressA(){}onPressB(){}onPressStart(){}onClick(C){}preload(){}create(){}}class Qf extends Vs{constructor(){super("RoomScene");ut(this,"player");ut(this,"groups");ut(this,"level");ut(this,"disableTriggers");this.disableTriggers=!1,this.player=null,this.level=new zh(ff)}preload(){Bs(this),bi(this),Oa(this)}create(){const C=k.currentRoom;this.level=new zh(C.level),k.activeScene=this,nr(this),Ra(this.anims),this.physics.world.setBounds(0,0,1600,1600),this.player=new n1,this.level.create(),this.physics.add.collider(this.player.sprite,this.level.layer_collisions),this.children.bringToTop(this.player.sprite),this.cameras.main.startFollow(this.player.sprite),this.cameras.main.setBackgroundColor("black"),this.disableTriggers=!1,C.level.startAt?(this.disableTriggers=!0,this.player.goToDoor(C.level.startAt)):console.error(`No entrance door found for level ${C.name}`),$f(),Fe(C.music)}update(){var C;this.level&&(Ma(this),!this.disableTriggers&&((C=this.player)!=null&&C.sprite)&&this.physics.overlap(this.groups.triggers,this.player.sprite,this.onTrigger,void 0,this),this.groups.characters.getChildren().forEach(R=>{const F=R.getData("character");R.depth=R.y*.001,F==null||F.update()}))}onTrigger(C){const R=C.getData("action");R&&R()}onPressA(){var C;if(k.activeMenu!=null)return ar();(C=this.player)==null||C.doAction()}onPressB(){k.activeMenu!=null&&k.activeMenu.handleCancel()}}var Ct=(E=>(E.ARENA="ARENA",E.WILD="WILD",E.SPECIAL="SPECIAL",E))(Ct||{}),st=(E=>(E.ARENA="ARENA",E.WILD="WILD",E.FREEWALK="FREEWALK",E.TUTORIAL="TUTORIAL",E.SAFARI="SAFARI",E.PENSION="PENSION",E))(st||{});let Wi;function Ei(){const E=k.activeScene;Wi!=null&&Wi.destroy(!0,!0);let A=game.scale.width-64;[st.TUTORIAL,st.PENSION,st.ARENA].includes(k.currentRoom.type)&&(A=-16);let C=[A,-16],R=[A+40,8];E instanceof Qf&&(R=[28,8],C=[-16,-16]);const F=E.add.sprite(C[0],C[1],"pokeball",0);F.play(`POKEBALL_${Wi?"jiggle_once":"in"}`).once(Phaser.Animations.Events.ANIMATION_COMPLETE,()=>F.play("POKEBALL_idle")).setOrigin(0,0).setScrollFactor(0),E.sprites.set("pokeball",F);const B=gt(R[0],R[1],k.player.inventory.pokeball.toString(),{align:"left",color:"white"});B.setStroke("#000000",3),Wi=E.add.group([F,B])}function r1(){Wi&&Wi.destroy(!0)}let mu=-1,gu=[];const qs=20,Jr=100,a1=248,o1=24,l1=1,jr=8,be=28,mi=4,Te=be+mi;let Re=1;function h1(E){zt("menu_open"),Gs({ref:"box",x:qs,y:Jr,width:a1+16*2,height:o1+16*2,background:"box1",offset:8,draw(A){u1(E,A)},handleMove(A){var B;zt("tick");const C=E.sprites.get("cursor");if(!C)return;let R=C.x,F=C.y;if(A.y>0&&Re===1?(Re=0,F+=16):A.y<0&&Re===0&&F<180?Re=1:A.y>0&&Re===0&&F>260?Re=2:A.y<0&&Re===2?Re=0:A.y<0&&Re===1&&Ot.draggedElem!=null?Re=3:A.y>0&&Re===3&&(Re=1),R+=A.x,F+=A.y,Re===1)mu=jt(Math.round((R-(qs+16+mi))/Te),0,7),R=qs+20+mi+Te*mu,F=Jr+16+mi;else if(Re===0){let[v,y]=Ws(R,F+10);v=jt(v,0,6),y=jt(y,4,7),[R,F]=Ue(v,y),F-=10}else Re===2?[R,F]=[vf(R,[100,160,220]),E.scale.height-24]:Re===3&&(R=E.scale.width/2+24,F=10);(B=E.sprites.get("cursor"))==null||B.setPosition(R,F),fh()}})}function u1(E,A){gu.forEach(B=>dr(B)),gu=[];const C=qs+10+mi,R=Jr+10+mi,F=E.add.graphics().lineStyle(2,0,.1).fillStyle(16772829);for(let B=0;B{f1(y,E)}),t.on("click",()=>{Ot.draggedElem!=null&&Ui(E)}),t.on("over",()=>{const h=k.player.box[y];h!=null&&Us(h)}),t.on("out",()=>ui()),A.add(t)}F.stroke().setDepth(ft.MENU_LAYOUT),A.add(F),k.player.box.forEach((B,v)=>{if(B!=null){const y=yi(B,E);qf(y,v)}})}function f1(E,A){var F;const C=(F=Ot.draggedElem)==null?void 0:F.getData("pokemon");if(C==null)return;const R=k.player.box[E];if(R!=null){const B=A.sprites.get(R.uid);B&&Na(B)&&ki(()=>{var v,y;(y=(v=k.activeMenu)==null?void 0:v.container)==null||y.remove(B),zs(B,A)})}hr(C,k.board.playerTeam),Ys(C,E),ba()}function qf(E,A){var F,B;(B=(F=k.activeMenu)==null?void 0:F.container)==null||B.add(E);const C=qs+10+mi+be/2+A%jr*Te,R=Jr+10+mi+be/2+Math.floor(A/jr)*Te;E.anims.pause(),E.setAlpha(1).setScale(1).setDepth(ft.MENU_OBJECTS).setPosition(C,R)}function d1(E,A,C=1e3){return A.setAlpha(0).setScale(0),E.add.timeline([{at:0,tween:{targets:A,scale:1,alpha:1,ease:"Elastic",easeParams:[1.5,.8],duration:400}},{at:C,tween:{targets:A,alpha:0,scale:1,duration:400}}]),Et(C+400)}function c1(E,A,C=400){return E.tweens.add({targets:A instanceof Phaser.GameObjects.Group?A.getChildren():A,alpha:{from:0,to:1},duration:C}),Et(C)}function v1(E,A,C=400){return E.tweens.add({targets:A instanceof Phaser.GameObjects.Group?A.getChildren():A,alpha:{from:1,to:0},duration:C}),Et(C)}function p1(E,A,C=1e3,R=400){return A.setAlpha(0),E.add.timeline([{at:0,tween:{targets:A,alpha:1,duration:R}},{at:C,tween:{targets:A,alpha:0,duration:R}}]),Et(C+R*2)}const Sr=16;function Do(E,A){const C=A.objects.get("bars_"+E.uid),R=A.sprites.get(E.uid);if(R!=null&&C!=null){C.setDepth(ft.POKEMON_BARS),C.clear(),C.fillStyle(0,1);const F=R.x-Sr/2,B=R.y-16;C.fillRect(F,B,Sr,2),C.fillStyle(E.owner===1?3211056:16724016,1),C.fillRect(F,B,Math.ceil(E.pv/E.maxPV*Sr),1),C.fillStyle(28927,1),C.fillRect(F,B+1,Math.ceil(E.pp/E.entry.maxPP*Sr),1)}}function m1(E){if(k.stage===Se.FIGHT){for(const A of k.board.playerTeam)Do(A,E);for(const A of k.board.otherTeam)Do(A,E)}}function Zr(E,A){const C=A.add.sprite(A.scale.width/2,A.scale.height/2,"texts");return C.setDepth(ft.CENTER_TEXT).play(E),A.sprites.set("centerText",C),d1(A,C,500)}function xu(E){k.pension.push(E),k.dialogStates.pension=zi.has_deposed}function _f(E){ni(k.pension,E),k.pension.some(A=>A.owner===xe)||(k.dialogStates.pension=zi.has_met)}function g1(){for(const E of k.pension)E.xp+=k.day*100,E.level=Ho(E.xp),E.pv=E.maxPV}function td(E){k.player.inventory.pokeball-=E,Ei()}function Wn(E){return k.player.inventory.pokeball>=E}function Ks(E){return Object.values(ke).filter(A=>A.cost===E)}function x1(E){const A=Ks(1),C=A[(k.seed+E)%A.length],R=Ks(2),F=R[(k.seed>>2+E)%R.length],B=Ks(3),v=B[(k.seed>>4+E)%B.length],y=Ks(4),t=y[(k.seed>>6+E)%y.length],h=Ks(5),p=h[(k.seed>>8+E)%h.length];return{[C.ref]:3,[F.ref]:2,[v.ref]:1,[t.ref]:1,[p.ref]:1}}let Ze;function ed(E){if(Ze&&Ki(),!E)return;const A=k.activeScene;Ze=A.add.group().setOrigin(0,0);const C=64,R=24,F=A.scale.height-C-32,B=A.add.nineslice(R,F,"box1",void 0,A.scale.width-32,C,8,8,8,8).setOrigin(0,0).setScrollFactor(0);Ze.add(B);const v=th(E).setPosition(R+28,F+32).setScrollFactor(0);Ze.add(v),Ze.add(gt(R+56,F+8,V(`item.${E.ref}`),{fontStyle:"strong",color:"blue"})),Ze.add(gt(R+56,F+28,V(`item_desc.${E.ref}`),{wordWrap:{width:A.scale.width-96,useAdvancedWrap:!0}})),Ze.setDepth(ft.MENU)}function Ki(){Ze&&(Ze.destroy(!0),Ze=null)}const Bt={items:[],selectedIndex:0,pageStartIndex:0,numberPerPage:6,get page(){const E=Math.max(0,Bt.pageStartIndex??0);return this.items.slice(E,E+this.numberPerPage)},get selectedItem(){return this.items[this.selectedIndex??0]},get pageSelectedIndex(){return this.page.indexOf(this.selectedItem)}};let oe=null,_s=[],vo=null;function th(E){const A=k.activeScene.add.sprite(0,0,"items",_u.indexOf(E)).setOrigin(.5,.5);return A.setData("item",E),A.setData("type","item"),A}function y1(E){return Bt.items=Object.entries(k.player.inventory).map(([v,y],t)=>({ref:v,label:`${V(`item.${v}`)} x${y}`,quantity:y})).filter(v=>v.quantity>0&&v.ref in ke).sort((v,y)=>y.ref===We.ref?1:v.ref===We.ref?-1:v.label.localeCompare(y.label)),Bt.selectedIndex=0,Bt.pageStartIndex=0,zt("menu_open"),Gs({ref:"items_box",x:184,y:8,width:128,height:130,background:"box1",offset:8,handleMove(v){zt("tick"),v.y>0?Ji(Bt.selectedIndex+1):v.y<0&&Ji(Bt.selectedIndex-1)},handleChoice(){id(Bt.items[Bt.selectedIndex])},draw(v){Bt.selectedIndex=0,oe=E.add.container(184,8),v.add(oe),Ji(0,!1)},onClose(){Ki()}})}function E1(E,A){if(E===Sn){if(k.currentRoom.type!==st.WILD)return Mt([V("dialog.item_no_use")]);k.player.inventory[Sn.ref]-=1,Ix(A)}}function id(E){const A=k.activeScene,C=ke[E.ref];if(C.type===$s.Holdable){Le();const R=th(C);zs(R,A)}else{if(C.type===$s.Usable)return Et(0).then(()=>{const R={[V("yes")](){return E1(C,A),null},[V("no")](){return null}};Mt([V("dialog.item_use",{item:V(`item.${C.ref}`)}),R])}),!0;C.type===$s.Trade&&C===We&&Le()}}function Ji(E,A=!1){var F;const C=k.activeScene;if(E<0||E>=Bt.items.length)return;Bt.selectedIndex=E,EBt.pageStartIndex+Bt.numberPerPage-1&&(Bt.pageStartIndex=E-Bt.numberPerPage+1),T1();const R=ke[Bt.items[Bt.selectedIndex].ref];R?ed(R):Ki(),A&&((F=C.sprites.get("cursor"))==null||F.setPosition(298,20+Bt.pageSelectedIndex*20))}function T1(){const E=k.activeScene;oe&&(oe.removeAll(!0),_s.forEach(A=>dr(A)),_s=[],S1(),vo=E.add.sprite(7,16+Bt.pageSelectedIndex*20,"gui",16),vo.setScale(.5).setDepth(ft.MENU_CURSOR),oe.add(vo),oe.setDepth(ft.MENU),fr(E))}function S1(){const E=k.activeScene;Bt.page.forEach((B,v)=>{const y=E.add.rectangle(64,15+v*20,118,20,v%2?16772829:15654348).setDepth(ft.MENU_LAYOUT);pe(y),_s.push(y),y.on("click",()=>{const p=Bt.items.indexOf(B);p===Bt.selectedIndex?id(Bt.items[p]):Ji(p,!1)});const t=ke[B.ref].type===$s.Trade?"gray":"black",h=gt(16,8+v*20,B.label,{color:t}).setDepth(ft.MENU_OBJECTS).setAlign("left");oe==null||oe.add(y),oe==null||oe.add(h)});const A=E.add.rectangle(64,0,90,6,0).setDepth(ft.MENU_LAYOUT).setAlpha(0);pe(A),_s.push(A),A.on("click",()=>{Ji(Bt.selectedIndex-1,!1)});const C=E.add.sprite(64,0,"gui",16).setScale(.5).setAlpha(Bt.pageStartIndex===0?0:1).setRotation(Phaser.Math.DegToRad(-90));oe==null||oe.add(A),oe==null||oe.add(C);const R=E.add.rectangle(64,130,90,6,0).setDepth(ft.MENU_LAYOUT).setAlpha(0);pe(R),_s.push(R),R.on("click",()=>{Ji(Bt.selectedIndex+1,!1)});const F=E.add.sprite(64,130,"gui",16).setScale(.5).setAlpha(Bt.pageStartIndex+Bt.numberPerPage>=Bt.items.length?0:1).setRotation(Phaser.Math.DegToRad(90));oe==null||oe.add(R),oe==null||oe.add(F)}const yu=36,Eu=30,Lt={allPokemons:De,selectedIndex:0,pageStartIndex:0,numberPerPage:10,get filtered(){return this.allPokemons.filter(E=>ai===null||E.types.includes(ai))},get page(){const E=Math.max(0,Lt.pageStartIndex??0);return this.filtered.slice(E,E+this.numberPerPage)},get selectedPokemon(){return this.filtered[this.selectedIndex??0]},get pageSelectedIndex(){return this.page.indexOf(this.selectedPokemon)}};let Hi=0,ai=null,po=null,Zs=1,pt=null,ji=[];function Tu(E,A){zt("menu_open"),Gs({ref:"pokedex",x:yu,y:Eu,width:280,height:242,background:"box1",offset:8,handleMove(C){var R;zt("tick"),Zs===1&&Lt.selectedIndex!=null&&pt?C.y>0?Zi(Lt.selectedIndex+1):C.y<0&&(Lt.selectedIndex===0?(Zs=0,Lr(Object.keys($).length-1)):(Zi(Lt.selectedIndex-1),(R=E.sprites.get("cursor"))==null||R.setPosition(298,60+Lt.selectedIndex*20))):Zs===0&&pt&&(C.y>0?(Zs=1,Lt.selectedIndex=0,Lt.pageStartIndex=0,Zi(Lt.selectedIndex)):C.x>0?Lr(Hi+1):C.x<0&&Lr(Hi-1)),fr(E)},draw(C){Lt.selectedIndex=0,A!=null&&(Lt.selectedIndex=Lt.filtered.findIndex(R=>R.ref===A.entry.ref),Lt.pageStartIndex=Lt.selectedIndex),pt=E.add.container(yu,Eu),C.add(pt),eh()}})}function eh(){const E=k.activeScene;if(!pt)return;pt.removeAll(!0),ji.forEach(R=>dr(R)),ji=[],pt.add(E.add.line(140,28,0,0,272,0,0).setLineWidth(.5).setDepth(ft.MENU_LAYOUT)),pt.add(E.add.line(179,132,0,0,0,210,0).setLineWidth(.5).setDepth(ft.MENU_LAYOUT));const A=Object.values($),C=Object.values($);ai!=null&&(C.splice(C.indexOf(ai),1),C.push(ai)),C.forEach(R=>{const F=A.indexOf(R);ai===R&&(pt==null||pt.add(E.add.graphics().lineStyle(4,0).strokeCircle(20+F*16,16,8)));const B=E.add.sprite(20+F*16,16,"icons16x16",R.frameIndex);B.setDepth(ft.MENU_OBJECTS),pe(B),ji.push(B),B.on("over",()=>Lr(F,!1)),B.on("click",()=>C1(R)),pt==null||pt.add(B)}),A1(),Lt.filtered.length>0&&Lt.selectedIndex in Lt.filtered&&P1(Lt.selectedPokemon),Zs===1&&Lt.pageSelectedIndex>=0&&(po=E.add.sprite(180,42+Lt.pageSelectedIndex*20,"gui",16),po.setScale(.5).setDepth(ft.MENU_CURSOR),pt.add(po)),pt.setDepth(ft.MENU),fr(E)}function A1(){const E=k.activeScene;Lt.page.forEach((B,v)=>{const y=De.indexOf(B)+1,t=E.add.rectangle(227,42+v*20,94,20,v%2?16772829:15654348).setDepth(ft.MENU_LAYOUT);pe(t),ji.push(t),t.on("click",()=>Zi(Lt.filtered.indexOf(B),!1));const h=gt(188,35+v*20,`${y}. ${V(`pokemon.${B.ref}`).toUpperCase()}`).setDepth(ft.MENU_OBJECTS).setAlign("left");pt==null||pt.add(t),pt==null||pt.add(h)});const A=E.add.rectangle(225,32,90,6,0).setDepth(ft.MENU_LAYOUT).setAlpha(0);pe(A),ji.push(A),A.on("click",()=>{Zi(Lt.selectedIndex-1,!1)});const C=E.add.sprite(228,33,"gui",16).setScale(.5).setAlpha(Lt.pageStartIndex===0?0:.5).setRotation(Phaser.Math.DegToRad(-90));pt==null||pt.add(A),pt==null||pt.add(C);const R=E.add.rectangle(225,234,90,6,0).setDepth(ft.MENU_LAYOUT).setAlpha(0);pe(R),ji.push(R),R.on("click",()=>{Zi(Lt.selectedIndex+1,!1)});const F=E.add.sprite(228,233,"gui",16).setScale(.5).setAlpha(Lt.pageStartIndex+Lt.numberPerPage>=Lt.filtered.length?0:.5).setRotation(Phaser.Math.DegToRad(90));pt==null||pt.add(R),pt==null||pt.add(F)}function Zi(E,A=!0){var R;const C=k.activeScene;E<0||E>=Lt.filtered.length||(Lt.selectedIndex=E,ELt.pageStartIndex+Lt.numberPerPage-1&&(Lt.pageStartIndex=E-Lt.numberPerPage+1),eh(),A&&((R=C.sprites.get("cursor"))==null||R.setPosition(298,63+Lt.pageSelectedIndex*20)))}let Js=null;function Lr(E,A=!0){var R;if(E<0||E>=Object.keys($).length)return;Hi=E;const C=Object.values($)[Hi];Js&&(pt==null||pt.remove(Js,!0)),Js=gt(20+16*Hi,-15,C.label,{color:"white",align:"middle",strokeThickness:4,stroke:"black"}),Js.setOrigin(.5,0).setDepth(ft.MENU_TOOLTIPS),pt==null||pt.add(Js),A&&((R=k.activeScene.sprites.get("cursor"))==null||R.setPosition(50+16*Hi,44))}function C1(E){pt&&(E===ai?ai=null:ai=E,Lt.selectedIndex=0,Lt.pageStartIndex=0,eh(),zt("tick"))}function P1(E){if(!pt)return;const A=k.activeScene;let C=40,R=54;const F=A.add.sprite(C,R,"pokemon_portraits");F.play(`${E.ref}_portrait`),pt.add(F);const B=gt(C+36,R-18,V(`pokemon.${E.ref}`),{fontSize:"14px"});pt.add(B),C+=44;for(let c=0;c{A.setFrame(1)}).on("out",()=>{A.setFrame(0)}).on("click",()=>{E.launchFight()}),pe(A),E.sprites.set("fightButton",A),we.add(A),we.setDepth(ft.GUI_BUTTON)}function L1(E){we=E.add.group(),ih(E),Wn(1)&&F1(E);const A=E.add.sprite(295,E.scale.height-12,"buttons_big",2);A.on("over",()=>{A.setFrame(3)}).on("out",()=>{A.setFrame(2)}).on("click",()=>{zt("run"),Bi(400).then(()=>k.exitDestination())}),pe(A),E.sprites.set("quitButton",A),we.add(A),we.setDepth(ft.GUI_BUTTON)}function O1(E){we=E.add.group(),ih(E);const A=E.add.sprite(295,E.scale.height-12,"buttons_big",2);A.on("over",()=>{A.setFrame(3)}).on("out",()=>{A.setFrame(2)}).on("click",async()=>{const C=k.currentRoom;await Mt(C.trainer.dialogs.bye,{speaker:C.trainer.ref}),zt("run"),await Bi(400),k.exitDestination()}),pe(A),E.sprites.set("quitButton",A),we.add(A),we.setDepth(ft.GUI_BUTTON)}function M1(E){const C=E.add.sprite(100,E.scale.height-12,"buttons",2);C.setData("type","pokedexButton");let R;C.on("click",()=>{var F;if(((F=k.activeMenu)==null?void 0:F.ref)==="pokedex")return Le();Le(),Ot.draggedElem!=null?Ui(E):Tu(E)}).on("over",()=>{if(C.setTint(16768477),Ot.draggedElem!=null){const B=Ot.draggedElem.getData("pokemon");B!=null&&(R=gt(100,E.scale.height-30,V("menu.see_pokemon",{name:V(`pokemon.${B.entry.ref}`)}),{align:"center",color:"white",strokeThickness:4,stroke:"black"}).setOrigin(.5))}else R=gt(100,E.scale.height-30,"POKEDEX",{align:"center",color:"white",strokeThickness:4,stroke:"black"}).setOrigin(.5)}).on("out",()=>{C.setTint(16777215),R==null||R.destroy()}).on("dropReceived",F=>{const B=F.getData("pokemon");B!=null&&(Tu(E,B),gd())}),pe(C),we.add(C)}function ih(E){const A=E.scale.width/2,C=E.add.sprite(A,E.scale.height-12,"buttons",0);C.setData("type","boxButton");let R;C.on("click",()=>{var F;if(Ot.draggedElem!=null)Ui(E);else{if(((F=k.activeMenu)==null?void 0:F.ref)==="box")return Le();Le(),h1(E)}}).on("over",()=>{if(C.setTint(13434828),Ot.draggedElem!=null){const B=Ot.draggedElem.getData("pokemon");B!=null&&(R=gt(A,E.scale.height-30,V("menu.remove_pokemon",{name:V(`pokemon.${B.entry.ref}`)}),{align:"center",color:"white",strokeThickness:4,stroke:"black"}).setOrigin(.5))}else R=gt(A,E.scale.height-30,"POKEMONS",{align:"center",color:"white",strokeThickness:4,stroke:"black"}).setOrigin(.5)}).on("out",()=>{C.setTint(16777215),R==null||R.destroy()}).on("dropReceived",F=>{const B=F.getData("pokemon");B!=null&&(R==null||R.destroy(),k.pension.includes(B)?_f(B):hr(B,k.board.playerTeam),Ys(B),ba())}),pe(C),we.add(C)}function I1(E){const C=E.add.sprite(220,E.scale.height-12,"buttons",1);C.setData("type","bagButton");let R;C.on("click",()=>{var F;if(Ot.draggedElem!=null)Ui(E);else{if(((F=k.activeMenu)==null?void 0:F.ref)==="items_box")return Le();Le(),y1(E)}}).on("over",()=>{if(C.setTint(16777164),Ot.draggedElem!=null){const B=Ot.draggedElem.getData("pokemon"),v=Ot.draggedElem.getData("item");B!=null?R=gt(220,E.scale.height-30,B.item?V("menu.retrieve_item",{item:V(`item.${B.item.ref}`)}):V("menu.no_item",{name:V(`pokemon.${B.entry.ref}`)}),{align:"center",color:"white",strokeThickness:4,stroke:"black"}).setOrigin(.5):v!=null&&(R=gt(220,E.scale.height-30,V("menu.stock_item",{item:V(`item.${v.ref}`)}),{align:"center",color:"white",strokeThickness:4,stroke:"black"}).setOrigin(.5))}else R=gt(220,E.scale.height-30,"ITEMS",{align:"center",color:"white",strokeThickness:4,stroke:"black"}).setOrigin(.5)}).on("out",()=>{C.setTint(16777215),R==null||R.destroy()}).on("dropReceived",F=>{const B=F.getData("pokemon"),v=F.getData("item");B!=null?(R==null||R.destroy(),B.item!=null&&(k.player.inventory[B.item.ref]+=1,B.item=null),gd()):v!=null&&(R==null||R.destroy(),F.destroy())}),pe(C),we.add(C)}function F1(E){const C=E.add.sprite(100,E.scale.height-12,"buttons",3);C.setData("type","refreshButton");let R;C.on("click",()=>{var F;if(Wn(1)){k.player.inventory.pokeball-=1,zt("refresh"),E.drawMap();for(const B of k.board.otherTeam)(F=E.sprites.get(B.uid))==null||F.destroy(!0);k.board.otherTeam=k.currentRoom.spawnOtherTeam(),vd(E),Ei(),k.player.inventory.pokeball===0&&C.destroy()}}).on("over",()=>{C.setTint(16777164),R=gt(100,E.scale.height-30,V("menu.change_place"),{align:"center",color:"white",strokeThickness:4,stroke:"black"}).setOrigin(.5)}).on("out",()=>{C.setTint(16777215),R==null||R.destroy()}),pe(C),we.add(C)}function w1(){we.destroy(!0)}function sd(){var A;const E=k.activeScene;(A=E.sprites.get("fightButton"))==null||A.setVisible(E.canLaunchFight)}function D1(E){const A=E.add.sprite(32,E.scale.height-32,"player").setDepth(ft.PLAYER);if(E.sprites.set("player",A),A.play("trainer_idle"),[st.ARENA,st.TUTORIAL,st.PENSION].includes(E.state.currentRoom.type)){const C=E.state.currentRoom,R=E.add.sprite(E.scale.width+40,32,"trainer").setDepth(ft.TRAINER).setFrame(C.trainer.frameIndex);E.add.tween({targets:[R],delay:1e3,duration:600,x:"-=64",ease:"Linear"}),E.sprites.set("opponent",R)}}function N1(E){const A=k.activeScene;if(E.introFrameIndex===null)return Promise.resolve();const C=A.add.sprite(A.scale.width/2,A.scale.height/2,"trainers_intros");return C.setDepth(ft.CENTER_TEXT).setFrame(E.introFrameIndex),A.sprites.set("centerIntro",C),p1(A,C,2e3)}class nd extends Vs{constructor(){super("GameScene");ut(this,"gameSpeed",100);ut(this,"state");ut(this,"currentTileMap");window.game=this,this.state=k}preload(){Bs(this),bi(this),Oa(this)}create(){k.activeScene=this;const C=k.currentRoom;nr(this),Ra(this.anims),this.drawMap(),this.drawIntro().then(()=>{C.type===st.SAFARI||C.type===st.PENSION?k.stage=Se.CAPTURE:k.stage=Se.PLACEMENT,Sx(this),vd(this)}),C.type===st.SAFARI?k.board=Tx(C):k.board=Ex(k.player,C),Fe(C.music),k.registerPokemonsSeen(k.board.otherTeam)}update(){Ma(this),m1(this)}drawMap(){const C=k.currentRoom;C.maps&&(C.mapIndex=C.mapIndex?C.mapIndex%3+1:Ce(1,C.maps.length),C.map=C.maps[C.mapIndex-1]);const R=this.make.tilemap({key:C.map});this.currentTileMap!=null&&this.currentTileMap.destroy(),this.currentTileMap=R;const F=R.addTilesetImage("ground","ground");R.createLayer("ground0",F),R.createLayer("ground1",F),R.createLayer("top0",F)}drawIntro(){if($f(),D1(this),k.currentRoom.type===st.WILD||k.currentRoom.type===st.SAFARI)return Et(1e3).then(()=>(Ei(),Zr("text_capture",this)));if([st.ARENA,st.TUTORIAL,st.PENSION].includes(k.currentRoom.type)){const C=k.currentRoom;return N1(C.trainer),Et(2e3).then(()=>Mt(C.trainer.dialogs.start,{speaker:C.trainer.ref}))}return Promise.resolve()}hideCenterText(){var C;(C=this.sprites.get("centerText"))==null||C.destroy(!0),this.sprites.delete("centerText")}get canLaunchFight(){return k.stage===Se.PLACEMENT&&k.board.playerTeam.length<=xd()}launchFight(){if(this.canLaunchFight){w1(),k.initFight(this);const C=this.sprites.get("player");if(Et(500).then(()=>C&&C.play("trainer_launch")),Zr("text_fight",this),k.currentRoom.type===st.WILD)Fe("music_battle_wild");else{const R=k.currentRoom.trainer;Fo.includes(R)||Jf.includes(R)?Fe("music_battle_champion"):Fe("music_battle_trainer")}}}onPressStart(){this.launchFight()}onPressA(){k.activeMenu&&ar()||Yo(this)}onPressB(){k.activeMenu!=null&&k.activeMenu.handleCancel()}onClick(){Yo(this)}destroy(){this.currentTileMap.destroy(),delete this.currentTileMap}}function rd(E){var F;const A=k.player.box;A[A.indexOf(E)]=null;const R=k.activeScene.sprites.get(E.uid);(F=k.activeMenu)!=null&&F.container&&k.activeMenu.ref==="box"&&R!=null&&k.activeMenu.container.remove(R)}function Ys(E,A){var B;const C=k.activeScene;A==null&&(A=k.player.box.indexOf(null));const R=k.player.box;E instanceof Tt?E=E.toBoxPokemon(C):R.includes(E)&&(R[R.indexOf(E)]=null),R[A]=E;const F=C.sprites.get(E.uid);((B=k.activeMenu)==null?void 0:B.ref)==="box"&&F!=null?qf(F,A):F!=null&&F.destroy(),Et(0).then(()=>fr(C))}function No(E){E.owner=xe,k.board.playerTeam.push(E),k.player.team.push(E),k.activeScene instanceof nd&&(k.board.playerAlliances=xi(k.board.playerTeam),wi(k.board.playerTeam))}function hr(E,A){ni(A,E),A===k.board.playerTeam&&(ni(k.player.team,E),k.board.playerAlliances=xi(k.board.playerTeam),wi(k.board.playerTeam))}function b1(E){const A=k.activeScene;return Mt([V("dialog.relacher",{name:V(`pokemon.${E.entry.ref}`),cost:E.cost}),{[V("no")](){return Ys(E),!1},[V("yes")](){var C;E instanceof Tt?hr(E,k.board.playerTeam):rd(E),(C=A.sprites.get(E.uid))==null||C.destroy(),zt(Sa(E.entry)),k.player.inventory[We.ref]+=E.cost,Ei()}}])}const B1={title:V("destination.JADIELLE_SHOP"),tilemap:"shop_jadielle",tilesets:["tileset_inside"],startAt:"shop_exit"},G1={title:V("destination.ARGENTA_SHOP"),tilemap:"shop_argenta",tilesets:["tileset_inside"],startAt:"shop_exit"},U1={title:V("destination.AZURIA_SHOP"),tilemap:"shop_azuria",tilesets:["tileset_inside"],startAt:"shop_exit"},V1={title:V("destination.CARMIN_SHOP"),tilemap:"shop_carmin",tilesets:["tileset_inside"],startAt:"shop_exit"},Y1={title:V("destination.SAFRANIA_SHOP"),tilemap:"shop_safrania",tilesets:["tileset_inside"],startAt:"shop_exit"},z1={title:V("destination.CELADOPOLE_SHOP"),tilemap:"shop_celadopole",tilesets:["tileset_inside"],startAt:"shop_exit"},W1={title:V("destination.PARMANIE_SHOP"),tilemap:"shop_parmanie",tilesets:["tileset_inside"],startAt:"shop_exit"},H1={title:V("destination.CRAMOISILE_SHOP"),tilemap:"shop_cramoisile",tilesets:["tileset_inside"],startAt:"shop_exit"},X1={title:V("destination.LAVANVILLE_SHOP"),tilemap:"shop_lavanville",tilesets:["tileset_inside"],startAt:"shop_exit"},k1={title:V("destination.CAMP_NOMADE"),tilemap:"shop_camp_nomade",tilesets:["tileset_inside"],startAt:"shop_exit"},K1={title:V("destination.LIGUE_HALL"),tilemap:"shop_ligue",tilesets:["tileset_inside"],startAt:"enter"},sh={ref:"ARGENTA",name:V("destination.ARGENTA"),nextDestinations:{FORET_JADE:[[-2,0],[0,4]],COL_DE_MONTAGNE:[[0,-1],[1,0],[0,-1]],COLLINE_ROYALE:[[2,0],[2,0]],CELADOPOLE:[[2,0],[0,2]]},coordinates:[7*16-8,5*16-8],type:Ct.ARENA,icons:["badge_roche","type_ROCHE"],rooms:{arena:{name:V("destination.ARGENTA_ARENA"),type:st.ARENA,trainer:If,badge:bl,map:"arene_argenta",music:"music_argenta_safrania",spawnOtherTeam(){return ti([gi,Li,rl,os,Ta,fa,Xo,ll],[[2,3],[4,3],[3,3],[0,2],[1,2],[6,2],[5,2],[3,0]])}},trainer:{type:st.ARENA,name:V("destination.ARGENTA_ARENA"),map:"arene_argenta",music:"music_argenta_safrania",trainer:Bg,spawnOtherTeam(){return te([gi,Li,os,ul,Ml,hl,Di,Fs,ws])}},shop:{type:st.FREEWALK,name:V("destination.ARGENTA_SHOP"),music:"music_shop",level:G1}},shopId:2,preload(E){E.load.tilemapTiledJSON("shop_argenta","assets/maps/shop_argenta.json"),E.load.tilemapTiledJSON("arene_argenta","assets/maps/arene_argenta.json"),Nt("music_argenta_safrania","assets/audio/music/07 Pewter City's Theme.mp3")}},nh={ref:"AZURIA",name:V("destination.AZURIA"),nextDestinations:{GROTTE_AZUREE:[[0,-2]],COL_DE_MONTAGNE:[[-4,0],[-2,0]],MONT_SELENITE:[[-4,0],[0,-1]],OCEANE_AZURIA:[[2,0],[0,-1],[1,0],[0,-1]],CENTRALE:[[2,0],[0,1],[1,0],[0,1]],PENSION:[[0,2]]},coordinates:[14*16-8,3*16-8],type:Ct.ARENA,icons:["badge_cascade","type_EAU"],rooms:{arena:{type:st.ARENA,name:V("destination.AZURIA_ARENA"),map:"arene_azuria",spawnOtherTeam(){return ti([Mi,wl,Oi,ra,ze,es,rn,ol],[[2,3],[4,3],[3,3],[0,2],[1,2],[6,2],[5,2],[3,0]])},music:"music_azuria",trainer:Ff,badge:ir},trainer:{type:st.ARENA,name:V("destination.AZURIA_ARENA"),map:"arene_azuria",music:"music_azuria",trainer:Og,spawnOtherTeam(){return te([Mi,Zn,Oi,ya,qn,Di,Fs,da,tr,ze,es])}},shop:{type:st.FREEWALK,name:V("destination.AZURIA_SHOP"),music:"music_shop",level:U1}},shopId:3,preload(E){E.load.tilemapTiledJSON("shop_azuria","assets/maps/shop_azuria.json"),E.load.tilemapTiledJSON("arene_azuria","assets/maps/arene_azuria.json"),Nt("music_azuria","assets/audio/music/08 Cerulean City's Theme.mp3")}},ad={ref:"CARMIN",name:V("destination.CARMIN"),nextDestinations:{MAISON_PSY:[[0,-2.5]],CAVE_TAUPIQUEUR_EST:[[3,0],[0,-1]],OCEANE_CARMIN:[[-2,0]],FALAISES:[[3,0],[2,0]]},coordinates:[14*16-8,11*16-8],type:Ct.ARENA,icons:["badge_foudre","type_ELECTRIQUE"],rooms:{arena:{type:st.ARENA,name:V("destination.CARMIN_ARENA"),map:"arene_carmin",music:"music_carmin",trainer:wf,badge:Bl,spawnOtherTeam(){return ti([Xi,as,Al,an,va,el,sn,$e],[[1,3],[0,2],[6,2],[2,3],[4,3],[5,3],[3,2],[1,2]])}},trainer:{type:st.ARENA,name:V("destination.CARMIN_ARENA"),map:"arene_carmin",music:"music_carmin",trainer:Ug,spawnOtherTeam(){return te([Xi,Xi,sn,as,hi,an,li,Qn,Mi])}},shop:{type:st.FREEWALK,name:V("destination.CARMIN_SHOP"),music:"music_shop",level:V1}},shopId:7,preload(E){E.load.tilemapTiledJSON("arene_carmin","assets/maps/arene_carmin.json"),E.load.tilemapTiledJSON("shop_carmin","assets/maps/shop_carmin.json"),Nt("music_carmin","assets/audio/music/11 Vermilion City's Theme.mp3")}},od={ref:"CELADOPOLE",name:V("destination.CELADOPOLE"),nextDestinations:{ARGENTA:[[0,-2],[-2,0]],COLLINE_ROYALE:[[0,-2],[2,0]],DOJO:[[3,0]],PISTE_CYCLABLE:[[0,5]]},coordinates:[9*16-8,7*16-8],type:Ct.ARENA,icons:["badge_prisme","type_PLANTE"],rooms:{arena:{type:st.ARENA,name:V("destination.CELADOPOLE_ARENA"),map:"arene_celadopole",music:"music_celadopole",trainer:Df,badge:Gl,spawnOtherTeam(){return ti([ls,pl,oa,$o,Ns,ns,jo,Zo],[[2,3],[1,0],[3,3],[4,3],[1,3],[6,0],[6,3],[5,3]])}},trainer:{type:st.ARENA,name:V("destination.CELADOPOLE_ARENA"),map:"arene_celadopole",music:"music_celadopole",trainer:bg,spawnOtherTeam(){return te([rs,rs,jn,$n,pa,_n,Is,ls,hs])}},shop:{type:st.FREEWALK,name:V("destination.CELADOPOLE_SHOP"),music:"music_shop",level:z1}},shopId:6,preload(E){E.load.tilemapTiledJSON("arene_celadopole","assets/maps/arene_celadopole.json"),E.load.tilemapTiledJSON("shop_celadopole","assets/maps/shop_celadopole.json"),Nt("music_celadopole","assets/audio/music/09 Celadon City's Theme.mp3")}},rh={ref:"CRAMOISILE",name:V("destination.CRAMOISILE"),coordinates:[6*16-8,19*16-8],type:Ct.ARENA,icons:["badge_volcan","type_FEU"],nextDestinations:{BOURG_PALETTE:[[0,-2.5],[0,-1.5],[-1,0]],MONT_BRAISE:[[0,-2.5],[-3,.5]],OCEANE_CRAMOISILE:[[-2,0]],ILES_ECUME:[[4,0]]},rooms:{arena:{name:V("destination.CRAMOISILE_ARENA"),type:st.ARENA,map:"cramoisile",music:"music_cramoisile",trainer:Bf,badge:Yl,spawnOtherTeam(){return ti([Ms,ko,Cl,nl,ua,ha,Qn,_o],[[2,3],[4,3],[3,3],[0,2],[1,2],[6,2],[5,2],[3,0]])}},trainer:{name:V("destination.CRAMOISILE_ARENA"),type:st.ARENA,map:"cramoisile",music:"music_cramoisile",trainer:kg,spawnOtherTeam(){return te([hi,un,Ii,nn,_i,Ri,dn,ns])}},shop:{type:st.FREEWALK,name:V("destination.CRAMOISILE_SHOP"),music:"music_shop",level:H1}},shopId:9,preload(E){E.load.tilemapTiledJSON("cramoisile","assets/maps/cramoisile.json"),E.load.tilemapTiledJSON("shop_cramoisile","assets/maps/shop_cramoisile.json"),Nt("music_cramoisile","assets/audio/music/10 Cinnabar Island's Theme.mp3")}},J1={type:st.ARENA,map:"arene_jadielle",music:"music_jadielle",name:V("destination.JADIELLE_ARENA"),trainer:Gf,badge:Aa,spawnOtherTeam(){return ti([os,Dl,gl,ml,Ta,El,Li,fa],[[2,3],[4,3],[3,3],[0,2],[1,2],[6,2],[5,2],[3,0]])}},j1={type:st.ARENA,map:"arene_jadielle",music:"music_jadielle",name:V("destination.JADIELLE_ARENA"),trainer:xg,spawnOtherTeam(){return te([Ni,Jn,hi,Di,Uu,$n,Ds,bs,ga,os,gi])}},Z1={type:st.ARENA,map:"arene_jadielle",music:"music_jadielle",name:V("destination.JADIELLE_ARENA"),trainer:yg,spawnOtherTeam(){return te([Ni,Jn,hi])}},ah={ref:"JADIELLE",name:V("destination.JADIELLE"),nextDestinations:{BOURG_PALETTE:[[0,3]],FORET_JADE:[[0,-3]],CAVE_TAUPIQUEUR_OUEST:[[2,0],[0,-2]],ROUTE_VICTOIRE_ENTREE:[[-3,0],[0,-7]]},coordinates:[5*16-8,12*16-8],type:Ct.ARENA,icons:["badge_terre","type_SOL"],rooms:{arena:J1,tuto_dresseur:Z1,trainer:j1,shop:{type:st.FREEWALK,name:V("destination.JADIELLE_SHOP"),music:"music_shop",level:B1}},customRoomOrder(){return k.day<10?["shop","tuto_dresseur"]:k.hasBadge(Aa)?["shop","trainer"]:["shop","arena"]},shopId:1,preload(E){E.load.tilemapTiledJSON("shop_jadielle","assets/maps/shop_jadielle.json"),E.load.tilemapTiledJSON("arene_jadielle","assets/maps/arene_jadielle.json"),Nt("music_jadielle","assets/audio/music/06 Pokemon Gym.mp3")}},oh={ref:"LAVANVILLE",name:V("destination.LAVANVILLE"),nextDestinations:{CENTRALE:[[0,-1],[-1,0],[0,-1],[-1,0]],TOUR_POKEMON:[[-3,0]],FALAISES:[[0,4]]},coordinates:[19*16-8,7*16-8],type:Ct.ARENA,icons:["type_FEE"],rooms:{arena:{type:st.ARENA,name:V("destination.LAVANVILLE_ARENA"),map:"arene_lavanville",spawnOtherTeam(){return ti([is,vl,ln,al,ss,fl,Is,Yu],[[2,3],[4,3],[3,3],[0,2],[1,2],[6,2],[5,2],[3,0]])},music:"music_lavanville",trainer:zf},trainer:{type:st.ARENA,name:V("destination.LAVANVILLE_ARENA"),map:"arene_lavanville",music:"music_lavanville",trainer:Mg,spawnOtherTeam(){return te([is,ln,ss,li,Ni,Ms,fi,Nl])}},shop:{type:st.FREEWALK,name:V("destination.LAVANVILLE_SHOP"),music:"music_shop",level:X1}},shopId:4,customRoomOrder(){return k.dialogStates.sally===Yf.BEATEN?["shop","trainer"]:["shop","arena"]},preload(E){E.load.tilemapTiledJSON("arene_lavanville","assets/maps/arene_lavanville.json"),E.load.tilemapTiledJSON("shop_lavanville","assets/maps/shop_lavanville.json"),Nt("music_lavanville","assets/audio/music/12 Lavender Town's Theme.mp3")}},$1={title:V("room.ligueendroom"),tilemap:"endroom",tilesets:["tileset_inside"],startAt:"enter"},Q1={type:st.ARENA,map:"arene_ligue1",music:"music_route_victoire",name:V("destination.LIGUE_FLOOR1"),trainer:Wf,spawnOtherTeam(){return[new Tt({entry:Br,owner:Dt,level:54,x:0,y:1}),new Tt({entry:Br,owner:Dt,level:54,x:6,y:1}),new Tt({entry:qo,owner:Dt,level:53,x:3,y:3}),new Tt({entry:sl,owner:Dt,level:54,x:4,y:3}),new Tt({entry:ca,owner:Dt,level:56,x:2,y:3}),new Tt({entry:es,owner:Dt,level:56,x:5,y:2})]}},q1={type:st.ARENA,map:"arene_ligue2",music:"music_route_victoire",name:V("destination.LIGUE_FLOOR2"),trainer:Hf,spawnOtherTeam(){return[new Tt({entry:Li,owner:Dt,level:53,x:0,y:3}),new Tt({entry:Vr,owner:Dt,level:55,x:1,y:3}),new Tt({entry:Qo,owner:Dt,level:56,x:2,y:3}),new Tt({entry:dl,owner:Dt,level:58,x:4,y:3}),new Tt({entry:br,owner:Dt,level:55,x:5,y:3}),new Tt({entry:Li,owner:Dt,level:56,x:6,y:3})]}},_1={type:st.ARENA,map:"arene_ligue3",music:"music_route_victoire",name:V("destination.LIGUE_FLOOR3"),trainer:Xf,spawnOtherTeam(){return[new Tt({entry:Fr,owner:Dt,level:56,x:3,y:3}),new Tt({entry:_i,owner:Dt,level:58,x:1,y:3}),new Tt({entry:yl,owner:Dt,level:56,x:3,y:1}),new Tt({entry:wr,owner:Dt,level:55,x:4,y:2}),new Tt({entry:wr,owner:Dt,level:55,x:2,y:2}),new Tt({entry:Fr,owner:Dt,level:60,x:5,y:3})]}},tx={type:st.ARENA,map:"arene_ligue4",music:"music_route_victoire",name:V("destination.LIGUE_FLOOR4"),trainer:kf,spawnOtherTeam(){return[new Tt({entry:rn,owner:Dt,level:58,x:2,y:2}),new Tt({entry:Pl,owner:Dt,level:60,x:3,y:2}),new Tt({entry:rn,owner:Dt,level:58,x:4,y:2}),new Tt({entry:Ir,owner:Dt,level:56,x:0,y:0}),new Tt({entry:Ir,owner:Dt,level:56,x:6,y:0}),new Tt({entry:tl,owner:Dt,level:62,x:3,y:1})]}},ex={type:st.ARENA,map:"arene_ligue5",music:"music_route_victoire",name:V("destination.LIGUE_FLOOR5"),trainer:Kf,spawnOtherTeam(){return[new Tt({entry:Fl,owner:Dt,level:61,x:0,y:3}),new Tt({entry:na,owner:Dt,level:59,x:1,y:1}),new Tt({entry:va,owner:Dt,level:63,x:3,y:3}),new Tt({entry:ha,owner:Dt,level:61,x:5,y:2}),new Tt({entry:Ns,owner:Dt,level:61,x:6,y:2}),new Tt({entry:ze,owner:Dt,level:65,x:4,y:1})]}},ld={ref:"LIGUE",name:V("destination.LIGUE"),subtext:V("destination_subtext.CONSEIL_DES_4"),nextDestinations:{ROUTE_VICTOIRE_SORTIE:[[0,1],[-1,0],[0,-1]]},coordinates:[2*16-8,3*16-8],type:Ct.ARENA,icons:["icon_ligue"],rooms:{olga:Q1,aldo:q1,agatha:_1,peter:tx,rival:ex,shop:{type:st.FREEWALK,name:V("destination.LIGUE_HALL"),music:"music_route_victoire",level:K1},endroom:{type:st.FREEWALK,name:V("destination.LIGUE_FLOOR5"),music:"music_ending",level:$1}},customRoomOrder(){return["shop","olga","aldo","agatha","peter","rival","endroom"]},shopId:10,preload(E){E.load.tilemapTiledJSON("shop_ligue","assets/maps/shop_ligue.json"),E.load.tilemapTiledJSON("arene_ligue1","assets/maps/arene_ligue1.json"),E.load.tilemapTiledJSON("arene_ligue2","assets/maps/arene_ligue2.json"),E.load.tilemapTiledJSON("arene_ligue3","assets/maps/arene_ligue3.json"),E.load.tilemapTiledJSON("arene_ligue4","assets/maps/arene_ligue4.json"),E.load.tilemapTiledJSON("arene_ligue5","assets/maps/arene_ligue5.json"),E.load.tilemapTiledJSON("endroom","assets/maps/endroom.json"),Nt("music_route_victoire","assets/audio/music/22 The Last Road.mp3"),Nt("music_ending","assets/audio/music/30 Ending.mp3")}},lh={ref:"PARMANIE",name:V("destination.PARMANIE"),nextDestinations:{PARC_SAFARI:[[0,-2]],PISTE_CYCLABLE:[[-4,0],[0,-4]],ILES_ECUME:[[0,3],[-3,0]],CHAMPS_VERDOYANTS:[[3,0],[0,-1],[1,0]]},coordinates:[13*16-8,16*16-8],type:Ct.ARENA,icons:["badge_ame","type_POISON"],subtext:"Arène",rooms:{arena:{type:st.ARENA,name:V("destination.PARMANIE_ARENA"),map:"arene_parmanie",music:"music_parmanie",trainer:Nf,badge:Ul,spawnOtherTeam(){return ti([hi,un,Ii,nn,_i,Ri,dn,ns],[[2,3],[4,3],[3,3],[0,2],[1,2],[6,2],[5,2],[3,0]])}},trainer:{type:st.ARENA,name:V("destination.PARMANIE_ARENA"),map:"arene_parmanie",music:"music_parmanie",trainer:Xg,spawnOtherTeam(){return te([hi,un,Ii,nn,_i,Ri,dn,ns])}},shop:{type:st.FREEWALK,name:V("destination.PARMANIE_SHOP"),music:"music_shop",level:W1}},shopId:8,preload(E){E.load.tilemapTiledJSON("arene_parmanie","assets/maps/arene_parmanie.json"),E.load.tilemapTiledJSON("shop_parmanie","assets/maps/shop_parmanie.json"),Nt("music_parmanie","assets/audio/music/40 Pokemon Mansion.mp3")}},hd={ref:"SAFRANIA",name:V("destination.SAFRANIA"),nextDestinations:{PENSION:[[0,-2]],DOJO:[[-2,0]],TOUR_POKEMON:[[2,0]],MAISON_PSY:[[0,1.5]]},coordinates:[14*16-8,7*16-8],type:Ct.ARENA,icons:["badge_marais","type_PSY"],rooms:{arena:{name:V("destination.SAFRANIA_ARENA"),type:st.ARENA,map:"arene_safrania",music:"music_argenta_safrania",trainer:bf,badge:Vl,spawnOtherTeam(){return ti([Mr,ss,fn,Dr,na,ca,Ri,Ns],[[2,3],[4,3],[3,3],[0,2],[1,2],[6,2],[5,2],[3,0]])}},trainer:{type:st.ARENA,name:V("destination.SAFRANIA_ARENA"),map:"arene_safrania",music:"music_argenta_safrania",trainer:Ag,spawnOtherTeam(){return te([ts,fn,pa,Mr,Dr,Oi,ra,ss])}},shop:{type:st.FREEWALK,name:V("destination.SAFRANIA_SHOP"),music:"music_shop",level:Y1}},shopId:5,preload(E){E.load.tilemapTiledJSON("arene_safrania","assets/maps/arene_safrania.json"),E.load.tilemapTiledJSON("shop_safrania","assets/maps/shop_safrania.json"),Nt("music_argenta_safrania","assets/audio/music/07 Pewter City's Theme.mp3")}},ix=()=>Mt(sx[k.currentDestination.ref]||[V("dialog.salut")],{speaker:`character${16+(k.currentDestination.shopId??0)%10}`}),sx={[ah.ref]:[V("dialog.guide.jadielle.0"),V("dialog.guide.jadielle.1"),V("dialog.guide.jadielle.2")],[sh.ref]:[V("dialog.guide.argenta.0"),V("dialog.guide.argenta.1"),V("dialog.guide.argenta.2"),V("dialog.guide.argenta.3")],[nh.ref]:[V("dialog.guide.azuria.0"),V("dialog.guide.azuria.1"),V("dialog.guide.azuria.2"),V("dialog.guide.azuria.3")],[oh.ref]:[V("dialog.guide.lavanville.0"),V("dialog.guide.lavanville.1")],[hd.ref]:[V("dialog.guide.safrania.0"),V("dialog.guide.safrania.1"),V("dialog.guide.safrania.2")],[od.ref]:[V("dialog.guide.celadopole.0"),V("dialog.guide.celadopole.1"),V("dialog.guide.celadopole.2"),V("dialog.guide.celadopole.3")],[ad.ref]:[V("dialog.guide.carmin.0"),V("dialog.guide.carmin.1")],[lh.ref]:[V("dialog.guide.parmanie.0"),V("dialog.guide.parmanie.1"),V("dialog.guide.parmanie.2"),V("dialog.guide.parmanie.3")],[rh.ref]:[V("dialog.guide.cramoisile.0"),V("dialog.guide.cramoisile.1"),()=>{const E=qu.find(A=>k.player.inventory[A.ref]>0);return E&&k.player.box.some(A=>A===null)?[V("dialog.guide.cramoisile.2"),V("dialog.guide.cramoisile.3"),"...",V("dialog.guide.cramoisile.4"),V("dialog.guide.cramoisile.5"),V("dialog.guide.cramoisile.6"),{[V("yes")]:()=>[V("dialog.guide.cramoisile.7"),()=>{k.activeScene.cameras.main.flash(1e3,0,0,0),k.player.inventory[E.ref]-=1;const A={[wn.ref]:Fu,[Dn.ref]:hl,[Nn.ref]:Pl},C=new Fi({entry:A[E.ref],owner:xe,level:30});return Ys(C),["!!!",V("dialog.guide.cramoisile.8"),V("dialog.guide.cramoisile.9",{name:V(`pokemon.${C.entry.ref}`)}),V("dialog.guide.cramoisile.10"),V("dialog.guide.cramoisile.11"),()=>(Rs("pokemon_received"),Mt([V("dialog.guide.cramoisile.12",{name:V(`pokemon.${C.entry.ref}`)})],{speaker:"system"})),V("dialog.guide.cramoisile.13")]}],[V("no")]:()=>[V("dialog.guide.cramoisile.14")]}]:[V("dialog.guide.cramoisile.15"),V("dialog.guide.cramoisile.16")]}],[ld.ref]:[V("dialog.guide.ligue.0"),{[V("yes")]:()=>[V("dialog.guide.ligue.1"),V("dialog.guide.ligue.2"),V("dialog.guide.ligue.3"),V("dialog.guide.ligue.4"),V("dialog.guide.ligue.5"),V("dialog.guide.ligue.6"),V("dialog.guide.ligue.7"),V("dialog.guide.ligue.8"),V("dialog.guide.ligue.9"),V("dialog.guide.ligue.10"),V("dialog.guide.ligue.11")],[V("no")]:()=>[V("dialog.guide.ligue.12")]}]},nx=()=>Mt([V("dialog.healer.0"),V("dialog.healer.1")],{speaker:"female2"}),bo={hello:0,after_gift:1},rx=()=>{if(k.dialogStates.mam===bo.after_gift)return Mt([V("dialog.mom.after_gift")],{speaker:"mam"});const E=[vn,mn,pn,cn],A=[gn,xn,yn,En],C=[us,ys,xs,vs,cs,fs,ds,Ss,Ts,ms,As,Cs,Es,Ps,gs,ps],R=[An,Cn,Pn,Rn],F=[Ln,On,Mn,In,Fn],B=k.day-k.lastTourMam;return Mt([V("dialog.mom.hello"),()=>{let v;return B<=3?v=[V("dialog.mom.gift1"),()=>Ye(We,jt(B,1,3))]:B<9?v=[V("dialog.mom.gift2"),V("dialog.mom.gift3"),()=>Ye(Xe(E),jt(Math.ceil(B/3),1,3))]:B<20?v=[V("dialog.mom.gift4"),V("dialog.mom.gift5"),()=>Ye(Xe(A))]:B<30?v=[V("dialog.mom.gift6"),V("dialog.mom.gift7"),V("dialog.mom.gift8"),()=>Ye(Xe(C)),V("dialog.mom.gift9"),V("dialog.mom.gift10"),V("dialog.mom.gift11")]:B<40?v=[V("dialog.mom.gift12"),V("dialog.mom.gift13"),()=>Ye(Xe(R)),V("dialog.mom.gift14"),V("dialog.mom.gift15")]:v=[V("dialog.mom.gift16"),V("dialog.mom.gift17"),V("dialog.mom.gift18"),()=>Ye(Xe(F)),V("dialog.mom.gift19"),V("dialog.mom.gift20")],v}],{speaker:"mam"}).then(()=>Mt([()=>(k.lastTourMam=k.day,k.dialogStates.mam=bo.after_gift,V("dialog.mom.after_gift"))],{speaker:"mam"}))};function $r(E){if(!k.currentDestination.shopId){console.error("Missing shopId");return}Ei();const A=20,C=144,R=6*A+8,F=320-C-8,B=8,v=x1(k.currentDestination.shopId),y=Object.entries(v).map(([t,h],p)=>({x:4,y:4+p*A,label:V(`item.${t}`),value:t}));return y.push({x:4,y:4+y.length*A,label:V("menu.quit")}),zt("menu_open"),Gs({ref:"shop_buy",x:F,y:B,width:C,height:R,background:"box1",offset:8,entries:y,draw(t){y.forEach((h,p)=>{if(!h.value)return;const a=ke[h.value],n=t.scene.add.sprite(F+114,B+15+p*A,"pokeball",0).play("POKEBALL_idle").setScrollFactor(0),r=gt(292,17+p*A,`x${a.cost}`,{color:Wn(a.cost)?"black":"red"});t.add(n),t.add(r)})},handleChoice(t){if(Ki(),!t.value)return;const h=ke[t.value];h.cost&&(hh(1600),Mt([V("dialog.shop.confirm",{item:V(`item.${h.ref}`),count:h.cost}),{[V("yes")]:()=>Wn(h.cost)?(Go(),td(h.cost),Ye(h,1,!0,"shop").then(()=>{$r(E)})):V("dialog.shop.nomoney"),[V("no")]:()=>Et(100).then(()=>{Go(),$r(E)})}],{speaker:E}))},handleCancel(){Ki(),Le()},onSelect(t){if(!t.value)return;const h=ke[t.value];h?ed(h):Ki()}})}const ax=()=>Mt([V("dialog.sellerm.hello")],{speaker:"seller_male"}).then(()=>$r("seller_male")),ox=()=>Mt([V("dialog.sellerf.hello")],{speaker:"seller_female"}).then(()=>$r("seller_female")),lx=E=>{if(E==null)return Promise.reject("No character provided");const A=E;return Mt([()=>{const C=A.pokemonToGive;if(A.hasExchanged)return V("dialog.trader.aftertrade",{name:V(`pokemon.${A.pokemonToReceive.ref}`)});if(C==null)return[V("dialog.trader.nopokemon.0"),V("dialog.trader.nopokemon.1")];const R=new Fi({entry:A.pokemonToReceive,owner:xe,xp:C.xp,item:C.item??void 0,shouldAutoEvolve:!0});return[V("dialog.trader.tradepropose",{given:V(`pokemon.${C.entry.ref}`),received:V(`pokemon.${R.entry.ref}`)}),{[V("yes")]:()=>[()=>{Rs("pokemon_received");const F=k.player.box.indexOf(C);return delete k.player.box[F],k.player.box[F]=R,A.hasExchanged=!0,Mt([V("dialog.trader.tradeaccepted",{given:V(`pokemon.${C.entry.ref}`),received:V(`pokemon.${R.entry.ref}`)})],{speaker:"system"})},V("dialog.trader.aftertrade",{name:V(`pokemon.${C.entry.ref}`)})],[V("no")]:()=>[V("dialog.trader.traderefused")]}]}],{speaker:`character${6+(k.currentDestination.shopId??0)%10}`})},mo={mam:rx,chen:zm,chen_end:Wm,assistant1:Hm,assistant2:Xm,seller_male:ax,seller_female:ox,trader:lx,info:ix,healer:nx},hx={voice:"sawtooth",emotion:20,pitch:30,speed:40,resonance:10},Wt={system:{emotion:0,speed:50,pitch:10},chen:{emotion:25,pitch:25,speed:35,resonance:15},mam:{emotion:50,pitch:60,speed:40,resonance:5},red:{volume:0},pierre:{emotion:50,pitch:25,speed:15,resonance:10},ondine:{emotion:70,pitch:50,speed:20,resonance:10},major_bob:{emotion:75,pitch:20,speed:20,resonance:10},erika:{emotion:30,pitch:40,speed:15,resonance:10},koga:{emotion:40,pitch:27,speed:35,resonance:10},morgane:{emotion:80,pitch:55,speed:20,resonance:30},auguste:{emotion:80,pitch:45,speed:20,resonance:10},giovanni:{emotion:90,pitch:20,speed:10,resonance:50},hector:{emotion:50,pitch:38,speed:25,resonance:10},sally:{emotion:70,pitch:43,speed:20,resonance:20},rival:{emotion:90,pitch:33,speed:35,resonance:30},olga:{emotion:70,pitch:47,speed:25,resonance:30},aldo:{emotion:80,pitch:23,speed:30,resonance:30},agatha:{emotion:80,pitch:39,speed:25,resonance:30},peter:{emotion:40,pitch:26,speed:20,resonance:30},sbire_rocket:{emotion:90,pitch:40,speed:30,resonance:30},assistant1:{emotion:10,pitch:30,speed:40,resonance:15},assistant2:{emotion:15,pitch:35,speed:45,resonance:15},assistant_tuto:{emotion:10,pitch:20,speed:30,resonance:5},seller_male:{emotion:15,pitch:22,speed:40,resonance:5},seller_female:{emotion:15,pitch:50,speed:40,resonance:5},pc:{voice:"triangle",emotion:0,pitch:10,speed:30},pc_record:{voice:"triangle",emotion:0,pitch:10,speed:30},male1:{emotion:15,pitch:20,speed:35,resonance:5},male2:{emotion:10,pitch:25,speed:30,resonance:5},male3:{emotion:20,pitch:28,speed:35,resonance:5},female1:{emotion:25,pitch:40,speed:30,resonance:5},female2:{emotion:25,pitch:46,speed:35,resonance:5},female3:{emotion:20,pitch:51,speed:35,resonance:5},kid1:{emotion:35,pitch:55,speed:40,resonance:5},kid2:{emotion:42,pitch:60,speed:40,resonance:5}},Su={0:Wt.red,1:Wt.mam,2:Wt.chen,3:Wt.assistant1,4:Wt.seller_male,5:Wt.seller_female,6:Wt.kid1,7:Wt.kid2,8:Wt.male3,9:Wt.female3,10:Wt.male2,11:Wt.female2,12:Wt.male1,13:Wt.female1,14:Wt.male1,15:Wt.female1,16:Wt.female2,17:Wt.male2,18:Wt.male1,19:Wt.male1,20:Wt.female1,21:Wt.male2,22:Wt.female2,23:Wt.male2,24:Wt.female2,25:Wt.assistant2,26:Wt.female2};for(const E in Su)Wt[`character${E}`]=Su[E];const Bo=[];function Mt(E,A={},C){var e,s;const R=k.activeScene;if(!R)return Promise.reject("No scene");const F=A.speaker??"system",B=Object.assign({},hx,Wt[F??"red"],A),v=60,y=R.scale.height-38,t=220,h=34,p=R.add.group().setOrigin(0,0),a=R.add.nineslice(v,y,"box2",void 0,t,h,4,4,4,4).setOrigin(0,0).setScrollFactor(0).setDepth(ft.DIALOG);p.add(a);const n=gt(v+8,y+4,"",{wordWrap:{width:t-8}}).setScrollFactor(0).setResolution(2);(e=p==null?void 0:p.add(n))==null||e.setDepth(ft.DIALOG),typeof E=="function"&&(E=E()),k.activeDialog!=null&&((s=k.activeDialog.dialogGroup)==null||s.destroy(!0,!0),Bo.push({lines:k.activeDialog.lines,params:k.activeDialog.params,onEndCallback:k.activeDialog.onEnd})),k.activeDialog={lines:[...E],params:A,speaker:F,voice:B,dialogGroup:p,textSprite:n,bgSprite:a};const r=new Promise(o=>{k.activeDialog.onEnd=C||(()=>Et(0).then(o))});return ur(),r}function hh(E){k.activeDialog&&(k.activeDialog.waitBeforeNextLine=!0,setTimeout(()=>{k.activeDialog&&(k.activeDialog.waitBeforeNextLine=!1)},E))}async function ur(){if(!k.activeDialog||!k.activeScene||k.activeDialog.waitBeforeNextLine)return;if(k.activeDialog.speech){k.activeDialog.speech.stop(),delete k.activeDialog.speech;return}let E=k.activeDialog.lines.shift();for(;typeof E=="function"||Array.isArray(E)||E instanceof Promise;)typeof E=="function"&&(E=E()),E instanceof Promise&&(E=await E),Array.isArray(E)&&(k.activeDialog.lines.unshift(...E),E=k.activeDialog.lines.shift());typeof E=="string"?ux(E):typeof E=="object"&&E!==null?fx(E):Go()}function ux(E){if(k.activeDialog){if(!["me","system"].includes(k.activeDialog.speaker)&&k.currentRoom.type!==st.FREEWALK&&(k.activeDialog.bgSprite.setPosition(48,2),k.activeDialog.textSprite.setPosition(56,6)),k.activeDialog.voice.skipSpeech){k.activeDialog.textSprite.text=E;return}k.activeDialog.speech=Am(E)}}function Go(){var E,A,C;if(k.activeDialog&&((E=k.activeDialog.dialogGroup)==null||E.destroy(!0,!0),(C=(A=k.activeDialog).onEnd)==null||C.call(A),k.activeDialog=null,Bo.length>0)){const R=Bo.pop();Et(0).then(()=>Mt(R.lines,R.params,R.onEndCallback))}}function fx(E){const A=Object.keys(E),C=k.activeScene,R=Math.max(...A.map(t=>t.length))*8+16,F=8+16*A.length,B=C.scale.width-R-28,v=C.scale.height-32-F,y=Object.entries(E).map(([t,h],p)=>({label:t,value:h,x:4,y:p*16}));k.activeDialog.choice=Gs({ref:"dialogChoice",x:B,y:v,width:R,height:F,entries:y,handleChoice:Au,handleCancel(){if(V("no")in E){const t=E[V("no")];Au({label:V("no"),value:t,x:0,y:0})}else Le()}})}function Au(E){var A;(A=k.activeDialog)!=null&&A.choice&&(delete k.activeDialog.choice,Le(),k.activeDialog.lines.unshift((E==null?void 0:E.value)||(E==null?void 0:E.label)),ur())}let go=null;function dx(E,A){if(go==null){switch(A){case St.LEFT:case St.WALKING_LEFT:E.state=St.RIGHT;break;case St.RIGHT:case St.WALKING_RIGHT:E.state=St.LEFT;break;case St.UP:case St.WALKING_UP:E.state=St.DOWN;break;case St.DOWN:case St.WALKING_DOWN:E.state=St.UP;break}return k.dialogStates.hasOwnProperty(E.name)||(k.dialogStates[E.name]=0),mo.hasOwnProperty(E.name)||(mo[E.name]=()=>Mt(["..?"])),go=E.name,mo[E.name](E).then(()=>{go=null})}}let $i,Be,oi;const Uo=100,Vo=32;function cx(E,A){var v;if($i===E)return;$i!=null&&uh(A),$i=E;const C=A.sprites.get("cursor");Be=A.add.container(C.x-Uo-8,C.y-Vo-8);const R=A.add.nineslice(0,0,"box2",void 0,Uo,Vo,4,4,4,4).setOrigin(0,0);if(Be.add(R),k.player.inventory.pokeball0&&ii===2?(ii=0,F+=16):E.x<0&&ii===3?(ii=0,F-=16):B>A.scale.height-32?(ii=1,F+=28*Math.sign(E.x)):F<64?(B-=8*Math.sign(E.y),ii=2):F>A.scale.width-64?(ii=3,B-=8*Math.sign(E.y)):ii=0,ii){case 1:[F,B]=[vf(F,[100,160,220,280]),A.scale.height-16];break;case 2:[F,B]=[8,6+Math.round(B/24)*24];break;case 3:[F,B]=[A.scale.width-16,Math.round(B/24)*24];break;case 0:default:const[v,y]=Ws(F,B+10);[F,B]=Ue(v,y),B-=10;break}R.x=jt(F,0,A.scale.width-10),R.y=jt(B,0,A.scale.height-10),fh()}}function fh(){const E=k.activeScene;fr(E),fd(E),vx(E)}function Yo(E){if(k.activeDialog!=null)return ur();if(Ot.draggedElem===null){const A=E.sprites.get("cursor");if(A==null||!A.anims)return;A.play("cursor_click")}tn.filter(A=>A!==Ot.draggedElem).forEach(A=>A.emit("click"))}function fr(E){const A=E.sprites.get("cursor");if(!A||!Qr)return;const C=[...Qr].filter(R=>R.getBounds().contains(A.x+6,A.y+6)).sort((R,F)=>R instanceof At.GameObjects.Zone?1:F instanceof At.GameObjects.Zone?-1:R.depth-F.depth);tn.filter(R=>!C.includes(R)).forEach(R=>R.emit("out")),C.filter(R=>!tn.includes(R)).forEach(R=>R.emit("over")),tn=C}function pe(E){Qr.add(E)}function dr(E){Qr.delete(E)}function zs(E,A){const C=A.sprites.get("cursor");C!=null&&(C.play("cursor_drag"),E.x=C.x,E.y=C.y+16,E.setDepth(ft.SPRITE_DRAGGED),Ot.draggedElem=E,E.emit("dragstart"))}function Ui(E){var R;const A=tn.filter(F=>mx(F));if(A.length===0)return;const C=E.sprites.get("cursor");C==null||!C.anims||(C.play("cursor_drop"),Ot.draggedElem!=null&&((R=Ot.draggedElem)==null||R.setDepth(ft.POKEMON).emit("drop",C),A.forEach(F=>F.emit("dropReceived",Ot.draggedElem)),Ot.draggedElem=null))}function fd(E){const A=E.sprites.get("cursor");!Ot.draggedElem||!A||(Ot.draggedElem.x=A.x,Ot.draggedElem.y=A.y+16)}function Na(E){var A;return((A=k.activeMenu)==null?void 0:A.ref)==="pokedex"?!1:E.getData("pokemon")!=null?E.getData("pokemon").owner===1&&(k.stage===Se.PLACEMENT||[st.SAFARI,st.PENSION].includes(k.currentRoom.type)):!0}function mx(E){var R;const A=E.getData("type"),C=(R=Ot.draggedElem)==null?void 0:R.getData("type");if(k.currentRoom.type===st.SAFARI)return A==="boxTile"||A==="releaseZone";if(k.stage!==Se.PLACEMENT&&k.currentRoom.type!==st.PENSION)return!1;switch(A){case"gridTile":const[F,B]=E.getData("position");if(C==="pokemon")return F>=0&&F<_r&&B>=(k.currentRoom.type===st.PENSION?0:Hn/2)&&By.stepReachedN!==t.stepReachedN?t.stepReachedN-y.stepReachedN:t.numberOfThatTypeInTeam-y.numberOfThatTypeInTeam).slice(0,10);C&&Qi?Qi.destroy(!0,!0):!C&&qi&&qi.destroy(!0,!0);const B=A.add.group();C?Qi=B:qi=B;let v=0;F.forEach(y=>{if(!y.stepReached&&(!C||k.stage!==Se.PLACEMENT))return;const t=C?14:A.scale.width-14,h=C?A.scale.height-74-v*24:74+v*24,p=C?1:-1,a=A.add.graphics();a.fillStyle(0,.5).fillCircle(t,h+4,9);const n=C?t+10:t-28;for(let s=0;s<3;s++)a.fillStyle(sYm(y.type,C?0:1)).on("out",()=>Xl()),v++})}function gx(){Qi==null||Qi.destroy(!0),qi==null||qi.destroy(!0),Xl()}let Me,qr=[],ci;const Pu=120,Or=64;function xx(E){Me!=null&&(dr(ci),ci.destroy(),Me==null||Me.destroy(!0),Me=null);const A=k.activeScene;Me=A.add.container(A.scale.width/2,-66);const C=A.add.nineslice(0,0,"box2",void 0,Pu,Or,4,4,4,4);C.setOrigin(.5,.5),Me.add(C);const R=gt(0,2,V("menu.release_pokemon",{name:V(`pokemon.${E.entry.ref}`)}),{color:"#000"});R.setOrigin(.5,.5),R.setScrollFactor(0),Me.add(R),C.setScrollFactor(0),C.setDepth(ft.MENU_TOOLTIPS),R.setDepth(ft.MENU_TOOLTIPS+1);const F=A.add.sprite(6,20,"pokeball",25);F.play("POKEBALL_idle");const B=gt(-16,14,`+${E.cost}`);Me.add(F).add(B),Me.setDepth(ft.MENU),qr=[C,R,F,B],A.add.tween({targets:qr,duration:400,y:`+=${Or+6}`,ease:"Linear"}),ci=A.add.zone(A.scale.width/2,0,Pu,Or),ci.setData("type","releaseZone"),pe(ci),ci.on("click",()=>{Ot.draggedElem!=null&&Ui(A)}).on("over",()=>{Ot.draggedElem!=null&&(Ot.draggedElem.setTint(16711680),C.setTint(16777164))}).on("out",()=>{Ot.draggedElem!=null&&(Ot.draggedElem.setTint(16777215),C.setTint(16777215))}).on("dropReceived",v=>{const y=v.getData("pokemon");y!=null&&(C.setTint(16777215),Le(),v.destroy(),b1(y))})}function dh(){if(!Me||!qr)return;k.activeScene.add.tween({targets:qr,duration:400,y:-Or-2,ease:"Linear",delay:10,onComplete(){dr(ci),ci.destroy(),Me==null||Me.destroy(!0),Me=null}})}function dd(){return{onHit:[],onHitReceived:[],clock:[],attack:[],defense:[],speed:[],dodge:[]}}function yx(E){const A=k.activeScene,C=E.owner===xe?k.board.playerAlliances:k.board.otherTeamAlliances;if(E.buffs=dd(),E.item===cn){const R=({damage:F})=>{E.pv-F<.5*E.maxPV&&(E.item=null,zt("heal_ailment"),Ci(E,.25*E.maxPV),ki(()=>ni(E.buffs.onHitReceived,R)))};E.buffs.onHitReceived.push(R)}if(E.item===pn){const R=({damage:F})=>{E.pv-F<.5*E.maxPV&&(E.item=null,zt("heal_ailment"),ki(()=>ni(E.buffs.onHitReceived,R)),E.buffs.defense.push(()=>.3))};E.buffs.onHitReceived.push(R)}if(E.item===mn){const R=()=>{E.item=null,zt("heal_ailment"),ki(()=>ni(E.buffs.onHitReceived,R)),E.buffs.onHitReceived.push(()=>{E.pp=Math.min(E.pp+2,E.maxPP)})};E.buffs.onHitReceived.push(R)}if(E.item===gn&&E.buffs.attack.push(()=>.2),E.item===xn&&E.buffs.defense.push(()=>.2),E.item===yn&&E.buffs.speed.push(()=>.2),E.item===An&&E.buffs.onHit.push(({damage:R})=>{Ci(E,R*.2)}),E.item===Cn){const R=({damage:F})=>{if(E.pv-F<.3*E.maxPV){E.makeUntargettable(3e3),zt("fly");const B=A.sprites.get(E.uid);B&&ve(rt.BROUILLARD,B.x,B.y,A),ni(E.buffs.onHitReceived,R)}};E.buffs.onHitReceived.push(R)}E.item===Rn&&E.buffs.onHit.push(()=>{E.pp=Math.min(E.pp+4,E.maxPP)}),E.item===Ln&&E.buffs.clock.push(()=>{const[R,F]=[E.x,E.y];[[R-1,F-1],[R,F-1],[R+1,F-1],[R-1,F],[R,F],[R+1,F],[R-1,F+1],[R,F+1],[R+1,F+1]].filter(([v,y])=>Xn(v,y)).forEach(([v,y])=>{const t=Oe(v,y);t&&t.owner===E.owner&&Ci(t,t.maxPV*(1/100))})}),E.item===On&&(E.buffs.onHit.push(({target:R})=>{re(R,{type:at.POISON,stacks:10},A)}),E.buffs.onHitReceived.push(({attacker:R})=>{re(R,{type:at.POISON,stacks:10},A)})),E.item===Mn&&(E.buffs.onHit.push(({target:R})=>{re(R,{type:at.BRULURE,stacks:10},A)}),E.buffs.onHitReceived.push(({attacker:R})=>{re(R,{type:at.BRULURE,stacks:10},A)})),E.item===In&&(E.buffs.onHit.push(({target:R})=>{re(R,{type:at.PARALYSIE,stacks:10},A)}),E.buffs.onHitReceived.push(({attacker:R})=>{re(R,{type:at.PARALYSIE,stacks:10},A)})),E.item===Bn&&(E.unalterable=!0);for(const R of C){if(E.hasType(Ht)&&R.type===Ht&&R.stepReached){const F=({target:B,attacker:v})=>{const y={type:at.BRULURE,stacks:R.stepReachedN+1,attacker:v};re(B,y,A)};E.buffs.onHit.push(F)}if(E.hasType(Kt)&&R.type===Kt&&R.stepReached){const F=({target:B})=>{B.pp=Math.max(0,B.pp-R.stepReachedN*2)};E.buffs.onHit.push(F)}if(E.hasType(Yt)&&R.type===Yt&&R.stepReached){const F=({target:B,attacker:v})=>{const y={type:at.PEUR,stacks:R.stepReachedN*2,attacker:v};re(B,y,A)};E.buffs.onHit.push(F)}if(E.hasType($t)&&R.type===$t&&R.stepReached){const F=({attacker:B,skill:v})=>{v.attackRange===1&&Ae(R.stepReachedN*2,B,E)};E.buffs.onHitReceived.push(F),E.buffs.speed.push(()=>.1*R.stepReachedN)}if(E.hasType(Jt)&&R.type===Jt&&R.stepReached&&E.buffs.dodge.push(()=>.2*R.stepReachedN),E.hasType(Vt)&&R.type===Vt&&R.stepReached){const F=({damage:B})=>{if(!F.count||F.count<=0)return;const v=[.2,.5,.8][F.count-1];E.pv-B>0&&(E.pv-B)/E.maxPV{E.pp=Math.min(E.entry.maxPP,E.pp+R.stepReachedN)}),E.hasType(kt)&&R.type===kt&&R.stepReached&&E.buffs.clock.push(()=>{Ci(E,1/100*R.stepReachedN*E.maxPV)}),E.hasType(Ut)&&R.type===Ut&&R.stepReached){let F=function(){return E.opponents.filter(v=>v.nextAction.target===E).length};const B=[.05,.1,.2];E.buffs.attack.push(()=>F()*B[R.stepReachedN-1]),E.buffs.defense.push(()=>F()*B[R.stepReachedN-1])}if(E.hasType(_t)&&R.type===_t&&R.stepReached&&E.buffs.clock.push(()=>{const[F,B]=[E.x,E.y],y=[[F-1,B-1],[F,B-1],[F+1,B-1],[F-1,B],[F+1,B],[F-1,B+1],[F,B+1],[F+1,B+1]].filter(([t,h])=>Xn(t,h)).map(([t,h])=>Oe(t,h)).filter(t=>t!=null&&t.owner!==E.owner);for(const t of y){const h=[-.2,-.3,-.4],p=()=>h[R.stepReachedN]??0;t.buffs.speed.push(p),setTimeout(()=>ni(t.buffs.speed,p),1e3)}}),E.hasType(qt)&&R.type===qt&&R.stepReached){const F=()=>E.team.length===1;E.buffs.attack.push(()=>F()?.1*R.stepReachedN:0),E.buffs.defense.push(()=>F()?.1*R.stepReachedN:0),E.buffs.speed.push(()=>F()?.1*R.stepReachedN:0)}}}const _r=7,Hn=8;function cd(E){return{playerTeam:[...E.team],playerAlliances:xi(E.team),otherTeam:[],otherTeamAlliances:new Map,activeTile:null}}function Ex(E,A){const C=E.resetTeam(),R=A.spawnOtherTeam();return{playerTeam:C,otherTeam:R,playerAlliances:xi(C),otherTeamAlliances:xi(R),activeTile:null}}function Tx(E){const A=E.spawnOtherTeam();return{playerTeam:[],otherTeam:A,playerAlliances:new Map,otherTeamAlliances:xi(A),activeTile:null}}function Sx(E){R1(E),Px(),ud(),ba(),[st.ARENA,st.WILD].includes(k.currentRoom.type)&&(wi(k.board.playerTeam),wi(k.board.otherTeam))}function vd(E){if([st.ARENA,st.WILD,st.TUTORIAL,st.PENSION].includes(k.currentRoom.type))for(const A of k.player.team)yi(A,E).setAlpha(.5);for(const A of k.board.otherTeam)yi(A,E).anims.resume()}function Ax(E){var A,C,R;for(const F of k.player.team)(A=E.sprites.get(F.uid))==null||A.destroy();if(k.currentRoom.type===st.ARENA||k.currentRoom.type===st.SAFARI)for(const F of k.board.otherTeam)(C=E.sprites.get(F.uid))==null||C.destroy(!0);(R=E.objects.get("grid"))==null||R.destroy(),dh(),Mx(),wi(k.board.playerTeam)}function Ue(E,A){return[32*E+64,32*A+48]}function Ws(E,A){return[Math.floor((E-64)/32),Math.floor((A-48)/32)]}function Oe(E,A){return k.allPokemonsOnBoard.find(C=>C.x===E&&C.y===A)}function Xn(E,A){return E>=0&&E<7&&A>=0&&A<8}function pd(E,A,C,R,F,B=!1){return new Promise(v=>{let y,t;E===1?(y=50,t=280):(y=280,t=40),B&&zt("ball_launch");const h=F.add.sprite(y,t,"pokeball");h.play(`${A}_launch`),h.setRotation(Math.random()*Math.PI*2),F.add.tween({targets:h,x:C,y:R,duration:400+Phaser.Math.Distance.Between(y,t,C,R)*3,ease:"Sine.Out",onComplete:()=>{h.setRotation(0),v(h)}})})}function zo(E,A){const[C,R]=E.position;yx(E),pd(E.owner,E.pokeball,C,R,A).then(F=>{F.play(`${E.pokeball}_out`),F.once(Phaser.Animations.Events.ANIMATION_COMPLETE,()=>{F.destroy(),yi(E,A).play(`${E.entry.ref}_${E.facingDirection}`)})})}async function Cx(E,A,C){ui(),uh(C),E.owner=zd,td(E.cost);const R=C.sprites.get("player");R==null||R.play("trainer_launch"),await Et(400);const[F,B]=E.position,v=await pd(1,E.pokeball,F,B,C,!0);zt("ball_catch"),v.play(`${E.pokeball}_in`),C.add.tween({targets:A,scale:.1,alpha:0,duration:1e3}),v.once(Phaser.Animations.Events.ANIMATION_COMPLETE,async()=>{v.play(`${E.pokeball}_jiggle`),await Et(1100),v.play(`${E.pokeball}_catch`),zt(Sa(E.entry)),t1()===E&&ui(),await Et(500),v.setDepth(ft.SPRITE_DRAGGED),C.add.tween({targets:v,x:C.scale.width/2,y:C.scale.height-10,duration:400}),C.add.tween({targets:v,alpha:0,duration:400,delay:400}),await Et(800),v.destroy(),hr(E,k.board.otherTeam),E.owner=xe;const t=k.player.boardAndBox.find(h=>h.entry.ref===E.entry.ref);t!=null?(await Et(100),await Mt([V("dialog.aftercapture.0",{name:V(`pokemon.${t.entry.ref}`)}),V("dialog.aftercapture.1",{name:t.entry.ref,xp:E.xp})]),await Mf(t,E.xp)):Ys(E),k.registerPokemonCaptured(E),k.board.otherTeam.length===0&&await k.endCapture()})}function Px(){const E=k.activeScene,A=E.add.graphics(),C=[st.SAFARI,st.PENSION].includes(k.currentRoom.type)?0:.1;E.objects.set("grid",A),A.setDepth(ft.GRID),A.lineStyle(1,0,C);for(let F=1;F<=_r+1;F++)A.lineBetween(F*32+16,32,F*32+16,288);for(let F=1;F<=Hn+1;F++)A.lineBetween(48,F*32+32,272,F*32+32);const R=E.add.graphics();E.objects.set("gridActiveTile",R),A.setDepth(ft.GRID_ACTIVE_TILE),A.lineStyle(1,16777215,.25);for(let F=0;F<_r;F++)for(let B=0;BRx(v,E)),v.on("out",()=>{const[y,t]=Ws(v.x+16,v.y+16);k.board.activeTile!=null&&k.board.activeTile[0]===y&&k.board.activeTile[1]===t&&md(E)}),v.on("click",()=>{Ot.draggedElem!=null&&Ui(E)}),v.on("dropReceived",y=>{const t=y.getData("type");t==="pokemon"?Lx(y,F,B,E):t==="item"&&Fx(y,F,B,E)})}}function Rx(E,A){var t,h,p,a;const{x:C,y:R}=E,[F,B]=Ws(C+16,R+16);if(((t=k.activeMenu)==null?void 0:t.ref)==="pokedex"||((h=k.activeMenu)==null?void 0:h.ref)==="box"&&B>=2&&B<=3)return;k.board.activeTile!=null&&(k.board.activeTile[0]!==F||k.board.activeTile[1]!==B)&&md(A),k.board.activeTile=[F,B];const v=A.objects.get("gridActiveTile");k.stage===Se.PLACEMENT&&v!=null&&B>=4&&v.lineStyle(2,0,.1).moveTo(C-16,R-16).lineTo(C+16,R-16).lineTo(C+16,R+16).lineTo(C-16,R+16).lineTo(C-16,R-16).stroke();const y=Oe(F,B);y==null?(k.activeMenu==null||((p=k.activeMenu)==null?void 0:p.ref)==="box"&&B>4)&&ui():!Ot.draggedElem&&(k.activeMenu==null||((a=k.activeMenu)==null?void 0:a.ref)==="box")&&((y.owner===xe||[st.WILD,st.ARENA,st.TUTORIAL,st.SAFARI,st.PENSION].includes(k.currentRoom.type)||k.stage===Se.FIGHT)&&Us(y),[st.WILD,st.TUTORIAL,st.SAFARI,st.PENSION].includes(k.currentRoom.type)&&y.owner===He&&k.activeMenu==null&&(k.stage===Se.PLACEMENT||k.stage===Se.CAPTURE)&&cx(y,A))}function md(E){if(k.board.activeTile==null)return;const A=E.objects.get("gridActiveTile");A==null||A.clear(),ui(),uh(E),k.board.activeTile=null}function Lx(E,A,C,R){var y;let F;const B=E.getData("pokemon");if(!B)return;const v=Oe(A,C);if(v!=null&&v!==B){const t=R.sprites.get(v.uid);t&&Na(t)&&Et().then(()=>zs(t,R))}B instanceof Tt?(F=B,k.currentRoom.type===st.PENSION&&(C<4?(hr(F,k.board.playerTeam),xu(F),E.setAlpha(1),E.anims.resume()):(_f(F),No(F),E.setAlpha(.5),E.anims.pause()))):(F=new Tt({uid:B.uid,entry:B.entry,owner:B.owner,xp:B.xp,item:B.item??void 0,x:A,y:C}),(y=R.sprites.get(B.uid))==null||y.setData("pokemon",F),k.currentRoom.type===st.PENSION?(xu(F),E.setAlpha(1),E.anims.resume()):No(F)),F.x=A,F.y=C,F.placementX=A,F.placementY=C,E.setData("pokemon",F),E.setPosition(...F.position),Us(F),ba(),dh()}function gd(){if(Ot.draggedElem!=null){const E=Ot.draggedElem.getData("pokemon");if(!E)return;E instanceof Tt?(Ot.draggedElem.setPosition(...E.positionPlacement),Ot.draggedElem.emit("drop"),Ot.draggedElem=null):Ys(E)}}function Ox(){return k.board.otherTeam.reduce((E,A)=>E+Hd(A),0)}function xd(){return 6}function ba(){if([st.PENSION,st.SAFARI].includes(k.currentRoom.type))return;const E=k.activeScene;let A=E.objects.get("teamSizeCounter");A&&A.destroy(),A=E.add.text(E.scale.width/2,E.scale.height*2/3,"",{align:"center",color:"white",stroke:"black",fontSize:"64px",fontFamily:"Pokemon",fontStyle:"italic",strokeThickness:4}),A.setScrollFactor(0),A.setDepth(ft.TEAM_SIZE_COUNTER),A.setOrigin(.5),A.setAlpha(.15),E.objects.set("teamSizeCounter",A);const C=k.board.playerTeam.length,R=xd();A.setText(` ${C} / ${R} `),C>R?(A.setAlpha(.3),A.setVisible(!0),A.setTint(16711680)):(A.setTint(16777215),C<=R&&A.setVisible(!1)),sd()}function Mx(){var A;(A=k.activeScene.objects.get("teamSizeCounter"))==null||A.destroy()}function Ix(E){var A;zt("refresh");for(const C of k.board.otherTeam)(A=E.sprites.get(C.uid))==null||A.destroy(!0);k.board.otherTeam=k.currentRoom.spawnOtherTeam(),k.board.otherTeamAlliances=xi(k.board.otherTeam);for(const C of k.board.otherTeam)yi(C,E).anims.resume();[st.ARENA,st.WILD].includes(k.currentRoom.type)&&wi(k.board.otherTeam)}function Fx(E,A,C,R){const F=Oe(A,C);if(F!=null){if(F.item!=null){const B=F.item;ki(()=>{const v=th(B);zs(v,R)})}F.item=E.getData("item"),E.destroy(),k.player.inventory[F.item.ref]-=1,Fv.includes(F.item)&&(k.board.playerAlliances=xi(k.board.playerTeam),wi(k.board.playerTeam)),Us(F)}}class Tt extends Fi{constructor({entry:C,owner:R,xp:F,level:B,item:v,uid:y,x:t,y:h,shouldAutoEvolve:p}){super({entry:C,owner:R,xp:F,level:B,item:v,uid:y,shouldAutoEvolve:p});ut(this,"x");ut(this,"y");ut(this,"placementX");ut(this,"placementY");ut(this,"facingDirection");ut(this,"nextAction");ut(this,"alterations");ut(this,"initialEntry");ut(this,"untargettable");ut(this,"unalterable");ut(this,"buffs");this.x=t,this.y=h,this.placementX=t,this.placementY=h,this.reset()}reset(){return this.x=this.placementX,this.y=this.placementY,this.facingDirection=this.owner===1?mt.UP:mt.DOWN,this.resetAction({type:Ge.IDLE}),this.pv=this.maxPV,this.pp=0,this.alterations=[],this.untargettable=!1,this.unalterable=!1,this.buffs=dd(),this}get position(){return Ue(this.x,this.y)}get positionPlacement(){return Ue(this.placementX,this.placementY)}get attack(){let C=this.buffs.attack.reduce((v,y)=>v+y(),1);const R=this.alterations.find(v=>v.type===at.POUVOIR_ANTIQUE);R&&(C+=.1*jt(R.stacks,0,10));const F=this.alterations.find(v=>v.type===at.FURIE);F&&(C+=.1*jt(F.stacks,0,20));const B=this.alterations.find(v=>v.type===at.RAGE);return B&&(C+=.2*B.stacks),Math.max(1,super.attack*C)}get defense(){let C=this.buffs.defense.reduce((v,y)=>v+y(),1);this.hasAlteration(at.ACIDE)&&(C-=.5);const R=this.alterations.find(v=>v.type===at.POUVOIR_ANTIQUE);R&&(C+=.1*jt(R.stacks,0,10));const F=this.alterations.find(v=>v.type===at.ARMURE);F&&(C+=.1*jt(F.stacks,0,20));const B=this.alterations.find(v=>v.type===at.RAGE);return B&&(C-=.2*B.stacks),Math.max(1,super.defense*C)}get speed(){let C=this.buffs.speed.reduce((y,t)=>y+t(),1);const R=this.alterations.find(y=>y.type===at.PARALYSIE);R&&(C-=jt(.01*R.stacks,0,.5)),this.hasAlteration(at.SECRETION)&&(C-=.5);const F=this.alterations.find(y=>y.type===at.POUVOIR_ANTIQUE);F&&(C+=.1*jt(F.stacks,0,10));const B=this.alterations.find(y=>y.type===at.HATE);B&&(C+=.1*B.stacks);const v=this.alterations.find(y=>y.type===at.RAGE);return v&&(C+=.2*v.stacks),jt(super.speed*C,1,500)}get precision(){return this.hasAlteration(at.AVEUGLE)?.5:1}get dodge(){return jt(this.buffs.dodge.reduce((C,R)=>C+R(),0),0,1)}get alive(){return this.pv>0}get team(){return this.owner===xe?k.board.playerTeam:k.board.otherTeam}get opponents(){return this.owner===xe?k.board.otherTeam:k.board.playerTeam}get alliances(){return this.owner===xe?k.board.playerAlliances:k.board.otherTeamAlliances}toBoxPokemon(C){var F;const R=new Fi({uid:this.uid,entry:this.entry,owner:this.owner,xp:this.xp,item:this.item??void 0});return(F=C.sprites.get(R.uid))==null||F.setData("pokemon",R),R}hasAlteration(C){return this.alterations.some(R=>R.type===C)}makeUntargettable(C){const R=k.board;(this.owner===xe?R.otherTeam:R.playerTeam).filter(B=>B.nextAction.target===this).forEach(B=>B.resetAction()),this.untargettable=!0,Et(C).then(()=>{this.untargettable=!1})}resetAction(C={type:Ge.IDLE}){var R,F;(F=(R=this.nextAction)==null?void 0:R.timer)==null||F.remove(),this.nextAction=C}resetTarget(C){this.resetAction({type:Ge.IDLE,target:C})}resetAfterFight(){this.x=this.placementX,this.y=this.placementY,this.untargettable=!1,this.unalterable=!1,this.initialEntry&&(this.entry=this.initialEntry)}}function yi(E,A){const[C,R]=E instanceof Tt?E.position:[0,0],F=A.add.sprite(C,R,"pokemon");return A.sprites.set(E.uid,F),A.objects.set(`bars_${E.uid}`,A.add.graphics()),F.setData("pokemon",E),F.setData("type","pokemon"),F.play(`${E.entry.ref}_DOWN`),F.setDepth(ft.POKEMON),F.anims.pause(),F.setInteractive(),A.input.setDraggable(F),pe(F),F.on("click",()=>{Ot.draggedElem===null&&Na(F)&&ki(()=>zs(F,A)),px()===E&&E instanceof Tt&&Wn(E.cost)&&!k.player.hasBoxFull&&Cx(E,F,A)}),F.on("dragstart",()=>{const B=F.getData("pokemon");B.owner===1&&(F.anims.resume(),F.setAlpha(1),ui(),xx(B),k.player.box.includes(B)&&rd(B))}),F.on("drop",B=>{var v;F.anims.pause((v=F.anims.currentAnim)==null?void 0:v.getFrameByProgress(0)),F.setAlpha(.5),dh()}),F}function yd(E,A,C,R){var v;E.x=A,E.y=C;const[F,B]=Ue(A,C);(v=R.sprites.get(E.uid))==null||v.setPosition(F,B),Do(E,R)}function Ba(E,A){const C=A.sprites.get(E.uid);C==null||C.destroy(),A.sprites.delete(E.uid);const R=A.objects.get(`bars_${E.uid}`);R!=null&&(R.destroy(),A.objects.delete(E.uid))}function Pe(E){const A=Object.keys(E),C=jt(k.player.boardAndBox.length,3,6),R=[];for(let F=0;FE[t]);let v,y;do v=Ce(0,6),y=Ce(0,3);while(R.some(t=>t.x===v&&t.y===y));R.push(new Tt({entry:Oo(tf($[B]),t=>t.wildEncounterChance),owner:He,level:jt(Math.floor(k.player.averagePokemonLevel*.9)-Ce(0,5),1,50),shouldAutoEvolve:!0,x:v,y}))}return R}function ti(E,A){const C=[],R=Math.min(jt(k.player.boardAndBox.length,3,6),A.length,E.length);for(let F=0;Ft.x===F&&t.y===B));A.push(new Tt({entry:v,level:y,owner:Dt,shouldAutoEvolve:!0,x:F,y:B}))}return A}function wx(){return Ia([Ea,Hu,$n,ya,il,an,fi,ln,fn,ma],3).map((R,F)=>new Tt({entry:R,owner:He,level:1,x:2*F+1,y:F%2+1}))}function Dx(E){return[new Tt({entry:E,owner:He,level:4,x:3,y:3})]}function Nx(){const A=Array.from({length:8}).map(()=>Oo(De,R=>R.wildEncounterChance)),C=[];for(let R=0;R<8;R++){let F,B;do F=Ce(0,6),B=Ce(0,7);while(C.some(v=>v.x===F&&v.y===B));C.push(new Tt({entry:A[R],level:jt(Math.floor(k.player.averagePokemonLevel*.9)+Ce(-4,4),1,50),owner:He,shouldAutoEvolve:!0,x:F,y:B}))}return C}function bx(){const A=Ia(wv(Ft),5),C=[];for(let R=0;R<5;R++){let F,B;do F=Ce(0,6),B=Ce(0,3);while(C.some(v=>v.x===F&&v.y===B));C.push(new Tt({entry:A[R],level:1,owner:He,shouldAutoEvolve:!0,x:F,y:B}))}return C}const ch={ref:"MONT_SELENITE",name:V("destination.MONT_SELENITE"),nextDestinations:{COL_DE_MONTAGNE:[[0,1],[-2,0]],AZURIA:[[0,1],[4,0]]},coordinates:[10*16-8,2*16-8],type:Ct.SPECIAL,icons:["type_FEE"],subtext:"Paléontologie et Capture",rooms:{wild:{type:st.WILD,name:V("destination.MONT_SELENITE"),map:"mont_selenite",music:"music_cave",spawnOtherTeam(){return Pe({[se.ref]:1,[Vt.ref]:.5,[bt.ref]:.5,[wt.ref]:.5,[Yt.ref]:.2})},beforeExit(){return Ye(Xe(qu),1,!0,"finding")}},trainer:{type:st.ARENA,name:V("destination.MONT_SELENITE"),map:"mont_selenite",music:"music_cave",trainer:Ig,spawnOtherTeam(){return te([is,ln,Mi,fi,xa,gi,bs,hs,ga])}}},preload(E){E.load.tilemapTiledJSON("mont_selenite","assets/maps/mont_selenite.json"),Nt("music_cave","assets/audio/music/39 Mt. Moon Cave.mp3")}},vh={type:st.WILD,music:"music_oceane",name:V("destination.OCEANE_DECK"),map:"oceane",spawnOtherTeam(){return Pe({[wt.ref]:1,[Jt.ref]:.2,[Ft.ref]:.1,[Ut.ref]:.1})}};function ph(E){E.load.tilemapTiledJSON("oceane","assets/maps/oceane.json"),Nt("music_oceane","assets/audio/music/13 St. Anne.mp3")}const mh={type:st.ARENA,music:"music_oceane",name:V("destination.OCEANE_DECK"),map:"oceane",trainer:Fg,spawnOtherTeam(){return te([tr,ws,Mi,da,es,Ll,Ds,Fs,qn,Di,Ii])}},kn={ref:"OCEANE_CARMIN",name:V("destination.OCEANE"),nextDestinations:{CARMIN:[[2,0]]},coordinates:[12*16-8,11*16-8],type:Ct.SPECIAL,icons:["boat"],subtext:V("destination_subtext.fast_travel_CRAMOISILE"),rooms:{wild:vh,trainer:mh},preload:ph},Ls={ref:"OCEANE_CRAMOISILE",name:V("destination.OCEANE"),nextDestinations:{CRAMOISILE:[[2,0]]},coordinates:[4*16-8,19*16-8],type:Ct.SPECIAL,icons:["boat"],subtext:V("destination_subtext.fast_travel_AZURIA"),rooms:{wild:vh,trainer:mh},preload:ph},Os={ref:"OCEANE_AZURIA",name:V("destination.OCEANE"),nextDestinations:{AZURIA:[[0,1],[-1,0],[0,1],[-2,0]],CENTRALE:[[0,1],[-1,0],[0,1],[0,1],[1,0],[0,1]]},coordinates:[17*16-8,8],type:Ct.SPECIAL,icons:["boat"],subtext:V("destination_subtext.fast_travel_CARMIN"),rooms:{wild:vh,trainer:mh},preload:ph};function Ga(E){const A=k.activeScene;if(E.preloading){const C=gt(A.scale.width/2,A.scale.height-30,"Chargement...",{align:"center",color:"white",strokeThickness:4,stroke:"black"}).setOrigin(.5),R=()=>{E.preloading=!1,C.destroy(),Ga(E),A.load.off("complete",R)};A.load.on("complete",R);return}[kn,Ls,Os].includes(E)?zt("oceane_horn"):zt("door"),k.roomOrder=Bx(E),k.currentDestination=E,k.currentRoomIndex=0,k.activeMenu!=null&&Le(),Bi(250).then(()=>k.initRoom())}function Bx(E){if(E.customRoomOrder)return E.customRoomOrder();if(E.type===Ct.ARENA){const A=E.rooms.arena;return A.badge&&k.hasBadge(A.badge)?["shop","trainer"].filter(C=>C in E.rooms):["shop","arena"].filter(C=>C in E.rooms)}return E.type===Ct.WILD||Qx.includes(E)||E===ch?k.lastCaptureDestination===E?(k.lastCaptureDestination=null,["trainer"]):(k.lastCaptureDestination=E,["wild"]):Object.keys(E.rooms)}function Gx(E){return E.subtext?E.subtext:E.type===Ct.ARENA?V("destination_subtext.ARENA"):E.type===Ct.WILD?k.lastCaptureDestination===E?V("destination_subtext.FIGHT"):V("destination_subtext.CAPTURE"):"???"}const Ux={title:V("room.oaklab"),tilemap:"labo_chen",tilesets:["tileset_inside"],startAt:"labo_exit",canExit(){return k.player.team.length===0?(Mt([V("dialog.exitlab.0"),V("dialog.exitlab.1")],{speaker:"red"}),!1):!0},exit(){k.currentDestination=Kn}},Kn={ref:"BOURG_PALETTE",name:V("destination.BOURG_PALETTE"),rooms:{home:{name:V("destination.HOME"),type:st.FREEWALK,level:ff,music:"music_labo_chen"},labo:{name:V("destination.LABO_CHEN"),type:st.FREEWALK,level:Ux,music:"music_labo_chen"},tuto:{name:V("destination.BOURG_PALETTE_ROAD"),type:st.TUTORIAL,map:"foret_de_jade",music:"music_guide",trainer:gg,spawnOtherTeam(){return wx()}}},customRoomOrder(){return k.day===0?["labo","tuto"]:(k.dialogStates.mam=bo.hello,["home"])},nextDestinations:{JADIELLE:[[0,-3]],CRAMOISILE:[[1,0],[0,1.5],[0,2.5]],MONT_BRAISE:[[1,0],[0,1.5],[-3,.5]]},coordinates:[5*16-8,15*16-8],type:Ct.SPECIAL,icons:["gift"],subtext:V("destination_subtext.BOURG_PALETTE"),preload(E){E.load.tilemapTiledJSON("bourg_palette","assets/maps/bourg_palette.json")}},Vx={ref:"CAMP_NOMADE",name:V("destination.CAMP_NOMADE"),nextDestinations:{CHAMPS_VERDOYANTS:[[-2,0],[0,1]],FALAISES:[[0,-3]]},coordinates:[19*16-8,14*16-8],type:Ct.ARENA,icons:["type_INSECTE"],rooms:{arena:{type:st.ARENA,name:V("destination.CAMP_NOMADE_ARENA"),map:"camp_nomade",music:"music_pension_et_camp_nomade",trainer:Vf,spawnOtherTeam(){return ti([Jo,on,Ri,Ko,Is,Tl,Nr,hn],[[2,3],[4,3],[3,3],[0,2],[1,2],[6,2],[5,2],[3,0]])}},trainer:{type:st.ARENA,name:V("destination.CAMP_NOMADE_ARENA"),map:"camp_nomade",music:"music_pension_et_camp_nomade",trainer:Ng,spawnOtherTeam(){return te([la,hn,_n,aa,on,Nr,oa,Ns,Jn,as])}},shop:{type:st.FREEWALK,name:V("destination.CAMP_NOMADE"),music:"music_shop",level:k1}},customRoomOrder(){return k.dialogStates.hector===Uf.BEATEN?["shop","trainer"]:["shop","arena"]},preload(E){E.load.tilemapTiledJSON("shop_camp_nomade","assets/maps/shop_camp_nomade.json"),E.load.tilemapTiledJSON("camp_nomade","assets/maps/camp_nomade.json"),Nt("music_pension_et_camp_nomade","assets/audio/music/47 Pikachu's Beach.mp3")}},Ed={type:st.WILD,name:V("destination.CAVE_TAUPIQUEUR"),music:"music_cave",map:"cave_taupiqueur",spawnOtherTeam(){return Pe({[Vt.ref]:1,[bt.ref]:.2,[Xt.ref]:.2,[Yt.ref]:.1})}},Td={type:st.ARENA,name:V("destination.CAVE_TAUPIQUEUR"),music:"music_cave",map:"cave_taupiqueur",trainer:zg,spawnOtherTeam(){return te([hs,hs,Ii,Qn,bs,li,gi,hi,Ni])}};function Sd(E){Nt("music_cave","assets/audio/music/39 Mt. Moon Cave.mp3"),E.load.tilemapTiledJSON("cave_taupiqueur","assets/maps/cave_taupiqueur.json")}const ta={ref:"CAVE_TAUPIQUEUR_OUEST",name:V("destination.CAVE_TAUPIQUEUR_WEST"),subtext:V("destination_subtext.fast_travel"),nextDestinations:{JADIELLE:[[0,2],[-2,0]]},coordinates:[7*16-8,10*16-8],type:Ct.SPECIAL,icons:["cave_entrance","type_SOL"],rooms:{wild:Ed,trainer:Td},preload:Sd},ea={ref:"CAVE_TAUPIQUEUR_EST",name:V("destination.CAVE_TAUPIQUEUR_EAST"),subtext:V("destination_subtext.fast_travel"),nextDestinations:{CARMIN:[[0,1],[-3,0]],FALAISES:[[0,1],[2,0]]},coordinates:[17*16-8,10*16-8],type:Ct.SPECIAL,icons:["cave_entrance","type_SOL"],rooms:{wild:Ed,trainer:Td},preload:Sd},Ad={ref:"CENTRALE",name:V("destination.CENTRALE"),nextDestinations:{AZURIA:[[0,-1],[-1,0],[0,-1],[-2,0]],OCEANE_AZURIA:[[0,-1],[-1,0],[0,-1],[0,-1],[1,0],[0,-1]],LAVANVILLE:[[1,0],[0,1],[1,0],[0,1]]},coordinates:[17*16-8,5*16-8],type:Ct.WILD,icons:["type_ELECTRIQUE"],rooms:{wild:{type:st.WILD,name:V("destination.CENTRALE"),music:"music_centrale",map:"centrale",spawnOtherTeam(){return!k.pokedexSeen.has(Eo.ref)&&k.day>=20&&Math.random()<10/100?[new Tt({entry:Eo,owner:He,level:50,x:3,y:2})]:Pe({[$t.ref]:1,[Ft.ref]:.5,[wt.ref]:.5,[Ut.ref]:.2})}},trainer:{type:st.ARENA,name:V("destination.CENTRALE"),music:"music_centrale",map:"centrale",trainer:Rg,spawnOtherTeam(){return te([an,sn,as,$e,Xi,xa,ws,Gr])}}},preload(E){E.load.tilemapTiledJSON("centrale","assets/maps/centrale.json"),Nt("music_centrale","assets/audio/music/37 Team Rocket Hideout.mp3")}},Yx={ref:"CHAMPS_VERDOYANTS",name:V("destination.CHAMPS_VERDOYANTS"),nextDestinations:{CAMP_NOMADE:[[0,-1],[2,0]],PARMANIE:[[-1,0],[0,1],[-3,0]]},coordinates:[17*16-8,15*16-8],type:Ct.WILD,icons:["type_PLANTE"],rooms:{wild:{type:st.WILD,name:V("destination.CHAMPS_VERDOYANTS"),map:"champs_verdoyants",music:"music_champs_verdoyants",spawnOtherTeam(){return Pe({[kt.ref]:1,[Ft.ref]:.2,[Xt.ref]:.2,[Qt.ref]:.2,[Vt.ref]:.2})}},trainer:{type:st.ARENA,name:V("destination.CHAMPS_VERDOYANTS"),map:"champs_verdoyants",music:"music_champs_verdoyants",trainer:Dg,spawnOtherTeam(){return te([rs,rs,jn,$n,pa,_n,Is,ls,hs])}}},preload(E){E.load.tilemapTiledJSON("champs_verdoyants","assets/maps/champs_verdoyants.json"),Nt("music_champs_verdoyants","assets/audio/music/19 The Road to Viridian City from Pallet.mp3")}},zx={ref:"COL_DE_MONTAGNE",name:V("destination.COL_MONTAGNE"),nextDestinations:{ARGENTA:[[0,1],[-1,0],[0,1]],MONT_SELENITE:[[2,0]],AZURIA:[[2,0],[4,0]]},coordinates:[8*16-8,3*16-8],type:Ct.WILD,icons:["type_VOL"],rooms:{wild:{type:st.WILD,name:V("destination.COL_MONTAGNE"),music:"music_col_montagne",map:"col_de_montagne",spawnOtherTeam(){return Pe({[Jt.ref]:1,[Ft.ref]:.2,[_t.ref]:.2,[bt.ref]:.2,[wt.ref]:.1})}},trainer:{type:st.ARENA,name:V("destination.COL_MONTAGNE"),map:"col_de_montagne",music:"music_col_montagne",trainer:Eg,spawnOtherTeam(){return te([Il,Sl,Ms,ma,Gu,er,on,wu])}}},preload(E){E.load.tilemapTiledJSON("col_de_montagne","assets/maps/col_de_montagne.json"),Nt("music_col_montagne","assets/audio/music/20 The Road to Cerulean - from Mt. Moon.mp3")}},Cd={ref:"COLLINE_ROYALE",name:V("destination.COLLINE_ROYALE"),nextDestinations:{ARGENTA:[[-2,0],[-2,0]],CELADOPOLE:[[-2,0],[0,2]]},coordinates:[11*16-8,5*16-8],type:Ct.WILD,icons:["type_DRAGON"],rooms:{wild:{type:st.WILD,name:V("destination.COLLINE_ROYALE"),map:"colline_royale",music:"music_colline_royale",spawnOtherTeam(){return Pe({[qt.ref]:1,[Jt.ref]:.5,[Ut.ref]:.2})}},trainer:{type:st.ARENA,name:V("destination.COLLINE_ROYALE"),map:"colline_royale",music:"music_colline_royale",trainer:Wg,spawnOtherTeam(){return te([Ur,Ur,Ol])}}},preload(E){E.load.tilemapTiledJSON("ronflex_endormi","assets/maps/ronflex_endormi.json"),E.load.tilemapTiledJSON("colline_royale","assets/maps/colline_royale.json"),Nt("music_colline_royale","assets/audio/music/03 To Bill's Origin - From Cerulean.mp3")}},Wx={ref:"RONFLEX_ENDORMI",name:V("destination.CHEMIN_COLLINE"),nextDestinations:{},coordinates:[11*16-8,5*16-8],type:Ct.WILD,icons:["type_NORMAL"],rooms:{wild:{type:st.WILD,name:V("destination.CHEMIN_COLLINE"),map:"ronflex_endormi",music:"music_colline_royale",spawnOtherTeam(){return[new Tt({entry:Ml,owner:He,level:30,x:3,y:3})]}}},preload(E){E.load.tilemapTiledJSON("ronflex_endormi","assets/maps/ronflex_endormi.json")},onExit(){k.wokeUpRonflex=!0,k.currentDestination=Cd}},Hx={ref:"DOJO",name:V("destination.DOJO"),nextDestinations:{SAFRANIA:[[2,0]],CELADOPOLE:[[-3,0]]},coordinates:[12*16-8,7*16-8],type:Ct.WILD,icons:["type_COMBAT"],rooms:{wild:{type:st.WILD,name:V("destination.DOJO"),map:"dojo",music:"music_dojo",spawnOtherTeam(){return Pe({[Ut.ref]:1,[Ft.ref]:.2,[Xt.ref]:.2,[Ht.ref]:.2,[Kt.ref]:.2})}},trainer:{type:st.ARENA,name:V("destination.DOJO"),map:"dojo",music:"music_dojo",trainer:Tg,spawnOtherTeam(){return te([Vr,Vr,br,br,ul,cl,il,Rl])}}},preload(E){E.load.tilemapTiledJSON("dojo","assets/maps/dojo.json"),Nt("music_dojo","assets/audio/music/15 Rival Appears.mp3")}},Xx={ref:"FALAISES",name:V("destination.FALAISES"),nextDestinations:{LAVANVILLE:[[0,-4]],CARMIN:[[-2,0],[-3,0]],CAMP_NOMADE:[[0,3]],CAVE_TAUPIQUEUR_EST:[[-2,0],[0,-1]]},coordinates:[19*16-8,11*16-8],type:Ct.WILD,icons:["type_ROCHE"],rooms:{wild:{type:st.WILD,name:V("destination.FALAISES"),map:"falaises",music:"music_falaises",spawnOtherTeam(){return Pe({[bt.ref]:1,[wt.ref]:1,[Jt.ref]:1,[Vt.ref]:.5})}},trainer:{type:st.ARENA,name:V("destination.FALAISES"),map:"falaises",music:"music_falaises",trainer:Sg,spawnOtherTeam(){return te([gi,Li,Ms,os,er,Sl,ls,bs])}}},preload(E){E.load.tilemapTiledJSON("falaises","assets/maps/falaises.json"),Nt("music_falaises","assets/audio/music/21 The Road to Lavender Town from Vermilion.mp3")}},kx={ref:"FORET_JADE",name:V("destination.FORET_JADE"),nextDestinations:{JADIELLE:[[0,3]],ARGENTA:[[0,-4],[2,0]]},coordinates:[5*16-8,9*16-8],type:Ct.WILD,icons:["type_INSECTE"],rooms:{wild:{type:st.WILD,name:V("destination.FORET_JADE"),map:"foret_de_jade",music:"music_foret_jade",spawnOtherTeam(){return Pe({[Xt.ref]:1,[kt.ref]:.2,[Qt.ref]:.2,[se.ref]:.05})}},trainer:{type:st.ARENA,name:V("destination.FORET_JADE"),map:"foret_de_jade",music:"music_foret_jade",trainer:Lg,spawnOtherTeam(){return te([la,hn,_n,aa,on,Nr,ls,rs,jn,Ea])}}},preload(E){E.load.tilemapTiledJSON("foret_de_jade","assets/maps/foret_de_jade.json"),Nt("music_foret_jade","assets/audio/music/38 Viridian Forest.mp3")}},Kx={ref:"GROTTE_AZUREE",name:V("destination.GROTTE_AZUREE"),nextDestinations:{AZURIA:[[0,2]]},coordinates:[14*16-8,8],type:Ct.WILD,icons:["type_GLACE"],locked(){return!k.hasBadge(ir)},rooms:{wild:{type:st.WILD,music:"music_grotte_azuree",name:V("destination.GROTTE_AZUREE"),map:"grotte_azuree",spawnOtherTeam(){return!k.pokedexSeen.has(To.ref)&&k.day>=20&&Math.random()<10/100?[new Tt({entry:To,owner:He,level:50,x:3,y:1})]:Pe({[_t.ref]:.5,[wt.ref]:.5,[qt.ref]:.3,[bt.ref]:.2,[Yt.ref]:.1})}},trainer:{type:st.ARENA,name:V("destination.GROTTE_AZUREE"),map:"grotte_azuree",music:"music_grotte_azuree",trainer:Gg,spawnOtherTeam(){return te([Mi,Zn,Oi,ya,qn,Di,Fs,da,tr,ze,es])}}},preload(E){E.load.tilemapTiledJSON("grotte_azuree","assets/maps/grotte_azuree.json"),Nt("music_grotte_azuree","assets/audio/music/40 Pokemon Mansion.mp3")}},Pd={ref:"ILES_ECUME",name:V("destination.ILES_ECUME"),nextDestinations:{CRAMOISILE:[[-4,0]],PARMANIE:[[3,0],[0,-3]]},coordinates:[10*16-8,19*16-8],type:Ct.WILD,icons:["type_EAU"],rooms:{wild:{type:st.WILD,music:"music_iles_ecume",name:"Îles Ecume",map:"iles_ecume",spawnOtherTeam(){return!k.pokedexSeen.has(yo.ref)&&k.day>=20&&Math.random()<10/100?[new Tt({entry:yo,owner:He,level:50,x:3,y:2})]:Pe({[wt.ref]:1,[Ft.ref]:.2,[kt.ref]:.2})}},trainer:{type:st.ARENA,music:"music_iles_ecume",name:V("destination.ILES_ECUME"),map:"iles_ecume",trainer:Pg,spawnOtherTeam(){return te([tr,Ds,aa,Di,Qu,Fs,Oi,Zn,ze])}}},preload(E){E.load.tilemapTiledJSON("iles_ecume","assets/maps/iles_ecume.json"),Nt("music_iles_ecume","assets/audio/music/35 Ocean.mp3")}},Jx={ref:"MAISON_PSY",name:V("destination.MAISON_PSY"),nextDestinations:{SAFRANIA:[[0,-1.5]],CARMIN:[[0,2.5]]},coordinates:[14*16-8,8.5*16-8],type:Ct.WILD,icons:["type_PSY"],rooms:{wild:{type:st.WILD,music:"music_mr_psy",name:V("destination.MAISON_PSY"),map:"maison_mr_psy",spawnOtherTeam(){return Pe({[Kt.ref]:1,[Ft.ref]:.2,[kt.ref]:.2,[Ht.ref]:.2})}},trainer:{type:st.ARENA,music:"music_mr_psy",name:V("destination.MAISON_PSY"),map:"maison_mr_psy",trainer:wg,spawnOtherTeam(){return te([ts,ts,fn,ss,Oi,fl,ca,Ll,xa,fi])}}},preload(E){E.load.tilemapTiledJSON("maison_mr_psy","assets/maps/maison_mr_psy.json"),Nt("music_mr_psy","assets/audio/music/16 Guide.mp3")}},Rd={ref:"MONT_BRAISE",name:V("destination.MONT_BRAISE"),nextDestinations:{BOURG_PALETTE:[[3,-.5],[0,-1.5],[-1,0]],CRAMOISILE:[[3,-.5],[0,2.5]]},coordinates:[3*16-8,17*16-8],type:Ct.WILD,icons:["type_FEU"],rooms:{wild:{name:V("destination.MONT_BRAISE"),map:"mont_braise",type:st.WILD,music:"music_mont_braise",spawnOtherTeam(){return!k.pokedexSeen.has(So.ref)&&k.day>=20&&Math.random()<10/100?[new Tt({entry:So,owner:He,level:50,x:3,y:1})]:Pe({[Ht.ref]:1,[Vt.ref]:.1,[bt.ref]:.1,[Ft.ref]:.1})}},trainer:{type:st.ARENA,name:V("destination.MONT_BRAISE"),map:"mont_braise",music:"music_mont_braise",trainer:Hg,spawnOtherTeam(){return te([er,Qn,Ms,Cl,si,ua,ws,Nl])}}},preload(E){E.load.tilemapTiledJSON("mont_braise","assets/maps/mont_braise.json"),Nt("music_mont_braise","assets/audio/music/49 Unknown Song.mp3")}},jx={ref:"PARC_SAFARI",name:V("destination.PARC_SAFARI"),nextDestinations:{PARMANIE:[[0,2]]},coordinates:[13*16-8,14*16-8],type:Ct.SPECIAL,icons:["safari"],subtext:V("destination_subtext.SAFARI"),rooms:{safari:{type:st.SAFARI,name:V("destination.PARC_SAFARI"),music:"music_safari",map:"safari1",maps:["safari1","safari2","safari3"],spawnOtherTeam:Nx}},preload(E){E.load.tilemapTiledJSON("safari1","assets/maps/safari1.json"),E.load.tilemapTiledJSON("safari2","assets/maps/safari2.json"),E.load.tilemapTiledJSON("safari3","assets/maps/safari3.json"),Nt("music_safari","assets/audio/music/36 Casino.mp3")}},Ld={ref:"PENSION",name:V("destination.PENSION"),nextDestinations:{AZURIA:[[0,-2]],SAFRANIA:[[0,2]]},coordinates:[14*16-8,5*16-8],type:Ct.SPECIAL,icons:["type_NORMAL"],subtext:"Élevage",rooms:{pension:{name:V("destination.PENSION"),type:st.PENSION,trainer:Yg,music:"music_pension_et_camp_nomade",map:"pension",spawnOtherTeam(){return k.pension}}},preload(E){E.load.tilemapTiledJSON("pension","assets/maps/pension.json"),Nt("music_pension_et_camp_nomade","assets/audio/music/47 Pikachu's Beach.mp3")}},Zx={ref:"PISTE_CYCLABLE",name:V("destination.PISTE_CYCLABLE"),nextDestinations:{CELADOPOLE:[[0,-5]],PARMANIE:[[0,4],[4,0]]},coordinates:[9*16-8,12*16-8],type:Ct.WILD,icons:["type_POISON"],rooms:{wild:{type:st.WILD,name:V("destination.PISTE_CYCLABLE"),map:"piste_cyclable",music:"music_piste_cyclable",spawnOtherTeam(){return Pe({[Qt.ref]:1,[Ft.ref]:.4,[$t.ref]:.4})}},trainer:{type:st.ARENA,name:V("destination.PISTE_CYCLABLE"),map:"piste_cyclable",music:"music_piste_cyclable",trainer:Cg,spawnOtherTeam(){return te([hi,Jn,Ni,Ii,xl,li,hn,sn,Xi])}}},preload(E){E.load.tilemapTiledJSON("piste_cyclable","assets/maps/piste_cyclable.json"),Nt("music_piste_cyclable","assets/audio/music/34 Cycling.mp3")}},Od={type:st.WILD,name:V("destination.ROUTE_VICTOIRE"),music:"music_route_victoire",map:"route_victoire",spawnOtherTeam(){return Pe({[Vt.ref]:1,[bt.ref]:1,[Kt.ref]:1,[Ut.ref]:1,[Ht.ref]:.5,[wt.ref]:.5,[kt.ref]:.5,[$t.ref]:.5,[qt.ref]:.5,[Yt.ref]:.25,[_t.ref]:.25,[se.ref]:.25,[$t.ref]:.25})}},ia={ref:"ROUTE_VICTOIRE_ENTREE",name:V("destination.ROUTE_VICTOIRE_ENTREE"),subtext:V("destination_subtext.fast_travel"),nextDestinations:{JADIELLE:[[0,7],[3,0]]},coordinates:[2*16-8,5*16-8],type:Ct.WILD,icons:["cave_entrance"],rooms:{wild:Od},preload:Md,locked(){return k.player.badges.length<8},customRoomOrder(){return["wild"]}},sa={ref:"ROUTE_VICTOIRE_SORTIE",name:V("destination.ROUTE_VICTOIRE_SORTIE"),subtext:V("destination_subtext.fast_travel"),nextDestinations:{LIGUE:[[0,1],[1,0],[0,-1]]},coordinates:[1*16-8,3*16-8],type:Ct.SPECIAL,icons:["cave_entrance"],rooms:{wild:Od},preload:Md,customRoomOrder(){return["wild"]}};function Md(E){Nt("music_route_victoire","assets/audio/music/22 The Last Road.mp3"),E.load.tilemapTiledJSON("route_victoire","assets/maps/route_victoire.json")}const $x={ref:"TOUR_POKEMON",name:V("destination.TOUR_POKEMON"),nextDestinations:{SAFRANIA:[[-2,0]],LAVANVILLE:[[3,0]]},coordinates:[16*16-8,7*16-8],type:Ct.WILD,icons:["type_SPECTRE"],rooms:{wild:{name:V("destination.TOUR_POKEMON"),type:st.WILD,map:"tour_pokemon",music:"music_tour_pokemon",spawnOtherTeam(){return Pe({[Yt.ref]:1,[Ft.ref]:.2,[Kt.ref]:.2})}},trainer:{type:st.ARENA,name:V("destination.TOUR_POKEMON"),map:"tour_pokemon",music:"music_tour_pokemon",trainer:Vg,spawnOtherTeam(){return te([li,li,li,ga,ma,ua,is,ts,Ea])}}},preload(E){E.load.tilemapTiledJSON("tour_pokemon","assets/maps/tour_pokemon.json"),Nt("music_tour_pokemon","assets/audio/music/41 Pokemon Tower.mp3")}},en={BOURG_PALETTE:Kn,JADIELLE:ah,CAVE_TAUPIQUEUR_OUEST:ta,CAVE_TAUPIQUEUR_EST:ea,FORET_JADE:kx,ARGENTA:sh,COLLINE_ROYALE:Cd,COL_DE_MONTAGNE:zx,MONT_SELENITE:ch,AZURIA:nh,GROTTE_AZUREE:Kx,PENSION:Ld,CENTRALE:Ad,LAVANVILLE:oh,TOUR_POKEMON:$x,SAFRANIA:hd,DOJO:Hx,CELADOPOLE:od,MAISON_PSY:Jx,CARMIN:ad,OCEANE_CARMIN:kn,OCEANE_CRAMOISILE:Ls,OCEANE_AZURIA:Os,FALAISES:Xx,CAMP_NOMADE:Vx,CHAMPS_VERDOYANTS:Yx,PARMANIE:lh,PARC_SAFARI:jx,PISTE_CYCLABLE:Zx,ILES_ECUME:Pd,CRAMOISILE:rh,MONT_BRAISE:Rd,ROUTE_VICTOIRE_ENTREE:ia,ROUTE_VICTOIRE_SORTIE:sa,LIGUE:ld},Qx=[kn,Ls,Os,ta,ea,ia,sa],Ru=new Map([[Os,kn],[kn,Ls],[Ls,Os],[ta,ea],[ea,ta],[ia,sa],[sa,ia]]),Lu=[{ref:"i1",coordinates:[136,72],nextDestinations:{ARGENTA:[[-2,0]],COLLINE_ROYALE:[[2,0]],CELADOPOLE:[[0,2]]},onReach:_x},{ref:"i2",coordinates:[152,40],nextDestinations:{COL_DE_MONTAGNE:[[-2,0]],AZURIA:[[4,0]],MONT_SELENITE:[[0,-1]]}},{ref:"i3",coordinates:[248,40],nextDestinations:{AZURIA:[[-2,0]],OCEANE_AZURIA:[[0,-1],[1,0],[0,-1]],CENTRALE:[[0,1],[1,0],[0,1]]}},{ref:"i4",coordinates:[264,168],nextDestinations:{CAVE_TAUPIQUEUR_EST:[[0,-1]],FALAISES:[[2,0]],CARMIN:[[-3,0]]}},{ref:"i5",coordinates:[88,252],nextDestinations:{BOURG_PALETTE:[[0,-1.5],[-1,0]],MONT_BRAISE:[[-3,.7]],CRAMOISILE:[[0,2.5]]}}],qx={[Ct.ARENA]:3403519,[Ct.WILD]:3407667,[Ct.SPECIAL]:16777011};function _x(){return new Promise(E=>k.wokeUpRonflex?E(!0):k.player.inventory[Tn.ref]>0?Mt([V("dialog.sleeping_pokemon.0"),V("dialog.sleeping_pokemon.1"),{[V("yes")]:()=>{Ga(Wx),E(!0)},[V("no")]:()=>E(!1)}]):Mt([V("dialog.sleeping_pokemon.0")]).then(()=>E(!1)))}let ge;function ty(){const E=k.activeScene;ge=E.add.group();const A=7,C=50,R=ig(),F=R.pokemons.filter(p=>p.owner===xe).sort((p,a)=>(R.damageDone.get(a.uid)??0)-(R.damageDone.get(p.uid)??0)),B=R.pokemons.filter(p=>p.owner!==xe).sort((p,a)=>(R.damageDone.get(p.uid)??0)-(R.damageDone.get(a.uid)??0)),v=Math.max(...R.damageDone.values()),y=Math.max(...R.damageReceived.values()),t=Math.max(v,y,100);for(let p=0;p<6;p++)h(F[p],C,A+132+5+p*22,!0);for(let p=0;p<6;p++)h(B[p],C,A+5+p*22,!1);function h(p,a,n,r){if(!p)return;const e=r?a:a+220-64,s=n-(p.entry.portraitCropY??16)+1,o=E.add.graphics().setDepth(ft.MENU_LAYOUT);o.fillStyle(15262161).lineStyle(1,5131078).fillRect(e,n,64,22).strokeRect(e,n,64,22),ge==null||ge.add(o);const i=E.add.sprite(e,s,"pokemon_portraits");i.setOrigin(0,0),i.setCrop(0,p.entry.portraitCropY??16,64,21),i.play(p.entry.ref+"_portrait"),i.setDepth(ft.MENU_OBJECTS),r&&(i.flipX=!0),ge==null||ge.add(i);const l=130,u=R.damageDone.get(p.uid)??0,f=r?a+64:a+220-65,d=E.add.graphics();d.setDepth(ft.MENU_OBJECTS).setScrollFactor(0),ge==null||ge.add(d);const c={color:"white",stroke:"black",strokeThickness:2},m=l*u/t;d.fillStyle(16711680).lineStyle(1,5131078).fillRect(r?f:f-m+1,n+6,m,10).strokeRect(r?f:f-m+1,n+6,m,10);const g=gt(r?f+m+2:f-m-2,n+11,u.toFixed(0),c).setOrigin(r?0:1,.5).setDepth(ft.MENU_TOOLTIPS);ge==null||ge.add(g)}ge.setDepth(ft.MENU),c1(E,ge,500)}function ey(){if(!ge)return;const E=k.activeScene;v1(E,ge,500).then(()=>{ge&&(ge.destroy(!0),ge=null)})}var Se=(E=>(E.CREATION="CREATION",E.PLACEMENT="PLACEMENT",E.CAPTURE="CAPTURE",E.LAUNCH="LAUNCH",E.FIGHT="FIGHT",E.ENDED="ENDED",E))(Se||{});class iy{constructor(){ut(this,"day");ut(this,"currentDestination");ut(this,"currentRoomIndex");ut(this,"roomOrder");ut(this,"players");ut(this,"board");ut(this,"stage");ut(this,"fightTime");ut(this,"fightTimer");ut(this,"fightClock");ut(this,"activeScene");ut(this,"activeMenu");ut(this,"activeDialog");ut(this,"starters");ut(this,"music");ut(this,"dialogStates");ut(this,"seed");ut(this,"lastCaptureDestination");ut(this,"lastTourMam");ut(this,"pension");ut(this,"pokedexSeen");ut(this,"pokedexCaptured");ut(this,"wokeUpRonflex");this.activeScene=null,this.reset(),window.gameState=this}reset(){this.day=0,this.currentDestination=Kn,this.currentRoomIndex=0;const A=new wo(1),C=new wo(2);this.players=[A,C],this.board=cd(A),this.stage="CREATION",this.activeMenu=null,this.activeDialog=null,this.starters=s1(),this.pension=[],this.dialogStates={},this.seed=Ce(1,4**10),this.lastCaptureDestination=null,this.lastTourMam=0,this.pokedexCaptured=new Set,this.pokedexSeen=new Set,this.wokeUpRonflex=!1}get player(){return this.players[0]}get currentRoom(){const A=this.roomOrder[this.currentRoomIndex];return this.currentDestination.rooms[A]}get allPokemonsOnBoard(){return[...k.board.playerTeam,...k.board.otherTeam]}hasBadge(A){return k.player.badges.includes(A.ref)}receiveBadge(A){k.player.badges.includes(A.ref)||k.player.badges.push(A.ref)}initGame(A){!A||!Zg()?(k.reset(),this.pension=bx(),Ga(Kn)):this.activeScene.scene.start("MapScene")}goToNextRoom(){const A=this.roomOrder;this.currentRoomIndex++,this.currentRoomIndex>=A.length?k.exitDestination():k.initRoom()}exitDestination(){k.currentDestination.onExit&&k.currentDestination.onExit(),Ru.has(k.currentDestination)&&(k.currentDestination=Ru.get(k.currentDestination),k.lastCaptureDestination!=null&&(k.lastCaptureDestination=k.currentDestination)),this.nextDay(),k.activeScene.scene.start("MapScene")}nextDay(){k.day++,Jg(),g1()}initRoom(){cf(),k.currentRoom.type===st.FREEWALK?k.activeScene.scene.start("RoomScene"):k.activeScene.scene.start("GameScene")}initFight(A){this.stage="LAUNCH",Le(),Ax(A),k.board.xpEarned=Ox(),sg(),fg(),A.time.addEvent({delay:900,callback:()=>{A.hideCenterText();for(const C of this.board.playerTeam)zo(C,A);if(k.currentRoom.type===st.ARENA)for(const C of this.board.otherTeam)zo(C,A)}}),A.time.addEvent({delay:2600,callback:()=>{this.stage="FIGHT",this.fightTimer=A.time.addEvent({delay:A.gameSpeed,callback:this.loopFight,callbackScope:this,loop:!0}),this.fightTime=0,this.fightClock=A.time.addEvent({delay:1e3,callback:this.onClockTick,callbackScope:this,loop:!0})}})}loopFight(){const A=k.activeScene;this.stage==="FIGHT"&&(k.allPokemonsOnBoard.forEach(C=>{hg(C,A),q0(C,A)}),l0(A),e1())}async endFight(A){const C=k.activeScene,R=k.currentRoom;this.stage="ENDED",eg(),C.time.removeEvent(this.fightTimer),C.time.removeEvent(this.fightClock);const F=C.sprites.get("player"),B=A!==1;B?(F==null||F.play("trainer_victory"),Zr("text_victoire",C),R.type===st.WILD?Fe("music_victory_wild"):Fo.includes(R.trainer)?Fe("music_victory_champion"):Fe("music_victory_trainer")):(F==null||F.play("trainer_defeat"),Zr("text_defaite",C)),gx(),r1(),Et(750).then(()=>{ng(),ty()});let v=(k.board.xpEarned||0)/k.player.team.length;v=Math.max(1,Math.ceil(v));const y=[];if(B?(R.type===st.ARENA&&R.trainer&&y.push(V("victory",{trainer:V(`trainer.${R.trainer.ref}`)})),y.push(V("victory_xp",{xp:Math.round(v/10)}))):R.type!==st.TUTORIAL&&y.push(V("defeat.0"),V("defeat.1")),k.player.team.forEach(t=>t.resetAfterFight()),await Mt(y),B)for(const t of k.player.team)await Mf(t,v);if(ey(),[st.ARENA,st.TUTORIAL].includes(k.currentRoom.type)){const t=k.currentRoom;if(await Mt(B?t.trainer.dialogs.victory:t.trainer.dialogs.defeat,{speaker:t.trainer.ref}),k.currentRoom.type===st.ARENA){let h=1;B&&(Fo.includes(t.trainer)?h=3:Jf.includes(t.trainer)?h=0:h=2),h>0&&await Ye(We,h,!1,"trainer")}}k.afterEnd(B)}endCapture(){const A=k.activeScene;this.stage="ENDED",A.time.removeEvent(this.fightTimer),A.time.removeEvent(this.fightClock);const C=A.sprites.get("player");return C==null||C.play("trainer_victory"),sd(),Et(100).then(()=>{if(k.currentRoom.type===st.TUTORIAL){const R=k.currentRoom;let F=R.trainer.dialogs.victory;return k.dialogStates.assistant_tuto===zn.AFTER_WILD&&(F=R.trainer.dialogs.step3),Mt(F,{speaker:R.trainer.ref})}}).then(()=>{k.afterEnd(!0)})}afterEnd(A){if(k.currentRoom.type===st.TUTORIAL&&k.dialogStates.assistant_tuto===zn.BEFORE_WILD){const C=k.currentRoom;Mt(C.trainer.dialogs.step2,{speaker:C.trainer.ref})}else(k.currentRoom.beforeExit||(()=>Promise.resolve()))().then(()=>Bi(400)).then(()=>{A?k.goToNextRoom():k.exitDestination()})}onClockTick(){this.fightTime++,this.fightTime>=30&&this.fightTime%10===0&&mg(),k.allPokemonsOnBoard.forEach(A=>{A.buffs.clock.forEach(C=>C())})}registerPokemonsSeen(A){A.map(C=>C.entry.ref).forEach(C=>this.pokedexSeen.add(C))}registerPokemonCaptured(A){this.pokedexCaptured.add(A.entry.ref)}}const k=new iy;class sy extends Vs{constructor(){super("GameOverScene");ut(this,"canInteract",!1)}preload(){Bs(this),bi(this),Nt("music_ending","assets/audio/music/30 Ending.mp3")}create(){k.activeScene=this,nr(this),this.displayEndScreen(),Fe("music_ending")}onPressStart(){this.handleClick()}onPressA(){this.handleClick()}onClick(){this.handleClick()}handleClick(){this.canInteract&&Bi(2e3).then(()=>this.scene.start("MenuScene"))}async displayEndScreen(){k.player.team.forEach((C,R)=>{Et(3e3*R).then(()=>this.displayEndScreenPokemonInfo(C))}),await Et(18e3),this.displayPlayerResume(),await Et(1e4),this.canInteract=!0}displayEndScreenPokemonInfo(C){const R=this.add.group(),F=game.scale.height+80,B=game.scale.width/2,v=this.add.nineslice(B,F,"box1",void 0,280,84,8,8,8,8).setOrigin(.5,.5).setScrollFactor(0);R.add(v);const y=gt(B-50,F-28,`${V(`pokemon.${C.entry.ref}`)} Lv${C.level}`);R.add(y);const t=this.add.sprite(B-92,F-1,"pokemon_portraits");t.play(`${C.entry.ref}_portrait`),t.setScrollFactor(0),R.add(t);for(let h=0;h{E.load.audio(Sa(A),[`assets/audio/sounds/cries/${sf(A)}.ogg`])})}class ay extends Vs{preload(){k.activeScene=this;const A=gt(game.scale.width/2,game.scale.height-8,"CHARGEMENT...",{align:"center"});A.setOrigin(.5).setDepth(3);const C=this.add.graphics().fillStyle(6977852),R=this.add.graphics().fillStyle(9869705);R.fillRect(0,game.scale.height-16,game.scale.width,16),this.load.on("progress",F=>{A.setText(Math.round(F*100)+"%"),C.fillRect(0,game.scale.height-16,game.scale.width*F,16),C.setDepth(2)}),this.load.on("complete",()=>{C.destroy(),R.destroy(),this.scene.start("MenuScene")}),ny(this),Bs(this),bi(this),Oa(this)}}let ue=null;const oy={[Ct.ARENA]:"#006699",[Ct.WILD]:"#669900",[Ct.SPECIAL]:"#996600"};function xo(E,A){ue==null||ue.destroy(!0);const C=32;ue=A.add.container(A.scale.width-8,A.scale.height-6);const R=oy[E.type],F=gt(-4,2,E.name).setOrigin(1,0).setDepth(ft.MENU_TOOLTIPS),B=gt(-6-E.icons.length*16,16,Gx(E),{color:R}).setOrigin(1,0).setDepth(ft.MENU_TOOLTIPS),v=Math.max(F.width,B.width+E.icons.length*16)+12,y=A.add.nineslice(-v,0,"box2",void 0,v,C,4,4,4,4).setOrigin(0,0).setDepth(ft.MENU_LAYOUT);ue==null||ue.add(y),ue==null||ue.add(B),ue==null||ue.add(F),E.icons.forEach((t,h)=>{const p=A.add.sprite(-12-h*16,22,"gui",0);p.play(t).setDepth(ft.MENU_OBJECTS),ue==null||ue.add(p)}),A.tweens.add({targets:[ue],y:"-=34",duration:200})}function Ou(E){ue&&E.tweens.add({targets:[ue],y:"+=40",delay:100,duration:100,onComplete(){ue==null||ue.destroy(!0),ue=null}})}function ly(){const E=k.activeScene,A=E.add.nineslice(E.scale.width/2,-32,"box2",void 0,160,0,4);A.setOrigin(.5,.5);const C=gt(E.scale.width/2,-30,`Tour ${k.day}`,{color:"#000"});C.setOrigin(.5,.5),C.setScrollFactor(0),A.setSize(C.width+24,C.height+12),A.setScrollFactor(0),A.setDepth(ft.MENU_TOOLTIPS),C.setDepth(ft.MENU_TOOLTIPS+1),E.add.tween({targets:[A,C],duration:400,y:"+=38",ease:"Linear"}),E.add.tween({targets:[A,C],duration:400,y:-36,ease:"Linear",delay:2e3})}function hy(E){let A=0;for(const C of E){const[R,F]=C;A+=Math.abs(R)+Math.abs(F)}return A}class uy extends Vs{constructor(){super("MapScene");ut(this,"gameSpeed",100);ut(this,"player");ut(this,"isMoving",!1);ut(this,"origin");ut(this,"originZone");ut(this,"availableDestinations");ut(this,"destinationSelected");ut(this,"destinationReached");ut(this,"intersectionReached");ut(this,"destinationsHighLightGroup");ut(this,"directions");ut(this,"directionsGroup");ut(this,"destinationPanelTween");this.sprites=new Map,this.graphics=new Map,this.availableDestinations=[],this.intersectionReached=null,this.destinationSelected=null,this.destinationsHighLightGroup=null,this.directionsGroup=null,this.origin=k.currentDestination,this.destinationReached=this.origin,this.originZone=null,this.destinationPanelTween=null,this.isMoving=!1,this.directions=Eh()}preload(){Bs(this),bi(this),Oa(this)}create(){k.activeScene=this,this.origin=k.currentDestination,this.intersectionReached=null,this.destinationReached=this.origin,this.destinationsHighLightGroup=this.add.group(),this.directionsGroup=this.add.group(),nr(this),Ra(this.anims),this.drawMap(),this.drawMapObjects(),this.drawBadges(),this.updateDestinations(),this.updateDirections(this.origin.nextDestinations),xo(this.origin,this),ly(),ud(),Fe("music_overworld"),pf(250)}update(){var C,R;if(this.isMoving)this.updatePlayerPosition();else{Ma(this);const{moveVector:F}=kl(this);if(F.length()>1){const B=Hl(F);if(B!=null&&this.directions[B]!=null){const y=(((C=this.intersectionReached)==null?void 0:C.nextDestinations)??((R=this.destinationReached)==null?void 0:R.nextDestinations)??this.origin.nextDestinations)[this.directions[B]];if(y!=null){const t=this.intersectionReached||this.destinationReached||this.origin;this.walkPath(y,t.coordinates)}}}}}onPressA(){if(k.activeMenu!=null)return ar();if(k.activeDialog)return ur();!this.isMoving&&this.destinationReached!=null&&(!this.destinationSelected||this.destinationSelected===this.destinationReached)&&Ga(this.destinationReached)}onPressStart(){}onClick(){Yo(this)}changeOrigin(C){var R;this.origin=C,(R=this.player)==null||R.setPosition(C.coordinates[0],C.coordinates[1]),this.destinationReached=C,this.updateDestinations(),this.updateDirections(this.origin.nextDestinations)}debugIntersections(){const C=this.add.graphics().fillStyle(16711680,.5);this.originZone&&C.fillRect(this.originZone.x-8,this.originZone.y-8,this.originZone.width,this.originZone.height),Lu.forEach(R=>{C.fillCircle(R.coordinates[0],R.coordinates[1],8).setDepth(9999)})}updatePlayerPosition(){var y,t;if(this.player==null)return;const{x:C,y:R}=this.player,F=Lu.find(h=>new Phaser.Geom.Circle(h.coordinates[0],h.coordinates[1],8).contains(C,R));if(F!=null&&!this.intersectionReached&&!this.destinationSelected)return this.destinationReached=null,this.intersectionReached=F,Et(200).then(()=>{var p,a;(p=this.player)==null||p.play("player_idle"),(a=this.player)==null||a.setPosition(F.coordinates[0],F.coordinates[1]),this.isMoving=!1}),(F.onReach||(()=>Promise.resolve(!0)))().then(p=>{p?Et(250).then(()=>{this.updateDirections(F.nextDestinations)}):this.walkPath(F.nextDestinations[this.origin.ref],F.coordinates)});const v=((y=this.originZone)==null?void 0:y.getBounds().contains(C,R+5))?this.origin:((t=this.availableDestinations.map(h=>this.sprites.get(`${h.ref}_highlight`)).find(h=>h==null?void 0:h.getBounds().contains(C,R+5)))==null?void 0:t.getData("destination"))??null;this.destinationReached!==v&&(v==null&&this.destinationReached!=null?Ou(this):v!=null&&(xo(v,this),(!this.destinationSelected||this.destinationSelected===v)&&Et(350).then(()=>{this.updateDirections(v.nextDestinations)})),this.destinationReached=v)}drawMap(){const C=this.make.tilemap({key:"overworld"}),R=C.addTilesetImage("overworld","overworld");R&&(C.createLayer("ground0",R),C.createLayer("ground1",R),C.createLayer("ground2",R),C.createLayer("top0",R))}drawMapObjects(){const[C,R]=k.currentDestination.coordinates;if(this.player=this.add.sprite(C,R,"characters"),this.player.play("player_idle").setDepth(ft.PLAYER),this.sprites.set("player",this.player),!k.hasBadge(ir)){const y=this.add.sprite(216,8,"map").play("cascade");this.sprites.set("cascade",y)}const[F,B]=this.getBoatCoordinates(),v=this.add.sprite(F*16-8,B*16-8,"map").play("boat");if(this.sprites.set("boat",v),!k.wokeUpRonflex){const y=this.add.sprite(136,72,"map").play("ronflex");this.sprites.set("ronflex",y)}}drawBadges(){const C=Co.length;Co.forEach((R,F)=>{const B=48+F%(C/2)*17,v=12+Math.floor(F/(C/2))*17,y=R.frameIndex+(k.hasBadge(R)?0:16),t=this.add.sprite(B,v,"icons16x16").setFrame(y);this.sprites.set(R.ref,t)})}updateDestinations(){var R;(R=this.destinationsHighLightGroup)==null||R.clear(!1,!0);const C=Object.keys(this.origin.nextDestinations).find(F=>!(F in en));if(C)return console.error(`DESTINATION NOT DECLARED: ${C}`);this.availableDestinations=Object.keys(this.origin.nextDestinations).map(F=>en[F]).filter(F=>!F.locked||!F.locked()).concat(this.origin);for(const F of this.availableDestinations){const[B,v]=F.coordinates,y=this.add.sprite(B,v,"map").play("highlight").setDepth(ft.MAP_HIGHLIGHT).setAlpha(.75).setTint(qx[F.type]??16777215);y.setData("destination",F),this.sprites.set(`${F.ref}_highlight`,y),this.registerDestination(F,y),F.preload&&(F.preloading=!0,F.preload(this),this.load.start(),this.load.on("complete",()=>{console.log(`finished preloading destination ${F.ref}`),F.preloading=!1}))}}registerDestination(C,R){var F;pe(R),(F=this.destinationsHighLightGroup)==null||F.add(R),R.on("over",()=>{xo(C,this)}),R.on("out",()=>{Ou(this)}),R.on("click",()=>{if(this.isMoving||this.destinationReached===C)return;this.destinationSelected=C;const B=this.destinationReached||this.intersectionReached||this.origin;if(C.ref in B.nextDestinations){const v=B.nextDestinations[C.ref];this.walkPath(v,B.coordinates)}else if(this.origin.ref in B.nextDestinations){const v=B.nextDestinations[this.origin.ref],y=this.origin.nextDestinations[C.ref];this.walkPath([...v,...y],B.coordinates)}})}updateDirections(C){var R;(R=this.directionsGroup)==null||R.clear(!1,!0),this.directions=Eh(),Object.entries(C).forEach(([F,B])=>{if(this.destinationReached!=null&&this.destinationReached!==this.origin&&F!==this.origin.ref)return;const v=Ca(...B[0]),y=en[F];v!=null&&(!y.locked||!y.locked())&&(this.directions[v]=F)}),Object.entries(this.directions).forEach(([F,B])=>{var h;if(B==null||!this.player)return;const[v,y]=sr(F),t=this.add.sprite(this.player.x+v*12,this.player.y+y*12,"map",20).play("map_direction_arrow");t.setDepth(ft.MENU_OBJECTS).setRotation(Wl(F)),(h=this.directionsGroup)==null||h.add(t),this.tweens.add({targets:[t],duration:300,ease:Phaser.Math.Easing.Sine,x:`+=${v*4}`,y:`+=${y*4}`,yoyo:!0,repeat:-1})})}walkPath(C,R){var y;if(!this.player)return;let B=R[0],v=R[1];this.player.setPosition(B,v),this.isMoving=!0,(y=this.directionsGroup)==null||y.clear(!1,!0),C.reduce(async(t,h)=>{var r,e,s,o;if(await t,this.intersectionReached&&!_m(this.intersectionReached.coordinates,R))return Promise.reject("STOP");const[p,a]=h,n=hy([h])*1e3/2.5;return B+=p*16,v+=a*16,this.tweens.add({targets:[this.player],t:1,duration:n,x:`+=${p*16}`,y:`+=${a*16}`}),a>=1?(r=this.player)==null||r.play("player_down",!0):a<=-1?(e=this.player)==null||e.play("player_up",!0):p>=1?(s=this.player)==null||s.play("player_right",!0):p<=-1&&((o=this.player)==null||o.play("player_left",!0)),await Et(n)},Promise.resolve()).then(()=>{var t;this.intersectionReached=null,this.destinationSelected=null,Et(200).then(()=>{this.isMoving=!1}),(t=this.player)==null||t.play("player_idle"),this.updatePlayerPosition()}).catch(t=>{if(t!=="STOP")throw t})}getBoatCoordinates(){return[Kn,ah,Rd,rh,Pd,lh,Ls].includes(k.currentDestination)?[4,19]:[ch,nh,sh,Ad,Ld,oh,Os].includes(k.currentDestination)?[18,1]:[12,11]}}class fy extends Vs{constructor(){super("MenuScene");ut(this,"isIntroAnim",!0)}preload(){Bs(this),bi(this)}create(){k.activeScene=this,rf(this.anims),nr(this),Fe("music_opening"),this.isIntroAnim=!0,this.swipe("salameche",100,"left",120),this.swipe("bulbizarre",800,"right",240),this.swipe("carapuce",1500,"left",140),this.swipe("pikachu",2200,"right",260),this.swipe("minidraco",2900,"left",100),this.swipe("fantominus",3600,"right",220),this.swipeDiag("miaouss",4300,"top-left",1e3),this.swipeDiag("machoc",4800,"bottom-left",1e3),this.swipeDiag("roucool",5300,"bottom-right",1e3),this.swipeDiag("melofee",5800,"top-right",1e3),this.swipe("chenipan",6700,"left",60),this.swipe("racaillou",6700,"right",260),this.swipe("otaria",7400,"left",100),this.swipe("sabelette",7400,"right",220),this.swipe("nidoranm",8100,"left",140),this.swipe("abra",8100,"right",180),this.finalPose(7700)}onPressStart(){this.handleClick()}onPressA(){k.activeMenu!=null?ar():this.handleClick()}onPressB(){}onClick(){this.handleClick()}handleClick(){this.isIntroAnim&&this.skipIntro()}update(){Ma(this)}drawMenu(){const C=[{label:V("new_game"),x:16,y:0,value:"newgame"}];jg()&&(C[0].y=20,C.unshift({label:V("continue"),x:16,y:0,value:"continue"})),Gs({ref:"main_menu",x:100,y:260,width:120,height:44,background:"box2",offset:16,entries:C,handleChoice(R){R.value==="newgame"?k.initGame(!1):R.value==="continue"&&k.initGame(!0)}})}swipe(C,R,F,B){const v=F==="left"?350:-30,y=this.add.sprite(v,B,"pokemon_portraits").play(`${C}_portrait`);this.tweens.add({targets:[y],delay:R,duration:500,ease:"Linear",x:F==="left"?-30:350})}swipeDiag(C,R,F,B=1e3){const v=F==="top-left"||F==="bottom-left"?350:-30,y=F==="top-left"||F==="top-right"?350:-30,t=this.add.sprite(v,y,"pokemon_portraits").play(`${C}_portrait`);this.tweens.add({targets:[t],duration:B,delay:R,ease:"Linear",x:F==="top-left"||F==="bottom-left"?-30:350,y:F==="top-left"||F==="top-right"?-30:350})}skipIntro(){cf(),this.tweens.tweens.forEach(C=>{C.targets.forEach(R=>{C.stop(),R instanceof Phaser.GameObjects.GameObject&&R.destroy()})}),this.finalPose(0,!0)}finalPose(C,R=!1){const F=this.add.sprite(this.scale.width/2,-100,"logo");this.sprites.set("logo",F);const B=this.add.sprite(this.scale.width/2+17,399,"trainer").setFrame(7),v=this.add.sprite(this.scale.width/2-128,396,"pokemon_portraits").play("minidraco_portrait"),y=this.add.sprite(this.scale.width/2-115,408,"pokemon_portraits").play("nidoranm_portrait"),t=this.add.sprite(this.scale.width/2+74,400,"pokemon_portraits").play("abra_portrait"),h=this.add.sprite(this.scale.width/2+50,397,"pokemon_portraits").play("roucool_portrait"),p=this.add.sprite(this.scale.width/2-74,397,"pokemon_portraits").play("melofee_portrait"),a=this.add.sprite(this.scale.width/2-98,422,"pokemon_portraits").play("otaria_portrait"),n=this.add.sprite(this.scale.width/2-23,404,"pokemon_portraits").play("pikachu_portrait"),r=this.add.sprite(this.scale.width/2-8,430,"pokemon_portraits").play("salameche_portrait"),e=this.add.sprite(this.scale.width/2+48,426,"pokemon_portraits").play("bulbizarre_portrait"),s=this.add.sprite(this.scale.width/2+114,402,"pokemon_portraits").play("fantominus_portrait"),o=this.add.sprite(this.scale.width/2-45,412,"pokemon_portraits").play("sabelette_portrait"),i=this.add.sprite(this.scale.width/2-70,425,"pokemon_portraits").play("carapuce_portrait"),l=this.add.sprite(this.scale.width/2+142,408,"pokemon_portraits").play("machoc_portrait"),u=this.add.sprite(this.scale.width/2+82,423,"pokemon_portraits").play("miaouss_portrait"),f=this.add.sprite(this.scale.width/2+120,429,"pokemon_portraits").play("racaillou_portrait"),d=this.add.sprite(this.scale.width/2-138,423,"pokemon_portraits").play("chenipan_portrait");this.tweens.add({targets:[F],y:100,duration:R?0:2e3,delay:R?0:C+2e3,ease:Phaser.Math.Easing.Bounce.Out}),this.tweens.add({targets:[B,r,n,e,i,s,d,y,v,p,h,l,f,a,o,u,t],y:"-=200",duration:R?0:2500,delay:C,ease:"Linear"}),Et(R?0:C+4e3).then(()=>{this.isIntroAnim=!1,Fe("music_overworld"),this.drawMenu()})}}class dy extends At.Game{constructor(C){super(C);ut(this,"state");this.state=k,document.getElementById("infos").innerHTML=` +{{nbSeen}} Pokémon observés`,4:"Equipe de prédilection:",5:"Bzzz.. L'écran s'est éteint..."},tv:{0:"La TV diffuse les actualités du jour...",1:"FLASH SPECIAL !",2:"On aurait aperçu un Electhor à la centrale !",3:"Un Artikodin a été vu aux Îles Ecume !",4:"Le Mont Braise serait le repère d'un Sulfura !",5:"Nos journalistes tâchent d'en savoir plus."}},tm={ARGENTA:"Argenta",ARGENTA_ARENA:"Arène d'Argenta",ARGENTA_SHOP:"Magasin d'Argenta",AZURIA:"Azuria",AZURIA_ARENA:"Arène d'Azuria",AZURIA_SHOP:"Magasin d'Azuria",BOURG_PALETTE:"Bourg Palette",BOURG_PALETTE_ROAD:"Route de Bourg Palette",CAMP_NOMADE:"Camp Nomade",CAMP_NOMADE_ARENA:"Arène sauvage",CARMIN:"Carmin sur mer",CARMIN_ARENA:"Arène de Carmin s.mer",CARMIN_SHOP:"Magasin de Carmin s.mer",CAVE_TAUPIQUEUR:"Grotte Taupiqueur",CAVE_TAUPIQUEUR_EAST:"Grotte Taupiqueur (Entrée Est)",CAVE_TAUPIQUEUR_WEST:"Grotte Taupiqueur (Entrée Ouest)",CELADOPOLE:"Céladopole",CELADOPOLE_ARENA:"Arène de Céladopole",CELADOPOLE_SHOP:"Magasin de Céladopole",CENTRALE:"Centrale électrique",CHAMPS_VERDOYANTS:"Champs verdoyants",CHEMIN_COLLINE:"Chemin vers la Colline",COLLINE_ROYALE:"Colline des Rois",COL_MONTAGNE:"Col de Montagne",CRAMOISILE:"Cramois'Île",CRAMOISILE_ARENA:"Arène de Cramois'Île",CRAMOISILE_SHOP:"Magasin de Cramois'Île",DOJO:"Dojo",FALAISES:"Falaises",FORET_JADE:"Forêt de Jade",GROTTE_AZUREE:"Grotte Azurée",HOME:"Chez Maman",ILES_ECUME:"Îles Écume",JADIELLE:"Jadielle",JADIELLE_ARENA:"Arène de Jadielle",JADIELLE_SHOP:"Magasin de Jadielle",LABO_CHEN:"Labo du Prof. Chen",LAVANVILLE:"Lavanville",LAVANVILLE_ARENA:"Arène de Lavanville",LAVANVILLE_SHOP:"Maison Pokémon de Lavanville",LIGUE:"Ligue Indigo",LIGUE_FLOOR1:"Ligue Indigo - 1er étage",LIGUE_FLOOR2:"Ligue Indigo - 2ème étage",LIGUE_FLOOR3:"Ligue Indigo - 3ème étage",LIGUE_FLOOR4:"Ligue Indigo - 4ème étage",LIGUE_FLOOR5:"Ligue Indigo - Dernier étage",LIGUE_HALL:"Hall de la Ligue",MAISON_PSY:"Maison de Mr Psy",MONT_BRAISE:"Mont Braise",MONT_SELENITE:"Mont Sélénite",OCEANE:"L'Océane",OCEANE_DECK:"Sur l'Océane",PARC_SAFARI:"Parc Safari",PARMANIE:"Parmanie",PARMANIE_ARENA:"Arène de Parmanie",PARMANIE_SHOP:"Magasin de Parmanie",PENSION:"Pension Pokémon",PISTE_CYCLABLE:"Piste cyclable",ROUTE_VICTOIRE:"Route Victoire",ROUTE_VICTOIRE_ENTREE:"Route Victoire (Entrée)",ROUTE_VICTOIRE_SORTIE:"Route Victoire (Sortie)",SAFRANIA:"Safrania",SAFRANIA_ARENA:"Arène de Safrania",SAFRANIA_SHOP:"Magasin de Safrania",TOUR_POKEMON:"Tour Pokémon"},em={ARENA:"Arène",BOURG_PALETTE:"Maman",CAPTURE:"Capture",CONSEIL_DES_4:"Conseil des 4",FIGHT:"Combat",SAFARI:"Capture à gogo",fast_travel:"Voyage rapide",fast_travel_AZURIA:"Voyage rapide vers Azuria",fast_travel_CARMIN:"Voyage rapide vers Carmin",fast_travel_CRAMOISILE:"Voyage rapide vers Cramois'Île"},im=JSON.parse(`{"aftercapture":{"0":"Le {{name}} sauvage partage son expérience avant d'être relaché.","1":"Votre {{name}} gagne {{xp}} XP"},"agatha":{"defeat":{"0":"Tu as du talent, mais c'est insuffisant !"},"start":{"0":"Gnnn... Bonjour mon tout petit.","1":"Je suis Agatha du Conseil des 4 !","2":"Chen mise de grands espoirs sur toi, fiston !","3":"Sais-tu que ce vieux machin était jadis un beau garçon ?","4":"Enfin... Il y a très longtemps !","5":"Il veut juste frimer avec son Pokédex !","6":"Mais c'est débile ! Les Pokémon servent à combattre !","7":"Je vais te montrer comment les grands Dresseurs combattent !"},"victory":{"0":"Mmmm... Je vois pourquoi le vieux Chen t'apprécie autant !","1":"Mes ombres ont perdu. Tu peux passer."}},"aldo":{"defeat":{"0":"Vlan ! Dans les dents !"},"start":{"0":"Mon nom est Aldo du Conseil des 4 !","1":"Ma passion à moi et à mes Pokémon, c'est la muscu !","2":"Pour frimer sur la plage ou pour boxer les nabots,","3":"rien de tel qu'un corps de rêve !","4":"Ton équipe... J'vais en faire du yaourt ! A table !"},"victory":{"0":"Bien joué, p'tit ! La prochaine t'attend !"}},"assistant1":{"0":"Je pose la racine carrée, je retiens cinq...","1":" \\"Hmm ? C'est pour quoi ?\\"","q1":"Qui êtes-vous ?","q2":"Où suis-je ?","q3":"Que faites-vous ?","r1":"\\"J'assiste le PROF. CHEN. Je suis donc son... ASSISTANT !\\",","r2":"Tu te trouves au labo Pokémon de Bourg Palette.","r3":"Nous étudions ici les différentes espèces de Pokémon de Kanto.","r4":"Je regroupe les dernières données recueillies par les dresseurs comme toi.","r5":"En étudiant vos combats, nous recueillons des informations sur les Pokémon.","r6":"Ces informations sont ensuite regroupées dans le Pokédex.","r7":"C'est utile pour nos recherches, mais aussi pour vos stratégies de combat."},"assistant2":{"0":"Cette machine garde en mémoire les équipes de Pokémon qui se sont illustrées","1":"en battant le Conseil des 4 de la Ligue Pokémon.","2":"Analyser les meilleures équipes nous permet d'en apprendre un maximum !","3":"Si tu parviens à battre la ligue, nous ajouterons avec plaisir ton équipe."},"assistant_tuto":{"defeat":{"0":"La prochaine fois, sers-toi de mes Pokéballs !","1":"Tu augmenteras nettement tes chances de victoire !"},"start":{"0":"Une minute ! Si tu veux monter une équipe, il te faut des Pokéballs !","1":"Tiens, voilà 5 Pokéballs pour capturer tes premiers Pokémon.","2":"Sais-tu comment on s'en sert ?","no0":"Tu peux capturer un Pokémon sauvage plutôt que de l'affronter.","no1":"Plus le Pokémon est puissant, plus il te faudra de Pokéballs pour le capturer.","no2":"Un Pokémon capturé rejoint ta box, qui peut contenir jusqu'à 8 Pokémon.","no3":"Tu peux ensuite les déplacer de ta box vers le terrain pour qu'ils combattent.","no4":"Vas-y, essaie de capturer ces Pokémon sauvages !","yes0":"Très bien, alors capture ces Pokémon sauvages. Ou mets-les KO, comme tu veux !"},"step2":{"0":"Tes Pokémon deviennnent plus fort en gagnant de l'expérience après un combat.","1":"Mais il existe une autre manière de faire monter en expérience un Pokémon.","2":"Il suffit de capturer un Pokémon sauvage de la même espèce.","3":"Il partagera son expérience avec ton Pokémon avant d'être relâché.","4":"Tiens, essaie tout de suite. Essaie de capturer mon {{name}}."},"step3":{"0":"Plus le niveau du Pokémon capturé est élevé, plus il donnera d'expérience","1":"Rappelle-toi, cela marche uniquement si les Pokémon sont de la même espèce !","2":"Bien, tu sais tout. Bon voyage et bonne chance!"},"victory":{"0":"Bien, tu sembles te débrouiller comme un chef !"}},"auguste":{"defeat":{"0":"Maintenant tu sais de quel bois je me chauffe !"},"start":{"0":"Salutations. Mon nom est... Auguste !","1":"Je suis le Champion de l'Arène de Cramois'Île !","2":"Mes Pokémon flamboyants vont te réduire en cendres !","3":"Haha ! Il va bientôt faire très chaud !"},"victory":{"0":"Vlouff ! Je me suis fait vaporiser !","1":"Tu as gagné le badge Volcan !","2":"Plus tu possèdes de badges, plus les combats sont coriaces !","3":"C'est le prix à payer pour monter jusqu'à la Ligue !"}},"bob":{"defeat":{"0":"Ha ! Une défaite foudroyante !","1":"Un p'tit conseil, gamin ! L'électricité est très puissante !","2":"Mais elle est impuissante face aux Pokémon de la terre !"},"start":{"0":"Hé, gamin ! Tu fais quoi là ?","1":"Tu ne résisterais pas longtemps en temps de guerre !","2":"Je vais te dire, mes Pokémon Électriques m'ont sauvé la vie !","3":"Et ouais ! Ils ont paralysé mes ennemis avec leurs éclairs !","4":"Une vraie boucherie ! Y va t'arriver la même chose !","5":"Compte tes dents ! Tu vas morfler !"},"victory":{"0":"Whoo ! Gard'vous ! T'es un dur, mon p'tit gars !","1":"Très bien, prends le BADGE FOUDRE !","2":"T'en auras besoin pour rentrer dans la Ligue Pokémon."}},"chen":{"0":"Bonjour Red ! Alors c'est aujourd'hui le grand jour !","1":"Le jour de ton voyage initiatique comme dresseur Pokémon !","2":"Tu vas voyager à travers tout Kanto, capturer des Pokémon,","3":"monter une équipe et affronter les 8 champions d'arènes.","4":"Peut-être même te confronter à la ligue Pokémon si tu en es capable !","5":"Mais d'abord, il te faut adopter ton premier Pokémon.","6":"Nous en avons capturé trois dans les pokeballs derrière moi.","7":"Il y en a un pour toi. Allez ! Choisis-en un !","8":"Vas-y, tu peux prendre une des pokéballs sur la table derrière moi.","9":"{{pokemon}} ? Excellent choix !","10":"Ton Pokémon te protégera des Pokémon sauvages.","11":"Mais tout seul il ne sera pas de taille face aux champions d'arène!","12":"Il te faudra capturer des Pokémon sauvages pour composer une équipe.","13":"Chaque espèce de Pokémon a ses forces et faiblesses. N'oublie pas ça:","14":"La clé de la victoire est une équipe équilibrée et bien positionnée.","15":"Tu devrais te rendre dans une ville voisine pour capturer d'autres Pokémon.","16":"Bon voyage et bonne chance !","17":"Vas-y, enregistre ton équipe sur l'ordinateur pour la postérité !","18":"Hum-hum! Félicitations !","19":"Cet étage est réservé aux célébrités Pokémon !","20":"Les Champions de la Ligue sont consacrés ici !","21":"Leurs Pokémon sont enregistrés en tant que Célébrités !","22":"Long fut ton périple jusqu'à la victoire ! Encore bravo."},"dresseur_argenta":{"defeat":{"0":"Alors, on a un coup de calcaire ?"},"start":{"0":"Tu as vaincu Pierre, mais moi je suis solide comme un roc !"},"victory":{"0":"Je crois que j'ai un caillou dans ma chaussure..."}},"dresseur_azuria":{"defeat":{"0":"Alors, ta stratégie a pris l'eau ?"},"start":{"0":"De l'eau a coulé sous les ponts depuis ta victoire contre Ondine.","1":"Je suis plus fraîche que jamais ! Attends-toi à un raz de marée !"},"victory":{"0":"Gloups, j'ai bu la tasse !"}},"dresseur_camp_nomade":{"defeat":{"0":"Alors, tu as des fourmis dans les jambes ?"},"start":{"0":"Minute Papillon !","1":"Je vais te montrer ma collection d'insectes !","2":"Attends-toi à un combat pas piqué des hannetons !"},"victory":{"0":"Aïe ! Je me suis fait piquer par un moustique !"}},"dresseur_carmin":{"defeat":{"0":"Ça c'est du rock !!!"},"start":{"0":"Hey t'es venu pour mon concert ? L'ambiance est électrique ici !","1":"Comment ça, non ? T'as jamais écouté mon CD ?!","2":"Je vais pas te laisser gâcher la fête !"},"victory":{"0":"Ça y est t'as ruiné l'ambiance !"}},"dresseur_cave_taupiqueur":{"defeat":{"0":"Ça t'apprendra à venir fouiner dans les coins sombres !"},"start":{"0":"Hein ? Non, c'est pas moi !","1":"J'ai un alibi ! J'étais au cinéma !"},"victory":{"0":"Pas la peine de s'énerver ! Tiens, prends ces Pokéballs !","1":"Et... on dit que tu ne m'as jamais vu, OK ?"}},"dresseur_celadopole":{"defeat":{"0":"Finalement je n'ai plus trop envie qu'on traîne ensemble, hi hi !"},"start":{"0":"Je t'ai déjà croisé en ville, non ?","1":"Je peux te faire entrer dans les clubs de dresseurs les plus chics ici !","2":"Mais tu dois d'abord prouver que tu le mérites ! À l'attaque !"},"victory":{"0":"Mais euh ! Tu étais censé me laisser gagner !","1":"Vous autres provinciaux n'avez aucun savoir vivre !"}},"dresseur_centrale":{"defeat":{"0":"C'était une victoire éclair !"},"start":{"0":"Hé, t'as pété les plombs ?","1":"C'est pas un endroit pour les enfants ici !","2":"Mon équipe de Pokémon va te foudroyer !"},"victory":{"0":"Je me suis pris un sacré coup de jus !"}},"dresseur_champs_verdoyants":{"defeat":{"0":"Je vais te faire une fleur et te donner un conseil:","1":"Même les plus belles roses ont besoin d'épines.","2":"Il te faut une bonne attaque si tu veux gagner."},"start":{"0":"Tiens ? Qui es-tu à arriver comme une fleur ?","1":"C'est mon coin ici ! Je vais t'envoyer sur les roses !"},"victory":{"0":"Mon équipe a été envoyée dans les pâquerettes !","1":"Raaaah tu m'as mis les nerfs à fleur de peau !"}},"dresseur_col_de_montagne":{"defeat":{"0":"Va-t'en à tire-d'aile avant d'y laisser des plumes !"},"start":{"0":"Salut blanc-bec, tu t'es perdu ?","1":"Ne compte pas sur moi pour te prendre sous mon aile !","2":"Moi je cherche plutôt la prise de bec !"},"victory":{"0":"Ouille, j'ai du plomb dans l'aile ! Bisous je m'envole !"}},"dresseur_colline_royale":{"defeat":{"0":"Mes dragons sont si forts ! si terrifiants !","1":"si puissants ! si... ah, il est parti."},"start":{"0":"Tu cherches des Pokémon Dragons ?","1":"Moi aussi ! Moi aussi !","2":"Ils sont si grands ! si beaux ! si majestueux !","3":"Ils sont à moi ! Tu m'entends ? À moi seul !"},"victory":{"0":"La force ancestrale du dragon m'a abandonné !"}},"dresseur_cramoisile":{"defeat":{"0":"Euréka !"},"start":{"0":"Ah, un nouveau sujet d'expérience !","1":"Laisse-moi te montrer le fruit de mes recherches..."},"victory":{"0":"Mes calculs ne sont pas bons !"}},"dresseur_dojo":{"defeat":{"0":"Ton entraînement n'est pas encore suffisant ! Ayaaaaa !"},"start":{"0":"P'tit faiblard ! Je suis le GRAND MAITRE de KARATE !","1":"Tu me provoques ? Tu veux t'battre ?","2":"Tu cherches le contact ? HAHAHA ! Ayaaaaa !"},"victory":{"0":"STOP ! Tu m'as battu ! J'ai honte !","1":"OK, tu as gagné ! Mais ne va pas le crier sur tous les toits !"}},"dresseur_falaises":{"defeat":{"0":"Alors, on est sur la corde raide ?"},"start":{"0":"Salut petit gars ! Je suis le plus grand grimpeur de Kanto !","1":"Et j'ai bien l'intention de me hisser au sommet !","2":"Un combat ? C'est dans mes cordes !"},"victory":{"0":"Bon, j'ai perdu, on va pas en faire toute une montagne !"}},"dresseur_foret_jade":{"defeat":{"0":"Ouaiiiis j'ai gagné pour la première fois !"},"start":{"0":"T'es un dresseur Pokémon ? Moi aussi !","1":"J'ai capturé plein de Pokémon insectes !","2":"Maintenant on doit faire un combat, c'est la règle !"},"victory":{"0":"Je vais le dire à ma mère !"}},"dresseur_grotte_azuree":{"defeat":{"0":"Hmm... Ton équipe s'est fait refroidir.","1":"Que fais-tu encore ici ? Tu attends le dégel ?"},"start":{"0":"Hmmm... Drôle d'endroit pour une rencontre.","1":"Laisse moi briser la glace. En garde !"},"victory":{"0":"Ma défense a fondu comme neige au soleil !"}},"dresseur_iles_ecume":{"defeat":{"0":"Je suis frais comme un gardon !"},"start":{"0":"Fais pas de bruit, tu fais fuir les poissons !"},"victory":{"0":"J'aurais pas de belles prises aujourd'hui..."}},"dresseur_lavanville":{"defeat":{"0":"Allez vous reposer, la nuit porte conseil. Et croyez en vos rêves !"},"start":{"0":"Sally m'a beaucoup parlé de vous.","1":"Me ferez-vous l'honneur d'un combat ?"},"victory":{"0":"C'était un combat magique, je n'aurais pas rêvé mieux."}},"dresseur_mont_braise":{"defeat":{"0":"Tu vois ce que ça fait d'être pris entre deux feux !"},"start":{"0":"Eh bien que fait un jeune garçon dans un endroit pareil ?","1":"Tu n'as pas froid aux yeux, toi !","2":"Hé Ron, si on lui faisait un baptême du feu ?"},"victory":{"0":"Cessez-le-feu ! Viens Ron, on s'en va !"}},"dresseur_mont_selenite":{"defeat":{"0":"Tu ne feras pas de vieux os ici, mieux vaut que tu partes."},"start":{"0":"Je suis à la recherche de fossiles, tu n'en aurais pas vu ?"},"victory":{"0":"Il semblerait que ce soit moi le fossile..."}},"dresseur_oceane":{"defeat":{"0":"J'ai le vent en poupe aujourd'hui !","1":"Allez, les perdants à la cale ! Ha ha, je rigole !"},"start":{"0":"Ahoy, marin d'eau douce !","1":"La traversée va être longue...","2":"Faisons un combat pour passer le temps !","3":"Prêt ? Larguez les amarres !"},"victory":{"0":"Bon, je dois aller souquer les artimuses... Bon vent !"}},"dresseur_parmanie":{"defeat":{"0":"Nous sommes de retour...\`, \`Pour vous jouer un mauvais tour..."},"start":{"0":"Dégage sale morveux !","1":"La Team Rocket mène des opérations secrètes ici !"},"victory":{"0":"La team Rocket s'envole vers d'autres cieux !"}},"dresseur_pension":{"bye":{"0":"Je prendrais soin de tes Pokémon en ton absence !","1":"Reviens quand tu veux !"},"start":{"0":"Tiens, c'est toi ! Tu viens nous confier des Pokémon ?","1":"Ah, te revoilà ! Tes Pokémon ont bien grandi, regarde !","2":"Bienvenue à la Pension !","3":"Ici on prend soin des Pokémon quand leur propriétaire doit s'absenter.","4":"Tu peux nous confier certains de tes Pokémon si tu veux.","5":"Il y a aussi des Pokémon qui ne cherchent qu'à être adoptés !","6":"Leur type est banal alors ils n'intéressent pas les autres dresseurs..."}},"dresseur_piste_cyclable":{"defeat":{"0":"Allez, je mets les gaz, à plus gros naze !"},"start":{"0":"Allez gamin, aboule ton quatre heures ! J'ai faim !","1":"Essaie pas de fuir ! Mate un peu ma bécane !","2":"Tu n'iras pas loin avec ta petite bicyclette !"},"victory":{"0":"Raaah t'as rayé la carroserie ! Vite, au garage !"}},"dresseur_safrania":{"defeat":{"0":"La force brute ne vaut rien contre la puissance de l'intellect !"},"start":{"0":"Tu oses revenir ici ? Tu as perdu l'esprit ?","1":"Nous autres adeptes Psy nous battons à la force du mental !","2":"Ma puissance va te faire tourner la tête !"},"victory":{"0":"Tu m'as donné la migraine !"}},"dresseur_tour_pokemon":{"defeat":{"0":"Ça... ? Ça a marché ?","1":"Les démons ne prennent pas les coups d'habitude..."},"start":{"0":"Arrière, démon !!!"},"victory":{"0":"AaAaaaAaaah !!! Fuyez pour vos vies !!!"}},"erika":{"defeat":{"0":"Perdre fait toujours un peu mal mais...","1":"Combattre un bon adversaire est stimulant... ","2":"Allez, ne reste pas planté là !"},"start":{"0":"Bonjour et sois le bienvenu. Il fait beau, n'est-ce pas?","1":"J'aime la vie. J'aime les fleurs et les chansons. C'est chou, non?","2":"Moi, c'est ERIKA, la Championne de l'arène de Céladopole.","3":"L'arrangement floral est ma spécialité.","4":"Mes Pokémon sont du type plante.","5":"Il fit grand froid hier, alors j'ai mis un pull.","6":"Hein? Tu veux te battre? Bah... Dis-le, mon vieux !","7":"Tu sais quoi? Tu vas perdre!"},"victory":{"0":"Oh! J'ai perdu? Bien joué. C'est mérité.","1":"Je te confie le BADGE PRISME.","2":"Chaque badge obtenu te fait affronter des Pokémon plus forts.","3":"Tu l'avais remarqué ?"}},"evolve":"{{old}} évolue en {{new}} !","exitlab":{"0":"Le prof Chen m'a promis de me confier mon premier Pokémon aujourd'hui.","1":"Je ne compte pas repartir d'ici sans lui !"},"find":"trouvez","giovanni":{"defeat":{"0":"Tu élèves tes Pokémon trop soigneusement.","1":"Un gosse comme toi ne peut pas comprendre mes plans !"},"start":{"0":"Je dois dire que je suis surpris que tu sois arrivé jusqu'ici !","1":"Te voici dans mon repaire ! Je compte reformer la Team Rocket ici !","2":"Tu oses me défier, moi, le grand Giovanni ? Tu vas déguster !"},"victory":{"0":"Ah ! Voilà ce que j'appelle du combat ! Tu as gagné !","1":"En récompense voici le badge Terre !","2":"Une fois les 8 badges obtenus, tu peux te confronter à la Ligue Pokémon.","3":"Tu peux y accéder par la Route Victoire à l'ouest d'ici.","4":"Je ne suis pas digne d'être le chef de la Team Rocket !","5":"Ainsi, son existence s'achève avec ma défaite !","6":"Je vais me retirer, loin, en ermite, pour étudier les Pokémon !","7":"Un jour, nos chemins se croiseront à nouveau ! Adieu !"}},"guide":{"argenta":{"0":"La montagne qui culmine au dessus d'Argenta est le Mont Sélénite.","1":"Il s'agit d'une des régions les plus anciennes de Kanto !","2":"On dit qu'on peut y trouver de nombreux fossiles de Pokémon disparus.","3":"Imagine si on pouvait leur redonner vie..."},"azuria":{"0":"Ce bateau, là, c'est l'Océane !","1":"Il est beau, hein ?","2":"Il va en croisière permanente entre Azuria, Carmin sur Mer et Cramois'Île.","3":"Si tu veux monter dedans au bon moment, tu devrais mémoriser ce trajet !"},"carmin":{"0":"J'ai pris le raccourci de la Cave Taupiqueur pour venir ici plus vite.","1":"Mais j'ai quand même raté le départ du bateau, alors j'attends ici..."},"celadopole":{"0":"La Colline Royale qui surplombe Céladopole est un endroit légendaire.","1":"On raconte qu'on peut y croiser des Pokémons Dragon !","2":"Mais le chemin est bloqué par un énorme Pokémon endormi...","3":"Si seulement on trouvait un moyen de le réveiller..."},"cramoisile":{"0":"Je travaille au Laboratoire d'étude des Pokémon du Dr. Fuji.","1":"J'étudie les fossiles rares de Pokémon.","2":"Comment ? Tu as trouvé un fossile ?","3":"Montre-le moi, allez montre-le !","4":"Incroyable ! Il est en parfait état !","5":"Je pourrais peut-être même... le ramener à la vie !","6":"Tu veux bien me le confier ?","7":"Excellent ! Je reviens vite !","8":"Incroyable !","9":"C'est un {{name}} ! Je les croyais disparus !","10":"Hmm ? Quoi ?","11":"Ah, oui, je suppose qu'il est à toi...","12":"Vous recevez un {{ name }} ramené à la vie !\`,","13":"Reviens me voir si tu trouves d'autres spécimens !","14":"Mais... mais... c'est pour la science !","15":"J'ai conçu une machine de résurrection des fossiles Pokémon !","16":"Mais je n'ai pas encore de spécimens d'assez bonne qualité."},"jadielle":{"0":"J'ai voulu aller sur la route Victoire à l'ouest, mais on ne m'a pas laissé passer...","1":"Seuls ceux qui ont les huit badges d'arène peuvent accéder au plateau Indigo.","2":"C'est pas juste ! Je veux aller voir les Champions de la Ligue !"},"lavanville":{"0":"Lavanville est une ville plutôt tranquille, coincée entre les montagnes...","1":"Mais il y a quelques lieux d'intérêt, comme la Tour Pokémon ou la Centrale."},"ligue":{"0":"Ah, alors tu veux des infos sur les Champions de la Ligue ?","1":"Pour prétendre au titre de maître de la Ligue Pokémon,","2":"tu devras affronter les 4 membres du Conseil des 4 l'un après l'autre.","3":"Tout d'abord tu affronteras Olga, la reine de la glace !","4":"Débarasse-toi en rapidement avec que ton équipe soit transformée en glaçon.","5":"Ensuite vient Aldo, spécialiste du combat et de la force brute.","6":"Ses Pokémon sont costauds, il va falloir ruser pour le vaincre !","7":"En troisième, la terrifiante Agatha et ses Pokémon Spectre !","8":"Ils sèment la confusion dans ton équipe, alors peaufine ton placement.","9":"Enfin tu affronteras Peter, maître des Dragons.","10":"Les Dragons sont très tenaces. Il te faudra donner tout ce que tu as !","11":"Voilà, je ne sais pas ce qu'il y a après. Je n'ai jamais pu aller plus loin !","12":"Ah, je croyais que... non, laisse tomber."},"parmanie":{"0":"Le Parc Safari est la grande attraction de Parmanie.","1":"Il attire plein de dresseurs Pokémon de tout Kanto !","2":"On y trouve une grande variété de Pokémon de tous types.","3":"Mais les combats y sont interdits pour préserver leur tranquilité."},"safrania":{"0":"J'ai laissé mon Pokémon à la Pension au nord pendant quelques jours.","1":"Je l'ai retrouvé en pleine forme, plus fort que jamais !","2":"L'éleveur de la Pension fait vraiment un travail remarquable."}},"healer":{"0":"Les combats dans la Ligue sont très éprouvants pour tes Pokémon.","1":"Mais nous prenons soin de soigner toute ton équipe entre chaque combat."},"hector":{"defeat":{"0":"Les Pokémon insecte ont des talents cachés.","1":"Il faudra encore du temps pour tous les découvrir.","2":"Étudies-les minutieusement."},"start":{"0":"Tiens, tu as trouvé mon camp ? Moi, c'est Hector!","1":"Je suis venu étudier les Pokémon Insecte de cette région.","2":"Personne ne connait mieux les Pokémon Insecte que moi!","3":"Quand je serai adulte, je serai un grand expert en Pokémon Insecte!","4":"Tu veux que je te montre ?","5":"Prépare toi à admirer le résultat de mes recherches!"},"victory":{"0":"Wah, Ça alors ! Tu connais vraiment bien les Pokémon !","1":"Ah, j'ai encore beaucoup à apprendre! ... ","2":"Oui, je sais ! Prends mon filet à insecte comme récompense !","3":"Tu verras, il te sera très utile !","4":"Bien, je vais lever le camp. J'ai fini ce que j'avais à faire ici.","5":"Ce coin regorge de Pokémon exotiques, tu devrais y repasser !"}},"item_no_use":"Ça ne marchera pas ici...","item_received":"Vous {{verb}}: {{label}} {{quantity}}","item_use":"Utiliser {{item}} ?","koga":{"defeat":{"0":"Ha ha ! Il est temps de t'apprendre que certains Pokémon","1":"ne peuvent pas être vaincus par la force pure !"},"start":{"0":"Gwahahaha ! Un nain ose me défier ?","1":"Moi, le grand le beau le terrible Koga ?","2":"Par l'enfer, par le sang, par l'acier, j'vais gagner !","3":"Puisse la poigne de mes poisons pétrifier de peur tes petits Pokémon !"},"victory":{"0":"Gwaha... heu ? Tu as prouvé ta valeur !","1":"Ouvre ta mimine, car voici... le BADGE ÂME !","2":"J'ai combattu de toutes mes forces...","3":"Mais... Je ne suis pas assez fort.","4":"Va dans la prochaine arène ! Explore tes limites !","5":"Bonne chance !"}},"levelup":"{{name}} passe au niveau {{level}}","mom":{"after_gift":"Bon courage dans ton aventure !","gift1":"Tiens, avant que tu partes... J'ai retrouvé ça sous ton lit.","gift10":"Elle permet d'ajouter un nouveau type à un de tes Pokémon !","gift11":"J'espère que ça te sera utile.","gift12":"Tu es parti depuis un bon moment. Tu t'es fait de nouveaux amis ?","gift13":"Je suis passée au magasin et j'ai trouvé quelque-chose pour toi.","gift14":"Le vendeur m'a dit que tous les meilleurs dresseurs en avaient un !","gift15":"Mais il faut bien choisir le Pokémon à qui le donner.","gift16":"Cela fait si longtemps que tu as quitté la maison !","gift17":"Tu dois avoir beaucoup d'histoires à raconter.","gift18":"Pour ton retour, je voudrais t'offrir un cadeau:","gift19":"Toutes les économies y sont passées ! Mais c'est une occasion spéciale.","gift2":"Tu n'es pas parti longtemps. Comment ça va ?","gift20":"Tu es si proche de ton but ! Je crois en toi mon chéri !","gift3":"J'ai cueilli des baies au jardin. Tes Pokémon vont adorer !","gift4":"Comment se passe ton aventure ?","gift5":"Tiens, j'ai trouvé ça pour toi au Labo du Prof Chen.","gift6":"Le voyage se passe bien ?","gift7":"As-tu capturé beaucoup de Pokémon ?","gift8":"Tiens, j'ai quelque-chose à t'offrir.","gift9":"C'est une gemme très rare.","hello":"Bonjour, mon chéri !"},"morgane":{"defeat":{"0":"C'est exactement ce que j'avais prédit."},"start":{"0":"J'avais prédit ton arrivée !","1":"J'ai des pouvoirs psychiques depuis l'enfance.","2":"J'ai appris à plier les cuillères par la force de mon esprit.","3":"C'est pas super utile, mais ça en jette !","4":"Je n'aime pas les combats, mais si tu insistes, je vais te montrer mes pouvoirs !"},"victory":{"0":"Ha! Je suis surprise ! Tu as gagné.","1":"C'est vrai, je n'ai pas fait de mon mieux !","2":"Tu mérites ta victoire ! Tu gagnes le BADGE MARAIS !","3":"Le Badge Marais renforce les pouvoirs occultes...","4":"Et ça... C'est pas de la gnognotte.","5":"Tu deviendras un Maître ! Je le sens !"}},"mr_psy":{"defeat":{"0":"Quelle déception !","1":"Reviens me voir et je te laisserai capturer d'autres Pokémon Psy","2":"Ton équipe a besoin d'améliorer son mental !"},"start":{"0":"Ah, te revoilà ! Alors, as-tu entraîné le mental de tes Pokémon ?","1":"C'est l'heure de... l'évaluation !"},"victory":{"0":"C'est un 10/10 ! Tu es diplômé de l'école de Monsieur Psy !"}},"olga":{"defeat":{"0":"Comment as-tu ozé venir ici ?"},"start":{"0":"Bienvenue à la Ligue Pokémon !","1":"Je zuis Olga du Conzeil des 4 !","2":"Je zuis la maîtrezze des Pokémon de glaze !","3":"Et la glaze... Z'est drop fort !","4":"Tes Pokémon zeront à ma merzi une fois gelés !","5":"Ach ! Ach ! Ach ! Z'est parti !"},"victory":{"0":"Tu es fort. Z'est bien.","1":"Mais la Ligue Pokémon te rézerve d'autre zurprizes !"}},"ondine":{"defeat":{"0":"Haha, on dirait que ton équipe a pris l'eau !","1":"Il va te falloir trouver une autre tactique."},"start":{"0":"Salut ! T'es un nouveau ?","1":"Si tu veux être un vrai dresseur, il te faut une stratégie !","2":"C'est quoi ta tactique pour capturer les Pokémon sauvages ?","3":"Moi je leur fonce dans le tas avec mes Pokémon aquatiques !"},"victory":{"0":"Whouha ! T'es super fort ! Très bien !","1":"Je te donne le BADGE CASCADE pour m'avoir battue!","2":"Ce badge t'ouvre le chemin vers la grotte au nord d'Azuria."}},"peter":{"defeat":{"0":"Je n'abandonne jamais. Et toi ?"},"start":{"0":"Ah ! Enfin... J'ai entendu parler de toi !","1":"Je règne sur le Conseil des 4 !","2":"Mon nom est Peter le Dresseur de Dragons !","3":"Les dragons sont des Pokémon mystiques !","4":"Les capturer et les entraîner est difficile mais leurs pouvoirs sont supérieurs !","5":"Ils sont presque invincibles !","6":"Le glas de la défaite et de la honte sonne pour toi...","7":"L'entends-tu ?"},"victory":{"0":"Comment mes dragons ont-il pu succomber à tes attaques?","1":"Tu es désormais le Maître de la Ligue Pokémon !","2":"Enfin... Pas tout à fait.","3":"Une épreuve doit encore t'être imposée...","4":"Un autre grand Dresseur t'attend.","5":"Il a vaincu le Conseil des 4 avant toi !","6":"C'est le vrai Maître de la Ligue Pokémon !"}},"pierre":{"defeat":{"0":"Tes Pokémon n'ont pas pu passer ma défense de pierre...","1":"Entraîne-les et reviens m'affronter quand tu seras assez fort."},"start":{"0":"Je suis Pierre ! Je suis le Champion d'Argenta !","1":"Je crois en la grande résistance de la pierre !","2":"C'est pourquoi mes Pokémon sont des élémentaires de pierre !","3":"Tu veux toujours te battre avec moi ? Très bien. En garde !"},"victory":{"0":"Hmm... Beau combat.","1":"Tu sembles être un Dresseur d'exception !","2":"En reconnaissance de ta victoire, voici le BADGE ROCHE !","3":"C'est un Badge officiel de la Ligue Pokémon !","4":"Il t'en faudra huit pour pouvoir affronter le Conseil des 4."}},"receive":"recevez","relacher":"Relâcher {{name}} et récupérer {{cost}} Pokéball ?","rival":{"defeat":{"0":"Tu m'as amusé un peu !","1":"T'es vraiment un minable !","2":"Mais je crois que tu commences à le savoir, minable!"},"start":{"0":"Salut minable. Je t'attends depuis une bonne plombe !","1":"Ton devoir en tant que rival est d'entraîner mes Pokémon.","2":"En améliorant mon Pokédex, j'ai recherché les Pokémon surpuissants!","3":"J'ai créé l'équipe ultime, efficace contre tous les types de Pokémon!","4":"Ça t'épate, hein ?","5":"Je suis le Maître! Tu sais c'que ça veut dire?","6":"Je suis le dresseur le plus puissant du monde! Yaaa!"},"victory":{"0":"Qu... Comm... Hein? Moi? Pourquoi? WHAAAAAAAAAAA!","1":"J'ai entraîné mes Pokémon à la perfection... Et zut alors!","2":"Tu es le nouveau Maître! Alors ça... Ça me la coupe"}},"sally":{"defeat":{"0":"C'est beau, l'énergie de la jeunesse.","1":"Mais la puissance des attaques ne fait pas tout...","2":"Commencerais-tu enfin à comprendre ce qu'est la féérie ?"},"start":{"0":"Tiens, tiens. J'ai entendu parler de toi, mon enfant.","1":"Je suis Sally, la championne d'arène de Corrifey de la région de Galar.","2":"Je suis venu à Lavanville pour rendre visite à un vieil ami...","3":"Cet endroit a quelque-chose de féérique à mes yeux.","4":"Bien, que dirais-tu d'un combat ?","5":"Ça m'intéresserait de voir comment tu te bats..."},"victory":{"0":"Félicitations pour cette victoire! Je me suis follement amusée !","1":"Même si j'ai passé l’âge pour ce genre de choses...","2":"Tu me rappelles mon mari dans ces jeunes années.","3":"Tu sais quoi ? Tu devrais prendre ce parapluie.","4":"Il m'a été très utile lors de mes voyages","5":"Allez, ouste ! Tu as une Ligue à affronter !"}},"salut":"Salut ?","sbire_rocket":{"defeat":{"0":"Mouahaha ! C'est la renaissance de la team Rocket !"},"start":{"0":"Giovanni est peut-être parti, mais la Team Rocket ne meurt jamais !","1":"J'ai bien l'intention de prendre sa place ! A l'attaque !"},"victory":{"0":"La Team Rocket s'envole vers d'autres cieux ! "}},"sbire_rocket_tuto":{"defeat":{"0":"Allez, dégage d'ici minus, et reviens quand tu auras une vraie équipe !"},"start":{"0":"Eh toi là, qu'est-ce que tu fiches ici ?","1":"Ici c'est le territoire de Giovanni, notre chef et maître de l'arène !","2":"Quoi ? Tu comptes te mesurer à lui ? Laisse-moi rire !","3":"Je vais te montrer la puissance de la Team Rocket !"},"victory":{"0":"Hmpff ! Tu es plus coriace que tu en as l'air... ","1":"Mais ça ne change rien ! Giovanni va te régler ton compte !","2":"Reviens plus tard quand tu auras une vraie équipe."}},"sellerf":{"hello":"Bonjour ! Que désirez-vous ?"},"sellerm":{"hello":"Bonjour ! Quelque-chose vous intéresse ?"},"shop":{"confirm_one":"1 {{item}} pour {{count}} ball, c'est ça ?","confirm_other":"1 {{item}} pour {{count}} balls, c'est ça ?","nomoney":"Tu n'as pas assez de Pokéballs, gamin !"},"sleeping_pokemon":{"0":"Un Pokémon endormi bloque le chemin.","1":"Le réveiller avec la Poké Flute ?"},"starter":{"after":"J'aurais peut-être dû prendre {{name}}...","choose":"Choisir {{name}} comme starter ?","chosen":"Vous choisissez {{name}} !"},"trader":{"aftertrade":"Trop cool, un {{name}} !","nopokemon":{"0":"Salut, tu veux échanger des Pokémon ?","1":"Si tu as des Pokémon en réserve dans ta box, on peut se les échanger !"},"tradeaccepted":"Vous échangez {{ given }} contre {{ received }} !","tradepropose":"Salut, tu veux échanger ton {{ given }} contre mon {{ received }} ?","traderefused":"Ah, bon tant pis."}}`),sm={caught:"Pris: {{number}}",duree:"Durée jeu: {{duree}} tours",seen:"Vus: {{number}}"},nm={controls:"Contrôles",description:{0:"Pokéchess est le prototype de jeu sur lequel Curry travaillait avant de rejoindre le projet Pokemon Auto Chess. Il s'agit d'un remake fangame de Pokemon Rouge/Bleu en tant qu'autobattler.",1:"Bien que le jeu simule le format et le style d'une gameboy pour jouer sur la corde de la nostalgie, il ne respecte pas la résolution et les contraintes matérielles de la Gameboy Color, et le jeu est également jouable au clavier, à la manette ou à la souris pour plus de commodité.",2:"Votre progression est automatiquement sauvegardée chaque fois que vous arrivez sur l'écran de la carte du monde.",3:"Ce projet a rapidement montré les limites du format gameboy pour un genre aussi complexe que l'autobattler, mais a également permis d'explorer certaines idées qui ont été utilisées par la suite dans Pokémon Auto Chess."},gamepad:"Manette",keyboard:"Clavier",language:"Langue",mouse:"Souris",music:"Musique",sfx:"Effets sonores",volume:"Volume"},rm={"attaque+":"Attaque+",baie_ceriz:"Baie Ceriz",baie_mepo:"Baie Mepo",baie_oran:"Baie Oran",baie_sitrus:"Baie Sitrus",boule_fumee:"Boule Fumée","defense+":"Défense+",encens_fleur:"Encens Fleur",filet:"Filet d'Hector",fossile_amonita:"Nautile",fossile_kabuto:"Fossile Dôme",fossile_ptera:"Vieil Ambre",gemme_ciel:"Gemme Ciel",gemme_draco:"Gemme Draco",gemme_flamme:"Gemme Flamme",gemme_glace:"Gemme Glace",gemme_grise:"Gemme Grise",gemme_herbe:"Gemme Herbe",gemme_hydro:"Gemme Hydro",gemme_insecte:"Gemme Insecte",gemme_ombre:"Gemme Ombre",gemme_pixie:"Gemme Pixie",gemme_poing:"Gemme Poing",gemme_psy:"Gemme Psy",gemme_roc:"Gemme Roc",gemme_terre:"Gemme Terre",gemme_toxic:"Gemme Toxic",gemme_volt:"Gemme Volt",grelot_coque:"Grelot Coque",max_elixir:"Max Elixir",multi_exp:"Multi Exp",orbe_flamme:"Orbe Flamme",orbe_foudre:"Orbe Foudre",orbe_toxique:"Orbe Toxique",parapluie:"Parapluie de Sally",pokeball:"Pokéball",pokeflute:"Pokéflute","pv+":"PV Plus",repousse:"Repousse",super_bonbon:"Super Bonbon","vitesse+":"Vitesse+"},am={"attaque+":"+20% Attaque",baie_ceriz:"Consommé à la première altération subie - Soigne les altérations pendant 10 secondes",baie_mepo:"Consommé au premier coup reçu - Gagne 2PP supplémentaires par coup reçu",baie_oran:"Def +30% - Consommé quand les PV tombent sous les 50% la première fois",baie_sitrus:"Soigne 25% des PV max - Consommé quand les PV tombent sous les 50% la première fois",boule_fumee:"Rend le Pokémon impossible à cibler pendant 3s quand les PV tombent sous les 30%","defense+":"+20% Défense",encens_fleur:"Soigne chaque seconde 1% des PV max du porteur et des alliés sur une case adjacente",filet:"Récupère une Pokéball par Pokémon éliminé par son porteur",fossile_amonita:"Un fossile de Pokémon antique en forme d'escargot",fossile_kabuto:"Un fossile de Pokémon antique en forme de carapace",fossile_ptera:"Un fossile de Pokémon antique en forme d'oeuf",gemme_ciel:"Donne le type Vol au porteur",gemme_draco:"Donne le type Dragon au porteur",gemme_flamme:"Donne le type Feu au porteur",gemme_glace:"Donne le type Glace au porteur",gemme_grise:"Donne le type Normal au porteur",gemme_herbe:"Donne le type Plante au porteur",gemme_hydro:"Donne le type Eau au porteur",gemme_insecte:"Donne le type Insecte au porteur",gemme_ombre:"Donne le type Spectre au porteur",gemme_pixie:"Donne le type Fée au porteur",gemme_poing:"Donne le type Combat au porteur",gemme_psy:"Donne le type Psy au porteur",gemme_roc:"Donne le type Roche au porteur",gemme_terre:"Donne le type Sol au porteur",gemme_toxic:"Donne le type Poison au porteur",gemme_volt:"Donne le type Électrique au porteur",grelot_coque:"Restaure 20% des dégâts infligés en PV",max_elixir:"Gagne 4PP à chaque attaque",multi_exp:"Augmente les gains d'expérience de 30%",orbe_flamme:"Inflige l'altération Brûlure à chaque coup reçu ou porté",orbe_foudre:"Inflige l'altération Paralysie à chaque coup reçu ou porté",orbe_toxique:"Inflige l'altération Poison à chaque coup reçu ou porté",parapluie:"Protège le porteur de toutes les altérations",pokeball:"L'outil de capture de tout dresseur et monnaie d'échange dans les magasins",pokeflute:"Réveille les Pokémon les plus profondément endormis","pv+":"+20% PV",repousse:"Fait fuir les Pokémon sauvages et en ramène de nouveaux",super_bonbon:"Gagne un niveau supplémentaire à chaque fin de combat","vitesse+":"+20% Vitesse"},om={change_place:"Changer d'endroit",no_item:"{{ name }} ne tient pas d'objet",quit:"Quitter",release_pokemon:"Libérer {{name}}",remove_pokemon:"Retirer {{name}}",retrieve_item:"Récupérer {{item}}",see_pokemon:"Voir {{name}}",stock_item:"Ranger {{item}}"},lm="Nouvelle partie",hm="NON",um="Pokédex",fm={abo:"Abo",abra:"Abra",aeromite:"Aéromite",akwakwak:"Akwakwak",alakazam:"Alakazam",amonistar:"Amonistar",amonita:"Amonita",aquali:"Aquali",arbok:"Arbok",arcanin:"Arcanin",artikodin:"Artikodin",aspicot:"Aspicot",boustiflor:"Boustiflor",bulbizarre:"Bulbizarre",canarticho:"Canarticho",caninos:"Caninos",carabaffe:"Carabaffe",carapuce:"Carapuce",chenipan:"Chenipan",chetiflor:"Chétiflor",chrysacier:"Chrysacier",coconfort:"Coconfort",colossinge:"Colossinge",crustabri:"Crustabri",dardargnan:"Dardargnan",dodrio:"Dodrio",doduo:"Doduo",dracaufeu:"Dracaufeu",draco:"Draco",dracolosse:"Dracolosse",ectoplasma:"Ectoplasma",electhor:"Electhor",electrode:"Electrode",elektek:"Elektek",empiflor:"Empiflor",evoli:"Evoli",excelangue:"Excelangue",fantominus:"Fantominus",ferosinge:"Férosinge",feunard:"Feunard",flagadoss:"Flagadoss",florizarre:"Florizarre",galopa:"Galopa",goupix:"Goupix",gravalanch:"Gravalanch",grodoudou:"Grodoudou",grolem:"Grolem",grotadmorv:"Grotadmorv",herbizarre:"Herbizarre",hypnomade:"Hypnomade",hypocean:"Hypocean",hypotrempe:"Hypotrempe",insecateur:"Insecateur",kabuto:"Kabuto",kabutops:"Kabutops",kadabra:"Kadabra",kangourex:"Kangourex",kicklee:"Kicklee",kokiyas:"Kokiyas",krabboss:"Krabboss",krabby:"Krabby",lamantine:"Lamantine",leveinard:"Leveinard",leviator:"Leviator",lippoutou:"Lippoutou",lokhlass:"Lokhlass",machoc:"Machoc",machopeur:"Machopeur",mackogneur:"Mackogneur",magicarpe:"Magicarpe",magmar:"Magmar",magneti:"Magneti",magneton:"Magneton",melodelfe:"Mélodelfe",melofee:"Mélofée",metamorph:"Metamorph",mew:"Mew",mewtwo:"Mewtwo",miaouss:"Miaouss",mimitoss:"Mimitoss",minidraco:"Minidraco",mrmime:"Mr. Mime",mystherbe:"Mystherbe",nidoking:"Nidoking",nidoqueen:"Nidoqueen",nidoranf:"Nidoran ♀",nidoranm:"Nidoran ♂",nidorina:"Nidorina",nidorino:"Nidorino",noadkoko:"Noadkoko",noeufnoeuf:"Noeufnoeuf",nosferalto:"Nosferalto",nosferapti:"Nosferapti",onix:"Onix",ortide:"Ortide",ossatueur:"Ossatueur",osselait:"Osselait",otaria:"Otaria",papillusion:"Papilusion",paras:"Paras",parasect:"Parasect",persian:"Persian",piafabec:"Piafabec",pikachu:"Pikachu",poissirene:"Poissirène",poissoroy:"Poissoroy",ponyta:"Ponyta",porygon:"Porygon",psykokwak:"Psykokwak",ptera:"Ptéra",ptitard:"Ptitard",pyroli:"Pyroli",racaillou:"Racaillou",rafflesia:"Rafflesia",raichu:"Raichu",ramoloss:"Ramoloss",rapasdepic:"Rapasdepic",rattata:"Rattata",rattatac:"Rattatac",reptincel:"Reptincel",rhinocorne:"Rhinocorne",rhinoferos:"Rhinoféros",rondoudou:"Rondoudou",ronflex:"Ronflex",roucarnage:"Roucarnage",roucool:"Roucool",roucoups:"Roucoups",sabelette:"Sabelette",sablaireau:"Sablaireau",salameche:"Salamèche",saquedeneu:"Saquedeneu",scarabrute:"Scarabrute",smogo:"Smogo",smogogo:"Smogogo",soporifik:"Soporifik",spectrum:"Spectrum",stari:"Stari",staross:"Staross",sulfura:"Sulfura",tadmorv:"Tadmorv",tartard:"Tartard",taupiqueur:"Taupiqueur",tauros:"Tauros",tentacool:"Tentacool",tentacruel:"Tentacruel",tetarte:"Tetarte",tortank:"Tortank",triopikeur:"Triopikeur",tygnon:"Tygnon",voltali:"Voltali",voltorbe:"Voltorbe"},dm={home:"Maison",ligueendroom:"Ligue Indigo - Panthéon",oaklab:"Laboratoire de Chen"},cm={abri:"Abri",acide:"Acide",adaptation:"Adaptation",amnesie:"Amnésie",armure:"Armure",balayage:"Balayage",belier:"Bélier",berceuse:"Berceuse",blizzard:"Blizzard",bomb_beurk:"Bomb Beurk",bomb_oeuf:"Bomb'Œuf",brouillard:"Brouillard",bulles_d_o:"Bulles d'O",cage_eclair:"Cage-Éclair",cascade:"Cascade",charge:"Charge",choc_mental:"Choc Mental",coud_boue:"Coud'Boue",croc_de_mort:"Croc de Mort",crochet_venin:"Crochet Venin",crocs_feu:"Crocs Feu",cruaile:"Cru-Ailes",danse_flammes:"Danse-Flammes",danse_lames:"Danse-Lames",dard_venin:"Dard-Venin",deflagration:"Déflagration",destruction:"Destruction",detritus:"Détritus",devoreve:"Dévorêve",double_pied:"Double-Pied",dracocharge:"Dracocharge",dracorage:"Draco-Rage",e_coque:"E-Coque",eclair:"Éclair",eclat_glace:"Éclats Glace",empal_korne:"Empal'Korne",encore:"Encore",etincelle:"Étincelle",evolution:"Évolution",fatal_foudre:"Fatal Foudre",flammeche:"Flammèche",fouet_lianes:"Fouet-Lianes",furie:"Furie",griffe:"Griffe",grobisou:"Grobisou",guillotine:"Guillotine",hate:"Hâte",hydrocanon:"Hydrocanon",hypnose:"Hypnose",jackpot:"Jackpot",jet_de_sable:"Jet de Sable",jet_pierres:"Jet-Pierres",koud_korne:"Koud'Korne",lance_flammes:"Lance-Flammes",lance_soleil:"Lance-Soleil",laser_glace:"Laser Glace",lechouille:"Léchouille",ligotage:"Ligotage",massdos:"Massd'Os",mawashi_geri:"Mawashi Geri",meteores:"Météores",metronome:"Métronome",morphing:"Morphing",morsure:"Morsure",nitrocharge:"Nitrocharge",ouragan:"Ouragan",paraspore:"Para Spore",picpic:"Picpic",pilonnage:"Pilonnage",pince_masse:"Pince-Masse",piqure:"Piqûre",pistolet_a_o:"Pistolet à O",poing_karate:"Poing-Karaté",poudre_dodo:"Poudre Dodo",poudre_toxik:"Poudre Toxik",poudreuse:"Poudreuse",pouvoir_antique:"Pouvoir Antique",pouvoir_lunaire:"Pouvoir Lunaire",provoc:"Provoc",psyko:"Psyko",rafale_psy:"Rafale Psy",repos:"Repos",rugissement:"Rugissement",secretion:"Sécrétion",surf:"Surf",teleport:"Téléport",tonnerre:"Tonnerre",torgnoles:"Torgnoles",trempette:"Trempette",triplattaque:"Triplattaque",tunnel:"Tunnel",ultimapoing:"Ultimapoing",ultralaser:"Ultralaser",ultrason:"Ultrason",vampirisme:"Vampirisme",vive_attaque:"Vive-Attaque",vol_vie:"Vol-Vie"},vm={abri:"Rend le lanceur invulnérable pendant un court instant",acide:"Jet de suc gastrique réduisant fortement la défense des cibles",adaptation:"Remplace temporairement son type par celui des attaques reçues",amnesie:"Soigne toutes les altérations actuelles du lanceur",armure:"Augmente la défense du lanceur jusqu'à la fin du combat - Accumulable",balayage:"Attaque large pouvant toucher jusqu'à 3 adversaires en face",belier:"Une violente charge qui blesse également le lanceur",berceuse:"Endort les adversaires autour du lanceur",blizzard:"Gèle tous les adversaires et fait tomber une pluie de grêlons dévastateurs",bomb_beurk:"Bombe toxique empoisonnant la zone où elle tombe",bomb_oeuf:"Lance un oeuf explosif infligeant des dégâts dans une large zone",brouillard:"Réduit la précision des adversaires autour du lanceur",cage_eclair:"Paralyse tous les adversaires autour du lanceur",cascade:"Fait tomber une trombe d'eau qui repousse l'adversaire",coud_boue:"Réduit la précision de la cible",croc_de_mort:"Puissante morsure qui apeure la cible pendant 3 secondes",crocs_feu:"Une morsure infligeant de grosses brulures",danse_flammes:"Inflige des brûlures à tous les adversaires autour du lanceur",danse_lames:"Attaque circulaire infligeant des dégâts à tous les adversaires autour",deflagration:"Enflamme tout le terrain et déclenche des éruptions sur 8 cases aléatoires",destruction:"Autodestruction pulvérisant tout aux alentours",devoreve:"Appeure l'adversaire avec des visions de cauchemar",dracorage:"Invoque une tempête qui inflige des dégâts bruts dans la zone",e_coque:"Libère un oeuf magique qui soigne toute votre équipe",eclair:"La foudre s'abat sur un Pokémon adverse tiré au hasard",empal_korne:"Empale la cible avec une stalagmite surgissant du sol",encore:"Reproduit la dernière attaque spéciale observée sur le terrain",evolution:"Evolue temporairement en Pyroli, Voltali ou Aquali selon le type de la cible",fatal_foudre:"Fait tomber la foudre sur 3 ennemis et paralyse tous les autres",furie:"Augmente l'attaque du lanceur jusqu'à la fin du combat - Accumulable",grobisou:"Un bisou glacé qui gèle la cible temporairement",guillotine:"Coup mortel exécutant l'adversaire s'il a moins de 30% de ses PV max",hate:"Augmente la vitesse du lanceur jusqu'à la fin du combat - Accumulable",hydrocanon:"Geyser propulsant l'adversaire dans les airs",hypnose:"Endort profondément la cible",jackpot:"A 50% de chance de vous rapporter une Pokéball",jet_de_sable:"Aveugle l'ennemi et réduit sa précision de 50% pendant 8 secondes",lance_flammes:"Jet de flammes infligeant de grosses brulures à la cible",lance_soleil:"Absorbe l'énergie solaire puis la relâche en un puissant orbe",laser_glace:"Gèle les adversaires un court instant sur une ligne droite",ligotage:"Empêche la cible de bouger et inflige des dégâts sur la durée",mawashi_geri:"Un coup de pied circulaire qui touche également l'adversaire derrière le lanceur",meteores:"Une pluie d'étoiles qui touche à tous les coups",metronome:"Déclenche une capacité aléatoire parmi toutes celles existantes",morphing:"Se transforme en une copie du Pokémon cible - Garde le même niveau et objet",nitrocharge:"Une violente charge enflammée qui blesse également le lanceur",ouragan:"Une tornade soulevant tous les adversaires sur son passage",paraspore:"Nuage de spores qui paralyse tous les adversaires autour du lanceur",poudre_dodo:"Projète un somnifère qui endort tous les adversaires autour",poudre_toxik:"Toxines empoisonnant tous les adversaires autour du lanceur",pouvoir_antique:"Une attaque préhistorique qui augmente toutes les stats du lanceur",pouvoir_lunaire:"Provoque tous les adversaires dans un rayon de 2 cases",provoc:"Provoque tous les adversaires dans un rayon de 2 cases",psyko:"Rend confus toute l'équipe adverse pendant 4 secondes avant d'infliger de lourds dégâts Psy",rafale_psy:"Vague d'énergie Psy traversant les adversaires",repos:"S'endort et regagne une grosse partie de ses PV tant qu'il est endormi",rugissement:"Réduit temporairement l'attaque de tous les adversaires autour",secretion:"Crée un piège collant qui ralentit la vitesse de l'adversaire",surf:"Crée une vague géante qui emporte tout sur son passage",teleport:"Téléporte le lanceur sur une case aléatoire du plateau",tonnerre:"Inflige de gros dégâts électriques autour du lanceur",trempette:"Mais rien ne se passe.",tunnel:"Creuse un tunnel vers une case libre du plateau, attaquant par le sol au passage",ultimapoing:"Un uppercut dévastateur",ultralaser:"Un laser surpuissant qui pulvérise tout sur une ligne droite",ultrason:"Onde sonore rendant confus les Pokémon touchés"},pm={agatha:"Agatha",aldo:"Aldo",assistant_tuto:"Assistant du Prof Chen",auguste:"Auguste",major_bob:"Major Bob",dresseur_argenta:"Roche le géologue",dresseur_azuria:"Anya la nageuse",dresseur_camp_nomade:"Nancy la scout",dresseur_carmin:"Elton le Rocker",dresseur_cave_taupiqueur:"Joe le Cambrioleur",dresseur_celadopole:"Valentine la Citadine",dresseur_centrale:"Bernard le mécano",dresseur_champs_verdoyants:"Isabelle la Fleuriste",dresseur_col_de_montagne:"Sébastien l'ornithologue",dresseur_colline_royale:"Norbert le Fan de Dragons",dresseur_cramoisile:"Isaac le Scientifique",dresseur_dojo:"Koichi le Karatéka",dresseur_falaises:"Maurice le Montagnard",dresseur_foret_jade:"Calvin le Gamin",dresseur_grotte_azuree:"Ugo le vieux sage",dresseur_iles_ecume:"Fabien le Pêcheur",dresseur_lavanville:"Henri le gentilhomme",dresseur_mont_braise:"Duo Ron & Mya les Casse-Cous",dresseur_mont_selenite:"Arthur le paléontologue",dresseur_oceane:"Firmin le Marin",dresseur_pension:"Gaël de la Pension",dresseur_piste_cyclable:"Karl le Loubard",dresseur_safrania:"Polo le Kinésiste",dresseur_tour_pokemon:"Gwen l'Exorciste",erika:"Erika",giovanni:"Giovanni",hector:"Hector",koga:"Koga",morgane:"Morgane",mr_psy:"Monsieur Psy",olga:"Olga",ondine:"Ondine",peter:"Peter",pierre:"Pierre",rival:"Blue",sally:"Sally",sbire_rocket:"Sbire Rocket"},mm={COMBAT:"Combat",DRAGON:"Dragon",EAU:"Eau",ELECTRIQUE:"Electrique",FEE:"Fée",FEU:"Feu",GLACE:"Glace",INSECTE:"Insecte",NORMAL:"Normal",PLANTE:"Plante",POISON:"Poison",PSY:"Psy",ROCHE:"Roche",SOL:"Sol",SPECTRE:"Spectre",VOL:"Vol"},gm="Vous avez vaincu {{trainer}} !",xm="Vos Pokémon gagnent {{xp}}xp",ym="OUI",Em={not_enough_balls:{0:"Pas assez de",1:"pokeballs !"},box_full:{0:"Box Pokémon",1:"pleine !"},capture_with:"Capturer avec"},Tm="Chargement...",Sm="Tour {{day}}",Am={alliance_desc:Qp,continue:"Continuer",defeat:qp,descriptions:_p,destination:tm,destination_subtext:em,dialog:im,gameover:sm,home:nm,item:rm,item_desc:am,menu:om,new_game:lm,no:hm,pokedex:um,pokemon:fm,room:dm,skill:cm,skill_desc:vm,trainer:pm,type:mm,victory:gm,victory_xp:xm,yes:ym,capture:Em,loading:Tm,day_number:Sm},Cm=Ee.use(hf).init({fallbackLng:"en",debug:!1,resources:{en:{translation:$p},fr:{translation:Am}}}),V=Ee.t.bind(Ee),Uh=Ee,Ro=(E,A)=>Math.floor(Math.random()*(A-E))+E;let di=new AudioContext;function Pm(E=440+Ro(-40,40),A={},C=.5){let{voice:R="sawtooth",pitch:F=30,resonance:B=25,volume:v=10}=A,y=di.currentTime,t=di.createOscillator();if(t.frequency.value=E+(F-55)*8,["sine","square","triangle","sawtooth"].includes(R))t.type=R;else if(R in Un)t.setPeriodicWave(Un[R]);else throw new Error(`Unknown voice "${R}". Did you load it first ?`);let h=di.createGain();h.connect(di.destination);let p=.01,a=.1;if(h.gain.cancelScheduledValues(y),h.gain.setValueAtTime(0,y),h.gain.linearRampToValueAtTime(v/100,y+p),h.gain.linearRampToValueAtTime(0,y+p+a),t.connect(h),B>0){let n=di.createGain();n.connect(di.destination);let r=.05+.01*(B/100),e=.02,s=.2+.25*(B/100),o=v/100*(B/200);n.gain.cancelScheduledValues(y),n.gain.setValueAtTime(0,y),n.gain.setValueAtTime(0,r+y),n.gain.linearRampToValueAtTime(o,y+r+e),n.gain.linearRampToValueAtTime(1e-5,y+r+e+s),t.connect(n)}t.start(0),t.stop(di.currentTime+C)}const Un={};async function Rm(){return fetch("voices/index.json").then(E=>E.json())}async function Lm(E){return fetch(`voices/${E}.json`).then(A=>A.json()).then(A=>{let C=A.real.length,R=new Float32Array(C),F=new Float32Array(C);for(let B=0;B=4&&(t+=Ro(-R/4,R/4));let s=440+t+Ro(-R,R);p.push(setTimeout(()=>{Pm(s,this.options,.5*h),this.pronouncedText+=n.slice(e*3,e{this.pronouncedText+=n,F&&F(this.pronouncedText,y)},y+1)),n.trim()){case"":y+=50*h,t=100-Math.min(R/30,1)*10;break;case",":case";":y+=400*h,t=100;break;case".":case"?":case"!":case` +`:y+=800*h;break;case"...":y+=1200*h;break}}p.push(setTimeout(()=>B&&B(E,y),y)),this.stop=function(){p.forEach(a=>clearTimeout(a)),B&&B(E,y)}}Object.assign(Xr,{loadVoice:Lm,loadVoicesList:Rm,voices:Un});const vi=new Proxy({MUSIC_VOLUME:.2,SFX_VOLUME:.2},{get(E,A){return typeof A=="string"&&localStorage.getItem(A)!=null?JSON.parse(localStorage.getItem(A)):Reflect.get(E,A)},set(E,A,C){return typeof A=="string"&&localStorage.setItem(A,JSON.stringify(C)),Reflect.set(E,A,C)}});function Nt(E,A){const C=k.activeScene;C.cache.audio.has(E)||(C.load.audio(E,[A]),C.load.start())}function Fe(E,A={}){const C=k.activeScene;return new Promise((R,F)=>{var B,v;if(A=Object.assign({volume:vi.MUSIC_VOLUME},A),(B=k.music)!=null&&B.isPlaying){if(k.music.key===E)return;k.music.stop()}try{C.cache.audio.has(E)?(k.music=(v=k.activeScene)==null?void 0:v.sound.add(E,A),k.music.play(),k.music.on(Phaser.Sound.Events.COMPLETE,()=>R())):C.load.once("filecomplete",()=>Fe(E))}catch(y){F(y)}})}let mr=null;function Rs(E){var R;(R=k.music)==null||R.pause(),mr!=null&&mr.stop();const{sound:A,waitEnd:C}=zt(E);mr=A,C.then(()=>{var F;(F=k.music)==null||F.resume(),mr=null})}function zt(E,A={}){var R;A=Object.assign({volume:vi.SFX_VOLUME},A);const C=(R=k.activeScene)==null?void 0:R.sound.add(E,A);return C.play(),{sound:C,waitEnd:new Promise(F=>{C.on(Phaser.Sound.Events.COMPLETE,()=>F())})}}function Om(){const E=document.getElementById("volume_music");E.value=(vi.MUSIC_VOLUME*100).toString(),E.onchange=()=>{var C;vi.MUSIC_VOLUME=+E.value/100,(C=k.music)==null||C.setVolume(vi.MUSIC_VOLUME)};const A=document.getElementById("volume_sfx");A.value=(vi.SFX_VOLUME*100).toString(),A.onchange=()=>{vi.SFX_VOLUME=+A.value/100}}function Mm(E){var A;return Xr(E,Object.assign({onNote(C){var R;(R=k.activeDialog)==null||R.textSprite.setText(C)},onEnd(C){var R,F;(R=k.activeDialog)==null||R.textSprite.setText(C),(F=k.activeDialog)==null||delete F.speech}},(A=k.activeDialog)==null?void 0:A.voice,{volume:vi.SFX_VOLUME*80}))}function gt(E,A,C,R={}){return k.activeScene.add.text(E,A,C,{align:"left",color:"black",fontSize:"12px",fontFamily:"Pokemon",strokeThickness:0,shadow:{offsetX:0,offsetY:0,color:"#000",blur:0,stroke:!1,fill:!1},...R}).setScrollFactor(0)}const Im={steps:[{numberRequired:2,ref:"COMBAT2"},{numberRequired:4,ref:"COMBAT4"},{numberRequired:6,ref:"COMBAT6"}]},Fm={steps:[{numberRequired:1,ref:"DRAGON1"},{numberRequired:2,ref:"DRAGON2"},{numberRequired:3,ref:"DRAGON3"}]},wm={steps:[{numberRequired:2,ref:"EAU2"},{numberRequired:4,ref:"EAU4"},{numberRequired:6,ref:"EAU6"}]},Dm={steps:[{numberRequired:2,ref:"ELEC2"},{numberRequired:4,ref:"ELEC4"},{numberRequired:6,ref:"ELEC6"}]},Nm={steps:[{numberRequired:1,ref:"FEE1"},{numberRequired:2,ref:"FEE2"},{numberRequired:3,ref:"FEE3"}]},bm={steps:[{numberRequired:2,ref:"FEU2"},{numberRequired:4,ref:"FEU4"},{numberRequired:6,ref:"FEU6"}]},Bm={steps:[{numberRequired:2,ref:"GLACE2"},{numberRequired:3,ref:"GLACE3"},{numberRequired:4,ref:"GLACE4"}]},Gm={steps:[{numberRequired:2,ref:"INSECTE2"},{numberRequired:4,ref:"INSECTE4"},{numberRequired:6,ref:"INSECTE6"}]},Um={steps:[{numberRequired:2,ref:"NORMAL2"},{numberRequired:4,ref:"NORMAL4"},{numberRequired:6,ref:"NORMAL6"}]},Vm={steps:[{numberRequired:2,ref:"PLANTE2"},{numberRequired:4,ref:"PLANTE4"},{numberRequired:6,ref:"PLANTE6"}]},Ym={steps:[{numberRequired:2,ref:"POISON2"},{numberRequired:4,ref:"POISON4"},{numberRequired:6,ref:"POISON6"}]},zm={steps:[{numberRequired:2,ref:"PSY2"},{numberRequired:4,ref:"PSY4"},{numberRequired:6,ref:"PSY6"}]},Wm={steps:[{numberRequired:2,ref:"ROCHE2"},{numberRequired:4,ref:"ROCHE4"},{numberRequired:6,ref:"ROCHE6"}]},Hm={steps:[{numberRequired:2,ref:"SOL2"},{numberRequired:4,ref:"SOL4"},{numberRequired:6,ref:"SOL6"}]},Xm={steps:[{numberRequired:2,ref:"SPECTRE2"},{numberRequired:4,ref:"SPECTRE4"},{numberRequired:6,ref:"SPECTRE6"}]},km={steps:[{numberRequired:2,ref:"VOL2"},{numberRequired:4,ref:"VOL4"},{numberRequired:6,ref:"VOL6"}]},uf={[Ut.ref]:Im,[qt.ref]:Fm,[wt.ref]:wm,[$t.ref]:Dm,[se.ref]:Nm,[Ht.ref]:bm,[_t.ref]:Bm,[Xt.ref]:Gm,[Ft.ref]:Um,[kt.ref]:Vm,[Qt.ref]:Ym,[Kt.ref]:zm,[bt.ref]:Wm,[Vt.ref]:Hm,[Yt.ref]:Xm,[Jt.ref]:km};let Cr,je;function Km(E,A){const C=k.activeScene;if(k.activeMenu!=null||Cr===E&&k.stage!==Se.FIGHT)return;Cr!=null&&Xl(),Cr=E,je=C.add.group();const R=20,F=game.scale.width/2,B=C.add.nineslice(F,R,"box1",void 0,200,140,8,8,8,8).setOrigin(.5,0).setScrollFactor(0);je.add(B);const v=gt(F-60,R+16,V(`type.${E.ref}`));je.add(v);const y=C.add.sprite(F-78,R+24,"icons16x16",E.frameIndex);y.setScrollFactor(0),je.add(y);const t=uf[E.ref];let h=R+40;const p=gt(F-86,h,V(`alliance_desc.${E.ref}`),{color:"black",fontSize:"10px",wordWrap:{width:180}});je.add(p);const n=(A===0?k.board.playerAlliances:k.board.otherTeamAlliances).get(E);h+=p.height+10,t.steps.forEach((r,e)=>{var o;const s=gt(F-86,h,`[${r.numberRequired}] ${V(`alliance_desc.${r.ref}`)}`,{color:((o=n.stepReached)==null?void 0:o.ref)===r.ref?"blue":"gray",fontSize:"10px",wordWrap:{width:172}});je.add(s),h+=s.height}),je.setDepth(ft.MENU)}function Xl(){je&&(je.destroy(!0),je=null,Cr=null)}const pi={hello:0,after_hello:1,after_starter_choice:2,end:3},Jm=()=>k.dialogStates.chen===pi.hello?Mt([V("dialog.chen.0"),V("dialog.chen.1"),V("dialog.chen.2"),V("dialog.chen.3"),V("dialog.chen.4"),V("dialog.chen.5"),V("dialog.chen.6"),V("dialog.chen.7")],{speaker:"chen"}).then(()=>{k.dialogStates.chen=pi.after_hello}):k.dialogStates.chen===pi.after_hello?Mt([V("dialog.chen.8")],{speaker:"chen"}):k.dialogStates.chen===pi.after_starter_choice?(k.dialogStates.chen=pi.end,Mt([V("dialog.chen.9",{pokemon:V(`pokemon.${k.player.team[0].entry.ref}`)}),V("dialog.chen.10"),V("dialog.chen.11"),V("dialog.chen.12"),V("dialog.chen.13"),V("dialog.chen.14")],{speaker:"chen"})):Mt([V("dialog.chen.15"),V("dialog.chen.16")],{speaker:"chen"}),jm=()=>k.dialogStates.chen===pi.after_hello?Mt([V("dialog.chen.17")],{speaker:"chen"}):Mt([V("dialog.chen.18"),V("dialog.chen.19"),V("dialog.chen.20"),V("dialog.chen.21"),V("dialog.chen.22")],{speaker:"chen"}).then(()=>{k.dialogStates.chen=pi.after_hello}),Zm=()=>Mt([V("dialog.assistant1.0"),V("dialog.assistant1.1"),{[V("dialog.assistant1.q1")]:()=>[V("dialog.assistant1.r1")],[V("dialog.assistant1.q2")]:()=>[V("dialog.assistant1.r2"),V("dialog.assistant1.r3")],[V("dialog.assistant1.q3")]:()=>[V("dialog.assistant1.r4"),V("dialog.assistant1.r5"),V("dialog.assistant1.r6"),V("dialog.assistant1.r7")]}],{speaker:"assistant1"}),$m=()=>Mt([V("dialog.assistant2.0"),V("dialog.assistant2.1"),V("dialog.assistant2.2"),V("dialog.assistant2.3")],{speaker:"assistant2"}),ff={title:V("room.home"),tilemap:"bourg_palette",tilesets:["tileset_inside"],startAt:"home_exit"};function Bs(E){E.load.image("logo","assets/logo.png"),E.load.image("box1","assets/sprites/box1.png"),E.load.image("box2","assets/sprites/box2.png")}function Oa(E){E.load.image("overworld","assets/maps/Overworld_Tileset.png"),E.load.image("interior","assets/maps/interior_sd.png"),E.load.image("ground","assets/maps/ground.png"),E.load.tilemapTiledJSON("overworld","assets/maps/overworld.json"),E.load.tilemapTiledJSON("labo_chen","assets/maps/labo_chen.json"),E.load.tilemapTiledJSON("foret_de_jade","assets/maps/foret_de_jade.json"),E.load.tilemapTiledJSON("shop_jadielle","assets/maps/shop_jadielle.json")}const df=new Map([[At.Input.Gamepad.Configs.XBOX_360.A,{id:"bouton_A",downColor:"#E71A07",upColor:"#2b2b2b"}],[At.Input.Gamepad.Configs.XBOX_360.B,{id:"bouton_B",downColor:"#00AD3E",upColor:"#2b2b2b"}],[At.Input.Gamepad.Configs.XBOX_360.START,{id:"bouton_START",downColor:"#666",upColor:"#2b2b2b"}],[At.Input.Gamepad.Configs.XBOX_360.BACK,{id:"bouton_SELECT",downColor:"#666",upColor:"#2b2b2b"}],[At.Input.Gamepad.Configs.XBOX_360.UP,{id:"fleche_HAUT",downColor:"#666",upColor:"#3a3a3a"}],[At.Input.Gamepad.Configs.XBOX_360.LEFT,{id:"fleche_GAUCHE",downColor:"#666",upColor:"#3a3a3a"}],[At.Input.Gamepad.Configs.XBOX_360.RIGHT,{id:"fleche_DROITE",downColor:"#666",upColor:"#3a3a3a"}],[At.Input.Gamepad.Configs.XBOX_360.DOWN,{id:"fleche_BAS",downColor:"#666",upColor:"#3a3a3a"}]]),gr=new Map([["f",At.Input.Gamepad.Configs.XBOX_360.A],["e",At.Input.Gamepad.Configs.XBOX_360.A],[" ",At.Input.Gamepad.Configs.XBOX_360.A],["b",At.Input.Gamepad.Configs.XBOX_360.B],["x",At.Input.Gamepad.Configs.XBOX_360.B],["Escape",At.Input.Gamepad.Configs.XBOX_360.B],["Enter",At.Input.Gamepad.Configs.XBOX_360.START],["Backspace",At.Input.Gamepad.Configs.XBOX_360.BACK],["w",At.Input.Gamepad.Configs.XBOX_360.UP],["z",At.Input.Gamepad.Configs.XBOX_360.UP],["a",At.Input.Gamepad.Configs.XBOX_360.LEFT],["q",At.Input.Gamepad.Configs.XBOX_360.LEFT],["s",At.Input.Gamepad.Configs.XBOX_360.DOWN],["d",At.Input.Gamepad.Configs.XBOX_360.RIGHT]]);let Si=null;function Qm(){df.forEach(({id:E},A)=>{const C=document.getElementById(E);C!=null&&(C.addEventListener("pointerdown",()=>{E.startsWith("fleche")&&(Si=E),Vn(A,!0),Lo(A)}),C.addEventListener("pointerup",()=>{Vn(A,!1),E===Si&&(Si=null)}))})}function Vn(E,A){const C=df.get(E);if(C!=null){const R=document.getElementById(C.id);R!=null&&(R.style.fill=A?C.downColor:C.upColor)}}let Ti,js,xr=!1,za;const Vh=3,Yh=300;function nr(E){js=E.input.keyboard.createCursorKeys(),E.input.gamepad.once("connected",A=>{console.log("gamepad connected",A.id)}),E.input.gamepad.on("down",(A,C)=>{Lo(C.index)}),E.input.gamepad.on("up",(A,C)=>{Vn(C.index,!1)}),E.input.keyboard.on("keydown",A=>{A.preventDefault(),gr.has(A.key)&&Lo(gr.get(A.key))}),E.input.keyboard.on("keyup",A=>{A.preventDefault(),gr.has(A.key)&&Vn(gr.get(A.key),!1)}),Ti=E.input.keyboard.addKeys("W,A,S,D,Z,Q"),qm(E)}function qm(E){E.input.setDefaultCursor("none"),E.input.dragDistanceThreshold=Vh,E.input.dragTimeThreshold=Yh,E.add.zone(32,32,320,320),E.input.on("pointerup",A=>{E.input.activePointer.getDuration(){_m(E,A)}),E.input.on("dragstart",(A,C)=>{Na(C)&&zs(C,E)}),E.input.on("dragend",A=>{Ui(E)}),E.input.on("drag",(A,C,R,F)=>{fd(E)})}function kl(E){let A=new At.Math.Vector2(0,0),C=!1;if(E.input.gamepad.total>0){const R=E.input.gamepad.getPad(0);if(R.axes.length){const F=new At.Math.Vector2(R.axes[0].getValue(),R.axes[1].getValue());if(F.length()>.5)return A=F.scale(5),C=!0,{moveVector:A,useAnalogMovement:C}}R.isButtonDown(At.Input.Gamepad.Configs.XBOX_360.LEFT)?A.x=-32:R.isButtonDown(At.Input.Gamepad.Configs.XBOX_360.RIGHT)&&(A.x=32),R.isButtonDown(At.Input.Gamepad.Configs.XBOX_360.UP)?A.y=-32:R.isButtonDown(At.Input.Gamepad.Configs.XBOX_360.DOWN)&&(A.y=32)}return js.left.isDown||Ti.Q.isDown||Ti.A.isDown||Si==="fleche_GAUCHE"?A.x=-32:(js.right.isDown||Ti.D.isDown||Si==="fleche_DROITE")&&(A.x=32),js.up.isDown||Ti.W.isDown||Ti.Z.isDown||Si==="fleche_HAUT"?A.y=-32:(js.down.isDown||Ti.S.isDown||Si==="fleche_BAS")&&(A.y=32),{moveVector:A,useAnalogMovement:C}}function Ma(E){const{moveVector:A,useAnalogMovement:C}=kl(E);return C?Cu(A,E,!1):(A.length()===0?(za&&za.destroy(),xr=!1):A.length()>0&&!xr&&(xr=!0,za=E.time.addEvent({delay:150,callback:()=>{xr=!1}}),k.activeMenu!=null&&k.activeMenu.handleMove!=null?k.activeMenu.handleMove(A):E.scene.key!=="MapScene"&&Cu(A,E,!0)),null)}function Lo(E){switch(Vn(E,!0),E){case(At.Input.Gamepad.Configs.XBOX_360.A??0):t0();break;case(At.Input.Gamepad.Configs.XBOX_360.B??1):e0();break;case(At.Input.Gamepad.Configs.XBOX_360.START??9):i0();break}}function _m(E,A){var C;(C=E.sprites.get("cursor"))==null||C.setPosition(At.Math.Clamp(A.x,0,E.scale.width-15),At.Math.Clamp(A.y,0,E.scale.height-15)),fh()}function t0(){var E;(E=k.activeScene)!=null&&E.onPressA&&k.activeScene.onPressA()}function e0(){var E;(E=k.activeScene)!=null&&E.onPressB&&k.activeScene.onPressB()}function i0(){var E;(E=k.activeScene)!=null&&E.onPressStart&&k.activeScene.onPressStart()}const kr=new Set;function Et(E=0){return new Promise(A=>{const C=setTimeout(()=>{A(),kr.delete(C)},E);kr.add(C)})}function ki(E){return Promise.resolve().then(E)}function cf(){kr.forEach(E=>clearTimeout(E)),kr.clear()}function s0(...E){return E.reduce((A,C)=>A+C,0)}function ni(E,A){return E.splice(E.indexOf(A),1)}function n0(E,A){return Array(Math.ceil(E.length/A)).fill("").map((C,R)=>E.slice(A*R,A*(R+1)))}function Xe(E){return E[Math.floor(Math.random()*E.length)]}function Ia(E,A=1){let C=[],R=[...E],F=0;for(;F0;){const B=Math.floor(Math.random()*R.length);C.push(R[B]),R.splice(B,1),F++}return C}function Oo(E,A){const C=E.map(A),R=s0(...C),F=Math.random()*R;for(let B=0,v=0;BC?C:E}function yr(E,A,C){return E>=A&&E<=C}function vf(E,A){return A.sort((C,R)=>Math.abs(C-E)-Math.abs(R-E))[0]}function r0(E,A){return E.length===A.length&&E.every((C,R)=>A[R]===C)}const St={LEFT:mt.LEFT,RIGHT:mt.RIGHT,UP:mt.UP,DOWN:mt.DOWN,WALKING_LEFT:`WALKING_${mt.LEFT}`,WALKING_RIGHT:`WALKING_${mt.RIGHT}`,WALKING_UP:`WALKING_${mt.UP}`,WALKING_DOWN:`WALKING_${mt.DOWN}`},a0={[St.DOWN]:"_idle_down",[St.UP]:"_idle_up",[St.LEFT]:"_idle_side",[St.RIGHT]:"_idle_side",[St.WALKING_DOWN]:"_walk_down",[St.WALKING_UP]:"_walk_up",[St.WALKING_LEFT]:"_walk_side",[St.WALKING_RIGHT]:"_walk_side"},Er=128,Wa=8;class rr{constructor(A,C,R=St.DOWN,F=1){ut(this,"sprite");ut(this,"state");ut(this,"walkingDirection");ut(this,"isForceMoving");ut(this,"forceMoveTimeout");ut(this,"name");this.name=C;const B=k.activeScene;this.sprite=B.physics.add.sprite(A.x*ye+ye/2,A.y*ye,"characters"),this.sprite.setScale(2),this.state=R,this.sprite.setOrigin(.5,.5),B.physics.world.enable(this.sprite),this.sprite.setBodySize(16,16).setOffset(4,12),this.sprite.setData("character",this),this.sprite.setData("interactionDistance",F),this.walkingDirection=null,this.isForceMoving=!1,this.addAnimations(),rr.prototype.update.call(this)}get isMoving(){return this.walkingDirection!==null}get spriteRowIndex(){if(this.name.startsWith("assistant"))return 3;switch(this.name){case"player":return 0;case"mam":return 1;case"chen":case"chen_end":return 2;case"seller_male":return 4;case"seller_female":return 5;case"trader":return 6+(k.currentDestination.shopId??0)%10;case"healer":return 26;case"info":default:return 16+(k.currentDestination.shopId??0)%10}}get direction(){switch(this.state){case St.LEFT:case St.WALKING_LEFT:return mt.LEFT;case St.RIGHT:case St.WALKING_RIGHT:return mt.RIGHT;case St.UP:case St.WALKING_UP:return mt.UP;case St.DOWN:case St.WALKING_DOWN:default:return mt.DOWN}}update(){this.sprite.play(this.name+a0[this.state],!0),this.sprite.flipX=this.state===St.WALKING_RIGHT||this.state===St.RIGHT}addAnimations(){const A=this.spriteRowIndex*9;zl(this.sprite.anims,"characters",[[`${this.name}_idle_down`,[A]],[`${this.name}_idle_up`,[A+1]],[`${this.name}_idle_side`,[A+2]],[`${this.name}_walk_down`,[A+3,A,A+4,A],Wa],[`${this.name}_walk_up`,[A+5,A+1,A+6,A+1],Wa],[`${this.name}_walk_side`,[A+7,A+2,A+8,A+2],Wa]])}stopMoving(){var A;switch(this.walkingDirection=null,(A=this.sprite.body)==null||A.stop(),this.alignOnGrid(),this.state){case St.WALKING_LEFT:this.state=St.LEFT;break;case St.WALKING_RIGHT:this.state=St.RIGHT;break;case St.WALKING_UP:this.state=St.UP;break;case St.WALKING_DOWN:this.state=St.DOWN;break}}move(A){switch(this.walkingDirection=A,this.alignOnGrid(),A){case mt.DOWN:this.state=St.WALKING_DOWN,this.sprite.setVelocity(0,Er);break;case mt.UP:this.state=St.WALKING_UP,this.sprite.setVelocity(0,-Er);break;case mt.LEFT:this.state=St.WALKING_LEFT,this.sprite.setVelocity(-Er,0);break;case mt.RIGHT:this.state=St.WALKING_RIGHT,this.sprite.setVelocity(Er,0);break}}moveBack(A){let C=mt.UP;switch(this.direction){case mt.LEFT:C=mt.RIGHT;break;case mt.RIGHT:C=mt.LEFT;break;case mt.UP:C=mt.DOWN;break;case mt.DOWN:default:C=mt.UP;break}return this.forceMove(C,A*300)}forceMove(A,C=500){return this.isForceMoving=!0,this.move(A),new Promise(R=>{clearTimeout(this.forceMoveTimeout),this.forceMoveTimeout=setTimeout(()=>{this.isForceMoving=!1,R()},C)})}alignOnGrid(){this.sprite.body!=null&&(this.sprite.body.x=Math.round(this.sprite.body.x),this.sprite.body.y=Math.round(this.sprite.body.y))}}class o0 extends rr{constructor(C,R,F=St.DOWN,B=1){super(C,R,F,B);ut(this,"pokemonToGive");ut(this,"pokemonToReceive");ut(this,"hasExchanged");this.hasExchanged=!1,this.pokemonToGive=Xe(k.player.box.filter(v=>v!=null)),this.pokemonToReceive=Xe(ef())}}class l0{constructor(A){ut(this,"name");ut(this,"sprite");var R;const C=k.activeScene;this.sprite=C.physics.add.sprite(A.x*ri+ye/2,A.y*ri+ye/2,"icons16x16"),this.name=A.name,this.sprite.setSize(A.width,A.height),(R=this.sprite.body)==null||R.setSize(10,10),this.sprite.body&&(this.sprite.body.immovable=!0),this.sprite.type="description",this.sprite.setData("name",this.name),this.sprite.setData("description",this),A.properties.anim?this.sprite.play(A.properties.anim):this.sprite.setAlpha(0)}}function Bi(E){var A,C;return(C=(A=k.activeScene)==null?void 0:A.cameras.main)==null||C.fadeOut(E,202,205,184),Et(E)}function pf(E){var A,C;return(C=(A=k.activeScene)==null?void 0:A.cameras.main)==null||C.fadeIn(E,202,205,184),Et(E)}class h0{constructor(A){ut(this,"sprite");var R;const C=k.activeScene;this.sprite=C.physics.add.sprite(A.x*ri,A.y*ri,"collisions").setOrigin(0,0).setAlpha(0),(R=this.sprite.body)==null||R.setSize(A.width*ri,A.height*ri,!1),this.sprite.setData("type","door"),this.sprite.setData("action",()=>{var F;if(A.properties.to){if(A.properties.to==="exit"&&C.level.canExit()===!1){(F=C.player)==null||F.moveBack(1),setTimeout(()=>{C.disableTriggers=!1},500);return}zt("door"),C.disableTriggers=!0,Bi(250).then(()=>{A.properties.to==="exit"?C.level.exit():(pf(250),C.player.goToDoor(A.properties.to))})}})}}function Pr(E,A){return A.objects[0].objects.filter(C=>{if(C.type===E)return C.tiledY||(C.tiledY=C.y),C.y=C.tiledY-C.height,C.properties=C.properties||{},Object.values(C.properties).forEach(R=>{R&&R.name&&(C.properties[R.name]=R.value)}),C})}function u0(E,A,C){return Pr(A,C).find(R=>R.name===E)}const ri=2,ye=16*ri;class zh{constructor(A){ut(this,"config");ut(this,"tilemap");ut(this,"layer_collisions");ut(this,"layer_ground0");this.config=A}create(){var A,C;this.tilemap=k.activeScene.add.tilemap(this.config.tilemap),this.tilemap.addTilesetImage("interior"),this.layer_collisions=this.tilemap.createLayer("collisions","interior"),(A=this.layer_collisions)==null||A.setVisible(!1).setScale(2),this.layer_ground0=this.tilemap.createLayer("ground0","interior"),(C=this.layer_ground0)==null||C.setScale(2),this.layer_collisions.setCollisionBetween(0,999),this.createGroups(),this.createCharacters(),this.createObjects(),this.createTriggers(),this.config.init&&this.config.init.call(this)}clearTileMap(){var A,C,R;(A=this.tilemap)==null||A.destroy(),(C=this.layer_ground0)==null||C.destroy(),(R=this.layer_collisions)==null||R.destroy()}createGroups(){var C,R;const A=k.activeScene;if((C=A.groups)!=null&&C.render){const F=A.groups.render;setTimeout(()=>F.destroy(),100)}A.groups={},A.groups.characters=A.add.group(),A.groups.characters.enableBody=!0,A.groups.characters.add((R=A.player)==null?void 0:R.sprite),A.groups.objects=A.add.group(),A.groups.objects.enableBody=!0,A.groups.triggers=A.add.group(),A.groups.triggers.enableBody=!0,A.groups.hud=A.add.group()}createCharacters(){const A=k.activeScene;for(const C of Pr("character",this.tilemap)){const R=C.name,F=C.properties.state,B=C.properties.interactionDistance??1;let v;R==="trader"?v=new o0({x:C.x/16,y:C.y/16},R,F,B):v=new rr({x:C.x/16,y:C.y/16},R,F,B),C.sprite=v.sprite,A.groups.characters.add(v.sprite)}}createObjects(){const A=k.activeScene;for(const C of Pr("description",this.tilemap)){const R=new l0(C);A.groups.objects.add(R.sprite)}}createTriggers(){const A=k.activeScene,C=Pr("door",this.tilemap);for(const R of C){const F=new h0(R);A.groups.triggers.add(F.sprite)}}canExit(){return this.config.canExit?this.config.canExit():!0}exit(){var A;this.clearTileMap(),k.activeScene.physics.world.colliders.destroy(),(A=this.config.exit)==null||A.call(this),k.afterEnd(!0)}}let qe=0,Ai=null;function Mo(E){k.activeMenu===null||!k.activeMenu.entries||(qe=(E+k.activeMenu.entries.length)%k.activeMenu.entries.length,Ai==null||Ai.setPosition(k.activeMenu.x+k.activeMenu.entries[qe].x+2,k.activeMenu.y+k.activeMenu.entries[qe].y+12),zt("tick"),k.activeMenu.onSelect&&k.activeMenu.onSelect(k.activeMenu.entries[qe]))}function ar(){var R;if(!k.activeMenu)return!1;let E=null;(R=k.activeMenu)!=null&&R.entries&&(E=k.activeMenu.entries[qe]);const A=k.activeMenu;let C=!1;return A.handleChoice&&E?(C=A.handleChoice(E)!==!1,C&&Le(),!0):(zt(C?"menu_close":"press_ab"),!1)}function Gs(E){E=Object.assign({handleMove:f0,handleCancel:()=>Le(),background:"box2",offset:4},E);const A=k.activeScene;k.activeMenu=E,E.container=A.add.container();const C=A.add.nineslice(E.x,E.y,E.background,void 0,E.width,E.height,E.offset,E.offset,E.offset,E.offset).setOrigin(0,0).setScrollFactor(0);return E.container.add(C),E.draw&&E.draw(E.container),E.entries!=null&&(qe=0,Ai=A.add.sprite(E.x+E.entries[qe].x+2,E.y+E.entries[qe].y+12,"gui",16),A.sprites.set("menuCursor",Ai),Ai.setScrollFactor(0).setScale(.5),E.container.add(Ai),E.entries.forEach((R,F)=>{const B=gt(E.x+8+R.x,E.y+4+R.y,R.label,{color:R.color??"black"});B.setInteractive(),pe(B),B.on("pointerover",()=>Mo(F)),B.on("click",()=>ar()),E.container.add(B)}),E.onSelect&&E.onSelect(E.entries[0])),E.container.setDepth(ft.MENU),E}function Le(){var E,A;!k.activeMenu||!k.activeMenu.container||(zt("menu_close"),(A=(E=k.activeMenu).onClose)==null||A.call(E),k.activeMenu.container.destroy(!0),k.activeMenu=null)}function f0(E){E.y>0?Mo(qe+1):E.y<0&&Mo(qe-1)}const Yn=new Set;function d0(E,A,C,R){if(!E.effect)return console.error("Missing projectile effect",E);const[F,B]=A.position,v=Math.atan2(C.y-A.y,C.x-A.x),y=Math.round(F+Math.cos(v)*12*32),t=Math.round(B+Math.sin(v)*12*32);c0(E,A,F,B,y,t,R)}function c0(E,A,C,R,F,B,v){const y={sprite:ve(E.effect,C,R,v,!0),skill:E,attacker:A,impactedPokemonIds:[]};if(Yn.add(y),E.rotateProjectile){const h=Math.atan2(B-R,F-C);y.sprite.rotation=h}const t=1e3*12/E.travelSpeed;return y.tween=v.tweens.add({targets:y.sprite,x:F,y:B,duration:t,ease:"Linear",onComplete(){Yn.has(y)&&mf(y)}}),y}function mf(E){if(!Yn.has(E))return;const A=k.activeScene;Yn.delete(E),E.tween&&A.tweens.remove(E.tween),E.skill.hitEffect?(E.sprite.setDepth(E.skill.hitEffect.depth??ft.SKILL_EFFECT_ABOVE_POKEMON),E.sprite.play(E.skill.hitEffect.key),E.sprite.once(Phaser.Animations.Events.ANIMATION_COMPLETE,()=>{E.sprite.destroy()})):E.sprite.destroy()}function v0(E){for(const A of Yn){let{x:C,y:R}=A.sprite;C+=8,R+=8;const F=A.skill.projectileRadius,{attacker:B,skill:v}=A,t=B.opponents.filter(h=>{const[p,a]=h.position;return Math.sqrt((p-C)**2+(a-R)**2)i?1:0},h=function(o,i,l,u,f){var d;if(l==null&&(l=0),f==null&&(f=C),l<0)throw new Error("lo must be non-negative");for(u==null&&(u=o.length);lx;0<=x?g++:g--)m.push(g);return m}).apply(this).reverse(),c=[],u=0,f=d.length;uT;0<=T?++m:--m)S.push(B(o,l));return S},e=function(o,i,l,u){var f,d,c;for(u==null&&(u=C),f=o[l];l>i;){if(c=l-1>>1,d=o[c],u(f,d)<0){o[l]=d,l=c;continue}break}return o[l]=f},s=function(o,i,l){var u,f,d,c,m;for(l==null&&(l=C),f=o.length,m=i,d=o[i],u=2*i+1;u=0&&R=0&&F-o&&(i=i-o,y=y+r),l0&&new Date().getTime()-h>this.timeLimit*1e3)return 1/0;var g=f+p(u,e)*this.weight;if(g>d)return g;if(u==e)return c[m]=[u.x,u.y],u;var x,T,S,P,L=t.getNeighbors(u,this.diagonalMovement);for(S=0,x=1/0;P=L[S];++S){if(this.trackRecursion&&(P.retainCount=P.retainCount+1||1,P.tested!==!0&&(P.tested=!0)),T=n(P,f+a(u,P),d,c,m+1),T instanceof A)return c[m]=[u.x,u.y],T;this.trackRecursion&&--P.retainCount===0&&(P.tested=!1),T!A.includes(R));return E.hasAlteration(at.CONFUSION)&&(C=E.team.filter(R=>R!==E)),C=C.filter(R=>!R.untargettable),C.length===0?null:C.reduce((R,F)=>Kr(E,R)C.length&&(R++,F=0)}while(Oe(B,v)!=null||!Xn(B,v));return xf(E,null,B,v)}function N0(E,A,C,R){switch(E){case"teleport":return b0(A,R);case"tunnel":return Tf(A,C,R);case"eclair":return B0(A,R);case"provoc":return G0(A,R);case"encore":return V0(A,C,R);case"metronome":return z0(A,C,R);case"e-coque":return W0(A,R);case"amnesie":return H0(A);case"ultralaser":return X0(A,C,R);case"laser_glace":return k0(A,C,R);case"jackpot":return K0(A,R);case"morphing":return J0(A,C,R);case"evolution":return j0(A,C,R);case"psyko":return Z0(A,R);case"deflagration":return $0(A,R);case"blizzard":return Q0(A,R);case"fatal_foudre":return q0(A,R)}}function b0(E,A){const{x:C,y:R}=E;let F,B;do F=Ce(0,6),B=Ce(0,7);while(F===C||B===R||Oe(F,B)!=null);E.makeUntargettable(150);const[v,y]=Ue(F,B),t=ve(rt.TELEPORT,v,y,A);t.once(At.Animations.Events.ANIMATION_COMPLETE,()=>{t.destroy(),yd(E,F,B,A)})}function Tf(E,A,C){const{x:R,y:F}=E;let B,v;do B=Ce(0,6),v=Ce(0,7);while(B===R||v===F||Oe(B,v)!=null);const y=C.sprites.get(E.uid);C.tweens.add({targets:y,scale:0,duration:250,easing:"Linear"}),ve(rt.TUNNEL,y.x,y.y+8,C),Et(150).then(()=>E.makeUntargettable(850)),A&&Et(450).then(()=>{const t=C.sprites.get(A.uid);t&&ve(rt.TUNNEL,t.x,t.y+8,C)}),Et(850).then(()=>{if(!E.alive)return;const[t,h]=Ue(B,v);ve(rt.TUNNEL,t,h,C),yd(E,B,v,C),C.tweens.add({targets:y,scale:1,duration:250,easing:"Linear"})})}function B0(E,A){const C=Xe(k.board.otherTeam),[R,F]=C.position;Sf(E,R,F,A);const B=_e(Q.ECLAIR,C,E);Ae(B,C,E),re(C,{type:at.PARALYSIE,stacks:50,attacker:E},A)}function Sf(E,A,C,R){for(C-=16;C>=0;)ve(rt.ECLAIR,A,C,R),C-=32}function G0(E,A){const C=k.board.otherTeam.filter(R=>Kr(E,R)<=Math.sqrt(8));for(const R of C){const F=ve(rt.PROVOCATED,R.x+8,R.y,A);Et(500).then(()=>F.destroy()),R.nextAction.timer?Et(R.nextAction.timer.getRemaining()).then(()=>{R.resetTarget(E)}):R.resetTarget(E)}}let Zl=Q.TREMPETTE;function U0(E){E!==Q.ENCORE&&(Zl=E)}function V0(E,A,C){return Et(500).then(()=>$l(Zl,E,A,C))}const Y0=Object.values(Q).filter(E=>De.some(A=>A.ppSkill===E));function z0(E,A,C){const R=Xe(Y0);return Zl=R,$l(R,E,A,C)}function W0(E,A){E.team.forEach(C=>re(C,{type:at.SOIN,stacks:60,attacker:E},A))}function H0(E){E.alterations.forEach(A=>lr(E,A))}function X0(E,A,C){const R=Ca(A.x-E.x,A.y-E.y)??mt.UP;let[F,B]=E.position;const[v,y]=sr(R);F+=v*16,B+=y*16;let t=0;for(;B>=0&&B<=C.scale.height&&F>=0&&F<=C.scale.width;){ve(t===0?rt.ULTRALASER_START:rt.ULTRALASER_BEAM,F,B,C).setRotation(Wl(R));const[p,a]=Ws(F,B),n=Oe(p,a);if(n&&n.owner!==E.owner){const r=_e(Q.ULTRALASER,n,E);Ae(r,n,E)}B+=y*32,F+=v*32,t++}}function k0(E,A,C){const R=Ca(A.x-E.x,A.y-E.y)??mt.UP;let[F,B]=E.position;const[v,y]=sr(R);F+=v*16,B+=y*16;let t=0;for(;B>=0&&B<=C.scale.height&&F>=0&&F<=C.scale.width;){ve(t===0?rt.LASER_GLACE_START:rt.LASER_GLACE_BEAM,F,B,C).setRotation(Wl(R));const[p,a]=Ws(F,B),n=Oe(p,a);if(n&&n.owner!==E.owner){const r=_e(Q.LASER_GLACE,n,E);Ae(r,n,E),re(n,{type:at.GEL,stacks:50,attacker:E},C)}B+=y*32,F+=v*32,t++}}function K0(E,A){const C=Math.random()<.5,[R,F]=E.position;ve(C?rt.JACKPOT_WIN:rt.JACKPOT_LOSE,R,F-24,A),C&&(k.player.inventory.pokeball+=1,Ei())}function J0(E,A,C){E.initialEntry=E.entry,E.entry=A.entry,Ba(E,C);const R=yi(E,C);R.play(`${E.entry.ref}_${E.facingDirection}`),C.sprites.set(E.uid,R)}function j0(E,A,C){const R=new Map([[Ut,ze],[qt,$e],[wt,$e],[$t,si],[se,$e],[Ht,ze],[_t,si],[Xt,si],[Ft,$e],[kt,si],[Qt,$e],[Kt,ze],[bt,ze],[Vt,ze],[Yt,si],[Jt,$e]]);E.entry=R.get(A.types[0])??si,Ci(E,.2*E.maxPV),Ba(E,C);const F=yi(E,C);F.play(`${E.entry.ref}_${E.facingDirection}`),C.sprites.set(E.uid,F)}function Z0(E,A){E.opponents.forEach(C=>{A.cameras.main.flash(250,255,0,255),re(C,{type:at.CONFUSION,stacks:40,attacker:E},A),Et(Q.PSYKO.hitDelay).then(()=>{const R=_e(Q.PSYKO,C,E);Ae(R,C,E)})})}function $0(E,A){const C=[];E.opponents.forEach(R=>{re(R,{type:at.BRULURE,stacks:60,attacker:E},A),C.push([R.x,R.y])}),A.cameras.main.flash(250,255,0,0),C.reduce((R,[F,B])=>R.then(()=>{const[v,y]=Ue(F,B),t=ve(rt.ERUPTION_PENDING,v,y-16,A);return Et(1500).then(()=>{t.play(rt.ERUPTION)}).then(()=>Et(100)).then(()=>{const h=Oe(F,B);if(h){const p=_e(Q.DEFLAGRATION,h,E);Ae(p,h,E)}}),Et(100)}),Et(10))}function Q0(E,A){const C=[];return E.opponents.forEach(R=>{re(R,{type:at.GEL,stacks:jt(80-R.speed,20,60),attacker:E},A),C.push([R.x,R.y])}),A.cameras.main.flash(250,64,128,255),C.reduce((R,[F,B])=>{const[v,y]=Ue(F,B),t=v-A.scale.width/2,h=y-A.scale.height;return R.then(()=>Et(100)).then(()=>{const p=ve(rt.GRELON,t,h,A,!0),a=A.tweens.add({targets:p,x:v,y,duration:1500,ease:"Linear",onComplete(){A.tweens.remove(a),yh.hitEffect&&(p.play(yh.hitEffect.key),p.once(At.Animations.Events.ANIMATION_COMPLETE,()=>p.destroy()));const n=Oe(F,B);if(n){const r=_e(Q.BLIZZARD,n,E);Ae(r,n,E)}}})})},Et(10))}function q0(E,A){E.opponents.forEach(F=>{re(F,{type:at.PARALYSIE,stacks:40,attacker:E},A)});const R=Ia(E.opponents,3);return A.cameras.main.flash(255,255,192,192),R.reduce((F,B)=>{const[v,y]=B.position;return F.then(()=>{Sf(E,v,y,A);const t=_e(Q.FATAL_FOUDRE,B,E);Ae(t,B,E)}).then(()=>Et(Ce(300,500)))},Et(250))}function $l(E,A,C,R){if(E.behavior===ht.DIRECT_HIT)return _0(E,A,C,R);if(E.behavior===ht.PROJECTILE)return d0(E,A,C,R);if(E.behavior===ht.SPECIAL)return tg(E,A,C,R);if(E.behavior===ht.AREA_OF_EFFECT)return eg(E,A,C,R);console.error(`Not yet implemented: ${E.ref}`)}function ve(E,A,C,R,F){const B=R.add.sprite(A,C,"effects");return B.scale=(E==null?void 0:E.scale)??1,B.blendMode=Phaser.BlendModes.OVERLAY,B.tint=(E==null?void 0:E.tint)??16777215,B.setDepth(E.depth??ft.SKILL_EFFECT_ABOVE_POKEMON),B.alpha=(E==null?void 0:E.opacity)??1,B.play(E.key),F||B.once(Phaser.Animations.Events.ANIMATION_COMPLETE,()=>{B.destroy()}),B}function Da(E,A,C,R){const F=E.effect;if(!F)return;let[B,v]=C.position,y=0,t=0;const h=Math.atan2(C.y-A.y,C.x-A.x);F.position==="source"||F.position==="parabolic_to_target"?([B,v]=A.position,y=Math.round(Math.cos(h)*(F.delta??8)),t=Math.round(Math.sin(h)*(F.delta??8))):F.position==="target"||F.position==="target_to_source"?(y=Math.round(Math.cos(h+Math.PI)*(F.delta??8)),t=Math.round(Math.sin(h+Math.PI)*(F.delta??8))):F.position==="target_ground"?t=F.delta??0:F.position==="source_ground"&&([B,v]=A.position,t=F.delta??0);const p=ve(F,B+y,v+t,R);if(E.rotateSprite&&(p.rotation=h),F.position==="target_to_source"){const[a,n]=A.position;R.tweens.add({targets:p,x:a,y:n,duration:E.hitDelay??250,ease:"Linear",onComplete(){E.hitEffect||p.destroy()}})}if(F.position==="parabolic_to_target"){const[a,n]=A.position,[r,e]=C.position,s=new Phaser.Math.Vector2(a,n),o=new Phaser.Math.Vector2(a+(r-a)*.2,n-20),i=new Phaser.Math.Vector2(a+(r-a)*.8,e-20),l=new Phaser.Math.Vector2(r,e),u=new Phaser.Curves.CubicBezier(s,o,i,l),f={t:0},d=E.hitDelay??250;R.tweens.add({targets:f,t:1,duration:d,ease:"Linear",onComplete(){E.hitEffect||p.destroy()},onUpdate:(c,m)=>{const g=u.getPoint(m.t);p.x=g.x,p.y=g.y}})}Et(E.hitDelay??0).then(()=>{if(E.hitEffect){const a=E.hitEffect;p.scale=a.scale??1,p.play(a.key),p.setDepth(a.depth??ft.SKILL_EFFECT_ABOVE_POKEMON),p.once(Phaser.Animations.Events.ANIMATION_COMPLETE,()=>{p.destroy()})}if(E.knockback){const a=Math.atan2(A.y-C.y,C.x-A.x);Af(C,a,R)}})}function _0(E,A,C,R){Da(E,A,C,R),E.triggerAlteration&&re(C,{...E.triggerAlteration,attacker:A},R),E.chargeDelta&&sg(A,C,E.chargeDelta,R),Et(E.hitDelay??0).then(()=>{const F=_e(E,C,A);if(yg(A,C,E)){for(const B of A.buffs.onHit)B({target:C,attacker:A,damage:F,skill:E});for(const B of C.buffs.onHitReceived)B({damage:F,attacker:A,skill:E});Ae(F,C,A),E.selfDamage&&Ae(Lf(E,A),A,A)}E.hitAlteration&&re(C,{...E.hitAlteration,attacker:A},R),E.selfAlteration&&re(A,{...E.selfAlteration,attacker:A},R)})}function tg(E,A,C,R){Da(E,A,C,R),E.triggerSpecial&&Et(E.triggerSpecialDelay??0).then(()=>N0(E.triggerSpecial,A,C,R)),E.triggerAlteration&&re(C,{...E.triggerAlteration,attacker:A},R),E.selfAlteration&&re(A,{...E.selfAlteration,attacker:A},R)}function eg(E,A,C,R){Da(E,A,C,R),E.selfAlteration&&re(A,{...E.selfAlteration,attacker:A},R);const F=E.getTilesImpacted(A,C).filter(([v,y])=>Xn(v,y));let B=!1;Et(E.hitDelay??0).then(()=>{for(const[v,y]of F){const t=Oe(v,y);if(t&&t.owner!==A.owner){const h=_e(E,t,A);for(const p of t.buffs.onHitReceived)p({damage:h,attacker:A,skill:E});if(!B){B=!0;for(const p of A.buffs.onHit)p({target:t,attacker:A,damage:h,skill:E})}Ae(h,t,A),E.hitAlteration&&re(t,{...E.hitAlteration,attacker:A},R)}}E.selfDamage&&Ae(Lf(E,A),A,A)})}function ig(E,A,C){const R=C.sprites.get(E.uid);if(!R)return;const[F,B]=E.position,v=new Phaser.Math.Vector2(F,B),y=new Phaser.Math.Vector2(F,B-20),t=new Phaser.Curves.CubicBezier(v,y,y,v),h={t:0},p=250+A*C.gameSpeed;R.anims.resume(),Et(p).then(()=>{E.alive&&R.anims.pause()}),C.tweens.add({targets:h,t:1,duration:p,ease:Phaser.Math.Easing.Circular.InOut,onUpdate:(a,n)=>{const r=t.getPoint(n.t);R.x=r.x,R.y=r.y}})}function sg(E,A,C,R){const F=Math.atan2(A.y-E.y,A.x-E.x),B=R.sprites.get(E.uid);if(!B)return;const{x:v,y}=B,t=1e7/(E.speed+40)/R.gameSpeed;B.anims.resume(),R.tweens.add({targets:B,x:v+C*Math.cos(F),y:y+C*Math.sin(F),duration:Math.min(150,t),ease:Phaser.Math.Easing.Cubic.In,onComplete(){var h;R.tweens.add({targets:B,x:v,y,duration:250,ease:Phaser.Math.Easing.Linear}),E.alive&&((h=B.anims)!=null&&h.isPlaying)&&B.anims.pause()}})}function Af(E,A,C){var e;const R=C.sprites.get(E.uid);let F=((e=E.alliances.get(wt))==null?void 0:e.stepReachedN)??0;if(!R||F===0||E.untargettable)return;const B=Nv(A),[v,y]=sr(B);let{x:t,y:h}=E,p=0;for(;Xn(t+v,h+y)&&Oe(t+v,h+y)==null&&F>0;)t+=v,h+=y,F--,p++;if(p===0)return;const a=p*500;E.makeUntargettable(a),Cf(E,a,C),E.x=t,E.y=h;const[n,r]=Ue(t,h);C.tweens.add({targets:R,x:n,y:r,duration:a,ease:Phaser.Math.Easing.Expo.Out,onComplete(){E.alive&&E.resetAction()}})}function Cf(E,A,C){E.resetAction({type:Ge.IDLE,timer:C.time.addEvent({delay:A,callback:()=>E.resetAction()})})}function ng(E,A){E.alterations.forEach(C=>{if(rg(E,C),C.keepStacks||C.stacks--,C.stacks<=0)lr(E,C);else if(C.effectSprite){const R=A.sprites.get(E.uid);R?C.effectSprite.setPosition(R.x,R.y+(C.effectDelta??0)):C.effectSprite.destroy()}})}function rg(E,A){const C=k.activeScene,R=C.sprites.get(E.uid),F=C.gameSpeed/1e3;switch(A.type){case at.POISON:{const B=Eg(E,A,C);Ae(B,E,A.attacker,!0,!0);break}case at.BRULURE:{const B=Tg(E,C);Ae(B,E,A.attacker,!0,!1);const v=E.alterations.find(y=>y.type===at.GEL);v&&(v.stacks-=3);break}case at.SOMMEIL:R==null||R.anims.pause();break;case at.LIGOTAGE:{const B=E.maxPV*.02*F;Ae(B,E,A.attacker,!0,!1);break}case at.SOIN:Ci(E,.1*F*E.level);break;case at.REPOS:Ci(E,5/100*F*E.maxPV);break;case at.EXECUTION:E.pv<30/100*E.maxPV&&Of(E);break;case at.DAMAGE_OVER_TIME:Ae(5*F,E,A.attacker);break;case at.TOURBILLON:switch(E.facingDirection){case mt.UP:E.facingDirection=mt.RIGHT;break;case mt.RIGHT:E.facingDirection=mt.DOWN;break;case mt.DOWN:E.facingDirection=mt.LEFT;break;case mt.LEFT:default:E.facingDirection=mt.UP;break}R==null||R.play(`${E.entry.ref}_${E.facingDirection}`);break}}function ag(E){return E.hasAlteration(at.TOURBILLON)||E.hasAlteration(at.SOMMEIL)}function re(E,A,C){if(!E.alive||E.unalterable&&[at.BRULURE,at.CONFUSION,at.GEL,at.PARALYSIE,at.PEUR,at.POISON,at.SOMMEIL].includes(A.type))return;E.item===vn&&(E.unalterable=!0,setTimeout(()=>{E.unalterable=!1},10*1e3),E.item=null,zt("heal_ailment"));const R=E.alterations.find(F=>F.type===A.type);if(R){if([at.SOMMEIL,at.PEUR,at.CONFUSION].includes(A.type))return;if(R.stacks+=A.stacks,A.type===at.RAGE){const F=C.sprites.get(E.uid);if(!F)return console.error(`Error, can't find pokemon sprite uid ${E.uid}`);F.setTint(Phaser.Display.Color.GetColor(255,jt(200-A.stacks*40,0,255),jt(128-A.stacks*30,0,255)))}}else{const F=C.sprites.get(E.uid);if(!F)return console.error(`Error, can't find pokemon sprite uid ${E.uid}`);switch(A.type){case at.TOURBILLON:{E.resetAction();const B=A.stacks*C.gameSpeed;E.makeUntargettable(B),Cf(E,B,C),ig(E,A.stacks,C);break}case at.BRULURE:if(E.hasType(wt))return;A.effectSprite=ve(rt.BURN,F.x,F.y,C);break;case at.GEL:if(E.hasType(Ht))return;A.effectSprite=ve(rt.FROZEN,F.x,F.y,C),E.makeUntargettable(A.stacks*C.gameSpeed);break;case at.SOMMEIL:if(E.item===Tn||E.hasType(Yt))return;E.resetAction(),A.effectSprite=ve(rt.SOMMEIL,F.x,F.y,C);break;case at.CONFUSION:if(E.hasType(Kt))return;E.resetAction(),A.effectSprite=ve(rt.CONFUSION,F.x,F.y,C);break;case at.PARALYSIE:A.effectSprite=ve(rt.PARALYSIE,F.x,F.y,C);break;case at.PEUR:if(E.hasType(Ut))return;E.resetAction(),A.effectSprite=ve(rt.PEUR,F.x,F.y,C);break;case at.POISON:A.effectSprite=ve(rt.POISON,F.x,F.y-8,C),A.effectDelta=-8;break;case at.SOIN:case at.REPOS:A.effectSprite=ve(rt.SOIN,F.x,F.y-8,C);break;case at.RAGE:F.setTint(Phaser.Display.Color.GetColor(255,200,200));break}E.alterations.push({...A})}A.type===at.REPOS&&re(E,{type:at.SOMMEIL,stacks:A.stacks,attacker:E},C)}function lr(E,A){if(ni(E.alterations,A),A.effectSprite&&A.effectSprite.destroy(),A.type===at.SOMMEIL){const R=k.activeScene.sprites.get(E.uid);R==null||R.anims.resume();const F=E.alterations.find(B=>B.type===at.REPOS);F&&lr(E,F)}(A.type===at.CONFUSION||A.type===at.GEL)&&E.resetAction()}function og(){k.allPokemonsOnBoard.forEach(E=>{E.alterations.forEach(A=>{lr(E,A)})})}let Ie={pokemons:[],damageDone:new Map,damageReceived:new Map,heal:new Map};function lg(){return Ie}function hg(){Ie={pokemons:k.allPokemonsOnBoard,damageDone:new Map,damageReceived:new Map,heal:new Map}}function ug(){for(const[E,A]of Ie.damageDone)Ie.pokemons.find(R=>R.uid===E)||console.error(`Unknown pokemon UID: ${E}`);for(const[E,A]of Ie.damageReceived)Ie.pokemons.find(R=>R.uid===E)||console.error(`Unknown pokemon UID: ${E}`);for(const[E,A]of Ie.heal)Ie.pokemons.find(R=>R.uid===E)||console.error(`Unknown pokemon UID: ${E}`)}function fg(E,A){Ie.damageDone.set(E.uid,(Ie.damageDone.get(E.uid)??0)+A)}function dg(E,A){Ie.damageReceived.set(E.uid,(Ie.damageReceived.get(E.uid)??0)+A)}function cg(E,A){Ie.heal.set(E.uid,(Ie.heal.get(E.uid)??0)+A)}function Pf(E,A){const C=At.Math.Distance.Snake(E.x,E.y,A.x,A.y),R=C<=E.entry.baseSkill.attackRange||E.entry.ppSkill&&E.pp>=E.entry.maxPP&&C<=E.entry.ppSkill.attackRange,F=E.hasAlteration(at.GEL)||E.hasAlteration(at.PEUR)||E.hasAlteration(at.SOMMEIL);return R&&!F}function vg(E){return!(E.hasAlteration(at.GEL)||E.hasAlteration(at.LIGOTAGE)||E.hasAlteration(at.SOMMEIL)||E.hasAlteration(at.PARALYSIE))}function pg(E,A){if(E.nextAction.timer)return;if(E.nextAction.type===Ge.JUMP)return xg(E,A);if(E.nextAction.type!==Ge.IDLE||!E.alive||ag(E))return;const C=gf(E);C==null||!C.alive?E.resetAction():Pf(E,C)?mg(E,C,A):vg(E)&&Rf(E,C,A)}function cu(E,A,C){const R=C.sprites.get(E.uid);if(R==null)return console.error(`Sprite not found for pokemon ${E.uid}`);E.facingDirection=Pa(A.x-E.x,A.y-E.y),R.play(`${E.entry.ref}_${E.facingDirection}`,!0)}function Rf(E,A,C){const R=C.sprites.get(E.uid);if(R==null){console.error(`Sprite not found for pokemon ${E.uid}`);return}if(A.nextAction.type===Ge.MOVE&&A.nextAction.target===E&&Kr(E,A)<2){E.resetAction({type:Ge.IDLE,target:A});return}let F=yf(E,A);if(F.length===0){const B=Ef(E,[A]);if(B!=null){Rf(E,B,C);return}F=D0(E,A)}if(E.resetAction({type:Ge.MOVE,path:F,target:A}),E.nextAction.path&&E.nextAction.path.length>=3){const[B,v]=E.nextAction.path[1],[y,t]=Ue(B,v);E.facingDirection=Pa(B-E.x,v-E.y),R.play(`${E.entry.ref}_${E.facingDirection}`,!0),R.anims.resume(),E.x=B,E.y=v;const h=25e5/(E.speed+30)/C.gameSpeed;C.tweens.add({targets:R,x:y,y:t,duration:h,ease:"Linear"}),C.time.addEvent({delay:h,callback:()=>{E.alive&&E.resetTarget(A)}})}else E.resetTarget(A)}function mg(E,A,C){if(C.sprites.get(E.uid)==null)return console.error(`Sprite not found for pokemon ${E.uid}`);const F=100+1e7/(E.speed+50)/C.gameSpeed;E.resetAction({type:Ge.ATTACK,target:A}),cu(E,A,C),E.nextAction.timer=C.time.addEvent({delay:F,loop:!0,callback:()=>{if(!E.alive)return;if(!A.alive||A.untargettable||!Pf(E,A))return E.resetAction();E.facingDirection=Pa(A.x-E.x,A.y-E.y),E.pp=Math.min(E.entry.maxPP,E.pp+1),cu(E,A,C);let B=E.entry.baseSkill;E.entry.ppSkill&&E.pp>=E.entry.maxPP&&(B=E.entry.ppSkill,U0(B),E.pp=0),$l(B,E,A,C)}})}function gg(){const E=new Set;for(const A of k.allPokemonsOnBoard){if(!A.hasType(Jt))continue;let C=A.placementX,R=A.owner===xe?0:7,F=1,B=0;for(;Oe(C,R)!=null||E.has([C,R].join(","));){do C+=F,F=-1*(Math.abs(F)+1)*Math.sign(F);while((C<0||C>=7)&&Math.abs(F)<=8);if(Math.abs(F)>8&&(R=A.owner===xe?B:7-B,C=A.placementX,F=1,B++),B>4)return}A.resetAction({type:Ge.JUMP,path:[[C,R]]}),E.add([C,R].join(","))}}function xg(E,A){if(!E.nextAction||!E.nextAction.path)return;const C=A.sprites.get(E.uid);if(C==null)return console.error(`Sprite not found for pokemon ${E.uid}`);const[R,F]=E.nextAction.path[0],[B,v]=Ue(R,F);E.facingDirection=Pa(R-E.x,F-E.y),C.play(`${E.entry.ref}_${E.facingDirection}`),E.x=R,E.y=F;const y=1e3;E.makeUntargettable(y),A.tweens.add({targets:C,x:{value:B,duration:y,ease:At.Math.Easing.Circular.InOut},y:{value:v,duration:y,ease:At.Math.Easing.Circular.InOut},scale:{value:1.25,duration:y/2,ease:At.Math.Easing.Circular.InOut,yoyo:!0}}),E.resetAction({type:Ge.IDLE,timer:A.time.addEvent({delay:y,callback:()=>E.resetAction()})})}function yg(E,A,C){const R=(E.precision-(A.dodge??0))*(C.precision??1);return R>=1?!0:Math.random()<=R}function Ae(E,A,C,R=!1,F=!1){if(!A.hasAlteration(at.INVULNERABLE))if(A.pv=Math.max(0,A.pv-E),C&&C!==A&&fg(C,E),dg(A,E),R||(A.pp=Math.min(A.entry.maxPP,A.pp+jt(E/A.maxPV*25,2,5))),A.pv===0)Of(A),C&&C.item===bn&&C.owner===xe&&(k.player.inventory.pokeball+=1,Ei());else{const B=A.alterations.find(v=>v.type===at.SOMMEIL);if(B&&!F){const v=Math.ceil(E/A.maxPV*200);B.stacks-=v,console.log(`reducing sommeil stacks by ${v}`),B.stacks<=0&&lr(A,B)}}}function _e(E,A,C){let R=A.types;A.hasAlteration(at.ADAPTATION)&&(R=[E.type]);let F=R.map(B=>{var v;return((v=Yd.get(E.type))==null?void 0:v.get(B))??1}).reduce((B,v)=>B*v);if(F>1){const B=A.alliances.get(Ft);B&&(F=Math.max(1,F-.3*B.stepReachedN))}return C.attack*(1+E.power/50)*F/A.defense}function Lf(E,A){return A.attack*(1+(E.selfDamage??0)/100)/A.defense}function Eg(E,A,C){const R=C.gameSpeed/1e3;let F=jt(A.stacks,1,300)*R*(.025/100)*E.maxPV;const B=E.alliances.get(bt),v=E.owner===xe?k.board.otherTeamAlliances.get(Qt):k.board.playerAlliances.get(Qt);let y=1;return E.hasType(Qt)&&(y-=.5),v&&(y+=.4*v.stepReachedN),B&&(y-=.3*B.stepReachedN),F*=jt(y,0,10),F}function Tg(E,A){let R=.1*(A.gameSpeed/1e3)*E.level,F=1;const B=E.alliances.get(bt);return B&&(F-=.3*B.stepReachedN),R*=F,R}function Of(E){const A=k.board,C=E.owner===1?A.playerTeam:A.otherTeam,R=C.indexOf(E);R!==-1&&(zt(Sa(E.entry)),Io(E),C.splice(R,1),C.length===0&&k.stage===Se.FIGHT&&k.endFight(E.owner))}function Io(E){const A=k.activeScene,C=A.sprites.get(E.uid);if(C==null)return console.error(`Sprite not found for pokemon ${E.uid}`);const R=A.add.sprite(C.x,C.y,"pokeball");R.play(`${E.pokeball}_in`),R.once(At.Animations.Events.ANIMATION_COMPLETE,()=>{R.destroy()}),E.alterations.filter(F=>F.effectSprite!=null).forEach(F=>{var B;return(B=F.effectSprite)==null?void 0:B.destroy()}),Ba(E,A)}function Ci(E,A){(E.hasAlteration(at.BRULURE)||E.hasAlteration(at.RAGE))&&(A*=.5),E.pv=Math.min(E.maxPV,E.pv+A),cg(E,A)}function Mf(E,A){const C=k.activeScene,R=E.level;let F=1;const B=E.owner===xe?k.board.playerAlliances.get(Xt):k.board.otherTeamAlliances.get(Xt);if(E.hasType(Xt)&&B&&(F+=.2*B.stepReachedN),E.item===Pn&&(F+=.3),E.xp+=A*F,E.level=Ho(E.xp),E.item===Fn&&(E.level++,E.xp=Iu(E.level)),R!==E.level){Rs("level_up");const v=[V("dialog.levelup",{name:V(`pokemon.${E.entry.ref}`),level:E.level})];return E.entry.evolution&&E.level>=(E.entry.evolutionLevel??50)&&v.push(()=>{const y=E.entry;E.entry=E.entry.evolution,Rs("success");const t=C.sprites.get(E.uid);if(t!=null){const h=k.board.playerTeam.find(r=>r.uid===E.uid);Da(Q.EVOLUTION,h,h,C);const{x:p,y:a}=t;Ba(h,C);const n=yi(h,C);n.setPosition(p,a),n.play(`${E.entry.ref}_${h.facingDirection}`),C.sprites.set(E.uid,n),(k.stage===Se.PLACEMENT||k.stage===Se.CAPTURE)&&(n.anims.pause(),n.setAlpha(.5))}return V("dialog.evolve",{old:V(`pokemon.${y.ref}`),new:V(`pokemon.${E.entry.ref}`)})}),Mt(v,{speaker:"system"})}return Promise.resolve(E.level)}function Sg(){const E=k.activeScene;E.cameras.main.flash(250,255,0,0),zt("rage");for(const A of k.allPokemonsOnBoard)re(A,{type:at.RAGE,stacks:1,keepStacks:!0},E)}const If={ref:"pierre",frameIndex:8,introFrameIndex:0,dialogs:{start:[V("dialog.pierre.start.0"),V("dialog.pierre.start.1"),V("dialog.pierre.start.2"),V("dialog.pierre.start.3")],victory:[V("dialog.pierre.victory.0"),V("dialog.pierre.victory.1"),V("dialog.pierre.victory.2"),()=>(k.receiveBadge(bl),V("dialog.pierre.victory.3")),V("dialog.pierre.victory.4")],defeat:[V("dialog.pierre.defeat.0"),V("dialog.pierre.defeat.1")]}},Ff={ref:"ondine",frameIndex:9,introFrameIndex:1,dialogs:{start:[V("dialog.ondine.start.0"),V("dialog.ondine.start.1"),V("dialog.ondine.start.2"),V("dialog.ondine.start.3")],victory:[V("dialog.ondine.victory.0"),V("dialog.ondine.victory.1"),()=>(k.receiveBadge(ir),V("dialog.ondine.victory.2"))],defeat:[V("dialog.ondine.defeat.0"),V("dialog.ondine.defeat.1")]}},wf={ref:"major_bob",frameIndex:10,introFrameIndex:2,dialogs:{start:[V("dialog.bob.start.0"),V("dialog.bob.start.1"),V("dialog.bob.start.2"),V("dialog.bob.start.3"),V("dialog.bob.start.4"),V("dialog.bob.start.5")],victory:[V("dialog.bob.victory.0"),V("dialog.bob.victory.1"),()=>(k.receiveBadge(Bl),V("dialog.bob.victory.2"))],defeat:[V("dialog.bob.defeat.0"),V("dialog.bob.defeat.1"),V("dialog.bob.defeat.2")]}},Df={ref:"erika",frameIndex:11,introFrameIndex:3,dialogs:{start:[V("dialog.erika.start.0"),V("dialog.erika.start.1"),V("dialog.erika.start.2"),V("dialog.erika.start.3"),V("dialog.erika.start.4"),V("dialog.erika.start.5"),V("dialog.erika.start.6"),V("dialog.erika.start.7")],victory:[V("dialog.erika.victory.0"),V("dialog.erika.victory.1"),()=>(k.receiveBadge(Gl),[V("dialog.erika.victory.2"),V("dialog.erika.victory.3")])],defeat:[V("dialog.erika.defeat.0"),V("dialog.erika.defeat.1"),V("dialog.erika.defeat.2")]}},Nf={ref:"koga",frameIndex:12,introFrameIndex:4,dialogs:{start:[V("dialog.koga.start.0"),V("dialog.koga.start.1"),V("dialog.koga.start.2"),V("dialog.koga.start.3")],victory:[V("dialog.koga.victory.0"),V("dialog.koga.victory.1"),()=>(k.receiveBadge(Ul),[V("dialog.koga.victory.2"),V("dialog.koga.victory.3"),V("dialog.koga.victory.4"),V("dialog.koga.victory.5")])],defeat:[V("dialog.koga.defeat.0"),V("dialog.koga.defeat.1")]}},bf={ref:"morgane",frameIndex:13,introFrameIndex:5,dialogs:{start:[V("dialog.morgane.start.0"),V("dialog.morgane.start.1"),V("dialog.morgane.start.2"),V("dialog.morgane.start.3"),V("dialog.morgane.start.4")],victory:[V("dialog.morgane.victory.0"),V("dialog.morgane.victory.1"),V("dialog.morgane.victory.2"),()=>(k.receiveBadge(Vl),[V("dialog.morgane.victory.3"),V("dialog.morgane.victory.4"),V("dialog.morgane.victory.5")])],defeat:[V("dialog.morgane.defeat.0")]}},Bf={ref:"auguste",frameIndex:14,introFrameIndex:6,dialogs:{start:[V("dialog.auguste.start.0"),V("dialog.auguste.start.1"),V("dialog.auguste.start.2"),V("dialog.auguste.start.3")],victory:[V("dialog.auguste.victory.0"),V("dialog.auguste.victory.1"),()=>(k.receiveBadge(Yl),[V("dialog.auguste.victory.2"),V("dialog.auguste.victory.3")])],defeat:[V("dialog.auguste.defeat.0")]}},Gf={ref:"giovanni",frameIndex:15,introFrameIndex:7,dialogs:{start:[V("dialog.giovanni.start.0"),V("dialog.giovanni.start.1"),V("dialog.giovanni.start.2")],victory:[V("dialog.giovanni.victory.0"),V("dialog.giovanni.victory.1"),()=>(k.receiveBadge(Aa),[V("dialog.giovanni.victory.2"),V("dialog.giovanni.victory.3")]),V("dialog.giovanni.victory.4"),V("dialog.giovanni.victory.5"),V("dialog.giovanni.victory.6"),V("dialog.giovanni.victory.7")],defeat:[V("dialog.giovanni.defeat.0"),V("dialog.giovanni.defeat.1")]}};var Uf=(E=>(E[E.MET=0]="MET",E[E.BEATEN=1]="BEATEN",E))(Uf||{});const Vf={ref:"hector",frameIndex:16,introFrameIndex:8,dialogs:{start:[()=>(k.dialogStates.hector=0,V("dialog.hector.start.0")),V("dialog.hector.start.1"),V("dialog.hector.start.2"),V("dialog.hector.start.3"),V("dialog.hector.start.4"),V("dialog.hector.start.5")],victory:[V("dialog.hector.victory.0"),V("dialog.hector.victory.1"),V("dialog.hector.victory.2"),()=>(k.dialogStates.hector=1,Ye(bn).then(()=>V("dialog.hector.victory.3"))),V("dialog.hector.victory.4"),V("dialog.hector.victory.5")],defeat:[V("dialog.hector.defeat.0"),V("dialog.hector.defeat.1"),V("dialog.hector.defeat.2")]}};var Yf=(E=>(E[E.MET=0]="MET",E[E.BEATEN=1]="BEATEN",E))(Yf||{});const zf={ref:"sally",frameIndex:17,introFrameIndex:9,dialogs:{start:[()=>(k.dialogStates.sally=0,V("dialog.sally.start.0")),V("dialog.sally.start.1"),V("dialog.sally.start.2"),V("dialog.sally.start.3"),V("dialog.sally.start.4"),V("dialog.sally.start.5")],victory:[V("dialog.sally.victory.0"),V("dialog.sally.victory.1"),V("dialog.sally.victory.2"),V("dialog.sally.victory.3"),()=>(k.dialogStates.sally=1,Ye(Bn).then(()=>V("dialog.sally.victory.4"))),V("dialog.sally.victory.5")],defeat:[V("dialog.sally.defeat.0"),V("dialog.sally.defeat.1"),V("dialog.sally.defeat.2")]}},Fo=[If,Ff,wf,Df,Nf,bf,Gf,Bf,zf,Vf],Wf={ref:"olga",frameIndex:45,introFrameIndex:null,dialogs:{start:[V("dialog.olga.start.0"),V("dialog.olga.start.1"),V("dialog.olga.start.2"),V("dialog.olga.start.3"),V("dialog.olga.start.4"),V("dialog.olga.start.5")],victory:[V("dialog.olga.victory.0"),V("dialog.olga.victory.1")],defeat:[V("dialog.olga.defeat.0")]}},Hf={ref:"aldo",frameIndex:46,introFrameIndex:null,dialogs:{start:[V("dialog.aldo.start.0"),V("dialog.aldo.start.1"),V("dialog.aldo.start.2"),V("dialog.aldo.start.3"),V("dialog.aldo.start.4")],victory:[V("dialog.aldo.victory.0")],defeat:[V("dialog.aldo.defeat.0")]}},Xf={ref:"agatha",frameIndex:47,introFrameIndex:null,dialogs:{start:[V("dialog.agatha.start.0"),V("dialog.agatha.start.1"),V("dialog.agatha.start.2"),V("dialog.agatha.start.3"),V("dialog.agatha.start.4"),V("dialog.agatha.start.5"),V("dialog.agatha.start.6"),V("dialog.agatha.start.7")],victory:[V("dialog.agatha.victory.0"),V("dialog.agatha.victory.1")],defeat:[V("dialog.agatha.defeat.0")]}},kf={ref:"peter",frameIndex:48,introFrameIndex:null,dialogs:{start:[V("dialog.peter.start.0"),V("dialog.peter.start.1"),V("dialog.peter.start.2"),V("dialog.peter.start.3"),V("dialog.peter.start.4"),V("dialog.peter.start.5"),V("dialog.peter.start.6"),V("dialog.peter.start.7")],victory:[V("dialog.peter.victory.0"),V("dialog.peter.victory.1"),V("dialog.peter.victory.2"),V("dialog.peter.victory.3"),V("dialog.peter.victory.4"),V("dialog.peter.victory.5"),V("dialog.peter.victory.6")],defeat:[V("dialog.peter.defeat.0")]}},Kf={ref:"rival",frameIndex:49,introFrameIndex:null,dialogs:{start:[V("dialog.rival.start.0"),V("dialog.rival.start.1"),V("dialog.rival.start.2"),V("dialog.rival.start.3"),V("dialog.rival.start.4"),V("dialog.rival.start.5"),V("dialog.rival.start.6")],victory:[V("dialog.rival.victory.0"),V("dialog.rival.victory.1"),V("dialog.rival.victory.2")],defeat:[V("dialog.rival.defeat.0"),V("dialog.rival.defeat.1"),V("dialog.rival.defeat.2")]}},Jf=[Wf,Hf,Xf,kf,Kf],zn={BEFORE_WILD:0,AFTER_WILD:1,AFTER_CAPTURE_SELF:2},Ag={ref:"assistant_tuto",frameIndex:19,introFrameIndex:null,dialogs:{start:[V("dialog.assistant_tuto.start.0"),V("dialog.assistant_tuto.start.1"),()=>(k.dialogStates.assistant_tuto=zn.BEFORE_WILD,Ye(We,5)),V("dialog.assistant_tuto.start.2"),{[V("yes")]:()=>[V("dialog.assistant_tuto.start.yes0")],[V("no")]:()=>[V("dialog.assistant_tuto.start.no0"),V("dialog.assistant_tuto.start.no1"),V("dialog.assistant_tuto.start.no2"),V("dialog.assistant_tuto.start.no3"),V("dialog.assistant_tuto.start.no4")]}],victory:[V("dialog.assistant_tuto.victory.0")],defeat:[()=>{for(const E of k.board.otherTeam)Io(E);return V("dialog.assistant_tuto.defeat.0")},V("dialog.assistant_tuto.defeat.1")],step2:[()=>(Fe("music_guide"),V("dialog.assistant_tuto.step2.0")),V("dialog.assistant_tuto.step2.1"),V("dialog.assistant_tuto.step2.2"),V("dialog.assistant_tuto.step2.3"),()=>{const E=k.player.team[0].entry;for(const A of k.board.otherTeam)Io(A);return k.dialogStates.assistant_tuto=zn.AFTER_WILD,Et(500).then(()=>{const A=k.activeScene;k.stage=Se.CAPTURE,k.board.otherTeam=Vx(E),zo(k.board.otherTeam[0],A)}),V("dialog.assistant_tuto.step2.4",{name:V(`pokemon.${E.ref}`)})}],step3:[V("dialog.assistant_tuto.step3.0"),V("dialog.assistant_tuto.step3.1"),V("dialog.assistant_tuto.step3.2")]}},Cg={ref:"sbire_rocket",frameIndex:18,introFrameIndex:null,dialogs:{start:[V("dialog.sbire_rocket.start.0"),V("dialog.sbire_rocket.start.1")],victory:[V("dialog.sbire_rocket.victory.0")],defeat:[V("dialog.sbire_rocket.defeat.0")]}},Pg={ref:"sbire_rocket",frameIndex:18,introFrameIndex:null,dialogs:{start:[V("dialog.sbire_rocket_tuto.start.0"),V("dialog.sbire_rocket_tuto.start.1"),V("dialog.sbire_rocket_tuto.start.2"),V("dialog.sbire_rocket_tuto.start.3")],victory:[V("dialog.sbire_rocket_tuto.victory.0"),V("dialog.sbire_rocket_tuto.victory.1"),V("dialog.sbire_rocket_tuto.victory.2")],defeat:[V("dialog.sbire_rocket_tuto.defeat.0")]}},Rg={ref:"dresseur_col_de_montagne",frameIndex:20,introFrameIndex:null,dialogs:{start:[V("dialog.dresseur_col_de_montagne.start.0"),V("dialog.dresseur_col_de_montagne.start.1"),V("dialog.dresseur_col_de_montagne.start.2")],victory:[V("dialog.dresseur_col_de_montagne.victory.0")],defeat:[V("dialog.dresseur_col_de_montagne.defeat.0")]}},Lg={ref:"dresseur_dojo",frameIndex:21,introFrameIndex:null,dialogs:{start:[V("dialog.dresseur_dojo.start.0"),V("dialog.dresseur_dojo.start.1"),V("dialog.dresseur_dojo.start.2")],victory:[V("dialog.dresseur_dojo.victory.0"),V("dialog.dresseur_dojo.victory.1")],defeat:[V("dialog.dresseur_dojo.defeat.0")]}},Og={ref:"dresseur_falaises",frameIndex:22,introFrameIndex:null,dialogs:{start:[V("dialog.dresseur_falaises.start.0"),V("dialog.dresseur_falaises.start.1"),V("dialog.dresseur_falaises.start.2")],victory:[V("dialog.dresseur_falaises.victory.0")],defeat:[V("dialog.dresseur_falaises.defeat.0")]}},Mg={ref:"dresseur_safrania",frameIndex:23,introFrameIndex:null,dialogs:{start:[V("dialog.dresseur_safrania.start.0"),V("dialog.dresseur_safrania.start.1"),V("dialog.dresseur_safrania.start.2")],victory:[V("dialog.dresseur_safrania.victory.0")],defeat:[V("dialog.dresseur_safrania.defeat.0")]}},Ig={ref:"dresseur_piste_cyclable",frameIndex:24,introFrameIndex:null,dialogs:{start:[V("dialog.dresseur_piste_cyclable.start.0"),V("dialog.dresseur_piste_cyclable.start.1"),V("dialog.dresseur_piste_cyclable.start.2")],victory:[V("dialog.dresseur_piste_cyclable.victory.0")],defeat:[V("dialog.dresseur_piste_cyclable.defeat.0")]}},Fg={ref:"dresseur_iles_ecume",frameIndex:25,introFrameIndex:null,dialogs:{start:[V("dialog.dresseur_iles_ecume.start.0")],victory:[V("dialog.dresseur_iles_ecume.victory.0")],defeat:[V("dialog.dresseur_iles_ecume.defeat.0")]}},wg={ref:"dresseur_centrale",frameIndex:26,introFrameIndex:null,dialogs:{start:[V("dialog.dresseur_centrale.start.0"),V("dialog.dresseur_centrale.start.1"),V("dialog.dresseur_centrale.start.2")],victory:[V("dialog.dresseur_centrale.victory.0")],defeat:[V("dialog.dresseur_centrale.defeat.0")]}},Dg={ref:"dresseur_foret_jade",frameIndex:27,introFrameIndex:null,dialogs:{start:[V("dialog.dresseur_foret_jade.start.0"),V("dialog.dresseur_foret_jade.start.1"),V("dialog.dresseur_foret_jade.start.2")],victory:[V("dialog.dresseur_foret_jade.victory.0")],defeat:[V("dialog.dresseur_foret_jade.defeat.0")]}},Ng={ref:"dresseur_azuria",frameIndex:28,introFrameIndex:null,dialogs:{start:[V("dialog.dresseur_azuria.start.0"),V("dialog.dresseur_azuria.start.1")],victory:[V("dialog.dresseur_azuria.victory.0")],defeat:[V("dialog.dresseur_azuria.defeat.0")]}},bg={ref:"dresseur_lavanville",frameIndex:29,introFrameIndex:null,dialogs:{start:[V("dialog.dresseur_lavanville.start.0"),V("dialog.dresseur_lavanville.start.1")],victory:[V("dialog.dresseur_lavanville.victory.0")],defeat:[V("dialog.dresseur_lavanville.defeat.0")]}},Bg={ref:"dresseur_mont_selenite",frameIndex:30,introFrameIndex:null,dialogs:{start:[V("dialog.dresseur_mont_selenite.start.0")],victory:[V("dialog.dresseur_mont_selenite.victory.0")],defeat:[V("dialog.dresseur_mont_selenite.defeat.0")]}},Gg={ref:"dresseur_oceane",frameIndex:31,introFrameIndex:null,dialogs:{start:[V("dialog.dresseur_oceane.start.0"),V("dialog.dresseur_oceane.start.1"),V("dialog.dresseur_oceane.start.2"),V("dialog.dresseur_oceane.start.3")],victory:[V("dialog.dresseur_oceane.victory.0")],defeat:[V("dialog.dresseur_oceane.defeat.0"),V("dialog.dresseur_oceane.defeat.1")]}},Ug={ref:"mr_psy",frameIndex:32,introFrameIndex:null,dialogs:{start:[V("dialog.mr_psy.start.0"),V("dialog.mr_psy.start.1")],victory:[V("dialog.mr_psy.victory.0")],defeat:[V("dialog.mr_psy.defeat.0"),V("dialog.mr_psy.defeat.1"),V("dialog.mr_psy.defeat.2")]}},Vg={ref:"dresseur_champs_verdoyants",frameIndex:33,introFrameIndex:null,dialogs:{start:[V("dialog.dresseur_champs_verdoyants.start.0"),V("dialog.dresseur_champs_verdoyants.start.1")],victory:[V("dialog.dresseur_champs_verdoyants.victory.0"),V("dialog.dresseur_champs_verdoyants.victory.1")],defeat:[V("dialog.dresseur_champs_verdoyants.defeat.0"),V("dialog.dresseur_champs_verdoyants.defeat.1"),V("dialog.dresseur_champs_verdoyants.defeat.2")]}},Yg={ref:"dresseur_camp_nomade",frameIndex:34,introFrameIndex:null,dialogs:{start:[V("dialog.dresseur_camp_nomade.start.0"),V("dialog.dresseur_camp_nomade.start.1"),V("dialog.dresseur_camp_nomade.start.2")],victory:[V("dialog.dresseur_camp_nomade.victory.0")],defeat:[V("dialog.dresseur_camp_nomade.defeat.0")]}},zg={ref:"dresseur_celadopole",frameIndex:35,introFrameIndex:null,dialogs:{start:[V("dialog.dresseur_celadopole.start.0"),V("dialog.dresseur_celadopole.start.1"),V("dialog.dresseur_celadopole.start.2")],victory:[V("dialog.dresseur_celadopole.victory.0"),V("dialog.dresseur_celadopole.victory.1")],defeat:[V("dialog.dresseur_celadopole.defeat.0")]}},Wg={ref:"dresseur_argenta",frameIndex:36,introFrameIndex:null,dialogs:{start:[V("dialog.dresseur_argenta.start.0")],victory:[V("dialog.dresseur_argenta.victory.0")],defeat:[V("dialog.dresseur_argenta.defeat.0")]}},Hg={ref:"dresseur_grotte_azuree",frameIndex:37,introFrameIndex:null,dialogs:{start:[V("dialog.dresseur_grotte_azuree.start.0"),V("dialog.dresseur_grotte_azuree.start.1")],victory:[V("dialog.dresseur_grotte_azuree.victory.0")],defeat:[V("dialog.dresseur_grotte_azuree.defeat.0"),V("dialog.dresseur_grotte_azuree.defeat.1")]}},Xg={ref:"dresseur_carmin",frameIndex:38,introFrameIndex:null,dialogs:{start:[V("dialog.dresseur_carmin.start.0"),V("dialog.dresseur_carmin.start.1"),V("dialog.dresseur_carmin.start.2")],victory:[V("dialog.dresseur_carmin.victory.0")],defeat:[V("dialog.dresseur_carmin.defeat.0")]}},kg={ref:"dresseur_tour_pokemon",frameIndex:39,introFrameIndex:null,dialogs:{start:[V("dialog.dresseur_tour_pokemon.start.0")],victory:[V("dialog.dresseur_tour_pokemon.victory.0")],defeat:[V("dialog.dresseur_tour_pokemon.defeat.0"),V("dialog.dresseur_tour_pokemon.defeat.1")]}},zi={hello:0,has_met:1,has_deposed:2},Kg={ref:"dresseur_pension",frameIndex:40,introFrameIndex:null,dialogs:{start(){return k.dialogStates.pension===zi.has_met?[V("dialog.dresseur_pension.start.0")]:k.dialogStates.pension===zi.has_deposed?[V("dialog.dresseur_pension.start.1")]:(k.dialogStates.pension=zi.has_met,[V("dialog.dresseur_pension.start.2"),V("dialog.dresseur_pension.start.3"),V("dialog.dresseur_pension.start.4"),V("dialog.dresseur_pension.start.5"),V("dialog.dresseur_pension.start.6")])},bye(){return k.dialogStates.pension===zi.has_deposed?[V("dialog.dresseur_pension.bye.0")]:[V("dialog.dresseur_pension.bye.1")]}}},Jg={ref:"dresseur_cave_taupiqueur",frameIndex:41,introFrameIndex:null,dialogs:{start:[V("dialog.dresseur_cave_taupiqueur.start.0"),V("dialog.dresseur_cave_taupiqueur.start.1")],victory:[V("dialog.dresseur_cave_taupiqueur.victory.0"),V("dialog.dresseur_cave_taupiqueur.victory.1")],defeat:[V("dialog.dresseur_cave_taupiqueur.defeat.0")]}},jg={ref:"dresseur_colline_royale",frameIndex:42,introFrameIndex:null,dialogs:{start:[V("dialog.dresseur_colline_royale.start.0"),V("dialog.dresseur_colline_royale.start.1"),V("dialog.dresseur_colline_royale.start.2"),V("dialog.dresseur_colline_royale.start.3")],victory:[V("dialog.dresseur_colline_royale.victory.0")],defeat:[V("dialog.dresseur_colline_royale.defeat.0"),V("dialog.dresseur_colline_royale.defeat.1")]}},Zg={ref:"dresseur_mont_braise",frameIndex:43,introFrameIndex:null,dialogs:{start:[V("dialog.dresseur_mont_braise.start.0"),V("dialog.dresseur_mont_braise.start.1"),V("dialog.dresseur_mont_braise.start.2")],victory:[V("dialog.dresseur_mont_braise.victory.0")],defeat:[V("dialog.dresseur_mont_braise.defeat.0")]}},$g={ref:"sbire_rocket",frameIndex:44,introFrameIndex:null,dialogs:{start:[V("dialog.dresseur_parmanie.start.0"),V("dialog.dresseur_parmanie.start.1")],victory:[V("dialog.dresseur_parmanie.victory.0")],defeat:[V("dialog.dresseur_parmanie.defeat.0")]}},Qg={ref:"dresseur_cramoisile",frameIndex:19,introFrameIndex:null,dialogs:{start:[V("dialog.dresseur_cramoisile.start.0"),V("dialog.dresseur_cramoisile.start.1")],victory:[V("dialog.dresseur_cramoisile.victory.0")],defeat:[V("dialog.dresseur_cramoisile.defeat.0")]}};class wo{constructor(A){ut(this,"ref");ut(this,"name");ut(this,"team");ut(this,"box");ut(this,"inventory");ut(this,"badges");this.ref=A,this.name=`Player ${A}`,this.team=[],this.inventory={[We.ref]:0},this.box=[null,null,null,null,null,null,null,null],this.badges=[]}resetTeam(){return this.team.map(A=>A.reset())}get averagePokemonLevel(){const A=[...this.team,...this.box].sort((R,F)=>(F?F.level:0)-(R?R.level:0)).slice(0,8).filter(R=>R instanceof Fi),C=A.reduce((R,F)=>R+F.level,0);return Math.max(1,Math.floor(C/A.length))}get boxScore(){return[...this.team,...this.box].reduce((A,C)=>C?A+C.level:A,0)}get hasBoxFull(){return this.box.every(A=>A!=null)}get boardAndBox(){return[...this.team,...this.box.filter(A=>A!=null)]}}function xi(E){const A=new Set(E.flatMap(C=>C.types));return new Map([...A].map(C=>[C,qg(E,C)]))}function qg(E,A){const C=uf[A.ref],R=E.filter(B=>B.hasType(A)).length,F=[...C.steps].reverse().find(B=>B.numberRequired<=R)||null;return{type:A,ref:F==null?void 0:F.ref,steps:C.steps,stepReached:F,stepReachedN:F?C.steps.indexOf(F)+1:0,numberOfThatTypeInTeam:R}}const Ql="pokechess_save",jf="pokechess_record";function _g(){var A;if(k.dialogStates.assistant_tuto!==zn.AFTER_WILD)return;const E={day:k.day,currentDestinationRef:k.currentDestination.ref,currentRoomIndex:k.currentRoomIndex,roomOrder:k.roomOrder,players:k.players.map(C=>n1(C)),stage:k.stage,dialogStates:k.dialogStates,seed:k.seed,lastCaptureDestinationRef:(A=k.lastCaptureDestination)==null?void 0:A.ref,lastTourMam:k.lastTourMam,pension:k.pension.map(C=>ql(C)),pokedexSeen:[...k.pokedexSeen],pokedexCaptured:[...k.pokedexCaptured],wokeUpRonflex:k.wokeUpRonflex};localStorage.setItem(Ql,JSON.stringify(E))}function t1(){return localStorage.getItem(Ql)!=null}function e1(){const E=localStorage.getItem(Ql);if(!E)return!1;let A;try{A=JSON.parse(E)}catch(C){return console.error(`Corrupted save :${C}`),!1}return k.day=A.day,k.currentDestination=en[A.currentDestinationRef],k.currentRoomIndex=A.currentRoomIndex,k.roomOrder=A.roomOrder,k.players=A.players.map(C=>vu(C)),k.board=cd(vu(A.players[0])),k.stage=A.stage,k.dialogStates=A.dialogStates,k.seed=A.seed,k.lastCaptureDestination=A.lastCaptureDestinationRef?en[A.lastCaptureDestinationRef]:null,k.lastTourMam=A.lastTourMam,k.pension=A.pension.map(C=>_l(C)),k.pokedexCaptured=new Set(A.pokedexCaptured),k.pokedexSeen=new Set(A.pokedexSeen),k.wokeUpRonflex=A.wokeUpRonflex,!0}function i1(){const E=localStorage.getItem(jf);if(!E)return null;let A;try{return A=JSON.parse(E),{team:A.team.map(C=>_l(C)),pokedexSeen:A.pokedexSeen,pokedexCaptured:A.pokedexCaptured,nbTours:A.nbTours}}catch(C){return console.error(`Corrupted record save :${C}`),null}}function s1(){const E={team:k.player.team.map(A=>ql(A)),pokedexSeen:k.pokedexSeen.size,pokedexCaptured:k.pokedexCaptured.size,nbTours:k.day};localStorage.setItem(jf,JSON.stringify(E))}function n1(E){return{ref:E.ref,name:E.name,team:E.team.map(A=>ql(A)),box:E.box.map(A=>A?Zf(A):null),inventory:E.inventory,badges:E.badges}}function vu(E){return Object.assign(new wo(E.ref),{name:E.name,team:E.team.map(A=>_l(A)),box:E.box.map(A=>A?r1(A):null),inventory:E.inventory,badges:E.badges})}function Zf(E){var A;return{ref:E.entry.ref,xp:E.xp,itemRef:(A=E.item)==null?void 0:A.ref,owner:E.owner}}function r1(E){return new Fi({entry:De.find(C=>C.ref===E.ref)??Ds,owner:E.owner,xp:E.xp,item:E.itemRef?ke[E.itemRef]:void 0})}function ql(E){return{...Zf(E),x:E.placementX,y:E.placementY}}function _l(E){return new Tt({entry:De.find(A=>A.ref===E.ref)??Ds,owner:E.owner,xp:E.xp,item:E.itemRef?ke[E.itemRef]:void 0,x:E.x,y:E.y})}let Pi,he;function Us(E){const A=k.activeScene;if(Pi===E&&k.stage!==Se.FIGHT)return;Pi!=null&&ui(),Pi=E,he=A.add.group();const C=E instanceof Tt&&E.y<4,R=C?game.scale.height-42:42,F=C?game.scale.width/2+20:game.scale.width/2,B=A.add.nineslice(F,R,"box1",void 0,280,84,8,8,8,8).setOrigin(.5,.5).setScrollFactor(0);he.add(B);let v=E.entry.ref;E instanceof Tt&&E.initialEntry===Gr&&(v=Gr.ref);const y=gt(F-50,R-28,`${V(`pokemon.${v}`)} Lv${E.level}`);he.add(y);const t=A.add.sprite(F-92,R-1,"pokemon_portraits");t.play(`${E.entry.ref}_portrait`),t.setScrollFactor(0),he.add(t);const h=gt(F-50,R-12,"HP");he.add(h);const p=gt(F+48,R-12,`${Math.ceil(E.pv).toString().padStart(3)} / ${E.maxPV}`);he.add(p);const a=72,n=A.add.graphics();n.setDepth(ft.MENU_OBJECTS).setScrollFactor(0),n.fillStyle(0).fillRoundedRect(F-30,R-8,a+2,6,4),n.fillStyle(13684896,1).fillRoundedRect(F-29,R-7,a,4,2),n.fillStyle(47872).fillRoundedRect(F-29,R-7,Math.ceil(a*E.pv/E.maxPV),4,2);const r=gt(F-50,R-1,"PP");he.add(r);const e=gt(F+48,R-1,`${Math.floor(E.pp).toString().padStart(3)} / ${E.entry.maxPP}`);he.add(e),n.fillStyle(0).fillRoundedRect(F-30,R+2,a+2,6,4),n.fillStyle(13684896,1).fillRoundedRect(F-29,R+3,a,4,2),n.fillStyle(255,1).fillRoundedRect(F-29,R+3,Math.ceil(a*E.pp/E.entry.maxPP),4,2),he.add(n);const s=A.add.sprite(F-50,R+14,"icons16x16",16);s.setAlpha(.25).setOrigin(0,0).setScrollFactor(0),he.add(s);const o=gt(F-30,R+15,E.attack.toFixed(0));he.add(o);const i=A.add.sprite(F-2,R+14,"icons16x16",17);i.setAlpha(.25).setOrigin(0,0).setScrollFactor(0),he.add(i);const l=gt(F+18,R+15,E.defense.toFixed(0));he.add(l);const u=A.add.sprite(F+46,R+14,"icons16x16",18);u.setAlpha(.25).setOrigin(0,0).setScrollFactor(0),he.add(u);const f=gt(F+66,R+15,E.speed.toFixed(0));he.add(f);const d=A.add.sprite(F+94,R+14,"icons16x16",19);d.setAlpha(.25).setOrigin(0,0).setScrollFactor(0),he.add(d);const c=gt(F+114,R+15,E.entry.baseSkill.attackRange.toFixed(0));he.add(c);for(let m=0;mA=>k.player.team.length>0?[V("dialog.starter.after",{name:V(`pokemon.${k.starters[E].ref}`)})]:[()=>{const C=k.starters[E];return Us(new Fi({entry:C,owner:Wd,level:5})),V("dialog.starter.choose",{name:V(`pokemon.${C.ref}`)})},{[V("yes")]:()=>{const C=k.starters[E];return No(new Tt({entry:C,owner:xe,level:5,x:3,y:6})),ui(),A.sprite.destroy(!0),k.dialogStates.chen=pi.after_starter_choice,Rs("pokemon_received"),hh(2e3),V("dialog.starter.chosen",{name:V(`pokemon.${C.ref}`)})},[V("no")]:()=>ui()}];function Ye(E,A=1,C=!0,R="trainer"){C&&Rs("item_received"),Object.prototype.hasOwnProperty.call(k.player.inventory,E.ref)||(k.player.inventory[E.ref]=0),k.player.inventory[E.ref]+=A;const F=V(`item.${E.ref}`,{defaultValue:"???"});return E===We&&Ei(),hh(2e3),Mt([V("dialog.item_received",{verb:V(R==="finding"?"dialog.find":"dialog.receive"),label:F,quantity:A>1?`x${A}`:""})],{speaker:"system"})}let Tr=0;const pu={unknown:["..?"],tv:[V("descriptions.tv.0"),V("descriptions.tv.1"),()=>[V("descriptions.tv.2"),V("descriptions.tv.3"),V("descriptions.tv.4")][++Tr%3],V("descriptions.tv.5")],frigo:[V("descriptions.frigo.0")],book:[V("descriptions.book.0"),()=>{const E=[V("descriptions.book.1"),V("descriptions.book.2"),V("descriptions.book.3"),V("descriptions.book.4"),V("descriptions.book.5"),V("descriptions.book.6"),V("descriptions.book.7"),V("descriptions.book.8"),V("descriptions.book.9"),V("descriptions.book.10"),V("descriptions.book.11"),V("descriptions.book.12"),V("descriptions.book.13"),V("descriptions.book.14"),V("descriptions.book.15")];return E[++Tr%E.length]}],book_insect:[V("descriptions.book_insect.0"),()=>{let E=k.player.boardAndBox.map(C=>C.entry).filter(C=>C.evolution!=null);E.length===0&&(E=ef().filter(C=>C.evolution!=null));const A=E[Tr%E.length];return Tr++,V("descriptions.book_insect.1",{name:V(`pokemon.${A.ref}`),level:A.evolutionLevel})},V("descriptions.book_insect.2")],map:[V("descriptions.map")],bed:[V("descriptions.bed")],boat:[V("descriptions.boat")],starter1:fo(0),starter2:fo(1),starter3:fo(2),pc_end:[V("descriptions.pc_end.0"),{[V("yes")]:()=>[V("descriptions.pc_end.1"),()=>(s1(),Et(2e3).then(()=>Bi(2e3)).then(()=>{k.activeScene.scene.start("GameOverScene")}),V("descriptions.pc_end.2"))],[V("no")]:()=>[V("descriptions.pc_end.3")]}],pc_record:[V("descriptions.pc_record.0"),()=>{const E=i1();return E?[V("descriptions.pc_record.2",{nbTours:E.nbTours}),V("descriptions.pc_record.3",{nbCaptured:E.pokedexCaptured,nbSeen:E.pokedexSeen}),V("descriptions.pc_record.4"),...n0(E.team.map(A=>`${V(`pokemon.${A.entry.ref}`)} lvl ${A.level}`),2).map(A=>`${A[0]} +${A[1]}`)]:V("descriptions.pc_record.1")},V("descriptions.pc_record.5")]};let co=null;class u1 extends rr{constructor(){super({x:0,y:0},"player");ut(this,"movesBeforeTp");ut(this,"interactionSprite");this.movesBeforeTp=0,this.sprite.setCollideWorldBounds(!0),this.interactionSprite=k.activeScene.make.sprite({x:0,y:0,key:"interactions"}),this.interactionSprite.setVisible(!1).setDepth(ft.DIALOG),k.activeScene.time.addEvent({delay:300,callback:()=>this.checkInFrontOfPlayer(),loop:!0}),window.player=this}update(){super.update(),this.updateControls();const{x:C=0,y:R=0}=this.sprite.getCenter();this.interactionSprite.setPosition(C+8,R-8)}getWatchingPoint(C=1){let{x:R=0,y:F=0}=this.sprite.getCenter();switch(F+=ye/2,this.state){case St.LEFT:case St.WALKING_LEFT:R-=ye*C;break;case St.RIGHT:case St.WALKING_RIGHT:R+=ye*C;break;case St.UP:case St.WALKING_UP:F-=ye*C;break;case St.DOWN:case St.WALKING_DOWN:default:F+=ye*C;break}return{x:R,y:F}}get canInteract(){return!k.activeDialog&&!k.activeMenu}get canMove(){return!k.activeDialog&&!k.activeMenu&&!this.isForceMoving}checkInFrontOfPlayer(){const C=k.activeScene;if(!C.groups)return;const R=this.getObjectWatched(C.groups.characters),F=this.getObjectWatched(C.groups.objects);this.interactionSprite.setVisible(this.canInteract&&!!(R||F)),R?this.interactionSprite.anims.play("interaction_talk",!0):F&&this.interactionSprite.anims.play("interaction_loot",!0)}updateControls(){const{x:C=0,y:R=0}=this.sprite.body??{},F=yr((C+ye/2)%ye,ye/2-1,ye/2+1)&&yr((R+ye/2)%ye,ye/2-1,ye/2+1),{moveVector:B}=kl(this.sprite.scene),v=Hl(B);v===null&&this.isMoving&&!this.isForceMoving&&F?this.stopMoving():v!=null&&v!==this.walkingDirection&&this.canMove&&F&&this.move(v),this.isMoving&&this.movesBeforeTp>0&&this.movesBeforeTp--}getObjectWatched(C){return C.getChildren().find(F=>{if(F instanceof Phaser.GameObjects.Sprite){let{x:B=0,y:v=0}=F.getBottomCenter();const y=F.getData("interactionDistance")??1,{x:t,y:h}=this.getWatchingPoint(y);return v-=8,yr(t,B-4,B+4)&&yr(h,v-4,v+4)}return!1})}doAction(){if(co)return;if(co=setTimeout(()=>{co=null},250),k.activeDialog)return ur();const C=k.activeScene,R=this.getObjectWatched(C.groups.characters);if(R&&this.canInteract)return xx(R.getData("character"),this.state);const F=this.getObjectWatched(C.groups.objects);if(F&&this.canInteract){let B=pu[F.getData("name")]||pu.unknown;typeof B=="function"&&(B=B(F.getData("description"))),Mt(B,{speaker:F.getData("name")}).then(()=>{})}}goToDoor(C){var v;const R=k.activeScene,F=u0(C,"door",R.level.tilemap);(v=this.sprite.body)==null||v.reset(F.x*ri+ye/2,F.y*ri),this.alignOnGrid();const B=mt[F.properties.outDirection]??mt.UP;R.disableTriggers=!0,this.forceMove(B,350).then(()=>{R.disableTriggers=!1})}}function $f(){const E=k.activeScene,A=k.currentRoom,C=E.add.nineslice(E.scale.width/2,-32,"box2",void 0,160,0,4,4,4,4);C.setOrigin(.5,.5);const R=gt(E.scale.width/2,-30,A.name,{color:"#000"});R.setOrigin(.5,.5),R.setScrollFactor(0),C.setSize(R.width+24,R.height+12),C.setScrollFactor(0),C.setDepth(ft.MENU_TOOLTIPS),R.setDepth(ft.MENU_TOOLTIPS+1),E.add.tween({targets:[C,R],duration:400,y:"+=38",ease:"Linear"}),E.add.tween({targets:[C,R],duration:400,y:-36,ease:"Linear",delay:2e3})}class Vs extends At.Scene{constructor(C){super(C);ut(this,"sprites");ut(this,"objects");ut(this,"graphics");this.sprites=new Map,this.objects=new Map}onPressA(){}onPressB(){}onPressStart(){}onClick(C){}preload(){}create(){}}class Qf extends Vs{constructor(){super("RoomScene");ut(this,"player");ut(this,"groups");ut(this,"level");ut(this,"disableTriggers");this.disableTriggers=!1,this.player=null,this.level=new zh(ff)}preload(){Bs(this),bi(this),Oa(this)}create(){const C=k.currentRoom;this.level=new zh(C.level),k.activeScene=this,nr(this),Ra(this.anims),this.physics.world.setBounds(0,0,1600,1600),this.player=new u1,this.level.create(),this.physics.add.collider(this.player.sprite,this.level.layer_collisions),this.children.bringToTop(this.player.sprite),this.cameras.main.startFollow(this.player.sprite),this.cameras.main.setBackgroundColor("black"),this.disableTriggers=!1,C.level.startAt?(this.disableTriggers=!0,this.player.goToDoor(C.level.startAt)):console.error(`No entrance door found for level ${C.name}`),$f(),Fe(C.music)}update(){var C;this.level&&(Ma(this),!this.disableTriggers&&((C=this.player)!=null&&C.sprite)&&this.physics.overlap(this.groups.triggers,this.player.sprite,this.onTrigger,void 0,this),this.groups.characters.getChildren().forEach(R=>{const F=R.getData("character");R.depth=R.y*.001,F==null||F.update()}))}onTrigger(C){const R=C.getData("action");R&&R()}onPressA(){var C;if(k.activeMenu!=null)return ar();(C=this.player)==null||C.doAction()}onPressB(){k.activeMenu!=null&&k.activeMenu.handleCancel()}}var Ct=(E=>(E.ARENA="ARENA",E.WILD="WILD",E.SPECIAL="SPECIAL",E))(Ct||{}),st=(E=>(E.ARENA="ARENA",E.WILD="WILD",E.FREEWALK="FREEWALK",E.TUTORIAL="TUTORIAL",E.SAFARI="SAFARI",E.PENSION="PENSION",E))(st||{});let Wi;function Ei(){const E=k.activeScene;Wi!=null&&Wi.destroy(!0,!0);let A=game.scale.width-64;[st.TUTORIAL,st.PENSION,st.ARENA].includes(k.currentRoom.type)&&(A=-16);let C=[A,-16],R=[A+40,8];E instanceof Qf&&(R=[28,8],C=[-16,-16]);const F=E.add.sprite(C[0],C[1],"pokeball",0);F.play(`POKEBALL_${Wi?"jiggle_once":"in"}`).once(Phaser.Animations.Events.ANIMATION_COMPLETE,()=>F.play("POKEBALL_idle")).setOrigin(0,0).setScrollFactor(0),E.sprites.set("pokeball",F);const B=gt(R[0],R[1],k.player.inventory.pokeball.toString(),{align:"left",color:"white"});B.setStroke("#000000",3),Wi=E.add.group([F,B])}function f1(){Wi&&Wi.destroy(!0)}let mu=-1,gu=[];const qs=20,Jr=100,d1=248,c1=24,v1=1,jr=8,be=28,mi=4,Te=be+mi;let Re=1;function p1(E){zt("menu_open"),Gs({ref:"box",x:qs,y:Jr,width:d1+16*2,height:c1+16*2,background:"box1",offset:8,draw(A){m1(E,A)},handleMove(A){var B;zt("tick");const C=E.sprites.get("cursor");if(!C)return;let R=C.x,F=C.y;if(A.y>0&&Re===1?(Re=0,F+=16):A.y<0&&Re===0&&F<180?Re=1:A.y>0&&Re===0&&F>260?Re=2:A.y<0&&Re===2?Re=0:A.y<0&&Re===1&&Ot.draggedElem!=null?Re=3:A.y>0&&Re===3&&(Re=1),R+=A.x,F+=A.y,Re===1)mu=jt(Math.round((R-(qs+16+mi))/Te),0,7),R=qs+20+mi+Te*mu,F=Jr+16+mi;else if(Re===0){let[v,y]=Ws(R,F+10);v=jt(v,0,6),y=jt(y,4,7),[R,F]=Ue(v,y),F-=10}else Re===2?[R,F]=[vf(R,[100,160,220]),E.scale.height-24]:Re===3&&(R=E.scale.width/2+24,F=10);(B=E.sprites.get("cursor"))==null||B.setPosition(R,F),fh()}})}function m1(E,A){gu.forEach(B=>dr(B)),gu=[];const C=qs+10+mi,R=Jr+10+mi,F=E.add.graphics().lineStyle(2,0,.1).fillStyle(16772829);for(let B=0;B{g1(y,E)}),t.on("click",()=>{Ot.draggedElem!=null&&Ui(E)}),t.on("over",()=>{const h=k.player.box[y];h!=null&&Us(h)}),t.on("out",()=>ui()),A.add(t)}F.stroke().setDepth(ft.MENU_LAYOUT),A.add(F),k.player.box.forEach((B,v)=>{if(B!=null){const y=yi(B,E);qf(y,v)}})}function g1(E,A){var F;const C=(F=Ot.draggedElem)==null?void 0:F.getData("pokemon");if(C==null)return;const R=k.player.box[E];if(R!=null){const B=A.sprites.get(R.uid);B&&Na(B)&&ki(()=>{var v,y;(y=(v=k.activeMenu)==null?void 0:v.container)==null||y.remove(B),zs(B,A)})}hr(C,k.board.playerTeam),Ys(C,E),ba()}function qf(E,A){var F,B;(B=(F=k.activeMenu)==null?void 0:F.container)==null||B.add(E);const C=qs+10+mi+be/2+A%jr*Te,R=Jr+10+mi+be/2+Math.floor(A/jr)*Te;E.anims.pause(),E.setAlpha(1).setScale(1).setDepth(ft.MENU_OBJECTS).setPosition(C,R)}function x1(E,A,C=1e3){return A.setAlpha(0).setScale(0),E.add.timeline([{at:0,tween:{targets:A,scale:1,alpha:1,ease:"Elastic",easeParams:[1.5,.8],duration:400}},{at:C,tween:{targets:A,alpha:0,scale:1,duration:400}}]),Et(C+400)}function y1(E,A,C=400){return E.tweens.add({targets:A instanceof Phaser.GameObjects.Group?A.getChildren():A,alpha:{from:0,to:1},duration:C}),Et(C)}function E1(E,A,C=400){return E.tweens.add({targets:A instanceof Phaser.GameObjects.Group?A.getChildren():A,alpha:{from:1,to:0},duration:C}),Et(C)}function T1(E,A,C=1e3,R=400){return A.setAlpha(0),E.add.timeline([{at:0,tween:{targets:A,alpha:1,duration:R}},{at:C,tween:{targets:A,alpha:0,duration:R}}]),Et(C+R*2)}const Sr=16;function Do(E,A){const C=A.objects.get(`bars_${E.uid}`),R=A.sprites.get(E.uid);if(R!=null&&C!=null){C.setDepth(ft.POKEMON_BARS),C.clear(),C.fillStyle(0,1);const F=R.x-Sr/2,B=R.y-16;C.fillRect(F,B,Sr,2),C.fillStyle(E.owner===1?3211056:16724016,1),C.fillRect(F,B,Math.ceil(E.pv/E.maxPV*Sr),1),C.fillStyle(28927,1),C.fillRect(F,B+1,Math.ceil(E.pp/E.entry.maxPP*Sr),1)}}function S1(E){if(k.stage===Se.FIGHT){for(const A of k.board.playerTeam)Do(A,E);for(const A of k.board.otherTeam)Do(A,E)}}function Zr(E,A){const C=A.add.sprite(A.scale.width/2,A.scale.height/2,"texts");return C.setDepth(ft.CENTER_TEXT).play(E),A.sprites.set("centerText",C),x1(A,C,500)}function xu(E){k.pension.push(E),k.dialogStates.pension=zi.has_deposed}function _f(E){ni(k.pension,E),k.pension.some(A=>A.owner===xe)||(k.dialogStates.pension=zi.has_met)}function A1(){for(const E of k.pension)E.xp+=k.day*100,E.level=Ho(E.xp),E.pv=E.maxPV}function td(E){k.player.inventory.pokeball-=E,Ei()}function Wn(E){return k.player.inventory.pokeball>=E}function Ks(E){return Object.values(ke).filter(A=>A.cost===E)}function C1(E){const A=Ks(1),C=A[(k.seed+E)%A.length],R=Ks(2),F=R[(k.seed>>2+E)%R.length],B=Ks(3),v=B[(k.seed>>4+E)%B.length],y=Ks(4),t=y[(k.seed>>6+E)%y.length],h=Ks(5),p=h[(k.seed>>8+E)%h.length];return{[C.ref]:3,[F.ref]:2,[v.ref]:1,[t.ref]:1,[p.ref]:1}}let Ze;function ed(E){if(Ze&&Ki(),!E)return;const A=k.activeScene;Ze=A.add.group().setOrigin(0,0);const C=64,R=24,F=A.scale.height-C-32,B=A.add.nineslice(R,F,"box1",void 0,A.scale.width-32,C,8,8,8,8).setOrigin(0,0).setScrollFactor(0);Ze.add(B);const v=th(E).setPosition(R+28,F+32).setScrollFactor(0);Ze.add(v),Ze.add(gt(R+56,F+8,V(`item.${E.ref}`),{fontStyle:"strong",color:"blue"})),Ze.add(gt(R+56,F+28,V(`item_desc.${E.ref}`),{wordWrap:{width:A.scale.width-96,useAdvancedWrap:!0}})),Ze.setDepth(ft.MENU)}function Ki(){Ze&&(Ze.destroy(!0),Ze=null)}const Bt={items:[],selectedIndex:0,pageStartIndex:0,numberPerPage:6,get page(){const E=Math.max(0,Bt.pageStartIndex??0);return this.items.slice(E,E+this.numberPerPage)},get selectedItem(){return this.items[this.selectedIndex??0]},get pageSelectedIndex(){return this.page.indexOf(this.selectedItem)}};let oe=null,_s=[],vo=null;function th(E){const A=k.activeScene.add.sprite(0,0,"items",_u.indexOf(E)).setOrigin(.5,.5);return A.setData("item",E),A.setData("type","item"),A}function P1(E){return Bt.items=Object.entries(k.player.inventory).map(([v,y],t)=>({ref:v,label:`${V(`item.${v}`)} x${y}`,quantity:y})).filter(v=>v.quantity>0&&v.ref in ke).sort((v,y)=>y.ref===We.ref?1:v.ref===We.ref?-1:v.label.localeCompare(y.label)),Bt.selectedIndex=0,Bt.pageStartIndex=0,zt("menu_open"),Gs({ref:"items_box",x:184,y:8,width:128,height:130,background:"box1",offset:8,handleMove(v){zt("tick"),v.y>0?Ji(Bt.selectedIndex+1):v.y<0&&Ji(Bt.selectedIndex-1)},handleChoice(){id(Bt.items[Bt.selectedIndex])},draw(v){Bt.selectedIndex=0,oe=E.add.container(184,8),v.add(oe),Ji(0,!1)},onClose(){Ki()}})}function R1(E,A){if(E===Sn){if(k.currentRoom.type!==st.WILD)return Mt([V("dialog.item_no_use")]);k.player.inventory[Sn.ref]-=1,Bx(A)}}function id(E){const A=k.activeScene,C=ke[E.ref];if(C.type===$s.Holdable){Le();const R=th(C);zs(R,A)}else{if(C.type===$s.Usable)return Et(0).then(()=>{const R={[V("yes")](){return R1(C,A),null},[V("no")](){return null}};Mt([V("dialog.item_use",{item:V(`item.${C.ref}`)}),R])}),!0;C.type===$s.Trade&&C===We&&Le()}}function Ji(E,A=!1){var F;const C=k.activeScene;if(E<0||E>=Bt.items.length)return;Bt.selectedIndex=E,EBt.pageStartIndex+Bt.numberPerPage-1&&(Bt.pageStartIndex=E-Bt.numberPerPage+1),L1();const R=ke[Bt.items[Bt.selectedIndex].ref];R?ed(R):Ki(),A&&((F=C.sprites.get("cursor"))==null||F.setPosition(298,20+Bt.pageSelectedIndex*20))}function L1(){const E=k.activeScene;oe&&(oe.removeAll(!0),_s.forEach(A=>dr(A)),_s=[],O1(),vo=E.add.sprite(7,16+Bt.pageSelectedIndex*20,"gui",16),vo.setScale(.5).setDepth(ft.MENU_CURSOR),oe.add(vo),oe.setDepth(ft.MENU),fr(E))}function O1(){const E=k.activeScene;Bt.page.forEach((B,v)=>{const y=E.add.rectangle(64,15+v*20,118,20,v%2?16772829:15654348).setDepth(ft.MENU_LAYOUT);pe(y),_s.push(y),y.on("click",()=>{const p=Bt.items.indexOf(B);p===Bt.selectedIndex?id(Bt.items[p]):Ji(p,!1)});const t=ke[B.ref].type===$s.Trade?"gray":"black",h=gt(16,8+v*20,B.label,{color:t}).setDepth(ft.MENU_OBJECTS).setAlign("left");oe==null||oe.add(y),oe==null||oe.add(h)});const A=E.add.rectangle(64,0,90,6,0).setDepth(ft.MENU_LAYOUT).setAlpha(0);pe(A),_s.push(A),A.on("click",()=>{Ji(Bt.selectedIndex-1,!1)});const C=E.add.sprite(64,0,"gui",16).setScale(.5).setAlpha(Bt.pageStartIndex===0?0:1).setRotation(Phaser.Math.DegToRad(-90));oe==null||oe.add(A),oe==null||oe.add(C);const R=E.add.rectangle(64,130,90,6,0).setDepth(ft.MENU_LAYOUT).setAlpha(0);pe(R),_s.push(R),R.on("click",()=>{Ji(Bt.selectedIndex+1,!1)});const F=E.add.sprite(64,130,"gui",16).setScale(.5).setAlpha(Bt.pageStartIndex+Bt.numberPerPage>=Bt.items.length?0:1).setRotation(Phaser.Math.DegToRad(90));oe==null||oe.add(R),oe==null||oe.add(F)}const yu=36,Eu=30,Lt={allPokemons:De,selectedIndex:0,pageStartIndex:0,numberPerPage:10,get filtered(){return this.allPokemons.filter(E=>ai===null||E.types.includes(ai))},get page(){const E=Math.max(0,Lt.pageStartIndex??0);return this.filtered.slice(E,E+this.numberPerPage)},get selectedPokemon(){return this.filtered[this.selectedIndex??0]},get pageSelectedIndex(){return this.page.indexOf(this.selectedPokemon)}};let Hi=0,ai=null,po=null,Zs=1,pt=null,ji=[];function Tu(E,A){zt("menu_open"),Gs({ref:"pokedex",x:yu,y:Eu,width:280,height:242,background:"box1",offset:8,handleMove(C){var R;zt("tick"),Zs===1&&Lt.selectedIndex!=null&&pt?C.y>0?Zi(Lt.selectedIndex+1):C.y<0&&(Lt.selectedIndex===0?(Zs=0,Lr(Object.keys($).length-1)):(Zi(Lt.selectedIndex-1),(R=E.sprites.get("cursor"))==null||R.setPosition(298,60+Lt.selectedIndex*20))):Zs===0&&pt&&(C.y>0?(Zs=1,Lt.selectedIndex=0,Lt.pageStartIndex=0,Zi(Lt.selectedIndex)):C.x>0?Lr(Hi+1):C.x<0&&Lr(Hi-1)),fr(E)},draw(C){Lt.selectedIndex=0,A!=null&&(Lt.selectedIndex=Lt.filtered.findIndex(R=>R.ref===A.entry.ref),Lt.pageStartIndex=Lt.selectedIndex),pt=E.add.container(yu,Eu),C.add(pt),eh()}})}function eh(){const E=k.activeScene;if(!pt)return;pt.removeAll(!0),ji.forEach(R=>dr(R)),ji=[],pt.add(E.add.line(140,28,0,0,272,0,0).setLineWidth(.5).setDepth(ft.MENU_LAYOUT)),pt.add(E.add.line(179,132,0,0,0,210,0).setLineWidth(.5).setDepth(ft.MENU_LAYOUT));const A=Object.values($),C=Object.values($);ai!=null&&(C.splice(C.indexOf(ai),1),C.push(ai)),C.forEach(R=>{const F=A.indexOf(R);ai===R&&(pt==null||pt.add(E.add.graphics().lineStyle(4,0).strokeCircle(20+F*16,16,8)));const B=E.add.sprite(20+F*16,16,"icons16x16",R.frameIndex);B.setDepth(ft.MENU_OBJECTS),pe(B),ji.push(B),B.on("over",()=>Lr(F,!1)),B.on("click",()=>I1(R)),pt==null||pt.add(B)}),M1(),Lt.filtered.length>0&&Lt.selectedIndex in Lt.filtered&&F1(Lt.selectedPokemon),Zs===1&&Lt.pageSelectedIndex>=0&&(po=E.add.sprite(180,42+Lt.pageSelectedIndex*20,"gui",16),po.setScale(.5).setDepth(ft.MENU_CURSOR),pt.add(po)),pt.setDepth(ft.MENU),fr(E)}function M1(){const E=k.activeScene;Lt.page.forEach((B,v)=>{const y=De.indexOf(B)+1,t=E.add.rectangle(227,42+v*20,94,20,v%2?16772829:15654348).setDepth(ft.MENU_LAYOUT);pe(t),ji.push(t),t.on("click",()=>Zi(Lt.filtered.indexOf(B),!1));const h=gt(188,35+v*20,`${y}. ${V(`pokemon.${B.ref}`).toUpperCase()}`).setDepth(ft.MENU_OBJECTS).setAlign("left");pt==null||pt.add(t),pt==null||pt.add(h)});const A=E.add.rectangle(225,32,90,6,0).setDepth(ft.MENU_LAYOUT).setAlpha(0);pe(A),ji.push(A),A.on("click",()=>{Zi(Lt.selectedIndex-1,!1)});const C=E.add.sprite(228,33,"gui",16).setScale(.5).setAlpha(Lt.pageStartIndex===0?0:.5).setRotation(Phaser.Math.DegToRad(-90));pt==null||pt.add(A),pt==null||pt.add(C);const R=E.add.rectangle(225,234,90,6,0).setDepth(ft.MENU_LAYOUT).setAlpha(0);pe(R),ji.push(R),R.on("click",()=>{Zi(Lt.selectedIndex+1,!1)});const F=E.add.sprite(228,233,"gui",16).setScale(.5).setAlpha(Lt.pageStartIndex+Lt.numberPerPage>=Lt.filtered.length?0:.5).setRotation(Phaser.Math.DegToRad(90));pt==null||pt.add(R),pt==null||pt.add(F)}function Zi(E,A=!0){var R;const C=k.activeScene;E<0||E>=Lt.filtered.length||(Lt.selectedIndex=E,ELt.pageStartIndex+Lt.numberPerPage-1&&(Lt.pageStartIndex=E-Lt.numberPerPage+1),eh(),A&&((R=C.sprites.get("cursor"))==null||R.setPosition(298,63+Lt.pageSelectedIndex*20)))}let Js=null;function Lr(E,A=!0){var R;if(E<0||E>=Object.keys($).length)return;Hi=E;const C=Object.values($)[Hi];Js&&(pt==null||pt.remove(Js,!0)),Js=gt(20+16*Hi,-15,V(`type.${C.ref}`),{color:"white",align:"middle",strokeThickness:4,stroke:"black"}),Js.setOrigin(.5,0).setDepth(ft.MENU_TOOLTIPS),pt==null||pt.add(Js),A&&((R=k.activeScene.sprites.get("cursor"))==null||R.setPosition(50+16*Hi,44))}function I1(E){pt&&(E===ai?ai=null:ai=E,Lt.selectedIndex=0,Lt.pageStartIndex=0,eh(),zt("tick"))}function F1(E){if(!pt)return;const A=k.activeScene;let C=40,R=54;const F=A.add.sprite(C,R,"pokemon_portraits");F.play(`${E.ref}_portrait`),pt.add(F);const B=gt(C+36,R-18,V(`pokemon.${E.ref}`),{fontSize:"14px"});pt.add(B),C+=44;for(let c=0;c{A.setFrame(1)}).on("out",()=>{A.setFrame(0)}).on("click",()=>{E.launchFight()}),pe(A),E.sprites.set("fightButton",A),we.add(A),we.setDepth(ft.GUI_BUTTON)}function D1(E){we=E.add.group(),ih(E),Wn(1)&&G1(E);const A=E.add.sprite(295,E.scale.height-12,"buttons_big",2);A.on("over",()=>{A.setFrame(3)}).on("out",()=>{A.setFrame(2)}).on("click",()=>{zt("run"),Bi(400).then(()=>k.exitDestination())}),pe(A),E.sprites.set("quitButton",A),we.add(A),we.setDepth(ft.GUI_BUTTON)}function N1(E){we=E.add.group(),ih(E);const A=E.add.sprite(295,E.scale.height-12,"buttons_big",2);A.on("over",()=>{A.setFrame(3)}).on("out",()=>{A.setFrame(2)}).on("click",async()=>{const C=k.currentRoom;await Mt(C.trainer.dialogs.bye,{speaker:C.trainer.ref}),zt("run"),await Bi(400),k.exitDestination()}),pe(A),E.sprites.set("quitButton",A),we.add(A),we.setDepth(ft.GUI_BUTTON)}function b1(E){const C=E.add.sprite(100,E.scale.height-12,"buttons",2);C.setData("type","pokedexButton");let R;C.on("click",()=>{var F;if(((F=k.activeMenu)==null?void 0:F.ref)==="pokedex")return Le();Le(),Ot.draggedElem!=null?Ui(E):Tu(E)}).on("over",()=>{if(C.setTint(16768477),Ot.draggedElem!=null){const B=Ot.draggedElem.getData("pokemon");B!=null&&(R=gt(100,E.scale.height-30,V("menu.see_pokemon",{name:V(`pokemon.${B.entry.ref}`)}),{align:"center",color:"white",strokeThickness:4,stroke:"black"}).setOrigin(.5))}else R=gt(100,E.scale.height-30,"POKEDEX",{align:"center",color:"white",strokeThickness:4,stroke:"black"}).setOrigin(.5)}).on("out",()=>{C.setTint(16777215),R==null||R.destroy()}).on("dropReceived",F=>{const B=F.getData("pokemon");B!=null&&(Tu(E,B),gd())}),pe(C),we.add(C)}function ih(E){const A=E.scale.width/2,C=E.add.sprite(A,E.scale.height-12,"buttons",0);C.setData("type","boxButton");let R;C.on("click",()=>{var F;if(Ot.draggedElem!=null)Ui(E);else{if(((F=k.activeMenu)==null?void 0:F.ref)==="box")return Le();Le(),p1(E)}}).on("over",()=>{if(C.setTint(13434828),Ot.draggedElem!=null){const B=Ot.draggedElem.getData("pokemon");B!=null&&(R=gt(A,E.scale.height-30,V("menu.remove_pokemon",{name:V(`pokemon.${B.entry.ref}`)}),{align:"center",color:"white",strokeThickness:4,stroke:"black"}).setOrigin(.5))}else R=gt(A,E.scale.height-30,"POKEMONS",{align:"center",color:"white",strokeThickness:4,stroke:"black"}).setOrigin(.5)}).on("out",()=>{C.setTint(16777215),R==null||R.destroy()}).on("dropReceived",F=>{const B=F.getData("pokemon");B!=null&&(R==null||R.destroy(),k.pension.includes(B)?_f(B):hr(B,k.board.playerTeam),Ys(B),ba())}),pe(C),we.add(C)}function B1(E){const C=E.add.sprite(220,E.scale.height-12,"buttons",1);C.setData("type","bagButton");let R;C.on("click",()=>{var F;if(Ot.draggedElem!=null)Ui(E);else{if(((F=k.activeMenu)==null?void 0:F.ref)==="items_box")return Le();Le(),P1(E)}}).on("over",()=>{if(C.setTint(16777164),Ot.draggedElem!=null){const B=Ot.draggedElem.getData("pokemon"),v=Ot.draggedElem.getData("item");B!=null?R=gt(220,E.scale.height-30,B.item?V("menu.retrieve_item",{item:V(`item.${B.item.ref}`)}):V("menu.no_item",{name:V(`pokemon.${B.entry.ref}`)}),{align:"center",color:"white",strokeThickness:4,stroke:"black"}).setOrigin(.5):v!=null&&(R=gt(220,E.scale.height-30,V("menu.stock_item",{item:V(`item.${v.ref}`)}),{align:"center",color:"white",strokeThickness:4,stroke:"black"}).setOrigin(.5))}else R=gt(220,E.scale.height-30,"ITEMS",{align:"center",color:"white",strokeThickness:4,stroke:"black"}).setOrigin(.5)}).on("out",()=>{C.setTint(16777215),R==null||R.destroy()}).on("dropReceived",F=>{const B=F.getData("pokemon"),v=F.getData("item");B!=null?(R==null||R.destroy(),B.item!=null&&(k.player.inventory[B.item.ref]+=1,B.item=null),gd()):v!=null&&(R==null||R.destroy(),F.destroy())}),pe(C),we.add(C)}function G1(E){const C=E.add.sprite(100,E.scale.height-12,"buttons",3);C.setData("type","refreshButton");let R;C.on("click",()=>{var F;if(Wn(1)){k.player.inventory.pokeball-=1,zt("refresh"),E.drawMap();for(const B of k.board.otherTeam)(F=E.sprites.get(B.uid))==null||F.destroy(!0);k.board.otherTeam=k.currentRoom.spawnOtherTeam(),vd(E),Ei(),k.player.inventory.pokeball===0&&C.destroy()}}).on("over",()=>{C.setTint(16777164),R=gt(100,E.scale.height-30,V("menu.change_place"),{align:"center",color:"white",strokeThickness:4,stroke:"black"}).setOrigin(.5)}).on("out",()=>{C.setTint(16777215),R==null||R.destroy()}),pe(C),we.add(C)}function U1(){we.destroy(!0)}function sd(){var A;const E=k.activeScene;(A=E.sprites.get("fightButton"))==null||A.setVisible(E.canLaunchFight)}function V1(E){const A=E.add.sprite(32,E.scale.height-32,"player").setDepth(ft.PLAYER);if(E.sprites.set("player",A),A.play("trainer_idle"),[st.ARENA,st.TUTORIAL,st.PENSION].includes(E.state.currentRoom.type)){const C=E.state.currentRoom,R=E.add.sprite(E.scale.width+40,32,"trainer").setDepth(ft.TRAINER).setFrame(C.trainer.frameIndex);E.add.tween({targets:[R],delay:1e3,duration:600,x:"-=64",ease:"Linear"}),E.sprites.set("opponent",R)}}function Y1(E){const A=k.activeScene;if(E.introFrameIndex===null)return Promise.resolve();const C=A.add.sprite(A.scale.width/2,A.scale.height/2,"trainers_intros");return C.setDepth(ft.CENTER_TEXT).setFrame(E.introFrameIndex),A.sprites.set("centerIntro",C),T1(A,C,2e3)}class nd extends Vs{constructor(){super("GameScene");ut(this,"gameSpeed",100);ut(this,"state");ut(this,"currentTileMap");window.game=this,this.state=k}preload(){Bs(this),bi(this),Oa(this)}create(){k.activeScene=this;const C=k.currentRoom;nr(this),Ra(this.anims),this.drawMap(),this.drawIntro().then(()=>{C.type===st.SAFARI||C.type===st.PENSION?k.stage=Se.CAPTURE:k.stage=Se.PLACEMENT,Ox(this),vd(this)}),C.type===st.SAFARI?k.board=Lx(C):k.board=Rx(k.player,C),Fe(C.music),k.registerPokemonsSeen(k.board.otherTeam)}update(){Ma(this),S1(this)}drawMap(){const C=k.currentRoom;C.maps&&(C.mapIndex=C.mapIndex?C.mapIndex%3+1:Ce(1,C.maps.length),C.map=C.maps[C.mapIndex-1]);const R=this.make.tilemap({key:C.map});this.currentTileMap!=null&&this.currentTileMap.destroy(),this.currentTileMap=R;const F=R.addTilesetImage("ground","ground");if(!F){console.error("Tileset not found");return}R.createLayer("ground0",F),R.createLayer("ground1",F),R.createLayer("top0",F)}drawIntro(){if($f(),V1(this),k.currentRoom.type===st.WILD||k.currentRoom.type===st.SAFARI)return Et(1e3).then(()=>(Ei(),Zr("text_capture",this)));if([st.ARENA,st.TUTORIAL,st.PENSION].includes(k.currentRoom.type)){const C=k.currentRoom;return Y1(C.trainer),Et(2e3).then(()=>Mt(C.trainer.dialogs.start,{speaker:C.trainer.ref}))}return Promise.resolve()}hideCenterText(){var C;(C=this.sprites.get("centerText"))==null||C.destroy(!0),this.sprites.delete("centerText")}get canLaunchFight(){return k.stage===Se.PLACEMENT&&k.board.playerTeam.length<=xd()}launchFight(){if(this.canLaunchFight){U1(),k.initFight(this);const C=this.sprites.get("player");if(Et(500).then(()=>C==null?void 0:C.play("trainer_launch")),Zr("text_fight",this),k.currentRoom.type===st.WILD)Fe("music_battle_wild");else{const R=k.currentRoom.trainer;Fo.includes(R)||Jf.includes(R)?Fe("music_battle_champion"):Fe("music_battle_trainer")}}}onPressStart(){this.launchFight()}onPressA(){k.activeMenu&&ar()||Yo(this)}onPressB(){k.activeMenu!=null&&k.activeMenu.handleCancel()}onClick(){Yo(this)}destroy(){this.currentTileMap.destroy(),delete this.currentTileMap}}function rd(E){var F;const A=k.player.box;A[A.indexOf(E)]=null;const R=k.activeScene.sprites.get(E.uid);(F=k.activeMenu)!=null&&F.container&&k.activeMenu.ref==="box"&&R!=null&&k.activeMenu.container.remove(R)}function Ys(E,A){var B;const C=k.activeScene;A==null&&(A=k.player.box.indexOf(null));const R=k.player.box;E instanceof Tt?E=E.toBoxPokemon(C):R.includes(E)&&(R[R.indexOf(E)]=null),R[A]=E;const F=C.sprites.get(E.uid);((B=k.activeMenu)==null?void 0:B.ref)==="box"&&F!=null?qf(F,A):F!=null&&F.destroy(),Et(0).then(()=>fr(C))}function No(E){E.owner=xe,k.board.playerTeam.push(E),k.player.team.push(E),k.activeScene instanceof nd&&(k.board.playerAlliances=xi(k.board.playerTeam),wi(k.board.playerTeam))}function hr(E,A){ni(A,E),A===k.board.playerTeam&&(ni(k.player.team,E),k.board.playerAlliances=xi(k.board.playerTeam),wi(k.board.playerTeam))}function z1(E){const A=k.activeScene;return Mt([V("dialog.relacher",{name:V(`pokemon.${E.entry.ref}`),cost:E.cost}),{[V("no")](){return Ys(E),!1},[V("yes")](){var C;E instanceof Tt?hr(E,k.board.playerTeam):rd(E),(C=A.sprites.get(E.uid))==null||C.destroy(),zt(Sa(E.entry)),k.player.inventory[We.ref]+=E.cost,Ei()}}])}const W1={title:V("destination.JADIELLE_SHOP"),tilemap:"shop_jadielle",tilesets:["tileset_inside"],startAt:"shop_exit"},H1={title:V("destination.ARGENTA_SHOP"),tilemap:"shop_argenta",tilesets:["tileset_inside"],startAt:"shop_exit"},X1={title:V("destination.AZURIA_SHOP"),tilemap:"shop_azuria",tilesets:["tileset_inside"],startAt:"shop_exit"},k1={title:V("destination.CARMIN_SHOP"),tilemap:"shop_carmin",tilesets:["tileset_inside"],startAt:"shop_exit"},K1={title:V("destination.SAFRANIA_SHOP"),tilemap:"shop_safrania",tilesets:["tileset_inside"],startAt:"shop_exit"},J1={title:V("destination.CELADOPOLE_SHOP"),tilemap:"shop_celadopole",tilesets:["tileset_inside"],startAt:"shop_exit"},j1={title:V("destination.PARMANIE_SHOP"),tilemap:"shop_parmanie",tilesets:["tileset_inside"],startAt:"shop_exit"},Z1={title:V("destination.CRAMOISILE_SHOP"),tilemap:"shop_cramoisile",tilesets:["tileset_inside"],startAt:"shop_exit"},$1={title:V("destination.LAVANVILLE_SHOP"),tilemap:"shop_lavanville",tilesets:["tileset_inside"],startAt:"shop_exit"},Q1={title:V("destination.CAMP_NOMADE"),tilemap:"shop_camp_nomade",tilesets:["tileset_inside"],startAt:"shop_exit"},q1={title:V("destination.LIGUE_HALL"),tilemap:"shop_ligue",tilesets:["tileset_inside"],startAt:"enter"},sh={ref:"ARGENTA",name:V("destination.ARGENTA"),nextDestinations:{FORET_JADE:[[-2,0],[0,4]],COL_DE_MONTAGNE:[[0,-1],[1,0],[0,-1]],COLLINE_ROYALE:[[2,0],[2,0]],CELADOPOLE:[[2,0],[0,2]]},coordinates:[7*16-8,5*16-8],type:Ct.ARENA,icons:["badge_roche","type_ROCHE"],rooms:{arena:{name:V("destination.ARGENTA_ARENA"),type:st.ARENA,trainer:If,badge:bl,map:"arene_argenta",music:"music_argenta_safrania",spawnOtherTeam(){return ti([gi,Li,rl,os,Ta,fa,Xo,ll],[[2,3],[4,3],[3,3],[0,2],[1,2],[6,2],[5,2],[3,0]])}},trainer:{type:st.ARENA,name:V("destination.ARGENTA_ARENA"),map:"arene_argenta",music:"music_argenta_safrania",trainer:Wg,spawnOtherTeam(){return te([gi,Li,os,ul,Ml,hl,Di,Fs,ws])}},shop:{type:st.FREEWALK,name:V("destination.ARGENTA_SHOP"),music:"music_shop",level:H1}},shopId:2,preload(E){E.load.tilemapTiledJSON("shop_argenta","assets/maps/shop_argenta.json"),E.load.tilemapTiledJSON("arene_argenta","assets/maps/arene_argenta.json"),Nt("music_argenta_safrania","assets/audio/music/07 Pewter City's Theme.mp3")}},nh={ref:"AZURIA",name:V("destination.AZURIA"),nextDestinations:{GROTTE_AZUREE:[[0,-2]],COL_DE_MONTAGNE:[[-4,0],[-2,0]],MONT_SELENITE:[[-4,0],[0,-1]],OCEANE_AZURIA:[[2,0],[0,-1],[1,0],[0,-1]],CENTRALE:[[2,0],[0,1],[1,0],[0,1]],PENSION:[[0,2]]},coordinates:[14*16-8,3*16-8],type:Ct.ARENA,icons:["badge_cascade","type_EAU"],rooms:{arena:{type:st.ARENA,name:V("destination.AZURIA_ARENA"),map:"arene_azuria",spawnOtherTeam(){return ti([Mi,wl,Oi,ra,ze,es,rn,ol],[[2,3],[4,3],[3,3],[0,2],[1,2],[6,2],[5,2],[3,0]])},music:"music_azuria",trainer:Ff,badge:ir},trainer:{type:st.ARENA,name:V("destination.AZURIA_ARENA"),map:"arene_azuria",music:"music_azuria",trainer:Ng,spawnOtherTeam(){return te([Mi,Zn,Oi,ya,qn,Di,Fs,da,tr,ze,es])}},shop:{type:st.FREEWALK,name:V("destination.AZURIA_SHOP"),music:"music_shop",level:X1}},shopId:3,preload(E){E.load.tilemapTiledJSON("shop_azuria","assets/maps/shop_azuria.json"),E.load.tilemapTiledJSON("arene_azuria","assets/maps/arene_azuria.json"),Nt("music_azuria","assets/audio/music/08 Cerulean City's Theme.mp3")}},ad={ref:"CARMIN",name:V("destination.CARMIN"),nextDestinations:{MAISON_PSY:[[0,-2.5]],CAVE_TAUPIQUEUR_EST:[[3,0],[0,-1]],OCEANE_CARMIN:[[-2,0]],FALAISES:[[3,0],[2,0]]},coordinates:[14*16-8,11*16-8],type:Ct.ARENA,icons:["badge_foudre","type_ELECTRIQUE"],rooms:{arena:{type:st.ARENA,name:V("destination.CARMIN_ARENA"),map:"arene_carmin",music:"music_carmin",trainer:wf,badge:Bl,spawnOtherTeam(){return ti([Xi,as,Al,an,va,el,sn,$e],[[1,3],[0,2],[6,2],[2,3],[4,3],[5,3],[3,2],[1,2]])}},trainer:{type:st.ARENA,name:V("destination.CARMIN_ARENA"),map:"arene_carmin",music:"music_carmin",trainer:Xg,spawnOtherTeam(){return te([Xi,Xi,sn,as,hi,an,li,Qn,Mi])}},shop:{type:st.FREEWALK,name:V("destination.CARMIN_SHOP"),music:"music_shop",level:k1}},shopId:7,preload(E){E.load.tilemapTiledJSON("arene_carmin","assets/maps/arene_carmin.json"),E.load.tilemapTiledJSON("shop_carmin","assets/maps/shop_carmin.json"),Nt("music_carmin","assets/audio/music/11 Vermilion City's Theme.mp3")}},od={ref:"CELADOPOLE",name:V("destination.CELADOPOLE"),nextDestinations:{ARGENTA:[[0,-2],[-2,0]],COLLINE_ROYALE:[[0,-2],[2,0]],DOJO:[[3,0]],PISTE_CYCLABLE:[[0,5]]},coordinates:[9*16-8,7*16-8],type:Ct.ARENA,icons:["badge_prisme","type_PLANTE"],rooms:{arena:{type:st.ARENA,name:V("destination.CELADOPOLE_ARENA"),map:"arene_celadopole",music:"music_celadopole",trainer:Df,badge:Gl,spawnOtherTeam(){return ti([ls,pl,oa,$o,Ns,ns,jo,Zo],[[2,3],[1,0],[3,3],[4,3],[1,3],[6,0],[6,3],[5,3]])}},trainer:{type:st.ARENA,name:V("destination.CELADOPOLE_ARENA"),map:"arene_celadopole",music:"music_celadopole",trainer:zg,spawnOtherTeam(){return te([rs,rs,jn,$n,pa,_n,Is,ls,hs])}},shop:{type:st.FREEWALK,name:V("destination.CELADOPOLE_SHOP"),music:"music_shop",level:J1}},shopId:6,preload(E){E.load.tilemapTiledJSON("arene_celadopole","assets/maps/arene_celadopole.json"),E.load.tilemapTiledJSON("shop_celadopole","assets/maps/shop_celadopole.json"),Nt("music_celadopole","assets/audio/music/09 Celadon City's Theme.mp3")}},rh={ref:"CRAMOISILE",name:V("destination.CRAMOISILE"),coordinates:[6*16-8,19*16-8],type:Ct.ARENA,icons:["badge_volcan","type_FEU"],nextDestinations:{BOURG_PALETTE:[[0,-2.5],[0,-1.5],[-1,0]],MONT_BRAISE:[[0,-2.5],[-3,.5]],OCEANE_CRAMOISILE:[[-2,0]],ILES_ECUME:[[4,0]]},rooms:{arena:{name:V("destination.CRAMOISILE_ARENA"),type:st.ARENA,map:"cramoisile",music:"music_cramoisile",trainer:Bf,badge:Yl,spawnOtherTeam(){return ti([Ms,ko,Cl,nl,ua,ha,Qn,_o],[[2,3],[4,3],[3,3],[0,2],[1,2],[6,2],[5,2],[3,0]])}},trainer:{name:V("destination.CRAMOISILE_ARENA"),type:st.ARENA,map:"cramoisile",music:"music_cramoisile",trainer:Qg,spawnOtherTeam(){return te([hi,un,Ii,nn,_i,Ri,dn,ns])}},shop:{type:st.FREEWALK,name:V("destination.CRAMOISILE_SHOP"),music:"music_shop",level:Z1}},shopId:9,preload(E){E.load.tilemapTiledJSON("cramoisile","assets/maps/cramoisile.json"),E.load.tilemapTiledJSON("shop_cramoisile","assets/maps/shop_cramoisile.json"),Nt("music_cramoisile","assets/audio/music/10 Cinnabar Island's Theme.mp3")}},_1={type:st.ARENA,map:"arene_jadielle",music:"music_jadielle",name:V("destination.JADIELLE_ARENA"),trainer:Gf,badge:Aa,spawnOtherTeam(){return ti([os,Dl,gl,ml,Ta,El,Li,fa],[[2,3],[4,3],[3,3],[0,2],[1,2],[6,2],[5,2],[3,0]])}},tx={type:st.ARENA,map:"arene_jadielle",music:"music_jadielle",name:V("destination.JADIELLE_ARENA"),trainer:Cg,spawnOtherTeam(){return te([Ni,Jn,hi,Di,Uu,$n,Ds,bs,ga,os,gi])}},ex={type:st.ARENA,map:"arene_jadielle",music:"music_jadielle",name:V("destination.JADIELLE_ARENA"),trainer:Pg,spawnOtherTeam(){return te([Ni,Jn,hi])}},ah={ref:"JADIELLE",name:V("destination.JADIELLE"),nextDestinations:{BOURG_PALETTE:[[0,3]],FORET_JADE:[[0,-3]],CAVE_TAUPIQUEUR_OUEST:[[2,0],[0,-2]],ROUTE_VICTOIRE_ENTREE:[[-3,0],[0,-7]]},coordinates:[5*16-8,12*16-8],type:Ct.ARENA,icons:["badge_terre","type_SOL"],rooms:{arena:_1,tuto_dresseur:ex,trainer:tx,shop:{type:st.FREEWALK,name:V("destination.JADIELLE_SHOP"),music:"music_shop",level:W1}},customRoomOrder(){return k.day<10?["shop","tuto_dresseur"]:k.hasBadge(Aa)?["shop","trainer"]:["shop","arena"]},shopId:1,preload(E){E.load.tilemapTiledJSON("shop_jadielle","assets/maps/shop_jadielle.json"),E.load.tilemapTiledJSON("arene_jadielle","assets/maps/arene_jadielle.json"),Nt("music_jadielle","assets/audio/music/06 Pokemon Gym.mp3")}},oh={ref:"LAVANVILLE",name:V("destination.LAVANVILLE"),nextDestinations:{CENTRALE:[[0,-1],[-1,0],[0,-1],[-1,0]],TOUR_POKEMON:[[-3,0]],FALAISES:[[0,4]]},coordinates:[19*16-8,7*16-8],type:Ct.ARENA,icons:["type_FEE"],rooms:{arena:{type:st.ARENA,name:V("destination.LAVANVILLE_ARENA"),map:"arene_lavanville",spawnOtherTeam(){return ti([is,vl,ln,al,ss,fl,Is,Yu],[[2,3],[4,3],[3,3],[0,2],[1,2],[6,2],[5,2],[3,0]])},music:"music_lavanville",trainer:zf},trainer:{type:st.ARENA,name:V("destination.LAVANVILLE_ARENA"),map:"arene_lavanville",music:"music_lavanville",trainer:bg,spawnOtherTeam(){return te([is,ln,ss,li,Ni,Ms,fi,Nl])}},shop:{type:st.FREEWALK,name:V("destination.LAVANVILLE_SHOP"),music:"music_shop",level:$1}},shopId:4,customRoomOrder(){return k.dialogStates.sally===Yf.BEATEN?["shop","trainer"]:["shop","arena"]},preload(E){E.load.tilemapTiledJSON("arene_lavanville","assets/maps/arene_lavanville.json"),E.load.tilemapTiledJSON("shop_lavanville","assets/maps/shop_lavanville.json"),Nt("music_lavanville","assets/audio/music/12 Lavender Town's Theme.mp3")}},ix={title:V("room.ligueendroom"),tilemap:"endroom",tilesets:["tileset_inside"],startAt:"enter"},sx={type:st.ARENA,map:"arene_ligue1",music:"music_route_victoire",name:V("destination.LIGUE_FLOOR1"),trainer:Wf,spawnOtherTeam(){return[new Tt({entry:Br,owner:Dt,level:54,x:0,y:1}),new Tt({entry:Br,owner:Dt,level:54,x:6,y:1}),new Tt({entry:qo,owner:Dt,level:53,x:3,y:3}),new Tt({entry:sl,owner:Dt,level:54,x:4,y:3}),new Tt({entry:ca,owner:Dt,level:56,x:2,y:3}),new Tt({entry:es,owner:Dt,level:56,x:5,y:2})]}},nx={type:st.ARENA,map:"arene_ligue2",music:"music_route_victoire",name:V("destination.LIGUE_FLOOR2"),trainer:Hf,spawnOtherTeam(){return[new Tt({entry:Li,owner:Dt,level:53,x:0,y:3}),new Tt({entry:Vr,owner:Dt,level:55,x:1,y:3}),new Tt({entry:Qo,owner:Dt,level:56,x:2,y:3}),new Tt({entry:dl,owner:Dt,level:58,x:4,y:3}),new Tt({entry:br,owner:Dt,level:55,x:5,y:3}),new Tt({entry:Li,owner:Dt,level:56,x:6,y:3})]}},rx={type:st.ARENA,map:"arene_ligue3",music:"music_route_victoire",name:V("destination.LIGUE_FLOOR3"),trainer:Xf,spawnOtherTeam(){return[new Tt({entry:Fr,owner:Dt,level:56,x:3,y:3}),new Tt({entry:_i,owner:Dt,level:58,x:1,y:3}),new Tt({entry:yl,owner:Dt,level:56,x:3,y:1}),new Tt({entry:wr,owner:Dt,level:55,x:4,y:2}),new Tt({entry:wr,owner:Dt,level:55,x:2,y:2}),new Tt({entry:Fr,owner:Dt,level:60,x:5,y:3})]}},ax={type:st.ARENA,map:"arene_ligue4",music:"music_route_victoire",name:V("destination.LIGUE_FLOOR4"),trainer:kf,spawnOtherTeam(){return[new Tt({entry:rn,owner:Dt,level:58,x:2,y:2}),new Tt({entry:Pl,owner:Dt,level:60,x:3,y:2}),new Tt({entry:rn,owner:Dt,level:58,x:4,y:2}),new Tt({entry:Ir,owner:Dt,level:56,x:0,y:0}),new Tt({entry:Ir,owner:Dt,level:56,x:6,y:0}),new Tt({entry:tl,owner:Dt,level:62,x:3,y:1})]}},ox={type:st.ARENA,map:"arene_ligue5",music:"music_route_victoire",name:V("destination.LIGUE_FLOOR5"),trainer:Kf,spawnOtherTeam(){return[new Tt({entry:Fl,owner:Dt,level:61,x:0,y:3}),new Tt({entry:na,owner:Dt,level:59,x:1,y:1}),new Tt({entry:va,owner:Dt,level:63,x:3,y:3}),new Tt({entry:ha,owner:Dt,level:61,x:5,y:2}),new Tt({entry:Ns,owner:Dt,level:61,x:6,y:2}),new Tt({entry:ze,owner:Dt,level:65,x:4,y:1})]}},ld={ref:"LIGUE",name:V("destination.LIGUE"),subtext:V("destination_subtext.CONSEIL_DES_4"),nextDestinations:{ROUTE_VICTOIRE_SORTIE:[[0,1],[-1,0],[0,-1]]},coordinates:[2*16-8,3*16-8],type:Ct.ARENA,icons:["icon_ligue"],rooms:{olga:sx,aldo:nx,agatha:rx,peter:ax,rival:ox,shop:{type:st.FREEWALK,name:V("destination.LIGUE_HALL"),music:"music_route_victoire",level:q1},endroom:{type:st.FREEWALK,name:V("destination.LIGUE_FLOOR5"),music:"music_ending",level:ix}},customRoomOrder(){return["shop","olga","aldo","agatha","peter","rival","endroom"]},shopId:10,preload(E){E.load.tilemapTiledJSON("shop_ligue","assets/maps/shop_ligue.json"),E.load.tilemapTiledJSON("arene_ligue1","assets/maps/arene_ligue1.json"),E.load.tilemapTiledJSON("arene_ligue2","assets/maps/arene_ligue2.json"),E.load.tilemapTiledJSON("arene_ligue3","assets/maps/arene_ligue3.json"),E.load.tilemapTiledJSON("arene_ligue4","assets/maps/arene_ligue4.json"),E.load.tilemapTiledJSON("arene_ligue5","assets/maps/arene_ligue5.json"),E.load.tilemapTiledJSON("endroom","assets/maps/endroom.json"),Nt("music_route_victoire","assets/audio/music/22 The Last Road.mp3"),Nt("music_ending","assets/audio/music/30 Ending.mp3")}},lh={ref:"PARMANIE",name:V("destination.PARMANIE"),nextDestinations:{PARC_SAFARI:[[0,-2]],PISTE_CYCLABLE:[[-4,0],[0,-4]],ILES_ECUME:[[0,3],[-3,0]],CHAMPS_VERDOYANTS:[[3,0],[0,-1],[1,0]]},coordinates:[13*16-8,16*16-8],type:Ct.ARENA,icons:["badge_ame","type_POISON"],subtext:"Arène",rooms:{arena:{type:st.ARENA,name:V("destination.PARMANIE_ARENA"),map:"arene_parmanie",music:"music_parmanie",trainer:Nf,badge:Ul,spawnOtherTeam(){return ti([hi,un,Ii,nn,_i,Ri,dn,ns],[[2,3],[4,3],[3,3],[0,2],[1,2],[6,2],[5,2],[3,0]])}},trainer:{type:st.ARENA,name:V("destination.PARMANIE_ARENA"),map:"arene_parmanie",music:"music_parmanie",trainer:$g,spawnOtherTeam(){return te([hi,un,Ii,nn,_i,Ri,dn,ns])}},shop:{type:st.FREEWALK,name:V("destination.PARMANIE_SHOP"),music:"music_shop",level:j1}},shopId:8,preload(E){E.load.tilemapTiledJSON("arene_parmanie","assets/maps/arene_parmanie.json"),E.load.tilemapTiledJSON("shop_parmanie","assets/maps/shop_parmanie.json"),Nt("music_parmanie","assets/audio/music/40 Pokemon Mansion.mp3")}},hd={ref:"SAFRANIA",name:V("destination.SAFRANIA"),nextDestinations:{PENSION:[[0,-2]],DOJO:[[-2,0]],TOUR_POKEMON:[[2,0]],MAISON_PSY:[[0,1.5]]},coordinates:[14*16-8,7*16-8],type:Ct.ARENA,icons:["badge_marais","type_PSY"],rooms:{arena:{name:V("destination.SAFRANIA_ARENA"),type:st.ARENA,map:"arene_safrania",music:"music_argenta_safrania",trainer:bf,badge:Vl,spawnOtherTeam(){return ti([Mr,ss,fn,Dr,na,ca,Ri,Ns],[[2,3],[4,3],[3,3],[0,2],[1,2],[6,2],[5,2],[3,0]])}},trainer:{type:st.ARENA,name:V("destination.SAFRANIA_ARENA"),map:"arene_safrania",music:"music_argenta_safrania",trainer:Mg,spawnOtherTeam(){return te([ts,fn,pa,Mr,Dr,Oi,ra,ss])}},shop:{type:st.FREEWALK,name:V("destination.SAFRANIA_SHOP"),music:"music_shop",level:K1}},shopId:5,preload(E){E.load.tilemapTiledJSON("arene_safrania","assets/maps/arene_safrania.json"),E.load.tilemapTiledJSON("shop_safrania","assets/maps/shop_safrania.json"),Nt("music_argenta_safrania","assets/audio/music/07 Pewter City's Theme.mp3")}},lx=()=>Mt(hx[k.currentDestination.ref]||[V("dialog.salut")],{speaker:`character${16+(k.currentDestination.shopId??0)%10}`}),hx={[ah.ref]:[V("dialog.guide.jadielle.0"),V("dialog.guide.jadielle.1"),V("dialog.guide.jadielle.2")],[sh.ref]:[V("dialog.guide.argenta.0"),V("dialog.guide.argenta.1"),V("dialog.guide.argenta.2"),V("dialog.guide.argenta.3")],[nh.ref]:[V("dialog.guide.azuria.0"),V("dialog.guide.azuria.1"),V("dialog.guide.azuria.2"),V("dialog.guide.azuria.3")],[oh.ref]:[V("dialog.guide.lavanville.0"),V("dialog.guide.lavanville.1")],[hd.ref]:[V("dialog.guide.safrania.0"),V("dialog.guide.safrania.1"),V("dialog.guide.safrania.2")],[od.ref]:[V("dialog.guide.celadopole.0"),V("dialog.guide.celadopole.1"),V("dialog.guide.celadopole.2"),V("dialog.guide.celadopole.3")],[ad.ref]:[V("dialog.guide.carmin.0"),V("dialog.guide.carmin.1")],[lh.ref]:[V("dialog.guide.parmanie.0"),V("dialog.guide.parmanie.1"),V("dialog.guide.parmanie.2"),V("dialog.guide.parmanie.3")],[rh.ref]:[V("dialog.guide.cramoisile.0"),V("dialog.guide.cramoisile.1"),()=>{const E=qu.find(A=>k.player.inventory[A.ref]>0);return E&&k.player.box.some(A=>A===null)?[V("dialog.guide.cramoisile.2"),V("dialog.guide.cramoisile.3"),"...",V("dialog.guide.cramoisile.4"),V("dialog.guide.cramoisile.5"),V("dialog.guide.cramoisile.6"),{[V("yes")]:()=>[V("dialog.guide.cramoisile.7"),()=>{k.activeScene.cameras.main.flash(1e3,0,0,0),k.player.inventory[E.ref]-=1;const A={[wn.ref]:Fu,[Dn.ref]:hl,[Nn.ref]:Pl},C=new Fi({entry:A[E.ref],owner:xe,level:30});return Ys(C),["!!!",V("dialog.guide.cramoisile.8"),V("dialog.guide.cramoisile.9",{name:V(`pokemon.${C.entry.ref}`)}),V("dialog.guide.cramoisile.10"),V("dialog.guide.cramoisile.11"),()=>(Rs("pokemon_received"),Mt([V("dialog.guide.cramoisile.12",{name:V(`pokemon.${C.entry.ref}`)})],{speaker:"system"})),V("dialog.guide.cramoisile.13")]}],[V("no")]:()=>[V("dialog.guide.cramoisile.14")]}]:[V("dialog.guide.cramoisile.15"),V("dialog.guide.cramoisile.16")]}],[ld.ref]:[V("dialog.guide.ligue.0"),{[V("yes")]:()=>[V("dialog.guide.ligue.1"),V("dialog.guide.ligue.2"),V("dialog.guide.ligue.3"),V("dialog.guide.ligue.4"),V("dialog.guide.ligue.5"),V("dialog.guide.ligue.6"),V("dialog.guide.ligue.7"),V("dialog.guide.ligue.8"),V("dialog.guide.ligue.9"),V("dialog.guide.ligue.10"),V("dialog.guide.ligue.11")],[V("no")]:()=>[V("dialog.guide.ligue.12")]}]},ux=()=>Mt([V("dialog.healer.0"),V("dialog.healer.1")],{speaker:"female2"}),bo={hello:0,after_gift:1},fx=()=>{if(k.dialogStates.mam===bo.after_gift)return Mt([V("dialog.mom.after_gift")],{speaker:"mam"});const E=[vn,mn,pn,cn],A=[gn,xn,yn,En],C=[us,ys,xs,vs,cs,fs,ds,Ss,Ts,ms,As,Cs,Es,Ps,gs,ps],R=[An,Cn,Pn,Rn],F=[Ln,On,Mn,In,Fn],B=k.day-k.lastTourMam;return Mt([V("dialog.mom.hello"),()=>{let v;return B<=3?v=[V("dialog.mom.gift1"),()=>Ye(We,jt(B-1,1,3))]:B<9?v=[V("dialog.mom.gift2"),V("dialog.mom.gift3"),()=>Ye(Xe(E),jt(Math.ceil(B/3),1,3))]:B<20?v=[V("dialog.mom.gift4"),V("dialog.mom.gift5"),()=>Ye(Xe(A))]:B<30?v=[V("dialog.mom.gift6"),V("dialog.mom.gift7"),V("dialog.mom.gift8"),()=>Ye(Xe(C)),V("dialog.mom.gift9"),V("dialog.mom.gift10"),V("dialog.mom.gift11")]:B<40?v=[V("dialog.mom.gift12"),V("dialog.mom.gift13"),()=>Ye(Xe(R)),V("dialog.mom.gift14"),V("dialog.mom.gift15")]:v=[V("dialog.mom.gift16"),V("dialog.mom.gift17"),V("dialog.mom.gift18"),()=>Ye(Xe(F)),V("dialog.mom.gift19"),V("dialog.mom.gift20")],v}],{speaker:"mam"}).then(()=>Mt([()=>(k.lastTourMam=k.day,k.dialogStates.mam=bo.after_gift,V("dialog.mom.after_gift"))],{speaker:"mam"}))};function $r(E){if(!k.currentDestination.shopId){console.error("Missing shopId");return}Ei();const A=20,C=144,R=6*A+8,F=320-C-8,B=8,v=C1(k.currentDestination.shopId),y=Object.entries(v).map(([t,h],p)=>({x:4,y:4+p*A,label:V(`item.${t}`),value:t}));return y.push({x:4,y:4+y.length*A,label:V("menu.quit")}),zt("menu_open"),Gs({ref:"shop_buy",x:F,y:B,width:C,height:R,background:"box1",offset:8,entries:y,draw(t){y.forEach((h,p)=>{if(!h.value)return;const a=ke[h.value],n=t.scene.add.sprite(F+114,B+15+p*A,"pokeball",0).play("POKEBALL_idle").setScrollFactor(0),r=gt(292,17+p*A,`x${a.cost}`,{color:Wn(a.cost)?"black":"red"});t.add(n),t.add(r)})},handleChoice(t){if(Ki(),!t.value)return;const h=ke[t.value];h.cost&&(hh(1600),Mt([V("dialog.shop.confirm",{item:V(`item.${h.ref}`),count:h.cost}),{[V("yes")]:()=>Wn(h.cost)?(Go(),td(h.cost),Ye(h,1,!0,"shop").then(()=>{$r(E)})):V("dialog.shop.nomoney"),[V("no")]:()=>Et(100).then(()=>{Go(),$r(E)})}],{speaker:E}))},handleCancel(){Ki(),Le()},onSelect(t){if(!t.value)return;const h=ke[t.value];h?ed(h):Ki()}})}const dx=()=>Mt([V("dialog.sellerm.hello")],{speaker:"seller_male"}).then(()=>$r("seller_male")),cx=()=>Mt([V("dialog.sellerf.hello")],{speaker:"seller_female"}).then(()=>$r("seller_female")),vx=E=>{if(E==null)return Promise.reject("No character provided");const A=E;return Mt([()=>{const C=A.pokemonToGive;if(A.hasExchanged)return V("dialog.trader.aftertrade",{name:V(`pokemon.${A.pokemonToReceive.ref}`)});if(C==null)return[V("dialog.trader.nopokemon.0"),V("dialog.trader.nopokemon.1")];const R=new Fi({entry:A.pokemonToReceive,owner:xe,xp:C.xp,item:C.item??void 0,shouldAutoEvolve:!0});return[V("dialog.trader.tradepropose",{given:V(`pokemon.${C.entry.ref}`),received:V(`pokemon.${R.entry.ref}`)}),{[V("yes")]:()=>[()=>{Rs("pokemon_received");const F=k.player.box.indexOf(C);return delete k.player.box[F],k.player.box[F]=R,A.hasExchanged=!0,Mt([V("dialog.trader.tradeaccepted",{given:V(`pokemon.${C.entry.ref}`),received:V(`pokemon.${R.entry.ref}`)})],{speaker:"system"})},V("dialog.trader.aftertrade",{name:V(`pokemon.${C.entry.ref}`)})],[V("no")]:()=>[V("dialog.trader.traderefused")]}]}],{speaker:`character${6+(k.currentDestination.shopId??0)%10}`})},mo={mam:fx,chen:Jm,chen_end:jm,assistant1:Zm,assistant2:$m,seller_male:dx,seller_female:cx,trader:vx,info:lx,healer:ux},px={voice:"sawtooth",emotion:20,pitch:30,speed:40,resonance:10},Wt={system:{emotion:0,speed:50,pitch:10},chen:{emotion:25,pitch:25,speed:35,resonance:15},mam:{emotion:50,pitch:60,speed:40,resonance:5},red:{volume:0},pierre:{emotion:50,pitch:25,speed:15,resonance:10},ondine:{emotion:70,pitch:50,speed:20,resonance:10},major_bob:{emotion:75,pitch:20,speed:20,resonance:10},erika:{emotion:30,pitch:40,speed:15,resonance:10},koga:{emotion:40,pitch:27,speed:35,resonance:10},morgane:{emotion:80,pitch:55,speed:20,resonance:30},auguste:{emotion:80,pitch:45,speed:20,resonance:10},giovanni:{emotion:90,pitch:20,speed:10,resonance:50},hector:{emotion:50,pitch:38,speed:25,resonance:10},sally:{emotion:70,pitch:43,speed:20,resonance:20},rival:{emotion:90,pitch:33,speed:35,resonance:30},olga:{emotion:70,pitch:47,speed:25,resonance:30},aldo:{emotion:80,pitch:23,speed:30,resonance:30},agatha:{emotion:80,pitch:39,speed:25,resonance:30},peter:{emotion:40,pitch:26,speed:20,resonance:30},sbire_rocket:{emotion:90,pitch:40,speed:30,resonance:30},assistant1:{emotion:10,pitch:30,speed:40,resonance:15},assistant2:{emotion:15,pitch:35,speed:45,resonance:15},assistant_tuto:{emotion:10,pitch:20,speed:30,resonance:5},seller_male:{emotion:15,pitch:22,speed:40,resonance:5},seller_female:{emotion:15,pitch:50,speed:40,resonance:5},pc:{voice:"triangle",emotion:0,pitch:10,speed:30},pc_record:{voice:"triangle",emotion:0,pitch:10,speed:30},male1:{emotion:15,pitch:20,speed:35,resonance:5},male2:{emotion:10,pitch:25,speed:30,resonance:5},male3:{emotion:20,pitch:28,speed:35,resonance:5},female1:{emotion:25,pitch:40,speed:30,resonance:5},female2:{emotion:25,pitch:46,speed:35,resonance:5},female3:{emotion:20,pitch:51,speed:35,resonance:5},kid1:{emotion:35,pitch:55,speed:40,resonance:5},kid2:{emotion:42,pitch:60,speed:40,resonance:5}},Su={0:Wt.red,1:Wt.mam,2:Wt.chen,3:Wt.assistant1,4:Wt.seller_male,5:Wt.seller_female,6:Wt.kid1,7:Wt.kid2,8:Wt.male3,9:Wt.female3,10:Wt.male2,11:Wt.female2,12:Wt.male1,13:Wt.female1,14:Wt.male1,15:Wt.female1,16:Wt.female2,17:Wt.male2,18:Wt.male1,19:Wt.male1,20:Wt.female1,21:Wt.male2,22:Wt.female2,23:Wt.male2,24:Wt.female2,25:Wt.assistant2,26:Wt.female2};for(const E in Su)Wt[`character${E}`]=Su[E];const Bo=[];function Mt(E,A={},C){var e,s;const R=k.activeScene;if(!R)return Promise.reject("No scene");const F=A.speaker??"system",B=Object.assign({},px,Wt[F??"red"],A),v=60,y=R.scale.height-38,t=220,h=34,p=R.add.group().setOrigin(0,0),a=R.add.nineslice(v,y,"box2",void 0,t,h,4,4,4,4).setOrigin(0,0).setScrollFactor(0).setDepth(ft.DIALOG);p.add(a);const n=gt(v+8,y+4,"",{wordWrap:{width:t-8}}).setScrollFactor(0).setResolution(2);(e=p==null?void 0:p.add(n))==null||e.setDepth(ft.DIALOG),typeof E=="function"&&(E=E()),k.activeDialog!=null&&((s=k.activeDialog.dialogGroup)==null||s.destroy(!0,!0),Bo.push({lines:k.activeDialog.lines,params:k.activeDialog.params,onEndCallback:k.activeDialog.onEnd})),k.activeDialog={lines:[...E],params:A,speaker:F,voice:B,dialogGroup:p,textSprite:n,bgSprite:a};const r=new Promise(o=>{k.activeDialog.onEnd=C||(()=>Et(0).then(o))});return ur(),r}function hh(E){k.activeDialog&&(k.activeDialog.waitBeforeNextLine=!0,setTimeout(()=>{k.activeDialog&&(k.activeDialog.waitBeforeNextLine=!1)},E))}async function ur(){if(!k.activeDialog||!k.activeScene||k.activeDialog.waitBeforeNextLine)return;if(k.activeDialog.speech){k.activeDialog.speech.stop(),delete k.activeDialog.speech;return}let E=k.activeDialog.lines.shift();for(;typeof E=="function"||Array.isArray(E)||E instanceof Promise;)typeof E=="function"&&(E=E()),E instanceof Promise&&(E=await E),Array.isArray(E)&&(k.activeDialog.lines.unshift(...E),E=k.activeDialog.lines.shift());typeof E=="string"?mx(E):typeof E=="object"&&E!==null?gx(E):Go()}function mx(E){if(k.activeDialog){if(!["me","system"].includes(k.activeDialog.speaker)&&k.currentRoom.type!==st.FREEWALK&&(k.activeDialog.bgSprite.setPosition(48,2),k.activeDialog.textSprite.setPosition(56,6)),k.activeDialog.voice.skipSpeech){k.activeDialog.textSprite.text=E;return}k.activeDialog.speech=Mm(E)}}function Go(){var E,A,C;if(k.activeDialog&&((E=k.activeDialog.dialogGroup)==null||E.destroy(!0,!0),(C=(A=k.activeDialog).onEnd)==null||C.call(A),k.activeDialog=null,Bo.length>0)){const R=Bo.pop();Et(0).then(()=>Mt(R.lines,R.params,R.onEndCallback))}}function gx(E){const A=Object.keys(E),C=k.activeScene,R=Math.max(...A.map(t=>t.length))*8+16,F=8+16*A.length,B=C.scale.width-R-28,v=C.scale.height-32-F,y=Object.entries(E).map(([t,h],p)=>({label:t,value:h,x:4,y:p*16}));k.activeDialog.choice=Gs({ref:"dialogChoice",x:B,y:v,width:R,height:F,entries:y,handleChoice:Au,handleCancel(){if(V("no")in E){const t=E[V("no")];Au({label:V("no"),value:t,x:0,y:0})}else Le()}})}function Au(E){var A;(A=k.activeDialog)!=null&&A.choice&&(delete k.activeDialog.choice,Le(),k.activeDialog.lines.unshift((E==null?void 0:E.value)||(E==null?void 0:E.label)),ur())}let go=null;function xx(E,A){if(go==null){switch(A){case St.LEFT:case St.WALKING_LEFT:E.state=St.RIGHT;break;case St.RIGHT:case St.WALKING_RIGHT:E.state=St.LEFT;break;case St.UP:case St.WALKING_UP:E.state=St.DOWN;break;case St.DOWN:case St.WALKING_DOWN:E.state=St.UP;break}return k.dialogStates.hasOwnProperty(E.name)||(k.dialogStates[E.name]=0),mo.hasOwnProperty(E.name)||(mo[E.name]=()=>Mt(["..?"])),go=E.name,mo[E.name](E).then(()=>{go=null})}}let $i,Be,oi;const Uo=100,Vo=32;function yx(E,A){var v;if($i===E)return;$i!=null&&uh(A),$i=E;const C=A.sprites.get("cursor");Be=A.add.container(C.x-Uo-8,C.y-Vo-8);const R=A.add.nineslice(0,0,"box2",void 0,Uo,Vo,4,4,4,4).setOrigin(0,0);if(Be.add(R),k.player.inventory.pokeball0&&ii===2?(ii=0,F+=16):E.x<0&&ii===3?(ii=0,F-=16):B>A.scale.height-32?(ii=1,F+=28*Math.sign(E.x)):F<64?(B-=8*Math.sign(E.y),ii=2):F>A.scale.width-64?(ii=3,B-=8*Math.sign(E.y)):ii=0,ii){case 1:[F,B]=[vf(F,[100,160,220,280]),A.scale.height-16];break;case 2:[F,B]=[8,6+Math.round(B/24)*24];break;case 3:[F,B]=[A.scale.width-16,Math.round(B/24)*24];break;case 0:default:{const[v,y]=Ws(F,B+10);[F,B]=Ue(v,y),B-=10;break}}R.x=jt(F,0,A.scale.width-10),R.y=jt(B,0,A.scale.height-10),fh()}}function fh(){const E=k.activeScene;fr(E),fd(E),Ex(E)}function Yo(E){if(k.activeDialog!=null)return ur();if(Ot.draggedElem===null){const A=E.sprites.get("cursor");if(A==null||!A.anims)return;A.play("cursor_click")}tn.filter(A=>A!==Ot.draggedElem).forEach(A=>A.emit("click"))}function fr(E){const A=E.sprites.get("cursor");if(!A||!Qr)return;const C=[...Qr].filter(R=>R.getBounds().contains(A.x+6,A.y+6)).sort((R,F)=>R instanceof At.GameObjects.Zone?1:F instanceof At.GameObjects.Zone?-1:R.depth-F.depth);tn.filter(R=>!C.includes(R)).forEach(R=>R.emit("out")),C.filter(R=>!tn.includes(R)).forEach(R=>R.emit("over")),tn=C}function pe(E){Qr.add(E)}function dr(E){Qr.delete(E)}function zs(E,A){const C=A.sprites.get("cursor");C!=null&&(C.play("cursor_drag"),E.x=C.x,E.y=C.y+16,E.setDepth(ft.SPRITE_DRAGGED),Ot.draggedElem=E,E.emit("dragstart"))}function Ui(E){var R;const A=tn.filter(F=>Sx(F));if(A.length===0)return;const C=E.sprites.get("cursor");C==null||!C.anims||(C.play("cursor_drop"),Ot.draggedElem!=null&&((R=Ot.draggedElem)==null||R.setDepth(ft.POKEMON).emit("drop",C),A.forEach(F=>F.emit("dropReceived",Ot.draggedElem)),Ot.draggedElem=null))}function fd(E){const A=E.sprites.get("cursor");!Ot.draggedElem||!A||(Ot.draggedElem.x=A.x,Ot.draggedElem.y=A.y+16)}function Na(E){var A;return((A=k.activeMenu)==null?void 0:A.ref)==="pokedex"?!1:E.getData("pokemon")!=null?E.getData("pokemon").owner===1&&(k.stage===Se.PLACEMENT||[st.SAFARI,st.PENSION].includes(k.currentRoom.type)):!0}function Sx(E){var R;const A=E.getData("type"),C=(R=Ot.draggedElem)==null?void 0:R.getData("type");if(k.currentRoom.type===st.SAFARI)return A==="boxTile"||A==="releaseZone";if(k.stage!==Se.PLACEMENT&&k.currentRoom.type!==st.PENSION)return!1;switch(A){case"gridTile":{const[F,B]=E.getData("position");if(C==="pokemon")return F>=0&&F<_r&&B>=(k.currentRoom.type===st.PENSION?0:Hn/2)&&By.stepReachedN!==t.stepReachedN?t.stepReachedN-y.stepReachedN:t.numberOfThatTypeInTeam-y.numberOfThatTypeInTeam).slice(0,10);C&&Qi?Qi.destroy(!0,!0):!C&&qi&&qi.destroy(!0,!0);const B=A.add.group();C?Qi=B:qi=B;let v=0;F.forEach(y=>{if(!y.stepReached&&(!C||k.stage!==Se.PLACEMENT))return;const t=C?14:A.scale.width-14,h=C?A.scale.height-74-v*24:74+v*24,p=C?1:-1,a=A.add.graphics();a.fillStyle(0,.5).fillCircle(t,h+4,9);const n=C?t+10:t-28;for(let s=0;s<3;s++)a.fillStyle(sKm(y.type,C?0:1)).on("out",()=>Xl()),v++})}function Ax(){Qi==null||Qi.destroy(!0),qi==null||qi.destroy(!0),Xl()}let Me,qr=[],ci;const Pu=120,Or=64;function Cx(E){Me!=null&&(dr(ci),ci.destroy(),Me==null||Me.destroy(!0),Me=null);const A=k.activeScene;Me=A.add.container(A.scale.width/2,-66);const C=A.add.nineslice(0,0,"box2",void 0,Pu,Or,4,4,4,4);C.setOrigin(.5,.5),Me.add(C);const R=gt(0,2,V("menu.release_pokemon",{name:V(`pokemon.${E.entry.ref}`)}),{color:"#000"});R.setOrigin(.5,.5),R.setScrollFactor(0),Me.add(R),C.setScrollFactor(0),C.setDepth(ft.MENU_TOOLTIPS),R.setDepth(ft.MENU_TOOLTIPS+1);const F=A.add.sprite(6,20,"pokeball",25);F.play("POKEBALL_idle");const B=gt(-16,14,`+${E.cost}`);Me.add(F).add(B),Me.setDepth(ft.MENU),qr=[C,R,F,B],A.add.tween({targets:qr,duration:400,y:`+=${Or+6}`,ease:"Linear"}),ci=A.add.zone(A.scale.width/2,0,Pu,Or),ci.setData("type","releaseZone"),pe(ci),ci.on("click",()=>{Ot.draggedElem!=null&&Ui(A)}).on("over",()=>{Ot.draggedElem!=null&&(Ot.draggedElem.setTint(16711680),C.setTint(16777164))}).on("out",()=>{Ot.draggedElem!=null&&(Ot.draggedElem.setTint(16777215),C.setTint(16777215))}).on("dropReceived",v=>{const y=v.getData("pokemon");y!=null&&(C.setTint(16777215),Le(),v.destroy(),z1(y))})}function dh(){if(!Me||!qr)return;k.activeScene.add.tween({targets:qr,duration:400,y:-Or-2,ease:"Linear",delay:10,onComplete(){dr(ci),ci.destroy(),Me==null||Me.destroy(!0),Me=null}})}function dd(){return{onHit:[],onHitReceived:[],clock:[],attack:[],defense:[],speed:[],dodge:[]}}function Px(E){const A=k.activeScene,C=E.owner===xe?k.board.playerAlliances:k.board.otherTeamAlliances;if(E.buffs=dd(),E.item===cn){const R=({damage:F})=>{E.pv-F<.5*E.maxPV&&(E.item=null,zt("heal_ailment"),Ci(E,.25*E.maxPV),ki(()=>ni(E.buffs.onHitReceived,R)))};E.buffs.onHitReceived.push(R)}if(E.item===pn){const R=({damage:F})=>{E.pv-F<.5*E.maxPV&&(E.item=null,zt("heal_ailment"),ki(()=>ni(E.buffs.onHitReceived,R)),E.buffs.defense.push(()=>.3))};E.buffs.onHitReceived.push(R)}if(E.item===mn){const R=()=>{E.item=null,zt("heal_ailment"),ki(()=>ni(E.buffs.onHitReceived,R)),E.buffs.onHitReceived.push(()=>{E.pp=Math.min(E.pp+2,E.maxPP)})};E.buffs.onHitReceived.push(R)}if(E.item===gn&&E.buffs.attack.push(()=>.2),E.item===xn&&E.buffs.defense.push(()=>.2),E.item===yn&&E.buffs.speed.push(()=>.2),E.item===An&&E.buffs.onHit.push(({damage:R})=>{Ci(E,R*.2)}),E.item===Cn){const R=({damage:F})=>{if(E.pv-F<.3*E.maxPV){E.makeUntargettable(3e3),zt("fly");const B=A.sprites.get(E.uid);B&&ve(rt.BROUILLARD,B.x,B.y,A),ni(E.buffs.onHitReceived,R)}};E.buffs.onHitReceived.push(R)}E.item===Rn&&E.buffs.onHit.push(()=>{E.pp=Math.min(E.pp+4,E.maxPP)}),E.item===Ln&&E.buffs.clock.push(()=>{const[R,F]=[E.x,E.y];[[R-1,F-1],[R,F-1],[R+1,F-1],[R-1,F],[R,F],[R+1,F],[R-1,F+1],[R,F+1],[R+1,F+1]].filter(([v,y])=>Xn(v,y)).forEach(([v,y])=>{const t=Oe(v,y);t&&t.owner===E.owner&&Ci(t,t.maxPV*(1/100))})}),E.item===On&&(E.buffs.onHit.push(({target:R})=>{re(R,{type:at.POISON,stacks:10},A)}),E.buffs.onHitReceived.push(({attacker:R})=>{re(R,{type:at.POISON,stacks:10},A)})),E.item===Mn&&(E.buffs.onHit.push(({target:R})=>{re(R,{type:at.BRULURE,stacks:10},A)}),E.buffs.onHitReceived.push(({attacker:R})=>{re(R,{type:at.BRULURE,stacks:10},A)})),E.item===In&&(E.buffs.onHit.push(({target:R})=>{re(R,{type:at.PARALYSIE,stacks:10},A)}),E.buffs.onHitReceived.push(({attacker:R})=>{re(R,{type:at.PARALYSIE,stacks:10},A)})),E.item===Bn&&(E.unalterable=!0);for(const R of C){if(E.hasType(Ht)&&R.type===Ht&&R.stepReached){const F=({target:B,attacker:v})=>{const y={type:at.BRULURE,stacks:R.stepReachedN+1,attacker:v};re(B,y,A)};E.buffs.onHit.push(F)}if(E.hasType(Kt)&&R.type===Kt&&R.stepReached){const F=({target:B})=>{B.pp=Math.max(0,B.pp-R.stepReachedN*2)};E.buffs.onHit.push(F)}if(E.hasType(Yt)&&R.type===Yt&&R.stepReached){const F=({target:B,attacker:v})=>{const y={type:at.PEUR,stacks:R.stepReachedN*2,attacker:v};re(B,y,A)};E.buffs.onHit.push(F)}if(E.hasType($t)&&R.type===$t&&R.stepReached){const F=({attacker:B,skill:v})=>{v.attackRange===1&&Ae(R.stepReachedN*2,B,E)};E.buffs.onHitReceived.push(F),E.buffs.speed.push(()=>.1*R.stepReachedN)}if(E.hasType(Jt)&&R.type===Jt&&R.stepReached&&E.buffs.dodge.push(()=>.2*R.stepReachedN),E.hasType(Vt)&&R.type===Vt&&R.stepReached){const F=({damage:B})=>{if(!F.count||F.count<=0)return;const v=[.2,.5,.8][F.count-1];E.pv-B>0&&(E.pv-B)/E.maxPV{E.pp=Math.min(E.entry.maxPP,E.pp+R.stepReachedN)}),E.hasType(kt)&&R.type===kt&&R.stepReached&&E.buffs.clock.push(()=>{Ci(E,1/100*R.stepReachedN*E.maxPV)}),E.hasType(Ut)&&R.type===Ut&&R.stepReached){let F=function(){return E.opponents.filter(v=>v.nextAction.target===E).length};const B=[.05,.1,.2];E.buffs.attack.push(()=>F()*B[R.stepReachedN-1]),E.buffs.defense.push(()=>F()*B[R.stepReachedN-1])}if(E.hasType(_t)&&R.type===_t&&R.stepReached&&E.buffs.clock.push(()=>{const[F,B]=[E.x,E.y],y=[[F-1,B-1],[F,B-1],[F+1,B-1],[F-1,B],[F+1,B],[F-1,B+1],[F,B+1],[F+1,B+1]].filter(([t,h])=>Xn(t,h)).map(([t,h])=>Oe(t,h)).filter(t=>t!=null&&t.owner!==E.owner);for(const t of y){const h=[-.2,-.3,-.4],p=()=>h[R.stepReachedN]??0;t.buffs.speed.push(p),setTimeout(()=>ni(t.buffs.speed,p),1e3)}}),E.hasType(qt)&&R.type===qt&&R.stepReached){const F=()=>E.team.length===1;E.buffs.attack.push(()=>F()?.1*R.stepReachedN:0),E.buffs.defense.push(()=>F()?.1*R.stepReachedN:0),E.buffs.speed.push(()=>F()?.1*R.stepReachedN:0)}}}const _r=7,Hn=8;function cd(E){return{playerTeam:[...E.team],playerAlliances:xi(E.team),otherTeam:[],otherTeamAlliances:new Map,activeTile:null}}function Rx(E,A){const C=E.resetTeam(),R=A.spawnOtherTeam();return{playerTeam:C,otherTeam:R,playerAlliances:xi(C),otherTeamAlliances:xi(R),activeTile:null}}function Lx(E){const A=E.spawnOtherTeam();return{playerTeam:[],otherTeam:A,playerAlliances:new Map,otherTeamAlliances:xi(A),activeTile:null}}function Ox(E){w1(E),Fx(),ud(),ba(),[st.ARENA,st.WILD].includes(k.currentRoom.type)&&(wi(k.board.playerTeam),wi(k.board.otherTeam))}function vd(E){if([st.ARENA,st.WILD,st.TUTORIAL,st.PENSION].includes(k.currentRoom.type))for(const A of k.player.team)yi(A,E).setAlpha(.5);for(const A of k.board.otherTeam)yi(A,E).anims.resume()}function Mx(E){var A,C,R;for(const F of k.player.team)(A=E.sprites.get(F.uid))==null||A.destroy();if(k.currentRoom.type===st.ARENA||k.currentRoom.type===st.SAFARI)for(const F of k.board.otherTeam)(C=E.sprites.get(F.uid))==null||C.destroy(!0);(R=E.objects.get("grid"))==null||R.destroy(),dh(),bx(),wi(k.board.playerTeam)}function Ue(E,A){return[32*E+64,32*A+48]}function Ws(E,A){return[Math.floor((E-64)/32),Math.floor((A-48)/32)]}function Oe(E,A){return k.allPokemonsOnBoard.find(C=>C.x===E&&C.y===A)}function Xn(E,A){return E>=0&&E<7&&A>=0&&A<8}function pd(E,A,C,R,F,B=!1){return new Promise(v=>{let y,t;E===1?(y=50,t=280):(y=280,t=40),B&&zt("ball_launch");const h=F.add.sprite(y,t,"pokeball");h.play(`${A}_launch`),h.setRotation(Math.random()*Math.PI*2),F.add.tween({targets:h,x:C,y:R,duration:400+Phaser.Math.Distance.Between(y,t,C,R)*3,ease:"Sine.Out",onComplete:()=>{h.setRotation(0),v(h)}})})}function zo(E,A){const[C,R]=E.position;Px(E),pd(E.owner,E.pokeball,C,R,A).then(F=>{F.play(`${E.pokeball}_out`),F.once(Phaser.Animations.Events.ANIMATION_COMPLETE,()=>{F.destroy(),yi(E,A).play(`${E.entry.ref}_${E.facingDirection}`)})})}async function Ix(E,A,C){ui(),uh(C),E.owner=zd,td(E.cost);const R=C.sprites.get("player");R==null||R.play("trainer_launch"),await Et(400);const[F,B]=E.position,v=await pd(1,E.pokeball,F,B,C,!0);zt("ball_catch"),v.play(`${E.pokeball}_in`),C.add.tween({targets:A,scale:.1,alpha:0,duration:1e3}),v.once(Phaser.Animations.Events.ANIMATION_COMPLETE,async()=>{v.play(`${E.pokeball}_jiggle`),await Et(1100),v.play(`${E.pokeball}_catch`),zt(Sa(E.entry)),a1()===E&&ui(),await Et(500),v.setDepth(ft.SPRITE_DRAGGED),C.add.tween({targets:v,x:C.scale.width/2,y:C.scale.height-10,duration:400}),C.add.tween({targets:v,alpha:0,duration:400,delay:400}),await Et(800),v.destroy(),hr(E,k.board.otherTeam),E.owner=xe;const t=k.player.boardAndBox.find(h=>h.entry.ref===E.entry.ref);t!=null?(await Et(100),await Mt([V("dialog.aftercapture.0",{name:V(`pokemon.${t.entry.ref}`)}),V("dialog.aftercapture.1",{name:V(`pokemon.${t.entry.ref}`),xp:E.xp})]),await Mf(t,E.xp)):Ys(E),k.registerPokemonCaptured(E),k.board.otherTeam.length===0&&await k.endCapture()})}function Fx(){const E=k.activeScene,A=E.add.graphics(),C=[st.SAFARI,st.PENSION].includes(k.currentRoom.type)?0:.1;E.objects.set("grid",A),A.setDepth(ft.GRID),A.lineStyle(1,0,C);for(let F=1;F<=_r+1;F++)A.lineBetween(F*32+16,32,F*32+16,288);for(let F=1;F<=Hn+1;F++)A.lineBetween(48,F*32+32,272,F*32+32);const R=E.add.graphics();E.objects.set("gridActiveTile",R),A.setDepth(ft.GRID_ACTIVE_TILE),A.lineStyle(1,16777215,.25);for(let F=0;F<_r;F++)for(let B=0;Bwx(v,E)),v.on("out",()=>{const[y,t]=Ws(v.x+16,v.y+16);k.board.activeTile!=null&&k.board.activeTile[0]===y&&k.board.activeTile[1]===t&&md(E)}),v.on("click",()=>{Ot.draggedElem!=null&&Ui(E)}),v.on("dropReceived",y=>{const t=y.getData("type");t==="pokemon"?Dx(y,F,B,E):t==="item"&&Gx(y,F,B,E)})}}function wx(E,A){var t,h,p,a;const{x:C,y:R}=E,[F,B]=Ws(C+16,R+16);if(((t=k.activeMenu)==null?void 0:t.ref)==="pokedex"||((h=k.activeMenu)==null?void 0:h.ref)==="box"&&B>=2&&B<=3)return;k.board.activeTile!=null&&(k.board.activeTile[0]!==F||k.board.activeTile[1]!==B)&&md(A),k.board.activeTile=[F,B];const v=A.objects.get("gridActiveTile");k.stage===Se.PLACEMENT&&v!=null&&B>=4&&v.lineStyle(2,0,.1).moveTo(C-16,R-16).lineTo(C+16,R-16).lineTo(C+16,R+16).lineTo(C-16,R+16).lineTo(C-16,R-16).stroke();const y=Oe(F,B);y==null?(k.activeMenu==null||((p=k.activeMenu)==null?void 0:p.ref)==="box"&&B>4)&&ui():!Ot.draggedElem&&(k.activeMenu==null||((a=k.activeMenu)==null?void 0:a.ref)==="box")&&((y.owner===xe||[st.WILD,st.ARENA,st.TUTORIAL,st.SAFARI,st.PENSION].includes(k.currentRoom.type)||k.stage===Se.FIGHT)&&Us(y),[st.WILD,st.TUTORIAL,st.SAFARI,st.PENSION].includes(k.currentRoom.type)&&y.owner===He&&k.activeMenu==null&&(k.stage===Se.PLACEMENT||k.stage===Se.CAPTURE)&&yx(y,A))}function md(E){if(k.board.activeTile==null)return;const A=E.objects.get("gridActiveTile");A==null||A.clear(),ui(),uh(E),k.board.activeTile=null}function Dx(E,A,C,R){var y;let F;const B=E.getData("pokemon");if(!B)return;const v=Oe(A,C);if(v!=null&&v!==B){const t=R.sprites.get(v.uid);t&&Na(t)&&Et().then(()=>zs(t,R))}B instanceof Tt?(F=B,k.currentRoom.type===st.PENSION&&(C<4?(hr(F,k.board.playerTeam),xu(F),E.setAlpha(1),E.anims.resume()):(_f(F),No(F),E.setAlpha(.5),E.anims.pause()))):(F=new Tt({uid:B.uid,entry:B.entry,owner:B.owner,xp:B.xp,item:B.item??void 0,x:A,y:C}),(y=R.sprites.get(B.uid))==null||y.setData("pokemon",F),k.currentRoom.type===st.PENSION?(xu(F),E.setAlpha(1),E.anims.resume()):No(F)),F.x=A,F.y=C,F.placementX=A,F.placementY=C,E.setData("pokemon",F),E.setPosition(...F.position),Us(F),ba(),dh()}function gd(){if(Ot.draggedElem!=null){const E=Ot.draggedElem.getData("pokemon");if(!E)return;E instanceof Tt?(Ot.draggedElem.setPosition(...E.positionPlacement),Ot.draggedElem.emit("drop"),Ot.draggedElem=null):Ys(E)}}function Nx(){return k.board.otherTeam.reduce((E,A)=>E+Hd(A),0)}function xd(){return 6}function ba(){if([st.PENSION,st.SAFARI].includes(k.currentRoom.type))return;const E=k.activeScene;let A=E.objects.get("teamSizeCounter");A&&A.destroy(),A=E.add.text(E.scale.width/2,E.scale.height*2/3,"",{align:"center",color:"white",stroke:"black",fontSize:"64px",fontFamily:"Pokemon",fontStyle:"italic",strokeThickness:4}),A.setScrollFactor(0),A.setDepth(ft.TEAM_SIZE_COUNTER),A.setOrigin(.5),A.setAlpha(.15),E.objects.set("teamSizeCounter",A);const C=k.board.playerTeam.length,R=xd();A.setText(` ${C} / ${R} `),C>R?(A.setAlpha(.3),A.setVisible(!0),A.setTint(16711680)):(A.setTint(16777215),C<=R&&A.setVisible(!1)),sd()}function bx(){var A;(A=k.activeScene.objects.get("teamSizeCounter"))==null||A.destroy()}function Bx(E){var A;zt("refresh");for(const C of k.board.otherTeam)(A=E.sprites.get(C.uid))==null||A.destroy(!0);k.board.otherTeam=k.currentRoom.spawnOtherTeam(),k.board.otherTeamAlliances=xi(k.board.otherTeam);for(const C of k.board.otherTeam)yi(C,E).anims.resume();[st.ARENA,st.WILD].includes(k.currentRoom.type)&&wi(k.board.otherTeam)}function Gx(E,A,C,R){const F=Oe(A,C);if(F!=null){if(F.item!=null){const B=F.item;ki(()=>{const v=th(B);zs(v,R)})}F.item=E.getData("item"),E.destroy(),k.player.inventory[F.item.ref]-=1,Fv.includes(F.item)&&(k.board.playerAlliances=xi(k.board.playerTeam),wi(k.board.playerTeam)),Us(F)}}class Tt extends Fi{constructor({entry:C,owner:R,xp:F,level:B,item:v,uid:y,x:t,y:h,shouldAutoEvolve:p}){super({entry:C,owner:R,xp:F,level:B,item:v,uid:y,shouldAutoEvolve:p});ut(this,"x");ut(this,"y");ut(this,"placementX");ut(this,"placementY");ut(this,"facingDirection");ut(this,"nextAction");ut(this,"alterations");ut(this,"initialEntry");ut(this,"untargettable");ut(this,"unalterable");ut(this,"buffs");this.x=t,this.y=h,this.placementX=t,this.placementY=h,this.reset()}reset(){return this.x=this.placementX,this.y=this.placementY,this.facingDirection=this.owner===1?mt.UP:mt.DOWN,this.resetAction({type:Ge.IDLE}),this.pv=this.maxPV,this.pp=0,this.alterations=[],this.untargettable=!1,this.unalterable=!1,this.buffs=dd(),this}get position(){return Ue(this.x,this.y)}get positionPlacement(){return Ue(this.placementX,this.placementY)}get attack(){let C=this.buffs.attack.reduce((v,y)=>v+y(),1);const R=this.alterations.find(v=>v.type===at.POUVOIR_ANTIQUE);R&&(C+=.1*jt(R.stacks,0,10));const F=this.alterations.find(v=>v.type===at.FURIE);F&&(C+=.1*jt(F.stacks,0,20));const B=this.alterations.find(v=>v.type===at.RAGE);return B&&(C+=.2*B.stacks),Math.max(1,super.attack*C)}get defense(){let C=this.buffs.defense.reduce((v,y)=>v+y(),1);this.hasAlteration(at.ACIDE)&&(C-=.5);const R=this.alterations.find(v=>v.type===at.POUVOIR_ANTIQUE);R&&(C+=.1*jt(R.stacks,0,10));const F=this.alterations.find(v=>v.type===at.ARMURE);F&&(C+=.1*jt(F.stacks,0,20));const B=this.alterations.find(v=>v.type===at.RAGE);return B&&(C-=.2*B.stacks),Math.max(1,super.defense*C)}get speed(){let C=this.buffs.speed.reduce((y,t)=>y+t(),1);const R=this.alterations.find(y=>y.type===at.PARALYSIE);R&&(C-=jt(.01*R.stacks,0,.5)),this.hasAlteration(at.SECRETION)&&(C-=.5);const F=this.alterations.find(y=>y.type===at.POUVOIR_ANTIQUE);F&&(C+=.1*jt(F.stacks,0,10));const B=this.alterations.find(y=>y.type===at.HATE);B&&(C+=.1*B.stacks);const v=this.alterations.find(y=>y.type===at.RAGE);return v&&(C+=.2*v.stacks),jt(super.speed*C,1,500)}get precision(){return this.hasAlteration(at.AVEUGLE)?.5:1}get dodge(){return jt(this.buffs.dodge.reduce((C,R)=>C+R(),0),0,1)}get alive(){return this.pv>0}get team(){return this.owner===xe?k.board.playerTeam:k.board.otherTeam}get opponents(){return this.owner===xe?k.board.otherTeam:k.board.playerTeam}get alliances(){return this.owner===xe?k.board.playerAlliances:k.board.otherTeamAlliances}toBoxPokemon(C){var F;const R=new Fi({uid:this.uid,entry:this.entry,owner:this.owner,xp:this.xp,item:this.item??void 0});return(F=C.sprites.get(R.uid))==null||F.setData("pokemon",R),R}hasAlteration(C){return this.alterations.some(R=>R.type===C)}makeUntargettable(C){const R=k.board;(this.owner===xe?R.otherTeam:R.playerTeam).filter(B=>B.nextAction.target===this).forEach(B=>B.resetAction()),this.untargettable=!0,Et(C).then(()=>{this.untargettable=!1})}resetAction(C={type:Ge.IDLE}){var R,F;(F=(R=this.nextAction)==null?void 0:R.timer)==null||F.remove(),this.nextAction=C}resetTarget(C){this.resetAction({type:Ge.IDLE,target:C})}resetAfterFight(){this.x=this.placementX,this.y=this.placementY,this.untargettable=!1,this.unalterable=!1,this.initialEntry&&(this.entry=this.initialEntry)}}function yi(E,A){const[C,R]=E instanceof Tt?E.position:[0,0],F=A.add.sprite(C,R,"pokemon");return A.sprites.set(E.uid,F),A.objects.set(`bars_${E.uid}`,A.add.graphics()),F.setData("pokemon",E),F.setData("type","pokemon"),F.play(`${E.entry.ref}_DOWN`),F.setDepth(ft.POKEMON),F.anims.pause(),F.setInteractive(),A.input.setDraggable(F),pe(F),F.on("click",()=>{Ot.draggedElem===null&&Na(F)&&ki(()=>zs(F,A)),Tx()===E&&E instanceof Tt&&Wn(E.cost)&&!k.player.hasBoxFull&&Ix(E,F,A)}),F.on("dragstart",()=>{const B=F.getData("pokemon");B.owner===1&&(F.anims.resume(),F.setAlpha(1),ui(),Cx(B),k.player.box.includes(B)&&rd(B))}),F.on("drop",B=>{var v;F.anims.pause((v=F.anims.currentAnim)==null?void 0:v.getFrameByProgress(0)),F.setAlpha(.5),dh()}),F}function yd(E,A,C,R){var v;E.x=A,E.y=C;const[F,B]=Ue(A,C);(v=R.sprites.get(E.uid))==null||v.setPosition(F,B),Do(E,R)}function Ba(E,A){const C=A.sprites.get(E.uid);C==null||C.destroy(),A.sprites.delete(E.uid);const R=A.objects.get(`bars_${E.uid}`);R!=null&&(R.destroy(),A.objects.delete(E.uid))}function Pe(E){const A=Object.keys(E),C=jt(k.player.boardAndBox.length,3,6),R=[];for(let F=0;FE[t]);let v,y;do v=Ce(0,6),y=Ce(0,3);while(R.some(t=>t.x===v&&t.y===y));R.push(new Tt({entry:Oo(tf($[B]),t=>t.wildEncounterChance),owner:He,level:jt(Math.floor(k.player.averagePokemonLevel*.9)-Ce(0,5),1,50),shouldAutoEvolve:!0,x:v,y}))}return R}function ti(E,A){const C=[],R=Math.min(jt(k.player.boardAndBox.length,3,6),A.length,E.length);for(let F=0;Ft.x===F&&t.y===B));A.push(new Tt({entry:v,level:y,owner:Dt,shouldAutoEvolve:!0,x:F,y:B}))}return A}function Ux(){return Ia([Ea,Hu,$n,ya,il,an,fi,ln,fn,ma],3).map((R,F)=>new Tt({entry:R,owner:He,level:1,x:2*F+1,y:F%2+1}))}function Vx(E){return[new Tt({entry:E,owner:He,level:4,x:3,y:3})]}function Yx(){const A=Array.from({length:8}).map(()=>Oo(De,R=>R.wildEncounterChance)),C=[];for(let R=0;R<8;R++){let F,B;do F=Ce(0,6),B=Ce(0,7);while(C.some(v=>v.x===F&&v.y===B));C.push(new Tt({entry:A[R],level:jt(Math.floor(k.player.averagePokemonLevel*.9)+Ce(-4,4),1,50),owner:He,shouldAutoEvolve:!0,x:F,y:B}))}return C}function zx(){const A=Ia(wv(Ft),5),C=[];for(let R=0;R<5;R++){let F,B;do F=Ce(0,6),B=Ce(0,3);while(C.some(v=>v.x===F&&v.y===B));C.push(new Tt({entry:A[R],level:1,owner:He,shouldAutoEvolve:!0,x:F,y:B}))}return C}const ch={ref:"MONT_SELENITE",name:V("destination.MONT_SELENITE"),nextDestinations:{COL_DE_MONTAGNE:[[0,1],[-2,0]],AZURIA:[[0,1],[4,0]]},coordinates:[10*16-8,2*16-8],type:Ct.SPECIAL,icons:["type_FEE"],subtext:"Paléontologie et Capture",rooms:{wild:{type:st.WILD,name:V("destination.MONT_SELENITE"),map:"mont_selenite",music:"music_cave",spawnOtherTeam(){return Pe({[se.ref]:1,[Vt.ref]:.5,[bt.ref]:.5,[wt.ref]:.5,[Yt.ref]:.2})},beforeExit(){return Ye(Xe(qu),1,!0,"finding")}},trainer:{type:st.ARENA,name:V("destination.MONT_SELENITE"),map:"mont_selenite",music:"music_cave",trainer:Bg,spawnOtherTeam(){return te([is,ln,Mi,fi,xa,gi,bs,hs,ga])}}},preload(E){E.load.tilemapTiledJSON("mont_selenite","assets/maps/mont_selenite.json"),Nt("music_cave","assets/audio/music/39 Mt. Moon Cave.mp3")}},vh={type:st.WILD,music:"music_oceane",name:V("destination.OCEANE_DECK"),map:"oceane",spawnOtherTeam(){return Pe({[wt.ref]:1,[Jt.ref]:.2,[Ft.ref]:.1,[Ut.ref]:.1})}};function ph(E){E.load.tilemapTiledJSON("oceane","assets/maps/oceane.json"),Nt("music_oceane","assets/audio/music/13 St. Anne.mp3")}const mh={type:st.ARENA,music:"music_oceane",name:V("destination.OCEANE_DECK"),map:"oceane",trainer:Gg,spawnOtherTeam(){return te([tr,ws,Mi,da,es,Ll,Ds,Fs,qn,Di,Ii])}},kn={ref:"OCEANE_CARMIN",name:V("destination.OCEANE"),nextDestinations:{CARMIN:[[2,0]]},coordinates:[12*16-8,11*16-8],type:Ct.SPECIAL,icons:["boat"],subtext:V("destination_subtext.fast_travel_CRAMOISILE"),rooms:{wild:vh,trainer:mh},preload:ph},Ls={ref:"OCEANE_CRAMOISILE",name:V("destination.OCEANE"),nextDestinations:{CRAMOISILE:[[2,0]]},coordinates:[4*16-8,19*16-8],type:Ct.SPECIAL,icons:["boat"],subtext:V("destination_subtext.fast_travel_AZURIA"),rooms:{wild:vh,trainer:mh},preload:ph},Os={ref:"OCEANE_AZURIA",name:V("destination.OCEANE"),nextDestinations:{AZURIA:[[0,1],[-1,0],[0,1],[-2,0]],CENTRALE:[[0,1],[-1,0],[0,1],[0,1],[1,0],[0,1]]},coordinates:[17*16-8,8],type:Ct.SPECIAL,icons:["boat"],subtext:V("destination_subtext.fast_travel_CARMIN"),rooms:{wild:vh,trainer:mh},preload:ph};function Ga(E){const A=k.activeScene;if(E.preloading){const C=gt(A.scale.width/2,A.scale.height-30,V("loading"),{align:"center",color:"white",strokeThickness:4,stroke:"black"}).setOrigin(.5),R=()=>{E.preloading=!1,C.destroy(),Ga(E),A.load.off("complete",R)};A.load.on("complete",R),A.load.start();return}[kn,Ls,Os].includes(E)?zt("oceane_horn"):zt("door"),k.roomOrder=Wx(E),k.currentDestination=E,k.currentRoomIndex=0,k.activeMenu!=null&&Le(),Bi(250).then(()=>k.initRoom())}function Wx(E){if(E.customRoomOrder)return E.customRoomOrder();if(E.type===Ct.ARENA){const A=E.rooms.arena;return A.badge&&k.hasBadge(A.badge)?["shop","trainer"].filter(C=>C in E.rooms):["shop","arena"].filter(C=>C in E.rooms)}return E.type===Ct.WILD||sy.includes(E)||E===ch?k.lastCaptureDestination===E?(k.lastCaptureDestination=null,["trainer"]):(k.lastCaptureDestination=E,["wild"]):Object.keys(E.rooms)}function Hx(E){return E.subtext?E.subtext:E.type===Ct.ARENA?V("destination_subtext.ARENA"):E.type===Ct.WILD?k.lastCaptureDestination===E?V("destination_subtext.FIGHT"):V("destination_subtext.CAPTURE"):"???"}const Xx={title:V("room.oaklab"),tilemap:"labo_chen",tilesets:["tileset_inside"],startAt:"labo_exit",canExit(){return k.player.team.length===0?(Mt([V("dialog.exitlab.0"),V("dialog.exitlab.1")],{speaker:"red"}),!1):!0},exit(){k.currentDestination=Kn}},Kn={ref:"BOURG_PALETTE",name:V("destination.BOURG_PALETTE"),rooms:{home:{name:V("destination.HOME"),type:st.FREEWALK,level:ff,music:"music_labo_chen"},labo:{name:V("destination.LABO_CHEN"),type:st.FREEWALK,level:Xx,music:"music_labo_chen"},tuto:{name:V("destination.BOURG_PALETTE_ROAD"),type:st.TUTORIAL,map:"foret_de_jade",music:"music_guide",trainer:Ag,spawnOtherTeam(){return Ux()}}},customRoomOrder(){return k.day===0?["labo","tuto"]:(k.dialogStates.mam=bo.hello,["home"])},nextDestinations:{JADIELLE:[[0,-3]],CRAMOISILE:[[1,0],[0,1.5],[0,2.5]],MONT_BRAISE:[[1,0],[0,1.5],[-3,.5]]},coordinates:[5*16-8,15*16-8],type:Ct.SPECIAL,icons:["gift"],subtext:V("destination_subtext.BOURG_PALETTE"),preload(E){E.load.tilemapTiledJSON("bourg_palette","assets/maps/bourg_palette.json")}},kx={ref:"CAMP_NOMADE",name:V("destination.CAMP_NOMADE"),nextDestinations:{CHAMPS_VERDOYANTS:[[-2,0],[0,1]],FALAISES:[[0,-3]]},coordinates:[19*16-8,14*16-8],type:Ct.ARENA,icons:["type_INSECTE"],rooms:{arena:{type:st.ARENA,name:V("destination.CAMP_NOMADE_ARENA"),map:"camp_nomade",music:"music_pension_et_camp_nomade",trainer:Vf,spawnOtherTeam(){return ti([Jo,on,Ri,Ko,Is,Tl,Nr,hn],[[2,3],[4,3],[3,3],[0,2],[1,2],[6,2],[5,2],[3,0]])}},trainer:{type:st.ARENA,name:V("destination.CAMP_NOMADE_ARENA"),map:"camp_nomade",music:"music_pension_et_camp_nomade",trainer:Yg,spawnOtherTeam(){return te([la,hn,_n,aa,on,Nr,oa,Ns,Jn,as])}},shop:{type:st.FREEWALK,name:V("destination.CAMP_NOMADE"),music:"music_shop",level:Q1}},customRoomOrder(){return k.dialogStates.hector===Uf.BEATEN?["shop","trainer"]:["shop","arena"]},preload(E){E.load.tilemapTiledJSON("shop_camp_nomade","assets/maps/shop_camp_nomade.json"),E.load.tilemapTiledJSON("camp_nomade","assets/maps/camp_nomade.json"),Nt("music_pension_et_camp_nomade","assets/audio/music/47 Pikachu's Beach.mp3")}},Ed={type:st.WILD,name:V("destination.CAVE_TAUPIQUEUR"),music:"music_cave",map:"cave_taupiqueur",spawnOtherTeam(){return Pe({[Vt.ref]:1,[bt.ref]:.2,[Xt.ref]:.2,[Yt.ref]:.1})}},Td={type:st.ARENA,name:V("destination.CAVE_TAUPIQUEUR"),music:"music_cave",map:"cave_taupiqueur",trainer:Jg,spawnOtherTeam(){return te([hs,hs,Ii,Qn,bs,li,gi,hi,Ni])}};function Sd(E){Nt("music_cave","assets/audio/music/39 Mt. Moon Cave.mp3"),E.load.tilemapTiledJSON("cave_taupiqueur","assets/maps/cave_taupiqueur.json")}const ta={ref:"CAVE_TAUPIQUEUR_OUEST",name:V("destination.CAVE_TAUPIQUEUR_WEST"),subtext:V("destination_subtext.fast_travel"),nextDestinations:{JADIELLE:[[0,2],[-2,0]]},coordinates:[7*16-8,10*16-8],type:Ct.SPECIAL,icons:["cave_entrance","type_SOL"],rooms:{wild:Ed,trainer:Td},preload:Sd},ea={ref:"CAVE_TAUPIQUEUR_EST",name:V("destination.CAVE_TAUPIQUEUR_EAST"),subtext:V("destination_subtext.fast_travel"),nextDestinations:{CARMIN:[[0,1],[-3,0]],FALAISES:[[0,1],[2,0]]},coordinates:[17*16-8,10*16-8],type:Ct.SPECIAL,icons:["cave_entrance","type_SOL"],rooms:{wild:Ed,trainer:Td},preload:Sd},Ad={ref:"CENTRALE",name:V("destination.CENTRALE"),nextDestinations:{AZURIA:[[0,-1],[-1,0],[0,-1],[-2,0]],OCEANE_AZURIA:[[0,-1],[-1,0],[0,-1],[0,-1],[1,0],[0,-1]],LAVANVILLE:[[1,0],[0,1],[1,0],[0,1]]},coordinates:[17*16-8,5*16-8],type:Ct.WILD,icons:["type_ELECTRIQUE"],rooms:{wild:{type:st.WILD,name:V("destination.CENTRALE"),music:"music_centrale",map:"centrale",spawnOtherTeam(){return!k.pokedexSeen.has(Eo.ref)&&k.day>=20&&Math.random()<10/100?[new Tt({entry:Eo,owner:He,level:50,x:3,y:2})]:Pe({[$t.ref]:1,[Ft.ref]:.5,[wt.ref]:.5,[Ut.ref]:.2})}},trainer:{type:st.ARENA,name:V("destination.CENTRALE"),music:"music_centrale",map:"centrale",trainer:wg,spawnOtherTeam(){return te([an,sn,as,$e,Xi,xa,ws,Gr])}}},preload(E){E.load.tilemapTiledJSON("centrale","assets/maps/centrale.json"),Nt("music_centrale","assets/audio/music/37 Team Rocket Hideout.mp3")}},Kx={ref:"CHAMPS_VERDOYANTS",name:V("destination.CHAMPS_VERDOYANTS"),nextDestinations:{CAMP_NOMADE:[[0,-1],[2,0]],PARMANIE:[[-1,0],[0,1],[-3,0]]},coordinates:[17*16-8,15*16-8],type:Ct.WILD,icons:["type_PLANTE"],rooms:{wild:{type:st.WILD,name:V("destination.CHAMPS_VERDOYANTS"),map:"champs_verdoyants",music:"music_champs_verdoyants",spawnOtherTeam(){return Pe({[kt.ref]:1,[Ft.ref]:.2,[Xt.ref]:.2,[Qt.ref]:.2,[Vt.ref]:.2})}},trainer:{type:st.ARENA,name:V("destination.CHAMPS_VERDOYANTS"),map:"champs_verdoyants",music:"music_champs_verdoyants",trainer:Vg,spawnOtherTeam(){return te([rs,rs,jn,$n,pa,_n,Is,ls,hs])}}},preload(E){E.load.tilemapTiledJSON("champs_verdoyants","assets/maps/champs_verdoyants.json"),Nt("music_champs_verdoyants","assets/audio/music/19 The Road to Viridian City from Pallet.mp3")}},Jx={ref:"COL_DE_MONTAGNE",name:V("destination.COL_MONTAGNE"),nextDestinations:{ARGENTA:[[0,1],[-1,0],[0,1]],MONT_SELENITE:[[2,0]],AZURIA:[[2,0],[4,0]]},coordinates:[8*16-8,3*16-8],type:Ct.WILD,icons:["type_VOL"],rooms:{wild:{type:st.WILD,name:V("destination.COL_MONTAGNE"),music:"music_col_montagne",map:"col_de_montagne",spawnOtherTeam(){return Pe({[Jt.ref]:1,[Ft.ref]:.2,[_t.ref]:.2,[bt.ref]:.2,[wt.ref]:.1})}},trainer:{type:st.ARENA,name:V("destination.COL_MONTAGNE"),map:"col_de_montagne",music:"music_col_montagne",trainer:Rg,spawnOtherTeam(){return te([Il,Sl,Ms,ma,Gu,er,on,wu])}}},preload(E){E.load.tilemapTiledJSON("col_de_montagne","assets/maps/col_de_montagne.json"),Nt("music_col_montagne","assets/audio/music/20 The Road to Cerulean - from Mt. Moon.mp3")}},Cd={ref:"COLLINE_ROYALE",name:V("destination.COLLINE_ROYALE"),nextDestinations:{ARGENTA:[[-2,0],[-2,0]],CELADOPOLE:[[-2,0],[0,2]]},coordinates:[11*16-8,5*16-8],type:Ct.WILD,icons:["type_DRAGON"],rooms:{wild:{type:st.WILD,name:V("destination.COLLINE_ROYALE"),map:"colline_royale",music:"music_colline_royale",spawnOtherTeam(){return Pe({[qt.ref]:1,[Jt.ref]:.5,[Ut.ref]:.2})}},trainer:{type:st.ARENA,name:V("destination.COLLINE_ROYALE"),map:"colline_royale",music:"music_colline_royale",trainer:jg,spawnOtherTeam(){return te([Ur,Ur,Ol])}}},preload(E){E.load.tilemapTiledJSON("ronflex_endormi","assets/maps/ronflex_endormi.json"),E.load.tilemapTiledJSON("colline_royale","assets/maps/colline_royale.json"),Nt("music_colline_royale","assets/audio/music/03 To Bill's Origin - From Cerulean.mp3")}},jx={ref:"RONFLEX_ENDORMI",name:V("destination.CHEMIN_COLLINE"),nextDestinations:{},coordinates:[11*16-8,5*16-8],type:Ct.WILD,icons:["type_NORMAL"],rooms:{wild:{type:st.WILD,name:V("destination.CHEMIN_COLLINE"),map:"ronflex_endormi",music:"music_colline_royale",spawnOtherTeam(){return[new Tt({entry:Ml,owner:He,level:30,x:3,y:3})]}}},preload(E){E.load.tilemapTiledJSON("ronflex_endormi","assets/maps/ronflex_endormi.json")},onExit(){k.wokeUpRonflex=!0,k.currentDestination=Cd}},Zx={ref:"DOJO",name:V("destination.DOJO"),nextDestinations:{SAFRANIA:[[2,0]],CELADOPOLE:[[-3,0]]},coordinates:[12*16-8,7*16-8],type:Ct.WILD,icons:["type_COMBAT"],rooms:{wild:{type:st.WILD,name:V("destination.DOJO"),map:"dojo",music:"music_dojo",spawnOtherTeam(){return Pe({[Ut.ref]:1,[Ft.ref]:.2,[Xt.ref]:.2,[Ht.ref]:.2,[Kt.ref]:.2})}},trainer:{type:st.ARENA,name:V("destination.DOJO"),map:"dojo",music:"music_dojo",trainer:Lg,spawnOtherTeam(){return te([Vr,Vr,br,br,ul,cl,il,Rl])}}},preload(E){E.load.tilemapTiledJSON("dojo","assets/maps/dojo.json"),Nt("music_dojo","assets/audio/music/15 Rival Appears.mp3")}},$x={ref:"FALAISES",name:V("destination.FALAISES"),nextDestinations:{LAVANVILLE:[[0,-4]],CARMIN:[[-2,0],[-3,0]],CAMP_NOMADE:[[0,3]],CAVE_TAUPIQUEUR_EST:[[-2,0],[0,-1]]},coordinates:[19*16-8,11*16-8],type:Ct.WILD,icons:["type_ROCHE"],rooms:{wild:{type:st.WILD,name:V("destination.FALAISES"),map:"falaises",music:"music_falaises",spawnOtherTeam(){return Pe({[bt.ref]:1,[wt.ref]:1,[Jt.ref]:1,[Vt.ref]:.5})}},trainer:{type:st.ARENA,name:V("destination.FALAISES"),map:"falaises",music:"music_falaises",trainer:Og,spawnOtherTeam(){return te([gi,Li,Ms,os,er,Sl,ls,bs])}}},preload(E){E.load.tilemapTiledJSON("falaises","assets/maps/falaises.json"),Nt("music_falaises","assets/audio/music/21 The Road to Lavender Town from Vermilion.mp3")}},Qx={ref:"FORET_JADE",name:V("destination.FORET_JADE"),nextDestinations:{JADIELLE:[[0,3]],ARGENTA:[[0,-4],[2,0]]},coordinates:[5*16-8,9*16-8],type:Ct.WILD,icons:["type_INSECTE"],rooms:{wild:{type:st.WILD,name:V("destination.FORET_JADE"),map:"foret_de_jade",music:"music_foret_jade",spawnOtherTeam(){return Pe({[Xt.ref]:1,[kt.ref]:.2,[Qt.ref]:.2,[se.ref]:.05})}},trainer:{type:st.ARENA,name:V("destination.FORET_JADE"),map:"foret_de_jade",music:"music_foret_jade",trainer:Dg,spawnOtherTeam(){return te([la,hn,_n,aa,on,Nr,ls,rs,jn,Ea])}}},preload(E){E.load.tilemapTiledJSON("foret_de_jade","assets/maps/foret_de_jade.json"),Nt("music_foret_jade","assets/audio/music/38 Viridian Forest.mp3")}},qx={ref:"GROTTE_AZUREE",name:V("destination.GROTTE_AZUREE"),nextDestinations:{AZURIA:[[0,2]]},coordinates:[14*16-8,8],type:Ct.WILD,icons:["type_GLACE"],locked(){return!k.hasBadge(ir)},rooms:{wild:{type:st.WILD,music:"music_grotte_azuree",name:V("destination.GROTTE_AZUREE"),map:"grotte_azuree",spawnOtherTeam(){return!k.pokedexSeen.has(To.ref)&&k.day>=20&&Math.random()<10/100?[new Tt({entry:To,owner:He,level:50,x:3,y:1})]:Pe({[_t.ref]:.5,[wt.ref]:.5,[qt.ref]:.3,[bt.ref]:.2,[Yt.ref]:.1})}},trainer:{type:st.ARENA,name:V("destination.GROTTE_AZUREE"),map:"grotte_azuree",music:"music_grotte_azuree",trainer:Hg,spawnOtherTeam(){return te([Mi,Zn,Oi,ya,qn,Di,Fs,da,tr,ze,es])}}},preload(E){E.load.tilemapTiledJSON("grotte_azuree","assets/maps/grotte_azuree.json"),Nt("music_grotte_azuree","assets/audio/music/40 Pokemon Mansion.mp3")}},Pd={ref:"ILES_ECUME",name:V("destination.ILES_ECUME"),nextDestinations:{CRAMOISILE:[[-4,0]],PARMANIE:[[3,0],[0,-3]]},coordinates:[10*16-8,19*16-8],type:Ct.WILD,icons:["type_EAU"],rooms:{wild:{type:st.WILD,music:"music_iles_ecume",name:"Îles Ecume",map:"iles_ecume",spawnOtherTeam(){return!k.pokedexSeen.has(yo.ref)&&k.day>=20&&Math.random()<10/100?[new Tt({entry:yo,owner:He,level:50,x:3,y:2})]:Pe({[wt.ref]:1,[Ft.ref]:.2,[kt.ref]:.2})}},trainer:{type:st.ARENA,music:"music_iles_ecume",name:V("destination.ILES_ECUME"),map:"iles_ecume",trainer:Fg,spawnOtherTeam(){return te([tr,Ds,aa,Di,Qu,Fs,Oi,Zn,ze])}}},preload(E){E.load.tilemapTiledJSON("iles_ecume","assets/maps/iles_ecume.json"),Nt("music_iles_ecume","assets/audio/music/35 Ocean.mp3")}},_x={ref:"MAISON_PSY",name:V("destination.MAISON_PSY"),nextDestinations:{SAFRANIA:[[0,-1.5]],CARMIN:[[0,2.5]]},coordinates:[14*16-8,8.5*16-8],type:Ct.WILD,icons:["type_PSY"],rooms:{wild:{type:st.WILD,music:"music_mr_psy",name:V("destination.MAISON_PSY"),map:"maison_mr_psy",spawnOtherTeam(){return Pe({[Kt.ref]:1,[Ft.ref]:.2,[kt.ref]:.2,[Ht.ref]:.2})}},trainer:{type:st.ARENA,music:"music_mr_psy",name:V("destination.MAISON_PSY"),map:"maison_mr_psy",trainer:Ug,spawnOtherTeam(){return te([ts,ts,fn,ss,Oi,fl,ca,Ll,xa,fi])}}},preload(E){E.load.tilemapTiledJSON("maison_mr_psy","assets/maps/maison_mr_psy.json"),Nt("music_mr_psy","assets/audio/music/16 Guide.mp3")}},Rd={ref:"MONT_BRAISE",name:V("destination.MONT_BRAISE"),nextDestinations:{BOURG_PALETTE:[[3,-.5],[0,-1.5],[-1,0]],CRAMOISILE:[[3,-.5],[0,2.5]]},coordinates:[3*16-8,17*16-8],type:Ct.WILD,icons:["type_FEU"],rooms:{wild:{name:V("destination.MONT_BRAISE"),map:"mont_braise",type:st.WILD,music:"music_mont_braise",spawnOtherTeam(){return!k.pokedexSeen.has(So.ref)&&k.day>=20&&Math.random()<10/100?[new Tt({entry:So,owner:He,level:50,x:3,y:1})]:Pe({[Ht.ref]:1,[Vt.ref]:.1,[bt.ref]:.1,[Ft.ref]:.1})}},trainer:{type:st.ARENA,name:V("destination.MONT_BRAISE"),map:"mont_braise",music:"music_mont_braise",trainer:Zg,spawnOtherTeam(){return te([er,Qn,Ms,Cl,si,ua,ws,Nl])}}},preload(E){E.load.tilemapTiledJSON("mont_braise","assets/maps/mont_braise.json"),Nt("music_mont_braise","assets/audio/music/49 Unknown Song.mp3")}},ty={ref:"PARC_SAFARI",name:V("destination.PARC_SAFARI"),nextDestinations:{PARMANIE:[[0,2]]},coordinates:[13*16-8,14*16-8],type:Ct.SPECIAL,icons:["safari"],subtext:V("destination_subtext.SAFARI"),rooms:{safari:{type:st.SAFARI,name:V("destination.PARC_SAFARI"),music:"music_safari",map:"safari1",maps:["safari1","safari2","safari3"],spawnOtherTeam:Yx}},preload(E){E.load.tilemapTiledJSON("safari1","assets/maps/safari1.json"),E.load.tilemapTiledJSON("safari2","assets/maps/safari2.json"),E.load.tilemapTiledJSON("safari3","assets/maps/safari3.json"),Nt("music_safari","assets/audio/music/36 Casino.mp3")}},Ld={ref:"PENSION",name:V("destination.PENSION"),nextDestinations:{AZURIA:[[0,-2]],SAFRANIA:[[0,2]]},coordinates:[14*16-8,5*16-8],type:Ct.SPECIAL,icons:["type_NORMAL"],subtext:"Élevage",rooms:{pension:{name:V("destination.PENSION"),type:st.PENSION,trainer:Kg,music:"music_pension_et_camp_nomade",map:"pension",spawnOtherTeam(){return k.pension}}},preload(E){E.load.tilemapTiledJSON("pension","assets/maps/pension.json"),Nt("music_pension_et_camp_nomade","assets/audio/music/47 Pikachu's Beach.mp3")}},ey={ref:"PISTE_CYCLABLE",name:V("destination.PISTE_CYCLABLE"),nextDestinations:{CELADOPOLE:[[0,-5]],PARMANIE:[[0,4],[4,0]]},coordinates:[9*16-8,12*16-8],type:Ct.WILD,icons:["type_POISON"],rooms:{wild:{type:st.WILD,name:V("destination.PISTE_CYCLABLE"),map:"piste_cyclable",music:"music_piste_cyclable",spawnOtherTeam(){return Pe({[Qt.ref]:1,[Ft.ref]:.4,[$t.ref]:.4})}},trainer:{type:st.ARENA,name:V("destination.PISTE_CYCLABLE"),map:"piste_cyclable",music:"music_piste_cyclable",trainer:Ig,spawnOtherTeam(){return te([hi,Jn,Ni,Ii,xl,li,hn,sn,Xi])}}},preload(E){E.load.tilemapTiledJSON("piste_cyclable","assets/maps/piste_cyclable.json"),Nt("music_piste_cyclable","assets/audio/music/34 Cycling.mp3")}},Od={type:st.WILD,name:V("destination.ROUTE_VICTOIRE"),music:"music_route_victoire",map:"route_victoire",spawnOtherTeam(){return Pe({[Vt.ref]:1,[bt.ref]:1,[Kt.ref]:1,[Ut.ref]:1,[Ht.ref]:.5,[wt.ref]:.5,[kt.ref]:.5,[$t.ref]:.5,[qt.ref]:.5,[Yt.ref]:.25,[_t.ref]:.25,[se.ref]:.25,[$t.ref]:.25})}},ia={ref:"ROUTE_VICTOIRE_ENTREE",name:V("destination.ROUTE_VICTOIRE_ENTREE"),subtext:V("destination_subtext.fast_travel"),nextDestinations:{JADIELLE:[[0,7],[3,0]]},coordinates:[2*16-8,5*16-8],type:Ct.WILD,icons:["cave_entrance"],rooms:{wild:Od},preload:Md,locked(){return k.player.badges.length<8},customRoomOrder(){return["wild"]}},sa={ref:"ROUTE_VICTOIRE_SORTIE",name:V("destination.ROUTE_VICTOIRE_SORTIE"),subtext:V("destination_subtext.fast_travel"),nextDestinations:{LIGUE:[[0,1],[1,0],[0,-1]]},coordinates:[1*16-8,3*16-8],type:Ct.SPECIAL,icons:["cave_entrance"],rooms:{wild:Od},preload:Md,customRoomOrder(){return["wild"]}};function Md(E){Nt("music_route_victoire","assets/audio/music/22 The Last Road.mp3"),E.load.tilemapTiledJSON("route_victoire","assets/maps/route_victoire.json")}const iy={ref:"TOUR_POKEMON",name:V("destination.TOUR_POKEMON"),nextDestinations:{SAFRANIA:[[-2,0]],LAVANVILLE:[[3,0]]},coordinates:[16*16-8,7*16-8],type:Ct.WILD,icons:["type_SPECTRE"],rooms:{wild:{name:V("destination.TOUR_POKEMON"),type:st.WILD,map:"tour_pokemon",music:"music_tour_pokemon",spawnOtherTeam(){return Pe({[Yt.ref]:1,[Ft.ref]:.2,[Kt.ref]:.2})}},trainer:{type:st.ARENA,name:V("destination.TOUR_POKEMON"),map:"tour_pokemon",music:"music_tour_pokemon",trainer:kg,spawnOtherTeam(){return te([li,li,li,ga,ma,ua,is,ts,Ea])}}},preload(E){E.load.tilemapTiledJSON("tour_pokemon","assets/maps/tour_pokemon.json"),Nt("music_tour_pokemon","assets/audio/music/41 Pokemon Tower.mp3")}},en={BOURG_PALETTE:Kn,JADIELLE:ah,CAVE_TAUPIQUEUR_OUEST:ta,CAVE_TAUPIQUEUR_EST:ea,FORET_JADE:Qx,ARGENTA:sh,COLLINE_ROYALE:Cd,COL_DE_MONTAGNE:Jx,MONT_SELENITE:ch,AZURIA:nh,GROTTE_AZUREE:qx,PENSION:Ld,CENTRALE:Ad,LAVANVILLE:oh,TOUR_POKEMON:iy,SAFRANIA:hd,DOJO:Zx,CELADOPOLE:od,MAISON_PSY:_x,CARMIN:ad,OCEANE_CARMIN:kn,OCEANE_CRAMOISILE:Ls,OCEANE_AZURIA:Os,FALAISES:$x,CAMP_NOMADE:kx,CHAMPS_VERDOYANTS:Kx,PARMANIE:lh,PARC_SAFARI:ty,PISTE_CYCLABLE:ey,ILES_ECUME:Pd,CRAMOISILE:rh,MONT_BRAISE:Rd,ROUTE_VICTOIRE_ENTREE:ia,ROUTE_VICTOIRE_SORTIE:sa,LIGUE:ld},sy=[kn,Ls,Os,ta,ea,ia,sa],Ru=new Map([[Os,kn],[kn,Ls],[Ls,Os],[ta,ea],[ea,ta],[ia,sa],[sa,ia]]),Lu=[{ref:"i1",coordinates:[136,72],nextDestinations:{ARGENTA:[[-2,0]],COLLINE_ROYALE:[[2,0]],CELADOPOLE:[[0,2]]},onReach:ry},{ref:"i2",coordinates:[152,40],nextDestinations:{COL_DE_MONTAGNE:[[-2,0]],AZURIA:[[4,0]],MONT_SELENITE:[[0,-1]]}},{ref:"i3",coordinates:[248,40],nextDestinations:{AZURIA:[[-2,0]],OCEANE_AZURIA:[[0,-1],[1,0],[0,-1]],CENTRALE:[[0,1],[1,0],[0,1]]}},{ref:"i4",coordinates:[264,168],nextDestinations:{CAVE_TAUPIQUEUR_EST:[[0,-1]],FALAISES:[[2,0]],CARMIN:[[-3,0]]}},{ref:"i5",coordinates:[88,252],nextDestinations:{BOURG_PALETTE:[[0,-1.5],[-1,0]],MONT_BRAISE:[[-3,.7]],CRAMOISILE:[[0,2.5]]}}],ny={[Ct.ARENA]:3403519,[Ct.WILD]:3407667,[Ct.SPECIAL]:16777011};function ry(){return new Promise(E=>k.wokeUpRonflex?E(!0):k.player.inventory[Tn.ref]>0?Mt([V("dialog.sleeping_pokemon.0"),V("dialog.sleeping_pokemon.1"),{[V("yes")]:()=>(Ga(jx),E(!0),null),[V("no")]:()=>(E(!1),null)}]):Mt([V("dialog.sleeping_pokemon.0")]).then(()=>E(!1)))}let ge;function ay(){const E=k.activeScene;ge=E.add.group();const A=7,C=50,R=lg(),F=R.pokemons.filter(p=>p.owner===xe).sort((p,a)=>(R.damageDone.get(a.uid)??0)-(R.damageDone.get(p.uid)??0)),B=R.pokemons.filter(p=>p.owner!==xe).sort((p,a)=>(R.damageDone.get(p.uid)??0)-(R.damageDone.get(a.uid)??0)),v=Math.max(...R.damageDone.values()),y=Math.max(...R.damageReceived.values()),t=Math.max(v,y,100);for(let p=0;p<6;p++)h(F[p],C,A+132+5+p*22,!0);for(let p=0;p<6;p++)h(B[p],C,A+5+p*22,!1);function h(p,a,n,r){if(!p)return;const e=r?a:a+220-64,s=n-(p.entry.portraitCropY??16)+1,o=E.add.graphics().setDepth(ft.MENU_LAYOUT);o.fillStyle(15262161).lineStyle(1,5131078).fillRect(e,n,64,22).strokeRect(e,n,64,22),ge==null||ge.add(o);const i=E.add.sprite(e,s,"pokemon_portraits");i.setOrigin(0,0),i.setCrop(0,p.entry.portraitCropY??16,64,21),i.play(`${p.entry.ref}_portrait`),i.setDepth(ft.MENU_OBJECTS),r&&(i.flipX=!0),ge==null||ge.add(i);const l=130,u=R.damageDone.get(p.uid)??0,f=r?a+64:a+220-65,d=E.add.graphics();d.setDepth(ft.MENU_OBJECTS).setScrollFactor(0),ge==null||ge.add(d);const c={color:"white",stroke:"black",strokeThickness:2},m=l*u/t;d.fillStyle(16711680).lineStyle(1,5131078).fillRect(r?f:f-m+1,n+6,m,10).strokeRect(r?f:f-m+1,n+6,m,10);const g=gt(r?f+m+2:f-m-2,n+11,u.toFixed(0),c).setOrigin(r?0:1,.5).setDepth(ft.MENU_TOOLTIPS);ge==null||ge.add(g)}ge.setDepth(ft.MENU),y1(E,ge,500)}function oy(){if(!ge)return;const E=k.activeScene;E1(E,ge,500).then(()=>{ge&&(ge.destroy(!0),ge=null)})}var Se=(E=>(E.CREATION="CREATION",E.PLACEMENT="PLACEMENT",E.CAPTURE="CAPTURE",E.LAUNCH="LAUNCH",E.FIGHT="FIGHT",E.ENDED="ENDED",E))(Se||{});class ly{constructor(){ut(this,"day");ut(this,"currentDestination");ut(this,"currentRoomIndex");ut(this,"roomOrder");ut(this,"players");ut(this,"board");ut(this,"stage");ut(this,"fightTime");ut(this,"fightTimer");ut(this,"fightClock");ut(this,"activeScene");ut(this,"activeMenu");ut(this,"activeDialog");ut(this,"starters");ut(this,"music");ut(this,"dialogStates");ut(this,"seed");ut(this,"lastCaptureDestination");ut(this,"lastTourMam");ut(this,"pension");ut(this,"pokedexSeen");ut(this,"pokedexCaptured");ut(this,"wokeUpRonflex");this.activeScene=null,this.reset(),window.gameState=this}reset(){this.day=0,this.currentDestination=Kn,this.currentRoomIndex=0;const A=new wo(1),C=new wo(2);this.players=[A,C],this.board=cd(A),this.stage="CREATION",this.activeMenu=null,this.activeDialog=null,this.starters=h1(),this.pension=[],this.dialogStates={},this.seed=Ce(1,4**10),this.lastCaptureDestination=null,this.lastTourMam=0,this.pokedexCaptured=new Set,this.pokedexSeen=new Set,this.wokeUpRonflex=!1}get player(){return this.players[0]}get currentRoom(){const A=this.roomOrder[this.currentRoomIndex];return this.currentDestination.rooms[A]}get allPokemonsOnBoard(){return[...k.board.playerTeam,...k.board.otherTeam]}hasBadge(A){return k.player.badges.includes(A.ref)}receiveBadge(A){k.player.badges.includes(A.ref)||k.player.badges.push(A.ref)}initGame(A){!A||!e1()?(k.reset(),this.pension=zx(),Ga(Kn)):this.activeScene.scene.start("MapScene")}goToNextRoom(){const A=this.roomOrder;this.currentRoomIndex++,this.currentRoomIndex>=A.length?k.exitDestination():k.initRoom()}exitDestination(){k.currentDestination.onExit&&k.currentDestination.onExit(),Ru.has(k.currentDestination)&&(k.currentDestination=Ru.get(k.currentDestination),k.lastCaptureDestination!=null&&(k.lastCaptureDestination=k.currentDestination)),this.nextDay(),k.activeScene.scene.start("MapScene")}nextDay(){k.day++,_g(),A1()}initRoom(){cf(),k.currentRoom.type===st.FREEWALK?k.activeScene.scene.start("RoomScene"):k.activeScene.scene.start("GameScene")}initFight(A){this.stage="LAUNCH",Le(),Mx(A),k.board.xpEarned=Nx(),hg(),gg(),A.time.addEvent({delay:900,callback:()=>{A.hideCenterText();for(const C of this.board.playerTeam)zo(C,A);if(k.currentRoom.type===st.ARENA)for(const C of this.board.otherTeam)zo(C,A)}}),A.time.addEvent({delay:2600,callback:()=>{this.stage="FIGHT",this.fightTimer=A.time.addEvent({delay:A.gameSpeed,callback:this.loopFight,callbackScope:this,loop:!0}),this.fightTime=0,this.fightClock=A.time.addEvent({delay:1e3,callback:this.onClockTick,callbackScope:this,loop:!0})}})}loopFight(){const A=k.activeScene;this.stage==="FIGHT"&&(k.allPokemonsOnBoard.forEach(C=>{pg(C,A),ng(C,A)}),v0(A),o1())}async endFight(A){const C=k.activeScene,R=k.currentRoom;this.stage="ENDED",og(),C.time.removeEvent(this.fightTimer),C.time.removeEvent(this.fightClock);const F=C.sprites.get("player"),B=A!==1;B?(F==null||F.play("trainer_victory"),Zr("text_victoire",C),R.type===st.WILD?Fe("music_victory_wild"):Fo.includes(R.trainer)?Fe("music_victory_champion"):Fe("music_victory_trainer")):(F==null||F.play("trainer_defeat"),Zr("text_defaite",C)),Ax(),f1(),Et(750).then(()=>{ug(),ay()});let v=(k.board.xpEarned||0)/k.player.team.length;v=Math.max(1,Math.ceil(v));const y=[];if(B?(R.type===st.ARENA&&R.trainer&&y.push(V("victory",{trainer:V(`trainer.${R.trainer.ref}`)})),y.push(V("victory_xp",{xp:Math.round(v/10)}))):R.type!==st.TUTORIAL&&y.push(V("defeat.0"),V("defeat.1")),k.player.team.forEach(t=>t.resetAfterFight()),await Mt(y),B)for(const t of k.player.team)await Mf(t,v);if(oy(),[st.ARENA,st.TUTORIAL].includes(k.currentRoom.type)){const t=k.currentRoom;if(await Mt(B?t.trainer.dialogs.victory:t.trainer.dialogs.defeat,{speaker:t.trainer.ref}),k.currentRoom.type===st.ARENA){let h=1;B&&(Fo.includes(t.trainer)?h=3:Jf.includes(t.trainer)?h=0:h=2),h>0&&await Ye(We,h,!1,"trainer")}}k.afterEnd(B)}endCapture(){const A=k.activeScene;this.stage="ENDED",A.time.removeEvent(this.fightTimer),A.time.removeEvent(this.fightClock);const C=A.sprites.get("player");return C==null||C.play("trainer_victory"),sd(),Et(100).then(()=>{if(k.currentRoom.type===st.TUTORIAL){const R=k.currentRoom;let F=R.trainer.dialogs.victory;return k.dialogStates.assistant_tuto===zn.AFTER_WILD&&(F=R.trainer.dialogs.step3),Mt(F,{speaker:R.trainer.ref})}}).then(()=>{k.afterEnd(!0)})}afterEnd(A){if(k.currentRoom.type===st.TUTORIAL&&k.dialogStates.assistant_tuto===zn.BEFORE_WILD){const C=k.currentRoom;Mt(C.trainer.dialogs.step2,{speaker:C.trainer.ref})}else(k.currentRoom.beforeExit||(()=>Promise.resolve()))().then(()=>Bi(400)).then(()=>{A?k.goToNextRoom():k.exitDestination()})}onClockTick(){this.fightTime++,this.fightTime>=30&&this.fightTime%10===0&&Sg(),k.allPokemonsOnBoard.forEach(A=>{A.buffs.clock.forEach(C=>C())})}registerPokemonsSeen(A){A.map(C=>C.entry.ref).forEach(C=>this.pokedexSeen.add(C))}registerPokemonCaptured(A){this.pokedexCaptured.add(A.entry.ref)}}const k=new ly;class hy extends Vs{constructor(){super("GameOverScene");ut(this,"canInteract",!1)}preload(){Bs(this),bi(this),Nt("music_ending","assets/audio/music/30 Ending.mp3")}create(){k.activeScene=this,nr(this),this.displayEndScreen(),Fe("music_ending")}onPressStart(){this.handleClick()}onPressA(){this.handleClick()}onClick(){this.handleClick()}handleClick(){this.canInteract&&Bi(2e3).then(()=>this.scene.start("MenuScene"))}async displayEndScreen(){k.player.team.forEach((C,R)=>{Et(3e3*R).then(()=>this.displayEndScreenPokemonInfo(C))}),await Et(18e3),this.displayPlayerResume(),await Et(1e4),this.canInteract=!0}displayEndScreenPokemonInfo(C){const R=this.add.group(),F=game.scale.height+80,B=game.scale.width/2,v=this.add.nineslice(B,F,"box1",void 0,280,84,8,8,8,8).setOrigin(.5,.5).setScrollFactor(0);R.add(v);const y=gt(B-50,F-28,`${V(`pokemon.${C.entry.ref}`)} Lv${C.level}`);R.add(y);const t=this.add.sprite(B-92,F-1,"pokemon_portraits");t.play(`${C.entry.ref}_portrait`),t.setScrollFactor(0),R.add(t);for(let h=0;h{E.load.audio(Sa(A),[`assets/audio/sounds/cries/${sf(A)}.ogg`])})}class dy extends Vs{preload(){k.activeScene=this;const A=gt(game.scale.width/2,game.scale.height-8,V("loading"),{align:"center"});A.setOrigin(.5).setDepth(3);const C=this.add.graphics().fillStyle(6977852),R=this.add.graphics().fillStyle(9869705);R.fillRect(0,game.scale.height-16,game.scale.width,16),this.load.on("progress",F=>{A.setText(`${Math.round(F*100)}%`),C.fillRect(0,game.scale.height-16,game.scale.width*F,16),C.setDepth(2)}),this.load.on("complete",()=>{C.destroy(),R.destroy(),this.scene.start("MenuScene")}),uy(this),Bs(this),bi(this),Oa(this)}}let ue=null;const cy={[Ct.ARENA]:"#006699",[Ct.WILD]:"#669900",[Ct.SPECIAL]:"#996600"};function xo(E,A){ue==null||ue.destroy(!0);const C=32;ue=A.add.container(A.scale.width-8,A.scale.height-6);const R=cy[E.type],F=gt(-4,2,E.name).setOrigin(1,0).setDepth(ft.MENU_TOOLTIPS),B=gt(-6-E.icons.length*16,16,Hx(E),{color:R}).setOrigin(1,0).setDepth(ft.MENU_TOOLTIPS),v=Math.max(F.width,B.width+E.icons.length*16)+12,y=A.add.nineslice(-v,0,"box2",void 0,v,C,4,4,4,4).setOrigin(0,0).setDepth(ft.MENU_LAYOUT);ue==null||ue.add(y),ue==null||ue.add(B),ue==null||ue.add(F),E.icons.forEach((t,h)=>{const p=A.add.sprite(-12-h*16,22,"gui",0);p.play(t).setDepth(ft.MENU_OBJECTS),ue==null||ue.add(p)}),A.tweens.add({targets:[ue],y:"-=34",duration:200})}function Ou(E){ue&&E.tweens.add({targets:[ue],y:"+=40",delay:100,duration:100,onComplete(){ue==null||ue.destroy(!0),ue=null}})}function vy(){const E=k.activeScene,A=E.add.nineslice(E.scale.width/2,-32,"box2",void 0,160,0,4);A.setOrigin(.5,.5);const C=gt(E.scale.width/2,-30,V("day_number",{day:k.day}),{color:"#000"});C.setOrigin(.5,.5),C.setScrollFactor(0),A.setSize(C.width+24,C.height+12),A.setScrollFactor(0),A.setDepth(ft.MENU_TOOLTIPS),C.setDepth(ft.MENU_TOOLTIPS+1),E.add.tween({targets:[A,C],duration:400,y:"+=38",ease:"Linear"}),E.add.tween({targets:[A,C],duration:400,y:-36,ease:"Linear",delay:2e3})}function py(E){let A=0;for(const C of E){const[R,F]=C;A+=Math.abs(R)+Math.abs(F)}return A}class my extends Vs{constructor(){super("MapScene");ut(this,"gameSpeed",100);ut(this,"player");ut(this,"isMoving",!1);ut(this,"origin");ut(this,"originZone");ut(this,"availableDestinations");ut(this,"destinationSelected");ut(this,"destinationReached");ut(this,"intersectionReached");ut(this,"destinationsHighLightGroup");ut(this,"directions");ut(this,"directionsGroup");ut(this,"destinationPanelTween");this.sprites=new Map,this.graphics=new Map,this.availableDestinations=[],this.intersectionReached=null,this.destinationSelected=null,this.destinationsHighLightGroup=null,this.directionsGroup=null,this.origin=k.currentDestination,this.destinationReached=this.origin,this.originZone=null,this.destinationPanelTween=null,this.isMoving=!1,this.directions=Eh()}preload(){Bs(this),bi(this),Oa(this)}create(){k.activeScene=this,this.origin=k.currentDestination,this.intersectionReached=null,this.destinationReached=this.origin,this.destinationsHighLightGroup=this.add.group(),this.directionsGroup=this.add.group(),nr(this),Ra(this.anims),this.drawMap(),this.drawMapObjects(),this.drawBadges(),this.updateDestinations(),this.updateDirections(this.origin.nextDestinations),xo(this.origin,this),vy(),ud(),Fe("music_overworld"),pf(250)}update(){var C,R;if(this.isMoving)this.updatePlayerPosition();else{Ma(this);const{moveVector:F}=kl(this);if(F.length()>1){const B=Hl(F);if(B!=null&&this.directions[B]!=null){const y=(((C=this.intersectionReached)==null?void 0:C.nextDestinations)??((R=this.destinationReached)==null?void 0:R.nextDestinations)??this.origin.nextDestinations)[this.directions[B]];if(y!=null){const t=this.intersectionReached||this.destinationReached||this.origin;this.walkPath(y,t.coordinates)}}}}}onPressA(){if(k.activeMenu!=null)return ar();if(k.activeDialog)return ur();!this.isMoving&&this.destinationReached!=null&&(!this.destinationSelected||this.destinationSelected===this.destinationReached)&&Ga(this.destinationReached)}onPressStart(){}onClick(){Yo(this)}changeOrigin(C){var R;this.origin=C,(R=this.player)==null||R.setPosition(C.coordinates[0],C.coordinates[1]),this.destinationReached=C,this.updateDestinations(),this.updateDirections(this.origin.nextDestinations)}debugIntersections(){const C=this.add.graphics().fillStyle(16711680,.5);this.originZone&&C.fillRect(this.originZone.x-8,this.originZone.y-8,this.originZone.width,this.originZone.height),Lu.forEach(R=>{C.fillCircle(R.coordinates[0],R.coordinates[1],8).setDepth(9999)})}updatePlayerPosition(){var y,t;if(this.player==null)return;const{x:C,y:R}=this.player,F=Lu.find(h=>new Phaser.Geom.Circle(h.coordinates[0],h.coordinates[1],8).contains(C,R));if(F!=null&&!this.intersectionReached&&!this.destinationSelected)return this.destinationReached=null,this.intersectionReached=F,Et(200).then(()=>{var p,a;(p=this.player)==null||p.play("player_idle"),(a=this.player)==null||a.setPosition(F.coordinates[0],F.coordinates[1]),this.isMoving=!1}),(F.onReach||(()=>Promise.resolve(!0)))().then(p=>{p?Et(250).then(()=>{this.updateDirections(F.nextDestinations)}):this.walkPath(F.nextDestinations[this.origin.ref],F.coordinates)});const v=((y=this.originZone)==null?void 0:y.getBounds().contains(C,R+5))?this.origin:((t=this.availableDestinations.map(h=>this.sprites.get(`${h.ref}_highlight`)).find(h=>h==null?void 0:h.getBounds().contains(C,R+5)))==null?void 0:t.getData("destination"))??null;this.destinationReached!==v&&(v==null&&this.destinationReached!=null?Ou(this):v!=null&&(xo(v,this),(!this.destinationSelected||this.destinationSelected===v)&&Et(350).then(()=>{this.updateDirections(v.nextDestinations)})),this.destinationReached=v)}drawMap(){const C=this.make.tilemap({key:"overworld"}),R=C.addTilesetImage("overworld","overworld");R&&(C.createLayer("ground0",R),C.createLayer("ground1",R),C.createLayer("ground2",R),C.createLayer("top0",R))}drawMapObjects(){const[C,R]=k.currentDestination.coordinates;if(this.player=this.add.sprite(C,R,"characters"),this.player.play("player_idle").setDepth(ft.PLAYER),this.sprites.set("player",this.player),!k.hasBadge(ir)){const y=this.add.sprite(216,8,"map").play("cascade");this.sprites.set("cascade",y)}const[F,B]=this.getBoatCoordinates(),v=this.add.sprite(F*16-8,B*16-8,"map").play("boat");if(this.sprites.set("boat",v),!k.wokeUpRonflex){const y=this.add.sprite(136,72,"map").play("ronflex");this.sprites.set("ronflex",y)}}drawBadges(){const C=Co.length;Co.forEach((R,F)=>{const B=48+F%(C/2)*17,v=12+Math.floor(F/(C/2))*17,y=R.frameIndex+(k.hasBadge(R)?0:16),t=this.add.sprite(B,v,"icons16x16").setFrame(y);this.sprites.set(R.ref,t)})}updateDestinations(){var R;(R=this.destinationsHighLightGroup)==null||R.clear(!1,!0);const C=Object.keys(this.origin.nextDestinations).find(F=>!(F in en));if(C)return console.error(`DESTINATION NOT DECLARED: ${C}`);this.availableDestinations=Object.keys(this.origin.nextDestinations).map(F=>en[F]).filter(F=>!F.locked||!F.locked()).concat(this.origin);for(const F of this.availableDestinations){const[B,v]=F.coordinates,y=this.add.sprite(B,v,"map").play("highlight").setDepth(ft.MAP_HIGHLIGHT).setAlpha(.75).setTint(ny[F.type]??16777215);y.setData("destination",F),this.sprites.set(`${F.ref}_highlight`,y),this.registerDestination(F,y),F.preload&&(F.preloading=!0,F.preload(this),this.load.start(),this.load.on("complete",()=>{console.log(`finished preloading destination ${F.ref}`),F.preloading=!1}))}}registerDestination(C,R){var F;pe(R),(F=this.destinationsHighLightGroup)==null||F.add(R),R.on("over",()=>{xo(C,this)}),R.on("out",()=>{Ou(this)}),R.on("click",()=>{if(this.isMoving||this.destinationReached===C)return;this.destinationSelected=C;const B=this.destinationReached||this.intersectionReached||this.origin;if(C.ref in B.nextDestinations){const v=B.nextDestinations[C.ref];this.walkPath(v,B.coordinates)}else if(this.origin.ref in B.nextDestinations){const v=B.nextDestinations[this.origin.ref],y=this.origin.nextDestinations[C.ref];this.walkPath([...v,...y],B.coordinates)}})}updateDirections(C){var R;(R=this.directionsGroup)==null||R.clear(!1,!0),this.directions=Eh(),Object.entries(C).forEach(([F,B])=>{if(this.destinationReached!=null&&this.destinationReached!==this.origin&&F!==this.origin.ref)return;const v=Ca(...B[0]),y=en[F];v!=null&&(!y.locked||!y.locked())&&(this.directions[v]=F)}),Object.entries(this.directions).forEach(([F,B])=>{var h;if(B==null||!this.player)return;const[v,y]=sr(F),t=this.add.sprite(this.player.x+v*12,this.player.y+y*12,"map",20).play("map_direction_arrow");t.setDepth(ft.MENU_OBJECTS).setRotation(Wl(F)),(h=this.directionsGroup)==null||h.add(t),this.tweens.add({targets:[t],duration:300,ease:Phaser.Math.Easing.Sine,x:`+=${v*4}`,y:`+=${y*4}`,yoyo:!0,repeat:-1})})}walkPath(C,R){var y;if(!this.player)return;let B=R[0],v=R[1];this.player.setPosition(B,v),this.isMoving=!0,(y=this.directionsGroup)==null||y.clear(!1,!0),C.reduce(async(t,h)=>{var r,e,s,o;if(await t,this.intersectionReached&&!r0(this.intersectionReached.coordinates,R))return Promise.reject("STOP");const[p,a]=h,n=py([h])*1e3/2.5;return B+=p*16,v+=a*16,this.tweens.add({targets:[this.player],t:1,duration:n,x:`+=${p*16}`,y:`+=${a*16}`}),a>=1?(r=this.player)==null||r.play("player_down",!0):a<=-1?(e=this.player)==null||e.play("player_up",!0):p>=1?(s=this.player)==null||s.play("player_right",!0):p<=-1&&((o=this.player)==null||o.play("player_left",!0)),await Et(n)},Promise.resolve()).then(()=>{var t;this.intersectionReached=null,this.destinationSelected=null,Et(200).then(()=>{this.isMoving=!1}),(t=this.player)==null||t.play("player_idle"),this.updatePlayerPosition()}).catch(t=>{if(t!=="STOP")throw t})}getBoatCoordinates(){return[Kn,ah,Rd,rh,Pd,lh,Ls].includes(k.currentDestination)?[4,19]:[ch,nh,sh,Ad,Ld,oh,Os].includes(k.currentDestination)?[18,1]:[12,11]}}class gy extends Vs{constructor(){super("MenuScene");ut(this,"isIntroAnim",!0)}preload(){Bs(this),bi(this)}create(){k.activeScene=this,rf(this.anims),nr(this),Fe("music_opening"),this.isIntroAnim=!0,this.swipe("salameche",100,"left",120),this.swipe("bulbizarre",800,"right",240),this.swipe("carapuce",1500,"left",140),this.swipe("pikachu",2200,"right",260),this.swipe("minidraco",2900,"left",100),this.swipe("fantominus",3600,"right",220),this.swipeDiag("miaouss",4300,"top-left",1e3),this.swipeDiag("machoc",4800,"bottom-left",1e3),this.swipeDiag("roucool",5300,"bottom-right",1e3),this.swipeDiag("melofee",5800,"top-right",1e3),this.swipe("chenipan",6700,"left",60),this.swipe("racaillou",6700,"right",260),this.swipe("otaria",7400,"left",100),this.swipe("sabelette",7400,"right",220),this.swipe("nidoranm",8100,"left",140),this.swipe("abra",8100,"right",180),this.finalPose(7700)}onPressStart(){this.handleClick()}onPressA(){k.activeMenu!=null?ar():this.handleClick()}onPressB(){}onClick(){this.handleClick()}handleClick(){this.isIntroAnim&&this.skipIntro()}update(){Ma(this)}drawMenu(){const C=[{label:V("new_game"),x:16,y:0,value:"newgame"}];t1()&&(C[0].y=20,C.unshift({label:V("continue"),x:16,y:0,value:"continue"})),Gs({ref:"main_menu",x:100,y:260,width:120,height:44,background:"box2",offset:16,entries:C,handleChoice(R){R.value==="newgame"?k.initGame(!1):R.value==="continue"&&k.initGame(!0)}})}swipe(C,R,F,B){const v=F==="left"?350:-30,y=this.add.sprite(v,B,"pokemon_portraits").play(`${C}_portrait`);this.tweens.add({targets:[y],delay:R,duration:500,ease:"Linear",x:F==="left"?-30:350})}swipeDiag(C,R,F,B=1e3){const v=F==="top-left"||F==="bottom-left"?350:-30,y=F==="top-left"||F==="top-right"?350:-30,t=this.add.sprite(v,y,"pokemon_portraits").play(`${C}_portrait`);this.tweens.add({targets:[t],duration:B,delay:R,ease:"Linear",x:F==="top-left"||F==="bottom-left"?-30:350,y:F==="top-left"||F==="top-right"?-30:350})}skipIntro(){cf(),this.tweens.tweens.forEach(C=>{C.targets.forEach(R=>{C.stop(),R instanceof Phaser.GameObjects.GameObject&&R.destroy()})}),this.finalPose(0,!0)}finalPose(C,R=!1){const F=this.add.sprite(this.scale.width/2,-100,"logo");this.sprites.set("logo",F);const B=this.add.sprite(this.scale.width/2+17,399,"trainer").setFrame(7),v=this.add.sprite(this.scale.width/2-128,396,"pokemon_portraits").play("minidraco_portrait"),y=this.add.sprite(this.scale.width/2-115,408,"pokemon_portraits").play("nidoranm_portrait"),t=this.add.sprite(this.scale.width/2+74,400,"pokemon_portraits").play("abra_portrait"),h=this.add.sprite(this.scale.width/2+50,397,"pokemon_portraits").play("roucool_portrait"),p=this.add.sprite(this.scale.width/2-74,397,"pokemon_portraits").play("melofee_portrait"),a=this.add.sprite(this.scale.width/2-98,422,"pokemon_portraits").play("otaria_portrait"),n=this.add.sprite(this.scale.width/2-23,404,"pokemon_portraits").play("pikachu_portrait"),r=this.add.sprite(this.scale.width/2-8,430,"pokemon_portraits").play("salameche_portrait"),e=this.add.sprite(this.scale.width/2+48,426,"pokemon_portraits").play("bulbizarre_portrait"),s=this.add.sprite(this.scale.width/2+114,402,"pokemon_portraits").play("fantominus_portrait"),o=this.add.sprite(this.scale.width/2-45,412,"pokemon_portraits").play("sabelette_portrait"),i=this.add.sprite(this.scale.width/2-70,425,"pokemon_portraits").play("carapuce_portrait"),l=this.add.sprite(this.scale.width/2+142,408,"pokemon_portraits").play("machoc_portrait"),u=this.add.sprite(this.scale.width/2+82,423,"pokemon_portraits").play("miaouss_portrait"),f=this.add.sprite(this.scale.width/2+120,429,"pokemon_portraits").play("racaillou_portrait"),d=this.add.sprite(this.scale.width/2-138,423,"pokemon_portraits").play("chenipan_portrait");this.tweens.add({targets:[F],y:100,duration:R?0:2e3,delay:R?0:C+2e3,ease:Phaser.Math.Easing.Bounce.Out}),this.tweens.add({targets:[B,r,n,e,i,s,d,y,v,p,h,l,f,a,o,u,t],y:"-=200",duration:R?0:2500,delay:C,ease:"Linear"}),Et(R?0:C+4e3).then(()=>{this.isIntroAnim=!1,Fe("music_overworld"),this.drawMenu()})}}class xy extends At.Game{constructor(C){super(C);ut(this,"state");this.state=k,document.getElementById("infos").innerHTML=`

Pokéchess v 1.2

${V("home.description.0")}

${V("home.description.1")}

@@ -6375,4 +6375,4 @@ ${A[1]}`)]:V("descriptions.pc_record.1")},V("descriptions.pc_record.5")]};let co

- `,Sm(),km();const R=document.getElementById("language_select");R.value=Uh.language,R.onchange=F=>{Uh.changeLanguage(R.value),window.location.reload()}}}function cy(){const E=new dy({type:At.AUTO,parent:"game",backgroundColor:"#CACDB8",scale:{width:320,height:320,mode:At.Scale.FIT,autoCenter:At.Scale.CENTER_BOTH},input:{gamepad:!0,mouse:!0,touch:!0},render:{pixelArt:!0},physics:{default:"arcade",arcade:{debug:!1}},scene:[ay,fy,Qf,uy,nd,sy,af]});globalThis.game=E}xm.then(()=>{switch(window.location.pathname){case"/debug":zv();break;default:cy();break}});"serviceWorker"in navigator&&window.addEventListener("load",()=>{navigator.serviceWorker.register("./sw.js",{scope:"./"}).then(E=>{console.log("ServiceWorker registration successful with scope: ",E.scope)},E=>{console.log("ServiceWorker registration failed: ",E)})}); + `,Om(),Qm();const R=document.getElementById("language_select");R.value=Uh.language,R.onchange=F=>{Uh.changeLanguage(R.value),window.location.reload()}}}function yy(){const E=new xy({type:At.AUTO,parent:"game",backgroundColor:"#CACDB8",scale:{width:320,height:320,mode:At.Scale.FIT,autoCenter:At.Scale.CENTER_BOTH},input:{gamepad:!0,mouse:!0,touch:!0},render:{pixelArt:!0},physics:{default:"arcade",arcade:{debug:!1}},scene:[dy,gy,Qf,my,nd,hy,af]});globalThis.game=E}Cm.then(()=>{switch(window.location.pathname){case"/debug":zv();break;default:yy();break}});"serviceWorker"in navigator&&window.addEventListener("load",()=>{navigator.serviceWorker.register("./sw.js",{scope:"./"}).then(E=>{console.log("ServiceWorker registration successful with scope: ",E.scope)},E=>{console.log("ServiceWorker registration failed: ",E)})}); diff --git a/app/public/dist/client/pokechess/index.html b/app/public/dist/client/pokechess/index.html index c44ea2e40..aa09001e3 100644 --- a/app/public/dist/client/pokechess/index.html +++ b/app/public/dist/client/pokechess/index.html @@ -99,7 +99,7 @@ left: 21vw; } } - +