|
|
@@ -53,14 +53,14 @@ class MetroidState: |
|
|
|
7: False, |
|
|
|
8: False |
|
|
|
} |
|
|
|
self.zebetitesDestroyed { |
|
|
|
self.zebetitesDestroyed = { |
|
|
|
1: False, |
|
|
|
2: False, |
|
|
|
3: False, |
|
|
|
4: False, |
|
|
|
5: False |
|
|
|
} |
|
|
|
self.doors { |
|
|
|
self.doors = { |
|
|
|
"Brinstar": { |
|
|
|
1: False, |
|
|
|
2: False, |
|
|
@@ -81,7 +81,7 @@ class MetroidState: |
|
|
|
}, "Ridley": { |
|
|
|
1: False, |
|
|
|
2: False |
|
|
|
}, "Tourian" { |
|
|
|
}, "Tourian": { |
|
|
|
1: False, |
|
|
|
2: False, |
|
|
|
3: False |
|
|
@@ -159,7 +159,7 @@ class MetroidState: |
|
|
|
def toggleMotherBrain(self): |
|
|
|
self.motherBrainKilled = not self.motherBrainKilled |
|
|
|
|
|
|
|
def toggleDoor(self, area, door) { |
|
|
|
def toggleDoor(self, area, door): |
|
|
|
try: |
|
|
|
area = str(area) |
|
|
|
door = int(door) |
|
|
@@ -170,7 +170,6 @@ class MetroidState: |
|
|
|
self.doors[area][door] = not self.doors[area][door] |
|
|
|
else: |
|
|
|
print("Couldn't find door {} in area {}".format(door, area)) |
|
|
|
} |
|
|
|
|
|
|
|
def toggleSwimsuit(self): |
|
|
|
self.swimsuit = not self.swimsuit |
|
|
@@ -186,19 +185,91 @@ class MetroidState: |
|
|
|
else: |
|
|
|
print("Couldn't find location: {}".format(loc)) |
|
|
|
|
|
|
|
def uncollectedItems(self): |
|
|
|
def collectedItems(self): |
|
|
|
o = [] |
|
|
|
for k,v in self.itemsCollected.items(): |
|
|
|
if v == True: |
|
|
|
o.append(k) |
|
|
|
return ", ".join(o) |
|
|
|
if len(o) == 0: |
|
|
|
return "None" |
|
|
|
else: |
|
|
|
return ", ".join(o) |
|
|
|
|
|
|
|
def collectedMissiles(self): |
|
|
|
o = [] |
|
|
|
for k, v in self.missileTanks.items(): |
|
|
|
if v == True: |
|
|
|
o.append(k) |
|
|
|
if len(o) == 0: |
|
|
|
return "None" |
|
|
|
else: |
|
|
|
return ", ".join([str(b) for b in o]) |
|
|
|
|
|
|
|
def collectedEtanks(self): |
|
|
|
o = [] |
|
|
|
for k, v in self.energyTanks.items(): |
|
|
|
if v == True: |
|
|
|
o.append(k) |
|
|
|
if len(o) == 0: |
|
|
|
return "None" |
|
|
|
else: |
|
|
|
return ", ".join([str(b) for b in o]) |
|
|
|
|
|
|
|
def killedZebetites(self): |
|
|
|
o = [] |
|
|
|
for k, v in self.zebetitesDestroyed.items(): |
|
|
|
if v == True: |
|
|
|
o.append(k) |
|
|
|
if len(o) == 0: |
|
|
|
return "None" |
|
|
|
else: |
|
|
|
return ", ".join([str(b) for b in o]) |
|
|
|
|
|
|
|
def killedBosses(self): |
|
|
|
o = [] |
|
|
|
if self.kraidKilled: |
|
|
|
o.append("Kraid") |
|
|
|
if self.ridleyKilled: |
|
|
|
o.append("Ridley") |
|
|
|
if self.motherBrainKilled: |
|
|
|
o.append("Mother Brain") |
|
|
|
if len(o) == 0: |
|
|
|
return "None" |
|
|
|
else: |
|
|
|
return ", ".join(o) |
|
|
|
|
|
|
|
def raisedStatues(self): |
|
|
|
o = [] |
|
|
|
if self.kraidStatue: |
|
|
|
o.append("Kraid") |
|
|
|
if self.ridleyStatue: |
|
|
|
o.append("Ridley") |
|
|
|
if len(o) == 0: |
|
|
|
return "None" |
|
|
|
else: |
|
|
|
return ", ".join(o) |
|
|
|
|
|
|
|
def inBailey(self): |
|
|
|
if self.swimsuit: |
|
|
|
return "Yes" |
|
|
|
else: |
|
|
|
return "No" |
|
|
|
|
|
|
|
def toString(self): |
|
|
|
ic = "Items Collected: {}".format(self.uncollectedItems()) |
|
|
|
|
|
|
|
ic = "Items Collected: {}".format(self.collectedItems()) |
|
|
|
mt = "Missile Tanks Collected: {}".format(self.collectedMissiles()) |
|
|
|
et = "Energy Tanks Collected: {}".format(self.collectedEtanks()) |
|
|
|
zb = "Zebetites Killed: {}".format(self.killedZebetites()) |
|
|
|
kb = "Bosses Killed: {}".format(self.killedBosses()) |
|
|
|
rs = "Statues Raised: {}".format(self.raisedStatues()) |
|
|
|
sw = "Swimsuit?: {}".format(self.inBailey()) |
|
|
|
dr = "" |
|
|
|
return "\n".join([ic, mt, et, zb, kb, rs, sw, dr]) |
|
|
|
|
|
|
|
def main(): |
|
|
|
gs = MetroidState() |
|
|
|
|
|
|
|
gs.kraidKilled = True |
|
|
|
print(gs.toString()) |
|
|
|
|
|
|
|
if __name__ == "__main__": |
|
|
|
main() |