Summoning spell help
I was wondering if I am on the right track here with my spell, my ideal will be to tie this to Ceresa but I want to know if the basic code is sound. Basically Im trying to get it so Ceresa can summon a death demon when she reaches level 12. I may want to tie in research prereqs later but for now I want to get it working first.(This will not be a tactical spell) I used the summon shadow warg spell as the template and then snips bits and pieces to hopefully tweak it in the right direction.
<SpellDef InternalName="Summondeathdemon">
<DisplayName>Demonic Binding</DisplayName>
<Description>Summons a level 9 Death Demon.</Description>
<Image>T_DemonicAlly_Painting.png</Image>
<IconFG>T_DemonicAlly_Icon.png</IconFG>
<IconColor>167,249,131</IconColor>
<AutoUnlock>1</AutoUnlock>
<CanStack>0</CanStack>
<SpellBookSortCategory>Summon</SpellBookSortCategory>
<SpellBookSortSubCategory>Summon</SpellBookSortSubCategory>
<SpellType>Strategic</SpellType>
<SpellClass>Defensive</SpellClass>
<SpellSubClass>Summon</SpellSubClass>
<SpellTargetType>Self</SpellTargetType>
<Range>0</Range>
<Prereq>
<Type>AbilityBonusOption</Type>
<Attribute>Summoner</Attribute>
<Type>UnitStat_Level</Type>
<Attribute>12</Attribute>
</Prereq>
<SpellResourceCost>
<Resource>Mana</Resource>
<Amount>400</Amount>
</SpellResourceCost>
<SpellResourceCost>
<Resource>Mana</Resource>
<PerTurn>40</PerTurn>
<Amount>1</Amount>
</SpellResourceCost>
<GameModifier>
<ModType>Unit</ModType>
<Attribute>SummonUnit</Attribute>
<StrVal>Death Demon</StrVal>
<UnitClass>deathdemon</UnitClass>
<Duration>-1</Duration>
<Value>1</Value>
</GameModifier>
<AIData AIPersonality="AI_General">
<AIPriority>10</AIPriority>
</AIData>
<HitSoundFX>Spell_SummonDemonicAlly_01</HitSoundFX>
<SpellDefEffect>
<EffectName>Y_SummonDeathDemon_Particle</EffectName>
<LocalPosition>0,20,0</LocalPosition>
<EffectScale>1</EffectScale>
<EffectDelay>0</EffectDelay>
<SnapToTerrain>1</SnapToTerrain>
</SpellDefEffect>
</SpellDef>