public static BaseHero CreateHero(string name, string type)
        {
            BaseHero curHero;

            if (type == "Druid")
            {
                curHero = new Druid(name);
            }
            else if (type == "Paladin")
            {
                curHero = new Paladin(name);
            }
            else if (type == "Rogue")
            {
                curHero = new Rogue(name);
            }
            else if (type == "Warrior")
            {
                curHero = new Warrior(name);
            }
            else
            {
                throw new InvalidOperationException(INV_HERO);
            }

            return(curHero);
        }
        public BaseHero CreateHero(string heroName, string heroType)
        {
            BaseHero hero;

            switch (heroType)
            {
            case "Druid":
                hero = new Druid(heroName);
                break;

            case "Paladin":
                hero = new Paladin(heroName);
                break;

            case "Rogue":
                hero = new Rogue(heroName);
                break;

            case "Warrior":
                hero = new Warrior(heroName);
                break;

            default:
                throw new ArgumentException(INVALID_HERO_TYPE_MSG);
            }

            return(hero);
        }
Example #3
0
        public static BaseHero Create(string heroName, string heroRole)
        {
            BaseHero currHero = null;

            if (heroRole.ToLower() == "paladin")
            {
                currHero = new Paladin(heroName);
            }
            else if (heroRole.ToLower() == "warrior")
            {
                currHero = new Warrior(heroName);
            }
            else if (heroRole.ToLower() == "druid")
            {
                currHero = new Druid(heroName);
            }
            else if (heroRole.ToLower() == "rogue")
            {
                currHero = new Rogue(heroName);
            }
            else
            {
                Console.WriteLine($"Invalid hero!");
            }

            return(currHero);
        }
Example #4
0
        public BaseHero CreateHero(string name, string type)
        {
            BaseHero hero = null;

            switch (type)
            {
            case "Druid":
                hero = new Druid(name);
                break;

            case "Paladin":
                hero = new Paladin(name);
                break;

            case "Rogue":
                hero = new Rogue(name);
                break;

            case "Warrior":
                hero = new Warrior(name);
                break;
            }
            if (hero == null)
            {
                throw new Exception("Invalid hero!");
            }
            return(hero);
        }
Example #5
0
        public BaseHero ProduceHero(string type, string name)
        {
            BaseHero baseHero = null;
            int      power    = 0;

            switch (type)
            {
            case "Druid":
                power    = 80;
                baseHero = new Druid(name, power);
                break;

            case "Paladin":
                power    = 100;
                baseHero = new Paladin(name, power);
                break;

            case "Rogue":
                power    = 80;
                baseHero = new Rogue(name, power);
                break;

            case "Warrior":
                power    = 100;
                baseHero = new Warrior(name, power);
                break;

            default:
                throw new ArgumentException(ExceptionMessages.INVALID_HERO_EXCEPTION);
            }
            return(baseHero);
        }
Example #6
0
        public BaseHero ProduceHero(string name, string type)
        {
            BaseHero hero = null;

            if (type == HeroType.Druid.ToString())
            {
                hero = new Druid(name);
            }
            else if (type == HeroType.Paladin.ToString())
            {
                hero = new Paladin(name);
            }
            else if (type == HeroType.Rogue.ToString())
            {
                hero = new Rogue(name);
            }
            else if (type == HeroType.Warrior.ToString())
            {
                hero = new Warrior(name);
            }
            else if (hero == null)
            {
                throw new ArgumentException("Invalid hero!");
            }

            return(hero);
        }
Example #7
0
        public static BaseHero CreateHero(string hero, string name)
        {
            BaseHero baseHero;

            if (hero == "Druid")
            {
                baseHero = new Druid(name);
            }
            else if (hero == "Paladin")
            {
                baseHero = new Paladin(name);
            }
            else if (hero == "Rogue")
            {
                baseHero = new Rogue(name);
            }
            else if (hero == "Warrior")
            {
                baseHero = new Warrior(name);
            }
            else
            {
                throw new InvalidHeroException();
            }

            return(baseHero);
        }
