Inheritance: Weapon
 public void Setup()
 {
     object1 = new Dagger("Object1", 20, 10);
     object2 = new IronNails("Object2", 10, 5);
     dummy1  = new Witch("Dummy", 100, object1, object2);
     dummy2  = new Witch("Dummy2", 100, object1, object2);
 }
Beispiel #2
0
        /// <inheritdoc />
        public Weapon Convert(ItemDTO value, object state)
        {
            var entity = new Dagger();

            this.Merge(entity, value, state);
            return(entity);
        }
Beispiel #3
0
        public void TestQuestParticipation()
        {
            QuestMatch game = ScenarioCreator.GameNoDeal(2);

            game.AttachLogger(new Quest.Core.Logger("TestQuestParticipation"));
            Player aiPlayer    = game.Players[0];
            Player otherPlayer = game.Players[1];

            aiPlayer.Behaviour = new Strategy3();

            RescueTheFairMaiden quest = new RescueTheFairMaiden(game); // 3 stages.

            game.CurrentStory = quest;

            //some cards
            Lance      lance      = new Lance(game);
            Dagger     dagger     = new Dagger(game);
            Sword      sword      = new Sword(game);
            Thieves    thieves    = new Thieves(game);
            SirGalahad sirGalahad = new SirGalahad(game);

            aiPlayer.Hand.Add(lance);
            otherPlayer.Hand.Add(dagger);
            otherPlayer.Hand.Add(sword);
            //other player has 2 cards, ai has 1, don't participate
            Assert.IsFalse(aiPlayer.Behaviour.ParticipateInQuest(quest, aiPlayer.Hand));

            aiPlayer.Hand.Add(thieves);
            //both players have 2 cards in hand, participate
            Assert.IsTrue(aiPlayer.Behaviour.ParticipateInQuest(quest, aiPlayer.Hand));

            aiPlayer.Hand.Add(sirGalahad);
            //ai player has 3 cards, other has 2, participate
            Assert.IsTrue(aiPlayer.Behaviour.ParticipateInQuest(quest, aiPlayer.Hand));
        }
Beispiel #4
0
        public void MaximumCloseCombatWeaponsReached()
        {
            var warrior = new WitchHunterCaptain();

            ICloseCombatWeapon singleHandenWeapon = new Dagger();
            ICloseCombatWeapon twoHandWeapon      = new WeepingBlades();

            Assert.IsFalse(warrior.MaximumCloseCombatWeaponsReached());
            warrior.AddEquipment(singleHandenWeapon);
            Assert.IsFalse(warrior.MaximumCloseCombatWeaponsReached());

            warrior.AddEquipment(singleHandenWeapon);
            warrior.AddEquipment(singleHandenWeapon);

            Assert.IsTrue(warrior.MaximumCloseCombatWeaponsReached());

            warrior.RemoveEquipment(singleHandenWeapon);
            warrior.RemoveEquipment(singleHandenWeapon);
            warrior.RemoveEquipment(singleHandenWeapon);

            Assert.AreEqual(0, warrior.Equipment.Count);

            warrior.AddEquipment(singleHandenWeapon);
            warrior.AddEquipment(twoHandWeapon);

            Assert.IsTrue(warrior.MaximumCloseCombatWeaponsReached());

            warrior.RemoveEquipment(singleHandenWeapon);
            Assert.IsTrue(warrior.MaximumCloseCombatWeaponsReached(), "Weeping blades is a pair");
        }
Beispiel #5
0
        public static void ActivatedLaneClear()
        {
            var q = LaneClearMenu["useQLC"].Cast <CheckBox>().CurrentValue&& Q.IsReady();
            var w = LaneClearMenu["useWLC"].Cast <CheckBox>().CurrentValue&& W.IsReady();
            var e = LaneClearMenu["useELC"].Cast <CheckBox>().CurrentValue&& E.IsReady();


            var d = Dagger.GetClosestDagger();


            var minion = EntityManager.MinionsAndMonsters.EnemyMinions.Where(t =>
                                                                             t.IsEnemy && !t.IsDead && t.IsValid && !t.IsInvulnerable &&
                                                                             t.IsInRange(EloBuddy.Player.Instance.Position, Q.Range));

            foreach (var m in minion)
            {
                if (q && m.IsValidTarget() && m.IsMinion)
                {
                    Q.Cast(m);
                }

                if (e && m.IsMinion && m.IsValidTarget() && !m.Position.IsUnderTurret())
                {
                    if (m.Position.IsInRange(d, W.Range))
                    {
                        E.Cast(GetBestDaggerPoint(d, m));
                    }
                }

                else if (w && m.IsMinion && m.IsValidTarget())
                {
                    W.Cast(m);
                }
            }
        }
