Commit 5fb3b92e authored by TanakaKotoha's avatar TanakaKotoha

lonely

parent d5443163
......@@ -27,12 +27,13 @@ end
function c33400474.filter(c,e,tp,nm)
return c:IsSetCard(0x341) and c:IsType(TYPE_XYZ) and c:IsRank(nm)
and c:IsCanBeSpecialSummoned(e,SUMMON_TYPE_XYZ,tp,false,false)
and Duel.GetLocationCountFromEx(tp,tp,nil,c)>0
end
function c33400474.sptg(e,tp,eg,ep,ev,re,r,rp,chk)
if chk==0 then
if e:GetLabel()~=1 then return false end
e:SetLabel(0)
return e:IsHasType(EFFECT_TYPE_ACTIVATE) and Duel.GetLocationCountFromEx(tp,tp,nil,c)>0
return e:IsHasType(EFFECT_TYPE_ACTIVATE)
and Duel.IsExistingMatchingCard(c33400474.cfilter,tp,LOCATION_GRAVE,0,1,nil,e,tp)
end
local g=Duel.SelectMatchingCard(tp,c33400474.cfilter,tp,LOCATION_GRAVE,0,1,1,nil,e,tp)
......@@ -43,7 +44,7 @@ function c33400474.sptg(e,tp,eg,ep,ev,re,r,rp,chk)
Duel.SetOperationInfo(0,CATEGORY_SPECIAL_SUMMON,nil,1,tp,LOCATION_EXTRA)
end
function c33400474.operation(e,tp,eg,ep,ev,re,r,rp)
if Duel.GetLocationCountFromEx(tp,tp,nil,c)<=0 then return end
if Duel.GetLocationCount(tp,LOCATION_MZONE)<=0 then return end
local c=e:GetHandler()
local tc=Duel.GetFirstTarget()
local nm
......
......@@ -28,7 +28,7 @@ function c47530045.initial_effect(c)
e2:SetType(EFFECT_TYPE_FIELD)
e2:SetCode(EFFECT_SPSUMMON_PROC)
e2:SetProperty(EFFECT_FLAG_UNCOPYABLE+EFFECT_FLAG_SPSUM_PARAM)
e2:SetRange(LOCATION_GRAVE+LOCATION_HAND)
e2:SetRange(LOCATION_EXTRA+LOCATION_HAND)
e2:SetTargetRange(POS_FACEUP_DEFENSE,0)
e2:SetCountLimit(1,47530049)
e2:SetCondition(c47530045.spcon)
......
......@@ -28,7 +28,6 @@ end
function c75646612.cfilter(c,tp)
if c:IsLocation(LOCATION_GRAVE) then return c:IsHasEffect(75646628,tp) and c:IsAbleToRemoveAsCost() end
return aux.IsCodeListed(c,75646600) and c:IsAbleToGraveAsCost()
and (c:IsLocation(LOCATION_HAND) or c:IsFaceup())
end
function c75646612.spcost(e,tp,eg,ep,ev,re,r,rp,chk)
local loc=LOCATION_ONFIELD+LOCATION_HAND+LOCATION_GRAVE
......@@ -54,10 +53,9 @@ end
function c75646612.spop(e,tp,eg,ep,ev,re,r,rp)
local c=e:GetHandler()
if not c:IsRelateToEffect(e) then return end
local sg=Duel.GetMatchingGroup(Card.IsAbleToDeck,tp,0,LOCATION_ONFIELD,nil)
if Duel.SpecialSummon(c,0,tp,tp,false,false,POS_FACEUP)>0 and (e:GetLabel()==1 or Duel.GetFlagEffect(tp,75646600)~=0) and sg:GetCount()>0 and Duel.SelectYesNo(tp,aux.Stringid(75646612,2)) then
if Duel.SpecialSummon(c,0,tp,tp,false,false,POS_FACEUP)>0 and (e:GetLabel()==1 or Duel.GetFlagEffect(tp,75646600)>0) and Duel.IsExistingMatchingCard(Card.IsAbleToDeck,tp,0,LOCATION_ONFIELD,1,nil) and Duel.SelectYesNo(tp,aux.Stringid(75646612,2)) then
Duel.Hint(HINT_SELECTMSG,tp,HINTMSG_TODECK)
local tg=sg:Select(tp,1,1,nil)
local tg=Duel.SelectMatchingCard(tp,Card.IsAbleToDeck,tp,0,LOCATION_ONFIELD,1,1,nil)
Duel.BreakEffect()
Duel.SendtoDeck(tg,nil,2,REASON_EFFECT)
end
......
......@@ -30,7 +30,7 @@ function c75646626.initial_effect(c)
local e3=Effect.CreateEffect(c)
e3:SetType(EFFECT_TYPE_FIELD)
e3:SetCode(EFFECT_UPDATE_ATTACK)
e3:SetRange(LOCATION_SZONE)
e3:SetRange(LOCATION_MZONE)
e3:SetTargetRange(LOCATION_MZONE,0)
e3:SetValue(c75646626.val)
c:RegisterEffect(e3)
......
......@@ -33,11 +33,11 @@ function cm.initial_effect(c)
c:RegisterEffect(e3)
end
function cm.cfilter(c)
return c:IsCode(37564765) and c:IsAbleToDeckAsCost()
return c:IsCode(37564765) and c:IsAbleToDeckOrExtraAsCost()
end
function cm.atkcost(e,tp,eg,ep,ev,re,r,rp,chk)
if chk==0 then return Duel.IsExistingMatchingCard(cm.cfilter,tp,LOCATION_HAND+LOCATION_GRAVE,0,1,nil) end
Duel.Hint(HINT_SELECTMSG,tp,HINTMSG_TOGRAVE)
Duel.Hint(HINT_SELECTMSG,tp,HINTMSG_TODECK)
local g=Duel.SelectMatchingCard(tp,cm.cfilter,tp,LOCATION_HAND+LOCATION_GRAVE,0,1,1,nil)
local cf=g:Filter(Card.IsFacedown,nil)
if cf:GetCount()>0 then
......
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