Commit cadea056 authored by mercury233's avatar mercury233

fix

parent d968b1e4
......@@ -58,6 +58,7 @@ function c100426007.operation(e,tp,eg,ep,ev,re,r,rp)
local s=e:GetLabel()
local tc=Duel.GetFirstTarget()
if s==0 then
if not tc:IsRelateToEffect(e) or tc:IsFacedown() then return end
local sg=Duel.GetMatchingGroup(c100426007.disfilter,tp,0,LOCATION_MZONE,nil,tc:GetAttack())
if sg:GetCount()>0 then
Duel.Hint(HINT_SELECTMSG,tp,HINTMSG_DISABLE)
......@@ -85,11 +86,12 @@ function c100426007.operation(e,tp,eg,ep,ev,re,r,rp)
local og=tc:GetOverlayGroup()
if og:GetCount()>0 and Duel.SendtoGrave(og,REASON_EFFECT)>0
and Duel.GetLocationCount(tp,LOCATION_MZONE)>0
and Duel.IsExistingMatchingCard(c100426007.spfilter,tp,LOCATION_GRAVE,0,1,nil,e,tp)
and Duel.IsExistingMatchingCard(aux.NecroValleyFilter(c100426007.spfilter),tp,LOCATION_GRAVE,0,1,nil,e,tp)
and Duel.SelectYesNo(tp,aux.Stringid(100426007,2)) then
Duel.Hint(HINT_SELECTMSG,tp,HINTMSG_SPSUMMON)
local ng=Duel.SelectMatchingCard(tp,c100426007.spfilter,tp,LOCATION_GRAVE,0,1,1,nil,e,tp)
local ng=Duel.SelectMatchingCard(tp,aux.NecroValleyFilter(c100426007.spfilter),tp,LOCATION_GRAVE,0,1,1,nil,e,tp)
if ng:GetCount()>0 then
Duel.BreakEffect()
Duel.SpecialSummon(ng,0,tp,tp,false,false,POS_FACEUP)
end
end
......
--アトランティスの戦士
function c43797906.initial_effect(c)
aux.AddCodeList(c,22702055)
--search
local e1=Effect.CreateEffect(c)
e1:SetDescription(aux.Stringid(43797906,0))
e1:SetCategory(CATEGORY_TOHAND+CATEGORY_SEARCH)
e1:SetType(EFFECT_TYPE_IGNITION)
e1:SetRange(LOCATION_HAND)
e1:SetCost(c43797906.cost)
e1:SetTarget(c43797906.target)
e1:SetOperation(c43797906.operation)
c:RegisterEffect(e1)
end
function c43797906.cost(e,tp,eg,ep,ev,re,r,rp,chk)
local c=e:GetHandler()
if chk==0 then return c:IsAbleToGraveAsCost() and c:IsDiscardable() end
Duel.SendtoGrave(c,REASON_COST+REASON_DISCARD)
end
function c43797906.filter(c)
return c:GetOriginalCode()==295517 and c:IsAbleToHand()
end
function c43797906.target(e,tp,eg,ep,ev,re,r,rp,chk,chkc)
if chk==0 then return Duel.IsExistingMatchingCard(c43797906.filter,tp,LOCATION_DECK,0,1,nil) end
Duel.SetOperationInfo(0,CATEGORY_TOHAND,nil,1,tp,LOCATION_DECK)
end
function c43797906.operation(e,tp,eg,ep,ev,re,r,rp,chk)
local tg=Duel.GetFirstMatchingCard(c43797906.filter,tp,LOCATION_DECK,0,nil)
if tg then
Duel.SendtoHand(tg,nil,REASON_EFFECT)
Duel.ConfirmCards(1-tp,tg)
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