You signed in with another tab or window. Reload to refresh your session.You signed out in another tab or window. Reload to refresh your session.You switched accounts on another tab or window. Reload to refresh your session.Dismiss alert
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.
The text was updated successfully, but these errors were encountered:
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
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.
The text was updated successfully, but these errors were encountered: