| 2229 | return true; |
| 2230 | } |
| 2231 | static inline bool canUseTech(Unit thisUnit, BWAPI::TechType tech, Position target, bool checkCanTargetUnit = true, bool checkTargetsType = true, bool checkCanIssueCommandType = true, bool checkCommandibility = true) |
| 2232 | { |
| 2233 | if (!checkCommandibility) |
| 2234 | Broodwar->setLastError(); |
| 2235 | else if (!canCommand(thisUnit)) |
| 2236 | return false; |
| 2237 | |
| 2238 | if (!canUseTechPosition(thisUnit, tech, target, checkTargetsType, checkCanIssueCommandType, false)) |
| 2239 | return false; |
| 2240 | |
| 2241 | return true; |
| 2242 | } |
| 2243 | static inline bool canUseTech(Unit thisUnit, BWAPI::TechType tech, Unit target = nullptr, bool checkCanTargetUnit = true, bool checkTargetsType = true, bool checkCanIssueCommandType = true, bool checkCommandibility = true) |
| 2244 | { |
| 2245 | if (!checkCommandibility) |
no test coverage detected