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; }
public World() { makeMap(); Log.AddDebugMessage("Map generation... ok"); //find an entrance and place player for (int i = 0; i < mapWidth; i++) for (int j = 0; j < mapHeight; j++) if (map[i, j].IsUpstair) player = UnitCreator.createPlayer(i, j); //place enemies placeActors(); Log.AddDebugMessage("Actors placement... ok"); Log.AddDebugMessage("All systems nominal... for now"); Log.AddDebugMessage("Seed for this world is " + Algorithms.Seed.ToString()); Log.AddLine("Press F1 for list of game commands"); }