Skip to content

Commit

Permalink
Merge pull request #302 from MatthewMarinets/mm/war_council_carrier
Browse files Browse the repository at this point in the history
sc2: Adding carrier war council upgrade -- repair drones
  • Loading branch information
Ziktofel authored Sep 14, 2024
2 parents f5532be + 472a63e commit 3f8e5ff
Show file tree
Hide file tree
Showing 5 changed files with 8 additions and 5 deletions.
2 changes: 1 addition & 1 deletion worlds/sc2/client.py
Original file line number Diff line number Diff line change
Expand Up @@ -1587,7 +1587,7 @@ def download_latest_release_zip(
file = tempdir + os.sep + f"{repo}.zip"
with open(file, "wb") as fh:
fh.write(r2.content)
sc2_logger.info(f"Successfully downloaded {repo}.zip.")
sc2_logger.info(f"Successfully downloaded {repo}.zip. Installing...")
return file, latest_metadata
else:
sc2_logger.warning(f"Status code: {r2.status_code}")
Expand Down
2 changes: 1 addition & 1 deletion worlds/sc2/item_descriptions.py
Original file line number Diff line number Diff line change
Expand Up @@ -944,7 +944,7 @@ def _ability_desc(unit_name_plural: str, ability_name: str, ability_description:
item_names.DESTROYER_REFORGED_BLOODSHARD_CORE: "Destroyer War Council upgrade. When fully charged, the Destroyer's Destruction Beam weapon does full damage to secondary targets.",
# Warp Ray
item_names.DAWNBRINGER_SOLARITE_LENS: "Dawnbringer War Council upgrade. Dawnbringers gain +2 range.",
# Carrier
item_names.CARRIER_REPAIR_DRONES: "Carrier War Council upgrade. Carriers gain 2 repair drones which heal nearby mechanical units.",
item_names.SKYLORD_HYPERJUMP: "Skylord War Council upgrade. " + _ability_desc("Skylords", "Hyperjump", "teleports the skylord to any location on the map."),
# Trireme
item_names.TEMPEST_DISINTEGRATION: "Tempest War Council upgrade. " + _ability_desc("Tempests", "Disintegration", "deals 500 damage to a target unit or structure over 20 seconds"),
Expand Down
2 changes: 1 addition & 1 deletion worlds/sc2/item_names.py
Original file line number Diff line number Diff line change
Expand Up @@ -768,7 +768,7 @@
DESTROYER_REFORGED_BLOODSHARD_CORE = "Reforged Bloodshard Core (Destroyer)"
# Warp Ray
DAWNBRINGER_SOLARITE_LENS = "Solarite Lens (Dawnbringer)"
# Carrier
CARRIER_REPAIR_DRONES = "Repair Drones (Carrier)"
SKYLORD_HYPERJUMP = "Hyperjump (Skylord)"
# Trireme
TEMPEST_DISINTEGRATION = "Disintegration (Tempest)"
Expand Down
2 changes: 1 addition & 1 deletion worlds/sc2/items.py
Original file line number Diff line number Diff line change
Expand Up @@ -1865,7 +1865,7 @@ def get_full_item_list():
item_names.DESTROYER_REFORGED_BLOODSHARD_CORE: ItemData(336 + SC2LOTV_ITEM_ID_OFFSET, ProtossItemType.War_Council_2, 5, SC2Race.PROTOSS, classification=ItemClassification.progression, parent_item=item_names.DESTROYER),
# 536 reserved for Warp Ray
item_names.DAWNBRINGER_SOLARITE_LENS: ItemData(537 + SC2LOTV_ITEM_ID_OFFSET, ProtossItemType.War_Council_2, 7, SC2Race.PROTOSS, classification=ItemClassification.progression, parent_item=item_names.DAWNBRINGER),
# 538 reserved for Carrier
item_names.CARRIER_REPAIR_DRONES: ItemData(538 + SC2LOTV_ITEM_ID_OFFSET, ProtossItemType.War_Council_2, 8, SC2Race.PROTOSS, classification=ItemClassification.progression, parent_item=item_names.CARRIER),
item_names.SKYLORD_HYPERJUMP: ItemData(539 + SC2LOTV_ITEM_ID_OFFSET, ProtossItemType.War_Council_2, 9, SC2Race.PROTOSS, parent_item=item_names.SKYLORD),
# 540 reserved for Trireme
item_names.TEMPEST_DISINTEGRATION: ItemData(541 + SC2LOTV_ITEM_ID_OFFSET, ProtossItemType.War_Council_2, 11, SC2Race.PROTOSS, parent_item=item_names.TEMPEST),
Expand Down
5 changes: 4 additions & 1 deletion worlds/sc2/rules.py
Original file line number Diff line number Diff line change
Expand Up @@ -1065,7 +1065,10 @@ def steps_of_the_rite_requirement(self, state: CollectionState) -> bool:
)

def protoss_heal(self, state: CollectionState) -> bool:
return state.has_any({item_names.CARRIER, item_names.SENTRY, item_names.SHIELD_BATTERY, item_names.RECONSTRUCTION_BEAM}, self.player)
return (
state.has_any((item_names.SENTRY, item_names.SHIELD_BATTERY, item_names.RECONSTRUCTION_BEAM), self.player)
or state.has_all((item_names.CARRIER, item_names.CARRIER_REPAIR_DRONES), self.player)
)

def templars_charge_requirement(self, state: CollectionState) -> bool:
return (
Expand Down

0 comments on commit 3f8e5ff

Please sign in to comment.