mirror of
https://github.com/pagefaultgames/pokerogue.git
synced 2025-07-11 10:52:17 +02:00
Fix randBattleSeedInt
prototype messing up damage-based tests
This commit is contained in:
parent
6c372b9a2d
commit
8ca8720f65
@ -2243,7 +2243,7 @@ export default abstract class Pokemon extends Phaser.GameObjects.Container {
|
|||||||
* This Pokemon's defensive stat for the given move's category.
|
* This Pokemon's defensive stat for the given move's category.
|
||||||
* Critical hits ignore positive stat stages.
|
* Critical hits ignore positive stat stages.
|
||||||
*/
|
*/
|
||||||
const targetDef = new Utils.IntegerHolder(this.getEffectiveStat(isPhysical ? Stat.DEF : Stat.SPDEF, source, move, ignoreAbility, ignoreSourceAbility, isCritical, simulated));
|
const targetDef = new Utils.NumberHolder(this.getEffectiveStat(isPhysical ? Stat.DEF : Stat.SPDEF, source, move, ignoreAbility, ignoreSourceAbility, isCritical, simulated));
|
||||||
applyMoveAttrs(VariableDefAttr, source, this, move, targetDef);
|
applyMoveAttrs(VariableDefAttr, source, this, move, targetDef);
|
||||||
|
|
||||||
/**
|
/**
|
||||||
@ -2296,9 +2296,7 @@ export default abstract class Pokemon extends Phaser.GameObjects.Container {
|
|||||||
applyAbAttrs(StabBoostAbAttr, source, null, simulated, stabMultiplier);
|
applyAbAttrs(StabBoostAbAttr, source, null, simulated, stabMultiplier);
|
||||||
}
|
}
|
||||||
|
|
||||||
if (sourceTeraType !== Type.UNKNOWN && matchesSourceType) {
|
stabMultiplier.value = Math.min(stabMultiplier.value, 2.25);
|
||||||
stabMultiplier.value = Math.min(stabMultiplier.value + 0.5, 2.25);
|
|
||||||
}
|
|
||||||
|
|
||||||
/** Halves damage if the attacker is using a physical attack while burned */
|
/** Halves damage if the attacker is using a physical attack while burned */
|
||||||
const burnMultiplier = new Utils.NumberHolder(1);
|
const burnMultiplier = new Utils.NumberHolder(1);
|
||||||
|
@ -73,7 +73,7 @@ export default class GameManager {
|
|||||||
constructor(phaserGame: Phaser.Game, bypassLogin: boolean = true) {
|
constructor(phaserGame: Phaser.Game, bypassLogin: boolean = true) {
|
||||||
localStorage.clear();
|
localStorage.clear();
|
||||||
ErrorInterceptor.getInstance().clear();
|
ErrorInterceptor.getInstance().clear();
|
||||||
BattleScene.prototype.randBattleSeedInt = (arg) => arg-1;
|
BattleScene.prototype.randBattleSeedInt = (range, min) => (min ?? 0) + range - 1;
|
||||||
this.gameWrapper = new GameWrapper(phaserGame, bypassLogin);
|
this.gameWrapper = new GameWrapper(phaserGame, bypassLogin);
|
||||||
this.scene = new BattleScene();
|
this.scene = new BattleScene();
|
||||||
this.phaseInterceptor = new PhaseInterceptor(this.scene);
|
this.phaseInterceptor = new PhaseInterceptor(this.scene);
|
||||||
|
Loading…
Reference in New Issue
Block a user