4 * Created on: Aug 10, 2012
8 #ifndef COMMON_TARGETINGMODE_H_
9 #define COMMON_TARGETINGMODE_H_
18 TargetingMode() : mode(0) { }
21 bool TargetsEnemy() const { return (mode & FACTION_MASK) == ENEMY; }
22 bool TargetsAlly() const { return (mode & FACTION_MASK) == ALLY; }
23 bool TargetsAll() const { return (mode & COUNT_MASK) == ALL; }
24 bool TargetsMultiple() const { return (mode & COUNT_MASK) == MULTIPLE; }
25 bool TargetsSingle() const { return (mode & COUNT_MASK) == SINGLE; }
27 void TargetAllEnemies() { mode = ENEMY | ALL; }
28 void TargetMultipleEnemies() { mode = ENEMY | MULTIPLE; }
29 void TargetSingleEnemy() { mode = ENEMY | SINGLE; }
30 void TargetAllAllies() { mode = ALLY | ALL; }
31 void TargetMultipleAllies() { mode = ALLY | MULTIPLE; }
32 void TargetSingleAlly() { mode = ALLY | SINGLE; }
50 #endif /* COMMON_TARGETINGMODE_H_ */