Armed

version 3 by David Ratliff

  • Home page
  • Beginning
  • Previous
  • Next



  • Section 3 - Shooting

    Shooting it with is an action applying to two visible things. Understand "shoot [something] with [something]" as shooting it with. The shooting it with action has a number called the damage taken.

    Setting action variables for an actor shooting something (called target) with something (called the boomstick):
        if the target is a person begin;
            if the boomstick is a projectile begin;
                change the damage taken to a random number between 20 and the maximum damage of the second noun;
            end if;
        end if.

    Check shooting something (called the target) with something (called the boomstick) (this is the you must have a projectile to shoot rule):
        if the player does not carry a projectile begin;
            say "You need a projectile weapon to shoot anything.";
            stop the action;
        end if;

    Check shooting something (called the target) with something (called the boomstick) (this is the you can only shoot with a projectile rule): if the second noun is not a projectile begin;
            say "I don't think that will work. Perhaps you should try some kind of projectile weapon?";
            stop the action;
        end if.

    Check shooting something (called the target) with something (called the boomstick) (this is the you can't shoot something with itself rule):
        if the target is the boomstick begin;
            say "You try to riccochet the shot so that. . . Wait, you can't shoot [the boomstick] with itself!";
            stop the action;
        end if.

    Check shooting something (called the target) with something (called the boomstick) (this is the suicide rule):
        if the target is the player, end the game saying "You have commited suicide!".

    Carry out an actor shooting something (called the target) with something (this is the standard carry out shooting rule):
        if the target is a person begin;
            decrease the present health of the target by the damage taken;
            if the target is not the player begin;
                if the target is docile, change target to hostile;
            end if;
        end if.

    Report shooting something (called the target) with something(called the boomstick) (this is the report shooting people rule):
        if the target is a person begin;
            if the target is dead begin;
                say "With one final shot from your [boomstick], [the target] drops to the ground, dead." instead;
            end if;
        say "You shoot [the target] with your [boomstick]. [The target] jerks back from the impact. ([The target][apostrophe]s health: [present health of the target])[line break]";
        end if.

    Report shooting something (called the target) with something(called the boomstick) (this is the report shooting non-people rule):
        if the target is not a person, say "You shoot [the target] with your [boomstick]. Well, I hope that made you feel better. Hopefully shooting [the target] won[apostrophe]t attract any unwanted attention.".

    Check someone shooting something (called the target) with something (called the boomstick) (this is the others must have a projectile to shoot rule):
        if the person asked does not carry a projectile begin;
            say "[The person asked] says 'With what? I don't have a projectile weapon.'";
            stop the action;
        end if.

    Check someone shooting something (called the target) with something (called the boomstick) (this is the others can only shoot with a projectile rule):
        if the second noun is not a projectile begin;
            say "[The person asked] says '[The second noun] would need to be some kind of projectile weapon for that to work.'";
            stop the action;
        end if.

    Check someone shooting something (called the target) with something (called the boomstick) (this is the others can't shoot something with itself rule):
        if the target is the boomstick begin;
            say "[The person asked] says 'I can hardly shoot [the boomstick] with itself!'";
            stop the action;
        end if.

    Check someone shooting something (called the target) with something (called the boomstick) (this is the other people suicide rule):
        if the target is the person asked, say "[The person asked] says 'I refuse to commit suicide!'" instead.

    Report someone shooting something (called the target) with something(called the boomstick) (this is the report another shooting a person rule):
        if the target is a person begin;
            if the target is dead begin;
                say "[The person asked] shoots [the target], who drops to the ground, dead." instead;
            end if;
            if the target is not the player begin;
                say "[The person asked] shoots, and [the target] jerks back from the impact. ([The target][apostrophe]s health: [present health of the target])[line break]";
            end if;
            if the target is the player begin;
                say "[The person asked] shoots you! (Health: [present health of the player])[line break]";
            end if;
        end if.

    Report someone shooting something (called the target) with something(called the boomstick) (this is the report another shooting a non-person rule):
        if the target is not a person, say "In a seemingly random act of violence, [the person asked] shoots [the target].".

    After someone shooting something (called the target) with something (called the boomstick) (this is the shot to death rule):
        if the target is the player begin;
            if the player is dead begin;
                say "[The person asked] shoots you with [the boomstick], and you drop to the ground, dead.";
                end the game in death;
            end if;
        end if;
    continue the action.