Beispiel #6
0
        public MasterNecromancer1()
            : base(AIType.AI_Melee, FightMode.Closest, 10, 1, 0.2, 0.4)
        {
            Name = "Gror'tak Maitre des Squelettes";
            Body = 400;
            Hue  = 1109;

            Item shroud = new RobeACapuche(1870);

            shroud.Movable = false;
            AddItem(shroud);

            Item dagger = new Dagger();

            dagger.Name    = "Dague Maudite";
            dagger.Hue     = 34;
            dagger.Movable = false;
            AddItem(dagger);

            SetStr(250, 400);
            SetDex(50);
            SetInt(300, 400);

            SetHits(250, 400);

            SetDamage(15, 25);

            SetDamageType(ResistanceType.Physical, 100);

            SetResistance(ResistanceType.Physical, 100);
            SetResistance(ResistanceType.Fire, 50);
            SetResistance(ResistanceType.Cold, 50, 70);
            SetResistance(ResistanceType.Poison, 50, 70);
            SetResistance(ResistanceType.Energy, 70, 90);

            SetSkill(SkillName.MagicResist, 20.1, 30.0);
            SetSkill(SkillName.Fencing, 80.1, 100.0);
            SetSkill(SkillName.Tactics, 80.1, 100.0);
            SetSkill(SkillName.EvalInt, 100);
            SetSkill(SkillName.Magery, 60.1, 100.0);
            SetSkill(SkillName.Necromancy, 60.1, 100.0);
            Fame  = 15000;
            Karma = -15000;

            VirtualArmor = 80;

            PackItem(new CurseWeaponScroll());

            if (Utility.Random(4) == 0)
            {
                PackItem(new CurseWeaponScroll());
            }

            if (Utility.Random(20) == 0)
            {
                PackItem(new RobeACapuche(1870));
            }

            PackNecroReg(10, 30);
        }
Beispiel #7
0
        public CultistAssassin() : base(AIType.AI_Assassin, FightMode.Closest, 10, 1, 0.2, 0.4)
        {
            Name = "Assassin du Culte";
            Body = 0x190;

            SetStr(85, 120);
            SetDex(100, 120);
            SetInt(151, 200);

            SetHits(200);
            SetStam(150);
            SetMana(120);

            SetDamage(8, 10);

            SetDamageType(ResistanceType.Physical, 70);
            SetDamageType(ResistanceType.Poison, 30);

            SetResistance(ResistanceType.Physical, 30, 40);
            SetResistance(ResistanceType.Fire, 60, 80);
            SetResistance(ResistanceType.Cold, 40, 40);
            SetResistance(ResistanceType.Poison, 40, 50);
            SetResistance(ResistanceType.Energy, 50, 60);

            SetSkill(SkillName.Poisoning, 120.0);
            SetSkill(SkillName.MagicResist, 100, 120);
            SetSkill(SkillName.Tactics, 100.0);
            SetSkill(SkillName.Fencing, 90.1, 110.0);
            SetSkill(SkillName.Anatomy, 100.0);
            SetSkill(SkillName.Hiding, 100);
            SetSkill(SkillName.Stealth, 120.0);
            SetSkill(SkillName.Focus, 120.0);


            ActiveSpeed  = 0.12;
            PassiveSpeed = 0.250;


            Fame  = 5000;
            Karma = -5000;

            VirtualArmor = 40;


            HairItemID = 0;
            AddItem(new StuddedChest());
            AddItem(new StuddedArms());
            AddItem(new StuddedGloves());
            AddItem(new StuddedGorget());
            AddItem(new StuddedLegs());
            AddItem(new Boots());

            Dagger weapon = new Dagger();

            weapon.Movable = false;
            weapon.Quality = WeaponQuality.Exceptional;
            weapon.Attributes.WeaponDamage       = 40;
            weapon.WeaponAttributes.HitLeechHits = 30;
            AddItem(weapon);
        }
