mirror of
https://github.com/pagefaultgames/pokerogue.git
synced 2025-07-14 04:12:18 +02:00
Added changes from Discord thread
This commit is contained in:
parent
32c0d14a28
commit
e86e595278
@ -1320,17 +1320,15 @@ export class BypassSleepAttr extends MoveAttr {
|
|||||||
/**
|
/**
|
||||||
* Attribute used for moves that bypass the burn damage reduction of physical moves, currently only facade
|
* Attribute used for moves that bypass the burn damage reduction of physical moves, currently only facade
|
||||||
* Called during damage calculation
|
* Called during damage calculation
|
||||||
|
* @param user N/A
|
||||||
|
* @param target N/A
|
||||||
|
* @param move Move with this attribute
|
||||||
|
* @param args Utils.BooleanHolder for burnDamageReductionCancelled
|
||||||
|
* @returns true if the function succeeds
|
||||||
*/
|
*/
|
||||||
export class BypassBurnDamageReductionAttr extends MoveAttr {
|
export class BypassBurnDamageReductionAttr extends MoveAttr {
|
||||||
|
|
||||||
/**
|
/** Prevents the move's damage from being reduced by burn */
|
||||||
* Prevents the move's damage from being reduced by burn
|
|
||||||
* @param user N/A
|
|
||||||
* @param target N/A
|
|
||||||
* @param move Move with this attribute
|
|
||||||
* @param args Utils.BooleanHolder for burnDamageReductionCancelled
|
|
||||||
* @returns true if the function succeeds
|
|
||||||
*/
|
|
||||||
apply(user: Pokemon, target: Pokemon, move: Move, args: any[]): boolean {
|
apply(user: Pokemon, target: Pokemon, move: Move, args: any[]): boolean {
|
||||||
(args[0] as Utils.BooleanHolder).value = true;
|
(args[0] as Utils.BooleanHolder).value = true;
|
||||||
|
|
||||||
|
@ -1502,10 +1502,8 @@ export default abstract class Pokemon extends Phaser.GameObjects.Container {
|
|||||||
if (!isTypeImmune) {
|
if (!isTypeImmune) {
|
||||||
damage.value = Math.ceil(((((2 * source.level / 5 + 2) * power.value * sourceAtk.value / targetDef.value) / 50) + 2) * stabMultiplier.value * typeMultiplier.value * arenaAttackTypeMultiplier.value * screenMultiplier.value * ((this.scene.randBattleSeedInt(15) + 85) / 100) * criticalMultiplier.value);
|
damage.value = Math.ceil(((((2 * source.level / 5 + 2) * power.value * sourceAtk.value / targetDef.value) / 50) + 2) * stabMultiplier.value * typeMultiplier.value * arenaAttackTypeMultiplier.value * screenMultiplier.value * ((this.scene.randBattleSeedInt(15) + 85) / 100) * criticalMultiplier.value);
|
||||||
if (isPhysical && source.status && source.status.effect === StatusEffect.BURN) {
|
if (isPhysical && source.status && source.status.effect === StatusEffect.BURN) {
|
||||||
const burnDamageReductionCancelled = new Utils.BooleanHolder(false);
|
if(!move.getAttrs(BypassBurnDamageReductionAttr).length) {
|
||||||
applyMoveAttrs(BypassBurnDamageReductionAttr, source, this, move, burnDamageReductionCancelled);
|
const burnDamageReductionCancelled = new Utils.BooleanHolder(false);
|
||||||
|
|
||||||
if(!burnDamageReductionCancelled.value){
|
|
||||||
applyAbAttrs(BypassBurnDamageReductionAbAttr, source, burnDamageReductionCancelled);
|
applyAbAttrs(BypassBurnDamageReductionAbAttr, source, burnDamageReductionCancelled);
|
||||||
if (!burnDamageReductionCancelled.value)
|
if (!burnDamageReductionCancelled.value)
|
||||||
damage.value = Math.floor(damage.value / 2);
|
damage.value = Math.floor(damage.value / 2);
|
||||||
|
Loading…
Reference in New Issue
Block a user