DC_INTERACTION_OPPORTUNITIES=500; DC_INTERACTION_RUN_ID='interactions_canonical_20261030' local ORIGIN=Vector(-4500,0,256) -- Isolated numeric observations only. Never run in a normal/user match. local function json(v) local t=type(v);if t=='number' then return v==v and math.abs(v).01 or math.abs(u:GetManaRegen())>.01 or u:HasModifier('modifier_tower_aura_bonus')or u:HasModifier('modifier_fountain_aura_buff')or u:HasModifier('modifier_path_movespeed')then error('baseline_contaminated')end end d={start=Time(),samples={},damage={},attacks={},executions={},caster=a,target=b,count=0,completedCount=0,before={caster=snapshot(a),target=snapshot(b)}};GameRules.DCInteraction=d if c.natural then a:MoveToTargetToAttack(b) elseif c.spire then ExecuteOrderFromTable({UnitIndex=a:entindex(),OrderType=DOTA_UNIT_ORDER_CAST_POSITION,Position=b:GetAbsOrigin()+Vector(100,0,0),AbilityIndex=a:FindAbilityByName('lich_ice_spire'):entindex(),Queue=false}) elseif c.death then ApplyDamage({victim=a,attacker=b,damage=1000,damage_type=DAMAGE_TYPE_PURE}) elseif c.poison then a:FindAbilityByName(c.ability):ToggleAutoCast();a.DCInteraction.allowAttack=true;a:PerformAttack(b,true,true,true,true,false,false,true);a.DCInteraction.allowAttack=false else casts(a,b,c.ability,c.point)end;phase=2;return .02 end local elapsed=Time()-d.start if not d.intervened and elapsed>=.9 then d.intervened=true if c.purge then b:Purge(false,true,false,c.purge=='strong',c.purgeRemoveExceptions==true) elseif c.item then ExecuteOrderFromTable({UnitIndex=b:entindex(),OrderType=DOTA_UNIT_ORDER_CAST_NO_TARGET,AbilityIndex=b:GetItemInSlot(0):entindex(),Queue=false}) elseif c.follow then casts(a,b,c.follow,false) elseif c.spire then local s=nearbySpire(a)[1];if s then d.spire=s;if c.spireAttacks then b.DCInteraction.allowAttack=true;b:PerformAttack(s,true,true,true,true,false,false,true);b.DCInteraction.allowAttack=false;d.spireHits=1;d.lastSpireAttack=elapsed else casts(a,b,'lich_chain_frost',false)end end end end if c.spireAttacks and d.spire and not d.spire:IsNull()and d.spireHits<4 and elapsed>(d.lastSpireAttack or 0)+.5 then b.DCInteraction.allowAttack=true;b:PerformAttack(d.spire,true,true,true,true,false,false,true);b.DCInteraction.allowAttack=false;d.spireHits=d.spireHits+1;d.lastSpireAttack=elapsed end if not d.lastSample or elapsed-d.lastSample>=(c.natural and 20 or .05)then d.lastSample=elapsed;local s=nearbySpire(a)[1];d.samples[#d.samples+1]={at=elapsed,caster=snapshot(a),target=snapshot(b),spire=s and {hp=s:GetHealth(),alive=s:IsAlive()}or {hp=0,alive=false}}end local goal=c.naturalRequested or math.max(100,math.min(5000,DC_INTERACTION_OPPORTUNITIES or 1000)) if c.natural and d.completedCount>=goal and not d.finishedAt then d.finishedAt=elapsed;a:Stop()end if elapsed