forked from miki151/keeperrl
-
Notifications
You must be signed in to change notification settings - Fork 0
/
Copy pathcollective_attack.h
31 lines (24 loc) · 908 Bytes
/
collective_attack.h
1
2
3
4
5
6
7
8
9
10
11
12
13
14
15
16
17
18
19
20
21
22
23
24
25
26
27
28
29
30
#pragma once
#include "util.h"
#include "view_id.h"
class CollectiveAttack {
public:
CollectiveAttack(vector<const Task*> attackTasks, Collective* attacker, const vector<Creature*>&,
optional<int> ransom = none);
CollectiveAttack(vector<const Task*> attackTasks, const string& name, ViewIdList, const vector<Creature*>&);
Collective* getAttacker() const;
const string& getAttackerName() const;
ViewIdList getAttackerViewId() const;
const vector<Creature*>& getCreatures() const;
optional<int> getRansom() const;
bool isOngoing() const;
bool operator == (const CollectiveAttack&) const;
SERIALIZATION_DECL(CollectiveAttack)
private:
optional<int> SERIAL(ransom);
vector<Creature*> SERIAL(creatures);
Collective* SERIAL(attacker) = nullptr;
string SERIAL(attackerName);
ViewIdList SERIAL(attackerViewId);
vector<WeakPointer<const Task>> SERIAL(attackTasks);
};