Example #8
0
        public Spells(Rogue newRogueSpells)
        {
            this.rogueSpells = newRogueSpells;

            if (rogueSpells.Equals(Rogue.Backstab))
            {
                this.spellName   = "Backstab";
                this.spellValue  = 130;
                this.spellClass  = new Classes(Classes.Class.Rouge);
                this.kindOfSpell = KindOfSpell.Damage;
                this.mana        = 30;
            }
            if (rogueSpells.Equals(Rogue.Eviscerate))
            {
                this.spellName   = "Eviscerate";
                this.spellValue  = 190;
                this.spellClass  = new Classes(Classes.Class.Rouge);
                this.kindOfSpell = KindOfSpell.Damage;
                this.mana        = 50;
            }
            if (rogueSpells.Equals(Rogue.ShadowDance))
            {
                this.spellName   = "Shadow Dance";
                this.spellValue  = 520;
                this.spellClass  = new Classes(Classes.Class.Rouge);
                this.kindOfSpell = KindOfSpell.LifeSteal;
                this.mana        = 80;
            }
        }
Example #9
0
    // point to an inventory object
    public void Store(GameObject newItem)
    {
        // clear out the slot
        Clear();

        // set the new item as main
        item = newItem;

        // update the image displayed in the ui
        if (newItem.GetComponent <SpriteRenderer> ())
        {
            renderer.color  = Color.white;
            renderer.sprite = newItem.GetComponent <SpriteRenderer> ().sprite;
        }

        // capture rogue, weapon or armor item for further evaluation
        Rogue  rogue  = newItem.GetComponent <Rogue> ();
        Weapon weapon = newItem.GetComponent <Weapon> ();
        Armor  armor  = newItem.GetComponent <Armor> ();

        // resize weapon item
        if (weapon != null)
        {
            renderer.rectTransform.localPosition = new Vector3(-1f, 2f, 0f);
            renderer.rectTransform.sizeDelta     = new Vector2(55f, 115f);
            renderer.rectTransform.localRotation = Quaternion.Euler(Vector3.forward * 24f);
        }

        if (armor != null)
        {
            renderer.rectTransform.localPosition = new Vector3(0f, 1f, 0f);
            renderer.rectTransform.sizeDelta     = new Vector2(75f, 100f);
        }

        // resize armor item

        // break out a rogue's weapon and armor to display
        if (rogue != null && rogue.equipment["weapon"] != null)
        {
            // render weapon image
            bgRenderer.color  = Color.white;
            bgRenderer.sprite = rogue.equipment["weapon"].GetComponent <SpriteRenderer> ().sprite;

            // resize the attached weapon to fit behind rogue hand
            // TODO: avoid hardcoding this here
            bgRenderer.rectTransform.localPosition = new Vector3(-32f, 10.5f, 0f);
            bgRenderer.rectTransform.sizeDelta     = new Vector2(35f, 78f);
        }
        if (rogue != null && rogue.equipment ["armor"] != null)
        {
            // set the armor image
            fgRenderer.color  = Color.white;
            fgRenderer.sprite = rogue.equipment ["armor"].GetComponent <SpriteRenderer> ().sprite;

            // resize the attached armor to fit in front of rogue
            // TODO: avoid hardcoding this here
            fgRenderer.rectTransform.localPosition = new Vector3(1.75f, 4.8f, 0f);
            fgRenderer.rectTransform.sizeDelta     = new Vector2(65f, 85f);
        }
    }
Example #10
0
        public BaseHero ProduceHero(string type, string name)
        {
            BaseHero bhero = null;

            if (type == "Druid")
            {
                bhero = new Druid(name);
            }
            else if (type == "Paladin")
            {
                bhero = new Paladin(name);
            }
            else if (type == "Rogue")
            {
                bhero = new Rogue(name);
            }
            else if (type == "Warrior")
            {
                bhero = new Warrior(name);
            }

            if (bhero == null)
            {
                throw new ArgumentException(ExceptionMessages.InvalidHeroExcMsg);
            }
            return(bhero);
        }
