Skip to content

Commit

Permalink
SC2: Adding Inf Missile Turret
Browse files Browse the repository at this point in the history
  • Loading branch information
EnvyDragon committed Oct 21, 2024
1 parent c285e8f commit 4d61525
Show file tree
Hide file tree
Showing 4 changed files with 25 additions and 9 deletions.
7 changes: 5 additions & 2 deletions worlds/sc2/item_descriptions.py
Original file line number Diff line number Diff line change
Expand Up @@ -603,6 +603,7 @@ def _ability_desc(unit_name_plural: str, ability_name: str, ability_description:
item_names.DEFILER: "Support caster. Can use the Dark Swarm, Consume, and Plague abilities.",
item_names.INFESTED_MARINE: "General-purpose Infested infantry. Has a timed life of 90 seconds.",
item_names.INFESTED_BUNKER: "Defensive structure. Periodically spawns Infested infantry that fight from inside. Acts as a mobile ground transport while uprooted.",
item_names.INFESTED_MISSILE_TURRET: "Anti-air defensive structure. Detects cloaked units and can uproot.",
item_names.INFESTED_SIEGE_TANK: "Siege tank. Can uproot itself to provide mobile tank support.",
item_names.INFESTED_DIAMONDBACK: "Fast, high-damage attacker. Can attack while moving and can bring flying units to the ground.",
item_names.INFESTED_BANSHEE: "Tactical-strike aircraft. Can cloak and can be upgraded to burrow.",
Expand Down Expand Up @@ -718,6 +719,8 @@ def _ability_desc(unit_name_plural: str, ability_name: str, ability_description:
item_names.INFESTED_BUNKER_CALCIFIED_ARMOR: "Infested Bunkers gain +3 armor.",
item_names.INFESTED_BUNKER_REGENERATIVE_PLATING: "Infested Bunkers gain increased life regeneration while rooted.",
item_names.INFESTED_BUNKER_ENGORGED_BUNKERS: "Infested Bunkers gain +2 cargo slots. Infested Trooper spawn cooldown is reduced by 20%.",
item_names.INFESTED_MISSILE_TURRET_BIOELECTRIC_PAYLOAD: "Increases anti-mechanical damage of Infested Missile Turrets by +6 per missile.",
item_names.INFESTED_MISSILE_TURRET_ACID_SPORE_VENTS: "Infested Missile Turrets gain a secondary weapon that applies Devourer Acid Spores in an area around the target.",
item_names.TYRANNOZOR_TYRANTS_PROTECTION: "Tyrannozors grants nearby friendly units 2 armor.",
item_names.TYRANNOZOR_BARRAGE_OF_SPIKES: "Unleash a Barrage of Spikes, dealing 100 damage to enemy ground and air units around the Tyrannozor.",
item_names.TYRANNOZOR_IMPALING_STRIKE: "Ultralisk and Tyrannozor melee attacks have a 20% chance to stun for 2 seconds.",
Expand Down Expand Up @@ -751,7 +754,7 @@ def _ability_desc(unit_name_plural: str, ability_name: str, ability_description:
item_names.FRIGHTFUL_FLESHWELDER_INFESTED_DIAMONDBACK: _get_resource_efficiency_desc(item_names.INFESTED_DIAMONDBACK),
item_names.FRIGHTFUL_FLESHWELDER_INFESTED_BANSHEE: _get_resource_efficiency_desc(item_names.INFESTED_BANSHEE),
item_names.FRIGHTFUL_FLESHWELDER_INFESTED_LIBERATOR: _get_resource_efficiency_desc(item_names.INFESTED_LIBERATOR),
item_names.ZERG_EXCAVATING_CLAWS: "Increases movement speed of Spore and Spine Crawlers, especially off creep. Also increases root speed.",
item_names.ZERG_EXCAVATING_CLAWS: "Increases movement speed of uprooted Zerg structures, especially off creep. Also increases root speed.",
item_names.ZERGLING_RAPTOR_STRAIN: "Allows Zerglings to jump up and down cliffs and leap onto enemies. Also increases Zergling attack damage by 2.",
item_names.ZERGLING_SWARMLING_STRAIN: "Zerglings will spawn instantly and with an extra Zergling per egg at no additional cost.",
item_names.ROACH_VILE_STRAIN: "Roach attacks will slow the movement and attack speed of enemies.",
Expand Down Expand Up @@ -781,7 +784,7 @@ def _ability_desc(unit_name_plural: str, ability_name: str, ability_description:
item_names.TWIN_DRONES: "Drones morph in groups of two at no additional cost and require less supply.",
item_names.MALIGNANT_CREEP: "Your units and structures gain increased life regeneration and 30% increased attack speed while on creep. Creep Tumors also spread creep faster and farther.",
item_names.VESPENE_EFFICIENCY: "Extractors produce Vespene gas 25% faster.",
item_names.ZERG_CREEP_STOMACH: "Zerg buildings no longer take damage off-creep. Spore and Spine Crawlers can now root off-creep.",
item_names.ZERG_CREEP_STOMACH: "Zerg buildings no longer take damage off-creep. Defensive structures can now root off-creep.",
item_names.KERRIGAN_INFEST_BROODLINGS: "Enemies damaged by Kerrigan become infested and will spawn Broodlings with timed life if killed quickly.",
item_names.KERRIGAN_FURY: "Each of Kerrigan's attacks temporarily increase her attack speed by 15%. Can stack up to 75%.",
item_names.KERRIGAN_ABILITY_EFFICIENCY: "Kerrigan's abilities have their cooldown and energy cost reduced by 20%.",
Expand Down
13 changes: 8 additions & 5 deletions worlds/sc2/item_names.py
Original file line number Diff line number Diff line change
Expand Up @@ -374,11 +374,12 @@
INFESTED_LIBERATOR = "Infested Liberator"

# Zerg Buildings
SPORE_CRAWLER = "Spore Crawler"
SPINE_CRAWLER = "Spine Crawler"
INFESTED_BUNKER = "Infested Bunker"
NYDUS_WORM = "Nydus Worm"
OMEGA_WORM = "Omega Worm"
SPORE_CRAWLER = "Spore Crawler"
SPINE_CRAWLER = "Spine Crawler"
INFESTED_BUNKER = "Infested Bunker"
INFESTED_MISSILE_TURRET = "Infested Missile Turret"
NYDUS_WORM = "Nydus Worm"
OMEGA_WORM = "Omega Worm"

# Zerg Weapon / Armor Upgrades
ZERG_UPGRADE_PREFIX = "Progressive Zerg"
Expand Down Expand Up @@ -529,6 +530,8 @@
FRIGHTFUL_FLESHWELDER_INFESTED_DIAMONDBACK = "Frightful Fleshwelder (Infested Diamondback)"
FRIGHTFUL_FLESHWELDER_INFESTED_BANSHEE = "Frightful Fleshwelder (Infested Banshee)"
FRIGHTFUL_FLESHWELDER_INFESTED_LIBERATOR = "Frightful Fleshwelder (Infested Liberator)"
INFESTED_MISSILE_TURRET_BIOELECTRIC_PAYLOAD = "Bioelectric Payload (Infested Missile Turret)"
INFESTED_MISSILE_TURRET_ACID_SPORE_VENTS = "Acid Spore Vents (Infested Missile Turret)"

# Zerg Strains
ZERGLING_RAPTOR_STRAIN = "Raptor Strain (Zergling)"
Expand Down
10 changes: 10 additions & 0 deletions worlds/sc2/items.py
Original file line number Diff line number Diff line change
Expand Up @@ -1203,6 +1203,9 @@ def get_full_item_list():
item_names.INFESTED_LIBERATOR:
ItemData(23 + SC2HOTS_ITEM_ID_OFFSET, ZergItemType.Unit, 22, SC2Race.ZERG,
classification=ItemClassification.useful, origin={"ext"}),
item_names.INFESTED_MISSILE_TURRET:
ItemData(24 + SC2HOTS_ITEM_ID_OFFSET, ZergItemType.Unit, 23, SC2Race.ZERG,
classification=ItemClassification.progression, origin={"ext"}),

item_names.PROGRESSIVE_ZERG_MELEE_ATTACK: ItemData(100 + SC2HOTS_ITEM_ID_OFFSET, ZergItemType.Upgrade, 0, SC2Race.ZERG, quantity=WEAPON_ARMOR_UPGRADE_MAX_LEVEL, origin={"hots"}),
item_names.PROGRESSIVE_ZERG_MISSILE_ATTACK: ItemData(101 + SC2HOTS_ITEM_ID_OFFSET, ZergItemType.Upgrade, 4, SC2Race.ZERG, quantity=WEAPON_ARMOR_UPGRADE_MAX_LEVEL, origin={"hots"}),
Expand Down Expand Up @@ -1511,6 +1514,12 @@ def get_full_item_list():
item_names.INFESTED_BUNKER_ENGORGED_BUNKERS:
ItemData(297 + SC2HOTS_ITEM_ID_OFFSET, ZergItemType.Mutation_4, 7, SC2Race.ZERG, parent_item=item_names.INFESTED_BUNKER,
origin={"ext"}),
item_names.INFESTED_MISSILE_TURRET_BIOELECTRIC_PAYLOAD:
ItemData(298 + SC2HOTS_ITEM_ID_OFFSET, ZergItemType.Mutation_5, 6, SC2Race.ZERG, parent_item=item_names.INFESTED_MISSILE_TURRET,
origin={"ext"}),
item_names.INFESTED_MISSILE_TURRET_ACID_SPORE_VENTS:
ItemData(299 + SC2HOTS_ITEM_ID_OFFSET, ZergItemType.Mutation_5, 7, SC2Race.ZERG, parent_item=item_names.INFESTED_MISSILE_TURRET,
origin={"ext"}),

item_names.ZERGLING_RAPTOR_STRAIN:
ItemData(300 + SC2HOTS_ITEM_ID_OFFSET, ZergItemType.Strain, 0, SC2Race.ZERG, parent_item=item_names.ZERGLING,
Expand Down Expand Up @@ -2311,6 +2320,7 @@ def get_item_table():
zvx_air_defense_ratings = {
item_names.SPORE_CRAWLER: 2,
# w/ Twin Drones: 1
item_names.INFESTED_MISSILE_TURRET: 2,
}
pvx_defense_ratings = {
item_names.PHOTON_CANNON: 2,
Expand Down
4 changes: 2 additions & 2 deletions worlds/sc2/rules.py
Original file line number Diff line number Diff line change
Expand Up @@ -519,7 +519,7 @@ def all_in_z_requirement(self, state: CollectionState):
return (
defense_rating >= 9 and beats_kerrigan
and state.has_any({item_names.MUTALISK, item_names.CORRUPTOR}, self.player)
and state.has(item_names.SPORE_CRAWLER, self.player)
and state.has_any({item_names.SPORE_CRAWLER, item_names.INFESTED_MISSILE_TURRET}, self.player)
)

def all_in_p_requirement(self, state: CollectionState):
Expand Down Expand Up @@ -635,7 +635,7 @@ def zerg_basic_anti_air(self, state: CollectionState) -> bool:
def zerg_basic_kerriganless_anti_air(self, state: CollectionState) -> bool:
return (
self.zerg_competent_anti_air(state) or state.has_any({item_names.SWARM_QUEEN, item_names.SCOURGE}, self.player)
or (self.advanced_tactics and state.has(item_names.SPORE_CRAWLER, self.player))
or (self.advanced_tactics and state.has_any({item_names.SPORE_CRAWLER, item_names.INFESTED_MISSILE_TURRET}, self.player))
)

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

0 comments on commit 4d61525

Please sign in to comment.