Commit 5c4da376 authored by TanakaKotoha's avatar TanakaKotoha

y1s1

parent bd561429
No preview for this file type
...@@ -23,6 +23,7 @@ function cm.initial_effect(c) ...@@ -23,6 +23,7 @@ function cm.initial_effect(c)
e2:SetType(EFFECT_TYPE_IGNITION) e2:SetType(EFFECT_TYPE_IGNITION)
e2:SetCode(EVENT_FREE_CHAIN) e2:SetCode(EVENT_FREE_CHAIN)
e2:SetRange(LOCATION_GRAVE) e2:SetRange(LOCATION_GRAVE)
e2:SetCondition(cm.con)
e2:SetCost(aux.bfgcost) e2:SetCost(aux.bfgcost)
e2:SetOperation(cm.activate) e2:SetOperation(cm.activate)
c:RegisterEffect(e2) c:RegisterEffect(e2)
...@@ -50,7 +51,9 @@ function cm.op(e,tp,eg,ep,ev,re,r,rp) ...@@ -50,7 +51,9 @@ function cm.op(e,tp,eg,ep,ev,re,r,rp)
Duel.ConfirmCards(1-tp,g1) Duel.ConfirmCards(1-tp,g1)
end end
end end
function cm.con(e,tp,eg,ep,ev,re,r,rp)
return Duel.IsAbleToEnterBP()
end
function cm.dfilter(c) function cm.dfilter(c)
return c:IsFaceup() and c:IsSetCard(0x5a1) return c:IsFaceup() and c:IsSetCard(0x5a1)
end end
......
...@@ -74,7 +74,7 @@ function cm.activate(e,tp,eg,ep,ev,re,r,rp) ...@@ -74,7 +74,7 @@ function cm.activate(e,tp,eg,ep,ev,re,r,rp)
end end
end end
function cm.atkcost(e,tp,eg,ep,ev,re,r,rp,chk) function cm.atkcost(e,tp,eg,ep,ev,re,r,rp,chk)
if chk==0 then return e:GetHandler():IsAbleToRemoveAsCost() and Duel.GetCustomActivityCount(m,tp,ACTIVITY_SPSUMMON)==0 end if chk==0 then return e:GetHandler():IsAbleToRemoveAsCost() and Duel.GetCustomActivityCount(m,tp,ACTIVITY_SPSUMMON)==0 and Duel.IsAbleToEnterBP() end
Duel.Remove(e:GetHandler(),POS_FACEUP,REASON_COST) Duel.Remove(e:GetHandler(),POS_FACEUP,REASON_COST)
local e1=Effect.CreateEffect(e:GetHandler()) local e1=Effect.CreateEffect(e:GetHandler())
e1:SetType(EFFECT_TYPE_FIELD) e1:SetType(EFFECT_TYPE_FIELD)
......
...@@ -77,7 +77,7 @@ function c16001012.con(e,tp,eg,ep,ev,re,r,rp) ...@@ -77,7 +77,7 @@ function c16001012.con(e,tp,eg,ep,ev,re,r,rp)
if not re then return end if not re then return end
local c,rc=e:GetHandler(),re:GetHandler() local c,rc=e:GetHandler(),re:GetHandler()
return c:IsReason(REASON_COST) and re:IsHasType(0x7e0) and re:IsActiveType(TYPE_MONSTER) return c:IsReason(REASON_COST) and re:IsHasType(0x7e0) and re:IsActiveType(TYPE_MONSTER)
and rc:IsSetCard(0x5c1) and rc:IsType(TYPE_XYZ) and c:IsPreviousLocation(LOCATION_OVERLAY) and rc:IsSetCard(0x5c1) and rc:IsType(TYPE_XYZ) and c:IsPreviousLocation(LOCATION_OVERLAY) and Duel.IsAbleToEnterBP()
end end
function c16001012.op(e,tp,eg,ep,ev,re,r,rp) function c16001012.op(e,tp,eg,ep,ev,re,r,rp)
local e1=Effect.CreateEffect(e:GetHandler()) local e1=Effect.CreateEffect(e:GetHandler())
......
...@@ -41,7 +41,7 @@ function cm.thop(e,tp) ...@@ -41,7 +41,7 @@ function cm.thop(e,tp)
end end
end end
function cm.drcon(e,tp,eg,ep,ev,re,r,rp) function cm.drcon(e,tp,eg,ep,ev,re,r,rp)
return eg:GetFirst():GetColumnGroup():IsContains(e:GetHandler()) return eg:GetFirst():GetColumnGroup():IsContains(e:GetHandler()) and Duel.IsAbleToEnterBP()
end end
function cm.drop(e,tp) function cm.drop(e,tp)
Duel.Hint(HINT_CARD,0,m) Duel.Hint(HINT_CARD,0,m)
......
...@@ -48,7 +48,7 @@ function c21520186.dafilter1(c) ...@@ -48,7 +48,7 @@ function c21520186.dafilter1(c)
return c:IsSetCard(0x490) and c:IsFaceup() return c:IsSetCard(0x490) and c:IsFaceup()
end end
function c21520186.dacon(e,tp,eg,ep,ev,re,r,rp) function c21520186.dacon(e,tp,eg,ep,ev,re,r,rp)
return e:GetHandler():GetType()&(TYPE_SPELL+TYPE_CONTINUOUS)==TYPE_SPELL+TYPE_CONTINUOUS return e:GetHandler():GetType()&(TYPE_SPELL+TYPE_CONTINUOUS)==TYPE_SPELL+TYPE_CONTINUOUS and Duel.IsAbleToEnterBP()
end end
function c21520186.datg(e,tp,eg,ep,ev,re,r,rp,chk,chkc) function c21520186.datg(e,tp,eg,ep,ev,re,r,rp,chk,chkc)
if chkc then return chkc:IsLocation(LOCATION_MZONE) and chkc:IsControler(tp) and c21520186.dafilter1(chkc) end if chkc then return chkc:IsLocation(LOCATION_MZONE) and chkc:IsControler(tp) and c21520186.dafilter1(chkc) end
......
...@@ -49,7 +49,7 @@ function cm.filter(c) ...@@ -49,7 +49,7 @@ function cm.filter(c)
return c:IsType(TYPE_SPIRIT) and c:IsAbleToDeckOrExtraAsCost() return c:IsType(TYPE_SPIRIT) and c:IsAbleToDeckOrExtraAsCost()
end end
function cm.cost(e,tp,eg,ep,ev,re,r,rp,chk) function cm.cost(e,tp,eg,ep,ev,re,r,rp,chk)
if chk==0 then return Duel.IsExistingMatchingCard(cm.filter,tp,LOCATION_GRAVE,0,3,nil) end if chk==0 then return Duel.IsExistingMatchingCard(cm.filter,tp,LOCATION_GRAVE,0,3,nil) and Duel.IsAbleToEnterBP() end
Duel.Hint(HINT_SELECTMSG,tp,HINTMSG_TODECK) Duel.Hint(HINT_SELECTMSG,tp,HINTMSG_TODECK)
local g=Duel.SelectMatchingCard(tp,cm.filter,tp,LOCATION_GRAVE,0,3,3,nil) local g=Duel.SelectMatchingCard(tp,cm.filter,tp,LOCATION_GRAVE,0,3,3,nil)
Duel.SendtoDeck(g,nil,3,REASON_COST) Duel.SendtoDeck(g,nil,3,REASON_COST)
......
...@@ -51,7 +51,7 @@ function c33310152.tgfil(c) ...@@ -51,7 +51,7 @@ function c33310152.tgfil(c)
end end
function c33310152.tg(e,tp,eg,ep,ev,re,r,rp,chk,chkc) function c33310152.tg(e,tp,eg,ep,ev,re,r,rp,chk,chkc)
if chkc then return c33310152.tgfil(chkc) and chkc:IsLocation(LOCATION_MZONE) and chkc:IsControler(tp) end if chkc then return c33310152.tgfil(chkc) and chkc:IsLocation(LOCATION_MZONE) and chkc:IsControler(tp) end
if chk==0 then return Duel.IsExistingTarget(c33310152.tgfil,tp,LOCATION_MZONE,0,1,nil) end if chk==0 then return Duel.IsExistingTarget(c33310152.tgfil,tp,LOCATION_MZONE,0,1,nil) and Duel.IsAbleToEnterBP() end
Duel.SelectTarget(tp,c33310152.tgfil,tp,LOCATION_MZONE,0,1,1,nil) Duel.SelectTarget(tp,c33310152.tgfil,tp,LOCATION_MZONE,0,1,1,nil)
end end
function c33310152.op(e,tp,eg,ep,ev,re,r,rp) function c33310152.op(e,tp,eg,ep,ev,re,r,rp)
......
...@@ -14,7 +14,7 @@ function c33400101.initial_effect(c) ...@@ -14,7 +14,7 @@ function c33400101.initial_effect(c)
end end
function c33400101.cost(e,tp,eg,ep,ev,re,r,rp,chk) function c33400101.cost(e,tp,eg,ep,ev,re,r,rp,chk)
local ct=e:GetLabel() local ct=e:GetLabel()
if chk==0 then return Duel.IsCanRemoveCounter(tp,1,0,0x34f,ct,REASON_COST) end if chk==0 then return Duel.IsCanRemoveCounter(tp,1,0,0x34f,ct,REASON_COST) and Duel.IsAbleToEnterBP() end
Duel.Hint(HINT_OPSELECTED,1-tp,e:GetDescription()) Duel.Hint(HINT_OPSELECTED,1-tp,e:GetDescription())
Duel.RemoveCounter(tp,1,0,0x34f,ct,REASON_COST) Duel.RemoveCounter(tp,1,0,0x34f,ct,REASON_COST)
end end
......
...@@ -8,7 +8,7 @@ function cm.initial_effect(c) ...@@ -8,7 +8,7 @@ function cm.initial_effect(c)
rsneov.LPChangeFun(c) rsneov.LPChangeFun(c)
end end
function cm.tg(e,tp,eg,ep,ev,re,r,rp,chk) function cm.tg(e,tp,eg,ep,ev,re,r,rp,chk)
if chk==0 then return Duel.GetCurrentPhase()==PHASE_MAIN1 end if chk==0 then return Duel.GetCurrentPhase()==PHASE_MAIN1 and Duel.IsAbleToEnterBP() end
end end
function cm.op(e,tp,eg,ep,ev,re,r,rp) function cm.op(e,tp,eg,ep,ev,re,r,rp)
local c=e:GetHandler() local c=e:GetHandler()
......
...@@ -21,6 +21,7 @@ function c47500104.initial_effect(c) ...@@ -21,6 +21,7 @@ function c47500104.initial_effect(c)
e2:SetRange(LOCATION_PZONE) e2:SetRange(LOCATION_PZONE)
e2:SetCountLimit(1,47500104) e2:SetCountLimit(1,47500104)
e2:SetTargetRange(LOCATION_MZONE,0) e2:SetTargetRange(LOCATION_MZONE,0)
e2:SetCondition(c47500104.dacon)
e2:SetOperation(c47500104.csop) e2:SetOperation(c47500104.csop)
c:RegisterEffect(e2) c:RegisterEffect(e2)
--damage --damage
...@@ -63,6 +64,9 @@ end ...@@ -63,6 +64,9 @@ end
function c47500104.psplimit(e,c,tp,sumtp,sumpos) function c47500104.psplimit(e,c,tp,sumtp,sumpos)
return not c47500104.pefilter(c) and bit.band(sumtp,SUMMON_TYPE_PENDULUM)==SUMMON_TYPE_PENDULUM return not c47500104.pefilter(c) and bit.band(sumtp,SUMMON_TYPE_PENDULUM)==SUMMON_TYPE_PENDULUM
end end
function c47500104.dacon(e,tp,eg,ep,ev,re,r,rp)
return Duel.IsAbleToEnterBP()
end
function c47500104.csop(e,tp,eg,ep,ev,re,r,rp) function c47500104.csop(e,tp,eg,ep,ev,re,r,rp)
if not e:GetHandler():IsRelateToEffect(e) then return end if not e:GetHandler():IsRelateToEffect(e) then return end
local e1=Effect.CreateEffect(e:GetHandler()) local e1=Effect.CreateEffect(e:GetHandler())
......
...@@ -98,7 +98,7 @@ function c47510028.atkop(e,tp,eg,ep,ev,re,r,rp) ...@@ -98,7 +98,7 @@ function c47510028.atkop(e,tp,eg,ep,ev,re,r,rp)
end end
end end
function c47510028.cost(e,tp,eg,ep,ev,re,r,rp,chk) function c47510028.cost(e,tp,eg,ep,ev,re,r,rp,chk)
if chk==0 then return e:GetHandler():IsAbleToGraveAsCost() end if chk==0 then return e:GetHandler():IsAbleToGraveAsCost() and Duel.IsAbleToEnterBP() end
Duel.SendtoGrave(e:GetHandler(),REASON_COST) Duel.SendtoGrave(e:GetHandler(),REASON_COST)
end end
function c47510028.filter(c) function c47510028.filter(c)
......
...@@ -59,7 +59,7 @@ function c47510203.splimit(e,c) ...@@ -59,7 +59,7 @@ function c47510203.splimit(e,c)
return not c:IsAttribute(ATTRIBUTE_FIRE) return not c:IsAttribute(ATTRIBUTE_FIRE)
end end
function c47510203.mcost(e,tp,eg,ep,ev,re,r,rp,chk) function c47510203.mcost(e,tp,eg,ep,ev,re,r,rp,chk)
if chk==0 then return e:GetHandler() end if chk==0 then return e:GetHandler() and Duel.IsAbleToEnterBP() end
Duel.SendtoExtraP(e:GetHandler(),nil,0,REASON_COST) Duel.SendtoExtraP(e:GetHandler(),nil,0,REASON_COST)
end end
function c47510203.mtg(e,tp,eg,ep,ev,re,r,rp,chk) function c47510203.mtg(e,tp,eg,ep,ev,re,r,rp,chk)
......
...@@ -64,7 +64,7 @@ function c47510209.splimit(e,c) ...@@ -64,7 +64,7 @@ function c47510209.splimit(e,c)
return not (c:IsAttribute(ATTRIBUTE_LIGHT) or c:IsAttribute(ATTRIBUTE_DARK)) return not (c:IsAttribute(ATTRIBUTE_LIGHT) or c:IsAttribute(ATTRIBUTE_DARK))
end end
function c47510209.mcost(e,tp,eg,ep,ev,re,r,rp,chk) function c47510209.mcost(e,tp,eg,ep,ev,re,r,rp,chk)
if chk==0 then return e:GetHandler() end if chk==0 then return e:GetHandler() and Duel.IsAbleToEnterBP() end
Duel.SendtoExtraP(e:GetHandler(),nil,0,REASON_COST) Duel.SendtoExtraP(e:GetHandler(),nil,0,REASON_COST)
end end
function c47510209.mfilter(c) function c47510209.mfilter(c)
......
...@@ -117,7 +117,7 @@ function c47510225.atkop(e,tp,eg,ep,ev,re,r,rp) ...@@ -117,7 +117,7 @@ function c47510225.atkop(e,tp,eg,ep,ev,re,r,rp)
end end
end end
function c47510225.dacon(e) function c47510225.dacon(e)
return e:GetHandler():GetFlagEffect(47510225)==0 return e:GetHandler():GetFlagEffect(47510225)==0 and Duel.IsAbleToEnterBP()
end end
function c47510225.datg(e,tp,eg,ep,ev,re,r,rp,chk) function c47510225.datg(e,tp,eg,ep,ev,re,r,rp,chk)
if chk==0 then return e:GetHandler():GetEffectCount(EFFECT_EXTRA_ATTACK)==0 end if chk==0 then return e:GetHandler():GetEffectCount(EFFECT_EXTRA_ATTACK)==0 end
......
...@@ -26,7 +26,7 @@ function c60150642.filter(c) ...@@ -26,7 +26,7 @@ function c60150642.filter(c)
end end
function c60150642.target(e,tp,eg,ep,ev,re,r,rp,chk,chkc) function c60150642.target(e,tp,eg,ep,ev,re,r,rp,chk,chkc)
if chkc then return chkc:IsControler(tp) and chkc:IsLocation(LOCATION_MZONE) and c60150642.filter(chkc) end if chkc then return chkc:IsControler(tp) and chkc:IsLocation(LOCATION_MZONE) and c60150642.filter(chkc) end
if chk==0 then return Duel.IsExistingTarget(c60150642.filter,tp,LOCATION_MZONE,0,1,nil) end if chk==0 then return Duel.IsExistingTarget(c60150642.filter,tp,LOCATION_MZONE,0,1,nil) and Duel.IsAbleToEnterBP() end
Duel.Hint(HINT_SELECTMSG,tp,HINTMSG_FACEUP) Duel.Hint(HINT_SELECTMSG,tp,HINTMSG_FACEUP)
Duel.SelectTarget(tp,c60150642.filter,tp,LOCATION_MZONE,0,1,1,nil) Duel.SelectTarget(tp,c60150642.filter,tp,LOCATION_MZONE,0,1,1,nil)
end end
......
...@@ -48,7 +48,7 @@ function c60152304.e1tgfilter(c) ...@@ -48,7 +48,7 @@ function c60152304.e1tgfilter(c)
end end
function c60152304.e1tg(e,tp,eg,ep,ev,re,r,rp,chk,chkc) function c60152304.e1tg(e,tp,eg,ep,ev,re,r,rp,chk,chkc)
if chkc then return chkc:IsLocation(LOCATION_MZONE) and chkc:IsControler(tp) and c60152304.e1tgfilter(chkc) end if chkc then return chkc:IsLocation(LOCATION_MZONE) and chkc:IsControler(tp) and c60152304.e1tgfilter(chkc) end
if chk==0 then return Duel.IsExistingTarget(c60152304.e1tgfilter,tp,LOCATION_MZONE,0,1,nil) end if chk==0 then return Duel.IsExistingTarget(c60152304.e1tgfilter,tp,LOCATION_MZONE,0,1,nil) and Duel.IsAbleToEnterBP() end
Duel.Hint(HINT_SELECTMSG,tp,HINTMSG_FACEUP) Duel.Hint(HINT_SELECTMSG,tp,HINTMSG_FACEUP)
Duel.SelectTarget(tp,c60152304.e1tgfilter,tp,LOCATION_MZONE,0,1,1,nil) Duel.SelectTarget(tp,c60152304.e1tgfilter,tp,LOCATION_MZONE,0,1,1,nil)
Duel.Hint(HINT_OPSELECTED,1-tp,e:GetDescription()) Duel.Hint(HINT_OPSELECTED,1-tp,e:GetDescription())
......
...@@ -43,7 +43,7 @@ function c65020024.filter(c) ...@@ -43,7 +43,7 @@ function c65020024.filter(c)
end end
function c65020024.target(e,tp,eg,ep,ev,re,r,rp,chk,chkc) function c65020024.target(e,tp,eg,ep,ev,re,r,rp,chk,chkc)
if chkc then return chkc:IsLocation(LOCATION_MZONE) and chkc:IsControler(tp) and c65020024.filter(chkc) end if chkc then return chkc:IsLocation(LOCATION_MZONE) and chkc:IsControler(tp) and c65020024.filter(chkc) end
if chk==0 then return Duel.IsExistingTarget(c65020024.filter,tp,LOCATION_MZONE,0,1,nil) end if chk==0 then return Duel.IsExistingTarget(c65020024.filter,tp,LOCATION_MZONE,0,1,nil)and Duel.IsAbleToEnterBP() end
Duel.Hint(HINT_SELECTMSG,tp,HINTMSG_FACEUP) Duel.Hint(HINT_SELECTMSG,tp,HINTMSG_FACEUP)
Duel.SelectTarget(tp,c65020024.filter,tp,LOCATION_MZONE,0,1,1,nil) Duel.SelectTarget(tp,c65020024.filter,tp,LOCATION_MZONE,0,1,1,nil)
Duel.Hint(HINT_OPSELECTED,1-tp,e:GetDescription()) Duel.Hint(HINT_OPSELECTED,1-tp,e:GetDescription())
......
...@@ -21,6 +21,7 @@ function c81041028.initial_effect(c) ...@@ -21,6 +21,7 @@ function c81041028.initial_effect(c)
e2:SetRange(LOCATION_MZONE) e2:SetRange(LOCATION_MZONE)
e2:SetProperty(EFFECT_FLAG_CARD_TARGET) e2:SetProperty(EFFECT_FLAG_CARD_TARGET)
e2:SetCountLimit(1,81041928) e2:SetCountLimit(1,81041928)
e2:SetCondition(aux.bpcon)
e2:SetTarget(c81041028.atktg) e2:SetTarget(c81041028.atktg)
e2:SetOperation(c81041028.atkop) e2:SetOperation(c81041028.atkop)
c:RegisterEffect(e2) c:RegisterEffect(e2)
......
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