Exemplo n.º 1
0
 public ModItem(int Index, ModItemStat Stat)
 {
     this.m_Index = Index;
     m_StatList   = new List <ModItemStat>
     {
         Stat
     };
     m_EffectList = new List <ModHitEffect>();
 }
Exemplo n.º 2
0
        /// <summary>
        /// Get Multiplicative Bonus from Count
        /// </summary>
        /// <param name="Stat"></param>
        /// <param name="Count"></param>
        /// <returns></returns>
        public float GetMultStackBonusFromCount(StatIndex Stat, int Count)
        {
            ModItemStat s = m_StatList.Find(x => x.Stat == Stat);

            if (s != null)
            {
                return(s.GetPercentBonusFromCount(Count));
            }
            return(0);
        }
Exemplo n.º 3
0
        /// <summary>
        /// Multiplicative bonus Per item after the first one
        /// </summary>
        /// <param name="Stat"></param>
        /// <returns></returns>
        public float MultStackBonus(StatIndex Stat)
        {
            ModItemStat s = m_StatList.Find(x => x.Stat == Stat);

            if (s != null)
            {
                return(s.MultStackBonus);
            }
            return(0);
        }
Exemplo n.º 4
0
 static public void AddStatToItem(int index, ModItemStat stat)
 {
     if (ModItemDictionary.ContainsKey(index))
     {
         ModItemDictionary[index] += stat;
     }
     else
     {
         throw new Exception("ModItemManager ERROR : int does not exist in ModItemDictionary");
     }
 }
Exemplo n.º 5
0
 static private void DefaultStatItem(int index, ModItemStat stat)
 {
     if (m_DefaultModItemDictionary.ContainsKey(index))
     {
         m_DefaultModItemDictionary[index] += stat;
     }
     else
     {
         throw new Exception("ModItemManager ERROR : int does not exist in m_DefaultModItemDictionary\nBtw you shouldn't mess with this boi !  Index :  " + index);
     }
 }
Exemplo n.º 6
0
 public ModItem(int Index, ModItemStat Stat1, ModItemStat Stat2, ModItemStat Stat3, ModItemStat Stat4)
 {
     this.m_Index = Index;
     m_StatList   = new List <ModItemStat>
     {
         Stat1,
         Stat2,
         Stat3,
         Stat4
     };
     m_EffectList = new List <ModHitEffect>();
 }