예제 #1
0
파일: game.py 프로젝트: bricks42/BrutalRL
    def on_turn(self):
        # Draw the game screen

        draw_map(self)
        draw_hud(self)

        libtcod.console_flush()

        # Need to handle window closing events globally...

        # if libtcod.console_is_window_closed():
        # 	raise SetState('quit')

        # Handle keyboard input

        return on_turn(self)
예제 #2
0
파일: items.py 프로젝트: bricks42/BrutalRL
	def on_apply(self):
		#coords = (None, None)
		
		for coords in ask_choose_target(self.actor, 'Teleport to where?'):
			if coords:
				if self.actor.map.can_place_actor(coords[0], coords[1]):
					messages.Basic('You are teleported away.', self.actor, self.symbol)
					self.actor.move_to(coords[0], coords[1])
					self.actor.inventory.add(ScrollDebugTeleport())
				
					return True
				
				else:
					#self.actor.ask_hit_enter("You can't move there.", '?')
					messages.Basic("You can't move there.", '?')
					draw_hud(self.actor)
			
			else:
				break
		
		return False