Commit 87327553 authored by chronogenexx's avatar chronogenexx

fix opponent release

parent d1061d35
......@@ -40,11 +40,11 @@ end
function c102380.spcon(e,c)
if c==nil then return true end
local tp=c:GetControler()
local rg=Duel.GetMatchingGroup(Card.IsReleasable,tp,0,LOCATION_MZONE,nil)
local rg=Duel.GetMatchingGroup(Card.IsReleasable,tp,0,LOCATION_MZONE,nil,REASON_SPSUMMON)
return rg:CheckSubGroup(c102380.fselect,2,2,tp)
end
function c102380.sptg(e,tp,eg,ep,ev,re,r,rp,chk,c)
local rg=Duel.GetMatchingGroup(Card.IsReleasable,tp,0,LOCATION_MZONE,nil)
local rg=Duel.GetMatchingGroup(Card.IsReleasable,tp,0,LOCATION_MZONE,nil,REASON_SPSUMMON)
Duel.Hint(HINT_SELECTMSG,tp,HINTMSG_RELEASE)
local sg=rg:SelectSubGroup(tp,c102380.fselect,true,2,2,tp)
if sg then
......@@ -55,7 +55,7 @@ function c102380.sptg(e,tp,eg,ep,ev,re,r,rp,chk,c)
end
function c102380.spop(e,tp,eg,ep,ev,re,r,rp,c)
local g=e:GetLabelObject()
Duel.Release(g,REASON_COST)
Duel.Release(g,REASON_SPSUMMON)
g:DeleteGroup()
end
function c102380.damcon(e,tp,eg,ep,ev,re,r,rp)
......
......@@ -32,7 +32,7 @@ function c16886617.initial_effect(c)
c:RegisterEffect(e5)
end
function c16886617.rfilter(c)
return c:IsFaceup() and c:IsAttack(0) and c:IsReleasable()
return c:IsFaceup() and c:IsAttack(0) and c:IsReleasable(REASON_SPSUMMON)
end
function c16886617.spcon(e,c)
if c==nil then return true end
......@@ -52,7 +52,7 @@ function c16886617.sptg(e,tp,eg,ep,ev,re,r,rp,chk,c)
end
function c16886617.spop(e,tp,eg,ep,ev,re,r,rp,c)
local g=e:GetLabelObject()
Duel.Release(g,REASON_COST)
Duel.Release(g,REASON_SPSUMMON)
g:DeleteGroup()
end
function c16886617.desfilter(c)
......
......@@ -19,7 +19,7 @@ function c22138839.initial_effect(c)
c:RegisterEffect(e2)
end
function c22138839.rfilter(c)
return c:GetCounter(0x1041)>0 and c:IsReleasable()
return c:GetCounter(0x1041)>0 and c:IsReleasable(REASON_SPSUMMON)
end
function c22138839.hspcon(e,c)
if c==nil then return true end
......@@ -30,7 +30,7 @@ end
function c22138839.hspop(e,tp,eg,ep,ev,re,r,rp,c)
Duel.Hint(HINT_SELECTMSG,tp,HINTMSG_RELEASE)
local g=Duel.SelectMatchingCard(tp,c22138839.rfilter,tp,0,LOCATION_MZONE,1,1,nil)
Duel.Release(g,REASON_COST)
Duel.Release(g,REASON_SPSUMMON)
end
function c22138839.ccon(e,tp,eg,ep,ev,re,r,rp)
return e:GetHandler():IsPreviousLocation(LOCATION_ONFIELD)
......
......@@ -36,7 +36,7 @@ function c25920413.initial_effect(c)
end
c25920413.counter_add_list={0x100e}
function c25920413.spfilter(c)
return c:IsLevelBelow(3) and c:IsFaceup() and c:IsReleasable()
return c:IsLevelBelow(3) and c:IsFaceup() and c:IsReleasable(REASON_SPSUMMON)
end
function c25920413.spcon(e,c)
if c==nil then return true end
......@@ -47,7 +47,7 @@ end
function c25920413.spop(e,tp,eg,ep,ev,re,r,rp,c)
Duel.Hint(HINT_SELECTMSG,tp,HINTMSG_RELEASE)
local g=Duel.SelectMatchingCard(c:GetControler(),c25920413.spfilter,c:GetControler(),0,LOCATION_MZONE,1,1,nil)
Duel.Release(g,REASON_COST)
Duel.Release(g,REASON_SPSUMMON)
local e1=Effect.CreateEffect(c)
e1:SetType(EFFECT_TYPE_FIELD)
e1:SetCode(EFFECT_CANNOT_SUMMON)
......
......@@ -32,7 +32,7 @@ function c28674152.initial_effect(c)
c:RegisterEffect(e3)
end
function c28674152.spfilter(c,tp)
return c:IsReleasable() and Duel.GetMZoneCount(1-tp,c,tp)>0
return c:IsReleasable(REASON_SPSUMMON) and Duel.GetMZoneCount(1-tp,c,tp)>0
end
function c28674152.spcon(e,c)
if c==nil then return true end
......@@ -42,7 +42,7 @@ end
function c28674152.spop(e,tp,eg,ep,ev,re,r,rp,c)
Duel.Hint(HINT_SELECTMSG,tp,HINTMSG_RELEASE)
local g=Duel.SelectMatchingCard(tp,c28674152.spfilter,tp,0,LOCATION_MZONE,1,1,nil,tp)
Duel.Release(g,REASON_COST)
Duel.Release(g,REASON_SPSUMMON)
end
function c28674152.cfilter(c)
return c:IsFaceup() and c:IsSetCard(0xd3)
......
......@@ -34,7 +34,7 @@ function c29726552.initial_effect(c)
c:RegisterEffect(e4)
end
function c29726552.spfilter(c,tp)
return c:IsReleasable() and Duel.GetMZoneCount(1-tp,c,tp)>0
return c:IsReleasable(REASON_SPSUMMON) and Duel.GetMZoneCount(1-tp,c,tp)>0
end
function c29726552.spcon(e,c)
if c==nil then return true end
......@@ -44,7 +44,7 @@ end
function c29726552.spop(e,tp,eg,ep,ev,re,r,rp,c)
Duel.Hint(HINT_SELECTMSG,tp,HINTMSG_RELEASE)
local g=Duel.SelectMatchingCard(tp,c29726552.spfilter,tp,0,LOCATION_MZONE,1,1,nil,tp)
Duel.Release(g,REASON_COST)
Duel.Release(g,REASON_SPSUMMON)
end
function c29726552.cfilter(c)
return c:IsFaceup() and c:IsSetCard(0xd3)
......
......@@ -38,7 +38,7 @@ function c33331231.checkfilter(c)
return c:IsSetCard(0x1115) and c:IsFaceup()
end
function c33331231.sprfilter(c,tp,sp)
return c:IsReleasable() and Duel.GetMZoneCount(tp,c,sp)>0
return c:IsReleasable(REASON_SPSUMMON) and Duel.GetMZoneCount(tp,c,sp)>0
end
function c33331231.spcon(e,c)
if c==nil then return true end
......@@ -49,7 +49,7 @@ end
function c33331231.spop(e,tp,eg,ep,ev,re,r,rp,c)
Duel.Hint(HINT_SELECTMSG,tp,HINTMSG_RELEASE)
local g=Duel.SelectMatchingCard(tp,c33331231.sprfilter,tp,LOCATION_MZONE,0,1,1,nil,tp,tp)
Duel.Release(g,REASON_COST)
Duel.Release(g,REASON_SPSUMMON)
end
function c33331231.spcon2(e,c)
if c==nil then return true end
......@@ -60,7 +60,7 @@ end
function c33331231.spop2(e,tp,eg,ep,ev,re,r,rp,c)
Duel.Hint(HINT_SELECTMSG,tp,HINTMSG_RELEASE)
local g=Duel.SelectMatchingCard(tp,c33331231.sprfilter,tp,0,LOCATION_MZONE,1,1,nil,1-tp,tp)
Duel.Release(g,REASON_COST)
Duel.Release(g,REASON_SPSUMMON)
end
function c33331231.dstg(e,tp,eg,ep,ev,re,r,rp,chk,chkc)
if chkc then return chkc:IsControler(1-tp) and chkc:IsOnField() end
......
......@@ -61,11 +61,11 @@ function s.sprcon(e,c)
local r2=Duel.GetMatchingGroupCount(s.rfilter,tp,0,LOCATION_MZONE,nil,1-tp)
if t1-r1+1 > t2-r2 then return false end
end
return rg:GetCount()>0 and rg:FilterCount(Card.IsReleasable,nil)==rg:GetCount() and aux.mzctcheck(rg,tp)
return rg:GetCount()>0 and rg:FilterCount(Card.IsReleasable,nil,REASON_SPSUMMON)==rg:GetCount() and aux.mzctcheck(rg,tp)
end
function s.sprop(e,tp,eg,ep,ev,re,r,rp,c)
local rg=Duel.GetMatchingGroup(s.rfilter,tp,LOCATION_MZONE,LOCATION_MZONE,nil,1-tp)
Duel.Release(rg,REASON_COST)
Duel.Release(rg,REASON_SPSUMMON)
local e1=Effect.CreateEffect(c)
e1:SetType(EFFECT_TYPE_SINGLE)
e1:SetCode(EFFECT_UPDATE_ATTACK)
......
......@@ -36,7 +36,7 @@ function c36956512.initial_effect(c)
c:RegisterEffect(e3)
end
function c36956512.spfilter(c,tp)
return c:IsReleasable() and Duel.GetMZoneCount(1-tp,c,tp)>0
return c:IsReleasable(REASON_SPSUMMON) and Duel.GetMZoneCount(1-tp,c,tp)>0
end
function c36956512.spcon(e,c)
if c==nil then return true end
......@@ -46,7 +46,7 @@ end
function c36956512.spop(e,tp,eg,ep,ev,re,r,rp,c)
Duel.Hint(HINT_SELECTMSG,tp,HINTMSG_RELEASE)
local g=Duel.SelectMatchingCard(tp,c36956512.spfilter,tp,0,LOCATION_MZONE,1,1,nil,tp)
Duel.Release(g,REASON_COST)
Duel.Release(g,REASON_SPSUMMON)
end
function c36956512.cfilter(c)
return c:IsFaceup() and c:IsSetCard(0xd3)
......
......@@ -12,7 +12,7 @@ function c46565218.initial_effect(c)
c:RegisterEffect(e1)
end
function c46565218.spfilter(c,tp)
return c:IsReleasable() and Duel.GetMZoneCount(1-tp,c,tp)>0
return c:IsReleasable(REASON_SPSUMMON) and Duel.GetMZoneCount(1-tp,c,tp)>0
end
function c46565218.spcon(e,c)
if c==nil then return true end
......@@ -22,7 +22,7 @@ end
function c46565218.spop(e,tp,eg,ep,ev,re,r,rp,c)
Duel.Hint(HINT_SELECTMSG,tp,HINTMSG_RELEASE)
local g=Duel.SelectMatchingCard(tp,c46565218.spfilter,tp,0,LOCATION_MZONE,1,1,nil,tp)
Duel.Release(g,REASON_COST)
Duel.Release(g,REASON_SPSUMMON)
local e1=Effect.CreateEffect(c)
e1:SetDescription(aux.Stringid(46565218,0))
e1:SetCategory(CATEGORY_DRAW)
......
......@@ -31,7 +31,7 @@ function c48770333.initial_effect(c)
c:RegisterEffect(e3)
end
function c48770333.spfilter(c,tp)
return c:IsReleasable() and Duel.GetMZoneCount(1-tp,c,tp)>0
return c:IsReleasable(REASON_SPSUMMON) and Duel.GetMZoneCount(1-tp,c,tp)>0
end
function c48770333.spcon(e,c)
if c==nil then return true end
......@@ -41,7 +41,7 @@ end
function c48770333.spop(e,tp,eg,ep,ev,re,r,rp,c)
Duel.Hint(HINT_SELECTMSG,tp,HINTMSG_RELEASE)
local g=Duel.SelectMatchingCard(tp,c48770333.spfilter,tp,0,LOCATION_MZONE,1,1,nil,tp)
Duel.Release(g,REASON_COST)
Duel.Release(g,REASON_SPSUMMON)
end
function c48770333.cfilter(c)
return c:IsFaceup() and c:IsSetCard(0xd3)
......
......@@ -34,7 +34,7 @@ function c55063751.initial_effect(c)
c:RegisterEffect(e3)
end
function c55063751.spfilter(c,tp)
return c:IsReleasable() and Duel.GetMZoneCount(1-tp,c,tp)>0
return c:IsReleasable(REASON_SPSUMMON) and Duel.GetMZoneCount(1-tp,c,tp)>0
end
function c55063751.spcon(e,c)
if c==nil then return true end
......@@ -44,7 +44,7 @@ end
function c55063751.spop(e,tp,eg,ep,ev,re,r,rp,c)
Duel.Hint(HINT_SELECTMSG,tp,HINTMSG_RELEASE)
local g=Duel.SelectMatchingCard(tp,c55063751.spfilter,tp,0,LOCATION_MZONE,1,1,nil,tp)
Duel.Release(g,REASON_COST)
Duel.Release(g,REASON_SPSUMMON)
end
function c55063751.cfilter(c)
return c:IsFaceup() and c:IsSetCard(0xd3)
......
......@@ -44,7 +44,7 @@ function c63014935.initial_effect(c)
c:RegisterEffect(e4)
end
function c63014935.spfilter(c,tp)
return c:IsReleasable() and Duel.GetMZoneCount(1-tp,c,tp)>0
return c:IsReleasable(REASON_SPSUMMON) and Duel.GetMZoneCount(1-tp,c,tp)>0
end
function c63014935.spcon(e,c)
if c==nil then return true end
......
......@@ -33,7 +33,7 @@ function c63941210.initial_effect(c)
c:RegisterEffect(e3)
end
function c63941210.spfilter(c,tp)
return c:IsReleasable() and Duel.GetMZoneCount(1-tp,c,tp)>0
return c:IsReleasable(REASON_SPSUMMON) and Duel.GetMZoneCount(1-tp,c,tp)>0
end
function c63941210.spcon(e,c)
if c==nil then return true end
......@@ -43,7 +43,7 @@ end
function c63941210.spop(e,tp,eg,ep,ev,re,r,rp,c)
Duel.Hint(HINT_SELECTMSG,tp,HINTMSG_RELEASE)
local g=Duel.SelectMatchingCard(tp,c63941210.spfilter,tp,0,LOCATION_MZONE,1,1,nil,tp)
Duel.Release(g,REASON_COST)
Duel.Release(g,REASON_SPSUMMON)
end
function c63941210.cfilter(c)
return c:IsFaceup() and c:IsSetCard(0xd3)
......
......@@ -43,11 +43,11 @@ end
function s.otcon(e,c,minc)
if c==nil then return true end
local tp=c:GetControler()
local g=Duel.GetMatchingGroup(Card.IsReleasable,tp,LOCATION_MZONE,LOCATION_MZONE,nil)
local g=Duel.GetMatchingGroup(Card.IsReleasable,tp,LOCATION_MZONE,LOCATION_MZONE,nil,REASON_SUMMON)
return c:IsLevelAbove(7) and minc<=2 and g:CheckSubGroup(s.tcheck,2,2,tp)
end
function s.otop(e,tp,eg,ep,ev,re,r,rp,c)
local g=Duel.GetMatchingGroup(Card.IsReleasable,tp,LOCATION_MZONE,LOCATION_MZONE,nil)
local g=Duel.GetMatchingGroup(Card.IsReleasable,tp,LOCATION_MZONE,LOCATION_MZONE,nil,REASON_SUMMON)
Duel.Hint(HINT_SELECTMSG,tp,HINTMSG_RELEASE)
local sg=g:SelectSubGroup(tp,s.tcheck,false,2,2,tp)
c:SetMaterial(sg)
......
......@@ -31,7 +31,7 @@ function c93332803.initial_effect(c)
c:RegisterEffect(e3)
end
function c93332803.spfilter(c,tp)
return c:IsReleasable() and Duel.GetMZoneCount(1-tp,c,tp)>0
return c:IsReleasable(REASON_SPSUMMON) and Duel.GetMZoneCount(1-tp,c,tp)>0
end
function c93332803.spcon(e,c)
if c==nil then return true end
......@@ -41,7 +41,7 @@ end
function c93332803.spop(e,tp,eg,ep,ev,re,r,rp,c)
Duel.Hint(HINT_SELECTMSG,tp,HINTMSG_RELEASE)
local g=Duel.SelectMatchingCard(tp,c93332803.spfilter,tp,0,LOCATION_MZONE,1,1,nil,tp)
Duel.Release(g,REASON_COST)
Duel.Release(g,REASON_SPSUMMON)
end
function c93332803.cfilter(c)
return c:IsFaceup() and c:IsSetCard(0xd3)
......
......@@ -27,7 +27,7 @@ function c99913726.initial_effect(c)
c:RegisterEffect(e2)
end
function c99913726.rfilter(c)
return c:GetCounter(0x1041)>0 and c:IsReleasable()
return c:GetCounter(0x1041)>0 and c:IsReleasable(REASON_SPSUMMON)
end
function c99913726.hspcon(e,c)
if c==nil then return true end
......@@ -44,7 +44,7 @@ function c99913726.hspop(e,tp,eg,ep,ev,re,r,rp,c)
if ft>0 then m=LOCATION_MZONE end
Duel.Hint(HINT_SELECTMSG,tp,HINTMSG_RELEASE)
local g=Duel.SelectMatchingCard(tp,c99913726.rfilter,tp,LOCATION_MZONE,m,1,1,nil)
Duel.Release(g,REASON_COST)
Duel.Release(g,REASON_SPSUMMON)
end
function c99913726.cfilter(c)
return c:IsSetCard(0x10f3) and c:IsType(TYPE_MONSTER) and c:IsAbleToRemoveAsCost()
......
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