private void GetRemoveIncreaseDotDamage(SoulGemEnhancement effect) { if (ability is AttackAbility attackAbility) { attackAbility.dotDamage -= effect.effect; } }
private void GetRemoveAddAttribute(SoulGemEnhancement effect) { var attribute = ability.FindAttribute(effect.target); ability.attributes.Remove(attribute); ability.SortAttributes(); }
private void GetIncreaseDamage(SoulGemEnhancement effect) { if (ability is AttackAbility attackAbility) { attackAbility.damage += effect.effect; } }
private void GetRemoveIncreasedAttackRadius(SoulGemEnhancement effect) { if (ability is AttackAbility attackAbility) { attackAbility.radius -= effect.effect; } }
private void GetRemoveReduceMpUsage(SoulGemEnhancement effect) { if (ability is ActiveAbility activeAbility) { activeAbility.mpUsage -= effect.effect; } }
private void GetRemoveReduceCooldown(SoulGemEnhancement effect) { if (ability is ActiveAbility activeAbility) { activeAbility.cooldown -= effect.effect; } }
private void GetRemoveReduceDotTime(SoulGemEnhancement effect) { if (ability is AttackAbility attackAbility) { attackAbility.dotTime -= effect.effect; } }
private void GetRemoveDrawback(SoulGemEnhancement effect) { var attribute = ability.FindAttribute(effect.target); if (attribute != null) { ability.attributes.Remove(attribute); ability.SortAttributes(); } }
private void GetRemoveActivateAttribute(SoulGemEnhancement effect) { var attribute = ability.FindAttribute(effect.target); if (attribute != null) { attribute.priority = RNG.Float(0, 49f); ability.SortAttributes(); } }
private void GetRemoveRemoveDrawback(SoulGemEnhancement effect) { var attribute = AbilityAttributeGenerator.Generate(ability, effect.target); if (attribute != null) { ability.attributes.Add(attribute); attribute.priority = RNG.Float(50f, 100f); ability.SortAttributes(); } }
public static SavedSoulGemEnhancement ConvertFrom(SoulGemEnhancement sge) { return(new SavedSoulGemEnhancement { name = sge.name, description = sge.description, icon = sge.icon, generalType = sge.generalType, type = sge.type, target = sge.target, subTarget = sge.subTarget, effect = sge.effect }); }
private void GetAddAttribute(SoulGemEnhancement effect) { var attribute = AbilityAttributeGenerator.Generate(ability, effect.target); if (attribute == null) { return; } if (attribute.priority < 50) { attribute.priority = RNG.Float(50f, 100f); } ability.attributes.Add(attribute); ability.SortAttributes(); ability.points += attribute.points; }
private void GetRemoveDecreasedParam(SoulGemEnhancement effect) { var attribute = ability.FindAttribute(effect.target); if (attribute == null) { return; } var parameter = attribute.FindParameter(effect.subTarget); if (parameter == null) { return; } parameter.value = (float)parameter.value + effect.effect; }
private bool SameEffect(SoulGemEnhancement effect1, SoulGemEnhancement effect2) { if (effect1.effect != effect2.effect) { return(false); } if (effect1.generalType != effect2.generalType) { return(false); } if (effect1.subTarget != effect2.subTarget) { return(false); } if (effect1.target != effect2.target) { return(false); } if (effect1.type != effect2.type) { return(false); } return(true); }