Implement emotions
This commit is contained in:
parent
08c395cf51
commit
11df4f1164
25 changed files with 369 additions and 40 deletions
|
|
@ -47,10 +47,17 @@ public class HandPlayability<BaseCardT> where BaseCardT : BaseCard {
|
|||
private void UpdatePlayability() {
|
||||
this.playable.Clear();
|
||||
foreach (BaseCardT card in this.deck.GetHandPile()) {
|
||||
this.playable[card] =
|
||||
this.battleState.IsTeamsTurn(this.team)
|
||||
&& card.Owner.CanUseCard(card)
|
||||
&& this.energyPool.CanPayForCard(card);
|
||||
bool canPlay;
|
||||
if (card.Type == CardType.Emotion) {
|
||||
canPlay = this.battleState.CanPlayEmotion(this.team);
|
||||
} else {
|
||||
canPlay = this.energyPool.CanPayForCard(card);
|
||||
}
|
||||
canPlay = canPlay
|
||||
&& this.battleState.IsTeamsTurn(this.team)
|
||||
&& card.Owner.CanUseCard(card);
|
||||
|
||||
this.playable[card] = canPlay;
|
||||
}
|
||||
TriggerOnPlayabilityChanged();
|
||||
|
||||
|
|
|
|||
Loading…
Add table
Add a link
Reference in a new issue