mirror of
https://github.com/pagefaultgames/pokerogue.git
synced 2025-07-06 16:32:16 +02:00
Merge branch 'beta' of https://github.com/pagefaultgames/pokerogue into status-ab-msg
This commit is contained in:
commit
c77f3ba4f5
@ -7229,7 +7229,7 @@ export function initAbilities() {
|
||||
new Ability(Abilities.CURIOUS_MEDICINE, 8)
|
||||
.attr(PostSummonClearAllyStatStagesAbAttr),
|
||||
new Ability(Abilities.TRANSISTOR, 8)
|
||||
.attr(MoveTypePowerBoostAbAttr, PokemonType.ELECTRIC),
|
||||
.attr(MoveTypePowerBoostAbAttr, PokemonType.ELECTRIC, 1.3),
|
||||
new Ability(Abilities.DRAGONS_MAW, 8)
|
||||
.attr(MoveTypePowerBoostAbAttr, PokemonType.DRAGON),
|
||||
new Ability(Abilities.CHILLING_NEIGH, 8)
|
||||
@ -7414,4 +7414,4 @@ export function initAbilities() {
|
||||
.unreplaceable() // TODO is this true?
|
||||
.attr(ConfusionOnStatusEffectAbAttr, StatusEffect.POISON, StatusEffect.TOXIC)
|
||||
);
|
||||
}
|
||||
}
|
||||
|
@ -2459,14 +2459,7 @@ export class StatusEffectAttr extends MoveEffectAttr {
|
||||
const statusCheck = moveChance < 0 || moveChance === 100 || user.randSeedInt(100) < moveChance;
|
||||
if (statusCheck) {
|
||||
const pokemon = this.selfTarget ? user : target;
|
||||
if (pokemon.status && !this.overrideStatus) {
|
||||
return false;
|
||||
}
|
||||
|
||||
if (user !== target && target.isSafeguarded(user)) {
|
||||
if (move.category === MoveCategory.STATUS) {
|
||||
globalScene.queueMessage(i18next.t("moveTriggers:safeguard", { targetName: getPokemonNameWithAffix(target) }));
|
||||
}
|
||||
if (user !== target && move.category === MoveCategory.STATUS && !target.canSetStatus(this.effect, false, false, user, true)) {
|
||||
return false;
|
||||
}
|
||||
if (((!pokemon.status || this.overrideStatus) || (pokemon.status.effect === this.effect && moveChance < 0))
|
||||
|
@ -167,11 +167,6 @@ export const trainerPartyTemplates = {
|
||||
new TrainerPartyTemplate(1, PartyMemberStrength.STRONGER),
|
||||
),
|
||||
GYM_LEADER_5: new TrainerPartyCompoundTemplate(
|
||||
new TrainerPartyTemplate(4, PartyMemberStrength.AVERAGE),
|
||||
new TrainerPartyTemplate(1, PartyMemberStrength.STRONG),
|
||||
new TrainerPartyTemplate(1, PartyMemberStrength.STRONGER),
|
||||
),
|
||||
GYM_LEADER_6: new TrainerPartyCompoundTemplate(
|
||||
new TrainerPartyTemplate(3, PartyMemberStrength.AVERAGE),
|
||||
new TrainerPartyTemplate(2, PartyMemberStrength.STRONG),
|
||||
new TrainerPartyTemplate(1, PartyMemberStrength.STRONGER),
|
||||
@ -239,7 +234,7 @@ export function getEvilGruntPartyTemplate(): TrainerPartyTemplate {
|
||||
case ClassicFixedBossWaves.EVIL_ADMIN_1:
|
||||
return trainerPartyTemplates.GYM_LEADER_4; // 3avg 1 strong 1 stronger
|
||||
default:
|
||||
return trainerPartyTemplates.GYM_LEADER_6; // 3 avg 2 strong 1 stronger
|
||||
return trainerPartyTemplates.GYM_LEADER_5; // 3 avg 2 strong 1 stronger
|
||||
}
|
||||
}
|
||||
|
||||
@ -269,14 +264,11 @@ export function getGymLeaderPartyTemplate() {
|
||||
else if (currentBattle?.waveIndex <= 60) { // 50 and 60
|
||||
return trainerPartyTemplates.GYM_LEADER_3; // 2 avg 1 strong 1 stronger
|
||||
}
|
||||
else if (currentBattle?.waveIndex <= 80) {
|
||||
else if (currentBattle?.waveIndex <= 90) { // 80 and 90
|
||||
return trainerPartyTemplates.GYM_LEADER_4; // 3 avg 1 strong 1 stronger
|
||||
}
|
||||
else if (currentBattle?.waveIndex <= 90) {
|
||||
return trainerPartyTemplates.GYM_LEADER_5; // 4 avg 1 strong 1 stronger
|
||||
}
|
||||
// 110+
|
||||
return trainerPartyTemplates.GYM_LEADER_6; // 3 avg 2 strong 1 stronger
|
||||
return trainerPartyTemplates.GYM_LEADER_5; // 3 avg 2 strong 1 stronger
|
||||
default:
|
||||
return getWavePartyTemplate(
|
||||
trainerPartyTemplates.GYM_LEADER_1,
|
||||
@ -284,7 +276,6 @@ export function getGymLeaderPartyTemplate() {
|
||||
trainerPartyTemplates.GYM_LEADER_3,
|
||||
trainerPartyTemplates.GYM_LEADER_4,
|
||||
trainerPartyTemplates.GYM_LEADER_5,
|
||||
trainerPartyTemplates.GYM_LEADER_6,
|
||||
);
|
||||
}
|
||||
}
|
||||
|
@ -248,6 +248,7 @@ import { PLAYER_PARTY_MAX_SIZE } from "#app/constants";
|
||||
import { CustomPokemonData } from "#app/data/custom-pokemon-data";
|
||||
import { SwitchType } from "#enums/switch-type";
|
||||
import { SpeciesFormKey } from "#enums/species-form-key";
|
||||
import {getStatusEffectOverlapText } from "#app/data/status-effect";
|
||||
import {
|
||||
BASE_HIDDEN_ABILITY_CHANCE,
|
||||
BASE_SHINY_CHANCE,
|
||||
@ -5364,6 +5365,18 @@ export default abstract class Pokemon extends Phaser.GameObjects.Container {
|
||||
);
|
||||
}
|
||||
|
||||
queueImmuneMessage(quiet: boolean, effect?: StatusEffect): void {
|
||||
if (!effect || quiet) {
|
||||
return;
|
||||
}
|
||||
const message = effect && this.status?.effect === effect
|
||||
? getStatusEffectOverlapText(effect ?? StatusEffect.NONE, getPokemonNameWithAffix(this))
|
||||
: i18next.t("abilityTriggers:moveImmunity", {
|
||||
pokemonNameWithAffix: getPokemonNameWithAffix(this),
|
||||
});
|
||||
globalScene.queueMessage(message);
|
||||
}
|
||||
|
||||
/**
|
||||
* Checks if a status effect can be applied to the Pokemon.
|
||||
*
|
||||
@ -5382,6 +5395,7 @@ export default abstract class Pokemon extends Phaser.GameObjects.Container {
|
||||
): boolean {
|
||||
if (effect !== StatusEffect.FAINT) {
|
||||
if (overrideStatus ? this.status?.effect === effect : this.status) {
|
||||
this.queueImmuneMessage(quiet, effect);
|
||||
return false;
|
||||
}
|
||||
if (
|
||||
@ -5389,18 +5403,11 @@ export default abstract class Pokemon extends Phaser.GameObjects.Container {
|
||||
!ignoreField &&
|
||||
globalScene.arena.terrain?.terrainType === TerrainType.MISTY
|
||||
) {
|
||||
this.queueImmuneMessage(quiet, effect);
|
||||
return false;
|
||||
}
|
||||
}
|
||||
|
||||
if (
|
||||
sourcePokemon &&
|
||||
sourcePokemon !== this &&
|
||||
this.isSafeguarded(sourcePokemon)
|
||||
) {
|
||||
return false;
|
||||
}
|
||||
|
||||
const types = this.getTypes(true, true);
|
||||
|
||||
switch (effect) {
|
||||
@ -5429,17 +5436,19 @@ export default abstract class Pokemon extends Phaser.GameObjects.Container {
|
||||
}
|
||||
}
|
||||
|
||||
return true;
|
||||
return true;
|
||||
});
|
||||
|
||||
if (this.isOfType(PokemonType.POISON) || this.isOfType(PokemonType.STEEL)) {
|
||||
if (poisonImmunity.includes(true)) {
|
||||
this.queueImmuneMessage(quiet, effect);
|
||||
return false;
|
||||
}
|
||||
}
|
||||
break;
|
||||
case StatusEffect.PARALYSIS:
|
||||
if (this.isOfType(PokemonType.ELECTRIC)) {
|
||||
this.queueImmuneMessage(quiet, effect);
|
||||
return false;
|
||||
}
|
||||
break;
|
||||
@ -5448,6 +5457,7 @@ export default abstract class Pokemon extends Phaser.GameObjects.Container {
|
||||
this.isGrounded() &&
|
||||
globalScene.arena.terrain?.terrainType === TerrainType.ELECTRIC
|
||||
) {
|
||||
this.queueImmuneMessage(quiet, effect);
|
||||
return false;
|
||||
}
|
||||
break;
|
||||
@ -5460,11 +5470,13 @@ export default abstract class Pokemon extends Phaser.GameObjects.Container {
|
||||
globalScene.arena.weather.weatherType,
|
||||
))
|
||||
) {
|
||||
this.queueImmuneMessage(quiet, effect);
|
||||
return false;
|
||||
}
|
||||
break;
|
||||
case StatusEffect.BURN:
|
||||
if (this.isOfType(PokemonType.FIRE)) {
|
||||
this.queueImmuneMessage(quiet, effect);
|
||||
return false;
|
||||
}
|
||||
break;
|
||||
@ -5499,6 +5511,19 @@ export default abstract class Pokemon extends Phaser.GameObjects.Container {
|
||||
return false;
|
||||
}
|
||||
|
||||
if (
|
||||
sourcePokemon &&
|
||||
sourcePokemon !== this &&
|
||||
this.isSafeguarded(sourcePokemon)
|
||||
) {
|
||||
if(!quiet){
|
||||
globalScene.queueMessage(
|
||||
i18next.t("moveTriggers:safeguard", { targetName: getPokemonNameWithAffix(this)
|
||||
}));
|
||||
}
|
||||
return false;
|
||||
}
|
||||
|
||||
return true;
|
||||
}
|
||||
|
||||
@ -5510,7 +5535,7 @@ export default abstract class Pokemon extends Phaser.GameObjects.Container {
|
||||
sourceText: string | null = null,
|
||||
overrideStatus?: boolean
|
||||
): boolean {
|
||||
if (!this.canSetStatus(effect, asPhase, overrideStatus, sourcePokemon)) {
|
||||
if (!this.canSetStatus(effect, false, overrideStatus, sourcePokemon)) {
|
||||
return false;
|
||||
}
|
||||
if (this.isFainted() && effect !== StatusEffect.FAINT) {
|
||||
|
Loading…
Reference in New Issue
Block a user