mirror of
https://github.com/pagefaultgames/pokerogue.git
synced 2025-07-16 13:22:18 +02:00
Cleanup small parts of code
This commit is contained in:
parent
5c10268e25
commit
83d76fd535
@ -1279,9 +1279,9 @@ export class CursedTag extends BattlerTag {
|
|||||||
export class FriendGuardTag extends BattlerTag {
|
export class FriendGuardTag extends BattlerTag {
|
||||||
public powerMultiplier: number;
|
public powerMultiplier: number;
|
||||||
|
|
||||||
constructor(powerMultiplier: number) {
|
constructor() {
|
||||||
super(BattlerTagType.FRIEND_GUARD, BattlerTagLapseType.PRE_MOVE, 1, undefined);
|
super(BattlerTagType.FRIEND_GUARD, BattlerTagLapseType.TURN_END, 1, undefined);
|
||||||
this.powerMultiplier = 1 - powerMultiplier;
|
this.powerMultiplier = 0.75;
|
||||||
}
|
}
|
||||||
|
|
||||||
/**
|
/**
|
||||||
@ -1406,7 +1406,7 @@ export function getBattlerTag(tagType: BattlerTagType, turnCount: integer, sourc
|
|||||||
case BattlerTagType.MINIMIZED:
|
case BattlerTagType.MINIMIZED:
|
||||||
return new MinimizeTag();
|
return new MinimizeTag();
|
||||||
case BattlerTagType.FRIEND_GUARD:
|
case BattlerTagType.FRIEND_GUARD:
|
||||||
return new FriendGuardTag(0.25);
|
return new FriendGuardTag();
|
||||||
case BattlerTagType.NONE:
|
case BattlerTagType.NONE:
|
||||||
default:
|
default:
|
||||||
return new BattlerTag(tagType, BattlerTagLapseType.CUSTOM, turnCount, sourceMove, sourceId);
|
return new BattlerTag(tagType, BattlerTagLapseType.CUSTOM, turnCount, sourceMove, sourceId);
|
||||||
|
@ -1640,7 +1640,6 @@ export class TurnInitPhase extends FieldPhase {
|
|||||||
|
|
||||||
this.scene.getField().forEach((pokemon, i) => {
|
this.scene.getField().forEach((pokemon, i) => {
|
||||||
if (pokemon?.isActive()) {
|
if (pokemon?.isActive()) {
|
||||||
applyAbAttrs(FriendGuardAbAttr, pokemon, undefined);
|
|
||||||
if (pokemon.isPlayer())
|
if (pokemon.isPlayer())
|
||||||
this.scene.currentBattle.addParticipant(pokemon as PlayerPokemon);
|
this.scene.currentBattle.addParticipant(pokemon as PlayerPokemon);
|
||||||
|
|
||||||
@ -2028,6 +2027,8 @@ export class TurnStartPhase extends FieldPhase {
|
|||||||
if (turnCommand.skip)
|
if (turnCommand.skip)
|
||||||
continue;
|
continue;
|
||||||
|
|
||||||
|
applyAbAttrs(FriendGuardAbAttr, pokemon, undefined);
|
||||||
|
|
||||||
switch (turnCommand.command) {
|
switch (turnCommand.command) {
|
||||||
case Command.FIGHT:
|
case Command.FIGHT:
|
||||||
const queuedMove = turnCommand.move;
|
const queuedMove = turnCommand.move;
|
||||||
|
Loading…
Reference in New Issue
Block a user