Changeset 292:93352ab52f2e


Ignore:
Timestamp:
04/08/11 19:59:42 (12 years ago)
Author:
Simon Cross <hodgestar@…>
Branch:
default
Phase:
public
Rebase:
39353837316634316137623735636261343633646565393932663861306164356338393564333430
Message:

Fix up possible inconsistencies in guard state machine fox shape handling by making liberal use of auto_next and splitting a state in two (one for the fox, one for the human).

File:
1 edited

Legend:

Unmodified
Added
Removed
  • data/npcs/guard.json

    r289 r292  
    1212            { "text": "Why is that?", "next": "state.monks" },
    1313            { "text": "Let me out now!", "next": "state.staycalm" },
    14             { "text": "Sayonara.", "next": "state.secondtry" }
     14            { "text": "Sayonara.", "next": "state.secondtry_human" }
    1515        ],
    1616        "events" : [
     
    2121    "monks" : {
    2222        "text" : "The monks have asked us not to let anybody out.",
    23         "choices" : [
    24             { "text": "Pretty please?", "next": "state.noexceptions" }
    25         ]
     23        "auto_next" : "state.noexceptions",
     24        "auto_next_text" : "Pretty please?"
    2625    },
    2726    "noexceptions" : {
    2827        "text" : "Sorry, no exceptions.",
    29         "auto_next": "state.secondtry"
     28        "auto_next": "state.secondtry_human"
    3029    },
    3130    "staycalm" : {
    3231        "text" : "Please stay calm. Perhaps you should go meditate?",
    33         "auto_next": "state.secondtry"
     32        "auto_next": "state.secondtry_human"
    3433    },
    35     "secondtry" : {
     34    "secondtry_fox" : {
     35        "text" : "Shoo!",
     36        "events" : [
     37            { "matches" : "world.fox.shape == 'human_with_fan'", "next": "state.disguised" },
     38            { "matches" : "world.fox.shape == 'human'", "next": "state.secondtry_human" }
     39        ]
     40    },
     41    "secondtry_human" : {
    3642        "text" : "The gate is locked, and it’s staying locked.",
    3743        "events" : [
    38             { "matches" : "world.fox.shape == 'human_with_fan'", "next": "state.disguised" }
     44            { "matches" : "world.fox.shape == 'human_with_fan'", "next": "state.disguised" },
     45            { "matches" : "world.fox.shape == 'fox'", "next": "state.secondtry_fox" }
    3946        ]
    4047    },
Note: See TracChangeset for help on using the changeset viewer.