Commit 69f0abbd authored by salix5's avatar salix5

Card.GetOriginalCode()

parent ce41abfa
......@@ -29,7 +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:GetCode()]
local m=_G["c"..c:GetOriginalCode()]
if not m then return false end
local te=m.discard_effect
if not te then return false end
......@@ -46,7 +46,7 @@ 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:GetCode()]
local m=_G["c"..tc:GetOriginalCode()]
local te=m.discard_effect
local tg=te:GetTarget()
if tg then tg(e,tp,eg,ep,ev,re,r,rp,1) end
......@@ -54,7 +54,7 @@ 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:GetCode()]
local m=_G["c"..tc:GetOriginalCode()]
local te=m.discard_effect
local op=te:GetOperation()
if op then op(e,tp,eg,ep,ev,re,r,rp) end
......
......@@ -12,7 +12,7 @@ function c25290459.initial_effect(c)
end
function c25290459.costfilter(c,e,tp)
if not c:IsSetCard(0x41) or not c:IsAbleToGraveAsCost() or not c:IsFaceup() then return false end
local code=c:GetOriginalCodeRule()
local code=c:GetOriginalCode()
local class=_G["c"..code]
if class==nil or class.lvup==nil then return false end
return Duel.IsExistingMatchingCard(c25290459.spfilter,tp,LOCATION_HAND+LOCATION_DECK,0,1,nil,class,e,tp)
......@@ -26,7 +26,7 @@ function c25290459.cost(e,tp,eg,ep,ev,re,r,rp,chk)
Duel.Hint(HINT_SELECTMSG,tp,HINTMSG_TOGRAVE)
local g=Duel.SelectMatchingCard(tp,c25290459.costfilter,tp,LOCATION_MZONE,0,1,1,nil,e,tp)
Duel.SendtoGrave(g,REASON_COST)
e:SetLabel(g:GetFirst():GetOriginalCodeRule())
e:SetLabel(g:GetFirst():GetOriginalCode())
end
function c25290459.target(e,tp,eg,ep,ev,re,r,rp,chk)
if chk==0 then return Duel.GetLocationCount(tp,LOCATION_MZONE)>-1 end
......
......@@ -53,7 +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()]
local mt=_G["c"..tc:GetOriginalCode()]
if mt.equip_monster then
mt.equip_monster(tc,tp,c)
else
......
......@@ -95,7 +95,7 @@ function c78063197.filter(c)
return c:IsFaceup() and c:IsType(TYPE_EFFECT) and c:IsAbleToChangeControler()
end
function c78063197.eqfilter(c)
local m=_G["c"..c:GetCode()]
local m=_G["c"..c:GetOriginalCode()]
return c:IsFaceup() and ((c:IsSetCard(0x1110) and c:IsType(TYPE_FUSION)) or c:IsCode(64631466)) and m.can_equip_monster(c)
end
function c78063197.eqtg(e,tp,eg,ep,ev,re,r,rp,chk,chkc)
......@@ -113,7 +113,7 @@ function c78063197.eqop(e,tp,eg,ep,ev,re,r,rp)
local g=Duel.SelectMatchingCard(tp,c78063197.eqfilter,tp,LOCATION_MZONE,0,1,1,nil)
if g:GetCount()>0 then
local tc2=g:GetFirst()
local m=_G["c"..tc2:GetCode()]
local m=_G["c"..tc2:GetOriginalCode()]
if tc1:IsFaceup() and tc1:IsRelateToEffect(e) and tc1:IsControler(1-tp) and tc2 then
m.equip_monster(tc2,tp,tc1)
end
......
......@@ -34,7 +34,7 @@ function c89785779.filter(c)
return c:IsFaceup() and c:IsType(TYPE_EFFECT) and c:IsAbleToChangeControler()
end
function c89785779.eqfilter(c)
local m=_G["c"..c:GetCode()]
local m=_G["c"..c:GetOriginalCode()]
return c:IsFaceup() and ((c:IsSetCard(0x1110) and c:IsType(TYPE_FUSION)) or c:IsCode(64631466)) and m.can_equip_monster(c)
end
function c89785779.eqtg(e,tp,eg,ep,ev,re,r,rp,chk,chkc)
......@@ -53,7 +53,7 @@ function c89785779.eqop(e,tp,eg,ep,ev,re,r,rp)
local g=Duel.SelectMatchingCard(tp,c89785779.eqfilter,tp,LOCATION_MZONE,0,1,1,nil)
local tc2=g:GetFirst()
if not tc2 then return end
local m=_G["c"..tc2:GetCode()]
local m=_G["c"..tc2:GetOriginalCode()]
if tc1:IsFaceup() and tc1:IsRelateToEffect(e) and tc1:IsControler(1-tp) then
m.equip_monster(tc2,tp,tc1)
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