Advertisement
Not a member of Pastebin yet?
Sign Up,
it unlocks many cool features!
- Section 1 - Definitions
- A wizard is a kind of person.
- A warrior is a kind of person.
- A weapon is a kind of thing.
- A dagger is a kind of weapon.
- A sword is a kind of weapon.
- A staff is a kind of weapon.
- Wielding is a thing based rulebook. The wielding rules have outcomes allow it (success), it is too heavy (failure), it is too magical (failure).
- The wielder is a person that varies.
- To consult the rulebook for (C - a person) wielding (W - a weapon):
- now the wielder is C;
- follow the wielding rules for W.
- Wielding a sword: if the wielder is not a warrior, it is too heavy.
- Wielding a staff: if the wielder is not a wizard, it is too magical.
- Wielding a dagger: allow it.
- Section 2 - Example
- Dungeon is a room.
- Gandalf is a wizard in Dungeon.
- Conan is a warrior in Dungeon.
- The rusty dagger is a dagger in Dungeon.
- The elvish sword is a sword in Dungeon.
- The oaken staff is a staff in Dungeon.
- Instead of giving a weapon (called W) to someone (called C):
- consult the rulebook for C wielding W;
- if the rule failed:
- let the outcome text be "[outcome of the rulebook]" in sentence case;
- say "[C] declines. '[outcome text].'";
- otherwise:
- now C carries W;
- say "[C] gladly accepts [the W]."
- The can't take people's possessions rule is not listed in any rulebook.
- Test me with "give sword to gandalf / give sword to conan / give staff to conan / give staff to gandalf / give dagger to gandalf / get dagger / give dagger to conan".
Advertisement
Add Comment
Please, Sign In to add comment
Advertisement