mirror of
https://github.com/pagefaultgames/pokerogue.git
synced 2024-11-26 08:46:55 +00:00
Change accuracy ignore moves to only apply to the original target
This commit is contained in:
parent
969d54dd2e
commit
a7aa639bb2
@ -1347,7 +1347,7 @@ class MoveEffectPhase extends PokemonPhase {
|
|||||||
if (hiddenTag && !this.move.getMove().getAttrs(HitsTagAttr).filter(hta => (hta as HitsTagAttr).tagType === hiddenTag.tagType).length)
|
if (hiddenTag && !this.move.getMove().getAttrs(HitsTagAttr).filter(hta => (hta as HitsTagAttr).tagType === hiddenTag.tagType).length)
|
||||||
return false;
|
return false;
|
||||||
|
|
||||||
if (this.getUserPokemon().getTag(BattlerTagType.IGNORE_ACCURACY))
|
if (this.getUserPokemon().getTag(BattlerTagType.IGNORE_ACCURACY) && (this.getUserPokemon().getLastXMoves().find(() => true)?.targets || []).indexOf(target.getBattlerIndex()) > -1)
|
||||||
return true;
|
return true;
|
||||||
|
|
||||||
const moveAccuracy = new Utils.NumberHolder(this.move.getMove().accuracy);
|
const moveAccuracy = new Utils.NumberHolder(this.move.getMove().accuracy);
|
||||||
|
@ -1278,7 +1278,7 @@ export class ChargeAttr extends OverrideMoveEffectAttr {
|
|||||||
|
|
||||||
apply(user: Pokemon, target: Pokemon, move: Move, args: any[]): Promise<boolean> {
|
apply(user: Pokemon, target: Pokemon, move: Move, args: any[]): Promise<boolean> {
|
||||||
return new Promise(resolve => {
|
return new Promise(resolve => {
|
||||||
const lastMove = user.getLastXMoves(1) as TurnMove[];
|
const lastMove = user.getLastXMoves() as TurnMove[];
|
||||||
if (!lastMove.length || lastMove[0].move !== move.id || lastMove[0].result !== MoveResult.OTHER) {
|
if (!lastMove.length || lastMove[0].move !== move.id || lastMove[0].result !== MoveResult.OTHER) {
|
||||||
(args[0] as Utils.BooleanHolder).value = true;
|
(args[0] as Utils.BooleanHolder).value = true;
|
||||||
new MoveChargeAnim(this.chargeAnim, move.id, user).play(user.scene, () => {
|
new MoveChargeAnim(this.chargeAnim, move.id, user).play(user.scene, () => {
|
||||||
|
Loading…
Reference in New Issue
Block a user