1 from engine
.game_map
import special_keys
2 from random
import randint
3 from engine
.battle
import simple_battle
4 from engine
.shop
import make_shop
6 def get_map_specials(game_map
, pos
):
7 for key
in special_keys
:
8 yield game_map
.map_key
[key
]
10 def wall(game_map
, pos
, *args
):
14 def safe(game_map
, pos
, *args
):
15 game_map
.hp_mp_ticks()
19 def normal(game_map
, pos
, *args
):
20 game_map
.hp_mp_ticks()
21 if game_map
.delay_left
> 0:
22 game_map
.delay_left
-= 1
25 (chance
, delay
, minlvl
, maxlvl
, mincrits
, maxcrits
, crittypes
, tileset
) = \
26 get_map_specials(game_map
)
28 if randint(1,100) < int(chance
):
29 game_map
.delay_left
= int(delay
)
30 level
= randint(int(minlvl
),int(maxlvl
))
31 crits
= randint(int(mincrits
),int(maxcrits
))
32 game_map
.game
.ui
.battle_mode(simple_battle(level
, crits
))
37 def object_tutorial(game_map
, pos
, main
= False, *args
):
39 object_tutorial
.tile
= "empty"
41 def conversation_tutorial(game_map
, pos
, main
= False, *args
):
43 conversation_tutorial
.tile
= "empty"
45 def combat_tutorial(game_map
, pos
, main
= False, *args
):
47 combat_tutorial
.tile
= "empty"
49 def menu_tutorial(game_map
, pos
, main
= False, *args
):
51 menu_tutorial
.tile
= "empty"
53 def start(game_map
, pos
, *args
):
57 def start_and_movement_tutorial(game_map
, pos
, *args
):
59 start_and_movement_tutorial
.tile
= "empty"
61 def door(game_map
, pos
, *args
):
65 def armor_shop(game_map
, pos
, level
=1, *args
):
66 game_map
.game
.ui
.map_mode(make_shop(level
, armor
=True))
68 armor_shop
.tile
= "armor_door"
70 def weapon_shop(game_map
, pos
, level
=1, *args
):
71 game_map
.game
.ui
.map_mode(make_shop(level
, weapons
=True))
73 weapon_shop
.tile
= "weapon_door"
75 def item_shop(game_map
, pos
, level
=1, *args
):
76 game_map
.game
.ui
.map_mode(make_shop(level
, other
=True))
78 item_shop
.tile
= "item_door"
80 def magic_shop(game_map
, pos
, level
=1, *args
):
81 game_map
.game
.ui
.map_mode(make_shop(level
, magic
=True))
83 magic_shop
.tile
= "magic_door"
85 def welcome_to_start_town_ladies(game_map
, pos
, *args
):
86 game_map
.game
.ui
.conversation_mode('The young lady smiles like a mannequin. "Welcome to Start Town!"')
88 welcome_to_start_town_ladies
.tile
= "lady"
90 def save_point(game_map
, pos
, *args
):
92 save_point
.tile
= "save_point"