The Four-Eyed Guide to TADS 3 by David Welbourn index


ATTACK singleDobj (WITH singleIobj)

Syntax

Related actions: BREAK dobjList; STRIKE dobjList.

Default minimal behavior

>attack
What do you want to attack?

>attack floor
You cannot attack that.

>attack floor with book
You can't attack anything with the book.

attack matches VerbRule(Attack) which invokes AttackAction. [TODO]

Summary of library references to attacking

actions.t

Short description

DefineTAction(Attack)

Defines class AttackAction: TAction

DefineTIAction(AttackWith)

Defines class AttackWithAction: TIAction
When "ALL" is used as the indirect object, it is limited to what is in the actor's inventory.

Note: DefineTAction(name) and DefineTIAction(name) are macros defined in adv3.h.

Note: TAction and TIAction are classes defined in action.t.

precond.t

Short description

objHeld: PreCondition The object must be held. A recursive TAKE command is implied.
touchObj: TouchObjCondition Pre-condition: actor must be able to touch the object.

thing.t

Short description

Thing.dobjFor(Attack) By default, one can only attack things that one can touch. Also, it makes as much sense to attack an object as any other. Furthermore, most attacks are considered to be pointless or useless, e.g.: 'You cannot attack that.'
Thing.dobjFor(AttackWith) Defined the same as Thing.dobjFor(Attack)
Thing.iobjFor(AttackWith) When attacking with something, it must be held by the actor. Further, it is illogical to attack with most things since they aren't weapons, e.g.: 'You can't attack anything with the book.'

en_us\en_us.t

Short description

Thing.dobjFor(Strike)

Does the same as Thing.dobjFor(Attack).

VerbRule(Attack)

Associates the grammars "attack singleDobj", "kill singleDobj", etc. with AttackAction.

VerbRule(AttackWith)

Associates the grammars "attack singleDobj with singleIobj", "kill singleDobj with singleIobj", etc. with AttackWithAction.

Note: VerbRule(tag) is a macro defined in en_us.h.

Note: AttackAction and AttackWithAction are defined in actions.t (see above).

en_us\msg_neu.t

Short description

playerActionMessages.notAWeapon '{You/he} can\'t attack anything with {the iobj/him}. '
playerActionMessages.uselessToAttack '{You/he} cannot attack {that dobj/him}. '