mirror of
https://github.com/pagefaultgames/pokerogue.git
synced 2024-11-26 08:46:55 +00:00
Fix one hit KO moves not working properly
This commit is contained in:
parent
5617aa9772
commit
4a528aebcc
@ -1133,7 +1133,7 @@ export class OneHitKOAttr extends MoveAttr {
|
|||||||
return (user, target, move) => {
|
return (user, target, move) => {
|
||||||
const cancelled = new Utils.BooleanHolder(false);
|
const cancelled = new Utils.BooleanHolder(false);
|
||||||
applyAbAttrs(BlockOneHitKOAbAttr, target, cancelled);
|
applyAbAttrs(BlockOneHitKOAbAttr, target, cancelled);
|
||||||
return !cancelled && user.level >= target.level;
|
return !cancelled.value && user.level >= target.level;
|
||||||
}
|
}
|
||||||
}
|
}
|
||||||
}
|
}
|
||||||
@ -1877,7 +1877,7 @@ export class OneHitKOAccuracyAttr extends MoveAttr {
|
|||||||
apply(user: Pokemon, target: Pokemon, move: Move, args: any[]): boolean {
|
apply(user: Pokemon, target: Pokemon, move: Move, args: any[]): boolean {
|
||||||
const accuracy = args[0] as Utils.NumberHolder;
|
const accuracy = args[0] as Utils.NumberHolder;
|
||||||
accuracy.value = 30 + 70 * Math.min(target.level / user.level, 0.5) * 2;
|
accuracy.value = 30 + 70 * Math.min(target.level / user.level, 0.5) * 2;
|
||||||
return false;
|
return true;
|
||||||
}
|
}
|
||||||
}
|
}
|
||||||
|
|
||||||
|
Loading…
Reference in New Issue
Block a user