Open
Conversation
🤖 Augment PR SummarySummary: This PR introduces an initial “QUEST” system implementation for default (non-ruleset) rooms, storing quest state in Changes:
Technical Notes: Combat prepare/result hooks can short-circuit combat flow (negative return) for non-hostile quest interactions; NPC death events finalize quest outcomes and persist owner state. 🤖 Was this summary useful? React with 👍 or 👎 |
| } | ||
|
|
||
| // Q4: summon phantom | ||
| if ($qid == 'Q4' && $action == 'summon') { |
|
|
||
| // Q4: 花束安抚 | ||
| if ($qid == 'Q4') { | ||
| $slot = quest_find_item_slot($player, 'Q4', 'comfort'); |
| { | ||
| global $db, $tablepre; | ||
| if (empty($npc_id)) return false; | ||
| $result = $db->query("SELECT hp FROM {$tablepre}players WHERE pid = '$npc_id'"); |
There was a problem hiding this comment.
| if (empty($qstate['cheer_points'])) $qstate['cheer_points'] = 0; | ||
| if (empty($qstate['cheer_turns'])) $qstate['cheer_turns'] = 0; | ||
| $qstate['cheer_points'] += !empty($player['final_damage']) ? $player['final_damage'] : 0; | ||
| $qstate['cheer_turns'] += 1; |
| } elseif ($qid == 'Q6') { | ||
| quest_fail('Q6', $owner, 'hide_npc_killed'); | ||
| } elseif ($qid == 'Q7') { | ||
| if ($killer_pid == $owner_pid) quest_complete('Q7', $owner); |
- Q4 summon: add active quest check before processing - Q4 summon: spawn q4_flower item when phantom is summoned - Q7 cheer: only count turns when player is attacker - Q7 NPC death: fail quest if idol killed by third party
This file contains hidden or bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters
Sign up for free
to join this conversation on GitHub.
Already have an account?
Sign in to comment
Add this suggestion to a batch that can be applied as a single commit.This suggestion is invalid because no changes were made to the code.Suggestions cannot be applied while the pull request is closed.Suggestions cannot be applied while viewing a subset of changes.Only one suggestion per line can be applied in a batch.Add this suggestion to a batch that can be applied as a single commit.Applying suggestions on deleted lines is not supported.You must change the existing code in this line in order to create a valid suggestion.Outdated suggestions cannot be applied.This suggestion has been applied or marked resolved.Suggestions cannot be applied from pending reviews.Suggestions cannot be applied on multi-line comments.Suggestions cannot be applied while the pull request is queued to merge.Suggestion cannot be applied right now. Please check back later.
No description provided.