name: Evo-Karma
card_text: When a monster(s) is Special Summoned by the effect of an "Evoltile" monster you control, your opponent cannot activate cards or effects.
external_ids: local SETCARD_ID_0 = 0x304e --Evoltile
  
lua: local SETCARD_ID_0 = 0x304e --Evoltile
  local s, id, o = GetID()
  function s.initial_effect(c)
  	--Activate
  	local e1 = Effect.CreateEffect(c)
  	e1:SetType(EFFECT_TYPE_ACTIVATE)
  	e1:SetCode(EVENT_FREE_CHAIN)
  	c:RegisterEffect(e1)
  	--act limit
  	local e2 = Effect.CreateEffect(c)
  	e2:SetType(EFFECT_TYPE_FIELD + EFFECT_TYPE_CONTINUOUS)
  	e2:SetRange(LOCATION_SZONE)
  	e2:SetCode(EVENT_SPSUMMON_SUCCESS)
  	e2:SetOperation(s.sucop)
  	c:RegisterEffect(e2)
  	local e3 = Effect.CreateEffect(c)
  	e3:SetType(EFFECT_TYPE_FIELD + EFFECT_TYPE_CONTINUOUS)
  	e3:SetRange(LOCATION_SZONE)
  	e3:SetCode(EVENT_CHAIN_END)
  	e3:SetOperation(s.cedop)
  	c:RegisterEffect(e3)
  end
  function s.chainlm(e, rp, tp)
  	return tp == rp
  end
  function s.sucfilter(c)
  	local typ = c:GetSpecialSummonInfo(SUMMON_INFO_TYPE)
  	return c:IsSummonType(SUMMON_VALUE_EVOLTILE) or (typ & TYPE_MONSTER ~= 0 and c:IsSpecialSummonSetCard(SETCARD_ID_0))
  end
  function s.sucop(e, tp, eg, ep, ev, re, r, rp)
  	if eg:IsExists(s.sucfilter, 1, nil) and Duel.GetCurrentChain() == 1 then
  		e:GetHandler():RegisterFlagEffect(id, RESET_EVENT + RESETS_STANDARD, 0, 1)
  		local e1 = Effect.CreateEffect(e:GetHandler())
  		e1:SetType(EFFECT_TYPE_FIELD + EFFECT_TYPE_CONTINUOUS)
  		e1:SetCode(EVENT_CHAINING)
  		e1:SetOperation(s.resetop)
  		Duel.RegisterEffect(e1, tp)
  		local e2 = e1:Clone()
  		e2:SetCode(EVENT_BREAK_EFFECT)
  		e2:SetReset(RESET_CHAIN)
  		Duel.RegisterEffect(e2, tp)
  	end
  end
  function s.resetop(e, tp, eg, ep, ev, re, r, rp)
  	e:GetHandler():ResetFlagEffect(id)
  	e:Reset()
  end
  function s.cedop(e, tp, eg, ep, ev, re, r, rp)
  	if e:GetHandler():GetFlagEffect(id) ~= 0 then
  		Duel.SetChainLimitTillChainEnd(s.chainlm)
  	end
  	e:GetHandler():ResetFlagEffect(id)
  end
  
  
source_text: Evo-Karma
  When a monster(s) is Special Summoned by the effect of an "Evoltile" monster you control, your opponent cannot activate cards or effects.
target_text: -- Evo-Karma
  local SETCARD_ID_0 = 0x304e --Evoltile
  local s, id, o = GetID()
  function s.initial_effect(c)
  	--Activate
  	local e1 = Effect.CreateEffect(c)
  	e1:SetType(EFFECT_TYPE_ACTIVATE)
  	e1:SetCode(EVENT_FREE_CHAIN)
  	c:RegisterEffect(e1)
  	--act limit
  	local e2 = Effect.CreateEffect(c)
  	e2:SetType(EFFECT_TYPE_FIELD + EFFECT_TYPE_CONTINUOUS)
  	e2:SetRange(LOCATION_SZONE)
  	e2:SetCode(EVENT_SPSUMMON_SUCCESS)
  	e2:SetOperation(s.sucop)
  	c:RegisterEffect(e2)
  	local e3 = Effect.CreateEffect(c)
  	e3:SetType(EFFECT_TYPE_FIELD + EFFECT_TYPE_CONTINUOUS)
  	e3:SetRange(LOCATION_SZONE)
  	e3:SetCode(EVENT_CHAIN_END)
  	e3:SetOperation(s.cedop)
  	c:RegisterEffect(e3)
  end
  function s.chainlm(e, rp, tp)
  	return tp == rp
  end
  function s.sucfilter(c)
  	local typ = c:GetSpecialSummonInfo(SUMMON_INFO_TYPE)
  	return c:IsSummonType(SUMMON_VALUE_EVOLTILE) or (typ & TYPE_MONSTER ~= 0 and c:IsSpecialSummonSetCard(SETCARD_ID_0))
  end
  function s.sucop(e, tp, eg, ep, ev, re, r, rp)
  	if eg:IsExists(s.sucfilter, 1, nil) and Duel.GetCurrentChain() == 1 then
  		e:GetHandler():RegisterFlagEffect(id, RESET_EVENT + RESETS_STANDARD, 0, 1)
  		local e1 = Effect.CreateEffect(e:GetHandler())
  		e1:SetType(EFFECT_TYPE_FIELD + EFFECT_TYPE_CONTINUOUS)
  		e1:SetCode(EVENT_CHAINING)
  		e1:SetOperation(s.resetop)
  		Duel.RegisterEffect(e1, tp)
  		local e2 = e1:Clone()
  		e2:SetCode(EVENT_BREAK_EFFECT)
  		e2:SetReset(RESET_CHAIN)
  		Duel.RegisterEffect(e2, tp)
  	end
  end
  function s.resetop(e, tp, eg, ep, ev, re, r, rp)
  	e:GetHandler():ResetFlagEffect(id)
  	e:Reset()
  end
  function s.cedop(e, tp, eg, ep, ev, re, r, rp)
  	if e:GetHandler():GetFlagEffect(id) ~= 0 then
  		Duel.SetChainLimitTillChainEnd(s.chainlm)
  	end
  	e:GetHandler():ResetFlagEffect(id)
  end
  
  