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,8 +101,7 @@ function c50223145.copyop(e,tp,eg,ep,ev,re,r,rp) ...@@ -100,8 +101,7 @@ 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)
...@@ -119,6 +119,7 @@ function c50223145.copyop(e,tp,eg,ep,ev,re,r,rp) ...@@ -119,6 +119,7 @@ function c50223145.copyop(e,tp,eg,ep,ev,re,r,rp)
c:RegisterEffect(e1) c:RegisterEffect(e1)
end end
end end
end
end end
function c50223145.rstop(e,tp,eg,ep,ev,re,r,rp) function c50223145.rstop(e,tp,eg,ep,ev,re,r,rp)
local c=e:GetHandler() local c=e:GetHandler()
......
...@@ -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,8 +66,7 @@ function c50223150.copyop(e,tp,eg,ep,ev,re,r,rp) ...@@ -66,8 +66,7 @@ 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)
...@@ -93,6 +92,7 @@ function c50223150.copyop(e,tp,eg,ep,ev,re,r,rp) ...@@ -93,6 +92,7 @@ function c50223150.copyop(e,tp,eg,ep,ev,re,r,rp)
c:RegisterEffect(e2) c:RegisterEffect(e2)
end end
end end
end
end end
function c50223150.rstop(e,tp,eg,ep,ev,re,r,rp) function c50223150.rstop(e,tp,eg,ep,ev,re,r,rp)
local c=e:GetHandler() local c=e:GetHandler()
......
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