Commit 7fa810c6 authored by POLYMER's avatar POLYMER

fix

parent 858df951
No preview for this file type
...@@ -301,6 +301,7 @@ function cm.spop(e,tp,eg,ep,ev,re,r,rp) ...@@ -301,6 +301,7 @@ function cm.spop(e,tp,eg,ep,ev,re,r,rp)
ac=nil ac=nil
end end
for i=1,ct1 do for i=1,ct1 do
Duel.Hint(HINT_CARD,0,tab1[i])
g1:AddCard(Duel.CreateToken(tp,tab1[i])) g1:AddCard(Duel.CreateToken(tp,tab1[i]))
end end
if #g1>0 then if #g1>0 then
...@@ -378,6 +379,7 @@ function cm.spop(e,tp,eg,ep,ev,re,r,rp) ...@@ -378,6 +379,7 @@ function cm.spop(e,tp,eg,ep,ev,re,r,rp)
ac=nil ac=nil
end end
for i=1,ct2 do for i=1,ct2 do
Duel.Hint(HINT_CARD,0,tab2[i])
g2:AddCard(Duel.CreateToken(1-tp,tab2[i])) g2:AddCard(Duel.CreateToken(1-tp,tab2[i]))
end end
if #g2>0 then if #g2>0 then
......
...@@ -17,7 +17,7 @@ function cm.operation(e,tp,eg,ep,ev,re,r,rp) ...@@ -17,7 +17,7 @@ function cm.operation(e,tp,eg,ep,ev,re,r,rp)
Duel.RegisterEffect(e1,tp) Duel.RegisterEffect(e1,tp)
end end
function cm.negcon(e,tp,eg,ep,ev,re,r,rp) function cm.negcon(e,tp,eg,ep,ev,re,r,rp)
return rp==1-tp and re:IsHasType(EFFECT_TYPE_ACTIVATE) and re:GetActiveType()==TYPE_SPELL return rp==1-tp and re:IsHasType(EFFECT_TYPE_ACTIVATE) and re:GetHandler():GetType()==TYPE_SPELL
end end
function cm.negop(e,tp,eg,ep,ev,re,r,rp) function cm.negop(e,tp,eg,ep,ev,re,r,rp)
Duel.Hint(HINT_CARD,0,m) Duel.Hint(HINT_CARD,0,m)
......
...@@ -59,21 +59,25 @@ function c11561023.tdcost(e,tp,eg,ep,ev,re,r,rp,chk) ...@@ -59,21 +59,25 @@ function c11561023.tdcost(e,tp,eg,ep,ev,re,r,rp,chk)
Duel.Release(tc,REASON_COST) Duel.Release(tc,REASON_COST)
end end
function c11561023.tdtg(e,tp,eg,ep,ev,re,r,rp,chk) function c11561023.tdtg(e,tp,eg,ep,ev,re,r,rp,chk)
if chk==0 then return Duel.IsExistingMatchingCard(Card.IsAbleToDeck,tp,LOCATION_ONFIELD+LOCATION_GRAVE+LOCATION_REMOVED,LOCATION_ONFIELD+LOCATION_GRAVE+LOCATION_REMOVED,1,nil) end if chk==0 then return Duel.IsExistingMatchingCard(c11561023.filter,tp,LOCATION_ONFIELD+LOCATION_GRAVE+LOCATION_REMOVED,LOCATION_ONFIELD+LOCATION_GRAVE+LOCATION_REMOVED,1,nil) end
Duel.SetOperationInfo(0,CATEGORY_TODECK,nil,1,PLAYER_ALL,LOCATION_ONFIELD) Duel.SetOperationInfo(0,CATEGORY_TODECK,nil,1,PLAYER_ALL,LOCATION_ONFIELD)
end end
function c11561023.setfil(c) function c11561023.setfil(c)
if not (c:IsSetCard(0x116) and c:IsType(TYPE_SPELL)) then return false end if not (c:IsSetCard(0x116) and c:IsType(TYPE_SPELL)) then return false end
return c:IsAbleToHand() or c:IsSSetable() return c:IsAbleToHand() or c:IsSSetable()
end end
function c11561023.fcheck(g) function c11561023.filter(c)
return g:FilterCount(Card.IsControler,1,nil,tp)<=1 and g:FilterCount(Card.IsControler,1,nil,1-tp)<=1 return c:IsAbleToDeck()
end
function c11561023.fcheck(g,tp)
return g:FilterCount(Card.IsControler,nil,tp)<=1 and g:FilterCount(Card.IsControler,nil,1-tp)<=1
end end
function c11561023.tdop(e,tp,eg,ep,ev,re,r,rp) function c11561023.tdop(e,tp,eg,ep,ev,re,r,rp)
local c=e:GetHandler() local c=e:GetHandler()
local g=Duel.GetMatchingGroup(aux.NecroValleyFilter(Card.IsAbleToDeck),tp,LOCATION_ONFIELD+LOCATION_GRAVE+LOCATION_REMOVED,LOCATION_ONFIELD+LOCATION_GRAVE+LOCATION_REMOVED,nil) local g=Duel.GetMatchingGroup(aux.NecroValleyFilter(c11561023.filter),tp,LOCATION_ONFIELD+LOCATION_GRAVE+LOCATION_REMOVED,LOCATION_ONFIELD+LOCATION_GRAVE+LOCATION_REMOVED,nil)
if g:GetCount()>0 then if g:GetCount()>0 then
local sg=g:FilterSelect(tp,c11561023.fcheck,1,2,nil) Duel.Hint(HINT_SELECTMSG,tp,HINTMSG_TODECK)
local sg=g:SelectSubGroup(tp,c11561023.fcheck,false,1,2,tp)
if Duel.SendtoDeck(sg,nil,2,REASON_EFFECT)~=0 and e:GetLabel()==1 and Duel.IsExistingMatchingCard(c11561023.setfil,tp,LOCATION_GRAVE,0,1,nil) and Duel.SelectYesNo(tp,aux.Stringid(11561023,0)) then if Duel.SendtoDeck(sg,nil,2,REASON_EFFECT)~=0 and e:GetLabel()==1 and Duel.IsExistingMatchingCard(c11561023.setfil,tp,LOCATION_GRAVE,0,1,nil) and Duel.SelectYesNo(tp,aux.Stringid(11561023,0)) then
local tc=Duel.SelectMatchingCard(tp,c11561023.setfil,tp,LOCATION_GRAVE,0,1,1,nil):GetFirst() local tc=Duel.SelectMatchingCard(tp,c11561023.setfil,tp,LOCATION_GRAVE,0,1,1,nil):GetFirst()
if tc:IsAbleToHand() and (not tc:IsSSetable() or Duel.SelectOption(tp,1190,1153)==0) then if tc:IsAbleToHand() and (not tc:IsSSetable() or Duel.SelectOption(tp,1190,1153)==0) then
......
...@@ -98,13 +98,14 @@ end ...@@ -98,13 +98,14 @@ end
function cm.ssetcon(e,tp,eg,ep,ev,re,r,rp) function cm.ssetcon(e,tp,eg,ep,ev,re,r,rp)
local c=e:GetHandler() local c=e:GetHandler()
local tp=c:GetControler() local tp=c:GetControler()
if Duel.GetTurnPlayer()~=tp then return end
if eg and #eg:Filter(cm.ssetfilter,nil)>0 then if eg and #eg:Filter(cm.ssetfilter,nil)>0 then
local eg1=eg:Filter(cm.ssetfilter,nil) local eg1=eg:Filter(cm.ssetfilter,nil)
local tc=eg1:GetFirst() local tc=eg1:GetFirst()
while tc do while tc do
local code=tc:GetOriginalCodeRule() local code=tc:GetOriginalCodeRule()
local ccode=_G["c"..code] local ccode=_G["c"..code]
local catt=tc:GetOriginalAttribute()
if (catt==ATTRIBUTE_LIGHT and Duel.GetTurnPlayer()~=tp) or (catt==ATTRIBUTE_DARK and Duel.GetTurnPlayer()==tp) and not tc:IsExtraDeckMonster() then return end
if eg:IsContains(tc) and ccode.settg(e,tp,eg,ep,ev,re,r,rp,0) and Duel.GetFlagEffect(tp,code)==0 then if eg:IsContains(tc) and ccode.settg(e,tp,eg,ep,ev,re,r,rp,0) and Duel.GetFlagEffect(tp,code)==0 then
if Duel.GetCurrentChain()==0 then if Duel.GetCurrentChain()==0 then
if tc:IsFacedown() and Duel.SelectEffectYesNo(tp,tc) then if tc:IsFacedown() and Duel.SelectEffectYesNo(tp,tc) then
......
...@@ -99,13 +99,14 @@ end ...@@ -99,13 +99,14 @@ end
function cm.ssetcon(e,tp,eg,ep,ev,re,r,rp) function cm.ssetcon(e,tp,eg,ep,ev,re,r,rp)
local c=e:GetHandler() local c=e:GetHandler()
local tp=c:GetControler() local tp=c:GetControler()
if not Duel.GetTurnPlayer()~=tp then return end
if eg and #eg:Filter(cm.ssetfilter,nil)>0 then if eg and #eg:Filter(cm.ssetfilter,nil)>0 then
local eg1=eg:Filter(cm.ssetfilter,nil) local eg1=eg:Filter(cm.ssetfilter,nil)
local tc=eg1:GetFirst() local tc=eg1:GetFirst()
while tc do while tc do
local code=tc:GetOriginalCodeRule() local code=tc:GetOriginalCodeRule()
local ccode=_G["c"..code] local ccode=_G["c"..code]
local catt=tc:GetOriginalAttribute()
if (catt==ATTRIBUTE_LIGHT and Duel.GetTurnPlayer()~=tp) or (catt==ATTRIBUTE_DARK and Duel.GetTurnPlayer()==tp) and not tc:IsExtraDeckMonster() then return end
if eg:IsContains(tc) and ccode.settg(e,tp,eg,ep,ev,re,r,rp,0) and Duel.GetFlagEffect(tp,code)==0 then if eg:IsContains(tc) and ccode.settg(e,tp,eg,ep,ev,re,r,rp,0) and Duel.GetFlagEffect(tp,code)==0 then
if Duel.GetCurrentChain()==0 then if Duel.GetCurrentChain()==0 then
if tc:IsFacedown() and Duel.SelectEffectYesNo(tp,tc) then if tc:IsFacedown() and Duel.SelectEffectYesNo(tp,tc) then
......
...@@ -99,13 +99,14 @@ end ...@@ -99,13 +99,14 @@ end
function cm.ssetcon(e,tp,eg,ep,ev,re,r,rp) function cm.ssetcon(e,tp,eg,ep,ev,re,r,rp)
local c=e:GetHandler() local c=e:GetHandler()
local tp=c:GetControler() local tp=c:GetControler()
if Duel.GetTurnPlayer()~=tp then return end
if eg and #eg:Filter(cm.ssetfilter,nil)>0 then if eg and #eg:Filter(cm.ssetfilter,nil)>0 then
local eg1=eg:Filter(cm.ssetfilter,nil) local eg1=eg:Filter(cm.ssetfilter,nil)
local tc=eg1:GetFirst() local tc=eg1:GetFirst()
while tc do while tc do
local code=tc:GetOriginalCodeRule() local code=tc:GetOriginalCodeRule()
local ccode=_G["c"..code] local ccode=_G["c"..code]
local catt=tc:GetOriginalAttribute()
if (catt==ATTRIBUTE_LIGHT and Duel.GetTurnPlayer()~=tp) or (catt==ATTRIBUTE_DARK and Duel.GetTurnPlayer()==tp) and not tc:IsExtraDeckMonster() then return end
if eg:IsContains(tc) and ccode.settg(e,tp,eg,ep,ev,re,r,rp,0) and Duel.GetFlagEffect(tp,code)==0 then if eg:IsContains(tc) and ccode.settg(e,tp,eg,ep,ev,re,r,rp,0) and Duel.GetFlagEffect(tp,code)==0 then
if Duel.GetCurrentChain()==0 then if Duel.GetCurrentChain()==0 then
if tc:IsFacedown() and Duel.SelectEffectYesNo(tp,tc) then if tc:IsFacedown() and Duel.SelectEffectYesNo(tp,tc) then
......
...@@ -99,13 +99,14 @@ end ...@@ -99,13 +99,14 @@ end
function cm.ssetcon(e,tp,eg,ep,ev,re,r,rp) function cm.ssetcon(e,tp,eg,ep,ev,re,r,rp)
local c=e:GetHandler() local c=e:GetHandler()
local tp=c:GetControler() local tp=c:GetControler()
if Duel.GetTurnPlayer()~=tp then return end
if eg and #eg:Filter(cm.ssetfilter,nil)>0 then if eg and #eg:Filter(cm.ssetfilter,nil)>0 then
local eg1=eg:Filter(cm.ssetfilter,nil) local eg1=eg:Filter(cm.ssetfilter,nil)
local tc=eg1:GetFirst() local tc=eg1:GetFirst()
while tc do while tc do
local code=tc:GetOriginalCodeRule() local code=tc:GetOriginalCodeRule()
local ccode=_G["c"..code] local ccode=_G["c"..code]
local catt=tc:GetOriginalAttribute()
if (catt==ATTRIBUTE_LIGHT and Duel.GetTurnPlayer()~=tp) or (catt==ATTRIBUTE_DARK and Duel.GetTurnPlayer()==tp) and not tc:IsExtraDeckMonster() then return end
if eg:IsContains(tc) and ccode.settg(e,tp,eg,ep,ev,re,r,rp,0) and Duel.GetFlagEffect(tp,code)==0 then if eg:IsContains(tc) and ccode.settg(e,tp,eg,ep,ev,re,r,rp,0) and Duel.GetFlagEffect(tp,code)==0 then
if Duel.GetCurrentChain()==0 then if Duel.GetCurrentChain()==0 then
if tc:IsFacedown() and Duel.SelectEffectYesNo(tp,tc) then if tc:IsFacedown() and Duel.SelectEffectYesNo(tp,tc) then
......
...@@ -99,13 +99,14 @@ end ...@@ -99,13 +99,14 @@ end
function cm.ssetcon(e,tp,eg,ep,ev,re,r,rp) function cm.ssetcon(e,tp,eg,ep,ev,re,r,rp)
local c=e:GetHandler() local c=e:GetHandler()
local tp=c:GetControler() local tp=c:GetControler()
if Duel.GetTurnPlayer()~=tp then return end
if eg and #eg:Filter(cm.ssetfilter,nil)>0 then if eg and #eg:Filter(cm.ssetfilter,nil)>0 then
local eg1=eg:Filter(cm.ssetfilter,nil) local eg1=eg:Filter(cm.ssetfilter,nil)
local tc=eg1:GetFirst() local tc=eg1:GetFirst()
while tc do while tc do
local code=tc:GetOriginalCodeRule() local code=tc:GetOriginalCodeRule()
local ccode=_G["c"..code] local ccode=_G["c"..code]
local catt=tc:GetOriginalAttribute()
if (catt==ATTRIBUTE_LIGHT and Duel.GetTurnPlayer()~=tp) or (catt==ATTRIBUTE_DARK and Duel.GetTurnPlayer()==tp) and not tc:IsExtraDeckMonster() then return end
if eg:IsContains(tc) and ccode.settg(e,tp,eg,ep,ev,re,r,rp,0) and Duel.GetFlagEffect(tp,code)==0 then if eg:IsContains(tc) and ccode.settg(e,tp,eg,ep,ev,re,r,rp,0) and Duel.GetFlagEffect(tp,code)==0 then
if Duel.GetCurrentChain()==0 then if Duel.GetCurrentChain()==0 then
if tc:IsFacedown() and Duel.SelectEffectYesNo(tp,tc) then if tc:IsFacedown() and Duel.SelectEffectYesNo(tp,tc) then
......
...@@ -98,13 +98,14 @@ end ...@@ -98,13 +98,14 @@ end
function cm.ssetcon(e,tp,eg,ep,ev,re,r,rp) function cm.ssetcon(e,tp,eg,ep,ev,re,r,rp)
local c=e:GetHandler() local c=e:GetHandler()
local tp=c:GetControler() local tp=c:GetControler()
if not Duel.GetTurnPlayer()~=tp then return end
if eg and #eg:Filter(cm.ssetfilter,nil)>0 then if eg and #eg:Filter(cm.ssetfilter,nil)>0 then
local eg1=eg:Filter(cm.ssetfilter,nil) local eg1=eg:Filter(cm.ssetfilter,nil)
local tc=eg1:GetFirst() local tc=eg1:GetFirst()
while tc do while tc do
local code=tc:GetOriginalCodeRule() local code=tc:GetOriginalCodeRule()
local ccode=_G["c"..code] local ccode=_G["c"..code]
local catt=tc:GetOriginalAttribute()
if (catt==ATTRIBUTE_LIGHT and Duel.GetTurnPlayer()~=tp) or (catt==ATTRIBUTE_DARK and Duel.GetTurnPlayer()==tp) and not tc:IsExtraDeckMonster() then return end
if eg:IsContains(tc) and ccode.settg(e,tp,eg,ep,ev,re,r,rp,0) and Duel.GetFlagEffect(tp,code)==0 then if eg:IsContains(tc) and ccode.settg(e,tp,eg,ep,ev,re,r,rp,0) and Duel.GetFlagEffect(tp,code)==0 then
if Duel.GetCurrentChain()==0 then if Duel.GetCurrentChain()==0 then
if tc:IsFacedown() and Duel.SelectEffectYesNo(tp,tc) then if tc:IsFacedown() and Duel.SelectEffectYesNo(tp,tc) then
......
...@@ -99,13 +99,14 @@ end ...@@ -99,13 +99,14 @@ end
function cm.ssetcon(e,tp,eg,ep,ev,re,r,rp) function cm.ssetcon(e,tp,eg,ep,ev,re,r,rp)
local c=e:GetHandler() local c=e:GetHandler()
local tp=c:GetControler() local tp=c:GetControler()
if not Duel.GetTurnPlayer()~=tp then return end
if eg and #eg:Filter(cm.ssetfilter,nil)>0 then if eg and #eg:Filter(cm.ssetfilter,nil)>0 then
local eg1=eg:Filter(cm.ssetfilter,nil) local eg1=eg:Filter(cm.ssetfilter,nil)
local tc=eg1:GetFirst() local tc=eg1:GetFirst()
while tc do while tc do
local code=tc:GetOriginalCodeRule() local code=tc:GetOriginalCodeRule()
local ccode=_G["c"..code] local ccode=_G["c"..code]
local catt=tc:GetOriginalAttribute()
if (catt==ATTRIBUTE_LIGHT and Duel.GetTurnPlayer()~=tp) or (catt==ATTRIBUTE_DARK and Duel.GetTurnPlayer()==tp) and not tc:IsExtraDeckMonster() then return end
if eg:IsContains(tc) and ccode.settg(e,tp,eg,ep,ev,re,r,rp,0) and Duel.GetFlagEffect(tp,code)==0 then if eg:IsContains(tc) and ccode.settg(e,tp,eg,ep,ev,re,r,rp,0) and Duel.GetFlagEffect(tp,code)==0 then
if Duel.GetCurrentChain()==0 then if Duel.GetCurrentChain()==0 then
if tc:IsFacedown() and Duel.SelectEffectYesNo(tp,tc) then if tc:IsFacedown() and Duel.SelectEffectYesNo(tp,tc) then
......
...@@ -99,13 +99,14 @@ end ...@@ -99,13 +99,14 @@ end
function cm.ssetcon(e,tp,eg,ep,ev,re,r,rp) function cm.ssetcon(e,tp,eg,ep,ev,re,r,rp)
local c=e:GetHandler() local c=e:GetHandler()
local tp=c:GetControler() local tp=c:GetControler()
if not Duel.GetTurnPlayer()~=tp then return end
if eg and #eg:Filter(cm.ssetfilter,nil)>0 then if eg and #eg:Filter(cm.ssetfilter,nil)>0 then
local eg1=eg:Filter(cm.ssetfilter,nil) local eg1=eg:Filter(cm.ssetfilter,nil)
local tc=eg1:GetFirst() local tc=eg1:GetFirst()
while tc do while tc do
local code=tc:GetOriginalCodeRule() local code=tc:GetOriginalCodeRule()
local ccode=_G["c"..code] local ccode=_G["c"..code]
local catt=tc:GetOriginalAttribute()
if (catt==ATTRIBUTE_LIGHT and Duel.GetTurnPlayer()~=tp) or (catt==ATTRIBUTE_DARK and Duel.GetTurnPlayer()==tp) and not tc:IsExtraDeckMonster() then return end
if eg:IsContains(tc) and ccode.settg(e,tp,eg,ep,ev,re,r,rp,0) and Duel.GetFlagEffect(tp,code)==0 then if eg:IsContains(tc) and ccode.settg(e,tp,eg,ep,ev,re,r,rp,0) and Duel.GetFlagEffect(tp,code)==0 then
if Duel.GetCurrentChain()==0 then if Duel.GetCurrentChain()==0 then
if tc:IsFacedown() and Duel.SelectEffectYesNo(tp,tc) then if tc:IsFacedown() and Duel.SelectEffectYesNo(tp,tc) then
......
...@@ -151,6 +151,8 @@ function cm.ssetcon(e,tp,eg,ep,ev,re,r,rp) ...@@ -151,6 +151,8 @@ function cm.ssetcon(e,tp,eg,ep,ev,re,r,rp)
while tc do while tc do
local code=tc:GetOriginalCodeRule() local code=tc:GetOriginalCodeRule()
local ccode=_G["c"..code] local ccode=_G["c"..code]
local catt=tc:GetOriginalAttribute()
if (catt==ATTRIBUTE_LIGHT and Duel.GetTurnPlayer()~=tp) or (catt==ATTRIBUTE_DARK and Duel.GetTurnPlayer()==tp) and not tc:IsExtraDeckMonster() then return end
if eg:IsContains(tc) and ccode.settg(e,tp,eg,ep,ev,re,r,rp,0) and Duel.GetFlagEffect(tp,code)==0 then if eg:IsContains(tc) and ccode.settg(e,tp,eg,ep,ev,re,r,rp,0) and Duel.GetFlagEffect(tp,code)==0 then
if Duel.GetCurrentChain()==0 then if Duel.GetCurrentChain()==0 then
if tc:IsFacedown() and Duel.SelectEffectYesNo(tp,tc) then if tc:IsFacedown() and Duel.SelectEffectYesNo(tp,tc) then
......
...@@ -151,6 +151,8 @@ function cm.ssetcon(e,tp,eg,ep,ev,re,r,rp) ...@@ -151,6 +151,8 @@ function cm.ssetcon(e,tp,eg,ep,ev,re,r,rp)
while tc do while tc do
local code=tc:GetOriginalCodeRule() local code=tc:GetOriginalCodeRule()
local ccode=_G["c"..code] local ccode=_G["c"..code]
local catt=tc:GetOriginalAttribute()
if (catt==ATTRIBUTE_LIGHT and Duel.GetTurnPlayer()~=tp) or (catt==ATTRIBUTE_DARK and Duel.GetTurnPlayer()==tp) and not tc:IsExtraDeckMonster() then return end
if eg:IsContains(tc) and ccode.settg(e,tp,eg,ep,ev,re,r,rp,0) and Duel.GetFlagEffect(tp,code)==0 then if eg:IsContains(tc) and ccode.settg(e,tp,eg,ep,ev,re,r,rp,0) and Duel.GetFlagEffect(tp,code)==0 then
if Duel.GetCurrentChain()==0 then if Duel.GetCurrentChain()==0 then
if tc:IsFacedown() and Duel.SelectEffectYesNo(tp,tc) then if tc:IsFacedown() and Duel.SelectEffectYesNo(tp,tc) then
......
...@@ -89,7 +89,7 @@ function c35399023.tg3(e,tp,eg,ep,ev,re,r,rp,chk) ...@@ -89,7 +89,7 @@ function c35399023.tg3(e,tp,eg,ep,ev,re,r,rp,chk)
end end
function c35399023.op3(e,tp,eg,ep,ev,re,r,rp) function c35399023.op3(e,tp,eg,ep,ev,re,r,rp)
Duel.Hint(HINT_SELECTMSG,tp,HINTMSG_ATOHAND) Duel.Hint(HINT_SELECTMSG,tp,HINTMSG_ATOHAND)
local g=Duel.SelectMatchingCard(tp,aux.NecroValleyFilter(c35399023.tfilter3),tp,LOCATION_DECK,0,1,1,nil) local g=Duel.SelectMatchingCard(tp,aux.NecroValleyFilter(c35399023.tfilter3),tp,LOCATION_DECK+LOCATION_GRAVE,0,1,1,nil)
if g:GetCount()>0 then if g:GetCount()>0 then
Duel.SendtoHand(g,nil,REASON_EFFECT) Duel.SendtoHand(g,nil,REASON_EFFECT)
Duel.ConfirmCards(1-tp,g) Duel.ConfirmCards(1-tp,g)
......
--以斯拉的暗幕 黑帘计划
if not pcall(function() require("expansions/script/c65010000") end) then require("script/c65010000") end
local m,cm=rscf.DefineCard(65011001,"Israel")
if rsisr then return end
rsisr = cm
rscf.DefineSet(rsisr,"Israel")
function rsisr.spfilter(c,e,tp)
return c:IsCanBeSpecialSummoned(e,0,1-tp,false,false) and Duel.GetLocationCount(1-tp,LOCATION_MZONE)>0
end
function rsisr.spop(g,tp,pos)
pos = pos or POS_FACEUP
return rssf.SpecialSummon(g,0,1-tp,1-tp,false,false,pos,nil,{"leave",LOCATION_REMOVED })
end
function rsisr.spops(e,tp)
rsisr.drawlimit(e,tp)
local c=rscf.GetSelf(e)
return not c and 0 or rsisr.spop(c,tp)
end
function rsisr.drawlimit(e,tp,reset)
reset = reset or rsreset.pend
local e1=rsef.FV_LIMIT_PLAYER({e:GetHandler(),tp},"dr",nil,nil,{1,0},nil,reset)
return e1
end
function rsisr.exlcon(e)
return Duel.IsExistingMatchingCard(cm.exlfilter,e:GetHandlerPlayer(),LOCATION_MZONE,0,1,nil)
end
function cm.exlfilter(c)
return c:IsFaceup() and rsisr.IsSet(c) and c:IsType(TYPE_LINK)
end
-----------------------------------
function cm.initial_effect(c)
local e1=rsef.ACT(c,nil,nil,{1,m,1},"sp",nil,nil,nil,rsop.target(cm.aspfilter,"sp",LOCATION_DECK),cm.act)
local e2=rsef.I(c,{m,0},{1,m+100},nil,nil,LOCATION_SZONE,rscon.excard2(rsisr.IsSet,LOCATION_MZONE,LOCATION_MZONE),rscost.cost(cm.rmcfilter,"rm",LOCATION_GRAVE),nil,cm.rmop)
local e3=rsef.RegisterOPTurn(c,e2,cm.quickcon)
end
function cm.aspfilter(c,e,tp)
return rsisr.spfilter(c,e,tp) and rsisr.IsSet(c)
end
function cm.quickcon(e,tp)
return Duel.IsExistingMatchingCard(cm.qfilter,tp,LOCATION_MZONE,0,1,nil)
end
function cm.qfilter(c)
local mat=c:GetMaterial()
return c:IsFaceup() and rsisr.IsSet(c) and c:IsType(TYPE_LINK) and #mat>=3
end
function cm.rmcfilter(c)
return rsisr.IsSetM(c) and c:IsAbleToRemoveAsCost()
end
function cm.rmop(e,tp)
local e1=rsef.FV_REDIRECT({e:GetHandler(),tp},"tg",LOCATION_REMOVED,cm.rmtg,{0xff,0xff},nil,rsreset.pend)
end
function cm.rmtg(e,c)
return c:GetOwner()~=e:GetHandlerPlayer()
end
function cm.act(e,tp)
if not rscf.GetSelf(e) then return end
rsop.SelectSolve(HINTMSG_SPSUMMON,tp,rsisr.spfilter,tp,LOCATION_DECK,0,1,1,nil,cm.spfun,e,tp)
rsisr.drawlimit(e,tp)
end
function cm.spfun(g,e,tp)
Duel.ConfirmCards(1-tp,g)
Duel.SpecialSummon(g,0,1-tp,1-tp,false,false,POS_FACEUP)
return true
end
--以斯拉的复仇 天帝之怒
if not pcall(function() require("expansions/script/c65011001") end) then require("script/c65011001") end
local m,cm=rscf.DefineCard(65011002,"Israel")
function cm.initial_effect(c)
local e1=rsef.ACT(c,nil,nil,{1,m,1},nil,"tg",nil,nil,rstg.target(rscf.fufilter(rsisr.IsSet),nil,LOCATION_MZONE,LOCATION_MZONE),cm.act)
local e2=rsef.FTO(c,EVENT_PHASE+PHASE_BATTLE_START,nil,{1,m+100},"th",nil,LOCATION_SZONE,rscon.turno,nil,rsop.target(cm.thfilter,"th",LOCATION_MZONE,LOCATION_MZONE),cm.thop)
local e5=rsef.RegisterClone(c,e2,"code",EVENT_PHASE+PHASE_END)
local e3=rsef.FV_LIMIT_PLAYER(c,"act",cm.actlimit,nil,{1,0},cm.acon)
local e4=rsef.FV_LIMIT_PLAYER(c,"act",cm.actlimit,nil,{0,1},cm.acon2)
end
function cm.actlimit(e,re)
return re:GetHandler():IsLocation(LOCATION_MZONE)
end
function cm.acon(e,tp)
return rscon.excard2(rsisr.IsSet,LOCATION_MZONE)(e,tp)
end
function cm.acon2(e,tp)
return rscon.excard2(rsisr.IsSet,0,LOCATION_MZONE)(e,tp)
end
function cm.thfilter(c)
return Duel.IsPlayerCanSendtoHand(c:GetControler(),c) and c:IsFaceup() and not rsisr.IsSet(c)
end
function cm.thop(e,tp)
local c=rscf.GetSelf(e)
if not c then return end
for p=0,1 do
local g=Duel.GetMatchingGroup(cm.thfilter,p,LOCATION_MZONE,0,nil)
local tg=g:GetMaxGroup(Card.GetAttack)
if #tg>0 then
rsgf.SelectToHand(tg,p,aux.TRUE,1,1,nil,{ nil,REASON_RULE })
end
end
end
function cm.act(e,tp)
local c=rscf.GetSelf(e)
local tc=rscf.GetTargetCard()
if not c or not tc then return end
local e1,e2=rsef.SV_LIMIT({c,tc},"ress,resns",nil,nil,rsreset.est)
local e3,e4,e5,e6=rsef.SV_CANNOT_BE_MATERIAL({c,tc},"fus,syn,xyz,link",nil,nil,rsreset.est)
end
--以斯拉的任性 方舟行动
if not pcall(function() require("expansions/script/c65011001") end) then require("script/c65011001") end
local m,cm=rscf.DefineCard(65011003,"Israel")
function cm.initial_effect(c)
local e1=rsef.ACT(c,nil,nil,{1,m,1},"se,th")
e1:SetOperation(cm.act)
local e2=rsef.I(c,{m,0},{1,m+100},nil,nil,LOCATION_SZONE,cm.lcon,rscost.cost(cm.cfilter,"tg",LOCATION_DECK),nil,cm.lop)
local e3,e4=rsef.FV_LIMIT(c,"dis,atk",nil,cm.tg,{ LOCATION_MZONE,LOCATION_MZONE })
if cm.switch then return end
cm.switch = true
local e5=rsef.FC({c,0},EVENT_SPSUMMON_SUCCESS,nil,nil,nil,nil,cm.regcon,cm.regop)
end
function cm.matfilter(c)
local mat=c:GetMaterial()
return c:GetSummonType()&(SUMMON_TYPE_FUSION+SUMMON_TYPE_SYNCHRO+SUMMON_TYPE_XYZ+SUMMON_TYPE_LINK)~=0 and c:GetSummonLocation()==LOCATION_EXTRA and mat and mat:IsExists(cm.matfilter2,1,nil)
end
function cm.matfilter2(c)
return rsisr.IsPreSet(c) and c:GetPreviousControler()~=c:GetOwner()
end
function cm.regcon(e,tp,eg)
return eg:IsExists(cm.matfilter,1,nil)
end
function cm.regop(e,tp,eg)
local rg=eg:Filter(cm.matfilter,nil)
for tc in aux.Next(rg) do
tc:RegisterFlagEffect(m+100,rsreset.est,0,1)
end
end
function cm.tg(e,c)
if rsisr.IsSet(c) and c:GetOwner()~=c:GetControler() then return true end
return c:GetFlagEffect(m+100)>0
end
function cm.cfilter(c)
return c:IsAbleToGraveAsCost() and rsisr.IsSetM(c)
end
function cm.lcon(e,tp)
return e:GetHandler():GetFlagEffect(m)<=0
end
function cm.lop(e,tp)
local c=rscf.GetSelf(e)
if not c then return end
local e1=Effect.CreateEffect(c)
e1:SetType(EFFECT_TYPE_FIELD+EFFECT_TYPE_CONTINUOUS)
e1:SetCode(EVENT_CHAINING)
e1:SetOperation(cm.chainop)
e1:SetReset(RESET_PHASE+PHASE_END)
Duel.RegisterEffect(e1,tp)
end
function cm.chainop(e,tp,eg,ep,ev,re,r,rp)
local rc=re:GetHandler()
if re:IsActiveType(TYPE_MONSTER) and rsisr.IsSetM(rc) and rc:IsType(TYPE_LINK) and ep==tp then
Duel.SetChainLimit(cm.chainlm)
end
end
function cm.chainlm(e,rp,tp)
return tp==rp
end
function cm.thfilter(c)
return rsisr.IsSetM(c) and c:IsAbleToHand()
end
function cm.act(e,tp)
local c=rscf.GetSelf(e)
if not c then return end
rsop.SelectOC(rshint.wth)
local ct,og,tc=rsop.SelectToHand(tp,cm.thfilter,tp,LOCATION_DECK,0,1,1,nil,{})
if tc and tc:IsLocation(LOCATION_HAND) then
c:RegisterFlagEffect(m,rsreset.est_pend,0,1)
end
end
--以斯拉的激斗 六日鏖战
if not pcall(function() require("expansions/script/c65011001") end) then require("script/c65011001") end
local m,cm=rscf.DefineCard(65011004,"Israel")
function cm.initial_effect(c)
local e1=rsef.ACT(c,nil,nil,{1,m,1})
local e2=rsef.FV_INDESTRUCTABLE(c,"ct",rsval.indct("effect"),cm.tg,{LOCATION_ONFIELD,0})
--negate
local e3=Effect.CreateEffect(c)
e3:SetDescription(rshint.neg)
e3:SetCategory(CATEGORY_NEGATE+CATEGORY_DESTROY)
e3:SetType(EFFECT_TYPE_QUICK_O)
e3:SetProperty(EFFECT_FLAG_DAMAGE_STEP)
e3:SetCode(EVENT_CHAINING)
e3:SetRange(LOCATION_MZONE)
e3:SetCountLimit(1,m+100)
e3:SetCondition(cm.negcon)
e3:SetTarget(cm.negtg)
e3:SetOperation(cm.negop)
c:RegisterEffect(e3)
local e4=rsef.FC(c,EVENT_BE_MATERIAL,nil,nil,nil,LOCATION_SZONE,cm.regcon,cm.regop)
end
function cm.regcon(e,tp,eg,ep,ev,re,r,rp)
return eg:IsExists(cm.cfilter2,1,nil) and r & (REASON_FUSION+REASON_SYNCHRO+REASON_XYZ+REASON_LINK) ~=0
end
function cm.cfilter2(c)
local rc=c:GetReasonCard()
return rc:GetSummonLocation()==LOCATION_EXTRA and c:GetOwner()~=c:GetPreviousControler() and rsisr.IsPreSet(c)
end
function cm.regop(e,tp,eg)
local c=e:GetHandler()
local rg=eg:Filter(cm.cfilter2,nil)
for tc in aux.Next(rg) do
local rc=tc:GetReasonCard()
if rc:GetFlagEffect(m)<=0 then
rc:RegisterFlagEffect(m,rsreset.est,0,1)
local e1=rsef.STF(rc,EVENT_SPSUMMON_SUCCESS,nil,nil,"rm","cd",nil,nil,rsop.target(aux.TRUE,"rm"),cm.rmop,rsreset.est)
if not rc:IsType(TYPE_EFFECT) then
local e2=Effect.CreateEffect(c)
e2:SetType(EFFECT_TYPE_SINGLE)
e2:SetCode(EFFECT_ADD_TYPE)
e2:SetValue(TYPE_EFFECT)
e2:SetReset(RESET_EVENT+RESETS_STANDARD)
rc:RegisterEffect(e2,true)
end
end
end
end
function cm.rmop(e,tp)
local c=rscf.GetSelf(e)
if c then
rshint.Card(m)
Duel.Remove(c,POS_FACEUP,REASON_EFFECT)
end
end
function cm.tg(e,c)
return rsisr.IsSet(c) and c~=e:GetHandler()
end
function cm.negcon(e,tp,eg,ep,ev,re,r,rp)
local c=e:GetHandler()
return rp~=tp and not c:IsStatus(STATUS_BATTLE_DESTROYED) and Duel.IsChainNegatable(ev) and Duel.IsExistingMatchingCard(cm.cfilter,tp,LOCATION_MZONE,0,1,nil)
end
function cm.cfilter(c)
return c:IsFaceup() and rsisr.IsSet(c) and c:IsType(TYPE_LINK)
end
function cm.desfilter(c)
return c:IsType(TYPE_MONSTER) and c:IsAttribute(ATTRIBUTE_FIRE) and not c:IsStatus(STATUS_BATTLE_DESTROYED)
end
function cm.negtg(e,tp,eg,ep,ev,re,r,rp,chk)
if chk==0 then return true end
Duel.SetOperationInfo(0,CATEGORY_NEGATE,eg,1,0,0)
local g=Duel.GetFieldGroup(tp,0,LOCATION_MZONE)
Duel.SetOperationInfo(0,CATEGORY_DESTROY,g,0,0,0)
end
function cm.negop(e,tp,eg,ep,ev,re,r,rp)
if Duel.NegateActivation(ev) then
rsop.SelectOC("des")
rsop.SelectDestroy(tp,aux.TRUE,tp,0,LOCATION_MZONE,1,1,nil,{})
end
end
\ No newline at end of file
--无民之国 以斯拉艾尔
if not pcall(function() require("expansions/script/c65011001") end) then require("script/c65011001") end
local m,cm=rscf.DefineCard(65011005,"Israel")
function cm.initial_effect(c)
local e1=rsef.ACT(c)
local e2=rsef.FV_CANNOT_BE_TARGET(c,"effect",aux.tgoval,cm.tg,{LOCATION_ONFIELD,LOCATION_ONFIELD },cm.con)
local e3=rsef.RegisterClone(c,e2,"val",aux.tgsval,"con",cm.con2)
local e4=rsef.I(c,{m,0},{1,m},nil,"tg",LOCATION_SZONE,cm.setcon,nil,rstg.target(rscf.fufilter(rsisr.IsSet),nil,LOCATION_MZONE,LOCATION_MZONE),cm.limitop)
local e5=rsef.I(c,"set",{1,m},nil,nil,LOCATION_SZONE,cm.setcon,nil,rsop.target(cm.setfilter,nil,LOCATION_DECK),cm.setop)
if cm.switch then return end
cm.switch = true
local ge1=rsef.FC({c,0},EVENT_SPSUMMON_SUCCESS)
ge1:SetOperation(cm.regop)
end
function cm.setcon(e,tp)
return Duel.GetFlagEffect(1-tp,m)>0
end
function cm.setfilter(c)
return rsisr.IsSet(c) and c:IsSSetable() and c:IsType(TYPE_CONTINUOUS)
end
function cm.setop(e,tp)
if not rscf.GetSelf(e) then return end
rsop.SelectSSet(tp,cm.setfilter,tp,LOCATION_DECK,0,1,1,nil,{})
end
function cm.limitop(e,tp)
local c=rscf.GetSelf(e)
local tc=rscf.GetTargetCard(Card.IsFaceup)
if not c or not tc then return end
local e1,e2,e3,e4=rsef.SV_CANNOT_BE_MATERIAL({c,tc},"fus,syn,xyz,link",nil,nil,{rsreset.est_pend+RESET_OPPO_TURN,Duel.GetTurnPlayer()==tp and 1 or 2})
end
function cm.regop(e,tp,eg)
for tc in aux.Next(eg) do
if tc:IsFaceup() and rsisr.IsSet(tc) then
Duel.RegisterFlagEffect(tc:GetSummonPlayer(),m,rsreset.pend,0,1)
end
end
end
function cm.con(e,tp)
return Duel.IsExistingMatchingCard(cm.cfilter,tp,0,LOCATION_MZONE,1,nil)
end
function cm.con2(e,tp)
return Duel.IsExistingMatchingCard(cm.cfilter,tp,LOCATION_MZONE,0,1,nil)
end
function cm.tg(e,c)
return c~=e:GetHandler()
end
function cm.cfilter(c)
return rsisr.IsSet(c) and c:IsFaceup() and c:GetOwner()~=c:GetControler()
end
\ No newline at end of file
--以斯拉的裁决 异域追凶
if not pcall(function() require("expansions/script/c65011001") end) then require("script/c65011001") end
local m,cm=rscf.DefineCard(65011006,"Israel")
function cm.initial_effect(c)
local e1=rsef.ACT(c,nil,nil,{1,m,1},"tg")
e1:SetOperation(cm.act)
local e2=rsef.I(c,nil,{1,m+100},"des,sp","tg",LOCATION_SZONE,cm.descon,rscost.cost(1,"dish"),rstg.target2(cm.fun,aux.TRUE,"des",LOCATION_ONFIELD,LOCATION_ONFIELD),cm.desop)
--direct attack
local e3=Effect.CreateEffect(c)
e3:SetType(EFFECT_TYPE_FIELD)
e3:SetCode(EFFECT_DIRECT_ATTACK)
e3:SetRange(LOCATION_SZONE)
e3:SetTargetRange(LOCATION_MZONE,0)
e3:SetCondition(cm.dcon)
c:RegisterEffect(e3)
end
function cm.dcon(e,tp)
return not Duel.IsExistingMatchingCard(cm.cfilter,tp,0,LOCATION_MZONE,1,nil)
end
function cm.cfilter(c)
return c:IsFacedown() or rsisr.IsSet(c)
end
function cm.tgfilter(c)
return rsisr.IsSetM(c) and c:IsAbleToGrave()
end
function cm.act(e,tp)
local c=rscf.GetSelf(e)
if not c then return end
rsop.SelectOC("tg")
local ct,og,tc=rsop.SelectToGrave(tp,cm.tgfilter,tp,LOCATION_DECK,0,1,1,nil,{})
if tc and tc:IsLocation(LOCATION_GRAVE) then
c:RegisterFlagEffect(m,rsreset.est_pend,0,1)
end
end
function cm.descon(e,tp)
return e:GetHandler():GetFlagEffect(m)==0
end
function cm.fun(g,e,tp)
Duel.SetOperationInfo(0,CATEGORY_SPECIAL_SUMMON,nil,0,tp,LOCATION_GRAVE)
end
function cm.desop(e,tp)
local c=rscf.GetSelf(e)
local tc=rscf.GetTargetCard()
if not c then return end
local e1=Effect.CreateEffect(c)
e1:SetType(EFFECT_TYPE_FIELD)
e1:SetProperty(EFFECT_FLAG_PLAYER_TARGET+EFFECT_FLAG_OATH)
e1:SetCode(EFFECT_CANNOT_SPECIAL_SUMMON)
e1:SetReset(RESET_PHASE+PHASE_END)
e1:SetTargetRange(1,0)
e1:SetTarget(cm.splimit)
Duel.RegisterEffect(e1,tp)
if tc and Duel.Destroy(tc,REASON_EFFECT)>0 then
rsop.SelectOC("sp",true)
rsop.SelectSpecialSummon(tp,aux.NecroValleyFilter(rscf.spfilter2(rsisr.IsSet)),tp,LOCATION_GRAVE,0,1,1,nil,{},e,tp)
end
end
function cm.splimit(e,c,sump,sumtype,sumpos,targetp,se)
return not rsisr.IsSet(c)
end
\ No newline at end of file
--以斯拉的策略 远交近攻
if not pcall(function() require("expansions/script/c65011001") end) then require("script/c65011001") end
local m,cm=rscf.DefineCard(65011007,"Israel")
function cm.initial_effect(c)
local e1=rsef.ACT(c)
local e2=rsef.QO(c,nil,{m,0},{1,m},nil,"tg",LOCATION_SZONE,nil,nil,rstg.target(cm.mvfilter,nil,LOCATION_MZONE),cm.mvop)
local e3=rsef.QO(c,nil,"dis",{1,m+100},"dis,atk,des","tg",LOCATION_SZONE,rscon.excard2(rsisr.IsSet,LOCATION_MZONE),nil,rstg.target(Card.IsFaceup,"dis",0,LOCATION_MZONE),cm.disop)
end
function cm.disop(e,tp)
local c=rscf.GetSelf(e)
local tc=rscf.GetTargetCard()
if not c or not tc then return end
local atk=tc:GetAttack()
local e1=Effect.CreateEffect(c)
e1:SetType(EFFECT_TYPE_SINGLE)
e1:SetCode(EFFECT_SET_ATTACK_FINAL)
e1:SetReset(RESET_EVENT+RESETS_STANDARD+RESET_PHASE+PHASE_END)
e1:SetValue(math.ceil(atk/2))
tc:RegisterEffect(e1)
Duel.NegateRelatedChain(tc,RESET_TURN_SET)
local e2=Effect.CreateEffect(c)
e2:SetType(EFFECT_TYPE_SINGLE)
e2:SetCode(EFFECT_DISABLE)
e2:SetReset(RESET_EVENT+RESETS_STANDARD+RESET_PHASE+PHASE_END)
tc:RegisterEffect(e2)
local e3=Effect.CreateEffect(c)
e3:SetType(EFFECT_TYPE_SINGLE)
e3:SetCode(EFFECT_DISABLE_EFFECT)
e3:SetValue(RESET_TURN_SET)
e3:SetReset(RESET_EVENT+RESETS_STANDARD+RESET_PHASE+PHASE_END)
tc:RegisterEffect(e3)
if tc:IsImmuneToEffect(e) or not rsisr.exlcon(e) then return end
rsop.SelectOC("des",true)
rsop.SelectDestroy(tp,Card.IsFaceup,tp,LOCATION_ONFIELD,LOCATION_ONFIELD,1,1,nil,{})
end
function cm.mvfilter(c,e,tp)
return c:IsFaceup() and rsisr.IsSet(c) and Duel.GetLocationCount(tp,LOCATION_MZONE,PLAYER_NONE,0)>0
end
function cm.mvop(e,tp,eg,ep,ev,re,r,rp)
local c=rscf.GetSelf(e)
local tc=rscf.GetTargetCard()
if not c or not tc or not tc:IsControler(tp) then return end
if Duel.GetLocationCount(tp,LOCATION_MZONE,PLAYER_NONE,0)>0 then
Duel.Hint(HINT_SELECTMSG,tp,HINTMSG_TOZONE)
local s=Duel.SelectDisableField(tp,1,LOCATION_MZONE,0,0)
local nseq=math.log(s,2)
Duel.MoveSequence(tc,nseq)
end
local e1,e2=rsef.SV_INDESTRUCTABLE({c,tc},"effect,battle",nil,nil,rsreset.est_pend)
end
\ No newline at end of file
--以斯拉的尖兵 梅尔卡巴
if not pcall(function() require("expansions/script/c65011001") end) then require("script/c65011001") end
local m,cm=rscf.DefineCard(65011008,"Israel")
function cm.initial_effect(c)
local e1=rsef.I(c,"tg",{1,m},"tg,des",nil,LOCATION_HAND,nil,rscost.cost(0,"dish"),rsop.target(cm.tgfilter,"tg",LOCATION_DECK),cm.tgop)
--Negate
local e4=Effect.CreateEffect(c)
e4:SetDescription(rshint.neg)
e4:SetCategory(CATEGORY_NEGATE+CATEGORY_DESTROY+CATEGORY_SPECIAL_SUMMON)
e4:SetType(EFFECT_TYPE_QUICK_O)
e4:SetCode(EVENT_CHAINING)
e4:SetRange(LOCATION_GRAVE)
e4:SetCountLimit(1,m)
e4:SetProperty(EFFECT_FLAG_DAMAGE_STEP+EFFECT_FLAG_DAMAGE_CAL)
e4:SetCondition(cm.condition)
e4:SetTarget(cm.target)
e4:SetOperation(cm.operation)
c:RegisterEffect(e4)
end
function cm.tgfilter(c)
return c:IsAbleToGrave() and rsisr.IsSet(c)
end
function cm.tgop(e,tp)
local ct,og,tc=rsop.SelectToGrave(tp,cm.tgfilter,tp,LOCATION_DECK,0,1,1,nil,{})
if tc and tc:IsLocation(LOCATION_GRAVE) then
rsop.SelectOC("des",true)
rsop.SelectDestroy(tp,cm.desfilter,tp,0,LOCATION_ONFIELD,1,1,nil,{})
end
end
function cm.desfilter(c)
return c:IsFaceup() and rsisr.IsSet(c)
end
function cm.condition(e,tp,eg,ep,ev,re,r,rp)
local loc=Duel.GetChainInfo(ev,CHAININFO_TRIGGERING_LEVEL)
return rp~=tp and re:IsActiveType(TYPE_MONSTER) and loc & LOCATION_ONFIELD ~=0 and Duel.IsChainNegatable(ev) and rsisr.exlcon(e)
end
function cm.target(e,tp,eg,ep,ev,re,r,rp,chk)
local c=e:GetHandler()
if chk==0 then return rsisr.spfilter(c,e,tp) end
Duel.SetOperationInfo(0,CATEGORY_SPECIAL_SUMMON,c,1,0,0)
Duel.SetOperationInfo(0,CATEGORY_NEGATE,eg,1,0,0)
if re:GetHandler():IsDestructable() and re:GetHandler():IsRelateToEffect(re) then
Duel.SetOperationInfo(0,CATEGORY_DESTROY,eg,1,0,0)
end
end
function cm.operation(e,tp,eg,ep,ev,re,r,rp)
if rsisr.spops(e,tp)>0 and Duel.NegateActivation(ev) and re:GetHandler():IsRelateToEffect(re) then
Duel.Destroy(eg,REASON_EFFECT)
end
end
--以斯拉的斥候 乌兹
if not pcall(function() require("expansions/script/c65011001") end) then require("script/c65011001") end
local m,cm=rscf.DefineCard(65011009,"Israel")
function cm.initial_effect(c)
local e1=rsef.I(c,"tg",{1,m},"tg",nil,LOCATION_HAND,nil,rscost.cost(0,"dish"),rsop.target(cm.tgfilter,"tg",LOCATION_DECK),cm.tgop)
local e2=rsef.I(c,"tg",{1,m},"tg,sp","tg",LOCATION_GRAVE,nil,nil,rstg.target({cm.tgfilter2,"tg",0,LOCATION_ONFIELD },rsop.list(rsisr.spfilter,"sp")),cm.tgop2)
local e3=rsef.RegisterOPTurn(c,e2,rsisr.exlcon)
end
function cm.tgfilter(c)
return c:IsAbleToGrave() and rsisr.IsSet(c)
end
function cm.tgop(e,tp)
rsop.SelectToGrave(tp,cm.tgfilter,tp,LOCATION_DECK,0,1,1,nil,{})
end
function cm.tgfilter2(c)
return c:IsAbleToGrave() and c:IsType(TYPE_SPELL+TYPE_TRAP)
end
function cm.tgop2(e,tp)
local tc=rscf.GetTargetCard()
if rsisr.spops(e,tp)>0 and tc then
Duel.SendtoGrave(tc,REASON_EFFECT)
end
end
\ No newline at end of file
--以斯拉的督师 加利尔
if not pcall(function() require("expansions/script/c65011001") end) then require("script/c65011001") end
local m,cm=rscf.DefineCard(65011010,"Israel")
function cm.initial_effect(c)
local e1=rsef.I(c,"se",{1,m},"se,th",nil,LOCATION_MZONE,nil,nil,rsop.target(cm.thfilter,"th",LOCATION_DECK),cm.thop)
local e2=rsef.I(c,"sp",{1,m+100},"sp",nil,LOCATION_GRAVE,nil,nil,rsop.target(rsisr.spfilter,"sp"),rsisr.spops)
end
function cm.thfilter(c)
return c:IsAbleToHand() and rsisr.IsSet(c) and c:IsType(TYPE_CONTINUOUS)
end
function cm.thop(e,tp)
local ct,og,tc=rsop.SelectToHand(tp,cm.thfilter,tp,LOCATION_DECK,0,1,1,nil,{})
if not tc then return end
local e1=rsef.FC({e:GetHandler(),tp},EVENT_CHAINING,nil,nil,nil,nil,nil,cm.regop,rsreset.pend)
e1:SetLabel(tc:GetCode())
end
function cm.regop(e,tp,eg,ep,ev,re,r,rp)
local code=e:GetLabel()
local code1,code2=Duel.GetChainInfo(0,CHAININFO_TRIGGERING_CODE,CHAININFO_TRIGGERING_CODE2)
if (code1 and code1==code) or (code2 and code2==code) then
local e1=Effect.CreateEffect(e:GetHandler())
e1:SetType(EFFECT_TYPE_FIELD)
e1:SetProperty(EFFECT_FLAG_PLAYER_TARGET)
e1:SetCode(EFFECT_CANNOT_SPECIAL_SUMMON)
e1:SetTargetRange(1,0)
e1:SetTarget(cm.splimit)
e1:SetReset(RESET_PHASE+PHASE_END)
Duel.RegisterEffect(e1,tp)
end
end
function cm.splimit(e,c)
return not rsisr.IsSet(c) and c:IsLocation(LOCATION_EXTRA)
end
--以斯拉的前锋 尼盖夫
if not pcall(function() require("expansions/script/c65011001") end) then require("script/c65011001") end
local m,cm=rscf.DefineCard(65011011,"Israel")
function cm.initial_effect(c)
local e1=rsef.I(c,"tg",{1,m},"tg,sp",nil,LOCATION_HAND,nil,rscost.cost(0,"dish"),rsop.target2(cm.fun,cm.tgfilter,"tg",LOCATION_DECK),cm.tgop)
local e2=rsef.I(c,"sp",{1,m+100},"sp",nil,LOCATION_GRAVE,nil,nil,rsop.target(rsisr.spfilter,"sp"),rsisr.spops)
end
function cm.tgfilter(c)
return c:IsAbleToGrave() and rsisr.IsSet(c)
end
function cm.fun(g,e,tp)
Duel.SetOperationInfo(0,CATEGORY_SPECIAL_SUMMON,nil,0,tp,rsloc.dg)
end
function cm.tgop(e,tp)
local e1=Effect.CreateEffect(e:GetHandler())
e1:SetType(EFFECT_TYPE_FIELD)
e1:SetProperty(EFFECT_FLAG_PLAYER_TARGET)
e1:SetCode(EFFECT_CANNOT_SPECIAL_SUMMON)
e1:SetTargetRange(1,0)
e1:SetTarget(cm.splimit)
e1:SetReset(RESET_PHASE+PHASE_END)
Duel.RegisterEffect(e1,tp)
local ct,og,tc=rsop.SelectToGrave(tp,cm.tgfilter,tp,LOCATION_DECK,0,1,1,nil,{})
if tc and tc:IsLocation(LOCATION_GRAVE) and rscon.excard2(rsisr.IsSet,0,LOCATION_MZONE)(e,tp) then
rsop.SelectOC("sp",true)
rsop.SelectSpecialSummon(tp,aux.NecroValleyFilter(rscf.spfilter2(rsisr.IsSet)),tp,rsloc.dg,0,1,1,nil,{},e,tp)
end
end
function cm.splimit(e,c)
return not rsisr.IsSet(c)
end
\ No newline at end of file
--以斯拉的后卫 爱恩多姆
if not pcall(function() require("expansions/script/c65011001") end) then require("script/c65011001") end
local m,cm=rscf.DefineCard(65011012,"Israel")
function cm.initial_effect(c)
local e1=rsef.I(c,"tg",{1,m},"tg,sp",nil,LOCATION_HAND,nil,rscost.cost(0,"dish"),rsop.target2(cm.fun,cm.tgfilter,"tg",LOCATION_DECK),cm.tgop)
local e2=rsef.I(c,"sp",{1,m+100},"sp",nil,LOCATION_GRAVE,nil,nil,rsop.target(rsisr.spfilter,"sp"),rsisr.spops)
end
function cm.tgfilter(c)
return c:IsAbleToGrave() and rsisr.IsSet(c)
end
function cm.fun(g,e,tp)
Duel.SetOperationInfo(0,CATEGORY_SPECIAL_SUMMON,nil,0,tp,rsloc.hd)
end
function cm.tgop(e,tp)
local e1=Effect.CreateEffect(e:GetHandler())
e1:SetType(EFFECT_TYPE_FIELD)
e1:SetProperty(EFFECT_FLAG_PLAYER_TARGET)
e1:SetCode(EFFECT_CANNOT_SPECIAL_SUMMON)
e1:SetTargetRange(1,0)
e1:SetTarget(cm.splimit)
e1:SetReset(RESET_PHASE+PHASE_END)
Duel.RegisterEffect(e1,tp)
local ct,og,tc=rsop.SelectToGrave(tp,cm.tgfilter,tp,LOCATION_DECK,0,1,1,nil,{})
if tc and tc:IsLocation(LOCATION_GRAVE) and rscon.excard2(rsisr.IsSet,0,LOCATION_MZONE)(e,tp) then
rsop.SelectOC("sp",true)
rsop.SelectSpecialSummon(tp,rscf.spfilter2(rsisr.IsSet),tp,rsloc.hd,0,1,1,nil,{},e,tp)
end
end
function cm.splimit(e,c)
return not rsisr.IsSet(c)
end
\ No newline at end of file
--以斯拉的猎鹰 杰利科
if not pcall(function() require("expansions/script/c65011001") end) then require("script/c65011001") end
local m,cm=rscf.DefineCard(65011013,"Israel")
function cm.initial_effect(c)
local e1=rsef.I(c,"tg",{1,m},"tg",nil,LOCATION_HAND,nil,rscost.cost(0,"dish"),rsop.target(cm.tgfilter,"tg",LOCATION_DECK),cm.tgop)
local e2=rsef.I(c,"tg",{1,m},"tg,sp",nil,LOCATION_GRAVE,rscon.excard2(rsisr.IsSet,LOCATION_MZONE),nil,rsop.target({Card.IsAbleToGrave,"tg",0,LOCATION_MZONE },{rsisr.spfilter,"sp"}),cm.tgop2)
local e3=rsef.RegisterOPTurn(c,e2,rsisr.exlcon)
end
function cm.tgfilter(c)
return c:IsAbleToGrave() and rsisr.IsSet(c)
end
function cm.tgop(e,tp)
rsop.SelectToGrave(tp,cm.tgfilter,tp,LOCATION_DECK,0,1,1,nil,{})
end
function cm.tgop2(e,tp)
if rsisr.spops(e,tp)>0 then
rsop.SelectToGrave(tp,Card.IsAbleToGrave,tp,0,LOCATION_MZONE,1,1,nil,{})
end
end
\ No newline at end of file
--以斯拉的海龙 萨尔
if not pcall(function() require("expansions/script/c65011001") end) then require("script/c65011001") end
local m,cm=rscf.DefineCard(65011014,"Israel")
function cm.initial_effect(c)
local e1=rsef.I(c,"tg",{1,m},"tg,sp",nil,LOCATION_HAND,nil,rscost.cost(0,"dish"),rsop.target2(cm.fun,cm.tgfilter,"tg",LOCATION_DECK),cm.tgop)
local e2=rsef.I(c,"sp",{1,m+100},"sp",nil,LOCATION_GRAVE,nil,nil,rsop.target(cm.spfilter,"sp"),cm.spop)
end
function cm.tgfilter(c)
return c:IsAbleToGrave() and rsisr.IsSet(c)
end
function cm.fun(g,e,tp)
local c=e:GetHandler()
if c:IsLocation(rsloc.gr) and c:IsReason(REASON_COST+REASON_DISCARD) then
Duel.SetTargetCard(c)
Duel.SetOperationInfo(0,CATEGORY_SPECIAL_SUMMON,c,0,0,0)
end
end
function cm.tgop(e,tp)
local c=e:GetHandler()
local ct,og,tc=rsop.SelectToGrave(tp,cm.tgfilter,tp,LOCATION_DECK,0,1,1,nil,{})
if tc and tc:IsLocation(LOCATION_GRAVE) and rscon.excard2(rsisr.IsSet,0,LOCATION_MZONE)(e,tp) and c:IsRelateToEffect(e) and rscf.spfilter2()(c,e,tp) and rsop.SelectYesNo(tp,"sp") then
Duel.SpecialSummon(c,0,tp,tp,false,false,POS_FACEUP)
end
end
function cm.spfilter(c,e,tp)
return c:IsCanBeSpecialSummoned(e,0,1-tp,1-tp,false,false,POS_FACEUP_DEFENSE) and Duel.GetLocationCount(1-tp,LOCATION_MZONE)>0
end
function cm.spop(e,tp)
rsisr.drawlimit(e,tp)
local c=rscf.GetSelf(e)
if c and rsisr.spop(e,tp,POS_FACEUP_DEFENSE)>0 then
rsop.SelectOC("sp",true)
rsop.SelectSpecialSummon(tp,aux.NecroValleyFilter(rscf.spfilter2(rsisr.IsSet)),tp,rsloc.dg,0,1,1,nil,{},e,tp)
end
end
--以斯拉的领主 涅塔尼亚胡
if not pcall(function() require("expansions/script/c65011001") end) then require("script/c65011001") end
local m,cm=rscf.DefineCard(65011015,"Israel")
function cm.initial_effect(c)
c:EnableReviveLimit()
--link
local e0=Effect.CreateEffect(c)
e0:SetDescription(1166)
e0:SetType(EFFECT_TYPE_FIELD)
e0:SetCode(EFFECT_SPSUMMON_PROC)
e0:SetProperty(EFFECT_FLAG_CANNOT_DISABLE+EFFECT_FLAG_UNCOPYABLE)
e0:SetRange(LOCATION_EXTRA)
e0:SetCondition(cm.LinkCondition(cm.lfilter,1,5))
e0:SetTarget(cm.LinkTarget(cm.lfilter,1,5))
e0:SetOperation(Auxiliary.LinkOperation(cm.lfilter,1,5))
e0:SetValue(SUMMON_TYPE_LINK)
c:RegisterEffect(e0)
--splimit
local e1=Effect.CreateEffect(c)
e1:SetType(EFFECT_TYPE_SINGLE+EFFECT_TYPE_CONTINUOUS)
e1:SetProperty(EFFECT_FLAG_CANNOT_DISABLE)
e1:SetCode(EVENT_SPSUMMON_SUCCESS)
e1:SetCondition(cm.regcon)
e1:SetOperation(cm.regop)
c:RegisterEffect(e1)
--act
local e2=rsef.STO(c,EVENT_SPSUMMON_SUCCESS,"act",nil,nil,"de",rscon.sumtype("link"),nil,rsop.target(cm.actfilter,nil,LOCATION_DECK),cm.actop)
if cm.switch then return end
cm.switch = true
local ge1=rsef.FC({c,0},EVENT_SPSUMMON_SUCCESS)
ge1:SetOperation(cm.regop2)
end
function cm.actfilter(c,e,tp)
return rsisr.IsSet(c) and c:IsType(TYPE_CONTINUOUS) and c:GetActivateEffect():IsActivatable(tp,true,true) and e:GetHandler():GetLinkedGroupCount()>0
end
function cm.actop(e,tp)
local c=rscf.GetFaceUpSelf(e)
if not c then return end
local ct=c:GetLinkedGroupCount()
if ct==0 then return end
local ft=Duel.GetLocationCount(tp,LOCATION_SZONE)
ct = math.min(ft,ct)
rsop.SelectSolve("act",tp,cm.actfilter,tp,LOCATION_DECK,0,1,ct,nil,cm.actfun,e,tp)
end
function cm.actfun(g,e,tp)
for tc in aux.Next(g) do
Duel.MoveToField(tc,tp,tp,LOCATION_SZONE,POS_FACEUP,true)
local te=tc:GetActivateEffect()
local tep=tc:GetControler()
local cost=te:GetCost()
if cost then cost(te,tep,eg,ep,ev,re,r,rp,1) end
end
return true
end
function cm.regop2(e,tp,eg)
for p=0,1 do
if eg:IsExists(cm.spcfilter,1,nil,p) and Duel.GetFlagEffect(1-p,m)<4 then
Duel.RegisterFlagEffect(1-p,m,rsreset.pend,0,1)
end
end
end
function cm.spcfilter(c,p)
return c:IsFaceup() and rsisr.IsSet(c) and c:GetSummonPlayer()==p
end
function cm.lfilter(c)
return rsisr.IsLinkSet(c) and not c:IsLinkType(TYPE_LINK)
end
function cm.LinkCondition(f,minc,maxc,gf)
return function(e,c,og,lmat,min,max)
if c==nil then return true end
if c:IsType(TYPE_PENDULUM) and c:IsFaceup() then return false end
local minc=minc
local maxc=maxc-Duel.GetFlagEffect(tp,m)
if min then
if min>minc then minc=min end
if max<maxc then maxc=max end
if minc>maxc then return false end
end
local tp=c:GetControler()
local mg=nil
if og then
mg=og:Filter(Auxiliary.LConditionFilter,nil,f,c)
else
mg=Auxiliary.GetLinkMaterials(tp,f,c)
end
if lmat~=nil then
if not Auxiliary.LConditionFilter(lmat,f,c) then return false end
mg:AddCard(lmat)
end
local fg=Auxiliary.GetMustMaterialGroup(tp,EFFECT_MUST_BE_LMATERIAL)
if fg:IsExists(Auxiliary.MustMaterialCounterFilter,1,nil,mg) then return false end
Duel.SetSelectedCard(fg)
return mg:CheckSubGroup(cm.LCheckGoal,minc,maxc,tp,c,gf,lmat)
end
end
function cm.LCheckGoal(sg,tp,lc,gf,lmat)
return sg:CheckWithSumEqual(Auxiliary.GetLinkCount,lc:GetLink()-Duel.GetFlagEffect(tp,m),#sg,#sg)
and Duel.GetLocationCountFromEx(tp,tp,sg,lc)>0 and (not gf or gf(sg))
and not sg:IsExists(Auxiliary.LUncompatibilityFilter,1,nil,sg,lc,tp)
and (not lmat or sg:IsContains(lmat))
end
function cm.LinkTarget(f,minc,maxc,gf)
return function(e,tp,eg,ep,ev,re,r,rp,chk,c,og,lmat,min,max)
local minc=minc
local maxc=maxc-Duel.GetFlagEffect(tp,m)
if min then
if min>minc then minc=min end
if max<maxc then maxc=max end
if minc>maxc then return false end
end
local mg=nil
if og then
mg=og:Filter(Auxiliary.LConditionFilter,nil,f,c)
else
mg=Auxiliary.GetLinkMaterials(tp,f,c)
end
if lmat~=nil then
if not Auxiliary.LConditionFilter(lmat,f,c) then return false end
mg:AddCard(lmat)
end
local fg=Auxiliary.GetMustMaterialGroup(tp,EFFECT_MUST_BE_LMATERIAL)
Duel.SetSelectedCard(fg)
Duel.Hint(HINT_SELECTMSG,tp,HINTMSG_LMATERIAL)
local cancel=Duel.IsSummonCancelable()
local sg=mg:SelectSubGroup(tp,cm.LCheckGoal,cancel,minc,maxc,tp,c,gf,lmat)
if sg then
sg:KeepAlive()
e:SetLabelObject(sg)
return true
else return false end
end
end
function cm.regcon(e,tp,eg,ep,ev,re,r,rp)
return e:GetHandler():IsSummonType(SUMMON_TYPE_LINK)
end
function cm.regop(e,tp,eg,ep,ev,re,r,rp)
local e1=Effect.CreateEffect(e:GetHandler())
e1:SetType(EFFECT_TYPE_FIELD)
e1:SetProperty(EFFECT_FLAG_PLAYER_TARGET)
e1:SetCode(EFFECT_CANNOT_SPECIAL_SUMMON)
e1:SetTargetRange(1,0)
e1:SetReset(RESET_PHASE+PHASE_END)
e1:SetTarget(cm.splimit)
Duel.RegisterEffect(e1,tp)
end
function cm.splimit(e,c,sump,sumtype,sumpos,targetp,se)
return c:IsCode(m) and bit.band(sumtype,SUMMON_TYPE_LINK)==SUMMON_TYPE_LINK
end
\ No newline at end of file
--以斯拉的天使 加布里埃尔
if not pcall(function() require("expansions/script/c65011001") end) then require("script/c65011001") end
local m,cm=rscf.DefineCard(65011016,"Israel")
function cm.initial_effect(c)
rscf.SetSummonCondition(c,false,aux.FALSE)
aux.AddFusionProcFunRep(c,rsisr.IsFusSet,2,false)
aux.AddContactFusionProcedure(c,Card.IsReleasable,LOCATION_MZONE,0,Duel.Release,REASON_COST+REASON_MATERIAL)
local e1=rsef.STO(c,EVENT_SPSUMMON_SUCCESS,"act",{1,m},nil,"de",nil,nil,rsop.target(cm.actfilter,nil,LOCATION_DECK),cm.actop)
local e2=rsef.I(c,"des",{1,m},"des","tg",LOCATION_MZONE,nil,rscost.reglabel(100),cm.destg,cm.desop)
end
function cm.actfilter(c,e,tp)
return rsisr.IsSet(c) and c:IsComplexType(TYPE_SPELL,true,TYPE_CONTINUOUS,TYPE_FIELD) and c:GetActivateEffect():IsActivatable(tp,true,true)
end
function cm.actop(e,tp)
rsop.SelectMoveToField_Activate(tp,cm.actfilter,tp,LOCATION_DECK,0,1,1,nil,{},e,tp)
end
function cm.cfilter(c)
return c:IsFaceup() and rsisr.IsSetS(c) and c:IsAbleToGraveAsCost()
end
function cm.gcheck(g,e,tp)
local eg=Group.CreateGroup()
for tc in aux.Next(g) do
eg:Merge(tc:GetEquipGroup())
end
eg:Merge(g)
return Duel.IsExistingTarget(aux.TRUE,tp,LOCATION_ONFIELD,LOCATION_ONFIELD,#g,eg)
end
function cm.destg(e,tp,eg,ep,ev,re,r,rp,chk,chkc)
local tg=Duel.GetMatchingGroup(cm.cfilter,tp,LOCATION_ONFIELD,0,nil)
if chkc then return chkc:IsOnField() end
if chk==0 then
if e:GetLabel()~=100 then return false end
e:SetLabel(0)
return tg:CheckSubGroup(cm.gcheck,1,2,tp)
end
rshint.Select(tp,"tg")
local tg2=tg:SelectSubGroup(tp,cm.gcheck,false,1,2,tp)
local ct=Duel.SendtoGrave(tg2,REASON_COST)
rshint.Select(tp,"des")
local dg=Duel.SelectTarget(tp,aux.TRUE,tp,LOCATION_ONFIELD,LOCATION_ONFIELD,ct,ct,nil)
Duel.SetOperationInfo(0,CATEGORY_DESTROY,dg,#dg,0,0)
end
function cm.desop(e,tp)
local tg=rsgf.GetTargetGroup()
Duel.Destroy(tg,REASON_EFFECT)
end
\ No newline at end of file
...@@ -33,7 +33,7 @@ function c72100117.initial_effect(c) ...@@ -33,7 +33,7 @@ function c72100117.initial_effect(c)
c:RegisterEffect(e4) c:RegisterEffect(e4)
end end
function c72100117.spfilter(c) function c72100117.spfilter(c)
return c:IsSetCard(0x105) and c:IsAbleToRemoveAsCost() and (not c:IsLocation(LOCATION_MZONE) or c:IsFaceup()) return c:IsSetCard(0x105) and c:IsAbleToRemoveAsCost() and (not c:IsLocation(LOCATION_MZONE) or c:IsFaceup()) and c:IsType(TYPE_MONSTER)
end end
function c72100117.hspcon(e,c) function c72100117.hspcon(e,c)
if c==nil then return true end if c==nil then return true end
...@@ -41,16 +41,16 @@ function c72100117.hspcon(e,c) ...@@ -41,16 +41,16 @@ function c72100117.hspcon(e,c)
local ft=Duel.GetLocationCount(tp,LOCATION_MZONE) local ft=Duel.GetLocationCount(tp,LOCATION_MZONE)
if ft<=-1 then return false end if ft<=-1 then return false end
if ft<=0 then if ft<=0 then
return Duel.IsExistingMatchingCard(c72100117.spfilter,tp,LOCATION_MZONE,0,1,nil) return Duel.IsExistingMatchingCard(c72100117.spfilter,tp,LOCATION_MZONE,0,1,c)
else return Duel.IsExistingMatchingCard(c72100117.spfilter,tp,0x16,0,1,nil) end else return Duel.IsExistingMatchingCard(c72100117.spfilter,tp,0x16,0,1,c) end
end end
function c72100117.hspop(e,tp,eg,ep,ev,re,r,rp,c) function c72100117.hspop(e,tp,eg,ep,ev,re,r,rp,c)
Duel.Hint(HINT_SELECTMSG,tp,HINTMSG_REMOVE) Duel.Hint(HINT_SELECTMSG,tp,HINTMSG_REMOVE)
if Duel.GetLocationCount(tp,LOCATION_MZONE)<=0 then if Duel.GetLocationCount(tp,LOCATION_MZONE)<=0 then
local g=Duel.SelectMatchingCard(tp,c72100117.spfilter,tp,LOCATION_MZONE,0,1,1,nil) local g=Duel.SelectMatchingCard(tp,c72100117.spfilter,tp,LOCATION_MZONE,0,1,1,c)
Duel.Remove(g,POS_FACEUP,REASON_COST) Duel.Remove(g,POS_FACEUP,REASON_COST)
else else
local g=Duel.SelectMatchingCard(tp,c72100117.spfilter,tp,0x16,0,1,1,nil) local g=Duel.SelectMatchingCard(tp,c72100117.spfilter,tp,0x16,0,1,1,c)
Duel.Remove(g,POS_FACEUP,REASON_COST) Duel.Remove(g,POS_FACEUP,REASON_COST)
end end
end end
......
...@@ -6,7 +6,7 @@ function c88990205.initial_effect(c) ...@@ -6,7 +6,7 @@ function c88990205.initial_effect(c)
--炸卡 --炸卡
local e1=Effect.CreateEffect(c) local e1=Effect.CreateEffect(c)
e1:SetDescription(aux.Stringid(88990205,0)) e1:SetDescription(aux.Stringid(88990205,0))
e1:SetCategory(CATEGORY_DESTROY) e1:SetCategory(CATEGORY_DESTROY+CATEGORY_REMOVE)
e1:SetType(EFFECT_TYPE_IGNITION) e1:SetType(EFFECT_TYPE_IGNITION)
e1:SetRange(LOCATION_MZONE) e1:SetRange(LOCATION_MZONE)
e1:SetCountLimit(1,12196875) e1:SetCountLimit(1,12196875)
...@@ -51,11 +51,13 @@ function c88990205.target(e,tp,eg,ep,ev,re,r,rp,chk) ...@@ -51,11 +51,13 @@ function c88990205.target(e,tp,eg,ep,ev,re,r,rp,chk)
if chk==0 then return Duel.IsExistingMatchingCard(c88990205.cfilter,tp,LOCATION_REMOVED,0,1,nil) if chk==0 then return Duel.IsExistingMatchingCard(c88990205.cfilter,tp,LOCATION_REMOVED,0,1,nil)
and Duel.IsExistingMatchingCard(c88990205.filter,tp,0,LOCATION_ONFIELD,1,nil) end and Duel.IsExistingMatchingCard(c88990205.filter,tp,0,LOCATION_ONFIELD,1,nil) end
local g=Duel.GetMatchingGroup(c88990205.filter,tp,0,LOCATION_ONFIELD,nil) local g=Duel.GetMatchingGroup(c88990205.filter,tp,0,LOCATION_ONFIELD,nil)
Duel.SetOperationInfo(0,CATEGORY_REMOVE,e:GetHandler(),1,0,0)
Duel.SetOperationInfo(0,CATEGORY_DESTROY,g,1,0,0) Duel.SetOperationInfo(0,CATEGORY_DESTROY,g,1,0,0)
end end
function c88990205.operation(e,tp,eg,ep,ev,re,r,rp) function c88990205.operation(e,tp,eg,ep,ev,re,r,rp)
local c=e:GetHandler()
local ct=Duel.GetMatchingGroupCount(c88990205.cfilter,tp,LOCATION_REMOVED,0,nil) local ct=Duel.GetMatchingGroupCount(c88990205.cfilter,tp,LOCATION_REMOVED,0,nil)
if ct==0 then return end if ct==0 or not c:IsRelateToEffect(e) or Duel.Remove(c,POS_FACEUP,REASON_EFFECT) then return end
Duel.Hint(HINT_SELECTMSG,tp,HINTMSG_DESTROY) Duel.Hint(HINT_SELECTMSG,tp,HINTMSG_DESTROY)
local g=Duel.SelectMatchingCard(tp,c88990205.filter,tp,0,LOCATION_ONFIELD,1,ct,nil) local g=Duel.SelectMatchingCard(tp,c88990205.filter,tp,0,LOCATION_ONFIELD,1,ct,nil)
Duel.Destroy(g,REASON_EFFECT) Duel.Destroy(g,REASON_EFFECT)
......
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