ARMED extension I7

Hi,

does anybody know if the ARMED extension by David Ratliff is compatible with the most recent I7 version, or, if not, if there’s something similiar?

I just need a simple, HP-based combat system for a game.

ARMED isn’t compatible, no. I glanced at the code. It seemed better to do a full rewrite, so I did.

If there’s interest, let me know.

Well, I would just need it for one small game.

Okay then. Here’s the prototype. There are no examples so far, no unarmed combat, and no provision for enemies that actively fight back. Otherwise you have full functionality.

I’d appreciate any feedback, that’ll let me improve it for the next version.
Basic Combat.i7x (13.8 KB)

Typical use case:

[code]Include Basic Combat by B David Paulsen.

There is a room. The player holds a sharp weapon called a bastard sword.
A throwing star is a throwable weapon. The player holds the throwing star.

The atomic blaster is a ranged weapon. It is here. The damage potential of the atomic blaster is 10d6.
Tony is a man. Tony is here. A persuasion rule: persuasion succeeds.

Test me with “attack tony/cut tony/throw star at tony/get blaster/shoot tony/g/g/look”.[/code]

Well, this is frustrating.

The block throwing at rule does nothing.
The throwing at action has a number called the damage dealt.

Setting action variables for throwing at: now the damage dealt is 2.

There is a room. A stone is here.

Test me with "throw stone at me".

This gives us a run-time error. I’ve already reported it as a bug, but still, it does mean there will be a marked lack of ninja stars and javelins in the next version.

Your code had the damage dealt variable set to an action instead of a thing.

[code]“Stone’s Throw”

The block throwing at rule does nothing.

A projectile is a kind of thing. A projectile has a number called damage dealt.

Setting action variables for throwing at:
if the noun is not a projectile:
do nothing;
otherwise:
now the damage dealt is 2;
if the player carries the feather:
now damage dealt is (damage dealt + 1).

Rock Room is a room. A stone is a projectile in rock room.

A magic feather is in rock room.

Check throwing at:
if the noun is not a projectile:
say “That’s not easy to throw.” instead.

Carry out throwing at:
now the noun is in the location.

Report throwing at:
say “You hit [the second noun], doing [damage dealt of the noun] points of damage.”

Test me with “throw stone at me/throw feather at me/throw stone at me”.[/code]

And yeah…projectiles. :unamused:

The throwing at action has a number called the damage dealt.

This line is wrong. The name of the action is “the throwing it action”. Without the “it”, you wind up creating a spurious off-stage object called “throwing action”.

…I’m an idiot. :blush:

Thanks, zarf. Although it’s strange that the error message would deliberately point me to the “throwing star” object being the culprit.

That’s what sidetracked me (and yeah, this error is from my extension, so it’s not 1-on-1 equivalent to my bug example. Still, it’s a weird suggestion by I7, and I’ll work on whittling it down to a reproducible error.

HanonO: That’s not quite what I’m after: I already have a damage rolling mechanism. What I needed was to make a roll, then store that roll for the duration of the action so that it could be printed during the report phase. I omitted the flourishes to make a tidier example for the (as zarf demonstrated, nonexistent) bug.

There we go. This causes a run time error attributed to the “ninja star” thing, which seems a bug or at least misleading to me if, as zarf indicated, it really refers to a newly created thing called the “throwing at action”.

Hit points is a kind of value. 99 HP specifies hit points. 

The throwing at action has a hit points called the projectile damage dealt.
The block throwing at rule does nothing.

Setting action variables for throwing at:
	now the projectile damage dealt is 12 HP.

There is a room. John is a man. John is here. The ninja star is a thing. It is here.

Test me with "throw star at john".

This is a really modest issue, though. Would it really be appropriate to report this as a bug? I worry about crying wolf.