Skip to content

Commit 48c3a2e

Browse files
authored
Merge pull request #124 from mathsman5133/g1_th15_update
TH15 Update!
2 parents 9a75678 + 68055a3 commit 48c3a2e

File tree

12 files changed

+74
-14
lines changed

12 files changed

+74
-14
lines changed

coc/abc.py

Lines changed: 0 additions & 1 deletion
Original file line numberDiff line numberDiff line change
@@ -200,7 +200,6 @@ def _load_json_meta(cls, troop_meta, id, name, lab_to_townhall):
200200

201201
# spells and troops
202202
cls.training_cost = try_enum(UnitStat, troop_meta.get("TrainingCost"))
203-
cls.training_resource = Resource(value=troop_meta["TrainingResource"][0])
204203
cls.training_time = try_enum(UnitStat, troop_meta.get("TrainingTime"))
205204

206205
# only heroes

coc/enums.py

Lines changed: 15 additions & 3 deletions
Original file line numberDiff line numberDiff line change
@@ -83,6 +83,7 @@ class Resource(Enum):
8383
"Bowler",
8484
"Ice Golem",
8585
"Headhunter",
86+
"Electro Titan",
8687
]
8788

8889
SIEGE_MACHINE_ORDER = [
@@ -91,7 +92,8 @@ class Resource(Enum):
9192
"Stone Slammer",
9293
"Siege Barracks",
9394
"Log Launcher",
94-
"Flame Flinger"
95+
"Flame Flinger",
96+
"Battle Drill",
9597
]
9698

9799
SUPER_TROOP_ORDER = [
@@ -108,7 +110,7 @@ class Resource(Enum):
108110
"Super Valkyrie",
109111
"Super Witch",
110112
"Ice Hound",
111-
"Super Bowler"
113+
"Super Bowler",
112114
]
113115

114116
HOME_TROOP_ORDER = HOME_TROOP_ORDER + SIEGE_MACHINE_ORDER
@@ -141,11 +143,21 @@ class Resource(Enum):
141143
"Haste Spell",
142144
"Skeleton Spell",
143145
"Bat Spell",
146+
"Recall Spell",
144147
]
145148

146149
HERO_ORDER = ["Barbarian King", "Archer Queen", "Grand Warden", "Royal Champion", "Battle Machine"]
147150

148-
HERO_PETS_ORDER = ["L.A.S.S.I", "Electro Owl", "Mighty Yak", "Unicorn"]
151+
HERO_PETS_ORDER = [
152+
"L.A.S.S.I",
153+
"Electro Owl",
154+
"Mighty Yak",
155+
"Unicorn",
156+
"Poison Lizard",
157+
"Diggy",
158+
"Frosty",
159+
"Phoenix",
160+
]
149161

150162
ACHIEVEMENT_ORDER = [
151163
# Home Base

coc/players.py

Lines changed: 6 additions & 2 deletions
Original file line numberDiff line numberDiff line change
@@ -650,9 +650,13 @@ def spells(self) -> typing.List[Spell]:
650650
651651
This will return spells in the order found in both spell factory and labatory in-game.
652652
"""
653-
dict_spells = self._spells = {s.name: s for s in self._iter_spells}
653+
self._spells = {s.name: s for s in self._iter_spells}
654+
dict_spells = self._spells
654655
order = {k: v for v, k in enumerate(SPELL_ORDER)}
655-
return list(sorted(dict_spells.values(), key=lambda s: order.get(s.name)))
656+
657+
return list(sorted(
658+
dict_spells.values(),
659+
key=lambda s: order.get(s.name, 0)))
656660

657661
def get_spell(self, name: str, default_value=None) -> typing.Optional[Spell]:
658662
"""Returns a spell with the given name.

coc/static/buildings.json

Lines changed: 1 addition & 1 deletion
Large diffs are not rendered by default.

coc/static/characters.json

Lines changed: 1 addition & 1 deletion
Large diffs are not rendered by default.

coc/static/heroes.json

Lines changed: 1 addition & 1 deletion
Large diffs are not rendered by default.

coc/static/object_ids.json

Lines changed: 1 addition & 1 deletion
Large diffs are not rendered by default.

coc/static/pets.json

Lines changed: 1 addition & 1 deletion
Large diffs are not rendered by default.

coc/static/spells.json

Lines changed: 1 addition & 1 deletion
Large diffs are not rendered by default.

coc/static/texts_EN.json

Lines changed: 1 addition & 1 deletion
Large diffs are not rendered by default.

0 commit comments

Comments
 (0)