Difference between revisions of "LUA:AddWard"

Line 3: Line 3:
  
 
==== Syntax ====
 
==== Syntax ====
AddWard(param1, [param2], [param3])
+
AddWard(param1, [param2], [param3], [param4])
  
  
Line 9: Line 9:
 
; Required - ''param1'' (int32)
 
; Required - ''param1'' (int32)
 
: ''param1'' is the amount of the ward
 
: ''param1'' is the amount of the ward
; Optional - ''param2'' (int8), ''param3'' (int8)
+
; Optional - ''param2'' (bool), ''param3'' (int8), ''param4'' (int8)
: ''param2'' is the type of ward
+
: ''param2'' - is if we want to keep the spell active or remove it when the ward is depleted
: ''param3'' is the damage type to absorb if ward type is magical
+
: ''param3'' is the type of ward
 +
: ''param4'' is the damage type to absorb if ward type is magical
  
 
==== Usage ====
 
==== Usage ====

Revision as of 17:28, 14 December 2013

LUA Functions: AddWard()

Adds a ward with the given amount

Syntax

AddWard(param1, [param2], [param3], [param4])


Parameters

Required - param1 (int32)
param1 is the amount of the ward
Optional - param2 (bool), param3 (int8), param4 (int8)
param2 - is if we want to keep the spell active or remove it when the ward is depleted
param3 is the type of ward
param4 is the damage type to absorb if ward type is magical

Usage

function cast(Caster, Target)
    AddWard(25)
end

Adds a ward that will absorb 25 damage

Notes

Can only be used in a spell script

The ward will be applied to the targets of the spell that uses this spell script

ward type is 0 - all, 1 - physical, 2 - magical

damage type is the magical damage to absorb