Skip to content

Commit

Permalink
Merge pull request #1712 from heinezen/feature/convert_battle_for_greece
Browse files Browse the repository at this point in the history
Convert Battle for Greece DLC
  • Loading branch information
TheJJ authored Nov 24, 2024
2 parents 6a801e1 + eda7c60 commit 08fe258
Show file tree
Hide file tree
Showing 7 changed files with 342 additions and 11 deletions.
6 changes: 3 additions & 3 deletions openage/convert/processor/conversion/aoc/processor.py
Original file line number Diff line number Diff line change
Expand Up @@ -1361,10 +1361,10 @@ def link_trade_posts(full_data_set: GenieObjectContainer) -> None:
continue

trade_post_id = command["unit_id"].value
break

# Notify buiding
full_data_set.building_lines[trade_post_id].add_trading_line(unit_line)
# Notify buiding
if trade_post_id in full_data_set.building_lines.keys():
full_data_set.building_lines[trade_post_id].add_trading_line(unit_line)

@staticmethod
def link_repairables(full_data_set: GenieObjectContainer) -> None:
Expand Down
9 changes: 9 additions & 0 deletions openage/convert/processor/conversion/de2/tech_subprocessor.py
Original file line number Diff line number Diff line change
Expand Up @@ -63,11 +63,14 @@ class DE2TechSubprocessor:
57: AoCUpgradeAttributeSubprocessor.kidnap_storage_upgrade,

30: DE2UpgradeAttributeSubprocessor.herdable_capacity_upgrade,
51: DE2UpgradeAttributeSubprocessor.bfg_unknown_51_upgrade,
59: DE2UpgradeAttributeSubprocessor.charge_attack_upgrade,
60: DE2UpgradeAttributeSubprocessor.charge_regen_upgrade,
61: DE2UpgradeAttributeSubprocessor.charge_event_upgrade,
62: DE2UpgradeAttributeSubprocessor.charge_type_upgrade,
63: AoCUpgradeAttributeSubprocessor.ignore_armor_upgrade,
71: DE2UpgradeAttributeSubprocessor.bfg_unknown_71_upgrade,
73: DE2UpgradeAttributeSubprocessor.bfg_unknown_73_upgrade,
100: AoCUpgradeAttributeSubprocessor.resource_cost_upgrade,
101: AoCUpgradeAttributeSubprocessor.creation_time_upgrade,
102: AoCUpgradeAttributeSubprocessor.min_projectiles_upgrade,
Expand Down Expand Up @@ -99,6 +102,7 @@ class DE2TechSubprocessor:
46: AoCUpgradeResourceSubprocessor.tribute_inefficiency_upgrade,
47: AoCUpgradeResourceSubprocessor.gather_gold_efficiency_upgrade,
50: AoCUpgradeResourceSubprocessor.reveal_ally_upgrade,
69: DE2UpgradeResourceSubprocessor.bfg_unknown_69_upgrade,
77: AoCUpgradeResourceSubprocessor.conversion_resistance_upgrade,
78: AoCUpgradeResourceSubprocessor.trade_penalty_upgrade,
79: AoCUpgradeResourceSubprocessor.gather_stone_efficiency_upgrade,
Expand Down Expand Up @@ -137,6 +141,7 @@ class DE2TechSubprocessor:
214: DE2UpgradeResourceSubprocessor.free_kipchaks_upgrade,
216: DE2UpgradeResourceSubprocessor.sheep_food_amount_upgrade,
218: DE2UpgradeResourceSubprocessor.cuman_tc_upgrade,
219: DE2UpgradeResourceSubprocessor.bfg_unknown_219_upgrade,
220: DE2UpgradeResourceSubprocessor.relic_food_production_upgrade,
234: DE2UpgradeResourceSubprocessor.first_crusade_upgrade,
236: DE2UpgradeResourceSubprocessor.burgundian_vineyards_upgrade,
Expand All @@ -160,6 +165,10 @@ class DE2TechSubprocessor:
274: DE2UpgradeResourceSubprocessor.chieftains_upgrade,
280: DE2UpgradeResourceSubprocessor.conversion_range_upgrade,
282: DE2UpgradeResourceSubprocessor.unknown_recharge_rate_upgrade,
502: DE2UpgradeResourceSubprocessor.bfg_unknown_502_upgrade,
507: DE2UpgradeResourceSubprocessor.bfg_unknown_507_upgrade,
521: DE2UpgradeResourceSubprocessor.bfg_unknown_521_upgrade,
551: DE2UpgradeResourceSubprocessor.bfg_unknown_551_upgrade,
}

