Commit 2e8f1251 authored by 聖園ミカ's avatar 聖園ミカ 🐟

Replace c64800191.lua

parent 8e4458cb
Pipeline #30655 canceled with stages
in 30 seconds
......@@ -7,14 +7,14 @@ function cm.initial_effect(c)
e1:SetCategory(CATEGORY_NEGATE+CATEGORY_DESTROY)
e1:SetType(EFFECT_TYPE_ACTIVATE)
e1:SetCode(EVENT_CHAINING)
e1:SetCountLimit(1,m+EFFECT_COUNT_CODE_OATH)
e1:SetCondition(cm.condition)
e1:SetTarget(cm.target)
e1:SetOperation(cm.activate)
c:RegisterEffect(e1)
end
function cm.cfilter1(c)
return c:IsFaceup() and c:IsSetCard(0x412)
return c:IsFaceup() and c:IsSetCard(0x412) and c:IsType(TYPE_XYZ)
end
function cm.cfilter2(c)
return c:IsFaceup() and c:IsLevel(10)
......@@ -33,16 +33,17 @@ function cm.target(e,tp,eg,ep,ev,re,r,rp,chk)
end
end
function cm.actcfilter(c)
return c:IsSetCard(0x412) and c:IsType(TYPE_XYZ) and c:IsFaceup()
return c:IsFaceup() and c:IsSetCard(0x412) and c:IsType(TYPE_XYZ)
end
function cm.activate(e,tp,eg,ep,ev,re,r,rp)
local c=e:GetHandler()
if Duel.NegateActivation(ev) and re:GetHandler():IsRelateToEffect(re) then
Duel.Destroy(eg,REASON_EFFECT)
end
if Duel.IsExistingMatchingCard(cm.actcfilter,tp,LOCATION_MZONE,0,1,nil) and Duel.SelectYesNo(tp,aux.Stringid(m,0)) and c:IsRelateToEffect(e) then
if Duel.NegateActivation(ev) and re:GetHandler():IsRelateToEffect(re) and Duel.Destroy(eg,REASON_EFFECT)>0
and Duel.IsExistingMatchingCard(cm.actcfilter,tp,LOCATION_MZONE,0,1,nil,e) and c:IsLocation(LOCATION_ONFIELD)
and c:IsRelateToEffect(e) and c:IsCanOverlay() and Duel.SelectYesNo(tp,aux.Stringid(m,0)) then
local g2=Duel.SelectMatchingCard(tp,cm.actcfilter,tp,LOCATION_MZONE,0,1,1,nil)
Duel.HintSelection(g2)
local sc=g2:GetFirst()
if sc:IsImmuneToEffect(e) then return end
c:CancelToGrave()
Duel.Overlay(sc,Group.FromCards(c))
end
......
Markdown is supported
0% or
You are about to add 0 people to the discussion. Proceed with caution.
Finish editing this message first!
Please register or to comment