示例#1
0
    public void UpdateEffect()
    {
        switch (Name)
        {
        case AttributeName.Lifesteal:
            appliedEffect = new Effect(EffectType.DamageOrHeal,
                                       -Value * 0.01f, true);
            intercept = Character.Intercept.DealDamage;
            return;

        case AttributeName.Replenishment:
            appliedEffect = new Effect(EffectType.ModifySecondary,
                                       -Value * 0.01f, true);
            intercept = Character.Intercept.DealDamage;
            return;

        case AttributeName.Healing:
            appliedEffect = new Effect(EffectType.Multiply,
                                       1 + Value * 0.01f, true);
            intercept = Character.Intercept.DealDamage;
            return;

        case AttributeName.Retribution:
            appliedEffect = new Effect(EffectType.DamageOrHeal,
                                       Value * 0.01f, false);
            intercept = Character.Intercept.ReceiveDamage;
            return;

        case AttributeName.Bleed:
        case AttributeName.Weaken:
        case AttributeName.Slaying:
            var boost = new Effect(EffectType.Multiply,
                                   1 + Value * 0.02f, false);
            appliedEffect = new ConditionalEffect(boost,
                                                  new CharacterCondition());
            intercept = Character.Intercept.ReceiveDamage;
            return;

        case AttributeName.Massacre:
        default:
            return;
        }
    }
示例#2
0
 public void UpdateEffect()
 {
     switch(Name)
     {
         case AttributeName.Lifesteal:
             appliedEffect = new Effect(EffectType.DamageOrHeal,
                                        -Value * 0.01f, true);
             intercept = Character.Intercept.DealDamage;
             return;
         case AttributeName.Replenishment:
             appliedEffect = new Effect(EffectType.ModifySecondary,
                                        -Value * 0.01f, true);
             intercept = Character.Intercept.DealDamage;
             return;
         case AttributeName.Healing:
             appliedEffect = new Effect(EffectType.Multiply,
                                        1 + Value * 0.01f, true);
             intercept = Character.Intercept.DealDamage;
             return;
         case AttributeName.Retribution:
             appliedEffect = new Effect(EffectType.DamageOrHeal,
                                        Value * 0.01f, false);
             intercept = Character.Intercept.ReceiveDamage;
             return;
         case AttributeName.Bleed:
         case AttributeName.Weaken:
         case AttributeName.Slaying:
             var boost = new Effect(EffectType.Multiply,
                                    1 + Value * 0.02f, false);
             appliedEffect = new ConditionalEffect(boost,
                                                   new CharacterCondition());
             intercept = Character.Intercept.ReceiveDamage;
             return;
         case AttributeName.Massacre:
         default:
             return;
     }
 }