public IEnumerator OnCardPlayed(CardPlayedRelicEffectParams relicEffectParams) { if (relicEffectParams.cardState.IsConsumeRemainingEnergyCostType()) { relicEffectParams.playerManager.AddEnergy(refund); } yield break; }
public IEnumerator OnCardPlayed(CardPlayedRelicEffectParams relicEffectParams) { if (relicEffectParams.cardState.GetCardType() == CardType.Spell) { if (relicEffectParams.cardState.GetDiscardEffectWhenPlayed(relicEffectParams.relicManager, null) == HandUI.DiscardEffect.Default) { cardsPlayed.Add(relicEffectParams.cardState); } } yield break; }
public IEnumerator OnCardPlayed(CardPlayedRelicEffectParams relicEffectParams) { var coroutine = RedrawCard(relicEffectParams.cardState, relicEffectParams.cardManager.GetHand().Count); // We cache this as soon as it's true and then flip it back once the effect has triggered if (_counter == 0) { _firstCard = true; } if (_firstCard && relicEffectParams.cardState.GetCardType() == CardType.Spell) { // Check for Consume cards played and omit them from both the effect and the "was this the first card played" tracking bool doesConsume = false; foreach (CardTraitState traitState in relicEffectParams.cardState.GetTraitStates()) { CardTraitExhaustState cardTraitExhaustState; if ((cardTraitExhaustState = traitState as CardTraitExhaustState) != null && cardTraitExhaustState.WillExhaustOnNextPlay(relicEffectParams.cardState, relicEffectParams.relicManager)) { doesConsume = true; } } if (!doesConsume) { if (relicEffectParams.cardState.GetDiscardEffectWhenPlayed(relicEffectParams.relicManager, null) == HandUI.DiscardEffect.Default) { _counter++; _firstCard = false; relicEffectParams.cardManager.StartCoroutine(coroutine); } } } yield break; }
public bool TestCardPlayed(CardPlayedRelicEffectParams relicEffectParams) { return(true); }