Commit 51bb0b60 authored by 聖園ミカ's avatar 聖園ミカ 🐟

byd

parent a059efd5
Pipeline #30179 passed with stages
in 27 minutes and 53 seconds
......@@ -33,8 +33,7 @@ function cm.condition(e,tp,eg,ep,ev,re,r,rp)
return Duel.IsExistingMatchingCard(cm.cfilter,tp,LOCATION_MZONE,0,1,nil)
end
function cm.filter(c)
return (c:GetType()==TYPE_SPELL or c:IsType(TYPE_QUICKPLAY))
and (c:IsSetCard(0xa8e) or c:IsCode(81050001,81050002))
return (((c:GetType()==TYPE_SPELL or c:IsType(TYPE_QUICKPLAY)) and c:IsSetCard(0xa8e)) or c:IsCode(81050001,81050002))
and c:CheckActivateEffect(false,true,false)~=nil
end
function cm.target(e,tp,eg,ep,ev,re,r,rp,chk,chkc)
......@@ -43,12 +42,11 @@ function cm.target(e,tp,eg,ep,ev,re,r,rp,chk,chkc)
local tg=te:GetTarget()
return tg and tg(e,tp,eg,ep,ev,re,r,rp,0,chkc)
end
local loc1,loc2=0,LOCATION_GRAVE
if e:GetType()&EFFECT_TYPE_QUICK_O>0 then loc1,loc2=LOCATION_GRAVE,0 end
if chk==0 then return Duel.IsExistingTarget(cm.filter,tp,loc1,loc2,1,nil) end
if chk==0 then return Duel.IsExistingTarget(cm.filter,tp,LOCATION_GRAVE,0,1,nil) end
e:SetProperty(EFFECT_FLAG_CARD_TARGET)
e:SetCategory(0)
Duel.Hint(HINT_SELECTMSG,tp,HINTMSG_TARGET)
local g=Duel.SelectTarget(tp,cm.filter,tp,loc1,loc2,1,1,nil)
local g=Duel.SelectTarget(tp,cm.filter,tp,LOCATION_GRAVE,0,1,1,nil)
local te,ceg,cep,cev,cre,cr,crp=g:GetFirst():CheckActivateEffect(false,true,true)
Duel.ClearTargetCard()
g:GetFirst():CreateEffectRelation(e)
......@@ -63,7 +61,7 @@ function cm.operation(e,tp,eg,ep,ev,re,r,rp)
local te=e:GetLabelObject()
if not te then return end
local tc=te:GetHandler()
if not (tc:IsRelateToEffect(e) and tc:GetType()==TYPE_TRAP) then return end
if not tc:IsRelateToEffect(e) then return end
e:SetLabelObject(te:GetLabelObject())
local op=te:GetOperation()
if op then op(e,tp,eg,ep,ev,re,r,rp) 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