summaryrefslogtreecommitdiff
path: root/common/action.h
diff options
context:
space:
mode:
Diffstat (limited to 'common/action.h')
-rw-r--r--common/action.h15
1 files changed, 12 insertions, 3 deletions
diff --git a/common/action.h b/common/action.h
index e1b06f2..122411b 100644
--- a/common/action.h
+++ b/common/action.h
@@ -18,14 +18,22 @@ class Action {
Draw // draw
};
+ //! Action target type.
+ enum TargetType {
+ None, // No target
+ Hand, // Target in hand.
+ Open // Target in open.
+ };
+
//! Type of action.
Type type;
//! Target of action (if applicable).
- int target;
+ TargetType target_type;
+ int target_offset;
Action();
- Action(Type ty, int ta = 0);
+ Action(Type ty, TargetType tt = None, int to = 0);
//! Compare to another action.
bool operator==(const Action& other);
@@ -33,7 +41,8 @@ class Action {
template<class Archive>
void serialize(Archive & ar, const unsigned int version) {
ar & type;
- ar & target;
+ ar & target_type;
+ ar & target_offset;
}
};