Bug Adventuring in daily dungeon returns `false` when collecting fat loot token.

Gurth Burkle

New member
Mafia version: r27084

I have a script that completes the daily dungeon for me, by calling "adv1" in a loop until the daily dungeon is done.

In the loop body, it checks the return value of adv1, and if it is false, aborts the script.
The problem is that adv1 returns false when encountering "The Final Reward" and picking up the fat loot token.

Here is the output from my mafia CLI:

Code:
Visit to Dungeon: The Daily Dungeon in progress...

[459] The Daily Dungeon (Room 15)
Encounter: The Final Reward
The Final Reward
You acquire an item: fat loot token

Unable to adventure in the daily dungeon, aborting.
Unable to complete daily dungeon.

You can reproduce this by doing something like:
Code:
while (!get_property("dailyDungeonDone").to_boolean())
{
  if (!adv1($location[The Daily Dungeon]))
  {
    print("Aborting.")
    break;
  }
}

The docs state that adv1 returns false if a location becomes unavailable, and as The Daily Dungeon becomes unavailable when encountering The Final Reward, perhaps that is the issue?

Still, I would assume that the function would return true here. I can't see a reason why this should be considered a failed adventure attempt.
 
Was a dev decision that success of the adventure isn't what the boolean reports

I've been meaning to ask is there a way to capture success of last request? other than parsing results and state of every individual case
 
Top