Example #11
0
        public BaseHero CreateHero(string name, string heroType)
        {
            BaseHero hero = null;

            if (heroType == "Druid")
            {
                hero = new Druid(name);
            }
            else if (heroType == "Paladin")
            {
                hero = new Paladin(name);
            }
            else if (heroType == "Rogue")
            {
                hero = new Rogue(name);
            }
            else if (heroType == "Warrior")
            {
                hero = new Warrior(name);
            }
            else
            {
                throw new ArgumentException(Common.Constants.InvalidHeroExcMsg);
            }
            return(hero);
        }
Example #12
0
        public static BaseHero CreateHero(string heroType, string heroName)
        {
            BaseHero baseHero;

            if (heroType == "Druid")
            {
                baseHero = new Druid(heroName);
            }
            else if (heroType == "Paladin")
            {
                baseHero = new Paladin(heroName);
            }
            else if (heroType == "Rogue")
            {
                baseHero = new Rogue(heroName);
            }
            else if (heroType == "Warrior")
            {
                baseHero = new Warrior(heroName);
            }
            else
            {
                throw new ArgumentException("Invalid hero!");
            }

            return(baseHero);
        }
Example #13
0
    public void CreateCharacter(ECharacterType characterType, string name, int level)
    {
        BaseCharacter newCharacter = new BaseCharacter();

        switch (characterType)
        {
        case ECharacterType.WARRIOR:
            Warrior newWarrior = gameObject.AddComponent <Warrior>();
            newWarrior.InitializeCharacter(name, level);
            AddCharacter(newWarrior);
            newCharacter = newWarrior;
            break;

        case ECharacterType.ROGUE:
            Rogue newRogue = gameObject.AddComponent <Rogue>();
            newRogue.InitializeCharacter(name, level);
            AddCharacter(newRogue);
            newCharacter = newRogue;
            break;

        case ECharacterType.MAGE:
            Mage newMage = gameObject.AddComponent <Mage>();
            newMage.InitializeCharacter(name, level);
            AddCharacter(newMage);
            newCharacter = newMage;
            break;
        }

        allCharacters.Add(newCharacter);
    }
Example #14
0
        public void ResetClassStats(List <CharClass> partyMembers)
        {
            foreach (var member in partyMembers)
            {
                switch (member.classType)
                {
                case CharClass.WARRIOR:
                {
                    Warrior freshClass = new Warrior();
                    member.itemFind          = freshClass.itemFind;
                    member.xpBonus           = freshClass.xpBonus;
                    member.coinBonus         = freshClass.coinBonus;
                    member.preventDeathBonus = freshClass.preventDeathBonus;
                    member.successChance     = freshClass.successChance;
                } break;

                case CharClass.MAGE:
                {
                    Mage freshClass = new Mage();
                    member.itemFind          = freshClass.itemFind;
                    member.xpBonus           = freshClass.xpBonus;
                    member.coinBonus         = freshClass.coinBonus;
                    member.preventDeathBonus = freshClass.preventDeathBonus;
                    member.successChance     = freshClass.successChance;
                } break;

                case CharClass.ROGUE:
                {
                    Rogue freshClass = new Rogue();
                    member.itemFind          = freshClass.itemFind;
                    member.xpBonus           = freshClass.xpBonus;
                    member.coinBonus         = freshClass.coinBonus;
                    member.preventDeathBonus = freshClass.preventDeathBonus;
                    member.successChance     = freshClass.successChance;
                } break;

                case CharClass.RANGER:
                {
                    Ranger freshClass = new Ranger();
                    member.itemFind          = freshClass.itemFind;
                    member.xpBonus           = freshClass.xpBonus;
                    member.coinBonus         = freshClass.coinBonus;
                    member.preventDeathBonus = freshClass.preventDeathBonus;
                    member.successChance     = freshClass.successChance;
                } break;

                case CharClass.CLERIC:
                {
                    Cleric freshClass = new Cleric();
                    member.itemFind          = freshClass.itemFind;
                    member.xpBonus           = freshClass.xpBonus;
                    member.coinBonus         = freshClass.coinBonus;
                    member.preventDeathBonus = freshClass.preventDeathBonus;
                    member.successChance     = freshClass.successChance;
                } break;

                default: break;
                }
            }
        }
