Use a larger example map
This commit is contained in:
parent
d08ff7061f
commit
0f53407b3d
|
@ -46,12 +46,12 @@ class Game:
|
||||||
Create a new game on the screen.
|
Create a new game on the screen.
|
||||||
"""
|
"""
|
||||||
# TODO generate a new map procedurally
|
# TODO generate a new map procedurally
|
||||||
self.map = Map.load("resources/example_map.txt")
|
self.map = Map.load("resources/example_map_2.txt")
|
||||||
self.map.currenty = 1
|
self.map.currenty = 1
|
||||||
self.map.currentx = 6
|
self.map.currentx = 6
|
||||||
self.player = Player()
|
self.player = Player()
|
||||||
self.map.add_entity(self.player)
|
self.map.add_entity(self.player)
|
||||||
self.player.move(1, 6)
|
self.player.move(1, 14)
|
||||||
self.map.spawn_random_entities(randint(1, 5))
|
self.map.spawn_random_entities(randint(1, 5))
|
||||||
|
|
||||||
@staticmethod
|
@staticmethod
|
||||||
|
|
|
@ -2,7 +2,7 @@
|
||||||
from enum import Enum, auto
|
from enum import Enum, auto
|
||||||
from math import sqrt
|
from math import sqrt
|
||||||
from random import randint
|
from random import randint
|
||||||
from typing import List, Tuple
|
from typing import List
|
||||||
|
|
||||||
from dungeonbattle.display.texturepack import TexturePack
|
from dungeonbattle.display.texturepack import TexturePack
|
||||||
|
|
||||||
|
@ -186,9 +186,6 @@ class Entity:
|
||||||
"""
|
"""
|
||||||
return sqrt(self.distance_squared(other))
|
return sqrt(self.distance_squared(other))
|
||||||
|
|
||||||
def vector(self, other: "Entity") -> Tuple[int, int]:
|
|
||||||
return other.y - self.y, other.x - self.x
|
|
||||||
|
|
||||||
|
|
||||||
class FightingEntity(Entity):
|
class FightingEntity(Entity):
|
||||||
maxhealth: int
|
maxhealth: int
|
||||||
|
|
|
@ -0,0 +1,40 @@
|
||||||
|
########### #########
|
||||||
|
#.........# #.......#
|
||||||
|
#.........# ############.......#
|
||||||
|
#.........###############..........#.......##############
|
||||||
|
#.........#........................#....................#
|
||||||
|
#.........#.............#..........#.......#............#
|
||||||
|
########.########.............#..................#............#
|
||||||
|
#.........# #.............####.#######.......#............#
|
||||||
|
#.........# #.............##.........######################
|
||||||
|
#.........# #####.##########.........# ###########
|
||||||
|
#.........# #......# #.........# #.........#
|
||||||
|
########.##########......# #.........# #.........#
|
||||||
|
#...........##......# #.........# #.........#
|
||||||
|
#...........##......# #.........# #.........#
|
||||||
|
#...........##......# #.........# ################.######
|
||||||
|
#...........##......# #.........# #.................############
|
||||||
|
#...........##......# ########.########.......#.........#..........#
|
||||||
|
#...........##......# #...............#.......#.........#..........#
|
||||||
|
#...........######### #...............#.......#.........#..........#
|
||||||
|
#...........# #...............#.......#....................#
|
||||||
|
#####.####### #.......................#.........#..........#
|
||||||
|
#.........# #...............###################..........#
|
||||||
|
#.........############ #...............# #..........#
|
||||||
|
#.........#..........# #...............# ############
|
||||||
|
#....................#####.###########.#############
|
||||||
|
########.#########...................# #.............#
|
||||||
|
#........# #..........#........# #.............#########
|
||||||
|
#........# ######.##########........# #.............#.......#
|
||||||
|
#........# #..........# #........# #.....................#
|
||||||
|
#........# #..........# #........# #.............#.......#
|
||||||
|
#........# #..........# #........# #.............#.......#
|
||||||
|
#........# #..........# #........# #.............#.......#
|
||||||
|
#........# #..........#########.##### #.............#.......#
|
||||||
|
#........# #..........#.........# ##########.############.#######
|
||||||
|
#........# #..........#.........# #..............# #..........#
|
||||||
|
########## #..........#.........# #..............# #..........#
|
||||||
|
############.........# #..............# #..........#
|
||||||
|
#.........# #..............# #..........#
|
||||||
|
########### #..............# #..........#
|
||||||
|
################ ############
|
Loading…
Reference in New Issue