Beispiel #8
0
        public DavidTheForestExpert() : base(AIType.AI_Vendor, FightMode.None, 2, 1, 0.5, 2)
        {
            Name             = "David Cranshaw the forest expert - (Insecticide)";
            Body             = 400;
            Female           = false;
            Race             = Race.Human;
            Hue              = 33784;
            HairItemID       = 8253;
            HairHue          = 1116;
            FacialHairItemID = 8267;
            FacialHairHue    = 1116;

            InitStats(100, 100, 25);

            SetSkill(SkillName.Anatomy, 64.0, 100.0);
            SetSkill(SkillName.Fencing, 36.0, 68.0);
            SetSkill(SkillName.TasteID, 36.0, 68.0);
            SetSkill(SkillName.Cooking, 36.0, 68.0);
            SetSkill(SkillName.Tactics, 64.0, 100.0);

            AddItem(new DeerMask());
            AddItem(new BodySash(743));
            AddItem(new FancyShirt(643));
            AddItem(new ShortPants(853));
            AddItem(new LightBoots(993));

            Dagger weapon = new Dagger();

            weapon.Movable = true;
            AddItem(weapon);
        }
Beispiel #9
0
        public static void Execute()
        {
            var Champ = EntityManager.Heroes.Enemies.Where(x => x.Health < HandleDamageIndicator(x));

            if (MenuValue.Harass.UseQ && Q.IsReady())
            {
                var target = Q.GetTarget(Champ);
                if (target != null)
                {
                    Q.Cast(target);
                }
            }
            if (MenuValue.Harass.UseE && E.IsReady())
            {
                var dagger = Dagger.Where(x => x.Value.Item1 && !x.Key.Position.IsUnderEnemyTurret()).OrderBy(x => x.Key.Distance(TargetSelector.GetTarget(500, DamageType.Magical, x.Key.Position, true)));
                if (dagger.Any())
                {
                    if (MenuValue.Harass.UseW && W.IsReady())
                    {
                        if (W.Cast())
                        {
                            E.Cast(dagger.FirstOrDefault().Key.Position);
                        }
                    }
                }
            }
        }
Beispiel #10
0
    void Shoot()
    {
        Dagger d = Instantiate(dagger, transform.position, Quaternion.identity);

        d.angle = transform.rotation.eulerAngles.z + 90;
        d.speed = (float)speed;
//        d.angle = 270;
    }
Beispiel #11
0
    void Start()
    {
        var dagger = new Dagger();
        var curse  = new Curse();

        DebugPrint.PrintAnyDamageSubject(dagger); // dagger damage info
        DebugPrint.PrintAnyDamageSubject(curse);  // curse damage info
    }
Beispiel #12
0
    protected override void Awake()
    {
        mUnitType = UnitType.Archer;
        base.Awake();
        this.InitializeStats();

        mMeleeWeapon   = new Dagger(mLevel);
        mRangedWeapon  = new Crossbow(mLevel);
        mCurrentWeapon = mRangedWeapon;
    }
Beispiel #13
0
        public void ConstructorArgumentWithMatchingTypeShouldBeUsedIfUsingExplicitTypeArgumentSyntax()
        {
            var expectedWeapon = new Dagger();

            this.kernel.Bind <Samurai>().ToSelf().WithConstructorArgument(typeof(IWeapon), expectedWeapon);

            var samurai = this.kernel.Get <Samurai>();

            samurai.Weapon.Should().Be(expectedWeapon);
        }
Beispiel #14
0
        public void reset()
        {
            hp = 5.0f;
            inventory.Clear();

            Equipment dagger = new Dagger();

            pickUpItem(dagger);
            equip(dagger);
        }
Beispiel #15
0
    public void Fire()
    {
        GameObject go     = daggerSpawner.Get();
        Dagger     dagger = go.GetComponent <Dagger>();

        go.transform.position = transform.position;
        dagger.bearing        = familiar.transform.position - transform.position;

        go.SetActive(true);
    }
    protected override void Awake()
    {
        mUnitType = UnitType.Archer;
        base.Awake();
        this.InitializeStats();

        mMeleeWeapon = new Dagger (mLevel);
        mRangedWeapon = new Crossbow (mLevel);
        mCurrentWeapon = mRangedWeapon;
    }
