Commit 673d1ea1 authored by 聖園ミカ's avatar 聖園ミカ 🐟

byd

parent 7b777b00
--极超天星圣 --极超天星圣-史蒂文森 2-18
function c50224305.initial_effect(c) function c50224305.initial_effect(c)
aux.EnablePendulumAttribute(c,false) aux.EnablePendulumAttribute(c,false)
--xyz summon --xyz summon
...@@ -36,7 +36,7 @@ function c50224305.initial_effect(c) ...@@ -36,7 +36,7 @@ function c50224305.initial_effect(c)
e3:SetCategory(CATEGORY_SPECIAL_SUMMON) e3:SetCategory(CATEGORY_SPECIAL_SUMMON)
e3:SetType(EFFECT_TYPE_SINGLE+EFFECT_TYPE_TRIGGER_O) e3:SetType(EFFECT_TYPE_SINGLE+EFFECT_TYPE_TRIGGER_O)
e3:SetCode(EVENT_LEAVE_FIELD) e3:SetCode(EVENT_LEAVE_FIELD)
e3:SetProperty(EFFECT_FLAG_DAMAGE_STEP+EFFECT_FLAG_DELAY) e3:SetProperty(EFFECT_FLAG_DELAY)
e3:SetCountLimit(1,50224305) e3:SetCountLimit(1,50224305)
e3:SetCondition(c50224305.spcon) e3:SetCondition(c50224305.spcon)
e3:SetTarget(c50224305.sptg) e3:SetTarget(c50224305.sptg)
...@@ -88,27 +88,43 @@ function c50224305.pendcon(e,c,og) ...@@ -88,27 +88,43 @@ function c50224305.pendcon(e,c,og)
if aux.PendulumChecklist&(0x1<<tp)~=0 and #eset==0 then return false end if aux.PendulumChecklist&(0x1<<tp)~=0 and #eset==0 then return false end
local lscale=0 local lscale=0
local rscale=11 local rscale=11
local ft=Duel.GetLocationCount(tp,LOCATION_MZONE) local ft=Duel.GetLocationCountFromEx(tp,tp,nil,TYPE_FUSION)
local ft1=Duel.GetLocationCountFromEx(tp,tp,nil,TYPE_LINK)--空的额外怪兽区域或者连接区
local ft2=ft-ft1--所有空区域-空的额外怪兽区域或者连接区
local ft3=Duel.GetLocationCount(tp,LOCATION_MZONE)--空的主要怪兽区域
if ft<=0 then return false end if ft<=0 then return false end
local loc=0
if ft1>0 then loc=loc+LOCATION_EXTRA end
if ft3>0 then loc=loc+LOCATION_HAND end
if og then if og then
return og:IsExists(aux.PConditionFilter,1,nil,e,tp,lscale,rscale,eset) return og:IsExists(aux.PConditionFilter,1,nil,e,tp,lscale,rscale,eset)
else else
return Duel.IsExistingMatchingCard(aux.PConditionFilter,tp,LOCATION_EXTRA+LOCATION_HAND,0,1,nil,e,tp,lscale,rscale,eset) return Duel.IsExistingMatchingCard(aux.PConditionFilter,tp,loc,0,1,nil,e,tp,lscale,rscale,eset)
end end
end end
function c50224305.pendop(e,tp,eg,ep,ev,re,r,rp,c,sg,og) function c50224305.pendop(e,tp,eg,ep,ev,re,r,rp,c,sg,og)
local eset={Duel.IsPlayerAffectedByEffect(tp,EFFECT_EXTRA_PENDULUM_SUMMON)} local eset={Duel.IsPlayerAffectedByEffect(tp,EFFECT_EXTRA_PENDULUM_SUMMON)}
local lscale=0 local lscale=0
local rscale=11 local rscale=11
local ft=Duel.GetLocationCount(tp,LOCATION_MZONE) local ft=Duel.GetLocationCountFromEx(tp,tp,nil,TYPE_FUSION)--所有空区域
if Duel.IsPlayerAffectedByEffect(tp,59822133) then ft=1 end local ft1=Duel.GetLocationCountFromEx(tp,tp,nil,TYPE_LINK)--空的额外怪兽区域或者连接区
local ect=c50224305 and Duel.IsPlayerAffectedByEffect(tp,50224305) and c50224305[tp] local ft2=ft-ft1--所有空区域-空的额外怪兽区域或者连接区
local ft3=Duel.GetLocationCount(tp,LOCATION_MZONE)--空的主要怪兽区域
if Duel.IsPlayerAffectedByEffect(tp,59822133) then
if ft1>0 then ft1=1 end
if ft2>0 then ft2=1 end
ft=1
end
local ect=(c29724053 and Duel.IsPlayerAffectedByEffect(tp,29724053) and c29724053[tp]) or ft
if ect~=nil then ft=math.min(ft,ect) end if ect~=nil then ft=math.min(ft,ect) end
local tg=Duel.GetMatchingGroup(aux.PConditionFilter,tp,LOCATION_EXTRA+LOCATION_HAND,0,nil,e,tp,lscale,rscale,eset) local loc=0
if ft1>0 then loc=loc+LOCATION_EXTRA end
if ft3>0 then loc=loc+LOCATION_HAND end
local tg=Duel.GetMatchingGroup(aux.PConditionFilter,tp,loc,0,nil,e,tp,lscale,rscale,eset)
if og then if og then
tg=og:Filter(Card.IsLocation,nil,LOCATION_EXTRA+LOCATION_HAND):Filter(aux.PConditionFilter,nil,e,tp,lscale,rscale,eset) tg=og:Filter(Card.IsLocation,nil,loc):Filter(aux.PConditionFilter,nil,e,tp,lscale,rscale,eset)
else else
tg=Duel.GetMatchingGroup(aux.PConditionFilter,tp,LOCATION_EXTRA+LOCATION_HAND,0,nil,e,tp,lscale,rscale,eset) tg=Duel.GetMatchingGroup(aux.PConditionFilter,tp,loc,0,nil,e,tp,lscale,rscale,eset)
end end
local ce=nil local ce=nil
local b1=aux.PendulumChecklist&(0x1<<tp)==0 local b1=aux.PendulumChecklist&(0x1<<tp)==0
...@@ -131,7 +147,7 @@ function c50224305.pendop(e,tp,eg,ep,ev,re,r,rp,c,sg,og) ...@@ -131,7 +147,7 @@ function c50224305.pendop(e,tp,eg,ep,ev,re,r,rp,c,sg,og)
ce=eset[op+1] ce=eset[op+1]
end end
Duel.Hint(HINT_SELECTMSG,tp,HINTMSG_SPSUMMON) Duel.Hint(HINT_SELECTMSG,tp,HINTMSG_SPSUMMON)
local g=tg:FilterSelect(tp,aux.PConditionExtraFilterSpecific,0,ft,nil,e,tp,lscale,rscale,ce) local g=tg:SelectSubGroup(tp,c50224305.gcheck,true,1,ft,ft1,ft2,ft3,ect,ft)
if #g==0 then return end if #g==0 then return end
if ce then if ce then
Duel.Hint(HINT_CARD,0,ce:GetOwner():GetOriginalCode()) Duel.Hint(HINT_CARD,0,ce:GetOwner():GetOriginalCode())
...@@ -142,6 +158,12 @@ function c50224305.pendop(e,tp,eg,ep,ev,re,r,rp,c,sg,og) ...@@ -142,6 +158,12 @@ function c50224305.pendop(e,tp,eg,ep,ev,re,r,rp,c,sg,og)
sg:Merge(g) sg:Merge(g)
Duel.HintSelection(Group.FromCards(e:GetHandler())) Duel.HintSelection(Group.FromCards(e:GetHandler()))
end end
function c50224305.gcheck(g,ft1,ft2,ft3,ect,ft)
return #g<=ft
and g:FilterCount(Card.IsLocation,nil,LOCATION_HAND)<=ft3
and g:FilterCount(Card.IsLocation,nil,LOCATION_EXTRA)<=ft1
and g:FilterCount(Card.IsLocation,nil,LOCATION_EXTRA)<=ect
end
function c50224305.spcon(e,tp,eg,ep,ev,re,r,rp) function c50224305.spcon(e,tp,eg,ep,ev,re,r,rp)
return e:GetHandler():IsPreviousLocation(LOCATION_PZONE) return e:GetHandler():IsPreviousLocation(LOCATION_PZONE)
end 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