Open BurnySc2 opened 1 year ago
Merging #163 (2ee5387) into develop (731c12c) will decrease coverage by
0.00%
. The diff coverage is65.00%
.
@@ Coverage Diff @@
## develop #163 +/- ##
===========================================
- Coverage 60.16% 60.15% -0.01%
===========================================
Files 107 107
Lines 13974 14011 +37
===========================================
+ Hits 8408 8429 +21
- Misses 5566 5582 +16
Impacted Files | Coverage Δ | |
---|---|---|
sc2/main.py | 15.54% <0.00%> (ø) |
|
test/autotest_bot.py | 0.00% <0.00%> (ø) |
|
test/benchmark_bot_ai_init.py | 0.00% <0.00%> (ø) |
|
test/benchmark_prepare_units.py | 0.00% <0.00%> (ø) |
|
sc2/unit.py | 79.94% <33.33%> (-0.42%) |
:arrow_down: |
sc2/bot_ai_internal.py | 60.07% <80.00%> (+0.07%) |
:arrow_up: |
sc2/constants.py | 98.64% <100.00%> (+0.01%) |
:arrow_up: |
test/test_pickled_data.py | 99.40% <100.00%> (+<0.01%) |
:arrow_up: |
test/test_pickled_ramp.py | 100.00% <100.00%> (ø) |
Help us with your feedback. Take ten seconds to tell us how you rate us. Have a feature suggestion? Share it here.
Fixes https://github.com/BurnySc2/python-sc2/issues/157
This PR adds the
Unit.abilities
property which returns a set of AbilityId for all own units. Returns an empty set and a warning for neutral and enemy units. This is useful so you don't have to handle querying abilities yourself, to check if tech requirement is met or if an ability is on cooldown (e.g. blink). However this sends one query to the API on each iteration beforeon_step
is called.