Beispiel #17
0
        public void ConstructorArgumentWithMatchingTypeShouldBeUsed()
        {
            var expectedWeapon = new Dagger();

            this.kernel.Bind <Samurai>().ToSelf().WithConstructorArgument <IWeapon>(expectedWeapon);

            var samurai = this.kernel.Get <Samurai>();

            samurai.Weapon.Should().Be(expectedWeapon);
        }
Beispiel #18
0
        public static Dagger Generate()
        {
            Dagger d = new Dagger();

            d.Id    = 1;
            d.Name  = "匕首";
            d.Level = 1;
            d.ATK   = MainRandom.Gen(1, 3);
            return(d);
        }
Beispiel #19
0
        public rolph() : base(AIType.AI_Melee, FightMode.Aggressor, 10, 1, 0.2, 0.4)
        {
            Name  = "Rolph";
            Title = "The Obidient Servant";
            Body  = 0x190;
            Hue   = Utility.RandomSkinHue();

            AddItem(new Cloak(256));
            AddItem(new Robe(1161));
            AddItem(new Sandals());

            Dagger weapon = new Dagger();

            weapon.DurabilityLevel            = (WeaponDurabilityLevel)Utility.Random(0, 1);
            weapon.AccuracyLevel              = (WeaponAccuracyLevel)Utility.Random(5, 6);
            weapon.Skill                      = SkillName.Swords;
            weapon.Speed                      = 75;
            weapon.Hue                        = 77;
            weapon.Weight                     = 2;
            weapon.Movable                    = true;
            weapon.Attributes.SpellChanneling = 1;
            weapon.Quality                    = WeaponQuality.Exceptional;


            SetStr(100, 150);
            SetDex(200, 300);
            SetInt(200, 300);

            SetHits(2000, 2500);

            SetDamage(30, 35);

            PackItem(new HallegsArm());

            SetDamageType(ResistanceType.Physical, 100);



            SetResistance(ResistanceType.Physical, 15, 25);
            SetResistance(ResistanceType.Fire, 5, 15);
            SetResistance(ResistanceType.Cold, 25, 40);
            SetResistance(ResistanceType.Poison, 5, 10);
            SetResistance(ResistanceType.Energy, 10, 20);

            SetSkill(SkillName.MagicResist, 300, 300);
            SetSkill(SkillName.Wrestling, 160, 175);
            SetSkill(SkillName.Tactics, 300, 300);
            SetSkill(SkillName.Anatomy, 300, 300);
            SetSkill(SkillName.Swords, 180, 195);

            Fame  = 100000;
            Karma = 0;

            VirtualArmor = 6;
        }
Beispiel #20
0
        public override void Deserialize(GenericReader reader)
        {
            base.Deserialize(reader);

            int version = reader.ReadInt();

            if (version > 0)
            {
                Dagger = reader.ReadItem <Dagger>();
            }
        }
Beispiel #21
0
 void FireOne(Dagger dagger, AnimationState animation)
 {
     if (dagger.State == Dagger.DaggerState.Holstered)
     {
         animator.SetInteger("State", (int)animation);
         dagger.WillGrab();
     }
     else
     {
         dagger.Action();
     }
 }
Beispiel #22
0
    private void OnDaggerTriggerAreaEnter(Collider2D collision)
    {
        Dagger daggerDetect = collision.GetComponent <Dagger>();

        if (daggerDetect != null)
        {
            firstDaggCollision = true;
            daggerTriggerArea.gameObject.SetActive(false);
            SetDaggerPos();
            AudioManager.instance.PlaySfx("Slash4");
        }
    }