Example #15
0
        // [TestCase("2pack","elf")]
        public void TryToCreateHero(string name, string @class)
        {
            BaseHero hero;

            switch (@class)
            {
            case "Druid":
                hero = new Druid(name);
                break;

            case "Paladin":
                hero = new Paladin(name);
                break;

            case "Rogue":
                hero = new Rogue(name);
                break;

            case "Warrior":
                hero = new Warrior(name);
                break;

            default:
                Assert.Fail();
                break;
            }
        }
        public IBaseHero ProduceHero(string type, string name)
        {
            IBaseHero hero = null;

            if (type == "Druid")
            {
                hero = new Druid(name, 80);
            }
            else if (type == "Paladin")
            {
                hero = new Paladin(name, 100);
            }
            else if (type == "Rogue")
            {
                hero = new Rogue(name, 80);
            }
            else if (type == "Warrior")
            {
                hero = new Warrior(name, 100);
            }
            else
            {
                throw new ArgumentException("Invalid hero!");
            }

            return(hero);
        }
Example #17
0
        public void TryToHitWithHero(string name, string @class)
        {
            BaseHero hero;

            switch (@class)
            {
            case "Druid":
                hero = new Druid(name);
                break;

            case "Paladin":
                hero = new Paladin(name);
                break;

            case "Rogue":
                hero = new Rogue(name);
                break;

            case "Warrior":
                hero = new Warrior(name);
                break;

            default:
                Assert.Fail();
                return;
            }
            var result   = hero.CastAbility();
            var heroName = hero.Name;
            var strength = hero.Power.ToString();

            Assert.IsTrue(result.Contains(heroName) && result.Contains(strength));
        }
Example #18
0
        public BaseHero CreateHero(string name, string type)
        {
            BaseHero hero = null;

            if (type == "Druid")
            {
                hero = new Druid(name, type);
            }
            else if (type == "Paladin")
            {
                hero = new Paladin(name, type);
            }
            else if (type == "Rogue")
            {
                hero = new Rogue(name, type);
            }
            else if (type == "Warrior")
            {
                hero = new Warrior(name, type);
            }

            if (hero == null)
            {
                throw new ArgumentException("Invalid hero!");
            }

            return(hero);
        }
Example #19
0
    public static Character CreateSpecificCharacter(CharacterData cd)
    {
        Character temp;

        switch (cd.characterProfession)
        {
        case Character.Profession.warrior:
            temp = new Warrior();
            break;

        case Character.Profession.rogue:
            temp = new Rogue();
            break;

        case Character.Profession.blackmage:
            temp = new BlackMage();
            break;

        case Character.Profession.whitemage:
            temp = new WhiteMage();
            break;

        default:
            temp = new Rogue();
            break;
        }
        temp.Initialize(cd);
        return(temp);
    }
        private BaseHero CreateHero(string name, string heroType)
        {
            BaseHero baseHero = null;

            if (heroType == "Paladin")
            {
                baseHero = new Paladin(name);
            }
            else if (heroType == "Druid")
            {
                baseHero = new Druid(name);
            }
            else if (heroType == "Rogue")
            {
                baseHero = new Rogue(name);
            }
            else if (heroType == "Warrior")
            {
                baseHero = new Warrior(name);
            }
            if (baseHero == null)
            {
                throw new InvalidTypeOfHeroException();
            }

            return(baseHero);
        }
