mirror of
https://github.com/pagefaultgames/pokerogue.git
synced 2025-07-15 12:52:20 +02:00
Change Descriptions for New Behavior
This commit is contained in:
parent
5e640436a2
commit
6ad7fea68b
@ -47,10 +47,14 @@
|
|||||||
"description": "Changes a Pokémon's nature to {{natureName}} and permanently unlocks the nature for the starter."
|
"description": "Changes a Pokémon's nature to {{natureName}} and permanently unlocks the nature for the starter."
|
||||||
},
|
},
|
||||||
"DoubleBattleChanceBoosterModifierType": {
|
"DoubleBattleChanceBoosterModifierType": {
|
||||||
"description": "Doubles the chance of an encounter being a double battle for {{battleCount}} battles."
|
"description": "Quadruples the chance of an encounter being a double battle for up to {{battleCount}} battles."
|
||||||
},
|
},
|
||||||
"TempStatStageBoosterModifierType": {
|
"TempStatStageBoosterModifierType": {
|
||||||
"description": "Increases the {{stat}} of all party members by 1 stage for 5 battles."
|
"description": "Increases the {{stat}} of all party members by {{amount}} for up to 5 battles.",
|
||||||
|
"extra": {
|
||||||
|
"stage": "1 stage",
|
||||||
|
"percentage": "30%"
|
||||||
|
}
|
||||||
},
|
},
|
||||||
"AttackTypeBoosterModifierType": {
|
"AttackTypeBoosterModifierType": {
|
||||||
"description": "Increases the power of a Pokémon's {{moveType}}-type moves by 20%."
|
"description": "Increases the power of a Pokémon's {{moveType}}-type moves by 20%."
|
||||||
|
@ -434,38 +434,43 @@ export class RememberMoveModifierType extends PokemonModifierType {
|
|||||||
|
|
||||||
export class DoubleBattleChanceBoosterModifierType extends ModifierType {
|
export class DoubleBattleChanceBoosterModifierType extends ModifierType {
|
||||||
private maxBattles: number;
|
private maxBattles: number;
|
||||||
public battleCount: number;
|
|
||||||
|
|
||||||
constructor(localeKey: string, iconImage: string, maxBattles: number, battleCount?: number) {
|
constructor(localeKey: string, iconImage: string, maxBattles: number) {
|
||||||
super(localeKey, iconImage, (_type, _args) => new Modifiers.DoubleBattleChanceBoosterModifier(this, maxBattles), "lure");
|
super(localeKey, iconImage, (_type, _args) => new Modifiers.DoubleBattleChanceBoosterModifier(this, maxBattles), "lure");
|
||||||
|
|
||||||
this.maxBattles = maxBattles;
|
this.maxBattles = maxBattles;
|
||||||
this.battleCount = battleCount ?? this.maxBattles;
|
|
||||||
}
|
}
|
||||||
|
|
||||||
getDescription(_scene: BattleScene): string {
|
getDescription(_scene: BattleScene): string {
|
||||||
return i18next.t("modifierType:ModifierType.DoubleBattleChanceBoosterModifierType.description", { battleCount: this.battleCount });
|
return i18next.t("modifierType:ModifierType.DoubleBattleChanceBoosterModifierType.description", {
|
||||||
|
battleCount: this.maxBattles
|
||||||
|
});
|
||||||
}
|
}
|
||||||
}
|
}
|
||||||
|
|
||||||
export class TempStatStageBoosterModifierType extends ModifierType implements GeneratedPersistentModifierType {
|
export class TempStatStageBoosterModifierType extends ModifierType implements GeneratedPersistentModifierType {
|
||||||
private stat: TempBattleStat;
|
private stat: TempBattleStat;
|
||||||
private key: string;
|
private nameKey: string;
|
||||||
|
private quantityKey: string;
|
||||||
|
|
||||||
constructor(stat: TempBattleStat) {
|
constructor(stat: TempBattleStat) {
|
||||||
const key = TempStatStageBoosterModifierTypeGenerator.items[stat];
|
const nameKey = TempStatStageBoosterModifierTypeGenerator.items[stat];
|
||||||
super("", key, (_type, _args) => new Modifiers.TempStatStageBoosterModifier(this, this.stat, 5));
|
super("", nameKey, (_type, _args) => new Modifiers.TempStatStageBoosterModifier(this, this.stat, 5));
|
||||||
|
|
||||||
this.stat = stat;
|
this.stat = stat;
|
||||||
this.key = key;
|
this.nameKey = nameKey;
|
||||||
|
this.quantityKey = (stat !== Stat.ACC) ? "percentage" : "stage";
|
||||||
}
|
}
|
||||||
|
|
||||||
get name(): string {
|
get name(): string {
|
||||||
return i18next.t(`modifierType:TempStatStageBoosterItem.${this.key}`);
|
return i18next.t(`modifierType:TempStatStageBoosterItem.${this.nameKey}`);
|
||||||
}
|
}
|
||||||
|
|
||||||
getDescription(_scene: BattleScene): string {
|
getDescription(_scene: BattleScene): string {
|
||||||
return i18next.t("modifierType:ModifierType.TempStatStageBoosterModifierType.description", { stat: i18next.t(getStatKey(this.stat)) });
|
return i18next.t("modifierType:ModifierType.TempStatStageBoosterModifierType.description", {
|
||||||
|
stat: i18next.t(getStatKey(this.stat)),
|
||||||
|
amount: i18next.t(`modifierType:ModifierType.TempStatStageBoosterModifierType.extra.${this.quantityKey}`)
|
||||||
|
});
|
||||||
}
|
}
|
||||||
|
|
||||||
getPregenArgs(): any[] {
|
getPregenArgs(): any[] {
|
||||||
@ -1350,9 +1355,9 @@ export const modifierTypes = {
|
|||||||
SUPER_REPEL: () => new DoubleBattleChanceBoosterModifierType('Super Repel', 10),
|
SUPER_REPEL: () => new DoubleBattleChanceBoosterModifierType('Super Repel', 10),
|
||||||
MAX_REPEL: () => new DoubleBattleChanceBoosterModifierType('Max Repel', 25),*/
|
MAX_REPEL: () => new DoubleBattleChanceBoosterModifierType('Max Repel', 25),*/
|
||||||
|
|
||||||
LURE: () => new DoubleBattleChanceBoosterModifierType("modifierType:ModifierType.LURE", "lure", 5),
|
LURE: () => new DoubleBattleChanceBoosterModifierType("modifierType:ModifierType.LURE", "lure", 10),
|
||||||
SUPER_LURE: () => new DoubleBattleChanceBoosterModifierType("modifierType:ModifierType.SUPER_LURE", "super_lure", 10),
|
SUPER_LURE: () => new DoubleBattleChanceBoosterModifierType("modifierType:ModifierType.SUPER_LURE", "super_lure", 15),
|
||||||
MAX_LURE: () => new DoubleBattleChanceBoosterModifierType("modifierType:ModifierType.MAX_LURE", "max_lure", 25),
|
MAX_LURE: () => new DoubleBattleChanceBoosterModifierType("modifierType:ModifierType.MAX_LURE", "max_lure", 30),
|
||||||
|
|
||||||
SPECIES_STAT_BOOSTER: () => new SpeciesStatBoosterModifierTypeGenerator(),
|
SPECIES_STAT_BOOSTER: () => new SpeciesStatBoosterModifierTypeGenerator(),
|
||||||
|
|
||||||
@ -1360,7 +1365,10 @@ export const modifierTypes = {
|
|||||||
|
|
||||||
DIRE_HIT: () => new class extends ModifierType {
|
DIRE_HIT: () => new class extends ModifierType {
|
||||||
getDescription(_scene: BattleScene): string {
|
getDescription(_scene: BattleScene): string {
|
||||||
return i18next.t("modifierType:ModifierType.TempStatStageBoosterModifierType.description", { stat: i18next.t("modifierType:ModifierType.DIRE_HIT.extra.raises") });
|
return i18next.t("modifierType:ModifierType.TempStatStageBoosterModifierType.description", {
|
||||||
|
stat: i18next.t("modifierType:ModifierType.DIRE_HIT.extra.raises"),
|
||||||
|
amount: i18next.t("modifierType:ModifierType.TempStatStageBoosterModifierType.extra.stage")
|
||||||
|
});
|
||||||
}
|
}
|
||||||
}("modifierType:ModifierType.DIRE_HIT", "dire_hit", (type, _args) => new Modifiers.TempCritBoosterModifier(type, 5)),
|
}("modifierType:ModifierType.DIRE_HIT", "dire_hit", (type, _args) => new Modifiers.TempCritBoosterModifier(type, 5)),
|
||||||
|
|
||||||
|
@ -396,7 +396,7 @@ export class DoubleBattleChanceBoosterModifier extends LapsingPersistentModifier
|
|||||||
const doubleBattleChance = args[0] as Utils.NumberHolder;
|
const doubleBattleChance = args[0] as Utils.NumberHolder;
|
||||||
// This is divided because the chance is generated as a number from 0 to doubleBattleChance.value using Utils.randSeedInt
|
// This is divided because the chance is generated as a number from 0 to doubleBattleChance.value using Utils.randSeedInt
|
||||||
// A double battle will initiate if the generated number is 0
|
// A double battle will initiate if the generated number is 0
|
||||||
doubleBattleChance.value = Math.ceil(doubleBattleChance.value / 2);
|
doubleBattleChance.value = Math.ceil(doubleBattleChance.value / 4);
|
||||||
|
|
||||||
return true;
|
return true;
|
||||||
}
|
}
|
||||||
@ -419,10 +419,9 @@ export class TempStatStageBoosterModifier extends LapsingPersistentModifier {
|
|||||||
this.stat = stat;
|
this.stat = stat;
|
||||||
// Note that, because we want X Accuracy to maintain its original behavior,
|
// Note that, because we want X Accuracy to maintain its original behavior,
|
||||||
// it will increment as it did previously, directly to the stat stage.
|
// it will increment as it did previously, directly to the stat stage.
|
||||||
this.multiplierBoost = stat !== Stat.ACC ? 0.3 : 1;
|
this.multiplierBoost = (stat !== Stat.ACC) ? 0.3 : 1;
|
||||||
}
|
}
|
||||||
|
|
||||||
|
|
||||||
match(modifier: Modifier): boolean {
|
match(modifier: Modifier): boolean {
|
||||||
if (modifier instanceof TempStatStageBoosterModifier) {
|
if (modifier instanceof TempStatStageBoosterModifier) {
|
||||||
const modifierInstance = modifier as TempStatStageBoosterModifier;
|
const modifierInstance = modifier as TempStatStageBoosterModifier;
|
||||||
|
Loading…
Reference in New Issue
Block a user