#include "target/projection-path-calculator.h"
#include "util/string-processor.h"
#include "view/display-messages.h"
+#include "wizard/wizard-messages.h"
+#include "game-option/cheat-types.h"
#define MON_SCAT_MAXD 10 /*!< mon_scatter()関数によるモンスター配置で許される中心からの最大距離 */
break;
int n = damroll(r_ptr->reinforce_dd[i], r_ptr->reinforce_ds[i]);
for (int j = 0; j < n; j++) {
- POSITION nx, ny, d = 7;
- scatter(player_ptr, &ny, &nx, y, x, d, PROJECT_NONE);
- (void)place_monster_one(player_ptr, place_monster_m_idx, ny, nx, r_ptr->reinforce_id[i], mode);
+ POSITION nx, ny, d;
+ const POSITION scatter_min = 7;
+ const POSITION scatter_max = 40;
+ for (d = scatter_min; d <= scatter_max; d++) {
+ scatter(player_ptr, &ny, &nx, y, x, d, PROJECT_NONE);
+ if (place_monster_one(player_ptr, place_monster_m_idx, ny, nx, r_ptr->reinforce_id[i], mode)) {
+ break;
+ }
+ }
+ if (d > scatter_max) {
+ msg_format_wizard(player_ptr, CHEAT_MONSTER, _("護衛の指定生成に失敗しました。", "Failed fixed escorts."));
+ }
}
}