-
Notifications
You must be signed in to change notification settings - Fork 0
/
towns.py
176 lines (128 loc) · 5.19 KB
/
towns.py
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
65
66
67
68
69
70
71
72
73
74
75
76
77
78
79
80
81
82
83
84
85
86
87
88
89
90
91
92
93
94
95
96
97
98
99
100
101
102
103
104
105
106
107
108
109
110
111
112
113
114
115
116
117
118
119
120
121
122
123
124
125
126
127
128
129
130
131
132
133
134
135
136
137
138
139
140
141
142
143
144
145
146
147
148
149
150
151
152
153
154
155
156
157
158
159
160
161
162
163
164
165
166
167
168
169
170
171
172
173
174
175
176
from django.template.defaultfilters import slugify
from apps.towns.models import Town, Tavern, Townhall, Outskirt
from apps.users.models import Npc, Tribe
###NEED TO ADD THE TOWN OF DUNDEE
# https://www.youtube.com/watch?v=VlhQZFTvAn4
#starting math values
def town_math_values():
TownMathValues.objects.create(
version = 1,
tavern_refresh_min = 20,
tavern_refresh_max = 60,
tavern_heroes_min = 7,
tavern_heroes_max = 14,
townhall_tier_value_per_level = 5,
townhall_category_value_per_level = 3,
townhall_category_base_value = 20,
outskirt_duration_min = 5,
outskirt_duration_max = 24,
)
town_math_values()
def add_tribes_shells():
tribes = (
#name, focus
("Warhead", Tribe.COMBAT),
("Bannergaurds", Tribe.COMBAT),
("Moonforge", Tribe.CRAFTING),
("Harbringers of Faith", Tribe.TRADING),
("Brave from the Sea", Tribe.TRADING),
("Warcry", Tribe.COMBAT),
("Charred Desire", Tribe.CRAFTING),
("Visions of the Lost", Tribe.TRADING),
("Venomforce", Tribe.COMBAT),
("Concealed Faith", Tribe.CRAFTING),
("Immortals", Tribe.COMBAT),
("Cycle of Gold", Tribe.TRADING),
("Gentle Fire", Tribe.CRAFTING),
("Misery of Wealth", Tribe.TRADING),
("Mystical Life", Tribe.COMBAT),
("Dark Smiths", Tribe.CRAFTING),
)
for tribe in tribes:
Tribe.objects.create(
name = tribe[0],
description = "",
focus = tribe[1],
)
def add_leader_npcs():
some_npcs = (
#name, tribe
("Soam Ironhammer", "Warhead"),
("Anthor Shieldgrip", "Bannergaurds"),
("Breadon Essah", "Moonforge"),
("Tiffany Vynorlan", "Harbringers of Faith"),
("Alexes Nahatis", "Brave from the Sea"),
("Charles Balog", "Warcry"),
("Jarson Tjalk", "Charred Desire"),
("Arina Goldtail", "Visions of the Lost"),
("Eddar Rainbone", "Venomforce"),
("Dallin Sky", "Concealed Faith"),
("Seban IronCrest", "Immortals"),
("Kok Mirza", "Cycle of Gold"),
("Salema Fahri", "Gentle Fire"),
("Lorch Rambton", "Misery of Wealth"),
("Darwin Baxter", "Mystical Life"),
("Merric Durgar", "Dark Smiths"),
)
for npc in some_npcs:
Npc.objects.create(
name = npc[0],
description = "",
tribe = Tribe.objects.get(name=npc[1]),
)
def fill_tribe_shells():
tribes = (
#tribe, leader, likes, hates
("Warhead", "Soam Ironhammer", "Bannergaurds", "Harbringers of Faith"),
("Bannergaurds", "Anthor Shieldgrip", "Warhead", "Moonforge"),
("Moonforge", "Breadon Essah", "Harbringers of Faith", "Bannergaurds"),
("Harbringers of Faith", "Tiffany Vynorlan", "Moonforge", "Warhead"),
("Brave from the Sea", "Alexes Nahatis", "Warcry", "Visions of the Lost"),
("Warcry", "Charles Balog", "Brave from the Sea", "Charred Desire"),
("Charred Desire", "Jarson Tjalk", "Visions of the Lost", "Brave from the Sea"),
("Visions of the Lost", "Arina Goldtail", "Charred Desire", "Warcry"),
("Venomforce", "Eddar Rainbone", "Concealed Faith", "Immortals"),
("Concealed Faith", "Dallin Sky", "Venomforce", "Cycle of Gold"),
("Immortals", "Seban IronCrest", "Cycle of Gold", "Venomforce"),
("Cycle of Gold", "Kok Mirza", "Immortals", "Concealed Faith"),
("Gentle Fire", "Salema Fahri", "Misery of Wealth", "Dark Smiths"),
("Misery of Wealth", "Lorch Rambton", "Gentle Fire", "Mystical Life"),
("Mystical Life", "Darwin Baxter", "Dark Smiths", "Misery of Wealth"),
("Dark Smiths", "Merric Durgar", "Mystical Life", "Gentle Fire"),
)
for tribe in tribes:
edit_tribe = Tribe.objects.get(name=tribe[0])
edit_tribe.leader = Npc.objects.get(name=tribe[1])
edit_tribe.likes = Tribe.objects.get(name=tribe[2])
edit_tribe.hates = Tribe.objects.get(name=tribe[3])
edit_tribe.save()
def add_other_npcs():
npcs = (
#warhead
("Gregor Barrin", "Warhead"),
("Elmer Bullseye", "Warhead"),
("Kailyn Centyre", "Warhead"),
("Thorburn Phantom", "Warhead"),
)
for npc in npcs:
Npc.objects.create(name=npc[0], tribe=Tribe.objects.get(name=npc[1]))
add_tribes_shells()
add_leader_npcs()
fill_tribe_shells()
add_other_npcs()
def add_inverness_town():
town = Town.objects.create(
slug = slugify("Inverness"),
controlled = False,
owner_npc = Npc.objects.get(name="Elmer Bullseye"),
difficulty = 1,
#coordinates = models.ForeignKey(Coordinates)
name = "Inverness",
description = "",
)
#create buildings
Tavern.objects.create(town=town)
Townhall.objects.create(town=town, level=1, category=Townhall.NO_FOCUS, tier=Townhall.NO_TIER)
#create surroundings
Outskirt.objects.create(town=town, resources_min=2, resources_max=4)
add_inverness_town()