rename some bounce things to magic coat. give magic coat its move text.
parent
58dbefa603
commit
243151d987
|
|
@ -790,10 +790,16 @@ export class ContactBurnProtectedTag extends ProtectedTag {
|
||||||
}
|
}
|
||||||
}
|
}
|
||||||
|
|
||||||
export class BounceTag extends BattlerTag {
|
export class MagicCoatTag extends BattlerTag {
|
||||||
constructor(sourceMove: Moves, tagType: BattlerTagType = BattlerTagType.BOUNCE) {
|
constructor(sourceMove: Moves, tagType: BattlerTagType = BattlerTagType.MAGIC_COAT) {
|
||||||
super(tagType, BattlerTagLapseType.CUSTOM, 0, sourceMove);
|
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 {
|
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);
|
return new TypeBoostTag(tagType, sourceMove, Type.ELECTRIC, 2, true);
|
||||||
case BattlerTagType.MAGNET_RISEN:
|
case BattlerTagType.MAGNET_RISEN:
|
||||||
return new MagnetRisenTag(tagType, sourceMove);
|
return new MagnetRisenTag(tagType, sourceMove);
|
||||||
case BattlerTagType.BOUNCE:
|
case BattlerTagType.MAGIC_COAT:
|
||||||
return new BounceTag(sourceMove);
|
return new MagicCoatTag(sourceMove);
|
||||||
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);
|
||||||
|
|
|
||||||
|
|
@ -56,5 +56,5 @@ export enum BattlerTagType {
|
||||||
CHARGED = "CHARGED",
|
CHARGED = "CHARGED",
|
||||||
GROUNDED = "GROUNDED",
|
GROUNDED = "GROUNDED",
|
||||||
MAGNET_RISEN = "MAGNET_RISEN",
|
MAGNET_RISEN = "MAGNET_RISEN",
|
||||||
BOUNCE = "BOUNCE"
|
MAGIC_COAT = "MAGIC_COAT"
|
||||||
}
|
}
|
||||||
|
|
|
||||||
|
|
@ -4669,7 +4669,7 @@ export function initMoves() {
|
||||||
new AttackMove(Moves.SUPERPOWER, Type.FIGHTING, MoveCategory.PHYSICAL, 120, 100, 5, 100, 0, 3)
|
new AttackMove(Moves.SUPERPOWER, Type.FIGHTING, MoveCategory.PHYSICAL, 120, 100, 5, 100, 0, 3)
|
||||||
.attr(StatChangeAttr, [ BattleStat.ATK, BattleStat.DEF ], -1, true),
|
.attr(StatChangeAttr, [ BattleStat.ATK, BattleStat.DEF ], -1, true),
|
||||||
new SelfStatusMove(Moves.MAGIC_COAT, Type.PSYCHIC, -1, 15, -1, 4, 3)
|
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)
|
new SelfStatusMove(Moves.RECYCLE, Type.NORMAL, -1, 10, -1, 0, 3)
|
||||||
.unimplemented(),
|
.unimplemented(),
|
||||||
new AttackMove(Moves.REVENGE, Type.FIGHTING, MoveCategory.PHYSICAL, 60, 100, 10, -1, -4, 3)
|
new AttackMove(Moves.REVENGE, Type.FIGHTING, MoveCategory.PHYSICAL, 60, 100, 10, -1, -4, 3)
|
||||||
|
|
|
||||||
|
|
@ -21,7 +21,7 @@ import { Biome } from "./data/enums/biome";
|
||||||
import { ModifierTier } from "./modifier/modifier-tier";
|
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 { 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 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 { BattlerTagType } from "./data/enums/battler-tag-type";
|
||||||
import { getPokemonMessage } from "./messages";
|
import { getPokemonMessage } from "./messages";
|
||||||
import { Starter } from "./ui/starter-select-ui-handler";
|
import { Starter } from "./ui/starter-select-ui-handler";
|
||||||
|
|
@ -2416,7 +2416,7 @@ export class MoveEffectPhase extends PokemonPhase {
|
||||||
|
|
||||||
let isBounced: BattlerTag | boolean = false;
|
let isBounced: BattlerTag | boolean = false;
|
||||||
for (let opponent of targets) {
|
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) {
|
if (isBounced) {
|
||||||
this.scene.queueMessage(getPokemonMessage(opponent, '\nbounced the move back!'));
|
this.scene.queueMessage(getPokemonMessage(opponent, '\nbounced the move back!'));
|
||||||
const tempTargets = targets;
|
const tempTargets = targets;
|
||||||
|
|
|
||||||
Loading…
Reference in New Issue