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)
end
function s.rmop(e,tp,eg,ep,ev,re,r,rp)
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
Duel.ShuffleExtra(1-tp)
local sg=g:RandomSelect(tp,1)
Duel.Remove(sg,POS_FACEUP,REASON_EFFECT)
local og=Duel.GetOperatedGroup()
local sc=og:GetFirst()
Duel.ConfirmCards(1-tp,og)
local sc=sg:GetFirst()
Duel.ConfirmCards(1-tp,sg)
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)
if sc:IsAttack(35) then
if #tg>0 then
......
......@@ -855,7 +855,7 @@ function cm.PrismProcOperation(e,tp,eg,ep,ev,re,r,rp,c)
end
--prism xyz multi-count xyz proc
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
function cm.PrismXyzFilter(c,xyzc)
return c:IsXyzLevel(xyzc,3) and cm.check_set_prism(c)
......@@ -1060,7 +1060,7 @@ function cm.PendOperationNanahira()
local lscale=c:GetLeftScale()
local rscale=rpz:GetRightScale()
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 mft=Duel.GetMZoneCount(tp)
cm.SetForceExtra(tp,true)
......@@ -1178,6 +1178,7 @@ function cm.NanahiraTrap(c,...)
if te:GetCode()==EVENT_FREE_CHAIN then
e1:SetHintTiming(0x1e0)
end
e1:SetCountLimit(1)
e1:SetCost(cm.SelfReleaseCost)
e1:SetCondition(function(e,tp,eg,ep,ev,re,r,rp)
if e:GetHandler():IsStatus(STATUS_BATTLE_DESTROYED) then return false end
......@@ -1813,7 +1814,7 @@ function cm.GainEffect_3L(c,tc,pres,pctlm)
e3:SetCode(EFFECT_REMOVE_TYPE)
e3:SetValue(EFFECT_NORMAL)
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)
if pres then
local info_list={
......@@ -1995,7 +1996,7 @@ function cm.ContinuousEffectOperation_3L(f,excost)
for i,te in pairs(t) do
te:SetCondition(cm.ContinuousEffectReplaceCondition_3L(f,te:GetCondition(),tc:GetOriginalCode()))
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
......@@ -2448,7 +2449,7 @@ function cm.TransformDFCCard(c)
--Duel.Hint(HINT_CARD,0,tcode)
--Duel.ConfirmCards(c:GetControler(),Group.FromCards(c))
--if c:IsLocation(LOCATION_DECK) then
-- Duel.ConfirmCards(1-c:GetControler(),Group.FromCards(c))
-- Duel.ConfirmCards(1-c:GetControler(),Group.FromCards(c))
--end
return true
end
......@@ -2467,10 +2468,10 @@ function cm.DFCBackSideCommonEffect(c)
local tcode=c.dfc_back_side
if not tcode then return end
c:SetEntityCode(tcode)
-- Duel.ConfirmCards(tp,Group.FromCards(c))
-- if c:IsLocation(LOCATION_DECK) then
-- Duel.ConfirmCards(1-tp,Group.FromCards(c))
-- end
-- Duel.ConfirmCards(tp,Group.FromCards(c))
-- if c:IsLocation(LOCATION_DECK) then
-- Duel.ConfirmCards(1-tp,Group.FromCards(c))
-- end
c:ReplaceEffect(tcode,0,0)
Duel.SetMetatable(c,_G["c"..tcode])
Duel.RaiseSingleEvent(c,EVENT_CUSTOM+37564777,c:GetReasonEffect(),c:GetReason(),c:GetReasonPlayer(),c:GetReasonPlayer(),0)
......@@ -2531,12 +2532,12 @@ function cm.RitualCheckAdditionalLevel(c,f,...)
end
end
function cm.RitualCheckAdditional(c,lv,f,gt)
if not gt then
return function(g)
if not gt then
return function(g)
return g:GetSum(cm.RitualCheckAdditionalLevel,f,c)<=lv
end
else
return function(g,ec)
return function(g,ec)
if ec then
return g:GetSum(cm.RitualCheckAdditionalLevel,f,c)-cm.RitualCheckAdditionalLevel(ec,f,c)<=lv
else
......
......@@ -68,13 +68,13 @@ function cm.srop(e,tp,eg,ep,ev,re,r,rp)
end
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()
end
function cm.rcheck(c)
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
if g:GetCount()>=3 then
g:AddCard(c)
......@@ -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)
Duel.ConfirmCards(1-tp,lg)
Duel.Hint(HINT_SELECTMSG,tp,HINTMSG_ATOHAND)
local g=Duel.GetMatchingGroup(Card.GetType,tp,LOCATION_HAND,0,nil,TYPE_MONSTER)
local dg=Duel.GetMatchingGroup(Card.GetType,tp,LOCATION_DECK,0,nil,TYPE_MONSTER)
local g=Duel.GetMatchingGroup(Card.IsType,tp,LOCATION_HAND,0,nil,TYPE_MONSTER)
local dg=Duel.GetMatchingGroup(Card.IsType,tp,LOCATION_DECK,0,nil,TYPE_MONSTER)
local ac=dg:GetFirst()
local cg=Group.CreateGroup()
for i=1,#dg do
......
......@@ -50,7 +50,8 @@ function cm.retg1(e,tp,eg,ep,ev,re,r,rp,chk)
end
function cm.retop1(e,tp,eg,ep,ev,re,r,rp)
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)
if #g~=0 and Duel.IsExistingMatchingCard(cm.ffil,tp,LOCATION_FZONE,0,1,nil) then
Duel.SendtoGrave(g,REASON_EFFECT)
......
......@@ -58,6 +58,7 @@ function cm.operation(e,tp,eg,ep,ev,re,r,rp,chk)
e6:SetProperty(EFFECT_FLAG_NO_TURN_RESET)
e6:SetCountLimit(1)
e6:SetOperation(cm.spop)
e6:SetReset(RESET_PHASE+PHASE_STANDBY,2)
Duel.RegisterEffect(e6,tp)
local e7=Effect.CreateEffect(c)
e7:SetType(EFFECT_TYPE_FIELD+EFFECT_TYPE_CONTINUOUS)
......@@ -65,8 +66,9 @@ function cm.operation(e,tp,eg,ep,ev,re,r,rp,chk)
e7:SetProperty(EFFECT_FLAG_NO_TURN_RESET)
e7:SetCountLimit(1)
e7:SetOperation(cm.spop)
e7:SetReset(RESET_PHASE+PHASE_BATTLE,2)
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
function cm.negop(e,tp,eg,ep,ev,re,r,rp)
if e:GetHandler():GetFlagEffect(m)>0 then return end
......@@ -84,7 +86,7 @@ function cm.spfilter1(c,e,tp)
end
function cm.spop(e,tp,eg,ep,ev,re,r,rp)
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.SelectYesNo(tp,aux.Stringid(m,3))then
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