mirror of
https://github.com/pagefaultgames/pokerogue.git
synced 2025-07-15 21:02:18 +02:00
Added immune to the HitResult enum
This commit is contained in:
parent
fc9ed76c36
commit
9c03a9a12e
@ -1366,7 +1366,7 @@ export default abstract class Pokemon extends Phaser.GameObjects.Container {
|
|||||||
|
|
||||||
if (!result) {
|
if (!result) {
|
||||||
if (!typeMultiplier.value)
|
if (!typeMultiplier.value)
|
||||||
result = move.id == Moves.SHEER_COLD ? HitResult.FAIL : HitResult.NO_EFFECT;
|
result = move.id == Moves.SHEER_COLD ? HitResult.IMMUNE : HitResult.NO_EFFECT;
|
||||||
else {
|
else {
|
||||||
const oneHitKo = new Utils.BooleanHolder(false);
|
const oneHitKo = new Utils.BooleanHolder(false);
|
||||||
applyMoveAttrs(OneHitKOAttr, source, this, move, oneHitKo);
|
applyMoveAttrs(OneHitKOAttr, source, this, move, oneHitKo);
|
||||||
@ -1434,7 +1434,7 @@ export default abstract class Pokemon extends Phaser.GameObjects.Container {
|
|||||||
case HitResult.NO_EFFECT:
|
case HitResult.NO_EFFECT:
|
||||||
this.scene.queueMessage(`It doesn\'t affect ${this.name}!`);
|
this.scene.queueMessage(`It doesn\'t affect ${this.name}!`);
|
||||||
break;
|
break;
|
||||||
case HitResult.FAIL:
|
case HitResult.IMMUNE:
|
||||||
this.scene.queueMessage(`${this.name} is unaffected!`);
|
this.scene.queueMessage(`${this.name} is unaffected!`);
|
||||||
break;
|
break;
|
||||||
case HitResult.ONE_HIT_KO:
|
case HitResult.ONE_HIT_KO:
|
||||||
@ -3027,7 +3027,8 @@ export enum HitResult {
|
|||||||
HEAL,
|
HEAL,
|
||||||
FAIL,
|
FAIL,
|
||||||
MISS,
|
MISS,
|
||||||
OTHER
|
OTHER,
|
||||||
|
IMMUNE
|
||||||
}
|
}
|
||||||
|
|
||||||
export type DamageResult = HitResult.EFFECTIVE | HitResult.SUPER_EFFECTIVE | HitResult.NOT_VERY_EFFECTIVE | HitResult.ONE_HIT_KO | HitResult.OTHER;
|
export type DamageResult = HitResult.EFFECTIVE | HitResult.SUPER_EFFECTIVE | HitResult.NOT_VERY_EFFECTIVE | HitResult.ONE_HIT_KO | HitResult.OTHER;
|
||||||
|
Loading…
Reference in New Issue
Block a user