mixedcards/Assets/Battle/Cards/CardCover.cs
2020-09-19 17:30:40 -04:00

20 lines
745 B
C#

using System.Collections;
using System.Collections.Generic;
using UnityEngine;
public class CardCover : BaseCard
{
public CardCover(BattleParticipant owner)
: base(owner, CardId.Cover, "Cover", 1, CardType.Skill,
"Block 3 damage on another target ally.") {
}
public override IEnumerator Use(IBattleEffectApplier effectApplier, BattlePlayerControls playerControls) {
SingleTargeting singleTargeting = new SingleTargeting(new OtherHeroTargetPolicy(this.owner));
yield return playerControls.StartCoroutine(playerControls.ChooseTarget(singleTargeting));
BattleParticipant target = singleTargeting.GetTarget();
Debug.Log("Covering " + target);
target.AddBlock(3);
}
}