Merge b08b2f836f
into 8d11313458
This commit is contained in:
commit
e5b789a89a
|
@ -667,6 +667,7 @@ export class ConfusedTag extends BattlerTag {
|
|||
globalScene.queueMessage(i18next.t("battlerTags:confusedLapseHurtItself"));
|
||||
pokemon.damageAndUpdate(damage);
|
||||
pokemon.battleData.hitCount++;
|
||||
pokemon.battleData.confHitCount++;
|
||||
(globalScene.getCurrentPhase() as MovePhase).cancel();
|
||||
}
|
||||
}
|
||||
|
|
|
@ -4010,13 +4010,13 @@ export class RageFistPowerAttr extends VariablePowerAttr {
|
|||
}
|
||||
|
||||
/**
|
||||
* Updates the number of hits the Pokemon has taken in battle
|
||||
* Updates the number of hits the Pokemon has taken in battle not including self inflicted hits due to confusion
|
||||
* @param user Pokemon calling Rage Fist
|
||||
* @param hitCount The number of received hits this battle
|
||||
* @param previousHitCount The number of received hits this battle since last time Rage Fist was used
|
||||
*/
|
||||
protected updateHitReceivedCount(user: Pokemon, hitCount: number, previousHitCount: number): void {
|
||||
user.customPokemonData.hitsRecCount += (hitCount - previousHitCount);
|
||||
user.customPokemonData.hitsRecCount += ((hitCount - user.battleData.confHitCount) - previousHitCount);
|
||||
user.battleData.prevHitCount = hitCount;
|
||||
}
|
||||
}
|
||||
|
|
|
@ -5323,6 +5323,8 @@ export class PokemonBattleData {
|
|||
public hitCount: number = 0;
|
||||
/** used for {@linkcode Moves.RAGE_FIST} in order to save hit Counts received before Rage Fist is applied */
|
||||
public prevHitCount: number = 0;
|
||||
/** used to count the hitCount of self-hits due to confusion */
|
||||
public confHitCount: number = 0;
|
||||
public endured: boolean = false;
|
||||
public berriesEaten: BerryType[] = [];
|
||||
public abilitiesApplied: Abilities[] = [];
|
||||
|
|
Loading…
Reference in New Issue