Exemple #1
0
 public void SetColor(Item.ItemQualityModifiers quality)
 {
     if (quality == Item.ItemQualityModifiers.Poor)
     {
         UIColor(0);
     }
     else if (quality == Item.ItemQualityModifiers.Basic)
     {
         UIColor(2);
     }
     else if (quality == Item.ItemQualityModifiers.Fine)
     {
         UIColor(4);
     }
     else if (quality == Item.ItemQualityModifiers.Great)
     {
         UIColor(6);
     }
     else if (quality == Item.ItemQualityModifiers.Masterful)
     {
         UIColor(8);
     }
     else if (quality == Item.ItemQualityModifiers.Epic)
     {
         UIColor(10);
     }
     else if (quality == Item.ItemQualityModifiers.Legendary)
     {
         UIColor(12);
     }
     else if (quality == Item.ItemQualityModifiers.Godlike)
     {
         UIColor(14);
     }
 }
Exemple #2
0
 public void FixedUpdate()
 {
     // i
     // if the item is not null
     if (item != null)
     {
         if (img.sprite == null)
         {
             img.sprite = item.icon;
         }
         // if the itemname is null
         if (itemName == null)
         {
             itemName = item.itemName;
         }
         // if the grade does not equal the items grade
         if (grade != item.itemQuality)
         {
             grade = item.itemQuality;
         }
     }
 }
