コード例 #1
0
 public ModItem(int Index, ModItemStat Stat)
 {
     this.m_Index = Index;
     m_StatList   = new List <ModItemStat>
     {
         Stat
     };
     m_EffectList = new List <ModHitEffect>();
 }
コード例 #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);
        }
コード例 #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);
        }
コード例 #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");
     }
 }
コード例 #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);
     }
 }
コード例 #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>();
 }