示例#1
0
 private void GetRemoveIncreaseDotDamage(SoulGemEnhancement effect)
 {
     if (ability is AttackAbility attackAbility)
     {
         attackAbility.dotDamage -= effect.effect;
     }
 }
示例#2
0
    private void GetRemoveAddAttribute(SoulGemEnhancement effect)
    {
        var attribute = ability.FindAttribute(effect.target);

        ability.attributes.Remove(attribute);
        ability.SortAttributes();
    }
示例#3
0
 private void GetIncreaseDamage(SoulGemEnhancement effect)
 {
     if (ability is AttackAbility attackAbility)
     {
         attackAbility.damage += effect.effect;
     }
 }
示例#4
0
 private void GetRemoveIncreasedAttackRadius(SoulGemEnhancement effect)
 {
     if (ability is AttackAbility attackAbility)
     {
         attackAbility.radius -= effect.effect;
     }
 }
示例#5
0
 private void GetRemoveReduceMpUsage(SoulGemEnhancement effect)
 {
     if (ability is ActiveAbility activeAbility)
     {
         activeAbility.mpUsage -= effect.effect;
     }
 }
示例#6
0
 private void GetRemoveReduceCooldown(SoulGemEnhancement effect)
 {
     if (ability is ActiveAbility activeAbility)
     {
         activeAbility.cooldown -= effect.effect;
     }
 }
示例#7
0
 private void GetRemoveReduceDotTime(SoulGemEnhancement effect)
 {
     if (ability is AttackAbility attackAbility)
     {
         attackAbility.dotTime -= effect.effect;
     }
 }
示例#8
0
    private void GetRemoveDrawback(SoulGemEnhancement effect)
    {
        var attribute = ability.FindAttribute(effect.target);

        if (attribute != null)
        {
            ability.attributes.Remove(attribute);
            ability.SortAttributes();
        }
    }
示例#9
0
    private void GetRemoveActivateAttribute(SoulGemEnhancement effect)
    {
        var attribute = ability.FindAttribute(effect.target);

        if (attribute != null)
        {
            attribute.priority = RNG.Float(0, 49f);
            ability.SortAttributes();
        }
    }
示例#10
0
    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();
        }
    }
示例#11
0
 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
     });
 }
示例#12
0
    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;
    }
示例#13
0
    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;
    }
示例#14
0
 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);
 }