Beispiel #23
0
        public void TestSetupQuest2()
        {
            QuestMatch game = ScenarioCreator.GameNoDeal(1);

            game.AttachLogger(new Quest.Core.Logger("TestSetupQuest2"));
            Player sponsorAI = game.Players[0];

            sponsorAI.Behaviour = new Strategy1();

            // Setup quest
            SearchForTheQuestingBeast quest = new SearchForTheQuestingBeast(game); // 4 stages.

            game.CurrentStory = quest;
            quest.Sponsor     = sponsorAI;

            //cards, no test
            Giant   giant   = new Giant(game);   //40
            Lance   lance   = new Lance(game);   //20
            Mordred mordred = new Mordred(game); //30
            Sword   sword   = new Sword(game);   //10
            Sword   sword2  = new Sword(game);   //10
            Dagger  dagger  = new Dagger(game);  //5
            Dagger  dagger2 = new Dagger(game);  //5
            Thieves thieves = new Thieves(game); //5
            Boar    boar    = new Boar(game);    //5

            sponsorAI.Hand.Add(new List <Card>()
            {
                giant, lance, thieves, boar, mordred,
                dagger, dagger2, sword, sword2
            });

            List <AdventureCard>[] stages = sponsorAI.Behaviour.SetupQuest(quest, sponsorAI.Hand);
            Assert.AreEqual(4, stages.Length);

            //test last stage - should contain giant and lance
            Assert.AreEqual(2, stages[3].Count);
            Assert.IsTrue(stages[3].Contains(giant));
            Assert.IsTrue(stages[3].Contains(lance));

            //test 3rd stage - should be mordred and one of the daggers
            Assert.AreEqual(2, stages[2].Count);
            Assert.IsTrue(stages[2].Contains(mordred));
            Assert.IsTrue((stages[2].Contains(dagger)) || (stages[2].Contains(dagger2)));

            //test 2nd stage - thieves or boar, and one of the swords
            Assert.AreEqual(2, stages[1].Count);
            Assert.IsTrue((stages[1].Contains(thieves)) || (stages[1].Contains(boar)));
            Assert.IsTrue((stages[1].Contains(sword)) || (stages[1].Contains(sword2)));
            //test 1st stage - thieves or boar (whichever wasn't played previously)
            Assert.AreEqual(1, stages[0].Count);
            Assert.IsTrue((stages[1].Contains(thieves)) || (stages[1].Contains(boar)));
        }
        private static void AddBackpack(Mobile m)
        {
            Container pack = m.Backpack;

            if (pack == null)
            {
                pack         = new Backpack();
                pack.Movable = false;

                m.AddItem(pack);
            }

            if (Core.UOAI || Core.UOAR)
            {
                PackItem(new RedBook("a book", m.Name, 20, true));
                PackItem(new Gold(204));                        // Adam: add the magic starting gold of 204
                PackItem(new Dagger());
                PackItem(new Candle());
                PackItem(new Spyglass());                       // Adam: The spyglass is how you opperate a moongate. seems like a reasonable starting item

                // [NEW] Tower
                //RecallRune ocRune = new RecallRune();
                //ocRune.Target =	new Point3D( 1688, 1422, 0 );
                //ocRune.TargetMap = Map.Felucca;
                //ocRune.Description = "[NEW] Tower";
                //ocRune.Marked = true;
                //PackItem( ocRune );

                // add a book describing new
                //PackItem(NewBook());

                // wea: added newbie tent
                TentBag newbtent = new TentBag();
                PackItem(newbtent);
            }
            else if (Core.UOSP || Core.UOMO)
            {
                //daggers are newbie, everything else isn't
                Dagger dagger = new Dagger();
                PackItem(dagger);
                dagger.LootType = LootType.Newbied;

                PackItem(new Gold(100));
                PackItem(new IronIngot(25));
                PackItem(new Shovel());

                BagOfReagents regs = new BagOfReagents(10);
                PackItem(regs);

                //ADD back of 10 reagents
                PackItem(new Katana());
            }
        }
    protected override void Awake()
    {
        mUnitType = UnitType.Mage;
        base.Awake();
        this.InitializeStats();

        mMeleeWeapon = new Dagger (mLevel);
        mRangedWeapon = new IceWand (mLevel);
        mCurrentWeapon = mRangedWeapon;

        ((IceWand)mRangedWeapon).src = this;
    }
Beispiel #26
0
    protected override void Awake()
    {
        mUnitType = UnitType.Mage;
        base.Awake();
        this.InitializeStats();

        mMeleeWeapon   = new Dagger(mLevel);
        mRangedWeapon  = new IceWand(mLevel);
        mCurrentWeapon = mRangedWeapon;

        ((IceWand)mRangedWeapon).src = this;
    }
