In the spell there is what could be a dummy. "Caster" it is a peasant. Do you mean change the code so its created for the controling player? That woould be very hard for me because I don't know JASS. Here is some of the code...
function TrapDeformStart takes nothing returns nothing
local location casting_loc = InstanceGetMemberLocation(GetThis(), "CastingLoc")
call TerrainDeformCrater(GetLocationX(casting_loc), GetLocationY(casting_loc), 300, 300, 100, true)
set casting_loc = null
endfunction
function TrapDeformEnd takes nothing returns nothing
local location casting_loc = InstanceGetMemberLocation(GetThis(), "CastingLoc")
call TerrainDeformCrater(GetLocationX(casting_loc), GetLocationY(casting_loc), 300, -300, 2000, true)
set casting_loc = null
endfunction
function PBStart takes nothing returns nothing
local string this = GetThis()
local location target_loc = InstanceGetMemberLocation(this, "TargetLoc")
call InstanceSetMemberDestructable(this, "blocker", CreateDestructable('YTpb', GetLocationX(target_loc), GetLocationY(target_loc), 0, 1, 0))
set target_loc = null
endfunction
function PBEnd takes nothing returns nothing
call RemoveDestructable(InstanceGetMemberDestructable(GetThis(), "blocker"))
endfunction
function TrapGroupEffect takes nothing returns nothing
local string this = GetThis()
local location cl = InstanceGetMemberLocation(this, "CastingLoc")
local group g = InstanceGetMemberGroup(this, "TargetGroup")
local unit u = null
call RemoveUnit(InstanceGetMemberUnit(this, "CasterUnit"))
loop
set u = FirstOfGroup(g)
exitwhen u == null
call SetUnitPositionLoc(u, cl)
call GroupRemoveUnit(g, u)
endloop
set g = null
set cl = null
endfunction
function Trig_Trap_Ward_Actions takes nothing returns nothing
local string trap_spell = "S" + I2S('A002') // replace 'A006'with the 4-letter-code of the trap spell in another map
local string fork_sub_spell1 = "S" + I2S('ST04')
local string fork_sub_spell2 = "S" + I2S('ST05')
local string td_sub_spell = "S" + I2S('ST06')
local string pb_all_sub_spell = "S" + I2S('ST07')
local string pb_sub_spell = "S" + I2S('ST08')
local string group_sub_spell = "S" + I2S('ST09')
local string stun_sub_spell = "S" + I2S('ST10')
call CreateClass(trap_spell, "SpellFork")
call ClassSetClassVarInteger(trap_spell, "SpellOne1", 'ST04')
call ClassSetClassVarInteger(trap_spell, "SpellTwo1", 'ST05')
call CreateClass(fork_sub_spell1, "SpellFork")
call ClassSetClassVarInteger(fork_sub_spell1, "SpellOne1", 'ST09')
call ClassSetClassVarInteger(fork_sub_spell1, "SpellTwo1", 'ST06')
call CreateClass(fork_sub_spell2, "SpellFork")
call ClassSetClassVarInteger(fork_sub_spell2, "SpellOne1", 'ST07')
call ClassSetClassVarInteger(fork_sub_spell2, "SpellTwo1", 'ST10')
call CreateClass(td_sub_spell, "DurationSpell")
call ClassSetClassVarReal(td_sub_spell, "Duration1", 20)
call ClassSetClassVarReal(td_sub_spell, "EffectTime1", 22)
call ClassAddFunction(td_sub_spell, "SpellStart", "TrapDeformStart")
call ClassAddFunction(td_sub_spell, "SpellEnd", "TrapDeformEnd")
call CreateClass(pb_all_sub_spell, "AOEPointSpellCircleCast")
call ClassSetClassVarInteger(pb_all_sub_spell, "PointNum1", 22)
call ClassSetClassVarReal(pb_all_sub_spell, "PointDelay1", 0)
call ClassSetClassVarReal(pb_all_sub_spell, "AOERadius1", 280)
call ClassSetClassVarInteger(pb_all_sub_spell, "Spell1", 'ST08')
call ClassSetClassVarInteger(pb_all_sub_spell, "Order1", 0)
call ClassSetClassVarReal(pb_all_sub_spell, "CastDelay", 0.1)
call CreateClass(pb_sub_spell, "DurationSpell")
call ClassSetClassVarReal(pb_sub_spell, "Duration1", 20)
call ClassSetClassVarReal(pb_sub_spell, "EffectTime1", 22)
call ClassAddFunction(pb_sub_spell, "SpellStart", "PBStart")
call ClassAddFunction(pb_sub_spell, "SpellEnd", "PBEnd")
call ClassAddMember(pb_sub_spell, "blocker", "destructable")
call CreateClass(group_sub_spell, "AOEGroupSpellCircle")
call ClassSetClassVarReal(group_sub_spell, "AOERadius1", 300)
call ClassAddFunction(group_sub_spell, "SpellEffect", "TrapGroupEffect")
call CreateClass(stun_sub_spell, "SimpleSpellCast")
call ClassSetClassVarInteger(stun_sub_spell, "Spell1", 'A003') // replace 'A008'with the 4-letter-code of the stomp stun effect in another map
call ClassSetClassVarInteger(stun_sub_spell, "Order1", OrderId("stomp"))
call ClassSetClassVarBoolean(stun_sub_spell, "ImmediateSpell", true)
call ClassSetClassVarReal(stun_sub_spell, "CastDelay", 0.1)
endfunction
//===========================================================================
function InitTrig_Trap_Ward takes nothing returns nothing
set gg_trg_Trap_Ward = CreateTrigger( )
call TriggerAddAction( gg_trg_Trap_Ward, function Trig_Trap_Ward_Actions )
endfunction