init
This commit is contained in:
32
Assets/TcgEngine/Scripts/Conditions/ConditionExhaust.cs
Normal file
32
Assets/TcgEngine/Scripts/Conditions/ConditionExhaust.cs
Normal file
@@ -0,0 +1,32 @@
|
||||
using System.Collections;
|
||||
using System.Collections.Generic;
|
||||
using UnityEngine;
|
||||
|
||||
namespace TcgEngine
|
||||
{
|
||||
/// <summary>
|
||||
/// Condition that check if the card is exhausted or not
|
||||
/// </summary>
|
||||
|
||||
[CreateAssetMenu(fileName = "condition", menuName = "TcgEngine/Condition/CardExhausted", order = 10)]
|
||||
public class ConditionExhaust : ConditionData
|
||||
{
|
||||
[Header("Target is exhausted")]
|
||||
public ConditionOperatorBool oper;
|
||||
|
||||
public override bool IsTargetConditionMet(Game data, AbilityData ability, Card caster, Card target)
|
||||
{
|
||||
return CompareBool(target.exhausted, oper);
|
||||
}
|
||||
|
||||
public override bool IsTargetConditionMet(Game data, AbilityData ability, Card caster, Player target)
|
||||
{
|
||||
return CompareBool(false, oper);
|
||||
}
|
||||
|
||||
public override bool IsTargetConditionMet(Game data, AbilityData ability, Card caster, Slot target)
|
||||
{
|
||||
return CompareBool(false, oper);
|
||||
}
|
||||
}
|
||||
}
|
||||
Reference in New Issue
Block a user