Commit 995fa2eb authored by POLYMER's avatar POLYMER

fix

parent b6ea531a
......@@ -350,7 +350,7 @@ function cm.thfilter2(c)
end
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
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
function cm.spop(e,tp,eg,ep,ev,re,r,rp)
Duel.Hint(HINT_SELECTMSG,tp,HINTMSG_RTOHAND)
......
......@@ -10,7 +10,7 @@ function cm.initial_effect(c)
--Activate
local e1=Effect.CreateEffect(c)
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:SetType(EFFECT_TYPE_QUICK_O)
e1:SetCode(EVENT_FREE_CHAIN)
......@@ -155,7 +155,7 @@ function Group.ForEach(group,func,...)
end
function cm.regop(e,tp,eg,ep,ev,re,r,rp)
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
local KOISHI_CHECK=false
if Card.SetCardData then KOISHI_CHECK=true end
......@@ -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))
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)
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)
end
function cm.activate(e,tp,eg,ep,ev,re,r,rp)
......@@ -285,7 +285,7 @@ function cm.d2hmatchfilter(c,cd)
return c:IsFaceup() and c:IsCode(cd)
end
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
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
......
--落徽
local m=11561052
local cm=_G["c"..m]
function cm.initial_effect(c)
function c11561052.initial_effect(c)
--Activate
local e1=Effect.CreateEffect(c)
e1:SetCategory(CATEGORY_POSITION)
e1:SetType(EFFECT_TYPE_ACTIVATE)
e1:SetCode(EVENT_SUMMON_SUCCESS)
e1:SetCountLimit(1,11561052)
......@@ -110,13 +107,13 @@ function c11561052.activate(e,tp,eg,ep,ev,re,r,rp)
Duel.Hint(HINT_SELECTMSG,tp,HINTMSG_TOFIELD)
local g2=Duel.SelectMatchingCard(tp,c11561052.mtsfilter,tp,LOCATION_MZONE,0,1,1,nil,eg)
local g=Group.__add(g1,g2)
local tc=g:GetFirst()
local ct1=g:FilterCount(c11561052.filter,nil,e,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
while tc do
Duel.MoveToField(tc,tp,tc:GetControler(),LOCATION_SZONE,POS_FACEUP,true)
for tc in aux.Next(g) do
if not tc:IsImmuneToEffect(e) then
Duel.MoveToField(tc,tp,tc:GetOwner(),LOCATION_SZONE,POS_FACEUP,true)
local e1=Effect.CreateEffect(e:GetHandler())
e1:SetCode(EFFECT_CHANGE_TYPE)
e1:SetType(EFFECT_TYPE_SINGLE)
......@@ -124,7 +121,7 @@ function c11561052.activate(e,tp,eg,ep,ev,re,r,rp)
e1:SetReset(RESET_EVENT+RESETS_STANDARD-RESET_TURN_SET)
e1:SetValue(TYPE_TRAP+TYPE_CONTINUOUS)
tc:RegisterEffect(e1)
tc=g:GetNext()
end
end
end
end
......@@ -52,7 +52,7 @@ function c49811377.putg(e,tp,eg,ep,ev,re,r,rp,chk)
e1:SetProperty(EFFECT_FLAG_CLIENT_HINT)
e1:SetReset(RESET_EVENT+RESETS_STANDARD)
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
function c49811377.puop(e,tp,eg,ep,ev,re,r,rp)
local c=e:GetHandler()
......
......@@ -52,7 +52,7 @@ function c49811378.putg(e,tp,eg,ep,ev,re,r,rp,chk)
e1:SetProperty(EFFECT_FLAG_CLIENT_HINT)
e1:SetReset(RESET_EVENT+RESETS_STANDARD)
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
function c49811378.puop(e,tp,eg,ep,ev,re,r,rp)
local c=e:GetHandler()
......
......@@ -22,7 +22,7 @@ function s.initial_effect(c)
--effect gain
local e5=Effect.CreateEffect(c)
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:SetRange(0xff)
e5:SetOperation(s.effop)
......
......@@ -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()
end
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)
end
function c98920170.recop(e,tp,eg,ep,ev,re,r,rp)
......
......@@ -45,7 +45,7 @@ function c98920392.thfilter(c,code)
end
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 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)
local g=Duel.SelectTarget(tp,c98920392.tdfilter,tp,LOCATION_GRAVE,0,1,1,nil,tp)
Duel.SetOperationInfo(0,CATEGORY_TODECK,g,1,0,0)
......
......@@ -169,6 +169,41 @@ function Auxiliary.PreloadUds()
return _IsCanBeSynchroMaterial(c,...)
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
if not Group.ForEach then
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