Laser Focus support, with the added BattlerTagTypes to support it (#103)

* Added a new BattlerTagType and support for Laser Focus

BattlerTagType.ALWAYS_CRIT

* Updated battler-tags to support ALWAYS_CRIT

* Added ALWAYS_CRIT = "ALWAYS_CRIT", for the updated battler-tag-type

* Updated the crit formula to include the new critAlways

* Updated crit logic to include critAlways, fixed indents
This commit is contained in:
EmoUsedHM01 authored and GitHub committed 2024-04-12 16:05:32 -04:00
1 parent dcb4688c76
commit 930c14fa62
4 files changed
+30 -3

No files matched your search

+3 -2
View File
@@ -1174,8 +1174,9 @@ export default abstract class Pokemon extends Phaser.GameObjects.Container {
power.value *= 1.5;
let isCritical: boolean;
const critOnly = new Utils.BooleanHolder(false);
const critAlways = source.getTag(BattlerTagType.ALWAYS_CRIT);
applyMoveAttrs(CritOnlyAttr, source, this, move, critOnly);
if (critOnly.value)
if (critOnly.value || critAlways)
isCritical = true;
else {
const critLevel = new Utils.IntegerHolder(0);
@@ -2879,4 +2880,4 @@ export class PokemonMove {
getName(): string {
return this.getMove().name;
}
}
}