Commit 0231f95a authored by salix5's avatar salix5 Committed by GitHub

Drytron monster: add revive limit (#2213)

parent cf706700
--竜輝巧-ルタδ
function c22420202.initial_effect(c)
c:EnableReviveLimit()
--spsummon condition
local e1=Effect.CreateEffect(c)
e1:SetType(EFFECT_TYPE_SINGLE)
......
--竜輝巧-ラスβ
function c33543890.initial_effect(c)
c:EnableReviveLimit()
--spsummon condition
local e1=Effect.CreateEffect(c)
e1:SetType(EFFECT_TYPE_SINGLE)
......
--竜輝巧-エルγ
function c60037599.initial_effect(c)
c:EnableReviveLimit()
--spsummon condition
local e1=Effect.CreateEffect(c)
e1:SetType(EFFECT_TYPE_SINGLE)
......
......@@ -38,7 +38,7 @@ function c94187078.splimit(e,c,sump,sumtype,sumpos,targetp,se)
return c:IsSummonableCard()
end
function c94187078.filter(c,e,tp)
return c:IsSetCard(0x154) and c:IsCanBeSpecialSummoned(e,0,tp,false,false)
return c:IsSetCard(0x154) and c:IsCanBeSpecialSummoned(e,0,tp,false,aux.DrytronSpSummonType(c))
end
function c94187078.target(e,tp,eg,ep,ev,re,r,rp,chk)
if chk==0 then return Duel.GetLocationCount(tp,LOCATION_MZONE)>0
......@@ -50,7 +50,7 @@ function c94187078.activate(e,tp,eg,ep,ev,re,r,rp)
Duel.Hint(HINT_SELECTMSG,tp,HINTMSG_SPSUMMON)
local g=Duel.SelectMatchingCard(tp,c94187078.filter,tp,LOCATION_DECK,0,1,1,nil,e,tp)
local tc=g:GetFirst()
if tc and Duel.SpecialSummonStep(tc,0,tp,tp,false,false,POS_FACEUP) then
if tc and Duel.SpecialSummonStep(tc,0,tp,tp,false,aux.DrytronSpSummonType(tc),POS_FACEUP) then
tc:RegisterFlagEffect(94187078,RESET_EVENT+RESETS_STANDARD,0,1)
local e1=Effect.CreateEffect(e:GetHandler())
e1:SetType(EFFECT_TYPE_FIELD+EFFECT_TYPE_CONTINUOUS)
......@@ -61,6 +61,9 @@ function c94187078.activate(e,tp,eg,ep,ev,re,r,rp)
e1:SetCondition(c94187078.descon)
e1:SetOperation(c94187078.desop)
Duel.RegisterEffect(e1,tp)
if aux.DrytronSpSummonType(tc) then
tc:CompleteProcedure()
end
end
Duel.SpecialSummonComplete()
end
......
......@@ -87,7 +87,8 @@ function c95209656.spcon(e,tp,eg,ep,ev,re,r,rp)
return c:IsPreviousLocation(LOCATION_MZONE) and c:IsSummonType(SUMMON_TYPE_RITUAL)
end
function c95209656.spfilter(c,e,tp)
return c:IsSetCard(0x154) and c:IsAttackAbove(1) and not c:IsCode(95209656) and c:IsCanBeSpecialSummoned(e,0,tp,false,false)
return c:IsSetCard(0x154) and c:IsAttackAbove(1) and not c:IsCode(95209656)
and c:IsCanBeSpecialSummoned(e,0,tp,false,aux.DrytronSpSummonType(c))
end
function c95209656.fselect(g)
return g:GetSum(Card.GetAttack)==4000
......@@ -120,6 +121,11 @@ function c95209656.spop(e,tp,eg,ep,ev,re,r,rp)
local sg=g:SelectSubGroup(tp,c95209656.fselect,false,1,ct)
aux.GCheckAdditional=nil
if sg then
Duel.SpecialSummon(sg,0,tp,tp,false,false,POS_FACEUP)
for tc in aux.Next(sg) do
if Duel.SpecialSummonStep(tc,0,tp,tp,false,aux.DrytronSpSummonType(tc),POS_FACEUP) and aux.DrytronSpSummonType(tc) then
tc:CompleteProcedure()
end
end
Duel.SpecialSummonComplete()
end
end
--竜輝巧-アルζ
function c96026108.initial_effect(c)
c:EnableReviveLimit()
--spsummon condition
local e1=Effect.CreateEffect(c)
e1:SetType(EFFECT_TYPE_SINGLE)
......
--竜輝巧-バンα
function c97148796.initial_effect(c)
c:EnableReviveLimit()
--spsummon condition
local e1=Effect.CreateEffect(c)
e1:SetType(EFFECT_TYPE_SINGLE)
......
......@@ -905,7 +905,7 @@ 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)
return res and e:GetHandler():IsCanBeSpecialSummoned(e,0,tp,false,true,POS_FACEUP_DEFENSE)
end
e:SetLabel(0)
Duel.SetOperationInfo(0,CATEGORY_SPECIAL_SUMMON,e:GetHandler(),1,0,0)
......@@ -914,9 +914,18 @@ 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
if Duel.SpecialSummon(c,0,tp,tp,false,true,POS_FACEUP_DEFENSE)~=0 then
c:CompleteProcedure()
func(e,tp)
end
end
end
---Return the type of `nolimit` in Duel.SpecialSummon()
---@param c Card
---@return boolean
function Auxiliary.DrytronSpSummonType(c)
return c:IsType(TYPE_SPSUMMON)
end
--additional destroy effect for the Labrynth field
function Auxiliary.LabrynthDestroyOp(e,tp,res)
local c=e:GetHandler()
......
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