Commit ecba3752 authored by Huangnan's avatar Huangnan

fix

parent 1fe7c80f
Pipeline #35747 passed with stages
in 39 minutes and 35 seconds
No preview for this file type
......@@ -87,9 +87,10 @@ function cm.op5(e,tp,eg,ep,ev,re,r,rp)
local c=e:GetHandler()
Duel.Hint(3,tp,HINTMSG_EQUIP)
local g=Duel.SelectMatchingCard(tp,cm.w,tp,LOCATION_MZONE,0,1,1,nil,e,tp)
if #g>0 and c:IsRelateToEffect(e) then
local tc=g:GetFirst()
if Duel.Equip(tp,tc,c)>0 then
local tc=g:GetFirst()
if tc and c:IsRelateToEffect(e) and tc:IsFaceup() then
if Duel.Equip(tp,c,tc) then
Duel.BreakEffect()
Duel.Draw(tp,1,REASON_EFFECT)
end
end
......
......@@ -81,8 +81,7 @@ function s.eqtg(e,tp,eg,ep,ev,re,r,rp,chk,chkc)
end
function s.eqop(e,tp,eg,ep,ev,re,r,rp)
local c=e:GetHandler()
local g=Duel.GetChainInfo(0,CHAININFO_TARGET_CARDS)
local tg=g:Filter(Card.IsRelateToEffect,nil,e)
local tg=Duel.GetTargetsRelateToChain():Filter(aux.NecroValleyFilter(aux.TRUE),nil)
if c:IsRelateToEffect(e) and c:IsFaceup() then
if Duel.GetLocationCount(tp,LOCATION_SZONE)>=tg:GetCount() then
local tc=tg:GetFirst()
......
......@@ -35,10 +35,10 @@ function s.initial_effect(c)
c:RegisterEffect(e2)
end
function s.spcon(e,tp,eg,ep,ev,re,r,rp)
return Duel.IsExistingMatchingCard(s.spfilter,tp,LOCATION_ONFIELD,0,1,nil,e,tp)
return Duel.IsExistingMatchingCard(s.chkfilter,tp,LOCATION_ONFIELD,0,1,nil,e,tp)
end
function s.spcon2(e,tp,eg,ep,ev,re,r,rp)
return not Duel.IsExistingMatchingCard(s.spfilter,tp,LOCATION_ONFIELD,0,1,nil,e,tp)
return not Duel.IsExistingMatchingCard(s.chkfilter,tp,LOCATION_ONFIELD,0,1,nil,e,tp)
end
function s.chkfilter(c)
return (c.ThKingdWei or c:GetFlagEffect(17243108)>0) and c:IsFaceup()
......@@ -125,7 +125,7 @@ end
-- ②效果处理
function s.drop(e,tp,eg,ep,ev,re,r,rp)
local c=e:GetHandler()
local b1=Duel.IsExistingMatchingCard(aux.nzatk(),tp,0,LOCATION_MZONE,1,nil)
local b1=Duel.IsExistingMatchingCard(aux.nzatk,tp,0,LOCATION_MZONE,1,nil)
local b2=c:IsAbleToHand() and c:IsRelateToEffect(e)
local chk0=Duel.IsExistingMatchingCard(s.chkfilter0,tp,0,LOCATION_HAND,1,nil)
local chk1=Duel.IsExistingMatchingCard(s.chkfilter1,tp,0,LOCATION_HAND,1,nil,tp)
......@@ -148,7 +148,7 @@ function s.drop(e,tp,eg,ep,ev,re,r,rp)
if not b1 then return end
-- 怪兽处理
Duel.Hint(HINT_SELECTMSG,tp,HINTMSG_FACEUP)
local g=Duel.SelectMatchingCard(tp,aux.nzatk(),tp,0,LOCATION_MZONE,1,1,nil)
local g=Duel.SelectMatchingCard(tp,aux.nzatk,tp,0,LOCATION_MZONE,1,1,nil)
if #g>0 then
local e1=Effect.CreateEffect(e:GetHandler())
e1:SetType(EFFECT_TYPE_SINGLE)
......
......@@ -33,7 +33,7 @@ end
cm.SetCard_JYMFS=true
function cm.thfilter(c)
return c.SetCard_JYMFS and c:IsType(TYPE_SPELL+TYPE_TRAP) and c:IsAbleToHand()
return c.SetCard_JYMFS and c:IsType(TYPE_MONSTER) and c:IsAbleToHand()
end
function cm.thtg(e,tp,eg,ep,ev,re,r,rp,chk)
if chk==0 then return Duel.IsExistingMatchingCard(cm.thfilter,tp,LOCATION_GRAVE,0,1,nil) 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