diff --git a/LICENSE b/LICENSE new file mode 100644 index 0000000..63265ca --- /dev/null +++ b/LICENSE @@ -0,0 +1,21 @@ +MIT License + +Copyright (c) 2020 He4eT + +Permission is hereby granted, free of charge, to any person obtaining a copy +of this software and associated documentation files (the "Software"), to deal +in the Software without restriction, including without limitation the rights +to use, copy, modify, merge, publish, distribute, sublicense, and/or sell +copies of the Software, and to permit persons to whom the Software is +furnished to do so, subject to the following conditions: + +The above copyright notice and this permission notice shall be included in all +copies or substantial portions of the Software. + +THE SOFTWARE IS PROVIDED "AS IS", WITHOUT WARRANTY OF ANY KIND, EXPRESS OR +IMPLIED, INCLUDING BUT NOT LIMITED TO THE WARRANTIES OF MERCHANTABILITY, +FITNESS FOR A PARTICULAR PURPOSE AND NONINFRINGEMENT. IN NO EVENT SHALL THE +AUTHORS OR COPYRIGHT HOLDERS BE LIABLE FOR ANY CLAIM, DAMAGES OR OTHER +LIABILITY, WHETHER IN AN ACTION OF CONTRACT, TORT OR OTHERWISE, ARISING FROM, +OUT OF OR IN CONNECTION WITH THE SOFTWARE OR THE USE OR OTHER DEALINGS IN THE +SOFTWARE. diff --git a/README.md b/README.md index 92a5d38..f375b48 100644 --- a/README.md +++ b/README.md @@ -1,20 +1,31 @@ # Yet another experiment +[![Play online](https://img.shields.io/badge/Play-online-orange?style=flat-square)](https://he4et.github.io/elseifplayer/#/focus/https%3A%2F%2Fifarchive.org%2Fif-archive%2Fgames%2Ftads%2Fyet_another_experiment.t3/toxin/) +[![IFDB](https://img.shields.io/badge/IFDB-page-lightgrey?style=flat-square)](https://ifdb.tads.org/viewgame?id=rsssdo3anjpwnt6e) + A small "escape the room" style [TADS3](https://www.tads.org/) game. Designed as a set of examples for developing [interactive fiction](http://www.ifwiki.org/index.php/FAQ). -![screenshot](/screenshot.png?raw=true) +![screenshot](/docs/screenshot.png?raw=true) ## How to play -1. Download the story-file on the [release page](https://github.com/He4eT/tads3_experiment/releases) -1. Install the interpreter that supports TADS adventure games (see the list below) +You can +[play this game online](https://he4et.github.io/elseifplayer/#/focus/https%3A%2F%2Fifarchive.org%2Fif-archive%2Fgames%2Ftads%2Fyet_another_experiment.t3/toxin/) +or play it with any TADS3 interpreter. -### List of interpreters +See this [cheat sheet](http://pr-if.org/doc/play-if-card/play-if-card-300dpi.png) if you are not familiar with interactive fiction. - - Desktop: [gargoyle](https://github.com/garglk/garglk/) or [frobtads](https://github.com/realnc/frobtads) - - Android: [fabularium](https://play.google.com/store/apps/details?id=com.luxlunae.fabularium&hl=en) - - iOS: [frotz](https://apps.apple.com/au/app/frotz/id287653015) +### Play with an interpreter + +1. Download `yet_another_experiment.t3` from the [release page](https://github.com/He4eT/tads3_experiment/releases). +1. Install the interpreter that supports TADS adventure games (see the list below). + +#### List of interpreters: + - Web: [elseifplayer](https://he4et.github.io/elseifplayer/#/); + - Desktop: [gargoyle](https://github.com/garglk/garglk/) or [frobtads](https://github.com/realnc/frobtads); + - Android: [fabularium](https://play.google.com/store/apps/details?id=com.luxlunae.fabularium&hl=en); + - iOS: [frotz](https://apps.apple.com/au/app/frotz/id287653015); See the [full list](http://www.ifwiki.org/index.php/Interpreter). @@ -29,19 +40,19 @@ the full list of "bricks" on [this page](/docs/table_of_contents.md). ### Pre-build - 1. Clone this repo - 1. Install [frobtads](https://github.com/realnc/frobtads) - 1. Copy `frobtads/tads3/lib/` to `project_path/lib/` - 1. Copy `frobtads/tads3/include/`to `project_path/lib/include/` + 1. Clone this repo; + 1. Install [frobtads](https://github.com/realnc/frobtads); + 1. Copy `frobtads/tads3/lib/` to `project_path/lib/`; + 1. Copy `frobtads/tads3/include/` to `project_path/lib/include/`; ### Build ``` -t3make -f experiment +t3make -f yet_another_experiment ``` ### Incremental build ``` -watch -n 1 t3make -d -we -nobanner -f experiment +watch -n 1 t3make -d -we -nobanner -f yet_another_experiment ``` ## Tutorials and documentation diff --git a/map.md b/docs/map.md similarity index 100% rename from map.md rename to docs/map.md diff --git a/screenshot.png b/docs/screenshot.png similarity index 100% rename from screenshot.png rename to docs/screenshot.png diff --git a/experiment.t b/experiment.t index fe1a4bd..2ebe299 100644 --- a/experiment.t +++ b/experiment.t @@ -10,7 +10,8 @@ versionInfo: GameID showAbout () { " << desc >>
Designed as a small set of - useful examples for developers. "; + useful examples for developers.\b + https://github.com/He4eT/tads3_experiment/"; } byline = 'by He4eT' diff --git a/src/item/elevator.t b/src/item/elevator.t index 16b729f..801a54f 100644 --- a/src/item/elevator.t +++ b/src/item/elevator.t @@ -18,10 +18,13 @@ elevatorDoor: LockableWithKey, Door dobjFor (UnlockWith) { action () { - inherited; - self.makeOpen(true); - " A few seconds later - the elevator arrived on the floor. "; + if (keyFitsLock(gIobj)) { + self.makeOpen(true); + " A few seconds later + the elevator arrived on the floor. "; + } else { + " You can't apply this to a card reader. "; + } } } diff --git a/test/unlockElevatorWithWrongKey b/test/unlockElevatorWithWrongKey new file mode 100644 index 0000000..fa039ec --- /dev/null +++ b/test/unlockElevatorWithWrongKey @@ -0,0 +1,13 @@ +>turn on the light +>w +>open locker +>take floss +>e +>s +>s +>take tape +>w +>open dumpster +>search cloth +>take key +>unlock elevator with tubular key diff --git a/test/walkthrough b/test/walkthrough new file mode 100644 index 0000000..16ff09b --- /dev/null +++ b/test/walkthrough @@ -0,0 +1,33 @@ +>turn on the light +>w +>open locker +>take floss +>e +>s +>s +>take tape +>w +>open dumpster +>take cloth +>search cloth +>take key +>e +>unlock door +>e +>x assistant +>x cable +>x connector +>fix connector with floss +>plug cable in robot +>x robot +>a team +>a Alice +>w +>w +>type 1984 on keypad +>x middle locker +>take keycard +>unlock elevator with the keycard +>s +>e +>q