mirror of
https://github.com/pagefaultgames/pokerogue.git
synced 2025-07-12 19:32:17 +02:00
Adding benjam1337 suggestion to refine code
This commit is contained in:
parent
9eec3562e0
commit
6a3ea63254
@ -2254,10 +2254,9 @@ export class MovePhase extends BattlePhase {
|
|||||||
|
|
||||||
if ((moveQueue.length && moveQueue[0].move === Moves.NONE) || !targets.length) {
|
if ((moveQueue.length && moveQueue[0].move === Moves.NONE) || !targets.length) {
|
||||||
moveQueue.shift();
|
moveQueue.shift();
|
||||||
if (this.move.moveId === Moves.EXPLOSION || this.move.moveId === Moves.SELF_DESTRUCT || this.move.moveId === Moves.MISTY_EXPLOSION){ //Currently all explosions, AKA, kamikaze-attacks. There might be a better way to do it except to hardcode it, but i haven't found how yet.
|
if (!(this.move.moveId in [Moves.EXPLOSION,Moves.SELF_DESTRUCT,Moves.MISTY_EXPLOSION])){
|
||||||
} else {
|
|
||||||
this.cancel();
|
this.cancel();
|
||||||
}
|
}
|
||||||
}
|
}
|
||||||
|
|
||||||
if (this.cancelled) {
|
if (this.cancelled) {
|
||||||
|
Loading…
Reference in New Issue
Block a user