Commit 009ca22f authored by TanakaKotoha's avatar TanakaKotoha

lbwnb

parent 0c429260
Pipeline #703 passed with stages
in 41 minutes and 19 seconds
......@@ -14,7 +14,7 @@ function cm.initial_effect(c)
c:RegisterEffect(e1)
--token spsummon
local e2=Effect.CreateEffect(c)
e2:SetCountLimit(1,m+6)
e2:SetCountLimit(1,m+1)
e2:SetType(EFFECT_TYPE_QUICK_O)
e2:SetCode(EVENT_FREE_CHAIN)
e2:SetCategory(CATEGORY_SPECIAL_SUMMON)
......
......@@ -53,7 +53,7 @@ function cm.stop(e,tp,eg,ep,ev,re,r,rp)
local seq1=aux.MZoneSequence(c:GetSequence())
local seq2=seq
if re:IsActiveType(TYPE_MONSTER) then seq=aux.MZoneSequence(seq) end
if ((seq1==4-seq and rp==1-tp) or seq1==seq) or (rp==tp and math.abs(c:GetSequence()-seq)<=1 and loc==LOCATION_MZONE and seq2<5) then
if ((seq1==4-seq and rp==1-tp) or (seq1==seq and rp==tp)) or (rp==tp and math.abs(c:GetSequence()-seq)<=1 and loc==LOCATION_MZONE and seq2<5) then
local cg=c:GetColumnGroup():Filter(aux.disfilter1,nil)
if aux.disfilter1(c) then cg:AddCard(c) end
if cg:GetCount()>0 and Duel.SelectYesNo(tp,aux.Stringid(m,0)) then
......
......@@ -58,13 +58,21 @@ end
function cm.ckfilter(c,tp)
return c:IsType(TYPE_MONSTER) and c:IsControler(tp)
end
function cm.ckfilter1(c,seq)
local seq1=c:GetSequence()
local seq2=4-aux.MZoneSequence(seq1)
return c:IsFaceup() and math.abs(seq-seq2)<=1
end
function cm.stop(e,tp,eg,ep,ev,re,r,rp)
c=e:GetHandler()
if not c:IsRelateToEffect(e) then return end
local loc,seq=Duel.GetChainInfo(ev,CHAININFO_TRIGGERING_LOCATION,CHAININFO_TRIGGERING_SEQUENCE)
local seq1=aux.MZoneSequence(c:GetSequence())
if seq1==4-seq or (math.abs(e:GetHandler():GetSequence()-seq)<=1 and loc==LOCATION_MZONE and seq<5) then
local cg=c:GetColumnGroup(1,1):Filter(cm.ckfilter,nil,1-tp)
local seq2=seq
if re:IsActiveType(TYPE_MONSTER) then seq=aux.MZoneSequence(seq) end
if ((seq1==4-seq and rp==1-tp) or (seq1==seq and rp==tp)) or (rp==tp and math.abs(c:GetSequence()-seq)<=1 and loc==LOCATION_MZONE and seq2<5) then
local seq3=aux.MZoneSequence(c:GetSequence())
local cg=Duel.GetMatchingGroup(cm.ckfilter1,tp,0,LOCATION_MZONE,nil,seq3)
if cg:GetCount()>0 then
local tc=cg:GetFirst()
while tc do
......
......@@ -73,7 +73,7 @@ function cm.stop(e,tp,eg,ep,ev,re,r,rp)
local seq1=aux.MZoneSequence(c:GetSequence())
local seq2=seq
if re:IsActiveType(TYPE_MONSTER) then seq=aux.MZoneSequence(seq) end
if ((seq1==4-seq and rp==1-tp) or seq1==seq) or (rp==tp and math.abs(c:GetSequence()-seq)<=1 and loc==LOCATION_MZONE and seq2<5) then
if ((seq1==4-seq and rp==1-tp) or (seq1==seq and rp==tp)) or (rp==tp and math.abs(c:GetSequence()-seq)<=1 and loc==LOCATION_MZONE and seq2<5) then
local cg=c:GetColumnGroup():Filter(cm.ckfilter,nil,1-tp)
if cg:GetCount()>0 then
Duel.Hint(HINT_SELECTMSG,tp,HINTMSG_FACEUP)
......
......@@ -59,7 +59,7 @@ function cm.stop(e,tp,eg,ep,ev,re,r,rp)
local seq1=aux.MZoneSequence(c:GetSequence())
local seq2=seq
if re:IsActiveType(TYPE_MONSTER) then seq=aux.MZoneSequence(seq) end
if ((seq1==4-seq and rp==1-tp) or seq1==seq) or (rp==tp and math.abs(c:GetSequence()-seq)<=1 and loc==LOCATION_MZONE and seq2<5) then
if ((seq1==4-seq and rp==1-tp) or (seq1==seq and rp==tp)) or (rp==tp and math.abs(c:GetSequence()-seq)<=1 and loc==LOCATION_MZONE and seq2<5) then
local chkf=tp
local mg1=Duel.GetFusionMaterial(tp)
local sg1=Duel.GetMatchingGroup(cm.filter2,tp,LOCATION_EXTRA,0,nil,e,tp,mg1,nil,chkf)
......
......@@ -57,7 +57,7 @@ function cm.stop(e,tp,eg,ep,ev,re,r,rp)
local seq1=aux.MZoneSequence(c:GetSequence())
local seq2=seq
if re:IsActiveType(TYPE_MONSTER) then seq=aux.MZoneSequence(seq) end
if ((seq1==4-seq and rp==1-tp) or seq1==seq) or (rp==tp and math.abs(c:GetSequence()-seq)<=1 and loc==LOCATION_MZONE and seq2<5) then
if ((seq1==4-seq and rp==1-tp) or (seq1==seq and rp==tp)) or (rp==tp and math.abs(c:GetSequence()-seq)<=1 and loc==LOCATION_MZONE and seq2<5) then
local cg=c:GetColumnGroup():Filter(Card.IsAbleToHand,nil)
local cg2=c:GetColumnGroup(1,1):Filter(cm.ckfilter,nil,tp)
cg:Merge(cg2)
......
......@@ -59,13 +59,21 @@ function cm.ckfilter(c,tp)
local seq=c:GetSequence()
return c:IsType(TYPE_MONSTER) and c:IsControler(tp) and seq<5
end
function cm.ckfilter1(c,tp,seq)
local seq1=c:GetSequence()
local seq2=aux.MZoneSequence(seq1)
return c:IsFaceup() and math.abs(seq-seq2)<=1 and seq1<5
end
function cm.stop(e,tp,eg,ep,ev,re,r,rp)
c=e:GetHandler()
if not c:IsRelateToEffect(e) then return end
local loc,seq=Duel.GetChainInfo(ev,CHAININFO_TRIGGERING_LOCATION,CHAININFO_TRIGGERING_SEQUENCE)
local seq1=aux.MZoneSequence(c:GetSequence())
if seq1==4-seq or (math.abs(e:GetHandler():GetSequence()-seq)<=1 and loc==LOCATION_MZONE and seq<5) then
local cg=c:GetColumnGroup(1,1):Filter(cm.ckfilter,nil,tp)
local seq2=seq
if re:IsActiveType(TYPE_MONSTER) then seq=aux.MZoneSequence(seq) end
if ((seq1==4-seq and rp==1-tp) or (seq1==seq and rp==tp)) or (rp==tp and math.abs(c:GetSequence()-seq)<=1 and loc==LOCATION_MZONE and seq2<5) then
local seq3=aux.MZoneSequence(c:GetSequence())
local cg=Duel.GetMatchingGroup(cm.ckfilter1,tp,LOCATION_MZONE,0,c,tp,seq3)
if cg:GetCount()>0 then
local tc=cg:GetFirst()
while tc do
......@@ -78,7 +86,7 @@ function cm.stop(e,tp,eg,ep,ev,re,r,rp)
tc:RegisterEffect(e1)
local e2=Effect.CreateEffect(e:GetHandler())
e2:SetType(EFFECT_TYPE_SINGLE)
e2:SetCode(EFFECT_SET_ATTACK_FINAL)
e2:SetCode(EFFECT_SET_DEFENSE_FINAL)
e2:SetProperty(EFFECT_FLAG_CANNOT_DISABLE)
e2:SetValue(tc:GetDefense()*2)
e2:SetReset(RESET_EVENT+RESETS_STANDARD+RESET_PHASE+PHASE_END)
......
......@@ -73,7 +73,7 @@ function cm.stop(e,tp,eg,ep,ev,re,r,rp)
local seq1=aux.MZoneSequence(c:GetSequence())
local seq2=seq
if re:IsActiveType(TYPE_MONSTER) then seq=aux.MZoneSequence(seq) end
if ((seq1==4-seq and rp==1-tp) or seq1==seq) or (rp==tp and math.abs(c:GetSequence()-seq)<=1 and loc==LOCATION_MZONE and seq2<5) then
if ((seq1==4-seq and rp==1-tp) or (seq1==seq and rp==tp)) or (rp==tp and math.abs(c:GetSequence()-seq)<=1 and loc==LOCATION_MZONE and seq2<5) then
local cg=c:GetColumnGroup(1,1):Filter(cm.ckfilter,nil,1-tp)
if cg:GetCount()>0 then
local tc=cg:GetFirst()
......
......@@ -59,7 +59,7 @@ function cm.stop(e,tp,eg,ep,ev,re,r,rp)
local seq1=aux.MZoneSequence(c:GetSequence())
local seq2=seq
if re:IsActiveType(TYPE_MONSTER) then seq=aux.MZoneSequence(seq) end
if ((seq1==4-seq and rp==1-tp) or seq1==seq) or (rp==tp and math.abs(c:GetSequence()-seq)<=1 and loc==LOCATION_MZONE and seq2<5) then
if ((seq1==4-seq and rp==1-tp) or (seq1==seq and rp==tp)) or (rp==tp and math.abs(c:GetSequence()-seq)<=1 and loc==LOCATION_MZONE and seq2<5) then
local chkf=tp
local mg1=Duel.GetFusionMaterial(tp)
local sg1=Duel.GetMatchingGroup(cm.filter2,tp,LOCATION_EXTRA,0,nil,e,tp,mg1,nil,chkf)
......
......@@ -70,7 +70,7 @@ function cm.stop(e,tp,eg,ep,ev,re,r,rp)
local seq1=aux.MZoneSequence(c:GetSequence())
local seq2=seq
if re:IsActiveType(TYPE_MONSTER) then seq=aux.MZoneSequence(seq) end
if ((seq1==4-seq and rp==1-tp) or seq1==seq) or (rp==tp and math.abs(c:GetSequence()-seq)<=1 and loc==LOCATION_MZONE and seq2<5) then
if ((seq1==4-seq and rp==1-tp) or (seq1==seq and rp==tp)) or (rp==tp and math.abs(c:GetSequence()-seq)<=1 and loc==LOCATION_MZONE and seq2<5) then
local cg=Duel.GetMatchingGroup(nil,tp,LOCATION_ONFIELD,LOCATION_ONFIELD,nil):Filter(cm.ckfilter1,nil,tp)
if cg:GetCount()>0 and Duel.SelectYesNo(tp,aux.Stringid(m,1)) then
Duel.Hint(HINT_SELECTMSG,tp,HINTMSG_ATOHAND)
......
......@@ -86,7 +86,7 @@ function cm.stop(e,tp,eg,ep,ev,re,r,rp)
local seq1=aux.MZoneSequence(c:GetSequence())
local seq2=seq
if re:IsActiveType(TYPE_MONSTER) then seq=aux.MZoneSequence(seq) end
if ((seq1==4-seq and rp==1-tp) or seq1==seq) or (rp==tp and math.abs(c:GetSequence()-seq)<=1 and loc==LOCATION_MZONE and seq2<5) then
if ((seq1==4-seq and rp==1-tp) or (seq1==seq and rp==tp)) or (rp==tp and math.abs(c:GetSequence()-seq)<=1 and loc==LOCATION_MZONE and seq2<5) then
if Duel.GetCurrentPhase()==PHASE_DRAW then ph=PHASE_STANDBY end
if Duel.GetCurrentPhase()==PHASE_STANDBY then ph=PHASE_MAIN1 end
if Duel.GetCurrentPhase()==PHASE_MAIN1 then ph=PHASE_BATTLE end
......
......@@ -70,7 +70,7 @@ function cm.stop(e,tp,eg,ep,ev,re,r,rp)
local seq1=aux.MZoneSequence(c:GetSequence())
local seq2=seq
if re:IsActiveType(TYPE_MONSTER) then seq=aux.MZoneSequence(seq) end
if ((seq1==4-seq and rp==1-tp) or seq1==seq) or (rp==tp and math.abs(c:GetSequence()-seq)<=1 and loc==LOCATION_MZONE and seq2<5) then
if ((seq1==4-seq and rp==1-tp) or (seq1==seq and rp==tp)) or (rp==tp and math.abs(c:GetSequence()-seq)<=1 and loc==LOCATION_MZONE and seq2<5) then
local cg=Duel.GetMatchingGroup(nil,tp,LOCATION_ONFIELD,LOCATION_ONFIELD,nil):Filter(cm.ckfilter1,nil,tp)
if cg:GetCount()>0 and Duel.SelectYesNo(tp,aux.Stringid(m,0)) then
Duel.Hint(HINT_SELECTMSG,tp,HINTMSG_DESREPLACE)
......
......@@ -90,7 +90,7 @@ function cm.stop(e,tp,eg,ep,ev,re,r,rp)
local seq1=aux.MZoneSequence(c:GetSequence())
local seq2=seq
if re:IsActiveType(TYPE_MONSTER) then seq=aux.MZoneSequence(seq) end
if ((seq1==4-seq and rp==1-tp) or seq1==seq) or (rp==tp and math.abs(c:GetSequence()-seq)<=1 and loc==LOCATION_MZONE and seq2<5) then
if ((seq1==4-seq and rp==1-tp) or (seq1==seq and rp==tp)) or (rp==tp and math.abs(c:GetSequence()-seq)<=1 and loc==LOCATION_MZONE and seq2<5) then
local ph=PHASE_END
if Duel.GetCurrentPhase()==PHASE_DRAW then ph=PHASE_STANDBY end
if Duel.GetCurrentPhase()==PHASE_STANDBY then ph=PHASE_MAIN1 end
......
......@@ -102,7 +102,7 @@ function cm.stop(e,tp,eg,ep,ev,re,r,rp)
local seq1=aux.MZoneSequence(c:GetSequence())
local seq2=seq
if re:IsActiveType(TYPE_MONSTER) then seq=aux.MZoneSequence(seq) end
if ((seq1==4-seq and rp==1-tp) or seq1==seq) or (rp==tp and math.abs(c:GetSequence()-seq)<=1 and loc==LOCATION_MZONE and seq2<5) then
if ((seq1==4-seq and rp==1-tp) or (seq1==seq and rp==tp)) or (rp==tp and math.abs(c:GetSequence()-seq)<=1 and loc==LOCATION_MZONE and seq2<5) then
if Duel.SelectOption(tp,aux.Stringid(m,0),aux.Stringid(m,1))==0 then
--disable
local e2=Effect.CreateEffect(c)
......
......@@ -98,7 +98,7 @@ function cm.stop(e,tp,eg,ep,ev,re,r,rp)
local seq1=aux.MZoneSequence(c:GetSequence())
local seq2=seq
if re:IsActiveType(TYPE_MONSTER) then seq=aux.MZoneSequence(seq) end
if ((seq1==4-seq and rp==1-tp) or seq1==seq) or (rp==tp and math.abs(c:GetSequence()-seq)<=1 and loc==LOCATION_MZONE and seq2<5) then
if ((seq1==4-seq and rp==1-tp) or (seq1==seq and rp==tp)) or (rp==tp and math.abs(c:GetSequence()-seq)<=1 and loc==LOCATION_MZONE and seq2<5) then
if Duel.SelectOption(tp,aux.Stringid(m,0),aux.Stringid(m,1))==0 then
--disable
local e2=Effect.CreateEffect(c)
......@@ -125,7 +125,7 @@ function cm.stop(e,tp,eg,ep,ev,re,r,rp)
end
else
if Duel.IsExistingMatchingCard(cm.spfilter1,tp,LOCATION_GRAVE+LOCATION_DECK,0,1,nil,e,tp)
and Duel.GetLocationCount(tp,LOCATION_MZONE)>0 and Duel.SelectYesNo(tp,aux.Stringid(m,2))then
and Duel.GetLocationCount(tp,LOCATION_MZONE)>0 and Duel.SelectYesNo(tp,aux.Stringid(m,2))then
Duel.Hint(HINT_SELECTMSG,tp,HINTMSG_SPSUMMON)
local g=Duel.SelectMatchingCard(tp,cm.spfilter1,tp,LOCATION_GRAVE+LOCATION_DECK,0,1,1,nil,e,tp)
if g: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