Make form change items non-stealable and fix Recover AI

pull/18/head
Flashfyre 2024-03-27 13:13:37 -04:00
parent b94215e3f6
commit 75c9c9cc2c
2 changed files with 6 additions and 1 deletions

View File

@ -624,7 +624,8 @@ export class HealAttr extends MoveEffectAttr {
} }
getTargetBenefitScore(user: Pokemon, target: Pokemon, move: Move): integer { 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));
} }
} }

View File

@ -1465,6 +1465,10 @@ export class PokemonFormChangeItemModifier extends PokemonHeldItemModifier {
return ret; return ret;
} }
getTransferrable(withinParty: boolean) {
return withinParty;
}
getMaxHeldItemCount(pokemon: Pokemon): integer { getMaxHeldItemCount(pokemon: Pokemon): integer {
return 1; return 1;
} }