539d538
< string toRet = "";
544,545c543
< toRet = "not-a-pipe ";
< break;
---
> return "not-a-pipe";
550,551c548
< toRet = "flask of Amontillado ";
< break;
---
> return "flask of Amontillado";
558,559c555,561
< toRet = "S.T.L.T. ";
< break;
---
> return "S.T.L.T.";
> case contains_text(goal, "mus"):
> return "Muscle";
> case contains_text(goal, "mox"):
> return "Moxie";
> case contains_text(goal, "mys"):
> return "Mysticality";
564,565c566
< toRet = "fancy ball mask ";
< break;
---
> return "fancy ball mask";
569,570c570
< toRet = "albatross necklace ";
< break;
---
> return "albatross necklace";
574,583c574,576
< toRet = "Can-Can skirt ";
< break;
< }
< switch {
< case contains_text(goal, "mus"):
< return toRet + "Muscle";
< case contains_text(goal, "mox"):
< return toRet + "Moxie";
< case contains_text(goal, "mys"):
< return toRet + "Mysticality";
---
> return "Can-Can skirt";
> default:
> abort("Invalid goal!");
585c578
< return toRet;
---
> return "";
593,595c586
< } else {
< if (turns == "9-5-1")
< turns = "5-1";
---
> } else
597d587
< }
621,624d610
< // Patch to fix weird visits to clan basement
< while (contains_text(last_adventure, "basement"))
< last_adventure = visit_url(to_url(l));
<
631c617
< }
---
> }
641,706d626
< string wormwood_check_goal(string wwgoal, int turn) {
< string[int] goals = split_string(wwgoal, " ");
< string goal = goals[0];
< string altGoal = "";
< if (count(goals) >= 2)
< altGoal = goals[1];
<
< if (turn > 5)
< return goal;
< if (turn > 1)
< turn = 5;
<
< switch(goal) {
< case "not-a-pipe":
< if (turn == 5 && have_effect($effect[Spirit of Alph]) > 0)
< return goal;
< if (turn == 1 && have_effect($effect[Feelin' Philosophical]) > 0)
< return goal;
< goal = altGoal;
< break;
< case "flask of Amontillado":
< if (turn == 5 && have_effect($effect[Rat-Faced]) > 0)
< return goal;
< if (turn == 1 && have_effect($effect[Night Vision]) > 0)
< return goal;
< goal = altGoal;
< break;
< case "S.T.L.T.":
< if (turn == 5 && have_effect($effect[Bats in the Belfry]) > 0)
< return goal;
< if (turn == 1 && have_effect($effect[No Vertigo]) > 0)
< return goal;
< goal = altGoal;
< break;
< case "fancy ball mask":
< if (turn == 5 && have_effect($effect[Spirit of Alph]) > 0)
< return goal;
< if (turn == 1 && have_effect($effect[Dancing Prowess]) > 0)
< return goal;
< goal = altGoal;
< break;
< case "albatross necklace":
< if (turn == 5 && have_effect($effect[Rat-Faced]) > 0)
< return goal;
< if (turn == 1 && have_effect($effect[Unusual Fashion Sense]) > 0)
< return goal;
< goal = altGoal;
< break;
< case "Can-Can skirt":
< if (turn == 5 && have_effect($effect[Bats in the Belfry]) > 0)
< return goal;
< if (turn == 1 && have_effect($effect[Good with the Ladies]) > 0)
< return goal;
< goal = altGoal;
< break;
< }
< switch(goal) {
< case "Muscle":
< case "Moxie":
< case "Mysticality":
< return goal;
< }
< return "";
<
< }
<
725,730c645
< string goal = wormwood_check_goal(wwgoal, left);
< if (goal == "")
< return true;
< location loc = wormwood_location(goal, left);
< print(goal + " " + loc);
< return getChoiceAdv(to_do, loc, goal);
---
> return getChoiceAdv(to_do, wormwood_location(wwgoal, left), wwgoal);