Skip to content

Commit

Permalink
fix: prevent changeling influence being added
Browse files Browse the repository at this point in the history
lol
  • Loading branch information
raspersc2 committed Apr 10, 2024
1 parent 28cc16c commit 25566b3
Show file tree
Hide file tree
Showing 2 changed files with 9 additions and 2 deletions.
Original file line number Diff line number Diff line change
Expand Up @@ -51,8 +51,13 @@ def execute(
if not self.targets:
return False

targets = [
t
for t in self.targets
if not t.is_cloaked or t.is_cloaked and t.is_revealed
]
in_attack_range: list[Unit] = cy_in_attack_range(
self.unit, self.targets, self.extra_range
self.unit, targets, self.extra_range
)

if len(in_attack_range) == 0:
Expand Down
4 changes: 3 additions & 1 deletion src/ares/managers/path_manager.py
Original file line number Diff line number Diff line change
Expand Up @@ -22,6 +22,7 @@
AIR_VS_GROUND,
AIR_VS_GROUND_DEFAULT,
BLINDING_CLOUD,
CHANGELING_TYPES,
CORROSIVE_BILE,
COST,
COST_MULTIPLIER,
Expand Down Expand Up @@ -242,7 +243,8 @@ async def update(self, iteration: int) -> None:
self.calculated_danger_tiles = []

for unit in self.ai.enemy_units:
self.add_unit_influence(unit)
if unit.type_id not in CHANGELING_TYPES:
self.add_unit_influence(unit)

# update creep grid
self.creep_ground_grid = self.ground_grid.copy()
Expand Down

0 comments on commit 25566b3

Please sign in to comment.