Skip to content
New issue

Have a question about this project? Sign up for a free GitHub account to open an issue and contact its maintainers and the community.

By clicking “Sign up for GitHub”, you agree to our terms of service and privacy statement. We’ll occasionally send you account related emails.

Already on GitHub? Sign in to your account

Hardcoded data for sc2::Ability cooldowns, keep track of used_cooldown_abilities #100

Open
ImpulseCloud opened this issue Mar 30, 2021 · 0 comments
Labels
feature New feature or request research

Comments

@ImpulseCloud
Copy link

Is your feature request related to a particular part of the API (function, class, functor)? If so, specify it.
sc2::AbilityData should include ability_cooldown if it has a cooldown.

Is your feature request related to a problem? Please describe.
API does not list a unit's abilities on cooldown, and AbilityData does not even list the ability_cooldown amount,

Describe the solution you'd like
Need a hardcoded map<pair<ability_id, cooldown_amount>> (or unordered_map), and insert into sc2::AbilityData possibly. Then, can use a separate used_abilities map to keep track of used abilities and when the cooldown should be finished. Perhaps capture UnitCommands that match a filter for abilities_with_cooldowns and set when_cooldown_finished for that Unit.
std::map<std::pair<unit_id, std::vector<ability_id, when_cooldown_finished>> used_abilities;

Describe alternatives you've considered
In sc2::Unit, could add Used_Abilities vector of <ability_id, when_cooldown_finished>. (similar to Buffs) Could share a reference or shared_ptr with the sc2api map of Used_Abilities.

Additional context
This could be tracked manually in bots (per ability), but would be more useful for the API to have the ability to track these wholesale.

@ImpulseCloud ImpulseCloud changed the title Hardcoded data for sc2::Ability cooldowns, keep track of used_abilities Hardcoded data for sc2::Ability cooldowns, keep track of used_cooldown_abilities Mar 30, 2021
@alkurbatov alkurbatov added feature New feature or request research labels Jul 4, 2021
Sign up for free to join this conversation on GitHub. Already have an account? Sign in to comment
Labels
feature New feature or request research
Projects
None yet
Development

No branches or pull requests

2 participants