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);
|
||||
}
|
||||
}
|
||||
11
Assets/Battle/CardsHeroes/LeadShotHCard.cs.meta
Normal file
11
Assets/Battle/CardsHeroes/LeadShotHCard.cs.meta
Normal file
|
|
@ -0,0 +1,11 @@
|
|||
fileFormatVersion: 2
|
||||
guid: db51b7fb04f794544b0cacc7555e0cce
|
||||
MonoImporter:
|
||||
externalObjects: {}
|
||||
serializedVersion: 2
|
||||
defaultReferences: []
|
||||
executionOrder: 0
|
||||
icon: {instanceID: 0}
|
||||
userData:
|
||||
assetBundleName:
|
||||
assetBundleVariant:
|
||||
22
Assets/Battle/CardsHeroes/ShieldBlockHCard.cs
Normal file
22
Assets/Battle/CardsHeroes/ShieldBlockHCard.cs
Normal file
|
|
@ -0,0 +1,22 @@
|
|||
using System.Collections;
|
||||
using System.Collections.Generic;
|
||||
using UnityEngine;
|
||||
|
||||
public class ShieldBlockHCard : HeroCard
|
||||
{
|
||||
public ShieldBlockHCard(BattleParticipant owner)
|
||||
: base(owner, HCardId.ShieldBlock, "Shield Block", 1, CardType.Skill,
|
||||
"Block 2 damage on target ally.") {
|
||||
|
||||
}
|
||||
|
||||
public override IEnumerator Use(IBattleEffectApplier effectApplier,
|
||||
MonsterViewpoint viewpoint, BattlePlayerControls playerControls) {
|
||||
SingleTargeting singleTargeting = new SingleTargeting(new AnyHeroTargetPolicy());
|
||||
yield return playerControls.StartCoroutine(playerControls.ChooseTarget(singleTargeting));
|
||||
yield return new WaitForSeconds(0.8f);
|
||||
BattleParticipant target = singleTargeting.GetTarget();
|
||||
effectApplier.Apply(new BlockEffect(target, 2));
|
||||
yield return new WaitForSeconds(0.8f);
|
||||
}
|
||||
}
|
||||
11
Assets/Battle/CardsHeroes/ShieldBlockHCard.cs.meta
Normal file
11
Assets/Battle/CardsHeroes/ShieldBlockHCard.cs.meta
Normal file
|
|
@ -0,0 +1,11 @@
|
|||
fileFormatVersion: 2
|
||||
guid: 79bfe10b9f0ac8d43b7c18cdc2896890
|
||||
MonoImporter:
|
||||
externalObjects: {}
|
||||
serializedVersion: 2
|
||||
defaultReferences: []
|
||||
executionOrder: 0
|
||||
icon: {instanceID: 0}
|
||||
userData:
|
||||
assetBundleName:
|
||||
assetBundleVariant:
|
||||
19
Assets/Battle/CardsHeroes/SmokeBombHCard.cs
Normal file
19
Assets/Battle/CardsHeroes/SmokeBombHCard.cs
Normal file
|
|
@ -0,0 +1,19 @@
|
|||
using System.Collections;
|
||||
using System.Collections.Generic;
|
||||
using UnityEngine;
|
||||
|
||||
public class SmokeBombHCard : HeroCard
|
||||
{
|
||||
public SmokeBombHCard(BattleParticipant owner)
|
||||
: base(owner, HCardId.SmokeBomb, "Smoke Bomb", 2, CardType.Skill,
|
||||
"Blocks 2 damage on all allies.") {
|
||||
|
||||
}
|
||||
|
||||
public override IEnumerator Use(IBattleEffectApplier effectApplier,
|
||||
MonsterViewpoint viewpoint, BattlePlayerControls playerControls) {
|
||||
yield return new WaitForSeconds(0.8f);
|
||||
effectApplier.Apply(new MassBlockEffect(TeamChoice.Heroes, 2));
|
||||
yield return new WaitForSeconds(0.8f);
|
||||
}
|
||||
}
|
||||
11
Assets/Battle/CardsHeroes/SmokeBombHCard.cs.meta
Normal file
11
Assets/Battle/CardsHeroes/SmokeBombHCard.cs.meta
Normal file
|
|
@ -0,0 +1,11 @@
|
|||
fileFormatVersion: 2
|
||||
guid: 3bc5acd796238f146b9f9b0dc483fb85
|
||||
MonoImporter:
|
||||
externalObjects: {}
|
||||
serializedVersion: 2
|
||||
defaultReferences: []
|
||||
executionOrder: 0
|
||||
icon: {instanceID: 0}
|
||||
userData:
|
||||
assetBundleName:
|
||||
assetBundleVariant:
|
||||
21
Assets/Battle/CardsHeroes/SwordSlashHCard.cs
Normal file
21
Assets/Battle/CardsHeroes/SwordSlashHCard.cs
Normal file
|
|
@ -0,0 +1,21 @@
|
|||
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.8f);
|
||||
BattleParticipant target = singleTargeting.GetTarget();
|
||||
effectApplier.Apply(new DealDamageEffect(target, 1));
|
||||
yield return new WaitForSeconds(0.8f);
|
||||
}
|
||||
}
|
||||
11
Assets/Battle/CardsHeroes/SwordSlashHCard.cs.meta
Normal file
11
Assets/Battle/CardsHeroes/SwordSlashHCard.cs.meta
Normal file
|
|
@ -0,0 +1,11 @@
|
|||
fileFormatVersion: 2
|
||||
guid: 463c0326672540c4082132cd46e9a6c3
|
||||
MonoImporter:
|
||||
externalObjects: {}
|
||||
serializedVersion: 2
|
||||
defaultReferences: []
|
||||
executionOrder: 0
|
||||
icon: {instanceID: 0}
|
||||
userData:
|
||||
assetBundleName:
|
||||
assetBundleVariant:
|
||||
Loading…
Add table
Add a link
Reference in a new issue