Beispiel #1
0
    protected virtual AttributeModifier GetConsumedAttributeModifier(ConsumedAttributeName attrName)
    {
        AttributeModifier modifier = new AttributeModifier();

        switch (attrName)
        {
        case ConsumedAttributeName.Health:
            modifier.AddRatio(GetPrimaryAttrubute(PrimaryAttributeName.Constitution), 20f);
            break;

        case ConsumedAttributeName.Mana:
            modifier.AddRatio(GetPrimaryAttrubute(PrimaryAttributeName.Wisdom), 20f);
            break;

        case ConsumedAttributeName.Energy:
            modifier.AddRatio(GetPrimaryAttrubute(PrimaryAttributeName.Agility), 20f);
            break;

        default:
            break;
        }
        return(modifier);
    }
Beispiel #2
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);
    }