Add guards and implement basic cards
This commit is contained in:
parent
30beb96397
commit
08c395cf51
32 changed files with 803 additions and 24 deletions
21
Assets/Battle/CardsHeroes/LeadShotHCard.cs
Normal file
21
Assets/Battle/CardsHeroes/LeadShotHCard.cs
Normal file
|
|
@ -0,0 +1,21 @@
|
|||
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.8f);
|
||||
BattleParticipant target = singleTargeting.GetTarget();
|
||||
effectApplier.Apply(new DealDamageEffect(target, 2));
|
||||
yield return new WaitForSeconds(0.8f);
|
||||
}
|
||||
}
|
||||
Loading…
Add table
Add a link
Reference in a new issue