|
|
@@ -98,14 +98,14 @@ class MetroidState: |
|
|
|
self.locations = ["Brinstar", "Norfair", "Kraid's Lair", "Ridley's Lair", "Tourian"] |
|
|
|
self.startLocation = 0 |
|
|
|
|
|
|
|
def toggleItem(itm): |
|
|
|
def toggleItem(self, itm): |
|
|
|
if itm in self.itemsCollected.keys(): |
|
|
|
self.itemsCollected[itm] = not self.itemsCollected[itm] |
|
|
|
self.samusHas[itm] = not self.samusHas[itm] |
|
|
|
else: |
|
|
|
print("Couldn't find item: {}".format(str(itm))) |
|
|
|
|
|
|
|
def toggleMissileTank(num): |
|
|
|
def toggleMissileTank(self, num): |
|
|
|
try: |
|
|
|
num = int(num) |
|
|
|
except: |
|
|
@@ -116,7 +116,7 @@ class MetroidState: |
|
|
|
else: |
|
|
|
print("Couldn't find missile tank: {}".format(num)) |
|
|
|
|
|
|
|
def toggleEnergyTank(num): |
|
|
|
def toggleEnergyTank(self, num): |
|
|
|
try: |
|
|
|
num = int(num) |
|
|
|
except: |
|
|
@@ -127,7 +127,7 @@ class MetroidState: |
|
|
|
else: |
|
|
|
print("Couldn't find energy tank: {}".format(num)) |
|
|
|
|
|
|
|
def toggleZebetite(num): |
|
|
|
def toggleZebetite(self, num): |
|
|
|
try: |
|
|
|
num = int(num) |
|
|
|
except: |
|
|
@@ -138,28 +138,28 @@ class MetroidState: |
|
|
|
else: |
|
|
|
print("Couldn't find Zebetite: {}".format(num)) |
|
|
|
|
|
|
|
def toggleKraid(): |
|
|
|
def toggleKraid(self): |
|
|
|
self.kraidKilled = not self.kraidKilled |
|
|
|
self.kraidStatue = self.kraidKilled |
|
|
|
|
|
|
|
def toggleKraidStatue(): |
|
|
|
def toggleKraidStatue(self): |
|
|
|
self.kraidStatue = not self.kraidStatue |
|
|
|
if self.kraidKilled and not self.kraidStatue: |
|
|
|
print("WARNING: Kraid has been killed but his statue has not been raised.") |
|
|
|
|
|
|
|
def toggleRidley(): |
|
|
|
def toggleRidley(self): |
|
|
|
self.ridleyKilled = not self.ridleyKilled |
|
|
|
self.ridleyStatue = self.ridleyKilled |
|
|
|
|
|
|
|
def toggleRidleyStatue(): |
|
|
|
def toggleRidleyStatue(self): |
|
|
|
self.ridleyStatue = not self.ridleyStatue |
|
|
|
if self.ridleyKilled and not self.ridleyStatue: |
|
|
|
print("WARNING: Ridley has been killed but his statue has not been raised.") |
|
|
|
|
|
|
|
def toggleMotherBrain(): |
|
|
|
def toggleMotherBrain(self): |
|
|
|
self.motherBrainKilled = not self.motherBrainKilled |
|
|
|
|
|
|
|
def toggleDoor(area, door) { |
|
|
|
def toggleDoor(self, area, door) { |
|
|
|
try: |
|
|
|
area = str(area) |
|
|
|
door = int(door) |
|
|
@@ -172,10 +172,10 @@ class MetroidState: |
|
|
|
print("Couldn't find door {} in area {}".format(door, area)) |
|
|
|
} |
|
|
|
|
|
|
|
def toggleSwimsuit(): |
|
|
|
def toggleSwimsuit(self): |
|
|
|
self.swimsuit = not self.swimsuit |
|
|
|
|
|
|
|
def newLocation(loc): |
|
|
|
def newLocation(self, loc): |
|
|
|
try: |
|
|
|
loc = str(loc) |
|
|
|
except: |
|
|
@@ -186,8 +186,19 @@ class MetroidState: |
|
|
|
else: |
|
|
|
print("Couldn't find location: {}".format(loc)) |
|
|
|
|
|
|
|
def uncollectedItems(self): |
|
|
|
o = [] |
|
|
|
for k,v in self.itemsCollected.items(): |
|
|
|
if v == True: |
|
|
|
o.append(k) |
|
|
|
return ", ".join(o) |
|
|
|
|
|
|
|
def toString(self): |
|
|
|
ic = "Items Collected: {}".format(self.uncollectedItems()) |
|
|
|
|
|
|
|
def main(): |
|
|
|
pass |
|
|
|
gs = MetroidState() |
|
|
|
|
|
|
|
|
|
|
|
if __name__ == "__main__": |
|
|
|
main() |