Commit a7f5005e authored by Tachibana's avatar Tachibana

eme

parent f15b2d4a
Pipeline #8506 passed with stages
in 34 minutes and 31 seconds
No preview for this file type
...@@ -78,8 +78,7 @@ function cm.counterop(e,tp,eg,ep,ev,re,r,rp) ...@@ -78,8 +78,7 @@ function cm.counterop(e,tp,eg,ep,ev,re,r,rp)
end end
--to gave --to gave
function cm.tgcon(e,tp,eg,ep,ev,re,r,rp) function cm.tgcon(e,tp,eg,ep,ev,re,r,rp)
local c=e:GetHandler() return not re or not re:GetHandler():IsCode(m)
return not re:GetHandler():IsCode(m)
end end
function cm.tgtg(e,tp,eg,ep,ev,re,r,rp,chk) function cm.tgtg(e,tp,eg,ep,ev,re,r,rp,chk)
if chk==0 then return Duel.IsExistingMatchingCard(Card.IsAbleToGrave,tp,LOCATION_EXTRA,0,1,nil) end if chk==0 then return Duel.IsExistingMatchingCard(Card.IsAbleToGrave,tp,LOCATION_EXTRA,0,1,nil) end
......
...@@ -51,8 +51,7 @@ function cm.initial_effect(c) ...@@ -51,8 +51,7 @@ function cm.initial_effect(c)
end end
--code --code
function cm.condition(e,tp,eg,ep,ev,re,r,rp) function cm.condition(e,tp,eg,ep,ev,re,r,rp)
local c=e:GetHandler() return not re or not re:GetHandler():IsCode(m)
return c:IsFaceup() and c:IsLocation(LOCATION_MZONE)
end end
--add conter --add conter
function cm.countercost(e,tp,eg,ep,ev,re,r,rp,chk) function cm.countercost(e,tp,eg,ep,ev,re,r,rp,chk)
......
...@@ -45,7 +45,7 @@ function cm.spfilter(c,e,tp) ...@@ -45,7 +45,7 @@ function cm.spfilter(c,e,tp)
return srre.check_set_FRXS(c) and c:IsType(TYPE_DUAL) and c:IsType(TYPE_MONSTER) and c:IsCanBeSpecialSummoned(e,0,tp,false,false) return srre.check_set_FRXS(c) and c:IsType(TYPE_DUAL) and c:IsType(TYPE_MONSTER) and c:IsCanBeSpecialSummoned(e,0,tp,false,false)
end end
function cm.disfilter(c) function cm.disfilter(c)
return srre.check_set_FRXS(c) and c:IsDiscardable() return srre.check_set_FRXS(c) and c:IsDiscardable() and c:IsType(TYPE_MONSTER)
end end
function cm.sptg(e,tp,eg,ep,ev,re,r,rp,chk) function cm.sptg(e,tp,eg,ep,ev,re,r,rp,chk)
local ft=Duel.GetLocationCount(tp,LOCATION_MZONE) local ft=Duel.GetLocationCount(tp,LOCATION_MZONE)
...@@ -82,10 +82,10 @@ function cm.sumfilter1(c) ...@@ -82,10 +82,10 @@ function cm.sumfilter1(c)
return c:IsSummonable(true,nil) and srre.check_set_FRXS(c) return c:IsSummonable(true,nil) and srre.check_set_FRXS(c)
end end
function cm.sumfilter3(c,e,tp) function cm.sumfilter3(c,e,tp)
return c:GetSummonPlayer()==1-tp return c:GetSummonPlayer()==1-tp
end end
function cm.sumcon(e,tp,eg,ep,ev,re,r,rp) function cm.sumcon(e,tp,eg,ep,ev,re,r,rp)
return eg:IsExists(cm.sumfilter3,1,nil,nil,tp) return eg:IsExists(cm.sumfilter3,1,nil,nil,tp)
end end
function cm.sumtg(e,tp,eg,ep,ev,re,r,rp,chk) function cm.sumtg(e,tp,eg,ep,ev,re,r,rp,chk)
if chk==0 then return Duel.IsExistingMatchingCard(cm.sumfilter1,tp,LOCATION_HAND+LOCATION_MZONE,0,1,nil) end if chk==0 then return Duel.IsExistingMatchingCard(cm.sumfilter1,tp,LOCATION_HAND+LOCATION_MZONE,0,1,nil) end
......
...@@ -3,25 +3,20 @@ local m=24865313 ...@@ -3,25 +3,20 @@ local m=24865313
local cm=_G["c"..m] local cm=_G["c"..m]
function c24865313.initial_effect(c) function c24865313.initial_effect(c)
local e1=Effect.CreateEffect(c) local e1=Effect.CreateEffect(c)
e1:SetCategory(CATEGORY_SPECIAL_SUMMON) e1:SetCategory(CATEGORY_SPECIAL_SUMMON)
e1:SetCategory(CATEGORY_SPECIAL_SUMMON)
e1:SetType(EFFECT_TYPE_ACTIVATE) e1:SetType(EFFECT_TYPE_ACTIVATE)
e1:SetProperty(EFFECT_FLAG_DAMAGE_STEP) e1:SetProperty(EFFECT_FLAG_DAMAGE_STEP)
e1:SetCode(EVENT_FREE_CHAIN) e1:SetCode(EVENT_FREE_CHAIN)
e1:SetCountLimit(1,24865313) e1:SetCountLimit(1,24865313)
e1:SetCost(cm.disrmcost)
e1:SetTarget(c24865313.tg) e1:SetTarget(c24865313.tg)
e1:SetOperation(c24865313.op) e1:SetOperation(c24865313.op)
e1:SetCondition(cm.atkcon)
c:RegisterEffect(e1) c:RegisterEffect(e1)
e4=e1:Clone()
e4:SetTarget(cm.stg)
e4:SetCondition(cm.atkcon2)
c:RegisterEffect(e4)
local e2=Effect.CreateEffect(c) local e2=Effect.CreateEffect(c)
e2:SetType(EFFECT_TYPE_QUICK_O) e2:SetType(EFFECT_TYPE_QUICK_O)
e2:SetCategory(CATEGORY_TODECK) e2:SetCategory(CATEGORY_TODECK)
e2:SetCountLimit(1,24865313) e2:SetCountLimit(1,24865313)
e2:SetCode(EVENT_FREE_CHAIN) e2:SetCode(EVENT_FREE_CHAIN)
e2:SetRange(LOCATION_GRAVE) e2:SetRange(LOCATION_GRAVE)
e2:SetProperty(EFFECT_FLAG_CARD_TARGET) e2:SetProperty(EFFECT_FLAG_CARD_TARGET)
e2:SetTarget(c24865313.drtg) e2:SetTarget(c24865313.drtg)
...@@ -31,54 +26,38 @@ end ...@@ -31,54 +26,38 @@ end
function c24865313.filte(c,e,tp,check) function c24865313.filte(c,e,tp,check)
return c:IsCanBeSpecialSummoned(e,0,tp,false,false) and c:IsSetCard(0xb10) return c:IsCanBeSpecialSummoned(e,0,tp,false,false) and c:IsSetCard(0xb10)
end end
function cm.atkcon(e,tp,eg,ep,ev,re,r,rp)
return not Duel.IsPlayerAffectedByEffect(tp,24865314) and Duel.GetFlagEffect(tp,24865313)==0
end
function cm.atkcon2(e,tp,eg,ep,ev,re,r,rp)
return Duel.IsPlayerAffectedByEffect(tp,24865314) and Duel.GetFlagEffect(tp,24865313)==0
end
function cm.disrmcost(e,tp,eg,ep,ev,re,r,rp,chk)
local c=e:GetHandler()
if chk==0 then return c:GetFlagEffect(24865313)==0 end
c:RegisterFlagEffect(24865313,RESET_CHAIN,0,1)
end
function c24865313.tg(e,tp,eg,ep,ev,re,r,rp,chk) function c24865313.tg(e,tp,eg,ep,ev,re,r,rp,chk)
local b1=Duel.GetLocationCount(0,LOCATION_MZONE)>0 local b1=Duel.GetLocationCount(0,LOCATION_MZONE)>0
local b2=Duel.IsExistingMatchingCard(c24865313.filte,tp,LOCATION_DECK,0,1,nil,e,tp) local b2=Duel.IsExistingMatchingCard(c24865313.filte,tp,LOCATION_DECK,0,1,nil,e,tp)
local b3=Duel.GetLocationCount(0,LOCATION_MZONE)>1 local b3=Duel.GetLocationCount(0,LOCATION_MZONE)>1
local b4=Duel.IsExistingMatchingCard(c24865313.filte,tp,LOCATION_DECK,0,2,nil,e,tp) local b4=Duel.IsExistingMatchingCard(c24865313.filte,tp,LOCATION_DECK,0,2,nil,e,tp)
if chk==0 then return (b1 and b2) or (b3 and b4) end if chk==0 then return (b1 and b2) or (b3 and b4) end
Duel.SetOperationInfo(tp,CATEGORY_SPECIAL_SUMMON,nil,1,tp,LOCATION_DECK)
Duel.SetOperationInfo(tp,CATEGORY_SPECIAL_SUMMON,nil,2,tp,LOCATION_DECK)
end
function c24865313.op(e,tp,eg,ep,ev,re,r,rp)
local off=1 local off=1
local ops={} local ops={}
local opval={} local opval={}
if (b1 and b2) then local b1=Duel.GetLocationCount(0,LOCATION_MZONE)>0 and Duel.IsExistingMatchingCard(c24865313.filte,tp,LOCATION_DECK,0,1,nil,e,tp)
local b2=Duel.GetLocationCount(0,LOCATION_MZONE)>1 and Duel.IsExistingMatchingCard(c24865313.filte,tp,LOCATION_DECK,0,2,nil,e,tp)
if not b1 and not b2 then return end
if b1 then
ops[off]=aux.Stringid(24865313,0) ops[off]=aux.Stringid(24865313,0)
opval[off-1]=1 opval[off-1]=1
off=off+1 off=off+1
end end
if (b3 and b4)then if b2 then
ops[off]=aux.Stringid(24865313,1) ops[off]=aux.Stringid(24865313,1)
opval[off-1]=2 opval[off-1]=2
off=off+1 off=off+1
end end
local op=Duel.SelectOption(1-tp,table.unpack(ops)) local op=Duel.SelectOption(1-tp,table.unpack(ops))
local sel=opval[op] local sel=opval[op]
e:SetLabel(sel) if sel==1 then
if sel==1 then
e:SetCategory(CATEGORY_SPECIAL_SUMMON)
Duel.SetOperationInfo(tp,CATEGORY_SPECIAL_SUMMON,nil,1,tp,LOCATION_DECK)
end
if sel==2 then
e:SetCategory(CATEGORY_SPECIAL_SUMMON)
Duel.SetOperationInfo(tp,CATEGORY_SPECIAL_SUMMON,nil,2,tp,LOCATION_DECK)
end
end
function c24865313.op(e,tp,eg,ep,ev,re,r,rp)
local sel=e:GetLabel()
if sel==1 then
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,aux.NecroValleyFilter(c24865313.filte),tp,LOCATION_DECK,0,1,1,nil,e,tp) local g=Duel.SelectMatchingCard(tp,c24865313.filte,tp,LOCATION_DECK,0,1,1,nil,e,tp)
if g:GetCount()>0 then if g:GetCount()>0 then
Duel.SpecialSummon(g,0,tp,tp,false,false,POS_FACEUP) Duel.SpecialSummon(g,0,tp,tp,false,false,POS_FACEUP)
local tc=g:GetFirst() local tc=g:GetFirst()
...@@ -92,10 +71,10 @@ function c24865313.op(e,tp,eg,ep,ev,re,r,rp) ...@@ -92,10 +71,10 @@ function c24865313.op(e,tp,eg,ep,ev,re,r,rp)
e2:SetCondition(c24865313.descon) e2:SetCondition(c24865313.descon)
e2:SetOperation(c24865313.desop) e2:SetOperation(c24865313.desop)
Duel.RegisterEffect(e2,tp) Duel.RegisterEffect(e2,tp)
end end
end end
--从卡组特殊召唤一张量子海妖怪兽 --从卡组特殊召唤一张量子海妖怪兽
if sel==2 then if sel==2 then
if Duel.IsPlayerAffectedByEffect(tp,59822133) then return end if Duel.IsPlayerAffectedByEffect(tp,59822133) then return end
if Duel.GetLocationCount(tp,LOCATION_MZONE)<2 then return end if Duel.GetLocationCount(tp,LOCATION_MZONE)<2 then return end
local g=Duel.GetMatchingGroup(c24865313.filte,tp,LOCATION_DECK,0,nil,e,tp) local g=Duel.GetMatchingGroup(c24865313.filte,tp,LOCATION_DECK,0,nil,e,tp)
...@@ -129,37 +108,7 @@ function c24865313.op(e,tp,eg,ep,ev,re,r,rp) ...@@ -129,37 +108,7 @@ function c24865313.op(e,tp,eg,ep,ev,re,r,rp)
end end
--从卡组特殊召唤两张量子海妖怪兽 --从卡组特殊召唤两张量子海妖怪兽
end end
function c24865313.stg(e,tp,eg,ep,ev,re,r,rp,chk)
local b1=Duel.GetLocationCount(0,LOCATION_MZONE)>0
local b2=Duel.IsExistingMatchingCard(c24865313.filte,tp,LOCATION_DECK,0,1,nil,e,tp)
local b3=Duel.GetLocationCount(0,LOCATION_MZONE)>1
local b4=Duel.IsExistingMatchingCard(c24865313.filte,tp,LOCATION_DECK,0,2,nil,e,tp)
if chk==0 then return (b1 and b2) or (b3 and b4) end
local off=1
local ops={}
local opval={}
if (b1 and b2) then
ops[off]=aux.Stringid(24865313,0)
opval[off-1]=1
off=off+1
end
if (b3 and b4)then
ops[off]=aux.Stringid(24865313,1)
opval[off-1]=2
off=off+1
end
local op=Duel.SelectOption(tp,table.unpack(ops))
local sel=opval[op]
e:SetLabel(sel)
if sel==1 then
e:SetCategory(CATEGORY_SPECIAL_SUMMON)
Duel.SetOperationInfo(tp,CATEGORY_SPECIAL_SUMMON,nil,1,tp,LOCATION_DECK)
end
if sel==2 then
e:SetCategory(CATEGORY_SPECIAL_SUMMON)
Duel.SetOperationInfo(tp,CATEGORY_SPECIAL_SUMMON,nil,2,tp,LOCATION_DECK)
end
end
function c24865313.desfilter(c,fid) function c24865313.desfilter(c,fid)
return c:GetFlagEffectLabel(24865313)==fid return c:GetFlagEffectLabel(24865313)==fid
end end
......
...@@ -2,14 +2,14 @@ ...@@ -2,14 +2,14 @@
local m=24865314 local m=24865314
local cm=_G["c"..m] local cm=_G["c"..m]
function c24865314.initial_effect(c) function c24865314.initial_effect(c)
local e0=Effect.CreateEffect(c) local e0=Effect.CreateEffect(c)
e0:SetType(EFFECT_TYPE_SINGLE) e0:SetType(EFFECT_TYPE_SINGLE)
e0:SetProperty(EFFECT_FLAG_CANNOT_DISABLE+EFFECT_FLAG_UNCOPYABLE) e0:SetProperty(EFFECT_FLAG_CANNOT_DISABLE+EFFECT_FLAG_UNCOPYABLE)
e0:SetCode(EFFECT_CANNOT_BE_LINK_MATERIAL) e0:SetCode(EFFECT_CANNOT_BE_LINK_MATERIAL)
e0:SetValue(1) e0:SetValue(1)
c:RegisterEffect(e0) c:RegisterEffect(e0)
local e1=Effect.CreateEffect(c) local e1=Effect.CreateEffect(c)
e1:SetDescription(aux.Stringid(24865314,0)) e1:SetDescription(aux.Stringid(24865314,0))
e1:SetType(EFFECT_TYPE_QUICK_O) e1:SetType(EFFECT_TYPE_QUICK_O)
e1:SetCode(EVENT_FREE_CHAIN) e1:SetCode(EVENT_FREE_CHAIN)
e1:SetCategory(CATEGORY_SPECIAL_SUMMON+CATEGORY_TOKEN) e1:SetCategory(CATEGORY_SPECIAL_SUMMON+CATEGORY_TOKEN)
...@@ -21,7 +21,7 @@ function c24865314.initial_effect(c) ...@@ -21,7 +21,7 @@ function c24865314.initial_effect(c)
e1:SetTarget(c24865314.sptg) e1:SetTarget(c24865314.sptg)
e1:SetOperation(c24865314.spop) e1:SetOperation(c24865314.spop)
c:RegisterEffect(e1) c:RegisterEffect(e1)
Duel.AddCustomActivityCounter(m,ACTIVITY_CHAIN,aux.FALSE) Duel.AddCustomActivityCounter(m,ACTIVITY_CHAIN,aux.FALSE)
local e2=Effect.CreateEffect(c) local e2=Effect.CreateEffect(c)
e2:SetType(EFFECT_TYPE_FIELD) e2:SetType(EFFECT_TYPE_FIELD)
e2:SetCode(24865314) e2:SetCode(24865314)
...@@ -34,7 +34,7 @@ function c24865314.initial_effect(c) ...@@ -34,7 +34,7 @@ function c24865314.initial_effect(c)
e3:SetRange(LOCATION_MZONE) e3:SetRange(LOCATION_MZONE)
e3:SetCode(EVENT_CHAINING) e3:SetCode(EVENT_CHAINING)
e3:SetProperty(EFFECT_FLAG_NO_TURN_RESET) e3:SetProperty(EFFECT_FLAG_NO_TURN_RESET)
e3:SetCountLimit(1,24865314) e3:SetCountLimit(1)
e3:SetCost(c24865314.cost) e3:SetCost(c24865314.cost)
e3:SetTarget(c24865314.tg) e3:SetTarget(c24865314.tg)
e3:SetOperation(c24865314.op) e3:SetOperation(c24865314.op)
...@@ -50,49 +50,57 @@ function c24865314.splimit(e,se,sp,st) ...@@ -50,49 +50,57 @@ function c24865314.splimit(e,se,sp,st)
return se:IsHasType(EFFECT_TYPE_ACTIONS) return se:IsHasType(EFFECT_TYPE_ACTIONS)
end end
function c24865314.filter2(c) function c24865314.filter2(c)
return c:IsType(TYPE_MONSTER) and c:IsSetCard(0xb10) return c:IsType(TYPE_MONSTER) and c:IsSetCard(0xb10)
end end
function c24865314.filter(c) function c24865314.filter(c)
return c:IsType(TYPE_MONSTER) and c:IsSetCard(0xb10) and not c:IsCode(24865314) return c:IsType(TYPE_MONSTER) and c:IsSetCard(0xb10) and not c:IsCode(24865314)
end end
function c24865314.spfilter(c,e,tp,code) function c24865314.nfilter(c,e,tp)
return c:IsSetCard(0xb10) and c:IsCanBeSpecialSummoned(e,0,tp,false,false) and c:IsType(TYPE_MONSTER) return c:IsType(TYPE_MONSTER) and c:IsSetCard(0xb10) and not c:IsCode(24865314) and Duel.GetMZoneCount(tp,c)>0 and Duel.IsExistingMatchingCard(c24865314.spfilter,tp,LOCATION_DECK+LOCATION_HAND+LOCATION_GRAVE,0,1,nil,e,tp)
end
function c24865314.spfilter(c,e,tp)
return c:IsSetCard(0xb10) and c:IsCanBeSpecialSummoned(e,0,tp,false,false) and c:IsType(TYPE_MONSTER)
end end
function c24865314.spcon(e,tp,eg,ep,ev,re,r,rp) function c24865314.spcon(e,tp,eg,ep,ev,re,r,rp)
local b1=Duel.GetCustomActivityCount(m,1-tp,ACTIVITY_CHAIN) local b1=Duel.GetCustomActivityCount(m,1-tp,ACTIVITY_CHAIN)
local b2=Duel.GetCustomActivityCount(m,tp,ACTIVITY_CHAIN) local b2=Duel.GetCustomActivityCount(m,tp,ACTIVITY_CHAIN)
return (b1 + b2)>=5 and Duel.GetLocationCount(tp,LOCATION_MZONE)>0 and (Duel.GetCurrentPhase()==PHASE_MAIN1 or Duel.GetCurrentPhase()==PHASE_MAIN2) return (b1 + b2)>=5 and Duel.GetLocationCount(tp,LOCATION_MZONE)>0 and (Duel.GetCurrentPhase()==PHASE_MAIN1 or Duel.GetCurrentPhase()==PHASE_MAIN2)
end end
function c24865314.sptg(e,tp,eg,ep,ev,re,r,rp,chk) function c24865314.sptg(e,tp,eg,ep,ev,re,r,rp,chk)
if chk==0 then return if chk==0 then return
Duel.IsPlayerCanSpecialSummonCount(tp,1) Duel.IsPlayerCanSpecialSummonCount(tp,1)
and e:GetHandler():IsCanBeSpecialSummoned(e,0,tp,false,false,POS_FACEUP) and e:GetHandler():IsCanBeSpecialSummoned(e,0,tp,false,false,POS_FACEUP)
end end
Duel.SetOperationInfo(0,CATEGORY_SPECIAL_SUMMON,e:GetHandler(),1,0,0) Duel.SetOperationInfo(0,CATEGORY_SPECIAL_SUMMON,e:GetHandler(),1,0,0)
end end
function c24865314.spop(e,tp,eg,ep,ev,re,r,rp) function c24865314.spop(e,tp,eg,ep,ev,re,r,rp)
local c=e:GetHandler() local c=e:GetHandler()
if not c:IsRelateToEffect(e) and c:IsHasEffect(EFFECT_NECRO_VALLEY) then return end if not c:IsRelateToEffect(e) or c:IsHasEffect(EFFECT_NECRO_VALLEY) then return end
Duel.SpecialSummon(c,0,tp,tp,false,false,POS_FACEUP) Duel.SpecialSummon(c,0,tp,tp,false,false,POS_FACEUP)
end end
function c24865314.cost(e,tp,eg,ep,ev,re,r,rp,chk) function c24865314.cost(e,tp,eg,ep,ev,re,r,rp,chk)
if chk==0 then return Duel.CheckReleaseGroup(tp,c24865314.filter,1,nil,e,tp) end e:SetLabel(1)
Duel.Hint(HINT_SELECTMSG,tp,HINTMSG_RELEASE) return true
local g=Duel.SelectReleaseGroup(tp,c24865314.filter,1,1,nil,e,tp)
e:SetLabel(g:GetFirst():GetCode())
Duel.Release(g,REASON_COST)
end end
function c24865314.tg(e,tp,eg,ep,ev,re,r,rp,chk) function c24865314.tg(e,tp,eg,ep,ev,re,r,rp,chk)
if chk==0 then return true end if chk==0 then
if e:GetLabel()==1 then
return Duel.CheckReleaseGroup(tp,c24865314.nfilter,1,nil,e,tp)
else
return Duel.GetLocationCount(tp,LOCATION_MZONE)>0 and Duel.IsExistingMatchingCard(c24865314.spfilter,tp,LOCATION_DECK+LOCATION_HAND+LOCATION_GRAVE,0,1,nil,e,tp)
end
end
if e:GetLabel()==1 then
Duel.Hint(HINT_SELECTMSG,tp,HINTMSG_RELEASE)
local g=Duel.SelectReleaseGroup(tp,c24865314.nfilter,1,1,nil,e,tp)
Duel.Release(g,REASON_COST)
end
Duel.SetOperationInfo(0,CATEGORY_SPECIAL_SUMMON,nil,1,tp,LOCATION_DECK+LOCATION_HAND+LOCATION_GRAVE) Duel.SetOperationInfo(0,CATEGORY_SPECIAL_SUMMON,nil,1,tp,LOCATION_DECK+LOCATION_HAND+LOCATION_GRAVE)
end end
function c24865314.op(e,tp,eg,ep,ev,re,r,rp) function c24865314.op(e,tp,eg,ep,ev,re,r,rp)
local g=Duel.GetMatchingGroup(c24865314.filter2,tp,LOCATION_MZONE,0,nil) if Duel.GetLocationCount(tp,LOCATION_MZONE)<=0 then return end
if Duel.GetMZoneCount(tp,g,tp)>0 then return end
local code=e:GetLabel()
Duel.Hint(HINT_SELECTMSG,tp,HINTMSG_SPSUMMON) Duel.Hint(HINT_SELECTMSG,tp,HINTMSG_SPSUMMON)
local g=Duel.SelectMatchingCard(tp,c24865314.spfilter,tp,LOCATION_DECK+LOCATION_HAND+LOCATION_GRAVE,0,1,1,nil,e,tp,code) local g=Duel.SelectMatchingCard(tp,aux.NecroValleyFilter(c24865314.spfilter),tp,LOCATION_DECK+LOCATION_HAND+LOCATION_GRAVE,0,1,1,nil,e,tp)
if g:GetCount()>0 then if g:GetCount()>0 then
Duel.SpecialSummon(g,0,tp,tp,false,false,POS_FACEUP) Duel.SpecialSummon(g,0,tp,tp,false,false,POS_FACEUP)
end end
......
...@@ -2,27 +2,22 @@ ...@@ -2,27 +2,22 @@
local m=24865315 local m=24865315
local cm=_G["c"..m] local cm=_G["c"..m]
function c24865315.initial_effect(c) function c24865315.initial_effect(c)
local e0=Effect.CreateEffect(c)
e0:SetType(EFFECT_TYPE_SINGLE) local e1=Effect.CreateEffect(c)
e0:SetProperty(EFFECT_FLAG_CANNOT_DISABLE+EFFECT_FLAG_UNCOPYABLE) e1:SetDescription(aux.Stringid(24865315,0))
e0:SetCode(EFFECT_CANNOT_BE_LINK_MATERIAL)
e0:SetValue(1)
c:RegisterEffect(e0)
local e1=Effect.CreateEffect(c)
e1:SetDescription(aux.Stringid(24865315,0))
e1:SetCategory(CATEGORY_SPECIAL_SUMMON+CATEGORY_TOKEN) e1:SetCategory(CATEGORY_SPECIAL_SUMMON+CATEGORY_TOKEN)
e1:SetType(EFFECT_TYPE_QUICK_O) e1:SetType(EFFECT_TYPE_QUICK_O)
e1:SetCode(EVENT_FREE_CHAIN) e1:SetCode(EVENT_FREE_CHAIN)
e1:SetHintTiming(0,TIMINGS_CHECK_MONSTER+TIMING_MAIN_END) e1:SetHintTiming(0,TIMINGS_CHECK_MONSTER+TIMING_MAIN_END)
e1:SetRange(LOCATION_HAND+LOCATION_GRAVE) e1:SetRange(LOCATION_HAND+LOCATION_GRAVE)
e1:SetCountLimit(1,24865315) e1:SetCountLimit(1,24865515)
e1:SetCondition(c24865315.spcon) e1:SetCondition(c24865315.spcon)
e1:SetProperty(EFFECT_FLAG_DELAY) e1:SetProperty(EFFECT_FLAG_DELAY)
e1:SetTarget(c24865315.sptg) e1:SetTarget(c24865315.sptg)
e1:SetOperation(c24865315.spop) e1:SetOperation(c24865315.spop)
c:RegisterEffect(e1) c:RegisterEffect(e1)
Duel.AddCustomActivityCounter(m,ACTIVITY_CHAIN,aux.FALSE) Duel.AddCustomActivityCounter(m,ACTIVITY_CHAIN,aux.FALSE)
local e2=Effect.CreateEffect(c) local e2=Effect.CreateEffect(c)
e2:SetType(EFFECT_TYPE_FIELD) e2:SetType(EFFECT_TYPE_FIELD)
e2:SetCode(EFFECT_AVOID_BATTLE_DAMAGE) e2:SetCode(EFFECT_AVOID_BATTLE_DAMAGE)
e2:SetProperty(EFFECT_FLAG_IGNORE_IMMUNE) e2:SetProperty(EFFECT_FLAG_IGNORE_IMMUNE)
...@@ -31,22 +26,16 @@ function c24865315.initial_effect(c) ...@@ -31,22 +26,16 @@ function c24865315.initial_effect(c)
e2:SetTarget(aux.TargetBoolFunction(Card.IsSetCard,0xb10)) e2:SetTarget(aux.TargetBoolFunction(Card.IsSetCard,0xb10))
e2:SetValue(1) e2:SetValue(1)
c:RegisterEffect(e2) c:RegisterEffect(e2)
local e3=Effect.CreateEffect(c) local e3=Effect.CreateEffect(c)
e3:SetCategory(CATEGORY_DESTROY) e3:SetCategory(CATEGORY_TOGRAVE+CATEGORY_SPECIAL_SUMMON)
e3:SetType(EFFECT_TYPE_QUICK_O) e3:SetType(EFFECT_TYPE_QUICK_O)
e3:SetRange(LOCATION_MZONE) e3:SetRange(LOCATION_MZONE)
e3:SetCondition(c24865315.atkcon)
e3:SetProperty(EFFECT_FLAG_NO_TURN_RESET) e3:SetProperty(EFFECT_FLAG_NO_TURN_RESET)
e3:SetCode(EVENT_CHAINING) e3:SetCode(EVENT_CHAINING)
e3:SetCountLimit(1,24865415) e3:SetCountLimit(1)
e3:SetCost(cm.disrmcost)
e3:SetTarget(c24865315.tg) e3:SetTarget(c24865315.tg)
e3:SetOperation(c24865315.op) e3:SetOperation(c24865315.op)
c:RegisterEffect(e3) c:RegisterEffect(e3)
e4=e3:Clone()
e4:SetTarget(c24865315.stg)
e4:SetCondition(c24865315.atkcon2)
c:RegisterEffect(e4)
local e5=Effect.CreateEffect(c) local e5=Effect.CreateEffect(c)
e5:SetProperty(EFFECT_FLAG_CANNOT_DISABLE+EFFECT_FLAG_UNCOPYABLE) e5:SetProperty(EFFECT_FLAG_CANNOT_DISABLE+EFFECT_FLAG_UNCOPYABLE)
e5:SetType(EFFECT_TYPE_SINGLE) e5:SetType(EFFECT_TYPE_SINGLE)
...@@ -61,7 +50,7 @@ function c24865315.filter(c) ...@@ -61,7 +50,7 @@ function c24865315.filter(c)
return c:IsType(TYPE_MONSTER) and c:IsSetCard(0xb10) and c:IsAbleToGrave() return c:IsType(TYPE_MONSTER) and c:IsSetCard(0xb10) and c:IsAbleToGrave()
end end
function c24865315.filter2(c,e,tp) function c24865315.filter2(c,e,tp)
return c:IsType(TYPE_MONSTER) and c:IsSetCard(0xb10) return c:IsType(TYPE_MONSTER) and c:IsSetCard(0xb10) and c:IsCanBeSpecialSummoned(e,0,tp,false,false)
end end
function c24865315.spcon(e,tp,eg,ep,ev,re,r,rp) function c24865315.spcon(e,tp,eg,ep,ev,re,r,rp)
local b1=Duel.GetCustomActivityCount(m,1-tp,ACTIVITY_CHAIN) local b1=Duel.GetCustomActivityCount(m,1-tp,ACTIVITY_CHAIN)
...@@ -72,7 +61,7 @@ function c24865315.sptg(e,tp,eg,ep,ev,re,r,rp,chk) ...@@ -72,7 +61,7 @@ function c24865315.sptg(e,tp,eg,ep,ev,re,r,rp,chk)
if chk==0 then return if chk==0 then return
Duel.IsPlayerCanSpecialSummonCount(tp,1) Duel.IsPlayerCanSpecialSummonCount(tp,1)
and e:GetHandler():IsCanBeSpecialSummoned(e,0,tp,false,false,POS_FACEUP) and e:GetHandler():IsCanBeSpecialSummoned(e,0,tp,false,false,POS_FACEUP)
end end
Duel.SetOperationInfo(0,CATEGORY_SPECIAL_SUMMON,e:GetHandler(),1,0,0) Duel.SetOperationInfo(0,CATEGORY_SPECIAL_SUMMON,e:GetHandler(),1,0,0)
end end
function c24865315.spop(e,tp,eg,ep,ev,re,r,rp) function c24865315.spop(e,tp,eg,ep,ev,re,r,rp)
...@@ -80,67 +69,17 @@ function c24865315.spop(e,tp,eg,ep,ev,re,r,rp) ...@@ -80,67 +69,17 @@ function c24865315.spop(e,tp,eg,ep,ev,re,r,rp)
if not c:IsRelateToEffect(e) and c:IsHasEffect(EFFECT_NECRO_VALLEY) then return end if not c:IsRelateToEffect(e) and c:IsHasEffect(EFFECT_NECRO_VALLEY) then return end
Duel.SpecialSummon(c,0,tp,tp,false,false,POS_FACEUP) Duel.SpecialSummon(c,0,tp,tp,false,false,POS_FACEUP)
end end
function cm.disrmcost(e,tp,eg,ep,ev,re,r,rp,chk)
local c=e:GetHandler()
if chk==0 then return c:GetFlagEffect(24865315)==0 end
c:RegisterFlagEffect(24865315,RESET_CHAIN,0,1)
end
function c24865315.tg(e,tp,eg,ep,ev,re,r,rp,chk) function c24865315.tg(e,tp,eg,ep,ev,re,r,rp,chk)
local b1=Duel.IsExistingMatchingCard(c24865315.filter,tp,LOCATION_DECK,0,1,nil,e,tp) local b1=Duel.IsExistingMatchingCard(c24865315.filter,tp,LOCATION_DECK,0,1,nil,e,tp)
local b3=Duel.IsExistingMatchingCard(c24865315.filter2,tp,LOCATION_GRAVE,0,1,nil,e,tp) local b3=Duel.IsExistingMatchingCard(c24865315.filter2,tp,LOCATION_GRAVE,0,1,nil,e,tp)
if chk==0 then return b1 or b3 end if chk==0 then return b1 or b3 end
local off=1 Duel.SetOperationInfo(0,CATEGORY_DECKDES,nil,1,tp,LOCATION_DECK)
local ops={} Duel.SetOperationInfo(0,CATEGORY_SPECIAL_SUMMON,nil,1,tp,LOCATION_GRAVE)
local opval={}
if b1 then
ops[off]=aux.Stringid(24865315,0)
opval[off-1]=1
off=off+1
end
if b3 then
ops[off]=aux.Stringid(24865315,1)
opval[off-1]=2
off=off+1
end
local op=Duel.SelectOption(1-tp,table.unpack(ops))
local sel=opval[op]
e:SetLabel(sel)
if sel==1 then
Duel.SetOperationInfo(0,CATEGORY_DECKDES,nil,1,tp,LOCATION_DECK)
if sel==2 then
Duel.SetOperationInfo(0,CATEGORY_SPECIAL_SUMMON,nil,1,tp,LOCATION_GRAVE)
end
end
end end
function c24865315.op(e,tp,eg,ep,ev,re,r,rp) function c24865315.op(e,tp,eg,ep,ev,re,r,rp)
local sel=e:GetLabel()
if sel==1 then
Duel.Hint(HINT_SELECTMSG,tp,HINTMSG_TOGRAVE)
local g=Duel.SelectMatchingCard(tp,c24865315.filter,tp,LOCATION_DECK,0,1,1,nil)
if g:GetCount()>0 then
Duel.SendtoGrave(g,REASON_EFFECT)
end
end
if sel==2 then
Duel.Hint(HINT_SELECTMSG,tp,HINTMSG_SPSUMMON)
local g=Duel.SelectMatchingCard(tp,c24865315.filter2,tp,LOCATION_GRAVE,0,1,1,nil)
if g:GetCount()>0 then
Duel.SpecialSummon(g,0,tp,tp,false,false,POS_FACEUP)
end
end
end
function c24865315.atkcon(e,tp,eg,ep,ev,re,r,rp)
return not Duel.IsPlayerAffectedByEffect(tp,24865314) and Duel.GetFlagEffect(tp,24865315)==0
end
function c24865315.atkcon2(e,tp,eg,ep,ev,re,r,rp)
return Duel.IsPlayerAffectedByEffect(tp,24865314) and Duel.GetFlagEffect(tp,24865315)==0
end
function c24865315.stg(e,tp,eg,ep,ev,re,r,rp,chk)
local b1=Duel.IsExistingMatchingCard(c24865315.filter,tp,LOCATION_DECK,0,1,nil,e,tp) local b1=Duel.IsExistingMatchingCard(c24865315.filter,tp,LOCATION_DECK,0,1,nil,e,tp)
local b3=Duel.IsExistingMatchingCard(c24865315.filter2,tp,LOCATION_GRAVE,0,1,nil,e,tp) local b3=Duel.IsExistingMatchingCard(c24865315.filter2,tp,LOCATION_GRAVE,0,1,nil,e,tp)
if chk==0 then return b1 or b3 end if not b1 and not b3 then return end
local off=1 local off=1
local ops={} local ops={}
local opval={} local opval={}
...@@ -154,13 +93,24 @@ function c24865315.stg(e,tp,eg,ep,ev,re,r,rp,chk) ...@@ -154,13 +93,24 @@ function c24865315.stg(e,tp,eg,ep,ev,re,r,rp,chk)
opval[off-1]=2 opval[off-1]=2
off=off+1 off=off+1
end end
local op=Duel.SelectOption(tp,table.unpack(ops)) local sp=1-tp
if Duel.IsPlayerAffectedByEffect(tp,24865314) then
sp=tp
end
local op=Duel.SelectOption(sp,table.unpack(ops))
local sel=opval[op] local sel=opval[op]
e:SetLabel(sel)
if sel==1 then if sel==1 then
Duel.SetOperationInfo(0,CATEGORY_DECKDES,nil,1,tp,LOCATION_DECK) Duel.Hint(HINT_SELECTMSG,tp,HINTMSG_TOGRAVE)
if sel==2 then local g=Duel.SelectMatchingCard(tp,c24865315.filter,tp,LOCATION_DECK,0,1,1,nil)
Duel.SetOperationInfo(0,CATEGORY_SPECIAL_SUMMON,nil,1,tp,LOCATION_GRAVE) if g:GetCount()>0 then
end Duel.SendtoGrave(g,REASON_EFFECT)
end
end
if sel==2 then
Duel.Hint(HINT_SELECTMSG,tp,HINTMSG_SPSUMMON)
local g=Duel.SelectMatchingCard(tp,c24865315.filter2,tp,LOCATION_GRAVE,0,1,1,nil)
if g:GetCount()>0 then
Duel.SpecialSummon(g,0,tp,tp,false,false,POS_FACEUP)
end
end end
end end
\ No newline at end of file
...@@ -2,14 +2,9 @@ ...@@ -2,14 +2,9 @@
local m=24865316 local m=24865316
local cm=_G["c"..m] local cm=_G["c"..m]
function c24865316.initial_effect(c) function c24865316.initial_effect(c)
local e0=Effect.CreateEffect(c)
e0:SetType(EFFECT_TYPE_SINGLE) local e1=Effect.CreateEffect(c)
e0:SetProperty(EFFECT_FLAG_CANNOT_DISABLE+EFFECT_FLAG_UNCOPYABLE) e1:SetDescription(aux.Stringid(24865316,0))
e0:SetCode(EFFECT_CANNOT_BE_LINK_MATERIAL)
e0:SetValue(1)
c:RegisterEffect(e0)
local e1=Effect.CreateEffect(c)
e1:SetDescription(aux.Stringid(24865316,0))
e1:SetCategory(CATEGORY_SPECIAL_SUMMON+CATEGORY_TOKEN) e1:SetCategory(CATEGORY_SPECIAL_SUMMON+CATEGORY_TOKEN)
e1:SetCondition(c24865316.spcon) e1:SetCondition(c24865316.spcon)
e1:SetType(EFFECT_TYPE_QUICK_O) e1:SetType(EFFECT_TYPE_QUICK_O)
...@@ -21,7 +16,7 @@ function c24865316.initial_effect(c) ...@@ -21,7 +16,7 @@ function c24865316.initial_effect(c)
e1:SetTarget(c24865316.sptg) e1:SetTarget(c24865316.sptg)
e1:SetOperation(c24865316.spop) e1:SetOperation(c24865316.spop)
c:RegisterEffect(e1) c:RegisterEffect(e1)
Duel.AddCustomActivityCounter(m,ACTIVITY_CHAIN,aux.FALSE) Duel.AddCustomActivityCounter(m,ACTIVITY_CHAIN,aux.FALSE)
local e2=Effect.CreateEffect(c) local e2=Effect.CreateEffect(c)
e2:SetType(EFFECT_TYPE_FIELD) e2:SetType(EFFECT_TYPE_FIELD)
e2:SetCode(EFFECT_INDESTRUCTABLE_EFFECT) e2:SetCode(EFFECT_INDESTRUCTABLE_EFFECT)
...@@ -36,16 +31,10 @@ function c24865316.initial_effect(c) ...@@ -36,16 +31,10 @@ function c24865316.initial_effect(c)
e3:SetRange(LOCATION_MZONE) e3:SetRange(LOCATION_MZONE)
e3:SetProperty(EFFECT_FLAG_NO_TURN_RESET) e3:SetProperty(EFFECT_FLAG_NO_TURN_RESET)
e3:SetCode(EVENT_CHAINING) e3:SetCode(EVENT_CHAINING)
e3:SetCost(cm.disrmcost) e3:SetCountLimit(1)
e3:SetCondition(c24865316.atkcon)
e3:SetCountLimit(1,24865416)
e3:SetTarget(c24865316.tg) e3:SetTarget(c24865316.tg)
e3:SetOperation(c24865316.op) e3:SetOperation(c24865316.op)
c:RegisterEffect(e3) c:RegisterEffect(e3)
e4=e3:Clone()
e4:SetTarget(c24865316.stg)
e4:SetCondition(c24865316.atkcon2)
c:RegisterEffect(e4)
local e5=Effect.CreateEffect(c) local e5=Effect.CreateEffect(c)
e5:SetProperty(EFFECT_FLAG_CANNOT_DISABLE+EFFECT_FLAG_UNCOPYABLE) e5:SetProperty(EFFECT_FLAG_CANNOT_DISABLE+EFFECT_FLAG_UNCOPYABLE)
e5:SetType(EFFECT_TYPE_SINGLE) e5:SetType(EFFECT_TYPE_SINGLE)
...@@ -66,12 +55,12 @@ function c24865316.spcon(e,tp,eg,ep,ev,re,r,rp) ...@@ -66,12 +55,12 @@ function c24865316.spcon(e,tp,eg,ep,ev,re,r,rp)
local b1=Duel.GetCustomActivityCount(m,1-tp,ACTIVITY_CHAIN) local b1=Duel.GetCustomActivityCount(m,1-tp,ACTIVITY_CHAIN)
local b2=Duel.GetCustomActivityCount(m,tp,ACTIVITY_CHAIN) local b2=Duel.GetCustomActivityCount(m,tp,ACTIVITY_CHAIN)
return (b1 + b2)>=5 and Duel.GetLocationCount(tp,LOCATION_MZONE)>0 and (Duel.GetCurrentPhase()==PHASE_MAIN1 or Duel.GetCurrentPhase()==PHASE_MAIN2) return (b1 + b2)>=5 and Duel.GetLocationCount(tp,LOCATION_MZONE)>0 and (Duel.GetCurrentPhase()==PHASE_MAIN1 or Duel.GetCurrentPhase()==PHASE_MAIN2)
end end
function c24865316.sptg(e,tp,eg,ep,ev,re,r,rp,chk) function c24865316.sptg(e,tp,eg,ep,ev,re,r,rp,chk)
if chk==0 then return if chk==0 then return
Duel.IsPlayerCanSpecialSummonCount(tp,1) Duel.IsPlayerCanSpecialSummonCount(tp,1)
and e:GetHandler():IsCanBeSpecialSummoned(e,0,tp,false,false,POS_FACEUP) and e:GetHandler():IsCanBeSpecialSummoned(e,0,tp,false,false,POS_FACEUP)
end end
Duel.SetOperationInfo(0,CATEGORY_SPECIAL_SUMMON,e:GetHandler(),1,0,0) Duel.SetOperationInfo(0,CATEGORY_SPECIAL_SUMMON,e:GetHandler(),1,0,0)
end end
function c24865316.spop(e,tp,eg,ep,ev,re,r,rp) function c24865316.spop(e,tp,eg,ep,ev,re,r,rp)
...@@ -79,23 +68,22 @@ function c24865316.spop(e,tp,eg,ep,ev,re,r,rp) ...@@ -79,23 +68,22 @@ function c24865316.spop(e,tp,eg,ep,ev,re,r,rp)
if not c:IsRelateToEffect(e) and c:IsHasEffect(EFFECT_NECRO_VALLEY) then return end if not c:IsRelateToEffect(e) and c:IsHasEffect(EFFECT_NECRO_VALLEY) then return end
Duel.SpecialSummon(c,0,tp,tp,false,false,POS_FACEUP) Duel.SpecialSummon(c,0,tp,tp,false,false,POS_FACEUP)
end end
function c24865316.filter(c,tp) function c24865316.filter(c,tp)
return c:IsType(TYPE_FIELD) and c:GetActivateEffect():IsActivatable(tp,true,true) and c:IsCode(24865310) return c:IsType(TYPE_FIELD) and (c:GetActivateEffect():IsActivatable(tp,true,true) or c:IsAbleToHand()) and c:IsCode(24865310)
end end
function c24865316.filter2(c) function c24865316.filter2(c)
return c:IsType(TYPE_TRAP) and c:IsSetCard(0xb10) and c:IsSSetable() return c:IsType(TYPE_TRAP) and c:IsSetCard(0xb10) and c:IsSSetable()
end end
function cm.disrmcost(e,tp,eg,ep,ev,re,r,rp,chk)
local c=e:GetHandler()
if chk==0 then return c:GetFlagEffect(24865316)==0 end
c:RegisterFlagEffect(24865316,RESET_CHAIN,0,1)
end
function c24865316.tg(e,tp,eg,ep,ev,re,r,rp,chk) function c24865316.tg(e,tp,eg,ep,ev,re,r,rp,chk)
local b1=Duel.IsExistingMatchingCard(c24865316.filter,tp,LOCATION_DECK,0,1,nil,e,tp) local b1=Duel.IsExistingMatchingCard(c24865316.filter,tp,LOCATION_DECK,0,1,nil,e,tp)
local b2=Duel.GetLocationCount(tp,LOCATION_SZONE)>0 local b2=Duel.IsExistingMatchingCard(c24865316.filter2,tp,LOCATION_DECK,0,1,nil,e,tp) and Duel.GetLocationCount(tp,LOCATION_SZONE)>0
local b3=Duel.IsExistingMatchingCard(c24865316.filter2,tp,LOCATION_DECK,0,1,nil,e,tp) if chk==0 then return b1 or b2 end
if chk==0 then return b1 or (b3 and b2) end if not Duel.CheckPhaseActivity() then e:SetLabel(1) else e:SetLabel(0) end
Duel.SetOperationInfo(0,CATEGORY_TOHAND,nil,1,tp,LOCATION_DECK)
end
function c24865316.op(e,tp,eg,ep,ev,re,r,rp)
local b1=Duel.IsExistingMatchingCard(c24865316.filter,tp,LOCATION_DECK,0,1,nil,e,tp)
local b2=Duel.IsExistingMatchingCard(c24865316.filter2,tp,LOCATION_DECK,0,1,nil,e,tp) and Duel.GetLocationCount(tp,LOCATION_SZONE)>0
local off=1 local off=1
local ops={} local ops={}
local opval={} local opval={}
...@@ -104,52 +92,50 @@ function c24865316.tg(e,tp,eg,ep,ev,re,r,rp,chk) ...@@ -104,52 +92,50 @@ function c24865316.tg(e,tp,eg,ep,ev,re,r,rp,chk)
opval[off-1]=1 opval[off-1]=1
off=off+1 off=off+1
end end
if (b2 and b3) then if b2 then
ops[off]=aux.Stringid(24865316,1) ops[off]=aux.Stringid(24865316,1)
opval[off-1]=2 opval[off-1]=2
off=off+1 off=off+1
end end
local op=Duel.SelectOption(1-tp,table.unpack(ops)) local sp=1-tp
if Duel.IsPlayerAffectedByEffect(tp,24865314) then
sp=tp
end
if not b1 and not b2 then return end
local op=Duel.SelectOption(sp,table.unpack(ops))
local sel=opval[op] local sel=opval[op]
e:SetLabel(sel)
if sel==1 then if sel==1 then
Duel.SetOperationInfo(0,CATEGORY_TOHAND,nil,1,tp,LOCATION_DECK)
end
end
function c24865316.op(e,tp,eg,ep,ev,re,r,rp)
local sel=e:GetLabel()
if sel==1 then
Duel.Hint(HINT_SELECTMSG,tp,HINTMSG_OPERATECARD) Duel.Hint(HINT_SELECTMSG,tp,HINTMSG_OPERATECARD)
if e:GetLabel()==1 then Duel.RegisterFlagEffect(tp,15248873,RESET_CHAIN,0,1) end
local g=Duel.SelectMatchingCard(tp,c24865316.filter,tp,LOCATION_DECK,0,1,1,nil,tp)
Duel.ResetFlagEffect(tp,15248873)
local tc=g:GetFirst()
if tc then
local te=tc:GetActivateEffect()
local b1=tc:IsAbleToHand()
if e:GetLabel()==1 then Duel.RegisterFlagEffect(tp,15248873,RESET_CHAIN,0,1) end if e:GetLabel()==1 then Duel.RegisterFlagEffect(tp,15248873,RESET_CHAIN,0,1) end
local b2=te:IsActivatable(tp,true,true) local g=Duel.SelectMatchingCard(tp,c24865316.filter,tp,LOCATION_DECK,0,1,1,nil,tp)
Duel.ResetFlagEffect(tp,15248873) Duel.ResetFlagEffect(tp,15248873)
if b1 and (not b2 or Duel.SelectOption(tp,1190,1150)==0) then local tc=g:GetFirst()
Duel.SendtoHand(tc,nil,REASON_EFFECT) if tc then
Duel.ConfirmCards(1-tp,tc) local te=tc:GetActivateEffect()
else local b1=tc:IsAbleToHand()
local fc=Duel.GetFieldCard(tp,LOCATION_FZONE,0) if e:GetLabel()==1 then Duel.RegisterFlagEffect(tp,15248873,RESET_CHAIN,0,1) end
if fc then local b2=te:IsActivatable(tp,true,true)
Duel.SendtoGrave(fc,REASON_RULE) Duel.ResetFlagEffect(tp,15248873)
Duel.BreakEffect() if b1 and (not b2 or Duel.SelectOption(tp,1190,1150)==0) then
Duel.SendtoHand(tc,nil,REASON_EFFECT)
Duel.ConfirmCards(1-tp,tc)
else
local fc=Duel.GetFieldCard(tp,LOCATION_FZONE,0)
if fc then
Duel.SendtoGrave(fc,REASON_RULE)
Duel.BreakEffect()
end
Duel.MoveToField(tc,tp,tp,LOCATION_FZONE,POS_FACEUP,true)
te:UseCountLimit(tp,1,true)
local tep=tc:GetControler()
local cost=te:GetCost()
if cost then cost(te,tep,eg,ep,ev,re,r,rp,1) end
Duel.RaiseEvent(tc,4179255,te,0,tp,tp,Duel.GetCurrentChain())
end end
Duel.MoveToField(tc,tp,tp,LOCATION_FZONE,POS_FACEUP,true)
te:UseCountLimit(tp,1,true)
local tep=tc:GetControler()
local cost=te:GetCost()
if cost then cost(te,tep,eg,ep,ev,re,r,rp,1) end
Duel.RaiseEvent(tc,4179255,te,0,tp,tp,Duel.GetCurrentChain())
end end
end end
end --从卡组选一张「量子妖海-狄拉克」加入手卡或在把这张卡发动的玩家的场上发动
--从卡组选一张「量子妖海-狄拉克」加入手卡或在把这张卡发动的玩家的场上发动 if sel==2 then
if sel==2 then
if Duel.GetLocationCount(tp,LOCATION_SZONE)<=0 then return end if Duel.GetLocationCount(tp,LOCATION_SZONE)<=0 then return end
Duel.Hint(HINT_SELECTMSG,tp,HINTMSG_TOFIELD) Duel.Hint(HINT_SELECTMSG,tp,HINTMSG_TOFIELD)
local g=Duel.SelectMatchingCard(tp,c24865316.filter2,tp,LOCATION_DECK,0,1,1,nil) local g=Duel.SelectMatchingCard(tp,c24865316.filter2,tp,LOCATION_DECK,0,1,1,nil)
...@@ -162,30 +148,4 @@ function c24865316.op(e,tp,eg,ep,ev,re,r,rp) ...@@ -162,30 +148,4 @@ function c24865316.op(e,tp,eg,ep,ev,re,r,rp)
tc:RegisterEffect(e1) tc:RegisterEffect(e1)
end end
end end
end
--卡组选一张「量子海妖」陷井卡在把这张卡发动的玩家的场上盖放
function c24865316.stg(e,tp,eg,ep,ev,re,r,rp,chk)
local b1=Duel.IsExistingMatchingCard(c24865316.filter,tp,LOCATION_DECK,0,1,nil,e,tp)
local b2=Duel.GetLocationCount(tp,LOCATION_SZONE)>0
local b3=Duel.IsExistingMatchingCard(c24865316.filter2,tp,LOCATION_DECK,0,1,nil,e,tp)
if chk==0 then return b1 or (b3 and b2) end
local off=1
local ops={}
local opval={}
if b1 then
ops[off]=aux.Stringid(24865316,0)
opval[off-1]=1
off=off+1
end
if (b2 and b3) then
ops[off]=aux.Stringid(24865316,1)
opval[off-1]=2
off=off+1
end
local op=Duel.SelectOption(tp,table.unpack(ops))
local sel=opval[op]
e:SetLabel(sel)
if sel==1 then
Duel.SetOperationInfo(0,CATEGORY_TOHAND,nil,1,tp,LOCATION_DECK)
end
end end
\ No newline at end of file
...@@ -2,14 +2,9 @@ ...@@ -2,14 +2,9 @@
local m=24865317 local m=24865317
local cm=_G["c"..m] local cm=_G["c"..m]
function c24865317.initial_effect(c) function c24865317.initial_effect(c)
local e0=Effect.CreateEffect(c)
e0:SetType(EFFECT_TYPE_SINGLE) local e1=Effect.CreateEffect(c)
e0:SetProperty(EFFECT_FLAG_CANNOT_DISABLE+EFFECT_FLAG_UNCOPYABLE) e1:SetDescription(aux.Stringid(24865317,0))
e0:SetCode(EFFECT_CANNOT_BE_LINK_MATERIAL)
e0:SetValue(1)
c:RegisterEffect(e0)
local e1=Effect.CreateEffect(c)
e1:SetDescription(aux.Stringid(24865317,0))
e1:SetType(EFFECT_TYPE_QUICK_O) e1:SetType(EFFECT_TYPE_QUICK_O)
e1:SetCode(EVENT_FREE_CHAIN) e1:SetCode(EVENT_FREE_CHAIN)
e1:SetCategory(CATEGORY_SPECIAL_SUMMON+CATEGORY_TOKEN) e1:SetCategory(CATEGORY_SPECIAL_SUMMON+CATEGORY_TOKEN)
...@@ -21,8 +16,8 @@ function c24865317.initial_effect(c) ...@@ -21,8 +16,8 @@ function c24865317.initial_effect(c)
e1:SetTarget(c24865317.sptg) e1:SetTarget(c24865317.sptg)
e1:SetOperation(c24865317.spop) e1:SetOperation(c24865317.spop)
c:RegisterEffect(e1) c:RegisterEffect(e1)
Duel.AddCustomActivityCounter(m,ACTIVITY_CHAIN,aux.FALSE) Duel.AddCustomActivityCounter(m,ACTIVITY_CHAIN,aux.FALSE)
local e2=Effect.CreateEffect(c) local e2=Effect.CreateEffect(c)
e2:SetType(EFFECT_TYPE_FIELD) e2:SetType(EFFECT_TYPE_FIELD)
e2:SetCode(0x10000000+24865317) e2:SetCode(0x10000000+24865317)
e2:SetRange(LOCATION_MZONE) e2:SetRange(LOCATION_MZONE)
...@@ -30,21 +25,15 @@ function c24865317.initial_effect(c) ...@@ -30,21 +25,15 @@ function c24865317.initial_effect(c)
e2:SetTargetRange(1,0) e2:SetTargetRange(1,0)
c:RegisterEffect(e2) c:RegisterEffect(e2)
local e3=Effect.CreateEffect(c) local e3=Effect.CreateEffect(c)
e3:SetCategory(CATEGORY_SPECIAL_SUMMON+CATEGORY_TOKEN+CATEGORY_DESTROY) e3:SetCategory(CATEGORY_SPECIAL_SUMMON+CATEGORY_TOKEN+CATEGORY_DESTROY)
e3:SetType(EFFECT_TYPE_QUICK_O) e3:SetType(EFFECT_TYPE_QUICK_O)
e3:SetRange(LOCATION_MZONE) e3:SetRange(LOCATION_MZONE)
e3:SetProperty(EFFECT_FLAG_NO_TURN_RESET) e3:SetProperty(EFFECT_FLAG_NO_TURN_RESET)
e3:SetCondition(c24865317.atkcon)
e3:SetCode(EVENT_CHAINING) e3:SetCode(EVENT_CHAINING)
e3:SetCost(cm.disrmcost) e3:SetCountLimit(1)
e3:SetCountLimit(1,24865417)
e3:SetTarget(c24865317.tg) e3:SetTarget(c24865317.tg)
e3:SetOperation(c24865317.op) e3:SetOperation(c24865317.op)
c:RegisterEffect(e3) c:RegisterEffect(e3)
e4=e3:Clone()
e4:SetTarget(c24865317.stg)
e4:SetCondition(c24865317.atkcon2)
c:RegisterEffect(e4)
local e5=Effect.CreateEffect(c) local e5=Effect.CreateEffect(c)
e5:SetProperty(EFFECT_FLAG_CANNOT_DISABLE+EFFECT_FLAG_UNCOPYABLE) e5:SetProperty(EFFECT_FLAG_CANNOT_DISABLE+EFFECT_FLAG_UNCOPYABLE)
e5:SetType(EFFECT_TYPE_SINGLE) e5:SetType(EFFECT_TYPE_SINGLE)
...@@ -56,10 +45,10 @@ function c24865317.splimit(e,se,sp,st) ...@@ -56,10 +45,10 @@ function c24865317.splimit(e,se,sp,st)
return se:IsHasType(EFFECT_TYPE_ACTIONS) return se:IsHasType(EFFECT_TYPE_ACTIONS)
end end
function c24865317.atkcon(e,tp,eg,ep,ev,re,r,rp) function c24865317.atkcon(e,tp,eg,ep,ev,re,r,rp)
return not Duel.IsPlayerAffectedByEffect(tp,24865314) and Duel.GetFlagEffect(tp,24865317)==0 return not Duel.IsPlayerAffectedByEffect(tp,24865314)
end end
function c24865317.atkcon2(e,tp,eg,ep,ev,re,r,rp) function c24865317.atkcon2(e,tp,eg,ep,ev,re,r,rp)
return Duel.IsPlayerAffectedByEffect(tp,24865314) and Duel.GetFlagEffect(tp,24865317)==0 return Duel.IsPlayerAffectedByEffect(tp,24865314)
end end
function c24865317.tkcfilter(c) function c24865317.tkcfilter(c)
return not c:IsType(TYPE_EFFECT) return not c:IsType(TYPE_EFFECT)
...@@ -73,7 +62,7 @@ function c24865317.sptg(e,tp,eg,ep,ev,re,r,rp,chk) ...@@ -73,7 +62,7 @@ function c24865317.sptg(e,tp,eg,ep,ev,re,r,rp,chk)
if chk==0 then return if chk==0 then return
Duel.IsPlayerCanSpecialSummonCount(tp,1) Duel.IsPlayerCanSpecialSummonCount(tp,1)
and e:GetHandler():IsCanBeSpecialSummoned(e,0,tp,false,false,POS_FACEUP) and e:GetHandler():IsCanBeSpecialSummoned(e,0,tp,false,false,POS_FACEUP)
end end
Duel.SetOperationInfo(0,CATEGORY_SPECIAL_SUMMON,e:GetHandler(),1,0,0) Duel.SetOperationInfo(0,CATEGORY_SPECIAL_SUMMON,e:GetHandler(),1,0,0)
end end
function c24865317.spop(e,tp,eg,ep,ev,re,r,rp) function c24865317.spop(e,tp,eg,ep,ev,re,r,rp)
...@@ -83,75 +72,51 @@ function c24865317.spop(e,tp,eg,ep,ev,re,r,rp) ...@@ -83,75 +72,51 @@ function c24865317.spop(e,tp,eg,ep,ev,re,r,rp)
end end
function cm.disrmcost(e,tp,eg,ep,ev,re,r,rp,chk) function cm.disrmcost(e,tp,eg,ep,ev,re,r,rp,chk)
local c=e:GetHandler() local c=e:GetHandler()
if chk==0 then return c:GetFlagEffect(24865317)==0 end if chk==0 then return c:GetFlagEffect(24865317)==0 end
c:RegisterFlagEffect(24865317,RESET_CHAIN,0,1) c:RegisterFlagEffect(24865317,RESET_TOFIELD,0,1)
end end
function c24865317.tg(e,tp,eg,ep,ev,re,r,rp,chk) function c24865317.tg(e,tp,eg,ep,ev,re,r,rp,chk)
if chk==0 then return true end local b1=Duel.IsExistingMatchingCard(c24865317.tkcfilter,tp,LOCATION_MZONE,LOCATION_MZONE,1,nil)
local sg=Duel.GetMatchingGroup(c24865317.tkcfilter,tp,LOCATION_MZONE,LOCATION_MZONE,nil) if chk==0 then return b1 end
if not Duel.CheckPhaseActivity() then e:SetLabel(1) else e:SetLabel(0) end
Duel.SetOperationInfo(0,CATEGORY_TOKEN,nil,1,0,0)
Duel.SetOperationInfo(0,CATEGORY_SPECIAL_SUMMON,nil,1,0,0)
Duel.SetOperationInfo(0,CATEGORY_DESTROY,b1,b1:GetCount(),0,0)
end
function c24865317.op(e,tp,eg,ep,ev,re,r,rp)
local b1=Duel.IsExistingMatchingCard(c24865317.tkcfilter,tp,LOCATION_MZONE,LOCATION_MZONE,1,nil)
if not b1 then return end
local off=1 local off=1
local ops={} local ops={}
local opval={} local opval={}
if c24865317.tkcfilter then if g:GetCount()>0 then
ops[off]=aux.Stringid(24865317,0) ops[off]=aux.Stringid(24865317,0)
opval[off-1]=1 opval[off-1]=1
off=off+1 off=off+1
end end
if sg>0 then if b1 then
ops[off]=aux.Stringid(24865317,1) ops[off]=aux.Stringid(24865317,1)
opval[off-1]=2 opval[off-1]=2
off=off+1 off=off+1
end end
local op=Duel.SelectOption(1-tp,table.unpack(ops)) local sp=1-tp
if Duel.IsPlayerAffectedByEffect(tp,24865314) then
sp=tp
end
local op=Duel.SelectOption(sp,table.unpack(ops))
local sel=opval[op] local sel=opval[op]
e:SetLabel(sel)
if sel==1 then if sel==1 then
Duel.SetOperationInfo(0,CATEGORY_TOKEN,nil,1,0,0)
Duel.SetOperationInfo(0,CATEGORY_SPECIAL_SUMMON,nil,1,0,0)
end
if sel==2 then
Duel.IsExistingMatchingCard(c24865317.tkcfilter,tp,LOCATION_MZONE,LOCATION_MZONE,1,nil) end
Duel.SetOperationInfo(0,CATEGORY_DESTROY,sg,sg:GetCount(),0,0)
end
function c24865317.op(e,tp,eg,ep,ev,re,r,rp)
local sel=e:GetLabel()
if sel==1 then
Duel.Hint(HINT_SELECTMSG,tp,HINTMSG_OPERATECARD) Duel.Hint(HINT_SELECTMSG,tp,HINTMSG_OPERATECARD)
if Duel.GetLocationCount(tp,LOCATION_MZONE)<=0 if Duel.GetLocationCount(tp,LOCATION_MZONE)<=0
or not Duel.IsPlayerCanSpecialSummonMonster(tp,24865324,0,TYPES_TOKEN_MONSTER,0,0,1,RACE_SEASERPENT,ATTRIBUTE_DARK) then return end or not Duel.IsPlayerCanSpecialSummonMonster(tp,24865324,0,TYPES_TOKEN_MONSTER,0,0,1,RACE_SEASERPENT,ATTRIBUTE_DARK) then return end
local token=Duel.CreateToken(tp,24865324) local token=Duel.CreateToken(tp,24865324)
Duel.SpecialSummon(token,0,tp,tp,false,false,POS_FACEUP) Duel.SpecialSummon(token,0,tp,tp,false,false,POS_FACEUP)
end end
--在场上特殊召唤一个量子海妖衍生物 --在场上特殊召唤一个量子海妖衍生物
if sel==2 then if sel==2 then
local sg=Duel.GetMatchingGroup(c24865317.tkcfilter,tp,LOCATION_MZONE,LOCATION_MZONE,nil) local sg=Duel.GetMatchingGroup(c24865317.tkcfilter,tp,LOCATION_MZONE,LOCATION_MZONE,nil)
Duel.Destroy(sg,REASON_EFFECT) Duel.Destroy(sg,REASON_EFFECT)
end end
end end
function c24865317.stg(e,tp,eg,ep,ev,re,r,rp,chk)
if chk==0 then return true end
local sg=Duel.GetMatchingGroup(c24865317.tkcfilter,tp,LOCATION_MZONE,LOCATION_MZONE,nil)
local off=1
local ops={}
local opval={}
if c24865317.tkcfilter then
ops[off]=aux.Stringid(24865317,0)
opval[off-1]=1
off=off+1
end
if c24865317.tkcfilter then
ops[off]=aux.Stringid(24865317,1)
opval[off-1]=2
off=off+1
end
local op=Duel.SelectOption(tp,table.unpack(ops))
local sel=opval[op]
e:SetLabel(sel)
if sel==1 then
Duel.SetOperationInfo(0,CATEGORY_TOKEN,nil,1,0,0)
Duel.SetOperationInfo(0,CATEGORY_SPECIAL_SUMMON,nil,1,0,0)
end
if sel==2 then
Duel.IsExistingMatchingCard(c24865317.tkcfilter,tp,LOCATION_MZONE,LOCATION_MZONE,1,nil) end
Duel.SetOperationInfo(0,CATEGORY_DESTROY,sg,sg:GetCount(),0,0)
end
\ No newline at end of file
...@@ -80,7 +80,7 @@ end ...@@ -80,7 +80,7 @@ end
function cm.disrmcost(e,tp,eg,ep,ev,re,r,rp,chk) function cm.disrmcost(e,tp,eg,ep,ev,re,r,rp,chk)
local c=e:GetHandler() local c=e:GetHandler()
if chk==0 then return c:GetFlagEffect(24865318)==0 end if chk==0 then return c:GetFlagEffect(24865318)==0 end
c:RegisterFlagEffect(24865318,RESET_CHAIN,0,1) c:RegisterFlagEffect(24865318,RESET_TOFIELD,0,1)
end end
function c24865318.tg(e,tp,eg,ep,ev,re,r,rp,chk) function c24865318.tg(e,tp,eg,ep,ev,re,r,rp,chk)
local b1=Duel.IsChainDisablable(ev) local b1=Duel.IsChainDisablable(ev)
......
...@@ -19,11 +19,11 @@ function c24865320.initial_effect(c) ...@@ -19,11 +19,11 @@ function c24865320.initial_effect(c)
local e2=Effect.CreateEffect(c) local e2=Effect.CreateEffect(c)
e2:SetDescription(aux.Stringid(24865320,1)) e2:SetDescription(aux.Stringid(24865320,1))
e2:SetCategory(CATEGORY_SPECIAL_SUMMON+CATEGORY_TOEXTRA) e2:SetCategory(CATEGORY_SPECIAL_SUMMON+CATEGORY_TOEXTRA)
e2:SetType(EFFECT_TYPE_QUICK_O) e2:SetType(EFFECT_TYPE_IGNITION)
e2:SetProperty(EFFECT_FLAG_CARD_TARGET) e2:SetProperty(EFFECT_FLAG_CARD_TARGET)
e2:SetCode(EVENT_FREE_CHAIN) e2:SetCode(EVENT_FREE_CHAIN)
e2:SetRange(LOCATION_MZONE) e2:SetRange(LOCATION_MZONE)
e2:SetCountLimit(1,24865320) e2:SetProperty(EFFECT_FLAG_DELAY)
e2:SetTarget(c24865320.sptg) e2:SetTarget(c24865320.sptg)
e2:SetOperation(c24865320.spop) e2:SetOperation(c24865320.spop)
e2:SetCondition(c24865320.spcd) e2:SetCondition(c24865320.spcd)
...@@ -71,14 +71,15 @@ end ...@@ -71,14 +71,15 @@ end
function c24865320.spop(e,tp,eg,ep,ev,re,r,rp) function c24865320.spop(e,tp,eg,ep,ev,re,r,rp)
local tc=Duel.GetFirstTarget() local tc=Duel.GetFirstTarget()
local c=e:GetHandler() local c=e:GetHandler()
if tc:IsRelateToEffect(e) then if tc:IsRelateToEffect(e) and c:IsRelateToEffect(e) then
Duel.SpecialSummon(tc,0,tp,tp,false,false,POS_FACEUP) if Duel.SendtoDeck(c,nil,0,REASON_EFFECT) then
Duel.SendtoDeck(c,nil,0,REASON_EFFECT) Duel.SpecialSummon(tc,0,tp,tp,false,false,POS_FACEUP)
end
end end
end end
function c24865320.spcd(e) function c24865320.spcd(e)
return e:GetHandler():GetOverlayCount()==0 return e:GetHandler():GetOverlayCount()==0
end end
function c24865320.gl(c) function c24865320.gl(c)
return c:IsCode(24865317) and not c:IsDisabled() return c:IsCode(24865317) and not c:IsDisabled()
end end
\ No newline at end of file
...@@ -2,12 +2,7 @@ ...@@ -2,12 +2,7 @@
local m=24865321 local m=24865321
local cm=_G["c"..m] local cm=_G["c"..m]
function c24865321.initial_effect(c) function c24865321.initial_effect(c)
local e0=Effect.CreateEffect(c)
e0:SetType(EFFECT_TYPE_SINGLE)
e0:SetProperty(EFFECT_FLAG_CANNOT_DISABLE+EFFECT_FLAG_UNCOPYABLE)
e0:SetCode(EFFECT_CANNOT_BE_LINK_MATERIAL)
e0:SetValue(1)
c:RegisterEffect(e0)
local e1=Effect.CreateEffect(c) local e1=Effect.CreateEffect(c)
e1:SetDescription(aux.Stringid(24865321,0)) e1:SetDescription(aux.Stringid(24865321,0))
e1:SetCategory(CATEGORY_SPECIAL_SUMMON+CATEGORY_TOKEN) e1:SetCategory(CATEGORY_SPECIAL_SUMMON+CATEGORY_TOKEN)
...@@ -37,16 +32,10 @@ function c24865321.initial_effect(c) ...@@ -37,16 +32,10 @@ function c24865321.initial_effect(c)
e3:SetRange(LOCATION_MZONE) e3:SetRange(LOCATION_MZONE)
e3:SetProperty(EFFECT_FLAG_NO_TURN_RESET) e3:SetProperty(EFFECT_FLAG_NO_TURN_RESET)
e3:SetCode(EVENT_CHAINING) e3:SetCode(EVENT_CHAINING)
e3:SetCost(cm.disrmcost)
e3:SetCondition(c24865321.atkcon)
e3:SetCountLimit(1,24865421) e3:SetCountLimit(1,24865421)
e3:SetTarget(c24865321.tg) e3:SetTarget(c24865321.tg)
e3:SetOperation(c24865321.op) e3:SetOperation(c24865321.op)
c:RegisterEffect(e3) c:RegisterEffect(e3)
e4=e3:Clone()
e4:SetTarget(c24865321.stg)
e4:SetCondition(c24865321.atkcon2)
c:RegisterEffect(e4)
end end
function c24865321.filter(c) function c24865321.filter(c)
return c:IsType(TYPE_MONSTER) and c:IsSetCard(0xb10) and c:IsAbleToGrave() and not c:IsCode(24865321) return c:IsType(TYPE_MONSTER) and c:IsSetCard(0xb10) and c:IsAbleToGrave() and not c:IsCode(24865321)
...@@ -74,15 +63,16 @@ end ...@@ -74,15 +63,16 @@ end
function c24865321.tnval(e,c) function c24865321.tnval(e,c)
return e:GetHandler():IsDefensePos() return e:GetHandler():IsDefensePos()
end end
function cm.disrmcost(e,tp,eg,ep,ev,re,r,rp,chk)
local c=e:GetHandler()
if chk==0 then return c:GetFlagEffect(24865321)==0 end
c:RegisterFlagEffect(24865321,RESET_CHAIN,0,1)
end
function c24865321.tg(e,tp,eg,ep,ev,re,r,rp,chk) function c24865321.tg(e,tp,eg,ep,ev,re,r,rp,chk)
local b1=Duel.IsExistingMatchingCard(c24865321.filter,tp,LOCATION_DECK,0,1,nil,e,tp) local b1=Duel.IsExistingMatchingCard(c24865321.filter,tp,LOCATION_DECK,0,1,nil,e,tp)
local b3=Duel.IsExistingMatchingCard(c24865321.filter2,tp,LOCATION_DECK,0,1,nil,e,tp) local b3=Duel.IsExistingMatchingCard(c24865321.filter2,tp,LOCATION_DECK,0,1,nil,e,tp)
if chk==0 then return b1 or b3 end if chk==0 then return b1 or b3 end
Duel.SetOperationInfo(0,CATEGORY_DECKDES,nil,1,tp,LOCATION_DECK)
Duel.SetOperationInfo(0,CATEGORY_DECKDES,nil,1,tp,LOCATION_DECK)
end
function c24865321.op(e,tp,eg,ep,ev,re,r,rp)
local b1=Duel.IsExistingMatchingCard(c24865321.filter,tp,LOCATION_DECK,0,1,nil,e,tp)
local b2=Duel.IsExistingMatchingCard(c24865321.filter2,tp,LOCATION_DECK,0,1,nil,e,tp)
local off=1 local off=1
local ops={} local ops={}
local opval={} local opval={}
...@@ -91,69 +81,31 @@ function c24865321.tg(e,tp,eg,ep,ev,re,r,rp,chk) ...@@ -91,69 +81,31 @@ function c24865321.tg(e,tp,eg,ep,ev,re,r,rp,chk)
opval[off-1]=1 opval[off-1]=1
off=off+1 off=off+1
end end
if b3 then if b2 then
ops[off]=aux.Stringid(24865321,1) ops[off]=aux.Stringid(24865321,1)
opval[off-1]=2 opval[off-1]=2
off=off+1 off=off+1
end end
local op=Duel.SelectOption(1-tp,table.unpack(ops)) local sp=1-tp
if Duel.IsPlayerAffectedByEffect(tp,24865314) then
sp=tp
end
if not b1 and not b2 then return end
local op=Duel.SelectOption(sp,table.unpack(ops))
local sel=opval[op] local sel=opval[op]
e:SetLabel(sel)
if sel==1 then if sel==1 then
Duel.SetOperationInfo(0,CATEGORY_DECKDES,nil,1,tp,LOCATION_DECK) Duel.Hint(HINT_SELECTMSG,tp,HINTMSG_TOGRAVE)
if sel==2 then local g=Duel.SelectMatchingCard(tp,c24865321.filter,tp,LOCATION_DECK,0,1,1,nil)
Duel.SetOperationInfo(0,CATEGORY_DECKDES,nil,1,tp,LOCATION_DECK) if g:GetCount()>0 then
end Duel.SendtoGrave(g,REASON_EFFECT)
end end
end
function c24865321.op(e,tp,eg,ep,ev,re,r,rp)
local sel=e:GetLabel()
if sel==1 then
Duel.Hint(HINT_SELECTMSG,tp,HINTMSG_TOGRAVE)
local g=Duel.SelectMatchingCard(tp,c24865321.filter,tp,LOCATION_DECK,0,1,1,nil)
if g:GetCount()>0 then
Duel.SendtoGrave(g,REASON_EFFECT)
end
end end
--从卡组选一张「量子妖海-狄拉克」加入手卡或在把这张卡发动的玩家的场上发动 --从卡组选一张「量子妖海-狄拉克」加入手卡或在把这张卡发动的玩家的场上发动
if sel==2 then if sel==2 then
Duel.Hint(HINT_SELECTMSG,tp,HINTMSG_TOGRAVE) Duel.Hint(HINT_SELECTMSG,tp,HINTMSG_TOGRAVE)
local g=Duel.SelectMatchingCard(tp,c24865321.filter2,tp,LOCATION_DECK,0,1,1,nil) local g=Duel.SelectMatchingCard(tp,c24865321.filter,tp,LOCATION_DECK,0,1,1,nil)
if g:GetCount()>0 then if g:GetCount()>0 then
Duel.SendtoGrave(g,REASON_EFFECT) Duel.SendtoGrave(g,REASON_EFFECT)
end end
end end
end end
function c24865321.atkcon(e,tp,eg,ep,ev,re,r,rp)
return not Duel.IsPlayerAffectedByEffect(tp,24865314) and Duel.GetFlagEffect(tp,24865321)==0
end
function c24865321.atkcon2(e,tp,eg,ep,ev,re,r,rp)
return aux.dscon() and Duel.IsPlayerAffectedByEffect(tp,24865314) and Duel.GetFlagEffect(tp,24865321)==0
end
function c24865321.stg(e,tp,eg,ep,ev,re,r,rp,chk)
local b1=Duel.IsExistingMatchingCard(c24865321.filter,tp,LOCATION_DECK,0,1,nil,e,tp)
local b3=Duel.IsExistingMatchingCard(c24865321.filter2,tp,LOCATION_DECK,0,1,nil,e,tp)
if chk==0 then return b1 or b3 end
local off=1
local ops={}
local opval={}
if b1 then
ops[off]=aux.Stringid(24865321,0)
opval[off-1]=1
off=off+1
end
if (b2 and b3) then
ops[off]=aux.Stringid(24865321,1)
opval[off-1]=2
off=off+1
end
local op=Duel.SelectOption(tp,table.unpack(ops))
local sel=opval[op]
e:SetLabel(sel)
if sel==1 then
Duel.SetOperationInfo(0,CATEGORY_DECKDES,nil,1,tp,LOCATION_DECK)
if sel==2 then
Duel.SetOperationInfo(0,CATEGORY_DECKDES,nil,1,tp,LOCATION_DECK)
end
end
end
\ No newline at end of file
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