Page 1 of 2 1 2 LastLast
Results 1 to 10 of 20

Thread: "Quests > Hedge Maze Traps" infinite loop burns all adventures bug

  1. #1
    Senior Member
    Join Date
    Oct 2017
    Posts
    311

    Default "Quests > Hedge Maze Traps" infinite loop burns all adventures bug

    Using the built in quest script under "Quest" in mafia to select "hedge maze traps" without an auto heal script and insufficient starting resistance/HP can result in infinite loop of burning all your adventures.

    It should automatically abort that script if you become beaten up. There might be an assumption of 0HP after being beaten up (requiring manual healing to adventure again), but with passive HP regen you actually end up with positive HP after being beaten up and can immediately adventure again.


    Code:
    You are currently in room 0 and it will take you 4 turns to clear the maze.
    Entering the Hedge Maze...
    
    
    [1325] The Hedge Maze (Room 1)
    Encounter: 'Allo
    
    
    [1326] The Hedge Maze (Room 4)
    Encounter: Pooling Your Resources
    You lose 256 hit points
    
    
    [1327] The Hedge Maze (Room 7)
    Encounter: Of Mouseholes and Manholes
    You lose 302 hit points
    You lose 265 hit points
    
    
    [1328] The Hedge Maze (Room 7)
    Encounter: Of Mouseholes and Manholes
    You lose 214 hit points
    
    
    [1329] The Hedge Maze (Room 7)
    Encounter: Of Mouseholes and Manholes
    You lose 214 hit points
    
    
    [1330] The Hedge Maze (Room 7)
    Encounter: Of Mouseholes and Manholes
    You lose 215 hit points
    
    
    [1331] The Hedge Maze (Room 7)
    Encounter: Of Mouseholes and Manholes
    You lose 215 hit points
    
    
    [1332] The Hedge Maze (Room 7)
    Encounter: Of Mouseholes and Manholes
    You lose 215 hit points
    
    
    [1333] The Hedge Maze (Room 7)
    Encounter: Of Mouseholes and Manholes
    You lose 114 hit points
    
    
    [1334] The Hedge Maze (Room 7)
    Encounter: Of Mouseholes and Manholes
    You lose 115 hit points
    
    
    [1335] The Hedge Maze (Room 7)
    Encounter: Of Mouseholes and Manholes
    You lose 115 hit points
    
    
    [1336] The Hedge Maze (Room 7)
    Encounter: Of Mouseholes and Manholes
    You lose 115 hit points
    
    
    [1337] The Hedge Maze (Room 7)
    Encounter: Of Mouseholes and Manholes
    You lose 114 hit points

  2. #2
    Developer fronobulax's Avatar
    Join Date
    Feb 2009
    Location
    Central Virginia, USA
    Posts
    4,155

    Default

    This is why many people have a mood that aborts when they get Beaten Up.

    Not suggesting it doesn't need to be addressed in mafia but this will ease the pain until it is.

  3. #3
    Senior Member
    Join Date
    Oct 2017
    Posts
    311

    Default

    This is why many people have a mood that aborts when they get Beaten Up.

    Not suggesting it doesn't need to be addressed in mafia but this will ease the pain until it is.
    Originally Posted by fronobulax View Post
    Good points.

    IIRC I had just switched to a new mood that happened to have no had that in it.
    Is there some sort of universal mood that is automatically appended to all other moods?
    If not then a good feature to add might be for a checkbox option to "auto abort automation when beaten up" without relying on moods to do so.

    anyways, this is going off on a tangent. sorry about that.

  4. #4
    Senior Member AlbinoRhino's Avatar
    Join Date
    May 2008
    Posts
    826

    Default

    Adventure tab > HP/MP Usage tab > Stop Automation dropdown

    Very close to what you want.

  5. #5
    Senior Member AlbinoRhino's Avatar
    Join Date
    May 2008
    Posts
    826
    Last edited by AlbinoRhino; 05-04-2018 at 09:33 PM.

  6. #6
    Senior Member
    Join Date
    Oct 2017
    Posts
    311

    Default

    Thank you @AlbinoRhino those are all very useful tools.

  7. #7
    Senior Member
    Join Date
    Oct 2017
    Posts
    311

    Default

    So that is why I disabled the mood abort on beaten up... it aborts the universal recovery script i use to heal

  8. #8
    Senior Member AlbinoRhino's Avatar
    Join Date
    May 2008
    Posts
    826

    Default

    It aborts the recovery script? Or, automation aborts before the recovery script runs? If the latter, then, after an abort, you should be able to type "restore hp" or similar action and trigger your recovery script.

  9. #9
    Senior Member
    Join Date
    Oct 2017
    Posts
    311

    Default

    It aborts the recovery script? Or, automation aborts before the recovery script runs? If the latter, then, after an abort, you should be able to type "restore hp" or similar action and trigger your recovery script.
    Originally Posted by AlbinoRhino View Post
    I was playing manually, I lost a fight.
    I was sitting at 0HP and beaten up on the main map.
    I clicked on my HP at the status bar to run the currently configured recovery script
    It was aborted before it could heal me by the mood
    I did not try to go an adventure (which would have also ran the recovery script, but I happened to have tried to call it manually that time)
    Last edited by taltamir; 05-07-2018 at 07:36 AM.

  10. #10
    Developer
    Join Date
    Apr 2010
    Posts
    4,825

    Default

    So, looking at the code, it shouldn't continue unless recovery says it can.

    r18613 adds a check that you will survive automation, and prompts if you won't - lightly tested.
    r18614 adds a check for whether you succeed a test, and aborts if you don't - using wiki text, so may not work right.

    I'll may never use this code, so let me know if it works!

Posting Permissions

  • You may not post new threads
  • You may not post replies
  • You may not post attachments
  • You may not edit your posts
  •