mirror of
https://github.com/pagefaultgames/pokerogue.git
synced 2025-01-18 15:00:55 +00:00
[Bug] Friendship-based moves have Base Power -1 when Pokemon is wild (#2291)
Affects RETURN, FRUSTRATION, PIKA_POW, and VEEVEE_VOLLEY.
This commit is contained in:
parent
cc1b37c097
commit
90f6ae7e6d
@ -3034,10 +3034,8 @@ export class FriendshipPowerAttr extends VariablePowerAttr {
|
||||
apply(user: Pokemon, target: Pokemon, move: Move, args: any[]): boolean {
|
||||
const power = args[0] as Utils.NumberHolder;
|
||||
|
||||
if (user instanceof PlayerPokemon) {
|
||||
const friendshipPower = Math.floor(Math.min(user.friendship, 255) / 2.5);
|
||||
power.value = Math.max(!this.invert ? friendshipPower : 102 - friendshipPower, 1);
|
||||
}
|
||||
const friendshipPower = Math.floor(Math.min(user instanceof PlayerPokemon ? user.friendship : user.species.baseFriendship, 255) / 2.5);
|
||||
power.value = Math.max(!this.invert ? friendshipPower : 102 - friendshipPower, 1);
|
||||
|
||||
return true;
|
||||
}
|
||||
|
Loading…
x
Reference in New Issue
Block a user