ScriptName aaaKimachuuCrisisOfLifeDebug Extends ActiveMagicEffect

Message Property aaaKimachuuCOLDebugMes Auto
Quest Property aaaKimachuuCOLQuest Auto
Spell Property aaaKimachuuCOLDisease01 Auto ;重症
Spell Property aaaKimachuuCOLDisease02 Auto ;中症
Spell Property aaaKimachuuCOLDisease03 Auto ;軽症
Spell Property aaaKimachuuCOLBuffs Auto ;完治バフ

Event OnEffectStart(Actor akTarget, Actor akCaster)
	Int iIndex = aaaKimachuuCOLDebugMes.Show()
	If iIndex <= 1 ;2でキャンセル
		stopFunction(akTarget, iIndex)
	EndIf
EndEvent

Function stopFunction(Actor act01, Int i01)
	aaaKimachuuCOLQuest.Stop()
	act01.RemoveSpell(aaaKimachuuCOLDisease01)
	act01.RemoveSpell(aaaKimachuuCOLDisease02)
	act01.RemoveSpell(aaaKimachuuCOLDisease03)
	act01.DispelSpell(aaaKimachuuCOLBuffs)
	If i01 == 1
		Debug.MessageBox("Kimachuu Crisis Of Life. All functions have stopped.")
	Else
		Debug.MessageBox("Removed diseases and buffs.")
		aaaKimachuuCOLQuest.Start()
	EndIf
EndFunction