mirror of
https://github.com/pagefaultgames/pokerogue.git
synced 2025-07-16 21:32:18 +02:00
Implement beak blast burning on contact
This commit is contained in:
parent
56acd16456
commit
639b066c7b
@ -872,6 +872,24 @@ export class ContactPoisonProtectedTag extends ProtectedTag {
|
||||
}
|
||||
}
|
||||
|
||||
export class BeakBlastTag extends BattlerTag {
|
||||
constructor() {
|
||||
super(BattlerTagType.BEAK_BLAST, BattlerTagLapseType.CUSTOM, 0, Moves.BEAK_BLAST);
|
||||
}
|
||||
|
||||
lapse(pokemon: Pokemon, lapseType: BattlerTagLapseType): boolean {
|
||||
const ret = super.lapse(pokemon, lapseType);
|
||||
|
||||
const effectPhase = pokemon.scene.getCurrentPhase();
|
||||
if (effectPhase instanceof MoveEffectPhase && effectPhase.move.getMove().hasFlag(MoveFlags.MAKES_CONTACT)) {
|
||||
const attacker = effectPhase.getPokemon();
|
||||
attacker.trySetStatus(StatusEffect.BURN, true);
|
||||
}
|
||||
|
||||
return ret;
|
||||
}
|
||||
}
|
||||
|
||||
export class ContactBurnProtectedTag extends ProtectedTag {
|
||||
constructor(sourceMove: Moves) {
|
||||
super(sourceMove, BattlerTagType.BURNING_BULWARK);
|
||||
@ -1358,6 +1376,8 @@ export function getBattlerTag(tagType: BattlerTagType, turnCount: integer, sourc
|
||||
return new ContactStatChangeProtectedTag(sourceMove, tagType, BattleStat.SPD, -1);
|
||||
case BattlerTagType.BANEFUL_BUNKER:
|
||||
return new ContactPoisonProtectedTag(sourceMove);
|
||||
case BattlerTagType.BEAK_BLAST:
|
||||
return new BeakBlastTag();
|
||||
case BattlerTagType.BURNING_BULWARK:
|
||||
return new ContactBurnProtectedTag(sourceMove);
|
||||
case BattlerTagType.ENDURING:
|
||||
|
@ -56,5 +56,6 @@ export enum BattlerTagType {
|
||||
CHARGED = "CHARGED",
|
||||
GROUNDED = "GROUNDED",
|
||||
MAGNET_RISEN = "MAGNET_RISEN",
|
||||
MINIMIZED = "MINIMIZED"
|
||||
MINIMIZED = "MINIMIZED",
|
||||
BEAK_BLAST = "BEAK_BLAST"
|
||||
}
|
||||
|
@ -6338,7 +6338,7 @@ export function initMoves() {
|
||||
new StatusMove(Moves.INSTRUCT, Type.PSYCHIC, -1, 15, -1, 0, 7)
|
||||
.unimplemented(),
|
||||
new AttackMove(Moves.BEAK_BLAST, Type.FLYING, MoveCategory.PHYSICAL, 100, 100, 15, -1, 5, 7)
|
||||
.attr(ChargeAttr, ChargeAnim.BEAK_BLAST_CHARGING, "started\nheating up its beak!", undefined, false, true, -3)
|
||||
.attr(ChargeAttr, ChargeAnim.BEAK_BLAST_CHARGING, "started\nheating up its beak!", BattlerTagType.BEAK_BLAST, true, true, -3)
|
||||
.ballBombMove()
|
||||
.makesContact(false)
|
||||
.partial(),
|
||||
|
@ -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 { BattlerTagLapseType, EncoreTag, HideSpriteTag as HiddenTag, ProtectedTag, TrappedTag } from "./data/battler-tags";
|
||||
import { BattlerTagLapseType, BeakBlastTag, EncoreTag, HideSpriteTag as HiddenTag, ProtectedTag, TrappedTag } from "./data/battler-tags";
|
||||
import { BattlerTagType } from "./data/enums/battler-tag-type";
|
||||
import { getPokemonMessage, getPokemonPrefix } from "./messages";
|
||||
import { Starter } from "./ui/starter-select-ui-handler";
|
||||
@ -2524,6 +2524,8 @@ export class MoveEffectPhase extends PokemonPhase {
|
||||
|
||||
const hitResult = !isProtected ? target.apply(user, this.move) : HitResult.NO_EFFECT;
|
||||
|
||||
target.findTags(t => t instanceof BeakBlastTag).find(t => target.lapseTag(t.tagType))
|
||||
|
||||
this.scene.triggerPokemonFormChange(user, SpeciesFormChangePostMoveTrigger);
|
||||
|
||||
applyAttrs.push(new Promise(resolve => {
|
||||
|
Loading…
Reference in New Issue
Block a user