mixedcards/Assets/Battle/CardsHeroes/LeadShotHCard.cs
2020-10-09 01:43:37 -04:00

21 lines
886 B
C#

using System.Collections;
using System.Collections.Generic;
using UnityEngine;
public class LeadShotHCard : HeroCard
{
public LeadShotHCard(BattleParticipant owner)
: base(owner, HCardId.LeadShot, "Lead Shot", 1, CardType.Attack,
"Deals 2 damage to another target.") {
}
public override IEnumerator Use(IBattleEffectApplier effectApplier,
MonsterViewpoint viewpoint, BattlePlayerControls playerControls) {
SingleTargeting singleTargeting = new SingleTargeting(new OtherTargetPolicy(this.owner));
yield return playerControls.StartCoroutine(playerControls.ChooseTarget(singleTargeting));
yield return new WaitForSeconds(0.4f);
BattleParticipant target = singleTargeting.GetTarget();
effectApplier.Apply(new DealDamageEffect(Owner, target, 2));
yield return new WaitForSeconds(0.8f);
}
}