Example #21
0
        public IBaseHero CreateHero(string name, string type)
        {
            IBaseHero curHero = null;

            switch (type)
            {
            case "Druid":
                curHero = new Druid(name);
                break;

            case "Paladin":
                curHero = new Paladin(name);
                break;

            case "Rogue":
                curHero = new Rogue(name);
                break;

            case "Warrior":
                curHero = new Warrior(name);
                break;

            default:
                throw new ArgumentException("Invalid hero!");
            }
            return(curHero);
        }
Example #22
0
        public BaseHero CreateHero(string name, string type)
        {
            BaseHero hero = null;

            if (type == "Druid")
            {
                hero = new Druid(name);
            }
            else if (type == "Paladin")
            {
                hero = new Paladin(name);
            }
            else if (type == "Rogue")
            {
                hero = new Rogue(name);
            }
            else if (type == "Warrior")
            {
                hero = new Warrior(name);
            }
            else
            {
                throw new InvalidOperationException(ExceptionMessages.InvalidHeroType);
            }

            return(hero);
        }
Example #23
0
    private DataHeroes()
    {
        if (SaveData.isHaveData(saveDataFileName))
        {
            archerExp = instance.archerExp;
            sniperExp = instance.sniperExp;
            rogueExp = instance.rogueExp;
            dukunExp = instance.dukunExp;

            archerLocked = instance.archerLocked;
            sniperLocked = instance.sniperLocked;
            rogueLocked = instance.rogueLocked;
            dukunLocked = instance.dukunLocked;
        }
        else
        {
            archerExp = 0;
            sniperExp = 0;
            rogueExp = 0;
            dukunExp = 0;

            archerLocked = true;
            sniperLocked = true;
            rogueLocked = true;
            dukunLocked = true;
        }
        archerModel = new Archer(archerExp, archerLocked);
        sniperModel = new Sniper(sniperExp, sniperLocked);
        dukunModel = new Dukun(dukunExp, dukunLocked);
        rogueModel = new Rogue(rogueExp, rogueLocked);
    }
Example #24
0
        public BaseHero CreateHero(string type, string name)
        {
            BaseHero hero = null;

            switch (type)
            {
            case "Druid":
                hero = new Druid(name);
                break;

            case "Paladin":
                hero = new Paladin(name);
                break;

            case "Rogue":
                hero = new Rogue(name);
                break;

            case "Warrior":
                hero = new Warrior(name);
                break;
            }
            if (hero == null)
            {
                throw new ArgumentException(ExceptionMessages.InvalidHeroException);
            }

            return(hero);
        }
Example #25
0
        public IHero CreatHero(string heroName, string heroType)
        {
            IHero hero = null;

            if (heroType == "Druid")
            {
                hero = new Druid(heroName);
            }
            else if (heroType == "Paladin")
            {
                hero = new Paladin(heroName);
            }
            else if (heroType == "Rogue")
            {
                hero = new Rogue(heroName);
            }
            else if (heroType == "Warrior")
            {
                hero = new Warrior(heroName);
            }

            if (hero == null)
            {
                throw new ArgumentException(ExceptionMessages.InvalidHeroMsg);
            }

            return(hero);
        }
        public BaseHero ProduceHero(string type, string name)
        {
            BaseHero hero = null;

            if (type == "Druid")
            {
                hero = new Druid(name);
            }
            else if (type == "Paladin")
            {
                hero = new Paladin(name);
            }
            else if (type == "Rogue")
            {
                hero = new Rogue(name);
            }
            else if (type == "Warrior")
            {
                hero = new Warrior(name);
            }
            if (hero == null)
            {
                throw new InvalidHeroException();
            }
            return(hero);
        }
Example #27
0
        public BaseHero CreateHero(string name, string type)
        {
            BaseHero hero;

            if (type.Equals("Druid"))
            {
                hero = new Druid(name);
            }
            else if (type.Equals("Paladin"))
            {
                hero = new Paladin(name);
            }
            else if (type.Equals("Rogue"))
            {
                hero = new Rogue(name);
            }
            else if (type.Equals("Warrior"))
            {
                hero = new Warrior(name);
            }
            else
            {
                throw new ArgumentException("Invalid hero!");
            }

            return(hero);
        }
 public static void AddRogue(Character character)
 {
     Rogue.Base(character);
     Rogue.Features(character);
     Rogue.Equipment(character);
     character.Archetype = Rogue.RoguishArchetype;
 }
