Commit 68b30b56 authored by mercury233's avatar mercury233

add card BODE-JP066

parent 31147a4c
--竜輝巧-ルタδ --竜輝巧-ルタδ
function c22420202.initial_effect(c) function c22420202.initial_effect(c)
--spsummon condition --spsummon condition
local e1=Effect.CreateEffect(c) local e1=Effect.CreateEffect(c)
e1:SetType(EFFECT_TYPE_SINGLE) e1:SetType(EFFECT_TYPE_SINGLE)
e1:SetProperty(EFFECT_FLAG_CANNOT_DISABLE+EFFECT_FLAG_UNCOPYABLE) e1:SetProperty(EFFECT_FLAG_CANNOT_DISABLE+EFFECT_FLAG_UNCOPYABLE)
e1:SetCode(EFFECT_SPSUMMON_CONDITION) e1:SetCode(EFFECT_SPSUMMON_CONDITION)
e1:SetValue(c22420202.splimit) e1:SetValue(c22420202.splimit)
c:RegisterEffect(e1) c:RegisterEffect(e1)
--spsummon --spsummon
local e2=Effect.CreateEffect(c) local e2=aux.AddDrytronSpSummonEffect(c,c22420202.extraop)
e2:SetDescription(aux.Stringid(22420202,0)) e2:SetDescription(aux.Stringid(22420202,0))
e2:SetCategory(CATEGORY_SPECIAL_SUMMON+CATEGORY_DRAW) e2:SetCountLimit(1,22420202)
e2:SetType(EFFECT_TYPE_IGNITION) end
e2:SetRange(LOCATION_HAND+LOCATION_GRAVE) function c22420202.splimit(e,se,sp,st)
e2:SetCountLimit(1,22420202) return se:GetHandler():IsSetCard(0x154)
e2:SetCost(c22420202.spcost) end
e2:SetTarget(c22420202.sptg) function c22420202.drfilter(c)
e2:SetOperation(c22420202.spop) return c:IsType(TYPE_RITUAL) and c:IsType(TYPE_MONSTER+TYPE_SPELL) and not c:IsPublic()
c:RegisterEffect(e2) end
Duel.AddCustomActivityCounter(22420202,ACTIVITY_SPSUMMON,c22420202.counterfilter) function c22420202.extraop(e,tp)
end local g=Duel.GetMatchingGroup(c22420202.drfilter,tp,LOCATION_HAND,0,nil)
function c22420202.splimit(e,se,sp,st) if g:GetCount()>0 and Duel.SelectYesNo(tp,aux.Stringid(22420202,1)) then
return se:GetHandler():IsSetCard(0x154) Duel.BreakEffect()
end Duel.Hint(HINT_SELECTMSG,tp,HINTMSG_CONFIRM)
function c22420202.counterfilter(c) local sg=g:Select(tp,1,1,nil)
return not c:IsSummonableCard() Duel.ConfirmCards(1-tp,sg)
end Duel.ShuffleHand(tp)
function c22420202.costfilter(c,tp) Duel.Draw(tp,1,REASON_EFFECT)
return (c:IsSetCard(0x154) or c:IsType(TYPE_RITUAL)) and c:IsType(TYPE_MONSTER) and Duel.GetMZoneCount(tp,c)>0 end
and (c:IsControler(tp) or c:IsFaceup()) end
end
function c22420202.spcost(e,tp,eg,ep,ev,re,r,rp,chk)
e:SetLabel(100)
if chk==0 then return Duel.GetCustomActivityCount(22420202,tp,ACTIVITY_SPSUMMON)==0
and Duel.CheckReleaseGroupEx(tp,c22420202.costfilter,1,e:GetHandler(),tp) end
local e1=Effect.CreateEffect(e:GetHandler())
e1:SetType(EFFECT_TYPE_FIELD)
e1:SetCode(EFFECT_CANNOT_SPECIAL_SUMMON)
e1:SetProperty(EFFECT_FLAG_PLAYER_TARGET+EFFECT_FLAG_OATH)
e1:SetTargetRange(1,0)
e1:SetTarget(c22420202.splimit2)
e1:SetReset(RESET_PHASE+PHASE_END)
Duel.RegisterEffect(e1,tp)
--cant special summon summonable card check
local e2=Effect.CreateEffect(e:GetHandler())
e2:SetType(EFFECT_TYPE_FIELD)
e2:SetCode(97148796)
e2:SetProperty(EFFECT_FLAG_PLAYER_TARGET+EFFECT_FLAG_OATH)
e2:SetTargetRange(1,0)
e2:SetReset(RESET_PHASE+PHASE_END)
Duel.RegisterEffect(e2,tp)
Duel.Hint(HINT_SELECTMSG,tp,HINTMSG_RELEASE)
local g=Duel.SelectReleaseGroupEx(tp,c22420202.costfilter,1,1,e:GetHandler(),tp)
Duel.Release(g,REASON_COST)
end
function c22420202.splimit2(e,c,sump,sumtype,sumpos,targetp,se)
return c:IsSummonableCard()
end
function c22420202.sptg(e,tp,eg,ep,ev,re,r,rp,chk)
local res=e:GetLabel()==100 or Duel.GetLocationCount(tp,LOCATION_MZONE)>0
if chk==0 then
e:SetLabel(0)
return res and e:GetHandler():IsCanBeSpecialSummoned(e,0,tp,false,false,POS_FACEUP_DEFENSE)
end
e:SetLabel(0)
Duel.SetOperationInfo(0,CATEGORY_SPECIAL_SUMMON,e:GetHandler(),1,0,0)
end
function c22420202.drfilter(c)
return c:IsType(TYPE_RITUAL) and c:IsType(TYPE_MONSTER+TYPE_SPELL) and not c:IsPublic()
end
function c22420202.spop(e,tp,eg,ep,ev,re,r,rp)
local c=e:GetHandler()
if c:IsRelateToEffect(e) and Duel.SpecialSummon(c,0,tp,tp,false,false,POS_FACEUP_DEFENSE)~=0
and Duel.IsExistingMatchingCard(c22420202.drfilter,tp,LOCATION_HAND,0,1,nil)
and Duel.IsPlayerCanDraw(tp,1) and Duel.SelectYesNo(tp,aux.Stringid(22420202,1)) then
Duel.BreakEffect()
Duel.Hint(HINT_SELECTMSG,tp,HINTMSG_CONFIRM)
local g=Duel.SelectMatchingCard(tp,c22420202.drfilter,tp,LOCATION_HAND,0,1,1,nil)
Duel.ConfirmCards(1-tp,g)
Duel.ShuffleHand(tp)
Duel.Draw(tp,1,REASON_EFFECT)
end
end
--竜輝巧-ラスβ --竜輝巧-ラスβ
function c33543890.initial_effect(c) function c33543890.initial_effect(c)
--spsummon condition --spsummon condition
local e1=Effect.CreateEffect(c) local e1=Effect.CreateEffect(c)
e1:SetType(EFFECT_TYPE_SINGLE) e1:SetType(EFFECT_TYPE_SINGLE)
e1:SetProperty(EFFECT_FLAG_CANNOT_DISABLE+EFFECT_FLAG_UNCOPYABLE) e1:SetProperty(EFFECT_FLAG_CANNOT_DISABLE+EFFECT_FLAG_UNCOPYABLE)
e1:SetCode(EFFECT_SPSUMMON_CONDITION) e1:SetCode(EFFECT_SPSUMMON_CONDITION)
e1:SetValue(c33543890.splimit) e1:SetValue(c33543890.splimit)
c:RegisterEffect(e1) c:RegisterEffect(e1)
--spsummon --spsummon
local e2=Effect.CreateEffect(c) local e2=aux.AddDrytronSpSummonEffect(c,c33543890.extraop)
e2:SetDescription(aux.Stringid(33543890,0)) e2:SetDescription(aux.Stringid(33543890,0))
e2:SetCategory(CATEGORY_SPECIAL_SUMMON+CATEGORY_TOGRAVE) e2:SetCountLimit(1,33543890)
e2:SetType(EFFECT_TYPE_IGNITION) end
e2:SetRange(LOCATION_HAND+LOCATION_GRAVE) function c33543890.splimit(e,se,sp,st)
e2:SetCountLimit(1,33543890) return se:GetHandler():IsSetCard(0x154)
e2:SetCost(c33543890.spcost) end
e2:SetTarget(c33543890.sptg) function c33543890.tgfilter(c)
e2:SetOperation(c33543890.spop) return c:IsFaceup() and c:IsSetCard(0x154) and c:IsType(TYPE_MONSTER)
c:RegisterEffect(e2) end
Duel.AddCustomActivityCounter(33543890,ACTIVITY_SPSUMMON,c33543890.counterfilter) function c33543890.extraop(e,tp)
end local g=Duel.GetMatchingGroup(c33543890.tgfilter,tp,LOCATION_REMOVED,0,nil)
function c33543890.splimit(e,se,sp,st) if g:GetCount()>0 and Duel.SelectYesNo(tp,aux.Stringid(33543890,1)) then
return se:GetHandler():IsSetCard(0x154) Duel.BreakEffect()
end Duel.Hint(HINT_SELECTMSG,tp,HINTMSG_TOGRAVE)
function c33543890.counterfilter(c) local sg=g:Select(tp,1,1,nil)
return not c:IsSummonableCard() Duel.SendtoGrave(sg,REASON_EFFECT+REASON_RETURN)
end end
function c33543890.costfilter(c,tp) end
return (c:IsSetCard(0x154) or c:IsType(TYPE_RITUAL)) and c:IsType(TYPE_MONSTER) and Duel.GetMZoneCount(tp,c)>0
and (c:IsControler(tp) or c:IsFaceup())
end
function c33543890.spcost(e,tp,eg,ep,ev,re,r,rp,chk)
e:SetLabel(100)
if chk==0 then return Duel.GetCustomActivityCount(33543890,tp,ACTIVITY_SPSUMMON)==0
and Duel.CheckReleaseGroupEx(tp,c33543890.costfilter,1,e:GetHandler(),tp) end
local e1=Effect.CreateEffect(e:GetHandler())
e1:SetType(EFFECT_TYPE_FIELD)
e1:SetCode(EFFECT_CANNOT_SPECIAL_SUMMON)
e1:SetProperty(EFFECT_FLAG_PLAYER_TARGET+EFFECT_FLAG_OATH)
e1:SetTargetRange(1,0)
e1:SetTarget(c33543890.splimit2)
e1:SetReset(RESET_PHASE+PHASE_END)
Duel.RegisterEffect(e1,tp)
--cant special summon summonable card check
local e2=Effect.CreateEffect(e:GetHandler())
e2:SetType(EFFECT_TYPE_FIELD)
e2:SetCode(97148796)
e2:SetProperty(EFFECT_FLAG_PLAYER_TARGET+EFFECT_FLAG_OATH)
e2:SetTargetRange(1,0)
e2:SetReset(RESET_PHASE+PHASE_END)
Duel.RegisterEffect(e2,tp)
Duel.Hint(HINT_SELECTMSG,tp,HINTMSG_RELEASE)
local g=Duel.SelectReleaseGroupEx(tp,c33543890.costfilter,1,1,e:GetHandler(),tp)
Duel.Release(g,REASON_COST)
end
function c33543890.splimit2(e,c,sump,sumtype,sumpos,targetp,se)
return c:IsSummonableCard()
end
function c33543890.sptg(e,tp,eg,ep,ev,re,r,rp,chk)
local res=e:GetLabel()==100 or Duel.GetLocationCount(tp,LOCATION_MZONE)>0
if chk==0 then
e:SetLabel(0)
return res and e:GetHandler():IsCanBeSpecialSummoned(e,0,tp,false,false,POS_FACEUP_DEFENSE)
end
e:SetLabel(0)
Duel.SetOperationInfo(0,CATEGORY_SPECIAL_SUMMON,e:GetHandler(),1,0,0)
Duel.SetOperationInfo(0,CATEGORY_TOGRAVE,nil,0,tp,LOCATION_REMOVED)
end
function c33543890.tgfilter(c)
return c:IsFaceup() and c:IsSetCard(0x154) and c:IsType(TYPE_MONSTER)
end
function c33543890.spop(e,tp,eg,ep,ev,re,r,rp)
local c=e:GetHandler()
if c:IsRelateToEffect(e) and Duel.SpecialSummon(c,0,tp,tp,false,false,POS_FACEUP_DEFENSE)~=0
and Duel.IsExistingMatchingCard(c33543890.tgfilter,tp,LOCATION_REMOVED,0,1,nil)
and Duel.SelectYesNo(tp,aux.Stringid(33543890,1)) then
Duel.BreakEffect()
Duel.Hint(HINT_SELECTMSG,tp,HINTMSG_TOGRAVE)
local g=Duel.SelectMatchingCard(tp,c33543890.tgfilter,tp,LOCATION_REMOVED,0,1,1,nil)
Duel.SendtoGrave(g,REASON_EFFECT+REASON_RETURN)
end
end
--竜輝巧-エルγ --竜輝巧-エルγ
function c60037599.initial_effect(c) function c60037599.initial_effect(c)
--spsummon condition --spsummon condition
local e1=Effect.CreateEffect(c) local e1=Effect.CreateEffect(c)
e1:SetType(EFFECT_TYPE_SINGLE) e1:SetType(EFFECT_TYPE_SINGLE)
e1:SetProperty(EFFECT_FLAG_CANNOT_DISABLE+EFFECT_FLAG_UNCOPYABLE) e1:SetProperty(EFFECT_FLAG_CANNOT_DISABLE+EFFECT_FLAG_UNCOPYABLE)
e1:SetCode(EFFECT_SPSUMMON_CONDITION) e1:SetCode(EFFECT_SPSUMMON_CONDITION)
e1:SetValue(c60037599.splimit) e1:SetValue(c60037599.splimit)
c:RegisterEffect(e1) c:RegisterEffect(e1)
--spsummon --spsummon
local e2=Effect.CreateEffect(c) local e2=aux.AddDrytronSpSummonEffect(c,c60037599.extraop)
e2:SetDescription(aux.Stringid(60037599,0)) e2:SetDescription(aux.Stringid(60037599,0))
e2:SetCategory(CATEGORY_SPECIAL_SUMMON+CATEGORY_GRAVE_SPSUMMON) e2:SetCountLimit(1,60037599)
e2:SetType(EFFECT_TYPE_IGNITION) end
e2:SetRange(LOCATION_HAND+LOCATION_GRAVE) function c60037599.splimit(e,se,sp,st)
e2:SetCountLimit(1,60037599) return se:GetHandler():IsSetCard(0x154)
e2:SetCost(c60037599.spcost) end
e2:SetTarget(c60037599.sptg) function c60037599.rbfilter(c,e,tp)
e2:SetOperation(c60037599.spop) return c:IsSetCard(0x154) and c:IsAttack(2000) and not c:IsCode(60037599) and c:IsCanBeSpecialSummoned(e,0,tp,false,false)
c:RegisterEffect(e2) end
Duel.AddCustomActivityCounter(60037599,ACTIVITY_SPSUMMON,c60037599.counterfilter) function c60037599.extraop(e,tp)
end local g=Duel.GetMatchingGroup(aux.NecroValleyFilter(c60037599.rbfilter),tp,LOCATION_GRAVE,0,nil,e,tp)
function c60037599.splimit(e,se,sp,st) if g:GetCount()>0 and Duel.SelectYesNo(tp,aux.Stringid(60037599,1)) then
return se:GetHandler():IsSetCard(0x154) Duel.BreakEffect()
end Duel.Hint(HINT_SELECTMSG,tp,HINTMSG_SPSUMMON)
function c60037599.counterfilter(c) local sg=g:Select(tp,1,1,nil)
return not c:IsSummonableCard() Duel.SpecialSummon(sg,0,tp,tp,false,false,POS_FACEUP)
end end
function c60037599.costfilter(c,tp) end
return (c:IsSetCard(0x154) or c:IsType(TYPE_RITUAL)) and c:IsType(TYPE_MONSTER) and Duel.GetMZoneCount(tp,c)>0
and (c:IsControler(tp) or c:IsFaceup())
end
function c60037599.spcost(e,tp,eg,ep,ev,re,r,rp,chk)
e:SetLabel(100)
if chk==0 then return Duel.GetCustomActivityCount(60037599,tp,ACTIVITY_SPSUMMON)==0
and Duel.CheckReleaseGroupEx(tp,c60037599.costfilter,1,e:GetHandler(),tp) end
local e1=Effect.CreateEffect(e:GetHandler())
e1:SetType(EFFECT_TYPE_FIELD)
e1:SetCode(EFFECT_CANNOT_SPECIAL_SUMMON)
e1:SetProperty(EFFECT_FLAG_PLAYER_TARGET+EFFECT_FLAG_OATH)
e1:SetTargetRange(1,0)
e1:SetTarget(c60037599.splimit2)
e1:SetReset(RESET_PHASE+PHASE_END)
Duel.RegisterEffect(e1,tp)
--cant special summon summonable card check
local e2=Effect.CreateEffect(e:GetHandler())
e2:SetType(EFFECT_TYPE_FIELD)
e2:SetCode(97148796)
e2:SetProperty(EFFECT_FLAG_PLAYER_TARGET+EFFECT_FLAG_OATH)
e2:SetTargetRange(1,0)
e2:SetReset(RESET_PHASE+PHASE_END)
Duel.RegisterEffect(e2,tp)
Duel.Hint(HINT_SELECTMSG,tp,HINTMSG_RELEASE)
local g=Duel.SelectReleaseGroupEx(tp,c60037599.costfilter,1,1,e:GetHandler(),tp)
Duel.Release(g,REASON_COST)
end
function c60037599.splimit2(e,c,sump,sumtype,sumpos,targetp,se)
return c:IsSummonableCard()
end
function c60037599.sptg(e,tp,eg,ep,ev,re,r,rp,chk)
local res=e:GetLabel()==100 or Duel.GetLocationCount(tp,LOCATION_MZONE)>0
if chk==0 then
e:SetLabel(0)
return res and e:GetHandler():IsCanBeSpecialSummoned(e,0,tp,false,false,POS_FACEUP_DEFENSE)
end
e:SetLabel(0)
Duel.SetOperationInfo(0,CATEGORY_SPECIAL_SUMMON,e:GetHandler(),1,0,0)
end
function c60037599.rbfilter(c,e,tp)
return c:IsSetCard(0x154) and c:IsAttack(2000) and not c:IsCode(60037599) and c:IsCanBeSpecialSummoned(e,0,tp,false,false)
end
function c60037599.spop(e,tp,eg,ep,ev,re,r,rp)
local c=e:GetHandler()
if c:IsRelateToEffect(e) and Duel.SpecialSummon(c,0,tp,tp,false,false,POS_FACEUP_DEFENSE)~=0
and Duel.IsExistingMatchingCard(aux.NecroValleyFilter(c60037599.rbfilter),tp,LOCATION_GRAVE,0,1,nil,e,tp)
and Duel.GetLocationCount(tp,LOCATION_MZONE)>0 and Duel.SelectYesNo(tp,aux.Stringid(60037599,1)) then
Duel.BreakEffect()
Duel.Hint(HINT_SELECTMSG,tp,HINTMSG_SPSUMMON)
local g=Duel.SelectMatchingCard(tp,aux.NecroValleyFilter(c60037599.rbfilter),tp,LOCATION_GRAVE,0,1,1,nil,e,tp)
Duel.SpecialSummon(g,0,tp,tp,false,false,POS_FACEUP)
end
end
--天斗輝巧極
function c89771220.initial_effect(c)
--Activate
local e1=Effect.CreateEffect(c)
e1:SetCategory(CATEGORY_SPECIAL_SUMMON+CATEGORY_REMOVE)
e1:SetType(EFFECT_TYPE_ACTIVATE)
e1:SetCode(EVENT_FREE_CHAIN)
e1:SetTarget(c89771220.target)
e1:SetOperation(c89771220.activate)
c:RegisterEffect(e1)
--replace
local e2=Effect.CreateEffect(c)
e2:SetType(EFFECT_TYPE_SINGLE)
e2:SetProperty(EFFECT_FLAG_SINGLE_RANGE)
e2:SetCode(89771220)
e2:SetRange(LOCATION_GRAVE)
e2:SetCountLimit(1,89771220)
c:RegisterEffect(e2)
local e3=e2:Clone()
e3:SetCode(16471775)
c:RegisterEffect(e3)
end
function c89771220.deckconfilter(c)
return c:IsCode(97148796,27693363) and c:IsFaceup()
end
function c89771220.deckcon(tp)
return Duel.IsExistingMatchingCard(c89771220.deckconfilter,tp,LOCATION_MZONE,0,1,nil)
end
function c89771220.cfilter(c)
return c:IsCode(89264428,58793369) and c:IsAbleToRemove()
end
function c89771220.fselect(g,e,tp)
return g:GetClassCount(Card.GetCode)==2 and g:FilterCount(Card.IsLocation,nil,LOCATION_DECK)<=1
and Duel.IsExistingMatchingCard(c89771220.spfilter,tp,LOCATION_EXTRA,0,1,nil,e,tp,g)
end
function c89771220.spfilter(c,e,tp,g)
return c:IsCode(33250142) and c:IsCanBeSpecialSummoned(e,0,tp,true,false)
and Duel.GetLocationCountFromEx(tp,tp,g,c)>0
end
function c89771220.target(e,tp,eg,ep,ev,re,r,rp,chk)
local loc=LOCATION_HAND+LOCATION_ONFIELD
if c89771220.deckcon(tp) then loc=loc|LOCATION_DECK end
local g=Duel.GetMatchingGroup(c89771220.cfilter,tp,loc,0,nil)
if chk==0 then return g:CheckSubGroup(c89771220.fselect,2,2,e,tp) end
Duel.SetOperationInfo(0,CATEGORY_REMOVE,nil,2,tp,LOCATION_HAND+LOCATION_ONFIELD+LOCATION_DECK)
Duel.SetOperationInfo(0,CATEGORY_SPECIAL_SUMMON,nil,1,tp,LOCATION_EXTRA)
end
function c89771220.activate(e,tp,eg,ep,ev,re,r,rp)
local loc=LOCATION_HAND+LOCATION_ONFIELD
if c89771220.deckcon(tp) then loc=loc|LOCATION_DECK end
local g=Duel.GetMatchingGroup(c89771220.cfilter,tp,loc,0,nil)
Duel.Hint(HINT_SELECTMSG,tp,HINTMSG_REMOVE)
local rg=g:SelectSubGroup(tp,c89771220.fselect,false,2,2,e,tp)
if rg and Duel.Remove(rg,POS_FACEUP,REASON_EFFECT)~=0 then
Duel.Hint(HINT_SELECTMSG,tp,HINTMSG_SPSUMMON)
local sg=Duel.SelectMatchingCard(tp,c89771220.spfilter,tp,LOCATION_EXTRA,0,1,1,nil,e,tp,nil)
if #sg>0 then
Duel.SpecialSummon(sg,0,tp,tp,true,false,POS_FACEUP)
end
end
end
--竜輝巧-アルζ --竜輝巧-アルζ
function c96026108.initial_effect(c) function c96026108.initial_effect(c)
--spsummon condition --spsummon condition
local e1=Effect.CreateEffect(c) local e1=Effect.CreateEffect(c)
e1:SetType(EFFECT_TYPE_SINGLE) e1:SetType(EFFECT_TYPE_SINGLE)
e1:SetProperty(EFFECT_FLAG_CANNOT_DISABLE+EFFECT_FLAG_UNCOPYABLE) e1:SetProperty(EFFECT_FLAG_CANNOT_DISABLE+EFFECT_FLAG_UNCOPYABLE)
e1:SetCode(EFFECT_SPSUMMON_CONDITION) e1:SetCode(EFFECT_SPSUMMON_CONDITION)
e1:SetValue(c96026108.splimit) e1:SetValue(c96026108.splimit)
c:RegisterEffect(e1) c:RegisterEffect(e1)
--spsummon --spsummon
local e2=Effect.CreateEffect(c) local e2=aux.AddDrytronSpSummonEffect(c,c96026108.extraop)
e2:SetDescription(aux.Stringid(96026108,0)) e2:SetDescription(aux.Stringid(96026108,0))
e2:SetCategory(CATEGORY_SPECIAL_SUMMON+CATEGORY_SEARCH) e2:SetCountLimit(1,96026108)
e2:SetType(EFFECT_TYPE_IGNITION) end
e2:SetRange(LOCATION_HAND+LOCATION_GRAVE) function c96026108.splimit(e,se,sp,st)
e2:SetCountLimit(1,96026108) return se:GetHandler():IsSetCard(0x154)
e2:SetCost(c96026108.spcost) end
e2:SetTarget(c96026108.sptg) function c96026108.thfilter(c)
e2:SetOperation(c96026108.spop) return c:IsType(TYPE_RITUAL) and c:IsType(TYPE_SPELL) and c:IsAbleToHand()
c:RegisterEffect(e2) end
Duel.AddCustomActivityCounter(96026108,ACTIVITY_SPSUMMON,c96026108.counterfilter) function c96026108.extraop(e,tp)
end local g=Duel.GetMatchingGroup(c96026108.thfilter,tp,LOCATION_DECK,0,nil)
function c96026108.splimit(e,se,sp,st) if g:GetCount()>0 and Duel.SelectYesNo(tp,aux.Stringid(96026108,1)) then
return se:GetHandler():IsSetCard(0x154) Duel.BreakEffect()
end Duel.Hint(HINT_SELECTMSG,tp,HINTMSG_ATOHAND)
function c96026108.counterfilter(c) local sg=g:Select(tp,1,1,nil)
return not c:IsSummonableCard() Duel.SendtoHand(sg,nil,REASON_EFFECT)
end Duel.ConfirmCards(1-tp,sg)
function c96026108.costfilter(c,tp) end
return (c:IsSetCard(0x154) or c:IsType(TYPE_RITUAL)) and c:IsType(TYPE_MONSTER) and Duel.GetMZoneCount(tp,c)>0 end
and (c:IsControler(tp) or c:IsFaceup())
end
function c96026108.spcost(e,tp,eg,ep,ev,re,r,rp,chk)
e:SetLabel(100)
if chk==0 then return Duel.GetCustomActivityCount(96026108,tp,ACTIVITY_SPSUMMON)==0
and Duel.CheckReleaseGroupEx(tp,c96026108.costfilter,1,e:GetHandler(),tp) end
local e1=Effect.CreateEffect(e:GetHandler())
e1:SetType(EFFECT_TYPE_FIELD)
e1:SetCode(EFFECT_CANNOT_SPECIAL_SUMMON)
e1:SetProperty(EFFECT_FLAG_PLAYER_TARGET+EFFECT_FLAG_OATH)
e1:SetTargetRange(1,0)
e1:SetTarget(c96026108.splimit2)
e1:SetReset(RESET_PHASE+PHASE_END)
Duel.RegisterEffect(e1,tp)
--cant special summon summonable card check
local e2=Effect.CreateEffect(e:GetHandler())
e2:SetType(EFFECT_TYPE_FIELD)
e2:SetCode(97148796)
e2:SetProperty(EFFECT_FLAG_PLAYER_TARGET+EFFECT_FLAG_OATH)
e2:SetTargetRange(1,0)
e2:SetReset(RESET_PHASE+PHASE_END)
Duel.RegisterEffect(e2,tp)
Duel.Hint(HINT_SELECTMSG,tp,HINTMSG_RELEASE)
local g=Duel.SelectReleaseGroupEx(tp,c96026108.costfilter,1,1,e:GetHandler(),tp)
Duel.Release(g,REASON_COST)
end
function c96026108.splimit2(e,c,sump,sumtype,sumpos,targetp,se)
return c:IsSummonableCard()
end
function c96026108.sptg(e,tp,eg,ep,ev,re,r,rp,chk)
local res=e:GetLabel()==100 or Duel.GetLocationCount(tp,LOCATION_MZONE)>0
if chk==0 then
e:SetLabel(0)
return res and e:GetHandler():IsCanBeSpecialSummoned(e,0,tp,false,false,POS_FACEUP_DEFENSE)
end
e:SetLabel(0)
Duel.SetOperationInfo(0,CATEGORY_SPECIAL_SUMMON,e:GetHandler(),1,0,0)
end
function c96026108.thfilter(c)
return c:IsType(TYPE_RITUAL) and c:IsType(TYPE_SPELL) and c:IsAbleToHand()
end
function c96026108.spop(e,tp,eg,ep,ev,re,r,rp)
local c=e:GetHandler()
if c:IsRelateToEffect(e) and Duel.SpecialSummon(c,0,tp,tp,false,false,POS_FACEUP_DEFENSE)~=0
and Duel.IsExistingMatchingCard(c96026108.thfilter,tp,LOCATION_DECK,0,1,nil)
and Duel.SelectYesNo(tp,aux.Stringid(96026108,1)) then
Duel.BreakEffect()
Duel.Hint(HINT_SELECTMSG,tp,HINTMSG_ATOHAND)
local g=Duel.SelectMatchingCard(tp,c96026108.thfilter,tp,LOCATION_DECK,0,1,1,nil)
Duel.SendtoHand(g,nil,REASON_EFFECT)
Duel.ConfirmCards(1-tp,g)
end
end
--竜輝巧-バンα --竜輝巧-バンα
function c97148796.initial_effect(c) function c97148796.initial_effect(c)
--spsummon condition --spsummon condition
local e1=Effect.CreateEffect(c) local e1=Effect.CreateEffect(c)
e1:SetType(EFFECT_TYPE_SINGLE) e1:SetType(EFFECT_TYPE_SINGLE)
e1:SetProperty(EFFECT_FLAG_CANNOT_DISABLE+EFFECT_FLAG_UNCOPYABLE) e1:SetProperty(EFFECT_FLAG_CANNOT_DISABLE+EFFECT_FLAG_UNCOPYABLE)
e1:SetCode(EFFECT_SPSUMMON_CONDITION) e1:SetCode(EFFECT_SPSUMMON_CONDITION)
e1:SetValue(c97148796.splimit) e1:SetValue(c97148796.splimit)
c:RegisterEffect(e1) c:RegisterEffect(e1)
--spsummon --spsummon
local e2=Effect.CreateEffect(c) local e2=aux.AddDrytronSpSummonEffect(c,c97148796.extraop)
e2:SetDescription(aux.Stringid(97148796,0)) e2:SetDescription(aux.Stringid(97148796,0))
e2:SetCategory(CATEGORY_SPECIAL_SUMMON+CATEGORY_SEARCH) e2:SetCountLimit(1,97148796)
e2:SetType(EFFECT_TYPE_IGNITION) end
e2:SetRange(LOCATION_HAND+LOCATION_GRAVE) function c97148796.splimit(e,se,sp,st)
e2:SetCountLimit(1,97148796) return se:GetHandler():IsSetCard(0x154)
e2:SetCost(c97148796.spcost) end
e2:SetTarget(c97148796.sptg) function c97148796.thfilter(c)
e2:SetOperation(c97148796.spop) return c:IsType(TYPE_RITUAL) and c:IsType(TYPE_MONSTER) and c:IsAbleToHand()
c:RegisterEffect(e2) end
Duel.AddCustomActivityCounter(97148796,ACTIVITY_SPSUMMON,c97148796.counterfilter) function c97148796.extraop(e,tp)
end local g=Duel.GetMatchingGroup(c97148796.thfilter,tp,LOCATION_DECK,0,nil)
function c97148796.splimit(e,se,sp,st) if g:GetCount()>0 and Duel.SelectYesNo(tp,aux.Stringid(97148796,1)) then
return se:GetHandler():IsSetCard(0x154) Duel.BreakEffect()
end Duel.Hint(HINT_SELECTMSG,tp,HINTMSG_ATOHAND)
function c97148796.counterfilter(c) local sg=g:Select(tp,1,1,nil)
return not c:IsSummonableCard() Duel.SendtoHand(sg,nil,REASON_EFFECT)
end Duel.ConfirmCards(1-tp,sg)
function c97148796.costfilter(c,tp) end
return (c:IsSetCard(0x154) or c:IsType(TYPE_RITUAL)) and c:IsType(TYPE_MONSTER) and Duel.GetMZoneCount(tp,c)>0 end
and (c:IsControler(tp) or c:IsFaceup())
end
function c97148796.spcost(e,tp,eg,ep,ev,re,r,rp,chk)
e:SetLabel(100)
if chk==0 then return Duel.GetCustomActivityCount(97148796,tp,ACTIVITY_SPSUMMON)==0
and Duel.CheckReleaseGroupEx(tp,c97148796.costfilter,1,e:GetHandler(),tp) end
local e1=Effect.CreateEffect(e:GetHandler())
e1:SetType(EFFECT_TYPE_FIELD)
e1:SetCode(EFFECT_CANNOT_SPECIAL_SUMMON)
e1:SetProperty(EFFECT_FLAG_PLAYER_TARGET+EFFECT_FLAG_OATH)
e1:SetTargetRange(1,0)
e1:SetTarget(c97148796.splimit2)
e1:SetReset(RESET_PHASE+PHASE_END)
Duel.RegisterEffect(e1,tp)
--cant special summon summonable card check
local e2=Effect.CreateEffect(e:GetHandler())
e2:SetType(EFFECT_TYPE_FIELD)
e2:SetCode(97148796)
e2:SetProperty(EFFECT_FLAG_PLAYER_TARGET+EFFECT_FLAG_OATH)
e2:SetTargetRange(1,0)
e2:SetReset(RESET_PHASE+PHASE_END)
Duel.RegisterEffect(e2,tp)
Duel.Hint(HINT_SELECTMSG,tp,HINTMSG_RELEASE)
local g=Duel.SelectReleaseGroupEx(tp,c97148796.costfilter,1,1,e:GetHandler(),tp)
Duel.Release(g,REASON_COST)
end
function c97148796.splimit2(e,c,sump,sumtype,sumpos,targetp,se)
return c:IsSummonableCard()
end
function c97148796.sptg(e,tp,eg,ep,ev,re,r,rp,chk)
local res=e:GetLabel()==100 or Duel.GetLocationCount(tp,LOCATION_MZONE)>0
if chk==0 then
e:SetLabel(0)
return res and e:GetHandler():IsCanBeSpecialSummoned(e,0,tp,false,false,POS_FACEUP_DEFENSE)
end
e:SetLabel(0)
Duel.SetOperationInfo(0,CATEGORY_SPECIAL_SUMMON,e:GetHandler(),1,0,0)
end
function c97148796.thfilter(c)
return c:IsType(TYPE_RITUAL) and c:IsType(TYPE_MONSTER) and c:IsAbleToHand()
end
function c97148796.spop(e,tp,eg,ep,ev,re,r,rp)
local c=e:GetHandler()
if c:IsRelateToEffect(e) and Duel.SpecialSummon(c,0,tp,tp,false,false,POS_FACEUP_DEFENSE)~=0
and Duel.IsExistingMatchingCard(c97148796.thfilter,tp,LOCATION_DECK,0,1,nil)
and Duel.SelectYesNo(tp,aux.Stringid(97148796,1)) then
Duel.BreakEffect()
Duel.Hint(HINT_SELECTMSG,tp,HINTMSG_ATOHAND)
local g=Duel.SelectMatchingCard(tp,c97148796.thfilter,tp,LOCATION_DECK,0,1,1,nil)
Duel.SendtoHand(g,nil,REASON_EFFECT)
Duel.ConfirmCards(1-tp,g)
end
end
...@@ -2420,6 +2420,82 @@ end ...@@ -2420,6 +2420,82 @@ end
function Auxiliary.UrsarcticSpSummonLimit(e,c) function Auxiliary.UrsarcticSpSummonLimit(e,c)
return c:IsLevel(0) return c:IsLevel(0)
end end
--Drytron common summon effect
function Auxiliary.AddDrytronSpSummonEffect(c,func)
local e1=Effect.CreateEffect(c)
e1:SetCategory(CATEGORY_SPECIAL_SUMMON+CATEGORY_SEARCH)
e1:SetType(EFFECT_TYPE_IGNITION)
e1:SetRange(LOCATION_HAND+LOCATION_GRAVE)
e1:SetCost(Auxiliary.DrytronSpSummonCost)
e1:SetTarget(Auxiliary.DrytronSpSummonTarget)
e1:SetOperation(Auxiliary.DrytronSpSummonOperation(func))
c:RegisterEffect(e1)
Duel.AddCustomActivityCounter(97148796,ACTIVITY_SPSUMMON,Auxiliary.DrytronCounterFilter)
return e1
end
function Auxiliary.DrytronCounterFilter(c)
return not c:IsSummonableCard()
end
function Auxiliary.DrytronCostFilter(c,tp)
return (c:IsSetCard(0x154) or c:IsType(TYPE_RITUAL)) and c:IsType(TYPE_MONSTER) and Duel.GetMZoneCount(tp,c)>0
and (c:IsControler(tp) or c:IsFaceup())
end
function Auxiliary.DrytronExtraCostFilter(c,tp)
return c:IsAbleToRemove() and c:IsHasEffect(89771220,tp)
end
function Auxiliary.DrytronSpSummonCost(e,tp,eg,ep,ev,re,r,rp,chk)
e:SetLabel(100)
local g1=Duel.GetReleaseGroup(tp,true):Filter(Auxiliary.DrytronCostFilter,e:GetHandler(),tp)
local g2=Duel.GetMatchingGroup(Auxiliary.DrytronExtraCostFilter,tp,LOCATION_GRAVE,0,nil,tp)
g1:Merge(g2)
if chk==0 then return #g1>0 and Duel.GetCustomActivityCount(97148796,tp,ACTIVITY_SPSUMMON)==0 end
local e1=Effect.CreateEffect(e:GetHandler())
e1:SetType(EFFECT_TYPE_FIELD)
e1:SetCode(EFFECT_CANNOT_SPECIAL_SUMMON)
e1:SetProperty(EFFECT_FLAG_PLAYER_TARGET+EFFECT_FLAG_OATH)
e1:SetTargetRange(1,0)
e1:SetTarget(Auxiliary.DrytronSpSummonLimit)
e1:SetReset(RESET_PHASE+PHASE_END)
Duel.RegisterEffect(e1,tp)
--cant special summon summonable card check
local e2=Effect.CreateEffect(e:GetHandler())
e2:SetType(EFFECT_TYPE_FIELD)
e2:SetCode(97148796)
e2:SetProperty(EFFECT_FLAG_PLAYER_TARGET+EFFECT_FLAG_OATH)
e2:SetTargetRange(1,0)
e2:SetReset(RESET_PHASE+PHASE_END)
Duel.RegisterEffect(e2,tp)
Duel.Hint(HINT_SELECTMSG,tp,HINTMSG_RELEASE)
local rg=g1:Select(tp,1,1,nil)
local tc=rg:GetFirst()
local te=tc:IsHasEffect(89771220,tp)
if te then
te:UseCountLimit(tp)
Duel.Remove(tc,POS_FACEUP,REASON_EFFECT+REASON_REPLACE)
else
Auxiliary.UseExtraReleaseCount(rg,tp)
Duel.Release(tc,REASON_COST)
end
end
function Auxiliary.DrytronSpSummonLimit(e,c,sump,sumtype,sumpos,targetp,se)
return c:IsSummonableCard()
end
function Auxiliary.DrytronSpSummonTarget(e,tp,eg,ep,ev,re,r,rp,chk)
local res=e:GetLabel()==100 or Duel.GetLocationCount(tp,LOCATION_MZONE)>0
if chk==0 then
e:SetLabel(0)
return res and e:GetHandler():IsCanBeSpecialSummoned(e,0,tp,false,false,POS_FACEUP_DEFENSE)
end
e:SetLabel(0)
Duel.SetOperationInfo(0,CATEGORY_SPECIAL_SUMMON,e:GetHandler(),1,0,0)
end
function Auxiliary.DrytronSpSummonOperation(func)
return function(e,tp,eg,ep,ev,re,r,rp)
local c=e:GetHandler()
if not c:IsRelateToEffect(e) then return end
if Duel.SpecialSummon(c,0,tp,tp,false,false,POS_FACEUP_DEFENSE)~=0 then func(e,tp) end
end
end
--shortcut for Gizmek cards --shortcut for Gizmek cards
function Auxiliary.AtkEqualsDef(c) function Auxiliary.AtkEqualsDef(c)
if not c:IsType(TYPE_MONSTER) or c:IsType(TYPE_LINK) then return false end if not c:IsType(TYPE_MONSTER) or c:IsType(TYPE_LINK) then return false end
......
Markdown is supported
0% or
You are about to add 0 people to the discussion. Proceed with caution.
Finish editing this message first!
Please register or to comment