Split CardsHeroes and CardsMonsters
This commit is contained in:
parent
265c24ea1c
commit
be15f77a34
12 changed files with 9 additions and 1 deletions
19
Assets/Battle/CardsHeroes/CardCover.cs
Normal file
19
Assets/Battle/CardsHeroes/CardCover.cs
Normal file
|
|
@ -0,0 +1,19 @@
|
|||
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();
|
||||
effectApplier.Apply(new BlockEffect(target, 3));
|
||||
}
|
||||
}
|
||||
11
Assets/Battle/CardsHeroes/CardCover.cs.meta
Normal file
11
Assets/Battle/CardsHeroes/CardCover.cs.meta
Normal file
|
|
@ -0,0 +1,11 @@
|
|||
fileFormatVersion: 2
|
||||
guid: adec885589bc619409ad04df50ddd568
|
||||
MonoImporter:
|
||||
externalObjects: {}
|
||||
serializedVersion: 2
|
||||
defaultReferences: []
|
||||
executionOrder: 0
|
||||
icon: {instanceID: 0}
|
||||
userData:
|
||||
assetBundleName:
|
||||
assetBundleVariant:
|
||||
18
Assets/Battle/CardsHeroes/CardCrashingPunch.cs
Normal file
18
Assets/Battle/CardsHeroes/CardCrashingPunch.cs
Normal file
|
|
@ -0,0 +1,18 @@
|
|||
using System.Collections;
|
||||
using System.Collections.Generic;
|
||||
using UnityEngine;
|
||||
|
||||
public class CardCrashingPunch : BaseCard
|
||||
{
|
||||
public CardCrashingPunch(BattleParticipant owner)
|
||||
: base(owner, CardId.CrashingPunch, "Crashing Punch", 3, CardType.Attack,
|
||||
"Deals 3 damage to target.") {
|
||||
}
|
||||
|
||||
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();
|
||||
effectApplier.Apply(new DealDamageEffect(target, 3));
|
||||
}
|
||||
}
|
||||
11
Assets/Battle/CardsHeroes/CardCrashingPunch.cs.meta
Normal file
11
Assets/Battle/CardsHeroes/CardCrashingPunch.cs.meta
Normal file
|
|
@ -0,0 +1,11 @@
|
|||
fileFormatVersion: 2
|
||||
guid: ceb8168e4a1f0d24a91a86ec71f73a96
|
||||
MonoImporter:
|
||||
externalObjects: {}
|
||||
serializedVersion: 2
|
||||
defaultReferences: []
|
||||
executionOrder: 0
|
||||
icon: {instanceID: 0}
|
||||
userData:
|
||||
assetBundleName:
|
||||
assetBundleVariant:
|
||||
18
Assets/Battle/CardsHeroes/CardLightningStrike.cs
Normal file
18
Assets/Battle/CardsHeroes/CardLightningStrike.cs
Normal file
|
|
@ -0,0 +1,18 @@
|
|||
using System.Collections;
|
||||
using System.Collections.Generic;
|
||||
using UnityEngine;
|
||||
|
||||
public class CardLightningStrike : BaseCard
|
||||
{
|
||||
public CardLightningStrike(BattleParticipant owner)
|
||||
: base(owner, CardId.LightningStrike, "Lightning Strike", 2, CardType.Attack,
|
||||
"Deals 3 damage to target.") {
|
||||
}
|
||||
|
||||
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();
|
||||
effectApplier.Apply(new DealDamageEffect(target, 3));
|
||||
}
|
||||
}
|
||||
11
Assets/Battle/CardsHeroes/CardLightningStrike.cs.meta
Normal file
11
Assets/Battle/CardsHeroes/CardLightningStrike.cs.meta
Normal file
|
|
@ -0,0 +1,11 @@
|
|||
fileFormatVersion: 2
|
||||
guid: 11d435c247746fa4b91e5808379f51f8
|
||||
MonoImporter:
|
||||
externalObjects: {}
|
||||
serializedVersion: 2
|
||||
defaultReferences: []
|
||||
executionOrder: 0
|
||||
icon: {instanceID: 0}
|
||||
userData:
|
||||
assetBundleName:
|
||||
assetBundleVariant:
|
||||
29
Assets/Battle/CardsHeroes/CardScarring.cs
Normal file
29
Assets/Battle/CardsHeroes/CardScarring.cs
Normal file
|
|
@ -0,0 +1,29 @@
|
|||
using System.Collections;
|
||||
using System.Collections.Generic;
|
||||
using UnityEngine;
|
||||
|
||||
public class CardScarring : BaseCard
|
||||
{
|
||||
public CardScarring(BattleParticipant owner)
|
||||
: base(owner, CardId.Scarring, "Scarring", 2, CardType.Skill,
|
||||
"Block 4 damage. The next time damage is taken until next turn, gain 1 Max HP.") {
|
||||
}
|
||||
|
||||
public override IEnumerator Use(IBattleEffectApplier effectApplier, BattlePlayerControls playerControls) {
|
||||
effectApplier.Apply(new BlockEffect(this.owner, 4));
|
||||
// TODO: Trigger only until end of turn.
|
||||
DamageTrigger trigger = new DamageTrigger(
|
||||
new List<BattleParticipant>() {this.owner},
|
||||
this.NotifyDamageDealt,
|
||||
TriggerExpiration.StartOfNextHeroTurn,
|
||||
TriggerRepetition.Once);
|
||||
effectApplier.Apply(new ArmDamageTriggerEffect(trigger));
|
||||
yield break;
|
||||
}
|
||||
|
||||
public void NotifyDamageDealt(IBattleEffectApplier effectApplier) {
|
||||
Debug.Log("NotifyDamageDealt ");
|
||||
IncreaseMaxHPEffect effect = new IncreaseMaxHPEffect(this.owner, 1);
|
||||
effectApplier.Apply(effect);
|
||||
}
|
||||
}
|
||||
11
Assets/Battle/CardsHeroes/CardScarring.cs.meta
Normal file
11
Assets/Battle/CardsHeroes/CardScarring.cs.meta
Normal file
|
|
@ -0,0 +1,11 @@
|
|||
fileFormatVersion: 2
|
||||
guid: 6fe7304b59bb0af4281311fce96c1218
|
||||
MonoImporter:
|
||||
externalObjects: {}
|
||||
serializedVersion: 2
|
||||
defaultReferences: []
|
||||
executionOrder: 0
|
||||
icon: {instanceID: 0}
|
||||
userData:
|
||||
assetBundleName:
|
||||
assetBundleVariant:
|
||||
17
Assets/Battle/CardsHeroes/CardThunderstorm.cs
Normal file
17
Assets/Battle/CardsHeroes/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,
|
||||
"Add 1 max energy. Acquire 2 Lightning Strike into draw pile.") {
|
||||
}
|
||||
|
||||
public override IEnumerator Use(IBattleEffectApplier effectApplier, BattlePlayerControls playerControls) {
|
||||
effectApplier.Apply(new IncreaseMaxEnergyEffect(1));
|
||||
effectApplier.Apply(new AcquireCardsEffect(new CardId[] {CardId.LightningStrike, CardId.LightningStrike}, BattleZone.DrawPile, this.owner));
|
||||
yield break;
|
||||
}
|
||||
}
|
||||
11
Assets/Battle/CardsHeroes/CardThunderstorm.cs.meta
Normal file
11
Assets/Battle/CardsHeroes/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