コード例 #1
0
    'Right Sandpit': lambda sm: sm.haveItem('Morph')
}
locationsDict["Power Bomb (right Maridia sand pit room)"].Available = (
    lambda sm: sm.wor(sm.haveItem('Gravity'),
                      sm.wand(sm.knowsGravLessLevel3(),
                              sm.haveItem('HiJump'),
                              sm.canSpringBallJump())) # https://www.youtube.com/watch?v=7LYYxphRRT0
)
locationsDict["Missile (pink Maridia)"].AccessFrom = {
    'Aqueduct': lambda sm: SMBool(True)
}
locationsDict["Missile (pink Maridia)"].Available = (
    lambda sm: SMBool(True)
)
locationsDict["Super Missile (pink Maridia)"].AccessFrom = {
    'Aqueduct': lambda sm: SMBool(True)
}
locationsDict["Super Missile (pink Maridia)"].Available = (
    lambda sm: SMBool(True)
)
locationsDict["Missile (Draygon)"].AccessFrom = {
    'Precious Room Top': lambda sm: SMBool(True)
}
locationsDict["Missile (Draygon)"].Available = (
    lambda sm: SMBool(True)
)

# TODO::use the dict in solver/randomizer
# create the list that the solver/randomizer use
locations = [loc for loc in locationsDict.values()]
コード例 #2
0
def getLocIdsByArea(area):
    return [
        loc.Id for loc in locationsDict.values()
        if loc.Id is not None and loc.GraphArea == area
    ] + [0xff]