Pyrogasm
There are some who would use any excuse to ban me.
- Reaction score
- 134
This is a spell I originally made for emjlr3's 2nd spell contest, in which it won first place. It doesn't actually work the way I would like it to, but I think it functions sufficiently well.
The spell requires Vexorian's CSCache; the version I used was 12.9 because I can't use the newer versions that require vJASS (I'm on OS X). It should be compatable with other versions of CSCache/CasterSystem, but I haven't actually tested it.
Thanks to Vexorian for his spell idea, Darkwulfv for the terrain, and JetFangInferno for his neat models.
The following is a rather long, complicated, and overly-delved-into description/explaination of the spell:
Screenshot:
View attachment 8759
Full Temporal Fluxuation Code:
And the thing is, you can STILL cause a temporal paradox. If you (the caster, as the past self) die after you summon your future self, but before you flashback in time, something BAD should happen.
But, I'll just stick to string theory and say that your future self was actually from an alternate dimension and that his coming to this dimension caused a planar shift in which you (the past self) died.
Just in case nobody understands what the heck I'm talking about, here's the lowdown on the string-theory part of the spell:
Note: the caster will always be referred to as the "past self", and the summoned unit will always be referred to as the "future self".
The past self summons the future self to aid him in his plight; the future self is an exact copy of the current past self (excluding health/mana; including spells and items). While both are present, anything that happens to the past self (as this is WC3, this is limited to specific things not including changes in life/mana) will happen instantly to the future self, since it has then happened in the future self's past.
Eventually, the future self goes back to its respective time, and the past self prepares to return to the past in which he summoned his future self. While in the past, anything that happened to the future self when it was in the past, is now applied to the past self (barring WC3 limitiations, this time it affects life and mana). The journey to the past drained the future self of much of its magical essence (mana), and thus the past self loses some of its also.
If at any point the past self gains a level, learns a skill, or (in next version of spell) gains/loses an item, the same will (according to string theory) happen to the future self, since it has now happened in the future self's past.
Oh, and to anyone who attempts to open the map up and look at the spell that way, the formatting is going to be all fucked up because I wrote it on a Mac. Just refer to the attached text file as the actual code (which it is), or replace the existing code with the code in either the text file or in the above code box.
To fix the .txt file formatting, just c 'n p it all into another program that self-formats (AIM, etc.) and then paste that into another document and the formatting should be fixed.
Spell Download
The Code in a Text File
The spell requires Vexorian's CSCache; the version I used was 12.9 because I can't use the newer versions that require vJASS (I'm on OS X). It should be compatable with other versions of CSCache/CasterSystem, but I haven't actually tested it.
Thanks to Vexorian for his spell idea, Darkwulfv for the terrain, and JetFangInferno for his neat models.
The following is a rather long, complicated, and overly-delved-into description/explaination of the spell:
Temporal Fluxuation
Not just your average summon-yourself-from-the-future spell
- First, you summon yourself from the future
- All information about your surroundings when you summoned your future self is stored
- Your future self fights with/for you; it's not controllable, but its hero icon shows up, and it CAN be target of spells/abilities
- Anything that happens to you (leveling up, learning spells, etc) happens to your future self the instant you do it
- Your future self goes back to its respective time, and its current health/mana are stored
- At some arbitrary point in the future, you (now acting as the future self) have a flashback to the battle in which you originally summoned your future self; your life/mana are set to the values stored earlier
Screenshot:
View attachment 8759
Full Temporal Fluxuation Code:
JASS:
constant function TF_Ability_Id takes nothing returns integer
return 039;A000039;
endfunction
constant function TF_Chaos_Ability_Id takes nothing returns integer
return 039;S001039;
endfunction
constant function TF_Spawn_Offset takes nothing returns real
return 400.00
endfunction
constant function TF_Other_Player_Effect_Path takes nothing returns string
return "Timerift Missle.mdx"
endfunction
constant function TF_Other_Player_Effect_Attach takes nothing returns string
return "origin"
endfunction
constant function TF_Abyss_Dummy_Unit_Id takes nothing returns integer
return 039;h000039;
endfunction
constant function TF_Portal_Dummy_Unit_Id takes nothing returns integer
return 039;h001039;
endfunction
constant function TF_Auxiliary_Effect_Path takes nothing returns string
return "Metamorphosis.mdx"
endfunction
constant function TF_Auxiliary_Effect_Attach takes nothing returns string
return "origin"
endfunction
function TF_Cast_Conditions takes nothing returns boolean
return GetSpellAbilityId() == TF_Ability_Id()
endfunction
function TF_Group_Filter takes nothing returns boolean
local unit U = GetFilterUnit()
local boolean B1 = (U != bj_ghoul[60])
local boolean B2 = (GetAttachedUnit(U, "TF Past Self") == null)
local boolean B3 = (B1 and B2)
set U = null
return B3
endfunction
function TF_Countdown_Filter takes nothing returns boolean
return GetAttachedInt(GetFilterUnit(), "TF Flashback Countdown") > 0
endfunction
function TF_Futures_Filter takes nothing returns boolean
return GetAttachedBoolean(GetFilterUnit(), "Is A Future Self")
endfunction
function TF_Event_Filter takes nothing returns boolean
local unit U = GetTriggerUnit()
local unit U2 = GetAttachedUnit(U, "TF Future Self")
local unit U3 = GetAttachedUnit(U, "TF Past Self")
local boolean B = ((U2 != null) or (U3 != null))
set U = null
set U2 = null
set U3 = null
return B
endfunction
function TF_Get_Used_Integer_Indexes takes handle H, string ToCheck returns integer
local integer I = 0
local integer I2
loop
set I = I+1
set I2 = GetAttachedInt(H, ToCheck+" "+I2S(I))
exitwhen I2 == 0
endloop
return I-1
endfunction
function TF_Skill_Learn takes nothing returns nothing
local unit U = GetTriggerUnit()
local unit U2 = GetAttachedUnit(U, "TF Future Self")
call SelectHeroSkill(U2, GetLearnedSkill())
set U = null
set U2 = null
endfunction
function TF_Hero_Set takes unit U, unit U2 returns nothing
local integer array Abilities
local integer I = 0
local integer Level
local integer I2 = 0
local integer ItemId
set Abilities[1] = 039;AUdc039;
set Abilities[2] = 039;A000039;
set Abilities[3] = 039;AUau039;
set Abilities[4] = 039;AUan039;
// set Abilities[5] = ''
set Level = GetHeroLevel(U)
call SetHeroLevel(U2, Level, false)
loop
set I = I+1
exitwhen I > 4 //5 if the hero has a total of 5 hero abilities
set Level = GetUnitAbilityLevel(U, Abilities<i>)
loop
set I2 = I2+1
exitwhen I2 > Level
call SelectHeroSkill(U2, Abilities<i>)
endloop
set I2 = 0
endloop
set I = 0
loop
set I = I+1
exitwhen I > 6
set ItemId = GetItemTypeId(UnitItemInSlot(U, I))
call UnitAddItemById(U2, ItemId)
endloop
endfunction
function TF_Death_Future takes nothing returns nothing
local unit U = GetTriggerUnit()
local unit U2
local real X
local real Y
local boolean B = GetAttachedBoolean(U, "TF Is A Future Self")
if B then
set U2 = GetAttachedUnit(U, "TF Past Self")
else
set U2 = GetAttachedUnit(U, "TF Future Self")
endif
set X = GetUnitX(U)
set Y = GetUnitY(U)
call DestroyEffect(AddSpecialEffect(TF_Auxiliary_Effect_Path(), X, Y))
set X = GetUnitX(U2)
set Y = GetUnitY(U2)
call DestroyEffect(AddSpecialEffect(TF_Auxiliary_Effect_Path(), X, Y))
if not(B) then
call KillUnit(U2)
endif
call CleanAttachedVars(U)
call CleanAttachedVars(U2)
set U = null
set U2 = null
endfunction
function TF_Level_Up takes nothing returns nothing
local unit U = GetTriggerUnit()
local unit U2
local boolean B = GetAttachedBoolean(U, "TF Is A Future Self")
local integer Level
if B then
set U2 = GetAttachedUnit(U, "TF Past Self")
set Level = GetHeroLevel(U2)
else
set U2 = GetAttachedUnit(U, "TF Future Self")
set Level = GetHeroLevel(U)
endif
call SetHeroLevel(U2, Level, true)
set U = null
set U2 = null
endfunction
function TF_Future_Self_Remove takes nothing returns nothing
local timer T = GetExpiredTimer()
local unit U = GetAttachedUnit(T, "TF Future Self To Remove")
local unit U2 = GetAttachedUnit(U, "TF Past Self")
local real Life = GetWidgetLife(U)
local real Mana = GetUnitState(U, UNIT_STATE_MANA)
local group G = GetAttachedGroup(bj_crippledTimer[60], "TF Callback Group")
local real X = GetUnitX(U)
local real Y = GetUnitY(U)
local integer VA = 127
local integer Level = GetHeroLevel(U)
call PauseTimer(T)
call GroupRemoveUnit(G, U)
call AttachObject(U2, "TF Future Self", null)
call AttachReal(U2, "TF Flashback Restore Life", Life)
call AttachReal(U2, "TF Flashback Restore Mana", Mana)
call AttachInt(U2, "TF Flashback Restore Level", Level)
call PauseUnit(U, true)
call SetUnitTimeScale(U, 0.00)
call SetUnitInvulnerable(U, true)
call UnitAddAbility(U, 039;Aloc039;)
call DestroyEffect(AddSpecialEffect(TF_Auxiliary_Effect_Path(), X, Y))
call RemoveUnit(U)
call CleanAttachedVars(U)
call DestroyTimer(T)
set T = null
set U = null
set U2 = null
set G = null
endfunction
function TF_Flashback_Cleanup takes nothing returns nothing
local timer T = GetExpiredTimer()
local group G = CreateGroup()
local unit U
local integer CountdownMS = GetAttachedInt(T, "TF Flashback Countdown MS")
local group G2 = GetAttachedGroup(T, "TF Flashback Cleanup Group")
local integer VA
local real X
local real Y
local real F
local unit U2 = GetAttachedUnit(T, "TF Flashback Previous Unit")
local real Life
local real Mana
local real MaxLife
local real MaxMana
local unit U3
local integer Level
call GroupAddGroup(G2, G)
set CountdownMS = CountdownMS-10
call AttachInt(T, "TF Flashback Countdown MS", CountdownMS)
if CountdownMS == 0 then
set X = GetAttachedReal(T, "TF Flashback Previous X")
set Y = GetAttachedReal(T, "TF Flashback Previous Y")
set F = GetAttachedReal(T, "TF Flashback Previous Facing")
set Life = GetAttachedReal(U2, "TF Flashback Restore Life")
set Mana = GetAttachedReal(U2, "TF Flashback Restore Mana")
set Level = GetAttachedInt(U2, "TF Flashback Restore Level")
call SetUnitX(U2, X)
call SetUnitY(U2, Y)
call DestroyEffect(AddSpecialEffect("Abilities\\Spells\\Human\\Thunderclap\\ThunderClapCaster.mdl", X, Y))
call SetUnitFacing(U2, F)
call SetWidgetLife(U2, Life)
call SetUnitState(U2, UNIT_STATE_MANA, Mana)
call SetHeroLevel(U2, Level, true)
call AttachReal(U2, "TF Flashback Restore Life", 0.00)
call AttachReal(U2, "TF Flashback Restore Mana", 0.00)
call AttachInt(U2, "TF Flashback Restore Level", 0)
call PauseUnit(U2, false)
call SetUnitInvulnerable(U2, false)
call SetUnitTimeScale(U2, 1.00)
loop
set U = FirstOfGroup(G)
exitwhen U == null
call RemoveUnit(U)
call DestroyEffect(GetAttachedEffect(U, "TF Other Player SFX"))
call CleanAttachedVars(U)
call GroupRemoveUnit(G, U)
endloop
call PauseTimer(T)
call DestroyTimer(T)
call CleanAttachedVars(T)
else
set Life = GetWidgetLife(U2)
set MaxLife = GetUnitState(U2, UNIT_STATE_MAX_LIFE)
set Life = Life-((MaxLife-GetAttachedReal(U2, "TF Flashback Restore Life"))/40)
call SetWidgetLife(U2, Life)
set Mana = GetUnitState(U2, UNIT_STATE_MANA)
set MaxMana = GetUnitState(U2, UNIT_STATE_MAX_MANA)
set Mana = Mana-((MaxMana-GetAttachedReal(U2, "TF Flashback Restore Mana"))/40)
call SetUnitState(U2, UNIT_STATE_MANA, Mana)
if CountdownMS == 30 then
call DestroyEffect(AddSpecialEffectTarget(TF_Auxiliary_Effect_Path(), U2, TF_Auxiliary_Effect_Attach()))
endif
loop
set U = FirstOfGroup(G)
exitwhen U == null
set VA = GetAttachedInt(U, "TF Vertex Alpha")
set VA = VA-4
if GetLocalPlayer() == GetOwningPlayer(U2) then
call SetUnitVertexColor(U, 255, 255, 255, VA)
else
call SetUnitVertexColor(U, 255, 255, 255, 0)
endif
call AttachInt(U, "TF Vertex Alpha", VA)
if VA == 0 then
set X = GetUnitX(U)
set Y = GetUnitY(U)
set U3 = CreateUnit(GetOwningPlayer(U), TF_Abyss_Dummy_Unit_Id(), X, Y, 0)
call UnitApplyTimedLife(U3, 039;BTLF039;, 2.00)
call DestroyEffect(AddSpecialEffectTarget(TF_Auxiliary_Effect_Path(), U, TF_Auxiliary_Effect_Attach()))
endif
if CountdownMS == 300 then
call SetUnitTimeScale(U, 0.00)
endif
call GroupRemoveUnit(G, U)
endloop
endif
call DestroyGroup(G)
set G = null
set G2 = null
set U = null
set U2 = null
set U3 = null
set T = null
endfunction
function TF_Flashback takes timer T, unit U returns nothing
local real X = GetAttachedReal(T, "TF Flashback Origin X")
local real Y = GetAttachedReal(T, "TF Flashback Origin Y")
local real F = GetAttachedReal(T, "TF Flashback Origin Facing")
local real OX = GetUnitX(U)
local real OY = GetUnitY(U)
local real OF = GetUnitFacing(U)
local unit U2
local integer I = 0
local integer TotalIndex = TF_Get_Used_Integer_Indexes(T, "TF Flashback Unit Id")
local integer UId
local integer I2 = 0
local real Mana = GetUnitState(U, UNIT_STATE_MAX_MANA)*(GetRandomReal(0.15, 0.45))
local real R
local integer P
local group G = CreateGroup()
local timer T2 = CreateTimer()
local string EffectPath = ""
local player OP = GetOwningPlayer(U)
local effect SFX
local real TX = GetAttachedReal(T, "TF Flashback Origin X Move To")
local real TY = GetAttachedReal(T, "TF Flashback Origin Y Move To")
local real D
call DestroyEffect(AddSpecialEffectTarget(TF_Auxiliary_Effect_Path(), U, TF_Auxiliary_Effect_Attach()))
call SetUnitX(U, TX)
call SetUnitY(U, TY)
call DestroyEffect(AddSpecialEffect("Abilities\\Spells\\Human\\Thunderclap\\ThunderClapCaster.mdl", TX, TY))
call SetUnitFacing(U, F)
call SetWidgetLife(U, GetUnitState(U, UNIT_STATE_MAX_LIFE))
if (GetUnitState(U, UNIT_STATE_MANA) > Mana) then
call SetUnitState(U, UNIT_STATE_MANA, Mana)
endif
call PauseUnit(U, true)
call SetUnitTimeScale(U, 0.00)
call SetUnitFacing(U, F)
call SetUnitInvulnerable(U, true)
loop
set I = I+1
exitwhen I > TotalIndex
set UId = GetAttachedInt(T, "TF Flashback Unit Id "+I2S(I))
set X = GetAttachedReal(T, "TF Flashback Unit X "+I2S(I))
set Y = GetAttachedReal(T, "TF Flashback Unit Y "+I2S(I))
set F = GetAttachedReal(T, "TF Flashback Unit Facing "+I2S(I))
set P = GetAttachedInt(T, "TF Flashback Unit Owner "+I2S(I))
set U2 = CreateUnit(Player(P), UId, X, Y, F)
if GetLocalPlayer() == OP then
call SetUnitVertexColor(U2, 255, 255, 255, 152)
else
call SetUnitVertexColor(U2, 255, 255, 255, 0)
endif
call SetUnitAnimationByIndex(U2, GetRandomInt(1, 6))
call AttachInt(U2, "TF Vertex Alpha", 152)
if GetLocalPlayer() != OP then
set EffectPath = TF_Other_Player_Effect_Path()
endif
set SFX = AddSpecialEffectTarget(EffectPath, U2, TF_Other_Player_Effect_Attach())
call AttachObject(U2, "TF Other Player SFX", SFX)
call UnitAddAbility(U2, 039;Aloc039;)
call SetUnitX(U2, X)
call SetUnitY(U2, Y)
call PauseUnit(U2, true)
call GroupAddUnit(G, U2)
endloop
call AttachObject(T2, "TF Flashback Cleanup Group", G)
call AttachInt(T2, "TF Flashback Countdown MS", 400)
call AttachObject(T2, "TF Flashback Previous Unit", U)
call AttachReal(T2, "TF Flashback Previous X", OX)
call AttachReal(T2, "TF Flashback Previous Y", OY)
call AttachReal(T2, "TF Flashback Previous Facing", OF)
call TimerStart(T2, 0.10, true, function TF_Flashback_Cleanup)
set U2 = null
set SFX = null
set T2 = null
endfunction
function TF_Flashback_Callback takes nothing returns nothing
local timer T = GetExpiredTimer()
local integer Countdown = GetAttachedInt(T, "TF Flashback Countdown")
local unit U = GetAttachedUnit(T, "TF Flashback Origin Unit")
if (GetWidgetLife(U) < 0.406 or U == null) then
call PauseTimer(T)
call DestroyTimer(T)
call CleanAttachedVars(T)
else
set Countdown = Countdown-1
call AttachInt(T, "TF Flashback Countdown", Countdown)
if Countdown == 0 then
call PauseTimer(T)
call TF_Flashback(T, U)
call DestroyTimer(T)
call CleanAttachedVars(T)
endif
endif
set T = null
set U = null
endfunction
function TF_Move_Callback takes nothing returns nothing
local timer T = GetExpiredTimer()
local group G = CreateGroup()
local unit FutureSelf
local unit PastSelf
local real X
local real Y
local real X2
local real Y2
local real D
local real A
local integer Countdown
call GroupAddGroup(GetAttachedGroup(T, "TF Callback Group"), G)
loop
set FutureSelf = FirstOfGroup(G)
exitwhen FutureSelf == null
set PastSelf = GetAttachedUnit(FutureSelf, "TF Past Self")
if GetUnitCurrentOrder(FutureSelf) != 851983 then
set X = GetUnitX(PastSelf)
set Y = GetUnitY(PastSelf)
set D = GetRandomReal(25.00, 300.00)
set A = GetRandomReal(0.00, 360.00)
set X2 = X + (D*Cos(A*bj_DEGTORAD))
set Y2 = Y + (D*Sin(A*bj_DEGTORAD))
call IssuePointOrder(FutureSelf, "attack", X2, Y2)
endif
call GroupRemoveUnit(G, FutureSelf)
endloop
call DestroyGroup(G)
set FutureSelf = null
set PastSelf = null
set G = null
set T = null
endfunction
function TF_Vertex_Callback takes nothing returns nothing
local timer T = GetExpiredTimer()
local unit U = GetAttachedUnit(T, "TF Vertex Unit")
call SetUnitVertexColor(U, 255, 255, 255, 127)
call PauseTimer(T)
call DestroyTimer(T)
call CleanAttachedVars(T)
set T = null
set U = null
endfunction
function TF_Cast_Portal takes nothing returns nothing
local unit U = bj_ghoul[60]
local unit U2
local real X = GetAttachedReal(U, "TF Portal X")
local real Y = GetAttachedReal(U, "TF Portal Y")
local real X2 = GetAttachedReal(U, "TF Portal X2")
local real Y2 = GetAttachedReal(U, "TF Portal Y2")
local real F = GetAttachedReal(U, "TF Portal Facing")
local integer UId = GetAttachedInt(U, "TF Portal Id")
local unit Portal = CreateUnit(GetOwningPlayer(U), TF_Portal_Dummy_Unit_Id(), X2, Y2, (F+180.00))
local group G = GetAttachedGroup(bj_crippledTimer[60], "TF Callback Group")
local timer T = CreateTimer()
local integer Level = GetUnitAbilityLevel(U, TF_Ability_Id())
call SetUnitTimeScale(Portal, 2.25)
call SetUnitAnimation(Portal, "birth")
call PolledWait(3.00)
set X2 = X + ((TF_Spawn_Offset()-20.00)*Cos(F*bj_DEGTORAD))
set Y2 = Y + ((TF_Spawn_Offset()-20.00)*Sin(F*bj_DEGTORAD))
set U2 = CreateUnit(GetOwningPlayer(U), UId, X2, Y2, (F+180.00))
call DestroyEffect(AddSpecialEffect("Abilities\\Spells\\Human\\Thunderclap\\ThunderClapCaster.mdl", X, Y))
call DestroyEffect(AddSpecialEffectTarget(TF_Auxiliary_Effect_Path(), U2, TF_Auxiliary_Effect_Attach()))
call IssuePointOrder(U2, "attack", X, Y)
call SetUnitAnimation(Portal, "stand")
call SetUnitAnimation(Portal, "death")
call UnitAddAbility(U2, 039;Aloc039;)
call UnitAddAbility(U2, TF_Chaos_Ability_Id())
call AttachObject(U2, "TF Past Self", U)
call TF_Hero_Set(U, U2)
call GroupAddUnit(G, U2)
call AttachObject(U, "TF Future Self", U2)
//Setting Vertex Color Timer
call AttachObject(T, "TF Vertex Unit", U2)
call TimerStart(T, 0.025, false, function TF_Vertex_Callback)
set T = null
//Removing the Future Self Timer
set T = CreateTimer()
call AttachObject(T, "TF Future Self To Remove", U2)
call TimerStart(T, (20.00+(5.00*Level)), false, function TF_Future_Self_Remove)
call PolledWait(4.00)
call RemoveUnit(Portal)
set U = null
set U2 = null
set Portal = null
set G = null
set T = null
endfunction
function TF_Cast takes nothing returns nothing
local unit U = GetTriggerUnit()
local integer Id = GetUnitTypeId(U)
local real X = GetUnitX(U)
local real Y = GetUnitY(U)
local real F = GetUnitFacing(U)
local real X2 = X + (TF_Spawn_Offset()*Cos(F*bj_DEGTORAD))
local real Y2 = Y + (TF_Spawn_Offset()*Sin(F*bj_DEGTORAD))
local timer T = CreateTimer()
local group G = GetAttachedGroup(bj_crippledTimer[60], "TF Callback Group")
local unit U3
local integer I = 0
local integer P
local integer Level = GetUnitAbilityLevel(U, TF_Ability_Id())
call AttachReal(U, "TF Portal X", X)
call AttachReal(U, "TF Portal Y", Y)
call AttachReal(U, "TF Portal X2", X2)
call AttachReal(U, "TF Portal Y2", Y2)
call AttachReal(U, "TF Portal Facing", F)
call AttachInt(U, "TF Portal Id", Id)
set bj_ghoul[60] = U
call ExecuteFunc("TF_Cast_Portal")
//Flashback Timer
set T = CreateTimer()
call AttachObject(T, "TF Flashback Origin Unit", U)
call AttachInt(T, "TF Flashback Countdown", (23+(5*Level)))
call AttachReal(T, "TF Flashback Origin X", X2)
call AttachReal(T, "TF Flashback Origin Y", Y2)
call AttachReal(T, "TF Flashback Origin X Move To", X)
call AttachReal(T, "TF Flashback Origin Y Move To", Y)
call AttachReal(T, "TF Flashback Origin Facing", F)
set G = CreateGroup()
call GroupEnumUnitsInRange(G, X, Y, 375.00, Condition(function TF_Group_Filter))
loop
set U3 = FirstOfGroup(G)
set I = I+1
exitwhen U3 == null
set Id = GetUnitTypeId(U3)
set P = GetPlayerId(GetOwningPlayer(U3))
set X2 = GetUnitX(U3)
set Y2 = GetUnitY(U3)
set F = GetUnitFacing(U3)
call AttachInt(T, "TF Flashback Unit Id "+I2S(I), Id)
call AttachInt(T, "TF Flashback Unit Owner "+I2S(I), P)
call AttachReal(T, "TF Flashback Unit X "+I2S(I), X2)
call AttachReal(T, "TF Flashback Unit Y "+I2S(I), Y2)
call AttachReal(T, "TF Flashback Unit Facing "+I2S(I), F)
call GroupRemoveUnit(G, U3)
endloop
call TimerStart(T, 1.00, true, function TF_Flashback_Callback)
set U = null
set U3 = null
set T = null
set G = null
endfunction
//===========================================================================
function InitTrig_Temporal_Fluxation takes nothing returns nothing
local trigger T = CreateTrigger( )
local group G = CreateGroup()
set bj_crippledTimer[60] = CreateTimer()
set gg_trg_Temporal_Fluxation = CreateTrigger( )
call TriggerRegisterAnyUnitEventBJ(gg_trg_Temporal_Fluxation, EVENT_PLAYER_UNIT_SPELL_EFFECT)
call TriggerAddCondition(gg_trg_Temporal_Fluxation, Condition(function TF_Cast_Conditions))
call TriggerAddAction(gg_trg_Temporal_Fluxation, function TF_Cast)
call TimerStart(bj_crippledTimer[60], 1.00, true, function TF_Move_Callback)
call AttachObject(bj_crippledTimer[60], "TF Callback Group", G)
call TriggerRegisterAnyUnitEventBJ(T, EVENT_PLAYER_UNIT_DEATH)
call TriggerAddCondition(T, Condition(function TF_Event_Filter))
call TriggerAddAction(T, function TF_Death_Future)
set T = CreateTrigger( )
call TriggerRegisterAnyUnitEventBJ(T, EVENT_PLAYER_HERO_LEVEL)
call TriggerAddCondition(T, Condition(function TF_Event_Filter))
call TriggerAddAction(T, function TF_Level_Up)
set T = CreateTrigger( )
call TriggerRegisterAnyUnitEventBJ(T, EVENT_PLAYER_HERO_SKILL)
call TriggerAddCondition(T, Condition(function TF_Event_Filter))
call TriggerAddAction(T, function TF_Skill_Learn)
set G = null
set T = null
endfunction
</i></i>
And the thing is, you can STILL cause a temporal paradox. If you (the caster, as the past self) die after you summon your future self, but before you flashback in time, something BAD should happen.
But, I'll just stick to string theory and say that your future self was actually from an alternate dimension and that his coming to this dimension caused a planar shift in which you (the past self) died.
Just in case nobody understands what the heck I'm talking about, here's the lowdown on the string-theory part of the spell:
Note: the caster will always be referred to as the "past self", and the summoned unit will always be referred to as the "future self".
The past self summons the future self to aid him in his plight; the future self is an exact copy of the current past self (excluding health/mana; including spells and items). While both are present, anything that happens to the past self (as this is WC3, this is limited to specific things not including changes in life/mana) will happen instantly to the future self, since it has then happened in the future self's past.
Eventually, the future self goes back to its respective time, and the past self prepares to return to the past in which he summoned his future self. While in the past, anything that happened to the future self when it was in the past, is now applied to the past self (barring WC3 limitiations, this time it affects life and mana). The journey to the past drained the future self of much of its magical essence (mana), and thus the past self loses some of its also.
If at any point the past self gains a level, learns a skill, or (in next version of spell) gains/loses an item, the same will (according to string theory) happen to the future self, since it has now happened in the future self's past.
Oh, and to anyone who attempts to open the map up and look at the spell that way, the formatting is going to be all fucked up because I wrote it on a Mac. Just refer to the attached text file as the actual code (which it is), or replace the existing code with the code in either the text file or in the above code box.
To fix the .txt file formatting, just c 'n p it all into another program that self-formats (AIM, etc.) and then paste that into another document and the formatting should be fixed.
Spell Download
The Code in a Text File