charges

Returns the amount of spell charges left for a given spell.

charges([spellID]) : int

Example

if charges(InfernalStrike) == 2 then
return cast(InfernalStrike, 'player)
end