[I7 extension] Inform ATTACK

I am happy to announce Version 3 of Inform ATTACK. As always, the latest version can be found here; if you specifically want version 3, click here.

Code written for version 2 will generally be compatible with version 3, though you should check out the changelog below to see if any of the changes might interfere with your existing code. Updating to version 3 is recommended because it brings a more robust handling of readying and natural weapons. Version 3 also adds the “weapon damage bonus” property, which can be used to increase or decrease the damage dealt by weapons in a more flexible way than was previously possible with only the “damage die” property. (The base damage dealt by a weapon is now a random number between 1 and damage die, plus the weapon damage bonus.)

Full changelog:

  • Added “wield [weapon]” and “use [weapon]”’ as synonyms for readying.
  • Readying now applies to a visible rather than a touchable thing.
  • A new check readying rule, the cannot ready what is already readied rule, rejects the readying action when applied to a readied weapon. This failed action takes no time.
  • The standard report readying rule now handles second person singular and any person plural correctly, and has a slightly improved message.
  • The parser now considers it unlikely that the player wants to ready a natural weapon.
  • The ready natural weapons if no other weapon readied rule has been removed in favour of a more robust system of readying natural weapons.
  • There is a new phrase “ready natural weapons”, which readies the natural weapons of any alive person in the location who has no other readied weapon. This is run every combat round (by the govern combat first part rule).
  • When play begins, the ready weapons for everyone rule is run, readying a weapon for every person in the game – carried non-natural weapons if possible, otherwise natural weapons.
  • The standard AI will no longer sometimes choose to ready an already readied weapon. (The weight entry has been decreased from -100 to -1000.)
  • When striking a blow, the game now abides by (rather than considering) the immediate results of hitting rules. This gives the author more control – for instance, the author can now stop the blow if the immediate result of hitting someone is death.
  • The phrase “You were killed by X.” will no longer be printed as (for example) “You were killed by the dead troll.” if the troll also died during the attack. ATTACK will now always print “You were killed by the troll.”.
  • If the damage die of a weapon is less than 1, it will no longer be rolled by the standard damage roll rule; its result will be considered 0. (Negative dice make little sense.)
  • All weapons now have a number that varies called the “weapon damage bonus”, which is usually 0, but can be both positive and negative. The standard damage roll rule adds this number to the damage roll. The damage dealt by a weapon before modifiers is therefore 1d(damage die) + (weapon damage bonus).

I’ve never written a game that uses this type of system. I’m sure it’s very cool. I would suggest, however, that if the player has picked up a sword that, unbeknownst to her, has been enchanted by the evil sorcerer, the sword might have an effect opposite to that which is intended – namely, attacking your enemy with it might actually make the enemy stronger and healthier with every blow. If I understand the intent of die-rolling correctly, in that scenario negative dice would make very good sense.

It would be easy to make such a sword in ATTACK, but you wouldn’t want to use negative damage to do so. In fact, ATTACK ignores negative damage altogether: if I deal 1 damage to you, but your armour decreases the damage dealt by 2, you should not get -1 damage (i.e., 1 health). A total damage of -1 should just be treated as a total damage of 0. (And indeed, this cursed sword should be hampered, not helped, by armour worn by the enemy, right? If the enemy wears armour, he gets less health from my attack. Implementing the sword as an object which deals negative damage would have the exact opposite consequence.)

[size=85]In case anyone using ATTACK is wondering: to make such a cursed sword, I would use a “last calculate the damage rule” to save the total damage in some global variable and then reduce the damage done to 0; and then use an “aftereffects rule” to grant the saved total damage as health to the defender. This is assuming you want all normal damage modifiers to apply. I you do not, use an “immediate results of hitting rule” instead.[/size]