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

import wolfpack
from wolfpack.consts import *
from wolfpack.utilities 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

	# check criminal : noto - party, guild, faction systems are affected
	agression( char, defender, spell )

	# effects
	defender.soundeffect( 0x1ec )
	defender.effect( 0x373a )

	# not a resistable spell : just check the damage : 1 ~ 11
	# skill 1.0 = 10 point
	damage = floor( 1 + attacker.skill[ MAGERY ] / 100 ) # One Bonus point per 10.0 Skill

	# Will be mor or less put into defender.disturb() + defender.unfreeze() 
	# Stand by!
	# disturb medi
	defender.disturb()
	# unfreeze - needed to be implemented

	# FIXME: Duration is more or less unknown for this spell
	statmodifier( defender, 60000, 0, 0, damage )
	return 1
