-/*
- * AttackChoice.h
- *
- * Created on: Aug 7, 2012
- * Author: holy
- */
-
#ifndef BATTLE_ATTACKCHOICE_H_
#define BATTLE_ATTACKCHOICE_H_
+namespace battle {
+ class Battle;
+}
+namespace common {
+ class Item;
+ class Spell;
+}
+
+#include "TargetSelection.h"
+
namespace battle {
class AttackChoice {
};
public:
- AttackChoice() : type(UNDECIDED) { }
+ AttackChoice()
+ : thing(0), selection(), type(UNDECIDED) { }
+ explicit AttackChoice(Battle *b)
+ : thing(0), selection(b), type(UNDECIDED) { }
~AttackChoice() { }
public:
Type GetType() const { return type; }
void SetType(Type t) { type = t; }
+ const common::Item *GetItem() const { return (const common::Item *)thing; }
+ void SetItem(const common::Item *i) { thing = i; }
+ const common::Spell *GetSpell() const { return (const common::Spell *)thing; }
+ void SetSpell(const common::Spell *s) { thing = s; }
+ TargetSelection &Selection() { return selection; }
+ const TargetSelection &Selection() const { return selection; }
+
+ void Reset();
private:
+ const void *thing;
+ TargetSelection selection;
Type type;
};
}
-#endif /* BATTLE_ATTACKCHOICE_H_ */
+#endif