Conditions:
When an action is requested on an item, these conditions must be met in
order for an action to be successful. When the action is successful there
are potential effects that can occur.
Effects:
When an action is completed successful, there are multiple types of effects
that can occur, depending on which action is committed on a certain item.
Kind 1: ACTION <ITEM>
A Kind 1 action is an action that makes the player do something to an item.
Examples: eat apple, open door, push box, etc.
Kind 2: ACTION <DIRECTION>
A Kind 2 action is an action that makes the player walk in a certain direction, most likely into a new area/room.
Examples: go west, go left, etc.
Kind 3: ACTION <ITEM>
<ITEM>
A Kind 3 action is an action that makes the player interact with two items.
Examples: put apple on table, push box on button, use key on door, etc
These are the general conditions and requirements for items.
- Item must be in the same room as the player
- Item must be able to be affected by action
- Item must be in a state where action can be affective
- Item may need a certain attribute to be a certain value before action can be affective
- Item may no longer accessible
- Item may not be able to be affected by current action
- Item position may be changed
- Other item states may be changed
- New rooms may be accessible or closed off
- Player state may be changed
- Item may change another item's attribute value
These are specific conditions and effects that are affiliated with certain actions. This means that along with the general
conditions and effects listed above, there are special conditions and effects that can also be included with specific actions.
If items have "No additional ..." listed, they only follow the determined general conditions/requirements listed above, and
have no exceptions.
- actions:
- [name of action]:
- conditions:
- set:
- :
attribute:
value:
- text_fail:
- text_success:
The action's behavior when called on an <ITEM>
that does not support the action.
- No additional conditions
- A new room may be available
- open:
"I can't open the <ITEM>
"
- No additional requirements
- A room may no longer be available
- close:
"I can't close the <ITEM>
"
- Item must not be too heavy
- No additional effects
- push:
- conditions:
- weight:
"I push the <ITEM>
to no effect"
- Item must not be too heavy
- No additional effects
- pull:
- conditions:
- weight:
"I pull the <ITEM>
to no effect"
"I examine the <ITEM>
but find nothing of interest"
- No additional Conditions
- No additional effects
- turn_on:
"I am unable to turn on the <ITEM>
"
- No additional Conditions
- No additional effects
- turn_off:
"I am unable to turn off the <ITEM>
"
- A direction must be given.
- Move player to room in direction
- Brief description of room will be printed
- go:
"I can't find a way to go [direction]"
Walk
- Player must have inventory space for Item
- Take Item out of room (changes room description and state)
- Put Item in player inventory
- Decrease player inventory space
- take:
"I can't take the <ITEM>
"
Pickup
- Player must have inventory space for Item
- Take Item out of room (changes room description and state)
- Put Item in player inventory
- Decrease player inventory space
- pick_up:
"I can't pick up the <ITEM>
"
- Item must be in inventory
- Take Item out of player inventory
- Increase player inventory space
- Put Item in room (changes room description and state)
- drop:
"I drop the <ITEM>
"
- No additional Conditions
- No additional effects
- use:
"I can't figure out how to use the <ITEM>
"
Consume, Eat, Drink
- Item must be liquid
- No additional effects
- drink:
"I do not want to drink the <ITEM>
"
- Item must be solid
- No additional effects
- eat:
"I do not want to eat the <ITEM>
"
- Item must be solid
- No additional effects
- consume:
"I do not want to consume the <ITEM>
"
- No additional Conditions
- No additional effects
- use_on:
"I can't figure out how to use the <ITEM>
on the <ITEM>
"