Armed by David Ratliff


First I would like to thank Sebastian Rahn for helping me test this update and providing helpful feedback.

Section: Basics of this Extension

This extension adds the actions shooting something with something and stabbing something with something.

Shooting a non-person thing is allowed, but has no real affect on the thing without additional rules. It is possible to make a game where the player has to shoot bottles to win a prize, or even to stop an enemy in a vehicle by shooting the tires.

Stabbing a non-person thing is also allowed, but again does nothing on it's own. Again, the uses for this would depend on what the author had need to do with it.

Another thing this extension does is add a few kinds: weapon (kind of thing), projectile (kind of weapon), blade (kind of weapon), fire arm (kind of projectile), bow (kind of projectile), knife (kind of blade) and sword (kind of blade). An author can create most any weapon they want using fire arm, bow, knife or sword, and they should behave properly.

Lastly, this extension makes it possible for a player holding a weapon to succeed in persuasion up to 80% of the time.

Section: Changes in this Version

The shooting and stabbing actions now work for any actor, not just the player.

This version no longer causes instant death when shooting or stabbing a person. Everyone starts out with 100 health, and attacks do various damage depending upon the weapon used and random outcomes.

The player can use examine me for information about his or her health.

Taking inventory will also allow the player to see his or her present health.

Examining a NPC will also allow the player to see the present health of the NPC.

If the player shoots or stabs another actor, that actor will become hostile. Hostile actors will take any weapon available (if there is one) and fight back.

Additionally, a dead person no longer magically vanishes. A dead person, naturally, can not do anything, and little can be done to a dead person. If the need should arise, however, it is now possible to search the corpse of a fallen enemy, and take anything they may have been carrying.

Section: 6L02 Compatibility Update

This extension differs from the author's original version: it has been modified for compatibility with version 6L02 of Inform. The latest version of this extension can be found at <https://github.com/i7/extensions>.

This extension is released under the Creative Commons Attribution licence. Bug reports, feature requests or questions should be made at <https://github.com/i7/extensions/issues>.

Example: * Bob Fights Back! - A simple game featuring poor Bob. We can order Bob around (if we carry a weapon), or eliminate Bob. In this example, Bob will grab a weapon (if there is one available) and fight back. Using test commands may not give the desired results, as there is a 20% chance Bob will not do as he is told. After running the test me, one can restart the game to try something different. Trying test Bob will show Bob refusing to be bullied (and with luck, Bob refusing to commit suicide).

"Bob Fights Back!"

Include Armed by David Ratliff

Use no scoring.

Hyar is a room. Thar is east of Hyar. A gun is a fire arm in Hyar. Bob is a man in Hyar. A katana is a sword in Thar.

Test me with "Bob, go east/take gun/Bob, go east/go east/x me/x Bob/shoot Bob with gun/x me/shoot Bob with gun/shoot Bob with gun/shoot Bob with gun/shoot Bob with gun/x me/x Bob/search Bob/take katana"

Test Bob with "take gun/Bob, go east/go east/Bob, take katana/Bob, drop katana/Bob, stab Bob with katana"

Example: ** Shooting Gallery - Bob invites you to shoot bottles to win a prize! This example is to show why it might be useful to allow a non-person thing to be shot. It shows the report shooting non-people rule being replaced, as well as a simple way to make shooting a non-person thing actually do something.

"Shooting Gallery"

Include Armed by David Ratliff

Use no scoring.

When play begins:
         say "A shady looking guy named Bob has convinced you to try your luck at shooting down six bottles with a cork gun. 'If you can do it, I[apostrophe]ll give you a teddy bear,' he promises."

Shooting gallery is a room.
     A bottle is a kind of thing.
     A table is in shooting gallery.
     Six bottles are on the table.
     A cork gun is a fire arm in shooting gallery.
     Bob is a man in shooting gallery.

Instead of shooting Bob with the cork gun, say "Bob gives you a frightening stare and says 'You wouldn[apostrophe]t stand a chance even if that thing were real!'".

Instead of doing anything to Bob, say "He glares at you and says 'Just see if you can shoot all the bottles.'"

The report shooting non-people rule is not listed in any rulebook.

After shooting a bottle with something: remove the noun from play; continue the action.

Report shooting a bottle with something: say "POP! goes the cork gun. SHATTER! goes the bottle. Bob says '[bottles message]!'"

To say bottles message:
     let x be the number of bottles on the table;
     if x is 5:
         say "Only 5 more to go";
     otherwise if x is 4:
         say "Only 4 more";
     otherwise if x is 3:
         say "Half way there";
     otherwise if x is 2:
         say "Just 2 more";
     otherwise if x is 1:
         say "Only 1 more and you win";
     otherwise:
         say "You shot all of the bottles! You win the teddy bear";
         end the story finally saying "You should give your newly won teddy bear to someone you love!".

Test me with "x Bob/take cork gun/shoot Bob with cork gun/shoot a bottle with cork gun/shoot a bottle with cork gun/shoot a bottle with cork gun/shoot a bottle with cork gun/shoot a bottle with cork gun/shoot a bottle with cork gun"

Example: *** Trolls - Bob, king of the trolls, must be destroyed! This example shows how easy it is to override some of the values used by Armed, such as max health and maximum damage, as well as how to make a NPC always want to attack the player on sight. Additionally, this example shows a simple way to create something to restore health to the player.

"Trolls"

Include Armed by David Ratliff

Use no scoring.

A crossbow is a bow. The description of the crossbow is "An old crossbow. It still functions, but only barely." The maximum damage of the crossbow is 25.

A sharpened bone is a kind of knife. The maximum damage of a sharpened bone is 15.

A thing called the old rusty sword is a sword.

A potion is a kind of thing.

Instead of drinking a potion:
         if the present health of the player is less than 86 begin;
             let elixer be a random potion carried by the player;
             say "You gulp down the vile tasting potion. 15 points have been restored to your health.";
             now the present health of the player is the present health of the player + 15;
             remove elixer from play;
         otherwise;
             say "Drinking the potion while your health is [present health of the player] will do you no good. Save it for when you need it.";
         end if.

A troll is a kind of person. The max health of a troll is usually 40. A troll is usually hostile. Every troll carries one sharpened bone.

Forrest is a room. The description of forrest is "A lush forrest. In front of you is a cave. A peculiar odor wafts out from the cave. Strangely, you neither see nor here any animals. Will you go in?" The crossbow and one potion are here.

Cave is a room. Cave is inside from forrest. The description of cave is "A dank cave. It smells rather like trolls." A troll called a tall troll is in cave.

Passage is north of cave. The description is "A narrow passage leading deeper into the cave." A troll called a short troll is here. It carries two potions.

Throneroom is west of passage. The description is "This is the throneroom of Bob the troll king." Bob is a troll in throneroom. The max health of Bob is 70. Bob is docile. Bob carries the old rusty sword.

After going to throneroom for the first time:
     say "Bob the troll king looks at you and says 'I am the troll king. Leave now or I will punish you for killing my followers!'".

Every turn:
         if Bob is dead, end the story finally saying "You have slain Bob, king of the trolls!".

Test me with "take all/go in/shoot troll with crossbow/shoot troll with crossbow/x me/drink potion/i/go north/shoot troll with crossbow/shoot troll with crossbow/search troll/take potions/i/drink potion/x me/go west/shoot Bob with crossbow/shoot Bob with crossbow/shoot Bob with crossbow/shoot Bob with crossbow"