Skip to content

Commit

Permalink
Add Shock Divisions
Browse files Browse the repository at this point in the history
  • Loading branch information
Ziktofel committed Sep 20, 2024
1 parent 10730dc commit 9e47a3f
Show file tree
Hide file tree
Showing 5 changed files with 11 additions and 3 deletions.
1 change: 1 addition & 0 deletions worlds/sc2/item_descriptions.py
Original file line number Diff line number Diff line change
Expand Up @@ -157,6 +157,7 @@ def _ability_desc(unit_name_plural: str, ability_name: str, ability_description:
Durable Royal Guard support flyer. Loaded with strong anti-capital air missiles.
Can switch into Assault Mode to attack ground units.
"""),
item_names.SHOCK_DIVISION: "Royal Guard Heavy tank. Long-range artillery in Siege Mode.",
item_names.PROGRESSIVE_TERRAN_INFANTRY_WEAPON: GENERIC_UPGRADE_TEMPLATE.format("damage", TERRAN, "infantry"),
item_names.PROGRESSIVE_TERRAN_INFANTRY_ARMOR: GENERIC_UPGRADE_TEMPLATE.format("armor", TERRAN, "infantry"),
item_names.PROGRESSIVE_TERRAN_VEHICLE_WEAPON: GENERIC_UPGRADE_TEMPLATE.format("damage", TERRAN, "vehicles"),
Expand Down
5 changes: 3 additions & 2 deletions worlds/sc2/item_groups.py
Original file line number Diff line number Diff line change
@@ -1,6 +1,7 @@
import typing
from . import item_names, items
from .mission_tables import campaign_mission_table, SC2Campaign, SC2Mission, SC2Race
from ..hk import item_table

"""
Item name groups, given to Archipelago and used in YAMLs and /received filtering.
Expand Down Expand Up @@ -193,7 +194,7 @@ def get_all_group_names(cls) -> typing.Set[str]:
item_name_groups[ItemGroupNames.FACTORY_UNITS] = factory_units = [
item_names.HELLION, item_names.VULTURE, item_names.GOLIATH, item_names.DIAMONDBACK,
item_names.SIEGE_TANK, item_names.THOR, item_names.PREDATOR, item_names.WIDOW_MINE,
item_names.CYCLONE, item_names.WARHOUND,
item_names.CYCLONE, item_names.WARHOUND, item_names.SHOCK_DIVISION,
]
item_name_groups[ItemGroupNames.STARPORT_UNITS] = starport_units = [
item_names.MEDIVAC, item_names.WRAITH, item_names.VIKING, item_names.BANSHEE,
Expand Down Expand Up @@ -375,7 +376,7 @@ def get_all_group_names(cls) -> typing.Set[str]:
if item_data.type in (items.TerranItemType.Progressive, items.TerranItemType.Progressive_2)
]
item_name_groups[ItemGroupNames.MENGSK_UNITS] = [
item_names.PRIDE_OF_AUGUSTRGRAD, item_names.SKY_FURY,
item_names.PRIDE_OF_AUGUSTRGRAD, item_names.SKY_FURY, item_names.SHOCK_DIVISION,
]
item_name_groups[ItemGroupNames.WOL_ITEMS] = vanilla_wol_items = (
wol_units
Expand Down
1 change: 1 addition & 0 deletions worlds/sc2/item_names.py
Original file line number Diff line number Diff line change
Expand Up @@ -38,6 +38,7 @@
# Elites
PRIDE_OF_AUGUSTRGRAD = "Pride of Augustgrad"
SKY_FURY = "Sky Fury"
SHOCK_DIVISION = "Shock Division"

# Terran Buildings
BUNKER = "Bunker"
Expand Down
4 changes: 4 additions & 0 deletions worlds/sc2/items.py
Original file line number Diff line number Diff line change
Expand Up @@ -42,6 +42,7 @@ class TerranItemType(ItemTypeEnum):
Mercenary = "Mercenary", 12
Nova_Gear = "Nova Gear", 13
Progressive_2 = "Progressive Upgrade", 14
Unit_2 = "Unit", 15


class ZergItemType(ItemTypeEnum):
Expand Down Expand Up @@ -218,6 +219,9 @@ def get_full_item_list():
item_names.SKY_FURY:
ItemData(51 + SC2WOL_ITEM_ID_OFFSET, TerranItemType.Unit, 29, SC2Race.TERRAN,
classification=ItemClassification.progression, origin={"ext"}),
item_names.SHOCK_DIVISION:
ItemData(52 + SC2WOL_ITEM_ID_OFFSET, TerranItemType.Unit2, 0, SC2Race.TERRAN,
classification=ItemClassification.progression, origin={"ext"}),

# Some other items are moved to Upgrade group because of the way how the bot message is parsed
item_names.PROGRESSIVE_TERRAN_INFANTRY_WEAPON: ItemData(100 + SC2WOL_ITEM_ID_OFFSET, TerranItemType.Upgrade, 0, SC2Race.TERRAN, quantity=WEAPON_ARMOR_UPGRADE_MAX_LEVEL),
Expand Down
3 changes: 2 additions & 1 deletion worlds/sc2/rules.py
Original file line number Diff line number Diff line change
Expand Up @@ -146,7 +146,8 @@ def terran_basic_anti_air(self, state: CollectionState) -> bool:
item_names.PRIDE_OF_AUGUSTRGRAD,
), self.player)
or (
state.has_all((item_names.SIEGE_TANK, item_names.MEDIVAC), self.player)
state.has(item_names.MEDIVAC, self.player)
and state.has_any((item_names.SIEGE_TANK, item_names.SHOCK_DIVISION), self.player)
and state.count(item_names.SIEGE_TANK_PROGRESSIVE_TRANSPORT_HOOK, self.player) >= 2
)
)
Expand Down

0 comments on commit 9e47a3f

Please sign in to comment.