コード例 #1
0
 public TalismanGrammarofOrchish()
     : base(0x2F59)
 {
     Weight          = 1.0;
     TalismanType    = TalismanType.SummonOrcBrute;
     ProtectionTalis = ProtectionKillerEntry.GetRandom();
     ProtectionValue = 1 + Utility.Random(59);
     SkillBonuses.SetValues(0, SkillName.MagicResist, 5.0);
     SkillBonuses.SetValues(1, SkillName.Anatomy, 7.0);
     Charges = -1;
 }
コード例 #2
0
 public TalismanTravelingMinstrel()
     : base(0x2F5B)
 {
     Weight          = 1.0;
     ProtectionTalis = ProtectionKillerEntry.GetRandom();
     ProtectionValue = 1 + Utility.Random(59);
     SkillBonuses.SetValues(0, SkillName.Provocation, 5.0);
     SkillBonuses.SetValues(1, SkillName.Musicianship, 5.0);
     TalismanType = TalismanType.CurseRemoval;
     Charges      = -1;
 }
コード例 #3
0
 public TotemOfTheVoid()
     : base(0x2F5B)
 {
     Weight = 1.0;
     Hue    = 0x2D0;
     Attributes.LowerManaCost = 10;
     Attributes.RegenHits     = 2;
     ProtectionTalis          = ProtectionKillerEntry.GetRandom();
     ProtectionValue          = 1 + Utility.Random(59);
     TalismanType             = TalismanType.SummonRandom;
     Charges = -1;
 }
コード例 #4
0
ファイル: BloodwoodSpirit.cs プロジェクト: nogu3ira/xrunuo
 public BloodwoodSpirit()
     : base(0x2F5A)
 {
     Weight = 1.0;
     Hue    = 0x27;
     SkillBonuses.SetValues(0, SkillName.SpiritSpeak, 10.0);
     SkillBonuses.SetValues(1, SkillName.Necromancy, 5.0);
     ProtectionTalis = ProtectionKillerEntry.GetRandom();
     ProtectionValue = 1 + Utility.Random(59);
     TalismanType    = TalismanType.DamageRemoval;
     Charges         = -1;
 }
コード例 #5
0
        public RandomTalisman(int luck)
            : base(m_IDs[Utility.Random(4)])
        {
            Weight = 1.0;

            int n_props = Utility.Random(4);

            if (luck > Utility.Random(10000) && n_props < 4)
            {
                n_props++;
            }

            for (int i = 0; i <= n_props; i++)
            {
                int prop = 1 + Utility.Random(6);

                switch (prop)
                {
                case 1:                         // Killer
                {
                    if (KillersValue == 0)
                    {
                        KillersTalis = ProtectionKillerEntry.GetRandom();
                        KillersValue = 1 + Utility.Random(100);

                        if (luck > Utility.Random(10000))
                        {
                            KillersValue += 1 + Utility.Random(10);
                        }

                        if (KillersValue > 100)
                        {
                            KillersValue = 100;
                        }

                        break;
                    }
                    else
                    {
                        goto case 2;
                    }
                }

                case 2:                         // Protection
                {
                    if (ProtectionValue == 0)
                    {
                        ProtectionTalis = ProtectionKillerEntry.GetRandom();
                        ProtectionValue = 1 + Utility.Random(60);

                        if (luck > Utility.Random(10000))
                        {
                            ProtectionValue += 1 + Utility.Random(10);
                        }

                        if (ProtectionValue > 60)
                        {
                            ProtectionValue = 60;
                        }

                        break;
                    }
                    else
                    {
                        goto case 3;
                    }
                }

                case 3:                         // Slayer
                {
                    if (TalisSlayer == TalisSlayerName.None)
                    {
                        TalisSlayer = TalisSlayerEntry.GetRandom();
                        break;
                    }
                    else
                    {
                        goto case 4;
                    }
                }

                case 4:                         // Craft Bonus Regular
                {
                    if (CraftBonusRegularValue == 0)
                    {
                        CraftBonusRegular      = (CraftList)(1 + Utility.Random(9));
                        CraftBonusRegularValue = 1 + Utility.Random(30);

                        if (luck > Utility.Random(10000))
                        {
                            CraftBonusRegularValue += 1 + Utility.Random(5);
                        }

                        if (CraftBonusRegularValue > 30)
                        {
                            CraftBonusRegularValue = 30;
                        }

                        break;
                    }
                    else
                    {
                        goto case 5;
                    }
                }

                case 5:                         // Craft Bonus Excep
                {
                    if (CraftBonusExcepValue == 0)
                    {
                        if (CraftBonusRegularValue == 0)
                        {
                            goto case 4;
                        }
                        else
                        {
                            CraftBonusExcep      = CraftBonusRegular;
                            CraftBonusExcepValue = 1 + Utility.Random(30);

                            if (luck > Utility.Random(10000))
                            {
                                CraftBonusExcepValue += 1 + Utility.Random(5);
                            }

                            if (CraftBonusExcepValue > 30)
                            {
                                CraftBonusExcepValue = 30;
                            }

                            break;
                        }
                    }
                    else
                    {
                        goto case 6;
                    }
                }

                case 6:                         // Removal Summon
                {
                    TalismanType = (TalismanType)(1 + Utility.Random(25));
                    break;
                }

                default:                         // Removal Summon
                {
                    TalismanType = (TalismanType)(1 + Utility.Random(25));
                    break;
                }
                }
            }
        }