forked from EEON-26/RandomProjects
-
Notifications
You must be signed in to change notification settings - Fork 1
Expand file tree
/
Copy pathravenfield_map_distributor.py
More file actions
64 lines (46 loc) · 1.96 KB
/
ravenfield_map_distributor.py
File metadata and controls
64 lines (46 loc) · 1.96 KB
1
2
3
4
5
6
7
8
9
10
11
12
13
14
15
16
17
18
19
20
21
22
23
24
25
26
27
28
29
30
31
32
33
34
35
36
37
38
39
40
41
42
43
44
45
46
47
48
49
50
51
52
53
54
55
56
57
58
59
60
61
62
63
64
import random
plains = ["Nordwind", "Metros","Ampleforth","Jado Industrial (Border Clash)","Costaline","Grove Street"]
forest = ["Grenlau (Wooded Hills)","Rancagua","Coron Industrial (River Delta)","Lastok (Dead City Summer)"]
tundra = ["Cleaver Crest", "Blackwell", "Detsadik", "Nevostok (Dead City Winter)", "Temple", "Ilm (wooded hills snow)"]
ocean = ["Nevent (Island)","Twin Islands","Port Escall (Archipelago)"]
desert = ["A09 Highway","Merian (Canyon)", "Desert Hill","Tavak (Desert Ruins)","Dustbowl","Cenon (Revolt)","Sayom (Lost Village)"]
boss = "Cenon (Revolt)"
biomes = ["plains","forest","tundra","ocean","desert"]
biomeNeighbours = {"plains":["forest","tundra","ocean","desert"],
"forest":["plains","tundra"],
"tundra":["plains","forest"],
"ocean":["plains", "desert"],
"desert":["desert"]}
biome = "plains"
conqueredMaps = []
currentMap = ""
nextMap = ""
rush = False
while True:
if not rush:
result = input()
else:
rush = False
if int(result) >= 2:
if currentMap:
conqueredMaps.append(currentMap)
if currentMap == boss:
print("You Win! #########")
break
currentMap = nextMap
if currentMap != boss:
nextMap = random.choice(eval(biome))
while (nextMap in conqueredMaps) or (nextMap == currentMap):
biome = random.choice(biomeNeighbours[biome])
nextMap = random.choice(eval(biome))
else:
nextMap = "Victory!"
print(currentMap + " -> " + nextMap)
elif int(result) <= 1:
print(currentMap)
result = input()
rush = True
if int(result) <= 1:
nextMap = currentMap
currentMap = conqueredMaps[-1]
conqueredMaps.remove(currentMap)