From 36df81a7e3bb23d4cc347cc335fbd9b949a6af91 Mon Sep 17 00:00:00 2001 From: colin Date: Mon, 6 Mar 2023 18:33:45 -0800 Subject: Altered: s/campaign/adventure globally --- src/queries.lisp | 20 ++++++++++---------- 1 file changed, 10 insertions(+), 10 deletions(-) (limited to 'src/queries.lisp') diff --git a/src/queries.lisp b/src/queries.lisp index 1816c5c..9cd581c 100644 --- a/src/queries.lisp +++ b/src/queries.lisp @@ -9,22 +9,22 @@ "Return all quests in which one of player's heroes is engaged." (remove nil (mapcar #'quest (player-heroes player)))) -(defun player-campaigns (player) - "Return a list of campaigns one of the players' heroes is involved in." - (mapcar #'campaign (player-quests player) )) +(defun player-adventures (player) + "Return a list of adventures one of the players' heroes is involved in." + (mapcar #'adventure (player-quests player) )) -(defun campaign-heros (campaign &key (activep t)) - "All the heros actively involved in this CAMPAIGN. If ACTIVEP, then +(defun adventure-heros (adventure &key (activep t)) + "All the heros actively involved in this ADVENTURE. If ACTIVEP, then only the active quest(s) are considered, otherwise all quests are considered." (remove-duplicates (mapcan #'heroes-on-quest (if activep - (remove-if-not #'quest-startedp (quests-in-campaign campaign)) - (quests-in-campaign campaign))))) + (remove-if-not #'quest-startedp (quests-in-adventure adventure)) + (quests-in-adventure adventure))))) (defun fetch-comrades (player &key (activep t)) - "Returns all the heroes in any one of the player's campaigns. If + "Returns all the heroes in any one of the player's adventures. If ACTIVEP, then only heroes involved in active quests are returned." (remove-duplicates - (loop :for campaign :in (player-campaigns player) - :nconc (campaign-heros campaign :activep activep)))) + (loop :for adventure :in (player-adventures player) + :nconc (adventure-heros adventure :activep activep)))) -- cgit v1.2.3