Commit 069aab78 authored by 聖園ミカ's avatar 聖園ミカ 🐟

Replace c23410015.lua

parent 485e8cb6
......@@ -5,7 +5,7 @@ function cm.initial_effect(c)
--tohand
local e2=Effect.CreateEffect(c)
e2:SetDescription(aux.Stringid(m,0))
e2:SetCategory(CATEGORY_TOHAND+CATEGORY_SEARCH)
e2:SetCategory(CATEGORY_SPECIAL_SUMMON)
e2:SetType(EFFECT_TYPE_IGNITION)
e2:SetRange(LOCATION_HAND)
e2:SetProperty(EFFECT_FLAG_PLAYER_TARGET)
......@@ -41,19 +41,18 @@ 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)
return c:IsCode(23410013) and c:IsAbleToHand()
function cm.thfilter(c,e,tp)
return c:IsCode(23410013) and c:IsCanBeSpecialSummoned(e,0,tp,false,false)
end
function cm.thtg(e,tp,eg,ep,ev,re,r,rp,chk)
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)
if chk==0 then return Duel.IsExistingMatchingCard(cm.thfilter,tp,LOCATION_DECK,0,1,nil,e,tp) and Duel.GetLocationCount(tp,LOCATION_MZONE)>0 end
Duel.SetOperationInfo(0,CATEGORY_SPECIAL_SUMMON,nil,1,tp,LOCATION_DECK)
end
function cm.thop(e,tp,eg,ep,ev,re,r,rp)
Duel.Hint(HINT_SELECTMSG,tp,HINTMSG_ATOHAND)
local g=Duel.SelectMatchingCard(tp,cm.thfilter,tp,LOCATION_DECK,0,1,1,nil)
Duel.Hint(HINT_SELECTMSG,tp,HINTMSG_SPSUMMON)
local g=Duel.SelectMatchingCard(tp,cm.thfilter,tp,LOCATION_DECK,0,1,1,nil,e,tp)
if g:GetCount()>0 then
Duel.SendtoHand(g,nil,REASON_EFFECT)
Duel.ConfirmCards(1-tp,g)
Duel.SpecialSummon(g,0,tp,tp,false,false,POS_FACEUP)
end
end
function cm.rmfil(c)
......@@ -71,17 +70,18 @@ function cm.rmtg(e,tp,eg,ep,ev,re,r,rp,chk)
if chk==0 then return Duel.GetFieldGroupCount(tp,LOCATION_DECK,0)>0 and Duel.GetFieldGroupCount(tp,0,LOCATION_DECK)>num-1 end
Duel.SetOperationInfo(0,CATEGORY_REMOVE,nil,1,PLAYER_ALL,LOCATION_DECK)
end
function cm.rmcheck(c,tp)
return c:IsAbleToRemove(tp,POS_FACEDOWN,REASON_EFFECT)
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.thfilter,nil)
local rg1=g1:Filter(cm.rmcheck,nil,tp)
local g2=Duel.GetFieldGroup(tp,0,LOCATION_DECK)
local rg2=g2:Filter(cm.thfilter,nil)
local rg2=g2:Filter(cm.rmcheck,nil,tp)
if Duel.IsPlayerAffectedByEffect(tp,23410013) then
Duel.Hint(HINT_CARD,0,23410017)
rg2=g2:Filter(cm.thfilter2,nil)
rg2=g2:Filter(cm.rmcheck,nil,tp)
end
rg1:Merge(rg2)
if #rg1==2 then Duel.Remove(rg1,POS_FACEDOWN,REASON_EFFECT) 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