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)
end
--to gave
function cm.tgcon(e,tp,eg,ep,ev,re,r,rp)
local c=e:GetHandler()
return not re:GetHandler():IsCode(m)
return not re or not re:GetHandler():IsCode(m)
end
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
......
......@@ -51,8 +51,7 @@ function cm.initial_effect(c)
end
--code
function cm.condition(e,tp,eg,ep,ev,re,r,rp)
local c=e:GetHandler()
return c:IsFaceup() and c:IsLocation(LOCATION_MZONE)
return not re or not re:GetHandler():IsCode(m)
end
--add conter
function cm.countercost(e,tp,eg,ep,ev,re,r,rp,chk)
......
......@@ -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)
end
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
function cm.sptg(e,tp,eg,ep,ev,re,r,rp,chk)
local ft=Duel.GetLocationCount(tp,LOCATION_MZONE)
......@@ -82,10 +82,10 @@ function cm.sumfilter1(c)
return c:IsSummonable(true,nil) and srre.check_set_FRXS(c)
end
function cm.sumfilter3(c,e,tp)
return c:GetSummonPlayer()==1-tp
return c:GetSummonPlayer()==1-tp
end
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
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
......
......@@ -3,25 +3,20 @@ local m=24865313
local cm=_G["c"..m]
function c24865313.initial_effect(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:SetProperty(EFFECT_FLAG_DAMAGE_STEP)
e1:SetCode(EVENT_FREE_CHAIN)
e1:SetCountLimit(1,24865313)
e1:SetCost(cm.disrmcost)
e1:SetCountLimit(1,24865313)
e1:SetTarget(c24865313.tg)
e1:SetOperation(c24865313.op)
e1:SetCondition(cm.atkcon)
c:RegisterEffect(e1)
e4=e1:Clone()
e4:SetTarget(cm.stg)
e4:SetCondition(cm.atkcon2)
c:RegisterEffect(e4)
local e2=Effect.CreateEffect(c)
e2:SetType(EFFECT_TYPE_QUICK_O)
e2:SetCategory(CATEGORY_TODECK)
e2:SetCountLimit(1,24865313)
e2:SetCode(EVENT_FREE_CHAIN)
e2:SetCountLimit(1,24865313)
e2:SetCode(EVENT_FREE_CHAIN)
e2:SetRange(LOCATION_GRAVE)
e2:SetProperty(EFFECT_FLAG_CARD_TARGET)
e2:SetTarget(c24865313.drtg)
......@@ -31,54 +26,38 @@ end
function c24865313.filte(c,e,tp,check)
return c:IsCanBeSpecialSummoned(e,0,tp,false,false) and c:IsSetCard(0xb10)
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)
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)
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
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 ops={}
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)
opval[off-1]=1
off=off+1
end
if (b3 and b4)then
if b2 then
ops[off]=aux.Stringid(24865313,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
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 sel==1 then
if Duel.GetLocationCount(tp,LOCATION_MZONE)<=0 then return end
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
Duel.SpecialSummon(g,0,tp,tp,false,false,POS_FACEUP)
local tc=g:GetFirst()
......@@ -92,10 +71,10 @@ function c24865313.op(e,tp,eg,ep,ev,re,r,rp)
e2:SetCondition(c24865313.descon)
e2:SetOperation(c24865313.desop)
Duel.RegisterEffect(e2,tp)
end
end
end
--从卡组特殊召唤一张量子海妖怪兽
if sel==2 then
--从卡组特殊召唤一张量子海妖怪兽
if sel==2 then
if Duel.IsPlayerAffectedByEffect(tp,59822133) 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)
......@@ -129,37 +108,7 @@ function c24865313.op(e,tp,eg,ep,ev,re,r,rp)
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)
return c:GetFlagEffectLabel(24865313)==fid
end
......
......@@ -2,14 +2,14 @@
local m=24865314
local cm=_G["c"..m]
function c24865314.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 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)
e1:SetDescription(aux.Stringid(24865314,0))
e1:SetDescription(aux.Stringid(24865314,0))
e1:SetType(EFFECT_TYPE_QUICK_O)
e1:SetCode(EVENT_FREE_CHAIN)
e1:SetCategory(CATEGORY_SPECIAL_SUMMON+CATEGORY_TOKEN)
......@@ -21,7 +21,7 @@ function c24865314.initial_effect(c)
e1:SetTarget(c24865314.sptg)
e1:SetOperation(c24865314.spop)
c:RegisterEffect(e1)
Duel.AddCustomActivityCounter(m,ACTIVITY_CHAIN,aux.FALSE)
Duel.AddCustomActivityCounter(m,ACTIVITY_CHAIN,aux.FALSE)
local e2=Effect.CreateEffect(c)
e2:SetType(EFFECT_TYPE_FIELD)
e2:SetCode(24865314)
......@@ -34,7 +34,7 @@ function c24865314.initial_effect(c)
e3:SetRange(LOCATION_MZONE)
e3:SetCode(EVENT_CHAINING)
e3:SetProperty(EFFECT_FLAG_NO_TURN_RESET)
e3:SetCountLimit(1,24865314)
e3:SetCountLimit(1)
e3:SetCost(c24865314.cost)
e3:SetTarget(c24865314.tg)
e3:SetOperation(c24865314.op)
......@@ -50,49 +50,57 @@ function c24865314.splimit(e,se,sp,st)
return se:IsHasType(EFFECT_TYPE_ACTIONS)
end
function c24865314.filter2(c)
return c:IsType(TYPE_MONSTER) and c:IsSetCard(0xb10)
return c:IsType(TYPE_MONSTER) and c:IsSetCard(0xb10)
end
function c24865314.filter(c)
return c:IsType(TYPE_MONSTER) and c:IsSetCard(0xb10) and not c:IsCode(24865314)
end
function c24865314.spfilter(c,e,tp,code)
return c:IsSetCard(0xb10) and c:IsCanBeSpecialSummoned(e,0,tp,false,false) and c:IsType(TYPE_MONSTER)
function c24865314.nfilter(c,e,tp)
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
function c24865314.spcon(e,tp,eg,ep,ev,re,r,rp)
local b1=Duel.GetCustomActivityCount(m,1-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)
end
end
function c24865314.sptg(e,tp,eg,ep,ev,re,r,rp,chk)
if chk==0 then return
Duel.IsPlayerCanSpecialSummonCount(tp,1)
and e:GetHandler():IsCanBeSpecialSummoned(e,0,tp,false,false,POS_FACEUP)
end
end
Duel.SetOperationInfo(0,CATEGORY_SPECIAL_SUMMON,e:GetHandler(),1,0,0)
end
function c24865314.spop(e,tp,eg,ep,ev,re,r,rp)
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)
end
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
Duel.Hint(HINT_SELECTMSG,tp,HINTMSG_RELEASE)
local g=Duel.SelectReleaseGroup(tp,c24865314.filter,1,1,nil,e,tp)
e:SetLabel(g:GetFirst():GetCode())
Duel.Release(g,REASON_COST)
e:SetLabel(1)
return true
end
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)
end
function c24865314.op(e,tp,eg,ep,ev,re,r,rp)
local g=Duel.GetMatchingGroup(c24865314.filter2,tp,LOCATION_MZONE,0,nil)
if Duel.GetMZoneCount(tp,g,tp)>0 then return end
local code=e:GetLabel()
if Duel.GetLocationCount(tp,LOCATION_MZONE)<=0 then return end
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
Duel.SpecialSummon(g,0,tp,tp,false,false,POS_FACEUP)
end
......
......@@ -2,27 +2,22 @@
local m=24865315
local cm=_G["c"..m]
function c24865315.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)
e1:SetDescription(aux.Stringid(24865315,0))
local e1=Effect.CreateEffect(c)
e1:SetDescription(aux.Stringid(24865315,0))
e1:SetCategory(CATEGORY_SPECIAL_SUMMON+CATEGORY_TOKEN)
e1:SetType(EFFECT_TYPE_QUICK_O)
e1:SetCode(EVENT_FREE_CHAIN)
e1:SetHintTiming(0,TIMINGS_CHECK_MONSTER+TIMING_MAIN_END)
e1:SetRange(LOCATION_HAND+LOCATION_GRAVE)
e1:SetCountLimit(1,24865315)
e1:SetCountLimit(1,24865515)
e1:SetCondition(c24865315.spcon)
e1:SetProperty(EFFECT_FLAG_DELAY)
e1:SetTarget(c24865315.sptg)
e1:SetOperation(c24865315.spop)
c:RegisterEffect(e1)
Duel.AddCustomActivityCounter(m,ACTIVITY_CHAIN,aux.FALSE)
local e2=Effect.CreateEffect(c)
Duel.AddCustomActivityCounter(m,ACTIVITY_CHAIN,aux.FALSE)
local e2=Effect.CreateEffect(c)
e2:SetType(EFFECT_TYPE_FIELD)
e2:SetCode(EFFECT_AVOID_BATTLE_DAMAGE)
e2:SetProperty(EFFECT_FLAG_IGNORE_IMMUNE)
......@@ -31,22 +26,16 @@ function c24865315.initial_effect(c)
e2:SetTarget(aux.TargetBoolFunction(Card.IsSetCard,0xb10))
e2:SetValue(1)
c:RegisterEffect(e2)
local e3=Effect.CreateEffect(c)
e3:SetCategory(CATEGORY_DESTROY)
local e3=Effect.CreateEffect(c)
e3:SetCategory(CATEGORY_TOGRAVE+CATEGORY_SPECIAL_SUMMON)
e3:SetType(EFFECT_TYPE_QUICK_O)
e3:SetRange(LOCATION_MZONE)
e3:SetCondition(c24865315.atkcon)
e3:SetProperty(EFFECT_FLAG_NO_TURN_RESET)
e3:SetCode(EVENT_CHAINING)
e3:SetCountLimit(1,24865415)
e3:SetCost(cm.disrmcost)
e3:SetCountLimit(1)
e3:SetTarget(c24865315.tg)
e3:SetOperation(c24865315.op)
c:RegisterEffect(e3)
e4=e3:Clone()
e4:SetTarget(c24865315.stg)
e4:SetCondition(c24865315.atkcon2)
c:RegisterEffect(e4)
local e5=Effect.CreateEffect(c)
e5:SetProperty(EFFECT_FLAG_CANNOT_DISABLE+EFFECT_FLAG_UNCOPYABLE)
e5:SetType(EFFECT_TYPE_SINGLE)
......@@ -61,7 +50,7 @@ function c24865315.filter(c)
return c:IsType(TYPE_MONSTER) and c:IsSetCard(0xb10) and c:IsAbleToGrave()
end
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
function c24865315.spcon(e,tp,eg,ep,ev,re,r,rp)
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)
if chk==0 then return
Duel.IsPlayerCanSpecialSummonCount(tp,1)
and e:GetHandler():IsCanBeSpecialSummoned(e,0,tp,false,false,POS_FACEUP)
end
end
Duel.SetOperationInfo(0,CATEGORY_SPECIAL_SUMMON,e:GetHandler(),1,0,0)
end
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
Duel.SpecialSummon(c,0,tp,tp,false,false,POS_FACEUP)
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)
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
local off=1
local ops={}
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
Duel.SetOperationInfo(0,CATEGORY_DECKDES,nil,1,tp,LOCATION_DECK)
Duel.SetOperationInfo(0,CATEGORY_SPECIAL_SUMMON,nil,1,tp,LOCATION_GRAVE)
end
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 b3=Duel.IsExistingMatchingCard(c24865315.filter2,tp,LOCATION_GRAVE,0,1,nil,e,tp)
if chk==0 then return b1 or b3 end
local b3=Duel.IsExistingMatchingCard(c24865315.filter2,tp,LOCATION_GRAVE,0,1,nil,e,tp)
if not b1 and not b3 then return end
local off=1
local ops={}
local opval={}
......@@ -154,13 +93,24 @@ function c24865315.stg(e,tp,eg,ep,ev,re,r,rp,chk)
opval[off-1]=2
off=off+1
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]
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
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
\ No newline at end of file
......@@ -2,14 +2,9 @@
local m=24865316
local cm=_G["c"..m]
function c24865316.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)
e1:SetDescription(aux.Stringid(24865316,0))
local e1=Effect.CreateEffect(c)
e1:SetDescription(aux.Stringid(24865316,0))
e1:SetCategory(CATEGORY_SPECIAL_SUMMON+CATEGORY_TOKEN)
e1:SetCondition(c24865316.spcon)
e1:SetType(EFFECT_TYPE_QUICK_O)
......@@ -21,7 +16,7 @@ function c24865316.initial_effect(c)
e1:SetTarget(c24865316.sptg)
e1:SetOperation(c24865316.spop)
c:RegisterEffect(e1)
Duel.AddCustomActivityCounter(m,ACTIVITY_CHAIN,aux.FALSE)
Duel.AddCustomActivityCounter(m,ACTIVITY_CHAIN,aux.FALSE)
local e2=Effect.CreateEffect(c)
e2:SetType(EFFECT_TYPE_FIELD)
e2:SetCode(EFFECT_INDESTRUCTABLE_EFFECT)
......@@ -36,16 +31,10 @@ function c24865316.initial_effect(c)
e3:SetRange(LOCATION_MZONE)
e3:SetProperty(EFFECT_FLAG_NO_TURN_RESET)
e3:SetCode(EVENT_CHAINING)
e3:SetCost(cm.disrmcost)
e3:SetCondition(c24865316.atkcon)
e3:SetCountLimit(1,24865416)
e3:SetCountLimit(1)
e3:SetTarget(c24865316.tg)
e3:SetOperation(c24865316.op)
c:RegisterEffect(e3)
e4=e3:Clone()
e4:SetTarget(c24865316.stg)
e4:SetCondition(c24865316.atkcon2)
c:RegisterEffect(e4)
local e5=Effect.CreateEffect(c)
e5:SetProperty(EFFECT_FLAG_CANNOT_DISABLE+EFFECT_FLAG_UNCOPYABLE)
e5:SetType(EFFECT_TYPE_SINGLE)
......@@ -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 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)
end
end
function c24865316.sptg(e,tp,eg,ep,ev,re,r,rp,chk)
if chk==0 then return
Duel.IsPlayerCanSpecialSummonCount(tp,1)
and e:GetHandler():IsCanBeSpecialSummoned(e,0,tp,false,false,POS_FACEUP)
end
end
Duel.SetOperationInfo(0,CATEGORY_SPECIAL_SUMMON,e:GetHandler(),1,0,0)
end
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
Duel.SpecialSummon(c,0,tp,tp,false,false,POS_FACEUP)
end
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
function c24865316.filter2(c)
return c:IsType(TYPE_TRAP) and c:IsSetCard(0xb10) and c:IsSSetable()
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)
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 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
if chk==0 then return b1 or 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 ops={}
local opval={}
......@@ -104,52 +92,50 @@ function c24865316.tg(e,tp,eg,ep,ev,re,r,rp,chk)
opval[off-1]=1
off=off+1
end
if (b2 and b3) then
if b2 then
ops[off]=aux.Stringid(24865316,1)
opval[off-1]=2
off=off+1
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]
e:SetLabel(sel)
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)
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
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)
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()
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
local b2=te:IsActivatable(tp,true,true)
Duel.ResetFlagEffect(tp,15248873)
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
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
--从卡组选一张「量子妖海-狄拉克」加入手卡或在把这张卡发动的玩家的场上发动
if sel==2 then
--从卡组选一张「量子妖海-狄拉克」加入手卡或在把这张卡发动的玩家的场上发动
if sel==2 then
if Duel.GetLocationCount(tp,LOCATION_SZONE)<=0 then return end
Duel.Hint(HINT_SELECTMSG,tp,HINTMSG_TOFIELD)
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)
tc:RegisterEffect(e1)
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
\ No newline at end of file
......@@ -2,14 +2,9 @@
local m=24865317
local cm=_G["c"..m]
function c24865317.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)
e1:SetDescription(aux.Stringid(24865317,0))
local e1=Effect.CreateEffect(c)
e1:SetDescription(aux.Stringid(24865317,0))
e1:SetType(EFFECT_TYPE_QUICK_O)
e1:SetCode(EVENT_FREE_CHAIN)
e1:SetCategory(CATEGORY_SPECIAL_SUMMON+CATEGORY_TOKEN)
......@@ -21,8 +16,8 @@ function c24865317.initial_effect(c)
e1:SetTarget(c24865317.sptg)
e1:SetOperation(c24865317.spop)
c:RegisterEffect(e1)
Duel.AddCustomActivityCounter(m,ACTIVITY_CHAIN,aux.FALSE)
local e2=Effect.CreateEffect(c)
Duel.AddCustomActivityCounter(m,ACTIVITY_CHAIN,aux.FALSE)
local e2=Effect.CreateEffect(c)
e2:SetType(EFFECT_TYPE_FIELD)
e2:SetCode(0x10000000+24865317)
e2:SetRange(LOCATION_MZONE)
......@@ -30,21 +25,15 @@ function c24865317.initial_effect(c)
e2:SetTargetRange(1,0)
c:RegisterEffect(e2)
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:SetRange(LOCATION_MZONE)
e3:SetProperty(EFFECT_FLAG_NO_TURN_RESET)
e3:SetCondition(c24865317.atkcon)
e3:SetCode(EVENT_CHAINING)
e3:SetCost(cm.disrmcost)
e3:SetCountLimit(1,24865417)
e3:SetCountLimit(1)
e3:SetTarget(c24865317.tg)
e3:SetOperation(c24865317.op)
c:RegisterEffect(e3)
e4=e3:Clone()
e4:SetTarget(c24865317.stg)
e4:SetCondition(c24865317.atkcon2)
c:RegisterEffect(e4)
local e5=Effect.CreateEffect(c)
e5:SetProperty(EFFECT_FLAG_CANNOT_DISABLE+EFFECT_FLAG_UNCOPYABLE)
e5:SetType(EFFECT_TYPE_SINGLE)
......@@ -56,10 +45,10 @@ function c24865317.splimit(e,se,sp,st)
return se:IsHasType(EFFECT_TYPE_ACTIONS)
end
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
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
function c24865317.tkcfilter(c)
return not c:IsType(TYPE_EFFECT)
......@@ -73,7 +62,7 @@ function c24865317.sptg(e,tp,eg,ep,ev,re,r,rp,chk)
if chk==0 then return
Duel.IsPlayerCanSpecialSummonCount(tp,1)
and e:GetHandler():IsCanBeSpecialSummoned(e,0,tp,false,false,POS_FACEUP)
end
end
Duel.SetOperationInfo(0,CATEGORY_SPECIAL_SUMMON,e:GetHandler(),1,0,0)
end
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
function cm.disrmcost(e,tp,eg,ep,ev,re,r,rp,chk)
local c=e:GetHandler()
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
function c24865317.tg(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 b1=Duel.IsExistingMatchingCard(c24865317.tkcfilter,tp,LOCATION_MZONE,LOCATION_MZONE,1,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 ops={}
local opval={}
if c24865317.tkcfilter then
if g:GetCount()>0 then
ops[off]=aux.Stringid(24865317,0)
opval[off-1]=1
off=off+1
end
if sg>0 then
if b1 then
ops[off]=aux.Stringid(24865317,1)
opval[off-1]=2
off=off+1
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]
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
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)
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
local token=Duel.CreateToken(tp,24865324)
Duel.SpecialSummon(token,0,tp,tp,false,false,POS_FACEUP)
end
--在场上特殊召唤一个量子海妖衍生物
if sel==2 then
--在场上特殊召唤一个量子海妖衍生物
if sel==2 then
local sg=Duel.GetMatchingGroup(c24865317.tkcfilter,tp,LOCATION_MZONE,LOCATION_MZONE,nil)
Duel.Destroy(sg,REASON_EFFECT)
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
function cm.disrmcost(e,tp,eg,ep,ev,re,r,rp,chk)
local c=e:GetHandler()
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
function c24865318.tg(e,tp,eg,ep,ev,re,r,rp,chk)
local b1=Duel.IsChainDisablable(ev)
......
......@@ -19,11 +19,11 @@ function c24865320.initial_effect(c)
local e2=Effect.CreateEffect(c)
e2:SetDescription(aux.Stringid(24865320,1))
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:SetCode(EVENT_FREE_CHAIN)
e2:SetRange(LOCATION_MZONE)
e2:SetCountLimit(1,24865320)
e2:SetProperty(EFFECT_FLAG_DELAY)
e2:SetTarget(c24865320.sptg)
e2:SetOperation(c24865320.spop)
e2:SetCondition(c24865320.spcd)
......@@ -71,14 +71,15 @@ end
function c24865320.spop(e,tp,eg,ep,ev,re,r,rp)
local tc=Duel.GetFirstTarget()
local c=e:GetHandler()
if tc:IsRelateToEffect(e) then
Duel.SpecialSummon(tc,0,tp,tp,false,false,POS_FACEUP)
Duel.SendtoDeck(c,nil,0,REASON_EFFECT)
if tc:IsRelateToEffect(e) and c:IsRelateToEffect(e) then
if Duel.SendtoDeck(c,nil,0,REASON_EFFECT) then
Duel.SpecialSummon(tc,0,tp,tp,false,false,POS_FACEUP)
end
end
end
function c24865320.spcd(e)
return e:GetHandler():GetOverlayCount()==0
return e:GetHandler():GetOverlayCount()==0
end
function c24865320.gl(c)
return c:IsCode(24865317) and not c:IsDisabled()
end
\ No newline at end of file
end
......@@ -2,12 +2,7 @@
local m=24865321
local cm=_G["c"..m]
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)
e1:SetDescription(aux.Stringid(24865321,0))
e1:SetCategory(CATEGORY_SPECIAL_SUMMON+CATEGORY_TOKEN)
......@@ -37,16 +32,10 @@ function c24865321.initial_effect(c)
e3:SetRange(LOCATION_MZONE)
e3:SetProperty(EFFECT_FLAG_NO_TURN_RESET)
e3:SetCode(EVENT_CHAINING)
e3:SetCost(cm.disrmcost)
e3:SetCondition(c24865321.atkcon)
e3:SetCountLimit(1,24865421)
e3:SetTarget(c24865321.tg)
e3:SetOperation(c24865321.op)
c:RegisterEffect(e3)
e4=e3:Clone()
e4:SetTarget(c24865321.stg)
e4:SetCondition(c24865321.atkcon2)
c:RegisterEffect(e4)
end
function c24865321.filter(c)
return c:IsType(TYPE_MONSTER) and c:IsSetCard(0xb10) and c:IsAbleToGrave() and not c:IsCode(24865321)
......@@ -74,15 +63,16 @@ end
function c24865321.tnval(e,c)
return e:GetHandler():IsDefensePos()
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)
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
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 ops={}
local opval={}
......@@ -91,69 +81,31 @@ function c24865321.tg(e,tp,eg,ep,ev,re,r,rp,chk)
opval[off-1]=1
off=off+1
end
if b3 then
if b2 then
ops[off]=aux.Stringid(24865321,1)
opval[off-1]=2
off=off+1
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]
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
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
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
--从卡组选一张「量子妖海-狄拉克」加入手卡或在把这张卡发动的玩家的场上发动
if sel==2 then
--从卡组选一张「量子妖海-狄拉克」加入手卡或在把这张卡发动的玩家的场上发动
if sel==2 then
Duel.Hint(HINT_SELECTMSG,tp,HINTMSG_TOGRAVE)
local g=Duel.SelectMatchingCard(tp,c24865321.filter2,tp,LOCATION_DECK,0,1,1,nil)
if g:GetCount()>0 then
Duel.SendtoGrave(g,REASON_EFFECT)
end
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
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