Example #29
0
        public void AddToRaidGroup()
        {
            int raidGroupNumber = int.Parse(Console.ReadLine());

            while (raidGroupNumber > 0)
            {
                string   name   = Console.ReadLine();
                string   @class = Console.ReadLine();
                BaseHero hero;
                switch (@class)
                {
                case "Druid":
                    hero = new Druid(name);
                    break;

                case "Paladin":
                    hero = new Paladin(name);
                    break;

                case "Rogue":
                    hero = new Rogue(name);
                    break;

                case "Warrior":
                    hero = new Warrior(name);
                    break;

                default:
                    Console.WriteLine("Invalid hero!");
                    continue;
                }
                this.heroes.Add(hero);
                raidGroupNumber--;
            }
        }
Example #30
0
        public BaseHero CreateHero(string name, string type)
        {
            BaseHero hero;

            if (type == "Druid")
            {
                hero = new Druid(name, 80);
            }
            else if (type == "Paladin")
            {
                hero = new Paladin(name, 100);
            }
            else if (type == "Rogue")
            {
                hero = new Rogue(name, 80);
            }
            else if (type == "Warrior")
            {
                hero = new Warrior(name, 100);
            }
            else
            {
                throw new InvalidOperationException("Invalid hero!");
            }

            return(hero);
        }
Example #31
0
        public IHero CreateHero(string heroType, string heroName)
        {
            IHero hero = null;

            if (heroType == nameof(Druid))
            {
                hero = new Druid(heroName);
            }
            if (heroType == nameof(Paladin))
            {
                hero = new Paladin(heroName);
            }
            if (heroType == nameof(Rogue))
            {
                hero = new Rogue(heroName);
            }
            if (heroType == nameof(Warrior))
            {
                hero = new Warrior(heroName);
            }
            else
            {
                return(hero);
            }
            return(hero);
        }
Example #32
0
        public static void Main()
        {
            var resolution = new VideoMode(WIDTH, HEIGHT, 32);
            var windowSettings = new ContextSettings(32, 0, 4);
            var window = new RenderWindow(resolution, "Lockheed the Game", Styles.Close, windowSettings);

            window.Closed += Events.OnClose;
            window.KeyPressed += Events.OnKeyPressed;
            window.KeyReleased += Events.OnKeyReleased;
            window.MouseButtonPressed += Events.OnMouseButtonPressed;
            window.SetActive();

            Level.Level newLevel = Level.Level.GenerateSingleLevel();
            Character.Character glava = new Rogue("glava");

            glava.CurrentSkill = new ProjectileSkill(
                "fireball", 10, 10, 10, Tier.Beginner, 5, "weapons/projectiles/fireBall.png", 5);

            EntityManager.CurrentLevel = newLevel;
            EntityManager.Character = glava;

            DateTime lastTick = DateTime.Now;
            while (window.IsOpen())
            {
                float dt = (float)(DateTime.Now - lastTick).TotalMilliseconds;
                lastTick = DateTime.Now;
                window.DispatchEvents();

                while (dt > 0)
                {
                    EntityManager.Update();
                    dt -= MAX_TIMESTEP;
                }

                window.Clear(Color.Black);
                EntityManager.Draw(window);
                window.Display();
            }
        }
Example #33
0
 private bool MonsterIsNotInRoom(Rogue.room room)
 {
     return !MonsterIsInRoom(room);
 }
Example #34
0
 public void RogueDoesTripleDamageOnCritAttack()
 {
     var rogue = new Rogue();
     var enemy = new Fighter();
     rogue.Attack(20, enemy);
     Assert.AreEqual(2, enemy.HitPoints);
 }
