From bcb38af8a169ccca663ed2a6ae95884fc91555e3 Mon Sep 17 00:00:00 2001 From: Diogo Diniz Date: Sat, 21 Jun 2025 23:27:29 +0100 Subject: [PATCH] increase eligible pokemon pool add form specific requirements adjust sky trainer images todo: create different enemy teams, add trainer name logic MIME-Version: 1.0 Content-Type: text/plain; charset=UTF-8 Content-Transfer-Encoding: 8bit Co-authored-by: José Serrado Marques --- public/images/trainer/sky_trainer_f.json | 8 +- public/images/trainer/sky_trainer_f.png | Bin 1070 -> 952 bytes public/images/trainer/sky_trainer_m.json | 8 +- public/images/trainer/sky_trainer_m.png | Bin 1006 -> 875 bytes .../encounters/sky-battle-encounter.ts | 183 ++++++++++++++---- .../mystery-encounter-requirements.ts | 41 ++++ src/data/trainers/trainer-config.ts | 2 +- src/enums/species-form-key.ts | 5 + 8 files changed, 201 insertions(+), 46 deletions(-) diff --git a/public/images/trainer/sky_trainer_f.json b/public/images/trainer/sky_trainer_f.json index 4080abef623..2491198fafe 100644 --- a/public/images/trainer/sky_trainer_f.json +++ b/public/images/trainer/sky_trainer_f.json @@ -5,7 +5,7 @@ "format": "RGBA8888", "size": { "w": 56, - "h": 67 + "h": 82 }, "scale": 1, "frames": [ @@ -15,19 +15,19 @@ "trimmed": true, "sourceSize": { "w": 56, - "h": 67 + "h": 82 }, "spriteSourceSize": { "x": 0, "y": 0, "w": 56, - "h": 67 + "h": 82 }, "frame": { "x": 0, "y": 0, "w": 56, - "h": 67 + "h": 82 } } ] diff --git a/public/images/trainer/sky_trainer_f.png b/public/images/trainer/sky_trainer_f.png index ded6662663000105555fb8b955f9791acf2461e9..6581d58de7dfbc3a2c112ce8c5ef7c28a7dc7c53 100644 GIT binary patch delta 843 zcmV-R1GN0E2)GB37bj8(0{{R3HaF)G00001b5ch_0olnce*gdg1ZP1_K>z@;j|==^ z1(6{y3qnv#R7C&)00000kySi@v68J@00001bW%=J06^y0W&i*H32;bRa{vGf6951U z69E94oEQKA0>(*1K~z}7?bq#YLzQlzz!RbTPK-8M{j4d;>5bJS1fVCM54n3O9`=(q4_ste>N(}xVLnD*D<+d!L>`(8E! z{RXx!ZeemRCtSmY8{&F(W{7?b7j@!3r25q;ZrId{+yHAxGN0pI<;G>`cOdceH3*g9 z590=M11MZBjyRQnC1SUQ*)3ppZ@L`|T}{|FKy{_w{W-LOt&>|EvHRAlFrltX9NXA; zAt($LQcm<{ICxD4$BkX|W9to)OY?xk9pd^dGYM+qV{T_X_rN_>sH0n7{EGzw!U#AA0~X VyHh_BkN^M*002ovPDHLkV1gQvg8={l delta 962 zcmdnNzK&ypIF~aAGXn#|zrAL96Yca_Z328kTqjo8)W46Zoe30YED7=pW^j0RBMrn! z@^*LO%in9@59F|yc>21szhspX5#`bUUipcEfoY$oi(`n#@wwM}C(TjdVMu6V35dMC zyY_#1t`Ljkf%(hk&YoSi-Mq4Sk=fx^B5KEwaq(j60T-QHKs zw|bKsL6InFne52yYa}LKd z_rFZKbYMY``myXdRrzmsw!M7+-GarSMP=nREu9mL-psm||NlC%@_O%U{&|D3V4;QQ z?w`FzK^s?1FkHUWzNED6xvt8}?+QmZl?Yx+oU}MrIX)qmsf@pDmRR>H#lK6n)_nf5 zR&ZVuTWYpmw8GUS+3TC?P5XAcif*lKJ5|{x)!(t&MccIH(TYo7ZW>j+e4Zd13}PwvdScditD%rHmsLmglB)ZXq3r3x4Rni@Y{5I>FW5(CGY*@x@>Qo1G! zOT@A+w$9is7UCDd=TNrt-aomlgqJ^rrr(>lbhpJp-s1Q}L2mae^)IAz7+yTM>pXMY zt+%f|`dEs3#dVw}ax&#Uo5N+OQOdaYT);Eq2TNZb6wgoI)pS0V_5Kc_UF8>4J#HKR ze?9qn*cGPOr)Tc&UhZ)A_Z0CuKlRCV>h+TE{JYMiB*{DL++ZnLd~e(H292J1&-bjz zS5@oKIQfJ7$J4`iu6O+rlfQaTSZ2?*IZJHfHWcu@H(uqD6n<&8R@2V*3DcDy$LklegDIfnan@p->sYZpFw_} z=G(0$`t`sR&Y)W28c~vxSdwa$T$Bo=7>o>zOmz)Rb&bqIj0~)d46O`}v<(cb3=BRW zf8>XvAvZrIGp!Q0hNf9jz#PM%0k@$fGdH!kBr&%DqDKXrEm!-ibwTd(boFyt=akR{ E0A(4W?f?J) diff --git a/public/images/trainer/sky_trainer_m.json b/public/images/trainer/sky_trainer_m.json index 9cf750481b2..67c0d622351 100644 --- a/public/images/trainer/sky_trainer_m.json +++ b/public/images/trainer/sky_trainer_m.json @@ -5,7 +5,7 @@ "format": "RGBA8888", "size": { "w": 48, - "h": 79 + "h": 84 }, "scale": 1, "frames": [ @@ -15,19 +15,19 @@ "trimmed": true, "sourceSize": { "w": 48, - "h": 79 + "h": 84 }, "spriteSourceSize": { "x": 0, "y": 0, "w": 48, - "h": 79 + "h": 84 }, "frame": { "x": 0, "y": 0, "w": 48, - "h": 79 + "h": 84 } } ] diff --git a/public/images/trainer/sky_trainer_m.png b/public/images/trainer/sky_trainer_m.png index 0a817932b05e7eb45b5c9aa41aefe940825bd96e..2d722c8e58d2c9cdaffd034defe3e9484c19a2e2 100644 GIT binary patch delta 771 zcmV+e1N{8%2kQoq7bjE*0{{R3^SMO%00001b5ch_0olnce*gdg1ZP1_K>z@;j|==^ z1(6{y2suzpR7C&)F_Bd^e?IdjI{*Lx0d!JMQvg8b*k%9#010qNS#tmY3ljhU3ljkV znw%H_00M$ZL_t(o!{wISuA?vvMcKhtE);0{{~tTH6KLUZNk%%Fhp~kE(7o7+V>@)+ zML3JDHk|7%Y7vnWYY0-O2fX(o1VN}u&#JZns7B9=UOe#qr}qZ{e{X?r!pG=;FdP=Z zezt)3F-5=Ahim~11GWG^9uFb*0P`?H<)Z++2OcSIEj0P#Fu7?Qr*Xn&MI7CO1=xBx z1CZu*pD_yL zjVR~o)4p+>h!yGsi(UyImp+m_C!hEPAT7wKy%_yE2~yhYe{*Ux#0wDhaHQ+P&-b4J z`TYQ=X?_*D(DR5c2FU_ZES# z0m#%_^kU%(;ZDc6T@s64>l8|y&;9(>hV>?O=yHpm02{q++LC(;Wc^w=`fhxzZuLf# z-5g#+HedRU_wAi1y^OB@!`6lcTJ-xB)d0Vz&p?ZwMcVXc;JQWtjli!O{KXEa2~a&X zt%zEI#=34U3$)f9sM&$;zEF?W)Kp2h`DXs#;}5T!9ra$0tR(;d002ovPDHLkV1h)U BP{{xQ delta 903 zcmaFO_KtmmIF~;MGXn#|tQFf9PPEf!H4E?wah+IdR)3J=p(0S6u_VYZn8D%MjWiG^ z$=lt9qwU_*DjbEHdSRAtzw9DEWr??kn{Qv%cUPa2uB zF3X)h)kl1aX|}8XQpcXaYuDO;v0jpg^+h=Eo_@_=zIG9ui!v8UJ$PG|ypgrzvX9Vw z$p>P0g4TGScyj*oqiL0K&stX*A9|5@V!^tHA^}m?zn;5q63V3fJoyNh#RIO1j7wAJ z*&S@CS*N1Pq;JCXg44e$)~sf@b&|ht z_VKO=Nx}2aKX1JA{O+FzNhe%C%@owtnfANx&axoA`y7Qj8zNp9=qF5xJLbf(LeM<% zZN7>E!yLvF+HRjBw{-0g+|gF!@#!S{glBc!`DouT=Blg8x|NU zJa_#OaZT`i@h47x29J7Yx5(~``^%c9Y^$6d*Bm?~d9FJM9QY}w5ggt4O!(3F1MgU0 zJ)3s$r19yg&%Bw0Vi|Wv>NijFXL_>4&*5ZtBlm%@+0XViwB#;09oepDR4+Gg9pj|b z8om^9Zp-;cpIO#2Jo&NYfO%u?F-0{#>kVs}qLtp?+jMv07t_prtW9t4{@Tuv!~7_A z{ga(7rw_^IJ^nR8qw;02P~o2Ux1*!~1%?^(Zgb&xn0meY+DTiMY4xUkGPCb3_4};# z>FOK1wvu|u)wha#%m`+to zTq8?Mnk)f5Lk+y+>m4U(M$%!rtqat{;OXk;vd$@?2>@T=i0l9W diff --git a/src/data/mystery-encounters/encounters/sky-battle-encounter.ts b/src/data/mystery-encounters/encounters/sky-battle-encounter.ts index 36c30b9ed25..2d5dc798a47 100644 --- a/src/data/mystery-encounters/encounters/sky-battle-encounter.ts +++ b/src/data/mystery-encounters/encounters/sky-battle-encounter.ts @@ -16,6 +16,9 @@ import { MysteryEncounterOptionMode } from "#enums/mystery-encounter-option-mode import { AbilityRequirement, AnyCombinationPokemonRequirement, + CombinationPokemonRequirement, + FormPokemonRequirement, + SpeciesRequirement, TypeRequirement, } from "../mystery-encounter-requirements"; import { PokemonType } from "#enums/pokemon-type"; @@ -36,66 +39,75 @@ import { getRandomPartyMemberFunc, type TrainerConfig, trainerConfigs } from "#a import { TrainerType } from "#enums/trainer-type"; import { PartyMemberStrength } from "#enums/party-member-strength"; import { TrainerSlot } from "#enums/trainer-slot"; +import { SpeciesFormKey } from "#enums/species-form-key"; /** The i18n namespace for the encounter */ const namespace = "mysteryEncounters/skyBattle"; const SKY_BATTLE_WAVES: [number, number] = [50, 180]; -/** - * These pokemon come from serebii's - * {@link https://www.serebii.net/xy/skybattles.shtml | Sky Battle Page} - * Also pokemon that are expected to fly (e.g beedril and mew) - */ -const POOL_0_POKEMON = [ - SpeciesId.CHARIZARD, +const POOL_ALL_FORMS = [ SpeciesId.BUTTERFREE, SpeciesId.BEEDRILL, + SpeciesId.PIDGEY, SpeciesId.PIDGEOTTO, SpeciesId.PIDGEOT, + SpeciesId.SPEAROW, SpeciesId.FEAROW, SpeciesId.ZUBAT, SpeciesId.GOLBAT, SpeciesId.VENOMOTH, + SpeciesId.MAGNEMITE, + SpeciesId.MAGNETON, + SpeciesId.GASTLY, SpeciesId.HAUNTER, + SpeciesId.GENGAR, SpeciesId.KOFFING, SpeciesId.WEEZING, SpeciesId.SCYTHER, SpeciesId.GYARADOS, + SpeciesId.PORYGON, SpeciesId.AERODACTYL, SpeciesId.ARTICUNO, SpeciesId.ZAPDOS, SpeciesId.MOLTRES, SpeciesId.DRAGONITE, - SpeciesId.MEWTWO, // ? + SpeciesId.MEWTWO, SpeciesId.MEW, + SpeciesId.HOOTHOOT, SpeciesId.NOCTOWL, SpeciesId.LEDYBA, SpeciesId.LEDIAN, SpeciesId.CROBAT, SpeciesId.TOGETIC, + SpeciesId.NATU, SpeciesId.XATU, SpeciesId.HOPPIP, SpeciesId.SKIPLOOM, SpeciesId.JUMPLUFF, SpeciesId.YANMA, + SpeciesId.MURKROW, SpeciesId.MISDREAVUS, - SpeciesId.UNOWN, - SpeciesId.FORRETRESS, // ? + SpeciesId.UNOWN, // ALL (A, B, C, D, E, F, G, H, I, J, K, L, M, N, O, P, Q, R, S, T, U, V, W, X, Y, Z, !, ?) SpeciesId.GLIGAR, + SpeciesId.DELIBIRD, SpeciesId.MANTINE, SpeciesId.SKARMORY, + SpeciesId.PORYGON2, SpeciesId.LUGIA, SpeciesId.HO_OH, SpeciesId.CELEBI, SpeciesId.BEAUTIFLY, SpeciesId.DUSTOX, + SpeciesId.TAILLOW, SpeciesId.SWELLOW, SpeciesId.WINGULL, SpeciesId.PELIPPER, SpeciesId.MASQUERAIN, SpeciesId.NINJASK, - SpeciesId.SHEDINJA, // ? + SpeciesId.SHEDINJA, + SpeciesId.VOLBEAT, + SpeciesId.ILLUMISE, SpeciesId.VIBRAVA, SpeciesId.FLYGON, SpeciesId.SWABLU, @@ -104,17 +116,20 @@ const POOL_0_POKEMON = [ SpeciesId.SOLROCK, SpeciesId.BALTOY, SpeciesId.CLAYDOL, + SpeciesId.CASTFORM, // ALL (Normal, Sunny, Rainy, Snowy) SpeciesId.DUSKULL, SpeciesId.TROPIUS, SpeciesId.CHIMECHO, - SpeciesId.GLALIE, // ? + SpeciesId.GLALIE, SpeciesId.SALAMENCE, + SpeciesId.BELDUM, SpeciesId.METANG, - SpeciesId.METAGROSS, // ? SpeciesId.LATIAS, SpeciesId.LATIOS, SpeciesId.RAYQUAZA, SpeciesId.JIRACHI, + SpeciesId.DEOXYS, // ALL (Normal, Attack, Defense, Speed) + SpeciesId.STARLY, SpeciesId.STARAVIA, SpeciesId.STARAPTOR, SpeciesId.MOTHIM, @@ -127,20 +142,28 @@ const POOL_0_POKEMON = [ SpeciesId.CHINGLING, SpeciesId.BRONZOR, SpeciesId.BRONZONG, + SpeciesId.CHATOT, SpeciesId.CARNIVINE, SpeciesId.MANTYKE, - SpeciesId.MAGNEZONE, // ? + SpeciesId.MAGNEZONE, SpeciesId.TOGEKISS, SpeciesId.YANMEGA, SpeciesId.GLISCOR, - SpeciesId.DUSKNOIR, // ? - SpeciesId.ROTOM, + SpeciesId.PORYGON_Z, + SpeciesId.PROBOPASS, + SpeciesId.DUSKNOIR, + SpeciesId.FROSLASS, + SpeciesId.ROTOM, // ALL (Normal, Heat, Wash, Frost, Fan, Mow) SpeciesId.UXIE, SpeciesId.MESPRIT, SpeciesId.AZELF, + SpeciesId.DIALGA, + SpeciesId.PALKIA, SpeciesId.GIRATINA, SpeciesId.CRESSELIA, - SpeciesId.ARCEUS, + SpeciesId.DARKRAI, + SpeciesId.ARCEUS, // ALL (Normal, Fighting, Flying, Poison, Ground, Rock, Bug, Ghost, Steel, Fire, Water, Grass, Electric, Psychic, Ice, Dragon, Dark, Fairy) + SpeciesId.PIDOVE, SpeciesId.TRANQUILL, SpeciesId.UNFEZANT, SpeciesId.WOOBAT, @@ -150,16 +173,24 @@ const POOL_0_POKEMON = [ SpeciesId.SOLOSIS, SpeciesId.DUOSION, SpeciesId.REUNICLUS, + SpeciesId.DUCKLETT, SpeciesId.SWANNA, + SpeciesId.VANILLITE, SpeciesId.VANILLISH, SpeciesId.VANILLUXE, SpeciesId.EMOLGA, + SpeciesId.KLINK, + SpeciesId.KLANG, + SpeciesId.KLINKLANG, SpeciesId.TYNAMO, SpeciesId.EELEKTRIK, SpeciesId.EELEKTROSS, + SpeciesId.ELGYEM, + SpeciesId.BEHEEYEM, SpeciesId.LAMPENT, SpeciesId.CHANDELURE, SpeciesId.CRYOGONAL, + SpeciesId.RUFFLET, SpeciesId.BRAVIARY, SpeciesId.MANDIBUZZ, SpeciesId.HYDREIGON, @@ -169,56 +200,96 @@ const POOL_0_POKEMON = [ SpeciesId.RESHIRAM, SpeciesId.ZEKROM, SpeciesId.LANDORUS, + SpeciesId.FLETCHLING, SpeciesId.FLETCHINDER, SpeciesId.TALONFLAME, - SpeciesId.VIVILLON, - SpeciesId.FLOETTE, - SpeciesId.FLORGES, - SpeciesId.HAWLUCHA, // ? + SpeciesId.VIVILLON, // ALL (Meadow, Icy Snow, Polar, Tundra, Continental, Garden, Elegant, Modern, Marine, Archipelago, High Plains, Sandstorm, River, Monsoon, Savanna, Sun, Ocean, Jungle, Fancy, Poke Ball) + SpeciesId.HAWLUCHA, + SpeciesId.KLEFKI, SpeciesId.NOIBAT, SpeciesId.NOIVERN, SpeciesId.YVELTAL, + SpeciesId.HOOPA, + SpeciesId.ROWLET, SpeciesId.DARTRIX, - SpeciesId.DECIDUEYE, //? + SpeciesId.PIKIPEK, SpeciesId.TRUMBEAK, SpeciesId.TOUCANNON, SpeciesId.VIKAVOLT, - SpeciesId.ORICORIO, + SpeciesId.ORICORIO, // ALL (Baile, Pompom, Pau, Sensu) + SpeciesId.CUTIEFLY, SpeciesId.RIBOMBEE, - SpeciesId.COMFEY, //? - SpeciesId.MINIOR, + SpeciesId.COMFEY, + SpeciesId.MINIOR, // ALL (Red, Orange, Yellow, Green, Blue, Indigo, Violet and Meteors) SpeciesId.TAPU_KOKO, SpeciesId.TAPU_LELE, SpeciesId.TAPU_BULU, SpeciesId.TAPU_FINI, + SpeciesId.COSMOG, + SpeciesId.COSMOEM, + SpeciesId.SOLGALEO, SpeciesId.LUNALA, SpeciesId.NIHILEGO, SpeciesId.BUZZWOLE, SpeciesId.CELESTEELA, - SpeciesId.NECROZMA, + SpeciesId.KARTANA, + SpeciesId.NECROZMA, // ALL (Dusk Mane, Dawn Wings, Ultra) SpeciesId.POIPOLE, SpeciesId.NAGANADEL, + SpeciesId.ROOKIDEE, SpeciesId.CORVISQUIRE, SpeciesId.CORVIKNIGHT, SpeciesId.ORBEETLE, SpeciesId.FLAPPLE, SpeciesId.CRAMORANT, + SpeciesId.SINISTEA, + SpeciesId.POLTEAGEIST, SpeciesId.FROSMOTH, + SpeciesId.DREEPY, SpeciesId.DRAKLOAK, SpeciesId.DRAGAPULT, SpeciesId.ETERNATUS, + SpeciesId.REGIELEKI, + SpeciesId.REGIDRAGO, + SpeciesId.CALYREX, SpeciesId.ENAMORUS, - SpeciesId.SQUAWKABILLY, + SpeciesId.SQUAWKABILLY, // ALL (Green, Blue, Yellow, White) SpeciesId.WATTREL, SpeciesId.KILOWATTREL, + SpeciesId.RABSCA, SpeciesId.BOMBIRDIER, + SpeciesId.VAROOM, + SpeciesId.REVAVROOM, + SpeciesId.GLIMMET, + SpeciesId.GLIMMORA, SpeciesId.FLAMIGO, + SpeciesId.SCREAM_TAIL, SpeciesId.FLUTTER_MANE, SpeciesId.IRON_JUGULIS, + SpeciesId.IRON_MOTH, + SpeciesId.CHI_YU, SpeciesId.ROARING_MOON, SpeciesId.MIRAIDON, - SpeciesId.KORAIDON, + SpeciesId.POLTCHAGEIST, + SpeciesId.SINISTCHA, + SpeciesId.FEZANDIPITI, + SpeciesId.PECHARUNT, + SpeciesId.ALOLA_RAICHU, + SpeciesId.GALAR_WEEZING, + SpeciesId.GALAR_ARTICUNO, + SpeciesId.GALAR_MOLTRES, + SpeciesId.HISUI_BRAVIARY, ]; +const POOL_BASEFORM = [SpeciesId.CHARIZARD]; +const POOL_ARIA = [ + SpeciesId.MELOETTA, // ARIA +]; +const POOL_MEGA = [SpeciesId.ALAKAZAM, SpeciesId.PINSIR, SpeciesId.METAGROSS]; +const POOL_MEGA_X = [SpeciesId.CHARIZARD]; +const POOL_MEGA_Y = [SpeciesId.CHARIZARD]; +const POOL_SKY = [SpeciesId.SHAYMIN]; +const POOL_BLACK = [SpeciesId.KYUREM]; +const POOL_WHITE = [SpeciesId.KYUREM]; const PHYSICAL_TUTOR_MOVES = [ MoveId.FLY, @@ -277,6 +348,42 @@ const sky_battle_requirements = new AnyCombinationPokemonRequirement( 3, new TypeRequirement(PokemonType.FLYING, false, 1), new AbilityRequirement(AbilityId.LEVITATE, false, 1), + new SpeciesRequirement(POOL_ALL_FORMS, 1, false), + CombinationPokemonRequirement.Every( + new SpeciesRequirement(POOL_BASEFORM, 1, false), + CombinationPokemonRequirement.Some( + new FormPokemonRequirement("", 1), + new FormPokemonRequirement(SpeciesFormKey.NORMAL, 1), + ), + ), + CombinationPokemonRequirement.Every( + new SpeciesRequirement(POOL_MEGA, 1, false), + new FormPokemonRequirement(SpeciesFormKey.MEGA, 1), + ), + CombinationPokemonRequirement.Every( + new SpeciesRequirement(POOL_MEGA_X, 1, false), + new FormPokemonRequirement(SpeciesFormKey.MEGA_X, 1), + ), + CombinationPokemonRequirement.Every( + new SpeciesRequirement(POOL_MEGA_Y, 1, false), + new FormPokemonRequirement(SpeciesFormKey.MEGA_Y, 1), + ), + CombinationPokemonRequirement.Every( + new SpeciesRequirement(POOL_SKY, 1, false), + new FormPokemonRequirement(SpeciesFormKey.SKY, 1), + ), + CombinationPokemonRequirement.Every( + new SpeciesRequirement(POOL_BLACK, 1, false), + new FormPokemonRequirement(SpeciesFormKey.BLACK, 1), + ), + CombinationPokemonRequirement.Every( + new SpeciesRequirement(POOL_WHITE, 1, false), + new FormPokemonRequirement(SpeciesFormKey.WHITE, 1), + ), + CombinationPokemonRequirement.Every( + new SpeciesRequirement(POOL_ARIA, 1, false), + new FormPokemonRequirement(SpeciesFormKey.ARIA, 1), + ), ); // Helpful variables @@ -323,27 +430,26 @@ export const SkyBattleEncounter: MysteryEncounter = MysteryEncounterBuilder.with { spriteKey: spriteKey, fileRoot: "trainer", - hasShadow: true, + hasShadow: false, x: 4, y: 7, - yShadow: 7, }, ]; const intro = [ { - text: `${namespace}:intro` + female ? "_f" : "", + text: female ? `${namespace}:intro_f` : `${namespace}:intro`, }, { speaker: `${namespace}:speaker`, - text: `${namespace}:intro_dialogue` + female ? "_f" : "", + text: female ? `${namespace}:intro_dialogue_f` : `${namespace}:intro_dialogue`, }, ]; - const title = `${namespace}:title` + female ? "_f" : ""; - const description = `${namespace}:description` + female ? "_f" : ""; + const title = female ? `${namespace}:title_f` : `${namespace}:title`; + const description = female ? `${namespace}:description_f` : `${namespace}:description`; const outro = [ { - text: `${namespace}:outro` + female ? "_f" : "", + text: female ? `${namespace}:outro_f` : `${namespace}:outro`, }, ]; @@ -496,7 +602,7 @@ function getTrainerConfig(party_size: number, female: boolean): TrainerConfig { const name = female ? "sky_trainer_f" : "sky_trainer_m"; config.name = i18next.t("trainerNames:" + name); - let pool0Copy = POOL_0_POKEMON.slice(0); + let pool0Copy = POOL_ALL_FORMS.slice(0); pool0Copy = randSeedShuffle(pool0Copy); let pool0Mon = pool0Copy.pop()!; @@ -516,7 +622,10 @@ function doFlyingTypeTutor(): Promise { return new Promise(async resolve => { const moveOptions = globalScene.currentBattle.mysteryEncounter!.misc.moveTutorOptions; const female = globalScene.currentBattle.mysteryEncounter!.enemyPartyConfigs[0].female; //TODO: Is this [0] correct enought? - await showEncounterDialogue(`${namespace}:battle_won` + female ? "_f" : "", `${namespace}:speaker`); + await showEncounterDialogue( + female ? `${namespace}:battle_won_f` : `${namespace}:battle_won`, + `${namespace}:speaker`, + ); const overlayScale = 1; const moveInfoOverlay = new MoveInfoOverlay({ diff --git a/src/data/mystery-encounters/mystery-encounter-requirements.ts b/src/data/mystery-encounters/mystery-encounter-requirements.ts index 71ef7c60906..b69ef7efa41 100644 --- a/src/data/mystery-encounters/mystery-encounter-requirements.ts +++ b/src/data/mystery-encounters/mystery-encounter-requirements.ts @@ -1195,3 +1195,44 @@ export class AnyCombinationPokemonRequirement extends EncounterPokemonRequiremen return this.requirements[0].getDialogueToken(pokemon); } } + +/** + * Find out if Pokemon in the party are of a specific form. + */ +export class FormPokemonRequirement extends EncounterPokemonRequirement { + private form: string; + + constructor(form: string, minNumberOfPokemon: number) { + super(); + this.invertQuery = false; + this.minNumberOfPokemon = minNumberOfPokemon; + this.form = form; + } + + /** + * Checks if at least {@linkcode minNumberOfPokemon} pokemon are of the specified form + * @returns true if at least {@linkcode minNumberOfPokemon} pokemon are of the specified form + */ + override meetsRequirement(): boolean { + const party = globalScene.getPlayerParty(); + return this.queryParty(party).length >= this.minNumberOfPokemon; + } + + /** + * Queries the players party for all party members that are of the specified form + * @param partyPokemon The party of {@linkcode PlayerPokemon} + * @returns All party members that are of the specified form + */ + override queryParty(partyPokemon: PlayerPokemon[]): PlayerPokemon[] { + return partyPokemon.filter(pokemon => pokemon.getFormKey() === this.form); + } + + /** + * Retrieves a dialogue token key/value pair for the given form. + * @param pokemon The {@linkcode PlayerPokemon} to check against + * @returns A dialogue token key/value pair + */ + override getDialogueToken(pokemon?: PlayerPokemon): [string, string] { + return ["form", pokemon?.getFormKey() ?? ""]; + } +} diff --git a/src/data/trainers/trainer-config.ts b/src/data/trainers/trainer-config.ts index 81d94bb5ace..50457bea919 100644 --- a/src/data/trainers/trainer-config.ts +++ b/src/data/trainers/trainer-config.ts @@ -6046,7 +6046,7 @@ export const trainerConfigs: TrainerConfigs = { .setLocalizedName("Future Self F") .setPartyTemplates(new TrainerPartyTemplate(6, PartyMemberStrength.STRONG)), [TrainerType.SKY_TRAINER]: new TrainerConfig(++t) - .setHasGenders("Sky Trainer Felicia") + .setHasGenders("Sky Trainer") .setMoneyMultiplier(2.25) .setEncounterBgm(TrainerType.ACE_TRAINER) .setPartyTemplates(new TrainerPartyTemplate(6, PartyMemberStrength.STRONG)), diff --git a/src/enums/species-form-key.ts b/src/enums/species-form-key.ts index b324c876b87..d7bb30c636d 100644 --- a/src/enums/species-form-key.ts +++ b/src/enums/species-form-key.ts @@ -1,4 +1,5 @@ export enum SpeciesFormKey { + NORMAL = "normal", MEGA = "mega", MEGA_X = "mega-x", MEGA_Y = "mega-y", @@ -10,4 +11,8 @@ export enum SpeciesFormKey { GIGANTAMAX_SINGLE = "gigantamax-single", GIGANTAMAX_RAPID = "gigantamax-rapid", ETERNAMAX = "eternamax", + SKY = "sky", + BLACK = "black", + WHITE = "white", + ARIA = "aria", }