From 197b264fb0bf07ece381bd7e9488f3e8048b058b Mon Sep 17 00:00:00 2001 From: NightKev <34855794+DayKev@users.noreply.github.com> Date: Mon, 6 Jan 2025 16:24:08 -0800 Subject: [PATCH 1/5] [Bug] Gimmighoul & Eevee eggs will now properly randomize their forms (#5080) --- src/battle-scene.ts | 6 ++++-- 1 file changed, 4 insertions(+), 2 deletions(-) diff --git a/src/battle-scene.ts b/src/battle-scene.ts index 327ab1cc926..ae992f5c00f 100644 --- a/src/battle-scene.ts +++ b/src/battle-scene.ts @@ -1424,6 +1424,8 @@ export default class BattleScene extends SceneBase { return 0; } + const isEggPhase: boolean = [ "EggLapsePhase", "EggHatchPhase" ].includes(this.getCurrentPhase()?.constructor.name ?? ""); + switch (species.speciesId) { case Species.UNOWN: case Species.SHELLOS: @@ -1455,7 +1457,7 @@ export default class BattleScene extends SceneBase { } return Utils.randSeedInt(8); case Species.EEVEE: - if (this.currentBattle?.battleType === BattleType.TRAINER && this.currentBattle?.waveIndex < 30) { + if (this.currentBattle?.battleType === BattleType.TRAINER && this.currentBattle?.waveIndex < 30 && !isEggPhase) { return 0; // No Partner Eevee for Wave 12 Preschoolers } return Utils.randSeedInt(2); @@ -1483,7 +1485,7 @@ export default class BattleScene extends SceneBase { return 0; case Species.GIMMIGHOUL: // Chest form can only be found in Mysterious Chest Encounter, if this is a game mode with MEs - if (this.gameMode.hasMysteryEncounters) { + if (this.gameMode.hasMysteryEncounters && !isEggPhase) { return 1; // Wandering form } else { return Utils.randSeedInt(species.forms.length); From 07b69c9485841063a4fc0353c48460eaf1e8083e Mon Sep 17 00:00:00 2001 From: Unicornpowerstar Date: Tue, 7 Jan 2025 01:26:00 +0100 Subject: [PATCH 2/5] [Sprite] Fix Issues with the 658-ash.json to display sprite correctly (#5055) * [Sprite][Color] Fixing Issues with the 658-ash.json to display sprite correctly - Fix colors not being shown correctly in the json. - Said fix are adding a new entry to separate the whites that are F8f8f8 by adding f4f4f4 - Changed the wrong color into the correct one on the rare. --------- Co-authored-by: NightKev <34855794+DayKev@users.noreply.github.com> --- public/images/pokemon/658-ash.png | Bin 1244 -> 1246 bytes public/images/pokemon/exp/658-ash.png | Bin 2468 -> 2472 bytes public/images/pokemon/shiny/658-ash.png | Bin 1247 -> 1247 bytes public/images/pokemon/variant/658-ash.json | 4 +++- .../images/pokemon/variant/exp/658-ash.json | 2 ++ 5 files changed, 5 insertions(+), 1 deletion(-) diff --git a/public/images/pokemon/658-ash.png b/public/images/pokemon/658-ash.png index a122df859bd0ed45c2bd78ee2d024b343a4cdc88..fa6ce5cb16521b9b690cd05cd6192b31b198b3fc 100644 GIT binary patch delta 1121 zcmV-n1fKic3El~iHUro1^pQC^3iR~!@E90I;80ePd?kMxg= zqE&PDC5!j0yfh(@tdofeQWtq2cpTUkiyW*k;eI6e27)r4V>}!?5R{uNuK)~OKMX0`&&PegUj-qJy~lr`defxu3tnwI`RBUVp5 z8J@GFpQ^jM!12+uH9T;f6xg_2o=*l*cU6%l>AK(%Cy@ot5J(yi%-7jzw&XcKea>m7 z@3((OXV7ak)s1F`Js~AL$8Tp+&?;B1i6|Z)R*r)Eb^d)kgICMFBp}+t(?r^@3!3+; zIrb)<^x;>+gXY;p?pX)Y{2BFdUglu{*=$YIh$n&8fu?z~C&$lXjAvE7WKXE2(vmw-@0P^2%HQMvWJXNFX%{*h`{E-iFdhbXnf7Tiu z$gA3e(23^{{RCc;zL@eZZ9$~uwNzMA6S8dN=%r=};Dh80mpT;k)+~ZO#wO;Szxu;GBGmn#AwK0;k zF4xSHlDcW#_%5n$t8^bJ#8`{N*37t%R(vh@T)cYUkyzLl4Hj3Oku0q&+mG}k?D-B1 zW#(-tkRxu28YO+&mTS7)FF7jwv7LV-OyZ(m(Q?Dchw~=sOAtnC=ZG79=ZZc}_GCrU z4|j5jY;OV#aV-l--46367K$dLw3z!2hd8TUTnuoGvp`&2pk*S6W&MBhUM0r}Za!h$ ziu`oD9^uaLn)|L^3}RvCEbDe1re*suBn(3XGsN7v$=SPyY<_FePu98voQcK1kWmZ-b^{S?i00000NkvXXu0mjf#V0qZ delta 1119 zcmV-l1fcug3ET;gHUj_v0FgO43i$Z=@E91BQ=k8ld?kM-Nklmj;EW9>DCmq`hD~ z^EeLrN$-EM?~^xx*MxiBb4V0g;?iXGqloGagJ|;rIrrTYjf0!`<{028B8um^VaSsG z$|Vgk+lmB|2<%0Uz#TUny_hNDx-R+KXK*0T?zrf|ScZo@CLOG;3l=Y!!4Z^u^M57} zwv7AGn7)n!2+GZtR{#cX+_seM=i|0*QxMWPdJKQ6H_!UM;3WqXJ!ebY=A0AHW=A3L zTxC-TK%jbW1?7B#ZJ#aui$M;j+WL@A zb9VAmbypWSK62ab~h8<)%T$sp>ks?sD~7d+x5vcMSvN#lX#Iy=plJm;s+InDI_ z*64o>dab3p(af+Xq=e`A?aT^VqaH5nvTY!nt?N4RB+xd{bWir=_*soHT}LE)hTp3s-UOQN zhdc}zOY*1DRniQSXXb=ap2}HYD1mIN_&V+5Yg?bb~{=Zv|_PjAq)#!S&ESNZd zs`elZ;`u{AftRE&ro2mg5Gi>*6_!**_TcGMhT6=Vz8?i-FB~iVAUS)m5HC312|a(^ z%HR^`@4+3|n7}f`GfwwaKQb7z4d;}K0VMIK^NXwWxD-pR*ZX+xsguFNDL zRsI6HM#uhxQWWPcE`R}tZ*C)4p!&NUDrz6h5MD>eYbP*Kq&uN7a5$O!@fyaGSoIE?>uK7VIr+_%5aO+t!mO l{Wr`HY^hu|qw1yBj6c9cS26bNh?M{U002ovPDHLkV1k{3Ky?5B diff --git a/public/images/pokemon/exp/658-ash.png b/public/images/pokemon/exp/658-ash.png index 6bb84f3e4fd622689fb60ec1c06599aad87670a7..ced4cbcec716965af329c30e41f496414ccc6716 100644 GIT binary patch delta 2351 zcmYk2dpy&P7sp*zy2z7DAuUBHml2Q1vsRQSx5qDcZHO6JQ(}faecN(-atq-_7IIl4 zWNtAmdq$eMq-5CG!>}^;ESHe{*01M}-}&Rb&*!|(Ij?h0nesE`hpw{A%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5pcfX+Wm){z$XE4dl(Zfa*zQ74XI(?zw^ zRD!7z;J^OmUzww@@Y!!;t|>~t8{6dBwO2z-$Wg>$zSBZ5yrkAyAheBhC0dhJM2YV! zX4-eX@;1nk2p}xb42k$a1q~yzRL9`$XHo53VmFrS@D$a}ve)*PgKPL!S`p2b9z@Fc zJ|Fs!pvyk00lvU6t5ym7_A)d(P01)0r9%#ca(tXkzoNe|sb$y)22go~Idg7*v0Ood zq;bwt9Vd5j75&BXv6cs=j^ik2R9`|jURM=YU<`7UBsaZFh1X(FCCvi59NqhmK!#|<-sxVwI5J|90X zK>Cmz2TrXaV@Qs*)Dy_^oxD7-owmKSq~!q(D)S`U01coz%S zJWVeWgJ{MM6~#g{PygBf_;vOhSgB;WJ*W+-Y&n_04XONKKuzs3=(xt`%Ckjl-EnDj*v=M$&bm>on?41p%Tshg_%{w)bD*k^U|4)gKBHLpdgSr{$ZJpuv zNldaON?bIeBr!_dVYg%pc1P_@3h??Q_ECwg)diJ1X0ERpJGk@e(_?pi#CWtA5$aBF zNHwPdWJKRgP6Z@+QElJ8`bya~StwQ`g12>C=|g~rbzIrmuj5`iS7WHQ(_T9J4v?tg z$q#eVV(zXigN!iu-rWMwgJMfWhS*dv+A2VYr3jfWe3^GieA@Ug(Xv19bguf0Puzb2 D;d-~P diff --git a/public/images/pokemon/shiny/658-ash.png b/public/images/pokemon/shiny/658-ash.png index f5de608708eb8b505f1e837a4a697ad7e2c3f4cd..b25693fd24e91b07e97e897fe743ab36853a84b1 100644 GIT binary patch delta 690 zcmV;j0!{tj3Ev5jbqe(K^zaxM=HIC{k$*S^0;V8X=aIZ3f4JYPJe*EE*6O%3Pqb>z z9NeH6~U5K+Cp7j5n#<=%Uuac~pgdy{xt3nWPi~&s8#o00gS{ zP*Ca^+_~hk1p1l|yiYM89JQx684AzCGGh(#j$#9&R+>`GC zFkA6((Y3O8jj1`^XlB?GQo^(RbY=z9`cW#1$HmH0aKF|)4@wrk;_ea%<@$q%q zH_PW3?(U1aR6JV?vXNaOVy_^=Q%|PjshqX4Crdy)zKUjz@>LJ=s`y2Kd?-9cd#P6f zo?pZLzm-p0W#A`IN%#H7e$~GLP5GC9bS-`o3j*AF>muT@S>bWJw641YHMs=!16s*9 zkm&X~;LbxoT=6K{?>mvn-##sF)0^t@b{uBG-m?1dQfj|#J$R=-!`#4{ldEJDJ=Bu% Y4eqk$*S^f~Fu?=8?Q2e|S8qJRDCv*6O%3Pqb>z z9NeH6~U5K+Cp7j5bx<=%Uuad0Ewd8D0VCx#50~*}h(OT~`Gmj=jgAdefxO3m#IS=zZ>yTdlR?nWPi~&s8#o00gS{ zR8Z;@+_%{R#YP~9lkdK))N&*s@yW}3JbN)Z6i>4IcrXC04AzCGGh(#j$#9$*-IMPD zFkAU_(Y3O8jj1`^XlB?GQo^(RbS4GU`cW#1$HmH0aKF|)4@wrk;vNzZZQ*Gm?bmwE zdDR?ylTP}&D%Z80=di5v*op^}sR)I~|vM1$dX_I;a905g>mjXxv z^Nf?>0zv|u!;>WgNdcvkZvzz!l756e*Ma#g-2pjblaK=(EsWI85jVQd6(M@EBI(7Q zTqJKF0`ze$3+2cywD;IT(PWgCQrF=SXS9n80gjW|0~`VvYm@f_E`Pqhpa`Va`1m^Q zo8@y1clSkIDxR$c*~qRCu~!h`sVCF%QqEf0lO-S?Uq!P<`KkwbRs14AJ``S}t?HG4 z=htxmZ{^cg8TiRl(tZE2U-fT5Q~u>2U5lT@f&jPPGK+X@R(RYlEz9meO)f$GfL8Ji zB)WYLxbx5tS3HXLdpl(Ew@-`P_@=tN9fw)4H!uFXl-h4w58mm|FgLK~<{9 diff --git a/public/images/pokemon/variant/658-ash.json b/public/images/pokemon/variant/658-ash.json index 29b5bd2560b..1845b2b1bea 100644 --- a/public/images/pokemon/variant/658-ash.json +++ b/public/images/pokemon/variant/658-ash.json @@ -4,6 +4,7 @@ "3f4447": "466698", "de3431": "3fca9f", "f8f8f8": "a1e9f0", + "f4f4f4": "d7eff4", "7b282e": "0e3e81", "6b1d1d": "206d74", "4ebdd9": "41a7b0", @@ -11,7 +12,7 @@ "bfbfbf": "8cc7d4", "ffb2bf": "b7e9ff", "bf4c60": "4386df", - "fff0a6": "271f4c", + "fff0a6": "208698", "3e7acc": "6b4592", "18335c": "170738", "f2798d": "8dcfff", @@ -25,6 +26,7 @@ "3f4447": "466698", "de3431": "9ceec6", "f8f8f8": "89d2b8", + "f4f4f4": "d7eff4", "7b282e": "152a5c", "6b1d1d": "356e8d", "4ebdd9": "2f6e74", diff --git a/public/images/pokemon/variant/exp/658-ash.json b/public/images/pokemon/variant/exp/658-ash.json index 96b60b02adf..79cad7ea42d 100644 --- a/public/images/pokemon/variant/exp/658-ash.json +++ b/public/images/pokemon/variant/exp/658-ash.json @@ -4,6 +4,7 @@ "3f4447": "466698", "de3431": "3fca9f", "f8f8f8": "a1e9f0", + "f4f4f4": "d7effa", "7b282e": "0e3e81", "6b1d1d": "206d74", "4ebdd9": "41a7b0", @@ -25,6 +26,7 @@ "3f4447": "466698", "de3431": "9ceec6", "f8f8f8": "89d2b8", + "f4f4f4": "d7effa", "7b282e": "152a5c", "6b1d1d": "356e8d", "4ebdd9": "2f6e74", From d0db6a35d2afd6318e6bb9a8e9d2be7e0254b35f Mon Sep 17 00:00:00 2001 From: Jimmybald1 <122436263+Jimmybald1@users.noreply.github.com> Date: Wed, 8 Jan 2025 20:27:23 +0100 Subject: [PATCH 3/5] [Bug] fix #5102 Catching Charm now always max weight in Daily Mode (#5103) Co-authored-by: Jimmybald1 <147992650+IBBCalc@users.noreply.github.com> --- src/modifier/modifier-type.ts | 2 +- 1 file changed, 1 insertion(+), 1 deletion(-) diff --git a/src/modifier/modifier-type.ts b/src/modifier/modifier-type.ts index 540af8a0b41..e1c8cb04405 100644 --- a/src/modifier/modifier-type.ts +++ b/src/modifier/modifier-type.ts @@ -1843,7 +1843,7 @@ const modifierPool: ModifierPool = { new WeightedModifierType(modifierTypes.BATON, 2), new WeightedModifierType(modifierTypes.SOUL_DEW, 7), //new WeightedModifierType(modifierTypes.OVAL_CHARM, 6), - new WeightedModifierType(modifierTypes.CATCHING_CHARM, (party: Pokemon[]) => !party[0].scene.gameMode.isFreshStartChallenge() && party[0].scene.gameData.getSpeciesCount(d => !!d.caughtAttr) > 100 ? 4 : 0, 4), + new WeightedModifierType(modifierTypes.CATCHING_CHARM, (party: Pokemon[]) => party[0].scene.gameMode.isDaily || (!party[0].scene.gameMode.isFreshStartChallenge() && party[0].scene.gameData.getSpeciesCount(d => !!d.caughtAttr) > 100) ? 4 : 0, 4), new WeightedModifierType(modifierTypes.ABILITY_CHARM, skipInClassicAfterWave(189, 6)), new WeightedModifierType(modifierTypes.FOCUS_BAND, 5), new WeightedModifierType(modifierTypes.KINGS_ROCK, 3), From b0c347e20d8843885e9b3c8a9f569072ce2bdca8 Mon Sep 17 00:00:00 2001 From: Zain <34523777+Zain-A-Abbas@users.noreply.github.com> Date: Fri, 10 Jan 2025 19:29:25 -0500 Subject: [PATCH 4/5] [Bug] Fixed defog not removing the target's Safeguard and Mist (#5107) * Fixed defog not removing the target's Safeguard and Mist * Made requested changes and added unit test * Remove stray newline --------- Co-authored-by: NightKev <34855794+DayKev@users.noreply.github.com> --- src/data/move.ts | 3 +- src/test/moves/defog.test.ts | 71 ++++++++++++++++++++++++++++++++++++ 2 files changed, 73 insertions(+), 1 deletion(-) create mode 100644 src/test/moves/defog.test.ts diff --git a/src/data/move.ts b/src/data/move.ts index 7a6f08a5372..c86b168fb57 100644 --- a/src/data/move.ts +++ b/src/data/move.ts @@ -9220,7 +9220,8 @@ export function initMoves() { .attr(ClearWeatherAttr, WeatherType.FOG) .attr(ClearTerrainAttr) .attr(RemoveScreensAttr, false) - .attr(RemoveArenaTrapAttr, true), + .attr(RemoveArenaTrapAttr, true) + .attr(RemoveArenaTagsAttr, [ ArenaTagType.MIST, ArenaTagType.SAFEGUARD ], false), new StatusMove(Moves.TRICK_ROOM, Type.PSYCHIC, -1, 5, -1, -7, 4) .attr(AddArenaTagAttr, ArenaTagType.TRICK_ROOM, 5) .ignoresProtect() diff --git a/src/test/moves/defog.test.ts b/src/test/moves/defog.test.ts new file mode 100644 index 00000000000..c83cdc192bf --- /dev/null +++ b/src/test/moves/defog.test.ts @@ -0,0 +1,71 @@ +import { Stat } from "#enums/stat"; +import { Abilities } from "#enums/abilities"; +import { Moves } from "#enums/moves"; +import { Species } from "#enums/species"; +import GameManager from "#test/utils/gameManager"; +import Phaser from "phaser"; +import { afterEach, beforeAll, beforeEach, describe, expect, it } from "vitest"; + +describe("Moves - Defog", () => { + let phaserGame: Phaser.Game; + let game: GameManager; + + beforeAll(() => { + phaserGame = new Phaser.Game({ + type: Phaser.HEADLESS, + }); + }); + + afterEach(() => { + game.phaseInterceptor.restoreOg(); + }); + + beforeEach(() => { + game = new GameManager(phaserGame); + game.override + .moveset([ Moves.MIST, Moves.SAFEGUARD, Moves.SPLASH ]) + .ability(Abilities.BALL_FETCH) + .battleType("single") + .disableCrits() + .enemySpecies(Species.SHUCKLE) + .enemyAbility(Abilities.BALL_FETCH) + .enemyMoveset([ Moves.DEFOG, Moves.GROWL ]); + }); + + it("should not allow Safeguard to be active", async () => { + await game.classicMode.startBattle([ Species.REGIELEKI ]); + + const playerPokemon = game.scene.getPlayerField(); + const enemyPokemon = game.scene.getEnemyField(); + + game.move.select(Moves.SAFEGUARD); + await game.forceEnemyMove(Moves.DEFOG); + await game.phaseInterceptor.to("BerryPhase"); + + expect(playerPokemon[0].isSafeguarded(enemyPokemon[0])).toBe(false); + + + expect(true).toBe(true); + }); + + + it("should not allow Mist to be active", async () => { + await game.classicMode.startBattle([ Species.REGIELEKI ]); + + const playerPokemon = game.scene.getPlayerField(); + + game.move.select(Moves.MIST); + await game.forceEnemyMove(Moves.DEFOG); + + await game.toNextTurn(); + + game.move.select(Moves.SPLASH); + await game.forceEnemyMove(Moves.GROWL); + + await game.phaseInterceptor.to("BerryPhase"); + + expect(playerPokemon[0].getStatStage(Stat.ATK)).toBe(-1); + + expect(true).toBe(true); + }); +}); From 29087710b7e180efe31594c5d178ec9770a3c2ad Mon Sep 17 00:00:00 2001 From: "Amani H." <109637146+xsn34kzx@users.noreply.github.com> Date: Fri, 10 Jan 2025 19:34:16 -0500 Subject: [PATCH 5/5] [Balance] Adjust Orb & Light Ball Weight Functions (#5070) * [Balance] Adjust Orb & Light Ball Weight Functions * Apply Kev's Suggestions Co-authored-by: NightKev <34855794+DayKev@users.noreply.github.com> --------- Co-authored-by: NightKev <34855794+DayKev@users.noreply.github.com> Co-authored-by: damocleas --- src/modifier/modifier-type.ts | 74 +++++++++++++++++++++-------------- 1 file changed, 44 insertions(+), 30 deletions(-) diff --git a/src/modifier/modifier-type.ts b/src/modifier/modifier-type.ts index e1c8cb04405..b6cf78fb414 100644 --- a/src/modifier/modifier-type.ts +++ b/src/modifier/modifier-type.ts @@ -1040,7 +1040,8 @@ class SpeciesStatBoosterModifierTypeGenerator extends ModifierTypeGenerator { for (const p of party) { const speciesId = p.getSpeciesForm(true).speciesId; const fusionSpeciesId = p.isFusion() ? p.getFusionSpeciesForm(true).speciesId : null; - const hasFling = p.getMoveset(true).some(m => m?.moveId === Moves.FLING); + // TODO: Use commented boolean when Fling is implemented + const hasFling = false; /* p.getMoveset(true).some(m => m?.moveId === Moves.FLING) */ for (const i in values) { const checkedSpecies = values[i].species; @@ -1755,56 +1756,69 @@ const modifierPool: ModifierPool = { }, 12), new WeightedModifierType(modifierTypes.TOXIC_ORB, (party: Pokemon[]) => { return party.some(p => { - const moveset = p.getMoveset(true).filter(m => !isNullOrUndefined(m)).map(m => m.moveId); - - const canSetStatus = p.canSetStatus(StatusEffect.TOXIC, true, true, null, true); const isHoldingOrb = p.getHeldItems().some(i => i.type.id === "FLAME_ORB" || i.type.id === "TOXIC_ORB"); - // Moves that take advantage of obtaining the actual status effect - const hasStatusMoves = [ Moves.FACADE, Moves.PSYCHO_SHIFT ] - .some(m => moveset.includes(m)); - // Moves that take advantage of being able to give the target a status orb - // TODO: Take moves from comment they are implemented - const hasItemMoves = [ /* Moves.TRICK, Moves.FLING, Moves.SWITCHEROO */ ] - .some(m => moveset.includes(m)); - // Abilities that take advantage of obtaining the actual status effect - const hasRelevantAbilities = [ Abilities.QUICK_FEET, Abilities.GUTS, Abilities.MARVEL_SCALE, Abilities.TOXIC_BOOST, Abilities.POISON_HEAL, Abilities.MAGIC_GUARD ] - .some(a => p.hasAbility(a, false, true)); - if (!isHoldingOrb) { + const moveset = p.getMoveset(true).filter(m => !isNullOrUndefined(m)).map(m => m.moveId); + const canSetStatus = p.canSetStatus(StatusEffect.TOXIC, true, true, null, true); + + // Moves that take advantage of obtaining the actual status effect + const hasStatusMoves = [ Moves.FACADE, Moves.PSYCHO_SHIFT ] + .some(m => moveset.includes(m)); + // Moves that take advantage of being able to give the target a status orb + // TODO: Take moves (Trick, Fling, Switcheroo) from comment when they are implemented + const hasItemMoves = [ /* Moves.TRICK, Moves.FLING, Moves.SWITCHEROO */ ] + .some(m => moveset.includes(m)); + if (canSetStatus) { - return hasRelevantAbilities || hasStatusMoves; + // Abilities that take advantage of obtaining the actual status effect, separated based on specificity to the orb + const hasGeneralAbility = [ Abilities.QUICK_FEET, Abilities.GUTS, Abilities.MARVEL_SCALE, Abilities.MAGIC_GUARD ] + .some(a => p.hasAbility(a, false, true)); + const hasSpecificAbility = [ Abilities.TOXIC_BOOST, Abilities.POISON_HEAL ] + .some(a => p.hasAbility(a, false, true)); + const hasOppositeAbility = [ Abilities.FLARE_BOOST ] + .some(a => p.hasAbility(a, false, true)); + + return hasSpecificAbility || (hasGeneralAbility && !hasOppositeAbility) || hasStatusMoves; } else { return hasItemMoves; } } + return false; }) ? 10 : 0; }, 10), new WeightedModifierType(modifierTypes.FLAME_ORB, (party: Pokemon[]) => { return party.some(p => { - const moveset = p.getMoveset(true).filter(m => !isNullOrUndefined(m)).map(m => m.moveId); - const canSetStatus = p.canSetStatus(StatusEffect.BURN, true, true, null, true); const isHoldingOrb = p.getHeldItems().some(i => i.type.id === "FLAME_ORB" || i.type.id === "TOXIC_ORB"); - // Moves that take advantage of obtaining the actual status effect - const hasStatusMoves = [ Moves.FACADE, Moves.PSYCHO_SHIFT ] - .some(m => moveset.includes(m)); - // Moves that take advantage of being able to give the target a status orb - // TODO: Take moves from comment they are implemented - const hasItemMoves = [ /* Moves.TRICK, Moves.FLING, Moves.SWITCHEROO */ ] - .some(m => moveset.includes(m)); - // Abilities that take advantage of obtaining the actual status effect - const hasRelevantAbilities = [ Abilities.QUICK_FEET, Abilities.GUTS, Abilities.MARVEL_SCALE, Abilities.FLARE_BOOST, Abilities.MAGIC_GUARD ] - .some(a => p.hasAbility(a, false, true)); - if (!isHoldingOrb) { + const moveset = p.getMoveset(true).filter(m => !isNullOrUndefined(m)).map(m => m.moveId); + const canSetStatus = p.canSetStatus(StatusEffect.TOXIC, true, true, null, true); + + // Moves that take advantage of obtaining the actual status effect + const hasStatusMoves = [ Moves.FACADE, Moves.PSYCHO_SHIFT ] + .some(m => moveset.includes(m)); + // Moves that take advantage of being able to give the target a status orb + // TODO: Take moves (Trick, Fling, Switcheroo) from comment when they are implemented + const hasItemMoves = [ /* Moves.TRICK, Moves.FLING, Moves.SWITCHEROO */ ] + .some(m => moveset.includes(m)); + if (canSetStatus) { - return hasRelevantAbilities || hasStatusMoves; + // Abilities that take advantage of obtaining the actual status effect, separated based on specificity to the orb + const hasGeneralAbility = [ Abilities.QUICK_FEET, Abilities.GUTS, Abilities.MARVEL_SCALE, Abilities.MAGIC_GUARD ] + .some(a => p.hasAbility(a, false, true)); + const hasSpecificAbility = [ Abilities.FLARE_BOOST ] + .some(a => p.hasAbility(a, false, true)); + const hasOppositeAbility = [ Abilities.TOXIC_BOOST, Abilities.POISON_HEAL ] + .some(a => p.hasAbility(a, false, true)); + + return hasSpecificAbility || (hasGeneralAbility && !hasOppositeAbility) || hasStatusMoves; } else { return hasItemMoves; } } + return false; }) ? 10 : 0; }, 10),