Commit 4defaeb0 authored by wyykak's avatar wyykak

fix 26145

Signed-off-by: wyykak's avatarwyykak <wyy_1414@126.com>
parent 14192d81
......@@ -25,16 +25,21 @@ function c26145.initial_effect(c)
c:RegisterEffect(e4)
end
function c26145.condition(e,tp,eg,ep,ev,re,r,rp)
local t1=Duel.IsExistingMatchingCard(c26145.filter,tp,LOCATION_HAND,0,1,nil,e,tp)
local t2=Duel.IsExistingMatchingCard(c26145.filter,tp,LOCATION_EXTRA,0,1,nil,e,tp) and Duel.GetLocationCountFromEx(tp)>0
local t1=Duel.IsExistingMatchingCard(c26145.hfilter,tp,LOCATION_HAND,0,1,nil,e,tp)
local t2=Duel.IsExistingMatchingCard(c26145.exfilter,tp,LOCATION_EXTRA,0,1,nil,e,tp)
and Duel.IsExistingMatchingCard(c26145.cfilter,tp,LOCATION_ONFIELD,0,1,nil)
return t1 or t2
end
function c26145.cfilter(c)
return (c:IsSetCard(0x252) or c:IsSetCard(0x251)) and c:IsType(TYPE_SPELL) and c:IsAbleToGrave()
end
function c26145.filter(c,e,tp)
function c26145.hfilter(c,e,tp)
return c:IsSetCard(0x252a) and c:IsCanBeSpecialSummoned(e,0,tp,true,true,POS_FACEUP) and c:IsType(TYPE_MONSTER)
and Duel.GetMZoneCount(tp)>0
end
function c26145.exfilter(c,e,tp)
return c:IsSetCard(0x252a) and c:IsCanBeSpecialSummoned(e,0,tp,true,true,POS_FACEUP) and c:IsType(TYPE_MONSTER)
and Duel.GetLocationCountFromEx(tp,tp,nil,c)>0
end
function c26145.activate(e,tp,eg,ep,ev,re,r,rp)
local c=e:GetHandler()
......@@ -42,8 +47,8 @@ function c26145.activate(e,tp,eg,ep,ev,re,r,rp)
Duel.Hint(12,0,aux.Stringid(26145,4))
local t={}
local p=1
if Duel.IsExistingMatchingCard(c26145.filter,tp,LOCATION_HAND,0,1,nil,e,tp) then t[p]=aux.Stringid(26145,1) p=p+1 end
if Duel.IsExistingMatchingCard(c26145.filter,tp,LOCATION_EXTRA,0,1,nil,e,tp) and Duel.GetLocationCountFromEx(tp)>0
if Duel.IsExistingMatchingCard(c26145.hfilter,tp,LOCATION_HAND,0,1,nil,e,tp) then t[p]=aux.Stringid(26145,1) p=p+1 end
if Duel.IsExistingMatchingCard(c26145.exfilter,tp,LOCATION_EXTRA,0,1,nil,e,tp)
and Duel.IsExistingMatchingCard(c26145.cfilter,tp,LOCATION_ONFIELD,0,1,nil) then t[p]=aux.Stringid(26145,2) p=p+1 end
Duel.Hint(HINT_SELECTMSG,tp,aux.Stringid(26145,3))
local sel=Duel.SelectOption(tp,table.unpack(t))+1
......
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