Commit d11f1cd5 authored by 聖園ミカ's avatar 聖園ミカ 🐟

7

parent a5ef8f64
......@@ -26,10 +26,10 @@ function cm.initial_effect(c)
--negate
local e2=Effect.CreateEffect(c)
e2:SetDescription(aux.Stringid(m,3))
e2:SetCategory(CATEGORY_TOHAND+CATEGORY_SEARCH)
e2:SetType(EFFECT_TYPE_FIELD+EFFECT_TYPE_TRIGGER_O)
e2:SetCategory(CATEGORY_TOHAND)
e2:SetType(EFFECT_TYPE_QUICK_O)
e2:SetCode(EVENT_REMOVE)
e2:SetProperty(EFFECT_FLAG_DAMAGE_STEP+EFFECT_FLAG_DAMAGE_CAL+EFFECT_FLAG_DELAY)
e2:SetProperty(EFFECT_FLAG_DAMAGE_STEP+EFFECT_FLAG_DAMAGE_CAL)
e2:SetRange(LOCATION_MZONE)
e2:SetCountLimit(1,m)
e2:SetCondition(cm.effcon)
......@@ -41,20 +41,19 @@ function cm.thcost(e,tp,eg,ep,ev,re,r,rp,chk)
if chk==0 then return e:GetHandler():IsDiscardable() end
Duel.SendtoGrave(e:GetHandler(),REASON_COST+REASON_DISCARD)
end
function cm.thfilter(c,e,tp)
return c:IsCode(23410013) and c:IsCanBeSpecialSummoned(e,0,tp,false,false)
function cm.thfilter(c)
return c:IsCode(23410013) and c:IsAbleToHand()
end
function cm.thtg(e,tp,eg,ep,ev,re,r,rp,chk)
if chk==0 then return Duel.GetLocationCount(tp,LOCATION_MZONE)>0
and Duel.IsExistingMatchingCard(cm.thfilter,tp,LOCATION_DECK,0,1,nil,e,tp) end
Duel.SetOperationInfo(0,CATEGORY_SPECIAL_SUMMON,nil,1,tp,LOCATION_DECK)
if chk==0 then return Duel.IsExistingMatchingCard(cm.thfilter,tp,LOCATION_DECK,0,1,nil) end
Duel.SetOperationInfo(0,CATEGORY_TOHAND,nil,1,tp,LOCATION_DECK)
end
function cm.thop(e,tp,eg,ep,ev,re,r,rp)
if Duel.GetLocationCount(tp,LOCATION_MZONE)<=0 then return end
Duel.Hint(HINT_SELECTMSG,tp,HINTMSG_SPSUMMON)
local g=Duel.SelectMatchingCard(tp,cm.thfilter,tp,LOCATION_DECK,0,1,1,nil,e,tp)
Duel.Hint(HINT_SELECTMSG,tp,HINTMSG_ATOHAND)
local g=Duel.SelectMatchingCard(tp,cm.thfilter,tp,LOCATION_DECK,0,1,1,nil)
if g:GetCount()>0 then
Duel.SpecialSummon(g,0,tp,tp,false,false,POS_FACEUP)
Duel.SendtoHand(g,nil,REASON_EFFECT)
Duel.ConfirmCards(1-tp,g)
end
end
function cm.rmfil(c)
......@@ -75,16 +74,16 @@ end
function cm.rmop(e,tp,eg,ep,ev,re,r,rp)
local g1=Duel.GetFieldGroup(tp,LOCATION_DECK,0)
local rg1=g1:Filter(cm.rmfil,nil)
local rg1=g1:Filter(cm.thfilter,nil)
local g2=Duel.GetFieldGroup(tp,0,LOCATION_DECK)
local rg2=g2:Filter(cm.rmfil,nil)
local rg2=g2:Filter(cm.thfilter,nil)
if Duel.IsPlayerAffectedByEffect(tp,23410013) then
Duel.Hint(HINT_CARD,0,23410017)
rg2=g2:Filter(cm.rmfil2,nil)
rg2=g2:Filter(cm.thfilter2,nil)
end
rg1:Merge(rg2)
Duel.Remove(rg1,POS_FACEDOWN,REASON_EFFECT)
if #rg1==2 then Duel.Remove(rg1,POS_FACEDOWN,REASON_EFFECT) end
end
function cm.cfilter(c,tp)
......
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