Example #1
0
        public override void OnApplyingCardUpgradeToUnit(CardState thisCard, CharacterState targetUnit, CardUpgradeState upgradeState, CardManager cardManager)
        {
            int multiplier = GetMultiplier(cardManager.GetCardStatistics());

            upgradeState.SetAttackDamage(upgradeState.GetAttackDamage() * multiplier);
            upgradeState.SetAdditionalHP(upgradeState.GetAdditionalHP() * multiplier);
            upgradeState.SetAdditionalSize(upgradeState.GetAdditionalSize() * multiplier);
        }
        public override bool OnCardBeingUpgraded(CardState cardState, CardState upgradingCardSource, CardManager cardManager, CardUpgradeState cardUpgradeState)
        {
            int scaleAmount = GetScaleAmount(upgradingCardSource, cardManager);

            cardUpgradeState.SetAttackDamage(cardUpgradeState.GetAttackDamage() * scaleAmount);
            cardUpgradeState.SetAdditionalHP(cardUpgradeState.GetAdditionalHP() * scaleAmount);
            cardUpgradeState.SetCostReduction(cardUpgradeState.GetCostReduction() * scaleAmount);
            cardUpgradeState.SetAdditionalHeal(cardUpgradeState.GetAdditionalHeal() * scaleAmount);
            cardUpgradeState.SetAdditionalSize(cardUpgradeState.GetAdditionalSize() * scaleAmount);
            foreach (StatusEffectStackData statusEffectStackData in cardUpgradeState.GetStatusEffectUpgrades())
            {
                cardUpgradeState.AddStatusEffectUpgradeStacks(statusEffectStackData.statusId, statusEffectStackData.count * (scaleAmount - statusEffectStackData.count));
            }

            return(true);
        }