Hybrid Choices

version 7 by AW Freyr

  • Home page
  • Beginning
  • Previous
  • Next



  • Section: Handling Objects
    By default, if an object is chosen, nothing happens. You are simply booted out of cyoa mode. You need to teach Hybrid Choices how to handle object choices.
    This is mostly done through the General Choose Object rules.
        General choose object rule for a martian (called N):
            say "You brutally murder the unarmed Martian. Now you feel both safe AND empowered.";
            now N is dead.
    This implementation is good enough if your applications are limited. However, Hybrid Choices provides us a method of changing the rulebook to check objects. This rulebook is called the object-choice-handler. Changing the object-choice-handler changes which rulebook is consulted. The one restriction is that these must be object-based rulebooks.
        The murder rules are an object based rulebook.
        
        A page-toggle rule for #killallmartians:
            now the object-choice-handler are the murder rules;
            populate choice list with living martians.
        
        Murder a martian (called N):
            say "You brutally murder the unarmed Martian. Now you feel both safe AND empowered.";
            now N is dead.
    One problem. After we've picked an object we are booted to interactive mode, and we might not want that. All we need do is designate a page to go to. We manually change the current page.
        Murder a martian (called N):
            say "You brutally murder the unarmed Martian. Now you feel both safe AND empowered.";
            now N is dead;
            now the current page is asafespace.
        
        asafespace is a page.
        "Finally. A safe space.".