init
This commit is contained in:
20
Assets/TcgEngine/Scripts/Effects/EffectDestroy.cs
Normal file
20
Assets/TcgEngine/Scripts/Effects/EffectDestroy.cs
Normal file
@@ -0,0 +1,20 @@
|
||||
using System.Collections;
|
||||
using System.Collections.Generic;
|
||||
using UnityEngine;
|
||||
using TcgEngine.Gameplay;
|
||||
|
||||
namespace TcgEngine
|
||||
{
|
||||
[CreateAssetMenu(fileName = "effect", menuName = "TcgEngine/Effect/Destroy", order = 10)]
|
||||
public class EffectDestroy : EffectData
|
||||
{
|
||||
public override void DoEffect(GameLogic logic, AbilityData ability, Card caster, Card target)
|
||||
{
|
||||
if (logic.GameData.IsOnBoard(target))
|
||||
logic.KillCard(caster, target);
|
||||
else
|
||||
logic.DiscardCard(target);
|
||||
}
|
||||
|
||||
}
|
||||
}
|
||||
Reference in New Issue
Block a user