mirror of
https://github.com/pagefaultgames/pokerogue.git
synced 2025-07-20 15:22:19 +02:00
Prevent player megas and max pokemon from teraing
This commit is contained in:
parent
6d123259ad
commit
32483fcd0e
@ -180,9 +180,10 @@ export default class CommandUiHandler extends UiHandler {
|
||||
|
||||
canTera(): boolean {
|
||||
const hasTeraMod = !!globalScene.getModifiers(TerastallizeAccessModifier).length;
|
||||
const isBlockedForm = globalScene.getField()[this.fieldIndex].isMega() || globalScene.getField()[this.fieldIndex].isMax();
|
||||
const currentTeras = globalScene.arena.playerTerasUsed;
|
||||
const plannedTera = globalScene.currentBattle.preTurnCommands[0]?.command === Command.TERA && this.fieldIndex > 0 ? 1 : 0;
|
||||
return hasTeraMod && (currentTeras + plannedTera) < 1;
|
||||
return hasTeraMod && !isBlockedForm && (currentTeras + plannedTera) < 1;
|
||||
}
|
||||
|
||||
toggleTeraButton() {
|
||||
|
Loading…
Reference in New Issue
Block a user