Commit 515a4d43 authored by 伊蕾娜's avatar 伊蕾娜

2.0pred漏传卡

parent 9bf33f4f
Pipeline #32930 passed with stage
in 10 seconds
--灵都·永恒摇曳的四叶
local m=1110141
local cm=_G["c"..m]
--
function c1110141.initial_effect(c)
--
aux.EnablePendulumAttribute(c)
--
local e1=Effect.CreateEffect(c)
e1:SetDescription(aux.Stringid(1110141,0))
e1:SetCategory(CATEGORY_SPECIAL_SUMMON+CATEGORY_RELEASE)
e1:SetProperty(EFFECT_FLAG_CARD_TARGET)
e1:SetType(EFFECT_TYPE_IGNITION)
e1:SetRange(LOCATION_PZONE)
e1:SetTarget(c1110141.tg1)
e1:SetOperation(c1110141.op1)
c:RegisterEffect(e1)
--
local e2=Effect.CreateEffect(c)
e2:SetDescription(aux.Stringid(1110141,1))
e2:SetCategory(CATEGORY_REMOVE+CATEGORY_TOGRAVE)
e2:SetType(EFFECT_TYPE_IGNITION)
e2:SetRange(LOCATION_MZONE)
e2:SetCountLimit(1,1110141)
e2:SetTarget(c1110141.tg2)
e2:SetOperation(c1110141.op2)
c:RegisterEffect(e2)
--
local e3=Effect.CreateEffect(c)
e3:SetCategory(CATEGORY_TOGRAVE)
e3:SetProperty(EFFECT_FLAG_DAMAGE_STEP+EFFECT_FLAG_DELAY)
e3:SetType(EFFECT_TYPE_SINGLE+EFFECT_TYPE_TRIGGER_O)
e3:SetCode(EVENT_LEAVE_FIELD)
e3:SetCondition(c1110141.con3)
e3:SetTarget(c1110141.tg3)
e3:SetOperation(c1110141.op3)
c:RegisterEffect(e3)
--
end
--
function c1110141.tfilter1(c,tp)
return c:IsSetCard(0x3e1f) and c:IsReleasable() and Duel.GetMZoneCount(tp,c)>0
end
function c1110141.tg1(e,tp,eg,ep,ev,re,r,rp,chk,chkc)
if chkc then return chkc:IsControler(tp) and chkc:IsLocation(LOCATION_MZONE) and c1110141.tfilter1(chkc,e,tp) end
if chk==0 then return e:GetHandler():IsCanBeSpecialSummoned(e,0,tp,false,false) and Duel.IsExistingTarget(c1110141.tfilter1,tp,LOCATION_MZONE,0,1,nil,tp) end
Duel.Hint(HINT_SELECTMSG,tp,HINTMSG_RELEASE)
local sg=Duel.SelectTarget(tp,c1110141.tfilter1,tp,LOCATION_MZONE,0,1,1,nil)
Duel.SetOperationInfo(0,CATEGORY_RELEASE,sg,1,0,LOCATION_MZONE)
Duel.SetOperationInfo(0,CATEGORY_SPECIAL_SUMMON,e:GetHandler(),1,0,LOCATION_PZONE)
end
function c1110141.op1(e,tp,eg,ep,ev,re,r,rp)
local c=e:GetHandler()
local tc=Duel.GetFirstTarget()
if not tc:IsRelateToEffect(e) then return end
if Duel.Release(tc,REASON_EFFECT)>0 and c:IsRelateToEffect(e) then
Duel.SpecialSummon(c,0,tp,tp,false,false,POS_FACEUP)
end
end
--
function c1110141.tfilter2_1(c)
return c:IsRace(RACE_FAIRY) and c:IsType(TYPE_RITUAL) and c:IsType(TYPE_MONSTER) and c:IsAbleToRemove()
end
function c1110141.tfilter2_2(c)
return c:IsSetCard(0x5e1f) and c:IsType(TYPE_SPELL) and c:IsAbleToGrave()
end
function c1110141.tg2(e,tp,eg,ep,ev,re,r,rp,chk)
if chk==0 then return Duel.IsExistingMatchingCard(c1110141.tfilter2_1,tp,LOCATION_DECK,0,1,nil) and Duel.IsExistingMatchingCard(c1110141.tfilter2_2,tp,LOCATION_DECK,0,1,nil) end
Duel.SetOperationInfo(0,CATEGORY_REMOVE,nil,1,tp,LOCATION_DECK)
Duel.SetOperationInfo(0,CATEGORY_TOGRAVE,nil,1,tp,LOCATION_DECK)
end
function c1110141.op2(e,tp,eg,ep,ev,re,r,rp)
Duel.Hint(HINT_SELECTMSG,tp,HINTMSG_REMOVE)
local sg=Duel.SelectMatchingCard(tp,c1110141.tfilter2_1,tp,LOCATION_DECK,0,1,1,nil)
if sg:GetCount()<1 then return end
if Duel.Remove(sg,POS_FACEUP,REASON_EFFECT)>0 and Duel.IsExistingMatchingCard(c1110141.tfilter2_2,tp,LOCATION_DECK,0,1,nil) then
Duel.Hint(HINT_SELECTMSG,tp,HINTMSG_TOGRAVE)
local tg=Duel.SelectMatchingCard(tp,c1110141.tfilter2_2,tp,LOCATION_DECK,0,1,1,nil)
Duel.SendtoGrave(tg,REASON_EFFECT)
end
end
--
function c1110141.con3(e,tp,eg,ep,ev,re,r,rp)
return e:GetHandler():IsPreviousLocation(LOCATION_ONFIELD) and e:GetHandler():IsPreviousPosition(POS_FACEUP)
end
function c1110141.tg3(e,tp,eg,ep,ev,re,r,rp,chk)
if chk==0 then return e:GetHandler():IsAbleToGrave() end
Duel.SetOperationInfo(0,CATEGORY_TOGRAVE,e:GetHandler(),1,0,0)
end
function c1110141.op3(e,tp,eg,ep,ev,re,r,rp)
if not e:GetHandler():IsRelateToEffect(e) then return end
Duel.SendtoGrave(e:GetHandler(),REASON_EFFECT)
end
--
\ No newline at end of file
--飘零之城的榎荷
ocal m=1110142
local cm=_G["c"..m]
--
function c1110142.initial_effect(c)
--
aux.EnablePendulumAttribute(c)
--
local e1=Effect.CreateEffect(c)
e1:SetDescription(aux.Stringid(1110142,0))
e1:SetCategory(CATEGORY_SPECIAL_SUMMON+CATEGORY_RELEASE)
e1:SetProperty(EFFECT_FLAG_CARD_TARGET)
e1:SetType(EFFECT_TYPE_IGNITION)
e1:SetRange(LOCATION_PZONE)
e1:SetTarget(c1110142.tg1)
e1:SetOperation(c1110142.op1)
c:RegisterEffect(e1)
--
local e2=Effect.CreateEffect(c)
e2:SetDescription(aux.Stringid(1110142,1))
e2:SetCategory(CATEGORY_TODECK+CATEGORY_SEARCH+CATEGORY_TOHAND)
e2:SetType(EFFECT_TYPE_IGNITION)
e2:SetRange(LOCATION_MZONE)
e2:SetCountLimit(1,1110142)
e2:SetTarget(c1110142.tg2)
e2:SetOperation(c1110142.op2)
c:RegisterEffect(e2)
--
local e3=Effect.CreateEffect(c)
e3:SetCategory(CATEGORY_TOGRAVE)
e3:SetProperty(EFFECT_FLAG_DAMAGE_STEP+EFFECT_FLAG_DELAY)
e3:SetType(EFFECT_TYPE_SINGLE+EFFECT_TYPE_TRIGGER_O)
e3:SetCode(EVENT_LEAVE_FIELD)
e3:SetCondition(c1110142.con3)
e3:SetTarget(c1110142.tg3)
e3:SetOperation(c1110142.op3)
c:RegisterEffect(e3)
--
end
--
function c1110142.tfilter1(c,tp)
return c:IsSetCard(0x3e1f) and c:IsReleasable() and Duel.GetMZoneCount(tp,c)>0
end
function c1110142.tg1(e,tp,eg,ep,ev,re,r,rp,chk,chkc)
if chkc then return chkc:IsControler(tp) and chkc:IsLocation(LOCATION_MZONE) and c1110142.tfilter1(chkc,e,tp) end
if chk==0 then return e:GetHandler():IsCanBeSpecialSummoned(e,0,tp,false,false) and Duel.IsExistingTarget(c1110142.tfilter1,tp,LOCATION_MZONE,0,1,nil,tp) end
Duel.Hint(HINT_SELECTMSG,tp,HINTMSG_RELEASE)
local sg=Duel.SelectTarget(tp,c1110142.tfilter1,tp,LOCATION_MZONE,0,1,1,nil)
Duel.SetOperationInfo(0,CATEGORY_RELEASE,sg,1,0,LOCATION_MZONE)
Duel.SetOperationInfo(0,CATEGORY_SPECIAL_SUMMON,e:GetHandler(),1,0,LOCATION_PZONE)
end
function c1110142.op1(e,tp,eg,ep,ev,re,r,rp)
local c=e:GetHandler()
local tc=Duel.GetFirstTarget()
if not tc:IsRelateToEffect(e) then return end
if Duel.Release(tc,REASON_EFFECT)>0 and c:IsRelateToEffect(e) then
Duel.SpecialSummon(c,0,tp,tp,false,false,POS_FACEUP)
end
end
--
function c1110142.tfilter2_1(c)
return c:IsAbleToDeck()
end
function c1110142.tfilter2_2(c)
return c:IsSetCard(0x3e1f) and c:IsAbleToHand()
end
function c1110142.tg2(e,tp,eg,ep,ev,re,r,rp,chk)
if chk==0 then return Duel.IsExistingMatchingCard(c1110142.tfilter2_1,tp,LOCATION_REMOVED,0,1,nil) and Duel.IsExistingMatchingCard(c1110142.tfilter2_2,tp,LOCATION_DECK,0,1,nil) end
Duel.SetOperationInfo(0,CATEGORY_TODECK,nil,1,tp,LOCATION_REMOVED)
Duel.SetOperationInfo(0,CATEGORY_TOHAND,nil,1,tp,LOCATION_DECK)
end
function c1110142.op2(e,tp,eg,ep,ev,re,r,rp)
Duel.Hint(HINT_SELECTMSG,tp,HINTMSG_REMOVE)
local sg=Duel.SelectMatchingCard(tp,c1110142.tfilter2_1,tp,LOCATION_REMOVED,0,1,3,nil)
if sg:GetCount()<1 then return end
if Duel.SendtoDeck(sg,tp,2,REASON_EFFECT)>0 and Duel.IsExistingMatchingCard(c1110142.tfilter2_2,tp,LOCATION_DECK,0,1,nil) then
Duel.Hint(HINT_SELECTMSG,tp,HINTMSG_TOGRAVE)
local tg=Duel.SelectMatchingCard(tp,c1110142.tfilter2_2,tp,LOCATION_DECK,0,1,1,nil)
Duel.SendtoHand(tg,tp,REASON_EFFECT)
end
end
--
function c1110142.con3(e,tp,eg,ep,ev,re,r,rp)
return e:GetHandler():IsPreviousLocation(LOCATION_ONFIELD) and e:GetHandler():IsPreviousPosition(POS_FACEUP)
end
function c1110142.tg3(e,tp,eg,ep,ev,re,r,rp,chk)
if chk==0 then return e:GetHandler():IsAbleToGrave() end
Duel.SetOperationInfo(0,CATEGORY_TOGRAVE,e:GetHandler(),1,0,0)
end
function c1110142.op3(e,tp,eg,ep,ev,re,r,rp)
if not e:GetHandler():IsRelateToEffect(e) then return end
Duel.SendtoGrave(e:GetHandler(),REASON_EFFECT)
end
--
--天恸 百鸟吟
function c4114104.initial_effect(c)
--synchro summon
aux.AddSynchroMixProcedure(c,aux.Tuner(nil),nil,nil,aux.NonTuner(nil),1,1,c4114104.syncheck)
c:EnableReviveLimit()
--summon
local e1=Effect.CreateEffect(c)
e1:SetDescription(aux.Stringid(4114104,0))
e1:SetCategory(CATEGORY_DICE+CATEGORY_DECKDES)
e1:SetType(EFFECT_TYPE_SINGLE+EFFECT_TYPE_TRIGGER_O)
e1:SetProperty(EFFECT_FLAG_DAMAGE_STEP+EFFECT_FLAG_DELAY)
e1:SetCode(EVENT_SPSUMMON_SUCCESS)
e1:SetCountLimit(1,4114104)
e1:SetTarget(c4114104.target)
e1:SetOperation(c4114104.operation)
c:RegisterEffect(e1)
--tograve
local e2=Effect.CreateEffect(c)
e2:SetDescription(aux.Stringid(4114104,2))
e2:SetCategory(CATEGORY_TODECK)
e2:SetType(EFFECT_TYPE_SINGLE+EFFECT_TYPE_TRIGGER_O)
e2:SetCode(EVENT_TO_GRAVE)
e2:SetProperty(EFFECT_FLAG_DAMAGE_STEP+EFFECT_FLAG_DELAY)
e2:SetTarget(c4114104.sptg)
e2:SetOperation(c4114104.spop)
c:RegisterEffect(e2)
end
c4114104.toss_dice=true
function c4114104.syncheck(g)
return g:GetClassCount(Card.GetOriginalRace)==1
end
function c4114104.target(e,tp,eg,ep,ev,re,r,rp,chk)
if chk==0 then return true end
Duel.SetOperationInfo(0,CATEGORY_DICE,nil,0,tp,3)
end
function c4114104.operation(e,tp,eg,ep,ev,re,r,rp)
local d1,d2,d3=Duel.TossDice(tp,3)
local num_max=math.max(d1,d2,d3)
local num_min=math.min(d1,d2,d3)
local num_mid=d1+d2+d3-num_max-num_min
if not (d1==d2 and d2==d3) then num_mid=math.ceil(num_mid/2) end
Duel.DiscardDeck(tp,num_mid,REASON_EFFECT)
end
function c4114104.spfilter(c)
return c:IsSetCard(0x1141) and c:IsAbleToDeck()
end
function c4114104.sptg(e,tp,eg,ep,ev,re,r,rp,chk)
if chk==0 then return Duel.IsExistingMatchingCard(c4114104.spfilter,tp,LOCATION_GRAVE,0,2,nil) end
Duel.SetOperationInfo(0,CATEGORY_TODECK,nil,2,tp,LOCATION_GRAVE)
end
function c4114104.spop(e,tp,eg,ep,ev,re,r,rp)
Duel.Hint(HINT_SELECTMSG,tp,HINTMSG_TODECK)
local g=Duel.SelectMatchingCard(tp,c4114104.spfilter,tp,LOCATION_GRAVE,0,2,2,nil)
if g:GetCount()==2 then
Duel.ConfirmCards(1-tp,g)
Duel.SendtoDeck(g,nil,2,REASON_EFFECT)
end
end
\ No newline at end of file
--天恸 玲珑坊
function c4114107.initial_effect(c)
c:EnableReviveLimit()
--material
aux.AddLinkProcedure(c,c4114107.mfilter,1,1)
--
local e1=Effect.CreateEffect(c)
e1:SetDescription(aux.Stringid(4114107,0))
e1:SetType(EFFECT_TYPE_IGNITION)
e1:SetRange(LOCATION_MZONE)
e1:SetCountLimit(1,4114107)
e1:SetTarget(c4114107.tg)
e1:SetOperation(c4114107.op)
c:RegisterEffect(e1)
--
--[[
local e2=Effect.CreateEffect(c)
e2:SetType(EFFECT_TYPE_FIELD)
e2:SetCode(EFFECT_SSET_COST)
e2:SetRange(LOCATION_MZONE)
e2:SetTargetRange(0,0x7f)
e2:SetCost(c4114107.costchk)
e2:SetTarget(c4114107.costtg)
e2:SetOperation(c4114107.costop)
c:RegisterEffect(e2)
]]
end
function c4114107.mfilter(c)
return c:IsLevelBelow(3) and c:IsRace(RACE_FAIRY)
end
function c4114107.tg(e,tp,eg,ep,ev,re,r,rp,chk)
if chk==0 then return Duel.GetLocationCount(tp,LOCATION_SZONE)>0
and Duel.IsExistingMatchingCard(Card.IsFacedown,tp,LOCATION_SZONE,0,1,nil) end
end
function c4114107.op(e,tp,eg,ep,ev,re,r,rp)
local c=e:GetHandler()
if Duel.GetLocationCount(tp,LOCATION_SZONE)<=0 or not c:IsRelateToEffect(e) then return end
if Duel.MoveToField(c,tp,tp,LOCATION_SZONE,POS_FACEDOWN,true) then
local e1=Effect.CreateEffect(c)
e1:SetType(EFFECT_TYPE_SINGLE)
e1:SetCode(EFFECT_CHANGE_TYPE)
e1:SetProperty(EFFECT_FLAG_CANNOT_DISABLE)
e1:SetValue(TYPE_SPELL)
e1:SetReset(RESET_EVENT+RESETS_STANDARD-RESET_TURN_SET-RESET_LEAVE)
c:RegisterEffect(e1)
--Activate
local e2=Effect.CreateEffect(c)
e2:SetDescription(aux.Stringid(4114107,1))
e2:SetCategory(CATEGORY_SPECIAL_SUMMON)
e2:SetType(EFFECT_TYPE_SINGLE+EFFECT_TYPE_TRIGGER_O)
e2:SetCode(EVENT_TO_GRAVE)
e2:SetProperty(EFFECT_FLAG_DELAY+EFFECT_FLAG_DAMAGE_STEP)
e2:SetCondition(c4114107.con2)
e2:SetTarget(c4114107.tg2)
e2:SetOperation(c4114107.op2)
e2:SetReset(RESET_EVENT+RESETS_STANDARD-RESET_TOGRAVE-RESET_TURN_SET-RESET_LEAVE)
c:RegisterEffect(e2)
local g=Duel.GetMatchingGroup(Card.IsFacedown,tp,LOCATION_SZONE,0,nil)
if g:GetCount()>0 then
g:AddCard(c)
Duel.BreakEffect()
Duel.ShuffleSetCard(g)
end
end
end
function c4114107.con2(e,tp,eg,ep,ev,re,r,rp)
local c=e:GetHandler()
return c:IsPreviousPosition(POS_FACEDOWN) and c:IsPreviousLocation(LOCATION_SZONE)
and rp==1-tp and c:IsPreviousControler(tp)
end
function c4114107.tg2(e,tp,eg,ep,ev,re,r,rp,chk)
local c=e:GetHandler()
if chk==0 then return Duel.GetLocationCount(tp,LOCATION_MZONE)>0
and c:IsCanBeSpecialSummoned(e,0,tp,false,false) end
Duel.SetOperationInfo(0,CATEGORY_SPECIAL_SUMMON,c,1,nil,nil)
end
function c4114107.op2(e,tp,eg,ep,ev,re,r,rp)
local c=e:GetHandler()
if Duel.GetLocationCount(tp,LOCATION_MZONE)<=0 or not c:IsRelateToEffect(e) then return end
Duel.SpecialSummon(c,0,tp,tp,false,false,POS_FACEUP)
end
--[[
function c4114107.costchk(e,te_or_c,tp)
return true
end
function c4114107.costtg(e,te_or_c,tp)
e:SetLabelObject(te_or_c)
return true
end
function c4114107.costop(e,tp,eg,ep,ev,re,r,rp,te_or_c)
local rc=e:GetLabelObject()
Duel.ConfirmCards(1-tp,rc)
Duel.ConfirmCards(tp,rc)
end
]]
\ No newline at end of file
--
function c4114304.initial_effect(c)
--pendulum summon
aux.EnablePendulumAttribute(c)
--SetCard
local e1=Effect.CreateEffect(c)
e1:SetType(EFFECT_TYPE_SINGLE)
e1:SetCode(EFFECT_ADD_SETCODE)
e1:SetProperty(EFFECT_FLAG_SINGLE_RANGE+EFFECT_FLAG_CANNOT_DISABLE+EFFECT_FLAG_UNCOPYABLE)
e1:SetRange(LOCATION_MZONE+LOCATION_PZONE)
e1:SetValue(0x251)
c:RegisterEffect(e1)
--atk
local e2=Effect.CreateEffect(c)
e2:SetDescription(aux.Stringid(4114304,2))
e2:SetCategory(CATEGORY_ATKCHANGE)
e2:SetType(EFFECT_TYPE_IGNITION)
e2:SetProperty(EFFECT_FLAG_CARD_TARGET)
e2:SetRange(LOCATION_PZONE)
e2:SetCountLimit(1,4114304)
e2:SetTarget(c4114304.atktg)
e2:SetOperation(c4114304.atkop)
c:RegisterEffect(e2)
--set
local e3=Effect.CreateEffect(c)
e3:SetDescription(aux.Stringid(4114304,0))
e3:SetCategory(CATEGORY_TOHAND+CATEGORY_SEARCH)
e3:SetType(EFFECT_TYPE_SINGLE+EFFECT_TYPE_TRIGGER_O)
e3:SetCode(EVENT_SUMMON_SUCCESS)
e3:SetProperty(EFFECT_FLAG_DELAY)
e3:SetCountLimit(1,4114305)
e3:SetTarget(c4114304.settg)
e3:SetOperation(c4114304.setop)
c:RegisterEffect(e3)
end
function c4114304.atkfilter(c)
return c:IsType(TYPE_MONSTER) and c:IsFaceup()
end
function c4114304.atktg(e,tp,eg,ep,ev,re,r,rp,chk,chkc)
if chkc then return chkc:IsLocation(LOCATION_MZONE) and chkc:IsControler(tp) and c4114304.atkfilter(chkc) end
if chk==0 then return Duel.IsExistingTarget(c4114304.atkfilter,tp,LOCATION_MZONE,0,1,nil) end
Duel.Hint(HINT_SELECTMSG,tp,HINTMSG_TARGET)
local g=Duel.SelectTarget(tp,c4114304.atkfilter,tp,LOCATION_MZONE,0,1,1,nil)
Duel.SetOperationInfo(0,CATEGORY_ATKCHANGE,g,1,0,0)
end
function c4114304.atkop(e,tp,eg,ep,ev,re,r,rp)
local tc=Duel.GetFirstTarget()
if tc and tc:IsRelateToEffect(e) and tc:IsFaceup() then
local atk=tc:GetBaseAttack()+100
local e1=Effect.CreateEffect(c)
e1:SetType(EFFECT_TYPE_SINGLE)
e1:SetCode(EFFECT_SET_BASE_ATTACK)
e1:SetProperty(EFFECT_FLAG_SINGLE_RANGE)
e1:SetRange(LOCATION_MZONE)
e1:SetValue(atk)
e1:SetReset(RESET_EVENT+RESETS_STANDARD)
tc:RegisterEffect(e1)
end
end
function c4114304.setfilter(c)
return c:IsSetCard(0x251a,0x251b) and c:IsType(TYPE_PENDULUM) and c:IsAbleToHand()
end
function c4114304.settg(e,tp,eg,ep,ev,re,r,rp,chk)
if chk==0 then return Duel.IsExistingMatchingCard(c4114304.setfilter,tp,LOCATION_DECK,0,1,nil) end
Duel.SetOperationInfo(0,CATEGORY_TOHAND,nil,1,tp,LOCATION_DECK)
end
function c4114304.setop(e,tp,eg,ep,ev,re,r,rp)
Duel.Hint(HINT_SELECTMSG,tp,HINTMSG_ATOHAND)
local g=Duel.SelectMatchingCard(tp,c4114304.setfilter,tp,LOCATION_DECK,0,1,1,nil)
if g:GetCount()>0 then
Duel.SendtoHand(g,nil,REASON_EFFECT)
Duel.ConfirmCards(1-tp,g)
local e1=Effect.CreateEffect(e:GetHandler())
e1:SetType(EFFECT_TYPE_FIELD)
e1:SetProperty(EFFECT_FLAG_PLAYER_TARGET)
e1:SetCode(EFFECT_CANNOT_SPECIAL_SUMMON)
e1:SetReset(RESET_PHASE+PHASE_END)
e1:SetTargetRange(1,0)
e1:SetTarget(c4114304.splimit)
Duel.RegisterEffect(e1,tp)
end
end
function c4114304.splimit(e,c)
return not c:IsSetCard(0x251,0x252,0x252a) and c:IsType(TYPE_XYZ)
end
\ No newline at end of file
--兔炮支援『文森特·铃仙』
local Cardno=74562039
local cCardno=_G["c"..Cardno]
function cCardno.initial_effect(c)
--Activate
local e1=Effect.CreateEffect(c)
e1:SetDescription(aux.Stringid(Cardno,0))
e1:SetCategory(CATEGORY_SPECIAL_SUMMON)
e1:SetType(EFFECT_TYPE_ACTIVATE)
e1:SetCode(EVENT_FREE_CHAIN)
e1:SetCountLimit(1,Cardno+EFFECT_COUNT_CODE_OATH)
e1:SetTarget(cCardno.target)
e1:SetOperation(cCardno.activate)
c:RegisterEffect(e1)
--remain field
local e2=Effect.CreateEffect(c)
e2:SetType(EFFECT_TYPE_SINGLE)
e2:SetCode(EFFECT_REMAIN_FIELD)
c:RegisterEffect(e2)
end
function cCardno.cfilter(c)
return c:IsFaceup() and c:IsSetCard(0x999) and c:GetSummonLocation()==LOCATION_EXTRA
end
function cCardno.efilter(e,te)
return te:GetHandler()~=e:GetHandler() and te:GetHandlerPlayer()==e:GetHandlerPlayer()
end
function cCardno.target(e,tp,eg,ep,ev,re,r,rp,chk)
if chk==0 then return Duel.IsExistingMatchingCard(cCardno.cfilter,tp,LOCATION_MZONE,0,1,nil) end
local c=e:GetHandler()
local e1=Effect.CreateEffect(c)
e1:SetType(EFFECT_TYPE_FIELD+EFFECT_TYPE_CONTINUOUS)
e1:SetProperty(EFFECT_FLAG_CANNOT_DISABLE)
e1:SetCode(EVENT_PHASE+PHASE_END)
e1:SetCountLimit(2)
e1:SetRange(LOCATION_SZONE)
e1:SetReset(RESET_EVENT+RESETS_STANDARD)
e1:SetOperation(cCardno.endop)
c:RegisterEffect(e1,true)
local e2=Effect.CreateEffect(c)
e2:SetType(EFFECT_TYPE_SINGLE)
e2:SetProperty(EFFECT_FLAG_CANNOT_DISABLE)
e2:SetProperty(EFFECT_FLAG_SINGLE_RANGE)
e2:SetRange(LOCATION_SZONE)
e2:SetReset(RESET_EVENT+RESETS_STANDARD)
e2:SetCode(EFFECT_IMMUNE_EFFECT)
e2:SetValue(cCardno.efilter)
c:RegisterEffect(e2)
end
function cCardno.endop(e,tp,eg,ep,ev,re,r,rp)
local c=e:GetHandler()
Duel.SendtoGrave(c,REASON_RULE)
end
function cCardno.dscon(e,tp,eg,ep,ev,re,r,rp)
return e:GetHandler():GetColumnGroup():Filter(Card.IsControler,nil,1-tp):GetCount()
end
function cCardno.dsop(e,tp,eg,ep,ev,re,r,rp)
local g=e:GetHandler():GetColumnGroup():Filter(Card.IsControler,nil,1-tp)
if g:GetCount()>0 then
Duel.AdjustInstantly()
Duel.Destroy(g,REASON_EFFECT)
end
end
function cCardno.activate(e,tp,eg,ep,ev,re,r,rp)
local c=e:GetHandler()
--destroy
local e1=Effect.CreateEffect(c)
e1:SetCategory(CATEGORY_DESTROY)
e1:SetType(EFFECT_TYPE_FIELD+EFFECT_TYPE_CONTINUOUS)
e1:SetCode(EVENT_ADJUST)
e1:SetRange(LOCATION_SZONE)
e1:SetReset(RESET_EVENT+RESETS_STANDARD)
e1:SetCondition(cCardno.dscon)
e1:SetOperation(cCardno.dsop)
c:RegisterEffect(e1)
--disable
local e2=Effect.CreateEffect(c)
e2:SetType(EFFECT_TYPE_FIELD)
e2:SetCode(EFFECT_DISABLE)
e2:SetRange(LOCATION_SZONE)
e2:SetTargetRange(0,LOCATION_ONFIELD)
e2:SetReset(RESET_EVENT+RESETS_STANDARD)
e2:SetTarget(cCardno.disable)
c:RegisterEffect(e2)
local e3=e2:Clone()
e3:SetCode(EFFECT_DISABLE_EFFECT)
c:RegisterEffect(e3)
end
--disable
function cCardno.disable(e,c)
local g=e:GetHandler():GetColumnGroup()
Debug.Message(g:IsContains(c))
return g:IsContains(c)
end
--爱丽丝的怪华迷镜
function c86379275.initial_effect(c)
--Activate
local e0=Effect.CreateEffect(c)
e0:SetType(EFFECT_TYPE_ACTIVATE)
e0:SetCode(EVENT_FREE_CHAIN)
c:RegisterEffect(e0)
--toszone
local e1=Effect.CreateEffect(c)
e1:SetDescription(aux.Stringid(86379275,0))
e1:SetProperty(EFFECT_FLAG_CARD_TARGET)
e1:SetType(EFFECT_TYPE_QUICK_O)
e1:SetCode(EVENT_FREE_CHAIN)
e1:SetRange(LOCATION_SZONE)
e1:SetCountLimit(1)
e1:SetTarget(c86379275.tstg)
e1:SetOperation(c86379275.tsop)
c:RegisterEffect(e1)
--effect flag
local e4=Effect.CreateEffect(c)
e4:SetType(EFFECT_TYPE_FIELD)
e4:SetProperty(EFFECT_FLAG_PLAYER_TARGET)
e4:SetCode(86379276)
e4:SetRange(LOCATION_SZONE)
e4:SetTargetRange(1,0)
c:RegisterEffect(e4)
end
--
function c86379275.tsfilter(c)
return c:IsType(TYPE_MONSTER) and c:IsFaceup() and not c:IsType(TYPE_LINK)
end
function c86379275.tstg(e,tp,eg,ep,ev,re,r,rp,chk)
if chkc then return chkc:IsLocation(LOCATION_MZONE) and chkc:IsControler(tp) and c86379275.tsfilter(chkc) end
if chk==0 then return Duel.IsExistingTarget(c86379275.tsfilter,tp,LOCATION_MZONE,0,1,nil) and Duel.GetLocationCount(tp,LOCATION_SZONE)>0 end
Duel.Hint(HINT_SELECTMSG,tp,HINTMSG_FACEUP)
local g=Duel.SelectTarget(tp,c86379275.tsfilter,tp,LOCATION_MZONE,0,1,1,nil)
end
function c86379275.tsop(e,tp,eg,ep,ev,re,r,rp)
local c=e:GetHandler()
local tc=Duel.GetFirstTarget()
if tc and tc:IsRelateToEffect(e) and tc:IsFaceup() and not tc:IsImmuneToEffect(e) and Duel.GetLocationCount(tp,LOCATION_SZONE)>0 and tc:IsControler(tp) then
Duel.MoveToField(tc,tp,tp,LOCATION_SZONE,POS_FACEUP,true)
local e1=Effect.CreateEffect(e:GetHandler())
e1:SetCode(EFFECT_CHANGE_TYPE)
e1:SetType(EFFECT_TYPE_SINGLE)
e1:SetProperty(EFFECT_FLAG_CANNOT_DISABLE)
e1:SetReset(RESET_EVENT+0x1fc0000)
e1:SetValue(TYPE_SPELL+TYPE_CONTINUOUS)
tc:RegisterEffect(e1)
end
end
--暗符『腥幽』
require "expansions/script/nef/Gds"
function c86379488.initial_effect(c)
--
Gds.AdjustFieldInfoStore(c)
--Activate
local e1=Effect.CreateEffect(c)
e1:SetDescription(aux.Stringid(86379488,0))
e1:SetCategory(CATEGORY_POSITION+CATEGORY_SPECIAL_SUMMON)
e1:SetType(EFFECT_TYPE_ACTIVATE)
e1:SetCode(EVENT_FREE_CHAIN)
e1:SetProperty(EFFECT_FLAG_CARD_TARGET)
e1:SetTarget(c86379488.target)
e1:SetOperation(c86379488.activate)
c:RegisterEffect(e1)
--search
local e2=Effect.CreateEffect(c)
e2:SetDescription(aux.Stringid(86379488,1))
e2:SetType(EFFECT_TYPE_SINGLE+EFFECT_TYPE_TRIGGER_O)
e2:SetCode(EVENT_Goil_POS)
e2:SetProperty(EFFECT_FLAG_DELAY)
e2:SetRange(LOCATION_ONFIELD)
e2:SetCondition(c86379488.chcon)
e2:SetTarget(c86379488.chtg)
e2:SetOperation(c86379488.chop)
c:RegisterEffect(e2)
--deck
local e3=Effect.CreateEffect(c)
e3:SetDescription(aux.Stringid(86379488,2))
e3:SetCategory(CATEGORY_POSITION)
e3:SetType(EFFECT_TYPE_FIELD+EFFECT_TYPE_TRIGGER_O)
e3:SetCode(EVENT_PHASE+PHASE_END)
e3:SetProperty(EFFECT_FLAG_CARD_TARGET)
e3:SetRange(LOCATION_HAND)
e3:SetCountLimit(1,86379488)
e3:SetCondition(c86379488.spcon)
e3:SetTarget(c86379488.sptg)
e3:SetOperation(c86379488.spop)
c:RegisterEffect(e3)
end
--
function c86379488.filter(c)
return c:IsFaceup() and c:IsCanTurnSet()
end
function c86379488.target(e,tp,eg,ep,ev,re,r,rp,chk,chkc)
if chkc then return chkc:IsLocation(LOCATION_MZONE) and c86379488.filter(chkc) and chkc:IsControler(tp) end
if chk==0 then return Duel.IsExistingTarget(c86379488.filter,tp,LOCATION_MZONE,0,1,e:GetHandler())
and Duel.GetLocationCount(tp,LOCATION_MZONE)>0 and Duel.IsPlayerCanSpecialSummonMonster(tp,86379488,0,TYPES_EFFECT_TRAP_MONSTER,1000,1000,2,RACE_FIEND,ATTRIBUTE_DARK) end
Duel.Hint(HINT_SELECTMSG,tp,HINTMSG_TARGET)
local g=Duel.SelectTarget(tp,c86379488.filter,tp,LOCATION_MZONE,0,1,1,e:GetHandler())
Duel.SetOperationInfo(0,CATEGORY_POSITION,g,1,0,0)
Duel.SetOperationInfo(0,CATEGORY_SPECIAL_SUMMON,e:GetHandler(),1,0,0)
end
function c86379488.activate(e,tp,eg,ep,ev,re,r,rp)
local c=e:GetHandler()
local tc=Duel.GetFirstTarget()
if tc:IsRelateToEffect(e) and tc:IsFaceup() and tc:IsCanTurnSet() then
Duel.ChangePosition(tc,POS_FACEDOWN_DEFENSE)
if Duel.GetLocationCount(tp,LOCATION_MZONE)>0
and Duel.IsPlayerCanSpecialSummonMonster(tp,86379488,0,TYPES_EFFECT_TRAP_MONSTER,1000,1000,2,RACE_FIEND,ATTRIBUTE_DARK)
and c:IsRelateToEffect(e) then
c:AddMonsterAttribute(TYPE_EFFECT+TYPE_TRAP)
Duel.SpecialSummon(c,SUMMON_VALUE_SELF,tp,tp,true,false,POS_FACEUP)
local e3=Effect.CreateEffect(c)
e3:SetType(EFFECT_TYPE_SINGLE)
e3:SetCode(EFFECT_CHANGE_CODE)
e3:SetProperty(EFFECT_FLAG_SINGLE_RANGE+EFFECT_FLAG_CANNOT_DISABLE+EFFECT_FLAG_UNCOPYABLE)
e3:SetRange(LOCATION_MZONE)
e3:SetReset(RESET_EVENT+RESETS_STANDARD)
e3:SetValue(22001)
c:RegisterEffect(e3)
end
end
end
--
function c86379488.chcon(e,tp,eg,ep,ev,re,r,rp)
return bit.band(POS_FACEUP,ev)~=0
end
function c86379488.chtg(e,tp,eg,ep,ev,re,r,rp,chk)
if chk==0 then return e:GetHandler():IsFaceup() and e:GetHandler():IsLocation(LOCATION_ONFIELD) end
end
function c86379488.chop(e,tp,eg,ep,ev,re,r,rp)
local c=e:GetHandler()
if not c:IsRelateToEffect(e) then return end
if not c:IsFaceup() then return end
--act qp in hand
local e1=Effect.CreateEffect(c)
e1:SetType(EFFECT_TYPE_FIELD)
e1:SetCode(EFFECT_TRAP_ACT_IN_HAND)
e1:SetTarget(aux.TargetBoolFunction(Card.IsSetCard,0x610))
e1:SetTargetRange(LOCATION_HAND,0)
e1:SetReset(RESET_EVENT+RESETS_STANDARD)
Duel.RegisterEffect(e1,tp)
--act qp in hand
local e2=Effect.CreateEffect(c)
e2:SetType(EFFECT_TYPE_FIELD)
e2:SetCode(EFFECT_QP_ACT_IN_NTPHAND)
e2:SetTarget(aux.TargetBoolFunction(Card.IsSetCard,0x610))
e2:SetTargetRange(LOCATION_HAND,0)
e2:SetReset(RESET_EVENT+RESETS_STANDARD)
Duel.RegisterEffect(e2,tp)
end
--
function c86379488.spcon(e,tp,eg,ep,ev,re,r,rp)
return Duel.GetMatchingGroupCount(Card.IsType,tp,LOCATION_GRAVE,0,nil,TYPE_MONSTER)<=0
end
function c86379488.spfilter(c)
return c:IsFaceup() and c:IsCanTurnSet() and c:IsCode(22001)
end
function c86379488.sptg(e,tp,eg,ep,ev,re,r,rp,chk,chkc)
if chkc then return chkc:IsLocation(LOCATION_MZONE) and c86379488.spfilter(chkc) and chkc:IsControler(tp) end
if chk==0 then return Duel.IsExistingTarget(c86379488.spfilter,tp,LOCATION_MZONE,0,1,e:GetHandler())
and Duel.GetLocationCount(tp,LOCATION_SZONE)>0 and e:GetHandler():IsSSetable() end
Duel.Hint(HINT_SELECTMSG,tp,HINTMSG_TARGET)
local g=Duel.SelectTarget(tp,c86379488.spfilter,tp,LOCATION_MZONE,0,1,1,e:GetHandler())
Duel.SetOperationInfo(0,CATEGORY_POSITION,g,1,0,0)
end
function c86379488.spop(e,tp,eg,ep,ev,re,r,rp)
local c=e:GetHandler()
local tc=Duel.GetFirstTarget()
if tc:IsRelateToEffect(e) and tc:IsFaceup() and tc:IsCanTurnSet() then
Duel.ChangePosition(tc,POS_FACEDOWN_DEFENSE)
if Duel.GetLocationCount(tp,LOCATION_MZONE)>0
and c:IsSSetable()
and c:IsRelateToEffect(e) then
Duel.SSet(tp,c)
Duel.ConfirmCards(1-tp,c)
end
end
end
--这是一场豪赌!
function c86379498.initial_effect(c)
--Activate
local e1=Effect.CreateEffect(c)
e1:SetCategory(CATEGORY_DRAW)
e1:SetType(EFFECT_TYPE_ACTIVATE)
e1:SetCode(EVENT_FREE_CHAIN)
e1:SetTarget(c86379498.target)
e1:SetOperation(c86379498.activate)
c:RegisterEffect(e1)
end
--
function c86379498.target(e,tp,eg,ep,ev,re,r,rp,chk)
if chk==0 then return true end
end
function c86379498.activate(e,tp,eg,ep,ev,re,r,rp)
local wp=Duel.RockPaperScissors(false)
if wp==tp then Duel.Draw(tp,2,REASON_EFFECT) end
if wp==1-tp then Duel.Draw(1-tp,2,REASON_EFFECT) end
end
--赫密斯密契✿神绮
function c86379564.initial_effect(c)
aux.EnablePendulumAttribute(c)
--search
local e1=Effect.CreateEffect(c)
e1:SetDescription(aux.Stringid(86379564,0))
e1:SetType(EFFECT_TYPE_QUICK_O)
e1:SetCode(EVENT_FREE_CHAIN)
e1:SetRange(LOCATION_PZONE)
e1:SetCountLimit(1,86379564)
e1:SetCost(c86379564.pcost)
e1:SetTarget(c86379564.ptg)
e1:SetOperation(c86379564.pop)
c:RegisterEffect(e1)
--extra
local e2=Effect.CreateEffect(c)
e2:SetCategory(CATEGORY_TOHAND+CATEGORY_DESTROY+CATEGORY_DAMAGE+CATEGORY_RELEASE)
e2:SetType(EFFECT_TYPE_FIELD+EFFECT_TYPE_TRIGGER_O)
e2:SetCode(EVENT_ATTACK_ANNOUNCE)
e2:SetRange(LOCATION_EXTRA)
e2:SetCondition(c86379564.excon)
e2:SetCost(c86379564.excost)
e2:SetTarget(c86379564.extg)
e2:SetOperation(c86379564.exop)
c:RegisterEffect(e2)
end
--
function c86379564.pcost(e,tp,eg,ep,ev,re,r,rp,chk)
if chk==0 then return e:GetHandler():IsReleasable() end
Duel.Release(e:GetHandler(),REASON_COST)
end
function c86379564.pfilter(c,tp)
return c:IsType(TYPE_CONTINUOUS) and c:IsType(TYPE_SPELL)
and c:IsSetCard(0x150) and c:GetActivateEffect():IsActivatable(tp)
end
function c86379564.ptg(e,tp,eg,ep,ev,re,r,rp,chk)
if chk==0 then return Duel.IsExistingMatchingCard(c86379564.pfilter,tp,LOCATION_DECK+LOCATION_GRAVE,0,1,nil,tp) end
end
function c86379564.pop(e,tp,eg,ep,ev,re,r,rp)
if Duel.GetLocationCount(tp,LOCATION_SZONE)<=0 then return end
Duel.Hint(HINT_SELECTMSG,tp,HINTMSG_SELF)
local g=Duel.SelectMatchingCard(tp,c86379564.pfilter,tp,LOCATION_DECK+LOCATION_GRAVE,0,1,1,nil,tp)
if g:GetCount()>0 then
local tc=g:GetFirst()
Duel.MoveToField(tc,tp,tp,LOCATION_SZONE,POS_FACEUP,true)
Duel.RaiseEvent(tc,EVENT_CHAIN_SOLVED,tc:GetActivateEffect(),0,tp,tp,Duel.GetCurrentChain())
end
end
--
function c86379564.excon(e,tp,eg,ep,ev,re,r,rp)
local at=Duel.GetAttacker()
local st=e:GetHandler():GetSequence()
local ct=Duel.GetFieldGroupCount(tp,LOCATION_EXTRA,0)-1
return at:GetControler()~=tp and st==ct
end
function c86379564.sqfilter(c)
return c:IsSetCard(0x299) and c:IsType(TYPE_PENDULUM) and c:IsFaceup() and c:IsAbleToRemoveAsCost()
end
function c86379564.excost(e,tp,eg,ep,ev,re,r,rp,chk)
if chk==0 then return Duel.IsExistingMatchingCard(c86379564.sqfilter,tp,LOCATION_EXTRA,0,1,e:GetHandler()) end
local g=Duel.GetMatchingGroup(c86379564.sqfilter,tp,LOCATION_EXTRA,0,e:GetHandler())
Duel.Hint(HINT_SELECTMSG,tp,HINTMSG_REMOVE)
local rg=g:SelectSubGroup(tp,aux.TRUE,false,1,#g)
if Duel.Remove(rg,POS_FACEUP,REASON_COST+REASON_TEMPORARY)>0 then
local og=Duel.GetOperatedGroup()
og:KeepAlive()
local oc=og:GetFirst()
while oc do
oc:RegisterFlagEffect(86379564,RESET_EVENT+0x1fe0000,0,1)
oc=og:GetNext()
end
local e1=Effect.CreateEffect(e:GetHandler())
e1:SetType(EFFECT_TYPE_FIELD+EFFECT_TYPE_CONTINUOUS)
e1:SetCode(EVENT_CHAIN_END)
e1:SetReset(EVENT_CHAIN_END)
e1:SetLabelObject(og)
e1:SetCountLimit(1)
e1:SetOperation(c86379564.reop)
Duel.RegisterEffect(e1,tp)
end
end
function c86379564.reop(e,tp,eg,ep,ev,re,r,rp)
local g=e:GetLabelObject()
local tc=g:GetFirst()
local sg=Group.CreateGroup()
while tc do
if tc:GetFlagEffect(86379564)>0 and tc:IsLocation(LOCATION_REMOVED) then
sg:AddCard(tc)
end
tc=g:GetNext()
end
if sg:GetCount()>0 then
Duel.SendtoExtraP(sg,nil,REASON_RULE)
end
end
function c86379564.exfilter(c)
return c:IsReleasable()
end
function c86379564.extg(e,tp,eg,ep,ev,re,r,rp,chk)
if chk==0 then return Duel.GetAttacker():IsOnField() and Duel.IsExistingMatchingCard(c86379564.exfilter,tp,LOCATION_PZONE,0,1,nil) end
Duel.SetOperationInfo(0,CATEGORY_RELEASE,nil,1,0,0)
Duel.SetOperationInfo(0,CATEGORY_TOHAND,e:GetHandler(),1,0,0)
--
local e1=Effect.CreateEffect(e:GetHandler())
e1:SetType(EFFECT_TYPE_FIELD+EFFECT_TYPE_CONTINUOUS)
e1:SetCode(EVENT_CHAIN_SOLVED)
e1:SetOperation(c86379564.thop)
e1:SetReset(RESET_CHAIN)
e1:SetLabelObject(e:GetHandler())
Duel.RegisterEffect(e1,tp)
e:GetHandler():RegisterFlagEffect(86379565,RESET_EVENT+0x1fe0000,0,1)
end
function c86379564.thop(e,tp,eg,ep,ev,re,r,rp)
local tc=e:GetLabelObject()
if tc:GetFlagEffect(86379565)>0 and tc:IsAbleToHand() then
Duel.SendtoHand(tc,nil,REASON_EFFECT)
end
end
function c86379564.exop(e,tp,eg,ep,ev,re,r,rp)
local c=e:GetHandler()
Duel.Hint(HINT_SELECTMSG,tp,HINTMSG_RELEASE)
local g=Duel.SelectMatchingCard(tp,c86379564.exfilter,tp,LOCATION_PZONE,0,1,1,nil)
if g:GetCount()<=0 then return end
local tc=g:GetFirst()
local ac=Duel.GetAttacker()
local a1=ac:GetAttack()
local a2=tc:GetAttack()
Duel.Release(g,REASON_COST)
local at=0
if a1<=a2 then at=a2-a1 end
if Duel.NegateAttack() then
local att=math.abs(a2-a1)
if Duel.Destroy(ac,REASON_BATTLE) then
Duel.Damage(1-tp,att,REASON_BATTLE)
end
--[[if a1<=a2 then
Duel.Destroy(ac,REASON_BATTLE)
end
if a1<a2 then
Duel.Damage(1-tp,at,REASON_BATTLE)
end]]
end
end
--OFFside☆警备员-diyusi
function c99999501.initial_effect(c)
--c:SetSPSummonOnce(99999501)
--link summon
--c99999501.AddLinkProcedure(c,c99999501.matfilter,1,1)
--c:EnableReviveLimit()
--tohand
local e1=Effect.CreateEffect(c)
e1:SetDescription(aux.Stringid(99999501,0))
e1:SetCategory(CATEGORY_HANDES)
e1:SetProperty(EFFECT_FLAG_CARD_TARGET+EFFECT_FLAG_DAMAGE_STEP)
e1:SetType(EFFECT_TYPE_SINGLE+EFFECT_TYPE_TRIGGER_O)
e1:SetCode(EVENT_SUMMON_SUCCESS)
e1:SetCountLimit(1,99999501)
e1:SetTarget(c99999501.thtg)
e1:SetOperation(c99999501.thop)
c:RegisterEffect(e1)
local e2=e1:Clone()
e2:SetCode(EVENT_SPSUMMON_SUCCESS)
c:RegisterEffect(e2)
end
function c99999501.matfilter(c,lc,sumtype,tp)
return c:IsLinkSetCard(0x6910)
end
function c99999501.thfilter(c)
return c:IsSetCard(0x6910) and c:IsType(TYPE_SPELL) and c:IsSSetable()
end
function c99999501.thtg(e,tp,eg,ep,ev,re,r,rp,chk)
if chk==0 then return Duel.IsExistingMatchingCard(Card.IsDiscardable,tp,LOCATION_HAND,0,1,nil)
and Duel.IsExistingMatchingCard(c99999501.thfilter,tp,LOCATION_DECK,0,1,nil) end
Duel.SetOperationInfo(0,CATEGORY_HANDES,nil,1,tp,1)
end
function c99999501.thop(e,tp,eg,ep,ev,re,r,rp)
local c=e:GetHandler()
Duel.Hint(HINT_SELECTMSG,tp,HINTMSG_DISCARD)
local g1=Duel.SelectMatchingCard(tp,Card.IsDiscardable,tp,LOCATION_HAND,0,1,1,nil)
if g1:GetCount()>0 then
Duel.SendtoGrave(g1,REASON_EFFECT+REASON_DISCARD)
local tc=g1:GetFirst()
if tc:IsSetCard(0xa910) and c:IsRelateToEffect(e) and c:IsFaceup() then
c:RegisterFlagEffect(99999501,RESET_EVENT+RESETS_STANDARD+RESET_PHASE+PHASE_END,EFFECT_FLAG_CLIENT_HINT,1,0,aux.Stringid(99999501,1))
end
Duel.Hint(HINT_SELECTMSG,tp,HINTMSG_SET)
local g2=Duel.SelectMatchingCard(tp,c99999501.thfilter,tp,LOCATION_DECK,0,1,1,nil)
if g2:GetCount()>0 then
Duel.SSet(tp,g2:GetFirst())
end
end
end
function c99999501.AddLinkProcedure(c,f,min,max,gf)
if max==nil then max=c:GetLink() end
local e1=Effect.CreateEffect(c)
e1:SetDescription(1166)
e1:SetType(EFFECT_TYPE_FIELD)
e1:SetCode(EFFECT_SPSUMMON_PROC)
e1:SetProperty(EFFECT_FLAG_CANNOT_DISABLE+EFFECT_FLAG_UNCOPYABLE)
e1:SetRange(LOCATION_EXTRA)
e1:SetCondition(c99999501.LinkCondition(f,min,max,gf))
e1:SetTarget(c99999501.LinkTarget(f,min,max,gf))
e1:SetOperation(aux.LinkOperation(f,min,max,gf))
e1:SetValue(SUMMON_TYPE_LINK)
c:RegisterEffect(e1)
return e1
end
function c99999501.GetLinkCount(c)
local lv=1
if c:IsType(TYPE_LINK) and c:GetLink()>1 then lv=c:GetLink() end
if c:GetFlagEffect(99999501)>0 then lv=2 end
if lv>1 then
return 1+0x10000*lv
else return 1 end
end
function c99999501.LCheckGoal(sg,tp,lc,gf,lmat)
return sg:CheckWithSumEqual(c99999501.GetLinkCount,lc:GetLink(),#sg,#sg)
and Duel.GetLocationCountFromEx(tp,tp,sg,lc)>0 and (not gf or gf(sg,lc,tp))
and not sg:IsExists(aux.LUncompatibilityFilter,1,nil,sg,lc,tp)
and (not lmat or sg:IsContains(lmat))
end
function c99999501.LinkCondition(f,minct,maxct,gf)
return function(e,c,og,lmat,min,max)
if c==nil then return true end
if c:IsType(TYPE_PENDULUM) and c:IsFaceup() then return false end
local minc=minct
local maxc=maxct
if min then
if min>minc then minc=min end
if max<maxc then maxc=max end
if minc>maxc then return false end
end
local tp=c:GetControler()
local mg=nil
if og then
mg=og:Filter(aux.LConditionFilter,nil,f,c,e)
else
mg=aux.GetLinkMaterials(tp,f,c,e)
end
if lmat~=nil then
if not aux.LConditionFilter(lmat,f,c,e) then return false end
mg:AddCard(lmat)
end
local fg=Duel.GetMustMaterial(tp,EFFECT_MUST_BE_LMATERIAL)
if fg:IsExists(aux.MustMaterialCounterFilter,1,nil,mg) then return false end
Duel.SetSelectedCard(fg)
return mg:CheckSubGroup(c99999501.LCheckGoal,minc,maxc,tp,c,gf,lmat)
end
end
function c99999501.LinkTarget(f,minct,maxct,gf)
return function(e,tp,eg,ep,ev,re,r,rp,chk,c,og,lmat,min,max)
local minc=minct
local maxc=maxct
if min then
if min>minc then minc=min end
if max<maxc then maxc=max end
if minc>maxc then return false end
end
local mg=nil
if og then
mg=og:Filter(aux.LConditionFilter,nil,f,c,e)
else
mg=aux.GetLinkMaterials(tp,f,c,e)
end
if lmat~=nil then
if not aux.LConditionFilter(lmat,f,c,e) then return false end
mg:AddCard(lmat)
end
local fg=Duel.GetMustMaterial(tp,EFFECT_MUST_BE_LMATERIAL)
Duel.SetSelectedCard(fg)
Duel.Hint(HINT_SELECTMSG,tp,HINTMSG_LMATERIAL)
local cancel=Duel.IsSummonCancelable()
local sg=mg:SelectSubGroup(tp,c99999501.LCheckGoal,cancel,minc,maxc,tp,c,gf,lmat)
if sg then
sg:KeepAlive()
e:SetLabelObject(sg)
return true
else return false end
end
end
\ No newline at end of file
--✿梅莉与莲子的连结✿
function c99999604.initial_effect(c)
--link summon
aux.AddLinkProcedure(c,c99999604.mfilter,2)
c:EnableReviveLimit()
--to deck
local e1=Effect.CreateEffect(c)
e1:SetDescription(aux.Stringid(99999604,0))
e1:SetCategory(CATEGORY_TODECK+CATEGORY_GRAVE_ACTION)
e1:SetType(EFFECT_TYPE_TRIGGER_O+EFFECT_TYPE_SINGLE)
e1:SetProperty(EFFECT_FLAG_DELAY)
e1:SetCode(EVENT_SPSUMMON_SUCCESS)
e1:SetCountLimit(1,99999604)
e1:SetCondition(c99999604.thcon)
e1:SetTarget(c99999604.thtg)
e1:SetOperation(c99999604.thop)
c:RegisterEffect(e1)
--
local e2=Effect.CreateEffect(c)
e2:SetDescription(aux.Stringid(99999604,4))
e2:SetType(EFFECT_TYPE_QUICK_O)
e2:SetCode(EVENT_CHAINING)
e2:SetRange(LOCATION_MZONE)
e2:SetCountLimit(1)
e2:SetCondition(c99999604.chcon)
e2:SetTarget(c99999604.chtg)
e2:SetOperation(c99999604.chop)
c:RegisterEffect(e2)
--cannot target
local e3=Effect.CreateEffect(c)
e3:SetType(EFFECT_TYPE_SINGLE)
e3:SetProperty(EFFECT_FLAG_SINGLE_RANGE)
e3:SetCode(EFFECT_CANNOT_BE_EFFECT_TARGET)
e3:SetRange(LOCATION_MZONE)
e3:SetValue(aux.tgoval)
c:RegisterEffect(e3)
end
function c99999604.mfilter(c)
return c:IsLinkSetCard(0xa211,0xc211)
end
function c99999604.thfilter(c)
return c:IsAbleToDeck()
end
function c99999604.thcon(e,tp,eg,ep,ev,re,r,rp)
return e:GetHandler():IsSummonType(SUMMON_TYPE_LINK)
end
function c99999604.thtg(e,tp,eg,ep,ev,re,r,rp,chk)
if chk==0 then return Duel.IsExistingMatchingCard(c99999604.thfilter,tp,LOCATION_GRAVE+LOCATION_REMOVED,0,1,nil) end
Duel.SetOperationInfo(0,CATEGORY_TODECK,nil,nil,tp,LOCATION_GRAVE+LOCATION_REMOVED)
end
function c99999604.thop(e,tp,eg,ep,ev,re,r,rp)
local c=e:GetHandler()
local b1=Duel.IsExistingMatchingCard(c99999604.thfilter,tp,LOCATION_GRAVE,0,1,nil)
local b2=Duel.IsExistingMatchingCard(c99999604.thfilter,tp,LOCATION_REMOVED,0,1,nil)
if not (b1 or b2) then return end
local op=aux.SelectFromOptions(tp,{b1,aux.Stringid(99999604,1)},{b2,aux.Stringid(99999604,2)})
local loc=0
if op==1 then loc=LOCATION_GRAVE end
if op==2 then loc=LOCATION_REMOVED end
local g=Duel.GetMatchingGroup(c99999604.thfilter,tp,loc,0,nil)
if g:GetCount()>0 then
Duel.SendtoDeck(g,nil,SEQ_DECKSHUFFLE,REASON_EFFECT)
if c:IsFaceup() and c:IsRelateToEffect(e) then
c:RegisterFlagEffect(99999604,RESET_EVENT+RESETS_STANDARD,EFFECT_FLAG_CLIENT_HINT,1,0,aux.Stringid(99999604,3))
end
end
end
function c99999604.chcon(e,tp,eg,ep,ev,re,r,rp)
return rp==1-tp and e:GetHandler():GetFlagEffect(99999604)>0
end
function c99999604.chtg(e,tp,eg,ep,ev,re,r,rp,chk)
if chk==0 then return Duel.IsExistingMatchingCard(aux.TRUE,rp,0,LOCATION_DECK,1,nil) end
end
function c99999604.chop(e,tp,eg,ep,ev,re,r,rp)
local g=Group.CreateGroup()
Duel.ChangeTargetCard(ev,g)
Duel.ChangeChainOperation(ev,c99999604.repop)
end
function c99999604.repop(e,tp,eg,ep,ev,re,r,rp)
local g=Duel.GetFieldGroup(1-tp,LOCATION_DECK,0)
if g:GetCount()>0 then
local sg=g:RandomSelect(1-tp,1)
Duel.Destroy(sg,REASON_EFFECT)
end
end
\ No newline at end of file
--秘封『燕石博物志』
function c99999605.initial_effect(c)
--Activate
local e1=Effect.CreateEffect(c)
e1:SetDescription(aux.Stringid(99999605,0))
e1:SetCategory(CATEGORY_TOHAND+CATEGORY_SEARCH)
e1:SetType(EFFECT_TYPE_ACTIVATE)
e1:SetCode(EVENT_FREE_CHAIN)
e1:SetCountLimit(1,99999603+EFFECT_COUNT_CODE_DUEL+EFFECT_COUNT_CODE_OATH)
e1:SetCost(c99999605.cost)
e1:SetTarget(c99999605.target)
e1:SetOperation(c99999605.activate)
c:RegisterEffect(e1)
--remove
local e2=Effect.CreateEffect(c)
e2:SetDescription(aux.Stringid(99999605,1))
e2:SetCategory(CATEGORY_TOHAND)
e2:SetType(EFFECT_TYPE_SINGLE+EFFECT_TYPE_TRIGGER_O)
e2:SetCode(EVENT_REMOVE)
e2:SetProperty(EFFECT_FLAG_DELAY)
e2:SetCountLimit(1,99999605)
e2:SetTarget(c99999605.thtg)
e2:SetOperation(c99999605.thop)
c:RegisterEffect(e2)
end
function c99999605.cost(e,tp,eg,ep,ev,re,r,rp,chk)
local c=e:GetHandler()
if chk==0 then return Duel.IsExistingMatchingCard(Card.IsDiscardable,tp,LOCATION_HAND,0,1,c) end
Duel.DiscardHand(tp,Card.IsDiscardable,1,1,REASON_COST+REASON_DISCARD,nil)
end
function c99999605.filter(c)
return c:IsSetCard(0x211) and c:IsAbleToHand()
end
function c99999605.target(e,tp,eg,ep,ev,re,r,rp,chk)
if chk==0 then return Duel.IsExistingMatchingCard(c99999605.filter,tp,LOCATION_DECK,0,1,nil) end
Duel.SetOperationInfo(0,CATEGORY_TOHAND,nil,1,tp,LOCATION_DECK)
end
function c99999605.activate(e,tp,eg,ep,ev,re,r,rp)
Duel.Hint(HINT_SELECTMSG,tp,HINTMSG_ATOHAND)
local g=Duel.SelectMatchingCard(tp,c99999605.filter,tp,LOCATION_DECK,0,1,1,nil)
if g:GetCount()>0 then
Duel.SendtoHand(g,nil,REASON_EFFECT)
Duel.ConfirmCards(1-tp,g)
end
end
function c99999605.thtg(e,tp,eg,ep,ev,re,r,rp,chk)
if chk==0 then return e:GetHandler():IsAbleToHand() end
Duel.SetOperationInfo(0,CATEGORY_TOHAND,e:GetHandler(),1,0,0)
end
function c99999605.thop(e,tp,eg,ep,ev,re,r,rp)
local c=e:GetHandler()
if c:IsRelateToEffect(e) and c:IsAbleToHand() then
Duel.SendtoHand(c,nil,REASON_EFFECT)
Duel.ConfirmCards(1-tp,c)
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