@classmethod
Expand Down
Original file line number Diff line number Diff line change
@@ -1,4 +1,4 @@
# Copyright 2020-2023 the openage authors. See copying.md for legal info.
# Copyright 2020-2024 the openage authors. See copying.md for legal info.
#
# pylint: disable=too-few-public-methods
#
Expand All @@ -24,6 +24,90 @@ class DE2UpgradeAttributeSubprocessor:
Creates raw API objects for attribute upgrade effects in DE2.
"""

@staticmethod
def bfg_unknown_51_upgrade(
converter_group: ConverterObjectGroup,
line: GenieGameEntityGroup,
value: typing.Union[int, float],
operator: MemberOperator,
team: bool = False
) -> list[ForwardRef]:
"""
Creates a patch for a BfG unknown attribute effect (ID: 51).
:param converter_group: Tech/Civ that gets the patch.
:type converter_group: ...dataformat.converter_object.ConverterObjectGroup
:param line: Unit/Building line that has the ability.
:type line: ...dataformat.converter_object.ConverterObjectGroup
:param value: Value used for patching the member.
:type value: int, float
:param operator: Operator used for patching the member.
:type operator: MemberOperator
:returns: The forward references for the generated patches.
:rtype: list
"""
patches = []

# TODO: Implement

return patches

@staticmethod
def bfg_unknown_71_upgrade(
converter_group: ConverterObjectGroup,
line: GenieGameEntityGroup,
value: typing.Union[int, float],
operator: MemberOperator,
team: bool = False
) -> list[ForwardRef]:
"""
Creates a patch for a BfG unknown attribute effect (ID: 71).
:param converter_group: Tech/Civ that gets the patch.
:type converter_group: ...dataformat.converter_object.ConverterObjectGroup
:param line: Unit/Building line that has the ability.
:type line: ...dataformat.converter_object.ConverterObjectGroup
:param value: Value used for patching the member.
:type value: int, float
:param operator: Operator used for patching the member.
:type operator: MemberOperator
:returns: The forward references for the generated patches.
:rtype: list
"""
patches = []

# TODO: Implement

return patches

@staticmethod
def bfg_unknown_73_upgrade(
converter_group: ConverterObjectGroup,
line: GenieGameEntityGroup,
value: typing.Union[int, float],
operator: MemberOperator,
team: bool = False
) -> list[ForwardRef]:
"""
Creates a patch for a BfG unknown attribute effect (ID: 73).
:param converter_group: Tech/Civ that gets the patch.
:type converter_group: ...dataformat.converter_object.ConverterObjectGroup
:param line: Unit/Building line that has the ability.
:type line: ...dataformat.converter_object.ConverterObjectGroup
:param value: Value used for patching the member.
:type value: int, float
:param operator: Operator used for patching the member.
:type operator: MemberOperator
:returns: The forward references for the generated patches.
:rtype: list
"""
patches = []

# TODO: Implement

return patches

@staticmethod
def charge_attack_upgrade(
converter_group: ConverterObjectGroup,
Expand Down
Original file line number Diff line number Diff line change
Expand Up @@ -48,6 +48,156 @@ def bengali_conversion_resistance_upgrade(

return patches

@staticmethod
def bfg_unknown_69_upgrade(
converter_group: ConverterObjectGroup,
value: typing.Union[int, float],
operator: MemberOperator,
team: bool = False
) -> list[ForwardRef]:
"""
Creates a patch for a BfG unknown resource effect (ID: 69).
:param converter_group: Tech/Civ that gets the patch.
:type converter_group: ...dataformat.converter_object.ConverterObjectGroup
:param value: Value used for patching the member.
:type value: MemberOperator
:param operator: Operator used for patching the member.
:type operator: MemberOperator
:returns: The forward references for the generated patches.
:rtype: list
"""
patches = []

# TODO: Implement

return patches

@staticmethod
def bfg_unknown_219_upgrade(
converter_group: ConverterObjectGroup,
value: typing.Union[int, float],
operator: MemberOperator,
team: bool = False
) -> list[ForwardRef]:
"""
Creates a patch for a BfG unknown resource effect (ID: 219).
:param converter_group: Tech/Civ that gets the patch.
:type converter_group: ...dataformat.converter_object.ConverterObjectGroup
:param value: Value used for patching the member.
:type value: MemberOperator
:param operator: Operator used for patching the member.
:type operator: MemberOperator
:returns: The forward references for the generated patches.
:rtype: list
"""
patches = []

# TODO: Implement

return patches

@staticmethod
def bfg_unknown_502_upgrade(
converter_group: ConverterObjectGroup,
value: typing.Union[int, float],
operator: MemberOperator,
team: bool = False
) -> list[ForwardRef]:
"""
Creates a patch for a BfG unknown resource effect (ID: 502).
:param converter_group: Tech/Civ that gets the patch.
:type converter_group: ...dataformat.converter_object.ConverterObjectGroup
:param value: Value used for patching the member.
:type value: MemberOperator
:param operator: Operator used for patching the member.
:type operator: MemberOperator
:returns: The forward references for the generated patches.
:rtype: list
"""
patches = []

# TODO: Implement

return patches

@staticmethod
def bfg_unknown_507_upgrade(
converter_group: ConverterObjectGroup,
value: typing.Union[int, float],
operator: MemberOperator,
team: bool = False
) -> list[ForwardRef]:
"""
Creates a patch for a BfG unknown resource effect (ID: 507).
:param converter_group: Tech/Civ that gets the patch.
:type converter_group: ...dataformat.converter_object.ConverterObjectGroup
:param value: Value used for patching the member.
:type value: MemberOperator
:param operator: Operator used for patching the member.
:type operator: MemberOperator
:returns: The forward references for the generated patches.
:rtype: list
"""
patches = []

# TODO: Implement

return patches

@staticmethod
def bfg_unknown_521_upgrade(
converter_group: ConverterObjectGroup,
value: typing.Union[int, float],
operator: MemberOperator,
team: bool = False
) -> list[ForwardRef]:
"""
Creates a patch for a BfG unknown resource effect (ID: 521).
:param converter_group: Tech/Civ that gets the patch.
:type converter_group: ...dataformat.converter_object.ConverterObjectGroup
:param value: Value used for patching the member.
:type value: MemberOperator
:param operator: Operator used for patching the member.
:type operator: MemberOperator
:returns: The forward references for the generated patches.
:rtype: list
"""
patches = []

# TODO: Implement

return patches

@staticmethod
def bfg_unknown_551_upgrade(
converter_group: ConverterObjectGroup,
value: typing.Union[int, float],
operator: MemberOperator,
team: bool = False
) -> list[ForwardRef]:
"""
Creates a patch for a BfG unknown resource effect (ID: 551).
:param converter_group: Tech/Civ that gets the patch.
:type converter_group: ...dataformat.converter_object.ConverterObjectGroup
:param value: Value used for patching the member.
:type value: MemberOperator
:param operator: Operator used for patching the member.
:type operator: MemberOperator
:returns: The forward references for the generated patches.
:rtype: list
"""
patches = []

# TODO: Implement

return patches

@staticmethod
def burgundian_vineyards_upgrade(
converter_group: ConverterObjectGroup,
Expand Down
Loading

0 comments on commit 08fe258

Please sign in to comment.