Skip to content

Commit 08fe258

Browse files
authored
Merge pull request #1712 from heinezen/feature/convert_battle_for_greece
Convert Battle for Greece DLC
2 parents 6a801e1 + eda7c60 commit 08fe258

File tree

7 files changed

+342
-11
lines changed

7 files changed

+342
-11
lines changed

openage/convert/processor/conversion/aoc/processor.py

Lines changed: 3 additions & 3 deletions
Original file line numberDiff line numberDiff line change
@@ -1361,10 +1361,10 @@ def link_trade_posts(full_data_set: GenieObjectContainer) -> None:
13611361
continue
13621362

13631363
trade_post_id = command["unit_id"].value
1364-
break
13651364

1366-
# Notify buiding
1367-
full_data_set.building_lines[trade_post_id].add_trading_line(unit_line)
1365+
# Notify buiding
1366+
if trade_post_id in full_data_set.building_lines.keys():
1367+
full_data_set.building_lines[trade_post_id].add_trading_line(unit_line)
13681368

13691369
@staticmethod
13701370
def link_repairables(full_data_set: GenieObjectContainer) -> None:

openage/convert/processor/conversion/de2/tech_subprocessor.py

Lines changed: 9 additions & 0 deletions
Original file line numberDiff line numberDiff line change
@@ -63,11 +63,14 @@ class DE2TechSubprocessor:
6363
57: AoCUpgradeAttributeSubprocessor.kidnap_storage_upgrade,
6464

6565
30: DE2UpgradeAttributeSubprocessor.herdable_capacity_upgrade,
66+
51: DE2UpgradeAttributeSubprocessor.bfg_unknown_51_upgrade,
6667
59: DE2UpgradeAttributeSubprocessor.charge_attack_upgrade,
6768
60: DE2UpgradeAttributeSubprocessor.charge_regen_upgrade,
6869
61: DE2UpgradeAttributeSubprocessor.charge_event_upgrade,
6970
62: DE2UpgradeAttributeSubprocessor.charge_type_upgrade,
7071
63: AoCUpgradeAttributeSubprocessor.ignore_armor_upgrade,
72+
71: DE2UpgradeAttributeSubprocessor.bfg_unknown_71_upgrade,
73+
73: DE2UpgradeAttributeSubprocessor.bfg_unknown_73_upgrade,
7174
100: AoCUpgradeAttributeSubprocessor.resource_cost_upgrade,
7275
101: AoCUpgradeAttributeSubprocessor.creation_time_upgrade,
7376
102: AoCUpgradeAttributeSubprocessor.min_projectiles_upgrade,
@@ -99,6 +102,7 @@ class DE2TechSubprocessor:
99102
46: AoCUpgradeResourceSubprocessor.tribute_inefficiency_upgrade,
100103
47: AoCUpgradeResourceSubprocessor.gather_gold_efficiency_upgrade,
101104
50: AoCUpgradeResourceSubprocessor.reveal_ally_upgrade,
105+
69: DE2UpgradeResourceSubprocessor.bfg_unknown_69_upgrade,
102106
77: AoCUpgradeResourceSubprocessor.conversion_resistance_upgrade,
103107
78: AoCUpgradeResourceSubprocessor.trade_penalty_upgrade,
104108
79: AoCUpgradeResourceSubprocessor.gather_stone_efficiency_upgrade,
@@ -137,6 +141,7 @@ class DE2TechSubprocessor:
137141
214: DE2UpgradeResourceSubprocessor.free_kipchaks_upgrade,
138142
216: DE2UpgradeResourceSubprocessor.sheep_food_amount_upgrade,
139143
218: DE2UpgradeResourceSubprocessor.cuman_tc_upgrade,
144+
219: DE2UpgradeResourceSubprocessor.bfg_unknown_219_upgrade,
140145
220: DE2UpgradeResourceSubprocessor.relic_food_production_upgrade,
141146
234: DE2UpgradeResourceSubprocessor.first_crusade_upgrade,
142147
236: DE2UpgradeResourceSubprocessor.burgundian_vineyards_upgrade,
@@ -160,6 +165,10 @@ class DE2TechSubprocessor:
160165
274: DE2UpgradeResourceSubprocessor.chieftains_upgrade,
161166
280: DE2UpgradeResourceSubprocessor.conversion_range_upgrade,
162167
282: DE2UpgradeResourceSubprocessor.unknown_recharge_rate_upgrade,
168+
502: DE2UpgradeResourceSubprocessor.bfg_unknown_502_upgrade,
169+
507: DE2UpgradeResourceSubprocessor.bfg_unknown_507_upgrade,
170+
521: DE2UpgradeResourceSubprocessor.bfg_unknown_521_upgrade,
171+
551: DE2UpgradeResourceSubprocessor.bfg_unknown_551_upgrade,
163172
}
164173

