scoreboard players set @e[name=Mordum,score_SPC_Wait=0] SPC_Wait 1
scoreboard players add @e[name=Mordum,score_SPC_Time=200] SPC_Time 1

execute @a[tag=!SpellCastTriggerSummoned] ~ ~ ~ /summon armor_stand ~ ~ ~ {CustomName:SpellCastTriggerFel,CustomNameVisible:0,Invisible:1,Invulnerable:1,Attributes:[{Name:generic.knockbackResistance,Base:10}]}
execute @e[name=SpellCastTriggerFel] ~ ~ ~ /scoreboard players tag @a[tag=!SpellCastTriggerSummoned] add SpellCastTriggerSummoned
execute @e[name=Mordum,score_SPC_Time_min=200] ~ ~ ~ /scoreboard players set @e[name=SpellCastTriggerFel,tag=!Update] SPC_Time 0
execute @e[name=Mordum,score_SPC_Time_min=200] ~ ~ ~ /scoreboard players tag @e[name=SpellCastTriggerFel,tag=!Update] add Update

execute @e[name=Mordum,score_SPC_Time_min=1,score_SPC_Time=1] ~ ~ ~ /playsound b_unknown_say_precast_fel voice @a[tag=TutorialEncounter] ~ ~ ~ 1.2 1 0.5

function spire_of_souls:source/creature/tutorial/spellcast_sound/playsound_fel if @e[name=Mordum,score_SPC_Time_min=1]
execute @e[name=Mordum,score_SPC_Time=160] ~ ~ ~ /execute @e[name=SpellCastTriggerFel,tag=!Update] ~ ~ ~ /particle fallingdust ~ ~ ~ 0.3 0.2 0.3 0.1 2 showPartial @a[tag=TutorialEncounter] 51

scoreboard players set @e[name=Mordum,score_SPC_Time_min=200] SPC_Fel 0
scoreboard players set @e[name=Mordum,score_SPC_Time_min=200] SPC_Time 0
execute @e[name=Mordum,score_SPC_Time=0,score_SPC_Fel=0] ~ ~ ~ /scoreboard players tag @a[tag=SpellCastTriggerSummoned] remove SpellCastTriggerSummoned
scoreboard players set @e[name=Mordum,score_SPC_Time=0,score_SPC_Fel=0] SPC_Wait 0