Commit 279f863f authored by DailyShana's avatar DailyShana

fix

parent d9df1147
--異次元ジェット・アイアン号 --異次元ジェット・アイアン号
function c15574615.initial_effect(c) function c15574615.initial_effect(c)
c:EnableReviveLimit() c:EnableReviveLimit()
--special summon --special summon rule
local e1=Effect.CreateEffect(c) local e1=Effect.CreateEffect(c)
e1:SetType(EFFECT_TYPE_FIELD) e1:SetType(EFFECT_TYPE_FIELD)
e1:SetCode(EFFECT_SPSUMMON_PROC) e1:SetCode(EFFECT_SPSUMMON_PROC)
...@@ -10,7 +10,7 @@ function c15574615.initial_effect(c) ...@@ -10,7 +10,7 @@ function c15574615.initial_effect(c)
e1:SetCondition(c15574615.spcon) e1:SetCondition(c15574615.spcon)
e1:SetOperation(c15574615.spop) e1:SetOperation(c15574615.spop)
c:RegisterEffect(e1) c:RegisterEffect(e1)
--atk --spsummon
local e2=Effect.CreateEffect(c) local e2=Effect.CreateEffect(c)
e2:SetDescription(aux.Stringid(15574615,0)) e2:SetDescription(aux.Stringid(15574615,0))
e2:SetCategory(CATEGORY_SPECIAL_SUMMON) e2:SetCategory(CATEGORY_SPECIAL_SUMMON)
...@@ -22,119 +22,60 @@ function c15574615.initial_effect(c) ...@@ -22,119 +22,60 @@ function c15574615.initial_effect(c)
e2:SetOperation(c15574615.operation) e2:SetOperation(c15574615.operation)
c:RegisterEffect(e2) c:RegisterEffect(e2)
end end
function c15574615.spfilter1(c,code,tp) function c15574615.sprfilter(c)
return c:IsFaceup() and c:IsCode(code) and c:IsControler(tp) and c:IsAbleToGraveAsCost() return (c:IsLocation(LOCATION_HAND) or c:IsFaceup()) and c:IsAbleToGraveAsCost()
end and (c:IsCode(80208158) or c:IsCode(16796157) or c:IsCode(43791861) or c:IsCode(79185500))
function c15574615.spfilter2(c,code)
return (c:IsLocation(LOCATION_HAND) or c:IsFaceup()) and c:IsCode(code) and c:IsAbleToGraveAsCost()
end
function c15574615.spfilter3(c,tp)
return (c:IsCode(80208158) or c:IsCode(16796157) or c:IsCode(43791861) or c:IsCode(79185500)) and c:IsControler(tp)
end end
function c15574615.spcon(e,c) function c15574615.spcon(e,c)
if c==nil then return true end if c==nil then return true end
local tp=c:GetControler() local tp=c:GetControler()
local ct=0 local ft=Duel.GetLocationCount(tp,LOCATION_MZONE)
if Duel.IsExistingMatchingCard(c15574615.spfilter1,tp,LOCATION_MZONE,0,1,nil,80208158,tp) then ct=ct-1 end local ct=-ft+1
if Duel.IsExistingMatchingCard(c15574615.spfilter1,tp,LOCATION_MZONE,0,1,nil,16796157,tp) then ct=ct-1 end local mg=Duel.GetMatchingGroup(c15574615.sprfilter,tp,LOCATION_HAND+LOCATION_ONFIELD,0,nil)
if Duel.IsExistingMatchingCard(c15574615.spfilter1,tp,LOCATION_MZONE,0,1,nil,43791861,tp) then ct=ct-1 end return mg:GetClassCount(Card.GetCode)==4
if Duel.IsExistingMatchingCard(c15574615.spfilter1,tp,LOCATION_MZONE,0,1,nil,79185500,tp) then ct=ct-1 end and mg:Filter(Card.IsLocation,nil,LOCATION_MZONE):GetClassCount(Card.GetCode)>=ct
return Duel.GetLocationCount(tp,LOCATION_MZONE)>ct
and Duel.IsExistingMatchingCard(c15574615.spfilter2,tp,LOCATION_HAND+LOCATION_ONFIELD,0,1,nil,80208158)
and Duel.IsExistingMatchingCard(c15574615.spfilter2,tp,LOCATION_HAND+LOCATION_ONFIELD,0,1,nil,16796157)
and Duel.IsExistingMatchingCard(c15574615.spfilter2,tp,LOCATION_HAND+LOCATION_ONFIELD,0,1,nil,43791861)
and Duel.IsExistingMatchingCard(c15574615.spfilter2,tp,LOCATION_HAND+LOCATION_ONFIELD,0,1,nil,79185500)
end end
function c15574615.spop(e,tp,eg,ep,ev,re,r,rp,c) function c15574615.spop(e,tp,eg,ep,ev,re,r,rp,c)
local ft=Duel.GetLocationCount(tp,LOCATION_MZONE) local ft=Duel.GetLocationCount(tp,LOCATION_MZONE)
local g1=nil local ct=-ft+1
local g2=nil local mg=Duel.GetMatchingGroup(c15574615.sprfilter,tp,LOCATION_HAND+LOCATION_ONFIELD,0,nil)
local g3=nil local g=Group.CreateGroup()
local g4=nil for i=1,4 do
if ft>0 then local tc=nil
Duel.Hint(HINT_SELECTMSG,tp,HINTMSG_TOGRAVE)
g1=Duel.SelectMatchingCard(tp,c15574615.spfilter2,tp,LOCATION_HAND+LOCATION_ONFIELD,0,1,1,nil,80208158)
Duel.Hint(HINT_SELECTMSG,tp,HINTMSG_TOGRAVE)
g2=Duel.SelectMatchingCard(tp,c15574615.spfilter2,tp,LOCATION_HAND+LOCATION_ONFIELD,0,1,1,nil,16796157)
Duel.Hint(HINT_SELECTMSG,tp,HINTMSG_TOGRAVE)
g3=Duel.SelectMatchingCard(tp,c15574615.spfilter2,tp,LOCATION_HAND+LOCATION_ONFIELD,0,1,1,nil,43791861)
Duel.Hint(HINT_SELECTMSG,tp,HINTMSG_TOGRAVE) Duel.Hint(HINT_SELECTMSG,tp,HINTMSG_TOGRAVE)
g4=Duel.SelectMatchingCard(tp,c15574615.spfilter2,tp,LOCATION_HAND+LOCATION_ONFIELD,0,1,1,nil,79185500) if ct>0 then
g1:Merge(g2) tc=mg:FilterSelect(tp,Card.IsLocation,1,1,nil,LOCATION_MZONE):GetFirst()
g1:Merge(g3) ct=ct-1
g1:Merge(g4)
elseif ft==0 then
Duel.Hint(HINT_SELECTMSG,tp,HINTMSG_TOGRAVE)
g1=Duel.SelectReleaseGroup(tp,c15574615.spfilter3,1,1,nil,tp)
if g1:GetFirst():IsCode(80208158) then
Duel.Hint(HINT_SELECTMSG,tp,HINTMSG_TOGRAVE)
g2=Duel.SelectMatchingCard(tp,c15574615.spfilter2,tp,LOCATION_HAND+LOCATION_ONFIELD,0,1,1,nil,16796157)
Duel.Hint(HINT_SELECTMSG,tp,HINTMSG_TOGRAVE)
g3=Duel.SelectMatchingCard(tp,c15574615.spfilter2,tp,LOCATION_HAND+LOCATION_ONFIELD,0,1,1,nil,43791861)
Duel.Hint(HINT_SELECTMSG,tp,HINTMSG_TOGRAVE)
g4=Duel.SelectMatchingCard(tp,c15574615.spfilter2,tp,LOCATION_HAND+LOCATION_ONFIELD,0,1,1,nil,79185500)
elseif g1:GetFirst():IsCode(16796157) then
Duel.Hint(HINT_SELECTMSG,tp,HINTMSG_TOGRAVE)
g2=Duel.SelectMatchingCard(tp,c15574615.spfilter2,tp,LOCATION_HAND+LOCATION_ONFIELD,0,1,1,nil,80208158)
Duel.Hint(HINT_SELECTMSG,tp,HINTMSG_TOGRAVE)
g3=Duel.SelectMatchingCard(tp,c15574615.spfilter2,tp,LOCATION_HAND+LOCATION_ONFIELD,0,1,1,nil,43791861)
Duel.Hint(HINT_SELECTMSG,tp,HINTMSG_TOGRAVE)
g4=Duel.SelectMatchingCard(tp,c15574615.spfilter2,tp,LOCATION_HAND+LOCATION_ONFIELD,0,1,1,nil,79185500)
elseif g1:GetFirst():IsCode(43791861) then
Duel.Hint(HINT_SELECTMSG,tp,HINTMSG_TOGRAVE)
g2=Duel.SelectMatchingCard(tp,c15574615.spfilter2,tp,LOCATION_HAND+LOCATION_ONFIELD,0,1,1,nil,80208158)
Duel.Hint(HINT_SELECTMSG,tp,HINTMSG_TOGRAVE)
g3=Duel.SelectMatchingCard(tp,c15574615.spfilter2,tp,LOCATION_HAND+LOCATION_ONFIELD,0,1,1,nil,16796157)
Duel.Hint(HINT_SELECTMSG,tp,HINTMSG_TOGRAVE)
g4=Duel.SelectMatchingCard(tp,c15574615.spfilter2,tp,LOCATION_HAND+LOCATION_ONFIELD,0,1,1,nil,79185500)
else else
Duel.Hint(HINT_SELECTMSG,tp,HINTMSG_TOGRAVE) tc=mg:Select(tp,1,1,nil):GetFirst()
g2=Duel.SelectMatchingCard(tp,c15574615.spfilter2,tp,LOCATION_HAND+LOCATION_ONFIELD,0,1,1,nil,80208158)
Duel.Hint(HINT_SELECTMSG,tp,HINTMSG_TOGRAVE)
g3=Duel.SelectMatchingCard(tp,c15574615.spfilter2,tp,LOCATION_HAND+LOCATION_ONFIELD,0,1,1,nil,16796157)
Duel.Hint(HINT_SELECTMSG,tp,HINTMSG_TOGRAVE)
g4=Duel.SelectMatchingCard(tp,c15574615.spfilter2,tp,LOCATION_HAND+LOCATION_ONFIELD,0,1,1,nil,43791861)
end end
g1:Merge(g2) mg:Remove(Card.IsCode,nil,tc:GetCode())
g1:Merge(g3) g:AddCard(tc)
g1:Merge(g4)
else
Duel.Hint(HINT_SELECTMSG,tp,HINTMSG_TOGRAVE)
g1=Duel.SelectMatchingCard(tp,c15574615.spfilter1,tp,LOCATION_ONFIELD,0,1,1,nil,80208158,tp)
Duel.Hint(HINT_SELECTMSG,tp,HINTMSG_TOGRAVE)
g2=Duel.SelectMatchingCard(tp,c15574615.spfilter1,tp,LOCATION_ONFIELD,0,1,1,nil,16796157,tp)
Duel.Hint(HINT_SELECTMSG,tp,HINTMSG_TOGRAVE)
g3=Duel.SelectMatchingCard(tp,c15574615.spfilter1,tp,LOCATION_ONFIELD,0,1,1,nil,43791861,tp)
Duel.Hint(HINT_SELECTMSG,tp,HINTMSG_TOGRAVE)
g4=Duel.SelectMatchingCard(tp,c15574615.spfilter1,tp,LOCATION_ONFIELD,0,1,1,nil,79185500,tp)
g1:Merge(g2)
g1:Merge(g3)
g1:Merge(g4)
end end
Duel.SendtoGrave(g1,REASON_COST) Duel.SendtoGrave(g,REASON_COST)
end end
function c15574615.cost(e,tp,eg,ep,ev,re,r,rp,chk) function c15574615.cost(e,tp,eg,ep,ev,re,r,rp,chk)
if chk==0 then return e:GetHandler():IsReleasable() end if chk==0 then return e:GetHandler():IsReleasable() end
Duel.Release(e:GetHandler(),REASON_COST) Duel.Release(e:GetHandler(),REASON_COST)
end end
function c15574615.spfilter4(c,e,tp,code) function c15574615.spfilter(c,e,tp,code)
return c:IsCode(code) and c:IsCanBeSpecialSummoned(e,0,tp,false,false) return c:IsCode(code) and c:IsCanBeSpecialSummoned(e,0,tp,false,false)
end end
function c15574615.target(e,tp,eg,ep,ev,re,r,rp,chk,chkc) function c15574615.target(e,tp,eg,ep,ev,re,r,rp,chk,chkc)
if chkc then return false end if chkc then return false end
if chk==0 then return Duel.GetLocationCount(tp,LOCATION_MZONE)>=3 if chk==0 then return Duel.GetLocationCount(tp,LOCATION_MZONE)>=3
and Duel.IsExistingTarget(c15574615.spfilter4,tp,LOCATION_GRAVE,0,1,nil,e,tp,80208158) and Duel.IsExistingTarget(c15574615.spfilter,tp,LOCATION_GRAVE,0,1,nil,e,tp,80208158)
and Duel.IsExistingTarget(c15574615.spfilter4,tp,LOCATION_GRAVE,0,1,nil,e,tp,16796157) and Duel.IsExistingTarget(c15574615.spfilter,tp,LOCATION_GRAVE,0,1,nil,e,tp,16796157)
and Duel.IsExistingTarget(c15574615.spfilter4,tp,LOCATION_GRAVE,0,1,nil,e,tp,43791861) and Duel.IsExistingTarget(c15574615.spfilter,tp,LOCATION_GRAVE,0,1,nil,e,tp,43791861)
and Duel.IsExistingTarget(c15574615.spfilter4,tp,LOCATION_GRAVE,0,1,nil,e,tp,79185500) end and Duel.IsExistingTarget(c15574615.spfilter,tp,LOCATION_GRAVE,0,1,nil,e,tp,79185500) end
Duel.Hint(HINT_SELECTMSG,tp,HINTMSG_SPSUMMON) Duel.Hint(HINT_SELECTMSG,tp,HINTMSG_SPSUMMON)
local g1=Duel.SelectTarget(tp,c15574615.spfilter4,tp,LOCATION_GRAVE,0,1,1,nil,e,tp,80208158) local g1=Duel.SelectTarget(tp,c15574615.spfilter,tp,LOCATION_GRAVE,0,1,1,nil,e,tp,80208158)
Duel.Hint(HINT_SELECTMSG,tp,HINTMSG_SPSUMMON) Duel.Hint(HINT_SELECTMSG,tp,HINTMSG_SPSUMMON)
local g2=Duel.SelectTarget(tp,c15574615.spfilter4,tp,LOCATION_GRAVE,0,1,1,nil,e,tp,16796157) local g2=Duel.SelectTarget(tp,c15574615.spfilter,tp,LOCATION_GRAVE,0,1,1,nil,e,tp,16796157)
Duel.Hint(HINT_SELECTMSG,tp,HINTMSG_SPSUMMON) Duel.Hint(HINT_SELECTMSG,tp,HINTMSG_SPSUMMON)
local g3=Duel.SelectTarget(tp,c15574615.spfilter4,tp,LOCATION_GRAVE,0,1,1,nil,e,tp,43791861) local g3=Duel.SelectTarget(tp,c15574615.spfilter,tp,LOCATION_GRAVE,0,1,1,nil,e,tp,43791861)
Duel.Hint(HINT_SELECTMSG,tp,HINTMSG_SPSUMMON) Duel.Hint(HINT_SELECTMSG,tp,HINTMSG_SPSUMMON)
local g4=Duel.SelectTarget(tp,c15574615.spfilter4,tp,LOCATION_GRAVE,0,1,1,nil,e,tp,79185500) local g4=Duel.SelectTarget(tp,c15574615.spfilter,tp,LOCATION_GRAVE,0,1,1,nil,e,tp,79185500)
g1:Merge(g2) g1:Merge(g2)
g1:Merge(g3) g1:Merge(g3)
g1:Merge(g4) g1:Merge(g4)
......
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