Implement BattleEffects, add Thunderstorm
This commit is contained in:
parent
fc427bd276
commit
00448fe919
20 changed files with 215 additions and 18 deletions
|
|
@ -10,7 +10,7 @@ public class CardCover : BaseCard
|
|||
|
||||
}
|
||||
|
||||
public override IEnumerator Use(BattlePlayerControls playerControls) {
|
||||
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();
|
||||
|
|
|
|||
|
|
@ -9,7 +9,7 @@ public class CardCrashingPunch : BaseCard
|
|||
"Deals 3 damage to target.") {
|
||||
}
|
||||
|
||||
public override IEnumerator Use(BattlePlayerControls playerControls) {
|
||||
public override IEnumerator Use(IBattleEffectApplier effectApplier, BattlePlayerControls playerControls) {
|
||||
SingleTargeting singleTargeting = new SingleTargeting(new AnyTargetPolicy());
|
||||
yield return playerControls.StartCoroutine(playerControls.ChooseTarget(singleTargeting));
|
||||
BattleParticipant target = singleTargeting.GetTarget();
|
||||
|
|
|
|||
17
Assets/Battle/Cards/CardThunderstorm.cs
Normal file
17
Assets/Battle/Cards/CardThunderstorm.cs
Normal file
|
|
@ -0,0 +1,17 @@
|
|||
using System.Collections;
|
||||
using System.Collections.Generic;
|
||||
using UnityEngine;
|
||||
|
||||
public class CardThunderstorm : BaseCard
|
||||
{
|
||||
public CardThunderstorm(BattleParticipant owner)
|
||||
: base(owner, CardId.Thunderstorm, "Thunderstorm", 3, CardType.Enchantment,
|
||||
"Adds 1 energy.") {
|
||||
}
|
||||
|
||||
public override IEnumerator Use(IBattleEffectApplier effectApplier, BattlePlayerControls playerControls) {
|
||||
Debug.Log("A storm is brewing.");
|
||||
effectApplier.Apply(new IncreaseMaxEnergyEffect(1));
|
||||
yield break;
|
||||
}
|
||||
}
|
||||
11
Assets/Battle/Cards/CardThunderstorm.cs.meta
Normal file
11
Assets/Battle/Cards/CardThunderstorm.cs.meta
Normal file
|
|
@ -0,0 +1,11 @@
|
|||
fileFormatVersion: 2
|
||||
guid: 7effe1a2ba7096c49ac374b25ed92865
|
||||
MonoImporter:
|
||||
externalObjects: {}
|
||||
serializedVersion: 2
|
||||
defaultReferences: []
|
||||
executionOrder: 0
|
||||
icon: {instanceID: 0}
|
||||
userData:
|
||||
assetBundleName:
|
||||
assetBundleVariant:
|
||||
Loading…
Add table
Add a link
Reference in a new issue