Implement acquiring cards. Thunderstorm acquires Lightning Strikes.
This commit is contained in:
parent
60afd791dd
commit
1e8d3bb068
12 changed files with 121 additions and 5 deletions
|
|
@ -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();
|
||||
}
|
||||
}
|
||||
}
|
||||
|
|
|
|||
Loading…
Add table
Add a link
Reference in a new issue