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

import wolfpack
from spells.spellfunctions import *
from math import floor

def onSpellSuccess( char, spell, type, target ):
	# target check is done at c++ code
	defender = target.char
	if not defender:
		return
	# noto check
	agression( char, defender, spell )
	# effects
	defender.soundeffect( 0x1eb )
	defender.effect( 0x3733 )
	# disturb medi
	defender.disturb()
	# unfreeze - needed to be implemented
	modValue = floor( 1 + char.skill[ MAGERY ] / 100 )
	duration = floor( 24 + 1.2 * char.skill[ MAGERY ] / 10 )
	defender.statmodifier( defender, duration, modValue, modValue, modValue )
	return 1

