Commit 995fa2eb authored by POLYMER's avatar POLYMER

fix

parent b6ea531a
...@@ -350,7 +350,7 @@ function cm.thfilter2(c) ...@@ -350,7 +350,7 @@ function cm.thfilter2(c)
end end
function cm.sptg(e,tp,eg,ep,ev,re,r,rp,chk) function cm.sptg(e,tp,eg,ep,ev,re,r,rp,chk)
if chk==0 then return Duel.IsExistingMatchingCard(cm.thfilter2,tp,LOCATION_GRAVE+LOCATION_REMOVED,0,1,nil) end if chk==0 then return Duel.IsExistingMatchingCard(cm.thfilter2,tp,LOCATION_GRAVE+LOCATION_REMOVED,0,1,nil) end
Duel.SetOperationInfo(0,CATEGORY_TOHAND,nil,1,tp,LOCATION_GRAVE+LOCATION_REMOVED) Duel.SetOperationInfo(0,CATEGORY_TODECK,nil,1,tp,LOCATION_GRAVE+LOCATION_REMOVED)
end end
function cm.spop(e,tp,eg,ep,ev,re,r,rp) function cm.spop(e,tp,eg,ep,ev,re,r,rp)
Duel.Hint(HINT_SELECTMSG,tp,HINTMSG_RTOHAND) Duel.Hint(HINT_SELECTMSG,tp,HINTMSG_RTOHAND)
......
...@@ -10,7 +10,7 @@ function cm.initial_effect(c) ...@@ -10,7 +10,7 @@ function cm.initial_effect(c)
--Activate --Activate
local e1=Effect.CreateEffect(c) local e1=Effect.CreateEffect(c)
e1:SetDescription(aux.Stringid(m,0)) e1:SetDescription(aux.Stringid(m,0))
e1:SetCategory(CATEGORY_SPECIAL_SUMMON+CATEGORY_TOHAND) e1:SetCategory(CATEGORY_SPECIAL_SUMMON+CATEGORY_TOHAND+CATEGORY_GRAVE_SPSUMMON)
e1:SetRange(LOCATION_HAND+LOCATION_GRAVE) e1:SetRange(LOCATION_HAND+LOCATION_GRAVE)
e1:SetType(EFFECT_TYPE_QUICK_O) e1:SetType(EFFECT_TYPE_QUICK_O)
e1:SetCode(EVENT_FREE_CHAIN) e1:SetCode(EVENT_FREE_CHAIN)
...@@ -146,16 +146,16 @@ function cm.etofilter(c) ...@@ -146,16 +146,16 @@ function cm.etofilter(c)
return c:IsPreviousLocation(LOCATION_EXTRA) and c:IsOnField() return c:IsPreviousLocation(LOCATION_EXTRA) and c:IsOnField()
end end
function Group.ForEach(group,func,...) function Group.ForEach(group,func,...)
if aux.GetValueType(group)=="Group" and group:GetCount()>0 then if aux.GetValueType(group)=="Group" and group:GetCount()>0 then
local d_group=group:Clone() local d_group=group:Clone()
for tc in aux.Next(d_group) do for tc in aux.Next(d_group) do
func(tc,...) func(tc,...)
end end
end end
end end
function cm.regop(e,tp,eg,ep,ev,re,r,rp) function cm.regop(e,tp,eg,ep,ev,re,r,rp)
local g=eg:Filter(cm.etofilter,nil) local g=eg:Filter(cm.etofilter,nil)
g:ForEach(Card.RegisterFlagEffect,m-2,RESET_EVENT+RESETS_STANDARD-RESET_TURN_SET,0,1) g:ForEach(Card.RegisterFlagEffect,m-2,RESET_EVENT+RESETS_WITHOUT_TEMP_REMOVE,0,1)
end end
local KOISHI_CHECK=false local KOISHI_CHECK=false
if Card.SetCardData then KOISHI_CHECK=true end if Card.SetCardData then KOISHI_CHECK=true end
...@@ -185,7 +185,7 @@ function cm.target(e,tp,eg,ep,ev,re,r,rp,chk) ...@@ -185,7 +185,7 @@ function cm.target(e,tp,eg,ep,ev,re,r,rp,chk)
c:RegisterFlagEffect(m,RESET_EVENT+0xc7a0000+RESET_PHASE+PHASE_END,EFFECT_FLAG_CLIENT_HINT,1,fid,aux.Stringid(m,2)) c:RegisterFlagEffect(m,RESET_EVENT+0xc7a0000+RESET_PHASE+PHASE_END,EFFECT_FLAG_CLIENT_HINT,1,fid,aux.Stringid(m,2))
local g=Duel.GetMatchingGroup(cm.tdfilter,tp,LOCATION_ONFIELD,LOCATION_ONFIELD,nil) local g=Duel.GetMatchingGroup(cm.tdfilter,tp,LOCATION_ONFIELD,LOCATION_ONFIELD,nil)
local g2=Duel.GetMatchingGroup(cm.spfilter,tp,LOCATION_GRAVE,LOCATION_GRAVE,nil,e,tp) local g2=Duel.GetMatchingGroup(cm.spfilter,tp,LOCATION_GRAVE,LOCATION_GRAVE,nil,e,tp)
Duel.SetOperationInfo(0,CATEGORY_SPECIAL_SUMMON,g2,1,PLAYER_ALL,LOCATION_GRAVE) --Duel.SetOperationInfo(0,CATEGORY_SPECIAL_SUMMON,g2,1,PLAYER_ALL,LOCATION_GRAVE)
Duel.SetOperationInfo(0,CATEGORY_TOHAND,g,1,PLAYER_ALL,LOCATION_MZONE) Duel.SetOperationInfo(0,CATEGORY_TOHAND,g,1,PLAYER_ALL,LOCATION_MZONE)
end end
function cm.activate(e,tp,eg,ep,ev,re,r,rp) function cm.activate(e,tp,eg,ep,ev,re,r,rp)
...@@ -285,7 +285,7 @@ function cm.d2hmatchfilter(c,cd) ...@@ -285,7 +285,7 @@ function cm.d2hmatchfilter(c,cd)
return c:IsFaceup() and c:IsCode(cd) return c:IsFaceup() and c:IsCode(cd)
end end
function cm.thfilter2(c) function cm.thfilter2(c)
return c:IsFaceup() and c:IsType(TYPE_MONSTER) return c:IsFaceup() and c:IsType(TYPE_MONSTER) and not c:IsType(TYPE_FUSION+TYPE_SYNCHRO+TYPE_XYZ+TYPE_LINK)
end end
function cm.sptg(e,tp,eg,ep,ev,re,r,rp,chk) function cm.sptg(e,tp,eg,ep,ev,re,r,rp,chk)
if chk==0 then return Duel.IsExistingMatchingCard(cm.thfilter2,tp,LOCATION_EXTRA,0,1,nil) end if chk==0 then return Duel.IsExistingMatchingCard(cm.thfilter2,tp,LOCATION_EXTRA,0,1,nil) end
......
--落徽 --落徽
local m=11561052 function c11561052.initial_effect(c)
local cm=_G["c"..m]
function cm.initial_effect(c)
--Activate --Activate
local e1=Effect.CreateEffect(c) local e1=Effect.CreateEffect(c)
e1:SetCategory(CATEGORY_POSITION)
e1:SetType(EFFECT_TYPE_ACTIVATE) e1:SetType(EFFECT_TYPE_ACTIVATE)
e1:SetCode(EVENT_SUMMON_SUCCESS) e1:SetCode(EVENT_SUMMON_SUCCESS)
e1:SetCountLimit(1,11561052) e1:SetCountLimit(1,11561052)
...@@ -110,21 +107,21 @@ function c11561052.activate(e,tp,eg,ep,ev,re,r,rp) ...@@ -110,21 +107,21 @@ function c11561052.activate(e,tp,eg,ep,ev,re,r,rp)
Duel.Hint(HINT_SELECTMSG,tp,HINTMSG_TOFIELD) Duel.Hint(HINT_SELECTMSG,tp,HINTMSG_TOFIELD)
local g2=Duel.SelectMatchingCard(tp,c11561052.mtsfilter,tp,LOCATION_MZONE,0,1,1,nil,eg) local g2=Duel.SelectMatchingCard(tp,c11561052.mtsfilter,tp,LOCATION_MZONE,0,1,1,nil,eg)
local g=Group.__add(g1,g2) local g=Group.__add(g1,g2)
local tc=g:GetFirst()
local ct1=g:FilterCount(c11561052.filter,nil,e,tp,eg) local ct1=g:FilterCount(c11561052.filter,nil,e,tp,eg)
local ct2=g:FilterCount(c11561052.filter,nil,e,1-tp,eg) local ct2=g:FilterCount(c11561052.filter,nil,e,1-tp,eg)
if Duel.GetLocationCount(tp,LOCATION_SZONE)>ct1 and Duel.GetLocationCount(1-tp,LOCATION_SZONE)>ct2 then if Duel.GetLocationCount(tp,LOCATION_SZONE)>ct1 and Duel.GetLocationCount(1-tp,LOCATION_SZONE)>ct2 then
while tc do for tc in aux.Next(g) do
Duel.MoveToField(tc,tp,tc:GetControler(),LOCATION_SZONE,POS_FACEUP,true) if not tc:IsImmuneToEffect(e) then
local e1=Effect.CreateEffect(e:GetHandler()) Duel.MoveToField(tc,tp,tc:GetOwner(),LOCATION_SZONE,POS_FACEUP,true)
e1:SetCode(EFFECT_CHANGE_TYPE) local e1=Effect.CreateEffect(e:GetHandler())
e1:SetType(EFFECT_TYPE_SINGLE) e1:SetCode(EFFECT_CHANGE_TYPE)
e1:SetProperty(EFFECT_FLAG_CANNOT_DISABLE) e1:SetType(EFFECT_TYPE_SINGLE)
e1:SetReset(RESET_EVENT+RESETS_STANDARD-RESET_TURN_SET) e1:SetProperty(EFFECT_FLAG_CANNOT_DISABLE)
e1:SetValue(TYPE_TRAP+TYPE_CONTINUOUS) e1:SetReset(RESET_EVENT+RESETS_STANDARD-RESET_TURN_SET)
tc:RegisterEffect(e1) e1:SetValue(TYPE_TRAP+TYPE_CONTINUOUS)
tc=g:GetNext() tc:RegisterEffect(e1)
end end
end
end end
end end
...@@ -52,7 +52,7 @@ function c49811377.putg(e,tp,eg,ep,ev,re,r,rp,chk) ...@@ -52,7 +52,7 @@ function c49811377.putg(e,tp,eg,ep,ev,re,r,rp,chk)
e1:SetProperty(EFFECT_FLAG_CLIENT_HINT) e1:SetProperty(EFFECT_FLAG_CLIENT_HINT)
e1:SetReset(RESET_EVENT+RESETS_STANDARD) e1:SetReset(RESET_EVENT+RESETS_STANDARD)
e:GetHandler():RegisterEffect(e1) e:GetHandler():RegisterEffect(e1)
Duel.SetOperationInfo(0,CATEGORY_TOHAND,nil,1,tp,LOCATION_DECK) Duel.SetOperationInfo(0,CATEGORY_TOGRAVE,nil,1,tp,LOCATION_DECK)
end end
function c49811377.puop(e,tp,eg,ep,ev,re,r,rp) function c49811377.puop(e,tp,eg,ep,ev,re,r,rp)
local c=e:GetHandler() local c=e:GetHandler()
......
...@@ -52,7 +52,7 @@ function c49811378.putg(e,tp,eg,ep,ev,re,r,rp,chk) ...@@ -52,7 +52,7 @@ function c49811378.putg(e,tp,eg,ep,ev,re,r,rp,chk)
e1:SetProperty(EFFECT_FLAG_CLIENT_HINT) e1:SetProperty(EFFECT_FLAG_CLIENT_HINT)
e1:SetReset(RESET_EVENT+RESETS_STANDARD) e1:SetReset(RESET_EVENT+RESETS_STANDARD)
e:GetHandler():RegisterEffect(e1) e:GetHandler():RegisterEffect(e1)
Duel.SetOperationInfo(0,CATEGORY_TOHAND,nil,1,tp,LOCATION_DECK) Duel.SetOperationInfo(0,CATEGORY_REMOVE,nil,1,tp,LOCATION_DECK)
end end
function c49811378.puop(e,tp,eg,ep,ev,re,r,rp) function c49811378.puop(e,tp,eg,ep,ev,re,r,rp)
local c=e:GetHandler() local c=e:GetHandler()
......
...@@ -22,7 +22,7 @@ function s.initial_effect(c) ...@@ -22,7 +22,7 @@ function s.initial_effect(c)
--effect gain --effect gain
local e5=Effect.CreateEffect(c) local e5=Effect.CreateEffect(c)
e5:SetType(EFFECT_TYPE_FIELD+EFFECT_TYPE_CONTINUOUS) e5:SetType(EFFECT_TYPE_FIELD+EFFECT_TYPE_CONTINUOUS)
e5:SetProperty(EFFECT_FLAG_CANNOT_DISABLE+EFFECT_FLAG_CANNOT_NEGATE+EFFECT_FLAG_SET_AVAILABLE) e5:SetProperty(EFFECT_FLAG_CANNOT_DISABLE+EFFECT_FLAG_SET_AVAILABLE)
e5:SetCode(EVENT_ADJUST) e5:SetCode(EVENT_ADJUST)
e5:SetRange(0xff) e5:SetRange(0xff)
e5:SetOperation(s.effop) e5:SetOperation(s.effop)
......
...@@ -88,7 +88,7 @@ function c98920170.thfilter1(c) ...@@ -88,7 +88,7 @@ function c98920170.thfilter1(c)
return c:IsAttribute(ATTRIBUTE_FIRE) and c:IsRace(RACE_DRAGON) and not c:IsCode(98920170) and c:IsAbleToHand() return c:IsAttribute(ATTRIBUTE_FIRE) and c:IsRace(RACE_DRAGON) and not c:IsCode(98920170) and c:IsAbleToHand()
end end
function c98920170.rectg(e,tp,eg,ep,ev,re,r,rp,chk) function c98920170.rectg(e,tp,eg,ep,ev,re,r,rp,chk)
if chk==0 then return Duel.IsExistingMatchingCard(c98920170.thfilter1,tp,LOCATION_DECK,0,1,nil) end if chk==0 then return true end
Duel.SetOperationInfo(0,CATEGORY_TOHAND,nil,1,tp,LOCATION_DECK) Duel.SetOperationInfo(0,CATEGORY_TOHAND,nil,1,tp,LOCATION_DECK)
end end
function c98920170.recop(e,tp,eg,ep,ev,re,r,rp) function c98920170.recop(e,tp,eg,ep,ev,re,r,rp)
......
...@@ -45,7 +45,7 @@ function c98920392.thfilter(c,code) ...@@ -45,7 +45,7 @@ function c98920392.thfilter(c,code)
end end
function c98920392.sstg(e,tp,eg,ep,ev,re,r,rp,chk,chkc) function c98920392.sstg(e,tp,eg,ep,ev,re,r,rp,chk,chkc)
if chkc then return chkc:IsOnField() and chkc:IsControler(tp) and c98920392.tdfilter(chkc,tp) end if chkc then return chkc:IsOnField() and chkc:IsControler(tp) and c98920392.tdfilter(chkc,tp) end
if chk==0 then return Duel.IsExistingTarget(c98920392.tdfilter,tp,LOCATION_GRAVE,0,1,nil,tp) end if chk==0 then return Duel.GetLocationCount(tp,LOCATION_SZONE)>0 and Duel.IsExistingTarget(c98920392.tdfilter,tp,LOCATION_GRAVE,0,1,nil,tp) end
Duel.Hint(HINT_SELECTMSG,tp,HINTMSG_TOGRAVE) Duel.Hint(HINT_SELECTMSG,tp,HINTMSG_TOGRAVE)
local g=Duel.SelectTarget(tp,c98920392.tdfilter,tp,LOCATION_GRAVE,0,1,1,nil,tp) local g=Duel.SelectTarget(tp,c98920392.tdfilter,tp,LOCATION_GRAVE,0,1,1,nil,tp)
Duel.SetOperationInfo(0,CATEGORY_TODECK,g,1,0,0) Duel.SetOperationInfo(0,CATEGORY_TODECK,g,1,0,0)
......
...@@ -169,6 +169,41 @@ function Auxiliary.PreloadUds() ...@@ -169,6 +169,41 @@ function Auxiliary.PreloadUds()
return _IsCanBeSynchroMaterial(c,...) return _IsCanBeSynchroMaterial(c,...)
end end
local _SendtoDeck=Duel.SendtoDeck
function Duel.SendtoDeck(g,top,...)
local cg=nil
if aux.GetValueType(g)=="Card" then
cg=Group.FromCards(g)
elseif aux.GetValueType(g)=="Group" then
cg=g
end
if cg then
local ag=cg:Filter(function(c) return c:IsLocation(LOCATION_DECK) and c:IsControler(1-top) end,nil)
if #ag>0 then
Duel.ConfirmCards(0,ag)
Duel.ConfirmCards(1,ag)
end
end
return _SendtoDeck(g,top,...)
end
local _SendtoHand=Duel.SendtoHand
function Duel.SendtoHand(g,top,...)
local cg=nil
if aux.GetValueType(g)=="Card" then
cg=Group.FromCards(g)
elseif aux.GetValueType(g)=="Group" then
cg=g
end
if cg then
local ag=cg:Filter(function(c) return c:IsLocation(LOCATION_DECK) and c:IsControler(1-top) end,nil)
if #ag>0 then
Duel.ConfirmCards(0,ag)
Duel.ConfirmCards(1,ag)
end
end
return _SendtoHand(g,top,...)
end
--From REIKAI --From REIKAI
if not Group.ForEach then if not Group.ForEach then
function Group.ForEach(group,func,...) function Group.ForEach(group,func,...)
......
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