mirror of
https://github.com/pagefaultgames/pokerogue.git
synced 2025-07-08 01:12:17 +02:00
Cherrypicks due to beta issues #3
This commit is contained in:
parent
2f586d92c3
commit
594cc432a2
@ -1299,6 +1299,8 @@ export class SacrificialAttrOnHit extends MoveEffectAttr {
|
||||
|
||||
user.damageAndUpdate(user.hp, HitResult.OTHER, false, true, true);
|
||||
user.turnData.damageTaken += user.hp;
|
||||
const attackResult = { move: move.id, result: HitResult.OTHER as DamageResult, damage: user.hp, critical: false, sourceId: user.id };
|
||||
user.turnData.attacksReceived.unshift(attackResult);
|
||||
|
||||
return true;
|
||||
}
|
||||
@ -1339,7 +1341,10 @@ export class HalfSacrificialAttr extends MoveEffectAttr {
|
||||
// Check to see if the Pokemon has an ability that blocks non-direct damage
|
||||
applyAbAttrs(BlockNonDirectDamageAbAttr, user, cancelled);
|
||||
if (!cancelled.value) {
|
||||
user.damageAndUpdate(Math.ceil(user.getMaxHp()/2), HitResult.OTHER, false, true, true);
|
||||
const damage = Math.ceil(user.getMaxHp()/2);
|
||||
user.damageAndUpdate(damage, HitResult.OTHER, false, true, true);
|
||||
const attackResult = { move: move.id, result: HitResult.OTHER as DamageResult, damage: damage, critical: false, sourceId: user.id };
|
||||
user.turnData.attacksReceived.unshift(attackResult);
|
||||
user.scene.queueMessage(i18next.t("moveTriggers:cutHpPowerUpMove", {pokemonName: getPokemonNameWithAffix(user)})); // Queue recoil message
|
||||
}
|
||||
return true;
|
||||
|
Loading…
Reference in New Issue
Block a user