测试三阵营

This commit is contained in:
xianyi
2025-08-11 14:09:21 +08:00
parent 6a7da24965
commit ca64c08f7e
17 changed files with 734 additions and 583 deletions

View File

@@ -36,6 +36,11 @@ namespace TcgEngine
public int attack;
public int hp;
// 新增:三种元素法力值
public int mana_fire;
public int mana_forest;
public int mana_water; 
[Header("Traits")]
public TraitData[] traits;
public TraitStat[] stats;
@@ -166,7 +171,23 @@ namespace TcgEngine
public bool IsDynamicManaCost()
{
return mana > 99;
// 检查通用法力值是否为动态消耗
if (mana > 99)
return true;
// 检查火系法力值是否为动态消耗
if (mana_fire > 99)
return true;
// 检查森林法力值是否为动态消耗
if (mana_forest > 99)
return true;
// 检查水系法力值是否为动态消耗
if (mana_water > 99)
return true;
return false;
}
public bool HasTrait(string trait)
@@ -181,7 +202,7 @@ namespace TcgEngine
public bool HasTrait(TraitData trait)
{
if(trait != null)
if (trait != null)
return HasTrait(trait.id);
return false;
}
@@ -201,7 +222,7 @@ namespace TcgEngine
public bool HasStat(TraitData trait)
{
if(trait != null)
if (trait != null)
return HasStat(trait.id);
return false;
}
@@ -221,7 +242,7 @@ namespace TcgEngine
public int GetStat(TraitData trait)
{
if(trait != null)
if (trait != null)
return GetStat(trait.id);
return 0;
}