void ObjectThrowEntity::calc_throw_range()
{
this->q_ptr->copy_from(this->o_ptr);
- object_flags(this->creature_ptr, this->q_ptr, this->obj_flags);
+ object_flags(this->q_ptr, this->obj_flags);
torch_flags(this->q_ptr, this->obj_flags);
distribute_charges(this->o_ptr, this->q_ptr, 1);
this->q_ptr->number = 1;
return;
}
- auto is_bold = cave_has_flag_bold(this->creature_ptr->current_floor_ptr, this->y, this->x, FF_PROJECT);
+ auto is_bold = cave_has_flag_bold(this->creature_ptr->current_floor_ptr, this->y, this->x, FF::PROJECT);
auto drop_y = is_bold ? this->y : this->prev_y;
auto drop_x = is_bold ? this->x : this->prev_x;
(void)drop_near(this->creature_ptr, this->q_ptr, this->corruption_possibility, drop_y, drop_x);
}
if (has_melee_weapon(this->creature_ptr, INVEN_MAIN_HAND) && has_melee_weapon(this->creature_ptr, INVEN_SUB_HAND)) {
- item_tester_hook = item_tester_hook_boomerang;
+ item_tester_hook = make_item_tester(object_is_boomerang);
*q = _("どの武器を投げますか? ", "Throw which item? ");
*s = _("投げる武器がない。", "You have nothing to throw.");
this->o_ptr = choose_object(this->creature_ptr, &this->item, *q, *s, USE_EQUIP, TV_NONE);
this->nx[this->cur_dis] = this->x;
mmove2(&this->ny[this->cur_dis], &this->nx[this->cur_dis], this->creature_ptr->y, this->creature_ptr->x, this->ty, this->tx);
auto *floor_ptr = this->creature_ptr->current_floor_ptr;
- if (cave_has_flag_bold(floor_ptr, this->ny[this->cur_dis], this->nx[this->cur_dis], FF_PROJECT)) {
+ if (cave_has_flag_bold(floor_ptr, this->ny[this->cur_dis], this->nx[this->cur_dis], FF::PROJECT)) {
return false;
}