Man modifier group

From LSWiki

(Difference between revisions)
Jump to: navigation, search

Current revision

Contents

Files

/def/descriptor/modifier_group.c
/lib/descriptors/modifier_gropu.h
/mod/character/body.c
/mod/character/skills.c
/obj/extensions/weapon.c
/std/room.c 

Description

Modifier group descriptors are used to store and work with modifier descriptors. They are intended only for use by the core system; user code should never have to worry about them.

Public Fields

Modifier_Group_Static: Static modifiers.

Modifier_Group_Orthogonal: Modifiers whose Modifier_Amount has the same sign as their Modifier_Bound.

Modifier_Group_Inverse: Modifiers whose Modifier_Amount and Modifier_Bound have opposite sign.

Support Functions

status Modifier_Group_Empty(descriptor dxr)

Returns True if the modifier group contains no modifiers.

descriptor array Modifier_Group_All(descriptor dxr)

Returns an array of all the modifiers contained in the modifier group.

status Modifier_Group_Register(descriptor grp, descriptor mod)

Places the specified modifier in the specified modifier group, returning True for success (currently there are no conditions which would cause failure). Descriptors are merged if appropriate.

status Modifier_Group_Present(descriptor grp, descriptor mod)

Returns true if the specified modifier is present in the specified modifier group.

status Modifier_Group_Unregister(descriptor grp, descriptor mod) Removes the specified modifier from the specified modifier group, returning True if the operation is successful.

varargs mixed Modifier_Group_Apply(descriptor dxr, mixed index, mixed start, mixed stat)

Calculates the total modifier values that apply to the index given from the modifiers in the specified modifier group. The third and fourth arguments are optional and are used to specify starting accumulative and static modifier values, respectively.

See Also

descriptors(mechanisms), modifier(descriptors)

Personal tools