A couple of tweaks on quests.
This commit is contained in:
@@ -73,13 +73,18 @@ void check_quest_menu() {
|
||||
}
|
||||
}
|
||||
|
||||
void apply_quest_reward(int score) {
|
||||
if (score <= 0) {
|
||||
speak_with_history("No reward earned.", true);
|
||||
return;
|
||||
}
|
||||
string get_quest_favor_phrase(int score) {
|
||||
if (score <= 2) return "The gods are displeased with your performance.";
|
||||
if (score < QUEST_STONE_SCORE) return "The gods are pleased with your performance.";
|
||||
int extreme_threshold = QUEST_LOG_SCORE - 2;
|
||||
if (score < extreme_threshold) return "The gods are very pleased with your performance.";
|
||||
if (score < QUEST_LOG_SCORE) return "The gods are extremely pleased with your performance.";
|
||||
return "The gods are ultimately pleased with your performance.";
|
||||
}
|
||||
|
||||
void apply_quest_reward(int score) {
|
||||
double favor_gain = score * QUEST_FAVOR_PER_POINT;
|
||||
if (favor_gain < 0) favor_gain = 0;
|
||||
favor += favor_gain;
|
||||
|
||||
int stones_gain = (score >= QUEST_STONE_SCORE) ? 1 : 0;
|
||||
@@ -100,7 +105,7 @@ void apply_quest_reward(int score) {
|
||||
add_personal_count(ITEM_HEAL_SCROLL, scrolls_added);
|
||||
|
||||
string message = "Quest Complete!\n\nRewards:\n";
|
||||
message += "Favor: +" + format_favor(favor_gain) + "\n";
|
||||
message += get_quest_favor_phrase(score) + "\n";
|
||||
if (stones_gain > 0) message += "Stones: +" + stones_added + "\n";
|
||||
if (logs_gain > 0) message += "Logs: +" + logs_added + "\n";
|
||||
if (skins_gain > 0) message += "Skins: +" + skins_added + "\n";
|
||||
@@ -110,9 +115,6 @@ void apply_quest_reward(int score) {
|
||||
}
|
||||
|
||||
void run_quest(int quest_type) {
|
||||
string quest_name = get_quest_name(quest_type);
|
||||
string quest_desc = get_quest_description(quest_type);
|
||||
text_reader(quest_name + "\n\n" + quest_desc, "Quest Instructions", true);
|
||||
p.pause_all();
|
||||
int score = 0;
|
||||
if (quest_type == QUEST_BAT_INVASION) score = run_bat_invasion();
|
||||
|
||||
Reference in New Issue
Block a user