From 47ac1b7868b8bfb3e5fe71395a34124bf9f7209a Mon Sep 17 00:00:00 2001 From: Paweł Redman Date: Thu, 14 Dec 2017 22:16:48 +0100 Subject: Improve combat. --- src/common.hpp | 14 ++++++++++++++ 1 file changed, 14 insertions(+) (limited to 'src/common.hpp') diff --git a/src/common.hpp b/src/common.hpp index 54f9804..d4cebf5 100644 --- a/src/common.hpp +++ b/src/common.hpp @@ -187,11 +187,23 @@ namespace game { class unit_t; + class roll_params_t { + public: + size_t count = 1, sides = 20, bonus = 0; + + roll_params_t(void) = default; + roll_params_t(size_t sides_); + roll_params_t(size_t count_, size_t sides_); + roll_params_t(size_t count_, size_t sides_, size_t bonus_); + }; + class state_t { std::unordered_set units; std::unordered_set selected_units; std::unordered_set awake_units; + procgen::prng_t dice_prng; + public: world::world_t world; interface::state_t *interface; @@ -204,6 +216,8 @@ namespace game { // These are called by the interface. void select(rectf_t rect); void command(v2f_t x); + + size_t roll(roll_params_t *P); }; } -- cgit