Commit 96ee13c8 authored by mercury233's avatar mercury233

fix

parent e827b705
......@@ -16,31 +16,32 @@ function c33846209.cost(e,tp,eg,ep,ev,re,r,rp,chk)
e:SetLabel(1)
return true
end
function c33846209.desfilter(c,tc)
return c:GetEquipTarget()~=tc
function c33846209.desfilter(c,tc,ec)
return c:GetEquipTarget()~=tc and c~=ec
end
function c33846209.costfilter(c)
function c33846209.costfilter(c,ec)
if c:IsFacedown() or c:GetLevel()~=4 or not c:IsType(TYPE_DUAL) then return false end
return Duel.IsExistingTarget(c33846209.desfilter,tp,LOCATION_ONFIELD,LOCATION_ONFIELD,1,c,c)
return Duel.IsExistingTarget(c33846209.desfilter,tp,LOCATION_ONFIELD,LOCATION_ONFIELD,1,c,c,ec)
end
function c33846209.target(e,tp,eg,ep,ev,re,r,rp,chk,chkc)
if chkc then return chkc:IsOnField() and chkc~=e:GetHandler() end
local c=e:GetHandler()
if chkc then return chkc:IsOnField() and chkc~=c end
if chk==0 then
if not Duel.IsPlayerCanDraw(tp,1) then return false end
if e:GetLabel()==1 then
e:SetLabel(0)
return Duel.CheckReleaseGroup(tp,c33846209.costfilter,1,e:GetHandler())
return Duel.CheckReleaseGroup(tp,c33846209.costfilter,1,c,c)
else
return Duel.IsExistingTarget(nil,tp,LOCATION_ONFIELD,LOCATION_ONFIELD,1,e:GetHandler())
return Duel.IsExistingTarget(nil,tp,LOCATION_ONFIELD,LOCATION_ONFIELD,1,c)
end
end
if e:GetLabel()==1 then
e:SetLabel(0)
local sg=Duel.SelectReleaseGroup(tp,c33846209.costfilter,1,1,e:GetHandler())
local sg=Duel.SelectReleaseGroup(tp,c33846209.costfilter,1,1,c,c)
Duel.Release(sg,REASON_COST)
end
Duel.Hint(HINT_SELECTMSG,tp,HINTMSG_DESTROY)
local g=Duel.SelectTarget(tp,nil,tp,LOCATION_ONFIELD,LOCATION_ONFIELD,1,1,e:GetHandler())
local g=Duel.SelectTarget(tp,nil,tp,LOCATION_ONFIELD,LOCATION_ONFIELD,1,1,c)
Duel.SetOperationInfo(0,CATEGORY_DESTROY,g,1,0,0)
Duel.SetOperationInfo(0,CATEGORY_DRAW,nil,0,tp,1)
end
......
......@@ -20,32 +20,33 @@ function c4333086.cost(e,tp,eg,ep,ev,re,r,rp,chk)
e:SetLabel(1)
return true
end
function c4333086.desfilter(c,tc)
return c:GetEquipTarget()~=tc
function c4333086.desfilter(c,tc,ec)
return c:GetEquipTarget()~=tc and c~=ec
end
function c4333086.costfilter(c)
function c4333086.costfilter(c,ec)
if not c:IsRace(RACE_ZOMBIE) then return false end
return Duel.IsExistingTarget(c4333086.desfilter,tp,LOCATION_ONFIELD,LOCATION_ONFIELD,2,c,c)
return Duel.IsExistingTarget(c4333086.desfilter,tp,LOCATION_ONFIELD,LOCATION_ONFIELD,2,c,c,ec)
end
function c4333086.target(e,tp,eg,ep,ev,re,r,rp,chk,chkc)
if chkc then return chkc:IsOnField() and chkc~=e:GetHandler() end
local c=e:GetHandler()
if chkc then return chkc:IsOnField() and chkc~=c end
if chk==0 then
if e:GetLabel()==1 then
e:SetLabel(0)
return Duel.CheckReleaseGroup(tp,c4333086.costfilter,1,e:GetHandler())
return Duel.CheckReleaseGroup(tp,c4333086.costfilter,1,c,c)
and Duel.IsExistingMatchingCard(c4333086.filter,tp,LOCATION_DECK,0,1,nil)
else
return Duel.IsExistingTarget(nil,tp,LOCATION_ONFIELD,LOCATION_ONFIELD,2,e:GetHandler())
return Duel.IsExistingTarget(nil,tp,LOCATION_ONFIELD,LOCATION_ONFIELD,2,c)
and Duel.IsExistingMatchingCard(c4333086.filter,tp,LOCATION_DECK,0,1,nil)
end
end
if e:GetLabel()==1 then
e:SetLabel(0)
local sg=Duel.SelectReleaseGroup(tp,c4333086.costfilter,1,1,e:GetHandler())
local sg=Duel.SelectReleaseGroup(tp,c4333086.costfilter,1,1,c,c)
Duel.Release(sg,REASON_COST)
end
Duel.Hint(HINT_SELECTMSG,tp,HINTMSG_DESTROY)
local g=Duel.SelectTarget(tp,nil,tp,LOCATION_ONFIELD,LOCATION_ONFIELD,2,2,e:GetHandler())
local g=Duel.SelectTarget(tp,nil,tp,LOCATION_ONFIELD,LOCATION_ONFIELD,2,2,c)
Duel.SetOperationInfo(0,CATEGORY_DESTROY,g,2,0,0)
Duel.SetOperationInfo(0,CATEGORY_REMOVE,nil,1,tp,LOCATION_DECK)
end
......
......@@ -16,30 +16,31 @@ function c53567095.cost(e,tp,eg,ep,ev,re,r,rp,chk)
e:SetLabel(1)
return true
end
function c53567095.desfilter(c,tc)
return c:GetEquipTarget()~=tc
function c53567095.desfilter(c,tc,ec)
return c:GetEquipTarget()~=tc and c~=ec
end
function c53567095.costfilter(c)
function c53567095.costfilter(c,ec)
if not c:IsRace(RACE_WINDBEAST) then return false end
return Duel.IsExistingTarget(c53567095.desfilter,tp,LOCATION_ONFIELD,LOCATION_ONFIELD,2,c,c)
return Duel.IsExistingTarget(c53567095.desfilter,tp,LOCATION_ONFIELD,LOCATION_ONFIELD,2,c,c,ec)
end
function c53567095.target(e,tp,eg,ep,ev,re,r,rp,chk,chkc)
if chkc then return chkc:IsOnField() and chkc~=e:GetHandler() end
local c=e:GetHandler()
if chkc then return chkc:IsOnField() and chkc~=c end
if chk==0 then
if e:GetLabel()==1 then
e:SetLabel(0)
return Duel.CheckReleaseGroup(tp,c53567095.costfilter,1,e:GetHandler())
return Duel.CheckReleaseGroup(tp,c53567095.costfilter,1,c,c)
else
return Duel.IsExistingTarget(nil,tp,LOCATION_ONFIELD,LOCATION_ONFIELD,2,e:GetHandler())
return Duel.IsExistingTarget(nil,tp,LOCATION_ONFIELD,LOCATION_ONFIELD,2,c)
end
end
if e:GetLabel()==1 then
e:SetLabel(0)
local sg=Duel.SelectReleaseGroup(tp,c53567095.costfilter,1,1,e:GetHandler())
local sg=Duel.SelectReleaseGroup(tp,c53567095.costfilter,1,1,c,c)
Duel.Release(sg,REASON_COST)
end
Duel.Hint(HINT_SELECTMSG,tp,HINTMSG_DESTROY)
local g=Duel.SelectTarget(tp,nil,tp,LOCATION_ONFIELD,LOCATION_ONFIELD,2,2,e:GetHandler())
local g=Duel.SelectTarget(tp,nil,tp,LOCATION_ONFIELD,LOCATION_ONFIELD,2,2,c)
Duel.SetOperationInfo(0,CATEGORY_DESTROY,g,2,0,0)
end
function c53567095.activate(e,tp,eg,ep,ev,re,r,rp)
......
......@@ -25,31 +25,32 @@ function c5795980.cost(e,tp,eg,ep,ev,re,r,rp,chk)
e:SetLabel(1)
return true
end
function c5795980.cfilter(c)
function c5795980.cfilter(c,ec)
if c:IsFacedown() or not c:IsLevelAbove(5) or not c:IsSummonType(SUMMON_TYPE_NORMAL) then return false end
return Duel.IsExistingTarget(c5795980.tgfilter,tp,LOCATION_ONFIELD,LOCATION_ONFIELD,1,c,c)
return Duel.IsExistingTarget(c5795980.tgfilter,tp,LOCATION_ONFIELD,LOCATION_ONFIELD,1,c,c,ec)
end
function c5795980.tgfilter(c,tc)
return aux.disfilter1(c) and c:GetEquipTarget()~=tc
function c5795980.tgfilter(c,tc,ec)
return aux.disfilter1(c) and c:GetEquipTarget()~=tc and c~=ec
end
function c5795980.target(e,tp,eg,ep,ev,re,r,rp,chk,chkc)
if chkc then return chkc:IsOnField() and aux.disfilter1(chkc) and chkc~=e:GetHandler() end
local c=e:GetHandler()
if chkc then return chkc:IsOnField() and aux.disfilter1(chkc) and chkc~=c end
if chk==0 then
if not Duel.IsPlayerCanDraw(tp,1) then return false end
if e:GetLabel()==1 then
e:SetLabel(0)
return Duel.CheckReleaseGroup(tp,c5795980.cfilter,1,e:GetHandler())
return Duel.CheckReleaseGroup(tp,c5795980.cfilter,1,c,c)
else
return Duel.IsExistingTarget(aux.disfilter1,tp,LOCATION_ONFIELD,LOCATION_ONFIELD,1,e:GetHandler())
return Duel.IsExistingTarget(aux.disfilter1,tp,LOCATION_ONFIELD,LOCATION_ONFIELD,1,c)
end
end
if e:GetLabel()==1 then
e:SetLabel(0)
local sg=Duel.SelectReleaseGroup(tp,c5795980.cfilter,1,1,e:GetHandler())
local sg=Duel.SelectReleaseGroup(tp,c5795980.cfilter,1,1,c,c)
Duel.Release(sg,REASON_COST)
end
Duel.Hint(HINT_SELECTMSG,tp,HINTMSG_FACEUP)
local g=Duel.SelectTarget(tp,aux.disfilter1,tp,LOCATION_ONFIELD,LOCATION_ONFIELD,1,1,e:GetHandler())
local g=Duel.SelectTarget(tp,aux.disfilter1,tp,LOCATION_ONFIELD,LOCATION_ONFIELD,1,1,c)
Duel.SetOperationInfo(0,CATEGORY_DISABLE,g,1,0,0)
Duel.SetOperationInfo(0,CATEGORY_DRAW,nil,0,tp,1)
end
......
......@@ -16,31 +16,32 @@ function c58873391.cost(e,tp,eg,ep,ev,re,r,rp,chk)
e:SetLabel(1)
return true
end
function c58873391.desfilter(c,tc)
return c:GetEquipTarget()~=tc
function c58873391.desfilter(c,tc,ec)
return c:GetEquipTarget()~=tc and c~=ec
end
function c58873391.costfilter(c)
function c58873391.costfilter(c,ec)
if not c:IsRace(RACE_FISH) then return false end
return Duel.IsExistingTarget(c58873391.desfilter,tp,LOCATION_ONFIELD,LOCATION_ONFIELD,1,c,c)
return Duel.IsExistingTarget(c58873391.desfilter,tp,LOCATION_ONFIELD,LOCATION_ONFIELD,1,c,c,ec)
end
function c58873391.target(e,tp,eg,ep,ev,re,r,rp,chk,chkc)
if chkc then return chkc:IsOnField() and chkc~=e:GetHandler() end
local c=e:GetHandler()
if chkc then return chkc:IsOnField() and chkc~=c end
if chk==0 then
if not Duel.IsPlayerCanDraw(tp,1) then return false end
if e:GetLabel()==1 then
e:SetLabel(0)
return Duel.CheckReleaseGroup(tp,c58873391.costfilter,1,e:GetHandler())
return Duel.CheckReleaseGroup(tp,c58873391.costfilter,1,c,c)
else
return Duel.IsExistingTarget(nil,tp,LOCATION_ONFIELD,LOCATION_ONFIELD,1,e:GetHandler())
return Duel.IsExistingTarget(nil,tp,LOCATION_ONFIELD,LOCATION_ONFIELD,1,c)
end
end
if e:GetLabel()==1 then
e:SetLabel(0)
local sg=Duel.SelectReleaseGroup(tp,c58873391.costfilter,1,1,e:GetHandler())
local sg=Duel.SelectReleaseGroup(tp,c58873391.costfilter,1,1,c,c)
Duel.Release(sg,REASON_COST)
end
Duel.Hint(HINT_SELECTMSG,tp,HINTMSG_DESTROY)
local g=Duel.SelectTarget(tp,nil,tp,LOCATION_ONFIELD,LOCATION_ONFIELD,1,1,e:GetHandler())
local g=Duel.SelectTarget(tp,nil,tp,LOCATION_ONFIELD,LOCATION_ONFIELD,1,1,c)
Duel.SetOperationInfo(0,CATEGORY_DESTROY,g,1,0,0)
Duel.SetOperationInfo(0,CATEGORY_DRAW,nil,0,tp,1)
end
......
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