Changeset 350 for trunk/game/dialogue


Ignore:
Timestamp:
10/28/09 06:46:08 (10 years ago)
Author:
orlandov
Message:

Patch by Vaporice and or1andov:

  • add a quest model to the dialogue demo
  • refactor zenbit's dialogue tree to use quest engine
Location:
trunk/game/dialogue
Files:
1 added
1 edited

Legend:

Unmodified
Added
Removed
  • trunk/game/dialogue/drunkard.yaml

    r343 r350  
    3030              - "Glad to see you're feeling better." 
    3131              - gratitude 
    32               - pc.hasSatisfiedQuest('beer') and beer.quality > 1 
     32              - pc.met('bart') and not quest.hasFinishedQuest('beer') 
    3333            -  
    3434              - "Same old Bart,  I see." 
     
    4646              - "Are you drunk?" 
    4747              - elaborate_beer 
    48               - pc.canAcceptQuest('beer') 
     48              - not quest.hasQuest('beer') and not quest.hasFinishedQuest('beer') 
    4949            # above should always be true since there is no other way to get the quest   
    5050            - 
     
    6464    quest_beer:            
    6565         - say:  "You sir, are a gentleman and a scholar.  I am sure folks around here will help you find what you need." 
    66          - start_quest: beer 
     66         - start_quest: quests/beer.yaml 
    6767         - responses: 
    6868           -  
     
    7979             - "Hey, Bart - here is my shopping list I need to brew us up something tasty.  Can you help?" 
    8080             - help_beer 
    81              - pc.questIsCurrent("beer") 
     81             - quest.hasQuest("beer") 
    8282             # and howtobeer.state == "read" - howtobeer is an object the PC starts with, it has to be read for the PC to know what he needs to make beer. 
    8383           - 
    8484             - "By the way, Bart, I am looking for a chap named 'Pekko', you know were I can find him?" 
    8585             - help_fedex 
    86              - pc.questIsCurrent("fedex") 
     86             - quest.hasQuest("fedex") 
    8787           - 
    8888             - "Hey, try my fantastic brew!" 
    8989             - beer_tasting 
    90              - not not 'beer' in pc.inventory 
     90             - ('beer' in pc.inventory) 
    9191             # this is a bug in parser, bare string 'beer' cannot be first token 
    9292           - 
     
    9696             - "Well, I am off to make some beer, wish me luck!" 
    9797             - end 
    98              - pc.questIsCurrent('beer') 
     98             - quest.hasQuest('beer') 
    9999           - 
    100100             - "Adios, Bart" 
    101101             - end 
    102              - not pc.questIsCurrent('beer') 
     102             - not quest.hasQuest('beer') 
    103103           - 
    104104             - "Pekko was murdered.  And someone's responsible." 
     
    264264              - "What about Janie?" 
    265265              - janie_pekko_connection 
    266               - pc.hasSatisfiedQuest('fedex') 
     266              - quest.hasFinishedQuest('fedex') 
    267267            - 
    268268              - "Whatever, murderer.  I'll see you hang." 
     
    290290            -  
    291291              - "Guess we'll find out HOW powerful, now, won't we!" 
    292               - emd 
     292              - end 
    293293 
    294294    light_blackmail: 
Note: See TracChangeset for help on using the changeset viewer.