禁疗状态

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

@@ -0,0 +1,42 @@
%YAML 1.1
%TAG !u! tag:unity3d.com,2011:
--- !u!114 &11400000
MonoBehaviour:
m_ObjectHideFlags: 0
m_CorrespondingSourceObject: {fileID: 0}
m_PrefabInstance: {fileID: 0}
m_PrefabAsset: {fileID: 0}
m_GameObject: {fileID: 0}
m_Enabled: 1
m_EditorHideFlags: 0
m_Script: {fileID: 11500000, guid: 8ce5f81e5cc37f547af6923758602c8c, type: 3}
m_Name: activate_damage_notreatment
m_EditorClassIdentifier:
id: activate_damage_notreatment
trigger: 5
conditions_trigger: []
target: 30
conditions_target:
- {fileID: 11400000, guid: ef09540f94d8428408b69fea46ec3334, type: 2}
- {fileID: 11400000, guid: 47221d412dc0a014b8a33abb0cbfc773, type: 2}
- {fileID: 11400000, guid: a1fb3a7171663234280fdfb41c99ab0a, type: 2}
filters_target: []
effects:
- {fileID: 11400000, guid: 4369324687c62ca488c57afd73a2be36, type: 2}
status: []
value: 2
duration: 0
chain_abilities:
- {fileID: 11400000}
mana_cost: 3
exhaust: 0
board_fx: {fileID: 0}
caster_fx: {fileID: 0}
target_fx: {fileID: 9125387663047351618, guid: b66600b51774daa49964ead5c6a00c49,
type: 3}
projectile_fx: {fileID: 0}
cast_audio: {fileID: 0}
target_audio: {fileID: 0}
charge_target: 0
title: "\u4F24\u5BB3+\u7981\u7597"
desc: "\u9020\u62102\u70B9\u4F24\u5BB3\u3002"

View File

@@ -0,0 +1,8 @@
fileFormatVersion: 2
guid: 2f41339738bf94e3bb86a85423f6cd44
NativeFormatImporter:
externalObjects: {}
mainObjectFileID: 11400000
userData:
assetBundleName:
assetBundleVariant:

View File

@@ -0,0 +1,37 @@
%YAML 1.1
%TAG !u! tag:unity3d.com,2011:
--- !u!114 &11400000
MonoBehaviour:
m_ObjectHideFlags: 0
m_CorrespondingSourceObject: {fileID: 0}
m_PrefabInstance: {fileID: 0}
m_PrefabAsset: {fileID: 0}
m_GameObject: {fileID: 0}
m_Enabled: 1
m_EditorHideFlags: 0
m_Script: {fileID: 11500000, guid: 8ce5f81e5cc37f547af6923758602c8c, type: 3}
m_Name: notreatment
m_EditorClassIdentifier:
id: notreatment
trigger: 0
conditions_trigger: []
target: 72
conditions_target: []
filters_target: []
effects: []
status:
- {fileID: 11400000, guid: 6ed88dbafd8814aa89ec79d6c6a6087c, type: 2}
value: 0
duration: 2
chain_abilities: []
mana_cost: 0
exhaust: 0
board_fx: {fileID: 0}
caster_fx: {fileID: 0}
target_fx: {fileID: 0}
projectile_fx: {fileID: 0}
cast_audio: {fileID: 0}
target_audio: {fileID: 0}
charge_target: 0
title: "\u4E24\u56DE\u5408\u7981\u7597"
desc: "\u4E24\u56DE\u5408\u7981\u7597"

View File

@@ -0,0 +1,8 @@
fileFormatVersion: 2
guid: 3fdf35a57c8d9478dbd36a8c2c83857e
NativeFormatImporter:
externalObjects: {}
mainObjectFileID: 11400000
userData:
assetBundleName:
assetBundleVariant:

View File

@@ -0,0 +1,20 @@
%YAML 1.1
%TAG !u! tag:unity3d.com,2011:
--- !u!114 &11400000
MonoBehaviour:
m_ObjectHideFlags: 0
m_CorrespondingSourceObject: {fileID: 0}
m_PrefabInstance: {fileID: 0}
m_PrefabAsset: {fileID: 0}
m_GameObject: {fileID: 0}
m_Enabled: 1
m_EditorHideFlags: 0
m_Script: {fileID: 11500000, guid: 7edf116efdfa73646a6de43812f81a4a, type: 3}
m_Name: notreatment
m_EditorClassIdentifier:
effect: 39
title: Notreatment
icon: {fileID: 0}
desc: "\u8FDB\u6599"
status_fx: {fileID: 0}
hvalue: 1

View File

@@ -0,0 +1,8 @@
fileFormatVersion: 2
guid: 6ed88dbafd8814aa89ec79d6c6a6087c
NativeFormatImporter:
externalObjects: {}
mainObjectFileID: 11400000
userData:
assetBundleName:
assetBundleVariant:

View File

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

View File

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

View File

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