Commit 9b8be972 authored by Huangnan's avatar Huangnan

fix

parent f0801d2e
Pipeline #42317 failed with stages
in 14 seconds
...@@ -44,15 +44,25 @@ function c11602025.sptg(e,tp,eg,ep,ev,re,r,rp,chk) ...@@ -44,15 +44,25 @@ function c11602025.sptg(e,tp,eg,ep,ev,re,r,rp,chk)
Duel.SetOperationInfo(0,CATEGORY_SPECIAL_SUMMON,e:GetHandler(),1,0,0) Duel.SetOperationInfo(0,CATEGORY_SPECIAL_SUMMON,e:GetHandler(),1,0,0)
Duel.SetOperationInfo(0,CATEGORY_DESTROY,nil,1,1-tp,LOCATION_ONFIELD) Duel.SetOperationInfo(0,CATEGORY_DESTROY,nil,1,1-tp,LOCATION_ONFIELD)
end end
function c11602025.ctfilter(c)
return c:IsFaceup() and c:IsSetCard(0xc548,0xa548)
end
function c11602025.spop(e,tp,eg,ep,ev,re,r,rp) function c11602025.spop(e,tp,eg,ep,ev,re,r,rp)
local c=e:GetHandler() local c=e:GetHandler()
if c:IsRelateToEffect(e) and Duel.SpecialSummon(c,0,tp,tp,false,false,POS_FACEUP)>0 then if c:IsRelateToEffect(e) and Duel.SpecialSummon(c,0,tp,tp,false,false,POS_FACEUP)>0 then
Duel.RegisterFlagEffect(tp,11602025,0,0,0) Duel.RegisterFlagEffect(tp,11602025,0,0,0)
Duel.Hint(HINT_SELECTMSG,tp,HINTMSG_DESTROY) local ct=Duel.GetMatchingGroup(c11602025.ctfilter,tp,0xc,0,nil)
local g=Duel.SelectMatchingCard(tp,nil,tp,0,0xc,1,1,nil) if ct<1 then return end
if #g>0 then local g=Duel.GetMatchingGroup(Card.IsFaceup,tp,0,LOCATION_MZONE,nil)
Duel.BreakEffect() local tc=g:GetFirst()
Duel.Destroy(g,0x40) while tc do
local e1=Effect.CreateEffect(e:GetHandler())
e1:SetType(EFFECT_TYPE_SINGLE)
e1:SetCode(EFFECT_UPDATE_ATTACK)
e1:SetValue(-ct*400)
e1:SetReset(RESET_EVENT+RESETS_STANDARD)
tc:RegisterEffect(e1)
tc=g:GetNext()
end end
end end
end end
......
...@@ -31,7 +31,7 @@ function s.initial_effect(c) ...@@ -31,7 +31,7 @@ function s.initial_effect(c)
--Tohand(0x01) --Tohand(0x01)
local e3=Effect.CreateEffect(c) local e3=Effect.CreateEffect(c)
e3:SetDescription(aux.Stringid(id,2)) e3:SetDescription(aux.Stringid(id,2))
e3:SetCategory(CATEGORY_SEARCH+CATEGORY_TOHAND) e3:SetCategory(CATEGORY_SEARCH+CATEGORY_TOHAND+CATEGORY_SPECIAL_SUMMON)
e3:SetType(EFFECT_TYPE_SINGLE+EFFECT_TYPE_TRIGGER_O) e3:SetType(EFFECT_TYPE_SINGLE+EFFECT_TYPE_TRIGGER_O)
e3:SetCode(EVENT_LEAVE_FIELD) e3:SetCode(EVENT_LEAVE_FIELD)
e3:SetProperty(EFFECT_FLAG_DELAY) e3:SetProperty(EFFECT_FLAG_DELAY)
......
...@@ -15,7 +15,7 @@ function s.initial_effect(c) ...@@ -15,7 +15,7 @@ function s.initial_effect(c)
--TdOrSum(c) --TdOrSum(c)
local e2=Effect.CreateEffect(c) local e2=Effect.CreateEffect(c)
e2:SetDescription(aux.Stringid(id,1)) e2:SetDescription(aux.Stringid(id,1))
e2:SetCategory(CATEGORY_TOHAND+CATEGORY_SPECIAL_SUMMON) e2:SetCategory(CATEGORY_TODECK+CATEGORY_SPECIAL_SUMMON)
e2:SetType(EFFECT_TYPE_FIELD+EFFECT_TYPE_TRIGGER_O) e2:SetType(EFFECT_TYPE_FIELD+EFFECT_TYPE_TRIGGER_O)
e2:SetRange(LOCATION_GRAVE) e2:SetRange(LOCATION_GRAVE)
e2:SetCode(EVENT_TO_HAND) e2:SetCode(EVENT_TO_HAND)
...@@ -66,7 +66,9 @@ function s.toscon(e,tp,eg,ep,ev,re,r,rp) ...@@ -66,7 +66,9 @@ function s.toscon(e,tp,eg,ep,ev,re,r,rp)
end end
function s.tostg(e,tp,eg,ep,ev,re,r,rp,chk) function s.tostg(e,tp,eg,ep,ev,re,r,rp,chk)
local c=e:GetHandler() local c=e:GetHandler()
if chk==0 then return c:IsAbleToDeck() or c:IsCanBeSpecialSummoned(e,0,tp,false,false) end if chk==0 then return c:IsAbleToDeck()
or (c:IsCanBeSpecialSummoned(e,0,tp,false,false)
and Duel.GetLocationCount(tp,0x04)>0) end
if c:IsAbleToDeck() then if c:IsAbleToDeck() then
Duel.SetOperationInfo(0,CATEGORY_TODECK,c,1,0,0) Duel.SetOperationInfo(0,CATEGORY_TODECK,c,1,0,0)
end end
...@@ -82,6 +84,7 @@ function s.tosop(e,tp,eg,ep,ev,re,r,rp) ...@@ -82,6 +84,7 @@ function s.tosop(e,tp,eg,ep,ev,re,r,rp)
if c:IsRelateToEffect(e) then if c:IsRelateToEffect(e) then
local b1=c:IsAbleToDeck() local b1=c:IsAbleToDeck()
local b2=c:IsCanBeSpecialSummoned(e,0,tp,false,false) local b2=c:IsCanBeSpecialSummoned(e,0,tp,false,false)
and Duel.GetLocationCount(tp,0x04)>0
local op=0 local op=0
if b1 and b2 then op=Duel.SelectOption(tp,aux.Stringid(id,2),aux.Stringid(id,3)) if b1 and b2 then op=Duel.SelectOption(tp,aux.Stringid(id,2),aux.Stringid(id,3))
elseif b1 then op=0 elseif b1 then op=0
...@@ -89,7 +92,7 @@ function s.tosop(e,tp,eg,ep,ev,re,r,rp) ...@@ -89,7 +92,7 @@ function s.tosop(e,tp,eg,ep,ev,re,r,rp)
else return end else return end
if op==0 then if op==0 then
local g=Duel.GetMatchingGroup(s.spfi2ter,tp,0x02,0,nil,e,tp) local g=Duel.GetMatchingGroup(s.spfi2ter,tp,0x02,0,nil,e,tp)
if Duel.SendtoDeck(c,nil,1,0x40)>0 and #g>0 and Duel.SelectYesNo(tp,aux.Stringid(id,4)) then if Duel.SendtoDeck(c,nil,1,0x40)>0 and #g>0 and Duel.GetLocationCount(tp,0x04)>0 and Duel.SelectYesNo(tp,aux.Stringid(id,4)) then
Duel.Hint(3,tp,509) Duel.Hint(3,tp,509)
local tc=g:Select(tp,1,1,nil) local tc=g:Select(tp,1,1,nil)
if tc then Duel.SpecialSummon(tc,0,tp,tp,false,false,POS_FACEUP) end if tc then Duel.SpecialSummon(tc,0,tp,tp,false,false,POS_FACEUP) end
......
...@@ -12,6 +12,7 @@ function s.initial_effect(c) ...@@ -12,6 +12,7 @@ function s.initial_effect(c)
e1:SetCountLimit(1,id) e1:SetCountLimit(1,id)
e1:SetCondition(s.discon) e1:SetCondition(s.discon)
e1:SetCost(s.discost) e1:SetCost(s.discost)
e1:SetTarget(s.distg)
e1:SetOperation(s.disop) e1:SetOperation(s.disop)
c:RegisterEffect(e1) c:RegisterEffect(e1)
--SpSum(c) --SpSum(c)
......
...@@ -36,12 +36,13 @@ end ...@@ -36,12 +36,13 @@ end
-- ①效果:发动处理(特召后送墓) -- ①效果:发动处理(特召后送墓)
function s.spop(e,tp,eg,ep,ev,re,r,rp) function s.spop(e,tp,eg,ep,ev,re,r,rp)
local c=e:GetHandler()
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,s.spfilter,tp,LOCATION_DECK,0,1,1,nil,e,tp) local g=Duel.SelectMatchingCard(tp,s.spfilter,tp,LOCATION_DECK,0,1,1,nil,e,tp)
if #g>0 and Duel.SpecialSummon(g,0,tp,tp,false,false,POS_FACEUP)>0 then if #g>0 and Duel.SpecialSummon(g,0,tp,tp,false,false,POS_FACEUP)>0 then
-- 特召成功后,必须选1只怪兽送墓 --
local sg=Duel.GetMatchingGroup(nil,tp,LOCATION_HAND+LOCATION_MZONE,0,nil) local sg=Duel.GetMatchingGroup(function(sc) return sc~=c end,tp,LOCATION_HAND+LOCATION_FZONE+LOCATION_ONFIELD,0,nil)
if #sg==0 then return end if #sg==0 then return end
Duel.Hint(HINT_SELECTMSG,tp,HINTMSG_TOGRAVE) Duel.Hint(HINT_SELECTMSG,tp,HINTMSG_TOGRAVE)
local tg=sg:Select(tp,1,1,nil) local tg=sg:Select(tp,1,1,nil)
......
...@@ -159,7 +159,7 @@ function s.seqtg(e,tp,eg,ep,ev,re,r,rp,chk) ...@@ -159,7 +159,7 @@ function s.seqtg(e,tp,eg,ep,ev,re,r,rp,chk)
end end
e:SetLabel(seq) e:SetLabel(seq)
Duel.Hint(HINT_ZONE,tp,flag) Duel.Hint(HINT_ZONE,tp,flag)
Duel.SetOperationInfo(0,CATEGORY_DESTROY,nil,1,1-tp,LOCATION_ONFIELD) --Duel.SetOperationInfo(0,CATEGORY_DESTROY,nil,1,1-tp,LOCATION_ONFIELD)
end end
function s.checkin(tab,val) function s.checkin(tab,val)
for _,v in ipairs(tab) do for _,v in ipairs(tab) do
...@@ -317,6 +317,7 @@ function s.sptg(e,tp,eg,ep,ev,re,r,rp,chk) ...@@ -317,6 +317,7 @@ function s.sptg(e,tp,eg,ep,ev,re,r,rp,chk)
Duel.SetOperationInfo(0,CATEGORY_SPECIAL_SUMMON,nil,1,tp,LOCATION_DECK+LOCATION_GRAVE) Duel.SetOperationInfo(0,CATEGORY_SPECIAL_SUMMON,nil,1,tp,LOCATION_DECK+LOCATION_GRAVE)
end end
function s.spop(e,tp,eg,ep,ev,re,r,rp) function s.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,aux.NecroValleyFilter(s.spfilter),tp,LOCATION_DECK+LOCATION_GRAVE,0,1,1,nil,e,tp) local g=Duel.SelectMatchingCard(tp,aux.NecroValleyFilter(s.spfilter),tp,LOCATION_DECK+LOCATION_GRAVE,0,1,1,nil,e,tp)
if #g>0 then if #g>0 then
......
...@@ -58,7 +58,7 @@ function s.repop(e,tp,eg,ep,ev,re,r,rp) ...@@ -58,7 +58,7 @@ function s.repop(e,tp,eg,ep,ev,re,r,rp)
end end
end end
function s.filter(c,tp) function s.filter(c,tp)
return c:IsSetCard(0x5a7d) and not c:IsCode(id) and c:IsType(TYPE_MONSTER) and not c:IsForbidden() and c:CheckUniqueOnField(tp) return c:IsSetCard(0x5a7d) and not c:IsCode(id) and c:IsType(TYPE_MONSTER) and not c:IsForbidden() and c:CheckUniqueOnField(tp) and c:IsFaceupEx()
end end
function s.settg(e,tp,eg,ep,ev,re,r,rp,chk) function s.settg(e,tp,eg,ep,ev,re,r,rp,chk)
if chk==0 then return Duel.IsExistingMatchingCard(s.filter,tp,LOCATION_DECK+LOCATION_GRAVE+LOCATION_REMOVED,0,1,nil,tp) if chk==0 then return Duel.IsExistingMatchingCard(s.filter,tp,LOCATION_DECK+LOCATION_GRAVE+LOCATION_REMOVED,0,1,nil,tp)
......
...@@ -9,7 +9,7 @@ function s.initial_effect(c) ...@@ -9,7 +9,7 @@ function s.initial_effect(c)
e1:SetType(EFFECT_TYPE_ACTIVATE) e1:SetType(EFFECT_TYPE_ACTIVATE)
e1:SetCode(EVENT_FREE_CHAIN) e1:SetCode(EVENT_FREE_CHAIN)
e1:SetCountLimit(1,id+EFFECT_COUNT_CODE_OATH) e1:SetCountLimit(1,id+EFFECT_COUNT_CODE_OATH)
e1:SetTarget(s.target) e1:SetTarget(s.target1)
e1:SetOperation(s.activate) e1:SetOperation(s.activate)
c:RegisterEffect(e1) c:RegisterEffect(e1)
local e2=Effect.CreateEffect(c) local e2=Effect.CreateEffect(c)
...@@ -19,7 +19,7 @@ function s.initial_effect(c) ...@@ -19,7 +19,7 @@ function s.initial_effect(c)
e2:SetCode(EVENT_DESTROYED) e2:SetCode(EVENT_DESTROYED)
e2:SetProperty(EFFECT_FLAG_DELAY) e2:SetProperty(EFFECT_FLAG_DELAY)
e2:SetCountLimit(1,id) e2:SetCountLimit(1,id)
e2:SetTarget(s.target) e2:SetTarget(s.target2)
e2:SetOperation(s.op2) e2:SetOperation(s.op2)
c:RegisterEffect(e2) c:RegisterEffect(e2)
--act in set turn --act in set turn
...@@ -44,7 +44,7 @@ end ...@@ -44,7 +44,7 @@ end
function s.spfilter(c,e,tp) function s.spfilter(c,e,tp)
return c:IsSetCard(0x5a7d) and c:IsType(TYPE_MONSTER) and c:IsCanBeSpecialSummoned(e,0,tp,false,false) return c:IsSetCard(0x5a7d) and c:IsType(TYPE_MONSTER) and c:IsCanBeSpecialSummoned(e,0,tp,false,false)
end end
function s.target(e,tp,eg,ep,ev,re,r,rp,chk) function s.target1(e,tp,eg,ep,ev,re,r,rp,chk)
local g=Duel.GetMatchingGroup(aux.TRUE,tp,LOCATION_ONFIELD,0,e:GetHandler()) local g=Duel.GetMatchingGroup(aux.TRUE,tp,LOCATION_ONFIELD,0,e:GetHandler())
if chk==0 then return Duel.GetLocationCount(tp,LOCATION_MZONE)>0 and Duel.IsExistingMatchingCard(s.spfilter,tp,LOCATION_DECK+LOCATION_GRAVE+LOCATION_REMOVED,0,1,nil,e,tp) end if chk==0 then return Duel.GetLocationCount(tp,LOCATION_MZONE)>0 and Duel.IsExistingMatchingCard(s.spfilter,tp,LOCATION_DECK+LOCATION_GRAVE+LOCATION_REMOVED,0,1,nil,e,tp) end
Duel.SetOperationInfo(0,CATEGORY_SPECIAL_SUMMON,nil,1,tp,LOCATION_DECK+LOCATION_GRAVE+LOCATION_REMOVED) Duel.SetOperationInfo(0,CATEGORY_SPECIAL_SUMMON,nil,1,tp,LOCATION_DECK+LOCATION_GRAVE+LOCATION_REMOVED)
...@@ -53,6 +53,10 @@ function s.target(e,tp,eg,ep,ev,re,r,rp,chk) ...@@ -53,6 +53,10 @@ function s.target(e,tp,eg,ep,ev,re,r,rp,chk)
Duel.SetOperationInfo(0,CATEGORY_DESTROY,g,1,0,0) Duel.SetOperationInfo(0,CATEGORY_DESTROY,g,1,0,0)
end end
end end
function s.target2(e,tp,eg,ep,ev,re,r,rp,chk)
if chk==0 then return Duel.GetLocationCount(tp,LOCATION_MZONE)>0 and Duel.IsExistingMatchingCard(s.spfilter,tp,LOCATION_DECK+LOCATION_GRAVE+LOCATION_REMOVED,0,1,nil,e,tp) end
Duel.SetOperationInfo(0,CATEGORY_SPECIAL_SUMMON,nil,1,tp,LOCATION_DECK+LOCATION_GRAVE+LOCATION_REMOVED)
end
function s.activate(e,tp,eg,ep,ev,re,r,rp) function s.activate(e,tp,eg,ep,ev,re,r,rp)
local c=e:GetHandler() local c=e:GetHandler()
if Duel.GetLocationCount(tp,LOCATION_MZONE)<=0 then return end if Duel.GetLocationCount(tp,LOCATION_MZONE)<=0 then return end
......
...@@ -121,9 +121,10 @@ function s.drop(e,tp,eg,ep,ev,re,r,rp) ...@@ -121,9 +121,10 @@ function s.drop(e,tp,eg,ep,ev,re,r,rp)
if #sg>0 and Duel.Remove(sg,POS_FACEUP,REASON_EFFECT)>0 then if #sg>0 and Duel.Remove(sg,POS_FACEUP,REASON_EFFECT)>0 then
local g=Duel.GetMatchingGroup(aux.NecroValleyFilter(s.tdfilter),tp,LOCATION_GRAVE+LOCATION_REMOVED,0,nil) local g=Duel.GetMatchingGroup(aux.NecroValleyFilter(s.tdfilter),tp,LOCATION_GRAVE+LOCATION_REMOVED,0,nil)
local ct=g:GetClassCount(Card.GetCode) local ct=g:GetClassCount(Card.GetCode)
local sg=g:SelectSubGroup(tp,aux.dncheck,1,ct) local sg2=g:SelectSubGroup(tp,aux.dncheck,1,ct)
if #sg>0 then if #sg2>0 then
Duel.SendtoDeck(sg,nil,SEQ_DECKSHUFFLE,REASON_EFFECT) Duel.HintSelection(sg2)
Duel.SendtoDeck(sg2,nil,SEQ_DECKSHUFFLE,REASON_EFFECT)
end end
end end
end end
......
...@@ -114,14 +114,10 @@ end ...@@ -114,14 +114,10 @@ end
function cm.splimit(e,c,sump,sumtype,sumpos,targetp,se) function cm.splimit(e,c,sump,sumtype,sumpos,targetp,se)
return not c:IsSetCard(0x5a71) return not c:IsSetCard(0x5a71)
end end
function cm.isset(c)
return c:IsSetCard(0x5a71,0x6a71)
end
function cm.condition(e,tp,eg,ep,ev,re,r,rp) function cm.condition(e,tp,eg,ep,ev,re,r,rp)
local chain=Duel.GetChainInfo(ev-1,CHAININFO_TRIGGERING_EFFECT) local qe,loc=Duel.GetChainInfo(ev-1,CHAININFO_TRIGGERING_EFFECT,CHAININFO_TRIGGERING_LOCATION)
return Duel.GetCurrentChain()>1 and cm.isset(chain:GetHandler()) return Duel.GetCurrentChain()>1 and rp==1-tp and bit.band(loc,LOCATION_ONFIELD+LOCATION_GRAVE)~=0 and qe:GetHandler():IsSetCard(0x5a71,0x6a71)
and (Duel.GetChainInfo(ev,CHAININFO_TRIGGERING_LOCATION)==LOCATION_ONFIELD or Duel.GetChainInfo(ev,CHAININFO_TRIGGERING_LOCATION)==LOCATION_GRAVE) and qe:GetHandler():IsControler(tp)
end end
function cm.negtg(e,tp,eg,ep,ev,re,r,rp,chk) function cm.negtg(e,tp,eg,ep,ev,re,r,rp,chk)
if chk==0 then return Duel.IsChainNegatable(ev) end if chk==0 then return Duel.IsChainNegatable(ev) end
......
...@@ -90,7 +90,7 @@ function cm.eqop(e,tp,eg,ep,ev,re,r,rp) ...@@ -90,7 +90,7 @@ function cm.eqop(e,tp,eg,ep,ev,re,r,rp)
tc:RegisterFlagEffect(m,RESET_EVENT+RESETS_STANDARD,0,0) tc:RegisterFlagEffect(m,RESET_EVENT+RESETS_STANDARD,0,0)
local e1=Effect.CreateEffect(c) local e1=Effect.CreateEffect(c)
e1:SetType(EFFECT_TYPE_SINGLE) e1:SetType(EFFECT_TYPE_SINGLE)
e1:SetProperty(EFFECT_FLAG_COPY_INHERIT+EFFECT_FLAG_OWNER_RELATE) e1:SetProperty(EFFECT_FLAG_OWNER_RELATE)
e1:SetCode(EFFECT_EQUIP_LIMIT) e1:SetCode(EFFECT_EQUIP_LIMIT)
e1:SetReset(RESET_EVENT+RESETS_STANDARD) e1:SetReset(RESET_EVENT+RESETS_STANDARD)
e1:SetValue(cm.eqlimit) e1:SetValue(cm.eqlimit)
......
...@@ -23,7 +23,9 @@ function s.initial_effect(c) ...@@ -23,7 +23,9 @@ function s.initial_effect(c)
e2:SetOperation(s.ovop) e2:SetOperation(s.ovop)
c:RegisterEffect(e2) c:RegisterEffect(e2)
aux.RegisterMergedDelayedEvent(c,id,EVENT_LEAVE_FIELD) aux.RegisterMergedDelayedEvent(c,id,EVENT_LEAVE_FIELD)
end
function s.check(c)
return c:IsFaceup() and (c:IsSetCard(0x3cc3) or c:IsCode(16138001))
end end
function s.imop(e,tp,eg,ep,ev,re,r,rp) function s.imop(e,tp,eg,ep,ev,re,r,rp)
local c=e:GetHandler() local c=e:GetHandler()
...@@ -35,7 +37,7 @@ function s.imop(e,tp,eg,ep,ev,re,r,rp) ...@@ -35,7 +37,7 @@ function s.imop(e,tp,eg,ep,ev,re,r,rp)
for tc in aux.Next(g) do for tc in aux.Next(g) do
local loc=tc:GetLocation()&(LOCATION_FZONE|LOCATION_SZONE|LOCATION_MZONE) local loc=tc:GetLocation()&(LOCATION_FZONE|LOCATION_SZONE|LOCATION_MZONE)
local e1=Effect.CreateEffect(c) local e1=Effect.CreateEffect(c)
e1:SetType(EFFECT_TYPE_FIELD) e1:SetType(EFFECT_TYPE_SINGLE)
e1:SetCode(EFFECT_IMMUNE_EFFECT) e1:SetCode(EFFECT_IMMUNE_EFFECT)
e1:SetRange(loc) e1:SetRange(loc)
e1:SetLabelObject(re:GetHandler()) e1:SetLabelObject(re:GetHandler())
...@@ -46,17 +48,18 @@ function s.imop(e,tp,eg,ep,ev,re,r,rp) ...@@ -46,17 +48,18 @@ function s.imop(e,tp,eg,ep,ev,re,r,rp)
end end
end end
end end
function s.efilter(e,re) function s.efilter(e,te)
return re:GetHandler()==e:GetLabelObject() return te:GetHandler()==e:GetLabelObject() and te:GetOwner()~=e:GetOwner()
end end
function s.ovcon(e,tp,eg,ep,ev,re,r,rp) function s.ovcon(e,tp,eg,ep,ev,re,r,rp)
return eg:IsExists(s.ovcheck,1,nil,tp) return eg:IsExists(s.ovcheck,1,nil,tp)
end end
function s.ovcheck(c,tp) function s.ovcheck(c,tp)
return (c:IsControler(1-tp) and c:IsReason(REASON_BATTLE)) or (c:GetReasonEffect() and c:GetReasonEffect():GetHandlerPlayer()==tp) and (not c:IsLocation(LOCATION_DECK) or (c:IsLocation(LOCATION_EXTRA) and c:IsFaceup())) return c:IsPreviousControler(1-tp) and (c:IsReason(REASON_BATTLE) or (c:GetReasonEffect() and c:GetReasonEffect():GetHandlerPlayer()==tp)) and c:IsCanOverlay()
and c:IsFaceupEx() and c:IsPreviousLocation(LOCATION_ONFIELD)
end end
function s.ovtg(e,tp,eg,ep,ev,re,r,rp,chk) function s.ovtg(e,tp,eg,ep,ev,re,r,rp,chk)
if chk==0 then return true end if chk==0 then return eg:IsExists(s.ovcheck,1,nil,tp) end
local g=eg:Filter(s.ovcheck,nil,tp) local g=eg:Filter(s.ovcheck,nil,tp)
if g:IsExists(Card.IsLocation,1,nil,LOCATION_GRAVE) then if g:IsExists(Card.IsLocation,1,nil,LOCATION_GRAVE) then
local sg=g:Filter(Card.IsLocation,nil,LOCATION_GRAVE) local sg=g:Filter(Card.IsLocation,nil,LOCATION_GRAVE)
...@@ -64,6 +67,8 @@ function s.ovtg(e,tp,eg,ep,ev,re,r,rp,chk) ...@@ -64,6 +67,8 @@ function s.ovtg(e,tp,eg,ep,ev,re,r,rp,chk)
end end
end end
function s.ovop(e,tp,eg,ep,ev,re,r,rp) function s.ovop(e,tp,eg,ep,ev,re,r,rp)
local g=eg:Filter(aux.NecroValleyFilter(s.ovfilter),nil,tp) local g=eg:Filter(aux.NecroValleyFilter(s.ovcheck),nil,tp,e)
Duel.Overlay(e:GetHandler(),g) if #g>0 then
Duel.Overlay(e:GetHandler(),g)
end
end end
\ No newline at end of file
...@@ -23,7 +23,7 @@ function cm.initial_effect(c) ...@@ -23,7 +23,7 @@ function cm.initial_effect(c)
c:RegisterEffect(e2) c:RegisterEffect(e2)
end end
function cm.con(e,tp) function cm.con(e,tp)
return Duel.GetFlagEffect(tp,m)==0 return Duel.GetFlagEffect(e:GetHandlerPlayer(),m)==0
end end
function cm.matcheck(e,c) function cm.matcheck(e,c)
local g=c:GetMaterial() local g=c:GetMaterial()
......
...@@ -41,7 +41,7 @@ end ...@@ -41,7 +41,7 @@ end
function cm.rlcheck(c,tp) function cm.rlcheck(c,tp)
local re_tab={Duel.IsPlayerAffectedByEffect(tp,EFFECT_CANNOT_RELEASE)} local re_tab={Duel.IsPlayerAffectedByEffect(tp,EFFECT_CANNOT_RELEASE)}
for _,ve in ipairs(re_tab) do for _,ve in ipairs(re_tab) do
local val=ve:GetValue() local val=ve:GetValue() or aux.TRUE
if val(ve,c) then if val(ve,c) then
return false return false
end end
...@@ -87,4 +87,4 @@ function cm.rsdop(e,tp) ...@@ -87,4 +87,4 @@ function cm.rsdop(e,tp)
Duel.SpecialSummonRule(tp,tc) Duel.SpecialSummonRule(tp,tc)
end end
end end
end end
\ No newline at end of file
...@@ -38,7 +38,7 @@ end ...@@ -38,7 +38,7 @@ end
function cm.rlcheck(c,tp) function cm.rlcheck(c,tp)
local re_tab={Duel.IsPlayerAffectedByEffect(tp,EFFECT_CANNOT_RELEASE)} local re_tab={Duel.IsPlayerAffectedByEffect(tp,EFFECT_CANNOT_RELEASE)}
for _,ve in ipairs(re_tab) do for _,ve in ipairs(re_tab) do
local val=ve:GetValue() local val=ve:GetValue() or aux.TRUE
if val(ve,c) then if val(ve,c) then
return false return false
end end
...@@ -87,4 +87,4 @@ function cm.chainop(e,tp,eg,ep,ev,re,r,rp) ...@@ -87,4 +87,4 @@ function cm.chainop(e,tp,eg,ep,ev,re,r,rp)
end end
function cm.chainlm(e,rp,tp) function cm.chainlm(e,rp,tp)
return tp==rp return tp==rp
end end
\ No newline at end of file
...@@ -40,7 +40,7 @@ end ...@@ -40,7 +40,7 @@ end
function cm.rlcheck(c,tp) function cm.rlcheck(c,tp)
local re_tab={Duel.IsPlayerAffectedByEffect(tp,EFFECT_CANNOT_RELEASE)} local re_tab={Duel.IsPlayerAffectedByEffect(tp,EFFECT_CANNOT_RELEASE)}
for _,ve in ipairs(re_tab) do for _,ve in ipairs(re_tab) do
local val=ve:GetValue() local val=ve:GetValue() or aux.TRUE
if val(ve,c) then if val(ve,c) then
return false return false
end end
...@@ -52,7 +52,7 @@ function cm.rlcheck2(c,tp) ...@@ -52,7 +52,7 @@ function cm.rlcheck2(c,tp)
if not c:IsSetCard(0x3cc7) then return false end if not c:IsSetCard(0x3cc7) then return false end
local re_tab={Duel.IsPlayerAffectedByEffect(tp,EFFECT_CANNOT_RELEASE)} local re_tab={Duel.IsPlayerAffectedByEffect(tp,EFFECT_CANNOT_RELEASE)}
for _,ve in ipairs(re_tab) do for _,ve in ipairs(re_tab) do
local val=ve:GetValue() local val=ve:GetValue() or aux.TRUE
if val(ve,c) then if val(ve,c) then
return false return false
end end
...@@ -92,4 +92,4 @@ function cm.rsdop(e,tp) ...@@ -92,4 +92,4 @@ function cm.rsdop(e,tp)
local g=Duel.SelectMatchingCard(tp,cm.spcheck,tp,LOCATION_DECK,0,1,1,nil,e,tp) local g=Duel.SelectMatchingCard(tp,cm.spcheck,tp,LOCATION_DECK,0,1,1,nil,e,tp)
Duel.SpecialSummon(g,0,tp,tp,false,false,POS_FACEUP) Duel.SpecialSummon(g,0,tp,tp,false,false,POS_FACEUP)
end end
end end
\ No newline at end of file
...@@ -41,7 +41,7 @@ function cm.rlcheck2(c,tp) ...@@ -41,7 +41,7 @@ function cm.rlcheck2(c,tp)
if not c:IsSetCard(0x3cc7) or not Duel.IsPlayerAffectedByEffect(tp,16170021) then return false end if not c:IsSetCard(0x3cc7) or not Duel.IsPlayerAffectedByEffect(tp,16170021) then return false end
local re_tab={Duel.IsPlayerAffectedByEffect(tp,EFFECT_CANNOT_RELEASE)} local re_tab={Duel.IsPlayerAffectedByEffect(tp,EFFECT_CANNOT_RELEASE)}
for _,ve in ipairs(re_tab) do for _,ve in ipairs(re_tab) do
local val=ve:GetValue() local val=ve:GetValue() or aux.TRUE
if val(ve,c) then if val(ve,c) then
return false return false
end end
...@@ -53,7 +53,7 @@ function cm.rlcheck(c,tp) ...@@ -53,7 +53,7 @@ function cm.rlcheck(c,tp)
if not c:IsSetCard(0x3cc7) then return false end if not c:IsSetCard(0x3cc7) then return false end
local re_tab={Duel.IsPlayerAffectedByEffect(tp,EFFECT_CANNOT_RELEASE)} local re_tab={Duel.IsPlayerAffectedByEffect(tp,EFFECT_CANNOT_RELEASE)}
for _,ve in ipairs(re_tab) do for _,ve in ipairs(re_tab) do
local val=ve:GetValue() local val=ve:GetValue() or aux.TRUE
if val(ve,c) then if val(ve,c) then
return false return false
end end
......
...@@ -69,7 +69,7 @@ end ...@@ -69,7 +69,7 @@ end
function cm.rlcheck(c,tp) function cm.rlcheck(c,tp)
local re_tab={Duel.IsPlayerAffectedByEffect(tp,EFFECT_CANNOT_RELEASE)} local re_tab={Duel.IsPlayerAffectedByEffect(tp,EFFECT_CANNOT_RELEASE)}
for _,ve in ipairs(re_tab) do for _,ve in ipairs(re_tab) do
local val=ve:GetValue() local val=ve:GetValue() or aux.TRUE
if val(ve,c) then if val(ve,c) then
return false return false
end end
...@@ -90,7 +90,7 @@ function cm.rlcheck2(c,tp) ...@@ -90,7 +90,7 @@ function cm.rlcheck2(c,tp)
if c:IsLocation(LOCATION_DECK) and (not c:IsSetCard(0x3cc7) or not Duel.IsPlayerAffectedByEffect(tp,16170021)) then return false end if c:IsLocation(LOCATION_DECK) and (not c:IsSetCard(0x3cc7) or not Duel.IsPlayerAffectedByEffect(tp,16170021)) then return false end
local re_tab={Duel.IsPlayerAffectedByEffect(tp,EFFECT_CANNOT_RELEASE)} local re_tab={Duel.IsPlayerAffectedByEffect(tp,EFFECT_CANNOT_RELEASE)}
for _,ve in ipairs(re_tab) do for _,ve in ipairs(re_tab) do
local val=ve:GetValue() local val=ve:GetValue() or aux.TRUE
if val(ve,c) then if val(ve,c) then
return false return false
end end
...@@ -195,4 +195,4 @@ function cm.cpop(e,tp,eg,ep,ev,re,r,rp) ...@@ -195,4 +195,4 @@ function cm.cpop(e,tp,eg,ep,ev,re,r,rp)
e:SetLabelObject(te:GetLabelObject()) e:SetLabelObject(te:GetLabelObject())
local op=te:GetOperation() local op=te:GetOperation()
if op then op(e,tp,eg,ep,ev,re,r,rp) end if op then op(e,tp,eg,ep,ev,re,r,rp) end
end end
\ No newline at end of file
...@@ -82,7 +82,7 @@ function cm.rlcheck2(c,tp) ...@@ -82,7 +82,7 @@ function cm.rlcheck2(c,tp)
if c:IsLocation(LOCATION_DECK) and (not c:IsSetCard(0x3cc7) or not Duel.IsPlayerAffectedByEffect(tp,16170021)) then return false end if c:IsLocation(LOCATION_DECK) and (not c:IsSetCard(0x3cc7) or not Duel.IsPlayerAffectedByEffect(tp,16170021)) then return false end
local re_tab={Duel.IsPlayerAffectedByEffect(tp,EFFECT_CANNOT_RELEASE)} local re_tab={Duel.IsPlayerAffectedByEffect(tp,EFFECT_CANNOT_RELEASE)}
for _,ve in ipairs(re_tab) do for _,ve in ipairs(re_tab) do
local val=ve:GetValue() local val=ve:GetValue() or aux.TRUE
if val(ve,c) then if val(ve,c) then
return false return false
end end
...@@ -186,4 +186,4 @@ function cm.cpop(e,tp,eg,ep,ev,re,r,rp) ...@@ -186,4 +186,4 @@ function cm.cpop(e,tp,eg,ep,ev,re,r,rp)
e:SetLabelObject(te:GetLabelObject()) e:SetLabelObject(te:GetLabelObject())
local op=te:GetOperation() local op=te:GetOperation()
if op then op(e,tp,eg,ep,ev,re,r,rp) end if op then op(e,tp,eg,ep,ev,re,r,rp) end
end end
\ No newline at end of file
...@@ -34,7 +34,7 @@ function cm.rlcheck2(c,tp) ...@@ -34,7 +34,7 @@ function cm.rlcheck2(c,tp)
if not c:IsSetCard(0x3cc7) or not Duel.IsPlayerAffectedByEffect(tp,16170021) then return false end if not c:IsSetCard(0x3cc7) or not Duel.IsPlayerAffectedByEffect(tp,16170021) then return false end
local re_tab={Duel.IsPlayerAffectedByEffect(tp,EFFECT_CANNOT_RELEASE)} local re_tab={Duel.IsPlayerAffectedByEffect(tp,EFFECT_CANNOT_RELEASE)}
for _,ve in ipairs(re_tab) do for _,ve in ipairs(re_tab) do
local val=ve:GetValue() local val=ve:GetValue() or aux.TRUE
if val(ve,c) then if val(ve,c) then
return false return false
end end
...@@ -45,7 +45,7 @@ end ...@@ -45,7 +45,7 @@ end
function cm.rlcheck(c,tp) function cm.rlcheck(c,tp)
local re_tab={Duel.IsPlayerAffectedByEffect(tp,EFFECT_CANNOT_RELEASE)} local re_tab={Duel.IsPlayerAffectedByEffect(tp,EFFECT_CANNOT_RELEASE)}
for _,ve in ipairs(re_tab) do for _,ve in ipairs(re_tab) do
local val=ve:GetValue() local val=ve:GetValue() or aux.TRUE
if val(ve,c) then if val(ve,c) then
return false return false
end end
...@@ -165,4 +165,4 @@ function cm.reop(e,tp,eg,ep,ev,re,r,rp) ...@@ -165,4 +165,4 @@ function cm.reop(e,tp,eg,ep,ev,re,r,rp)
end end
Duel.RegisterFlagEffect(tp,m+1,RESET_PHASE+PHASE_END,0,1) Duel.RegisterFlagEffect(tp,m+1,RESET_PHASE+PHASE_END,0,1)
end end
end end
\ No newline at end of file
...@@ -9,6 +9,7 @@ function cm.initial_effect(c) ...@@ -9,6 +9,7 @@ function cm.initial_effect(c)
e0:SetType(EFFECT_TYPE_FIELD) e0:SetType(EFFECT_TYPE_FIELD)
e0:SetRange(LOCATION_HAND) e0:SetRange(LOCATION_HAND)
e0:SetCode(EFFECT_SPSUMMON_PROC) e0:SetCode(EFFECT_SPSUMMON_PROC)
e0:SetCountLimit(1,m+EFFECT_COUNT_CODE_OATH)
e0:SetCondition(cm.spccon) e0:SetCondition(cm.spccon)
e0:SetTarget(cm.spctg) e0:SetTarget(cm.spctg)
e0:SetOperation(cm.spcop) e0:SetOperation(cm.spcop)
...@@ -37,7 +38,7 @@ function cm.rlcheck2(c,tp) ...@@ -37,7 +38,7 @@ function cm.rlcheck2(c,tp)
if not c:IsSetCard(0x3cc7) then return false end if not c:IsSetCard(0x3cc7) then return false end
local re_tab={Duel.IsPlayerAffectedByEffect(tp,EFFECT_CANNOT_RELEASE)} local re_tab={Duel.IsPlayerAffectedByEffect(tp,EFFECT_CANNOT_RELEASE)}
for _,ve in ipairs(re_tab) do for _,ve in ipairs(re_tab) do
local val=ve:GetValue() local val=ve:GetValue() or aux.TRUE
if val(ve,c) then if val(ve,c) then
return false return false
end end
...@@ -48,7 +49,7 @@ end ...@@ -48,7 +49,7 @@ end
function cm.rlcheck(c,tp) function cm.rlcheck(c,tp)
local re_tab={Duel.IsPlayerAffectedByEffect(tp,EFFECT_CANNOT_RELEASE)} local re_tab={Duel.IsPlayerAffectedByEffect(tp,EFFECT_CANNOT_RELEASE)}
for _,ve in ipairs(re_tab) do for _,ve in ipairs(re_tab) do
local val=ve:GetValue() local val=ve:GetValue() or aux.TRUE
if val(ve,c) then if val(ve,c) then
return false return false
end end
...@@ -130,4 +131,4 @@ function cm.rtop(e,tp,eg,ep,ev,re,r,rp) ...@@ -130,4 +131,4 @@ function cm.rtop(e,tp,eg,ep,ev,re,r,rp)
Duel.Recover(tp,num*500,REASON_EFFECT) Duel.Recover(tp,num*500,REASON_EFFECT)
end end
end end
end end
\ No newline at end of file
...@@ -124,7 +124,7 @@ function cm.rlcheck2(c,tp) ...@@ -124,7 +124,7 @@ function cm.rlcheck2(c,tp)
if not c:IsSetCard(0x3cc7) then return false end if not c:IsSetCard(0x3cc7) then return false end
local re_tab={Duel.IsPlayerAffectedByEffect(tp,EFFECT_CANNOT_RELEASE)} local re_tab={Duel.IsPlayerAffectedByEffect(tp,EFFECT_CANNOT_RELEASE)}
for _,ve in ipairs(re_tab) do for _,ve in ipairs(re_tab) do
local val=ve:GetValue() local val=ve:GetValue() or aux.TRUE
if val(ve,c) then if val(ve,c) then
return false return false
end end
...@@ -140,4 +140,4 @@ function cm.rsdop(e,tp) ...@@ -140,4 +140,4 @@ function cm.rsdop(e,tp)
Duel.Hint(HINT_SELECTMSG,tp,HINTMSG_RELEASE) Duel.Hint(HINT_SELECTMSG,tp,HINTMSG_RELEASE)
local g=Duel.SelectMatchingCard(tp,cm.rlcheck2,tp,LOCATION_DECK,0,1,1,nil,tp) local g=Duel.SelectMatchingCard(tp,cm.rlcheck2,tp,LOCATION_DECK,0,1,1,nil,tp)
Duel.Release(g,REASON_EFFECT) Duel.Release(g,REASON_EFFECT)
end end
\ No newline at end of file
...@@ -5,13 +5,13 @@ local cm=_G["c"..m] ...@@ -5,13 +5,13 @@ local cm=_G["c"..m]
function cm.initial_effect(c) function cm.initial_effect(c)
aux.EnablePendulumAttribute(c) aux.EnablePendulumAttribute(c)
local e0=Effect.CreateEffect(c) --local e0=Effect.CreateEffect(c)
e0:SetType(EFFECT_TYPE_SINGLE) --e0:SetType(EFFECT_TYPE_SINGLE)
e0:SetCode(EFFECT_IMMUNE_EFFECT) --e0:SetCode(EFFECT_IMMUNE_EFFECT)
e0:SetRange(LOCATION_PZONE) --e0:SetRange(LOCATION_PZONE)
e0:SetCondition(cm.lpconc) --e0:SetCondition(cm.lpconc)
e0:SetValue(cm.efilter) --e0:SetValue(cm.efilter)
c:RegisterEffect(e0) --c:RegisterEffect(e0)
local e1=Effect.CreateEffect(c) local e1=Effect.CreateEffect(c)
e1:SetType(EFFECT_TYPE_CONTINUOUS+EFFECT_TYPE_FIELD) e1:SetType(EFFECT_TYPE_CONTINUOUS+EFFECT_TYPE_FIELD)
...@@ -83,13 +83,14 @@ function cm.disop(e,tp,eg,ep,ev,re,r,rp) ...@@ -83,13 +83,14 @@ function cm.disop(e,tp,eg,ep,ev,re,r,rp)
local v = 1000 * e:GetLabelObject():GetValue() local v = 1000 * e:GetLabelObject():GetValue()
local p = e:GetLabelObject():GetOwner() local p = e:GetLabelObject():GetOwner()
--Duel.Recover(tp,v,REASON_EFFECT) --Duel.Recover(tp,v,REASON_EFFECT)
Duel.Damage(p,v,REASON_EFFECT) --Duel.Damage(p,v,REASON_EFFECT)
Duel.Damage(tp,v,REASON_EFFECT)
e:GetLabelObject():SetValue(1) e:GetLabelObject():SetValue(1)
end end
--e3 --e3
function cm.condition(e,tp,eg,ep,ev,re,r,rp) function cm.condition(e,tp,eg,ep,ev,re,r,rp)
local g=re:GetHandler() local g=re:GetHandler()
return ep==1-tp and Duel.IsChainDisablable(ev) and re:IsActiveType(TYPE_MONSTER) and (g:IsLocation(LOCATION_GRAVE) or g:IsLocation(LOCATION_REMOVED)) return ep==1-tp and Duel.IsChainDisablable(ev) and re:IsActiveType(TYPE_MONSTER) and re:GetActivateLocation()==LOCATION_GRAVE --(g:IsLocation(LOCATION_GRAVE) or g:IsLocation(LOCATION_REMOVED))
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 e:GetHandler():IsAbleToGraveAsCost() end if chk==0 then return e:GetHandler():IsAbleToGraveAsCost() end
......
...@@ -27,7 +27,7 @@ local e1=Effect.CreateEffect(c) ...@@ -27,7 +27,7 @@ local e1=Effect.CreateEffect(c)
local e3=Effect.CreateEffect(c) local e3=Effect.CreateEffect(c)
e3:SetDescription(aux.Stringid(m,3)) e3:SetDescription(aux.Stringid(m,3))
e3:SetCategory(CATEGORY_TODECK) e3:SetCategory(CATEGORY_TODECK)
e3:SetType(EFFECT_TYPE_SINGLE+EFFECT_TYPE_TRIGGER_O) e3:SetType(EFFECT_TYPE_SINGLE+EFFECT_TYPE_CONTINUOUS)
e3:SetProperty(EFFECT_FLAG_DELAY) e3:SetProperty(EFFECT_FLAG_DELAY)
e3:SetCode(EVENT_REMOVE) e3:SetCode(EVENT_REMOVE)
e3:SetCondition(cm.condition3) e3:SetCondition(cm.condition3)
...@@ -79,30 +79,34 @@ function cm.spop2(e,tp,eg,ep,ev,re,r,rp) ...@@ -79,30 +79,34 @@ function cm.spop2(e,tp,eg,ep,ev,re,r,rp)
end end
function cm.condition3(e,tp,eg,ep,ev,re,r,rp) function cm.condition3(e,tp,eg,ep,ev,re,r,rp)
return (e:GetHandler():IsPreviousLocation(LOCATION_DECK) and e:GetHandler():GetReasonPlayer()~=tp) or Duel.GetFlagEffect(tp,m)==0 return (e:GetHandler():IsPreviousLocation(LOCATION_DECK) and e:GetHandler():GetReasonPlayer()~=tp) or (Duel.GetFlagEffect(tp,m)==0 and e:GetHandler():GetReasonPlayer()~=tp and not e:GetHandler():IsPreviousLocation(LOCATION_DECK))
end end
function cm.spop3(e,tp,eg,ep,ev,re,r,rp) function cm.spop3(e,tp,eg,ep,ev,re,r,rp)
local c=e:GetHandler() local c=e:GetHandler()
if c:IsPreviousLocation(LOCATION_DECK) and c:GetReasonPlayer()~=tp then if (e:GetHandler():IsPreviousLocation(LOCATION_DECK) and e:GetHandler():GetReasonPlayer()~=tp) or (Duel.GetFlagEffect(tp,m)==0 and e:GetHandler():GetReasonPlayer()~=tp and not e:GetHandler():IsPreviousLocation(LOCATION_DECK)) then
local g=Duel.GetFieldGroup(tp,LOCATION_REMOVED,0) if Duel.SelectYesNo(tp,Stringid(18700420,5)) then
Duel.SendtoDeck(g,nil,nil,REASON_EFFECT) if c:IsPreviousLocation(LOCATION_DECK) then
local e1=Effect.CreateEffect(e:GetHandler()) local g=Duel.GetFieldGroup(tp,LOCATION_REMOVED,0)
e1:SetType(EFFECT_TYPE_FIELD) Duel.SendtoDeck(g,nil,nil,REASON_EFFECT)
e1:SetCode(EFFECT_CANNOT_REMOVE) local e1=Effect.CreateEffect(e:GetHandler())
e1:SetProperty(EFFECT_FLAG_PLAYER_TARGET) e1:SetType(EFFECT_TYPE_FIELD)
e1:SetTargetRange(0,1) e1:SetCode(EFFECT_CANNOT_REMOVE)
e1:SetValue(1) e1:SetProperty(EFFECT_FLAG_PLAYER_TARGET)
e1:SetReset(RESET_PHASE+PHASE_END) e1:SetTargetRange(0,1)
Duel.RegisterEffect(e1,tp) e1:SetValue(1)
local e2=Effect.CreateEffect(e:GetHandler()) e1:SetReset(RESET_PHASE+PHASE_END)
e2:SetType(EFFECT_TYPE_FIELD) Duel.RegisterEffect(e1,tp)
e2:SetCode(30459350) local e2=Effect.CreateEffect(e:GetHandler())
e2:SetProperty(EFFECT_FLAG_PLAYER_TARGET) e2:SetType(EFFECT_TYPE_FIELD)
e2:SetTargetRange(0,1) e2:SetCode(30459350)
e2:SetReset(RESET_PHASE+PHASE_END) e2:SetProperty(EFFECT_FLAG_PLAYER_TARGET)
Duel.RegisterEffect(e2,tp) e2:SetTargetRange(0,1)
else e2:SetReset(RESET_PHASE+PHASE_END)
Duel.SendtoDeck(c,nil,1,REASON_EFFECT) Duel.RegisterEffect(e2,tp)
Duel.RegisterFlagEffect(tp,m,RESET_PHASE+PHASE_END,0,1) else
Duel.SendtoDeck(c,nil,1,REASON_EFFECT)
Duel.RegisterFlagEffect(tp,m,RESET_PHASE+PHASE_END,0,1)
end
end
end end
end end
\ No newline at end of file
...@@ -109,7 +109,7 @@ function s.eqfilter2(c,tp) ...@@ -109,7 +109,7 @@ function s.eqfilter2(c,tp)
return c:IsSetCard(0xd52) and c:CheckUniqueOnField(tp) and not c:IsForbidden() and c:IsType(TYPE_TRAP) return c:IsSetCard(0xd52) and c:CheckUniqueOnField(tp) and not c:IsForbidden() and c:IsType(TYPE_TRAP)
end end
function s.eqfilter3(c,tp) function s.eqfilter3(c,tp)
return c:IsAttribute(ATTRIBUTE_LIGHT) return c:IsAttribute(ATTRIBUTE_LIGHT) and c:IsFaceup()
end end
function s.eqtg(e,tp,eg,ep,ev,re,r,rp,chk,chkc) function s.eqtg(e,tp,eg,ep,ev,re,r,rp,chk,chkc)
local c=e:GetHandler() local c=e:GetHandler()
......
...@@ -29,7 +29,7 @@ function cm.cfilter(c) ...@@ -29,7 +29,7 @@ function cm.cfilter(c)
return c:IsLevel(4) and c:IsAbleToRemoveAsCost() return c:IsLevel(4) and c:IsAbleToRemoveAsCost()
end end
function cm.ovfilter(c) function cm.ovfilter(c)
return c:IsFaceup() and c:IsRankBelow(4) return c:IsFaceup() and c:IsRankBelow(4) and c:IsType(TYPE_XYZ) and c:IsSetCard(0x777)
end end
function cm.xyzop(e,tp,chk) function cm.xyzop(e,tp,chk)
if chk==0 then return Duel.GetFlagEffect(tp,m)==0 and Duel.IsExistingMatchingCard(cm.cfilter,tp,LOCATION_GRAVE,0,1,nil) end if chk==0 then return Duel.GetFlagEffect(tp,m)==0 and Duel.IsExistingMatchingCard(cm.cfilter,tp,LOCATION_GRAVE,0,1,nil) end
......
...@@ -51,7 +51,7 @@ function cm.initial_effect(c) ...@@ -51,7 +51,7 @@ function cm.initial_effect(c)
c:RegisterEffect(e4) c:RegisterEffect(e4)
end end
function cm.matfilter(c) function cm.matfilter(c)
return c:IsSetCard(0x777) and c:IsRank(4) return c:IsRank(4)
end end
function cm.splimit(e,se,sp,st) function cm.splimit(e,se,sp,st)
return not e:GetHandler():IsLocation(LOCATION_EXTRA) or (bit.band(st,SUMMON_TYPE_XYZ)==SUMMON_TYPE_XYZ and not se) return not e:GetHandler():IsLocation(LOCATION_EXTRA) or (bit.band(st,SUMMON_TYPE_XYZ)==SUMMON_TYPE_XYZ and not se)
......
--创界神 奥梅提奥托 --创界神 奥梅提奥托
local s,id=GetID() local s,id=GetID()
s.named_with_Grandwalker=1
function s.Grandwalker(c)
local m=_G["c"..c:GetCode()]
return m and m.named_with_Grandwalker
end
function s.initial_effect(c) function s.initial_effect(c)
......
...@@ -2,7 +2,7 @@ ...@@ -2,7 +2,7 @@
local s,id=GetID() local s,id=GetID()
s.ui_hint_effect = s.ui_hint_effect or {} s.ui_hint_effect = s.ui_hint_effect or {}
local CORE_ID = 40020353 local CORE_ID = 40020353
local ArmedIntervention = CORE_ID local ArmedIntervention = CORE_ID
local ArmedIntervention_UI = CORE_ID + 10000 local ArmedIntervention_UI = CORE_ID + 10000
--CB --CB
s.named_with_CelestialBeing=1 s.named_with_CelestialBeing=1
...@@ -155,7 +155,7 @@ function s.lvop(e,tp,eg,ep,ev,re,r,rp) ...@@ -155,7 +155,7 @@ function s.lvop(e,tp,eg,ep,ev,re,r,rp)
e1:SetType(EFFECT_TYPE_SINGLE) e1:SetType(EFFECT_TYPE_SINGLE)
e1:SetCode(EFFECT_UPDATE_LEVEL) e1:SetCode(EFFECT_UPDATE_LEVEL)
e1:SetValue(3) e1:SetValue(3)
e1:SetReset(RESET_EVENT+RESETS_STANDARD_DISABLE) e1:SetReset(RESET_EVENT+RESETS_STANDARD+RESET_DISABLE)
c:RegisterEffect(e1) c:RegisterEffect(e1)
local current_lv = c:GetLevel() local current_lv = c:GetLevel()
......
...@@ -45,8 +45,7 @@ function s.initial_effect(c) ...@@ -45,8 +45,7 @@ function s.initial_effect(c)
c:RegisterEffect(e3) c:RegisterEffect(e3)
end end
function s.spcfilter(c,e,tp) function s.spcfilter(c,e,tp)
return s.CelestialBeing(c) and c:IsAttribute(ATTRIBUTE_WATER) and c:IsType(TYPE_UNION) return s.CelestialBeing(c) and c:IsAttribute(ATTRIBUTE_WATER) and c:IsType(TYPE_UNION) and c:IsCanBeSpecialSummoned(e,0,tp,false,false)
and c:IsCanBeSpecialSummoned(e,0,tp,false,false)
end end
...@@ -129,7 +128,7 @@ function s.actop(e,tp,eg,ep,ev,re,r,rp) ...@@ -129,7 +128,7 @@ function s.actop(e,tp,eg,ep,ev,re,r,rp)
if Duel.MoveToField(c,tp,tp,LOCATION_SZONE,POS_FACEUP,true) then if Duel.MoveToField(c,tp,tp,LOCATION_SZONE,POS_FACEUP,true) then
local g=Duel.GetMatchingGroup(s.spcfilter,tp,LOCATION_DECK,0,nil) local g=Duel.GetMatchingGroup(s.spcfilter,tp,LOCATION_DECK,0,nil,e,tp)
if g:GetCount()>0 and Duel.GetLocationCount(tp,LOCATION_MZONE)>0 if g:GetCount()>0 and Duel.GetLocationCount(tp,LOCATION_MZONE)>0
and Duel.SelectYesNo(tp,aux.Stringid(id,0)) then and Duel.SelectYesNo(tp,aux.Stringid(id,0)) then
Duel.Hint(HINT_SELECTMSG,tp,HINTMSG_SPSUMMON) Duel.Hint(HINT_SELECTMSG,tp,HINTMSG_SPSUMMON)
......
...@@ -14,7 +14,7 @@ function s.sprule(c) ...@@ -14,7 +14,7 @@ function s.sprule(c)
c:RegisterEffect(e2) c:RegisterEffect(e2)
end end
function s.mfilter(c) function s.mfilter(c)
return c:IsLinkSetCard(0x9ca1) or c:IsLinkSetCard(0x6ca1) return (c:IsLinkSetCard(0x9ca1) and c:IsFaceup()) or c:IsLinkSetCard(0x6ca1)
end end
function s.spsummon_reg(c) function s.spsummon_reg(c)
local e1=Effect.CreateEffect(c) local e1=Effect.CreateEffect(c)
......
...@@ -14,7 +14,7 @@ function s.sprule(c) ...@@ -14,7 +14,7 @@ function s.sprule(c)
c:RegisterEffect(e2) c:RegisterEffect(e2)
end end
function s.mfilter(c) function s.mfilter(c)
return c:GetOriginalType()&TYPE_TRAP~=0 or c:IsLinkRace(RACE_FIEND) return (c:GetOriginalType()&TYPE_TRAP~=0 or c:IsLinkRace(RACE_FIEND)) and (c:IsFaceup() or c:IsSetCard(0x6ca1))
end end
function s.search_reg(c) function s.search_reg(c)
local e1=Effect.CreateEffect(c) local e1=Effect.CreateEffect(c)
......
--云轮之铠 墨 --云轮之铠 墨
local s,id,o=GetID() local s,id,o=GetID()
function c61200305.initial_effect(c) function s.initial_effect(c)
--守备表示 --守备表示
local e1=Effect.CreateEffect(c)
e1:SetType(EFFECT_TYPE_FIELD)
e1:SetCode(EFFECT_SET_POSITION)
e1:SetProperty(EFFECT_FLAG_SINGLE_RANGE)
e1:SetRange(LOCATION_MZONE)
e1:SetTarget(s.tg1)
e1:SetTargetRange(LOCATION_MZONE,0)
e1:SetValue(POS_FACEUP_DEFENSE)
c:RegisterEffect(e1)
--效果赋予
local e2=Effect.CreateEffect(c) local e2=Effect.CreateEffect(c)
e2:SetDescription(aux.Stringid(id,0))
e2:SetType(EFFECT_TYPE_FIELD) e2:SetType(EFFECT_TYPE_FIELD)
e2:SetCode(EFFECT_SET_POSITION) e2:SetCode(EFFECT_DIRECT_ATTACK)
e2:SetProperty(EFFECT_FLAG_SINGLE_RANGE)
e2:SetRange(LOCATION_MZONE) e2:SetRange(LOCATION_MZONE)
e2:SetTarget(s.tg2) e2:SetTargetRange(0,LOCATION_MZONE)
e2:SetTargetRange(LOCATION_MZONE,0) e2:SetCondition(s.con2)
e2:SetValue(POS_FACEUP_DEFENSE) e2:SetTarget(aux.TargetBoolFunction(Card.IsFaceup))
c:RegisterEffect(e2) c:RegisterEffect(e2)
--效果赋予
local e7=Effect.CreateEffect(c)
e7:SetDescription(aux.Stringid(id,0))
e7:SetType(EFFECT_TYPE_SINGLE)
e7:SetCode(EFFECT_DIRECT_ATTACK)
local e8=Effect.CreateEffect(c)
e8:SetType(EFFECT_TYPE_FIELD+EFFECT_TYPE_GRANT)
e8:SetRange(LOCATION_MZONE)
e8:SetTargetRange(0,LOCATION_MZONE)
e8:SetTarget(s.tg8)
e8:SetLabelObject(e7)
c:RegisterEffect(e8)
--进墓时 --进墓时
local e9=Effect.CreateEffect(c) local e3=Effect.CreateEffect(c)
e9:SetDescription(aux.Stringid(id,1)) e3:SetDescription(aux.Stringid(id,1))
e9:SetCategory(CATEGORY_REMOVE) e3:SetCategory(CATEGORY_REMOVE)
e9:SetType(EFFECT_TYPE_SINGLE+EFFECT_TYPE_TRIGGER_O) e3:SetType(EFFECT_TYPE_SINGLE+EFFECT_TYPE_TRIGGER_O)
e9:SetProperty(EFFECT_FLAG_DELAY) e3:SetProperty(EFFECT_FLAG_DELAY)
e9:SetCode(EVENT_TO_GRAVE) e3:SetCode(EVENT_TO_GRAVE)
e9:SetCountLimit(1,id) e3:SetCountLimit(1,id)
e9:SetCost(aux.bfgcost) e3:SetCost(aux.bfgcost)
e9:SetTarget(s.tg9) e3:SetTarget(s.tg3)
e9:SetOperation(s.op9) e3:SetOperation(s.op3)
c:RegisterEffect(e9) c:RegisterEffect(e3)
--除外时 --除外时
local e10=Effect.CreateEffect(c) local e4=Effect.CreateEffect(c)
e10:SetDescription(aux.Stringid(id,2)) e4:SetDescription(aux.Stringid(id,2))
e10:SetType(EFFECT_TYPE_SINGLE+EFFECT_TYPE_TRIGGER_O) e4:SetType(EFFECT_TYPE_SINGLE+EFFECT_TYPE_TRIGGER_O)
e10:SetProperty(EFFECT_FLAG_DELAY) e4:SetProperty(EFFECT_FLAG_DELAY)
e10:SetCode(EVENT_REMOVE) e4:SetCode(EVENT_REMOVE)
e10:SetCountLimit(1,61200052) e4:SetCountLimit(1,61200052)
e10:SetCost(s.cost10) e4:SetCost(s.cost4)
e10:SetTarget(s.tg10) e4:SetTarget(s.tg4)
e10:SetOperation(s.op10) e4:SetOperation(s.op4)
c:RegisterEffect(e10) c:RegisterEffect(e4)
end end
function s.f1(c) function s.f1(c)
...@@ -56,29 +54,20 @@ function s.f2(c,e,tp) ...@@ -56,29 +54,20 @@ function s.f2(c,e,tp)
return c:IsCode(id) and c:IsCanBeSpecialSummoned(e,nil,tp,false,false) return c:IsCode(id) and c:IsCanBeSpecialSummoned(e,nil,tp,false,false)
end end
function s.splimit(e,se,sp,st) function s.tg1(e,c)
return se:IsHasType(EFFECT_TYPE_ACTIONS) return c:IsCode(id)
end
function s.fuslimit(e,c,sumtype)
return sumtype==SUMMON_TYPE_FUSION
end
function s.tg2(e,c)
return c:IsCode(61200305)
end end
function s.tg8(e,c) function s.con2(e)
local g1=Duel.GetMatchingGroup(aux.TRUE,tp,LOCATION_MZONE,0,c) return Duel.IsExistingMatchingCard(aux.TRUE,tp,LOCATION_MZONE,0,1,c)
return g1:GetCount()==0
end end
function s.tg9(e,tp,eg,ep,ev,re,r,rp,chk) function s.tg3(e,tp,eg,ep,ev,re,r,rp,chk)
if chk==0 then return Duel.IsExistingMatchingCard(s.f1,tp,LOCATION_GRAVE,0,1,nil) end if chk==0 then return Duel.IsExistingMatchingCard(s.f1,tp,LOCATION_GRAVE,0,1,nil) end
Duel.SetOperationInfo(0,CATEGORY_REMOVE,nil,0,0,0) Duel.SetOperationInfo(0,CATEGORY_REMOVE,nil,0,0,0)
end end
function s.op9(e,tp,eg,ep,ev,re,r,rp) function s.op3(e,tp,eg,ep,ev,re,r,rp)
local g=Duel.GetMatchingGroup(s.f1,tp,LOCATION_GRAVE,0,0) local g=Duel.GetMatchingGroup(s.f1,tp,LOCATION_GRAVE,0,0)
if g:GetCount()>0 then if g:GetCount()>0 then
Duel.Hint(HINT_SELECTMSG,tp,HINTMSG_REMOVE) Duel.Hint(HINT_SELECTMSG,tp,HINTMSG_REMOVE)
...@@ -87,21 +76,22 @@ function s.op9(e,tp,eg,ep,ev,re,r,rp) ...@@ -87,21 +76,22 @@ function s.op9(e,tp,eg,ep,ev,re,r,rp)
end end
end end
function s.cost10(e,tp,eg,ep,ev,re,r,rp,chk) function s.cost4(e,tp,eg,ep,ev,re,r,rp,chk)
local c=e:GetHandler() local c=e:GetHandler()
if chk==0 then return c:IsAbleToDeck() end if chk==0 then return c:IsAbleToDeck() end
Duel.SendtoDeck(c,tp,2,REASON_COST) Duel.SendtoDeck(c,tp,2,REASON_COST)
end end
function s.tg10(e,tp,eg,ep,ev,re,r,rp,chk) function s.tg4(e,tp,eg,ep,ev,re,r,rp,chk)
if chk==0 then return true end if chk==0 then return true end
Duel.SetOperationInfo(0,CATEGORY_SPECIAL_SUMMON,0,1,0,0) Duel.SetOperationInfo(0,CATEGORY_SPECIAL_SUMMON,0,1,0,0)
end end
function s.op10(e,tp,eg,ep,ev,re,r,rp) function s.op4(e,tp,eg,ep,ev,re,r,rp)
Duel.Hint(HINT_SELECTMSG,tp,HINTMSG_SPSUMMON) local g=Duel.GetMatchingGroup(s.f2,tp,LOCATION_DECK,0,nil,e,tp)
local g=Duel.SelectMatchingCard(tp,s.f2,tp,LOCATION_DECK,0,1,1,nil,e,tp) if g:GetCount()>0 and Duel.SelectYesNo(tp,aux.Stringid(id,3)) then
if g:GetCount()>0 then Duel.SelectYesNo(1-tp,aux.Stringid(id,4))
Duel.SpecialSummon(g,nil,tp,tp,false,false,POS_FACEUP) local sg=g:Select(tp,1,1,nil)
Duel.SpecialSummon(sg,nil,tp,tp,false,false,POS_FACEUP)
end end
end end
\ No newline at end of file
...@@ -16,6 +16,7 @@ function c62624550.initial_effect(c) ...@@ -16,6 +16,7 @@ function c62624550.initial_effect(c)
e2:SetCategory(CATEGORY_SEARCH) e2:SetCategory(CATEGORY_SEARCH)
e2:SetType(EFFECT_TYPE_SINGLE+EFFECT_TYPE_TRIGGER_O) e2:SetType(EFFECT_TYPE_SINGLE+EFFECT_TYPE_TRIGGER_O)
e2:SetCode(EVENT_SPSUMMON_SUCCESS) e2:SetCode(EVENT_SPSUMMON_SUCCESS)
e2:SetProperty(EFFECT_FLAG_DELAY)
e2:SetCountLimit(1,62624551) e2:SetCountLimit(1,62624551)
e2:SetTarget(c62624550.sttg) e2:SetTarget(c62624550.sttg)
e2:SetOperation(c62624550.stop) e2:SetOperation(c62624550.stop)
......
...@@ -16,40 +16,55 @@ function c62624730.initial_effect(c) ...@@ -16,40 +16,55 @@ function c62624730.initial_effect(c)
local e11=e1:Clone() local e11=e1:Clone()
e11:SetCode(EFFECT_CANNOT_DISABLE_SPSUMMON) e11:SetCode(EFFECT_CANNOT_DISABLE_SPSUMMON)
c:RegisterEffect(e11) c:RegisterEffect(e11)
--decrease tribute --decrease tribute (修改后的效果②)
local e2=Effect.CreateEffect(c) local e2=Effect.CreateEffect(c)
e2:SetDescription(aux.Stringid(62624730,0)) e2:SetDescription(aux.Stringid(62624730,0))
e2:SetType(EFFECT_TYPE_FIELD) e2:SetType(EFFECT_TYPE_FIELD)
e2:SetCode(EFFECT_SUMMON_PROC) e2:SetCode(EFFECT_SUMMON_PROC)
e2:SetRange(LOCATION_FZONE) e2:SetRange(LOCATION_FZONE)
e2:SetTargetRange(LOCATION_HAND,0) e2:SetTargetRange(LOCATION_HAND,0)
e2:SetCountLimit(1)
e2:SetCondition(c62624730.ntcon) e2:SetCondition(c62624730.ntcon)
e2:SetTarget(c62624730.nttg) e2:SetTarget(c62624730.nttg)
e2:SetOperation(c62624730.ntop)
c:RegisterEffect(e2) c:RegisterEffect(e2)
--tohand --tohand
local e3=Effect.CreateEffect(c) local e3=Effect.CreateEffect(c)
e3:SetDescription(aux.Stringid(62624730,1))
e3:SetCategory(CATEGORY_TOHAND+CATEGORY_SEARCH) e3:SetCategory(CATEGORY_TOHAND+CATEGORY_SEARCH)
e3:SetType(EFFECT_TYPE_IGNITION) e3:SetType(EFFECT_TYPE_IGNITION)
e3:SetRange(LOCATION_GRAVE) e3:SetRange(LOCATION_GRAVE)
e3:SetCost(aux.bfgcost) e3:SetCost(c62624730.thcost)
e3:SetTarget(c62624730.thtg) e3:SetTarget(c62624730.thtg)
e3:SetOperation(c62624730.thop) e3:SetOperation(c62624730.thop)
c:RegisterEffect(e3) c:RegisterEffect(e3)
end end
-- 上级召唤无需解放的条件函数
function c62624730.ntcon(e,c,minc) function c62624730.ntcon(e,c,minc)
if c==nil then return true end if c==nil then return true end
return minc==0 and Duel.GetLocationCount(c:GetControler(),LOCATION_MZONE)>0 return minc==0 and Duel.GetLocationCount(c:GetControler(),LOCATION_MZONE)>0
end end
-- 上级召唤无需解放的目标过滤函数(修改:支持两个字段)
function c62624730.nttg(e,c) function c62624730.nttg(e,c)
return c:IsLevelAbove(5) return c:IsLevelAbove(5) and (c:IsSetCard(0x6d0) or c:IsSetCard(0x6d1))
end end
function c62624730.thcost(e,tp,eg,ep,ev,re,r,rp,chk)
if chk==0 then return e:GetHandler():IsAbleToRemoveAsCost() end
Duel.Remove(e:GetHandler(),POS_FACEUP,REASON_COST)
end
function c62624730.thfilter(c) function c62624730.thfilter(c)
return c:IsCode(62624245) and c:IsAbleToHand() return c:IsSetCard(0x6d1) and c:IsAbleToHand()
end end
function c62624730.thtg(e,tp,eg,ep,ev,re,r,rp,chk) function c62624730.thtg(e,tp,eg,ep,ev,re,r,rp,chk)
if chk==0 then return Duel.IsExistingMatchingCard(c62624730.thfilter,tp,LOCATION_DECK,0,1,nil) end if chk==0 then return Duel.IsExistingMatchingCard(c62624730.thfilter,tp,LOCATION_DECK,0,1,nil) end
Duel.SetOperationInfo(0,CATEGORY_TOHAND,nil,1,tp,LOCATION_DECK) Duel.SetOperationInfo(0,CATEGORY_TOHAND,nil,1,tp,LOCATION_DECK)
end end
function c62624730.thop(e,tp,eg,ep,ev,re,r,rp) function c62624730.thop(e,tp,eg,ep,ev,re,r,rp)
Duel.Hint(HINT_SELECTMSG,tp,HINTMSG_ATOHAND) Duel.Hint(HINT_SELECTMSG,tp,HINTMSG_ATOHAND)
local g=Duel.SelectMatchingCard(tp,c62624730.thfilter,tp,LOCATION_DECK,0,1,1,nil) local g=Duel.SelectMatchingCard(tp,c62624730.thfilter,tp,LOCATION_DECK,0,1,1,nil)
......
--友希兰 --友希兰
Duel.LoadScript("c64839999.lua") --Duel.LoadScript("c64839999.lua")
local m,cm=rscf.DefineCard(64837018) local cm,m=GetID()
function cm.initial_effect(c) function cm.initial_effect(c)
--local e1=rscf.SetSummonCondition(c,nil,rsval.spconbe) --local e1=rscf.SetSummonCondition(c,nil,rsval.spconbe)
local e2=rsef.FTO(c,EVENT_SUMMON_SUCCESS,{m,0},{1,m},"sp,atk,def","de",LOCATION_HAND,cm.spcon,nil,rsop.target2(cm.fun,rscf.spfilter2(),"sp"),cm.spop) --local e2=rsef.FTO(c,EVENT_SUMMON_SUCCESS,{m,0},{1,m},"sp,atk,def","de",LOCATION_HAND,cm.spcon,nil,rsop.target2(cm.fun,rscf.spfilter2(),"sp"),cm.spop)
local e5=rsef.RegisterClone(c,e2,"code",EVENT_SPSUMMON_SUCCESS) --local e5=rsef.RegisterClone(c,e2,"code",EVENT_SPSUMMON_SUCCESS)
local e3=rsef.SV_INDESTRUCTABLE(c,"battle") --local e3=rsef.SV_INDESTRUCTABLE(c,"battle")
local e4=rsef.QO_NEGATE(c,"neg",nil,"des",LOCATION_MZONE,rscon.negcon(cm.filter)) --local e4=rsef.QO_NEGATE(c,"neg",nil,"des",LOCATION_MZONE,rscon.negcon(cm.filter))
local e2=Effect.CreateEffect(c)
e2:SetType(EFFECT_TYPE_QUICK_O)
e2:SetCode(EVENT_SUMMON_SUCCESS)
e2:SetCondition(cm.spcon)
e2:SetRange(LOCATION_HAND)
e2:SetCountLimit(1,m)
e2:SetCategory(CATEGORY_SPECIAL_SUMMON)
e2:SetTarget(cm.fun)
e2:SetOperation(cm.spop)
c:RegisterEffect(e2)
local e5=e2:Clone()
e5:SetCode(EVENT_SPSUMMON_SUCCESS)
c:RegisterEffect(e5)
local e3=Effect.CreateEffect(c)
e3:SetType(EFFECT_TYPE_SINGLE)
e3:SetCode(EFFECT_INDESTRUCTABLE_BATTLE)
e3:SetValue(1)
c:RegisterEffect(e3)
local e4=Effect.CreateEffect(c)
e4:SetType(EFFECT_TYPE_QUICK_O)
e4:SetCode(EVENT_CHAINING)
e4:SetProperty(EFFECT_FLAG_DAMAGE_STEP+EFFECT_FLAG_DAMAGE_CAL)
e4:SetCategory(CATEGORY_NEGATE+CATEGORY_DESTROY)
e4:SetCountLimit(1,m+1)
e4:SetRange(LOCATION_MZONE)
e4:SetCondition(cm.filter)
e4:SetTarget(cm.negtg)
e4:SetOperation(cm.negop)
c:RegisterEffect(e4)
end end
function cm.spcon(e,tp,eg) function cm.spcon(e,tp,eg)
local tc=eg:GetFirst() local tc=eg:GetFirst()
return #eg==1 and tc:GetSummonPlayer() ~= tp and tc:IsFaceup() return #eg==1 and tc:GetSummonPlayer() ~= tp and tc:IsFaceup()
end end
function cm.fun(g,e,tp,eg) function cm.fun(e,tp,eg,ep,ev,re,r,rp,chk)
Duel.SetTargetCard(eg) if chk==0 then return true end
local g=eg
Duel.SetTargetCard(g)
Duel.SetChainLimit(cm.limit(eg:GetFirst())) Duel.SetChainLimit(cm.limit(eg:GetFirst()))
end end
function cm.limit(c) function cm.limit(c)
...@@ -21,10 +52,11 @@ function cm.limit(c) ...@@ -21,10 +52,11 @@ function cm.limit(c)
return e:GetHandler()~=c return e:GetHandler()~=c
end end
end end
function cm.spop(e,tp,eg) function cm.spop(e,tp,eg,ep,ev,re,r,rp)
local c=rscf.GetSelf(e) local c=e:GetHandler()
local tc=rscf.GetTargetCard(Card.IsFaceup) local g=Duel.GetTargetsRelateToChain():Filter(Card.IsFaceup,nil)
if c and rssf.SpecialSummon(c)>0 and tc then local tc=g:GetFirst()
if c and Duel.SpecialSummon(c,0,tp,tp,false,false,POS_FACEUP) and tc then
local code=tc:GetOriginalCode() local code=tc:GetOriginalCode()
local ba=tc:GetBaseAttack() local ba=tc:GetBaseAttack()
local bd=tc:GetBaseDefense() local bd=tc:GetBaseDefense()
...@@ -43,10 +75,25 @@ function cm.spop(e,tp,eg) ...@@ -43,10 +75,25 @@ function cm.spop(e,tp,eg)
e2:SetCode(EFFECT_SET_BASE_ATTACK) e2:SetCode(EFFECT_SET_BASE_ATTACK)
e2:SetValue(ba) e2:SetValue(ba)
c:RegisterEffect(e2) c:RegisterEffect(e2)
local e3=rsef.RegisterClone(c,e2,"code",EFFECT_SET_BASE_DEFENSE,"value",bd) --local e3=rsef.RegisterClone(c,e2,"code",EFFECT_SET_BASE_DEFENSE,"value",bd)
local e3=e2:Clone()
e3:SetCode(EFFECT_SET_BASE_DEFENSE)
c:RegisterEffect(e3)
local cid=c:CopyEffect(code,RESET_EVENT+RESETS_STANDARD,1) local cid=c:CopyEffect(code,RESET_EVENT+RESETS_STANDARD,1)
end end
end end
function cm.filter(e,tp,re,rp) function cm.filter(e,tp,eg,ep,ev,re,r,rp)
return re:IsActiveType(TYPE_MONSTER) and re:GetHandler():IsAttack(e:GetHandler():GetAttack()) and not re:GetHandler():IsOriginalCodeRule(m) return re:IsActiveType(TYPE_MONSTER) and re:GetHandler():IsAttack(e:GetHandler():GetAttack()) and not re:GetHandler():IsOriginalCodeRule(m)
end
function cm.negtg(e,tp,eg,ep,ev,re,r,rp,chk)
if chk==0 then return true end
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
end
function cm.negop(e,tp,eg,ep,ev,re,r,rp)
if Duel.NegateActivation(ev) and re:GetHandler():IsRelateToEffect(re) then
Duel.Destroy(eg,REASON_EFFECT)
end
end end
\ No newline at end of file
...@@ -33,6 +33,7 @@ function c82000430.initial_effect(c) ...@@ -33,6 +33,7 @@ function c82000430.initial_effect(c)
e3:SetRange(LOCATION_MZONE) e3:SetRange(LOCATION_MZONE)
e3:SetCountLimit(1,82000431) e3:SetCountLimit(1,82000431)
e3:SetHintTiming(0,TIMINGS_CHECK_MONSTER+TIMING_MAIN_END) e3:SetHintTiming(0,TIMINGS_CHECK_MONSTER+TIMING_MAIN_END)
e3:SetCondition(c82000430.spcon)
e3:SetTarget(c82000430.sptg) e3:SetTarget(c82000430.sptg)
e3:SetOperation(c82000430.spop) e3:SetOperation(c82000430.spop)
c:RegisterEffect(e3) c:RegisterEffect(e3)
...@@ -164,6 +165,10 @@ function c82000430.mvop(e,tp,eg,ep,ev,re,r,rp) ...@@ -164,6 +165,10 @@ function c82000430.mvop(e,tp,eg,ep,ev,re,r,rp)
end end
end end
end end
function c82000430.spcon(e,tp,eg,ep,ev,re,r,rp)
local ph=Duel.GetCurrentPhase()
return ph==PHASE_MAIN1 or ph==PHASE_MAIN2
end
function c82000430.sptg(e,tp,eg,ep,ev,re,r,rp,chk) function c82000430.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 Duel.IsPlayerCanSpecialSummonMonster(tp,82000439,0x7f59,TYPES_TOKEN_MONSTER+TYPE_TUNER,0,0,4,RACE_MACHINE,ATTRIBUTE_LIGHT) end and Duel.IsPlayerCanSpecialSummonMonster(tp,82000439,0x7f59,TYPES_TOKEN_MONSTER+TYPE_TUNER,0,0,4,RACE_MACHINE,ATTRIBUTE_LIGHT) end
......
...@@ -63,8 +63,11 @@ end ...@@ -63,8 +63,11 @@ end
function c82001345.cfilter(c,tp) function c82001345.cfilter(c,tp)
return c:IsPreviousLocation(LOCATION_GRAVE) and c:IsPreviousControler(1-tp) return c:IsPreviousLocation(LOCATION_GRAVE) and c:IsPreviousControler(1-tp)
end end
function c82001345.smfilter(c)
return c:IsSetCard(0x3f55) and c:IsType(TYPE_MONSTER)
end
function c82001345.setcon(e,tp,eg,ep,ev,re,r,rp) function c82001345.setcon(e,tp,eg,ep,ev,re,r,rp)
return eg:IsExists(c82001345.cfilter,1,nil,tp) return eg:IsExists(c82001345.cfilter,1,nil,tp) and Duel.IsExistingMatchingCard(c82001345.smfilter,tp,LOCATION_MZONE,0,1,nil)
end end
function c82001345.setop(e,tp,eg,ep,ev,re,r,rp) function c82001345.setop(e,tp,eg,ep,ev,re,r,rp)
local c=e:GetHandler() local c=e:GetHandler()
......
...@@ -63,8 +63,11 @@ end ...@@ -63,8 +63,11 @@ end
function c82001349.cfilter(c,tp) function c82001349.cfilter(c,tp)
return c:IsPreviousLocation(LOCATION_GRAVE) and c:IsPreviousControler(1-tp) return c:IsPreviousLocation(LOCATION_GRAVE) and c:IsPreviousControler(1-tp)
end end
function c82001349.smfilter(c)
return c:IsSetCard(0x3f55) and c:IsType(TYPE_MONSTER)
end
function c82001349.setcon(e,tp,eg,ep,ev,re,r,rp) function c82001349.setcon(e,tp,eg,ep,ev,re,r,rp)
return eg:IsExists(c82001349.cfilter,1,nil,tp) return eg:IsExists(c82001349.cfilter,1,nil,tp) and Duel.IsExistingMatchingCard(c82001349.smfilter,tp,LOCATION_MZONE,0,1,nil)
end end
function c82001349.setop(e,tp,eg,ep,ev,re,r,rp) function c82001349.setop(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