Exemple #1
0
        public override IEnumerator ApplyEffect(CardEffectState cardEffectState, CardEffectParams cardEffectParams)
        {
            int energy = cardEffectParams.playerManager.GetEnergy();

            foreach (var target in cardEffectParams.targets)
            {
                NotifyHealthEffectTriggered(cardEffectParams.saveManager, cardEffectParams.popupNotificationManager, GetActivatedDescription(cardEffectState), target.GetCharacterUI());

                target.BuffDamage(cardEffectState.GetParamInt() * energy);
                yield return(target.BuffMaxHP(cardEffectState.GetAdditionalParamInt() * energy, false));
            }

            yield break;
        }
        public override IEnumerator ApplyEffect(
            CardEffectState cardEffectState,
            CardEffectParams cardEffectParams)
        {
            this.buffAmount = cardEffectParams.playerManager.GetEnergy() * cardEffectState.GetParamInt();

            cardEffectParams.playedCard.GetCardStateModifiers().IncrementAdditionalDamage(this.buffAmount);
            cardEffectParams.playedCard.UpdateCardBodyText((SaveManager)null);
            CardManager cardManager = cardEffectParams.cardManager;

            if (cardManager != null)
            {
                cardManager.RefreshCardInHand(cardEffectParams.playedCard, true);
            }

            yield break;
        }
Exemple #3
0
 private IEnumerator HandleChooseCard(
     CardEffectState cardEffectState,
     CardEffectParams cardEffectParams)
 {
     cardEffectParams.screenManager.SetScreenActive(ScreenName.Deck, true, (ScreenManager.ScreenActiveCallback)(screen =>
     {
         DeckScreen deckScreen = screen as DeckScreen;
         deckScreen.Setup(new DeckScreen.Params()
         {
             mode               = DeckScreen.Mode.CardSelection,
             targetMode         = cardEffectState.GetTargetMode(),
             showCancel         = false,
             titleKey           = cardEffectState.GetParentCardState().GetTitleKey(),
             instructionsKey    = "SeekCopyInstructions",
             numCardsSelectable = cardEffectState.GetParamInt(),
         });
         deckScreen.AddDeckScreenCardStateChosenDelegate((DeckScreen.CardStateChosenDelegate)(chosenCardState =>
         {
             cardEffectParams.cardManager.DrawSpecificCard(chosenCardState, 0.0f, this.GetDrawSource(cardEffectState.GetTargetMode()), cardEffectParams.playedCard, 1, 1);
             cardEffectParams.screenManager.SetScreenActive(ScreenName.Deck, false, (ScreenManager.ScreenActiveCallback)null);
         }));
     }));
     yield break;
 }
Exemple #4
0
        public static StatusEffectStackData GetStatusEffectStack(CardEffectState cardEffectState)
        {
            ClassData             otherClass;
            bool                  exiled = false;
            StatusEffectStackData statusEffectStackData;

            var mainClass = ProviderManager.SaveManager.GetMainClass();
            var subClass  = ProviderManager.SaveManager.GetSubClass();

            if (mainClass == DiscipleClan.clanRef)
            {
                otherClass = subClass;
                exiled     = ProviderManager.SaveManager.GetSubChampionIndex() != 0;
            }
            else
            {
                otherClass = mainClass;
                exiled     = ProviderManager.SaveManager.GetMainChampionIndex() != 0;
            }

            int Param = cardEffectState.GetParamInt();

            if (otherClass == null)
            {
                return(null);
            }
            switch (otherClass.GetID())
            {
            case Hellhorned:
                if (!exiled)
                {
                    statusEffectStackData = new StatusEffectStackData {
                        statusId = Rage, count = Param
                    }
                }
                ;
                else
                {
                    statusEffectStackData = new StatusEffectStackData {
                        statusId = Armor, count = Param * 2
                    }
                };
                break;

            case Awoken:
                if (!exiled)
                {
                    statusEffectStackData = new StatusEffectStackData {
                        statusId = Spikes, count = Param
                    }
                }
                ;
                else
                {
                    statusEffectStackData = new StatusEffectStackData {
                        statusId = Regen, count = Param
                    }
                };
                break;

            case Stygian:
                if (!exiled)
                {
                    statusEffectStackData = new StatusEffectStackData {
                        statusId = SpellWeakness, count = Param / 2
                    }
                }
                ;
                else
                {
                    statusEffectStackData = new StatusEffectStackData {
                        statusId = Frostbite, count = Param
                    }
                };
                break;

            case Umbra:
                if (!exiled)
                {
                    statusEffectStackData = new StatusEffectStackData {
                        statusId = DamageShield, count = Param / 2
                    }
                }
                ;
                else
                {
                    statusEffectStackData = new StatusEffectStackData {
                        statusId = Lifesteal, count = Param / 2
                    }
                };
                break;

            case MeltingRemnant:
                if (!exiled)
                {
                    statusEffectStackData = new StatusEffectStackData {
                        statusId = Burnout, count = Param + 1
                    }
                }
                ;
                else
                {
                    statusEffectStackData = new StatusEffectStackData {
                        statusId = Stealth, count = Param / 2
                    }
                };
                break;

            default:
                statusEffectStackData = new StatusEffectStackData {
                    statusId = "gravity", count = Param / 2
                };
                break;
            }

            return(statusEffectStackData);
        }
        public override IEnumerator ApplyEffect(
            CardEffectState cardEffectState,
            CardEffectParams cardEffectParams)
        {
            if (cardEffectParams.targetCards.Count > 0)
            {
                cardsToScry = cardEffectState.GetParamInt();
                if (cardEffectState.GetParamBool())
                {
                    int empowerMultiplier = cardEffectState.GetParamInt();
                    if (empowerMultiplier == 0)
                    {
                        empowerMultiplier = 1;
                    }

                    cardsToScry = cardEffectParams.playerManager.GetEnergy() * empowerMultiplier;
                }

                // Fire the trigger!
                MonsterManager monsterManager;
                ProviderManager.TryGetProvider <MonsterManager>(out monsterManager);

                List <CharacterState> units = new List <CharacterState>();
                monsterManager.AddCharactersInTowerToList(units);

                CustomTriggerManager.QueueAndRunTrigger(OnDivine.OnDivineCharTrigger, units.ToArray(), true, true, null, 1);

                CardManager cardManager;
                ProviderManager.TryGetProvider <CardManager>(out cardManager);
                foreach (var card in cardManager.GetHand())
                {
                    CustomTriggerManager.FireCardTriggers(OnDivine.OnDivineCardTrigger, card, -1, true, null, 1, null);
                }

                foreach (var relic in ProviderManager.SaveManager.GetCollectedRelics())
                {
                    foreach (var effect in relic.GetEffectsOfType <RelicEffectEmberOnDivine>())
                    {
                        if (effect == null)
                        {
                            continue;
                        }
                        effect.OnDivine();
                    }
                }

                // Check for the relic!
                if (cardEffectParams.saveManager.GetRelicCount("SeersBoostDivine") > 0)
                {
                    foreach (var card in cardManager.GetAllCards())
                    {
                        if (card.GetSpawnCharacterData() != null)
                        {
                            foreach (var subtype in card.GetSpawnCharacterData().GetSubtypes())
                            {
                                if (subtype.Key == "ChronoSubtype_Seer")
                                {
                                    cardsToScry++;
                                }
                            }
                        }
                    }
                }

                yield return((object)this.HandleChooseCard(cardEffectState, cardEffectParams));
            }
        }