Blizzard / s2client-api

StarCraft II Client - C++ library supported on Windows, Linux and Mac designed for building scripted bots and research using the SC2API.
MIT License
1.66k stars 282 forks source link

Cooldown in AbilityData? #288

Open LiliumAtratum opened 5 years ago

LiliumAtratum commented 5 years ago

Many abilities have some time requirements - e.g. cast-time and/or cooldown. Would it be possible to expose that information in the AbilityData?

In my particular case:

I am trying to learn the rate at which Protoss gateway units can be produced. Normal construction time in a gateway is available in: bot->Observation()->GetUnitTypeData()[sc2::UNIT_TYPEID::PROTOSS_ZEALOT].build_time but I cannot find a way to learn about the warpgate cooldown after warp-in. I would expect something in: bot->Observation()->GetAbilityData()[sc2::UNIT_ACTIONID::TRAINWARP_ZEALOT].???

A cooldown field would solve my problem.

Or maybe I can learn that info somewhere else?