Exemple #3
0
    public Armor_Inspector GetIcon(int _id, Item.ItemQualityModifiers quality)
    {
        // Light
        #region Light Armor 301 - 312
        if (_id == 301)
        {
            return(lightArmor[0]);
        }
        else if (_id == 302)
        {
            return(lightArmor[1]);
        }
        else if (_id == 303)
        {
            return(lightArmor[2]);
        }
        else if (_id == 304)
        {
            return(lightArmor[3]);
        }
        else if (_id == 305)
        {
            return(lightArmor[4]);
        }
        else if (_id == 306)
        {
            return(lightArmor[5]);
        }
        else if (_id == 307)
        {
            return(lightArmor[6]);
        }
        else if (_id == 308)
        {
            return(lightArmor[7]);
        }
        else if (_id == 309)
        {
            return(lightArmor[8]);
        }
        else if (_id == 310)
        {
            return(lightArmor[9]);
        }
        else if (_id == 311)
        {
            return(lightArmor[10]);
        }
        else if (_id == 312)
        {
            return(lightArmor[11]);
        }
        #endregion

        #region Medium Armor 313 - 324
        if (_id == 313)
        {
            return(mediumArmor[0]);
        }
        else if (_id == 314)
        {
            return(mediumArmor[1]);
        }
        else if (_id == 315)
        {
            return(mediumArmor[2]);
        }
        else if (_id == 316)
        {
            return(mediumArmor[3]);
        }
        else if (_id == 317)
        {
            return(mediumArmor[4]);
        }
        else if (_id == 318)
        {
            return(mediumArmor[5]);
        }
        else if (_id == 319)
        {
            return(mediumArmor[6]);
        }
        else if (_id == 320)
        {
            return(mediumArmor[7]);
        }
        else if (_id == 321)
        {
            return(mediumArmor[8]);
        }
        else if (_id == 322)
        {
            return(mediumArmor[9]);
        }
        else if (_id == 323)
        {
            return(mediumArmor[10]);
        }
        else if (_id == 324)
        {
            return(mediumArmor[11]);
        }
        #endregion

        #region Heavy Armor 325 - 348
        if (_id == 325)
        {
            return(heavyArmor[0]);
        }
        else if (_id == 326)
        {
            return(heavyArmor[1]);
        }
        else if (_id == 327)
        {
            return(heavyArmor[2]);
        }
        else if (_id == 328)
        {
            return(heavyArmor[3]);
        }
        else if (_id == 329)
        {
            return(heavyArmor[4]);
        }
        else if (_id == 330)
        {
            return(heavyArmor[5]);
        }
        else if (_id == 331)
        {
            return(heavyArmor[6]);
        }
        else if (_id == 332)
        {
            return(heavyArmor[7]);
        }
        else if (_id == 333)
        {
            return(heavyArmor[8]);
        }
        else if (_id == 334)
        {
            return(heavyArmor[9]);
        }
        else if (_id == 335)
        {
            return(heavyArmor[10]);
        }
        else if (_id == 336)
        {
            return(heavyArmor[11]);
        }
        else if (_id == 337)
        {
            return(heavyArmor[12]);
        }
        else if (_id == 338)
        {
            return(heavyArmor[13]);
        }
        else if (_id == 339)
        {
            return(heavyArmor[14]);
        }
        else if (_id == 340)
        {
            return(heavyArmor[15]);
        }
        else if (_id == 341)
        {
            return(heavyArmor[16]);
        }
        else if (_id == 342)
        {
            return(heavyArmor[17]);
        }
        else if (_id == 343)
        {
            return(heavyArmor[18]);
        }
        else if (_id == 344)
        {
            return(heavyArmor[19]);
        }
        else if (_id == 345)
        {
            return(heavyArmor[20]);
        }
        else if (_id == 346)
        {
            return(heavyArmor[21]);
        }
        else if (_id == 347)
        {
            return(heavyArmor[22]);
        }
        else if (_id == 348)
        {
            return(heavyArmor[23]);
        }
        #endregion

        #region Shield Armor 349 - 380
        if (_id == 349)
        {
            return(shields[0]);
        }
        else if (_id == 350)
        {
            return(shields[1]);
        }
        else if (_id == 351)
        {
            return(shields[2]);
        }
        else if (_id == 352)
        {
            return(shields[3]);
        }
        else if (_id == 353)
        {
            return(shields[4]);
        }
        else if (_id == 354)
        {
            return(shields[5]);
        }
        else if (_id == 355)
        {
            return(shields[6]);
        }
        else if (_id == 356)
        {
            return(shields[7]);
        }
        else if (_id == 357)
        {
            return(shields[8]);
        }
        else if (_id == 358)
        {
            return(shields[9]);
        }
        else if (_id == 359)
        {
            return(shields[10]);
        }
        else if (_id == 360)
        {
            return(shields[11]);
        }
        else if (_id == 361)
        {
            return(shields[12]);
        }
        else if (_id == 362)
        {
            return(shields[13]);
        }
        else if (_id == 363)
        {
            return(shields[14]);
        }
        else if (_id == 364)
        {
            return(shields[15]);
        }
        else if (_id == 365)
        {
            return(shields[16]);
        }
        else if (_id == 366)
        {
            return(shields[17]);
        }
        else if (_id == 367)
        {
            return(shields[18]);
        }
        else if (_id == 368)
        {
            return(shields[19]);
        }
        else if (_id == 369)
        {
            return(shields[20]);
        }
        else if (_id == 370)
        {
            return(shields[21]);
        }
        else if (_id == 371)
        {
            return(shields[22]);
        }
        else if (_id == 372)
        {
            return(shields[23]);
        }
        else if (_id == 373)
        {
            return(shields[24]);
        }
        else if (_id == 374)
        {
            return(shields[25]);
        }
        else if (_id == 375)
        {
            return(shields[26]);
        }
        else if (_id == 376)
        {
            return(shields[27]);
        }
        else if (_id == 377)
        {
            return(shields[28]);
        }
        else if (_id == 378)
        {
            return(shields[29]);
        }
        else if (_id == 379)
        {
            return(shields[30]);
        }
        else if (_id == 380)
        {
            return(shields[31]);
        }
        #endregion

        #region Glove Armor 381 - 394
        if (_id == 381)
        {
            return(gloves[0]);
        }
        else if (_id == 382)
        {
            return(gloves[1]);
        }
        else if (_id == 383)
        {
            return(gloves[2]);
        }
        else if (_id == 384)
        {
            return(gloves[3]);
        }
        else if (_id == 385)
        {
            return(gloves[4]);
        }
        else if (_id == 386)
        {
            return(gloves[5]);
        }
        else if (_id == 387)
        {
            return(gloves[6]);
        }
        else if (_id == 388)
        {
            return(gloves[7]);
        }
        else if (_id == 389)
        {
            return(gloves[8]);
        }
        else if (_id == 390)
        {
            return(gloves[9]);
        }
        else if (_id == 391)
        {
            return(gloves[10]);
        }
        else if (_id == 392)
        {
            return(gloves[11]);
        }
        else if (_id == 393)
        {
            return(gloves[12]);
        }
        else if (_id == 394)
        {
            return(gloves[13]);
        }
        #endregion

        else
        {
            return(null);
        }
    }
