mirror of
https://github.com/pagefaultgames/pokerogue.git
synced 2025-08-19 22:09:27 +02:00
Merge branch 'beta' into freeze-dry-implementation
This commit is contained in:
commit
4e87c4eec3
@ -26,6 +26,7 @@ import {
|
||||
applyMoveAttrs,
|
||||
AttackMove,
|
||||
DelayedAttackAttr,
|
||||
FlinchAttr,
|
||||
HitsTagAttr,
|
||||
MissEffectAttr,
|
||||
MoveAttr,
|
||||
@ -502,6 +503,10 @@ export class MoveEffectPhase extends PokemonPhase {
|
||||
*/
|
||||
protected applyHeldItemFlinchCheck(user: Pokemon, target: Pokemon, dealsDamage: boolean) : () => void {
|
||||
return () => {
|
||||
if (this.move.getMove().hasAttr(FlinchAttr)) {
|
||||
return;
|
||||
}
|
||||
|
||||
if (dealsDamage && !target.hasAbilityWithAttr(IgnoreMoveEffectsAbAttr) && !this.move.getMove().hitsSubstitute(user, target)) {
|
||||
const flinched = new BooleanHolder(false);
|
||||
user.scene.applyModifiers(FlinchChanceModifier, user.isPlayer(), user, flinched);
|
||||
|
@ -29,10 +29,14 @@ export class QuietFormChangePhase extends BattlePhase {
|
||||
|
||||
const preName = getPokemonNameWithAffix(this.pokemon);
|
||||
|
||||
if (!this.pokemon.isOnField() || this.pokemon.getTag(SemiInvulnerableTag)) {
|
||||
this.pokemon.changeForm(this.formChange).then(() => {
|
||||
this.scene.ui.showText(getSpeciesFormChangeMessage(this.pokemon, this.formChange, preName), null, () => this.end(), 1500);
|
||||
});
|
||||
if (!this.pokemon.isOnField() || this.pokemon.getTag(SemiInvulnerableTag) || this.pokemon.isFainted()) {
|
||||
if (this.pokemon.isPlayer() || this.pokemon.isActive()) {
|
||||
this.pokemon.changeForm(this.formChange).then(() => {
|
||||
this.scene.ui.showText(getSpeciesFormChangeMessage(this.pokemon, this.formChange, preName), null, () => this.end(), 1500);
|
||||
});
|
||||
} else {
|
||||
this.end();
|
||||
}
|
||||
return;
|
||||
}
|
||||
|
||||
|
Loading…
Reference in New Issue
Block a user