Commit 3d779f12 authored by Tachibana's avatar Tachibana

ybb

parent 2597fea6
No preview for this file type
...@@ -252,6 +252,13 @@ end ...@@ -252,6 +252,13 @@ end
function bm.eqfilter_base(c,tp) function bm.eqfilter_base(c,tp)
return c:CheckUniqueOnField(tp) and not c:IsForbidden() return c:CheckUniqueOnField(tp) and not c:IsForbidden()
end end
function bm.eqcheck_e(e,tp)
if e:GetHandler():IsLocation(sz) then
return true
else
return Duel.GetLocationCount(tp,sz)>0
end
end
function bm.e.eqtg(loc,filter_func,target_type,oppos) function bm.e.eqtg(loc,filter_func,target_type,oppos)
return function(e,tp,eg,ep,ev,re,r,rp,chk) return function(e,tp,eg,ep,ev,re,r,rp,chk)
local c=e:GetHandler() local c=e:GetHandler()
...@@ -259,7 +266,7 @@ function bm.e.eqtg(loc,filter_func,target_type,oppos) ...@@ -259,7 +266,7 @@ function bm.e.eqtg(loc,filter_func,target_type,oppos)
if oppos then g=Duel.GetMatchingGroup(filter_func,tp,loc,loc,nil) end if oppos then g=Duel.GetMatchingGroup(filter_func,tp,loc,loc,nil) end
if target_type then g=g:Filter(Card.IsCanBeEffectTarget,nil,e) end if target_type then g=g:Filter(Card.IsCanBeEffectTarget,nil,e) end
if loc~=mz then g=g:Filter(bm.eqfilter_base,nil,tp) end if loc~=mz then g=g:Filter(bm.eqfilter_base,nil,tp) end
if chk==0 then return Duel.GetLocationCount(tp,sz)>0 and #g>0 end if chk==0 then return bm.eqcheck_e(e,tp) and #g>0 end
if target_type then if target_type then
Duel.Hint(HINT_SELECTMSG,tp,HINTMSG_EQUIP) Duel.Hint(HINT_SELECTMSG,tp,HINTMSG_EQUIP)
local tg=g:Select(tp,1,1,nil) local tg=g:Select(tp,1,1,nil)
...@@ -272,7 +279,7 @@ function bm.e.eqtg(loc,filter_func,target_type,oppos) ...@@ -272,7 +279,7 @@ function bm.e.eqtg(loc,filter_func,target_type,oppos)
end end
function bm.e.eqop(loc,filter_func,target_type,up_atk,oppos,up_def) function bm.e.eqop(loc,filter_func,target_type,up_atk,oppos,up_def)
return function(e,tp,eg,ep,ev,re,r,rp) return function(e,tp,eg,ep,ev,re,r,rp)
if Duel.GetLocationCount(tp,sz)<=0 then return end if not bm.eqcheck_e(e,tp) then return end
local c=e:GetHandler() local c=e:GetHandler()
if not c:IsRelateToEffect(e) then return end if not c:IsRelateToEffect(e) then return end
if not (c:IsLocation(mz) or bm.eqfilter_base(c,tp)) then return end if not (c:IsLocation(mz) or bm.eqfilter_base(c,tp)) then return end
......
...@@ -21,8 +21,8 @@ function cm.initial_effect(c) ...@@ -21,8 +21,8 @@ function cm.initial_effect(c)
e2:SetType(EFFECT_TYPE_IGNITION) e2:SetType(EFFECT_TYPE_IGNITION)
e2:SetRange(ga) e2:SetRange(ga)
e2:SetCountLimit(1,m) e2:SetCountLimit(1,m)
e2:SetTarget(bm.e.eqtg(mz,cm.f,true)) e2:SetTarget(bm.e.eqtg(mz,cm.f,false))
e2:SetOperation(bm.e.eqop(mz,cm.f,true)) e2:SetOperation(bm.e.eqop(mz,cm.f,false))
c:RegisterEffect(e2) c:RegisterEffect(e2)
--special summon --special summon
local e3=Effect.CreateEffect(c) local e3=Effect.CreateEffect(c)
......
...@@ -151,5 +151,6 @@ function c33200623.txtop(e,tp,eg,ep,ev,re,r,rp) ...@@ -151,5 +151,6 @@ function c33200623.txtop(e,tp,eg,ep,ev,re,r,rp)
if cod>=4 then c:RegisterFlagEffect(33200621,RESET_EVENT+RESETS_STANDARD,EFFECT_FLAG_CLIENT_HINT,1,0,aux.Stringid(33200623,3)) end if cod>=4 then c:RegisterFlagEffect(33200621,RESET_EVENT+RESETS_STANDARD,EFFECT_FLAG_CLIENT_HINT,1,0,aux.Stringid(33200623,3)) end
if cod>=6 then c:RegisterFlagEffect(33200622,RESET_EVENT+RESETS_STANDARD,EFFECT_FLAG_CLIENT_HINT,1,0,aux.Stringid(33200623,4)) end if cod>=6 then c:RegisterFlagEffect(33200622,RESET_EVENT+RESETS_STANDARD,EFFECT_FLAG_CLIENT_HINT,1,0,aux.Stringid(33200623,4)) end
if cod>=8 then c:RegisterFlagEffect(33200623,RESET_EVENT+RESETS_STANDARD,EFFECT_FLAG_CLIENT_HINT,1,0,aux.Stringid(33200623,5)) end if cod>=8 then c:RegisterFlagEffect(33200623,RESET_EVENT+RESETS_STANDARD,EFFECT_FLAG_CLIENT_HINT,1,0,aux.Stringid(33200623,5)) end
e:SetLabel(cod)
end end
end end
\ No newline at end of file
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