Amulets & Armor  v1.02
Open Source Game
 All Data Structures Files Functions Variables Typedefs Enumerations Enumerator Macros Groups
Functions
EFFECT

Item and Spell Effects. More...

Functions

E_Boolean Effect (E_effectType effecttype, E_effectTriggerType triggertype, T_word16 data1, T_word16 data2, T_word16 data3, T_void *p_owner)
 
T_void EffectDrawEffectIcons (T_word16 left, T_word16 right, T_word16 top, T_word16 bottom)
 
T_void EffectFinish (T_void)
 
T_word16 EffectGetPlayerEffectPower (E_playerEffectType type)
 
T_void EffectInit (T_void)
 
E_Boolean EffectPlayerEffectIsActive (E_playerEffectType type)
 
T_void EffectRemoveAllPlayerEffects (T_void)
 
T_void EffectRemoveRandomPlayerEffect (T_void)
 
E_Boolean EffectSoundIsOn (T_void)
 
T_void EffectSoundOff (T_void)
 
T_void EffectSoundOn (T_void)
 
T_void EffectUpdateAllPlayerEffects (T_void)
 

Detailed Description

Item and Spell Effects.

The effect subsystem is where all the items get their properties and affect the player and world around the player. Effects have a type of action, a trigger for that action, and up to 3 values to customize the action.

See Also
http://www.amuletsandarmor.com/AALicense.txt

Function Documentation

E_Boolean Effect ( E_effectType  effecttype,
E_effectTriggerType  triggertype,
T_word16  data1,
T_word16  data2,
T_word16  data3,
T_void p_owner 
)

Creates a specified effect

T_void EffectDrawEffectIcons ( T_word16  left,
T_word16  right,
T_word16  top,
T_word16  bottom 
)
T_void EffectFinish ( T_void  )

Cleans out the global double link list for player effects

T_word16 EffectGetPlayerEffectPower ( E_playerEffectType  type)

Returns a T_word16 'power level' for an effect in progress. Returns > 0 if effect is active (retvalue= combined power levels) Returns 0 if effect not found

T_void EffectInit ( T_void  )

Initializes variables for player effects

E_Boolean EffectPlayerEffectIsActive ( E_playerEffectType  type)

Returns true if the player effect specified is currently on

T_void EffectRemoveAllPlayerEffects ( T_void  )

Removes ALL player effects in progress. Note that you will need to restart equipment effects if you continue to play after a call to this function.

T_void EffectRemoveRandomPlayerEffect ( T_void  )
E_Boolean EffectSoundIsOn ( T_void  )
T_void EffectSoundOff ( T_void  )
T_void EffectSoundOn ( T_void  )
T_void EffectUpdateAllPlayerEffects ( T_void  )

this routine will search through the current linked list of player effects and update the duration. Also will call EffectRemovePlayerEffect if the current duration falls below zero.