From 75c9c9cc2c95ac18c72ea96399c18a6f7073a803 Mon Sep 17 00:00:00 2001 From: Flashfyre Date: Wed, 27 Mar 2024 13:13:37 -0400 Subject: [PATCH] Make form change items non-stealable and fix Recover AI --- src/data/move.ts | 3 ++- src/modifier/modifier.ts | 4 ++++ 2 files changed, 6 insertions(+), 1 deletion(-) diff --git a/src/data/move.ts b/src/data/move.ts index c32ec1d9a..e3fbc1291 100644 --- a/src/data/move.ts +++ b/src/data/move.ts @@ -624,7 +624,8 @@ export class HealAttr extends MoveEffectAttr { } getTargetBenefitScore(user: Pokemon, target: Pokemon, move: Move): integer { - return Math.round((1 - (this.selfTarget ? user : target).getHpRatio()) * 20); + let score = ((1 - (this.selfTarget ? user : target).getHpRatio()) * 20) - this.healRatio * 10; + return Math.round(score / (1 - this.healRatio / 2)); } } diff --git a/src/modifier/modifier.ts b/src/modifier/modifier.ts index 00271e9f4..d85061f8b 100644 --- a/src/modifier/modifier.ts +++ b/src/modifier/modifier.ts @@ -1465,6 +1465,10 @@ export class PokemonFormChangeItemModifier extends PokemonHeldItemModifier { return ret; } + getTransferrable(withinParty: boolean) { + return withinParty; + } + getMaxHeldItemCount(pokemon: Pokemon): integer { return 1; }