Commit 8870f7ca authored by 聖園ミカ's avatar 聖園ミカ 🐟

byd

parent a590f228
No preview for this file type
...@@ -41,16 +41,19 @@ function c50223145.atkcost(e,tp,eg,ep,ev,re,r,rp,chk) ...@@ -41,16 +41,19 @@ function c50223145.atkcost(e,tp,eg,ep,ev,re,r,rp,chk)
if chk==0 then return e:GetHandler():CheckRemoveOverlayCard(tp,1,REASON_COST) end if chk==0 then return e:GetHandler():CheckRemoveOverlayCard(tp,1,REASON_COST) end
e:GetHandler():RemoveOverlayCard(tp,1,1,REASON_COST) e:GetHandler():RemoveOverlayCard(tp,1,1,REASON_COST)
end end
function c50223145.atkfilter(c)
return aux.nzatk(c) and c:IsType(TYPE_EFFECT)
end
function c50223145.atktg(e,tp,eg,ep,ev,re,r,rp,chk,chkc) function c50223145.atktg(e,tp,eg,ep,ev,re,r,rp,chk,chkc)
if chkc then return chkc:IsLocation(LOCATION_MZONE) and chkc:IsControler(1-tp) and aux.nzatk(chkc) end if chkc then return chkc:IsLocation(LOCATION_MZONE) and chkc:IsControler(1-tp) and c50223145.atkfilter(chkc) end
if chk==0 then return Duel.IsExistingTarget(aux.nzatk,tp,0,LOCATION_MZONE,1,nil) end if chk==0 then return Duel.IsExistingTarget(c50223145.atkfilter,tp,0,LOCATION_MZONE,1,nil) end
Duel.Hint(HINT_SELECTMSG,tp,HINTMSG_FACEUP) Duel.Hint(HINT_SELECTMSG,tp,HINTMSG_FACEUP)
Duel.SelectTarget(tp,aux.nzatk,tp,0,LOCATION_MZONE,1,1,nil) Duel.SelectTarget(tp,aux.nzatk,tp,0,LOCATION_MZONE,1,1,nil)
end end
function c50223145.atkop(e,tp,eg,ep,ev,re,r,rp) function c50223145.atkop(e,tp,eg,ep,ev,re,r,rp)
local c=e:GetHandler() local c=e:GetHandler()
local tc=Duel.GetFirstTarget() local tc=Duel.GetFirstTarget()
if tc:IsFaceup() and tc:IsRelateToEffect(e) and not tc:IsImmuneToEffect(e) then if tc:IsFaceup() and tc:IsRelateToEffect(e) then
local atk=tc:GetBaseAttack() local atk=tc:GetBaseAttack()
local e1=Effect.CreateEffect(c) local e1=Effect.CreateEffect(c)
e1:SetType(EFFECT_TYPE_SINGLE) e1:SetType(EFFECT_TYPE_SINGLE)
...@@ -75,19 +78,17 @@ function c50223145.copycost(e,tp,eg,ep,ev,re,r,rp,chk) ...@@ -75,19 +78,17 @@ function c50223145.copycost(e,tp,eg,ep,ev,re,r,rp,chk)
Duel.Hint(HINT_OPSELECTED,1-tp,e:GetDescription()) Duel.Hint(HINT_OPSELECTED,1-tp,e:GetDescription())
e:GetHandler():RemoveOverlayCard(tp,1,1,REASON_COST) e:GetHandler():RemoveOverlayCard(tp,1,1,REASON_COST)
end end
function c50223145.copyfilter(c)
return c:IsFaceup() and c:IsType(TYPE_EFFECT)
end
function c50223145.copytg(e,tp,eg,ep,ev,re,r,rp,chk,chkc) function c50223145.copytg(e,tp,eg,ep,ev,re,r,rp,chk,chkc)
if chkc then return chkc:IsControler(1-tp) and chkc:IsLocation(LOCATION_MZONE) and c50223145.copyfilter(chkc) end if chkc then return chkc:IsControler(1-tp) and chkc:IsLocation(LOCATION_MZONE)
if chk==0 then return Duel.IsExistingTarget(c50223145.copyfilter,tp,0,LOCATION_MZONE,1,nil) end and aux.NegateEffectMonsterFilter(chkc) end
if chk==0 then return Duel.IsExistingTarget(aux.NegateEffectMonsterFilter,tp,0,LOCATION_MZONE,1,nil) end
Duel.Hint(HINT_SELECTMSG,tp,HINTMSG_FACEUP) Duel.Hint(HINT_SELECTMSG,tp,HINTMSG_FACEUP)
Duel.SelectTarget(tp,c50223145.copyfilter,tp,0,LOCATION_MZONE,1,1,nil) Duel.SelectTarget(tp,c50223145.copyfilter,tp,0,LOCATION_MZONE,1,1,nil)
end end
function c50223145.copyop(e,tp,eg,ep,ev,re,r,rp) function c50223145.copyop(e,tp,eg,ep,ev,re,r,rp)
local c=e:GetHandler() local c=e:GetHandler()
local tc=Duel.GetFirstTarget() local tc=Duel.GetFirstTarget()
if tc:IsFaceup() and tc:IsRelateToEffect(e) and not tc:IsImmuneToEffect(e) then if tc and tc:IsFaceup() and tc:IsRelateToEffect(e) then
Duel.NegateRelatedChain(tc,RESET_TURN_SET) Duel.NegateRelatedChain(tc,RESET_TURN_SET)
local e1=Effect.CreateEffect(c) local e1=Effect.CreateEffect(c)
e1:SetType(EFFECT_TYPE_SINGLE) e1:SetType(EFFECT_TYPE_SINGLE)
...@@ -100,23 +101,23 @@ function c50223145.copyop(e,tp,eg,ep,ev,re,r,rp) ...@@ -100,23 +101,23 @@ function c50223145.copyop(e,tp,eg,ep,ev,re,r,rp)
e2:SetValue(RESET_TURN_SET) e2:SetValue(RESET_TURN_SET)
e2:SetReset(RESET_EVENT+RESETS_STANDARD) e2:SetReset(RESET_EVENT+RESETS_STANDARD)
tc:RegisterEffect(e2) tc:RegisterEffect(e2)
end if c:IsFaceup() and c:IsRelateToEffect(e) then
if tc and c:IsRelateToEffect(e) and c:IsFaceup() and tc:IsRelateToEffect(e) and tc:IsFaceup() and tc:IsType(TYPE_EFFECT) then local code=tc:GetOriginalCodeRule()
local code=tc:GetOriginalCodeRule() if not tc:IsType(TYPE_TRAPMONSTER) then
if not tc:IsType(TYPE_TRAPMONSTER) then local cid=c:CopyEffect(code,RESET_EVENT+RESETS_STANDARD+RESET_PHASE+PHASE_END,1)
local cid=c:CopyEffect(code,RESET_EVENT+RESETS_STANDARD+RESET_PHASE+PHASE_END,1) local e1=Effect.CreateEffect(c)
local e1=Effect.CreateEffect(c) e1:SetDescription(aux.Stringid(50223145,2))
e1:SetDescription(aux.Stringid(50223145,2)) e1:SetType(EFFECT_TYPE_FIELD+EFFECT_TYPE_CONTINUOUS)
e1:SetType(EFFECT_TYPE_FIELD+EFFECT_TYPE_CONTINUOUS) e1:SetCode(EVENT_PHASE+PHASE_END)
e1:SetCode(EVENT_PHASE+PHASE_END) e1:SetProperty(EFFECT_FLAG_CANNOT_DISABLE+EFFECT_FLAG_UNCOPYABLE)
e1:SetProperty(EFFECT_FLAG_CANNOT_DISABLE+EFFECT_FLAG_UNCOPYABLE) e1:SetCountLimit(1)
e1:SetCountLimit(1) e1:SetRange(LOCATION_MZONE)
e1:SetRange(LOCATION_MZONE) e1:SetReset(RESET_EVENT+RESETS_STANDARD+RESET_PHASE+PHASE_END)
e1:SetReset(RESET_EVENT+RESETS_STANDARD+RESET_PHASE+PHASE_END) e1:SetLabelObject(e1)
e1:SetLabelObject(e1) e1:SetLabel(cid)
e1:SetLabel(cid) e1:SetOperation(c50223145.rstop)
e1:SetOperation(c50223145.rstop) c:RegisterEffect(e1)
c:RegisterEffect(e1) end
end end
end end
end end
......
...@@ -36,7 +36,7 @@ function c50223150.copycost(e,tp,eg,ep,ev,re,r,rp,chk) ...@@ -36,7 +36,7 @@ function c50223150.copycost(e,tp,eg,ep,ev,re,r,rp,chk)
e:GetHandler():RemoveOverlayCard(tp,1,1,REASON_COST) e:GetHandler():RemoveOverlayCard(tp,1,1,REASON_COST)
end end
function c50223150.copyfilter(c) function c50223150.copyfilter(c)
return c:IsFaceup() and c:IsType(TYPE_EFFECT) return c:IsFaceup() and (c:GetAttack()>0 or aux.NegateEffectMonsterFilter(c))
end end
function c50223150.copytg(e,tp,eg,ep,ev,re,r,rp,chk,chkc) function c50223150.copytg(e,tp,eg,ep,ev,re,r,rp,chk,chkc)
if chkc then return chkc:IsControler(1-tp) and chkc:IsLocation(LOCATION_MZONE) and c50223150.copyfilter(chkc) end if chkc then return chkc:IsControler(1-tp) and chkc:IsLocation(LOCATION_MZONE) and c50223150.copyfilter(chkc) end
...@@ -47,7 +47,7 @@ end ...@@ -47,7 +47,7 @@ end
function c50223150.copyop(e,tp,eg,ep,ev,re,r,rp) function c50223150.copyop(e,tp,eg,ep,ev,re,r,rp)
local c=e:GetHandler() local c=e:GetHandler()
local tc=Duel.GetFirstTarget() local tc=Duel.GetFirstTarget()
if tc:IsFaceup() and tc:IsRelateToEffect(e) and not tc:IsImmuneToEffect(e) then if tc and tc:IsFaceup() and tc:IsRelateToEffect(e) then
Duel.NegateRelatedChain(tc,RESET_TURN_SET) Duel.NegateRelatedChain(tc,RESET_TURN_SET)
local e1=Effect.CreateEffect(c) local e1=Effect.CreateEffect(c)
e1:SetType(EFFECT_TYPE_SINGLE) e1:SetType(EFFECT_TYPE_SINGLE)
...@@ -66,31 +66,31 @@ function c50223150.copyop(e,tp,eg,ep,ev,re,r,rp) ...@@ -66,31 +66,31 @@ function c50223150.copyop(e,tp,eg,ep,ev,re,r,rp)
e3:SetReset(RESET_EVENT+RESETS_STANDARD) e3:SetReset(RESET_EVENT+RESETS_STANDARD)
e3:SetValue(0) e3:SetValue(0)
tc:RegisterEffect(e3) tc:RegisterEffect(e3)
end if c:IsFaceup() and c:IsRelateToEffect(e) then
if c:IsRelateToEffect(e) and c:IsFaceup() and tc:IsRelateToEffect(e) and tc:IsFaceup() and tc:IsType(TYPE_EFFECT) then local atk=tc:GetBaseAttack()
local atk=tc:GetBaseAttack() local e1=Effect.CreateEffect(c)
local e1=Effect.CreateEffect(c) e1:SetType(EFFECT_TYPE_SINGLE)
e1:SetType(EFFECT_TYPE_SINGLE) e1:SetProperty(EFFECT_FLAG_CANNOT_DISABLE)
e1:SetProperty(EFFECT_FLAG_CANNOT_DISABLE) e1:SetCode(EFFECT_UPDATE_ATTACK)
e1:SetCode(EFFECT_UPDATE_ATTACK) e1:SetReset(RESET_EVENT+RESETS_STANDARD)
e1:SetReset(RESET_EVENT+RESETS_STANDARD) e1:SetValue(atk)
e1:SetValue(atk) c:RegisterEffect(e1)
c:RegisterEffect(e1) local code=tc:GetOriginalCodeRule()
local code=tc:GetOriginalCodeRule() if not tc:IsType(TYPE_TRAPMONSTER) then
if not tc:IsType(TYPE_TRAPMONSTER) then local cid=c:CopyEffect(code,RESET_EVENT+RESETS_STANDARD+RESET_PHASE+PHASE_END,1)
local cid=c:CopyEffect(code,RESET_EVENT+RESETS_STANDARD+RESET_PHASE+PHASE_END,1) local e2=Effect.CreateEffect(c)
local e2=Effect.CreateEffect(c) e2:SetDescription(aux.Stringid(50223145,2))
e2:SetDescription(aux.Stringid(50223145,2)) e2:SetType(EFFECT_TYPE_FIELD+EFFECT_TYPE_CONTINUOUS)
e2:SetType(EFFECT_TYPE_FIELD+EFFECT_TYPE_CONTINUOUS) e2:SetCode(EVENT_PHASE+PHASE_END)
e2:SetCode(EVENT_PHASE+PHASE_END) e2:SetProperty(EFFECT_FLAG_CANNOT_DISABLE+EFFECT_FLAG_UNCOPYABLE)
e2:SetProperty(EFFECT_FLAG_CANNOT_DISABLE+EFFECT_FLAG_UNCOPYABLE) e2:SetCountLimit(1)
e2:SetCountLimit(1) e2:SetRange(LOCATION_MZONE)
e2:SetRange(LOCATION_MZONE) e2:SetReset(RESET_EVENT+RESETS_STANDARD+RESET_PHASE+PHASE_END)
e2:SetReset(RESET_EVENT+RESETS_STANDARD+RESET_PHASE+PHASE_END) e2:SetLabelObject(e2)
e2:SetLabelObject(e2) e2:SetLabel(cid)
e2:SetLabel(cid) e2:SetOperation(c50223150.rstop)
e2:SetOperation(c50223150.rstop) c:RegisterEffect(e2)
c:RegisterEffect(e2) end
end end
end end
end 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