mirror of
https://github.com/pagefaultgames/pokerogue.git
synced 2025-07-16 05:12:19 +02:00
Added Confusion to be healed with Full Heals and Full Restores
This commit is contained in:
parent
5dd017fa30
commit
1c80c041ab
@ -2160,6 +2160,8 @@ export default abstract class Pokemon extends Phaser.GameObjects.Container {
|
||||
if (this.getTag(BattlerTagType.NIGHTMARE))
|
||||
this.lapseTag(BattlerTagType.NIGHTMARE);
|
||||
}
|
||||
if (this.getTag(BattlerTagType.CONFUSED))
|
||||
this.lapseTag(BattlerTagType.CONFUSED)
|
||||
}
|
||||
|
||||
primeSummonData(summonDataPrimer: PokemonSummonData): void {
|
||||
|
@ -21,6 +21,7 @@ import { ModifierTier } from './modifier-tier';
|
||||
import { Nature, getNatureName, getNatureStatMultiplier } from '#app/data/nature';
|
||||
import i18next from '#app/plugins/i18n';
|
||||
import { getModifierTierTextTint } from '#app/ui/text';
|
||||
import { BattlerTagType } from '#app/data/enums/battler-tag-type.js';
|
||||
|
||||
const outputModifierData = false;
|
||||
const useMaxWeightForOutput = false;
|
||||
@ -224,7 +225,7 @@ export class PokemonHpRestoreModifierType extends PokemonModifierType {
|
||||
constructor(localeKey: string, iconImage: string, restorePoints: integer, restorePercent: integer, healStatus: boolean = false, newModifierFunc?: NewModifierFunc, selectFilter?: PokemonSelectFilter, group?: string) {
|
||||
super(localeKey, iconImage, newModifierFunc || ((_type, args) => new Modifiers.PokemonHpRestoreModifier(this, (args[0] as PlayerPokemon).id, this.restorePoints, this.restorePercent, this.healStatus, false)),
|
||||
selectFilter || ((pokemon: PlayerPokemon) => {
|
||||
if (!pokemon.hp || (pokemon.hp >= pokemon.getMaxHp() && (!this.healStatus || !pokemon.status)))
|
||||
if (!pokemon.hp || (pokemon.hp >= pokemon.getMaxHp() && (!pokemon.status && !pokemon.getTag(BattlerTagType.CONFUSED))))
|
||||
return PartyUiHandler.NoEffectMessage;
|
||||
return null;
|
||||
}), group || 'potion');
|
||||
@ -271,7 +272,7 @@ export class PokemonStatusHealModifierType extends PokemonModifierType {
|
||||
constructor(localeKey: string, iconImage: string) {
|
||||
super(localeKey, iconImage, ((_type, args) => new Modifiers.PokemonStatusHealModifier(this, (args[0] as PlayerPokemon).id)),
|
||||
((pokemon: PlayerPokemon) => {
|
||||
if (!pokemon.hp || !pokemon.status)
|
||||
if (!pokemon.hp || (!pokemon.status && !pokemon.getTag(BattlerTagType.CONFUSED)))
|
||||
return PartyUiHandler.NoEffectMessage;
|
||||
return null;
|
||||
}));
|
||||
|
Loading…
Reference in New Issue
Block a user