Beispiel #27
0
        static void Main(string[] args)
        {
            //Parte de Agustina Benia
            Dagger    dagger    = new Dagger("Dagger", 88, 34);
            IronNails ironNails = new IronNails("Iron Nails", 34, 78);
            Witch     witch1    = new Witch("Manon", 100, dagger, ironNails);
            Witch     witch2    = new Witch("Asterin", 100, dagger, ironNails);

            Console.WriteLine(witch1.MessageCharacter());
            Console.WriteLine(witch2.MessageCharacter());
            Console.WriteLine(witch2.MessageHealth());
            witch1.MakeDmg(witch2);
            Console.WriteLine(witch2.MessageHealth());
            witch2.RestoreHealth();
            Console.WriteLine(witch2.MessageHealth());

            // Parte de Yonatan Morgades
            Hammer    h      = new Hammer("Mjölnir", 200, 0);
            MagicRing m      = new MagicRing("One ring", 0, 800);
            Dwarves   dwarv1 = new Dwarves("ThorEnano", 200, h, m);
            Dwarves   dwarv2 = new Dwarves("ThorEnano 2", 100, h, m);

            Console.WriteLine(dwarv1.MessageCharacter());
            Console.WriteLine(dwarv2.MessageCharacter());
            Console.WriteLine(dwarv2.MessageHealth());
            dwarv1.MakeDmg(dwarv2);
            Console.WriteLine(dwarv2.MessageHealth());
            dwarv2.RestoreHealth();
            Console.WriteLine(dwarv2.MessageHealth());

            // Parte de Fabio Luzzatto
            SolarSword   sword  = new SolarSword("Solar Sword", 100, 0);
            SolarShield  shield = new SolarShield("Solar Shield", 0, 8000);
            DefenderElf1 elf1   = new DefenderElf1("Defender Elf", 100, sword, shield);
            DefenderElf1 elf2   = new DefenderElf1("Defender Elf 2", 100, sword, shield);

            Console.WriteLine(elf1.MessageCharacter());
            Console.WriteLine(elf2.MessageCharacter());
            Console.WriteLine(elf2.MessageHealth());
            elf1.MakeDmg(elf2);
            Console.WriteLine(elf2.MessageHealth());
            elf2.RestoreHealth();
            Console.WriteLine(elf2.MessageHealth());

            //Parte de Nicolas Velazquez
            Spell       crucio        = new Spell("Crucio", 50, 20);
            Spellbook   libro_hechizo = new Spellbook("Libro hechizos", crucio);
            WizardStick palo          = new WizardStick("Palo magico", 60, 0);
            Wizard      merlin        = new Wizard("Merlin", 100, libro_hechizo, palo);

            Console.WriteLine(libro_hechizo.Dmg);
        }
Beispiel #28
0
    public Weapons[] InitWeapons()
    {
        Weapons[] wepArr = new Weapons[6];

        wepArr[0] = new Dagger();
        wepArr[1] = new CrossBow();
        wepArr[2] = new Mace();
        wepArr[3] = new MorningStar();
        wepArr[4] = new Longsword();
        wepArr[5] = new BattleAxe();

        return(wepArr);
    }
Beispiel #29
0
 public Projectile ProduceProjectile()
 {
     if (this.Direction == Direction.Right)
     {
         Projectile attack = new Dagger((int)this.Position.X + this.Width + Config.OffsetX, (int)(this.Position.Y + this.Height), this.Direction, this.AttackDamage);
         return(attack);
     }
     else
     {
         Projectile attack = new Dagger((int)this.Position.X, (int)(this.Position.Y + this.Height), this.Direction, this.AttackDamage);
         return(attack);
     }
 }
