21 lines
874 B
C#
21 lines
874 B
C#
using System.Collections;
|
|
using System.Collections.Generic;
|
|
using UnityEngine;
|
|
|
|
public class SwordSlashHCard : HeroCard
|
|
{
|
|
public SwordSlashHCard(BattleParticipant owner)
|
|
: base(owner, HCardId.SwordSlash, "Sword Slash", 1, CardType.Attack,
|
|
"Deals 1 damage to target.") {
|
|
}
|
|
|
|
public override IEnumerator Use(IBattleEffectApplier effectApplier,
|
|
MonsterViewpoint viewpoint, BattlePlayerControls playerControls) {
|
|
SingleTargeting singleTargeting = new SingleTargeting(new AnyTargetPolicy());
|
|
yield return playerControls.StartCoroutine(playerControls.ChooseTarget(singleTargeting));
|
|
yield return new WaitForSeconds(0.4f);
|
|
BattleParticipant target = singleTargeting.GetTarget();
|
|
effectApplier.Apply(new DealDamageEffect(Owner, target, 1));
|
|
yield return new WaitForSeconds(0.8f);
|
|
}
|
|
}
|