Exemple #4
0
    // Returns A Primary Enchant
    public static Primary_Stats_Enchants GetPrimaryEnchant(Enchant e, int c = -1, Item.ItemQualityModifiers quality = Item.ItemQualityModifiers.Basic)
    {
        float qMod = 1f;

        if ((int)quality > 1)
        {
            qMod = ((int)quality / 1.75f) + 1f;
        }
        int i = 0;

        if (c == -1)
        {
            i = Random.Range(0, 7);
        }
        else
        {
            i = c;
        }
        int j = Random.Range(1, 4);

        if (i == 0)
        {
            e.SetEnchantName("Strength");
            if (j == 1)
            {
                e.SetEnchantDesc("You feel stronger when this is equipped.");
            }
            else if (j == 2)
            {
                e.SetEnchantDesc("Your criticals will do more damage.");
            }
            else if (j == 3)
            {
                e.SetEnchantDesc("Your physical attacks will do more damage.");
            }
            e.strength = Random.Range(((int)qMod * ((int)(e.level / 4.5f + 1))), (3 * ((int)(e.level / 5f + 1))));
            e.power    = e.strength;
            e.SetBonusStatText(e.strength.ToString() + " Strength");
            e.enchantValue = 1.75f;
            return(Primary_Stats_Enchants.Strength);
        }
        else if (i == 1)
        {
            e.SetEnchantName("Dexterity");
            if (j == 1)
            {
                e.SetEnchantDesc("Enchanted with dexterity.");
            }
            else if (j == 2)
            {
                e.SetEnchantDesc("Your criticals will be more likely.");
            }
            else if (j == 3)
            {
                e.SetEnchantDesc("Your criticals will do more damage.");
            }
            e.dexterity = Random.Range(((int)qMod * ((int)(e.level / 4.5f + 1))), (3 * ((int)(e.level / 5f + 1))));
            e.SetBonusStatText(e.dexterity.ToString() + " Dexterity");
            e.power        = e.dexterity;
            e.enchantValue = 1.75f;
            return(Primary_Stats_Enchants.Dexterity);
        }
        else if (i == 2)
        {
            e.SetEnchantName("Intellect");
            if (j == 1)
            {
                e.SetEnchantDesc("Your magical attacks will do more damage.");
            }
            else if (j == 2)
            {
                e.SetEnchantDesc("You will resist magical damage more.");
            }
            else if (j == 3)
            {
                e.SetEnchantDesc("Enchanted with intellegence.");
            }
            e.intellect = Random.Range(((int)qMod * ((int)(e.level / 4.5f + 1))), (3 * ((int)(e.level / 5f + 1))));
            e.SetBonusStatText(e.intellect.ToString() + " Intellect");
            e.power        = e.intellect;
            e.enchantValue = 1.75f;
            return(Primary_Stats_Enchants.Intellect);
        }
        else if (i == 3)
        {
            e.SetEnchantName("Endurance");
            if (j == 1)
            {
                e.SetEnchantDesc("You will be able to do more things than usual.");
            }
            else if (j == 2)
            {
                e.SetEnchantDesc("You can handle physical attacks more.");
            }
            else if (j == 3)
            {
                e.SetEnchantDesc("Enchanted with endurance.");
            }
            e.endurance = Random.Range(((int)qMod * ((int)(e.level / 4.5f + 1))), (3 * ((int)(e.level / 5f + 1))));
            e.power     = e.endurance;
            e.SetBonusStatText(e.endurance.ToString() + " Endurance");
            e.enchantValue = 1.75f;
            return(Primary_Stats_Enchants.Endurance);
        }
        else if (i == 4)
        {
            e.SetEnchantName("Vitality");
            if (j == 1)
            {
                e.SetEnchantDesc("You will have more life force.");
            }
            else if (j == 2)
            {
                e.SetEnchantDesc("You will regenerate health faster.");
            }
            else if (j == 3)
            {
                e.SetEnchantDesc("Enchanted with vitality.");
            }
            e.vitality = Random.Range(((int)qMod * ((int)(e.level / 4.5f + 1))), (3 * ((int)(e.level / 5f + 1))));
            e.power    = e.vitality;
            e.SetBonusStatText(e.vitality.ToString() + " Vitality");
            e.enchantValue = 1.75f;
            return(Primary_Stats_Enchants.Vitality);
        }
        else if (i == 5)
        {
            e.SetEnchantName("Agility");
            if (j == 1)
            {
                e.SetEnchantDesc("You will move faster.");
            }
            else if (j == 2)
            {
                e.SetEnchantDesc("You will have the chance to evade attacks.");
            }
            else if (j == 3)
            {
                e.SetEnchantDesc("Enchanted with agility.");
            }
            e.agility = Random.Range(((int)qMod * ((int)(e.level / 4.5f + 1))), (3 * ((int)(e.level / 5f + 1))));
            e.power   = e.agility;
            e.SetBonusStatText(e.agility.ToString() + " Agility");
            e.enchantValue = 1.75f;
            return(Primary_Stats_Enchants.Agility);
        }
        else if (i == 6)
        {
            e.SetEnchantName("Luck");
            if (j == 1)
            {
                e.SetEnchantDesc("You will have more fortune.");
            }
            else if (j == 2)
            {
                e.SetEnchantDesc("You will have better chances at getting rare items.");
            }
            else if (j == 3)
            {
                e.SetEnchantDesc("Enchanted with Luck.");
            }
            e.luck  = Random.Range(((int)qMod * ((int)(e.level / 4.5f + 1))), (3 * ((int)(e.level / 5f + 1))));
            e.power = e.luck;
            e.SetBonusStatText(e.luck.ToString() + " Luck");
            e.enchantValue = 1.75f;
            return(Primary_Stats_Enchants.Luck);
        }
        else
        {
            e.SetEnchantName("Luck");
            if (j == 1)
            {
                e.SetEnchantDesc("You will have more fortune.");
            }
            else if (j == 2)
            {
                e.SetEnchantDesc("You will have better chances at getting rare items.");
            }
            else if (j == 3)
            {
                e.SetEnchantDesc("Enchanted with Luck.");
            }
            e.luck  = Random.Range(((int)qMod * ((int)(e.level / 4.5f + 1))), (3 * ((int)(e.level / 5f + 1))));
            e.power = e.luck;
            e.SetBonusStatText(e.luck.ToString() + " Luck");
            e.enchantValue = 1.75f;
            return(Primary_Stats_Enchants.Luck);
        }
    }
