mirror of
https://github.com/pagefaultgames/pokerogue.git
synced 2025-02-17 01:37:36 +00:00
Beat Up checks the user's party instead of always checking player's party (#1268)
This commit is contained in:
parent
4ffff8e1ee
commit
c4c4774528
5
src/data/move.ts
Normal file → Executable file
5
src/data/move.ts
Normal file → Executable file
@ -1320,8 +1320,9 @@ export class MultiHitAttr extends MoveAttr {
|
|||||||
}
|
}
|
||||||
break;
|
break;
|
||||||
case MultiHitType.BEAT_UP:
|
case MultiHitType.BEAT_UP:
|
||||||
|
const party = user.isPlayer() ? user.scene.getParty() : user.scene.getEnemyParty();
|
||||||
// No status means the ally pokemon can contribute to Beat Up
|
// No status means the ally pokemon can contribute to Beat Up
|
||||||
hitTimes = user.scene.getParty().reduce((total, pokemon) => {
|
hitTimes = party.reduce((total, pokemon) => {
|
||||||
return total + (pokemon.id === user.id ? 1 : pokemon?.status && pokemon.status.effect !== StatusEffect.NONE ? 0 : 1);
|
return total + (pokemon.id === user.id ? 1 : pokemon?.status && pokemon.status.effect !== StatusEffect.NONE ? 0 : 1);
|
||||||
}, 0);
|
}, 0);
|
||||||
}
|
}
|
||||||
@ -2323,7 +2324,7 @@ export class MovePowerMultiplierAttr extends VariablePowerAttr {
|
|||||||
* @returns The base power of the Beat Up hit.
|
* @returns The base power of the Beat Up hit.
|
||||||
*/
|
*/
|
||||||
const beatUpFunc = (user: Pokemon, allyIndex: number): number => {
|
const beatUpFunc = (user: Pokemon, allyIndex: number): number => {
|
||||||
const party = user.scene.getParty();
|
const party = user.isPlayer() ? user.scene.getParty() : user.scene.getEnemyParty();
|
||||||
|
|
||||||
for (let i = allyIndex; i < party.length; i++) {
|
for (let i = allyIndex; i < party.length; i++) {
|
||||||
const pokemon = party[i];
|
const pokemon = party[i];
|
||||||
|
Loading…
x
Reference in New Issue
Block a user