return false;
}
- if ((q_ref.level != floor_ptr->dun_level) && (q_ref.type != QuestKindType::KILL_ANY_LEVEL)) {
+ if ((q_ref.level != floor_ptr->dun_level)) {
return false;
}
}
auto is_target = (q_ref.type == QuestKindType::RANDOM) && (q_ref.r_idx == m_ptr->r_idx);
- if ((q_ref.type == QuestKindType::KILL_LEVEL) || (q_ref.type == QuestKindType::KILL_ANY_LEVEL) || is_target) {
+ if ((q_ref.type == QuestKindType::KILL_LEVEL) || is_target) {
return true;
}
case QuestKindType::KILL_LEVEL:
case QuestKindType::RANDOM:
return this->complete_random();
- case QuestKindType::KILL_ANY_LEVEL:
- this->complete_kill_any_level();
- return std::make_tuple(false, false);
case QuestKindType::TOWER:
this->complete_tower();
return std::make_tuple(false, false);
return std::make_tuple(create_stairs, reward);
}
-void QuestCompletionChecker::complete_kill_any_level()
-{
- this->q_ptr->cur_num++;
- if (this->q_ptr->cur_num >= this->q_ptr->max_num) {
- complete_quest(this->player_ptr, this->quest_idx);
- this->q_ptr->cur_num = 0;
- }
-}
-
void QuestCompletionChecker::complete_tower()
{
if (!is_hostile(this->m_ptr)) {
void complete_kill_number();
void complete_kill_all();
std::tuple<bool, bool> complete_random();
- void complete_kill_any_level();
void complete_tower();
int count_all_hostile_monsters();
Pos2D make_stairs(const bool create_stairs);
if (q_ref.status == QuestStatusType::TAKEN || q_ref.status == QuestStatusType::STAGE_COMPLETED) {
switch (q_ref.type) {
case QuestKindType::KILL_LEVEL:
- case QuestKindType::KILL_ANY_LEVEL:
r_ptr = &r_info[q_ref.r_idx];
strcpy(name, r_ptr->name.c_str());
if (q_ref.max_num > 1) {
q_ptr->status = QuestStatusType::TAKEN;
reinit_wilderness = true;
- if (q_ptr->type != QuestKindType::KILL_ANY_LEVEL) {
- print_questinfo(player_ptr, q_index, true);
- return;
- }
-
- if (q_ptr->r_idx == 0) {
- q_ptr->r_idx = get_mon_num(player_ptr, 0, q_ptr->level + 4 + randint1(6), 0);
- }
-
- monster_race *r_ptr;
- r_ptr = &r_info[q_ptr->r_idx];
- while (r_ptr->kind_flags.has(MonsterKindType::UNIQUE) || (r_ptr->rarity != 1)) {
- q_ptr->r_idx = get_mon_num(player_ptr, 0, q_ptr->level + 4 + randint1(6), 0);
- r_ptr = &r_info[q_ptr->r_idx];
- }
-
- if (q_ptr->max_num == 0) {
- if (randint1(10) > 7) {
- q_ptr->max_num = 1;
- } else {
- q_ptr->max_num = randint1(3) + 1;
- }
- }
-
- q_ptr->cur_num = 0;
- concptr name = r_ptr->name.c_str();
-#ifdef JP
- msg_format("クエスト: %sを %d体倒す", name, q_ptr->max_num);
-#else
- msg_format("Your quest: kill %d %s", q_ptr->max_num, name);
-#endif
print_questinfo(player_ptr, q_index, true);
}