mirror of
https://github.com/pagefaultgames/pokerogue.git
synced 2025-07-16 05:12:19 +02:00
Fixed apply method and French local for DoubleBattlePreventionModifierType
This commit is contained in:
parent
e5f05f5b96
commit
9e81fea365
@ -869,15 +869,11 @@ export default class BattleScene extends SceneBase {
|
||||
|
||||
if (double === undefined && newWaveIndex > 1) {
|
||||
if (newBattleType === BattleType.WILD && !this.gameMode.isWaveFinal(newWaveIndex)) {
|
||||
// Check if Repel and prevent double battle
|
||||
if (this.getModifiers(DoubleBattlePreventionModifierType, true).length > 0) {
|
||||
newDouble = false;
|
||||
} 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);
|
||||
}
|
||||
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);
|
||||
this.applyModifiers(DoubleBattlePreventionModifierType, true, newDouble);
|
||||
} else if (newBattleType === BattleType.TRAINER)
|
||||
newDouble = newTrainer.variant === TrainerVariant.DOUBLE;
|
||||
} else if (!battleConfig)
|
||||
|
@ -52,7 +52,7 @@ export const modifierType: ModifierTypeTranslationEntries = {
|
||||
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",
|
||||
description: "Empêche les combats doubles pendant {{battleCount}}",
|
||||
},
|
||||
"TempBattleStatBoosterModifierType": {
|
||||
description: "Augmente d’1 cran {{tempBattleStatName}} pour toute l’équipe pendant 5 combats",
|
||||
|
@ -330,8 +330,8 @@ export class DoubleBattlePreventionModifierType extends LapsingPersistentModifie
|
||||
}
|
||||
|
||||
apply(args: any[]): boolean {
|
||||
const doubleBattleChance = args[0] as Utils.NumberHolder;
|
||||
doubleBattleChance.value = Math.ceil(doubleBattleChance.value / 2);
|
||||
const newDouble = args[0] as Utils.BooleanHolder;
|
||||
newDouble.value = false;
|
||||
|
||||
return true;
|
||||
}
|
||||
|
Loading…
Reference in New Issue
Block a user