#################################################################
#   )      (\_     # WOLFPACK 13.0.0 Scripts                    #
#  ((    _/{  "-;  # Created by: khpae                          #
#   )).-" {{ ;"`   # Revised by:                                #
#  ( (  ;._ \\ ctr # Last Modification: Created                 #
#################################################################

import wolfpack
from wolfpack.consts import *

def onSpellSuccess( char, spell, type, target ):
	# target check is done at c++ code
	defender = target.char
	if not defender:
		return
	# effects
	defender.soundeffect( 0x1e4 )
	defender.effect( 0x373a )
	# disturb medi
	defender.disturb()
	# unfreeze - needed to be implemented
	# set light level / restore - need to be implemented
	# FIXME : night sight duration
	duration = 60000 + char.skill[ MAGERY ]
	lightlevel = 0
	return 1

