A horrible shot!

I have a blaster that can be set to stun or kill.

I want people to fall asleep when they get hit by stun.
I want them to die when they get hit by kill.

I want sleeping people to respond to “wake [person]” which makes them wake up.

The idea is that when people are incapacitated, they can be looted for their possessions.

Kill should be only for those that are a threat to the hero.

Stun is default on the blaster. you’d have to set it to kill specifically to kill someone.

if you kill an innocent, it should end the game.

if you try to kill or stun hero’s girlfriend, the game should stop you.

here’s what I have so far:

[code]Understand the command “zap” as something new.

Zapping it is an action applying to one visible thing. Understand “zap [someone]” as zapping it.

Understand the commands “shoot” and “blast” as “zap”.

Instead of zapping GIRLFRIEND:
say “What the ungodly (swear) is wrong with you, [player’s forename in title case]?! That’s not a toy, you know?! Be more responsible! HERO loves GIRLFRIEND. At least TRY to pretend you’re HERO!”

A person can be asleep.
A person can be awake.
A person is usually awake.

A person can be dead.
A person can be alive.
A person is usually alive.

Instead of zapping someone:
if the blaster is set to stun:
say “With a quick shot, [the noun] takes a bright blue zap to the body and goes down for a nap.”;
now the noun is asleep;
say “You kill [the noun].”
now the noun is dead.[/code]

[spoiler]This, too, is for internet noms!

[/spoiler]

I don’t think you need the first line, as “zap” is not a library action. Other than that, your code looks okay to me. (Well, not quite; you need a semicolon after the line ‘say “you kill [the noun].”’) You just need to add various things to it. You need an otherwise. You need an end the story finally saying. You need to modify all of your NPCs so they’ll behave differently when asleep. Stuff like that.

And in fact, you don’t need the bit about a person being dead, because that will end the game. The in-game NPC object never needs to be changed to reflect the fact that it’s dead.

Try this:

Instead of zapping someone: if the blaster is set to stun: say "With a quick shot, [the noun] takes a bright blue zap to the body and goes down for a nap."; now the noun is asleep; otherwise: say "You kill [the noun]."; end the story saying "That was a fatal mistake."

Oh, one more thing: As it currently stands, your code will allow the player to zap someone even if they’re not carrying the blaster. You need to test whether they’re carrying the blaster before the rest of the stuff happens.

In your example you write two separate INSTEAD rules (instead of zapping someone, instead of zapping girlfriend) and in each one you will need to check if the player holds the zapper.

Eventually the best thing is to use the series of rulebooks set up for every action. This is so your new action will work with all the other checks and the parser can naturally check for light, scope, etc. Then you can write exceptions such as “instead of zapping the ming vase” and “check zapping something reflective” or “check zapping when the player is in water” when you want to add more varied reactions that don’t need to all be packed into one INSTEAD rule.

Then you can use INSTEAD to disable the entire action in special cases “Instead of zapping in the Bermuda Triangle…” “Instead of zapping GIRLFRIEND…”

[code]Zapping is an action applying to one visible thing. Understand “zap [something]” as zapping.

A thing can be zappable.

Check zapping (this is the can’t zap without a blaster rule):
if the player does not carry the blaster:
say “You make menacing finger-pistols at [the noun] and mutter pew-pew.” instead.

Check zapping (this is the can’t zap something unzappable rule):
if the noun is not zappable:
say “You fire a stormtrooper volley of shots at [the noun]. Every single one misses.” instead.

Carry out zapping (this is the phasers to stun rule):
if the blaster is set to stun:
now the noun is asleep.

Carry out zapping (this is the phasers to kill rule):
if the blaster is set to kill:
now the noun is dead.

Report zapping:
if the blaster is set to stun:
say “Bzzt! You unleash a stunning volley against [the noun]!”

Report zapping:
if the blaster is set to kill:
say “Bzzt! You unleash a killing volley against [the noun]!”[/code]

some people should be killable. bad guys that i will give the “Badguy McVillain is Evil.” or “now thugface o’steal-a-lot is evil.” if it’s a reveal. can’t shoot a guy before you have ascertained he’s a criminal. then you can shoot him. innocent until proven guilty.


Hero starts the story with the blaster and is locked from removing it. can’t drop it, can’t give it, can’t put it, can’t nothing. so that’s not gonna be a problem.


So i just add Instead of zapping girlfriend: say "Fuck you, [player's forename in title case]!" and it’ll be all good?

… do i need the [code]A person can be asleep.
A person can be awake.
A person is usually awake.

A person can be dead.
A person can be alive.
A person is usually alive.[/code] stuff?

I have no idea how to do it, but what I’m going for is the game saying “He/She’s dead, Jim!” (because I’m an equal opportunity murderer) and afterwards listing anything they have on them that the player can then take.

Same for when they’re stunned/asleep.

Wake should be easy then, I guess?

[code]Carry out waking:
now the noun is awake.

Report waking:
say “[the noun] wakes up, dizzy but otherwise okay.”[/code]

Granted I’m a bit rusty still (been away for a while), but I don’t think this will do what you want – I think it will allow people to be simultaneously asleep and awake, or dead and alive.

Try rewriting it like this:

A person can be asleep or awake.
A person is usually awake.

A person can be dead or alive.
A person is usually alive.

I think technically you can omit the second line of each if you list the adjectives in the correct order in the first line, but it’s generally safer to be explicit about it. (If you do omit the second line, you can see which one ended up being the default in the Index.)

I saw this when I came up to ask for help because it wasn’t showing up when he was asleep in my description and it did it like this and it fixed it so have a double cookie ^^

Note that it’s still possible given the above for a person to be simultaneously asleep and dead, or awake and dead. You can be a bit more explicit about things if you want to make them mutually exclusive states, although it’s a bit more wordy:

Wakefulness is a kind of value.  Awake, asleep, and dead are wakefulnesses.
A person has a wakefulness called state.

...
   now the state of Bob is asleep.
   now the state of Jessie is dead.
   if the state of Rebecca is asleep, say "Oh my."

Sadly you can’t say “if X is dead” any more with this method – at least not without going to even more convoluted shenanigans.

A bit simpler method:

A person can be awake, asleep or dead.
Definition: a person is alive if he is not dead.

Yes, that’s much simpler. :slight_smile:

That, sadly, ruins the working stuff I had. :frowning: