mirror of
https://github.com/pagefaultgames/pokerogue.git
synced 2025-07-16 13:22:18 +02:00
Merge branch 'repel-implementation'
This commit is contained in:
commit
3fdf278672
@ -4,7 +4,7 @@ import { NextEncounterPhase, NewBiomeEncounterPhase, SelectBiomePhase, MessagePh
|
|||||||
import Pokemon, { PlayerPokemon, EnemyPokemon } from './field/pokemon';
|
import Pokemon, { PlayerPokemon, EnemyPokemon } from './field/pokemon';
|
||||||
import PokemonSpecies, { PokemonSpeciesFilter, allSpecies, getPokemonSpecies, initSpecies, speciesStarters } from './data/pokemon-species';
|
import PokemonSpecies, { PokemonSpeciesFilter, allSpecies, getPokemonSpecies, initSpecies, speciesStarters } from './data/pokemon-species';
|
||||||
import * as Utils from './utils';
|
import * as Utils from './utils';
|
||||||
import { Modifier, ModifierBar, ConsumablePokemonModifier, ConsumableModifier, PokemonHpRestoreModifier, HealingBoosterModifier, PersistentModifier, PokemonHeldItemModifier, ModifierPredicate, DoubleBattleChanceBoosterModifier, FusePokemonModifier, PokemonFormChangeItemModifier, TerastallizeModifier, overrideModifiers, overrideHeldItems } from './modifier/modifier';
|
import { Modifier, ModifierBar, ConsumablePokemonModifier, ConsumableModifier, PokemonHpRestoreModifier, HealingBoosterModifier, PersistentModifier, PokemonHeldItemModifier, ModifierPredicate, DoubleBattleChanceBoosterModifier, FusePokemonModifier, PokemonFormChangeItemModifier, TerastallizeModifier, overrideModifiers, overrideHeldItems, DoubleBattlePreventionModifierType } from './modifier/modifier';
|
||||||
import { PokeballType } from './data/pokeball';
|
import { PokeballType } from './data/pokeball';
|
||||||
import { initCommonAnims, initMoveAnim, loadCommonAnimAssets, loadMoveAnimAssets, populateAnims } from './data/battle-anims';
|
import { initCommonAnims, initMoveAnim, loadCommonAnimAssets, loadMoveAnimAssets, populateAnims } from './data/battle-anims';
|
||||||
import { Phase } from './phase';
|
import { Phase } from './phase';
|
||||||
@ -869,10 +869,15 @@ export default class BattleScene extends SceneBase {
|
|||||||
|
|
||||||
if (double === undefined && newWaveIndex > 1) {
|
if (double === undefined && newWaveIndex > 1) {
|
||||||
if (newBattleType === BattleType.WILD && !this.gameMode.isWaveFinal(newWaveIndex)) {
|
if (newBattleType === BattleType.WILD && !this.gameMode.isWaveFinal(newWaveIndex)) {
|
||||||
const doubleChance = new Utils.IntegerHolder(newWaveIndex % 10 === 0 ? 32 : 8);
|
// Check if Repel and prevent double battle
|
||||||
this.applyModifiers(DoubleBattleChanceBoosterModifier, true, doubleChance);
|
if (this.getModifiers(DoubleBattlePreventionModifierType, true).length > 0) {
|
||||||
playerField.forEach(p => applyAbAttrs(DoubleBattleChanceAbAttr, p, null, doubleChance));
|
newDouble = false;
|
||||||
newDouble = !Utils.randSeedInt(doubleChance.value);
|
} else {
|
||||||
|
const doubleChance = new Utils.IntegerHolder(newWaveIndex % 10 === 0 ? 32 : 8);
|
||||||
|
this.applyModifiers(DoubleBattleChanceBoosterModifier, true, doubleChance);
|
||||||
|
playerField.forEach(p => applyAbAttrs(DoubleBattleChanceAbAttr, p, null, doubleChance));
|
||||||
|
newDouble = !Utils.randSeedInt(doubleChance.value);
|
||||||
|
}
|
||||||
} else if (newBattleType === BattleType.TRAINER)
|
} else if (newBattleType === BattleType.TRAINER)
|
||||||
newDouble = newTrainer.variant === TrainerVariant.DOUBLE;
|
newDouble = newTrainer.variant === TrainerVariant.DOUBLE;
|
||||||
} else if (!battleConfig)
|
} else if (!battleConfig)
|
||||||
|
@ -51,6 +51,9 @@ export const modifierType: ModifierTypeTranslationEntries = {
|
|||||||
"DoubleBattleChanceBoosterModifierType": {
|
"DoubleBattleChanceBoosterModifierType": {
|
||||||
description: "Verdoppelt die Wahrscheinlichkeit, dass die nächsten {{battleCount}} Begegnungen mit wilden Pokémon ein Doppelkampf sind.",
|
description: "Verdoppelt die Wahrscheinlichkeit, dass die nächsten {{battleCount}} Begegnungen mit wilden Pokémon ein Doppelkampf sind.",
|
||||||
},
|
},
|
||||||
|
"DoubleBattlePreventionModifierType": {
|
||||||
|
description: "Erschweren Sie die Teilnahme an zwei Schlachten pro {{battleCount}} Schlacht",
|
||||||
|
},
|
||||||
"TempBattleStatBoosterModifierType": {
|
"TempBattleStatBoosterModifierType": {
|
||||||
description: "Erhöht die {{tempBattleStatName}} aller Teammitglieder für 5 Kämpfe um eine Stufe",
|
description: "Erhöht die {{tempBattleStatName}} aller Teammitglieder für 5 Kämpfe um eine Stufe",
|
||||||
},
|
},
|
||||||
@ -162,6 +165,10 @@ export const modifierType: ModifierTypeTranslationEntries = {
|
|||||||
"SUPER_LURE": { name: "Super-Lockparfüm" },
|
"SUPER_LURE": { name: "Super-Lockparfüm" },
|
||||||
"MAX_LURE": { name: "Top-Lockparfüm" },
|
"MAX_LURE": { name: "Top-Lockparfüm" },
|
||||||
|
|
||||||
|
"REPEL": { name: "Schutz" },
|
||||||
|
"SUPER_REPEL": { name: "Superschutz" },
|
||||||
|
"MAX_REPEL": { name: "Top-Schutz" },
|
||||||
|
|
||||||
"MEMORY_MUSHROOM": { name: "Erinnerungspilz", description: "Lässt ein Pokémon eine vergessene Attacke wiedererlernen" },
|
"MEMORY_MUSHROOM": { name: "Erinnerungspilz", description: "Lässt ein Pokémon eine vergessene Attacke wiedererlernen" },
|
||||||
|
|
||||||
"EXP_SHARE": { name: "EP-Teiler", description: "Pokémon, die nicht am Kampf teilgenommen haben, bekommen 20% der Erfahrungspunkte eines Kampfteilnehmers" },
|
"EXP_SHARE": { name: "EP-Teiler", description: "Pokémon, die nicht am Kampf teilgenommen haben, bekommen 20% der Erfahrungspunkte eines Kampfteilnehmers" },
|
||||||
|
@ -51,6 +51,9 @@ export const modifierType: ModifierTypeTranslationEntries = {
|
|||||||
"DoubleBattleChanceBoosterModifierType": {
|
"DoubleBattleChanceBoosterModifierType": {
|
||||||
description: "Doubles the chance of an encounter being a double battle for {{battleCount}} battles",
|
description: "Doubles the chance of an encounter being a double battle for {{battleCount}} battles",
|
||||||
},
|
},
|
||||||
|
"DoubleBattlePreventionModifierType": {
|
||||||
|
description: "Prevent double battles from appearing for {{battleCount}} battles",
|
||||||
|
},
|
||||||
"TempBattleStatBoosterModifierType": {
|
"TempBattleStatBoosterModifierType": {
|
||||||
description: "Increases the {{tempBattleStatName}} of all party members by 1 stage for 5 battles",
|
description: "Increases the {{tempBattleStatName}} of all party members by 1 stage for 5 battles",
|
||||||
},
|
},
|
||||||
@ -162,6 +165,10 @@ export const modifierType: ModifierTypeTranslationEntries = {
|
|||||||
"SUPER_LURE": { name: "Super Lure" },
|
"SUPER_LURE": { name: "Super Lure" },
|
||||||
"MAX_LURE": { name: "Max Lure" },
|
"MAX_LURE": { name: "Max Lure" },
|
||||||
|
|
||||||
|
"REPEL": { name: "Repel" },
|
||||||
|
"SUPER_REPEL": { name: "Super Repel" },
|
||||||
|
"MAX_REPEL": { name: "Max Repel" },
|
||||||
|
|
||||||
"MEMORY_MUSHROOM": { name: "Memory Mushroom", description: "Recall one Pokémon's forgotten move" },
|
"MEMORY_MUSHROOM": { name: "Memory Mushroom", description: "Recall one Pokémon's forgotten move" },
|
||||||
|
|
||||||
"EXP_SHARE": { name: "EXP. All", description: "Non-participants receive 20% of a single participant's EXP. Points" },
|
"EXP_SHARE": { name: "EXP. All", description: "Non-participants receive 20% of a single participant's EXP. Points" },
|
||||||
|
@ -51,6 +51,9 @@ export const modifierType: ModifierTypeTranslationEntries = {
|
|||||||
"DoubleBattleChanceBoosterModifierType": {
|
"DoubleBattleChanceBoosterModifierType": {
|
||||||
description: "Doubles the chance of an encounter being a double battle for {{battleCount}} battles",
|
description: "Doubles the chance of an encounter being a double battle for {{battleCount}} battles",
|
||||||
},
|
},
|
||||||
|
"DoubleBattlePreventionModifierType": {
|
||||||
|
description: "Evitar que aparezcan batallas dobles para {{battleCount}} batallas",
|
||||||
|
},
|
||||||
"TempBattleStatBoosterModifierType": {
|
"TempBattleStatBoosterModifierType": {
|
||||||
description: "Increases the {{tempBattleStatName}} of all party members by 1 stage for 5 battles",
|
description: "Increases the {{tempBattleStatName}} of all party members by 1 stage for 5 battles",
|
||||||
},
|
},
|
||||||
@ -162,6 +165,10 @@ export const modifierType: ModifierTypeTranslationEntries = {
|
|||||||
"SUPER_LURE": { name: "Super Lure" },
|
"SUPER_LURE": { name: "Super Lure" },
|
||||||
"MAX_LURE": { name: "Max Lure" },
|
"MAX_LURE": { name: "Max Lure" },
|
||||||
|
|
||||||
|
"REPEL": { name: "Repelente" },
|
||||||
|
"SUPER_REPEL": { name: "Superrepelente" },
|
||||||
|
"MAX_REPEL": { name: "Repelente Máximo" },
|
||||||
|
|
||||||
"MEMORY_MUSHROOM": { name: "Memory Mushroom", description: "Recall one Pokémon's forgotten move" },
|
"MEMORY_MUSHROOM": { name: "Memory Mushroom", description: "Recall one Pokémon's forgotten move" },
|
||||||
|
|
||||||
"EXP_SHARE": { name: "EXP. All", description: "Non-participants receive 20% of a single participant's EXP. Points" },
|
"EXP_SHARE": { name: "EXP. All", description: "Non-participants receive 20% of a single participant's EXP. Points" },
|
||||||
|
@ -51,6 +51,9 @@ export const modifierType: ModifierTypeTranslationEntries = {
|
|||||||
"DoubleBattleChanceBoosterModifierType": {
|
"DoubleBattleChanceBoosterModifierType": {
|
||||||
description: "Double les chances de tomber sur un combat double pendant {{battleCount}} combats",
|
description: "Double les chances de tomber sur un combat double pendant {{battleCount}} combats",
|
||||||
},
|
},
|
||||||
|
"DoubleBattlePreventionModifierType": {
|
||||||
|
description: "Empêcher l'apparition de doubles batailles pour {{battleCount}} batailles",
|
||||||
|
},
|
||||||
"TempBattleStatBoosterModifierType": {
|
"TempBattleStatBoosterModifierType": {
|
||||||
description: "Augmente d’1 cran {{tempBattleStatName}} pour toute l’équipe pendant 5 combats",
|
description: "Augmente d’1 cran {{tempBattleStatName}} pour toute l’équipe pendant 5 combats",
|
||||||
},
|
},
|
||||||
@ -162,6 +165,10 @@ export const modifierType: ModifierTypeTranslationEntries = {
|
|||||||
"SUPER_LURE": { name: "Super Parfum" },
|
"SUPER_LURE": { name: "Super Parfum" },
|
||||||
"MAX_LURE": { name: "Parfum Max" },
|
"MAX_LURE": { name: "Parfum Max" },
|
||||||
|
|
||||||
|
"REPEL": { name: "Repousse" },
|
||||||
|
"SUPER_REPEL": { name: "Super Repousse" },
|
||||||
|
"MAX_REPEL": { name: "Repousse Max" },
|
||||||
|
|
||||||
"MEMORY_MUSHROOM": { name: "Champi Mémoriel", description: "Remémore une capacité à un Pokémon" },
|
"MEMORY_MUSHROOM": { name: "Champi Mémoriel", description: "Remémore une capacité à un Pokémon" },
|
||||||
|
|
||||||
"EXP_SHARE": { name: "Multi Exp", description: "Tous les non-participants reçoivent 20% des Points d’Exp d’un participant" },
|
"EXP_SHARE": { name: "Multi Exp", description: "Tous les non-participants reçoivent 20% des Points d’Exp d’un participant" },
|
||||||
|
@ -51,6 +51,9 @@ export const modifierType: ModifierTypeTranslationEntries = {
|
|||||||
"DoubleBattleChanceBoosterModifierType": {
|
"DoubleBattleChanceBoosterModifierType": {
|
||||||
description: "Raddoppia la possibilità di imbattersi in doppie battaglie per {{battleCount}} battaglie",
|
description: "Raddoppia la possibilità di imbattersi in doppie battaglie per {{battleCount}} battaglie",
|
||||||
},
|
},
|
||||||
|
"DoubleBattlePreventionModifierType": {
|
||||||
|
description: "Impedisce di imbattersi in doppie battaglie per {{battleCount}} battaglie",
|
||||||
|
},
|
||||||
"TempBattleStatBoosterModifierType": {
|
"TempBattleStatBoosterModifierType": {
|
||||||
description: "Aumenta {{tempBattleStatName}} di un livello a tutti i Pokémon nel gruppo per 5 battaglie",
|
description: "Aumenta {{tempBattleStatName}} di un livello a tutti i Pokémon nel gruppo per 5 battaglie",
|
||||||
},
|
},
|
||||||
@ -162,6 +165,10 @@ export const modifierType: ModifierTypeTranslationEntries = {
|
|||||||
"SUPER_LURE": { name: "Profumo Invito Super" },
|
"SUPER_LURE": { name: "Profumo Invito Super" },
|
||||||
"MAX_LURE": { name: "Profumo Invito Max" },
|
"MAX_LURE": { name: "Profumo Invito Max" },
|
||||||
|
|
||||||
|
"REPEL": { name: "Repellente" },
|
||||||
|
"SUPER_REPEL": { name: "Superrepellente" },
|
||||||
|
"MAX_REPEL": { name: "Repellente max" },
|
||||||
|
|
||||||
"MEMORY_MUSHROOM": { name: "Fungo della Memoria", description: "Ricorda la mossa dimenticata di un Pokémon" },
|
"MEMORY_MUSHROOM": { name: "Fungo della Memoria", description: "Ricorda la mossa dimenticata di un Pokémon" },
|
||||||
|
|
||||||
"EXP_SHARE": { name: "Condividi Esperienza", description: "Tutti i Pokémon della squadra ricevono il 20% dei Punti Esperienza dalla lotta anche se non vi hanno partecipato" },
|
"EXP_SHARE": { name: "Condividi Esperienza", description: "Tutti i Pokémon della squadra ricevono il 20% dei Punti Esperienza dalla lotta anche se non vi hanno partecipato" },
|
||||||
|
@ -51,6 +51,9 @@ export const modifierType: ModifierTypeTranslationEntries = {
|
|||||||
"DoubleBattleChanceBoosterModifierType": {
|
"DoubleBattleChanceBoosterModifierType": {
|
||||||
description: "Dobra as chances de encontrar uma batalha em dupla por {{battleCount}} batalhas",
|
description: "Dobra as chances de encontrar uma batalha em dupla por {{battleCount}} batalhas",
|
||||||
},
|
},
|
||||||
|
"DoubleBattlePreventionModifierType": {
|
||||||
|
description: "Prevent double battles from appearing for {{battleCount}} battles",
|
||||||
|
},
|
||||||
"TempBattleStatBoosterModifierType": {
|
"TempBattleStatBoosterModifierType": {
|
||||||
description: "Aumenta o atributo de {{tempBattleStatName}} para todos os membros da equipe por 5 batalhas",
|
description: "Aumenta o atributo de {{tempBattleStatName}} para todos os membros da equipe por 5 batalhas",
|
||||||
},
|
},
|
||||||
@ -158,9 +161,13 @@ export const modifierType: ModifierTypeTranslationEntries = {
|
|||||||
"PP_UP": { name: "Mais PP" },
|
"PP_UP": { name: "Mais PP" },
|
||||||
"PP_MAX": { name: "PP Máximo" },
|
"PP_MAX": { name: "PP Máximo" },
|
||||||
|
|
||||||
"LURE": { name: "Incenso" },
|
"LURE": { name: "Lure" },
|
||||||
"SUPER_LURE": { name: "Super Incenso" },
|
"SUPER_LURE": { name: "Super Lure" },
|
||||||
"MAX_LURE": { name: "Incenso Máximo" },
|
"MAX_LURE": { name: "Max Lure" },
|
||||||
|
|
||||||
|
"REPEL": { name: "Repel" },
|
||||||
|
"SUPER_REPEL": { name: "Super Repel" },
|
||||||
|
"MAX_REPEL": { name: "Max Repel" },
|
||||||
|
|
||||||
"MEMORY_MUSHROOM": { name: "Cogumemória", description: "Relembra um movimento esquecido" },
|
"MEMORY_MUSHROOM": { name: "Cogumemória", description: "Relembra um movimento esquecido" },
|
||||||
|
|
||||||
|
@ -51,6 +51,9 @@ export const modifierType: ModifierTypeTranslationEntries = {
|
|||||||
"DoubleBattleChanceBoosterModifierType": {
|
"DoubleBattleChanceBoosterModifierType": {
|
||||||
description: "接下来的{{battleCount}}场战斗是双打的概率翻倍",
|
description: "接下来的{{battleCount}}场战斗是双打的概率翻倍",
|
||||||
},
|
},
|
||||||
|
"DoubleBattlePreventionModifierType": {
|
||||||
|
description: "防止 {{battleCount}} 场战斗出现双重战斗",
|
||||||
|
},
|
||||||
"TempBattleStatBoosterModifierType": {
|
"TempBattleStatBoosterModifierType": {
|
||||||
description: "为所有成员宝可梦提升一级{{tempBattleStatName}},持续5场战斗",
|
description: "为所有成员宝可梦提升一级{{tempBattleStatName}},持续5场战斗",
|
||||||
},
|
},
|
||||||
@ -159,8 +162,12 @@ export const modifierType: ModifierTypeTranslationEntries = {
|
|||||||
"PP_MAX": { name: "PP极限提升剂" },
|
"PP_MAX": { name: "PP极限提升剂" },
|
||||||
|
|
||||||
"LURE": { name: "引虫香水" },
|
"LURE": { name: "引虫香水" },
|
||||||
"SUPER_LURE": { name: "白银香水" },
|
"SUPER_LURE": { name: "白银喷雾" },
|
||||||
"MAX_LURE": { name: "黄金香水" },
|
"MAX_LURE": { name: "黄金喷雾" },
|
||||||
|
|
||||||
|
"REPEL": { name: "除虫喷雾" },
|
||||||
|
"SUPER_REPEL": { name: "Super Repel" },
|
||||||
|
"MAX_REPEL": { name: "Max Repel" },
|
||||||
|
|
||||||
"MEMORY_MUSHROOM": { name: "回忆蘑菇", description: "回忆一个宝可梦已经遗忘的招式" },
|
"MEMORY_MUSHROOM": { name: "回忆蘑菇", description: "回忆一个宝可梦已经遗忘的招式" },
|
||||||
|
|
||||||
|
@ -407,6 +407,20 @@ export class DoubleBattleChanceBoosterModifierType extends ModifierType {
|
|||||||
}
|
}
|
||||||
}
|
}
|
||||||
|
|
||||||
|
export class DoubleBattlePreventionModifierType extends ModifierType {
|
||||||
|
public battleCount: integer;
|
||||||
|
|
||||||
|
constructor(localeKey: string, iconImage: string, battleCount: integer) {
|
||||||
|
super(localeKey, iconImage, (_type, _args) => new Modifiers.DoubleBattlePreventionModifierType(this, this.battleCount), 'lure');
|
||||||
|
|
||||||
|
this.battleCount = battleCount;
|
||||||
|
}
|
||||||
|
|
||||||
|
getDescription(scene: BattleScene): string {
|
||||||
|
return i18next.t(`modifierType:ModifierType.DoubleBattlePreventionModifierType.description`, { battleCount: this.battleCount });
|
||||||
|
}
|
||||||
|
}
|
||||||
|
|
||||||
export class TempBattleStatBoosterModifierType extends ModifierType implements GeneratedPersistentModifierType {
|
export class TempBattleStatBoosterModifierType extends ModifierType implements GeneratedPersistentModifierType {
|
||||||
public tempBattleStat: TempBattleStat;
|
public tempBattleStat: TempBattleStat;
|
||||||
|
|
||||||
@ -1031,9 +1045,9 @@ export const modifierTypes = {
|
|||||||
PP_UP: () => new PokemonPpUpModifierType(`modifierType:ModifierType.PP_UP`, 'pp_up', 1),
|
PP_UP: () => new PokemonPpUpModifierType(`modifierType:ModifierType.PP_UP`, 'pp_up', 1),
|
||||||
PP_MAX: () => new PokemonPpUpModifierType(`modifierType:ModifierType.PP_MAX`, 'pp_max', 3),
|
PP_MAX: () => new PokemonPpUpModifierType(`modifierType:ModifierType.PP_MAX`, 'pp_max', 3),
|
||||||
|
|
||||||
/*REPEL: () => new DoubleBattleChanceBoosterModifierType('Repel', 5),
|
REPEL: () => new DoubleBattlePreventionModifierType('modifierType:ModifierType.REPEL', 'repel', 5),
|
||||||
SUPER_REPEL: () => new DoubleBattleChanceBoosterModifierType('Super Repel', 10),
|
SUPER_REPEL: () => new DoubleBattlePreventionModifierType('modifierType:ModifierType.SUPER_REPEL', 'super_repel', 10),
|
||||||
MAX_REPEL: () => new DoubleBattleChanceBoosterModifierType('Max Repel', 25),*/
|
MAX_REPEL: () => new DoubleBattlePreventionModifierType('modifierType:ModifierType.MAX_REPEL', 'max_repel', 25),
|
||||||
|
|
||||||
LURE: () => new DoubleBattleChanceBoosterModifierType(`modifierType:ModifierType.LURE`, 'lure', 5),
|
LURE: () => new DoubleBattleChanceBoosterModifierType(`modifierType:ModifierType.LURE`, 'lure', 5),
|
||||||
SUPER_LURE: () => new DoubleBattleChanceBoosterModifierType(`modifierType:ModifierType.SUPER_LURE`, 'super_lure', 10),
|
SUPER_LURE: () => new DoubleBattleChanceBoosterModifierType(`modifierType:ModifierType.SUPER_LURE`, 'super_lure', 10),
|
||||||
@ -1202,6 +1216,7 @@ const modifierPool: ModifierPool = {
|
|||||||
return thresholdPartyMemberCount;
|
return thresholdPartyMemberCount;
|
||||||
}, 3),
|
}, 3),
|
||||||
new WeightedModifierType(modifierTypes.LURE, 2),
|
new WeightedModifierType(modifierTypes.LURE, 2),
|
||||||
|
new WeightedModifierType(modifierTypes.REPEL, 2),
|
||||||
new WeightedModifierType(modifierTypes.TEMP_STAT_BOOSTER, 4),
|
new WeightedModifierType(modifierTypes.TEMP_STAT_BOOSTER, 4),
|
||||||
new WeightedModifierType(modifierTypes.BERRY, 2),
|
new WeightedModifierType(modifierTypes.BERRY, 2),
|
||||||
new WeightedModifierType(modifierTypes.TM_COMMON, 1),
|
new WeightedModifierType(modifierTypes.TM_COMMON, 1),
|
||||||
@ -1246,6 +1261,7 @@ const modifierPool: ModifierPool = {
|
|||||||
}, 3),
|
}, 3),
|
||||||
new WeightedModifierType(modifierTypes.DIRE_HIT, 4),
|
new WeightedModifierType(modifierTypes.DIRE_HIT, 4),
|
||||||
new WeightedModifierType(modifierTypes.SUPER_LURE, 4),
|
new WeightedModifierType(modifierTypes.SUPER_LURE, 4),
|
||||||
|
new WeightedModifierType(modifierTypes.SUPER_REPEL, 4),
|
||||||
new WeightedModifierType(modifierTypes.NUGGET, 5),
|
new WeightedModifierType(modifierTypes.NUGGET, 5),
|
||||||
new WeightedModifierType(modifierTypes.EVOLUTION_ITEM, (party: Pokemon[]) => {
|
new WeightedModifierType(modifierTypes.EVOLUTION_ITEM, (party: Pokemon[]) => {
|
||||||
return Math.min(Math.ceil(party[0].scene.currentBattle.waveIndex / 15), 8);
|
return Math.min(Math.ceil(party[0].scene.currentBattle.waveIndex / 15), 8);
|
||||||
@ -1265,6 +1281,7 @@ const modifierPool: ModifierPool = {
|
|||||||
[ModifierTier.ULTRA]: [
|
[ModifierTier.ULTRA]: [
|
||||||
new WeightedModifierType(modifierTypes.ULTRA_BALL, 24),
|
new WeightedModifierType(modifierTypes.ULTRA_BALL, 24),
|
||||||
new WeightedModifierType(modifierTypes.MAX_LURE, 4),
|
new WeightedModifierType(modifierTypes.MAX_LURE, 4),
|
||||||
|
new WeightedModifierType(modifierTypes.MAX_REPEL, 4),
|
||||||
new WeightedModifierType(modifierTypes.BIG_NUGGET, 12),
|
new WeightedModifierType(modifierTypes.BIG_NUGGET, 12),
|
||||||
new WeightedModifierType(modifierTypes.PP_UP, 9),
|
new WeightedModifierType(modifierTypes.PP_UP, 9),
|
||||||
new WeightedModifierType(modifierTypes.PP_MAX, 3),
|
new WeightedModifierType(modifierTypes.PP_MAX, 3),
|
||||||
|
@ -310,6 +310,33 @@ export class DoubleBattleChanceBoosterModifier extends LapsingPersistentModifier
|
|||||||
}
|
}
|
||||||
}
|
}
|
||||||
|
|
||||||
|
export class DoubleBattlePreventionModifierType extends LapsingPersistentModifier {
|
||||||
|
constructor(type: ModifierTypes.DoubleBattlePreventionModifierType, battlesLeft: integer, stackCount?: integer) {
|
||||||
|
super(type, battlesLeft, stackCount);
|
||||||
|
}
|
||||||
|
|
||||||
|
match(modifier: Modifier): boolean {
|
||||||
|
if (modifier instanceof DoubleBattlePreventionModifierType)
|
||||||
|
return (modifier as DoubleBattlePreventionModifierType).battlesLeft === this.battlesLeft;
|
||||||
|
return false;
|
||||||
|
}
|
||||||
|
|
||||||
|
clone(): DoubleBattlePreventionModifierType {
|
||||||
|
return new DoubleBattlePreventionModifierType(this.type as ModifierTypes.DoubleBattlePreventionModifierType, this.battlesLeft, this.stackCount);
|
||||||
|
}
|
||||||
|
|
||||||
|
getArgs(): any[] {
|
||||||
|
return [ this.battlesLeft ];
|
||||||
|
}
|
||||||
|
|
||||||
|
apply(args: any[]): boolean {
|
||||||
|
const doubleBattleChance = args[0] as Utils.NumberHolder;
|
||||||
|
doubleBattleChance.value = Math.ceil(doubleBattleChance.value / 2);
|
||||||
|
|
||||||
|
return true;
|
||||||
|
}
|
||||||
|
}
|
||||||
|
|
||||||
export class TempBattleStatBoosterModifier extends LapsingPersistentModifier {
|
export class TempBattleStatBoosterModifier extends LapsingPersistentModifier {
|
||||||
private tempBattleStat: TempBattleStat;
|
private tempBattleStat: TempBattleStat;
|
||||||
|
|
||||||
|
Loading…
Reference in New Issue
Block a user