Update to ability.ts based on changes.

Formatting errors should be largely fixed, and we've switched from Math.rand to Utils.
This commit is contained in:
AppleOfTheDark 2024-04-11 04:49:31 +01:00 committed by GitHub
parent 89cb621463
commit 98b2488477
No known key found for this signature in database
GPG Key ID: B5690EEEBB952194

View File

@ -1367,7 +1367,7 @@ export class PostTurnAbAttr extends AbAttr {
}
export class PostTurnResetStatusAbAttr extends PostTurnAbAttr {
applyPostTurn(pokemon: Pokemon, args: any[]): boolean | Promise<boolean> {
applyPostTurn(pokemon: Pokemon, args: any[]): boolean {
if (pokemon.status) {
pokemon.scene.queueMessage(getPokemonMessage(pokemon, getStatusEffectHealText(pokemon.status?.effect)));
@ -2391,7 +2391,7 @@ export function initAbilities() {
.passive()
.ignorable(),
new Ability(Abilities.SHED_SKIN, "Shed Skin", "The Pokémon may heal its own status conditions by shedding its skin.", 3)
.conditionalAttr(pokemon=> !!Math.floor(Math.random() * 2) == 0, PostTurnResetStatusAbAttr),
.conditionalAttr(pokemon => !!Utils.randSeedInt(3) == 0, PostTurnResetStatusAbAttr),
new Ability(Abilities.GUTS, "Guts", "It's so gutsy that having a status condition boosts the Pokémon's Attack stat.", 3)
.attr(BypassBurnDamageReductionAbAttr)
.conditionalAttr(pokemon => !!pokemon.status, BattleStatMultiplierAbAttr, BattleStat.ATK, 1.5),