コード例 #1
0
 private void createBonuses()
 {
     this.bonusDamage = new Bonuses();
     bonusDamage.addBonus(new Bonus(BonusList.AttackDamage, BonusType.Equipment, 10 * (this.lvl - 1)));
     foreach (KeyValuePair <BonusList, int> bon in WeaponsBonuses)
     {
         Bonus bonus = new Bonus(bon.Key, BonusType.Equipment, bon.Value * (this.lvl - 1));
         if (bon.Key == BonusList.AttackDamage)
         {
             this.bonusDamage.addBonus(bonus);
         }
         else
         {
             bonuses.Add(bonus);
         }
     }
 }
コード例 #2
0
    //public virtual int GetMod(int newMod) {
    //return GetValue()/newMod;
    //}

    public void addBonus(Bonus bonus)
    {
        bonuses.addBonus(bonus);
        totalBonus = bonuses.getBon();
    }