コード例 #1
0
ファイル: MapElementSpells.cs プロジェクト: TrutzX/9Nations
        public int CalcChance(string id)
        {
            var spell = L.b.spells[id];
            //calc base
            int start = 100 - total + spell.difficult;

            if (count.ContainsKey(id) && count[id] > 0)
            {
                start /= count[id];
            }

            return(ConvertHelper.Between(100 - start, 0, 100));
        }