Cleanup small parts of code

This commit is contained in:
Jakub Hanko 2024-05-17 08:54:13 +02:00
parent 5c10268e25
commit 83d76fd535
No known key found for this signature in database
GPG Key ID: 775D427937A306CC
2 changed files with 6 additions and 5 deletions

View File

@ -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);

View File

@ -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;