Commit 0425d74d authored by VanillaSalt's avatar VanillaSalt

fix

parent 3d406169
...@@ -23,7 +23,7 @@ function c21143940.target(e,tp,eg,ep,ev,re,r,rp,chk,chkc) ...@@ -23,7 +23,7 @@ function c21143940.target(e,tp,eg,ep,ev,re,r,rp,chk,chkc)
and Duel.IsExistingTarget(c21143940.filter,tp,LOCATION_MZONE,0,1,nil,e,tp) end and Duel.IsExistingTarget(c21143940.filter,tp,LOCATION_MZONE,0,1,nil,e,tp) end
Duel.Hint(HINT_SELECTMSG,tp,HINTMSG_TOGRAVE) Duel.Hint(HINT_SELECTMSG,tp,HINTMSG_TOGRAVE)
local g=Duel.SelectTarget(tp,c21143940.filter,tp,LOCATION_MZONE,0,1,1,nil,e,tp) local g=Duel.SelectTarget(tp,c21143940.filter,tp,LOCATION_MZONE,0,1,1,nil,e,tp)
Duel.SetOperationInfo(0,CATEGORY_SPECIAL_SUMMON,nil,1,tp,LOCATION_DECK) Duel.SetOperationInfo(0,CATEGORY_SPECIAL_SUMMON,nil,1,tp,LOCATION_EXTRA)
end end
function c21143940.activate(e,tp,eg,ep,ev,re,r,rp) function c21143940.activate(e,tp,eg,ep,ev,re,r,rp)
local tc=Duel.GetFirstTarget() local tc=Duel.GetFirstTarget()
......
...@@ -26,6 +26,7 @@ function c23234094.sptg(e,tp,eg,ep,ev,re,r,rp,chk,chkc) ...@@ -26,6 +26,7 @@ function c23234094.sptg(e,tp,eg,ep,ev,re,r,rp,chk,chkc)
Duel.SetOperationInfo(0,CATEGORY_SPECIAL_SUMMON,nil,1,tp,LOCATION_HAND) Duel.SetOperationInfo(0,CATEGORY_SPECIAL_SUMMON,nil,1,tp,LOCATION_HAND)
end end
function c23234094.spop(e,tp,eg,ep,ev,re,r,rp) function c23234094.spop(e,tp,eg,ep,ev,re,r,rp)
if Duel.GetLocationCount(tp,LOCATION_MZONE)<=0 then return end
Duel.Hint(HINT_SELECTMSG,tp,HINTMSG_SPSUMMON) Duel.Hint(HINT_SELECTMSG,tp,HINTMSG_SPSUMMON)
local g=Duel.SelectMatchingCard(tp,c23234094.filter,tp,LOCATION_HAND,0,1,1,nil,e,tp) local g=Duel.SelectMatchingCard(tp,c23234094.filter,tp,LOCATION_HAND,0,1,1,nil,e,tp)
if g:GetCount()>0 then if g:GetCount()>0 then
......
...@@ -24,7 +24,7 @@ function c2732323.sptg(e,tp,eg,ep,ev,re,r,rp,chk,chkc) ...@@ -24,7 +24,7 @@ function c2732323.sptg(e,tp,eg,ep,ev,re,r,rp,chk,chkc)
end end
function c2732323.spop(e,tp,eg,ep,ev,re,r,rp) function c2732323.spop(e,tp,eg,ep,ev,re,r,rp)
local tc=Duel.GetFirstTarget() local tc=Duel.GetFirstTarget()
if tc and Duel.SpecialSummon(tc,0,tp,tp,false,false,POS_FACEUP)>0 then if tc and tc:IsRelateToEffect(e) and Duel.SpecialSummon(tc,0,tp,tp,false,false,POS_FACEUP)>0 then
local a=Duel.GetAttacker() local a=Duel.GetAttacker()
if a:IsOnField() and a:IsFaceup() then if a:IsOnField() and a:IsFaceup() then
Duel.CalculateDamage(a,tc) Duel.CalculateDamage(a,tc)
......
...@@ -15,9 +15,7 @@ function c29228529.costfilter(c) ...@@ -15,9 +15,7 @@ function c29228529.costfilter(c)
end end
function c29228529.cost(e,tp,eg,ep,ev,re,r,rp,chk) function c29228529.cost(e,tp,eg,ep,ev,re,r,rp,chk)
if chk==0 then return Duel.IsExistingMatchingCard(c29228529.costfilter,tp,LOCATION_HAND,0,2,e:GetHandler()) end if chk==0 then return Duel.IsExistingMatchingCard(c29228529.costfilter,tp,LOCATION_HAND,0,2,e:GetHandler()) end
Duel.Hint(HINT_SELECTMSG,tp,HINTMSG_TOGRAVE) Duel.DiscardHand(tp,c29228529.costfilter,2,2,REASON_COST)
local g=Duel.SelectMatchingCard(tp,c29228529.costfilter,tp,LOCATION_HAND,0,2,2,nil)
Duel.SendtoGrave(g,REASON_COST)
end end
function c29228529.filter(c) function c29228529.filter(c)
return c:IsType(TYPE_SPELL) and c:IsAbleToHand() return c:IsType(TYPE_SPELL) and c:IsAbleToHand()
......
...@@ -22,7 +22,7 @@ function c303660.initial_effect(c) ...@@ -22,7 +22,7 @@ function c303660.initial_effect(c)
e3:SetCode(EFFECT_IMMUNE_EFFECT) e3:SetCode(EFFECT_IMMUNE_EFFECT)
e3:SetProperty(EFFECT_FLAG_SET_AVAILABLE) e3:SetProperty(EFFECT_FLAG_SET_AVAILABLE)
e3:SetRange(LOCATION_SZONE) e3:SetRange(LOCATION_SZONE)
e3:SetTargetRange(LOCATION_ONFIELD,0) e3:SetTargetRange(LOCATION_ONFIELD,LOCATION_ONFIELD)
e3:SetTarget(c303660.etarget) e3:SetTarget(c303660.etarget)
e3:SetValue(c303660.efilter) e3:SetValue(c303660.efilter)
c:RegisterEffect(e3) c:RegisterEffect(e3)
...@@ -58,7 +58,7 @@ function c303660.operation(e,tp,eg,ep,ev,re,r,rp) ...@@ -58,7 +58,7 @@ function c303660.operation(e,tp,eg,ep,ev,re,r,rp)
end end
end end
function c303660.etarget(e,c) function c303660.etarget(e,c)
return c:IsType(TYPE_TRAP) return c:IsType(TYPE_TRAP) and c:GetControler()==e:GetHandler():GetEquipTarget():GetControler()
end end
function c303660.efilter(e,re) function c303660.efilter(e,re)
return re:GetHandler()==e:GetHandler():GetEquipTarget() return re:GetHandler()==e:GetHandler():GetEquipTarget()
......
...@@ -21,7 +21,7 @@ end ...@@ -21,7 +21,7 @@ end
function c32744558.target(e,tp,eg,ep,ev,re,r,rp,chk) function c32744558.target(e,tp,eg,ep,ev,re,r,rp,chk)
if chk==0 then return Duel.GetLocationCount(tp,LOCATION_MZONE)>0 if chk==0 then return Duel.GetLocationCount(tp,LOCATION_MZONE)>0
and Duel.IsExistingMatchingCard(c32744558.filter,tp,LOCATION_HAND,0,1,nil,e,tp) end and Duel.IsExistingMatchingCard(c32744558.filter,tp,LOCATION_HAND,0,1,nil,e,tp) end
Duel.SetOperationInfo(0,CATEGORY_SPECIAL_SUMMON,nil,1,tp,LOCATION_DECK) Duel.SetOperationInfo(0,CATEGORY_SPECIAL_SUMMON,nil,1,tp,LOCATION_HAND)
end end
function c32744558.operation(e,tp,eg,ep,ev,re,r,rp) function c32744558.operation(e,tp,eg,ep,ev,re,r,rp)
if Duel.GetLocationCount(tp,LOCATION_MZONE)<=0 then return end if Duel.GetLocationCount(tp,LOCATION_MZONE)<=0 then return end
......
...@@ -16,7 +16,8 @@ function c39284521.spfilter(c) ...@@ -16,7 +16,8 @@ function c39284521.spfilter(c)
end end
function c39284521.spcon(e,c) function c39284521.spcon(e,c)
if c==nil then return true end if c==nil then return true end
return Duel.IsExistingMatchingCard(c39284521.spfilter,c:GetControler(),LOCATION_HAND,0,1,c) return Duel.GetLocationCount(c:GetControler(),LOCATION_MZONE)>0
and Duel.IsExistingMatchingCard(c39284521.spfilter,c:GetControler(),LOCATION_HAND,0,1,c)
end end
function c39284521.spop(e,tp,eg,ep,ev,re,r,rp,c) function c39284521.spop(e,tp,eg,ep,ev,re,r,rp,c)
Duel.Hint(HINT_SELECTMSG,tp,HINTMSG_TOGRAVE) Duel.Hint(HINT_SELECTMSG,tp,HINTMSG_TOGRAVE)
...@@ -26,6 +27,6 @@ function c39284521.spop(e,tp,eg,ep,ev,re,r,rp,c) ...@@ -26,6 +27,6 @@ function c39284521.spop(e,tp,eg,ep,ev,re,r,rp,c)
e1:SetType(EFFECT_TYPE_SINGLE) e1:SetType(EFFECT_TYPE_SINGLE)
e1:SetCode(EFFECT_UPDATE_ATTACK) e1:SetCode(EFFECT_UPDATE_ATTACK)
e1:SetValue(g:GetCount()*800) e1:SetValue(g:GetCount()*800)
e1:SetReset(RESET_EVENT+0xfe0000) e1:SetReset(RESET_EVENT+0xff0000)
c:RegisterEffect(e1) c:RegisterEffect(e1)
end end
...@@ -8,4 +8,11 @@ function c4130270.initial_effect(c) ...@@ -8,4 +8,11 @@ function c4130270.initial_effect(c)
e1:SetRange(LOCATION_MZONE) e1:SetRange(LOCATION_MZONE)
e1:SetTargetRange(LOCATION_MZONE,LOCATION_MZONE) e1:SetTargetRange(LOCATION_MZONE,LOCATION_MZONE)
c:RegisterEffect(e1) c:RegisterEffect(e1)
local e2=e1:Clone()
e2:SetCode(EFFECT_CANNOT_TO_HAND)
e2:SetTarget(c4130270.etarget)
c:RegisterEffect(e2)
end
function c4130270.etarget(e,c)
return c:IsType(TYPE_FUSION+TYPE_SYNCHRO+TYPE_XYZ)
end end
...@@ -2,7 +2,7 @@ ...@@ -2,7 +2,7 @@
function c46031686.initial_effect(c) function c46031686.initial_effect(c)
--Activate --Activate
local e1=Effect.CreateEffect(c) local e1=Effect.CreateEffect(c)
e1:SetCategory(CATEGORY_NEGATE+CATEGORY_DESTROY+CATEGORY_DRAW) e1:SetCategory(CATEGORY_NEGATE+CATEGORY_DRAW)
e1:SetType(EFFECT_TYPE_ACTIVATE) e1:SetType(EFFECT_TYPE_ACTIVATE)
e1:SetCode(EVENT_CHAINING) e1:SetCode(EVENT_CHAINING)
e1:SetCondition(c46031686.condition) e1:SetCondition(c46031686.condition)
...@@ -15,18 +15,12 @@ function c46031686.condition(e,tp,eg,ep,ev,re,r,rp) ...@@ -15,18 +15,12 @@ function c46031686.condition(e,tp,eg,ep,ev,re,r,rp)
return ex and (re:IsActiveType(TYPE_MONSTER) or re:IsHasType(EFFECT_TYPE_ACTIVATE)) and Duel.IsChainNegatable(ev) return ex and (re:IsActiveType(TYPE_MONSTER) or re:IsHasType(EFFECT_TYPE_ACTIVATE)) and Duel.IsChainNegatable(ev)
end end
function c46031686.target(e,tp,eg,ep,ev,re,r,rp,chk) function c46031686.target(e,tp,eg,ep,ev,re,r,rp,chk)
if chk==0 then return Duel.IsPlayerCanDraw(tp) and Duel.IsPlayerCanDraw(1-tp,1) end if chk==0 then return Duel.IsPlayerCanDraw(tp,1) and Duel.IsPlayerCanDraw(1-tp,1) end
Duel.SetOperationInfo(0,CATEGORY_NEGATE,eg,1,0,0) Duel.SetOperationInfo(0,CATEGORY_NEGATE,eg,1,0,0)
if re:GetHandler():IsDestructable() and re:GetHandler():IsRelateToEffect(re) then
Duel.SetOperationInfo(0,CATEGORY_DESTROY,eg,1,0,0)
end
Duel.SetOperationInfo(0,CATEGORY_DRAW,nil,0,PLAYER_ALL,1) Duel.SetOperationInfo(0,CATEGORY_DRAW,nil,0,PLAYER_ALL,1)
end end
function c46031686.activate(e,tp,eg,ep,ev,re,r,rp) function c46031686.activate(e,tp,eg,ep,ev,re,r,rp)
Duel.NegateActivation(ev) Duel.NegateActivation(ev)
if re:GetHandler():IsRelateToEffect(re) then
Duel.Destroy(eg,REASON_EFFECT)
end
Duel.Draw(tp,1,REASON_EFFECT) Duel.Draw(tp,1,REASON_EFFECT)
Duel.Draw(1-tp,1,REASON_EFFECT) Duel.Draw(1-tp,1,REASON_EFFECT)
end end
...@@ -21,7 +21,7 @@ function c46128076.target(e,tp,eg,ep,ev,re,r,rp,chk) ...@@ -21,7 +21,7 @@ function c46128076.target(e,tp,eg,ep,ev,re,r,rp,chk)
if chk==0 then return true end if chk==0 then return true end
local ct=Duel.GetFieldGroupCount(tp,0,LOCATION_MZONE) local ct=Duel.GetFieldGroupCount(tp,0,LOCATION_MZONE)
Duel.SetTargetPlayer(1-tp) Duel.SetTargetPlayer(1-tp)
Duel.SetOperationInfo(0,CATEGORY_DAMAGE,nil,0,tp,ct*300) Duel.SetOperationInfo(0,CATEGORY_DAMAGE,nil,0,1-tp,ct*300)
end end
function c46128076.operation(e,tp,eg,ep,ev,re,r,rp) function c46128076.operation(e,tp,eg,ep,ev,re,r,rp)
local p=Duel.GetChainInfo(0,CHAININFO_TARGET_PLAYER) local p=Duel.GetChainInfo(0,CHAININFO_TARGET_PLAYER)
......
--メタル·デビルゾア --メタル·デビルゾア
function c50705071.initial_effect(c) function c50705071.initial_effect(c)
c:EnableReviveLimit()
--spsummon proc --spsummon proc
local e1=Effect.CreateEffect(c) local e1=Effect.CreateEffect(c)
e1:SetType(EFFECT_TYPE_FIELD) e1:SetType(EFFECT_TYPE_FIELD)
e1:SetCode(EFFECT_SPSUMMON_PROC) e1:SetCode(EFFECT_SPSUMMON_PROC)
e1:SetProperty(EFFECT_FLAG_UNCOPYABLE) e1:SetProperty(EFFECT_FLAG_UNCOPYABLE)
e1:SetRange(LOCATION_HAND+LOCATION_DECK) e1:SetRange(LOCATION_DECK)
e1:SetCondition(c50705071.spcon) e1:SetCondition(c50705071.spcon)
e1:SetOperation(c50705071.spop) e1:SetOperation(c50705071.spop)
c:RegisterEffect(e1) c:RegisterEffect(e1)
......
...@@ -18,8 +18,6 @@ function c51402908.initial_effect(c) ...@@ -18,8 +18,6 @@ function c51402908.initial_effect(c)
e3:SetCategory(CATEGORY_SPECIAL_SUMMON) e3:SetCategory(CATEGORY_SPECIAL_SUMMON)
e3:SetType(EFFECT_TYPE_FIELD+EFFECT_TYPE_TRIGGER_O) e3:SetType(EFFECT_TYPE_FIELD+EFFECT_TYPE_TRIGGER_O)
e3:SetRange(LOCATION_GRAVE) e3:SetRange(LOCATION_GRAVE)
e3:SetCountLimit(1)
e3:SetProperty(EFFECT_FLAG_REPEAT)
e3:SetCode(EVENT_PHASE+PHASE_STANDBY) e3:SetCode(EVENT_PHASE+PHASE_STANDBY)
e3:SetCondition(c51402908.spcon) e3:SetCondition(c51402908.spcon)
e3:SetCost(c51402908.spcost) e3:SetCost(c51402908.spcost)
...@@ -48,6 +46,7 @@ function c51402908.sptg(e,tp,eg,ep,ev,re,r,rp,chk) ...@@ -48,6 +46,7 @@ function c51402908.sptg(e,tp,eg,ep,ev,re,r,rp,chk)
if chk==0 then return Duel.GetLocationCount(tp,LOCATION_MZONE)>0 if chk==0 then return Duel.GetLocationCount(tp,LOCATION_MZONE)>0
and e:GetHandler():IsCanBeSpecialSummoned(e,0,tp,true,false) end and e:GetHandler():IsCanBeSpecialSummoned(e,0,tp,true,false) end
Duel.SetOperationInfo(0,CATEGORY_SPECIAL_SUMMON,e:GetHandler(),1,0,0) Duel.SetOperationInfo(0,CATEGORY_SPECIAL_SUMMON,e:GetHandler(),1,0,0)
e:GetHandler():ResetFlagEffect(51402908)
end end
function c51402908.spop(e,tp,eg,ep,ev,re,r,rp) function c51402908.spop(e,tp,eg,ep,ev,re,r,rp)
local c=e:GetHandler() local c=e:GetHandler()
......
...@@ -15,7 +15,7 @@ function c57115864.condition(e,tp,eg,ep,ev,re,r,rp) ...@@ -15,7 +15,7 @@ function c57115864.condition(e,tp,eg,ep,ev,re,r,rp)
end end
function c57115864.target(e,tp,eg,ep,ev,re,r,rp,chk,chkc) function c57115864.target(e,tp,eg,ep,ev,re,r,rp,chk,chkc)
local tg=Duel.GetAttacker() local tg=Duel.GetAttacker()
if chkc then return chkc==tg end if chkc then return chkc==tg and Duel.IsExistingMatchingCard(c57115864.filter,tp,LOCATION_MZONE,0,1,nil) end
if chk==0 then return tg:IsOnField() and tg:IsCanBeEffectTarget(e) end if chk==0 then return tg:IsOnField() and tg:IsCanBeEffectTarget(e) end
Duel.SetTargetCard(tg) Duel.SetTargetCard(tg)
end end
......
...@@ -10,8 +10,8 @@ function c59070329.initial_effect(c) ...@@ -10,8 +10,8 @@ function c59070329.initial_effect(c)
c:RegisterEffect(e1) c:RegisterEffect(e1)
end end
function c59070329.cost(e,tp,eg,ep,ev,re,r,rp,chk) function c59070329.cost(e,tp,eg,ep,ev,re,r,rp,chk)
if chk==0 then return Duel.CheckRemoveOverlayCard(tp,1,1,1,REASON_COST) end if chk==0 then return Duel.CheckRemoveOverlayCard(tp,1,0,1,REASON_COST) end
Duel.RemoveOverlayCard(tp,1,1,1,1,REASON_COST) Duel.RemoveOverlayCard(tp,1,0,1,1,REASON_COST)
end end
function c59070329.target(e,tp,eg,ep,ev,re,r,rp,chk) function c59070329.target(e,tp,eg,ep,ev,re,r,rp,chk)
if chk==0 then return Duel.IsExistingMatchingCard(c59070329.filter,tp,LOCATION_MZONE,0,1,nil) end if chk==0 then return Duel.IsExistingMatchingCard(c59070329.filter,tp,LOCATION_MZONE,0,1,nil) end
......
...@@ -122,7 +122,7 @@ function c63468625.damtg(e,tp,eg,ep,ev,re,r,rp,chk) ...@@ -122,7 +122,7 @@ function c63468625.damtg(e,tp,eg,ep,ev,re,r,rp,chk)
if chk==0 then return true end if chk==0 then return true end
Duel.SetTargetPlayer(1-tp) Duel.SetTargetPlayer(1-tp)
Duel.SetTargetParam(e:GetLabel()) Duel.SetTargetParam(e:GetLabel())
Duel.SetOperationInfo(0,CATEGORY_DAMAGE,nil,0,tp,e:GetLabel()) Duel.SetOperationInfo(0,CATEGORY_DAMAGE,nil,0,1-tp,e:GetLabel())
end end
function c63468625.damop(e,tp,eg,ep,ev,re,r,rp) function c63468625.damop(e,tp,eg,ep,ev,re,r,rp)
local p,d=Duel.GetChainInfo(0,CHAININFO_TARGET_PLAYER,CHAININFO_TARGET_PARAM) local p,d=Duel.GetChainInfo(0,CHAININFO_TARGET_PLAYER,CHAININFO_TARGET_PARAM)
......
...@@ -13,13 +13,13 @@ function c66457407.initial_effect(c) ...@@ -13,13 +13,13 @@ function c66457407.initial_effect(c)
c:RegisterEffect(e1) c:RegisterEffect(e1)
end end
function c66457407.lvfilter(c) function c66457407.lvfilter(c)
return c:IsFaceup() and c:IsRace(RACE_PLANT) return c:IsFaceup() and c:IsRace(RACE_PLANT) and c:GetLevel()>0
end end
function c66457407.lvtg(e,tp,eg,ep,ev,re,r,rp,chk,chkc) function c66457407.lvtg(e,tp,eg,ep,ev,re,r,rp,chk,chkc)
if chkc then return chkc:IsLocation(LOCATION_MZONE) and c66457407.lvfilter(chkc) end if chkc then return chkc:IsLocation(LOCATION_MZONE) and c66457407.lvfilter(chkc) end
if chk==0 then return Duel.IsExistingTarget(c66457407.lvfilter,tp,LOCATION_MZONE,LOCATION_MZONE,1,nil) end if chk==0 then return Duel.IsExistingTarget(c66457407.lvfilter,tp,LOCATION_MZONE,LOCATION_MZONE,1,e:GetHandler()) end
Duel.Hint(HINT_SELECTMSG,tp,HINTMSG_FACEUP) Duel.Hint(HINT_SELECTMSG,tp,HINTMSG_FACEUP)
Duel.SelectTarget(tp,c66457407.lvfilter,tp,LOCATION_MZONE,LOCATION_MZONE,1,1,nil) Duel.SelectTarget(tp,c66457407.lvfilter,tp,LOCATION_MZONE,LOCATION_MZONE,1,1,e:GetHandler())
end end
function c66457407.lvop(e,tp,eg,ep,ev,re,r,rp) function c66457407.lvop(e,tp,eg,ep,ev,re,r,rp)
local c=e:GetHandler() local c=e:GetHandler()
...@@ -29,7 +29,7 @@ function c66457407.lvop(e,tp,eg,ep,ev,re,r,rp) ...@@ -29,7 +29,7 @@ function c66457407.lvop(e,tp,eg,ep,ev,re,r,rp)
e1:SetType(EFFECT_TYPE_SINGLE) e1:SetType(EFFECT_TYPE_SINGLE)
e1:SetCode(EFFECT_CHANGE_LEVEL) e1:SetCode(EFFECT_CHANGE_LEVEL)
e1:SetValue(tc:GetLevel()) e1:SetValue(tc:GetLevel())
e1:SetReset(RESET_EVENT+0x1fe0000+RESET_PHASE+PHASE_END) e1:SetReset(RESET_EVENT+0x1ff0000+RESET_PHASE+PHASE_END)
c:RegisterEffect(e1) c:RegisterEffect(e1)
end end
end end
...@@ -2,7 +2,7 @@ ...@@ -2,7 +2,7 @@
function c73026394.initial_effect(c) function c73026394.initial_effect(c)
--Activate --Activate
local e1=Effect.CreateEffect(c) local e1=Effect.CreateEffect(c)
e1:SetCategory(CATEGORY_NEGATE+CATEGORY_DESTROY) e1:SetCategory(CATEGORY_NEGATE+CATEGORY_TOGRAVE)
e1:SetType(EFFECT_TYPE_ACTIVATE) e1:SetType(EFFECT_TYPE_ACTIVATE)
e1:SetCode(EVENT_CHAINING) e1:SetCode(EVENT_CHAINING)
e1:SetCondition(c73026394.condition) e1:SetCondition(c73026394.condition)
...@@ -20,15 +20,10 @@ end ...@@ -20,15 +20,10 @@ end
function c73026394.target(e,tp,eg,ep,ev,re,r,rp,chk) function c73026394.target(e,tp,eg,ep,ev,re,r,rp,chk)
if chk==0 then return Duel.IsExistingMatchingCard(c73026394.filter,tp,LOCATION_EXTRA,0,1,nil) end if chk==0 then return Duel.IsExistingMatchingCard(c73026394.filter,tp,LOCATION_EXTRA,0,1,nil) end
Duel.SetOperationInfo(0,CATEGORY_NEGATE,eg,1,0,0) Duel.SetOperationInfo(0,CATEGORY_NEGATE,eg,1,0,0)
if re:GetHandler():IsDestructable() and re:GetHandler():IsRelateToEffect(re) then Duel.SetOperationInfo(0,CATEGORY_TOGRAVE,nil,1,tp,LOCATION_EXTRA)
Duel.SetOperationInfo(0,CATEGORY_DESTROY,eg,1,0,0)
end
end end
function c73026394.activate(e,tp,eg,ep,ev,re,r,rp) function c73026394.activate(e,tp,eg,ep,ev,re,r,rp)
Duel.NegateActivation(ev) Duel.NegateActivation(ev)
if re:GetHandler():IsRelateToEffect(re) then
Duel.Destroy(eg,REASON_EFFECT)
end
local g=Duel.GetMatchingGroup(c73026394.filter,tp,LOCATION_EXTRA,0,nil):RandomSelect(tp,1) local g=Duel.GetMatchingGroup(c73026394.filter,tp,LOCATION_EXTRA,0,nil):RandomSelect(tp,1)
Duel.SendtoGrave(g,REASON_EFFECT) Duel.SendtoGrave(g,REASON_EFFECT)
end end
...@@ -25,25 +25,15 @@ function c77642288.sptg(e,tp,eg,ep,ev,re,r,rp,chk) ...@@ -25,25 +25,15 @@ function c77642288.sptg(e,tp,eg,ep,ev,re,r,rp,chk)
Duel.SetOperationInfo(0,CATEGORY_SPECIAL_SUMMON,nil,2,tp,LOCATION_DECK) Duel.SetOperationInfo(0,CATEGORY_SPECIAL_SUMMON,nil,2,tp,LOCATION_DECK)
end end
function c77642288.spop(e,tp,eg,ep,ev,re,r,rp) function c77642288.spop(e,tp,eg,ep,ev,re,r,rp)
local ft=Duel.GetLocationCount(tp,LOCATION_MZONE) if Duel.GetLocationCount(tp,LOCATION_MZONE)<2 then return end
if ft==0 then return end
if not Duel.IsExistingMatchingCard(c77642288.filter,tp,LOCATION_DECK,0,2,nil,e,tp) then return end if not Duel.IsExistingMatchingCard(c77642288.filter,tp,LOCATION_DECK,0,2,nil,e,tp) then return end
Duel.Hint(HINT_SELECTMSG,tp,HINTMSG_SPSUMMON) Duel.Hint(HINT_SELECTMSG,tp,HINTMSG_SPSUMMON)
local g=Duel.SelectMatchingCard(tp,c77642288.filter,tp,LOCATION_DECK,0,2,2,nil,e,tp) local g=Duel.SelectMatchingCard(tp,c77642288.filter,tp,LOCATION_DECK,0,2,2,nil,e,tp)
if ft==1 then local tc=g:GetFirst()
local sg=g:Select(tp,1,1,nil) while tc do
local sc=sg:GetFirst() Duel.SpecialSummonStep(tc,106,tp,tp,false,false,POS_FACEUP)
g:RemoveCard(sc) tc:RegisterFlagEffect(tc:GetOriginalCode(),RESET_EVENT+0x1ff0000,0,0)
Duel.SpecialSummon(sc,106,tp,tp,false,false,POS_FACEUP) tc=g:GetNext()
sc:RegisterFlagEffect(sc:GetOriginalCode(),RESET_EVENT+0x1ff0000,0,0)
Duel.Destroy(g,REASON_EFFECT)
else
local tc=g:GetFirst()
while tc do
Duel.SpecialSummonStep(tc,106,tp,tp,false,false,POS_FACEUP)
tc:RegisterFlagEffect(tc:GetOriginalCode(),RESET_EVENT+0x1ff0000,0,0)
tc=g:GetNext()
end
Duel.SpecialSummonComplete()
end end
Duel.SpecialSummonComplete()
end end
...@@ -22,13 +22,13 @@ function c81791932.filter(c,e,tp) ...@@ -22,13 +22,13 @@ function c81791932.filter(c,e,tp)
end end
function c81791932.target(e,tp,eg,ep,ev,re,r,rp,chk) function c81791932.target(e,tp,eg,ep,ev,re,r,rp,chk)
if chk==0 then return Duel.GetLocationCount(tp,LOCATION_MZONE)>0 if chk==0 then return Duel.GetLocationCount(tp,LOCATION_MZONE)>0
and Duel.IsExistingMatchingCard(c81791932.filter,tp,LOCATION_DECK+LOCATION_HAND,0,1,nil,e,tp) end and Duel.IsExistingMatchingCard(c81791932.filter,tp,LOCATION_DECK,0,1,nil,e,tp) end
Duel.SetOperationInfo(0,CATEGORY_SPECIAL_SUMMON,nil,1,0,LOCATION_DECK+LOCATION_HAND) Duel.SetOperationInfo(0,CATEGORY_SPECIAL_SUMMON,nil,1,tp,LOCATION_DECK)
end end
function c81791932.activate(e,tp,eg,ep,ev,re,r,rp) function c81791932.activate(e,tp,eg,ep,ev,re,r,rp)
if Duel.GetLocationCount(tp,LOCATION_MZONE)<=0 then return end if Duel.GetLocationCount(tp,LOCATION_MZONE)<=0 then return end
Duel.Hint(HINT_SELECTMSG,tp,HINTMSG_SPSUMMON) Duel.Hint(HINT_SELECTMSG,tp,HINTMSG_SPSUMMON)
local g=Duel.SelectMatchingCard(tp,c81791932.filter,tp,LOCATION_DECK+LOCATION_HAND,0,1,1,nil,e,tp) local g=Duel.SelectMatchingCard(tp,c81791932.filter,tp,LOCATION_DECK,0,1,1,nil,e,tp)
local tc=g:GetFirst() local tc=g:GetFirst()
if tc then if tc then
Duel.SpecialSummon(tc,0,tp,tp,false,false,POS_FACEUP) Duel.SpecialSummon(tc,0,tp,tp,false,false,POS_FACEUP)
......
...@@ -22,15 +22,15 @@ function c86821010.filter(c) ...@@ -22,15 +22,15 @@ function c86821010.filter(c)
end end
function c86821010.target(e,tp,eg,ep,ev,re,r,rp,chk,chkc) function c86821010.target(e,tp,eg,ep,ev,re,r,rp,chk,chkc)
if chkc then return chkc:IsLocation(LOCATION_SZONE+LOCATION_GRAVE) and chkc:IsControler(tp) and c86821010.filter(chkc) end if chkc then return chkc:IsLocation(LOCATION_SZONE+LOCATION_GRAVE) and chkc:IsControler(tp) and c86821010.filter(chkc) end
if chk==0 then return Duel.IsExistingTarget(c86821010.filter,tp,LOCATION_SZONE+LOCATION_GRAVE,0,3,nil) end if chk==0 then return Duel.IsExistingTarget(c86821010.filter,tp,LOCATION_SZONE+LOCATION_GRAVE,0,1,nil) end
Duel.Hint(HINT_SELECTMSG,tp,HINTMSG_TODECK) Duel.Hint(HINT_SELECTMSG,tp,HINTMSG_TODECK)
local g=Duel.SelectTarget(tp,c86821010.filter,tp,LOCATION_SZONE+LOCATION_GRAVE,0,3,3,nil) local g=Duel.SelectTarget(tp,c86821010.filter,tp,LOCATION_SZONE+LOCATION_GRAVE,0,1,3,nil)
Duel.SetOperationInfo(0,CATEGORY_TODECK,g,g:GetCount(),0,0) Duel.SetOperationInfo(0,CATEGORY_TODECK,g,g:GetCount(),0,0)
Duel.SetOperationInfo(0,CATEGORY_DAMAGE,nil,0,tp,1500) Duel.SetOperationInfo(0,CATEGORY_DAMAGE,nil,0,1-tp,g:GetCount()*500)
end end
function c86821010.activate(e,tp,eg,ep,ev,re,r,rp) function c86821010.activate(e,tp,eg,ep,ev,re,r,rp)
local g=Duel.GetChainInfo(0,CHAININFO_TARGET_CARDS):Filter(Card.IsRelateToEffect,nil,e) local g=Duel.GetChainInfo(0,CHAININFO_TARGET_CARDS):Filter(Card.IsRelateToEffect,nil,e)
Duel.SendtoDeck(g,nil,0,REASON_EFFECT) Duel.SendtoDeck(g,nil,2,REASON_EFFECT)
local g=Duel.GetOperatedGroup() local g=Duel.GetOperatedGroup()
local ct=g:FilterCount(Card.IsLocation,nil,LOCATION_DECK+LOCATION_EXTRA) local ct=g:FilterCount(Card.IsLocation,nil,LOCATION_DECK+LOCATION_EXTRA)
if ct>0 then if ct>0 then
......
...@@ -27,6 +27,7 @@ function c87624166.target(e,tp,eg,ep,ev,re,r,rp,chk) ...@@ -27,6 +27,7 @@ function c87624166.target(e,tp,eg,ep,ev,re,r,rp,chk)
Duel.SetOperationInfo(0,CATEGORY_POSITION,g,g:GetCount(),0,0) Duel.SetOperationInfo(0,CATEGORY_POSITION,g,g:GetCount(),0,0)
end end
function c87624166.activate(e,tp,eg,ep,ev,re,r,rp) function c87624166.activate(e,tp,eg,ep,ev,re,r,rp)
if not e:GetHandler():IsRelateToEffect(e) then return end
local g=Duel.GetMatchingGroup(Card.IsDefencePos,tp,LOCATION_MZONE,LOCATION_MZONE,nil) local g=Duel.GetMatchingGroup(Card.IsDefencePos,tp,LOCATION_MZONE,LOCATION_MZONE,nil)
if g:GetCount()>0 then if g:GetCount()>0 then
Duel.ChangePosition(g,0,0,POS_FACEUP_ATTACK,POS_FACEUP_ATTACK,true) Duel.ChangePosition(g,0,0,POS_FACEUP_ATTACK,POS_FACEUP_ATTACK,true)
......
...@@ -53,6 +53,7 @@ function c88619463.distg(e,tp,eg,ep,ev,re,r,rp,chk) ...@@ -53,6 +53,7 @@ function c88619463.distg(e,tp,eg,ep,ev,re,r,rp,chk)
end end
end end
function c88619463.disop(e,tp,eg,ep,ev,re,r,rp,chk) function c88619463.disop(e,tp,eg,ep,ev,re,r,rp,chk)
if e:GetHandler():IsFacedown() or not e:GetHandler():IsRelateToEffect(e) then return end
Duel.NegateActivation(ev) Duel.NegateActivation(ev)
if re:GetHandler():IsRelateToEffect(re) then if re:GetHandler():IsRelateToEffect(re) then
Duel.Destroy(eg,REASON_EFFECT) Duel.Destroy(eg,REASON_EFFECT)
......
...@@ -44,7 +44,7 @@ function c9156135.addc(e,tp,eg,ep,ev,re,r,rp) ...@@ -44,7 +44,7 @@ function c9156135.addc(e,tp,eg,ep,ev,re,r,rp)
end end
end end
function c9156135.condition(e,tp,eg,ep,ev,re,r,rp) function c9156135.condition(e,tp,eg,ep,ev,re,r,rp)
return not e:GetHandler():IsLocation(LOCATION_DECK) return not e:GetHandler():IsLocation(LOCATION_DECK) and e:GetHandler():IsReason(REASON_BATTLE)
end end
function c9156135.spfilter(c,e,tp) function c9156135.spfilter(c,e,tp)
return c:IsLevelBelow(2) and c:IsRace(RACE_SPELLCASTER) and c:IsCanBeSpecialSummoned(e,0,tp,false,false,POS_FACEDOWN) return c:IsLevelBelow(2) and c:IsRace(RACE_SPELLCASTER) and c:IsCanBeSpecialSummoned(e,0,tp,false,false,POS_FACEDOWN)
......
...@@ -27,7 +27,8 @@ end ...@@ -27,7 +27,8 @@ end
function c92373006.sprcon(e,c) function c92373006.sprcon(e,c)
if c==nil then return true end if c==nil then return true end
local tp=c:GetControler() local tp=c:GetControler()
return Duel.IsExistingMatchingCard(c92373006.sprfilter,tp,LOCATION_MZONE,0,1,nil) return Duel.GetLocationCount(tp,LOCATION_MZONE)>0
and Duel.IsExistingMatchingCard(c92373006.sprfilter,tp,LOCATION_MZONE,0,1,nil)
end end
function c92373006.spcost(e,tp,eg,ep,ev,re,r,rp,chk) function c92373006.spcost(e,tp,eg,ep,ev,re,r,rp,chk)
local c=e:GetHandler() local c=e:GetHandler()
......
...@@ -24,7 +24,7 @@ function c95362816.target(e,tp,eg,ep,ev,re,r,rp,chk) ...@@ -24,7 +24,7 @@ function c95362816.target(e,tp,eg,ep,ev,re,r,rp,chk)
if chk==0 then return true end if chk==0 then return true end
local ct=Duel.GetMatchingGroupCount(c95362816.filter,tp,LOCATION_MZONE,0,nil) local ct=Duel.GetMatchingGroupCount(c95362816.filter,tp,LOCATION_MZONE,0,nil)
Duel.SetTargetPlayer(1-tp) Duel.SetTargetPlayer(1-tp)
Duel.SetOperationInfo(0,CATEGORY_DAMAGE,nil,0,tp,ct*200) Duel.SetOperationInfo(0,CATEGORY_DAMAGE,nil,0,1-tp,ct*200)
end end
function c95362816.operation(e,tp,eg,ep,ev,re,r,rp) function c95362816.operation(e,tp,eg,ep,ev,re,r,rp)
local p=Duel.GetChainInfo(0,CHAININFO_TARGET_PLAYER) local p=Duel.GetChainInfo(0,CHAININFO_TARGET_PLAYER)
......
...@@ -20,7 +20,7 @@ function c98380593.rectg(e,tp,eg,ep,ev,re,r,rp,chk) ...@@ -20,7 +20,7 @@ function c98380593.rectg(e,tp,eg,ep,ev,re,r,rp,chk)
else else
e:SetLabel(1) e:SetLabel(1)
Duel.SetTargetParam(1000) Duel.SetTargetParam(1000)
Duel.SetOperationInfo(0,CATEGORY_DAMAGE,nil,0,tp,2000) Duel.SetOperationInfo(0,CATEGORY_DAMAGE,nil,0,tp,1000)
end end
end end
function c98380593.recop(e,tp,eg,ep,ev,re,r,rp) function c98380593.recop(e,tp,eg,ep,ev,re,r,rp)
......
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