Commit ceb14675 authored by wind2009's avatar wind2009

Fix

parent fa94dafb
Pipeline #41815 passed with stages
in 1 minute and 41 seconds
No preview for this file type
......@@ -3,7 +3,12 @@
101304202
101304203
101304204
101304006
101304007
101304205
101304206
101304043
101304044
101304207
101304054
101304208
\ No newline at end of file
--
--重装騎士バベルデッカー
local s,id,o=GetID()
function s.initial_effect(c)
--summon with no tribute
......@@ -44,6 +44,7 @@ end
function s.sptg(e,tp,eg,ep,ev,re,r,rp,chk)
if chk==0 then return Duel.GetLocationCount(tp,LOCATION_MZONE)>0
and Duel.IsExistingMatchingCard(s.spfilter1,tp,LOCATION_HAND,0,1,nil,e,tp) end
Duel.Hint(HINT_OPSELECTED,1-tp,e:GetDescription())
Duel.SetOperationInfo(0,CATEGORY_SPECIAL_SUMMON,nil,1,tp,LOCATION_HAND)
end
function s.spop(e,tp,eg,ep,ev,re,r,rp)
......@@ -67,12 +68,13 @@ function s.sptg2(e,tp,eg,ep,ev,re,r,rp,chk)
local c=e:GetHandler()
if chk==0 then return aux.MustMaterialCheck(c,tp,EFFECT_MUST_BE_XMATERIAL)
and Duel.IsExistingMatchingCard(s.spfilter2,tp,LOCATION_EXTRA,0,1,nil,e,tp,c) end
Duel.Hint(HINT_OPSELECTED,1-tp,e:GetDescription())
Duel.SetOperationInfo(0,CATEGORY_SPECIAL_SUMMON,nil,1,tp,LOCATION_EXTRA)
end
function s.spop2(e,tp,eg,ep,ev,re,r,rp)
local c=e:GetHandler()
if not aux.MustMaterialCheck(c,tp,EFFECT_MUST_BE_XMATERIAL) then return end
if c:IsFaceup() and c:IsRelateToEffect(e) and c:IsControler(tp) and not c:IsImmuneToEffect(e) then
if c:IsType(TYPE_MONSTER) and c:IsFaceup() and c:IsRelateToChain() and c:IsControler(tp) and not c:IsImmuneToEffect(e) then
Duel.Hint(HINT_SELECTMSG,tp,HINTMSG_SPSUMMON)
local g=Duel.SelectMatchingCard(tp,s.spfilter2,tp,LOCATION_EXTRA,0,1,1,nil,e,tp,c)
local sc=g:GetFirst()
......@@ -87,4 +89,4 @@ function s.spop2(e,tp,eg,ep,ev,re,r,rp)
sc:CompleteProcedure()
end
end
end
\ No newline at end of file
end
--
--夜光列車ブルートラベラー
local s,id,o=GetID()
function s.initial_effect(c)
aux.AddCodeList(c,60879050,76136345)
......@@ -82,4 +82,4 @@ function s.spop(e,tp,eg,ep,ev,re,r,rp)
end
function s.splimit(e,c)
return not c:IsRace(RACE_MACHINE) and c:IsLocation(LOCATION_EXTRA)
end
\ No newline at end of file
end
--
--超弩級砲塔列車グスタフ・ロケット
local s,id,o=GetID()
function s.initial_effect(c)
aux.AddCodeList(c,56910167)
......@@ -28,7 +28,7 @@ function s.initial_effect(c)
c:RegisterEffect(e2)
end
function s.cfilter(c)
return c:IsDiscardable()
return c:IsDiscardable(REASON_SPSUMMON)
end
function s.ovfilter(c)
return c:IsFaceup() and c:IsCode(56910167)
......@@ -40,7 +40,7 @@ function s.xyzop(e,tp,chk)
end
function s.discon(e,tp,eg,ep,ev,re,r,rp)
local c=e:GetHandler()
return not c:IsStatus(STATUS_BATTLE_DESTROYED) and Duel.IsChainDisablable(ev)
return not c:IsStatus(STATUS_BATTLE_DESTROYED) and Duel.IsChainDisablable(ev)
and c:GetOverlayCount()>0 and ep==1-tp and re:IsActiveType(TYPE_MONSTER)
end
function s.distg(e,tp,eg,ep,ev,re,r,rp,chk)
......@@ -52,7 +52,7 @@ function s.distg(e,tp,eg,ep,ev,re,r,rp,chk)
end
end
function s.disop(e,tp,eg,ep,ev,re,r,rp)
if Duel.NegateEffect(ev) and re:GetHandler():IsRelateToEffect(re)
if Duel.NegateEffect(ev) and re:GetHandler():IsRelateToChain(ev)
and Duel.Destroy(eg,REASON_EFFECT)~=0 then
Duel.BreakEffect()
Duel.Damage(1-tp,1000,REASON_EFFECT)
......@@ -68,4 +68,4 @@ function s.rmop(e,tp,eg,ep,ev,re,r,rp)
else
Duel.Destroy(c,REASON_EFFECT)
end
end
\ No newline at end of file
end
--
--超弩級砲塔列車フライング・ランチャー
local s,id,o=GetID()
function s.initial_effect(c)
aux.AddCodeList(c,51369889)
......@@ -65,7 +65,7 @@ function s.descost(e,tp,eg,ep,ev,re,r,rp,chk)
e:SetLabel(ct)
end
function s.destg(e,tp,eg,ep,ev,re,r,rp,chk,chkc)
if chkc then return chkc:IsOnField() end
if chkc then return chkc:IsOnField() and chkc:IsType(TYPE_SPELL+TYPE_TRAP) end
if chk==0 then return Duel.IsExistingTarget(Card.IsType,tp,LOCATION_ONFIELD,LOCATION_ONFIELD,1,nil,TYPE_SPELL+TYPE_TRAP) end
local ct=e:GetLabel()
Duel.Hint(HINT_SELECTMSG,tp,HINTMSG_DESTROY)
......@@ -73,8 +73,8 @@ function s.destg(e,tp,eg,ep,ev,re,r,rp,chk,chkc)
Duel.SetOperationInfo(0,CATEGORY_DESTROY,tg,ct,0,0)
end
function s.desop(e,tp,eg,ep,ev,re,r,rp)
local g=Duel.GetChainInfo(0,CHAININFO_TARGET_CARDS):Filter(Card.IsRelateToChain,nil)
local g=Duel.GetChainInfo(0,CHAININFO_TARGET_CARDS):Filter(aux.AND(Card.IsRelateToChain,Card.IsOnField),nil)
if g:GetCount()>0 then
Duel.Destroy(g,REASON_EFFECT)
end
end
\ No newline at end of file
end
--
--特別ダイヤ
local s,id,o=GetID()
function s.initial_effect(c)
aux.AddCodeList(c,25274141,97520701)
--Activate
local e1=Effect.CreateEffect(c)
e1:SetDescription(aux.Stringid(id,0))
e1:SetCategory(CATEGORY_TOHAND+CATEGORY_SEARCH+CATEGORY_TOKEN+CATEGORY_SPECIAL_SUMMON)
e1:SetType(EFFECT_TYPE_ACTIVATE)
e1:SetCode(EVENT_FREE_CHAIN)
......@@ -46,27 +47,32 @@ function s.activate(e,tp,eg,ep,ev,re,r,rp)
end
end
function s.spfilter(c,e,tp)
return c:IsFaceupEx() and c:IsRace(RACE_MACHINE) and c:IsLevel(10)
return c:IsFaceupEx() and c:IsRace(RACE_MACHINE) and c:IsLevel(10)
and c:IsCanBeSpecialSummoned(e,0,tp,false,false)
end
function s.cfilter(c,tp)
return c:IsAbleToGrave() and Duel.GetMZoneCount(tp,c)>0
function s.cfilter(c,tp,chk)
return c:IsAbleToGrave() and (not chk or Duel.GetMZoneCount(tp,c)>0)
end
function s.sptg(e,tp,eg,ep,ev,re,r,rp,chk,chkc)
if chkc then return chkc:IsLocation(LOCATION_GRAVE+LOCATION_REMOVED) and s.spfilter(chkc,e,tp) end
if chk==0 then return Duel.GetLocationCount(tp,LOCATION_MZONE)>0
and Duel.IsExistingTarget(s.spfilter,tp,LOCATION_GRAVE+LOCATION_REMOVED,0,1,nil,e,tp)
and Duel.IsExistingMatchingCard(s.cfilter,tp,LOCATION_ONFIELD,0,1,nil,tp) end
if chk==0 then return Duel.IsExistingTarget(s.spfilter,tp,LOCATION_GRAVE+LOCATION_REMOVED,0,1,nil,e,tp)
and Duel.IsExistingMatchingCard(s.cfilter,tp,LOCATION_ONFIELD,0,1,nil,tp,true) end
Duel.Hint(HINT_SELECTMSG,tp,HINTMSG_SPSUMMON)
local g=Duel.SelectTarget(tp,s.spfilter,tp,LOCATION_GRAVE+LOCATION_REMOVED,0,1,1,nil,e,tp)
Duel.SetOperationInfo(0,CATEGORY_TOGRAVE,nil,1,tp,LOCATION_ONFIELD)
Duel.SetOperationInfo(0,CATEGORY_SPECIAL_SUMMON,g,1,0,0)
end
function s.spop(e,tp,eg,ep,ev,re,r,rp)
local tc=Duel.GetFirstTarget()
local g=Group.CreateGroup()
Duel.Hint(HINT_SELECTMSG,tp,HINTMSG_TOGRAVE)
local g=Duel.SelectMatchingCard(tp,s.cfilter,tp,LOCATION_ONFIELD,0,1,1,nil,tp)
if Duel.IsExistingMatchingCard(s.cfilter,tp,LOCATION_ONFIELD,0,1,nil,tp,true) then
g=Duel.SelectMatchingCard(tp,s.cfilter,tp,LOCATION_ONFIELD,0,1,1,nil,tp,true)
else
g=Duel.SelectMatchingCard(tp,s.cfilter,tp,LOCATION_ONFIELD,0,1,1,nil,tp,false)
end
if g:GetCount()>0 and Duel.SendtoGrave(g,REASON_EFFECT)>0 and g:IsExists(Card.IsLocation,1,nil,LOCATION_GRAVE)
and tc:IsRelateToChain() and aux.NecroValleyFilter()(tc) then
Duel.SpecialSummon(tc,0,tp,tp,false,false,POS_FACEUP)
end
end
\ No newline at end of file
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