Commit 2bc86b6e authored by mercury233's avatar mercury233

update 轟雷機龍 and 竜装合体

the metatable of the target only rely on card, not on name
parent 7acc5cda
......@@ -29,9 +29,7 @@ function c12081875.effcon(e)
end
function c12081875.efffilter(c,e,tp,eg,ep,ev,re,r,rp)
if not (c:IsSetCard(0x11c) and c:IsType(TYPE_MONSTER) and c:IsAbleToDeck() and (c:IsLocation(LOCATION_GRAVE) or c:IsFaceup())) then return false end
local m=_G["c"..c:GetOriginalCode()]
if not m then return false end
local te=m.discard_effect
local te=c.discard_effect
if not te then return false end
local tg=te:GetTarget()
return not tg or tg and tg(e,tp,eg,ep,ev,re,r,rp,0)
......@@ -46,16 +44,14 @@ function c12081875.efftg(e,tp,eg,ep,ev,re,r,rp,chk,chkc)
Duel.ClearTargetCard()
tc:CreateEffectRelation(e)
e:SetLabelObject(tc)
local m=_G["c"..tc:GetOriginalCode()]
local te=m.discard_effect
local te=tc.discard_effect
local tg=te:GetTarget()
if tg then tg(e,tp,eg,ep,ev,re,r,rp,1) end
end
function c12081875.effop(e,tp,eg,ep,ev,re,r,rp,chk)
local tc=e:GetLabelObject()
if tc:IsRelateToEffect(e) then
local m=_G["c"..tc:GetOriginalCode()]
local te=m.discard_effect
local te=tc.discard_effect
local op=te:GetOperation()
if op then op(e,tp,eg,ep,ev,re,r,rp) end
Duel.BreakEffect()
......
......@@ -38,8 +38,7 @@ function c75402014.eqcon(e,tp,eg,ep,ev,re,r,rp)
return eg:IsContains(e:GetHandler())
end
function c75402014.eqfilter(c,tp)
local mt=_G["c"..c:GetCode()]
return mt and mt.zw_equip_monster and c:IsSetCard(0x107e) and c:IsType(TYPE_MONSTER) and not c:IsForbidden() and c:CheckUniqueOnField(tp,LOCATION_SZONE)
return c.zw_equip_monster and c:IsSetCard(0x107e) and c:IsType(TYPE_MONSTER) and not c:IsForbidden() and c:CheckUniqueOnField(tp,LOCATION_SZONE)
end
function c75402014.eqtg(e,tp,eg,ep,ev,re,r,rp,chk)
if chk==0 then return Duel.GetLocationCount(tp,LOCATION_SZONE)>0
......@@ -54,8 +53,7 @@ function c75402014.eqop(e,tp,eg,ep,ev,re,r,rp)
local g=Duel.SelectMatchingCard(tp,c75402014.eqfilter,tp,LOCATION_HAND+LOCATION_DECK,0,1,1,nil,tp)
local tc=g:GetFirst()
if not tc then return end
local mt=_G["c"..tc:GetCode()]
mt.zw_equip_monster(tc,tp,c)
tc.zw_equip_monster(tc,tp,c)
end
end
function c75402014.eqlimit(e,c)
......
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