Skip to main content

Indie game storeFree gamesFun gamesHorror games
Game developmentAssetsComics
SalesBundles
Jobs
TagsGame Engines

The third approach is neatest I think (personally speaking).

For 8-bit compatibility sake, this works, and was specifically coded to map to DAAD. You are permitted to have matches inside an outer match so long as every element of an outer match is also a match:

: match "examine _" {
   : match "_ door" {
      : if (is_present "door") {
         // Do something
      }
   }
   : match "_ cupboard" {
      : if (is_present "cupboard") {
         // Do something
      }
   }
}


POINT OF NOTE : There is an open issue (in the mysterious issue tracker) for being able to combine PRESENT, CARRIED, WORN, BESIDE, NOTWORN in match statements as a short form for the if statement within the match. This should eliminate the need for an inner if per item (in many  cases).