コード例 #1
0
        private void MageApprenticeSearch(Magus mage)
        {
            // add bonus to area lore equal to casting total div 5?
            double folkKen = mage.GetAttribute(AttributeType.Perception).Value;

            folkKen += mage.GetCastingTotal(MagicArtPairs.InVi) / 10;
            double roll = Die.Instance.RollExplodingDie() + folkKen;

            if (roll > 12)
            {
                mage.Log.Add("Apprentice found");
                mage.TakeApprentice(CharacterFactory.GenerateNewApprentice());
                mage.Apprentice.Name = "Apprentice filius " + mage.Name;
            }
            // TODO: gradual reduction in chance?
        }
コード例 #2
0
ファイル: Activity.cs プロジェクト: ndilday/wizard-monks
 private void MageApprenticeSearch(Magus mage)
 {
     // add bonus to area lore equal to casting total div 5?
     double folkKen = mage.GetAttribute(AttributeType.Perception).Value;
     folkKen += mage.GetCastingTotal(MagicArtPairs.InVi) / 10;
     double roll = Die.Instance.RollExplodingDie() + folkKen;
     if (roll > 12)
     {
         mage.Log.Add("Apprentice found");
         mage.TakeApprentice(CharacterFactory.GenerateNewApprentice());
         mage.Apprentice.Name = "Apprentice filius " + mage.Name;
     }
     // TODO: gradual reduction in chance?
 }