Implement acquiring cards. Thunderstorm acquires Lightning Strikes.

This commit is contained in:
henriquenakashima 2020-09-19 17:26:14 -04:00
parent 60afd791dd
commit 1e8d3bb068
12 changed files with 121 additions and 5 deletions

View file

@ -194,7 +194,24 @@ public class BattleController : MonoBehaviour, IBattleEffectApplier, IBattleEffe
}
// IBattleEffectResolver
public void IncreaseMaxEnergy(int delta) {
public void IncreaseHeroMaxEnergy(int delta) {
this.maxEnergy += delta;
}
public void AcquireHeroCards(CardId[] cardIds, BattleZone zone, BattleHero owner) {
foreach (CardId cardId in cardIds) {
BaseCard acquiredCard = CardDatabase.CreateCard(cardId, owner);
switch (zone) {
case BattleZone.DrawPile:
this.GetHeroDeck().PutCardOnTopOfDrawPile(acquiredCard);
break;
default:
throw new System.NotImplementedException();
}
}
if (zone == BattleZone.DrawPile) {
this.GetHeroDeck().ShuffleDrawPile();
}
}
}