basic_tiles is now a part of the mod.
[realism.git] / main_game / tiles.py
blob9bfd6946c86ace608004a3a2dbd373fff0e0be09
1 # This file is part of Realism, which is Copyright FunnyMan3595 (Charlie Nolan)
2 # and licensed under the GNU GPL v3. For more details, see LICENSE in the main
3 # Realism directory.
5 # WARNING: All mod formats are under heavy development. They may change at any
6 # time, breaking old mods. For this reason, we DO NOT RECOMMEND making mods
7 # at this time.
9 # This file defines the map tiles used in the game. It has the same format as
10 # <module>/tiles.py.
11 # For a complete guide to modding, see MODDING, in the Realism main directory.
13 # Like all the .py files, this is Python code. Most mod makers should be able
14 # to understand and adapt it, but knowledge of Python will help, and may allow
15 # you to do neat tricks.
17 from engine.tile import *
18 import engine.basic_tiles as basic
20 start_tiles = ["start", "unsafe_start", "start_and_movement_tutorial"]
22 class wall(tile):
23 type = "wall"
24 def go_to(self, teleported = False):
25 return False # Nothing happens when you try to move through a wall.
27 class safe(basic.no_encounters, basic.regen):
28 pass
30 class normal(basic.random_encounters, basic.regen):
31 pass
33 class start(safe):
34 pass
36 class unsafe_start(normal):
37 pass
39 class warp_tile(basic.warp_tile, safe):
40 pass
42 class map_tile(basic.map_tile, safe):
43 pass
45 class tutorial(basic.tutorial, safe):
46 pass
48 class object_tutorial(tutorial):
49 # TODO: Tutorial method.
50 pass
52 class conversation_tutorial(tutorial):
53 # TODO: Tutorial method.
54 pass
56 class combat_tutorial(tutorial):
57 # TODO: Tutorial method.
58 pass
60 class menu_tutorial(tutorial):
61 # TODO: Tutorial method.
62 pass
64 class start_and_movement_tutorial(tutorial):
65 # TODO: Tutorial method.
66 pass
68 class safe_door(basic.door, safe):
69 pass
71 class door(basic.door, normal):
72 pass
74 class armor_shop(basic.shop):
75 type = "armor_shop"
76 shop_args = {'armor': True}
78 class weapon_shop(basic.shop):
79 type = "weapon_shop"
80 shop_args = {'weapons': True}
82 class item_shop(basic.shop):
83 type = "item_shop"
84 shop_args = {'other': True}
86 class magic_shop(basic.shop):
87 type = "magic_shop"
88 shop_args = {'magic': True}
90 class welcome_to_start_town_ladies(wall):
91 type = "lady"
92 def go_to(self, teleported = False):
93 game.ui.conversation_mode('The young lady smiles like a mannequin. "Welcome to Start Town!"')
95 class save_point(wall):
96 type = "save_point"
97 def go_to(self, teleported = False):
98 #TODO
99 pass
101 class climb_tile(basic.climb_tile, normal):
102 pass
104 class twig(climb_tile):
105 type = "twig"
106 level = 1
108 class branch(climb_tile):
109 type = "branch"
110 level = 2
112 class gate_to_open_plains(map_tile):
113 type = "gate"
114 save = ("open",)
115 def __init__(self, map_pos, *args):
116 super(gate_to_open_plains, self).__init__(map_pos, "open_plains")
117 self.open = False
118 def go_to(self, teleported = False):
119 #TODO: Let the gate be opened.
120 if self.open:
121 return map_tile.go_to(self)
122 else:
123 return False
125 class beginner_woods_boss(wall):
126 type = "evil_tree"
127 #TODO: Make a boss.