[Balance] No more double 50x bosses in Endless + cleaning up RNG (#4862)
* Added double battle exclusion to Endless bosses. * Brought Endure token RNG in line with game RNG formatting. * Corrected incorrect modulo condition in isEndlessBoss * Moved new doubles conditional to be above overrides. * Fixed bad RNG calls for Covet and Thief too. * Updated unburden test. * Revert "Updated unburden test." This reverts commit01788d40c2
. * Revert "Fixed bad RNG calls for Covet and Thief too." This reverts commitc7fcfd195d
. --------- Co-authored-by: frutescens <info@laptop>
This commit is contained in:
parent
b1138c1d70
commit
6dec84e39c
|
@ -1233,6 +1233,11 @@ export default class BattleScene extends SceneBase {
|
|||
newDouble = !!double;
|
||||
}
|
||||
|
||||
// Disable double battles on Endless/Endless Spliced Wave 50x boss battles (Introduced 1.2.0)
|
||||
if (this.gameMode.isEndlessBoss(newWaveIndex)) {
|
||||
newDouble = false;
|
||||
}
|
||||
|
||||
if (!isNullOrUndefined(Overrides.BATTLE_TYPE_OVERRIDE)) {
|
||||
let doubleOverrideForWave: "single" | "double" | null = null;
|
||||
|
||||
|
|
|
@ -236,7 +236,7 @@ export class GameMode implements GameModeConfig {
|
|||
* @returns true if waveIndex is a multiple of 50 in Endless
|
||||
*/
|
||||
isEndlessBoss(waveIndex: integer): boolean {
|
||||
return !!(waveIndex % 50) &&
|
||||
return waveIndex % 50 === 0 &&
|
||||
(this.modeId === GameModes.ENDLESS || this.modeId === GameModes.SPLICED_ENDLESS);
|
||||
}
|
||||
|
||||
|
|
|
@ -3631,7 +3631,7 @@ export class EnemyEndureChanceModifier extends EnemyPersistentModifier {
|
|||
super(type, stackCount || 10);
|
||||
|
||||
//Hardcode temporarily
|
||||
this.chance = .02;
|
||||
this.chance = 2;
|
||||
}
|
||||
|
||||
match(modifier: Modifier) {
|
||||
|
@ -3639,11 +3639,11 @@ export class EnemyEndureChanceModifier extends EnemyPersistentModifier {
|
|||
}
|
||||
|
||||
clone() {
|
||||
return new EnemyEndureChanceModifier(this.type, this.chance * 100, this.stackCount);
|
||||
return new EnemyEndureChanceModifier(this.type, this.chance, this.stackCount);
|
||||
}
|
||||
|
||||
getArgs(): any[] {
|
||||
return [ this.chance * 100 ];
|
||||
return [ this.chance ];
|
||||
}
|
||||
|
||||
/**
|
||||
|
@ -3652,7 +3652,7 @@ export class EnemyEndureChanceModifier extends EnemyPersistentModifier {
|
|||
* @returns `true` if {@linkcode Pokemon} endured
|
||||
*/
|
||||
override apply(target: Pokemon): boolean {
|
||||
if (target.battleData.endured || Phaser.Math.RND.realInRange(0, 1) >= (this.chance * this.getStackCount())) {
|
||||
if (target.battleData.endured || target.randSeedInt(100) >= (this.chance * this.getStackCount())) {
|
||||
return false;
|
||||
}
|
||||
|
||||
|
|
Loading…
Reference in New Issue