Commit 8cc3ed50 authored by Tachibana's avatar Tachibana

得得得得得

parent aea620b0
Pipeline #13518 failed with stages
in 9 minutes and 41 seconds
--恶魔仙精 贝拉冬娜
xpcall(function() require("expansions/script/c16199990") end,function() require("script/c16199990") end)
local m,cm=rk.set(16114208,"FAIRY")
local m,cm=rk.set(16114243,"FAIRY")
function cm.initial_effect(c)
local m,cm=rk.set(16114208,"FAIRY",1)
function c16114243.initial_effect(c)
c:SetSPSummonOnce(16114208)
c:EnableReviveLimit()
--search
......@@ -12,9 +11,9 @@ function cm.initial_effect(c)
e1:SetType(EFFECT_TYPE_IGNITION)
e1:SetRange(LOCATION_HAND)
e1:SetCountLimit(1,m)
e1:SetCost(cm.cost)
e1:SetTarget(cm.target)
e1:SetOperation(cm.operation)
e1:SetCost(c16114243.cost)
e1:SetTarget(c16114243.target)
e1:SetOperation(c16114243.operation)
c:RegisterEffect(e1)
--to deck
local e3=Effect.CreateEffect(c)
......@@ -26,44 +25,44 @@ function cm.initial_effect(c)
e3:SetRange(LOCATION_MZONE)
e3:SetHintTiming(0,TIMINGS_CHECK_MONSTER)
e3:SetCountLimit(1,m+100)
e3:SetTarget(cm.drtg)
e3:SetOperation(cm.drop)
e3:SetTarget(c16114243.drtg)
e3:SetOperation(c16114243.drop)
c:RegisterEffect(e3)
end
--search
function cm.cost(e,tp,eg,ep,ev,re,r,rp,chk)
function c16114243.cost(e,tp,eg,ep,ev,re,r,rp,chk)
local c=e:GetHandler()
if chk==0 then return c:IsDiscardable() end
Duel.SendtoGrave(c,REASON_COST+REASON_DISCARD)
end
function cm.filter2(c)
function c16114243.filter2(c)
return c:IsCode(16114203) and c:IsAbleToHand()
end
function cm.target(e,tp,eg,ep,ev,re,r,rp,chk)
if chk==0 then return Duel.IsExistingMatchingCard(cm.filter2,tp,LOCATION_DECK,0,1,nil) end
function c16114243.target(e,tp,eg,ep,ev,re,r,rp,chk)
if chk==0 then return Duel.IsExistingMatchingCard(c16114243.filter2,tp,LOCATION_DECK,0,1,nil) end
Duel.SetOperationInfo(0,CATEGORY_TOHAND,nil,1,tp,LOCATION_DECK)
end
function cm.operation(e,tp,eg,ep,ev,re,r,rp)
function c16114243.operation(e,tp,eg,ep,ev,re,r,rp)
Duel.Hint(HINT_SELECTMSG,tp,HINTMSG_ATOHAND)
local tg=Duel.SelectMatchingCard(tp,cm.filter2,tp,LOCATION_DECK,0,1,1,nil)
local tg=Duel.SelectMatchingCard(tp,c16114243.filter2,tp,LOCATION_DECK,0,1,1,nil)
if tg:GetCount()>0 then
Duel.SendtoHand(tg,nil,REASON_EFFECT)
Duel.ConfirmCards(1-tp,tg)
end
end
--to deck
function cm.tdfilter(c)
function c16114243.tdfilter(c)
return c:IsAbleToDeck()
end
function cm.drtg(e,tp,eg,ep,ev,re,r,rp,chk,chkc)
if chkc then return chkc:IsLocation(LOCATION_GRAVE) and cm.tdfilter(chkc)end
if chk==0 then return Duel.IsExistingTarget(cm.tdfilter,tp,LOCATION_GRAVE,LOCATION_GRAVE,1,nil) end
function c16114243.drtg(e,tp,eg,ep,ev,re,r,rp,chk,chkc)
if chkc then return chkc:IsLocation(LOCATION_GRAVE) and c16114243.tdfilter(chkc)end
if chk==0 then return Duel.IsExistingTarget(c16114243.tdfilter,tp,LOCATION_GRAVE,LOCATION_GRAVE,1,nil) end
Duel.Hint(HINT_SELECTMSG,tp,HINTMSG_TODECK)
local g=Duel.SelectTarget(tp,cm.tdfilter,tp,LOCATION_GRAVE,LOCATION_GRAVE,1,2,nil)
local g=Duel.SelectTarget(tp,c16114243.tdfilter,tp,LOCATION_GRAVE,LOCATION_GRAVE,1,2,nil)
Duel.SetOperationInfo(0,CATEGORY_TODECK,g,g:GetCount(),0,0)
Duel.SetOperationInfo(0,CATEGORY_DAMAGE,nil,0,tp,1)
end
function cm.drop(e,tp,eg,ep,ev,re,r,rp)
function c16114243.drop(e,tp,eg,ep,ev,re,r,rp)
local tg=Duel.GetChainInfo(0,CHAININFO_TARGET_CARDS):Filter(Card.IsRelateToEffect,nil,e)
if tg:GetCount()<=0 then return end
Duel.SendtoDeck(tg,nil,SEQ_DECKSHUFFLE,REASON_EFFECT)
......
--不死仙精 贝拉多阿涅
xpcall(function() require("expansions/script/c16199990") end,function() require("script/c16199990") end)
local m,cm=rk.set(16114209,"FAIRY")
local m,cm=rk.set(16114244,"FAIRY")
function cm.initial_effect(c)
local m,cr=rk.set(16114209,"FAIRY")
function c16114244.initial_effect(c)
c:SetSPSummonOnce(16114209)
c:EnableReviveLimit()
--search
......@@ -12,9 +11,9 @@ function cm.initial_effect(c)
e1:SetType(EFFECT_TYPE_IGNITION)
e1:SetRange(LOCATION_HAND)
e1:SetCountLimit(1,m)
e1:SetCost(cm.cost)
e1:SetTarget(cm.target)
e1:SetOperation(cm.operation)
e1:SetCost(c16114244.cost)
e1:SetTarget(c16114244.target)
e1:SetOperation(c16114244.operation)
c:RegisterEffect(e1)
--special summon
local e2=Effect.CreateEffect(c)
......@@ -24,47 +23,47 @@ function cm.initial_effect(c)
e2:SetProperty(EFFECT_FLAG_DELAY+EFFECT_FLAG_CARD_TARGET)
e2:SetCode(EVENT_SPSUMMON_SUCCESS)
e2:SetCountLimit(1,m+100)
e2:SetTarget(cm.sptg1)
e2:SetOperation(cm.spop1)
e2:SetTarget(c16114244.sptg1)
e2:SetOperation(c16114244.spop1)
c:RegisterEffect(e2)
end
--search
function cm.cost(e,tp,eg,ep,ev,re,r,rp,chk)
function c16114244.cost(e,tp,eg,ep,ev,re,r,rp,chk)
local c=e:GetHandler()
if chk==0 then return c:IsDiscardable() end
Duel.SendtoGrave(c,REASON_COST+REASON_DISCARD)
end
function cm.filter2(c)
function c16114244.filter2(c)
return c:IsCode(16114207) and c:IsAbleToHand()
end
function cm.target(e,tp,eg,ep,ev,re,r,rp,chk)
if chk==0 then return Duel.IsExistingMatchingCard(cm.filter2,tp,LOCATION_DECK,0,1,nil) end
function c16114244.target(e,tp,eg,ep,ev,re,r,rp,chk)
if chk==0 then return Duel.IsExistingMatchingCard(c16114244.filter2,tp,LOCATION_DECK,0,1,nil) end
Duel.SetOperationInfo(0,CATEGORY_TOHAND,nil,1,tp,LOCATION_DECK)
end
function cm.operation(e,tp,eg,ep,ev,re,r,rp)
function c16114244.operation(e,tp,eg,ep,ev,re,r,rp)
Duel.Hint(HINT_SELECTMSG,tp,HINTMSG_ATOHAND)
local tg=Duel.SelectMatchingCard(tp,cm.filter2,tp,LOCATION_DECK,0,1,1,nil)
local tg=Duel.SelectMatchingCard(tp,c16114244.filter2,tp,LOCATION_DECK,0,1,1,nil)
if tg:GetCount()>0 then
Duel.SendtoHand(tg,nil,REASON_EFFECT)
Duel.ConfirmCards(1-tp,tg)
end
end
--special summon
function cm.spfilter(c,e,tp)
function c16114244.spfilter(c,e,tp)
return rk.check(c,"FAIRY") and c:IsCanBeSpecialSummoned(e,0,tp,false,false,POS_FACEUP)
end
function cm.sptg1(e,tp,eg,ep,ev,re,r,rp,chk,chkc)
function c16114244.sptg1(e,tp,eg,ep,ev,re,r,rp,chk,chkc)
local ct=Duel.GetLocationCount(tp,LOCATION_MZONE)
if chkc then return chkc:IsLocation(LOCATION_GRAVE) and cm.spfilter(chkc,e,tp) end
if chkc then return chkc:IsLocation(LOCATION_GRAVE) and c16114244.spfilter(chkc,e,tp) end
if chk==0 then return ct>0
and Duel.IsExistingTarget(cm.spfilter,tp,LOCATION_GRAVE,LOCATION_GRAVE,1,nil,e,tp) end
and Duel.IsExistingTarget(c16114244.spfilter,tp,LOCATION_GRAVE,LOCATION_GRAVE,1,nil,e,tp) end
if ct>2 then ct=2 end
if Duel.IsPlayerAffectedByEffect(tp,59822133) then ct=1 end
Duel.Hint(HINT_SELECTMSG,tp,HINTMSG_SPSUMMON)
local g=Duel.SelectTarget(tp,cm.spfilter,tp,LOCATION_GRAVE,LOCATION_GRAVE,1,ct,nil,e,tp)
local g=Duel.SelectTarget(tp,c16114244.spfilter,tp,LOCATION_GRAVE,LOCATION_GRAVE,1,ct,nil,e,tp)
Duel.SetOperationInfo(0,CATEGORY_SPECIAL_SUMMON,g,g:GetCount(),0,0)
end
function cm.spop1(e,tp,eg,ep,ev,re,r,rp)
function c16114244.spop1(e,tp,eg,ep,ev,re,r,rp)
local ct=Duel.GetLocationCount(tp,LOCATION_MZONE)
if ct<1 then return end
local g=Duel.GetChainInfo(0,CHAININFO_TARGET_CARDS):Filter(Card.IsRelateToEffect,nil,e)
......
......@@ -68,10 +68,10 @@ end
function cm.Linkfilter2(c,lc)
return c:IsFaceup() and c:IsCanBeLinkMaterial(lc)
end
function cm.GetLinkMaterials(tp,f,lc)
local mg=Duel.GetMatchingGroup(Auxiliary.LConditionFilter,tp,LOCATION_MZONE,0,nil,cm.Linkfilter,lc)
local mg2=Duel.GetMatchingGroup(Auxiliary.LExtraFilter,tp,LOCATION_HAND+LOCATION_SZONE,LOCATION_ONFIELD,nil,cm.Linkfilter,lc,tp)
local mg3=Duel.GetMatchingGroup(cm.Linkfilter2,tp,0,LOCATION_MZONE,nil,lc)
function cm.GetLinkMaterials(tp,f,lc,e)
local mg=Duel.GetMatchingGroup(Auxiliary.LConditionFilter,tp,LOCATION_MZONE,0,nil,cm.Linkfilter,lc,e)
local mg2=Duel.GetMatchingGroup(Auxiliary.LExtraFilter,tp,LOCATION_HAND+LOCATION_SZONE,LOCATION_ONFIELD,nil,cm.Linkfilter,lc,tp,e)
local mg3=Duel.GetMatchingGroup(cm.Linkfilter2,tp,0,LOCATION_MZONE,nil,lc,e)
if mg2:GetCount()>0 then mg:Merge(mg2) end
if mg3:GetCount()>0 then mg:Merge(mg3) end
return mg
......
......@@ -19,13 +19,38 @@ function cm.initial_effect(c)
e2:SetTarget(cm.thtg)
e2:SetOperation(cm.thop)
c:RegisterEffect(e2)
--global
if not cm.global_check then
cm.global_check=true
cm[0]=0
cm[1]=0
local ge1=Effect.CreateEffect(c)
ge1:SetType(EFFECT_TYPE_FIELD+EFFECT_TYPE_CONTINUOUS)
ge1:SetCode(EVENT_DAMAGE)
ge1:SetProperty(EFFECT_FLAG_DELAY)
ge1:SetOperation(cm.checkop)
Duel.RegisterEffect(ge1,0)
local ge2=Effect.CreateEffect(c)
ge2:SetType(EFFECT_TYPE_FIELD+EFFECT_TYPE_CONTINUOUS)
ge2:SetCode(EVENT_PHASE_START+PHASE_DRAW)
ge2:SetOperation(cm.clear)
Duel.RegisterEffect(ge2,0)
end
end
--global
function cm.checkop(e,tp,eg,ep,ev,re,r,rp)
cm[ep]=cm[ep]+ev
end
function cm.clear(e,tp,eg,ep,ev,re,r,rp)
cm[0]=0
cm[1]=0
end
--e1
function cm.targetget(c)
return c:GetOriginalCode()==16114247 and c:IsFaceup()
end
function cm.target(e,tp,eg,ep,ev,re,r,rp,chk)
if chk==0 then return c16114247[tp]>0 and Duel.IsExistingTarget(cm.targetget,tp,LOCATION_MZONE,0,1,nil) end
if chk==0 then return cm[tp]>0 and Duel.IsExistingTarget(cm.targetget,tp,LOCATION_MZONE,0,1,nil) end
Duel.Hint(HINT_SELECTMSG,tp,HINTMSG_TARGET)
local sg=Duel.SelectTarget(tp,cm.targetget,tp,LOCATION_MZONE,0,1,1,nil)
end
......
--魔王剑-鏖杀公
--魔王剑-物质主义
local m=33400340
local cm=_G["c"..m]
function cm.initial_effect(c)
......@@ -23,6 +23,7 @@ function cm.initial_effect(c)
e3:SetRange(LOCATION_SZONE)
e3:SetTargetRange(0,LOCATION_ONFIELD)
e3:SetCode(EFFECT_DISABLE)
e3:SetCondition(cm.actcon)
e3:SetTarget(cm.distg2)
c:RegisterEffect(e3)
--
......@@ -34,7 +35,7 @@ local e5=Effect.CreateEffect(c)
e5:SetCountLimit(1,m)
e5:SetCost(cm.cost2)
e5:SetTarget(cm.tg)
e5:SetOperation(cm.tgop2)
e5:SetOperation(cm.adop)
c:RegisterEffect(e5)
--immune
local e6=Effect.CreateEffect(c)
......@@ -66,10 +67,6 @@ function cm.distg2(e,c)
return not (c:IsSetCard(0x341,0x340))
end
function cm.tgop(e,tp,eg,ep,ev,re,r,rp)
end
function cm.refilter(c,tp,re)
local flag=true
local value={Duel.IsPlayerAffectedByEffect(tp,EFFECT_CANNOT_RELEASE)}
......
......@@ -62,6 +62,7 @@ function cm.negop(e,tp,eg,ep,ev,re,r,rp)
local g=Group.CreateGroup()
Duel.ChangeTargetCard(ev,g)
Duel.ChangeChainOperation(ev,aux.NULL)
Duel.SendtoDeck(eg:GetFirst(),nil,SEQ_DECKTOP,REASON_EFFECT)
Duel.Hint(HINT_SELECTMSG,tp,HINTMSG_TOGRAVE)
local g2=Duel.SelectMatchingCard(tp,cm.tgfilter,tp,LOCATION_DECK+LOCATION_HAND,0,1,1,nil)
Duel.SendtoGrave(g2,REASON_EFFECT)
......@@ -150,7 +151,7 @@ function cm.tgop2(e,tp,eg,ep,ev,re,r,rp)
if cost then cost(te,tep,eg,ep,ev,re,r,rp,1) end
end
Duel.SendtoGrave(e:GetHandler(),REASON_EFFECT)
end
end
end
end
if key==1 then
......@@ -172,7 +173,7 @@ function cm.tgop2(e,tp,eg,ep,ev,re,r,rp)
local tc=g4:GetFirst()
local ck=Duel.SelectOption(tp,aux.Stringid(m,3),aux.Stringid(m,4))
if ck==0 then Duel.SendtoDeck(tc,nil,0,REASON_EFFECT) end
if ck==1 then Duel.SendtoDeck(tc,nil,1,REASON_EFFECT) end
if ck==1 then Duel.SendtoDeck(tc,nil,1,REASON_EFFECT) end
end
end
if tc:IsCode(ac) then
......
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