pull/277/merge
Adrienn Tindall 2024-04-29 15:42:14 -04:00 committed by GitHub
commit 447d0aeb2d
No known key found for this signature in database
GPG Key ID: B5690EEEBB952194
5 changed files with 52 additions and 2 deletions

View File

@ -1075,6 +1075,24 @@ export class CursedTag extends BattlerTag {
} }
} }
export class HealBlockTag extends BattlerTag {
constructor(turnCount : integer, sourceMove : Moves) {
super(BattlerTagType.HEAL_BLOCKED, BattlerTagLapseType.TURN_END, turnCount, sourceMove);
}
onAdd(pokemon: Pokemon) {
super.onAdd(pokemon);
pokemon.scene.queueMessage(getPokemonMessage(pokemon, ' was prevented from healing!'));
}
onRemove(pokemon: Pokemon): void {
super.onRemove(pokemon);
pokemon.scene.queueMessage(getPokemonMessage(pokemon, '\'s ' + super.getMoveName() + ' wore off!'));
}
}
export function getBattlerTag(tagType: BattlerTagType, turnCount: integer, sourceMove: Moves, sourceId: integer): BattlerTag { export function getBattlerTag(tagType: BattlerTagType, turnCount: integer, sourceMove: Moves, sourceId: integer): BattlerTag {
switch (tagType) { switch (tagType) {
case BattlerTagType.RECHARGING: case BattlerTagType.RECHARGING:
@ -1178,6 +1196,8 @@ export function getBattlerTag(tagType: BattlerTagType, turnCount: integer, sourc
return new CursedTag(sourceId); return new CursedTag(sourceId);
case BattlerTagType.CHARGED: case BattlerTagType.CHARGED:
return new TypeBoostTag(tagType, sourceMove, Type.ELECTRIC, 2, true); return new TypeBoostTag(tagType, sourceMove, Type.ELECTRIC, 2, true);
case BattlerTagType.HEAL_BLOCKED:
return new HealBlockTag(turnCount, 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);

View File

@ -52,5 +52,6 @@ export enum BattlerTagType {
SALT_CURED = "SALT_CURED", SALT_CURED = "SALT_CURED",
CURSED = "CURSED", CURSED = "CURSED",
CHARGED = "CHARGED", CHARGED = "CHARGED",
HEAL_BLOCKED = "HEAL_BLOCKED",
GROUNDED = "GROUNDED" GROUNDED = "GROUNDED"
} }

View File

@ -4762,7 +4762,8 @@ export function initMoves() {
.unimplemented(), .unimplemented(),
new StatusMove(Moves.HEAL_BLOCK, Type.PSYCHIC, 100, 15, -1, 0, 4) new StatusMove(Moves.HEAL_BLOCK, Type.PSYCHIC, 100, 15, -1, 0, 4)
.target(MoveTarget.ALL_NEAR_ENEMIES) .target(MoveTarget.ALL_NEAR_ENEMIES)
.unimplemented(), .attr(AddBattlerTagAttr, BattlerTagType.HEAL_BLOCKED, false, true, 5)
.partial(),
new AttackMove(Moves.WRING_OUT, Type.NORMAL, MoveCategory.SPECIAL, -1, 100, 5, -1, 0, 4) new AttackMove(Moves.WRING_OUT, Type.NORMAL, MoveCategory.SPECIAL, -1, 100, 5, -1, 0, 4)
.attr(OpponentHighHpPowerAttr) .attr(OpponentHighHpPowerAttr)
.makesContact(), .makesContact(),
@ -6359,6 +6360,7 @@ export function initMoves() {
.attr(NoEffectAttr, crashDamageFunc), .attr(NoEffectAttr, crashDamageFunc),
new AttackMove(Moves.PSYCHIC_NOISE, Type.PSYCHIC, MoveCategory.SPECIAL, 75, 100, 10, -1, 0, 9) new AttackMove(Moves.PSYCHIC_NOISE, Type.PSYCHIC, MoveCategory.SPECIAL, 75, 100, 10, -1, 0, 9)
.soundBased() .soundBased()
.attr(AddBattlerTagAttr, BattlerTagType.HEAL_BLOCKED, false, true, 2)
.partial(), .partial(),
new AttackMove(Moves.UPPER_HAND, Type.FIGHTING, MoveCategory.PHYSICAL, 65, 100, 15, -1, 3, 9) new AttackMove(Moves.UPPER_HAND, Type.FIGHTING, MoveCategory.PHYSICAL, 65, 100, 15, -1, 3, 9)
.partial(), .partial(),

View File

@ -4269,6 +4269,7 @@ export const pokemonSpeciesLevelMoves: PokemonSpeciesLevelMoves = {
[ 30, Moves.ANCIENT_POWER ], [ 30, Moves.ANCIENT_POWER ],
[ 40, Moves.LIFE_DEW ], [ 40, Moves.LIFE_DEW ],
[ 50, Moves.LEECH_SEED ], [ 50, Moves.LEECH_SEED ],
[ 55, Moves.HEAL_BLOCK ],
[ 60, Moves.RECOVER ], [ 60, Moves.RECOVER ],
[ 70, Moves.FUTURE_SIGHT ], [ 70, Moves.FUTURE_SIGHT ],
[ 80, Moves.HEALING_WISH ], [ 80, Moves.HEALING_WISH ],
@ -4967,6 +4968,7 @@ export const pokemonSpeciesLevelMoves: PokemonSpeciesLevelMoves = {
[ 23, Moves.ABSORB ], [ 23, Moves.ABSORB ],
[ 29, Moves.SHADOW_SNEAK ], [ 29, Moves.SHADOW_SNEAK ],
[ 36, Moves.FURY_SWIPES ], [ 36, Moves.FURY_SWIPES ],
[ 41, Moves.HEAL_BLOCK ],
[ 43, Moves.MIND_READER ], [ 43, Moves.MIND_READER ],
[ 50, Moves.SHADOW_BALL ], [ 50, Moves.SHADOW_BALL ],
[ 57, Moves.SPITE ], [ 57, Moves.SPITE ],
@ -5787,6 +5789,7 @@ export const pokemonSpeciesLevelMoves: PokemonSpeciesLevelMoves = {
[ 20, Moves.PSYSHOCK ], [ 20, Moves.PSYSHOCK ],
[ 25, Moves.COSMIC_POWER ], [ 25, Moves.COSMIC_POWER ],
[ 30, Moves.PSYCHIC ], [ 30, Moves.PSYCHIC ],
[ 33, Moves.HEAL_BLOCK ],
[ 35, Moves.STONE_EDGE ], [ 35, Moves.STONE_EDGE ],
[ 40, Moves.FUTURE_SIGHT ], [ 40, Moves.FUTURE_SIGHT ],
[ 45, Moves.MAGIC_ROOM ], [ 45, Moves.MAGIC_ROOM ],
@ -5805,6 +5808,7 @@ export const pokemonSpeciesLevelMoves: PokemonSpeciesLevelMoves = {
[ 20, Moves.ZEN_HEADBUTT ], [ 20, Moves.ZEN_HEADBUTT ],
[ 25, Moves.COSMIC_POWER ], [ 25, Moves.COSMIC_POWER ],
[ 30, Moves.PSYCHIC ], [ 30, Moves.PSYCHIC ],
[ 33, Moves.HEAL_BLOCK ],
[ 35, Moves.STONE_EDGE ], [ 35, Moves.STONE_EDGE ],
[ 40, Moves.SOLAR_BEAM ], [ 40, Moves.SOLAR_BEAM ],
[ 45, Moves.WONDER_ROOM ], [ 45, Moves.WONDER_ROOM ],
@ -5881,6 +5885,7 @@ export const pokemonSpeciesLevelMoves: PokemonSpeciesLevelMoves = {
[ 3, Moves.RAPID_SPIN ], [ 3, Moves.RAPID_SPIN ],
[ 6, Moves.CONFUSION ], [ 6, Moves.CONFUSION ],
[ 9, Moves.ROCK_TOMB ], [ 9, Moves.ROCK_TOMB ],
[ 10, Moves.HEAL_BLOCK ],
[ 12, Moves.POWER_TRICK ], [ 12, Moves.POWER_TRICK ],
[ 15, Moves.PSYBEAM ], [ 15, Moves.PSYBEAM ],
[ 18, Moves.ANCIENT_POWER ], [ 18, Moves.ANCIENT_POWER ],
@ -5902,6 +5907,7 @@ export const pokemonSpeciesLevelMoves: PokemonSpeciesLevelMoves = {
[ 1, Moves.MUD_SLAP ], [ 1, Moves.MUD_SLAP ],
[ 1, Moves.RAPID_SPIN ], [ 1, Moves.RAPID_SPIN ],
[ 9, Moves.ROCK_TOMB ], [ 9, Moves.ROCK_TOMB ],
[ 10, Moves.HEAL_BLOCK ],
[ 12, Moves.POWER_TRICK ], [ 12, Moves.POWER_TRICK ],
[ 15, Moves.PSYBEAM ], [ 15, Moves.PSYBEAM ],
[ 18, Moves.ANCIENT_POWER ], [ 18, Moves.ANCIENT_POWER ],
@ -6497,6 +6503,7 @@ export const pokemonSpeciesLevelMoves: PokemonSpeciesLevelMoves = {
[Species.LATIOS]: [ [Species.LATIOS]: [
[ 1, Moves.DRAGON_DANCE ], [ 1, Moves.DRAGON_DANCE ],
[ 1, Moves.STORED_POWER ], [ 1, Moves.STORED_POWER ],
[ 1, Moves.HEAL_BLOCK ],
[ 5, Moves.HELPING_HAND ], [ 5, Moves.HELPING_HAND ],
[ 10, Moves.RECOVER ], [ 10, Moves.RECOVER ],
[ 15, Moves.CONFUSION ], [ 15, Moves.CONFUSION ],
@ -7355,6 +7362,7 @@ export const pokemonSpeciesLevelMoves: PokemonSpeciesLevelMoves = {
[ 36, Moves.IRON_DEFENSE ], [ 36, Moves.IRON_DEFENSE ],
[ 40, Moves.METAL_SOUND ], [ 40, Moves.METAL_SOUND ],
[ 44, Moves.FUTURE_SIGHT ], [ 44, Moves.FUTURE_SIGHT ],
[ 45, Moves.HEAL_BLOCK ],
], ],
[Species.BRONZONG]: [ [Species.BRONZONG]: [
[ 0, Moves.BLOCK ], [ 0, Moves.BLOCK ],
@ -7373,6 +7381,7 @@ export const pokemonSpeciesLevelMoves: PokemonSpeciesLevelMoves = {
[ 38, Moves.IRON_DEFENSE ], [ 38, Moves.IRON_DEFENSE ],
[ 44, Moves.METAL_SOUND ], [ 44, Moves.METAL_SOUND ],
[ 50, Moves.FUTURE_SIGHT ], [ 50, Moves.FUTURE_SIGHT ],
[ 52, Moves.HEAL_BLOCK ],
[ 56, Moves.RAIN_DANCE ], [ 56, Moves.RAIN_DANCE ],
], ],
[Species.BONSLY]: [ [Species.BONSLY]: [
@ -9709,6 +9718,7 @@ export const pokemonSpeciesLevelMoves: PokemonSpeciesLevelMoves = {
[ 24, Moves.HYPNOSIS ], [ 24, Moves.HYPNOSIS ],
[ 28, Moves.FAKE_TEARS ], [ 28, Moves.FAKE_TEARS ],
[ 33, Moves.PSYCH_UP ], [ 33, Moves.PSYCH_UP ],
[ 33, Moves.HEAL_BLOCK ],
[ 36, Moves.PSYCHIC ], [ 36, Moves.PSYCHIC ],
[ 40, Moves.FLATTER ], [ 40, Moves.FLATTER ],
[ 44, Moves.FUTURE_SIGHT ], [ 44, Moves.FUTURE_SIGHT ],
@ -9724,6 +9734,7 @@ export const pokemonSpeciesLevelMoves: PokemonSpeciesLevelMoves = {
[ 20, Moves.PSYSHOCK ], [ 20, Moves.PSYSHOCK ],
[ 24, Moves.HYPNOSIS ], [ 24, Moves.HYPNOSIS ],
[ 28, Moves.FAKE_TEARS ], [ 28, Moves.FAKE_TEARS ],
[ 34, Moves.HEAL_BLOCK ],
[ 35, Moves.PSYCH_UP ], [ 35, Moves.PSYCH_UP ],
[ 46, Moves.FLATTER ], [ 46, Moves.FLATTER ],
[ 52, Moves.FUTURE_SIGHT ], [ 52, Moves.FUTURE_SIGHT ],
@ -9739,6 +9750,7 @@ export const pokemonSpeciesLevelMoves: PokemonSpeciesLevelMoves = {
[ 20, Moves.PSYSHOCK ], [ 20, Moves.PSYSHOCK ],
[ 24, Moves.HYPNOSIS ], [ 24, Moves.HYPNOSIS ],
[ 28, Moves.FAKE_TEARS ], [ 28, Moves.FAKE_TEARS ],
[ 34, Moves.HEAL_BLOCK ],
[ 35, Moves.PSYCH_UP ], [ 35, Moves.PSYCH_UP ],
[ 40, Moves.PSYCHIC ], [ 40, Moves.PSYCHIC ],
[ 48, Moves.FLATTER ], [ 48, Moves.FLATTER ],
@ -9760,6 +9772,7 @@ export const pokemonSpeciesLevelMoves: PokemonSpeciesLevelMoves = {
[ 36, Moves.PSYCHIC ], [ 36, Moves.PSYCHIC ],
[ 40, Moves.SKILL_SWAP ], [ 40, Moves.SKILL_SWAP ],
[ 44, Moves.FUTURE_SIGHT ], [ 44, Moves.FUTURE_SIGHT ],
[ 46, Moves.HEAL_BLOCK ],
[ 48, Moves.WONDER_ROOM ], [ 48, Moves.WONDER_ROOM ],
], ],
[Species.DUOSION]: [ [Species.DUOSION]: [
@ -9776,6 +9789,7 @@ export const pokemonSpeciesLevelMoves: PokemonSpeciesLevelMoves = {
[ 35, Moves.PAIN_SPLIT ], [ 35, Moves.PAIN_SPLIT ],
[ 40, Moves.PSYCHIC ], [ 40, Moves.PSYCHIC ],
[ 46, Moves.SKILL_SWAP ], [ 46, Moves.SKILL_SWAP ],
[ 50, Moves.HEAL_BLOCK ],
[ 52, Moves.FUTURE_SIGHT ], [ 52, Moves.FUTURE_SIGHT ],
[ 58, Moves.WONDER_ROOM ], [ 58, Moves.WONDER_ROOM ],
], ],
@ -9794,6 +9808,7 @@ export const pokemonSpeciesLevelMoves: PokemonSpeciesLevelMoves = {
[ 35, Moves.PAIN_SPLIT ], [ 35, Moves.PAIN_SPLIT ],
[ 40, Moves.PSYCHIC ], [ 40, Moves.PSYCHIC ],
[ 48, Moves.SKILL_SWAP ], [ 48, Moves.SKILL_SWAP ],
[ 54, Moves.HEAL_BLOCK ],
[ 56, Moves.FUTURE_SIGHT ], [ 56, Moves.FUTURE_SIGHT ],
[ 64, Moves.WONDER_ROOM ], [ 64, Moves.WONDER_ROOM ],
], ],
@ -10198,6 +10213,7 @@ export const pokemonSpeciesLevelMoves: PokemonSpeciesLevelMoves = {
[ 1, Moves.GROWL ], [ 1, Moves.GROWL ],
[ 1, Moves.CONFUSION ], [ 1, Moves.CONFUSION ],
[ 6, Moves.IMPRISON ], [ 6, Moves.IMPRISON ],
[ 8, Moves.HEAL_BLOCK ],
[ 12, Moves.TELEPORT ], [ 12, Moves.TELEPORT ],
[ 18, Moves.PSYBEAM ], [ 18, Moves.PSYBEAM ],
[ 24, Moves.GUARD_SPLIT ], [ 24, Moves.GUARD_SPLIT ],
@ -10215,6 +10231,7 @@ export const pokemonSpeciesLevelMoves: PokemonSpeciesLevelMoves = {
[ 1, Moves.TELEPORT ], [ 1, Moves.TELEPORT ],
[ 1, Moves.IMPRISON ], [ 1, Moves.IMPRISON ],
[ 1, Moves.PSYCHIC_TERRAIN ], [ 1, Moves.PSYCHIC_TERRAIN ],
[ 8, Moves.HEAL_BLOCK ],
[ 18, Moves.PSYBEAM ], [ 18, Moves.PSYBEAM ],
[ 24, Moves.GUARD_SPLIT ], [ 24, Moves.GUARD_SPLIT ],
[ 24, Moves.POWER_SPLIT ], [ 24, Moves.POWER_SPLIT ],
@ -10872,6 +10889,7 @@ export const pokemonSpeciesLevelMoves: PokemonSpeciesLevelMoves = {
[ 15, Moves.BITE ], [ 15, Moves.BITE ],
[ 20, Moves.SHOCK_WAVE ], [ 20, Moves.SHOCK_WAVE ],
[ 25, Moves.AGILITY ], [ 25, Moves.AGILITY ],
[ 25, Moves.HEAL_BLOCK ],
[ 30, Moves.CHARGE ], [ 30, Moves.CHARGE ],
[ 35, Moves.VOLT_SWITCH ], [ 35, Moves.VOLT_SWITCH ],
[ 40, Moves.CRUNCH ], [ 40, Moves.CRUNCH ],
@ -11960,6 +11978,7 @@ export const pokemonSpeciesLevelMoves: PokemonSpeciesLevelMoves = {
[ 40, Moves.PLAY_ROUGH ], [ 40, Moves.PLAY_ROUGH ],
[ 44, Moves.MAGIC_ROOM ], [ 44, Moves.MAGIC_ROOM ],
[ 48, Moves.FOUL_PLAY ], [ 48, Moves.FOUL_PLAY ],
[ 50, Moves.HEAL_BLOCK ],
[ 52, Moves.LAST_RESORT ], [ 52, Moves.LAST_RESORT ],
], ],
[Species.PHANTUMP]: [ [Species.PHANTUMP]: [
@ -13033,6 +13052,7 @@ export const pokemonSpeciesLevelMoves: PokemonSpeciesLevelMoves = {
[ 45, Moves.IRON_HEAD ], [ 45, Moves.IRON_HEAD ],
[ 50, Moves.TAKE_DOWN ], [ 50, Moves.TAKE_DOWN ],
[ 55, Moves.DOUBLE_EDGE ], [ 55, Moves.DOUBLE_EDGE ],
[ 85, Moves.HEAL_BLOCK ],
], ],
[Species.SILVALLY]: [ [Species.SILVALLY]: [
[ 0, Moves.MULTI_ATTACK ], [ 0, Moves.MULTI_ATTACK ],
@ -13041,6 +13061,7 @@ export const pokemonSpeciesLevelMoves: PokemonSpeciesLevelMoves = {
[ 1, Moves.EXPLOSION ], [ 1, Moves.EXPLOSION ],
[ 1, Moves.SCARY_FACE ], [ 1, Moves.SCARY_FACE ],
[ 1, Moves.IMPRISON ], [ 1, Moves.IMPRISON ],
[ 1, Moves.HEAL_BLOCK ],
[ 1, Moves.POISON_FANG ], [ 1, Moves.POISON_FANG ],
[ 1, Moves.AERIAL_ACE ], [ 1, Moves.AERIAL_ACE ],
[ 1, Moves.THUNDER_FANG ], [ 1, Moves.THUNDER_FANG ],

View File

@ -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, RememberMoveModifierType, TmModifierType, getDailyRunStarterModifiers, getEnemyBuffModifierForWave, getModifierType, getPlayerModifierTypeOptions, getPlayerShopModifierTypeOptionsForWave, modifierTypes, regenerateModifierPoolThresholds } from "./modifier/modifier-type"; import { FusePokemonModifierType, ModifierPoolType, ModifierType, ModifierTypeFunc, ModifierTypeOption, PokemonModifierType, PokemonMoveModifierType, 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 { BattlerTagLapseType, EncoreTag, HideSpriteTag as HiddenTag, ProtectedTag, TrappedTag } from "./data/battler-tags"; import { BattlerTagLapseType, EncoreTag, HealBlockTag, 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";
@ -3867,6 +3867,12 @@ export class PokemonHealPhase extends CommonAnimPhase {
return; return;
} }
if (pokemon.getTag(HealBlockTag)) {
this.scene.queueMessage(getPokemonMessage(pokemon, ' was prevented from healing!'));
super.end();
return;
}
const fullHp = pokemon.getHpRatio() >= 1; const fullHp = pokemon.getHpRatio() >= 1;
const hasMessage = !!this.message; const hasMessage = !!this.message;