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) ...@@ -7,14 +7,14 @@ function cm.initial_effect(c)
e1:SetCategory(CATEGORY_NEGATE+CATEGORY_DESTROY) e1:SetCategory(CATEGORY_NEGATE+CATEGORY_DESTROY)
e1:SetType(EFFECT_TYPE_ACTIVATE) e1:SetType(EFFECT_TYPE_ACTIVATE)
e1:SetCode(EVENT_CHAINING) e1:SetCode(EVENT_CHAINING)
e1:SetCountLimit(1,m+EFFECT_COUNT_CODE_OATH)
e1:SetCondition(cm.condition) e1:SetCondition(cm.condition)
e1:SetTarget(cm.target) e1:SetTarget(cm.target)
e1:SetOperation(cm.activate) e1:SetOperation(cm.activate)
c:RegisterEffect(e1) c:RegisterEffect(e1)
end end
function cm.cfilter1(c) function cm.cfilter1(c)
return c:IsFaceup() and c:IsSetCard(0x412) return c:IsFaceup() and c:IsSetCard(0x412) and c:IsType(TYPE_XYZ)
end end
function cm.cfilter2(c) function cm.cfilter2(c)
return c:IsFaceup() and c:IsLevel(10) return c:IsFaceup() and c:IsLevel(10)
...@@ -33,16 +33,17 @@ function cm.target(e,tp,eg,ep,ev,re,r,rp,chk) ...@@ -33,16 +33,17 @@ function cm.target(e,tp,eg,ep,ev,re,r,rp,chk)
end end
end end
function cm.actcfilter(c) 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 end
function cm.activate(e,tp,eg,ep,ev,re,r,rp) function cm.activate(e,tp,eg,ep,ev,re,r,rp)
local c=e:GetHandler() local c=e:GetHandler()
if Duel.NegateActivation(ev) and re:GetHandler():IsRelateToEffect(re) then if Duel.NegateActivation(ev) and re:GetHandler():IsRelateToEffect(re) and Duel.Destroy(eg,REASON_EFFECT)>0
Duel.Destroy(eg,REASON_EFFECT) and Duel.IsExistingMatchingCard(cm.actcfilter,tp,LOCATION_MZONE,0,1,nil,e) and c:IsLocation(LOCATION_ONFIELD)
end and c:IsRelateToEffect(e) and c:IsCanOverlay() and Duel.SelectYesNo(tp,aux.Stringid(m,0)) then
if Duel.IsExistingMatchingCard(cm.actcfilter,tp,LOCATION_MZONE,0,1,nil) and Duel.SelectYesNo(tp,aux.Stringid(m,0)) and c:IsRelateToEffect(e) then
local g2=Duel.SelectMatchingCard(tp,cm.actcfilter,tp,LOCATION_MZONE,0,1,1,nil) local g2=Duel.SelectMatchingCard(tp,cm.actcfilter,tp,LOCATION_MZONE,0,1,1,nil)
Duel.HintSelection(g2)
local sc=g2:GetFirst() local sc=g2:GetFirst()
if sc:IsImmuneToEffect(e) then return end
c:CancelToGrave() c:CancelToGrave()
Duel.Overlay(sc,Group.FromCards(c)) Duel.Overlay(sc,Group.FromCards(c))
end 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