--Number i39: Utopia Lucidia local s,id=GetID() function s.initial_effect(c) c:EnableReviveLimit() --xyz summon aux.AddXyzProcedure(c,nil,6,2) local e1=Effect.CreateEffect(c) e1:Desc(0) e1:SetCategory(CATEGORY_DISABLE) e1:SetType(EFFECT_TYPE_SINGLE|EFFECT_TYPE_TRIGGER_O) e1:SetProperty(EFFECT_FLAG_DELAY) e1:SetCode(EVENT_SPSUMMON_SUCCESS) e1:SetCondition(s.spcon) e1:SetTarget(s.sptg) e1:SetOperation(s.spop) c:RegisterEffect(e1) --pierce local e2=Effect.CreateEffect(c) e2:SetType(EFFECT_TYPE_SINGLE) e2:SetCode(EFFECT_PIERCE) c:RegisterEffect(e2) --Double ATK local e3=Effect.CreateEffect(c) e3:Desc(2) e3:SetCategory(CATEGORY_ATKCHANGE|CATEGORY_DEFCHANGE) e3:SetType(EFFECT_TYPE_SINGLE|EFFECT_TYPE_TRIGGER_O) e3:SetCode(EVENT_BATTLE_START) e3:SetCondition(s.atkcon) e3:SetCost(aux.DetachSelfCost()) e3:SetTarget(s.atktg) e3:SetOperation(s.atkop) c:RegisterEffect(e3) if not s.TriggeringSetcodeCheck then s.TriggeringSetcodeCheck=true s.TriggeringSetcode={} local ge1=Effect.CreateEffect(c) ge1:SetType(EFFECT_TYPE_FIELD|EFFECT_TYPE_CONTINUOUS) ge1:SetCode(EVENT_CHAIN_CREATED) ge1:SetOperation(s.regop) Duel.RegisterEffect(ge1,0) end end s.xyz_number=39 function s.regop(e,tp,eg,ep,ev,re,r,rp) local cid=Duel.GetChainInfo(ev,CHAININFO_CHAIN_ID) local rc=re:GetHandler() if rc:IsRelateToChain(ev) then if rc:IsSetCard(ARCHE_RUM) then s.TriggeringSetcode[cid]=true return end else if rc:IsPreviousSetCard(ARCHE_RUM) then s.TriggeringSetcode[cid]=true return end end s.TriggeringSetcode[cid]=false end function s.spcon(e,tp,eg,ep,ev,re,r,rp) local rc=re:GetHandler() if not (e:GetHandler():IsSummonType(SUMMON_TYPE_XYZ) and re and re:IsActiveType(TYPE_SPELL)) then return false end if re:IsActivated() then local ch=Duel.GetCurrentChain() local cid=Duel.GetChainInfo(ch,CHAININFO_CHAIN_ID) if rc:IsRelateToChain(ch) then return rc:IsSetCard(ARCHE_RUM) else return s.TriggeringSetcode[cid]==true end else rc:IsSetCard(ARCHE_RUM) end end function s.sptg(e,tp,eg,ep,ev,re,r,rp,chk) if chk==0 then return Duel.IsExistingMatchingCard(aux.NegateMonsterFilter,tp,LOCATION_MZONE,LOCATION_MZONE,1,e:GetHandler()) end local g=Duel.GetMatchingGroup(aux.NegateMonsterFilter,tp,LOCATION_MZONE,LOCATION_MZONE,e:GetHandler()) Duel.SetCardOperationInfo(g,CATEGORY_DISABLE) end function s.spop(e,tp,eg,ep,ev,re,r,rp) local c=e:GetHandler() local g=Duel.GetMatchingGroup(aux.NegateMonsterFilter,tp,LOCATION_MZONE,LOCATION_MZONE,aux.ExceptThis(c)):Filter(Card.IsCanBeDisabledByEffect,nil,e) for tc in aux.Next(g) do Duel.Negate(tc,e) end local e1=Effect.CreateEffect(c) e1:SetType(EFFECT_TYPE_FIELD) e1:SetCode(EFFECT_CANNOT_SPECIAL_SUMMON) e1:SetProperty(EFFECT_FLAG_PLAYER_TARGET) e1:SetTargetRange(1,0) e1:SetReset(RESET_PHASE|PHASE_END) Duel.RegisterEffect(e1,tp) Duel.RegisterHint(tp,id,PHASE_END,1,id,1) end function s.atkcon(e,tp,eg,ep,ev,re,r,rp) local c=e:GetHandler() local bc=c:GetBattleTarget() return bc and bc:IsSummonType(SUMMON_TYPE_SPECIAL) and bc:IsFaceup() end function s.atktg(e,tp,eg,ep,ev,re,r,rp,chk) if chk==0 then return true end local bc=e:GetHandler():GetBattleTarget() local bp,bloc=bc:GetControler(),bc:GetLocation() Duel.SetTargetCard(bc) Duel.SetCustomOperationInfo(0,CATEGORY_ATKCHANGE,bc,1,bp,bloc,0) Duel.SetCustomOperationInfo(0,CATEGORY_DEFCHANGE,bc,1,bp,bloc,0) end function s.atkop(e,tp,eg,ep,ev,re,r,rp) local c=e:GetHandler() local bc=c:GetBattleTarget() if bc and bc:IsFaceup() and bc:IsRelateToChain() then local e1=Effect.CreateEffect(c) e1:SetType(EFFECT_TYPE_SINGLE) e1:SetCode(EFFECT_SET_ATTACK_FINAL) e1:SetValue(0) e1:SetReset(RESET_EVENT|RESETS_STANDARD) bc:RegisterEffect(e1) local e2=e1:Clone() e2:SetCode(EFFECT_SET_DEFENSE_FINAL) bc:RegisterEffect(e2) end end