| 59 | } |
| 60 | |
| 61 | staticfn void |
| 62 | on_goal(void) |
| 63 | { |
| 64 | if (Qstat(killed_nemesis)) { |
| 65 | return; |
| 66 | } else if (!Qstat(made_goal)) { |
| 67 | qt_pager("goal_first"); |
| 68 | Qstat(made_goal) = 1; |
| 69 | } else { |
| 70 | /* |
| 71 | * Some QT_NEXTGOAL messages reference the quest artifact; |
| 72 | * find out if it is still present. If not, request an |
| 73 | * alternate message (qt_pager() will revert to delivery |
| 74 | * of QT_NEXTGOAL if current role doesn't have QT_ALTGOAL). |
| 75 | * Note: if hero is already carrying it, it is treated as |
| 76 | * being absent from the level for quest message purposes. |
| 77 | */ |
| 78 | unsigned whichobjchains = ((1 << OBJ_FLOOR) |
| 79 | | (1 << OBJ_MINVENT) |
| 80 | | (1 << OBJ_BURIED)); |
| 81 | struct obj *qarti = find_quest_artifact(whichobjchains); |
| 82 | |
| 83 | qt_pager(qarti ? "goal_next" : "goal_alt"); |
| 84 | if (Qstat(made_goal) < 7) |
| 85 | Qstat(made_goal)++; |
| 86 | } |
| 87 | } |
| 88 | |
| 89 | void |
| 90 | onquest(void) |
no test coverage detected