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