禁疗状态

This commit is contained in:
xianyi
2025-09-01 15:41:17 +08:00
parent 4adfba03f3
commit 6d40a8075f
9 changed files with 131 additions and 1 deletions

View File

@@ -33,6 +33,8 @@ namespace TcgEngine
Poisoned = 34, //Lose hp each start of turn
Sleep = 36, //Doesnt untap at the start of turn
Counterattack = 38, // 允许反击
NoTreatment = 39, // 禁疗
}
/// <summary>

View File

@@ -36,7 +36,9 @@ namespace TcgEngine
{
if (type == EffectStatType.Attack)
target.attack += ability.value;
if (type == EffectStatType.HP)
if (type == EffectStatType.HP)
if (target.HasStatus(StatusType.NoTreatment)) // 禁疗时不会增加hp
return;
target.hp += ability.value;
if (type == EffectStatType.Mana)
target.mana += ability.value;

View File

@@ -856,6 +856,9 @@ namespace TcgEngine.Gameplay
if (target.HasStatus(StatusType.Invincibility))
return;
if (target.HasStatus(StatusType.NoTreatment)) // 禁疗时不会治疗
return;
target.damage -= value;
target.damage = Mathf.Max(target.damage, 0);