diff options
Diffstat (limited to 'node/keepdiceexecnode.cpp')
| -rw-r--r-- | node/keepdiceexecnode.cpp | 7 |
1 files changed, 6 insertions, 1 deletions
diff --git a/node/keepdiceexecnode.cpp b/node/keepdiceexecnode.cpp index 89cda38..347931d 100644 --- a/node/keepdiceexecnode.cpp +++ b/node/keepdiceexecnode.cpp @@ -46,6 +46,11 @@ void KeepDiceExecNode::run(ExecutionNode* previous) { QList<Die*> diceList=previousDiceResult->getResultList(); + if(m_numberOfDice < 0) + { + m_numberOfDice = diceList.size() + m_numberOfDice; + } + QList<Die*> diceList3= diceList.mid(0,m_numberOfDice); QList<Die*> diceList2; @@ -76,7 +81,7 @@ void KeepDiceExecNode::run(ExecutionNode* previous) } } } -void KeepDiceExecNode::setDiceKeepNumber(quint64 n) +void KeepDiceExecNode::setDiceKeepNumber(qint64 n) { m_numberOfDice = n; } |