Example #35
0
 public void RogueDexterityModifierShouldBeAddedToDiceRoll()
 {
     var rogue = new Rogue();
     var enemy = new Character();
     enemy.ArmorClass = 3;
     rogue.Attributes["Dexterity"].AttributeScore = 12;
     rogue.Attack(2, enemy);
     Assert.AreEqual(4, enemy.HitPoints);
 }
Example #36
0
 public void RogueIgnoresDexterityModifier()
 {
     var rogue = new Rogue();
     var enemy = new Fighter();
     enemy.Attributes["Dexterity"].AttributeScore = 14;
     rogue.Attack(10, enemy);
     Assert.AreEqual(4, enemy.HitPoints);
 }
 private void AddRogueWin(HSCounter hsc)
 {
     Rogue rogue = new Rogue();
     rogue.WinButton_Clicked(hsc);
 }
 private void AddRogueLoss(HSCounter hsc)
 {
     Rogue rogue = new Rogue();
     rogue.LoseButton_Clicked(hsc);
 }
	public void Assimilate(Rogue rogue)
	{
        rogue.ModifyScore(-1);
	    foreach (GameObject r in legionElements)
	    {
	        r.GetComponent<Rogue>().ModifyScore(1);
	    }
	    legion.GetComponent<Legion>().ModifyScore(1);

	    rogueElements.Remove(rogue.gameObject);
		legionElements.Add(rogue.gameObject);
		
		foreach (GameObject r in rogueElements)
		{
		    Rogue indexedRogue = r.GetComponent<Rogue>();
		    indexedRogue.UpdateRogueSkillCount();
		    indexedRogue.ModifyScore(1);
		}
	}
        public Player CreateCharacter(string Class, UserInteraction ui)
        {
            Class = Class.ToLower();
            Player newChar;
            switch(Class)
            {
                case "barbarian":
                    newChar = new Barbarian(new int[] { 15, 15, 15, 10, 9, 10 });
                    newChar.SetArmor(Armors.chainShirt);
                    newChar.SetMainHand(new MasterworkWeapon(Weapons.battleaxe));
                    newChar.SetName("Bob");
                    break;

                case "bard":
                    newChar = new Bard(new int[] { 15, 10, 15, 10, 9, 15 });
                    newChar.SetArmor(Armors.leatherArmor);
                    newChar.SetMainHand(new MasterworkWeapon(Weapons.rapier));
                    newChar.SetName("Bill");
                    break;

                case "cleric":
                    newChar = new Cleric(new int[] { 15, 10, 15, 15, 9, 10 });
                    newChar.SetArmor(Armors.breastplate);
                    newChar.SetMainHand(new MasterworkWeapon(Weapons.heavyMace));
                    newChar.SetOffHand(Armors.heavyWoodenShield);
                    newChar.SetName("Chad");
                    break;

                case "druid":
                    newChar = new Druid(new int[] { 15, 10, 15, 15, 9, 10 });
                    newChar.SetArmor(Armors.hideArmor);
                    newChar.SetMainHand(new MasterworkWeapon(Weapons.club));
                    newChar.SetOffHand(Armors.heavyWoodenShield);
                    newChar.SetName("Dave");
                    break;

                case "fighter":
                    newChar = new Fighter(new int[] { 15, 15, 15, 10, 9, 10 });
                    newChar.SetArmor(Armors.breastplate);
                    newChar.SetMainHand(new MasterworkWeapon(Weapons.longsword));
                    newChar.SetOffHand(Armors.heavyWoodenShield);
                    newChar.SetName("Frank");
                    break;

                case "monk":
                    newChar = new Monk(new int[] { 15, 10, 15, 10, 15, 9 });
                    newChar.SetMainHand(new MasterworkWeapon(Weapons.quarterstaff));
                    newChar.SetName("Molly");
                    break;

                case "paladin":
                    newChar = new Paladin(new int[] { 15, 10, 15, 9, 15, 10 });
                    newChar.SetArmor(Armors.breastplate);
                    newChar.SetMainHand(new MasterworkWeapon(Weapons.longsword));
                    newChar.SetOffHand(Armors.heavyWoodenShield);
                    newChar.SetName("Phil");
                    break;

                case "ranger":
                    newChar = new Ranger(new int[] { 15, 10, 15, 9, 15, 10 });
                    newChar.SetArmor(Armors.leatherArmor);
                    newChar.SetMainHand(new MasterworkWeapon(Weapons.longbow));
                    newChar.SetName("Randy");
                    break;

                case "rogue":
                    newChar = new Rogue(new int[] { 15, 10, 15, 15, 9, 10 });
                    newChar.SetArmor(Armors.leatherArmor);
                    newChar.SetMainHand(new MasterworkWeapon(Weapons.rapier));
                    newChar.SetName("Rudy");
                    break;

                case "sorcerer":
                    newChar = new Sorcerer(new int[] { 10, 15, 15, 10, 9, 15 });
                    newChar.SetMainHand(new MasterworkWeapon(Weapons.lightCrossbow));
                    newChar.SetName("Steve");
                    break;

                case "wizard":
                    newChar = new Wizard(new int[] { 10, 15, 15, 15, 9, 10 });
                    newChar.SetMainHand(new MasterworkWeapon(Weapons.lightCrossbow));
                    newChar.SetName("Willis");
                    break;

                default:
                    newChar =  new Barbarian(new int[] { 10, 10, 10, 10, 10, 10 });
                    newChar.SetArmor(Armors.chainShirt);
                    newChar.SetMainHand(new MasterworkWeapon(Weapons.battleaxe));
                    newChar.SetName("Default");
                    break;
            }
            newChar.SetUI(ui);
            newChar.AddItems(new Item[] { Consumables.minorHealthPotion, Consumables.minorHealthPotion, Consumables.minorManaPotion, Consumables.minorManaPotion, Consumables.minorHarmingPotion, Consumables.minorHarmingPotion });
            return newChar;
        }
