Commit d8b52a05 authored by Uytrewq's avatar Uytrewq Committed by GitHub

update special summon proc (#2366)

parent 8a548595
......@@ -16,6 +16,7 @@ function c10485110.initial_effect(c)
e2:SetProperty(EFFECT_FLAG_CANNOT_DISABLE+EFFECT_FLAG_UNCOPYABLE)
e2:SetRange(LOCATION_HAND)
e2:SetCondition(c10485110.spcon)
e2:SetTarget(c10485110.sptg)
e2:SetOperation(c10485110.spop)
c:RegisterEffect(e2)
--tograve
......@@ -29,12 +30,24 @@ function c10485110.initial_effect(c)
e3:SetOperation(c10485110.operation)
c:RegisterEffect(e3)
end
function c10485110.spfilter(c,tp)
return c:IsFaceup() and c:IsCode(37721209) and Duel.GetMZoneCount(tp,c)>0
end
function c10485110.spcon(e,c)
if c==nil then return true end
return Duel.CheckReleaseGroupEx(c:GetControler(),Card.IsCode,1,REASON_SPSUMMON,false,nil,37721209)
return Duel.CheckReleaseGroupEx(c:GetControler(),c10485110.spfilter,1,REASON_SPSUMMON,false,nil,c:GetControler())
end
function c10485110.sptg(e,tp,eg,ep,ev,re,r,rp,chk,c)
local g=Duel.GetReleaseGroup(tp,false,REASON_SPSUMMON):Filter(c10485110.spfilter,nil,tp)
Duel.Hint(HINT_SELECTMSG,tp,HINTMSG_RELEASE)
local tc=g:SelectUnselect(nil,tp,false,true,1,1)
if tc then
e:SetLabelObject(tc)
return true
else return false end
end
function c10485110.spop(e,tp,eg,ep,ev,re,r,rp,c)
local g=Duel.SelectReleaseGroupEx(tp,Card.IsCode,1,1,REASON_SPSUMMON,false,nil,37721209)
local g=e:GetLabelObject()
Duel.Release(g,REASON_SPSUMMON)
end
function c10485110.cfilter(c)
......
......@@ -18,6 +18,7 @@ function c11443677.initial_effect(c)
e2:SetCode(EFFECT_SPSUMMON_PROC)
e2:SetRange(LOCATION_EXTRA)
e2:SetCondition(c11443677.sprcon)
e2:SetTarget(c11443677.sprtg)
e2:SetOperation(c11443677.sprop)
c:RegisterEffect(e2)
--immune
......@@ -61,11 +62,19 @@ function c11443677.sprcon(e,c)
local tp=c:GetControler()
return Duel.CheckReleaseGroupEx(tp,c11443677.sprfilter,1,REASON_SPSUMMON,false,nil,tp,c)
end
function c11443677.sprop(e,tp,eg,ep,ev,re,r,rp,c)
function c11443677.sprtg(e,tp,eg,ep,ev,re,r,rp,chk,c)
local g=Duel.GetReleaseGroup(tp,false,REASON_SPSUMMON):Filter(c11443677.sprfilter,nil,tp,c)
Duel.Hint(HINT_SELECTMSG,tp,HINTMSG_RELEASE)
local g=Duel.SelectReleaseGroupEx(tp,c11443677.sprfilter,1,1,REASON_SPSUMMON,false,nil,tp,c)
c:SetMaterial(g)
Duel.Release(g,REASON_SPSUMMON)
local tc=g:SelectUnselect(nil,tp,false,true,1,1)
if tc then
e:SetLabelObject(tc)
return true
else return false end
end
function c11443677.sprop(e,tp,eg,ep,ev,re,r,rp,c)
local tc=e:GetLabelObject()
c:SetMaterial(Group.FromCards(tc))
Duel.Release(tc,REASON_SPSUMMON)
end
function c11443677.efilter(e,te)
return te:IsActiveType(TYPE_TRAP)
......
......@@ -14,6 +14,7 @@ function c11458071.initial_effect(c)
e2:SetProperty(EFFECT_FLAG_CANNOT_DISABLE+EFFECT_FLAG_UNCOPYABLE)
e2:SetRange(LOCATION_HAND)
e2:SetCondition(c11458071.spcon)
e2:SetTarget(c11458071.sptg)
e2:SetOperation(c11458071.spop)
c:RegisterEffect(e2)
--remove
......@@ -29,23 +30,38 @@ function c11458071.initial_effect(c)
e3:SetOperation(c11458071.rmop)
c:RegisterEffect(e3)
end
function c11458071.spfilter(c,rac,att)
return c:IsRace(rac) and c:IsAttribute(att) and c:IsAbleToRemoveAsCost()
c11458071.spchecks={c11458071.spfilter1,c11458071.spfilter1,c11458071.spfilter1,c11458071.spfilter2}
function c11458071.spfilter1(c)
return c:IsRace(RACE_FAIRY) and c:IsAttribute(ATTRIBUTE_LIGHT)
end
function c11458071.spfilter2(c)
return c:IsRace(RACE_FIEND) and c:IsAttribute(ATTRIBUTE_DARK)
end
function c11458071.spfilter(c)
return ((c:IsRace(RACE_FAIRY) and c:IsAttribute(ATTRIBUTE_LIGHT)) or (c:IsRace(RACE_FIEND) and c:IsAttribute(ATTRIBUTE_DARK)))
and c:IsAbleToRemoveAsCost()
end
function c11458071.spcon(e,c)
if c==nil then return true end
local tp=c:GetControler()
local g=Duel.GetMatchingGroup(c11458071.spfilter,tp,LOCATION_GRAVE,0,nil)
return Duel.GetLocationCount(tp,LOCATION_MZONE)>0
and Duel.IsExistingMatchingCard(c11458071.spfilter,tp,LOCATION_GRAVE,0,3,nil,RACE_FAIRY,ATTRIBUTE_LIGHT)
and Duel.IsExistingMatchingCard(c11458071.spfilter,tp,LOCATION_GRAVE,0,1,nil,RACE_FIEND,ATTRIBUTE_DARK)
and g:CheckSubGroupEach(c11458071.spchecks)
end
function c11458071.spop(e,tp,eg,ep,ev,re,r,rp,c)
function c11458071.sptg(e,tp,eg,ep,ev,re,r,rp,chk,c)
local g=Duel.GetMatchingGroup(c11458071.spfilter,tp,LOCATION_GRAVE,0,nil)
Duel.Hint(HINT_SELECTMSG,tp,HINTMSG_REMOVE)
local g1=Duel.SelectMatchingCard(tp,c11458071.spfilter,tp,LOCATION_GRAVE,0,3,3,nil,RACE_FAIRY,ATTRIBUTE_LIGHT)
Duel.Hint(HINT_SELECTMSG,tp,HINTMSG_REMOVE)
local g2=Duel.SelectMatchingCard(tp,c11458071.spfilter,tp,LOCATION_GRAVE,0,1,1,nil,RACE_FIEND,ATTRIBUTE_DARK)
g1:Merge(g2)
Duel.Remove(g1,POS_FACEUP,REASON_COST)
local sg=g:SelectSubGroupEach(tp,c11458071.spchecks,true)
if sg then
sg:KeepAlive()
e:SetLabelObject(sg)
return true
else return false end
end
function c11458071.spop(e,tp,eg,ep,ev,re,r,rp,c)
local g=e:GetLabelObject()
Duel.Remove(g,POS_FACEUP,REASON_SPSUMMON)
g:DeleteGroup()
end
function c11458071.rmcost(e,tp,eg,ep,ev,re,r,rp,chk)
if chk==0 then return e:GetHandler():GetAttackAnnouncedCount()==0 end
......
......@@ -9,6 +9,7 @@ function c11637481.initial_effect(c)
e1:SetRange(LOCATION_HAND)
e1:SetCountLimit(1,11637481+EFFECT_COUNT_CODE_OATH)
e1:SetCondition(c11637481.spcon)
e1:SetTarget(c11637481.sptg)
e1:SetOperation(c11637481.spop)
c:RegisterEffect(e1)
--special summon from deck
......@@ -25,21 +26,27 @@ function c11637481.initial_effect(c)
e2:SetOperation(c11637481.spop2)
c:RegisterEffect(e2)
end
function c11637481.spfilter(c,ft)
function c11637481.spfilter(c,tp)
return c:IsFaceup() and c:IsSetCard(0xb2) and not c:IsCode(11637481) and c:IsAbleToHandAsCost()
and (ft>0 or c:GetSequence()<5)
and Duel.GetMZoneCount(tp,c)>0
end
function c11637481.spcon(e,c)
if c==nil then return true end
local tp=c:GetControler()
local ft=Duel.GetLocationCount(tp,LOCATION_MZONE)
return ft>-1 and Duel.IsExistingMatchingCard(c11637481.spfilter,tp,LOCATION_MZONE,0,1,nil,ft)
return Duel.IsExistingMatchingCard(c11637481.spfilter,tp,LOCATION_MZONE,0,1,nil,tp)
end
function c11637481.spop(e,tp,eg,ep,ev,re,r,rp,c)
local ft=Duel.GetLocationCount(tp,LOCATION_MZONE)
function c11637481.sptg(e,tp,eg,ep,ev,re,r,rp,chk,c)
local g=Duel.GetMatchingGroup(c11637481.spfilter,tp,LOCATION_MZONE,0,nil,tp)
Duel.Hint(HINT_SELECTMSG,tp,HINTMSG_RTOHAND)
local g=Duel.SelectMatchingCard(tp,c11637481.spfilter,tp,LOCATION_MZONE,0,1,1,nil,ft)
Duel.SendtoHand(g,nil,REASON_COST)
local tc=g:SelectUnselect(nil,tp,false,true,1,1)
if tc then
e:SetLabelObject(tc)
return true
else return false end
end
function c11637481.spop(e,tp,eg,ep,ev,re,r,rp,c)
local g=e:GetLabelObject()
Duel.SendtoHand(g,nil,REASON_SPSUMMON)
end
function c11637481.spcon2(e,tp,eg,ep,ev,re,r,rp)
return Duel.GetTurnPlayer()~=tp and (Duel.GetCurrentPhase()==PHASE_MAIN1 or Duel.GetCurrentPhase()==PHASE_MAIN2)
......
......@@ -8,6 +8,7 @@ function c12510878.initial_effect(c)
e1:SetProperty(EFFECT_FLAG_UNCOPYABLE)
e1:SetRange(LOCATION_HAND)
e1:SetCondition(c12510878.spcon)
e1:SetTarget(c12510878.sptg)
e1:SetOperation(c12510878.spop)
c:RegisterEffect(e1)
--draw
......@@ -38,12 +39,24 @@ function c12510878.initial_effect(c)
e5:SetCode(EFFECT_UPDATE_DEFENSE)
c:RegisterEffect(e5)
end
function c12510878.spfilter(c,tp)
return c:IsFaceup() and c:IsCode(18036057) and Duel.GetMZoneCount(tp,c)>0
end
function c12510878.spcon(e,c)
if c==nil then return true end
return Duel.CheckReleaseGroupEx(c:GetControler(),Card.IsCode,1,REASON_SPSUMMON,false,nil,18036057)
return Duel.CheckReleaseGroupEx(c:GetControler(),c12510878.spfilter,1,REASON_SPSUMMON,false,nil,c:GetControler())
end
function c12510878.sptg(e,tp,eg,ep,ev,re,r,rp,chk,c)
local g=Duel.GetReleaseGroup(tp,false,REASON_SPSUMMON):Filter(c12510878.spfilter,nil,tp)
Duel.Hint(HINT_SELECTMSG,tp,HINTMSG_RELEASE)
local tc=g:SelectUnselect(nil,tp,false,true,1,1)
if tc then
e:SetLabelObject(tc)
return true
else return false end
end
function c12510878.spop(e,tp,eg,ep,ev,re,r,rp,c)
local g=Duel.SelectReleaseGroupEx(c:GetControler(),Card.IsCode,1,1,REASON_SPSUMMON,false,nil,18036057)
local g=e:GetLabelObject()
Duel.Release(g,REASON_SPSUMMON)
end
function c12510878.condition(e,tp,eg,ep,ev,re,r,rp)
......
......@@ -8,6 +8,7 @@ function c12800777.initial_effect(c)
e1:SetProperty(EFFECT_FLAG_CANNOT_DISABLE+EFFECT_FLAG_UNCOPYABLE)
e1:SetRange(LOCATION_HAND)
e1:SetCondition(c12800777.spcon)
e1:SetTarget(c12800777.sptg)
e1:SetOperation(c12800777.spop)
c:RegisterEffect(e1)
--atk
......@@ -32,10 +33,18 @@ function c12800777.spcon(e,c)
return Duel.GetLocationCount(tp,LOCATION_MZONE)>0
and Duel.IsExistingMatchingCard(c12800777.spfilter,tp,LOCATION_GRAVE,0,1,nil)
end
function c12800777.spop(e,tp,eg,ep,ev,re,r,rp,c)
function c12800777.sptg(e,tp,eg,ep,ev,re,r,rp,chk,c)
local g=Duel.GetMatchingGroup(c12800777.spfilter,tp,LOCATION_GRAVE,0,nil)
Duel.Hint(HINT_SELECTMSG,tp,HINTMSG_REMOVE)
local g=Duel.SelectMatchingCard(tp,c12800777.spfilter,tp,LOCATION_GRAVE,0,1,1,nil)
Duel.Remove(g,POS_FACEUP,REASON_COST)
local tc=g:SelectUnselect(nil,tp,false,true,1,1)
if tc then
e:SetLabelObject(tc)
return true
else return false end
end
function c12800777.spop(e,tp,eg,ep,ev,re,r,rp,c)
local g=e:GetLabelObject()
Duel.Remove(g,POS_FACEUP,REASON_SPSUMMON)
end
function c12800777.poscon(e,tp,eg,ep,ev,re,r,rp)
return Duel.GetTurnPlayer()~=tp
......
......@@ -7,6 +7,7 @@ function c13224603.initial_effect(c)
e1:SetCode(EFFECT_SPSUMMON_PROC)
e1:SetRange(LOCATION_HAND)
e1:SetCondition(c13224603.hspcon)
e1:SetTarget(c13224603.hsptg)
e1:SetOperation(c13224603.hspop)
e1:SetValue(SUMMON_VALUE_SELF)
c:RegisterEffect(e1)
......@@ -56,8 +57,17 @@ function c13224603.hspcon(e,c)
local tp=c:GetControler()
return Duel.CheckReleaseGroupEx(tp,c13224603.hspfilter,1,REASON_SPSUMMON,false,nil,tp)
end
function c13224603.hsptg(e,tp,eg,ep,ev,re,r,rp,chk,c)
local g=Duel.GetReleaseGroup(tp,false,REASON_SPSUMMON):Filter(c13224603.hspfilter,nil,tp)
Duel.Hint(HINT_SELECTMSG,tp,HINTMSG_RELEASE)
local tc=g:SelectUnselect(nil,tp,false,true,1,1)
if tc then
e:SetLabelObject(tc)
return true
else return false end
end
function c13224603.hspop(e,tp,eg,ep,ev,re,r,rp,c)
local g=Duel.SelectReleaseGroupEx(tp,c13224603.hspfilter,1,1,REASON_SPSUMMON,false,nil,tp)
local g=e:GetLabelObject()
Duel.Release(g,REASON_SPSUMMON)
end
function c13224603.sumcon(e,tp,eg,ep,ev,re,r,rp)
......
......@@ -51,7 +51,7 @@ function c13250922.sptg(e,tp,eg,ep,ev,re,r,rp,chk,c)
end
function c13250922.spop(e,tp,eg,ep,ev,re,r,rp,c)
local g=e:GetLabelObject()
Duel.SendtoGrave(g,REASON_COST)
Duel.SendtoGrave(g,REASON_SPSUMMON)
g:DeleteGroup()
end
function c13250922.filter(c)
......
......@@ -22,6 +22,7 @@ function c13474291.initial_effect(c)
e3:SetProperty(EFFECT_FLAG_CANNOT_DISABLE+EFFECT_FLAG_UNCOPYABLE)
e3:SetRange(LOCATION_HAND)
e3:SetCondition(c13474291.spcon)
e3:SetTarget(c13474291.sptg)
e3:SetOperation(c13474291.spop)
c:RegisterEffect(e3)
--counter
......@@ -47,10 +48,18 @@ function c13474291.spcon(e,c)
return Duel.GetLocationCount(tp,LOCATION_MZONE)>0
and Duel.IsExistingMatchingCard(c13474291.cfilter,tp,LOCATION_GRAVE,0,1,nil)
end
function c13474291.spop(e,tp,eg,ep,ev,re,r,rp,c)
function c13474291.sptg(e,tp,eg,ep,ev,re,r,rp,chk,c)
local g=Duel.GetMatchingGroup(c13474291.cfilter,tp,LOCATION_GRAVE,0,nil)
Duel.Hint(HINT_SELECTMSG,tp,HINTMSG_REMOVE)
local g=Duel.SelectMatchingCard(tp,c13474291.cfilter,tp,LOCATION_GRAVE,0,1,1,nil)
Duel.Remove(g,POS_FACEUP,REASON_COST)
local tc=g:SelectUnselect(nil,tp,false,true,1,1)
if tc then
e:SetLabelObject(tc)
return true
else return false end
end
function c13474291.spop(e,tp,eg,ep,ev,re,r,rp,c)
local g=e:GetLabelObject()
Duel.Remove(g,POS_FACEUP,REASON_SPSUMMON)
end
function c13474291.cttg(e,tp,eg,ep,ev,re,r,rp,chk,chkc)
if chkc then return chkc:IsLocation(LOCATION_MZONE) and chkc:IsCanAddCounter(0x1019,1) end
......
......@@ -8,6 +8,7 @@ function c13522325.initial_effect(c)
e1:SetProperty(EFFECT_FLAG_CANNOT_DISABLE+EFFECT_FLAG_UNCOPYABLE)
e1:SetRange(LOCATION_HAND)
e1:SetCondition(c13522325.spcon)
e1:SetTarget(c13522325.sptg)
e1:SetOperation(c13522325.spop)
c:RegisterEffect(e1)
--atk
......@@ -34,8 +35,16 @@ function c13522325.spcon(e,c)
return Duel.GetLocationCount(tp,LOCATION_MZONE)>0
and Duel.IsExistingMatchingCard(c13522325.spfilter,tp,LOCATION_GRAVE,0,1,nil)
end
function c13522325.spop(e,tp,eg,ep,ev,re,r,rp,c)
function c13522325.sptg(e,tp,eg,ep,ev,re,r,rp,chk,c)
local g=Duel.GetMatchingGroup(c13522325.spfilter,tp,LOCATION_GRAVE,0,nil)
Duel.Hint(HINT_SELECTMSG,tp,HINTMSG_REMOVE)
local g=Duel.SelectMatchingCard(tp,c13522325.spfilter,tp,LOCATION_GRAVE,0,1,1,nil)
Duel.Remove(g,POS_FACEUP,REASON_COST)
local tc=g:SelectUnselect(nil,tp,false,true,1,1)
if tc then
e:SetLabelObject(tc)
return true
else return false end
end
function c13522325.spop(e,tp,eg,ep,ev,re,r,rp,c)
local g=e:GetLabelObject()
Duel.Remove(g,POS_FACEUP,REASON_SPSUMMON)
end
......@@ -14,6 +14,7 @@ function c13821299.initial_effect(c)
e2:SetProperty(EFFECT_FLAG_CANNOT_DISABLE+EFFECT_FLAG_UNCOPYABLE)
e2:SetRange(LOCATION_HAND)
e2:SetCondition(c13821299.spcon)
e2:SetTarget(c13821299.sptg)
e2:SetOperation(c13821299.spop)
c:RegisterEffect(e2)
end
......@@ -25,8 +26,16 @@ function c13821299.spcon(e,c)
return Duel.GetLocationCount(c:GetControler(),LOCATION_MZONE)>0
and Duel.IsExistingMatchingCard(c13821299.spfilter,c:GetControler(),0,LOCATION_ONFIELD,1,nil)
end
function c13821299.spop(e,tp,eg,ep,ev,re,r,rp,c)
function c13821299.sptg(e,tp,eg,ep,ev,re,r,rp,chk,c)
local g=Duel.GetMatchingGroup(c13821299.spfilter,tp,0,LOCATION_ONFIELD,nil)
Duel.Hint(HINT_SELECTMSG,tp,HINTMSG_TOGRAVE)
local g=Duel.SelectMatchingCard(tp,c13821299.spfilter,tp,0,LOCATION_ONFIELD,1,1,nil)
Duel.SendtoGrave(g,REASON_COST)
local tc=g:SelectUnselect(nil,tp,false,true,1,1)
if tc then
e:SetLabelObject(tc)
return true
else return false end
end
function c13821299.spop(e,tp,eg,ep,ev,re,r,rp,c)
local g=e:GetLabelObject()
Duel.SendtoGrave(g,REASON_SPSUMMON)
end
......@@ -48,7 +48,7 @@ function c13893596.spcon(e,c)
end
function c13893596.spop(e,tp,eg,ep,ev,re,r,rp,c)
local g=Duel.GetMatchingGroup(Card.IsType,tp,LOCATION_GRAVE,0,nil,TYPE_MONSTER)
Duel.SendtoDeck(g,nil,SEQ_DECKSHUFFLE,REASON_COST)
Duel.SendtoDeck(g,nil,SEQ_DECKSHUFFLE,REASON_SPSUMMON)
end
function c13893596.tgtg(e,tp,eg,ep,ev,re,r,rp,chk)
if chk==0 then return true end
......
......@@ -8,21 +8,31 @@ function c14141448.initial_effect(c)
e2:SetProperty(EFFECT_FLAG_CANNOT_DISABLE+EFFECT_FLAG_UNCOPYABLE)
e2:SetRange(LOCATION_HAND)
e2:SetCondition(c14141448.spcon)
e2:SetTarget(c14141448.sptg)
e2:SetOperation(c14141448.spop)
c:RegisterEffect(e2)
end
function c14141448.eqfilter(c)
return c:IsCode(40240595) and c:GetTurnCounter()>=4
end
function c14141448.rfilter(c)
function c14141448.rfilter(c,tp)
return c:IsCode(58192742) and c:GetEquipGroup():IsExists(c14141448.eqfilter,1,nil)
and Duel.GetMZoneCount(tp,c)>0
end
function c14141448.spcon(e,c)
if c==nil then return true end
return Duel.GetLocationCount(c:GetControler(),LOCATION_MZONE)>-1
and Duel.CheckReleaseGroupEx(c:GetControler(),c14141448.rfilter,1,REASON_SPSUMMON,false,nil)
return Duel.CheckReleaseGroupEx(c:GetControler(),c14141448.rfilter,1,REASON_SPSUMMON,false,nil,c:GetControler())
end
function c14141448.sptg(e,tp,eg,ep,ev,re,r,rp,chk,c)
local g=Duel.GetReleaseGroup(tp,false,REASON_SPSUMMON):Filter(c14141448.rfilter,nil,tp)
Duel.Hint(HINT_SELECTMSG,tp,HINTMSG_RELEASE)
local tc=g:SelectUnselect(nil,tp,false,true,1,1)
if tc then
e:SetLabelObject(tc)
return true
else return false end
end
function c14141448.spop(e,tp,eg,ep,ev,re,r,rp,c)
local g=Duel.SelectReleaseGroupEx(c:GetControler(),c14141448.rfilter,1,1,REASON_SPSUMMON,false,nil)
local g=e:GetLabelObject()
Duel.Release(g,REASON_SPSUMMON)
end
......@@ -7,6 +7,7 @@ function c14258627.initial_effect(c)
e1:SetProperty(EFFECT_FLAG_UNCOPYABLE)
e1:SetRange(LOCATION_HAND)
e1:SetCondition(c14258627.spcon)
e1:SetTarget(c14258627.sptg)
e1:SetOperation(c14258627.spop)
c:RegisterEffect(e1)
--atk/def down
......@@ -43,10 +44,20 @@ function c14258627.spcon(e,c)
return Duel.GetLocationCount(tp,LOCATION_MZONE)>0
and Duel.IsExistingMatchingCard(c14258627.filter,tp,LOCATION_GRAVE,0,2,nil)
end
function c14258627.spop(e,tp,eg,ep,ev,re,r,rp,c)
function c14258627.sptg(e,tp,eg,ep,ev,re,r,rp,chk,c)
local g=Duel.GetMatchingGroup(c14258627.filter,tp,LOCATION_GRAVE,0,nil)
Duel.Hint(HINT_SELECTMSG,tp,HINTMSG_REMOVE)
local g=Duel.SelectMatchingCard(tp,c14258627.filter,tp,LOCATION_GRAVE,0,2,2,nil)
Duel.Remove(g,POS_FACEUP,REASON_COST)
local sg=g:CancelableSelect(tp,2,2,nil)
if sg then
sg:KeepAlive()
e:SetLabelObject(sg)
return true
else return false end
end
function c14258627.spop(e,tp,eg,ep,ev,re,r,rp,c)
local g=e:GetLabelObject()
Duel.Remove(g,POS_FACEUP,REASON_SPSUMMON)
g:DeleteGroup()
end
function c14258627.adcon(e)
return Duel.GetCurrentPhase()==PHASE_DAMAGE_CAL and e:GetHandler():GetBattleTarget()
......
......@@ -8,6 +8,7 @@ function c14357527.initial_effect(c)
e1:SetProperty(EFFECT_FLAG_CANNOT_DISABLE+EFFECT_FLAG_UNCOPYABLE)
e1:SetRange(LOCATION_HAND)
e1:SetCondition(c14357527.sprcon)
e1:SetTarget(c14357527.sprtg)
e1:SetOperation(c14357527.sprop)
c:RegisterEffect(e1)
--spsummon
......@@ -47,11 +48,21 @@ function c14357527.sprcon(e,c)
return Duel.GetLocationCount(tp,LOCATION_MZONE)>0
and Duel.IsExistingMatchingCard(c14357527.sprfilter,tp,LOCATION_REMOVED,0,3,nil)
end
function c14357527.sprop(e,tp,eg,ep,ev,re,r,rp,c)
function c14357527.sprtg(e,tp,eg,ep,ev,re,r,rp,chk,c)
local g=Duel.GetMatchingGroup(c14357527.sprfilter,tp,LOCATION_REMOVED,0,nil)
Duel.Hint(HINT_SELECTMSG,tp,HINTMSG_TODECK)
local g=Duel.SelectMatchingCard(tp,c14357527.sprfilter,tp,LOCATION_REMOVED,0,3,3,nil)
local sg=g:CancelableSelect(tp,3,3,nil)
if sg then
sg:KeepAlive()
e:SetLabelObject(sg)
return true
else return false end
end
function c14357527.sprop(e,tp,eg,ep,ev,re,r,rp,c)
local g=e:GetLabelObject()
Duel.HintSelection(g)
Duel.SendtoDeck(g,nil,2,REASON_COST)
Duel.SendtoDeck(g,nil,2,REASON_SPSUMMON)
g:DeleteGroup()
end
function c14357527.spcon(e,tp,eg,ep,ev,re,r,rp)
local c=e:GetHandler()
......
......@@ -51,7 +51,7 @@ function c14466224.sptg(e,tp,eg,ep,ev,re,r,rp,chk,c)
end
function c14466224.spop(e,tp,eg,ep,ev,re,r,rp,c)
local g=e:GetLabelObject()
Duel.Remove(g,POS_FACEUP,REASON_COST)
Duel.Remove(g,POS_FACEUP,REASON_SPSUMMON)
g:DeleteGroup()
end
function c14466224.eqcon(e,tp,eg,ep,ev,re,r,rp)
......
......@@ -8,6 +8,7 @@ function c14536035.initial_effect(c)
e1:SetProperty(EFFECT_FLAG_UNCOPYABLE)
e1:SetRange(LOCATION_HAND)
e1:SetCondition(c14536035.spcon)
e1:SetTarget(c14536035.sptg)
e1:SetOperation(c14536035.spop)
c:RegisterEffect(e1)
--to grave
......@@ -30,10 +31,18 @@ function c14536035.spcon(e,c)
return Duel.GetLocationCount(c:GetControler(),LOCATION_MZONE)>0 and
Duel.IsExistingMatchingCard(c14536035.spfilter,c:GetControler(),LOCATION_HAND,0,1,c)
end
function c14536035.spop(e,tp,eg,ep,ev,re,r,rp,c)
function c14536035.sptg(e,tp,eg,ep,ev,re,r,rp,chk,c)
local g=Duel.GetMatchingGroup(c14536035.spfilter,tp,LOCATION_HAND,0,c)
Duel.Hint(HINT_SELECTMSG,tp,HINTMSG_DISCARD)
local g=Duel.SelectMatchingCard(tp,c14536035.spfilter,tp,LOCATION_HAND,0,1,1,c)
Duel.SendtoGrave(g,REASON_DISCARD+REASON_COST)
local tc=g:SelectUnselect(nil,tp,false,true,1,1)
if tc then
e:SetLabelObject(tc)
return true
else return false end
end
function c14536035.spop(e,tp,eg,ep,ev,re,r,rp,c)
local g=e:GetLabelObject()
Duel.SendtoGrave(g,REASON_DISCARD+REASON_SPSUMMON)
end
function c14536035.costfilter(c)
return c:IsAttribute(ATTRIBUTE_DARK) and c:IsDiscardable()
......
......@@ -7,6 +7,7 @@ function c14778250.initial_effect(c)
e1:SetProperty(EFFECT_FLAG_UNCOPYABLE)
e1:SetRange(LOCATION_HAND)
e1:SetCondition(c14778250.spcon)
e1:SetTarget(c14778250.sptg)
e1:SetOperation(c14778250.spop)
c:RegisterEffect(e1)
end
......@@ -16,8 +17,16 @@ function c14778250.spcon(e,c)
return Duel.GetLocationCount(tp,LOCATION_MZONE)>0
and Duel.IsExistingMatchingCard(aux.TRUE,tp,LOCATION_HAND,0,1,c)
end
function c14778250.spop(e,tp,eg,ep,ev,re,r,rp,c)
function c14778250.sptg(e,tp,eg,ep,ev,re,r,rp,chk,c)
local g=Duel.GetMatchingGroup(aux.TRUE,tp,LOCATION_HAND,0,c)
Duel.Hint(HINT_SELECTMSG,tp,HINTMSG_DISCARD)
local g=Duel.SelectMatchingCard(tp,aux.TRUE,tp,LOCATION_HAND,0,1,1,c)
Duel.SendtoGrave(g,REASON_COST+REASON_DISCARD)
local tc=g:SelectUnselect(nil,tp,false,true,1,1)
if tc then
e:SetLabelObject(tc)
return true
else return false end
end
function c14778250.spop(e,tp,eg,ep,ev,re,r,rp,c)
local g=e:GetLabelObject()
Duel.SendtoGrave(g,REASON_SPSUMMON+REASON_DISCARD)
end
......@@ -75,7 +75,7 @@ function c14799437.sptg(e,tp,eg,ep,ev,re,r,rp,chk,c)
end
function c14799437.spop(e,tp,eg,ep,ev,re,r,rp,c)
local g=e:GetLabelObject()
Duel.Remove(g,POS_FACEUP,REASON_COST)
Duel.Remove(g,POS_FACEUP,REASON_SPSUMMON)
g:DeleteGroup()
end
function c14799437.destg(e,tp,eg,ep,ev,re,r,rp,chk)
......
......@@ -14,6 +14,7 @@ function c15180041.initial_effect(c)
e2:SetProperty(EFFECT_FLAG_CANNOT_DISABLE+EFFECT_FLAG_UNCOPYABLE)
e2:SetRange(LOCATION_HAND)
e2:SetCondition(c15180041.spcon)
e2:SetTarget(c15180041.sptg)
e2:SetOperation(c15180041.spop)
c:RegisterEffect(e2)
--atk up
......@@ -50,19 +51,26 @@ function c15180041.initial_effect(c)
e5:SetOperation(c15180041.spop2)
c:RegisterEffect(e5)
end
function c15180041.spfilter(c,ft,tp)
function c15180041.spfilter(c,tp)
return c:IsRace(RACE_WARRIOR)
and (ft>0 or (c:IsControler(tp) and c:GetSequence()<5)) and (c:IsControler(tp) or c:IsFaceup())
and Duel.GetMZoneCount(tp,c)>0 and (c:IsControler(tp) or c:IsFaceup())
end
function c15180041.spcon(e,c)
if c==nil then return true end
local tp=c:GetControler()
local ft=Duel.GetLocationCount(tp,LOCATION_MZONE)
return ft>-1 and Duel.CheckReleaseGroupEx(tp,c15180041.spfilter,1,REASON_SPSUMMON,false,nil,ft,tp)
return Duel.CheckReleaseGroupEx(tp,c15180041.spfilter,1,REASON_SPSUMMON,false,nil,tp)
end
function c15180041.sptg(e,tp,eg,ep,ev,re,r,rp,chk,c)
local g=Duel.GetReleaseGroup(tp,false,REASON_SPSUMMON):Filter(c15180041.spfilter,nil,tp)
Duel.Hint(HINT_SELECTMSG,tp,HINTMSG_RELEASE)
local tc=g:SelectUnselect(nil,tp,false,true,1,1)
if tc then
e:SetLabelObject(tc)
return true
else return false end
end
function c15180041.spop(e,tp,eg,ep,ev,re,r,rp,c)
local ft=Duel.GetLocationCount(tp,LOCATION_MZONE)
local g=Duel.SelectReleaseGroupEx(tp,c15180041.spfilter,1,1,REASON_SPSUMMON,false,nil,ft,tp)
local g=e:GetLabelObject()
Duel.Release(g,REASON_SPSUMMON)
end
function c15180041.atkop(e,tp,eg,ep,ev,re,r,rp)
......
......@@ -17,6 +17,7 @@ function c15291624.initial_effect(c)
e2:SetProperty(EFFECT_FLAG_CANNOT_DISABLE+EFFECT_FLAG_UNCOPYABLE)
e2:SetRange(LOCATION_EXTRA)
e2:SetCondition(c15291624.spcon)
e2:SetTarget(c15291624.sptg)
e2:SetOperation(c15291624.spop)
c:RegisterEffect(e2)
--disable search
......@@ -52,10 +53,19 @@ function c15291624.spcon(e,c)
return (Duel.GetCustomActivityCount(15291624,tp,ACTIVITY_CHAIN)~=0 or Duel.GetCustomActivityCount(15291624,1-tp,ACTIVITY_CHAIN)~=0)
and Duel.CheckReleaseGroupEx(tp,c15291624.spfilter,1,REASON_SPSUMMON,false,nil,c,tp)
end
function c15291624.sptg(e,tp,eg,ep,ev,re,r,rp,chk,c)
local g=Duel.GetReleaseGroup(tp,false,REASON_SPSUMMON):Filter(c15291624.spfilter,nil,c,tp)
Duel.Hint(HINT_SELECTMSG,tp,HINTMSG_RELEASE)
local tc=g:SelectUnselect(nil,tp,false,true,1,1)
if tc then
e:SetLabelObject(tc)
return true
else return false end
end
function c15291624.spop(e,tp,eg,ep,ev,re,r,rp,c)
local g=Duel.SelectReleaseGroupEx(tp,c15291624.spfilter,1,1,REASON_SPSUMMON,false,nil,c,tp)
c:SetMaterial(g)
Duel.Release(g,REASON_SPSUMMON)
local tc=e:GetLabelObject()
c:SetMaterial(Group.FromCards(tc))
Duel.Release(tc,REASON_SPSUMMON)
end
function c15291624.repfilter(c)
return c:IsRace(RACE_THUNDER) and c:IsAbleToRemove()
......
......@@ -9,6 +9,7 @@ function c15521027.initial_effect(c)
e1:SetProperty(EFFECT_FLAG_CANNOT_DISABLE+EFFECT_FLAG_UNCOPYABLE)
e1:SetRange(LOCATION_HAND)
e1:SetCondition(c15521027.spcon)
e1:SetTarget(c15521027.sptg)
e1:SetOperation(c15521027.spop)
c:RegisterEffect(e1)
--tohand
......@@ -43,10 +44,18 @@ function c15521027.spcon(e,c)
return Duel.GetLocationCount(tp,LOCATION_MZONE)>0
and Duel.IsExistingMatchingCard(c15521027.spfilter,tp,LOCATION_GRAVE,0,1,nil)
end
function c15521027.spop(e,tp,eg,ep,ev,re,r,rp,c)
function c15521027.sptg(e,tp,eg,ep,ev,re,r,rp,chk,c)
local g=Duel.GetMatchingGroup(c15521027.spfilter,tp,LOCATION_GRAVE,0,nil)
Duel.Hint(HINT_SELECTMSG,tp,HINTMSG_REMOVE)
local g=Duel.SelectMatchingCard(tp,c15521027.spfilter,tp,LOCATION_GRAVE,0,1,1,nil)
Duel.Remove(g,POS_FACEUP,REASON_COST)
local tc=g:SelectUnselect(nil,tp,false,true,1,1)
if tc then
e:SetLabelObject(tc)
return true
else return false end
end
function c15521027.spop(e,tp,eg,ep,ev,re,r,rp,c)
local g=e:GetLabelObject()
Duel.Remove(g,POS_FACEUP,REASON_SPSUMMON)
end
function c15521027.cona(e,tp,eg,ep,ev,re,r,rp)
return e:GetHandler():IsAttackPos()
......
......@@ -46,7 +46,7 @@ function c15574615.sptg(e,tp,eg,ep,ev,re,r,rp,chk,c)
end
function c15574615.spop(e,tp,eg,ep,ev,re,r,rp,c)
local g=e:GetLabelObject()
Duel.SendtoGrave(g,REASON_COST)
Duel.SendtoGrave(g,REASON_SPSUMMON)
g:DeleteGroup()
end
function c15574615.cost(e,tp,eg,ep,ev,re,r,rp,chk)
......
......@@ -7,6 +7,7 @@ function c1586457.initial_effect(c)
e1:SetProperty(EFFECT_FLAG_UNCOPYABLE)
e1:SetRange(LOCATION_HAND)
e1:SetCondition(c1586457.spcon)
e1:SetTarget(c1586457.sptg)
e1:SetOperation(c1586457.spop)
c:RegisterEffect(e1)
end
......@@ -19,8 +20,16 @@ function c1586457.spcon(e,c)
return Duel.GetLocationCount(tp,LOCATION_MZONE)>0
and Duel.IsExistingMatchingCard(c1586457.filter,tp,LOCATION_HAND,0,1,c)
end
function c1586457.spop(e,tp,eg,ep,ev,re,r,rp,c)
function c1586457.sptg(e,tp,eg,ep,ev,re,r,rp,chk,c)
local g=Duel.GetMatchingGroup(c1586457.filter,tp,LOCATION_HAND,0,c)
Duel.Hint(HINT_SELECTMSG,tp,HINTMSG_TOGRAVE)
local g=Duel.SelectMatchingCard(tp,c1586457.filter,tp,LOCATION_HAND,0,1,1,c)
Duel.SendtoGrave(g,REASON_COST)
local tc=g:SelectUnselect(nil,tp,false,true,1,1)
if tc then
e:SetLabelObject(tc)
return true
else return false end
end
function c1586457.spop(e,tp,eg,ep,ev,re,r,rp,c)
local g=e:GetLabelObject()
Duel.SendtoGrave(g,REASON_SPSUMMON)
end
......@@ -8,6 +8,7 @@ function c16024176.initial_effect(c)
e1:SetRange(LOCATION_HAND)
e1:SetCode(EFFECT_SPSUMMON_PROC)
e1:SetCondition(c16024176.hspcon)
e1:SetTarget(c16024176.hsptg)
e1:SetOperation(c16024176.hspop)
c:RegisterEffect(e1)
--draw(spsummon)
......@@ -31,19 +32,26 @@ function c16024176.initial_effect(c)
e3:SetOperation(c16024176.drop)
c:RegisterEffect(e3)
end
function c16024176.hspfilter(c,ft,tp)
function c16024176.hspfilter(c,tp)
return c:IsSetCard(0xe6) and c:IsLevel(1) and not c:IsCode(16024176)
and (ft>0 or (c:IsControler(tp) and c:GetSequence()<5)) and (c:IsControler(tp) or c:IsFaceup())
and Duel.GetMZoneCount(tp,c)>0 and (c:IsControler(tp) or c:IsFaceup())
end
function c16024176.hspcon(e,c)
if c==nil then return true end
local tp=c:GetControler()
local ft=Duel.GetLocationCount(tp,LOCATION_MZONE)
return ft>-1 and Duel.CheckReleaseGroupEx(tp,c16024176.hspfilter,1,REASON_SPSUMMON,false,nil,ft,tp)
return Duel.CheckReleaseGroupEx(tp,c16024176.hspfilter,1,REASON_SPSUMMON,false,nil,tp)
end
function c16024176.hsptg(e,tp,eg,ep,ev,re,r,rp,chk,c)
local g=Duel.GetReleaseGroup(tp,false,REASON_SPSUMMON):Filter(c16024176.hspfilter,nil,tp)
Duel.Hint(HINT_SELECTMSG,tp,HINTMSG_RELEASE)
local tc=g:SelectUnselect(nil,tp,false,true,1,1)
if tc then
e:SetLabelObject(tc)
return true
else return false end
end
function c16024176.hspop(e,tp,eg,ep,ev,re,r,rp,c)
local ft=Duel.GetLocationCount(tp,LOCATION_MZONE)
local g=Duel.SelectReleaseGroupEx(tp,c16024176.hspfilter,1,1,REASON_SPSUMMON,false,nil,ft,tp)
local g=e:GetLabelObject()
Duel.Release(g,REASON_SPSUMMON)
end
function c16024176.target(e,tp,eg,ep,ev,re,r,rp,chk)
......
......@@ -7,24 +7,31 @@ function c16638212.initial_effect(c)
e1:SetProperty(EFFECT_FLAG_UNCOPYABLE)
e1:SetRange(LOCATION_HAND)
e1:SetCondition(c16638212.spcon)
e1:SetTarget(c16638212.sptg)
e1:SetOperation(c16638212.spop)
c:RegisterEffect(e1)
end
function c16638212.spfilter(c,ft)
return c:IsFaceup() and c:IsAbleToRemoveAsCost() and (ft>0 or c:GetSequence()<5)
function c16638212.spfilter(c,tp)
return c:IsFaceup() and c:IsAbleToRemoveAsCost() and Duel.GetMZoneCount(tp,c)>0
end
function c16638212.spcon(e,c)
if c==nil then return true end
local tp=c:GetControler()
local ft=Duel.GetLocationCount(tp,LOCATION_MZONE)
return ft>-1 and Duel.IsExistingMatchingCard(c16638212.spfilter,tp,LOCATION_MZONE,0,1,nil,ft)
return Duel.IsExistingMatchingCard(c16638212.spfilter,tp,LOCATION_MZONE,0,1,nil,tp)
end
function c16638212.spop(e,tp,eg,ep,ev,re,r,rp,c)
local ft=Duel.GetLocationCount(tp,LOCATION_MZONE)
function c16638212.sptg(e,tp,eg,ep,ev,re,r,rp,chk,c)
local g=Duel.GetMatchingGroup(c16638212.spfilter,tp,LOCATION_MZONE,0,nil,tp)
Duel.Hint(HINT_SELECTMSG,tp,HINTMSG_REMOVE)
local g=Duel.SelectMatchingCard(tp,c16638212.spfilter,tp,LOCATION_MZONE,0,1,1,nil,ft)
Duel.Remove(g,0,REASON_COST+REASON_TEMPORARY)
g:GetFirst():RegisterFlagEffect(16638212,RESET_EVENT+RESETS_STANDARD,0,0)
local tc=g:SelectUnselect(nil,tp,false,true,1,1)
if tc then
e:SetLabelObject(tc)
return true
else return false end
end
function c16638212.spop(e,tp,eg,ep,ev,re,r,rp,c)
local tc=e:GetLabelObject()
Duel.Remove(tc,0,REASON_SPSUMMON+REASON_TEMPORARY)
tc:RegisterFlagEffect(16638212,RESET_EVENT+RESETS_STANDARD,0,0)
local e1=Effect.CreateEffect(c)
e1:SetDescription(aux.Stringid(16638212,0))
e1:SetType(EFFECT_TYPE_FIELD+EFFECT_TYPE_TRIGGER_F)
......@@ -33,7 +40,7 @@ function c16638212.spop(e,tp,eg,ep,ev,re,r,rp,c)
e1:SetCountLimit(1)
e1:SetReset(RESET_EVENT+0xff0000+RESET_PHASE+PHASE_STANDBY)
e1:SetOperation(c16638212.retop)
e1:SetLabelObject(g:GetFirst())
e1:SetLabelObject(tc)
c:RegisterEffect(e1)
end
function c16638212.retop(e,tp,eg,ep,ev,re,r,rp)
......
......@@ -8,6 +8,7 @@ function c16802689.initial_effect(c)
e1:SetRange(LOCATION_HAND)
e1:SetCode(EFFECT_SPSUMMON_PROC)
e1:SetCondition(c16802689.hspcon)
e1:SetTarget(c16802689.hsptg)
e1:SetOperation(c16802689.hspop)
c:RegisterEffect(e1)
--draw(spsummon)
......@@ -30,19 +31,26 @@ function c16802689.initial_effect(c)
e3:SetOperation(c16802689.drop)
c:RegisterEffect(e3)
end
function c16802689.hspfilter(c,ft,tp)
function c16802689.hspfilter(c,tp)
return c:IsSetCard(0xe6) and c:IsLevel(12) and not c:IsCode(16802689)
and (ft>0 or (c:IsControler(tp) and c:GetSequence()<5)) and (c:IsControler(tp) or c:IsFaceup())
and Duel.GetMZoneCount(tp,c)>0 and (c:IsControler(tp) or c:IsFaceup())
end
function c16802689.hspcon(e,c)
if c==nil then return true end
local tp=c:GetControler()
local ft=Duel.GetLocationCount(tp,LOCATION_MZONE)
return ft>-1 and Duel.CheckReleaseGroupEx(tp,c16802689.hspfilter,1,REASON_SPSUMMON,false,nil,ft,tp)
return Duel.CheckReleaseGroupEx(tp,c16802689.hspfilter,1,REASON_SPSUMMON,false,nil,tp)
end
function c16802689.hsptg(e,tp,eg,ep,ev,re,r,rp,chk,c)
local g=Duel.GetReleaseGroup(tp,false,REASON_SPSUMMON):Filter(c16802689.hspfilter,nil,tp)
Duel.Hint(HINT_SELECTMSG,tp,HINTMSG_RELEASE)
local tc=g:SelectUnselect(nil,tp,false,true,1,1)
if tc then
e:SetLabelObject(tc)
return true
else return false end
end
function c16802689.hspop(e,tp,eg,ep,ev,re,r,rp,c)
local ft=Duel.GetLocationCount(tp,LOCATION_MZONE)
local g=Duel.SelectReleaseGroupEx(tp,c16802689.hspfilter,1,1,REASON_SPSUMMON,false,nil,ft,tp)
local g=e:GetLabelObject()
Duel.Release(g,REASON_SPSUMMON)
end
function c16802689.target(e,tp,eg,ep,ev,re,r,rp,chk)
......
......@@ -14,6 +14,7 @@ function c1686814.initial_effect(c)
e2:SetProperty(EFFECT_FLAG_CANNOT_DISABLE+EFFECT_FLAG_UNCOPYABLE)
e2:SetRange(LOCATION_EXTRA)
e2:SetCondition(c1686814.sprcon)
e2:SetTarget(c1686814.sprtg)
e2:SetOperation(c1686814.sprop)
c:RegisterEffect(e2)
--special summon
......@@ -44,30 +45,33 @@ end
function c1686814.sprfilter(c)
return c:IsFaceup() and c:IsLevelAbove(5) and c:IsAbleToGraveAsCost()
end
function c1686814.sprfilter1(c,tp,g,sc)
local lv=c:GetLevel()
return c:IsType(TYPE_TUNER) and g:IsExists(c1686814.sprfilter2,1,c,tp,c,sc,lv)
end
function c1686814.sprfilter2(c,tp,mc,sc,lv)
local sg=Group.FromCards(c,mc)
return c:IsLevel(lv) and not c:IsType(TYPE_TUNER)
and Duel.GetLocationCountFromEx(tp,tp,sg,sc)>0
function c1686814.fselect(g,tp,sc)
if not aux.gffcheck(g,Card.IsType,TYPE_TUNER,aux.NOT(Card.IsType),TYPE_TUNER)
or Duel.GetLocationCountFromEx(tp,tp,g,sc)<=0 then return false end
local tc1=g:GetFirst()
local tc2=g:GetNext()
return tc1:IsLevel(tc2:GetLevel())
end
function c1686814.sprcon(e,c)
if c==nil then return true end
local tp=c:GetControler()
local g=Duel.GetMatchingGroup(c1686814.sprfilter,tp,LOCATION_MZONE,0,nil)
return g:IsExists(c1686814.sprfilter1,1,nil,tp,g,c)
return g:CheckSubGroup(c1686814.fselect,2,2,tp,c)
end
function c1686814.sprop(e,tp,eg,ep,ev,re,r,rp,c)
function c1686814.sprtg(e,tp,eg,ep,ev,re,r,rp,chk,c)
local g=Duel.GetMatchingGroup(c1686814.sprfilter,tp,LOCATION_MZONE,0,nil)
Duel.Hint(HINT_SELECTMSG,tp,HINTMSG_TOGRAVE)
local g1=g:FilterSelect(tp,c1686814.sprfilter1,1,1,nil,tp,g,c)
local mc=g1:GetFirst()
Duel.Hint(HINT_SELECTMSG,tp,HINTMSG_TOGRAVE)
local g2=g:FilterSelect(tp,c1686814.sprfilter2,1,1,mc,tp,mc,c,mc:GetLevel())
g1:Merge(g2)
Duel.SendtoGrave(g1,REASON_COST)
local sg=g:SelectSubGroup(tp,c1686814.fselect,true,2,2,tp,c)
if sg then
sg:KeepAlive()
e:SetLabelObject(sg)
return true
else return false end
end
function c1686814.sprop(e,tp,eg,ep,ev,re,r,rp,c)
local g=e:GetLabelObject()
Duel.SendtoGrave(g,REASON_SPSUMMON)
g:DeleteGroup()
end
function c1686814.spcon(e,tp,eg,ep,ev,re,r,rp)
return eg:IsExists(Card.IsControler,1,nil,tp)
......
......@@ -14,6 +14,7 @@ function c16958382.initial_effect(c)
e1:SetProperty(EFFECT_FLAG_CANNOT_DISABLE+EFFECT_FLAG_UNCOPYABLE)
e1:SetRange(LOCATION_HAND)
e1:SetCondition(c16958382.spcon)
e1:SetTarget(c16958382.sptg)
e1:SetOperation(c16958382.spop)
c:RegisterEffect(e1)
--selfdes
......@@ -53,21 +54,28 @@ function c16958382.spcon(e,c)
local b2=Duel.IsExistingMatchingCard(c16958382.spfilter2,tp,LOCATION_MZONE+LOCATION_GRAVE,0,1,nil,tp)
return (b1 or b2) and not Duel.IsExistingMatchingCard(c16958382.codefilter,tp,LOCATION_ONFIELD,LOCATION_ONFIELD,1,nil)
end
function c16958382.spop(e,tp,eg,ep,ev,re,r,rp,c)
local b1=Duel.GetLocationCount(tp,LOCATION_MZONE)>0
and Duel.IsExistingMatchingCard(c16958382.spfilter,tp,LOCATION_EXTRA,0,1,nil)
local b2=Duel.IsExistingMatchingCard(c16958382.spfilter2,tp,LOCATION_MZONE+LOCATION_GRAVE,0,1,nil,tp)
if b2 and (not b1 or Duel.SelectYesNo(tp,aux.Stringid(48829461,0))) then
Duel.Hint(HINT_SELECTMSG,tp,HINTMSG_REMOVE)
local tg=Duel.SelectMatchingCard(tp,c16958382.spfilter2,tp,LOCATION_MZONE+LOCATION_GRAVE,0,1,1,nil,tp)
local te=tg:GetFirst():IsHasEffect(48829461,tp)
te:UseCountLimit(tp)
Duel.Remove(tg,POS_FACEUP,REASON_COST)
else
Duel.Hint(HINT_SELECTMSG,tp,HINTMSG_REMOVE)
local tc=Duel.SelectMatchingCard(tp,c16958382.spfilter,tp,LOCATION_EXTRA,0,1,1,nil):GetFirst()
Duel.Remove(tc,POS_FACEUP,REASON_COST)
function c16958382.sptg(e,tp,eg,ep,ev,re,r,rp,chk,c)
local g=Group.CreateGroup()
if Duel.GetLocationCount(tp,LOCATION_MZONE)>0 then
local g1=Duel.GetMatchingGroup(c16958382.spfilter,tp,LOCATION_EXTRA,0,nil)
g1:Merge(g)
end
local g2=Duel.GetMatchingGroup(c16958382.spfilter2,tp,LOCATION_MZONE+LOCATION_GRAVE,0,nil,tp)
g:Merge(g2)
Duel.Hint(HINT_SELECTMSG,tp,HINTMSG_REMOVE)
local tc=g:SelectUnselect(nil,tp,false,true,1,1)
if tc then
e:SetLabelObject(tc)
if g2:IsContains(tc) then
local te=tc:IsHasEffect(48829461,tp)
te:UseCountLimit(tp)
end
return true
else return false end
end
function c16958382.spop(e,tp,eg,ep,ev,re,r,rp,c)
local tc=e:GetLabelObject()
Duel.Remove(tc,POS_FACEUP,REASON_SPSUMMON)
end
function c16958382.descon(e)
return not Duel.IsEnvironment(27564031)
......
......@@ -7,6 +7,7 @@ function c17021204.initial_effect(c)
e1:SetProperty(EFFECT_FLAG_UNCOPYABLE)
e1:SetRange(LOCATION_HAND)
e1:SetCondition(c17021204.spcon)
e1:SetTarget(c17021204.sptg)
e1:SetOperation(c17021204.spop)
c:RegisterEffect(e1)
end
......@@ -26,8 +27,18 @@ function c17021204.spcon(e,c)
and Duel.IsExistingMatchingCard(c17021204.spfilter,c:GetControler(),0,LOCATION_MZONE,2,nil)
and c17021204.check(c:GetControler())
end
function c17021204.spop(e,tp,eg,ep,ev,re,r,rp,c)
function c17021204.sptg(e,tp,eg,ep,ev,re,r,rp,chk,c)
local g=Duel.GetMatchingGroup(c17021204.spfilter,tp,0,LOCATION_MZONE,nil)
Duel.Hint(HINT_SELECTMSG,tp,HINTMSG_TOGRAVE)
local g=Duel.SelectMatchingCard(tp,c17021204.spfilter,tp,0,LOCATION_MZONE,2,2,nil)
Duel.SendtoGrave(g,REASON_COST)
local sg=g:CancelableSelect(tp,2,2,nil)
if sg then
sg:KeepAlive()
e:SetLabelObject(sg)
return true
else return false end
end
function c17021204.spop(e,tp,eg,ep,ev,re,r,rp,c)
local g=e:GetLabelObject()
Duel.SendtoGrave(g,REASON_SPSUMMON)
g:DeleteGroup()
end
......@@ -9,6 +9,7 @@ function c1710476.initial_effect(c)
e1:SetProperty(EFFECT_FLAG_CANNOT_DISABLE+EFFECT_FLAG_UNCOPYABLE)
e1:SetRange(LOCATION_HAND)
e1:SetCondition(c1710476.spcon)
e1:SetTarget(c1710476.sptg)
e1:SetOperation(c1710476.spop)
c:RegisterEffect(e1)
--selfdes
......@@ -56,20 +57,28 @@ function c1710476.spcon(e,c)
local b2=Duel.IsExistingMatchingCard(c1710476.spfilter2,tp,LOCATION_MZONE+LOCATION_GRAVE,0,1,nil,tp)
return b1 or b2
end
function c1710476.spop(e,tp,eg,ep,ev,re,r,rp,c)
local b1=Duel.GetLocationCount(tp,LOCATION_MZONE)>0
and Duel.IsExistingMatchingCard(c1710476.spfilter,tp,LOCATION_EXTRA,0,1,nil)
local b2=Duel.IsExistingMatchingCard(c1710476.spfilter2,tp,LOCATION_MZONE+LOCATION_GRAVE,0,1,nil,tp)
if b2 and (not b1 or Duel.SelectYesNo(tp,aux.Stringid(48829461,0))) then
Duel.Hint(HINT_SELECTMSG,tp,HINTMSG_REMOVE)
local tg=Duel.SelectMatchingCard(tp,c1710476.spfilter2,tp,LOCATION_MZONE+LOCATION_GRAVE,0,1,1,nil,tp)
local te=tg:GetFirst():IsHasEffect(48829461,tp)
te:UseCountLimit(tp)
Duel.Remove(tg,POS_FACEUP,REASON_COST)
else
local tc=Duel.GetFirstMatchingCard(c1710476.spfilter,tp,LOCATION_EXTRA,0,nil)
Duel.Remove(tc,POS_FACEUP,REASON_COST)
function c1710476.sptg(e,tp,eg,ep,ev,re,r,rp,chk,c)
local g=Group.CreateGroup()
if Duel.GetLocationCount(tp,LOCATION_MZONE)>0 then
local g1=Duel.GetMatchingGroup(c1710476.spfilter,tp,LOCATION_EXTRA,0,nil)
g1:Merge(g)
end
local g2=Duel.GetMatchingGroup(c1710476.spfilter2,tp,LOCATION_MZONE+LOCATION_GRAVE,0,nil,tp)
g:Merge(g2)
Duel.Hint(HINT_SELECTMSG,tp,HINTMSG_REMOVE)
local tc=g:SelectUnselect(nil,tp,false,true,1,1)
if tc then
e:SetLabelObject(tc)
if g2:IsContains(tc) then
local te=tc:IsHasEffect(48829461,tp)
te:UseCountLimit(tp)
end
return true
else return false end
end
function c1710476.spop(e,tp,eg,ep,ev,re,r,rp,c)
local tc=e:GetLabelObject()
Duel.Remove(tc,POS_FACEUP,REASON_SPSUMMON)
end
function c1710476.descon(e)
return not Duel.IsExistingMatchingCard(Card.IsFaceup,0,LOCATION_FZONE,LOCATION_FZONE,1,nil)
......
......@@ -8,6 +8,7 @@ function c17257342.initial_effect(c)
e1:SetProperty(EFFECT_FLAG_CANNOT_DISABLE+EFFECT_FLAG_UNCOPYABLE)
e1:SetRange(LOCATION_HAND)
e1:SetCondition(c17257342.spcon)
e1:SetTarget(c17257342.sptg)
e1:SetOperation(c17257342.spop)
c:RegisterEffect(e1)
--recover
......@@ -32,10 +33,18 @@ function c17257342.spcon(e,c)
return Duel.GetLocationCount(tp,LOCATION_MZONE)>0
and Duel.IsExistingMatchingCard(c17257342.spfilter,tp,LOCATION_GRAVE,0,1,nil)
end
function c17257342.spop(e,tp,eg,ep,ev,re,r,rp,c)
function c17257342.sptg(e,tp,eg,ep,ev,re,r,rp,chk,c)
local g=Duel.GetMatchingGroup(c17257342.spfilter,tp,LOCATION_GRAVE,0,nil)
Duel.Hint(HINT_SELECTMSG,tp,HINTMSG_REMOVE)
local g=Duel.SelectMatchingCard(tp,c17257342.spfilter,tp,LOCATION_GRAVE,0,1,1,nil)
Duel.Remove(g,POS_FACEUP,REASON_COST)
local tc=g:SelectUnselect(nil,tp,false,true,1,1)
if tc then
e:SetLabelObject(tc)
return true
else return false end
end
function c17257342.spop(e,tp,eg,ep,ev,re,r,rp,c)
local g=e:GetLabelObject()
Duel.Remove(g,POS_FACEUP,REASON_SPSUMMON)
end
function c17257342.reccon(e,tp,eg,ep,ev,re,r,rp)
return Duel.GetTurnPlayer()~=tp
......
......@@ -8,6 +8,7 @@ function c17264592.initial_effect(c)
e1:SetProperty(EFFECT_FLAG_UNCOPYABLE)
e1:SetCountLimit(1,17264592+EFFECT_COUNT_CODE_OATH)
e1:SetCondition(c17264592.sprcon)
e1:SetTarget(c17264592.sprtg)
e1:SetOperation(c17264592.sprop)
c:RegisterEffect(e1)
--spsummon
......@@ -25,21 +26,27 @@ function c17264592.initial_effect(c)
e3:SetCondition(c17264592.spcon)
c:RegisterEffect(e3)
end
function c17264592.thfilter(c,ft)
function c17264592.thfilter(c,tp)
return c:IsFaceup() and c:IsSetCard(0xb2) and not c:IsCode(17264592) and c:IsAbleToHandAsCost()
and (ft>0 or c:GetSequence()<5)
and Duel.GetMZoneCount(tp,c)>0
end
function c17264592.sprcon(e,c)
if c==nil then return true end
local tp=c:GetControler()
local ft=Duel.GetLocationCount(tp,LOCATION_MZONE)
return ft>-1 and Duel.IsExistingMatchingCard(c17264592.thfilter,tp,LOCATION_MZONE,0,1,nil,ft)
return Duel.IsExistingMatchingCard(c17264592.thfilter,tp,LOCATION_MZONE,0,1,nil,tp)
end
function c17264592.sprop(e,tp,eg,ep,ev,re,r,rp,c)
local ft=Duel.GetLocationCount(tp,LOCATION_MZONE)
function c17264592.sprtg(e,tp,eg,ep,ev,re,r,rp,chk,c)
local g=Duel.GetMatchingGroup(c17264592.thfilter,tp,LOCATION_MZONE,0,nil,tp)
Duel.Hint(HINT_SELECTMSG,tp,HINTMSG_RTOHAND)
local g=Duel.SelectMatchingCard(tp,c17264592.thfilter,tp,LOCATION_MZONE,0,1,1,nil,ft)
Duel.SendtoHand(g,nil,REASON_COST)
local tc=g:SelectUnselect(nil,tp,false,true,1,1)
if tc then
e:SetLabelObject(tc)
return true
else return false end
end
function c17264592.sprop(e,tp,eg,ep,ev,re,r,rp,c)
local g=e:GetLabelObject()
Duel.SendtoHand(g,nil,REASON_SPSUMMON)
end
function c17264592.spfilter(c,e,tp)
return c:IsSetCard(0xb2) and c:IsCanBeSpecialSummoned(e,0,tp,false,false) and not c:IsCode(17264592)
......
......@@ -7,6 +7,7 @@ function c17286057.initial_effect(c)
e1:SetProperty(EFFECT_FLAG_UNCOPYABLE)
e1:SetRange(LOCATION_HAND)
e1:SetCondition(c17286057.hspcon)
e1:SetTarget(c17286057.hsptg)
e1:SetOperation(c17286057.hspop)
c:RegisterEffect(e1)
--atk/def
......@@ -40,19 +41,26 @@ function c17286057.initial_effect(c)
e5:SetCondition(c17286057.atcon)
c:RegisterEffect(e5)
end
function c17286057.hspfilter(c,ft,tp)
function c17286057.hspfilter(c,tp)
return c:IsCode(80887952)
and (ft>0 or (c:IsControler(tp) and c:GetSequence()<5)) and (c:IsControler(tp) or c:IsFaceup())
and Duel.GetMZoneCount(tp,c)>0 and (c:IsControler(tp) or c:IsFaceup())
end
function c17286057.hspcon(e,c)
if c==nil then return true end
local tp=c:GetControler()
local ft=Duel.GetLocationCount(tp,LOCATION_MZONE)
return ft>-1 and Duel.CheckReleaseGroupEx(tp,c17286057.hspfilter,1,REASON_SPSUMMON,false,nil,ft,tp)
return Duel.CheckReleaseGroupEx(tp,c17286057.hspfilter,1,REASON_SPSUMMON,false,nil,tp)
end
function c17286057.hsptg(e,tp,eg,ep,ev,re,r,rp,chk,c)
local g=Duel.GetReleaseGroup(tp,false,REASON_SPSUMMON):Filter(c17286057.hspfilter,nil,tp)
Duel.Hint(HINT_SELECTMSG,tp,HINTMSG_RELEASE)
local tc=g:SelectUnselect(nil,tp,false,true,1,1)
if tc then
e:SetLabelObject(tc)
return true
else return false end
end
function c17286057.hspop(e,tp,eg,ep,ev,re,r,rp,c)
local ft=Duel.GetLocationCount(tp,LOCATION_MZONE)
local g=Duel.SelectReleaseGroupEx(tp,c17286057.hspfilter,1,1,REASON_SPSUMMON,false,nil,ft,tp)
local g=e:GetLabelObject()
Duel.Release(g,REASON_SPSUMMON)
end
function c17286057.filter(c)
......
......@@ -15,6 +15,7 @@ function c18378582.initial_effect(c)
e2:SetProperty(EFFECT_FLAG_CANNOT_DISABLE+EFFECT_FLAG_UNCOPYABLE)
e2:SetRange(LOCATION_HAND)
e2:SetCondition(c18378582.spcon)
e2:SetTarget(c18378582.sptg)
e2:SetOperation(c18378582.spop)
c:RegisterEffect(e2)
--destroy
......@@ -28,15 +29,24 @@ function c18378582.initial_effect(c)
e3:SetOperation(c18378582.desop)
c:RegisterEffect(e3)
end
function c18378582.rfilter(c,code)
return c:IsFaceup() and c:IsCode(code)
function c18378582.rfilter(c,tp)
return c:IsFaceup() and c:IsCode(66073051) and Duel.GetMZoneCount(tp,c)>0
end
function c18378582.spcon(e,c)
if c==nil then return Duel.IsEnvironment(56433456) end
return Duel.CheckReleaseGroupEx(c:GetControler(),c18378582.rfilter,1,REASON_SPSUMMON,false,nil,66073051)
return Duel.CheckReleaseGroupEx(c:GetControler(),c18378582.rfilter,1,REASON_SPSUMMON,false,nil,c:GetControler())
end
function c18378582.sptg(e,tp,eg,ep,ev,re,r,rp,chk,c)
local g=Duel.GetReleaseGroup(tp,false,REASON_SPSUMMON):Filter(c18378582.rfilter,nil,tp)
Duel.Hint(HINT_SELECTMSG,tp,HINTMSG_RELEASE)
local tc=g:SelectUnselect(nil,tp,false,true,1,1)
if tc then
e:SetLabelObject(tc)
return true
else return false end
end
function c18378582.spop(e,tp,eg,ep,ev,re,r,rp,c)
local g=Duel.SelectReleaseGroupEx(tp,c18378582.rfilter,1,1,REASON_SPSUMMON,false,nil,66073051)
local g=e:GetLabelObject()
Duel.Release(g,REASON_SPSUMMON)
end
function c18378582.cfilter(c)
......
......@@ -9,6 +9,7 @@ function c18491580.initial_effect(c)
e1:SetRange(LOCATION_HAND)
e1:SetCountLimit(1,18491580+EFFECT_COUNT_CODE_OATH)
e1:SetCondition(c18491580.hspcon)
e1:SetTarget(c18491580.hsptg)
e1:SetOperation(c18491580.hspop)
c:RegisterEffect(e1)
--spsummon
......@@ -30,8 +31,17 @@ function c18491580.hspcon(e,c)
local tp=c:GetControler()
return Duel.CheckReleaseGroupEx(tp,c18491580.hspfilter,1,REASON_SPSUMMON,true,c,tp)
end
function c18491580.hsptg(e,tp,eg,ep,ev,re,r,rp,chk,c)
local g=Duel.GetReleaseGroup(tp,true,REASON_SPSUMMON):Filter(c18491580.hspfilter,c,tp)
Duel.Hint(HINT_SELECTMSG,tp,HINTMSG_RELEASE)
local tc=g:SelectUnselect(nil,tp,false,true,1,1)
if tc then
e:SetLabelObject(tc)
return true
else return false end
end
function c18491580.hspop(e,tp,eg,ep,ev,re,r,rp,c)
local sg=Duel.SelectReleaseGroupEx(tp,c18491580.hspfilter,1,1,REASON_SPSUMMON,true,c,tp)
local sg=e:GetLabelObject()
Duel.Release(sg,REASON_SPSUMMON)
end
function c18491580.spcon(e,tp,eg,ep,ev,re,r,rp)
......
......@@ -52,7 +52,7 @@ function c18631392.sptg(e,tp,eg,ep,ev,re,r,rp,chk,c)
end
function c18631392.spop(e,tp,eg,ep,ev,re,r,rp,c)
local g=e:GetLabelObject()
Duel.SendtoGrave(g,REASON_COST)
Duel.SendtoGrave(g,REASON_SPSUMMON)
g:DeleteGroup()
end
function c18631392.anctg(e,tp,eg,ep,ev,re,r,rp,chk)
......
......@@ -8,6 +8,7 @@ function c1876841.initial_effect(c)
e1:SetProperty(EFFECT_FLAG_CANNOT_DISABLE+EFFECT_FLAG_UNCOPYABLE)
e1:SetRange(LOCATION_HAND)
e1:SetCondition(c1876841.spcon)
e1:SetTarget(c1876841.sptg)
e1:SetOperation(c1876841.spop)
c:RegisterEffect(e1)
--search
......@@ -42,10 +43,18 @@ function c1876841.spcon(e,c)
return Duel.GetLocationCount(tp,LOCATION_MZONE)>0
and Duel.IsExistingMatchingCard(c1876841.spfilter,tp,LOCATION_HAND,0,1,e:GetHandler())
end
function c1876841.spop(e,tp,eg,ep,ev,re,r,rp,c)
function c1876841.sptg(e,tp,eg,ep,ev,re,r,rp,chk,c)
local g=Duel.GetMatchingGroup(c1876841.spfilter,tp,LOCATION_HAND,0,e:GetHandler())
Duel.Hint(HINT_SELECTMSG,tp,HINTMSG_REMOVE)
local g=Duel.SelectMatchingCard(tp,c1876841.spfilter,tp,LOCATION_HAND,0,1,1,e:GetHandler())
Duel.Remove(g,POS_FACEUP,REASON_COST)
local tc=g:SelectUnselect(nil,tp,false,true,1,1)
if tc then
e:SetLabelObject(tc)
return true
else return false end
end
function c1876841.spop(e,tp,eg,ep,ev,re,r,rp,c)
local g=e:GetLabelObject()
Duel.Remove(g,POS_FACEUP,REASON_SPSUMMON)
end
function c1876841.srcon(e,tp,eg,ep,ev,re,r,rp)
return not e:GetHandler():IsDisabled() and e:GetHandler():IsAttackPos()
......
......@@ -7,6 +7,7 @@ function c18828179.initial_effect(c)
e1:SetProperty(EFFECT_FLAG_UNCOPYABLE)
e1:SetRange(LOCATION_HAND)
e1:SetCondition(c18828179.spcon)
e1:SetTarget(c18828179.sptg)
e1:SetOperation(c18828179.spop)
c:RegisterEffect(e1)
--to hand
......@@ -21,19 +22,26 @@ function c18828179.initial_effect(c)
e2:SetOperation(c18828179.desop)
c:RegisterEffect(e2)
end
function c18828179.rfilter(c,ft,tp)
function c18828179.rfilter(c,tp)
return c:IsCode(45045866)
and (ft>0 or (c:IsControler(tp) and c:GetSequence()<5)) and (c:IsControler(tp) or c:IsFaceup())
and Duel.GetMZoneCount(tp,c)>0 and (c:IsControler(tp) or c:IsFaceup())
end
function c18828179.spcon(e,c)
if c==nil then return true end
local tp=c:GetControler()
local ft=Duel.GetLocationCount(tp,LOCATION_MZONE)
return ft>-1 and Duel.CheckReleaseGroupEx(tp,c18828179.rfilter,1,REASON_SPSUMMON,false,nil,ft,tp)
return Duel.CheckReleaseGroupEx(tp,c18828179.rfilter,1,REASON_SPSUMMON,false,nil,tp)
end
function c18828179.sptg(e,tp,eg,ep,ev,re,r,rp,chk,c)
local g=Duel.GetReleaseGroup(tp,false,REASON_SPSUMMON):Filter(c18828179.rfilter,nil,tp)
Duel.Hint(HINT_SELECTMSG,tp,HINTMSG_RELEASE)
local tc=g:SelectUnselect(nil,tp,false,true,1,1)
if tc then
e:SetLabelObject(tc)
return true
else return false end
end
function c18828179.spop(e,tp,eg,ep,ev,re,r,rp,c)
local ft=Duel.GetLocationCount(tp,LOCATION_MZONE)
local g=Duel.SelectReleaseGroupEx(tp,c18828179.rfilter,1,1,REASON_SPSUMMON,false,nil,ft,tp)
local g=e:GetLabelObject()
Duel.Release(g,REASON_SPSUMMON)
end
function c18828179.cfilter(c)
......
......@@ -8,6 +8,7 @@ function c18940556.initial_effect(c)
e1:SetCode(EFFECT_SPSUMMON_PROC)
e1:SetRange(LOCATION_HAND)
e1:SetCondition(c18940556.sprcon)
e1:SetTarget(c18940556.sprtg)
e1:SetOperation(c18940556.sprop)
c:RegisterEffect(e1)
--destroy
......@@ -48,10 +49,20 @@ function c18940556.sprcon(e,c)
return Duel.GetLocationCount(tp,LOCATION_MZONE)>0
and Duel.IsExistingMatchingCard(c18940556.sprfilter,tp,LOCATION_GRAVE,0,2,nil)
end
function c18940556.sprop(e,tp,eg,ep,ev,re,r,rp,c)
function c18940556.sprtg(e,tp,eg,ep,ev,re,r,rp,chk,c)
local g=Duel.GetMatchingGroup(c18940556.sprfilter,tp,LOCATION_GRAVE,0,nil)
Duel.Hint(HINT_SELECTMSG,tp,HINTMSG_REMOVE)
local g=Duel.SelectMatchingCard(tp,c18940556.sprfilter,tp,LOCATION_GRAVE,0,2,2,nil)
Duel.Remove(g,POS_FACEUP,REASON_COST)
local sg=g:CancelableSelect(tp,2,2,nil)
if sg then
sg:KeepAlive()
e:SetLabelObject(sg)
return true
else return false end
end
function c18940556.sprop(e,tp,eg,ep,ev,re,r,rp,c)
local g=e:GetLabelObject()
Duel.Remove(g,POS_FACEUP,REASON_SPSUMMON)
g:DeleteGroup()
end
function c18940556.descon(e,tp,eg,ep,ev,re,r,rp)
return Duel.GetCurrentPhase()==PHASE_MAIN1 or Duel.GetCurrentPhase()==PHASE_MAIN2
......
......@@ -40,6 +40,6 @@ function c19028307.sptg(e,tp,eg,ep,ev,re,r,rp,chk,c)
end
function c19028307.spop(e,tp,eg,ep,ev,re,r,rp,c)
local g=e:GetLabelObject()
Duel.Remove(g,POS_FACEUP,REASON_COST)
Duel.Remove(g,POS_FACEUP,REASON_SPSUMMON)
g:DeleteGroup()
end
......@@ -8,6 +8,7 @@ function c19441018.initial_effect(c)
e1:SetProperty(EFFECT_FLAG_CANNOT_DISABLE+EFFECT_FLAG_UNCOPYABLE)
e1:SetRange(LOCATION_HAND)
e1:SetCondition(c19441018.spcon)
e1:SetTarget(c19441018.sptg)
e1:SetOperation(c19441018.spop)
c:RegisterEffect(e1)
--cannot special summon
......@@ -39,10 +40,20 @@ function c19441018.spcon(e,c)
return Duel.GetLocationCount(tp,LOCATION_MZONE)>0
and Duel.IsExistingMatchingCard(c19441018.spfilter,tp,LOCATION_GRAVE,0,2,nil)
end
function c19441018.spop(e,tp,eg,ep,ev,re,r,rp,c)
function c19441018.sptg(e,tp,eg,ep,ev,re,r,rp,chk,c)
local g=Duel.GetMatchingGroup(c19441018.spfilter,tp,LOCATION_GRAVE,0,nil)
Duel.Hint(HINT_SELECTMSG,tp,HINTMSG_REMOVE)
local g=Duel.SelectMatchingCard(tp,c19441018.spfilter,tp,LOCATION_GRAVE,0,2,2,nil)
Duel.Remove(g,POS_FACEUP,REASON_COST)
local sg=g:CancelableSelect(tp,2,2,nil)
if sg then
sg:KeepAlive()
e:SetLabelObject(sg)
return true
else return false end
end
function c19441018.spop(e,tp,eg,ep,ev,re,r,rp,c)
local g=e:GetLabelObject()
Duel.Remove(g,POS_FACEUP,REASON_SPSUMMON)
g:DeleteGroup()
end
function c19441018.costfilter(c)
return c:IsRace(RACE_THUNDER) and c:IsAbleToRemoveAsCost()
......
......@@ -7,6 +7,7 @@ function c20403123.initial_effect(c)
e1:SetRange(LOCATION_HAND)
e1:SetCode(EFFECT_SPSUMMON_PROC)
e1:SetCondition(c20403123.hspcon)
e1:SetTarget(c20403123.hsptg)
e1:SetOperation(c20403123.hspop)
c:RegisterEffect(e1)
--destroy
......@@ -22,19 +23,26 @@ function c20403123.initial_effect(c)
e2:SetOperation(c20403123.desop)
c:RegisterEffect(e2)
end
function c20403123.hspfilter(c,ft,tp)
function c20403123.hspfilter(c,tp)
return c:IsSetCard(0x9f) and not c:IsType(TYPE_PENDULUM)
and (ft>0 or (c:IsControler(tp) and c:GetSequence()<5)) and (c:IsControler(tp) or c:IsFaceup())
and Duel.GetMZoneCount(tp,c)>0 and (c:IsControler(tp) or c:IsFaceup())
end
function c20403123.hspcon(e,c)
if c==nil then return true end
local tp=c:GetControler()
local ft=Duel.GetLocationCount(tp,LOCATION_MZONE)
return ft>-1 and Duel.CheckReleaseGroupEx(tp,c20403123.hspfilter,1,REASON_SPSUMMON,false,nil,ft,tp)
return Duel.CheckReleaseGroupEx(tp,c20403123.hspfilter,1,REASON_SPSUMMON,false,nil,tp)
end
function c20403123.hsptg(e,tp,eg,ep,ev,re,r,rp,chk,c)
local g=Duel.GetReleaseGroup(tp,false,REASON_SPSUMMON):Filter(c20403123.hspfilter,nil,tp)
Duel.Hint(HINT_SELECTMSG,tp,HINTMSG_RELEASE)
local tc=g:SelectUnselect(nil,tp,false,true,1,1)
if tc then
e:SetLabelObject(tc)
return true
else return false end
end
function c20403123.hspop(e,tp,eg,ep,ev,re,r,rp,c)
local ft=Duel.GetLocationCount(tp,LOCATION_MZONE)
local g=Duel.SelectReleaseGroupEx(tp,c20403123.hspfilter,1,1,REASON_SPSUMMON,false,nil,ft,tp)
local g=e:GetLabelObject()
Duel.Release(g,REASON_SPSUMMON)
end
function c20403123.descost(e,tp,eg,ep,ev,re,r,rp,chk)
......
......@@ -7,6 +7,7 @@ function c20932152.initial_effect(c)
e1:SetProperty(EFFECT_FLAG_UNCOPYABLE)
e1:SetRange(LOCATION_HAND)
e1:SetCondition(c20932152.spcon)
e1:SetTarget(c20932152.sptg)
e1:SetOperation(c20932152.spop)
c:RegisterEffect(e1)
--
......@@ -36,8 +37,16 @@ function c20932152.spcon(e,c)
return Duel.GetLocationCount(tp,LOCATION_MZONE)>0
and Duel.IsExistingMatchingCard(c20932152.spfilter,tp,LOCATION_HAND,0,1,c)
end
function c20932152.spop(e,tp,eg,ep,ev,re,r,rp,c)
function c20932152.sptg(e,tp,eg,ep,ev,re,r,rp,chk,c)
local g=Duel.GetMatchingGroup(c20932152.spfilter,tp,LOCATION_HAND,0,c)
Duel.Hint(HINT_SELECTMSG,tp,HINTMSG_TOGRAVE)
local g=Duel.SelectMatchingCard(tp,c20932152.spfilter,tp,LOCATION_HAND,0,1,1,c)
Duel.SendtoGrave(g,REASON_COST)
local tc=g:SelectUnselect(nil,tp,false,true,1,1)
if tc then
e:SetLabelObject(tc)
return true
else return false end
end
function c20932152.spop(e,tp,eg,ep,ev,re,r,rp,c)
local g=e:GetLabelObject()
Duel.SendtoGrave(g,REASON_SPSUMMON)
end
......@@ -52,7 +52,7 @@ function c21390858.sptg(e,tp,eg,ep,ev,re,r,rp,chk,c)
end
function c21390858.spop(e,tp,eg,ep,ev,re,r,rp,c)
local g=e:GetLabelObject()
Duel.SendtoGrave(g,REASON_COST)
Duel.SendtoGrave(g,REASON_SPSUMMON)
g:DeleteGroup()
end
function c21390858.tfilter(c)
......
......@@ -19,6 +19,7 @@ function c21686473.initial_effect(c)
e2:SetCode(EFFECT_SPSUMMON_PROC)
e2:SetRange(LOCATION_HAND)
e2:SetCondition(c21686473.hspcon)
e2:SetTarget(c21686473.hsptg)
e2:SetOperation(c21686473.hspop)
c:RegisterEffect(e2)
--atk
......@@ -66,19 +67,26 @@ function c21686473.thop(e,tp,eg,ep,ev,re,r,rp)
Duel.ConfirmCards(1-tp,g)
end
end
function c21686473.hspfilter(c,ft,tp)
function c21686473.hspfilter(c,tp)
return c:IsSetCard(0x10af)
and (ft>0 or (c:IsControler(tp) and c:GetSequence()<5)) and (c:IsControler(tp) or c:IsFaceup())
and Duel.GetMZoneCount(tp,c)>0 and (c:IsControler(tp) or c:IsFaceup())
end
function c21686473.hspcon(e,c)
if c==nil then return true end
local tp=c:GetControler()
local ft=Duel.GetLocationCount(tp,LOCATION_MZONE)
return ft>-1 and Duel.CheckReleaseGroupEx(tp,c21686473.hspfilter,1,REASON_SPSUMMON,false,nil,ft,tp)
return Duel.CheckReleaseGroupEx(tp,c21686473.hspfilter,1,REASON_SPSUMMON,false,nil,tp)
end
function c21686473.hsptg(e,tp,eg,ep,ev,re,r,rp,chk,c)
local g=Duel.GetReleaseGroup(tp,false,REASON_SPSUMMON):Filter(c21686473.hspfilter,nil,tp)
Duel.Hint(HINT_SELECTMSG,tp,HINTMSG_RELEASE)
local tc=g:SelectUnselect(nil,tp,false,true,1,1)
if tc then
e:SetLabelObject(tc)
return true
else return false end
end
function c21686473.hspop(e,tp,eg,ep,ev,re,r,rp,c)
local ft=Duel.GetLocationCount(tp,LOCATION_MZONE)
local g=Duel.SelectReleaseGroupEx(tp,c21686473.hspfilter,1,1,REASON_SPSUMMON,false,nil,ft,tp)
local g=e:GetLabelObject()
Duel.Release(g,REASON_SPSUMMON)
end
function c21686473.atkcon(e,tp,eg,ep,ev,re,r,rp)
......
......@@ -8,6 +8,7 @@ function c21772453.initial_effect(c)
e1:SetRange(LOCATION_HAND)
e1:SetCode(EFFECT_SPSUMMON_PROC)
e1:SetCondition(c21772453.hspcon)
e1:SetTarget(c21772453.hsptg)
e1:SetOperation(c21772453.hspop)
c:RegisterEffect(e1)
--draw
......@@ -20,19 +21,26 @@ function c21772453.initial_effect(c)
e2:SetOperation(c21772453.operation)
c:RegisterEffect(e2)
end
function c21772453.hspfilter(c,ft,tp)
function c21772453.hspfilter(c,tp)
return c:IsSetCard(0xe6) and not c:IsCode(21772453)
and (ft>0 or (c:IsControler(tp) and c:GetSequence()<5)) and (c:IsControler(tp) or c:IsFaceup())
and Duel.GetMZoneCount(tp,c)>0 and (c:IsControler(tp) or c:IsFaceup())
end
function c21772453.hspcon(e,c)
if c==nil then return true end
local tp=c:GetControler()
local ft=Duel.GetLocationCount(tp,LOCATION_MZONE)
return ft>-1 and Duel.CheckReleaseGroupEx(tp,c21772453.hspfilter,1,REASON_SPSUMMON,false,nil,ft,tp)
return Duel.CheckReleaseGroupEx(tp,c21772453.hspfilter,1,REASON_SPSUMMON,false,nil,tp)
end
function c21772453.hsptg(e,tp,eg,ep,ev,re,r,rp,chk,c)
local g=Duel.GetReleaseGroup(tp,false,REASON_SPSUMMON):Filter(c21772453.hspfilter,nil,tp)
Duel.Hint(HINT_SELECTMSG,tp,HINTMSG_RELEASE)
local tc=g:SelectUnselect(nil,tp,false,true,1,1)
if tc then
e:SetLabelObject(tc)
return true
else return false end
end
function c21772453.hspop(e,tp,eg,ep,ev,re,r,rp,c)
local ft=Duel.GetLocationCount(tp,LOCATION_MZONE)
local g=Duel.SelectReleaseGroupEx(tp,c21772453.hspfilter,1,1,REASON_SPSUMMON,false,nil,ft,tp)
local g=e:GetLabelObject()
Duel.Release(g,REASON_SPSUMMON)
end
function c21772453.target(e,tp,eg,ep,ev,re,r,rp,chk)
......
......@@ -8,6 +8,7 @@ function c218704.initial_effect(c)
e1:SetProperty(EFFECT_FLAG_CANNOT_DISABLE+EFFECT_FLAG_UNCOPYABLE)
e1:SetRange(LOCATION_HAND)
e1:SetCondition(c218704.spcon)
e1:SetTarget(c218704.sptg)
e1:SetOperation(c218704.spop)
c:RegisterEffect(e1)
--skip draw
......@@ -28,10 +29,20 @@ function c218704.spcon(e,c)
return Duel.GetLocationCount(tp,LOCATION_MZONE)>0
and Duel.IsExistingMatchingCard(c218704.spfilter,tp,LOCATION_GRAVE,0,2,nil)
end
function c218704.spop(e,tp,eg,ep,ev,re,r,rp,c)
function c218704.sptg(e,tp,eg,ep,ev,re,r,rp,chk,c)
local g=Duel.GetMatchingGroup(c218704.spfilter,tp,LOCATION_GRAVE,0,nil)
Duel.Hint(HINT_SELECTMSG,tp,HINTMSG_REMOVE)
local g=Duel.SelectMatchingCard(tp,c218704.spfilter,tp,LOCATION_GRAVE,0,2,2,nil)
Duel.Remove(g,POS_FACEUP,REASON_COST)
local sg=g:CancelableSelect(tp,2,2,nil)
if sg then
sg:KeepAlive()
e:SetLabelObject(sg)
return true
else return false end
end
function c218704.spop(e,tp,eg,ep,ev,re,r,rp,c)
local g=e:GetLabelObject()
Duel.Remove(g,POS_FACEUP,REASON_SPSUMMON)
g:DeleteGroup()
end
function c218704.skipop(e,tp,eg,ep,ev,re,r,rp)
local e1=Effect.CreateEffect(e:GetHandler())
......
......@@ -14,6 +14,7 @@ function c22056710.initial_effect(c)
e2:SetProperty(EFFECT_FLAG_CANNOT_DISABLE+EFFECT_FLAG_UNCOPYABLE)
e2:SetRange(LOCATION_HAND)
e2:SetCondition(c22056710.hspcon)
e2:SetTarget(c22056710.hsptg)
e2:SetOperation(c22056710.hspop)
c:RegisterEffect(e2)
--spsummon
......@@ -28,20 +29,26 @@ function c22056710.initial_effect(c)
e3:SetOperation(c22056710.spop)
c:RegisterEffect(e3)
end
function c22056710.hspfilter(c,ft)
return c:IsFaceup() and c:IsCode(53839837) and c:IsAbleToRemoveAsCost() and (ft>0 or c:GetSequence()<5)
function c22056710.hspfilter(c,tp)
return c:IsFaceup() and c:IsCode(53839837) and c:IsAbleToRemoveAsCost() and Duel.GetMZoneCount(tp,c)>0
end
function c22056710.hspcon(e,c)
if c==nil then return true end
local tp=c:GetControler()
local ft=Duel.GetLocationCount(tp,LOCATION_MZONE)
return ft>-1 and Duel.IsExistingMatchingCard(c22056710.hspfilter,tp,LOCATION_MZONE,0,1,nil,ft)
return Duel.IsExistingMatchingCard(c22056710.hspfilter,tp,LOCATION_MZONE,0,1,nil,tp)
end
function c22056710.hspop(e,tp,eg,ep,ev,re,r,rp,c)
local ft=Duel.GetLocationCount(tp,LOCATION_MZONE)
function c22056710.hsptg(e,tp,eg,ep,ev,re,r,rp,chk,c)
local g=Duel.GetMatchingGroup(c22056710.spfilter,tp,LOCATION_MZONE,0,nil,tp)
Duel.Hint(HINT_SELECTMSG,tp,HINTMSG_REMOVE)
local g=Duel.SelectMatchingCard(tp,c22056710.hspfilter,tp,LOCATION_MZONE,0,1,1,nil,ft)
Duel.Remove(g,POS_FACEUP,REASON_COST)
local tc=g:SelectUnselect(nil,tp,false,true,1,1)
if tc then
e:SetLabelObject(tc)
return true
else return false end
end
function c22056710.hspop(e,tp,eg,ep,ev,re,r,rp,c)
local g=e:GetLabelObject()
Duel.Remove(g,POS_FACEUP,REASON_SPSUMMON)
end
function c22056710.cfilter(c,e,tp)
return c:IsRace(RACE_ZOMBIE) and c:IsDiscardable()
......
......@@ -7,6 +7,7 @@ function c22138839.initial_effect(c)
e1:SetCode(EFFECT_SPSUMMON_PROC)
e1:SetRange(LOCATION_HAND)
e1:SetCondition(c22138839.hspcon)
e1:SetTarget(c22138839.hsptg)
e1:SetOperation(c22138839.hspop)
c:RegisterEffect(e1)
--counter
......@@ -24,12 +25,20 @@ end
function c22138839.hspcon(e,c)
if c==nil then return true end
local tp=c:GetControler()
local ft=Duel.GetLocationCount(tp,LOCATION_MZONE)
return ft>0 and Duel.IsExistingMatchingCard(c22138839.rfilter,tp,0,LOCATION_MZONE,1,nil)
return Duel.GetLocationCount(tp,LOCATION_MZONE)>0
and Duel.IsExistingMatchingCard(c22138839.rfilter,tp,0,LOCATION_MZONE,1,nil)
end
function c22138839.hspop(e,tp,eg,ep,ev,re,r,rp,c)
function c22138839.hsptg(e,tp,eg,ep,ev,re,r,rp,chk,c)
local g=Duel.GetMatchingGroup(c22138839.rfilter,tp,0,LOCATION_MZONE,nil)
Duel.Hint(HINT_SELECTMSG,tp,HINTMSG_RELEASE)
local g=Duel.SelectMatchingCard(tp,c22138839.rfilter,tp,0,LOCATION_MZONE,1,1,nil)
local tc=g:SelectUnselect(nil,tp,false,true,1,1)
if tc then
e:SetLabelObject(tc)
return true
else return false end
end
function c22138839.hspop(e,tp,eg,ep,ev,re,r,rp,c)
local g=e:GetLabelObject()
Duel.Release(g,REASON_SPSUMMON)
end
function c22138839.ccon(e,tp,eg,ep,ev,re,r,rp)
......
......@@ -75,7 +75,7 @@ function s.spsop(e,tp,eg,ep,ev,re,r,rp,c)
if #gg>0 then
Duel.HintSelection(gg)
end
Duel.SendtoDeck(g,nil,SEQ_DECKSHUFFLE,REASON_COST)
Duel.SendtoDeck(g,nil,SEQ_DECKSHUFFLE,REASON_SPSUMMON)
g:DeleteGroup()
end
function s.acon(e)
......
......@@ -15,6 +15,7 @@ function c23303072.initial_effect(c)
e2:SetProperty(EFFECT_FLAG_CANNOT_DISABLE+EFFECT_FLAG_UNCOPYABLE)
e2:SetRange(LOCATION_HAND)
e2:SetCondition(c23303072.spcon)
e2:SetTarget(c23303072.sptg)
e2:SetOperation(c23303072.spop)
c:RegisterEffect(e2)
end
......@@ -26,10 +27,19 @@ function c23303072.spcon(e,c)
return Duel.GetLocationCount(c:GetControler(),LOCATION_MZONE)>0
and Duel.IsExistingMatchingCard(c23303072.filter,c:GetControler(),LOCATION_HAND,0,3,e:GetHandler())
end
function c23303072.spop(e,tp,eg,ep,ev,re,r,rp,c)
function c23303072.sptg(e,tp,eg,ep,ev,re,r,rp,chk,c)
local g=Duel.GetMatchingGroup(c23303072.filter,tp,LOCATION_HAND,0,c)
Duel.Hint(HINT_SELECTMSG,tp,HINTMSG_TOGRAVE)
local g=Duel.SelectMatchingCard(tp,c23303072.filter,tp,LOCATION_HAND,0,3,3,c)
Duel.SendtoGrave(g,REASON_COST)
local sg=g:CancelableSelect(tp,3,3,nil)
if sg then
sg:KeepAlive()
e:SetLabelObject(sg)
return true
else return false end
end
function c23303072.spop(e,tp,eg,ep,ev,re,r,rp,c)
local g=e:GetLabelObject()
Duel.SendtoGrave(g,REASON_SPSUMMON)
local sum=0
local tc=g:GetFirst()
while tc do
......@@ -43,4 +53,5 @@ function c23303072.spop(e,tp,eg,ep,ev,re,r,rp,c)
e1:SetValue(sum*300)
e1:SetReset(RESET_EVENT+0xff0000)
c:RegisterEffect(e1)
g:DeleteGroup()
end
......@@ -73,7 +73,7 @@ function c23440231.sptg(e,tp,eg,ep,ev,re,r,rp,chk,c)
end
function c23440231.spop(e,tp,eg,ep,ev,re,r,rp,c)
local g=e:GetLabelObject()
Duel.Remove(g,POS_FACEUP,REASON_COST)
Duel.Remove(g,POS_FACEUP,REASON_SPSUMMON)
g:DeleteGroup()
end
function c23440231.desfilter(c)
......
......@@ -55,7 +55,7 @@ function c2521011.sptg(e,tp,eg,ep,ev,re,r,rp,chk,c)
end
function c2521011.spop(e,tp,eg,ep,ev,re,r,rp,c)
local g=e:GetLabelObject()
Duel.SendtoGrave(g,REASON_COST)
Duel.SendtoGrave(g,REASON_SPSUMMON)
g:DeleteGroup()
end
function c2521011.filter(c)
......
......@@ -8,6 +8,7 @@ function c25449584.initial_effect(c)
e1:SetRange(LOCATION_HAND)
e1:SetCountLimit(1,25449584+EFFECT_COUNT_CODE_OATH)
e1:SetCondition(c25449584.spcon)
e1:SetTarget(c25449584.sptg)
e1:SetOperation(c25449584.spop)
c:RegisterEffect(e1)
--to grave
......@@ -30,11 +31,20 @@ function c25449584.spcon(e,c)
local tp=c:GetControler()
return Duel.CheckReleaseGroupEx(tp,c25449584.spfilter,1,REASON_SPSUMMON,false,nil,tp)
end
function c25449584.sptg(e,tp,eg,ep,ev,re,r,rp,chk,c)
local g=Duel.GetReleaseGroup(tp,false,REASON_SPSUMMON):Filter(c25449584.spfilter,nil,tp)
Duel.Hint(HINT_SELECTMSG,tp,HINTMSG_RELEASE)
local tc=g:SelectUnselect(nil,tp,false,true,1,1)
if tc then
e:SetLabelObject(tc)
return true
else return false end
end
function c25449584.spop(e,tp,eg,ep,ev,re,r,rp,c)
local g=Duel.SelectReleaseGroupEx(tp,c25449584.spfilter,1,1,REASON_SPSUMMON,false,nil,tp)
Duel.Release(g,REASON_SPSUMMON)
local tc=e:GetLabelObject()
Duel.Release(tc,REASON_SPSUMMON)
c:RegisterFlagEffect(0,RESET_EVENT+0x4fc0000,EFFECT_FLAG_CLIENT_HINT,1,0,aux.Stringid(25449584,1))
local atk=g:GetFirst():GetBaseAttack()
local atk=tc:GetBaseAttack()
if atk<0 then return end
local e1=Effect.CreateEffect(c)
e1:SetType(EFFECT_TYPE_SINGLE)
......
......@@ -7,6 +7,7 @@ function c25460258.initial_effect(c)
e1:SetProperty(EFFECT_FLAG_UNCOPYABLE)
e1:SetRange(LOCATION_HAND)
e1:SetCondition(c25460258.spcon)
e1:SetTarget(c25460258.sptg)
e1:SetOperation(c25460258.spop)
c:RegisterEffect(e1)
--remove
......@@ -32,11 +33,20 @@ function c25460258.spcon(e,c)
local g=Duel.GetMatchingGroup(c25460258.spcostfilter,tp,LOCATION_GRAVE,0,nil)
return g:CheckSubGroup(aux.gfcheck,2,2,Card.IsAttribute,ATTRIBUTE_LIGHT,ATTRIBUTE_DARK)
end
function c25460258.spop(e,tp,eg,ep,ev,re,r,rp,c)
function c25460258.sptg(e,tp,eg,ep,ev,re,r,rp,chk,c)
local g=Duel.GetMatchingGroup(c25460258.spcostfilter,tp,LOCATION_GRAVE,0,nil)
Duel.Hint(HINT_SELECTMSG,tp,HINTMSG_REMOVE)
local sg=g:SelectSubGroup(tp,aux.gfcheck,false,2,2,Card.IsAttribute,ATTRIBUTE_LIGHT,ATTRIBUTE_DARK)
Duel.Remove(sg,POS_FACEUP,REASON_COST)
local sg=g:SelectSubGroup(tp,aux.gfcheck,true,2,2,Card.IsAttribute,ATTRIBUTE_LIGHT,ATTRIBUTE_DARK)
if sg then
sg:KeepAlive()
e:SetLabelObject(sg)
return true
else return false end
end
function c25460258.spop(e,tp,eg,ep,ev,re,r,rp,c)
local sg=e:GetLabelObject()
Duel.Remove(sg,POS_FACEUP,REASON_SPSUMMON)
sg:DeleteGroup()
end
function c25460258.cfilter(c)
return c:IsRace(RACE_DRAGON) and c:IsAbleToGraveAsCost()
......
......@@ -75,7 +75,7 @@ function c25811989.sptg(e,tp,eg,ep,ev,re,r,rp,chk,c)
end
function c25811989.spop(e,tp,eg,ep,ev,re,r,rp,c)
local g=e:GetLabelObject()
Duel.Remove(g,POS_FACEUP,REASON_COST)
Duel.Remove(g,POS_FACEUP,REASON_SPSUMMON)
g:DeleteGroup()
end
function c25811989.thcon(e,tp,eg,ep,ev,re,r,rp)
......
......@@ -8,6 +8,7 @@ function c25920413.initial_effect(c)
e1:SetRange(LOCATION_HAND)
e1:SetTargetRange(POS_FACEUP,1)
e1:SetCondition(c25920413.spcon)
e1:SetTarget(c25920413.sptg)
e1:SetOperation(c25920413.spop)
e1:SetValue(SUMMON_VALUE_SELF)
c:RegisterEffect(e1)
......@@ -35,18 +36,27 @@ function c25920413.initial_effect(c)
c:RegisterEffect(e4)
end
c25920413.counter_add_list={0x100e}
function c25920413.spfilter(c)
function c25920413.spfilter(c,tp)
return c:IsLevelBelow(3) and c:IsFaceup() and c:IsReleasable(REASON_SPSUMMON)
and Duel.GetMZoneCount(1-tp,c,tp)
end
function c25920413.spcon(e,c)
if c==nil then return true end
local tp=c:GetControler()
return Duel.GetActivityCount(tp,ACTIVITY_NORMALSUMMON)==0
and Duel.IsExistingMatchingCard(c25920413.spfilter,tp,0,LOCATION_MZONE,1,nil)
and Duel.IsExistingMatchingCard(c25920413.spfilter,tp,0,LOCATION_MZONE,1,nil,tp)
end
function c25920413.spop(e,tp,eg,ep,ev,re,r,rp,c)
function c25920413.sptg(e,tp,eg,ep,ev,re,r,rp,chk,c)
local g=Duel.GetMatchingGroup(c25920413.spfilter,tp,0,LOCATION_MZONE,nil,tp)
Duel.Hint(HINT_SELECTMSG,tp,HINTMSG_RELEASE)
local g=Duel.SelectMatchingCard(c:GetControler(),c25920413.spfilter,c:GetControler(),0,LOCATION_MZONE,1,1,nil)
local tc=g:SelectUnselect(nil,tp,false,true,1,1)
if tc then
e:SetLabelObject(tc)
return true
else return false end
end
function c25920413.spop(e,tp,eg,ep,ev,re,r,rp,c)
local g=e:GetLabelObject()
Duel.Release(g,REASON_SPSUMMON)
local e1=Effect.CreateEffect(c)
e1:SetType(EFFECT_TYPE_FIELD)
......
......@@ -14,6 +14,7 @@ function c26034577.initial_effect(c)
e2:SetProperty(EFFECT_FLAG_CANNOT_DISABLE+EFFECT_FLAG_UNCOPYABLE)
e2:SetRange(LOCATION_HAND)
e2:SetCondition(c26034577.spcon)
e2:SetTarget(c26034577.sptg)
e2:SetOperation(c26034577.spop)
c:RegisterEffect(e2)
--to hand
......@@ -42,8 +43,9 @@ function c26034577.initial_effect(c)
e4:SetOperation(c26034577.rmop)
c:RegisterEffect(e4)
end
function c26034577.spfilter(c)
function c26034577.spfilter(c,tp)
return c:IsSetCard(0xbb) and c:IsType(TYPE_MONSTER) and c:IsAbleToRemoveAsCost()
and Duel.GetMZoneCount(tp,c)>0
end
function c26034577.sumfilter(c)
return c:IsFaceup() and c:IsType(TYPE_EFFECT)
......@@ -57,31 +59,24 @@ function c26034577.spcon(e,c)
local tp=c:GetControler()
local sum=Duel.GetMatchingGroup(c26034577.sumfilter,tp,LOCATION_MZONE,0,nil):GetSum(c26034577.lv_or_rk)
if sum>8 then return false end
local ft=Duel.GetLocationCount(tp,LOCATION_MZONE)
if ft<0 then return false end
if c:IsHasEffect(34822850) then
if ft>0 then
return Duel.IsExistingMatchingCard(c26034577.spfilter,tp,LOCATION_MZONE+LOCATION_GRAVE+LOCATION_HAND,0,1,c)
else
return Duel.IsExistingMatchingCard(c26034577.spfilter,tp,LOCATION_MZONE,0,1,nil)
end
else
return ft>0 and Duel.IsExistingMatchingCard(c26034577.spfilter,tp,LOCATION_GRAVE+LOCATION_HAND,0,1,c)
end
local loc=LOCATION_GRAVE+LOCATION_HAND
if c:IsHasEffect(34822850) then loc=loc+LOCATION_MZONE end
return Duel.IsExistingMatchingCard(c26034577.spfilter,tp,loc,0,1,c,tp)
end
function c26034577.spop(e,tp,eg,ep,ev,re,r,rp,c)
local g=nil
function c26034577.sptg(e,tp,eg,ep,ev,re,r,rp,chk,c)
local loc=LOCATION_GRAVE+LOCATION_HAND
if c:IsHasEffect(34822850) then loc=loc+LOCATION_MZONE end
local g=Duel.GetMatchingGroup(c26034577.spfilter,tp,loc,0,c,tp)
Duel.Hint(HINT_SELECTMSG,tp,HINTMSG_REMOVE)
if c:IsHasEffect(34822850) then
if Duel.GetLocationCount(tp,LOCATION_MZONE)>0 then
g=Duel.SelectMatchingCard(tp,c26034577.spfilter,tp,LOCATION_MZONE+LOCATION_GRAVE+LOCATION_HAND,0,1,1,c)
else
g=Duel.SelectMatchingCard(tp,c26034577.spfilter,tp,LOCATION_MZONE,0,1,1,nil)
end
else
g=Duel.SelectMatchingCard(tp,c26034577.spfilter,tp,LOCATION_GRAVE+LOCATION_HAND,0,1,1,c)
end
Duel.Remove(g,POS_FACEUP,REASON_COST)
local tc=g:SelectUnselect(nil,tp,false,true,1,1)
if tc then
e:SetLabelObject(tc)
return true
else return false end
end
function c26034577.spop(e,tp,eg,ep,ev,re,r,rp,c)
local g=e:GetLabelObject()
Duel.Remove(g,POS_FACEUP,REASON_SPSUMMON)
end
function c26034577.thfilter(c)
return c:IsFaceup() and c:IsAbleToHand()
......
......@@ -8,6 +8,7 @@ function c26873574.initial_effect(c)
e1:SetProperty(EFFECT_FLAG_CANNOT_DISABLE+EFFECT_FLAG_UNCOPYABLE)
e1:SetRange(LOCATION_HAND)
e1:SetCondition(c26873574.spcon)
e1:SetTarget(c26873574.sptg)
e1:SetOperation(c26873574.spop)
c:RegisterEffect(e1)
--cannot be target
......@@ -43,11 +44,20 @@ function c26873574.spcon(e,c)
local g=Duel.GetMatchingGroup(c26873574.spcostfilter,tp,LOCATION_GRAVE,0,nil)
return g:CheckSubGroup(aux.gfcheck,2,2,Card.IsAttribute,ATTRIBUTE_LIGHT,ATTRIBUTE_DARK)
end
function c26873574.spop(e,tp,eg,ep,ev,re,r,rp,c)
function c26873574.sptg(e,tp,eg,ep,ev,re,r,rp,chk,c)
local g=Duel.GetMatchingGroup(c26873574.spcostfilter,tp,LOCATION_GRAVE,0,nil)
Duel.Hint(HINT_SELECTMSG,tp,HINTMSG_REMOVE)
local sg=g:SelectSubGroup(tp,aux.gfcheck,false,2,2,Card.IsAttribute,ATTRIBUTE_LIGHT,ATTRIBUTE_DARK)
Duel.Remove(sg,POS_FACEUP,REASON_COST)
local sg=g:SelectSubGroup(tp,aux.gfcheck,true,2,2,Card.IsAttribute,ATTRIBUTE_LIGHT,ATTRIBUTE_DARK)
if sg then
sg:KeepAlive()
e:SetLabelObject(sg)
return true
else return false end
end
function c26873574.spop(e,tp,eg,ep,ev,re,r,rp,c)
local sg=e:GetLabelObject()
Duel.Remove(sg,POS_FACEUP,REASON_SPSUMMON)
sg:DeleteGroup()
end
function c26873574.ffilter(c)
return c:IsFaceup() and c:IsType(TYPE_FIELD)
......
......@@ -15,6 +15,7 @@ function c27134209.initial_effect(c)
e1:SetCode(EFFECT_SPSUMMON_PROC)
e1:SetRange(LOCATION_HAND+LOCATION_GRAVE)
e1:SetCondition(c27134209.sprcon)
e1:SetTarget(c27134209.sprtg)
e1:SetOperation(c27134209.sprop)
c:RegisterEffect(e1)
--act limit
......@@ -43,10 +44,20 @@ function c27134209.sprcon(e,c)
return Duel.GetLocationCount(tp,LOCATION_MZONE)>0
and Duel.IsExistingMatchingCard(c27134209.sprfilter,tp,LOCATION_GRAVE+LOCATION_HAND,0,3,c)
end
function c27134209.sprop(e,tp,eg,ep,ev,re,r,rp,c)
function c27134209.sprtg(e,tp,eg,ep,ev,re,r,rp,chk,c)
local g=Duel.GetMatchingGroup(c27134209.sprfilter,tp,LOCATION_GRAVE+LOCATION_HAND,0,c)
Duel.Hint(HINT_SELECTMSG,tp,HINTMSG_REMOVE)
local g=Duel.SelectMatchingCard(tp,c27134209.sprfilter,tp,LOCATION_GRAVE+LOCATION_HAND,0,3,3,c)
Duel.Remove(g,POS_FACEUP,REASON_COST)
local sg=g:CancelableSelect(tp,3,3,nil)
if sg then
sg:KeepAlive()
e:SetLabelObject(sg)
return true
else return false end
end
function c27134209.sprop(e,tp,eg,ep,ev,re,r,rp,c)
local g=e:GetLabelObject()
Duel.Remove(g,POS_FACEUP,REASON_SPSUMMON)
g:DeleteGroup()
end
function c27134209.chainop(e,tp,eg,ep,ev,re,r,rp)
if re:IsActiveType(TYPE_SPELL+TYPE_TRAP) and ep==tp then
......
......@@ -7,6 +7,7 @@ function c27407330.initial_effect(c)
e1:SetProperty(EFFECT_FLAG_UNCOPYABLE)
e1:SetRange(LOCATION_HAND)
e1:SetCondition(c27407330.spcon)
e1:SetTarget(c27407330.sptg)
e1:SetOperation(c27407330.spop)
c:RegisterEffect(e1)
--remove
......@@ -29,10 +30,18 @@ function c27407330.spcon(e,c)
return Duel.GetLocationCount(c:GetControler(),LOCATION_MZONE)>0 and
Duel.IsExistingMatchingCard(c27407330.spfilter,c:GetControler(),LOCATION_HAND,0,1,c)
end
function c27407330.spop(e,tp,eg,ep,ev,re,r,rp,c)
function c27407330.sptg(e,tp,eg,ep,ev,re,r,rp,chk,c)
local g=Duel.GetMatchingGroup(c27407330.spfilter,tp,LOCATION_HAND,0,c)
Duel.Hint(HINT_SELECTMSG,tp,HINTMSG_DISCARD)
local g=Duel.SelectMatchingCard(tp,c27407330.spfilter,tp,LOCATION_HAND,0,1,1,c)
Duel.SendtoGrave(g,REASON_DISCARD+REASON_COST)
local tc=g:SelectUnselect(nil,tp,false,true,1,1)
if tc then
e:SetLabelObject(tc)
return true
else return false end
end
function c27407330.spop(e,tp,eg,ep,ev,re,r,rp,c)
local g=e:GetLabelObject()
Duel.SendtoGrave(g,REASON_DISCARD+REASON_SPSUMMON)
end
function c27407330.costfilter(c)
return c:IsAttribute(ATTRIBUTE_LIGHT) and c:IsDiscardable()
......
......@@ -14,6 +14,7 @@ function c27693363.initial_effect(c)
e2:SetProperty(EFFECT_FLAG_CANNOT_DISABLE+EFFECT_FLAG_UNCOPYABLE)
e2:SetRange(LOCATION_EXTRA)
e2:SetCondition(c27693363.sprcon)
e2:SetTarget(c27693363.sprtg)
e2:SetOperation(c27693363.sprop)
c:RegisterEffect(e2)
--activate card
......@@ -59,11 +60,20 @@ function c27693363.sprcon(e,c)
local g=Duel.GetMatchingGroup(c27693363.tgrfilter,tp,LOCATION_MZONE,0,nil)
return g:CheckSubGroup(c27693363.fselect,2,2,tp,c)
end
function c27693363.sprop(e,tp,eg,ep,ev,re,r,rp,c)
function c27693363.sprtg(e,tp,eg,ep,ev,re,r,rp,chk,c)
local g=Duel.GetMatchingGroup(c27693363.tgrfilter,tp,LOCATION_MZONE,0,nil)
Duel.Hint(HINT_SELECTMSG,tp,HINTMSG_TOGRAVE)
local tg=g:SelectSubGroup(tp,c27693363.fselect,false,2,2,tp,c)
Duel.SendtoGrave(tg,REASON_COST)
local sg=g:SelectSubGroup(tp,c27693363.fselect,true,2,2,tp,c)
if sg then
sg:KeepAlive()
e:SetLabelObject(sg)
return true
else return false end
end
function c27693363.sprop(e,tp,eg,ep,ev,re,r,rp,c)
local tg=e:GetLabelObject()
Duel.SendtoGrave(tg,REASON_SPSUMMON)
tg:DeleteGroup()
end
function c27693363.actfilter(c,tp)
return c:IsCode(89264428) and c:GetActivateEffect():IsActivatable(tp,true,true)
......
......@@ -9,6 +9,7 @@ function c28674152.initial_effect(c)
e1:SetProperty(EFFECT_FLAG_UNCOPYABLE+EFFECT_FLAG_SPSUM_PARAM)
e1:SetTargetRange(POS_FACEUP_ATTACK,1)
e1:SetCondition(c28674152.spcon)
e1:SetTarget(c28674152.sptg)
e1:SetOperation(c28674152.spop)
c:RegisterEffect(e1)
local e2=Effect.CreateEffect(c)
......@@ -39,9 +40,17 @@ function c28674152.spcon(e,c)
local tp=c:GetControler()
return Duel.IsExistingMatchingCard(c28674152.spfilter,tp,0,LOCATION_MZONE,1,nil,tp)
end
function c28674152.spop(e,tp,eg,ep,ev,re,r,rp,c)
function c28674152.sptg(e,tp,eg,ep,ev,re,r,rp,chk,c)
local g=Duel.GetMatchingGroup(c28674152.spfilter,tp,0,LOCATION_MZONE,nil,tp)
Duel.Hint(HINT_SELECTMSG,tp,HINTMSG_RELEASE)
local g=Duel.SelectMatchingCard(tp,c28674152.spfilter,tp,0,LOCATION_MZONE,1,1,nil,tp)
local tc=g:SelectUnselect(nil,tp,false,true,1,1)
if tc then
e:SetLabelObject(tc)
return true
else return false end
end
function c28674152.spop(e,tp,eg,ep,ev,re,r,rp,c)
local g=e:GetLabelObject()
Duel.Release(g,REASON_SPSUMMON)
end
function c28674152.cfilter(c)
......
......@@ -15,6 +15,7 @@ function c29436665.initial_effect(c)
e2:SetProperty(EFFECT_FLAG_CANNOT_DISABLE+EFFECT_FLAG_UNCOPYABLE)
e2:SetRange(LOCATION_HAND)
e2:SetCondition(c29436665.spcon)
e2:SetTarget(c29436665.sptg)
e2:SetOperation(c29436665.spop)
c:RegisterEffect(e2)
--damage
......@@ -35,19 +36,26 @@ function c29436665.initial_effect(c)
e4:SetOperation(c29436665.dmgop)
c:RegisterEffect(e4)
end
function c29436665.rfilter(c,ft,tp)
function c29436665.rfilter(c,tp)
return c:IsCode(46986414)
and (ft>0 or (c:IsControler(tp) and c:GetSequence()<5)) and (c:IsControler(tp) or c:IsFaceup())
and Duel.GetMZoneCount(tp,c)>0 and (c:IsControler(tp) or c:IsFaceup())
end
function c29436665.spcon(e,c)
if c==nil then return true end
local tp=c:GetControler()
local ft=Duel.GetLocationCount(tp,LOCATION_MZONE)
return ft>-1 and Duel.CheckReleaseGroupEx(tp,c29436665.rfilter,1,REASON_SPSUMMON,false,nil,ft,tp)
return Duel.CheckReleaseGroupEx(tp,c29436665.rfilter,1,REASON_SPSUMMON,false,nil,tp)
end
function c29436665.sptg(e,tp,eg,ep,ev,re,r,rp,chk,c)
local g=Duel.GetReleaseGroup(tp,false,REASON_SPSUMMON):Filter(c29436665.rfilter,nil,tp)
Duel.Hint(HINT_SELECTMSG,tp,HINTMSG_RELEASE)
local tc=g:SelectUnselect(nil,tp,false,true,1,1)
if tc then
e:SetLabelObject(tc)
return true
else return false end
end
function c29436665.spop(e,tp,eg,ep,ev,re,r,rp,c)
local ft=Duel.GetLocationCount(tp,LOCATION_MZONE)
local g=Duel.SelectReleaseGroupEx(tp,c29436665.rfilter,1,1,REASON_SPSUMMON,false,nil,ft,tp)
local g=e:GetLabelObject()
Duel.Release(g,REASON_SPSUMMON)
end
function c29436665.dmgcon(e,tp,eg,ep,ev,re,r,rp)
......
......@@ -14,6 +14,7 @@ function c2948263.initial_effect(c)
e2:SetProperty(EFFECT_FLAG_CANNOT_DISABLE+EFFECT_FLAG_UNCOPYABLE)
e2:SetRange(LOCATION_HAND)
e2:SetCondition(c2948263.spcon)
e2:SetTarget(c2948263.sptg)
e2:SetOperation(c2948263.spop)
c:RegisterEffect(e2)
--reduce
......@@ -36,21 +37,28 @@ function c2948263.initial_effect(c)
e4:SetOperation(c2948263.disop)
c:RegisterEffect(e4)
end
function c2948263.spfilter(c,ft,tp)
function c2948263.spfilter(c,tp)
return c:IsSetCard(0x59)
and (ft>0 or (c:IsControler(tp) and c:GetSequence()<5)) and (c:IsControler(tp) or c:IsFaceup())
and Duel.GetMZoneCount(tp,c)>0 and (c:IsControler(tp) or c:IsFaceup())
end
function c2948263.spcon(e,c)
if c==nil then return true end
local tp=c:GetControler()
local ft=Duel.GetLocationCount(tp,LOCATION_MZONE)
return ft>-1 and Duel.CheckReleaseGroupEx(tp,c2948263.spfilter,1,REASON_SPSUMMON,false,nil,ft,tp)
return Duel.CheckReleaseGroupEx(tp,c2948263.spfilter,1,REASON_SPSUMMON,false,nil,tp)
end
function c2948263.sptg(e,tp,eg,ep,ev,re,r,rp,chk,c)
local g=Duel.GetReleaseGroup(tp,false,REASON_SPSUMMON):Filter(c2948263.spfilter,nil,tp)
Duel.Hint(HINT_SELECTMSG,tp,HINTMSG_RELEASE)
local tc=g:SelectUnselect(nil,tp,false,true,1,1)
if tc then
e:SetLabelObject(tc)
return true
else return false end
end
function c2948263.spop(e,tp,eg,ep,ev,re,r,rp,c)
local ft=Duel.GetLocationCount(tp,LOCATION_MZONE)
local g=Duel.SelectReleaseGroupEx(tp,c2948263.spfilter,1,1,REASON_SPSUMMON,false,nil,ft,tp)
Duel.Release(g,REASON_SPSUMMON)
local atk=g:GetFirst():GetBaseAttack()
local tc=e:GetLabelObject()
Duel.Release(tc,REASON_SPSUMMON)
local atk=tc:GetBaseAttack()
local e1=Effect.CreateEffect(c)
e1:SetType(EFFECT_TYPE_SINGLE)
e1:SetCode(EFFECT_SET_ATTACK)
......
......@@ -7,6 +7,7 @@ function c29719112.initial_effect(c)
e1:SetProperty(EFFECT_FLAG_UNCOPYABLE)
e1:SetRange(LOCATION_HAND)
e1:SetCondition(c29719112.hspcon)
e1:SetTarget(c29719112.hsptg)
e1:SetOperation(c29719112.hspop)
c:RegisterEffect(e1)
--special summon
......@@ -42,8 +43,17 @@ function c29719112.hspcon(e,c)
local tp=c:GetControler()
return Duel.CheckReleaseGroupEx(tp,c29719112.spfilter,1,REASON_SPSUMMON,false,nil,tp)
end
function c29719112.hsptg(e,tp,eg,ep,ev,re,r,rp,chk,c)
local g=Duel.GetReleaseGroup(tp,false,REASON_SPSUMMON):Filter(c29719112.spfilter,nil,tp)
Duel.Hint(HINT_SELECTMSG,tp,HINTMSG_RELEASE)
local tc=g:SelectUnselect(nil,tp,false,true,1,1)
if tc then
e:SetLabelObject(tc)
return true
else return false end
end
function c29719112.hspop(e,tp,eg,ep,ev,re,r,rp,c)
local g=Duel.SelectReleaseGroupEx(tp,c29719112.spfilter,1,1,REASON_SPSUMMON,false,nil,tp)
local g=e:GetLabelObject()
Duel.Release(g,REASON_SPSUMMON)
end
function c29719112.spfilter1(c,e)
......
......@@ -9,6 +9,7 @@ function c29726552.initial_effect(c)
e1:SetProperty(EFFECT_FLAG_UNCOPYABLE+EFFECT_FLAG_SPSUM_PARAM)
e1:SetTargetRange(POS_FACEUP_ATTACK,1)
e1:SetCondition(c29726552.spcon)
e1:SetTarget(c29726552.sptg)
e1:SetOperation(c29726552.spop)
c:RegisterEffect(e1)
local e2=Effect.CreateEffect(c)
......@@ -41,9 +42,17 @@ function c29726552.spcon(e,c)
local tp=c:GetControler()
return Duel.IsExistingMatchingCard(c29726552.spfilter,tp,0,LOCATION_MZONE,1,nil,tp)
end
function c29726552.spop(e,tp,eg,ep,ev,re,r,rp,c)
function c29726552.sptg(e,tp,eg,ep,ev,re,r,rp,chk,c)
local g=Duel.GetMatchingGroup(c29726552.spfilter,tp,0,LOCATION_MZONE,nil,tp)
Duel.Hint(HINT_SELECTMSG,tp,HINTMSG_RELEASE)
local g=Duel.SelectMatchingCard(tp,c29726552.spfilter,tp,0,LOCATION_MZONE,1,1,nil,tp)
local tc=g:SelectUnselect(nil,tp,false,true,1,1)
if tc then
e:SetLabelObject(tc)
return true
else return false end
end
function c29726552.spop(e,tp,eg,ep,ev,re,r,rp,c)
local g=e:GetLabelObject()
Duel.Release(g,REASON_SPSUMMON)
end
function c29726552.cfilter(c)
......
......@@ -9,6 +9,7 @@ function c30118701.initial_effect(c)
e1:SetRange(LOCATION_HAND)
e1:SetCountLimit(1,30118701+EFFECT_COUNT_CODE_OATH)
e1:SetCondition(c30118701.hspcon)
e1:SetTarget(c30118701.hsptg)
e1:SetOperation(c30118701.hspop)
c:RegisterEffect(e1)
--fusion summon
......@@ -35,10 +36,18 @@ function c30118701.hspcon(e,c)
return Duel.GetLocationCount(tp,LOCATION_MZONE)>0
and Duel.IsExistingMatchingCard(c30118701.hspcfilter,tp,LOCATION_HAND,0,1,c)
end
function c30118701.hspop(e,tp,eg,ep,ev,re,r,rp,c)
function c30118701.hsptg(e,tp,eg,ep,ev,re,r,rp,chk,c)
local g=Duel.GetMatchingGroup(c30118701.hspcfilter,tp,LOCATION_HAND,0,c)
Duel.Hint(HINT_SELECTMSG,tp,HINTMSG_TOGRAVE)
local g=Duel.SelectMatchingCard(tp,c30118701.hspcfilter,tp,LOCATION_HAND,0,1,1,c)
Duel.SendtoGrave(g,REASON_COST)
local tc=g:SelectUnselect(nil,tp,false,true,1,1)
if tc then
e:SetLabelObject(tc)
return true
else return false end
end
function c30118701.hspop(e,tp,eg,ep,ev,re,r,rp,c)
local g=e:GetLabelObject()
Duel.SendtoGrave(g,REASON_SPSUMMON)
local e1=Effect.CreateEffect(c)
e1:SetType(EFFECT_TYPE_SINGLE)
e1:SetCode(EFFECT_UPDATE_ATTACK)
......
......@@ -14,6 +14,7 @@ function c30270176.initial_effect(c)
e2:SetProperty(EFFECT_FLAG_CANNOT_DISABLE+EFFECT_FLAG_UNCOPYABLE)
e2:SetRange(LOCATION_HAND)
e2:SetCondition(c30270176.spcon)
e2:SetTarget(c30270176.sptg)
e2:SetOperation(c30270176.spop)
c:RegisterEffect(e2)
--immune
......@@ -55,12 +56,23 @@ function c30270176.spcon(e,c)
local hg=Duel.GetMatchingGroup(c30270176.spcfilter,tp,LOCATION_HAND,0,c)
return Duel.GetLocationCount(tp,LOCATION_MZONE)>0 and hg:GetClassCount(Card.GetCode)>=3
end
function c30270176.spop(e,tp,eg,ep,ev,re,r,rp,c)
local hg=Duel.GetMatchingGroup(c30270176.spcfilter,tp,LOCATION_HAND,0,c)
function c30270176.sptg(e,tp,eg,ep,ev,re,r,rp,chk,c)
local g=Duel.GetMatchingGroup(c30270176.spcfilter,tp,LOCATION_HAND,0,c)
Duel.Hint(HINT_SELECTMSG,tp,HINTMSG_CONFIRM)
local rg=hg:SelectSubGroup(tp,aux.dncheck,false,3,3)
aux.GCheckAdditional=aux.dncheck
local sg=g:SelectSubGroup(tp,aux.TRUE,true,3,3)
aux.GCheckAdditional=nil
if sg then
sg:KeepAlive()
e:SetLabelObject(sg)
return true
else return false end
end
function c30270176.spop(e,tp,eg,ep,ev,re,r,rp,c)
local rg=e:GetLabelObject()
Duel.ConfirmCards(1-tp,rg)
Duel.ShuffleHand(tp)
rg:DeleteGroup()
end
function c30270176.immval(e,te)
return te:GetOwner()~=e:GetHandler() and te:IsActiveType(TYPE_MONSTER) and te:IsActivated()
......
......@@ -8,6 +8,7 @@ function c30603688.initial_effect(c)
e1:SetProperty(EFFECT_FLAG_UNCOPYABLE)
e1:SetRange(LOCATION_HAND)
e1:SetCondition(c30603688.spcon)
e1:SetTarget(c30603688.sptg)
e1:SetOperation(c30603688.spop)
c:RegisterEffect(e1)
--search
......@@ -41,10 +42,18 @@ function c30603688.spcon(e,c)
return Duel.GetLocationCount(tp,LOCATION_MZONE)>0
and Duel.IsExistingMatchingCard(nil,tp,LOCATION_HAND,0,1,c)
end
function c30603688.spop(e,tp,eg,ep,ev,re,r,rp,c)
function c30603688.sptg(e,tp,eg,ep,ev,re,r,rp,chk,c)
local g=Duel.GetMatchingGroup(nil,tp,LOCATION_HAND,0,c)
Duel.Hint(HINT_SELECTMSG,tp,HINTMSG_DISCARD)
local g=Duel.SelectMatchingCard(tp,nil,tp,LOCATION_HAND,0,1,1,c)
Duel.SendtoGrave(g,REASON_COST+REASON_DISCARD)
local tc=g:SelectUnselect(nil,tp,false,true,1,1)
if tc then
e:SetLabelObject(tc)
return true
else return false end
end
function c30603688.spop(e,tp,eg,ep,ev,re,r,rp,c)
local g=e:GetLabelObject()
Duel.SendtoGrave(g,REASON_SPSUMMON+REASON_DISCARD)
end
function c30603688.filter(c)
return c:IsCode(46986414) and c:IsAbleToHand()
......
......@@ -7,6 +7,7 @@ function c30794966.initial_effect(c)
e1:SetRange(LOCATION_HAND)
e1:SetCode(EFFECT_SPSUMMON_PROC)
e1:SetCondition(c30794966.hspcon)
e1:SetTarget(c30794966.hsptg)
e1:SetOperation(c30794966.hspop)
c:RegisterEffect(e1)
--destroy replace
......@@ -19,26 +20,31 @@ function c30794966.initial_effect(c)
e2:SetOperation(c30794966.desrepop)
c:RegisterEffect(e2)
end
function c30794966.rfilter1(c,tp)
return c:IsRace(RACE_DRAGON) and c:IsAttribute(ATTRIBUTE_LIGHT) and c:IsAbleToRemoveAsCost()
and Duel.IsExistingMatchingCard(c30794966.rfilter2,tp,LOCATION_GRAVE,0,1,c)
end
function c30794966.rfilter2(c)
return c:IsRace(RACE_DRAGON) and c:IsType(TYPE_NORMAL) and c:IsAbleToRemoveAsCost()
function c30794966.rfilter(c)
return c:IsRace(RACE_DRAGON) and c:IsAbleToRemoveAsCost()
and (c:IsAttribute(ATTRIBUTE_LIGHT) or c:IsType(TYPE_NORMAL))
end
function c30794966.hspcon(e,c)
if c==nil then return true end
local tp=c:GetControler()
local g=Duel.GetMatchingGroup(c30794966.rfilter,tp,LOCATION_GRAVE,0,nil)
return Duel.GetLocationCount(tp,LOCATION_MZONE)>0
and Duel.IsExistingMatchingCard(c30794966.rfilter1,tp,LOCATION_GRAVE,0,1,nil,tp)
and g:CheckSubGroup(aux.gffcheck,2,2,Card.IsAttribute,ATTRIBUTE_LIGHT,Card.IsType,TYPE_NORMAL)
end
function c30794966.hspop(e,tp,eg,ep,ev,re,r,rp,c)
function c30794966.hsptg(e,tp,eg,ep,ev,re,r,rp,chk,c)
local g=Duel.GetMatchingGroup(c30794966.rfilter,tp,LOCATION_GRAVE,0,nil)
Duel.Hint(HINT_SELECTMSG,tp,HINTMSG_REMOVE)
local g1=Duel.SelectMatchingCard(tp,c30794966.rfilter1,tp,LOCATION_GRAVE,0,1,1,nil,tp)
Duel.Hint(HINT_SELECTMSG,tp,HINTMSG_REMOVE)
local g2=Duel.SelectMatchingCard(tp,c30794966.rfilter2,tp,LOCATION_GRAVE,0,1,1,g1:GetFirst())
g1:Merge(g2)
Duel.Remove(g1,POS_FACEUP,REASON_COST)
local sg=g:SelectSubGroup(tp,aux.gffcheck,true,2,2,Card.IsAttribute,ATTRIBUTE_LIGHT,Card.IsType,TYPE_NORMAL)
if sg then
sg:KeepAlive()
e:SetLabelObject(sg)
return true
else return false end
end
function c30794966.hspop(e,tp,eg,ep,ev,re,r,rp,c)
local g=e:GetLabelObject()
Duel.Remove(g,POS_FACEUP,REASON_SPSUMMON)
g:DeleteGroup()
end
function c30794966.repfilter(c)
return c:IsFaceup() and c:IsSetCard(0x69) and not c:IsStatus(STATUS_DESTROY_CONFIRMED)
......
......@@ -7,6 +7,7 @@ function c31516413.initial_effect(c)
e1:SetRange(LOCATION_HAND)
e1:SetCode(EFFECT_SPSUMMON_PROC)
e1:SetCondition(c31516413.hspcon)
e1:SetTarget(c31516413.hsptg)
e1:SetOperation(c31516413.hspop)
c:RegisterEffect(e1)
--destroy
......@@ -31,19 +32,26 @@ function c31516413.initial_effect(c)
e3:SetOperation(c31516413.spop)
c:RegisterEffect(e3)
end
function c31516413.hspfilter(c,ft,tp)
function c31516413.hspfilter(c,tp)
return c:IsSetCard(0x69)
and (ft>0 or (c:IsControler(tp) and c:GetSequence()<5)) and (c:IsControler(tp) or c:IsFaceup())
and Duel.GetMZoneCount(tp,c)>0 and (c:IsControler(tp) or c:IsFaceup())
end
function c31516413.hspcon(e,c)
if c==nil then return true end
local tp=c:GetControler()
local ft=Duel.GetLocationCount(tp,LOCATION_MZONE)
return ft>-1 and Duel.CheckReleaseGroupEx(tp,c31516413.hspfilter,1,REASON_SPSUMMON,false,nil,ft,tp)
return Duel.CheckReleaseGroupEx(tp,c31516413.hspfilter,1,REASON_SPSUMMON,false,nil,tp)
end
function c31516413.hsptg(e,tp,eg,ep,ev,re,r,rp,chk,c)
local g=Duel.GetReleaseGroup(tp,false,REASON_SPSUMMON):Filter(c31516413.hspfilter,nil,tp)
Duel.Hint(HINT_SELECTMSG,tp,HINTMSG_RELEASE)
local tc=g:SelectUnselect(nil,tp,false,true,1,1)
if tc then
e:SetLabelObject(tc)
return true
else return false end
end
function c31516413.hspop(e,tp,eg,ep,ev,re,r,rp,c)
local ft=Duel.GetLocationCount(tp,LOCATION_MZONE)
local g=Duel.SelectReleaseGroupEx(tp,c31516413.hspfilter,1,1,REASON_SPSUMMON,false,nil,ft,tp)
local g=e:GetLabelObject()
Duel.Release(g,REASON_SPSUMMON)
c:RegisterFlagEffect(0,RESET_EVENT+0x4fc0000,EFFECT_FLAG_CLIENT_HINT,1,0,aux.Stringid(31516413,2))
end
......
......@@ -42,7 +42,7 @@ function c31764353.sptg(e,tp,eg,ep,ev,re,r,rp,chk,c)
end
function c31764353.spop(e,tp,eg,ep,ev,re,r,rp,c)
local g=e:GetLabelObject()
Duel.SendtoGrave(g,REASON_COST)
Duel.SendtoGrave(g,REASON_SPSUMMON)
g:DeleteGroup()
end
function c31764353.condition(e,tp,eg,ep,ev,re,r,rp)
......
......@@ -8,6 +8,7 @@ function c31829185.initial_effect(c)
e1:SetProperty(EFFECT_FLAG_CANNOT_DISABLE+EFFECT_FLAG_UNCOPYABLE)
e1:SetRange(LOCATION_HAND)
e1:SetCondition(c31829185.spcon)
e1:SetTarget(c31829185.sptg)
e1:SetOperation(c31829185.spop)
c:RegisterEffect(e1)
--reg
......@@ -38,10 +39,20 @@ function c31829185.spcon(e,c)
return Duel.GetLocationCount(tp,LOCATION_MZONE)>0
and Duel.IsExistingMatchingCard(c31829185.spfilter,tp,LOCATION_GRAVE,0,3,nil)
end
function c31829185.spop(e,tp,eg,ep,ev,re,r,rp,c)
function c31829185.sptg(e,tp,eg,ep,ev,re,r,rp,chk,c)
local g=Duel.GetMatchingGroup(c31829185.spfilter,tp,LOCATION_GRAVE,0,nil)
Duel.Hint(HINT_SELECTMSG,tp,HINTMSG_REMOVE)
local g=Duel.SelectMatchingCard(tp,c31829185.spfilter,tp,LOCATION_GRAVE,0,3,3,nil)
Duel.Remove(g,POS_FACEUP,REASON_COST)
local sg=g:CancelableSelect(tp,3,3,nil)
if sg then
sg:KeepAlive()
e:SetLabelObject(sg)
return true
else return false end
end
function c31829185.spop(e,tp,eg,ep,ev,re,r,rp,c)
local g=e:GetLabelObject()
Duel.Remove(g,POS_FACEUP,REASON_SPSUMMON)
g:DeleteGroup()
end
function c31829185.tgop(e,tp,eg,ep,ev,re,r,rp)
local c=e:GetHandler()
......
......@@ -42,7 +42,7 @@ function c31887905.sptg(e,tp,eg,ep,ev,re,r,rp,chk,c)
end
function c31887905.spop(e,tp,eg,ep,ev,re,r,rp,c)
local g=e:GetLabelObject()
Duel.SendtoGrave(g,REASON_COST)
Duel.SendtoGrave(g,REASON_SPSUMMON)
g:DeleteGroup()
end
function c31887905.condition(e,tp,eg,ep,ev,re,r,rp)
......
......@@ -7,6 +7,7 @@ function c31944175.initial_effect(c)
e1:SetProperty(EFFECT_FLAG_UNCOPYABLE)
e1:SetRange(LOCATION_HAND)
e1:SetCondition(c31944175.spcon)
e1:SetTarget(c31944175.sptg)
e1:SetOperation(c31944175.spop)
c:RegisterEffect(e1)
--atk down
......@@ -27,8 +28,16 @@ function c31944175.spcon(e,c)
return Duel.GetLocationCount(tp,LOCATION_MZONE)>0 and Duel.GetFieldGroupCount(tp,LOCATION_MZONE,0)==0
and Duel.IsExistingMatchingCard(c31944175.cfilter,tp,LOCATION_HAND,0,1,c)
end
function c31944175.spop(e,tp,eg,ep,ev,re,r,rp,c)
function c31944175.sptg(e,tp,eg,ep,ev,re,r,rp,chk,c)
local g=Duel.GetMatchingGroup(c31944175.cfilter,tp,LOCATION_HAND,0,c)
Duel.Hint(HINT_SELECTMSG,tp,HINTMSG_DISCARD)
local g=Duel.SelectMatchingCard(tp,c31944175.cfilter,tp,LOCATION_HAND,0,1,1,c)
Duel.SendtoGrave(g,REASON_COST+REASON_DISCARD)
local tc=g:SelectUnselect(nil,tp,false,true,1,1)
if tc then
e:SetLabelObject(tc)
return true
else return false end
end
function c31944175.spop(e,tp,eg,ep,ev,re,r,rp,c)
local g=e:GetLabelObject()
Duel.SendtoGrave(g,REASON_SPSUMMON+REASON_DISCARD)
end
......@@ -61,7 +61,7 @@ function c32491822.sptg(e,tp,eg,ep,ev,re,r,rp,chk,c)
end
function c32491822.spop(e,tp,eg,ep,ev,re,r,rp,c)
local g=e:GetLabelObject()
Duel.SendtoGrave(g,REASON_COST)
Duel.SendtoGrave(g,REASON_SPSUMMON)
g:DeleteGroup()
end
function c32491822.damcon(e,tp,eg,ep,ev,re,r,rp)
......
......@@ -8,6 +8,7 @@ function c32543380.initial_effect(c)
e1:SetProperty(EFFECT_FLAG_CANNOT_DISABLE+EFFECT_FLAG_UNCOPYABLE)
e1:SetRange(LOCATION_HAND)
e1:SetCondition(c32543380.spcon)
e1:SetTarget(c32543380.sptg)
e1:SetOperation(c32543380.spop)
c:RegisterEffect(e1)
--must attack
......@@ -41,10 +42,18 @@ function c32543380.spcon(e,c)
return Duel.GetLocationCount(tp,LOCATION_MZONE)>0
and Duel.IsExistingMatchingCard(c32543380.spfilter,tp,LOCATION_ONFIELD,0,1,nil)
end
function c32543380.spop(e,tp,eg,ep,ev,re,r,rp,c)
function c32543380.sptg(e,tp,eg,ep,ev,re,r,rp,chk,c)
local g=Duel.GetMatchingGroup(c32543380.spfilter,tp,LOCATION_ONFIELD,0,nil)
Duel.Hint(HINT_SELECTMSG,tp,HINTMSG_TOGRAVE)
local g=Duel.SelectMatchingCard(tp,c32543380.spfilter,tp,LOCATION_ONFIELD,0,1,1,nil)
Duel.SendtoGrave(g,REASON_COST)
local tc=g:SelectUnselect(nil,tp,false,true,1,1)
if tc then
e:SetLabelObject(tc)
return true
else return false end
end
function c32543380.spop(e,tp,eg,ep,ev,re,r,rp,c)
local g=e:GetLabelObject()
Duel.SendtoGrave(g,REASON_SPSUMMON)
end
function c32543380.atklimit(e,c)
return c==e:GetHandler()
......
......@@ -16,6 +16,7 @@ function s.initial_effect(c)
e1:SetRange(LOCATION_HAND+LOCATION_GRAVE)
e1:SetCountLimit(1,id+EFFECT_COUNT_CODE_OATH)
e1:SetCondition(s.spcon)
e1:SetTarget(s.sptg)
e1:SetOperation(s.spop)
c:RegisterEffect(e1)
--search
......@@ -46,9 +47,17 @@ function s.spcon(e,c)
local tp=c:GetControler()
return Duel.CheckReleaseGroupEx(tp,s.cfilter,1,REASON_SPSUMMON,false,nil,tp)
end
function s.spop(e,tp,eg,ep,ev,re,r,rp,c)
function s.sptg(e,tp,eg,ep,ev,re,r,rp,chk,c)
local g=Duel.GetReleaseGroup(tp,false,REASON_SPSUMMON):Filter(s.cfilter,nil,tp)
Duel.Hint(HINT_SELECTMSG,tp,HINTMSG_RELEASE)
local g=Duel.SelectReleaseGroupEx(tp,s.cfilter,1,1,REASON_SPSUMMON,false,nil,tp)
local tc=g:SelectUnselect(nil,tp,false,true,1,1)
if tc then
e:SetLabelObject(tc)
return true
else return false end
end
function s.spop(e,tp,eg,ep,ev,re,r,rp,c)
local g=e:GetLabelObject()
Duel.Release(g,REASON_SPSUMMON)
end
function s.thcost(e,tp,eg,ep,ev,re,r,rp,chk)
......
......@@ -7,6 +7,7 @@ function c3300267.initial_effect(c)
e1:SetRange(LOCATION_HAND)
e1:SetCode(EFFECT_SPSUMMON_PROC)
e1:SetCondition(c3300267.hspcon)
e1:SetTarget(c3300267.hsptg)
e1:SetOperation(c3300267.hspop)
c:RegisterEffect(e1)
--destroy
......@@ -31,19 +32,26 @@ function c3300267.initial_effect(c)
e3:SetOperation(c3300267.spop)
c:RegisterEffect(e3)
end
function c3300267.hspfilter(c,ft,tp)
function c3300267.hspfilter(c,tp)
return c:IsSetCard(0x69)
and (ft>0 or (c:IsControler(tp) and c:GetSequence()<5)) and (c:IsControler(tp) or c:IsFaceup())
and Duel.GetMZoneCount(tp,c)>0 and (c:IsControler(tp) or c:IsFaceup())
end
function c3300267.hspcon(e,c)
if c==nil then return true end
local tp=c:GetControler()
local ft=Duel.GetLocationCount(tp,LOCATION_MZONE)
return ft>-1 and Duel.CheckReleaseGroupEx(tp,c3300267.hspfilter,1,REASON_SPSUMMON,false,nil,ft,tp)
return Duel.CheckReleaseGroupEx(tp,c3300267.hspfilter,1,REASON_SPSUMMON,false,nil,tp)
end
function c3300267.hsptg(e,tp,eg,ep,ev,re,r,rp,chk,c)
local g=Duel.GetReleaseGroup(tp,false,REASON_SPSUMMON):Filter(c3300267.hspfilter,nil,tp)
Duel.Hint(HINT_SELECTMSG,tp,HINTMSG_RELEASE)
local tc=g:SelectUnselect(nil,tp,false,true,1,1)
if tc then
e:SetLabelObject(tc)
return true
else return false end
end
function c3300267.hspop(e,tp,eg,ep,ev,re,r,rp,c)
local ft=Duel.GetLocationCount(tp,LOCATION_MZONE)
local g=Duel.SelectReleaseGroupEx(tp,c3300267.hspfilter,1,1,REASON_SPSUMMON,false,nil,ft,tp)
local g=e:GetLabelObject()
Duel.Release(g,REASON_SPSUMMON)
c:RegisterFlagEffect(0,RESET_EVENT+0x4fc0000,EFFECT_FLAG_CLIENT_HINT,1,0,aux.Stringid(3300267,2))
end
......
......@@ -40,7 +40,7 @@ function c33093439.spcon(e,c)
end
function c33093439.spop(e,tp,eg,ep,ev,re,r,rp,c)
local g=Duel.GetMatchingGroup(c33093439.cfilter,tp,LOCATION_MZONE+LOCATION_GRAVE,0,nil)
Duel.Remove(g,POS_FACEUP,REASON_COST)
Duel.Remove(g,POS_FACEUP,REASON_SPSUMMON)
local e1=Effect.CreateEffect(c)
e1:SetType(EFFECT_TYPE_SINGLE)
e1:SetCode(EFFECT_SET_ATTACK)
......
......@@ -54,7 +54,7 @@ function c33212663.sprtg(e,tp,eg,ep,ev,re,r,rp,chk,c)
end
function c33212663.sprop(e,tp,eg,ep,ev,re,r,rp,c)
local g=e:GetLabelObject()
Duel.Remove(g,POS_FACEUP,REASON_COST)
Duel.Remove(g,POS_FACEUP,REASON_SPSUMMON)
g:DeleteGroup()
end
function c33212663.desfilter(c,race)
......
......@@ -9,6 +9,7 @@ function c33331231.initial_effect(c)
e1:SetProperty(EFFECT_FLAG_UNCOPYABLE)
e1:SetCountLimit(1,33331231+EFFECT_COUNT_CODE_OATH)
e1:SetCondition(c33331231.spcon)
e1:SetTarget(c33331231.sptg)
e1:SetOperation(c33331231.spop)
c:RegisterEffect(e1)
--special summon rule(on oppent field)
......@@ -21,7 +22,8 @@ function c33331231.initial_effect(c)
e2:SetTargetRange(POS_FACEUP,1)
e2:SetCountLimit(1,33331231+EFFECT_COUNT_CODE_OATH)
e2:SetCondition(c33331231.spcon2)
e2:SetOperation(c33331231.spop2)
e2:SetTarget(c33331231.sptg2)
e2:SetOperation(c33331231.spop)
c:RegisterEffect(e2)
--destroy
local e3=Effect.CreateEffect(c)
......@@ -46,9 +48,17 @@ function c33331231.spcon(e,c)
return Duel.IsExistingMatchingCard(c33331231.checkfilter,tp,LOCATION_MZONE,0,1,nil)
and Duel.IsExistingMatchingCard(c33331231.sprfilter,tp,LOCATION_MZONE,0,1,nil,tp,tp)
end
function c33331231.spop(e,tp,eg,ep,ev,re,r,rp,c)
function c33331231.sptg(e,tp,eg,ep,ev,re,r,rp,chk,c)
local g=Duel.GetMatchingGroup(c33331231.sprfilter,tp,LOCATION_MZONE,0,nil,tp,tp)
Duel.Hint(HINT_SELECTMSG,tp,HINTMSG_RELEASE)
local g=Duel.SelectMatchingCard(tp,c33331231.sprfilter,tp,LOCATION_MZONE,0,1,1,nil,tp,tp)
local tc=g:SelectUnselect(nil,tp,false,true,1,1)
if tc then
e:SetLabelObject(tc)
return true
else return false end
end
function c33331231.spop(e,tp,eg,ep,ev,re,r,rp,c)
local g=e:GetLabelObject()
Duel.Release(g,REASON_SPSUMMON)
end
function c33331231.spcon2(e,c)
......@@ -57,10 +67,14 @@ function c33331231.spcon2(e,c)
return Duel.IsExistingMatchingCard(c33331231.checkfilter,tp,LOCATION_MZONE,0,1,nil)
and Duel.IsExistingMatchingCard(c33331231.sprfilter,tp,0,LOCATION_MZONE,1,nil,1-tp,tp)
end
function c33331231.spop2(e,tp,eg,ep,ev,re,r,rp,c)
function c33331231.sptg2(e,tp,eg,ep,ev,re,r,rp,chk,c)
local g=Duel.GetMatchingGroup(c33331231.sprfilter,tp,LOCATION_MZONE,0,nil,1-tp,tp)
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_SPSUMMON)
local tc=g:SelectUnselect(nil,tp,false,true,1,1)
if tc then
e:SetLabelObject(tc)
return true
else return false end
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
......
......@@ -8,6 +8,7 @@ function c33347467.initial_effect(c)
e1:SetProperty(EFFECT_FLAG_CANNOT_DISABLE+EFFECT_FLAG_UNCOPYABLE)
e1:SetRange(LOCATION_HAND)
e1:SetCondition(c33347467.spcon)
e1:SetTarget(c33347467.sptg)
e1:SetOperation(c33347467.spop)
c:RegisterEffect(e1)
end
......@@ -20,8 +21,16 @@ function c33347467.spcon(e,c)
return Duel.GetLocationCount(tp,LOCATION_MZONE)>0
and Duel.IsExistingMatchingCard(c33347467.spfilter,tp,LOCATION_GRAVE,0,1,nil)
end
function c33347467.spop(e,tp,eg,ep,ev,re,r,rp,c)
function c33347467.sptg(e,tp,eg,ep,ev,re,r,rp,chk,c)
local g=Duel.GetMatchingGroup(c33347467.spfilter,tp,LOCATION_GRAVE,0,nil)
Duel.Hint(HINT_SELECTMSG,tp,HINTMSG_REMOVE)
local g=Duel.SelectMatchingCard(tp,c33347467.spfilter,tp,LOCATION_GRAVE,0,1,1,nil)
Duel.Remove(g,POS_FACEUP,REASON_COST)
local tc=g:SelectUnselect(nil,tp,false,true,1,1)
if tc then
e:SetLabelObject(tc)
return true
else return false end
end
function c33347467.spop(e,tp,eg,ep,ev,re,r,rp,c)
local g=e:GetLabelObject()
Duel.Remove(g,POS_FACEUP,REASON_SPSUMMON)
end
......@@ -7,6 +7,7 @@ function c34230233.initial_effect(c)
e1:SetProperty(EFFECT_FLAG_UNCOPYABLE)
e1:SetRange(LOCATION_GRAVE)
e1:SetCondition(c34230233.spcon)
e1:SetTarget(c34230233.sptg)
e1:SetOperation(c34230233.spop)
c:RegisterEffect(e1)
--destroy
......@@ -20,22 +21,28 @@ function c34230233.initial_effect(c)
e2:SetOperation(c34230233.desop)
c:RegisterEffect(e2)
end
function c34230233.spfilter(c,ft)
function c34230233.spfilter(c,tp)
return c:IsFaceup() and c:IsSetCard(0x6) and not c:IsCode(34230233) and c:IsAbleToHandAsCost()
and (ft>0 or c:GetSequence()<5)
and Duel.GetMZoneCount(tp,c)>0
end
function c34230233.spcon(e,c)
if c==nil then return true end
if c:IsHasEffect(EFFECT_NECRO_VALLEY) then return false end
local tp=c:GetControler()
local ft=Duel.GetLocationCount(tp,LOCATION_MZONE)
return ft>-1 and Duel.IsExistingMatchingCard(c34230233.spfilter,tp,LOCATION_MZONE,0,1,nil,ft)
return Duel.IsExistingMatchingCard(c34230233.spfilter,tp,LOCATION_MZONE,0,1,nil,tp)
end
function c34230233.spop(e,tp,eg,ep,ev,re,r,rp,c)
local ft=Duel.GetLocationCount(tp,LOCATION_MZONE)
function c34230233.sptg(e,tp,eg,ep,ev,re,r,rp,chk,c)
local g=Duel.GetMatchingGroup(c34230233.spfilter,tp,LOCATION_MZONE,0,nil,tp)
Duel.Hint(HINT_SELECTMSG,tp,HINTMSG_RTOHAND)
local g=Duel.SelectMatchingCard(tp,c34230233.spfilter,tp,LOCATION_MZONE,0,1,1,nil,ft)
Duel.SendtoHand(g,nil,REASON_COST)
local tc=g:SelectUnselect(nil,tp,false,true,1,1)
if tc then
e:SetLabelObject(tc)
return true
else return false end
end
function c34230233.spop(e,tp,eg,ep,ev,re,r,rp,c)
local g=e:GetLabelObject()
Duel.SendtoHand(g,nil,REASON_SPSUMMON)
end
function c34230233.descon(e,tp,eg,ep,ev,re,r,rp)
e:SetLabel(e:GetHandler():GetPreviousControler())
......
......@@ -8,6 +8,7 @@ function c34614289.initial_effect(c)
e1:SetRange(LOCATION_HAND)
e1:SetCountLimit(1,34614289+EFFECT_COUNT_CODE_OATH)
e1:SetCondition(c34614289.spcon)
e1:SetTarget(c34614289.sptg)
e1:SetOperation(c34614289.spop)
c:RegisterEffect(e1)
--position change
......@@ -21,21 +22,27 @@ function c34614289.initial_effect(c)
e2:SetOperation(c34614289.posop)
c:RegisterEffect(e2)
end
function c34614289.spfilter(c,ft)
function c34614289.spfilter(c,tp)
return c:IsFaceup() and c:IsSetCard(0xb2) and not c:IsCode(34614289) and c:IsAbleToHandAsCost()
and (ft>0 or c:GetSequence()<5)
and Duel.GetMZoneCount(tp,c)>0
end
function c34614289.spcon(e,c)
if c==nil then return true end
local tp=c:GetControler()
local ft=Duel.GetLocationCount(tp,LOCATION_MZONE)
return ft>-1 and Duel.IsExistingMatchingCard(c34614289.spfilter,tp,LOCATION_MZONE,0,1,nil,ft)
return Duel.IsExistingMatchingCard(c34614289.spfilter,tp,LOCATION_MZONE,0,1,nil,tp)
end
function c34614289.spop(e,tp,eg,ep,ev,re,r,rp,c)
local ft=Duel.GetLocationCount(tp,LOCATION_MZONE)
function c34614289.sptg(e,tp,eg,ep,ev,re,r,rp,chk,c)
local g=Duel.GetMatchingGroup(c34614289.spfilter,tp,LOCATION_MZONE,0,nil,tp)
Duel.Hint(HINT_SELECTMSG,tp,HINTMSG_RTOHAND)
local g=Duel.SelectMatchingCard(tp,c34614289.spfilter,tp,LOCATION_MZONE,0,1,1,nil,ft)
Duel.SendtoHand(g,nil,REASON_COST)
local tc=g:SelectUnselect(nil,tp,false,true,1,1)
if tc then
e:SetLabelObject(tc)
return true
else return false end
end
function c34614289.spop(e,tp,eg,ep,ev,re,r,rp,c)
local g=e:GetLabelObject()
Duel.SendtoHand(g,nil,REASON_SPSUMMON)
end
function c34614289.filter(c,sp)
return c:IsSummonPlayer(sp) and c:IsCanChangePosition()
......
......@@ -14,6 +14,7 @@ function c35699.initial_effect(c)
e1:SetCode(EFFECT_SPSUMMON_PROC)
e1:SetRange(LOCATION_HAND)
e1:SetCondition(c35699.sprcon)
e1:SetTarget(c35699.sprtg)
e1:SetOperation(c35699.sprop)
c:RegisterEffect(e1)
--Destroy
......@@ -49,10 +50,20 @@ function c35699.sprcon(e,c)
return Duel.GetLocationCount(tp,LOCATION_MZONE)>0
and Duel.IsExistingMatchingCard(c35699.sprfilter,tp,LOCATION_GRAVE,0,3,nil)
end
function c35699.sprop(e,tp,eg,ep,ev,re,r,rp,c)
function c35699.sprtg(e,tp,eg,ep,ev,re,r,rp,chk,c)
local g=Duel.GetMatchingGroup(c35699.sprfilter,tp,LOCATION_GRAVE,0,nil)
Duel.Hint(HINT_SELECTMSG,tp,HINTMSG_REMOVE)
local g=Duel.SelectMatchingCard(tp,c35699.sprfilter,tp,LOCATION_GRAVE,0,3,3,nil)
Duel.Remove(g,POS_FACEUP,REASON_COST)
local sg=g:CancelableSelect(tp,3,3,nil)
if sg then
sg:KeepAlive()
e:SetLabelObject(sg)
return true
else return false end
end
function c35699.sprop(e,tp,eg,ep,ev,re,r,rp,c)
local g=e:GetLabelObject()
Duel.Remove(g,POS_FACEUP,REASON_SPSUMMON)
g:DeleteGroup()
end
function c35699.desfilter(c)
return c:IsFaceup() and c:IsSetCard(0xee)
......
......@@ -16,6 +16,7 @@ function c35803249.initial_effect(c)
e2:SetProperty(EFFECT_FLAG_CANNOT_DISABLE+EFFECT_FLAG_UNCOPYABLE)
e2:SetRange(LOCATION_HAND)
e2:SetCondition(c35803249.spcon)
e2:SetTarget(c35803249.sptg)
e2:SetOperation(c35803249.spop)
c:RegisterEffect(e2)
--cannot trigger
......@@ -77,10 +78,18 @@ function c35803249.spcon(e,c)
if c==nil then return true end
return Duel.IsExistingMatchingCard(c35803249.spfilter,c:GetControler(),LOCATION_MZONE,0,1,nil,c:GetControler())
end
function c35803249.spop(e,tp,eg,ep,ev,re,r,rp,c)
function c35803249.sptg(e,tp,eg,ep,ev,re,r,rp,chk,c)
local g=Duel.GetMatchingGroup(c35803249.spfilter,tp,LOCATION_MZONE,0,nil,tp)
Duel.Hint(HINT_SELECTMSG,tp,HINTMSG_TOGRAVE)
local g=Duel.SelectMatchingCard(tp,c35803249.spfilter,tp,LOCATION_MZONE,0,1,1,nil,tp)
Duel.SendtoGrave(g,REASON_COST)
local tc=g:SelectUnselect(nil,tp,false,true,1,1)
if tc then
e:SetLabelObject(tc)
return true
else return false end
end
function c35803249.spop(e,tp,eg,ep,ev,re,r,rp,c)
local g=e:GetLabelObject()
Duel.SendtoGrave(g,REASON_SPSUMMON)
end
function c35803249.filter(c)
return c:IsFaceup() and c:IsType(TYPE_TRAP)
......
......@@ -62,7 +62,7 @@ function c36322312.sprtg(e,tp,eg,ep,ev,re,r,rp,chk,c)
end
function c36322312.sprop(e,tp,eg,ep,ev,re,r,rp,c)
local g=e:GetLabelObject()
Duel.SendtoGrave(g,REASON_COST)
Duel.SendtoGrave(g,REASON_SPSUMMON)
g:DeleteGroup()
end
function c36322312.indfilter(c)
......
......@@ -10,6 +10,7 @@ function c36521459.initial_effect(c)
e1:SetProperty(EFFECT_FLAG_CANNOT_DISABLE+EFFECT_FLAG_UNCOPYABLE)
e1:SetRange(LOCATION_HAND)
e1:SetCondition(c36521459.spcon)
e1:SetTarget(c36521459.sptg)
e1:SetOperation(c36521459.spop)
c:RegisterEffect(e1)
--selfdes
......@@ -65,20 +66,28 @@ function c36521459.spcon(e,c)
local b2=Duel.IsExistingMatchingCard(c36521459.spfilter2,tp,LOCATION_MZONE+LOCATION_GRAVE,0,1,nil,tp)
return b1 or b2
end
function c36521459.spop(e,tp,eg,ep,ev,re,r,rp,c)
local b1=Duel.GetLocationCount(tp,LOCATION_MZONE)>0
and Duel.IsExistingMatchingCard(c36521459.spfilter,tp,LOCATION_EXTRA,0,1,nil)
local b2=Duel.IsExistingMatchingCard(c36521459.spfilter2,tp,LOCATION_MZONE+LOCATION_GRAVE,0,1,nil,tp)
if b2 and (not b1 or Duel.SelectYesNo(tp,aux.Stringid(48829461,0))) then
Duel.Hint(HINT_SELECTMSG,tp,HINTMSG_REMOVE)
local tg=Duel.SelectMatchingCard(tp,c36521459.spfilter2,tp,LOCATION_MZONE+LOCATION_GRAVE,0,1,1,nil,tp)
local te=tg:GetFirst():IsHasEffect(48829461,tp)
te:UseCountLimit(tp)
Duel.Remove(tg,POS_FACEUP,REASON_COST)
else
local tc=Duel.GetFirstMatchingCard(c36521459.spfilter,tp,LOCATION_EXTRA,0,nil)
Duel.Remove(tc,POS_FACEUP,REASON_COST)
function c36521459.sptg(e,tp,eg,ep,ev,re,r,rp,chk,c)
local g=Group.CreateGroup()
if Duel.GetLocationCount(tp,LOCATION_MZONE)>0 then
local g1=Duel.GetMatchingGroup(c36521459.spfilter,tp,LOCATION_EXTRA,0,nil)
g1:Merge(g)
end
local g2=Duel.GetMatchingGroup(c36521459.spfilter2,tp,LOCATION_MZONE+LOCATION_GRAVE,0,nil,tp)
g:Merge(g2)
Duel.Hint(HINT_SELECTMSG,tp,HINTMSG_REMOVE)
local tc=g:SelectUnselect(nil,tp,false,true,1,1)
if tc then
e:SetLabelObject(tc)
if g2:IsContains(tc) then
local te=tc:IsHasEffect(48829461,tp)
te:UseCountLimit(tp)
end
return true
else return false end
end
function c36521459.spop(e,tp,eg,ep,ev,re,r,rp,c)
local tc=e:GetLabelObject()
Duel.Remove(tc,POS_FACEUP,REASON_SPSUMMON)
end
function c36521459.descon(e)
return not Duel.IsExistingMatchingCard(Card.IsFaceup,0,LOCATION_FZONE,LOCATION_FZONE,1,nil)
......
......@@ -9,6 +9,7 @@ function c36956512.initial_effect(c)
e1:SetProperty(EFFECT_FLAG_UNCOPYABLE+EFFECT_FLAG_SPSUM_PARAM)
e1:SetTargetRange(POS_FACEUP_ATTACK,1)
e1:SetCondition(c36956512.spcon)
e1:SetTarget(c36956512.sptg)
e1:SetOperation(c36956512.spop)
c:RegisterEffect(e1)
local e2=Effect.CreateEffect(c)
......@@ -43,9 +44,17 @@ function c36956512.spcon(e,c)
local tp=c:GetControler()
return Duel.IsExistingMatchingCard(c36956512.spfilter,tp,0,LOCATION_MZONE,1,nil,tp)
end
function c36956512.spop(e,tp,eg,ep,ev,re,r,rp,c)
function c36956512.sptg(e,tp,eg,ep,ev,re,r,rp,chk,c)
local g=Duel.GetMatchingGroup(c36956512.spfilter,tp,0,LOCATION_MZONE,nil,tp)
Duel.Hint(HINT_SELECTMSG,tp,HINTMSG_RELEASE)
local g=Duel.SelectMatchingCard(tp,c36956512.spfilter,tp,0,LOCATION_MZONE,1,1,nil,tp)
local tc=g:SelectUnselect(nil,tp,false,true,1,1)
if tc then
e:SetLabelObject(tc)
return true
else return false end
end
function c36956512.spop(e,tp,eg,ep,ev,re,r,rp,c)
local g=e:GetLabelObject()
Duel.Release(g,REASON_SPSUMMON)
end
function c36956512.cfilter(c)
......
......@@ -17,6 +17,7 @@ function c37440988.initial_effect(c)
e2:SetCode(EFFECT_SPSUMMON_PROC)
e2:SetRange(LOCATION_EXTRA)
e2:SetCondition(c37440988.hspcon)
e2:SetTarget(c37440988.hsptg)
e2:SetOperation(c37440988.hspop)
c:RegisterEffect(e2)
--atk up
......@@ -50,10 +51,19 @@ function c37440988.hspcon(e,c)
if c==nil then return true end
return Duel.CheckReleaseGroupEx(c:GetControler(),c37440988.hspfilter,1,REASON_SPSUMMON,false,nil,c:GetControler(),c)
end
function c37440988.hsptg(e,tp,eg,ep,ev,re,r,rp,chk,c)
local g=Duel.GetReleaseGroup(tp,false,REASON_SPSUMMON):Filter(c37440988.hspfilter,nil,tp,c)
Duel.Hint(HINT_SELECTMSG,tp,HINTMSG_RELEASE)
local tc=g:SelectUnselect(nil,tp,false,true,1,1)
if tc then
e:SetLabelObject(tc)
return true
else return false end
end
function c37440988.hspop(e,tp,eg,ep,ev,re,r,rp,c)
local g=Duel.SelectReleaseGroupEx(tp,c37440988.hspfilter,1,1,REASON_SPSUMMON,false,nil,tp,c)
c:SetMaterial(g)
Duel.Release(g,REASON_SPSUMMON)
local tc=e:GetLabelObject()
c:SetMaterial(Group.FromCards(tc))
Duel.Release(tc,REASON_SPSUMMON)
end
function c37440988.cfilter(c)
return c:IsSetCard(0x1034) and c:GetAttack()>0 and c:IsAbleToRemoveAsCost()
......
......@@ -17,6 +17,7 @@ function c37542782.initial_effect(c)
e2:SetCode(EFFECT_SPSUMMON_PROC)
e2:SetRange(LOCATION_EXTRA)
e2:SetCondition(c37542782.hspcon)
e2:SetTarget(c37542782.hsptg)
e2:SetOperation(c37542782.hspop)
c:RegisterEffect(e2)
--immune
......@@ -56,10 +57,19 @@ function c37542782.hspcon(e,c)
if c==nil then return true end
return Duel.CheckReleaseGroupEx(c:GetControler(),c37542782.hspfilter,1,REASON_SPSUMMON,false,nil,c:GetControler(),c)
end
function c37542782.hsptg(e,tp,eg,ep,ev,re,r,rp,chk,c)
local g=Duel.GetReleaseGroup(tp,false,REASON_SPSUMMON):Filter(c37542782.hspfilter,nil,tp,c)
Duel.Hint(HINT_SELECTMSG,tp,HINTMSG_RELEASE)
local tc=g:SelectUnselect(nil,tp,false,true,1,1)
if tc then
e:SetLabelObject(tc)
return true
else return false end
end
function c37542782.hspop(e,tp,eg,ep,ev,re,r,rp,c)
local g=Duel.SelectReleaseGroupEx(tp,c37542782.hspfilter,1,1,REASON_SPSUMMON,false,nil,tp,c)
c:SetMaterial(g)
Duel.Release(g,REASON_SPSUMMON)
local tc=e:GetLabelObject()
c:SetMaterial(Group.FromCards(tc))
Duel.Release(tc,REASON_SPSUMMON)
end
function c37542782.efilter(e,re)
return e:GetHandlerPlayer()~=re:GetOwnerPlayer() and re:IsActivated()
......
......@@ -15,6 +15,7 @@ function c38280762.initial_effect(c)
e2:SetProperty(EFFECT_FLAG_CANNOT_DISABLE+EFFECT_FLAG_UNCOPYABLE)
e2:SetRange(LOCATION_HAND)
e2:SetCondition(c38280762.spcon)
e2:SetTarget(c38280762.sptg)
e2:SetOperation(c38280762.spop)
c:RegisterEffect(e2)
--destroy
......@@ -39,10 +40,20 @@ function c38280762.spcon(e,c)
return Duel.GetLocationCount(tp,LOCATION_MZONE)>0
and Duel.IsExistingMatchingCard(c38280762.spfilter,tp,LOCATION_GRAVE,0,2,nil)
end
function c38280762.spop(e,tp,eg,ep,ev,re,r,rp,c)
function c38280762.sptg(e,tp,eg,ep,ev,re,r,rp,chk,c)
local g=Duel.GetMatchingGroup(c38280762.spfilter,tp,LOCATION_GRAVE,0,nil)
Duel.Hint(HINT_SELECTMSG,tp,HINTMSG_REMOVE)
local g=Duel.SelectMatchingCard(tp,c38280762.spfilter,tp,LOCATION_GRAVE,0,2,2,nil)
Duel.Remove(g,POS_FACEUP,REASON_COST)
local sg=g:CancelableSelect(tp,2,2,nil)
if sg then
sg:KeepAlive()
e:SetLabelObject(sg)
return true
else return false end
end
function c38280762.spop(e,tp,eg,ep,ev,re,r,rp,c)
local g=e:GetLabelObject()
Duel.Remove(g,POS_FACEUP,REASON_SPSUMMON)
g:DeleteGroup()
end
function c38280762.descost(e,tp,eg,ep,ev,re,r,rp,chk)
if chk==0 then return e:GetHandler():GetAttackAnnouncedCount()==0 end
......
......@@ -9,6 +9,7 @@ function c38517737.initial_effect(c)
e1:SetRange(LOCATION_HAND)
e1:SetCountLimit(1,38517737+EFFECT_COUNT_CODE_OATH)
e1:SetCondition(c38517737.spcon)
e1:SetTarget(c38517737.sptg)
e1:SetOperation(c38517737.spop)
c:RegisterEffect(e1)
--code
......@@ -35,9 +36,17 @@ function c38517737.spcon(e,c)
return Duel.GetLocationCount(tp,LOCATION_MZONE)>0
and Duel.IsExistingMatchingCard(c38517737.spcfilter,tp,LOCATION_HAND,0,1,nil)
end
function c38517737.spop(e,tp,eg,ep,ev,re,r,rp,c)
function c38517737.sptg(e,tp,eg,ep,ev,re,r,rp,chk,c)
local g=Duel.GetMatchingGroup(c38517737.spcfilter,tp,LOCATION_HAND,0,nil)
Duel.Hint(HINT_SELECTMSG,tp,HINTMSG_CONFIRM)
local g=Duel.SelectMatchingCard(tp,c38517737.spcfilter,tp,LOCATION_HAND,0,1,1,nil)
local tc=g:SelectUnselect(nil,tp,false,true,1,1)
if tc then
e:SetLabelObject(tc)
return true
else return false end
end
function c38517737.spop(e,tp,eg,ep,ev,re,r,rp,c)
local g=e:GetLabelObject()
Duel.ConfirmCards(1-tp,g)
Duel.ShuffleHand(tp)
end
......
......@@ -8,6 +8,7 @@ function c38837163.initial_effect(c)
e1:SetProperty(EFFECT_FLAG_CANNOT_DISABLE+EFFECT_FLAG_UNCOPYABLE)
e1:SetRange(LOCATION_HAND)
e1:SetCondition(c38837163.spcon)
e1:SetTarget(c38837163.sptg)
e1:SetOperation(c38837163.spop)
c:RegisterEffect(e1)
--effect
......@@ -30,10 +31,20 @@ function c38837163.spcon(e,c)
return Duel.GetLocationCount(tp,LOCATION_MZONE)>0
and Duel.IsExistingMatchingCard(c38837163.spfilter,tp,LOCATION_GRAVE,0,2,nil)
end
function c38837163.spop(e,tp,eg,ep,ev,re,r,rp,c)
function c38837163.sptg(e,tp,eg,ep,ev,re,r,rp,chk,c)
local g=Duel.GetMatchingGroup(c38837163.spfilter,tp,LOCATION_GRAVE,0,nil)
Duel.Hint(HINT_SELECTMSG,tp,HINTMSG_REMOVE)
local g=Duel.SelectMatchingCard(tp,c38837163.spfilter,tp,LOCATION_GRAVE,0,2,2,nil)
Duel.Remove(g,POS_FACEUP,REASON_COST)
local sg=g:CancelableSelect(tp,2,2,nil)
if sg then
sg:KeepAlive()
e:SetLabelObject(sg)
return true
else return false end
end
function c38837163.spop(e,tp,eg,ep,ev,re,r,rp,c)
local g=e:GetLabelObject()
Duel.Remove(g,POS_FACEUP,REASON_SPSUMMON)
g:DeleteGroup()
end
function c38837163.cfilter(c)
return c:IsRace(RACE_BEASTWARRIOR) and c:IsDiscardable()
......
......@@ -8,6 +8,7 @@ function c39284521.initial_effect(c)
e1:SetProperty(EFFECT_FLAG_CANNOT_DISABLE+EFFECT_FLAG_UNCOPYABLE)
e1:SetRange(LOCATION_HAND)
e1:SetCondition(c39284521.spcon)
e1:SetTarget(c39284521.sptg)
e1:SetOperation(c39284521.spop)
c:RegisterEffect(e1)
end
......@@ -19,14 +20,24 @@ function c39284521.spcon(e,c)
return Duel.GetLocationCount(c:GetControler(),LOCATION_MZONE)>0
and Duel.IsExistingMatchingCard(c39284521.spfilter,c:GetControler(),LOCATION_HAND,0,1,c)
end
function c39284521.spop(e,tp,eg,ep,ev,re,r,rp,c)
function c39284521.sptg(e,tp,eg,ep,ev,re,r,rp,chk,c)
local g=Duel.GetMatchingGroup(c39284521.spfilter,tp,LOCATION_HAND,0,c)
Duel.Hint(HINT_SELECTMSG,tp,HINTMSG_TOGRAVE)
local g=Duel.SelectMatchingCard(tp,c39284521.spfilter,c:GetControler(),LOCATION_HAND,0,1,63,c)
Duel.SendtoGrave(g,REASON_COST)
local sg=g:CancelableSelect(tp,1,g:GetCount(),nil)
if sg then
sg:KeepAlive()
e:SetLabelObject(sg)
return true
else return false end
end
function c39284521.spop(e,tp,eg,ep,ev,re,r,rp,c)
local g=e:GetLabelObject()
Duel.SendtoGrave(g,REASON_SPSUMMON)
local e1=Effect.CreateEffect(c)
e1:SetType(EFFECT_TYPE_SINGLE)
e1:SetCode(EFFECT_UPDATE_ATTACK)
e1:SetValue(g:GetCount()*800)
e1:SetReset(RESET_EVENT+0xff0000)
c:RegisterEffect(e1)
g:DeleteGroup()
end
......@@ -52,7 +52,7 @@ function c40542825.sptg(e,tp,eg,ep,ev,re,r,rp,chk,c)
end
function c40542825.spop(e,tp,eg,ep,ev,re,r,rp,c)
local g=e:GetLabelObject()
Duel.SendtoGrave(g,REASON_COST)
Duel.SendtoGrave(g,REASON_SPSUMMON)
g:DeleteGroup()
end
function c40542825.thfilter(c)
......
......@@ -59,7 +59,7 @@ function c4068622.sptg(e,tp,eg,ep,ev,re,r,rp,chk,c)
end
function c4068622.spop(e,tp,eg,ep,ev,re,r,rp,c)
local g=e:GetLabelObject()
Duel.Remove(g,POS_FACEUP,REASON_COST)
Duel.Remove(g,POS_FACEUP,REASON_SPSUMMON)
g:DeleteGroup()
end
function c4068622.filter(c)
......
This diff is collapsed.
This diff is collapsed.
This diff is collapsed.
This diff is collapsed.
This diff is collapsed.
This diff is collapsed.
This diff is collapsed.
This diff is collapsed.
This diff is collapsed.
This diff is collapsed.
This diff is collapsed.
This diff is collapsed.
This diff is collapsed.
This diff is collapsed.
This diff is collapsed.
This diff is collapsed.
This diff is collapsed.
This diff is collapsed.
This diff is collapsed.
This diff is collapsed.
This diff is collapsed.
This diff is collapsed.
This diff is collapsed.
This diff is collapsed.
This diff is collapsed.
This diff is collapsed.
This diff is collapsed.
This diff is collapsed.
This diff is collapsed.
This diff is collapsed.
This diff is collapsed.
This diff is collapsed.
This diff is collapsed.
This diff is collapsed.
This diff is collapsed.
This diff is collapsed.
This diff is collapsed.
This diff is collapsed.
This diff is collapsed.
This diff is collapsed.
This diff is collapsed.
This diff is collapsed.
This diff is collapsed.
This diff is collapsed.
This diff is collapsed.
This diff is collapsed.
This diff is collapsed.
This diff is collapsed.
This diff is collapsed.
This diff is collapsed.
This diff is collapsed.
This diff is collapsed.
This diff is collapsed.
This diff is collapsed.
This diff is collapsed.
This diff is collapsed.
This diff is collapsed.
This diff is collapsed.
This diff is collapsed.
This diff is collapsed.
This diff is collapsed.
This diff is collapsed.
This diff is collapsed.
This diff is collapsed.
This diff is collapsed.
This diff is collapsed.
This diff is collapsed.
This diff is collapsed.
This diff is collapsed.
This diff is collapsed.
This diff is collapsed.
This diff is collapsed.
This diff is collapsed.
This diff is collapsed.
This diff is collapsed.
This diff is collapsed.
This diff is collapsed.
This diff is collapsed.
This diff is collapsed.
This diff is collapsed.
This diff is collapsed.
This diff is collapsed.
This diff is collapsed.
This diff is collapsed.
This diff is collapsed.
This diff is collapsed.
This diff is collapsed.
This diff is collapsed.
This diff is collapsed.
This diff is collapsed.
This diff is collapsed.
This diff is collapsed.
This diff is collapsed.
This diff is collapsed.
This diff is collapsed.
This diff is collapsed.
This diff is collapsed.
This diff is collapsed.
This diff is collapsed.
This diff is collapsed.
This diff is collapsed.
This diff is collapsed.
This diff is collapsed.
This diff is collapsed.
This diff is collapsed.
This diff is collapsed.
This diff is collapsed.
This diff is collapsed.
This diff is collapsed.
This diff is collapsed.
This diff is collapsed.
This diff is collapsed.
This diff is collapsed.
This diff is collapsed.
This diff is collapsed.
This diff is collapsed.
This diff is collapsed.
This diff is collapsed.
This diff is collapsed.
This diff is collapsed.
This diff is collapsed.
This diff is collapsed.
This diff is collapsed.
This diff is collapsed.
This diff is collapsed.
This diff is collapsed.
This diff is collapsed.
This diff is collapsed.
This diff is collapsed.
This diff is collapsed.
This diff is collapsed.
This diff is collapsed.
This diff is collapsed.
This diff is collapsed.
This diff is collapsed.
This diff is collapsed.
This diff is collapsed.
This diff is collapsed.
This diff is collapsed.
This diff is collapsed.
This diff is collapsed.
This diff is collapsed.
This diff is collapsed.
This diff is collapsed.
This diff is collapsed.
This diff is collapsed.
This diff is collapsed.
This diff is collapsed.
This diff is collapsed.
This diff is collapsed.
This diff is collapsed.
This diff is collapsed.
This diff is collapsed.
This diff is collapsed.
This diff is collapsed.
This diff is collapsed.
This diff is collapsed.
This diff is collapsed.
This diff is collapsed.
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