blob: f566d778f5983dec60e91d35aff66288cb3b9ea6 (
plain) (
blame)
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
31
32
33
34
35
36
37
38
39
40
41
42
43
44
45
46
47
48
49
50
51
52
53
54
55
56
57
58
59
60
61
62
63
64
65
66
67
|
#ifndef REROLLDICENODE_H
#define REROLLDICENODE_H
#include "executionnode.h"
#include "result/diceresult.h"
#include "validator.h"
/**
* @brief The RerollDiceNode class reroll dice given a condition and replace(or add) the result.
*/
class RerollDiceNode : public ExecutionNode
{
public:
/**
* @brief The ReRollMode enum
*/
enum ReRollMode {EQUAL,LESSER,GREATER};
/**
* @brief RerollDiceNode
*/
RerollDiceNode();
/**
* @brief ~RerollDiceNode
*/
virtual ~RerollDiceNode();
/**
* @brief run
* @param previous
*/
virtual void run(ExecutionNode* previous);
/**
* @brief setValidator
*/
virtual void setValidator(Validator* );
/**
* @brief toString
* @return
*/
virtual QString toString(bool )const;
/**
* @brief setAddingMode
*/
virtual void setAddingMode(bool);
/**
* @brief getPriority
* @return
*/
virtual qint64 getPriority() const;
/**
* @brief getCopy
* @return
*/
virtual ExecutionNode* getCopy() const;
private:
DiceResult* m_diceResult;
bool m_adding;
Validator* m_validator;
};
#endif // REROLLDICENODE_H
|