Beispiel #30
0
        public ShadowVampire() : base(AIType.AI_Melee, FightMode.Closest, 10, 1, 0.4, 0.4)
        {
            Hue     += 16384;
            HairHue += 16384;

            SetSkill(SkillName.Swords, 35.0, 50.0);
            SetSkill(SkillName.Macing, 35.0, 75.0);
            SetSkill(SkillName.Fencing, 35.0, 75.0);
            SetSkill(SkillName.Tactics, 50.0);
            SetSkill(SkillName.MagicResist, 120.0);

            AddItem(NotCorpseCont(new Doublet(1194 + 16384)));
            AddItem(NotCorpseCont(new FancyShirt(1072 + 16384)));
            AddItem(NotCorpseCont(Rehued(new LeatherGloves(), 2424 + 16384)));
            AddItem(NotCorpseCont(new Boots(1175 + 16384)));
            AddItem(NotCorpseCont(new LongPants(2424 + 16384)));

            //if (0.2 >= Utility.RandomDouble())
            AddItem(NotCorpseCont(Renamed(Rehued(new GoldNecklace(), 1194), "Bloody Necklace")));

            BaseWeapon weapon = new Dagger();

            weapon.Hue    = 2949 + 16384;
            weapon.Name   = "a dagger of the undead";
            weapon.Slayer = SlayerName.Silver;
            //weapon.WeaponSlayerAttributes.Silver = 25;
            AddItem(weapon);

            PackItem(new DaemonBlood(Utility.RandomMinMax(1, 3)));

            SetResistance(ResistanceType.Physical, 100);
            SetResistance(ResistanceType.Fire, 25, 45);
            SetResistance(ResistanceType.Cold, 25, 65);
            SetResistance(ResistanceType.Poison, 100);
            SetResistance(ResistanceType.Energy, 100);

            Fame  = 6000;
            Karma = -6000;

            SetStr(250, 300);
            SetDex(76, 95);
            SetInt(36, 60);

            SetHits(250, 300);

            SetDamage(10, 15);

            SetDamageType(ResistanceType.Physical, 70);
            SetDamageType(ResistanceType.Cold, 30);
            VirtualArmor = 50;
        }
    // Start is called before the first frame update
    void Start()
    {
        GameManager.setWeaponsInChest();


        srWeapon = new StreamReader("C:\\Users\\Apozharsky\\Documents\\cvtcClasses\\Semester3\\GameDevelopment\\DungeonCrawler\\Assets\\TextFiles\\GeneralTextFiles\\ChestWeapons.txt");
        //srArmor = new StreamReader("");
        //srItem = new StreamReader("");

        line = srWeapon.ReadToEnd();

        // GameManager.testSettingWeapons();

        LongSword  longSword  = new LongSword();
        GreatSword greatSword = new GreatSword();
        Dagger     dagger     = new Dagger();

        string[] splitWeapon = new string[3] {
            "LongSword", "GreatSword", "Dagger"
        };
        string[] splitArmor = line.Split('\t');
        string[] splitItem  = line.Split('\t');

        weaponsCollection.Add("LongSword", longSword);
        weaponsCollection.Add("GreatSword", greatSword);
        weaponsCollection.Add("Dagger", dagger);

        weaponsArray[0] = weaponsCollection["LongSword"];
        weaponsArray[1] = weaponsCollection["GreatSword"];
        weaponsArray[2] = weaponsCollection["Dagger"];


        for (int i = 0; i < splitWeapon.Length; i++)
        {
            Debug.Log(splitWeapon[i]);
        }

        inc = 2;

        for (int i = 0; i < GameManager.weaponsCollection.Count; i++)
        {
            //   Debug.Log("Is inside the array: " + GameManager.weaponsCollection["LongSword"].Name);
            //   Debug.Log("Is inside the array: " + GameManager.weaponsCollection["GreatSword"].Name);
            //   Debug.Log("Is inside the array: " + GameManager.weaponsCollection["Dagger"].Name);
        }

        for (int i = 0; i < inc; i++)
        {
            // Debug.Log("Found Weapon: " + GameManager.weaponsArray[i].Name);
        }
    }
Beispiel #32
0
        private static Weapon GetWeapon()
        {
            Weapon        weakSpear      = new Spear("Old Spear", 5, 1, 4);
            Weapon        rustyDagger    = new Dagger("Rusty Dagger", 5, 1, 3, false);
            Weapon        PoisonedDagger = new Dagger("Poisoned Dagger", 5, 1, 4, true, 1);
            List <Weapon> weapons        = new List <Weapon>()
            {
                weakSpear,
                rustyDagger,
                PoisonedDagger
            };

            return(weapons[new Random().Next(weapons.Count)]);
        }
    void Start()
    {
        mWeapons = new SortedList();

        Weapon crossbow = new Crossbow();
        mCurrentWeapon = crossbow;
        mWeapons.Add (crossbow.Range, crossbow);

        Weapon dagger = new Dagger();
        mWeapons.Add (dagger.Range, dagger);

        mHealth = mDefaultHealth;
        mPreviousHealth = mHealth;
        mSprites = null;
    }