Home
Start a new game
Explore games
Help
Log in or sign up
Log in
Username
Password (
Forgot it?
)
×
New to Playfic?
Full Name
Email
Username
Password
Password (confirm)
Are you sure about this?
Working with Firearms
by
Ryan Veeder
Played 2,579 times
View game source
(spoilers!)
Download the
.z8 file
Source Code
"Working with Firearms" by Ryan Veeder Firing Range is a room. "This is the room Ryan has made to back up some claims about knowing how to implement guns in Inform 7. Some of the source was written by Anubis, and you can see his version in the intfiction.org thread here: http://www.intfiction.org/forum/viewtopic.php?f=7&t=13142" A gun is a kind of thing. A gun has a number called bullets. The pistol is here. The pistol is a gun. The bullets of the pistol is 2. Definition: A thing is ungunlike if it is not a gun. Understand "shoot [gun] at [something ungunlike]" as shooting it with (with nouns reversed). Understand "shoot [something] with [something]" as shooting it with. Understand "shoot [something] at [something]" as shooting it with (with nouns reversed). Understand "fire [gun] at [something ungunlike]" as shooting it with (with nouns reversed). Understand "fire at [something ungunlike] with [gun]" as shooting it with. Understand "fire at [something] with [something]" as shooting it with. Shooting it with is an action applying to two things. Check shooting something with something: if the player is not carrying a gun, say "Shoot? With what gun?" instead; if the noun is the player, say "That would be a spectacularly horrible idea.[if the bullets of the second noun is 0] Besides, [the second noun] is empty.[end if]" instead; if the second noun is not a gun, say "Try a gun, you dope." instead. A thing can be precious. A thing has some text called preciousreason. The preciousreason of a thing is usually "You can't shoot that, for reasons that should be obvious." A thing can be fragile. A thing has some text called smithereens. The smithereens of a thing is usually "It explodes into a zillion pieces!" Check shooting something with a gun: if the bullets of the second noun is 0: say "You're empty." instead; otherwise if the noun is precious: say "[the preciousreason of the noun][paragraph break]" instead; Carry out shooting something with a gun: decrement the bullets of the second noun; say "Nice shot! You fire right into the center of [the noun]."; if the noun is fragile: say "[the smithereens of the noun][paragraph break]"; remove the noun from play; The crash test dummy is here. The delicate ice sculpture is here. The delicate ice sculpture is fragile. The priceless heirloom is here. The priceless heirloom is precious.