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); }