예제 #1
0
 public Item()
 {
     equiped      = false;
     name         = "";
     requirements = null;
     bonus        = null;
 }
예제 #2
0
 //constructor
 public Item(String Name, d3vector Requirements, Osobini Bonus, int mValue, int value, String img)
 {
     this.img_Path = img;
     this.value    = value;
     this.mValue   = mValue;
     this.equiped  = false;
     name          = Name;
     requirements  = Requirements;
     bonus         = Bonus;
 }
예제 #3
0
        public Osobini get_Stats()
        {
            Osobini pom = new Osobini();

            if (left_hand != null)
            {
                pom.health += left_hand.bonus.health;
                pom.dodge  += left_hand.bonus.dodge;
                pom.armor  += left_hand.bonus.armor;
                pom.dmgMax += left_hand.bonus.dmgMax;
                pom.dmgMin += left_hand.bonus.dmgMin;
                pom.mana   += left_hand.bonus.mana;
            }
            if (right_hand != null)
            {
                pom.health += right_hand.bonus.health;
                pom.dodge  += right_hand.bonus.dodge;
                pom.armor  += right_hand.bonus.armor;
                pom.dmgMax += right_hand.bonus.dmgMax;
                pom.dmgMin += right_hand.bonus.dmgMin;
                pom.mana   += right_hand.bonus.mana;
            }
            if (helmet != null)
            {
                pom.health += helmet.bonus.health;
                pom.dodge  += helmet.bonus.dodge;
                pom.armor  += helmet.bonus.armor;
                pom.dmgMax += helmet.bonus.dmgMax;
                pom.dmgMin += helmet.bonus.dmgMin;
                pom.mana   += helmet.bonus.mana;
            }
            if (chest != null)
            {
                pom.health += chest.bonus.health;
                pom.dodge  += chest.bonus.dodge;
                pom.armor  += chest.bonus.armor;
                pom.dmgMax += chest.bonus.dmgMax;
                pom.dmgMin += chest.bonus.dmgMin;
                pom.mana   += chest.bonus.mana;
            }
            if (boots != null)
            {
                pom.health += boots.bonus.health;
                pom.dodge  += boots.bonus.dodge;
                pom.armor  += boots.bonus.armor;
                pom.dmgMax += boots.bonus.dmgMax;
                pom.dmgMin += boots.bonus.dmgMin;
                pom.mana   += boots.bonus.mana;
            }
            if (gloves != null)
            {
                pom.health += gloves.bonus.health;
                pom.dodge  += gloves.bonus.dodge;
                pom.armor  += gloves.bonus.armor;
                pom.dmgMax += gloves.bonus.dmgMax;
                pom.dmgMin += gloves.bonus.dmgMin;
                pom.mana   += gloves.bonus.mana;
            }
            if (legs != null)
            {
                pom.health += legs.bonus.health;
                pom.dodge  += legs.bonus.dodge;
                pom.armor  += legs.bonus.armor;
                pom.dmgMax += legs.bonus.dmgMax;
                pom.dmgMin += legs.bonus.dmgMin;
                pom.mana   += legs.bonus.mana;
            }
            if (shoulders != null)
            {
                pom.health += shoulders.bonus.health;
                pom.dodge  += shoulders.bonus.dodge;
                pom.armor  += shoulders.bonus.armor;
                pom.dmgMax += shoulders.bonus.dmgMax;
                pom.dmgMin += shoulders.bonus.dmgMin;
                pom.mana   += shoulders.bonus.mana;
            }
            return(pom);
        }