ObjectThrowEntity::ObjectThrowEntity(player_type *creature_ptr, object_type *q_ptr, const int delay_factor_val, const int mult, const bool boomerang, const OBJECT_IDX shuriken)
: q_ptr(q_ptr)
+ , creature_ptr(creature_ptr)
+ , shuriken(shuriken)
, mult(mult)
, msec(delay_factor_val * delay_factor_val * delay_factor_val)
, boomerang(boomerang)
- , shuriken(shuriken)
- , creature_ptr(creature_ptr)
{
}
class ObjectThrowEntity {
public:
ObjectThrowEntity() = default;
- ObjectThrowEntity(player_type *creature_ptr, object_type *q_ptr, const int delay_factor_val, const int mult, const bool boomerang, const OBJECT_IDX shuriken);
+ ObjectThrowEntity(
+ player_type *creature_ptr, object_type *q_ptr, const int delay_factor_val, const int mult, const bool boomerang, const OBJECT_IDX shuriken);
virtual ~ObjectThrowEntity() = default;
+
object_type *q_ptr;
- int mult;
- int msec;
- bool boomerang;
- OBJECT_IDX shuriken;
OBJECT_IDX item{};
POSITION y{};
POSITION x{};
- POSITION ty{};
- POSITION tx{};
POSITION prev_y{};
POSITION prev_x{};
+ bool equiped_item = false;
+ bool hit_body = false;
+ PERCENTAGE corruption_possibility{};
+
+ bool check_can_throw();
+ void calc_throw_range();
+ bool calc_throw_grid();
+ void reflect_inventory_by_throw();
+ void set_class_specific_throw_params();
+ void set_racial_chance();
+ void exe_throw();
+ void display_figurine_throw();
+ void display_potion_throw();
+ void check_boomerang_throw();
+ void process_boomerang_back();
+ void drop_thrown_item();
+
+private:
+ player_type *creature_ptr;
+ OBJECT_IDX shuriken;
+ int mult;
+ int msec;
+ bool boomerang;
+ POSITION ty{};
+ POSITION tx{};
POSITION ny[19]{};
POSITION nx[19]{};
int chance{};
int tdis{};
int cur_dis{};
int visible{};
- PERCENTAGE corruption_possibility{};
object_type *o_ptr{};
- bool hit_body = false;
bool hit_wall = false;
- bool equiped_item = false;
bool return_when_thrown = false;
GAME_TEXT o_name[MAX_NLEN]{};
BIT_FLAGS obj_flags[TR_FLAG_SIZE]{};
char o2_name[MAX_NLEN]{};
bool super_boomerang{};
- bool check_can_throw();
- void calc_throw_range();
- bool calc_throw_grid();
- void reflect_inventory_by_throw();
- void set_class_specific_throw_params();
- void set_racial_chance();
- void exe_throw();
- void display_figurine_throw();
- void display_potion_throw();
- void check_boomerang_throw();
- void process_boomerang_back();
- void drop_thrown_item();
-
-private:
- player_type *creature_ptr;
-
bool check_what_throw();
bool check_throw_boomerang(concptr *q, concptr *s);
bool check_racial_target_bold();