Example #41
0
 private static void Main(string[] args)
 {
     var rogue = new Rogue();
     rogue.main();
 }
Example #42
0
 private static ICharacter CreatePlayerFromSavedGame(SnapshotOfCharacter snapshot)
 {
     ICharacter character;
     switch (snapshot.CharacterType)
     {
         case CharacterType.Mage:
             return character = new Mage(
                 snapshot.Name,
                 snapshot.Strength,
                 snapshot.Dexterity,
                 snapshot.Vitality,
                 snapshot.Intelligence,
                 snapshot.MaxHitPoints,
                 snapshot.Experience,
                 snapshot.Cash,
                 snapshot.Level,
                 snapshot.Position);
         case CharacterType.Rogue:
             return character = new Rogue(
                 snapshot.Name,
                 snapshot.Strength,
                 snapshot.Dexterity,
                 snapshot.Vitality,
                 snapshot.Intelligence,
                 snapshot.MaxHitPoints,
                 snapshot.Experience,
                 snapshot.Cash,
                 snapshot.Level,
                 snapshot.Position);
         case CharacterType.Warrior:
             return character = new Warrior(
                 snapshot.Name,
                 snapshot.Strength,
                 snapshot.Dexterity,
                 snapshot.Vitality,
                 snapshot.Intelligence,
                 snapshot.MaxHitPoints,
                 snapshot.Experience,
                 snapshot.Cash,
                 snapshot.Level,
                 snapshot.Position);
         default:
             throw new InvalidCharacterTypeException();
     }
 }
	private IEnumerator StunRogue(Rogue rogue)
	{
	    if (rogue != null)  // we could end up here because we hit the clone
	    {
	        rogue.canMove = false;
	        Instantiate(stunParticlePrefab, rogue.transform.position, Quaternion.Euler(90, 0, 0));
	        AudioManager.PlayCannonballStunSound();
	        yield return new WaitForSeconds(stunDuration);
	        rogue.canMove = true;
	    }
	}
Example #44
0
 private bool MonsterIsInRoom(Rogue.room room)
 {
     return rogue.MonstersOnLevel.Any(m => m.t_room == room);
 }