测试三阵营
This commit is contained in:
@@ -31,6 +31,22 @@ namespace TcgEngine
|
||||
target.mana = Mathf.Max(target.mana, 0);
|
||||
target.mana_max = Mathf.Clamp(target.mana_max, 0, GameplayData.Get().mana_max);
|
||||
}
|
||||
|
||||
if (type == EffectStatType.ManaFire)
|
||||
target.mana_fire += data.rolled_value;
|
||||
target.mana_fire_max += data.rolled_value;
|
||||
target.mana_fire = Mathf.Max(target.mana_fire, 0);
|
||||
target.mana_fire_max = Mathf.Clamp(target.mana_fire_max, 0, GameplayData.Get().mana_max);
|
||||
if (type == EffectStatType.ManaForest)
|
||||
target.mana_forest += data.rolled_value;
|
||||
target.mana_forest_max += data.rolled_value;
|
||||
target.mana_forest = Mathf.Max(target.mana_forest, 0);
|
||||
target.mana_forest_max = Mathf.Clamp(target.mana_forest_max, 0, GameplayData.Get().mana_max);
|
||||
if (type == EffectStatType.ManaWater)
|
||||
target.mana_water += data.rolled_value;
|
||||
target.mana_water_max += data.rolled_value;
|
||||
target.mana_water = Mathf.Max(target.mana_water, 0);
|
||||
target.mana_water_max = Mathf.Clamp(target.mana_water_max, 0, GameplayData.Get().mana_max);
|
||||
}
|
||||
|
||||
public override void DoEffect(GameLogic logic, AbilityData ability, Card caster, Card target)
|
||||
@@ -43,6 +59,13 @@ namespace TcgEngine
|
||||
target.hp += data.rolled_value;
|
||||
if (type == EffectStatType.Mana)
|
||||
target.mana += data.rolled_value;
|
||||
|
||||
if (type == EffectStatType.ManaFire)
|
||||
target.mana_fire += data.rolled_value;
|
||||
if (type == EffectStatType.ManaForest)
|
||||
target.mana_forest += data.rolled_value;
|
||||
if (type == EffectStatType.ManaWater)
|
||||
target.mana_water += data.rolled_value;
|
||||
}
|
||||
}
|
||||
}
|
||||
Reference in New Issue
Block a user