Closed ayu-mail closed 6 years ago
This is known in human combat, and this information is important to combat.
I agree with weapon and armor upgrades.
Weapon cooldown is only guessed from experience. You can not click on a unit and see the cooldown. I am more in favor of not having it because I fear it could break unit interactions but I have no strong evidence assuming you do not have the target.
With target information I strongly disagree. It would make a lot of units virtually obsolete. Just google for the micro bot video where there are tanks vs zerglings. Overall it would be a huge nerf to all splash and projectile units.
ZERG_RAVAGER: EFFECT_CORROSIVEBILE TERRAN_GHOST: EFFECT_NUKECALLDOWN PROTOSS_HIGHTEMPLAR: EFFECT_PSISTORM ...... How do you avoid this ABILITY? These injuries are high, but they are not available.
Is there any sign of attack on our unit? like this: unit->attacked(value:true or false)
const std::vector<sc2::Effect> effects = agent.Observation()->GetEffects();
and
const float radius = agent.Observation()->GetEffectData()[effect.effect_id].radius;
gives you everything you need.
No there is no "attacked" field. But you can monitor the health. If HP this loop is less then HP last loop then we can assume the unit is under attack (there are of course exceptions, e.g., stim).
thx, It was very helpful to me.
@ayu-mail Please, consider closing this issue if your question was answered.
How do you get enemy units attack targets, weapon cooldown, weapon level, armor level?
I looked up a lot of sc2 API issue and game tests, but I could only get my own, not the enemy,It's always zero.
thx