Commit 77a8092b authored by 聖園ミカ's avatar 聖園ミカ 🐟

byd

parent ee75e408
...@@ -58,15 +58,15 @@ function s.rmtg(e,tp,eg,ep,ev,re,r,rp,chk) ...@@ -58,15 +58,15 @@ function s.rmtg(e,tp,eg,ep,ev,re,r,rp,chk)
end end
function s.rmop(e,tp,eg,ep,ev,re,r,rp) function s.rmop(e,tp,eg,ep,ev,re,r,rp)
local c=e:GetHandler() local c=e:GetHandler()
local g=Duel.GetMatchingGroup(Card.IsFacedown,tp,LOCATION_EXTRA,0,nil) local g=Duel.GetMatchingGroup(s.rmfilter,tp,LOCATION_EXTRA,0,nil)
if g:GetCount()>0 then if g:GetCount()>0 then
Duel.ShuffleExtra(1-tp)
local sg=g:RandomSelect(tp,1) local sg=g:RandomSelect(tp,1)
Duel.Remove(sg,POS_FACEUP,REASON_EFFECT) Duel.Remove(sg,POS_FACEUP,REASON_EFFECT)
local og=Duel.GetOperatedGroup() local sc=sg:GetFirst()
local sc=og:GetFirst() Duel.ConfirmCards(1-tp,sg)
Duel.ConfirmCards(1-tp,og)
Duel.Hint(HINT_CARD,0,sc:GetOriginalCode()) Duel.Hint(HINT_CARD,0,sc:GetOriginalCode())
local tg=Duel.GetMatchingGroup(Card.IsAbleToDeck,tp,LOCATION_GRAVE+LOCATION_REMOVED,0,nil) local tg=Duel.GetMatchingGroup(aux.AND(Card.IsAbleToDeck,Card.IsFaceupEx),tp,LOCATION_GRAVE+LOCATION_REMOVED,0,nil)
local exg=Duel.GetMatchingGroup(Card.IsAbleToRemove,tp,LOCATION_EXTRA,0,nil) local exg=Duel.GetMatchingGroup(Card.IsAbleToRemove,tp,LOCATION_EXTRA,0,nil)
if sc:IsAttack(35) then if sc:IsAttack(35) then
if #tg>0 then if #tg>0 then
......
...@@ -855,7 +855,7 @@ function cm.PrismProcOperation(e,tp,eg,ep,ev,re,r,rp,c) ...@@ -855,7 +855,7 @@ function cm.PrismProcOperation(e,tp,eg,ep,ev,re,r,rp,c)
end end
--prism xyz multi-count xyz proc --prism xyz multi-count xyz proc
function cm.PrismXyzProcedure(c,min,max) function cm.PrismXyzProcedure(c,min,max)
cm.AddXyzProcedureCustom(c,cm.PrismXyzFilter,cm.PrismXyzCheck(min,max),1,max) cm.AddXyzProcedureCustom(c,cm.PrismXyzFilter,cm.PrismXyzCheck(min,max),1,max)
end end
function cm.PrismXyzFilter(c,xyzc) function cm.PrismXyzFilter(c,xyzc)
return c:IsXyzLevel(xyzc,3) and cm.check_set_prism(c) return c:IsXyzLevel(xyzc,3) and cm.check_set_prism(c)
...@@ -1060,7 +1060,7 @@ function cm.PendOperationNanahira() ...@@ -1060,7 +1060,7 @@ function cm.PendOperationNanahira()
local lscale=c:GetLeftScale() local lscale=c:GetLeftScale()
local rscale=rpz:GetRightScale() local rscale=rpz:GetRightScale()
if lscale>rscale then lscale,rscale=rscale,lscale end if lscale>rscale then lscale,rscale=rscale,lscale end
local eset={Duel.IsPlayerAffectedByEffect(tp,EFFECT_EXTRA_PENDULUM_SUMMON)} local eset={Duel.IsPlayerAffectedByEffect(tp,EFFECT_EXTRA_PENDULUM_SUMMON)}
local ft=Duel.GetUsableMZoneCount(tp) local ft=Duel.GetUsableMZoneCount(tp)
local mft=Duel.GetMZoneCount(tp) local mft=Duel.GetMZoneCount(tp)
cm.SetForceExtra(tp,true) cm.SetForceExtra(tp,true)
...@@ -1178,6 +1178,7 @@ function cm.NanahiraTrap(c,...) ...@@ -1178,6 +1178,7 @@ function cm.NanahiraTrap(c,...)
if te:GetCode()==EVENT_FREE_CHAIN then if te:GetCode()==EVENT_FREE_CHAIN then
e1:SetHintTiming(0x1e0) e1:SetHintTiming(0x1e0)
end end
e1:SetCountLimit(1)
e1:SetCost(cm.SelfReleaseCost) e1:SetCost(cm.SelfReleaseCost)
e1:SetCondition(function(e,tp,eg,ep,ev,re,r,rp) e1:SetCondition(function(e,tp,eg,ep,ev,re,r,rp)
if e:GetHandler():IsStatus(STATUS_BATTLE_DESTROYED) then return false end if e:GetHandler():IsStatus(STATUS_BATTLE_DESTROYED) then return false end
...@@ -1813,7 +1814,7 @@ function cm.GainEffect_3L(c,tc,pres,pctlm) ...@@ -1813,7 +1814,7 @@ function cm.GainEffect_3L(c,tc,pres,pctlm)
e3:SetCode(EFFECT_REMOVE_TYPE) e3:SetCode(EFFECT_REMOVE_TYPE)
e3:SetValue(EFFECT_NORMAL) e3:SetValue(EFFECT_NORMAL)
c:RegisterEffect(e3,true) c:RegisterEffect(e3,true)
table.insert(efft,e3) table.insert(efft,e3)
c:RegisterFlagEffect(cd-4000,RESET_EVENT+0x1fe0000,EFFECT_FLAG_CLIENT_HINT,1,cm.order_table_new(efft),cd*16+1) c:RegisterFlagEffect(cd-4000,RESET_EVENT+0x1fe0000,EFFECT_FLAG_CLIENT_HINT,1,cm.order_table_new(efft),cd*16+1)
if pres then if pres then
local info_list={ local info_list={
...@@ -1995,7 +1996,7 @@ function cm.ContinuousEffectOperation_3L(f,excost) ...@@ -1995,7 +1996,7 @@ function cm.ContinuousEffectOperation_3L(f,excost)
for i,te in pairs(t) do for i,te in pairs(t) do
te:SetCondition(cm.ContinuousEffectReplaceCondition_3L(f,te:GetCondition(),tc:GetOriginalCode())) te:SetCondition(cm.ContinuousEffectReplaceCondition_3L(f,te:GetCondition(),tc:GetOriginalCode()))
if te:IsHasType(0x7e0) then if te:IsHasType(0x7e0) then
te:SetCost(cm.MergeCost(cm.CountCost_3L(tc:GetOriginalCode(),tc.single_effect_3L),te:GetCost(),excost(tc))) te:SetCost(cm.MergeCost(cm.CountCost_3L(tc:GetOriginalCode(),tc.single_effect_3L),te:GetCost(),excost(tc)))
end end
end end
end end
...@@ -2448,7 +2449,7 @@ function cm.TransformDFCCard(c) ...@@ -2448,7 +2449,7 @@ function cm.TransformDFCCard(c)
--Duel.Hint(HINT_CARD,0,tcode) --Duel.Hint(HINT_CARD,0,tcode)
--Duel.ConfirmCards(c:GetControler(),Group.FromCards(c)) --Duel.ConfirmCards(c:GetControler(),Group.FromCards(c))
--if c:IsLocation(LOCATION_DECK) then --if c:IsLocation(LOCATION_DECK) then
-- Duel.ConfirmCards(1-c:GetControler(),Group.FromCards(c)) -- Duel.ConfirmCards(1-c:GetControler(),Group.FromCards(c))
--end --end
return true return true
end end
...@@ -2467,10 +2468,10 @@ function cm.DFCBackSideCommonEffect(c) ...@@ -2467,10 +2468,10 @@ function cm.DFCBackSideCommonEffect(c)
local tcode=c.dfc_back_side local tcode=c.dfc_back_side
if not tcode then return end if not tcode then return end
c:SetEntityCode(tcode) c:SetEntityCode(tcode)
-- Duel.ConfirmCards(tp,Group.FromCards(c)) -- Duel.ConfirmCards(tp,Group.FromCards(c))
-- if c:IsLocation(LOCATION_DECK) then -- if c:IsLocation(LOCATION_DECK) then
-- Duel.ConfirmCards(1-tp,Group.FromCards(c)) -- Duel.ConfirmCards(1-tp,Group.FromCards(c))
-- end -- end
c:ReplaceEffect(tcode,0,0) c:ReplaceEffect(tcode,0,0)
Duel.SetMetatable(c,_G["c"..tcode]) Duel.SetMetatable(c,_G["c"..tcode])
Duel.RaiseSingleEvent(c,EVENT_CUSTOM+37564777,c:GetReasonEffect(),c:GetReason(),c:GetReasonPlayer(),c:GetReasonPlayer(),0) Duel.RaiseSingleEvent(c,EVENT_CUSTOM+37564777,c:GetReasonEffect(),c:GetReason(),c:GetReasonPlayer(),c:GetReasonPlayer(),0)
...@@ -2531,12 +2532,12 @@ function cm.RitualCheckAdditionalLevel(c,f,...) ...@@ -2531,12 +2532,12 @@ function cm.RitualCheckAdditionalLevel(c,f,...)
end end
end end
function cm.RitualCheckAdditional(c,lv,f,gt) function cm.RitualCheckAdditional(c,lv,f,gt)
if not gt then if not gt then
return function(g) return function(g)
return g:GetSum(cm.RitualCheckAdditionalLevel,f,c)<=lv return g:GetSum(cm.RitualCheckAdditionalLevel,f,c)<=lv
end end
else else
return function(g,ec) return function(g,ec)
if ec then if ec then
return g:GetSum(cm.RitualCheckAdditionalLevel,f,c)-cm.RitualCheckAdditionalLevel(ec,f,c)<=lv return g:GetSum(cm.RitualCheckAdditionalLevel,f,c)-cm.RitualCheckAdditionalLevel(ec,f,c)<=lv
else else
......
...@@ -68,13 +68,13 @@ function cm.srop(e,tp,eg,ep,ev,re,r,rp) ...@@ -68,13 +68,13 @@ function cm.srop(e,tp,eg,ep,ev,re,r,rp)
end end
function cm.con(e,tp,eg,ep,ev,re,r,rp) function cm.con(e,tp,eg,ep,ev,re,r,rp)
local g=Duel.GetMatchingGroup(Card.GetType,tp,LOCATION_HAND,0,nil,TYPE_MONSTER) local g=Duel.GetMatchingGroup(Card.IsType,tp,LOCATION_HAND,0,nil,TYPE_MONSTER)
return g:GetClassCount(Card.GetRace)==g:GetCount() and g:GetClassCount(Card.GetAttribute)==g:GetCount() return g:GetClassCount(Card.GetRace)==g:GetCount() and g:GetClassCount(Card.GetAttribute)==g:GetCount()
end end
function cm.rcheck(c) function cm.rcheck(c)
local tp=c:GetControler() local tp=c:GetControler()
local g=Duel.GetMatchingGroup(Card.GetType,tp,LOCATION_HAND,0,nil,TYPE_MONSTER) local g=Duel.GetMatchingGroup(Card.IsType,tp,LOCATION_HAND,0,nil,TYPE_MONSTER)
local tf=false local tf=false
if g:GetCount()>=3 then if g:GetCount()>=3 then
g:AddCard(c) g:AddCard(c)
...@@ -92,8 +92,8 @@ function cm.thop(e,tp,eg,ep,ev,re,r,rp) ...@@ -92,8 +92,8 @@ function cm.thop(e,tp,eg,ep,ev,re,r,rp)
local lg=Duel.GetMatchingGroup(nil,tp,LOCATION_HAND,0,nil) local lg=Duel.GetMatchingGroup(nil,tp,LOCATION_HAND,0,nil)
Duel.ConfirmCards(1-tp,lg) Duel.ConfirmCards(1-tp,lg)
Duel.Hint(HINT_SELECTMSG,tp,HINTMSG_ATOHAND) Duel.Hint(HINT_SELECTMSG,tp,HINTMSG_ATOHAND)
local g=Duel.GetMatchingGroup(Card.GetType,tp,LOCATION_HAND,0,nil,TYPE_MONSTER) local g=Duel.GetMatchingGroup(Card.IsType,tp,LOCATION_HAND,0,nil,TYPE_MONSTER)
local dg=Duel.GetMatchingGroup(Card.GetType,tp,LOCATION_DECK,0,nil,TYPE_MONSTER) local dg=Duel.GetMatchingGroup(Card.IsType,tp,LOCATION_DECK,0,nil,TYPE_MONSTER)
local ac=dg:GetFirst() local ac=dg:GetFirst()
local cg=Group.CreateGroup() local cg=Group.CreateGroup()
for i=1,#dg do for i=1,#dg do
......
...@@ -50,7 +50,8 @@ function cm.retg1(e,tp,eg,ep,ev,re,r,rp,chk) ...@@ -50,7 +50,8 @@ function cm.retg1(e,tp,eg,ep,ev,re,r,rp,chk)
end end
function cm.retop1(e,tp,eg,ep,ev,re,r,rp) function cm.retop1(e,tp,eg,ep,ev,re,r,rp)
local c=e:GetHandler() local c=e:GetHandler()
if Duel.SpecialSummon(c,0,tp,tp,false,false,POS_FACEUP)~=0 then if Duel.SelectYesNo(tp,aux.Stringid(m,2)) then
Duel.SpecialSummon(c,0,tp,tp,false,false,POS_FACEUP)
local g=Duel.GetMatchingGroup(aux.TRUE,tp,0,LOCATION_ONFIELD,nil) local g=Duel.GetMatchingGroup(aux.TRUE,tp,0,LOCATION_ONFIELD,nil)
if #g~=0 and Duel.IsExistingMatchingCard(cm.ffil,tp,LOCATION_FZONE,0,1,nil) then if #g~=0 and Duel.IsExistingMatchingCard(cm.ffil,tp,LOCATION_FZONE,0,1,nil) then
Duel.SendtoGrave(g,REASON_EFFECT) Duel.SendtoGrave(g,REASON_EFFECT)
......
...@@ -58,6 +58,7 @@ function cm.operation(e,tp,eg,ep,ev,re,r,rp,chk) ...@@ -58,6 +58,7 @@ function cm.operation(e,tp,eg,ep,ev,re,r,rp,chk)
e6:SetProperty(EFFECT_FLAG_NO_TURN_RESET) e6:SetProperty(EFFECT_FLAG_NO_TURN_RESET)
e6:SetCountLimit(1) e6:SetCountLimit(1)
e6:SetOperation(cm.spop) e6:SetOperation(cm.spop)
e6:SetReset(RESET_PHASE+PHASE_STANDBY,2)
Duel.RegisterEffect(e6,tp) Duel.RegisterEffect(e6,tp)
local e7=Effect.CreateEffect(c) local e7=Effect.CreateEffect(c)
e7:SetType(EFFECT_TYPE_FIELD+EFFECT_TYPE_CONTINUOUS) e7:SetType(EFFECT_TYPE_FIELD+EFFECT_TYPE_CONTINUOUS)
...@@ -65,8 +66,9 @@ function cm.operation(e,tp,eg,ep,ev,re,r,rp,chk) ...@@ -65,8 +66,9 @@ function cm.operation(e,tp,eg,ep,ev,re,r,rp,chk)
e7:SetProperty(EFFECT_FLAG_NO_TURN_RESET) e7:SetProperty(EFFECT_FLAG_NO_TURN_RESET)
e7:SetCountLimit(1) e7:SetCountLimit(1)
e7:SetOperation(cm.spop) e7:SetOperation(cm.spop)
e7:SetReset(RESET_PHASE+PHASE_BATTLE,2)
Duel.RegisterEffect(e7,tp) Duel.RegisterEffect(e7,tp)
c:RegisterFlagEffect(m+1,RESET_EVENT+RESETS_STANDARD,0,0,0,0) c:RegisterFlagEffect(m+1,RESET_EVENT+RESETS_STANDARD,0,0,0,0)
end end
function cm.negop(e,tp,eg,ep,ev,re,r,rp) function cm.negop(e,tp,eg,ep,ev,re,r,rp)
if e:GetHandler():GetFlagEffect(m)>0 then return end if e:GetHandler():GetFlagEffect(m)>0 then return end
...@@ -84,7 +86,7 @@ function cm.spfilter1(c,e,tp) ...@@ -84,7 +86,7 @@ function cm.spfilter1(c,e,tp)
end end
function cm.spop(e,tp,eg,ep,ev,re,r,rp) function cm.spop(e,tp,eg,ep,ev,re,r,rp)
local c=e:GetHandler() local c=e:GetHandler()
if c:GetFlagEffect(m+1)>0 and Duel.GetLocationCount(tp,LOCATION_MZONE)>0 if c:GetFlagEffect(m+1)>0 and Duel.GetTurnCount()-c:GetTurnID()==1 and Duel.GetLocationCount(tp,LOCATION_MZONE)>0
and Duel.IsExistingMatchingCard(cm.spfilter1,tp,LOCATION_REMOVED,LOCATION_REMOVED,1,nil,e,tp) and Duel.IsExistingMatchingCard(cm.spfilter1,tp,LOCATION_REMOVED,LOCATION_REMOVED,1,nil,e,tp)
and Duel.SelectYesNo(tp,aux.Stringid(m,3))then and Duel.SelectYesNo(tp,aux.Stringid(m,3))then
Duel.Hint(HINT_SELECTMSG,tp,HINTMSG_SPSUMMON) Duel.Hint(HINT_SELECTMSG,tp,HINTMSG_SPSUMMON)
......
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