Ejemplo n.º 1
0
 public Buff(SecondaryAttributeName attr, BuffType type, float value)
 {
     this.attr2     = attr;
     this.type      = type;
     attributeType  = 2;
     valueOverLayer = new List <float>()
     {
         value
     };
 }
 public SecondaryAttribute(SecondaryAttributeName name, AttributeModifier attrModifier) : base(name.ToString(), attrModifier)
 {
     this.name = name;
 }
 public SecondaryAttribute(SecondaryAttributeName name, int value, int buffedValue, int exp, int expToLevelUp, AttributeModifier attrModifier) :
     base(name.ToString(), value, buffedValue, exp, expToLevelUp, attrModifier)
 {
     this.name = name;
 }
Ejemplo n.º 4
0
 public SecondaryAttribute GetSecondaryAttrubute(SecondaryAttributeName name)
 {
     return(secAttributes[(int)name]);
 }
Ejemplo n.º 5
0
    protected virtual AttributeModifier GetSecondaryAttributeModifier(SecondaryAttributeName attrName)
    {
        AttributeModifier modifier = new AttributeModifier();

        switch (attrName)
        {
        case SecondaryAttributeName.PhysicalDamage:
            modifier.AddRatio(GetPrimaryAttrubute(PrimaryAttributeName.Power), 2f);
            break;

        case SecondaryAttributeName.SkillDamage:
            modifier.AddRatio(GetPrimaryAttrubute(PrimaryAttributeName.Agility), 2f);
            break;

        case SecondaryAttributeName.MagicalDamage:
            modifier.AddRatio(GetPrimaryAttrubute(PrimaryAttributeName.Wisdom), 2f);
            break;

        case SecondaryAttributeName.PhysicalDeffence:
            modifier.AddRatio(GetPrimaryAttrubute(PrimaryAttributeName.Power), 1f);
            modifier.AddRatio(GetPrimaryAttrubute(PrimaryAttributeName.Constitution), 1f);
            break;

        case SecondaryAttributeName.SkillDeffence:
            modifier.AddRatio(GetPrimaryAttrubute(PrimaryAttributeName.Agility), 1f);
            modifier.AddRatio(GetPrimaryAttrubute(PrimaryAttributeName.Constitution), 1f);
            break;

        case SecondaryAttributeName.MagicalDeffence:
            modifier.AddRatio(GetPrimaryAttrubute(PrimaryAttributeName.Wisdom), 1f);
            modifier.AddRatio(GetPrimaryAttrubute(PrimaryAttributeName.Constitution), 1f);
            break;

        case SecondaryAttributeName.Critical:
            modifier.AddRatio(GetPrimaryAttrubute(PrimaryAttributeName.Agility), .66f);
            modifier.AddRatio(GetPrimaryAttrubute(PrimaryAttributeName.Power), .66f);
            modifier.AddRatio(GetPrimaryAttrubute(PrimaryAttributeName.Wisdom), .66f);
            break;

        case SecondaryAttributeName.CriticalDamage:
            modifier.AddRatio(GetPrimaryAttrubute(PrimaryAttributeName.Agility), 1f);
            modifier.AddRatio(GetPrimaryAttrubute(PrimaryAttributeName.Power), 1f);
            break;

        case SecondaryAttributeName.Dodge:
            modifier.AddRatio(GetPrimaryAttrubute(PrimaryAttributeName.Agility), 1f);
            modifier.AddRatio(GetPrimaryAttrubute(PrimaryAttributeName.Wisdom), 1f);
            break;

        case SecondaryAttributeName.Hit:
            modifier.AddRatio(GetPrimaryAttrubute(PrimaryAttributeName.Power), 1f);
            modifier.AddRatio(GetPrimaryAttrubute(PrimaryAttributeName.Wisdom), 1f);
            break;

        case SecondaryAttributeName.DoubleExpRate:
            modifier.AddRatio(GetPrimaryAttrubute(PrimaryAttributeName.Luck), 2f);
            break;

        case SecondaryAttributeName.HealthRecoverRate:
            modifier.AddRatio(GetPrimaryAttrubute(PrimaryAttributeName.Constitution), 1f);
            modifier.AddRatio(GetPrimaryAttrubute(PrimaryAttributeName.Spirit), 1f);
            break;

        case SecondaryAttributeName.ManaRecoverRate:
            modifier.AddRatio(GetPrimaryAttrubute(PrimaryAttributeName.Wisdom), 1f);
            modifier.AddRatio(GetPrimaryAttrubute(PrimaryAttributeName.Spirit), 1f);
            break;

        case SecondaryAttributeName.EnergyRecoverRate:
            modifier.AddRatio(GetPrimaryAttrubute(PrimaryAttributeName.Agility), 1f);
            modifier.AddRatio(GetPrimaryAttrubute(PrimaryAttributeName.Spirit), 1f);
            break;

        case SecondaryAttributeName.MoveSpeed:
            modifier.AddRatio(GetPrimaryAttrubute(PrimaryAttributeName.Agility), .25f);
            modifier.AddRatio(GetPrimaryAttrubute(PrimaryAttributeName.Constitution), .25f);
            break;

        case SecondaryAttributeName.Vision:
            modifier.AddRatio(GetPrimaryAttrubute(PrimaryAttributeName.Agility), 1f);
            break;

        default:
            break;
        }
        return(modifier);
    }