10.7. Electricity and Magnetism

| Chapter 10: Physics: Substances, Ropes, Energy and Weight |

| 10.7. Electricity and Magnetism

Electrons are so tiny, and move so fast, that we will never want to simulate them in ordinary IF. So we simply regard electricity and magnetism as behaviours which are either present or not present, and which have instantaneous effects.

In Witnessed 1, batteries provide electricity to enable a "device" to work. Even if switched on, a device with no battery will be ineffective.

Larger voltages are exposed in Electrified, which makes certain items untouchable, and ensures that an experienced electrician will not even try.

Rules of Attraction provides for a magnet which attracts metallic items just strongly enough to stick together until pulled apart for any reason.

139
| Example Witnessed 1 A kind of battery which can be put into different devices, and which will lose power after extended use. |
WI

398
| Example Electrified Adding a rule before the basic accessibility rule that will prevent the player from touching electrified objects under the wrong circumstances. |
WI

Suppose we want to prevent the player from touching anything electrified -- not just as a response to TOUCH OBJECT, but at any time when the action would require contact with the object in question. "Electrified" A thing can be safe or electrified. A thing is usually safe. The Open Field is a room. "At this end of the field is a wire fence separating farm country from the government testing grounds beyond." The wire fence is an electrified thing in Open Field. It is scenery. The description of the wire fence is "Built into the fence is [a list of things which are part of the fence]." The scary box is an electrified container. It is part of wire fence. In the scary box is an alluring prize. The player carries a flashlight, a grappling hook, a very thick rubber glove, and a length of rope. The glove is wearable. This is the electrocution-wisdom rule: if the player wears the very thick rubber glove, make no decision; if the action requires a touchable noun and the noun is electrified, say "You fear touching [the noun]." instead; if the action requires a touchable second noun and the second noun is electrified, say "You fear touching [the second noun]." instead. The electrocution-wisdom rule is listed before the basic accessibility rule in the action-processing rules. Before touching the scary box: say "You can't help noticing a bright red sticker on the surface of the box." [This rule will fire even if we are not wearing the glove, because Before rules occur before basic accessibility.] Instead of opening the scary box: say "The scary box seems to be super-glued shut." [This one won't, because Instead rules occur after basic accessibility.] Test me with "touch fence / touch box / open box / wear glove / open box".

332
| Example Rules of Attraction A magnet which picks up nearby metal objects, and describes itself appropriately in room descriptions and inventory listings, but otherwise goes by its ordinary name. |
WI

Previous | Contents | Next