rename some bounce things to magic coat. give magic coat its move text.

pull/468/head
Reldnahc 2024-05-04 19:06:06 -05:00
parent 58dbefa603
commit 243151d987
4 changed files with 14 additions and 8 deletions

View File

@ -790,10 +790,16 @@ export class ContactBurnProtectedTag extends ProtectedTag {
}
}
export class BounceTag extends BattlerTag {
constructor(sourceMove: Moves, tagType: BattlerTagType = BattlerTagType.BOUNCE) {
export class MagicCoatTag extends BattlerTag {
constructor(sourceMove: Moves, tagType: BattlerTagType = BattlerTagType.MAGIC_COAT) {
super(tagType, BattlerTagLapseType.CUSTOM, 0, sourceMove);
}
onAdd(pokemon: Pokemon): void {
super.onAdd(pokemon);
pokemon.scene.queueMessage(getPokemonMessage(pokemon, ' shrouded\nitself with Magic Coat!'));
}
}
export class EnduringTag extends BattlerTag {
@ -1232,8 +1238,8 @@ export function getBattlerTag(tagType: BattlerTagType, turnCount: integer, sourc
return new TypeBoostTag(tagType, sourceMove, Type.ELECTRIC, 2, true);
case BattlerTagType.MAGNET_RISEN:
return new MagnetRisenTag(tagType, sourceMove);
case BattlerTagType.BOUNCE:
return new BounceTag(sourceMove);
case BattlerTagType.MAGIC_COAT:
return new MagicCoatTag(sourceMove);
case BattlerTagType.NONE:
default:
return new BattlerTag(tagType, BattlerTagLapseType.CUSTOM, turnCount, sourceMove, sourceId);

View File

@ -56,5 +56,5 @@ export enum BattlerTagType {
CHARGED = "CHARGED",
GROUNDED = "GROUNDED",
MAGNET_RISEN = "MAGNET_RISEN",
BOUNCE = "BOUNCE"
MAGIC_COAT = "MAGIC_COAT"
}

View File

@ -4669,7 +4669,7 @@ export function initMoves() {
new AttackMove(Moves.SUPERPOWER, Type.FIGHTING, MoveCategory.PHYSICAL, 120, 100, 5, 100, 0, 3)
.attr(StatChangeAttr, [ BattleStat.ATK, BattleStat.DEF ], -1, true),
new SelfStatusMove(Moves.MAGIC_COAT, Type.PSYCHIC, -1, 15, -1, 4, 3)
.attr(AddBattlerTagAttr, BattlerTagType.BOUNCE),
.attr(AddBattlerTagAttr, BattlerTagType.MAGIC_COAT),
new SelfStatusMove(Moves.RECYCLE, Type.NORMAL, -1, 10, -1, 0, 3)
.unimplemented(),
new AttackMove(Moves.REVENGE, Type.FIGHTING, MoveCategory.PHYSICAL, 60, 100, 10, -1, -4, 3)

View File

@ -21,7 +21,7 @@ import { Biome } from "./data/enums/biome";
import { ModifierTier } from "./modifier/modifier-tier";
import { FusePokemonModifierType, ModifierPoolType, ModifierType, ModifierTypeFunc, ModifierTypeOption, PokemonModifierType, PokemonMoveModifierType, PokemonPpRestoreModifierType, PokemonPpUpModifierType, RememberMoveModifierType, TmModifierType, getDailyRunStarterModifiers, getEnemyBuffModifierForWave, getModifierType, getPlayerModifierTypeOptions, getPlayerShopModifierTypeOptionsForWave, modifierTypes, regenerateModifierPoolThresholds } from "./modifier/modifier-type";
import SoundFade from "phaser3-rex-plugins/plugins/soundfade";
import { BattlerTag, BattlerTagLapseType, BounceTag, EncoreTag, HideSpriteTag as HiddenTag, ProtectedTag, TrappedTag } from "./data/battler-tags";
import { BattlerTag, BattlerTagLapseType, MagicCoatTag, EncoreTag, HideSpriteTag as HiddenTag, ProtectedTag, TrappedTag } from "./data/battler-tags";
import { BattlerTagType } from "./data/enums/battler-tag-type";
import { getPokemonMessage } from "./messages";
import { Starter } from "./ui/starter-select-ui-handler";
@ -2416,7 +2416,7 @@ export class MoveEffectPhase extends PokemonPhase {
let isBounced: BattlerTag | boolean = false;
for (let opponent of targets) {
isBounced = this.move.getMove().hasFlag(MoveFlags.MAGIC_COAT_MOVE) && (opponent.findTags(t => t instanceof BounceTag).find(t => opponent.lapseTag(t.tagType)) || opponent.hasAbilityWithAttr(MagicBounceAbAttr));
isBounced = this.move.getMove().hasFlag(MoveFlags.MAGIC_COAT_MOVE) && (opponent.findTags(t => t instanceof MagicCoatTag).find(t => opponent.lapseTag(t.tagType)) || opponent.hasAbilityWithAttr(MagicBounceAbAttr));
if (isBounced) {
this.scene.queueMessage(getPokemonMessage(opponent, '\nbounced the move back!'));
const tempTargets = targets;