Ejemplo n.º 1
0
        public static Actor createActor(string name, int x, int y)
        {
            char appearance = '!';
            Weapon givenWeapon;
            switch (name)
            {
                case "Guard":
                    appearance = 'G';
                    givenWeapon = new Weapon("baton");
                    break;
                //just for lulz
                case "Kostik":
                    appearance = 'K';
                    givenWeapon = new Weapon("concept-art drawing");
                    break;
                default:
                    appearance = 'D';
                    givenWeapon = new Weapon("pointless string");
                    break;
            }

            Actor newActor = new Actor(name, x, y, appearance);
            newActor.Inv.Wielded = givenWeapon;
            return newActor;
        }
Ejemplo n.º 2
0
 public static Player createPlayer(int x, int y)
 {
     Player newPlayer = new Player(x,y);
     newPlayer.Stats.Agility = 12;
     newPlayer.Hitpoints = newPlayer.GetMaxHitpoints();
     Weapon givenWeapon = new Weapon("dagger");
     newPlayer.Inv.Wielded = givenWeapon;
     return newPlayer;
 }
Ejemplo n.º 3
0
 public void WieldDialogue()
 {
     List<Item> weapsInBackpack = new List<Item>();
     foreach (Item i in Backpack)
         if (i is Weapon)
             weapsInBackpack.Add(i);
     Weapon toWield = (Weapon)SingleItemSelectionMenu("wield", weapsInBackpack);
     if (toWield != null)
     {
         Backpack.Add(Wielded);
         Wielded = toWield;
         Backpack.Remove(toWield);
         Log.AddLine("You are now wielding the " + Wielded.Name);
     }
 }
Ejemplo n.º 4
0
        public static void F5()
        {
            int x, y;
            //just for lulz
            //x = World.AllActors[0].CoordX;
            //y = World.AllActors[0].CoordY;
            //World.AllActors[0] = UnitCreator.createActor("Kostik", x, y);
            //just for lulz ended
            x = World.player.CoordX;
            y = World.player.CoordY;

            Weapon newwpn = new Weapon("dagger");
            newwpn.CoordX = x;
            newwpn.CoordY = y;
            World.AllItemsOnFloor.Add(newwpn);

            newwpn = new Weapon("baton");
            newwpn.CoordX = x;
            newwpn.CoordY = y;
            World.AllItemsOnFloor.Add(newwpn);

            newwpn = new Weapon("katar");
            newwpn.CoordX = x;
            newwpn.CoordY = y;
            World.AllItemsOnFloor.Add(newwpn);

            Log.AddDebugMessage("items created");
        }