Exemple #5
0
    public Sprite GetIcon(int _id, Item.ItemQualityModifiers quality)
    {
        #region O_Swords 101 - 109
        if (_id == 101)
        {
            return(o_Swords[0]);
        }
        else if (_id == 102)
        {
            return(o_Swords[1]);
        }
        else if (_id == 103)
        {
            return(o_Swords[2]);
        }
        else if (_id == 104)
        {
            return(o_Swords[3]);
        }
        else if (_id == 105)
        {
            return(o_Swords[4]);
        }
        else if (_id == 106)
        {
            return(o_Swords[5]);
        }
        else if (_id == 107)
        {
            return(o_Swords[6]);
        }
        else if (_id == 108)
        {
            return(o_Swords[7]);
        }
        else if (_id == 109)
        {
            return(o_Swords[8]);
        }
        #endregion

        #region T_Swords 110 - 118
        if (_id == 110)
        {
            return(t_Swords[0]);
        }
        else if (_id == 111)
        {
            return(t_Swords[1]);
        }
        else if (_id == 112)
        {
            return(t_Swords[2]);
        }
        else if (_id == 113)
        {
            return(t_Swords[3]);
        }
        else if (_id == 114)
        {
            return(t_Swords[4]);
        }
        else if (_id == 115)
        {
            return(t_Swords[5]);
        }
        else if (_id == 116)
        {
            return(t_Swords[6]);
        }
        else if (_id == 117)
        {
            return(t_Swords[7]);
        }
        else if (_id == 118)
        {
            return(t_Swords[8]);
        }
        #endregion

        #region Daggers 119 - 127
        if (_id == 119)
        {
            return(dagger[0]);
        }
        else if (_id == 120)
        {
            return(dagger[1]);
        }
        else if (_id == 121)
        {
            return(dagger[2]);
        }
        else if (_id == 122)
        {
            return(dagger[3]);
        }
        else if (_id == 123)
        {
            return(dagger[4]);
        }
        else if (_id == 124)
        {
            return(dagger[5]);
        }
        else if (_id == 125)
        {
            return(dagger[6]);
        }
        else if (_id == 126)
        {
            return(dagger[7]);
        }
        else if (_id == 127)
        {
            return(dagger[8]);
        }
        #endregion

        #region O_Mace 128 - 136
        if (_id == 128)
        {
            return(o_Mace[0]);
        }
        else if (_id == 129)
        {
            return(o_Mace[1]);
        }
        else if (_id == 130)
        {
            return(o_Mace[2]);
        }
        else if (_id == 131)
        {
            return(o_Mace[3]);
        }
        else if (_id == 132)
        {
            return(o_Mace[4]);
        }
        else if (_id == 133)
        {
            return(o_Mace[5]);
        }
        else if (_id == 134)
        {
            return(o_Mace[6]);
        }
        else if (_id == 135)
        {
            return(o_Mace[7]);
        }
        else if (_id == 136)
        {
            return(o_Mace[8]);
        }
        #endregion

        #region T_Mace 137 - 144
        if (_id == 137)
        {
            return(t_Mace[0]);
        }
        else if (_id == 138)
        {
            return(t_Mace[1]);
        }
        else if (_id == 139)
        {
            return(t_Mace[2]);
        }
        else if (_id == 140)
        {
            return(t_Mace[3]);
        }
        else if (_id == 141)
        {
            return(t_Mace[4]);
        }
        else if (_id == 142)
        {
            return(t_Mace[5]);
        }
        else if (_id == 143)
        {
            return(t_Mace[6]);
        }
        else if (_id == 144)
        {
            return(t_Mace[7]);
        }
        #endregion

        #region Axe 145 - 152
        if (_id == 145)
        {
            return(axe[0]);
        }
        else if (_id == 146)
        {
            return(axe[1]);
        }
        else if (_id == 147)
        {
            return(axe[2]);
        }
        else if (_id == 148)
        {
            return(axe[3]);
        }
        else if (_id == 149)
        {
            return(axe[4]);
        }
        else if (_id == 150)
        {
            return(axe[5]);
        }
        else if (_id == 151)
        {
            return(axe[6]);
        }
        else if (_id == 152)
        {
            return(axe[7]);
        }
        #endregion

        #region Spear 153 - 158
        if (_id == 153)
        {
            return(spear[0]);
        }
        else if (_id == 154)
        {
            return(spear[1]);
        }
        else if (_id == 155)
        {
            return(spear[2]);
        }
        else if (_id == 156)
        {
            return(spear[3]);
        }
        else if (_id == 157)
        {
            return(spear[4]);
        }
        else if (_id == 158)
        {
            return(spear[5]);
        }
        #endregion

        #region Staff 159 - 166
        if (_id == 159)
        {
            return(staff[0]);
        }
        else if (_id == 160)
        {
            return(staff[1]);
        }
        else if (_id == 161)
        {
            return(staff[2]);
        }
        else if (_id == 162)
        {
            return(staff[3]);
        }
        else if (_id == 163)
        {
            return(staff[4]);
        }
        else if (_id == 164)
        {
            return(staff[5]);
        }
        else if (_id == 165)
        {
            return(staff[5]);
        }
        else if (_id == 166)
        {
            return(staff[5]);
        }
        #endregion

        #region Fist 167 - 170
        if (_id == 167)
        {
            return(fist[0]);
        }
        else if (_id == 168)
        {
            return(fist[1]);
        }
        else if (_id == 169)
        {
            return(fist[2]);
        }
        else if (_id == 170)
        {
            return(fist[3]);
        }

        #endregion

        #region Bow 171
        if (_id == 171)
        {
            return(Bow[0]);
        }
        #endregion

        else
        {
            return(null);
        }
    }