Hi, I'm trying to setup a planet ability that, in the end, I hope will allow me to trigger ondeath buffs when ships in the gravwell explode. I've been working on this ability chain for three days and all I've gotten is crashes so far

. I'm hoping some of the
good modders can point out the flaws(praying its not just a typo).
Any tips or help would be appreciated.
Anywho here's the code:
AbilityPlanetBodies(Applies the BuffB to ships in gravwell):
TXT
entityType "Ability"
buffInstantActionType "ApplyBuffToTargetsInRadius"
instantActionTriggerType "AlwaysPerform"
buffType "BuffPlanetBodiesB"
targetFilter
numOwnerships 0
numObjects 3
object "CapitalShip"
object "Frigate"
object "PlanetModule"
numConstraints 0
range
Level:0 50000.000000
Level:1 50000.000000
Level:2 50000.000000
maxTargetCount
Level:0 -1.000000
Level:1 -1.000000
Level:2 -1.000000
effectInfo
effectAttachInfo
attachType "Center"
smallEffectName ""
largeEffectName ""
soundID ""
needsToFaceTarget FALSE
canCollideWithTarget TRUE
moveThruTarget FALSE
isUltimateAbility FALSE
maxNumLevels 1
levelSourceType "FixedLevel0"
aiUseTime "Invalid"
aiUseTargetCondition "Invalid"
isAutoCastAvailable FALSE
isAutoCastOnByDefault FALSE
pickRandomPlanetToExploreForAutoCastTarget FALSE
ignoreNonCombatShipsForAutoCastTarget FALSE
onlyAutoCastWhenDamageTakenExceedsPerc 0.000000
isPassive TRUE
researchPrerequisites
NumResearchPrerequisites 0
nameStringID "IDS_ABILITY_ENERGYWEAPONBOOST_NAME"
descStringID "IDS_ABILITY_ENERGYWEAPONBOOST_DESCRIPTION"
hudIcon "HUDICON_ABILITY_ENERGYWEAPONBOOST"
smallHudIcon "HUDICON_ABILITY_ENERGYWEAPONBOOST"
infoCardIcon ""
-----------------------------------------------------------------------------------------------------------------------------------------
PlanetBodiesBuffB(Should apply BuffC to ships on death):
TXT
entityType "Buff"
onReapplyDuplicateType "KeepOldBuff"
buffExclusivityForAIType "ExclusiveForAllPlayers"
isInterruptable FALSE
isChannelling FALSE
numInstantActions 1
instantAction
buffInstantActionType "ApplyBuffToTargetsInRadius"
instantActionTriggerType "OnOwnerDeath"
buffType "BuffPlanetBodiesC"
targetFilter
numOwnerships 0
numObjects 3
object "CapitalShip"
object "Frigate"
object "PlanetModule"
numConstraints 0
range
Level:0 3500.000000
Level:1 3500.000000
Level:2 3500.000000
maxTargetCount
Level:0 -1.000000
Level:1 -1.000000
Level:2 -1.000000
effectInfo
effectAttachInfo
attachType "Invalid"
smallEffectName ""
largeEffectName ""
soundID ""
numPeriodicActions 0
numOverTimeActions 0
numEntityModifiers 0
numEntityBoolModifiers 0
numFinishConditions 0
-----------------------------------------------------------------------------------------------------------------------------------------
PlanetBodiesBuffC(Should apply radius of effect damage on ship death)
TXT
entityType "Buff"
onReapplyDuplicateType "StackNewBuff"
buffExclusivityForAIType "NotExclusive"
isInterruptable FALSE
isChannelling FALSE
numInstantActions 1
instantAction
buffInstantActionType "DoDamage"
instantActionTriggerType "OnDelay"
delayTime 0.000000
damage
Level:0 300
Level:1 300
Level:2 300
damageAffectType "AFFECTS_SHIELDS_AND_HULL"
damageType "PHYSICAL"
isDamageShared TRUE
numPeriodicActions 0
numOverTimeActions 0
numEntityModifiers 0
numEntityBoolModifiers 0
numFinishConditions 1
finishCondition
finishConditionType "AllOnDelayInstantActionsDone"