38 lines
676 B
Python
38 lines
676 B
Python
import utils
|
|
|
|
MOVEMENTS = {
|
|
(-1, 0): West,
|
|
( 1, 0): East,
|
|
( 0, -1): South,
|
|
( 0, 1): North
|
|
}
|
|
|
|
DIRECTIONS = {
|
|
West: (-1, 0),
|
|
East: ( 1, 0),
|
|
South: ( 0, -1),
|
|
North: ( 0, 1)
|
|
}
|
|
|
|
def get_maze_level():
|
|
return num_unlocked(Unlocks.Mazes) - 1
|
|
|
|
def get_substance_needed():
|
|
return get_world_size() * 2 ** get_maze_level()
|
|
|
|
def spawn_maze():
|
|
substance_required = get_substance_needed()
|
|
|
|
if num_items(Items.Weird_Substance) < substance_required:
|
|
return False
|
|
|
|
utils.go_to_00()
|
|
|
|
if can_harvest():
|
|
harvest()
|
|
|
|
plant(Entities.Bush)
|
|
use_item(Items.Weird_Substance, substance_required)
|
|
return True
|
|
|