Commit e314060f authored by songtongtong's avatar songtongtong

bug fix

parent e7bab01e
Pipeline #23834 passed with stages
in 31 minutes and 10 seconds
......@@ -9,18 +9,11 @@ function cm.initial_effect(c)
e1:SetProperty(EFFECT_FLAG_CARD_TARGET)
e1:SetCode(EVENT_FREE_CHAIN)
e1:SetCountLimit(1,m+EFFECT_COUNT_CODE_OATH)
e1:SetCondition(cm.con)
e1:SetCost(cm.cost)
e1:SetTarget(cm.target)
e1:SetOperation(cm.activate)
c:RegisterEffect(e1)
end
function cm.cfilter(c)
return c:IsFaceup() and c:IsSetCard(0x9344)
end
function cm.con(e,tp,eg,ep,ev,re,r,rp)
return Duel.IsExistingMatchingCard(cm.cfilter,tp,LOCATION_MZONE,0,1,nil)
end
function cm.refilter(c)
return ((c:IsType(TYPE_EFFECT) and c:IsDisabled()) or c:IsType(TYPE_NORMAL) or c:IsType(TYPE_TOKEN)) and c:IsReleasable()
end
......
......@@ -34,7 +34,7 @@ end
function s.spop(e,tp,eg,ep,ev,re,r,rp)
if Duel.GetLocationCount(tp,LOCATION_MZONE)<=0 then return end
Duel.Hint(HINT_SELECTMSG,tp,HINTMSG_SPSUMMON)
local g=Duel.SelectMatchingCard(tp,s.spfilter,tp,LOCATION_HAND+LOCATION_DECK,0,1,1,nil,e,tp)
local g=Duel.SelectMatchingCard(tp,s.spfilter,tp,LOCATION_DECK,0,1,1,nil,e,tp)
if g:GetCount()>0 then
Duel.SpecialSummon(g,0,tp,tp,false,false,POS_FACEUP)
end
......
......@@ -48,7 +48,7 @@ function s.tograve(c)
c:RegisterEffect(e1)
end
function s.tgfilter(c,tp)
if not (c:IsCode(0x43c) and c:IsType(TYPE_MONSTER) and c:IsAbleToGrave()) then
if not (c:IsSetCard(0x43c) and c:IsType(TYPE_MONSTER) and c:IsAbleToGrave()) then
return false
end
local code=c:GetCode()
......
......@@ -41,8 +41,7 @@ function c50218570.lcheck(g)
return g:GetClassCount(Card.GetLevel)==1
end
function c50218570.filter(c,e,tp)
return c:IsFaceup() and Duel.GetMZoneCount(tp,c)>0
and Duel.IsExistingMatchingCard(c50218570.spfilter,tp,LOCATION_DECK,0,1,nil,e,tp,c)
return c:IsFaceup() and Duel.IsExistingMatchingCard(c50218570.spfilter,tp,LOCATION_DECK,0,1,nil,e,tp,c)
end
function c50218570.spfilter(c,e,tp,tc)
return c:IsSetCard(0xcb5) and c:IsLevel(tc:GetLevel())
......@@ -50,9 +49,10 @@ function c50218570.spfilter(c,e,tp,tc)
end
function c50218570.target(e,tp,eg,ep,ev,re,r,rp,chk,chkc)
local c=e:GetHandler()
if chkc then return chkc:IsControler(tp) and chkc:IsLocation(LOCATION_MZONE) and c50218570.filter(chkc,e,tp) and chkc~=c end
if chk==0 then return Duel.IsExistingTarget(c50218570.filter,tp,LOCATION_MZONE,0,1,c,e,tp) and Duel.GetLocationCount(tp,LOCATION_MZONE)>0 end
Duel.Hint(HINT_SELECTMSG,tp,HINTMSG_FACEUP)
if chkc then return chkc:IsControler(tp) and chkc:IsLocation(LOCATION_MZONE) and c50218570.filter(chkc,e,tp) end
if chk==0 then return Duel.GetLocationCount(tp,LOCATION_MZONE)>0
and Duel.IsExistingTarget(c50218570.filter,tp,LOCATION_MZONE,0,1,c,e,tp) end
Duel.Hint(HINT_SELECTMSG,tp,HINTMSG_TARGET)
local g=Duel.SelectTarget(tp,c50218570.filter,tp,LOCATION_MZONE,0,1,1,c,e,tp)
Duel.SetOperationInfo(0,CATEGORY_SPECIAL_SUMMON,nil,1,tp,LOCATION_DECK)
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