You are viewing an old version of this page. Return to the latest version.
Difference between revisions of "LUA:AddWard"
| Line 3: | Line 3: | ||
==== Syntax ==== | ==== Syntax ==== | ||
| − | AddWard(param1) | + | AddWard(param1, [param2], [param3]) |
| 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) | ||
| + | : ''param2'' is the type of ward | ||
| + | : ''param3'' is the damage type to absorb if ward type is magical | ||
==== Usage ==== | ==== Usage ==== | ||
| Line 23: | Line 26: | ||
The ward will be applied to the targets of the spell that uses this 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 | ||
Revision as of 23:11, 13 December 2013
LUA Functions: AddWard()
Adds a ward with the given amount
Syntax
AddWard(param1, [param2], [param3])
Parameters
- Required - param1 (int32)
- param1 is the amount of the ward
- Optional - param2 (int8), param3 (int8)
- param2 is the type of ward
- param3 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