init
This commit is contained in:
38
Assets/TcgEngine/Scripts/Conditions/ConditionRolled.cs
Normal file
38
Assets/TcgEngine/Scripts/Conditions/ConditionRolled.cs
Normal file
@@ -0,0 +1,38 @@
|
||||
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);
|
||||
}
|
||||
}
|
||||
}
|
||||
Reference in New Issue
Block a user