BWAPI
|
00001 #pragma once 00002 #include "../../../../Utils/FSM/Condition.h" 00003 #include <BWAPI.h> 00004 00005 struct HasRangedAttack : Condition 00006 { 00007 HasRangedAttack(BWAPI::Unit* unit) 00008 { 00009 m_value = unit->getType().groundWeapon().maxRange() >= TILE_SIZE || 00010 unit->getType().airWeapon().maxRange() >= TILE_SIZE; 00011 } 00012 00013 bool evaluate() const 00014 { 00015 return m_value; 00016 } 00017 00018 private: 00019 bool m_value; 00020 };