165174
@classmethod

openage/convert/processor/conversion/de2/upgrade_attribute_subprocessor.py

Lines changed: 85 additions & 1 deletion
Original file line numberDiff line numberDiff line change
@@ -1,4 +1,4 @@
1-
# Copyright 2020-2023 the openage authors. See copying.md for legal info.
1+
# Copyright 2020-2024 the openage authors. See copying.md for legal info.
22
#
33
# pylint: disable=too-few-public-methods
44
#
@@ -24,6 +24,90 @@ class DE2UpgradeAttributeSubprocessor:
2424
Creates raw API objects for attribute upgrade effects in DE2.
2525
"""
2626

27+
@staticmethod
28+
def bfg_unknown_51_upgrade(
29+
converter_group: ConverterObjectGroup,
30+
line: GenieGameEntityGroup,
31+
value: typing.Union[int, float],
32+
operator: MemberOperator,
33+
team: bool = False
34+
) -> list[ForwardRef]:
35+
"""
36+
Creates a patch for a BfG unknown attribute effect (ID: 51).
37+
38+
:param converter_group: Tech/Civ that gets the patch.
39+
:type converter_group: ...dataformat.converter_object.ConverterObjectGroup
40+
:param line: Unit/Building line that has the ability.
41+
:type line: ...dataformat.converter_object.ConverterObjectGroup
42+
:param value: Value used for patching the member.
43+
:type value: int, float
44+
:param operator: Operator used for patching the member.
45+
:type operator: MemberOperator
46+
:returns: The forward references for the generated patches.
47+
:rtype: list
48+
"""
49+
patches = []
50+
51+
# TODO: Implement
52+
53+
return patches
54+
55+
@staticmethod
56+
def bfg_unknown_71_upgrade(
57+
converter_group: ConverterObjectGroup,
58+
line: GenieGameEntityGroup,
59+
value: typing.Union[int, float],
60+
operator: MemberOperator,
61+
team: bool = False
62+
) -> list[ForwardRef]:
63+
"""
64+
Creates a patch for a BfG unknown attribute effect (ID: 71).
65+
66+
:param converter_group: Tech/Civ that gets the patch.
67+
:type converter_group: ...dataformat.converter_object.ConverterObjectGroup
68+
:param line: Unit/Building line that has the ability.
69+
:type line: ...dataformat.converter_object.ConverterObjectGroup
70+
:param value: Value used for patching the member.
71+
:type value: int, float
72+
:param operator: Operator used for patching the member.
73+
:type operator: MemberOperator
74+
:returns: The forward references for the generated patches.
75+
:rtype: list
76+
"""
77+
patches = []
78+
79+
# TODO: Implement
80+
81+
return patches
82+
83+
@staticmethod
84+
def bfg_unknown_73_upgrade(
85+
converter_group: ConverterObjectGroup,
86+
line: GenieGameEntityGroup,
87+
value: typing.Union[int, float],
88+
operator: MemberOperator,
89+
team: bool = False
90+
) -> list[ForwardRef]:
91+
"""
92+
Creates a patch for a BfG unknown attribute effect (ID: 73).
93+
94+
:param converter_group: Tech/Civ that gets the patch.
95+
:type converter_group: ...dataformat.converter_object.ConverterObjectGroup
96+
:param line: Unit/Building line that has the ability.
97+
:type line: ...dataformat.converter_object.ConverterObjectGroup
98+
:param value: Value used for patching the member.
99+
:type value: int, float
100+
:param operator: Operator used for patching the member.
101+
:type operator: MemberOperator
102+
:returns: The forward references for the generated patches.
103+
:rtype: list
104+
"""
105+
patches = []
106+
107+
# TODO: Implement
108+
109+
return patches
110+
27111
@staticmethod
28112
def charge_attack_upgrade(
29113
converter_group: ConverterObjectGroup,

openage/convert/processor/conversion/de2/upgrade_resource_subprocessor.py

Lines changed: 150 additions & 0 deletions
Original file line numberDiff line numberDiff line change
@@ -48,6 +48,156 @@ def bengali_conversion_resistance_upgrade(
4848

4949
return patches
5050

51+
@staticmethod
52+
def bfg_unknown_69_upgrade(
53+
converter_group: ConverterObjectGroup,
54+
value: typing.Union[int, float],
55+
operator: MemberOperator,
56+
team: bool = False
57+
) -> list[ForwardRef]:
58+
"""
59+
Creates a patch for a BfG unknown resource effect (ID: 69).
60+
61+
:param converter_group: Tech/Civ that gets the patch.
62+
:type converter_group: ...dataformat.converter_object.ConverterObjectGroup
63+
:param value: Value used for patching the member.
64+
:type value: MemberOperator
65+
:param operator: Operator used for patching the member.
66+
:type operator: MemberOperator
67+
:returns: The forward references for the generated patches.
68+
:rtype: list
69+
"""
70+
patches = []
71+
72+
# TODO: Implement
73+
74+
return patches
75+
76+
@staticmethod
77+
def bfg_unknown_219_upgrade(
78+
converter_group: ConverterObjectGroup,
79+
value: typing.Union[int, float],
80+
operator: MemberOperator,
81+
team: bool = False
82+
) -> list[ForwardRef]:
83+
"""
84+
Creates a patch for a BfG unknown resource effect (ID: 219).
85+
86+
:param converter_group: Tech/Civ that gets the patch.
87+
:type converter_group: ...dataformat.converter_object.ConverterObjectGroup
88+
:param value: Value used for patching the member.
89+
:type value: MemberOperator
90+
:param operator: Operator used for patching the member.
91+
:type operator: MemberOperator
92+
:returns: The forward references for the generated patches.
93+
:rtype: list
94+
"""
95+
patches = []
96+
97+
# TODO: Implement
98+
99+
return patches
100+
101+
@staticmethod
102+
def bfg_unknown_502_upgrade(
103+
converter_group: ConverterObjectGroup,
104+
value: typing.Union[int, float],
105+
operator: MemberOperator,
106+
team: bool = False
107+
) -> list[ForwardRef]:
108+
"""
109+
Creates a patch for a BfG unknown resource effect (ID: 502).
110+
111+
:param converter_group: Tech/Civ that gets the patch.
112+
:type converter_group: ...dataformat.converter_object.ConverterObjectGroup
113+
:param value: Value used for patching the member.
114+
:type value: MemberOperator
115+
:param operator: Operator used for patching the member.
116+
:type operator: MemberOperator
117+
:returns: The forward references for the generated patches.
118+
:rtype: list
119+
"""
120+
patches = []
121+
122+
# TODO: Implement
123+
124+
return patches
125+
126+
@staticmethod
127+
def bfg_unknown_507_upgrade(
128+
converter_group: ConverterObjectGroup,
129+
value: typing.Union[int, float],
130+
operator: MemberOperator,
131+
team: bool = False
132+
) -> list[ForwardRef]:
133+
"""
134+
Creates a patch for a BfG unknown resource effect (ID: 507).
135+
136+
:param converter_group: Tech/Civ that gets the patch.
137+
:type converter_group: ...dataformat.converter_object.ConverterObjectGroup
138+
:param value: Value used for patching the member.
139+
:type value: MemberOperator
140+
:param operator: Operator used for patching the member.
141+
:type operator: MemberOperator
142+
:returns: The forward references for the generated patches.
143+
:rtype: list
144+
"""
145+
patches = []
146+
147+
# TODO: Implement
148+
149+
return patches
150+
151+
@staticmethod
152+
def bfg_unknown_521_upgrade(
153+
converter_group: ConverterObjectGroup,
154+
value: typing.Union[int, float],
155+
operator: MemberOperator,
156+
team: bool = False
157+
) -> list[ForwardRef]:
158+
"""
159+
Creates a patch for a BfG unknown resource effect (ID: 521).
160+
161+
:param converter_group: Tech/Civ that gets the patch.
162+
:type converter_group: ...dataformat.converter_object.ConverterObjectGroup
163+
:param value: Value used for patching the member.
164+
:type value: MemberOperator
165+
:param operator: Operator used for patching the member.
166+
:type operator: MemberOperator
167+
:returns: The forward references for the generated patches.
168+
:rtype: list
169+
"""
170+
patches = []
171+
172+
# TODO: Implement
173+
174+
return patches
175+
176+
@staticmethod
177+
def bfg_unknown_551_upgrade(
178+
converter_group: ConverterObjectGroup,
179+
value: typing.Union[int, float],
180+
operator: MemberOperator,
181+
team: bool = False
182+
) -> list[ForwardRef]:
183+
"""
184+
Creates a patch for a BfG unknown resource effect (ID: 551).
185+
186+
:param converter_group: Tech/Civ that gets the patch.
187+
:type converter_group: ...dataformat.converter_object.ConverterObjectGroup
188+
:param value: Value used for patching the member.
189+
:type value: MemberOperator
190+
:param operator: Operator used for patching the member.
191+
:type operator: MemberOperator
192+
:returns: The forward references for the generated patches.
193+
:rtype: list
194+
"""
195+
patches = []
196+
197+
# TODO: Implement
198+
199+
return patches
200+
51201
@staticmethod
52202
def burgundian_vineyards_upgrade(
53203
converter_group: ConverterObjectGroup,

0 commit comments

Comments
 (0)