mirror of
https://github.com/pagefaultgames/pokerogue.git
synced 2025-07-17 22:02:18 +02:00
Apply kev's suggestions from code review
Co-authored-by: NightKev <34855794+DayKev@users.noreply.github.com>
This commit is contained in:
parent
2cc01fc1fd
commit
97a8617114
@ -4175,10 +4175,6 @@ export default abstract class Pokemon extends Phaser.GameObjects.Container {
|
|||||||
stabMultiplier.value += 0.5;
|
stabMultiplier.value += 0.5;
|
||||||
}
|
}
|
||||||
|
|
||||||
if (!ignoreSourceAbility) {
|
|
||||||
applyAbAttrs(StabBoostAbAttr, source, null, simulated, stabMultiplier);
|
|
||||||
}
|
|
||||||
|
|
||||||
applyMoveAttrs(
|
applyMoveAttrs(
|
||||||
CombinedPledgeStabBoostAttr,
|
CombinedPledgeStabBoostAttr,
|
||||||
source,
|
source,
|
||||||
@ -4187,6 +4183,10 @@ export default abstract class Pokemon extends Phaser.GameObjects.Container {
|
|||||||
stabMultiplier,
|
stabMultiplier,
|
||||||
);
|
);
|
||||||
|
|
||||||
|
if (!ignoreSourceAbility) {
|
||||||
|
applyAbAttrs(StabBoostAbAttr, source, null, simulated, stabMultiplier);
|
||||||
|
}
|
||||||
|
|
||||||
if (
|
if (
|
||||||
source.isTerastallized &&
|
source.isTerastallized &&
|
||||||
sourceTeraType === moveType &&
|
sourceTeraType === moveType &&
|
||||||
@ -4201,11 +4201,7 @@ export default abstract class Pokemon extends Phaser.GameObjects.Container {
|
|||||||
(!source.stellarTypesBoosted.includes(moveType) ||
|
(!source.stellarTypesBoosted.includes(moveType) ||
|
||||||
source.hasSpecies(Species.TERAPAGOS))
|
source.hasSpecies(Species.TERAPAGOS))
|
||||||
) {
|
) {
|
||||||
if (matchesSourceType) {
|
stabMultiplier.value += matchesSourceType ? 0.5 : 0.2;
|
||||||
stabMultiplier.value += 0.5;
|
|
||||||
} else {
|
|
||||||
stabMultiplier.value += 0.2;
|
|
||||||
}
|
|
||||||
}
|
}
|
||||||
|
|
||||||
return Math.min(stabMultiplier.value, 2.25);
|
return Math.min(stabMultiplier.value, 2.25);
|
||||||
@ -4395,7 +4391,6 @@ export default abstract class Pokemon extends Phaser.GameObjects.Container {
|
|||||||
|
|
||||||
|
|
||||||
/** A damage multiplier for when the attack is of the attacker's type and/or Tera type. */
|
/** A damage multiplier for when the attack is of the attacker's type and/or Tera type. */
|
||||||
|
|
||||||
const stabMultiplier = this.calculateStabMultiplier(source, move, ignoreSourceAbility, simulated);
|
const stabMultiplier = this.calculateStabMultiplier(source, move, ignoreSourceAbility, simulated);
|
||||||
|
|
||||||
/** Halves damage if the attacker is using a physical attack while burned */
|
/** Halves damage if the attacker is using a physical attack while burned */
|
||||||
|
Loading…
Reference in New Issue
Block a user