private void ReviseVitalModifiers()
    {
        // health
        ModifiableAttribute healthModifier = new ModifiableAttribute();

        healthModifier.attribute = GetAttribute((int)AttributeName.Health);
        healthModifier.ratio     = 0.5f;

        GetVital((int)VitalType.Health).AddModifier(healthModifier);

        //stamina
        ModifiableAttribute staminaModifier = new ModifiableAttribute();

        staminaModifier.attribute = GetAttribute((int)AttributeName.Health);
        staminaModifier.ratio     = 1.0f;

        GetVital((int)VitalType.Stamina).AddModifier(staminaModifier);

        //special
        ModifiableAttribute specialModifier = new ModifiableAttribute();

        specialModifier.attribute = GetAttribute((int)AttributeName.Damage);
        staminaModifier.ratio     = 0.2f;

        GetVital((int)VitalType.Special).AddModifier(specialModifier);
    }
    private void ReviseSkillModifiers()
    {
        //Standard shot
        ModifiableAttribute StandardShotModifier1 = new ModifiableAttribute();
        ModifiableAttribute StandardShotModifier2 = new ModifiableAttribute();
        ModifiableAttribute StandardShotModifier3 = new ModifiableAttribute();
        ModifiableAttribute StandardShotModifier4 = new ModifiableAttribute();
        ModifiableAttribute StandardShotModifier5 = new ModifiableAttribute();

        StandardShotModifier1.attribute = GetAttribute((int)AttributeName.Damage);
        StandardShotModifier1.ratio     = .33f;

        StandardShotModifier2.attribute = GetAttribute((int)AttributeName.Firing_Rate);
        StandardShotModifier2.ratio     = .33f;

        StandardShotModifier3.attribute = GetAttribute((int)AttributeName.Vertical_Movement);
        StandardShotModifier3.ratio     = .33f;

        StandardShotModifier4.attribute = GetAttribute((int)AttributeName.Horizontal_Movement);
        StandardShotModifier4.ratio     = .33f;

        StandardShotModifier5.attribute = GetAttribute((int)AttributeName.Health);
        StandardShotModifier5.ratio     = .33f;

        GetSkill((int)SkillName.Standard_Shot).AddModifier(StandardShotModifier1);
        GetSkill((int)SkillName.Standard_Shot).AddModifier(StandardShotModifier2);
        GetSkill((int)SkillName.Standard_Shot).AddModifier(StandardShotModifier3);
        GetSkill((int)SkillName.Standard_Shot).AddModifier(StandardShotModifier4);
        GetSkill((int)SkillName.Standard_Shot).AddModifier(StandardShotModifier5);

        //Double shot
        ModifiableAttribute DoubleShotModifier1 = new ModifiableAttribute();
        ModifiableAttribute DoubleShotModifier2 = new ModifiableAttribute();
        ModifiableAttribute DoubleShotModifier3 = new ModifiableAttribute();
        ModifiableAttribute DoubleShotModifier4 = new ModifiableAttribute();
        ModifiableAttribute DoubleShotModifier5 = new ModifiableAttribute();

        DoubleShotModifier1.attribute = GetAttribute((int)AttributeName.Damage);
        DoubleShotModifier1.ratio     = .33f;

        DoubleShotModifier2.attribute = GetAttribute((int)AttributeName.Firing_Rate);
        DoubleShotModifier2.ratio     = .33f;

        DoubleShotModifier3.attribute = GetAttribute((int)AttributeName.Vertical_Movement);
        DoubleShotModifier3.ratio     = .33f;

        DoubleShotModifier4.attribute = GetAttribute((int)AttributeName.Horizontal_Movement);
        DoubleShotModifier4.ratio     = .33f;

        DoubleShotModifier5.attribute = GetAttribute((int)AttributeName.Health);
        DoubleShotModifier5.ratio     = .33f;

        GetSkill((int)SkillName.Double_Shot).AddModifier(DoubleShotModifier1);
        GetSkill((int)SkillName.Double_Shot).AddModifier(DoubleShotModifier2);
        GetSkill((int)SkillName.Double_Shot).AddModifier(DoubleShotModifier3);
        GetSkill((int)SkillName.Double_Shot).AddModifier(DoubleShotModifier4);
        GetSkill((int)SkillName.Double_Shot).AddModifier(DoubleShotModifier5);
    }
Пример #3
0
 void OnEnable()
 {
     damageMultiplier          = new ModifiableAttribute <float>(1f);
     magazineSizeMultiplier    = new ModifiableAttribute <float>(1f);
     reloadTimeMultiplier      = new ModifiableAttribute <float>(1f);
     roundsPerMinuteMultiplier = new ModifiableAttribute <float>(1f);
     spreadRadiusModified      = new ModifiableAttribute <float>(baseSpreadRadius);
     spreadRadiusMultiplier    = new ModifiableAttribute <float>(1f);
     critChance     = new ModifiableAttribute <int>(baseCritChance);
     critMultiplier = new ModifiableAttribute <float>(baseCritMultiplier);
     stunChance     = new ModifiableAttribute <int>(baseStunChance);
 }
 public void AddModifier(ModifiableAttribute mod)
 {
     _mods.Add(mod);
 }