Commit b480aaf3 authored by wind2009's avatar wind2009

Fix

parent 413db773
Pipeline #43680 passed with stages
in 2 minutes and 56 seconds
No preview for this file type
......@@ -11,6 +11,7 @@
100257014
100257016
100257017
100257018
100257019
100257020
100257021
......
......@@ -8,6 +8,11 @@
101305007
101305008
101305009
101305010
101305011
101305012
101305013
101305014
101305027
101305028
101305029
......@@ -18,7 +23,12 @@
101305047
101305048
101305049
101305050
101305051
101305052
101305065
101305066
101305067
101305068
101305069
101305076
\ No newline at end of file
......@@ -8,6 +8,7 @@ function s.initial_effect(c)
e1:SetType(EFFECT_TYPE_QUICK_O)
e1:SetCode(EVENT_FREE_CHAIN)
e1:SetRange(LOCATION_HAND)
e1:SetHintTiming(0,TIMINGS_CHECK_MONSTER+TIMING_MAIN_END+TIMING_END_PHASE)
e1:SetCountLimit(1,id)
e1:SetCondition(s.spcon)
e1:SetCost(s.spcost)
......@@ -61,13 +62,14 @@ function s.sptg(e,tp,eg,ep,ev,re,r,rp,chk)
end
function s.spop(e,tp,eg,ep,ev,re,r,rp)
local ft=Duel.GetLocationCount(tp,LOCATION_MZONE)
if ft<=0 then return end
if ft>0 then
if ft>3 then ft=3 end
if Duel.IsPlayerAffectedByEffect(tp,59822133) then ft=1 end
Duel.Hint(HINT_SELECTMSG,tp,HINTMSG_SPSUMMON)
local g=Duel.SelectMatchingCard(tp,s.spfilter,tp,LOCATION_HAND,0,1,ft,nil,e,tp)
if g:GetCount()>0 then
local ct=Duel.SpecialSummon(g,0,tp,tp,false,false,POS_FACEUP)
Duel.AdjustAll()
local dg=Duel.GetMatchingGroup(aux.TRUE,tp,LOCATION_ONFIELD,LOCATION_ONFIELD,nil)
if ct~=0 and dg:GetCount()>0 and Duel.SelectYesNo(tp,aux.Stringid(id,2)) then
Duel.BreakEffect()
......@@ -77,6 +79,7 @@ function s.spop(e,tp,eg,ep,ev,re,r,rp)
Duel.Destroy(sdg,REASON_EFFECT)
end
end
end
local e1=Effect.CreateEffect(e:GetHandler())
e1:SetType(EFFECT_TYPE_FIELD)
e1:SetCode(EFFECT_CANNOT_SPECIAL_SUMMON)
......@@ -91,7 +94,7 @@ function s.splimit(e,c)
end
function s.negcon(e,tp,eg,ep,ev,re,r,rp)
local loc=Duel.GetChainInfo(ev,CHAININFO_TRIGGERING_LOCATION)
return ep~=tp and LOCATION_HAND&loc==0
return LOCATION_HAND&loc==0
and re:IsActiveType(TYPE_MONSTER)
and not e:GetHandler():IsStatus(STATUS_BATTLE_DESTROYED)
and Duel.IsChainNegatable(ev)
......@@ -103,6 +106,7 @@ function s.negcost(e,tp,eg,ep,ev,re,r,rp,chk)
if chk==0 then return Duel.IsExistingMatchingCard(s.cfilter,tp,LOCATION_MZONE,0,1,e:GetHandler()) end
Duel.Hint(HINT_SELECTMSG,tp,HINTMSG_RTOHAND)
local g=Duel.SelectMatchingCard(tp,s.cfilter,tp,LOCATION_MZONE,0,1,1,e:GetHandler())
Duel.HintSelection(g)
Duel.SendtoHand(g,nil,REASON_COST)
end
function s.negtg(e,tp,eg,ep,ev,re,r,rp,chk)
......
......@@ -16,7 +16,7 @@ function s.initial_effect(c)
--to hand
local e2=Effect.CreateEffect(c)
e2:SetDescription(aux.Stringid(id,1))
e2:SetCategory(CATEGORY_TOHAND)
e2:SetCategory(CATEGORY_SEARCH+CATEGORY_TOHAND)
e2:SetType(EFFECT_TYPE_FIELD+EFFECT_TYPE_TRIGGER_O)
e2:SetProperty(EFFECT_FLAG_DELAY)
e2:SetCode(EVENT_DESTROYED)
......@@ -40,7 +40,7 @@ end
function s.sptg(e,tp,eg,ep,ev,re,r,rp,chk,chkc)
if chkc then return chkc:IsLocation(LOCATION_MZONE) and s.desfilter(chkc,e,tp) end
if chk==0 then return Duel.IsExistingTarget(s.desfilter,tp,LOCATION_MZONE,LOCATION_MZONE,1,nil,e,tp)
and Duel.IsExistingMatchingCard(s.spfilter,tp,LOCATION_HAND,0,1,nil,e,tp,c) end
and Duel.IsExistingMatchingCard(s.spfilter,tp,LOCATION_HAND,0,1,nil,e,tp) end
Duel.Hint(HINT_SELECTMSG,tp,HINTMSG_DESTROY)
local g=Duel.SelectTarget(tp,s.desfilter,tp,LOCATION_MZONE,LOCATION_MZONE,1,1,nil,e,tp)
Duel.SetOperationInfo(0,CATEGORY_DESTROY,g,1,0,0)
......@@ -48,10 +48,12 @@ function s.sptg(e,tp,eg,ep,ev,re,r,rp,chk,chkc)
end
function s.spop(e,tp,eg,ep,ev,re,r,rp)
local tc=Duel.GetFirstTarget()
if tc and tc:IsRelateToChain() and Duel.Destroy(tc,REASON_EFFECT)~=0 and Duel.GetLocationCount(tp,LOCATION_MZONE)>0 then
if tc and tc:IsRelateToChain() and tc:IsType(TYPE_MONSTER)
and Duel.Destroy(tc,REASON_EFFECT)~=0 and Duel.GetLocationCount(tp,LOCATION_MZONE)>0 then
Duel.Hint(HINT_SELECTMSG,tp,HINTMSG_SPSUMMON)
local g=Duel.SelectMatchingCard(tp,s.spfilter,tp,LOCATION_HAND,0,1,1,nil,e,tp,tc)
if g:GetCount()>0 then
Duel.ShuffleHand(tp)
Duel.SpecialSummon(g,0,tp,tp,false,false,POS_FACEUP)
end
end
......
......@@ -40,16 +40,17 @@ function s.spfilter(c,e,tp)
end
function s.sptg(e,tp,eg,ep,ev,re,r,rp,chk)
if chk==0 then return Duel.GetMZoneCount(tp,re:GetHandler())>0
and Duel.IsExistingMatchingCard(s.spfilter,tp,LOCATION_HAND,0,1,nil,e,tp,c) end
and Duel.IsExistingMatchingCard(s.spfilter,tp,LOCATION_HAND,0,1,nil,e,tp) end
Duel.SetOperationInfo(0,CATEGORY_DESTROY,eg,1,0,0)
end
function s.spop(e,tp,eg,ep,ev,re,r,rp)
if re:GetHandler():IsRelateToEffect(re) and re:GetHandler():IsType(TYPE_MONSTER)
if re:GetHandler():IsRelateToChain(ev) and re:GetHandler():IsType(TYPE_MONSTER)
and re:GetHandler():IsLocation(LOCATION_MZONE)
and Duel.Destroy(re:GetHandler(),REASON_EFFECT)~=0 and Duel.GetLocationCount(tp,LOCATION_MZONE)>0 then
Duel.Hint(HINT_SELECTMSG,tp,HINTMSG_SPSUMMON)
local g=Duel.SelectMatchingCard(tp,s.spfilter,tp,LOCATION_HAND,0,1,1,nil,e,tp)
if g:GetCount()>0 then
Duel.ShuffleHand(tp)
Duel.SpecialSummon(g,0,tp,tp,false,false,POS_FACEUP)
end
end
......
......@@ -17,7 +17,7 @@ function s.initial_effect(c)
--to hand
local e2=Effect.CreateEffect(c)
e2:SetDescription(aux.Stringid(id,1))
e2:SetCategory(CATEGORY_TOHAND)
e2:SetCategory(CATEGORY_SEARCH+CATEGORY_TOHAND)
e2:SetType(EFFECT_TYPE_FIELD+EFFECT_TYPE_TRIGGER_O)
e2:SetProperty(EFFECT_FLAG_DELAY)
e2:SetCode(EVENT_DESTROYED)
......@@ -40,8 +40,8 @@ function s.spfilter(c,e,tp)
end
function s.sptg(e,tp,eg,ep,ev,re,r,rp,chk,chkc)
if chkc then return chkc:IsLocation(LOCATION_ONFIELD) and s.desfilter(chkc,e,tp) end
if chk==0 then return Duel.IsExistingTarget(s.desfilter,tp,LOCATION_ONFIELD,LOCATION_MZONE,1,nil,e,tp)
and Duel.IsExistingMatchingCard(s.spfilter,tp,LOCATION_HAND,0,1,nil,e,tp,c) end
if chk==0 then return Duel.IsExistingTarget(s.desfilter,tp,LOCATION_ONFIELD,LOCATION_ONFIELD,1,nil,e,tp)
and Duel.IsExistingMatchingCard(s.spfilter,tp,LOCATION_HAND,0,1,nil,e,tp) end
Duel.Hint(HINT_SELECTMSG,tp,HINTMSG_DESTROY)
local g=Duel.SelectTarget(tp,s.desfilter,tp,LOCATION_ONFIELD,LOCATION_ONFIELD,1,1,nil,e,tp)
Duel.SetOperationInfo(0,CATEGORY_DESTROY,g,1,0,0)
......@@ -53,6 +53,7 @@ function s.spop(e,tp,eg,ep,ev,re,r,rp)
Duel.Hint(HINT_SELECTMSG,tp,HINTMSG_SPSUMMON)
local g=Duel.SelectMatchingCard(tp,s.spfilter,tp,LOCATION_HAND,0,1,1,nil,e,tp,tc)
if g:GetCount()>0 then
Duel.ShuffleHand(tp)
Duel.SpecialSummon(g,0,tp,tp,false,false,POS_FACEUP)
end
end
......
--エミ・ブリッツクリーク
local s,id,o=GetID()
function s.initial_effect(c)
--special summon
--special summon
local e1=Effect.CreateEffect(c)
e1:SetDescription(aux.Stringid(id,0))
......@@ -18,7 +17,7 @@ function s.initial_effect(c)
--to hand
local e2=Effect.CreateEffect(c)
e2:SetDescription(aux.Stringid(id,1))
e2:SetCategory(CATEGORY_TOHAND)
e2:SetCategory(CATEGORY_SEARCH+CATEGORY_TOHAND)
e2:SetType(EFFECT_TYPE_FIELD+EFFECT_TYPE_TRIGGER_O)
e2:SetProperty(EFFECT_FLAG_DELAY)
e2:SetCode(EVENT_DESTROYED)
......@@ -45,7 +44,7 @@ end
function s.sptg(e,tp,eg,ep,ev,re,r,rp,chk,chkc)
if chkc then return chkc:IsLocation(LOCATION_ONFIELD) and s.desfilter(chkc,e,tp) end
if chk==0 then return Duel.IsExistingTarget(s.desfilter,tp,LOCATION_ONFIELD,LOCATION_ONFIELD,1,nil,e,tp)
and Duel.IsExistingMatchingCard(s.spfilter,tp,LOCATION_HAND,0,1,nil,e,tp,c) end
and Duel.IsExistingMatchingCard(s.spfilter,tp,LOCATION_HAND,0,1,nil,e,tp) end
Duel.Hint(HINT_SELECTMSG,tp,HINTMSG_DESTROY)
local g=Duel.SelectTarget(tp,s.desfilter,tp,LOCATION_ONFIELD,LOCATION_ONFIELD,1,1,nil,e,tp)
Duel.SetOperationInfo(0,CATEGORY_DESTROY,g,1,0,0)
......@@ -53,10 +52,12 @@ function s.sptg(e,tp,eg,ep,ev,re,r,rp,chk,chkc)
end
function s.spop(e,tp,eg,ep,ev,re,r,rp)
local tc=Duel.GetFirstTarget()
if tc and tc:IsRelateToChain() and Duel.Destroy(tc,REASON_EFFECT)~=0 and Duel.GetLocationCount(tp,LOCATION_MZONE)>0 then
if tc and tc:IsRelateToChain() and tc:IsOnField()
and Duel.Destroy(tc,REASON_EFFECT)~=0 and Duel.GetLocationCount(tp,LOCATION_MZONE)>0 then
Duel.Hint(HINT_SELECTMSG,tp,HINTMSG_SPSUMMON)
local g=Duel.SelectMatchingCard(tp,s.spfilter,tp,LOCATION_HAND,0,1,1,nil,e,tp,tc)
if g:GetCount()>0 then
Duel.ShuffleHand(tp)
Duel.SpecialSummon(g,0,tp,tp,false,false,POS_FACEUP)
end
end
......
--天空城塞クーロン4
--天空城塞クーロン
local s,id,o=GetID()
function s.initial_effect(c)
--Activate
......
--雷盟-ブレイクアウェイ
--雷盟ブレイクアウェイ
local s,id,o=GetID()
function s.initial_effect(c)
--activate
local e1=Effect.CreateEffect(c)
e1:SetDescription(aux.Stringid(id,0))
e1:SetCategory(CATEGORY_TOGRAVE|CATEGORY_SPECIAL_SUMMON)
e1:SetCategory(CATEGORY_DESTROY)
e1:SetType(EFFECT_TYPE_ACTIVATE)
e1:SetCode(EVENT_FREE_CHAIN)
e1:SetProperty(EFFECT_FLAG_CARD_TARGET)
......@@ -31,21 +31,21 @@ function s.pfilter(c,tp)
return c:IsType(TYPE_CONTINUOUS) and c:IsType(TYPE_TRAP) and c:IsSetCard(0x2df)
and not c:IsForbidden() and c:CheckUniqueOnField(tp)
end
function s.cfilter(c,ec)
function s.cfilter(c,ec,tp)
return c:IsFaceup() and c:IsRace(RACE_THUNDER) and c:IsAbleToHandAsCost()
and Duel.IsExistingTarget(aux.TRUE,tp,LOCATION_ONFIELD,LOCATION_ONFIELD,1,Group.FromCards(c,ec))
end
function s.cost(e,tp,eg,ep,ev,re,r,rp,chk)
local b1=Duel.GetLocationCount(tp,LOCATION_SZONE)>0
and Duel.IsExistingMatchingCard(s.pfilter,tp,LOCATION_DECK,0,1,nil,tp)
local b2=Duel.IsExistingMatchingCard(s.cfilter,tp,LOCATION_MZONE,0,1,e:GetHandler(),e:GetHandler())
local b2=Duel.IsExistingMatchingCard(s.cfilter,tp,LOCATION_MZONE,0,1,e:GetHandler(),e:GetHandler(),tp)
if chk==0 then return b1 or b2 end
local op=aux.SelectFromOptions(tp,
{b1,aux.Stringid(id,2),1},
{b2,aux.Stringid(id,3),2})
if op==2 then
Duel.Hint(HINT_SELECTMSG,tp,HINTMSG_RTOHAND)
local g=Duel.SelectMatchingCard(tp,s.cfilter,tp,LOCATION_MZONE,0,1,1,e:GetHandler(),e:GetHandler())
local g=Duel.SelectMatchingCard(tp,s.cfilter,tp,LOCATION_MZONE,0,1,1,e:GetHandler(),e:GetHandler(),tp)
Duel.SendtoHand(g,nil,REASON_COST)
end
e:SetLabel(op)
......
--雷盟-ステゥプリーダ
--雷盟ステゥプリーダ
local s,id,o=GetID()
function s.initial_effect(c)
--Activate
......@@ -11,7 +11,7 @@ function s.initial_effect(c)
e2:SetDescription(aux.Stringid(id,0))
e2:SetCategory(CATEGORY_TOHAND)
e2:SetType(EFFECT_TYPE_FIELD+EFFECT_TYPE_TRIGGER_O)
e2:SetProperty(EFFECT_FLAG_DELAY)
e2:SetProperty(EFFECT_FLAG_DELAY+EFFECT_FLAG_CARD_TARGET)
e2:SetCode(EVENT_DESTROYED)
e2:SetRange(LOCATION_SZONE)
e2:SetCountLimit(1,id)
......@@ -67,7 +67,7 @@ function s.thop(e,tp,eg,ep,ev,re,r,rp)
end
end
function s.spfilter(c,e,tp)
return c:IsSetCard(0x15) and c:IsCanBeSpecialSummoned(e,0,tp,false,false)
return c:IsRace(RACE_THUNDER) and c:IsCanBeSpecialSummoned(e,0,tp,false,false)
end
function s.sptg(e,tp,eg,ep,ev,re,r,rp,chk)
if chk==0 then return Duel.GetLocationCount(tp,LOCATION_MZONE)>0
......
--雷盟-リターンストローク
--雷盟リターンストローク
local s,id,o=GetID()
function s.initial_effect(c)
--Activate
......@@ -21,7 +21,6 @@ function s.initial_effect(c)
e3:SetCategory(CATEGORY_DISABLE+CATEGORY_DESTROY)
e3:SetType(EFFECT_TYPE_QUICK_O)
e3:SetCode(EVENT_CHAINING)
e3:SetProperty(EFFECT_FLAG_DAMAGE_STEP+EFFECT_FLAG_DAMAGE_CAL)
e3:SetRange(LOCATION_SZONE)
e3:SetCountLimit(1,id)
e3:SetCondition(s.discon)
......@@ -37,6 +36,7 @@ function s.initial_effect(c)
e4:SetCode(EVENT_FREE_CHAIN)
e4:SetRange(LOCATION_GRAVE)
e4:SetProperty(EFFECT_FLAG_CARD_TARGET)
e4:SetHintTiming(0,TIMINGS_CHECK_MONSTER+TIMING_END_PHASE)
e4:SetCountLimit(1,id+o)
e4:SetCost(aux.bfgcost)
e4:SetTarget(s.thtg)
......@@ -56,6 +56,7 @@ function s.discost(e,tp,eg,ep,ev,re,r,rp,chk)
if chk==0 then return Duel.IsExistingMatchingCard(s.cfilter,tp,LOCATION_MZONE,0,1,e:GetHandler()) end
Duel.Hint(HINT_SELECTMSG,tp,HINTMSG_RTOHAND)
local g=Duel.SelectMatchingCard(tp,s.cfilter,tp,LOCATION_MZONE,0,1,1,e:GetHandler())
Duel.HintSelection(g)
Duel.SendtoHand(g,nil,REASON_COST)
end
function s.distg(e,tp,eg,ep,ev,re,r,rp,chk)
......@@ -66,7 +67,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) then
if Duel.NegateEffect(ev) and re:GetHandler():IsRelateToChain(ev) then
Duel.Destroy(eg,REASON_EFFECT)
end
end
......@@ -77,7 +78,7 @@ function s.thtg(e,tp,eg,ep,ev,re,r,rp,chk,chkc)
if chkc then return s.thfilter(chkc) and chkc:IsLocation(LOCATION_MZONE+LOCATION_GRAVE) and chkc:IsControler(tp) end
if chk==0 then return Duel.IsExistingTarget(s.thfilter,tp,LOCATION_MZONE+LOCATION_GRAVE,0,1,nil) end
Duel.Hint(HINT_SELECTMSG,tp,HINTMSG_ATOHAND)
local g=Duel.SelectTarget(tp,s.thfilter,tp,LOCATION_MZONE+LOCATION_GRAVE,0,1,1,nil)
local g=aux.SelectTargetFromFieldFirst(tp,s.thfilter,tp,LOCATION_MZONE+LOCATION_GRAVE,0,1,1,nil)
Duel.SetOperationInfo(0,CATEGORY_TOHAND,g,1,0,0)
end
function s.thop(e,tp,eg,ep,ev,re,r,rp)
......
--雷盟-オルタネータ
--雷盟オルタネータ
local s,id,o=GetID()
function s.initial_effect(c)
aux.AddCodeList(c,101305050)
......@@ -25,7 +25,7 @@ function s.initial_effect(c)
e4:SetType(EFFECT_TYPE_QUICK_O)
e4:SetRange(LOCATION_SZONE)
e4:SetCode(EVENT_FREE_CHAIN)
e4:SetHintTiming(0,TIMING_END_PHASE)
e4:SetHintTiming(TIMING_DRAW_PHASE,TIMING_DRAW_PHASE+TIMING_END_PHASE)
e4:SetCountLimit(1,id)
e4:SetCost(s.thcost)
e4:SetTarget(s.thtg)
......@@ -54,18 +54,19 @@ function s.cfilter(c,tp)
and Duel.IsExistingMatchingCard(s.thfilter,tp,LOCATION_DECK,0,1,nil,c:GetCode())
end
function s.thfilter(c,code)
return c:IsSetCard(0x2df) and c:IsType(TYPE_MONSTER) and c:IsAbleToHand()
and not c:IsCode(id)
return c:IsRace(RACE_THUNDER) and c:IsType(TYPE_MONSTER) and c:IsAbleToHand()
and not c:IsCode(code)
end
function s.thcost(e,tp,eg,ep,ev,re,r,rp,chk)
if chk==0 then return Duel.IsExistingMatchingCard(s.cfilter,tp,LOCATION_HAND+LOCATION_ONFIELD,0,1,e:GetHandler(),tp) end
local c=e:GetHandler()
if chk==0 then return Duel.IsExistingMatchingCard(s.cfilter,tp,LOCATION_HAND+LOCATION_ONFIELD,0,1,c,tp) end
Duel.Hint(HINT_SELECTMSG,tp,HINTMSG_TODECK)
local g=Duel.SelectMatchingCard(tp,s.cfilter,tp,LOCATION_HAND+LOCATION_ONFIELD,0,1,1,e:GetHandler(),tp)
local g=Duel.SelectMatchingCard(tp,s.cfilter,tp,LOCATION_HAND+LOCATION_ONFIELD,0,1,1,c,tp)
if g:GetFirst():IsLocation(LOCATION_HAND) then
Duel.ConfirmCards(1-tp,g)
end
Duel.SendtoDeck(g,nil,SEQ_DECKSHUFFLE,REASON_COST)
e:SetLabel(g:GetFirst():GetCode())
Duel.SendtoDeck(g,nil,SEQ_DECKSHUFFLE,REASON_COST)
end
function s.thtg(e,tp,eg,ep,ev,re,r,rp,chk)
if chk==0 then return Duel.IsExistingMatchingCard(s.thfilter,tp,LOCATION_DECK,0,1,nil,0) 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