38 lines
1.2 KiB
C#
38 lines
1.2 KiB
C#
using System.Collections;
|
|
using System.Collections.Generic;
|
|
using UnityEngine;
|
|
|
|
namespace TcgEngine
|
|
{
|
|
/// <summary>
|
|
/// Checks if its your turn
|
|
/// </summary>
|
|
|
|
[CreateAssetMenu(fileName = "condition", menuName = "TcgEngine/Condition/RolledValue", order = 10)]
|
|
public class ConditionRolled : ConditionData
|
|
{
|
|
[Header("Value Rolled is")]
|
|
public ConditionOperatorInt oper;
|
|
public int value;
|
|
|
|
public override bool IsTriggerConditionMet(Game data, AbilityData ability, Card caster)
|
|
{
|
|
return CompareInt(data.rolled_value, oper, value);
|
|
}
|
|
|
|
public override bool IsTargetConditionMet(Game data, AbilityData ability, Card caster, Player target)
|
|
{
|
|
return CompareInt(data.rolled_value, oper, value);
|
|
}
|
|
|
|
public override bool IsTargetConditionMet(Game data, AbilityData ability, Card caster, Card target)
|
|
{
|
|
return CompareInt(data.rolled_value, oper, value);
|
|
}
|
|
|
|
public override bool IsTargetConditionMet(Game data, AbilityData ability, Card caster, Slot target)
|
|
{
|
|
return CompareInt(data.rolled_value, oper, value);
|
|
}
|
|
}
|
|
} |