예제 #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
        protected override void DoAction(Character character)
        {
            if (character.GetType() == typeof(Magus))
            {
                character.Log.Add("Searching for a vis site in aura " + Aura.Strength.ToString("0.000"));
                Magus mage = (Magus)character;
                // add bonus to area lore equal to casting total div 5?
                // TODO: once spells are implemented, increase finding chances based on aura-detection spells
                double magicLore = mage.GetAbility(Abilities.MagicLore).Value;
                magicLore += mage.GetAttribute(AttributeType.Perception).Value;
                magicLore += mage.GetCastingTotal(MagicArtPairs.InVi) / 5;
                double roll = Die.Instance.RollDouble() * 5;

                // die roll will be 0-5; area lore will be between 0 and 25; aura will be 0-9, giving vis counts of 0-35
                double visSourceFound = Math.Sqrt(roll * magicLore * Aura.Strength);
                visSourceFound -= Aura.VisSources.Select(v => v.AnnualAmount).Sum();
                if (visSourceFound > 1.0)
                {
                    Season  seasons    = DetermineSeasons(ref visSourceFound);
                    Ability art        = DetermineArt();
                    string  logMessage = art.AbilityName + " vis source of size " + visSourceFound.ToString("0.000") + " found: ";
                    if ((seasons & Season.Spring) == Season.Spring)
                    {
                        logMessage += "Sp";
                    }
                    if ((seasons & Season.Summer) == Season.Summer)
                    {
                        logMessage += "Su";
                    }
                    if ((seasons & Season.Autumn) == Season.Autumn)
                    {
                        logMessage += "Au";
                    }
                    if ((seasons & Season.Winter) == Season.Winter)
                    {
                        logMessage += "Wi";
                    }
                    mage.Log.Add(logMessage);
                    Aura.VisSources.Add(new VisSource(Aura, art, seasons, visSourceFound));
                }
            }
        }
예제 #3
0
        private void MageAuraSearch(Magus mage)
        {
            // add bonus to area lore equal to casting total div 10?
            // TODO: once spells are implemented, increase finding chances based on aura-detection spells
            double areaLore = mage.GetAbility(Abilities.AreaLore).Value;

            areaLore += mage.GetAttribute(AttributeType.Perception).Value;
            areaLore += mage.GetCastingTotal(MagicArtPairs.InVi) / 10;
            double roll = Die.Instance.RollDouble() * 5;

            // die roll will be 0-5; area lore will be between 0 and 15, giving auras between 0 and 9
            double auraFound = Math.Sqrt(roll * areaLore / (mage.KnownAuras.Count() + 1));

            if (auraFound > 1)
            {
                Aura aura = new Aura(Domain.Magic, auraFound);
                mage.Log.Add("Found an aura of strength " + auraFound.ToString("0.000"));
                mage.KnownAuras.Add(aura);
                if (mage.Covenant == null || (mage.Laboratory == null && mage.Covenant.Aura.Strength < aura.Strength))
                {
                    mage.FoundCovenant(aura);
                }
            }
        }
예제 #4
0
        private void MageAuraSearch(Magus mage)
        {
            // add bonus to area lore equal to casting total div 10?
            // TODO: once spells are implemented, increase finding chances based on aura-detection spells
            double areaLore = mage.GetAbility(Abilities.AreaLore).Value;
            areaLore += mage.GetAttribute(AttributeType.Perception).Value;
            areaLore += mage.GetCastingTotal(MagicArtPairs.InVi) / 10;
            double roll = Die.Instance.RollDouble() * 5;

            // die roll will be 0-5; area lore will be between 0 and 15, giving auras between 0 and 9
            double auraFound = Math.Sqrt(roll * areaLore / (mage.KnownAuras.Count() + 1));
            if (auraFound > 1)
            {
                Aura aura = new Aura(Domain.Magic, auraFound);
                mage.Log.Add("Found an aura of strength " + auraFound.ToString("0.00"));
                mage.KnownAuras.Add(aura);
                if (mage.Covenant == null || (mage.Laboratory == null && mage.Covenant.Aura.Strength < aura.Strength))
                {
                    mage.FoundCovenant(aura);
                }
            }
        }
예제 #5
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?
 }