mirror of
https://github.com/pagefaultgames/pokerogue.git
synced 2025-07-16 05:12:19 +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 {
|
||||
public powerMultiplier: number;
|
||||
|
||||
constructor(powerMultiplier: number) {
|
||||
super(BattlerTagType.FRIEND_GUARD, BattlerTagLapseType.PRE_MOVE, 1, undefined);
|
||||
this.powerMultiplier = 1 - powerMultiplier;
|
||||
constructor() {
|
||||
super(BattlerTagType.FRIEND_GUARD, BattlerTagLapseType.TURN_END, 1, undefined);
|
||||
this.powerMultiplier = 0.75;
|
||||
}
|
||||
|
||||
/**
|
||||
@ -1406,7 +1406,7 @@ export function getBattlerTag(tagType: BattlerTagType, turnCount: integer, sourc
|
||||
case BattlerTagType.MINIMIZED:
|
||||
return new MinimizeTag();
|
||||
case BattlerTagType.FRIEND_GUARD:
|
||||
return new FriendGuardTag(0.25);
|
||||
return new FriendGuardTag();
|
||||
case BattlerTagType.NONE:
|
||||
default:
|
||||
return new BattlerTag(tagType, BattlerTagLapseType.CUSTOM, turnCount, sourceMove, sourceId);
|
||||
|
@ -1640,7 +1640,6 @@ export class TurnInitPhase extends FieldPhase {
|
||||
|
||||
this.scene.getField().forEach((pokemon, i) => {
|
||||
if (pokemon?.isActive()) {
|
||||
applyAbAttrs(FriendGuardAbAttr, pokemon, undefined);
|
||||
if (pokemon.isPlayer())
|
||||
this.scene.currentBattle.addParticipant(pokemon as PlayerPokemon);
|
||||
|
||||
@ -2028,6 +2027,8 @@ export class TurnStartPhase extends FieldPhase {
|
||||
if (turnCommand.skip)
|
||||
continue;
|
||||
|
||||
applyAbAttrs(FriendGuardAbAttr, pokemon, undefined);
|
||||
|
||||
switch (turnCommand.command) {
|
||||
case Command.FIGHT:
|
||||
const queuedMove = turnCommand.move;
|
||||
|
Loading…
Reference in New Issue
Block a user