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); }
static IEnumerator Postfix(IEnumerator __result, CharacterState __instance, CardUpgradeState cardUpgradeState) { Traverse.Create(__instance).Property("PrimaryStateInformation").Property("Size").SetValue(__instance.GetSize() + cardUpgradeState.GetAdditionalSize()); ProviderManager.TryGetProvider <RoomManager>(out RoomManager roomManager); if (ProviderManager.CombatManager.IsPlayerActionPhase()) { var room = roomManager.GetRoom(__instance.GetCurrentRoomIndex()); Traverse.Create(room).Field("roomUI").Field <RoomCapacityUI>("roomCapacityUI").Value.Show((room), false); } //yield return roomManager.GetRoom(__instance.GetCurrentRoomIndex()).AdjustCapacity(Team.Type.Monsters, 0, false); yield return(__result); }