Scriptname swordMaginSwordBlastScript extends activemagiceffect

import Utility

ActorValue property HealthAV  Auto Const

Potion Property swordPotionCore Auto Const

GlobalVariable Property swordBlastDamageRate  Auto
;GlobalVariable Property SwordBlastCoreFB  Auto
;GlobalVariable Property SwordBlastCoreFBCount  Auto

Event OnEffectStart(Actor akTarget, Actor akCaster)

	float Damage

	Actor PlayerActor =  Game.GetPlayer()

;	float Core = SwordBlastCoreFB.getValue() as int

	Damage = 10 + PlayerActor.GetLevel()
	Damage *= swordBlastDamageRate.getValue() as float

	akTarget.DamageValue(HealthAV ,Damage)

	akTarget.StartCombat(akCaster)

;	Core += 1.0

;	if Core >= SwordBlastCoreFBCount.getValue() as int

;		SwordBlastCoreFB.setValue(0)
;		PlayerActor.AddItem(swordPotionCore, 1, true)
;	else
;		SwordBlastCoreFB.setValue(Core)
;	endif

EndEvent
