Commit 1aec472c authored by GuGu's avatar GuGu

Update c19032.lua 修复特召区域和2效果处理检测

parent 56978be7
Pipeline #21181 passed with stage
in 1 minute
......@@ -23,32 +23,23 @@ function c19032.initial_effect(c)
e4:SetOperation(c19032.fuop)
c:RegisterEffect(e4)
end
function c19032.mfilter(c,tp)
return (c:IsSetCard(0x273) or (c:IsSetCard(0x3208) and c:GetAttack()<=2000)) and Duel.GetLocationCountFromEx(tp,tp,nil,c)>0
function c19032.mfilter(c,e,tp)
return (c:IsSetCard(0x273) or (c:IsSetCard(0x3208) and c:GetAttack()<=2000)) and Duel.IsExistingMatchingCard(c19032.filter,tp,LOCATION_EXTRA,0,1,nil,e,tp,c)
end
function c19032.filter(c,e,tp)
return c:IsCode(19030) and c:IsCanBeSpecialSummoned(e,SUMMON_TYPE_FUSION,tp,false,false)
function c19032.filter(c,e,tp,mg)
return c:IsCode(19030) and c:IsCanBeSpecialSummoned(e,SUMMON_TYPE_FUSION,tp,false,false) and Duel.GetLocationCountFromEx(tp,tp,mg,c)>0
end
function c19032.target(e,tp,eg,ep,ev,re,r,rp,chk)
if chk==0 then
if Duel.GetLocationCount(tp,LOCATION_MZONE)==0 and not Duel.IsExistingMatchingCard(c19032.mfilter,tp,LOCATION_MZONE,0,1,nil,tp) then
return false
else return
Duel.GetLocationCount(tp,LOCATION_MZONE)>-1
and Duel.IsExistingMatchingCard(c19032.mfilter,tp,0x6,0,1,nil,tp)
and Duel.IsExistingMatchingCard(c19032.filter,tp,LOCATION_EXTRA,0,1,nil,e,tp)
end
end
if chk==0 then return Duel.IsExistingMatchingCard(c19032.mfilter,tp,LOCATION_MZONE+LOCATION_HAND,0,1,nil,e,tp) end
Duel.SetOperationInfo(0,CATEGORY_SPECIAL_SUMMON,nil,1,tp,LOCATION_EXTRA)
Duel.SetOperationInfo(0,CATEGORY_TOGRAVE,nil,1,tp,0x6)
Duel.SetOperationInfo(0,CATEGORY_TOGRAVE,nil,1,tp,LOCATION_MZONE+LOCATION_HAND)
end
function c19032.activate(e,tp,eg,ep,ev,re,r,rp)
if Duel.GetLocationCount(tp,LOCATION_MZONE)<0 then return end
if Duel.GetLocationCount(tp,LOCATION_MZONE)==0 and not Duel.IsExistingMatchingCard(c19032.mfilter,tp,LOCATION_MZONE,0,1,nil,tp) then return end
if not Duel.IsExistingMatchingCard(c19032.mfilter,tp,LOCATION_MZONE+LOCATION_HAND,0,1,nil,e,tp) then return end
Duel.Hint(HINT_SELECTMSG,tp,HINTMSG_FMATERIAL)
local mg=Duel.SelectMatchingCard(tp,c19032.mfilter,tp,0x6,0,1,1,nil,tp)
local mg=Duel.SelectMatchingCard(tp,c19032.mfilter,tp,LOCATION_MZONE+LOCATION_HAND,0,1,1,nil,e,tp)
Duel.Hint(HINT_SELECTMSG,tp,HINTMSG_SPSUMMON)
local g=Duel.SelectMatchingCard(tp,c19032.filter,tp,LOCATION_EXTRA,0,1,1,nil,e,tp)
local g=Duel.SelectMatchingCard(tp,c19032.filter,tp,LOCATION_EXTRA,0,1,1,nil,e,tp,mg)
local tc=g:GetFirst()
if mg:GetCount()==0 or not tc then return end
Duel.SendtoGrave(mg,REASON_EFFECT)
......@@ -65,15 +56,18 @@ function c19032.rmfilter2(c)
return c:IsSetCard(0x3208) and c:IsAbleToRemove()
end
function c19032.futg(e,tp,eg,ep,ev,re,r,rp,chk)
if chk==0 then return Duel.GetLocationCountFromEx(tp)>0 and e:GetHandler():IsAbleToRemove()
if chk==0 then return e:GetHandler():IsAbleToRemove()
and Duel.IsExistingMatchingCard(c19032.rmfilter1,tp,LOCATION_GRAVE,0,1,nil)
and Duel.IsExistingMatchingCard(c19032.rmfilter2,tp,LOCATION_GRAVE,0,1,nil)
and Duel.IsExistingMatchingCard(c19032.filter,tp,LOCATION_EXTRA,0,1,nil,e,tp) end
and Duel.IsExistingMatchingCard(c19032.filter,tp,LOCATION_EXTRA,0,1,nil,e,tp,nil) end
Duel.SetOperationInfo(0,CATEGORY_SPECIAL_SUMMON,nil,1,tp,LOCATION_EXTRA)
Duel.SetOperationInfo(0,CATEGORY_REMOVE,nil,3,tp,LOCATION_GRAVE)
end
function c19032.fuop(e,tp,eg,ep,ev,re,r,rp)
if Duel.GetLocationCount(tp,LOCATION_MZONE)<=0 then return end
if not (e:GetHandler():IsAbleToRemove() and e:GetHandler():IsRelateToEffect(e)
and Duel.IsExistingMatchingCard(c19032.rmfilter1,tp,LOCATION_GRAVE,0,1,nil)
and Duel.IsExistingMatchingCard(c19032.rmfilter2,tp,LOCATION_GRAVE,0,1,nil)
and Duel.IsExistingMatchingCard(c19032.filter,tp,LOCATION_EXTRA,0,1,nil,e,tp,nil)) then return end
Duel.Hint(HINT_SELECTMSG,tp,HINTMSG_REMOVE)
local mg=Duel.SelectMatchingCard(tp,c19032.rmfilter1,tp,LOCATION_GRAVE,0,1,1,nil)
local mg2=Duel.SelectMatchingCard(tp,c19032.rmfilter2,tp,LOCATION_GRAVE,0,1,1,nil)
......@@ -81,7 +75,7 @@ function c19032.fuop(e,tp,eg,ep,ev,re,r,rp)
mg:AddCard(e:GetHandler())
if mg:GetCount()<3 then return end
Duel.Hint(HINT_SELECTMSG,tp,HINTMSG_SPSUMMON)
local g=Duel.SelectMatchingCard(tp,c19032.filter,tp,LOCATION_EXTRA,0,1,1,nil,e,tp)
local g=Duel.SelectMatchingCard(tp,c19032.filter,tp,LOCATION_EXTRA,0,1,1,nil,e,tp,nil)
local tc=g:GetFirst()
if not tc then return end
Duel.Remove(mg,POS_FACEUP,REASON_EFFECT)
......
Markdown is supported
0% or
You are about to add 0 people to the discussion. Proceed with caution.
Finish editing this message first!
Please register or to comment