Enemies drop energy before, intentions are more accurate

This commit is contained in:
henriquenakashima 2020-10-01 22:52:50 -04:00
parent 94b3309bb7
commit 737a851283
6 changed files with 64 additions and 13 deletions

View file

@ -61,9 +61,10 @@ public class HandPlayability<BaseCardT> where BaseCardT : BaseCard {
foreach (BaseCardT card in this.deck.GetHandPile()) {
if (!card.Owner.CanUseCard(card)) {
this.playable[card] = PlayabilityState.Unplayable;
// Debug.Log("Playability of " + card.GetDisplayName() + " = Unplayable");
continue;
}
bool canPlayNow = this.battleState.IsTeamsTurn(this.team);
if (card.Type == CardType.Emotion) {
canPlayNow = canPlayNow && this.battleState.CanPlayEmotion(this.team);
@ -72,8 +73,10 @@ public class HandPlayability<BaseCardT> where BaseCardT : BaseCard {
}
if (canPlayNow) {
this.playable[card] = PlayabilityState.PlayableImmediately;
// Debug.Log("Playability of " + card.GetDisplayName() + " = PlayableImmediately");
} else {
this.playable[card] = PlayabilityState.PlayableInOwnTurn;
// Debug.Log("Playability of " + card.GetDisplayName() + " = PlayableInOwnTurn");
}
}
TriggerOnPlayabilityChanged();