Add guards and implement basic cards
This commit is contained in:
parent
30beb96397
commit
08c395cf51
32 changed files with 803 additions and 24 deletions
|
|
@ -41,24 +41,43 @@ public class BattleController : MonoBehaviour, IBattleEffectApplier, IBattleEffe
|
|||
|
||||
void Awake() {
|
||||
HeroId[] heroIds = new HeroId[3] {
|
||||
HeroId.Brute,
|
||||
HeroId.Alchemist,
|
||||
HeroId.Shaman,
|
||||
HeroId.NPCGuard,
|
||||
HeroId.NPCGuard,
|
||||
};
|
||||
|
||||
HCardId[] cardIds = new HCardId[10] {
|
||||
HCardId.CrashingPunch,
|
||||
HCardId.LightningHatchet,
|
||||
HCardId.BlindFury,
|
||||
HCardId.Cover,
|
||||
HCardId.Cover,
|
||||
HCardId.Thunderstorm,
|
||||
HCardId.Scarring,
|
||||
HCardId.Scarring,
|
||||
HCardId.Meditate,
|
||||
HCardId.IronskinDraught,
|
||||
HCardId.LeadShot,
|
||||
HCardId.LeadShot,
|
||||
HCardId.SmokeBomb,
|
||||
HCardId.SwordSlash,
|
||||
HCardId.SwordSlash,
|
||||
HCardId.SwordSlash,
|
||||
HCardId.ShieldBlock,
|
||||
HCardId.SwordSlash,
|
||||
HCardId.ShieldBlock,
|
||||
};
|
||||
|
||||
// HeroId[] heroIds = new HeroId[3] {
|
||||
// HeroId.Brute,
|
||||
// HeroId.Alchemist,
|
||||
// HeroId.Shaman,
|
||||
// };
|
||||
|
||||
// HCardId[] cardIds = new HCardId[10] {
|
||||
// HCardId.CrashingPunch,
|
||||
// HCardId.LightningHatchet,
|
||||
// HCardId.BlindFury,
|
||||
// HCardId.Cover,
|
||||
// HCardId.Cover,
|
||||
// HCardId.Thunderstorm,
|
||||
// HCardId.Scarring,
|
||||
// HCardId.Scarring,
|
||||
// HCardId.Meditate,
|
||||
// HCardId.IronskinDraught,
|
||||
// };
|
||||
|
||||
MonsterId[] monsterIds = new MonsterId[3] {
|
||||
MonsterId.Golem,
|
||||
MonsterId.Bat,
|
||||
|
|
@ -309,8 +328,8 @@ public class BattleController : MonoBehaviour, IBattleEffectApplier, IBattleEffe
|
|||
|
||||
public IEnumerator UseHeroCard(HeroCard card) {
|
||||
this.heroEnergy.PayForCard(card);
|
||||
yield return card.Use(this, this, battlePlayerControls);
|
||||
this.heroDeck.RemoveCardFromHand(card);
|
||||
yield return card.Use(this, this, battlePlayerControls);
|
||||
if (card.IsPermanent()) {
|
||||
this.playArea.AddPlayedHeroPermanent(card);
|
||||
} else {
|
||||
|
|
@ -324,8 +343,8 @@ public class BattleController : MonoBehaviour, IBattleEffectApplier, IBattleEffe
|
|||
|
||||
public IEnumerator UseMonsterCard(MonsterCard card) {
|
||||
this.monsterEnergy.PayForCard(card);
|
||||
yield return card.Use(this, this);
|
||||
this.monsterDeck.RemoveCardFromHand(card);
|
||||
yield return card.Use(this, this);
|
||||
if (card.IsPermanent()) {
|
||||
this.playArea.AddPlayedMonsterPermanent(card);
|
||||
} else {
|
||||
|
|
@ -510,6 +529,13 @@ public class BattleController : MonoBehaviour, IBattleEffectApplier, IBattleEffe
|
|||
effect.Target.AddBlock(effect.Amount);
|
||||
}
|
||||
|
||||
public void AddMassBlock(MassBlockEffect effect) {
|
||||
BattleParticipant[] affectedTeam = GetTeam(effect.Team);
|
||||
foreach (BattleParticipant bp in affectedTeam) {
|
||||
bp.AddBlock(effect.Amount);
|
||||
}
|
||||
}
|
||||
|
||||
public void AddStatus(StatusEffect effect) {
|
||||
if (effect.Target == null) return;
|
||||
effect.Target.AddStatus(effect.Status, effect.Amount);
|
||||
|
|
|
|||
Loading…
Add table
Add a link
Reference in a new issue