Updated crit logic to include critAlways, fixed indents
parent
b8a0b9981b
commit
b8d21bf724
|
|
@ -1174,9 +1174,9 @@ export default abstract class Pokemon extends Phaser.GameObjects.Container {
|
||||||
power.value *= 1.5;
|
power.value *= 1.5;
|
||||||
let isCritical: boolean;
|
let isCritical: boolean;
|
||||||
const critOnly = new Utils.BooleanHolder(false);
|
const critOnly = new Utils.BooleanHolder(false);
|
||||||
const critAlways = source.getTag(BattlerTagType.ALWAYS_CRIT);
|
const critAlways = source.getTag(BattlerTagType.ALWAYS_CRIT);
|
||||||
applyMoveAttrs(CritOnlyAttr, source, this, move, critOnly);
|
applyMoveAttrs(CritOnlyAttr, source, this, move, critOnly);
|
||||||
if (critOnly.value || critAlways)
|
if (critOnly.value || critAlways)
|
||||||
isCritical = true;
|
isCritical = true;
|
||||||
else {
|
else {
|
||||||
const critLevel = new Utils.IntegerHolder(0);
|
const critLevel = new Utils.IntegerHolder(0);
|
||||||
|
|
|
||||||
Loading…
Reference in New Issue