Commit 3693bbcd authored by Momobako's avatar Momobako

Push by Appveyor

parent 781b16e3
No preview for this file type
--永远鲜红的幼月
function c1151001.initial_effect(c)
--
local e0=Effect.CreateEffect(c)
e0:SetType(EFFECT_TYPE_FIELD)
e0:SetCode(EFFECT_SPSUMMON_PROC_G)
e0:SetProperty(EFFECT_FLAG_UNCOPYABLE+EFFECT_FLAG_CANNOT_DISABLE+EFFECT_FLAG_IGNORE_IMMUNE)
e0:SetRange(LOCATION_MZONE)
e0:SetCondition(c1151001.con0)
e0:SetOperation(c1151001.op0)
e0:SetValue(SUMMON_TYPE_SYNCHRO)
c:RegisterEffect(e0)
--
local e1=Effect.CreateEffect(c)
e1:SetDescription(aux.Stringid(1151001,0))
e1:SetCategory(CATEGORY_TOHAND+CATEGORY_SEARCH)
e1:SetType(EFFECT_TYPE_FIELD+EFFECT_TYPE_TRIGGER_O)
e1:SetCode(EVENT_SUMMON_SUCCESS)
e1:SetProperty(EFFECT_FLAG_DELAY)
e1:SetRange(LOCATION_MZONE)
e1:SetCountLimit(1,1151001)
e1:SetCondition(c1151001.con1)
e1:SetTarget(c1151001.tg1)
e1:SetOperation(c1151001.op1)
c:RegisterEffect(e1)
local e1_1=e1:Clone()
e1_1:SetCode(EVENT_SPSUMMON_SUCCESS)
c:RegisterEffect(e1_1)
--
end
--
c1151001.named_with_Leimi=1
function c1151001.IsLeimi(c)
local m=_G["c"..c:GetCode()]
return m and m.named_with_Leimi
end
function c1151001.IsLeisp(c)
return c.named_with_Leisp
end
--
function c1151001.CheckGroupRecursive(c,sg,g,f,min,max,ext_params)
sg:AddCard(c)
local ct=sg:GetCount()
local res=(ct>=min and f(sg,table.unpack(ext_params)))
or (ct<max and g:IsExists(c1151001.CheckGroupRecursive,1,sg,sg,g,f,min,max,ext_params))
sg:RemoveCard(c)
return res
end
function c1151001.CheckGroup(g,f,cg,min,max,...)
local min=min or 1
local max=max or g:GetCount()
if min>max then return false end
local ext_params={...}
local sg=Group.CreateGroup()
if cg then sg:Merge(cg) end
local ct=sg:GetCount()
if ct>=min and ct<max and f(sg,...) then return true end
return g:IsExists(c1151001.CheckGroupRecursive,1,sg,sg,g,f,min,max,ext_params)
end
function c1151001.SelectGroup(tp,desc,g,f,cg,min,max,...)
local min=min or 1
local max=max or g:GetCount()
local ext_params={...}
local sg=Group.CreateGroup()
if cg then
sg:Merge(cg)
end
local ct=sg:GetCount()
local ag=g:Filter(c1151001.CheckGroupRecursive,sg,sg,g,f,min,max,ext_params)
while ct<max and ag:GetCount()>0 do
local minc=1
local finish=(ct>=min and f(sg,...))
if finish then minc=0 end
Duel.Hint(HINT_SELECTMSG,tp,desc)
local tg=ag:Select(tp,minc,1,nil)
if tg:GetCount()==0 then break end
sg:Merge(tg)
ct=sg:GetCount()
ag=g:Filter(c1151001.CheckGroupRecursive,sg,sg,g,f,min,max,ext_params)
end
return sg
end
--
function c1151001.cfilter0_1(c, syncard)
if c:IsType(TYPE_XYZ) then
return c:GetRank()
else
return c:GetSynchroLevel(syncard)
end
end
--
function c1151001.goal(g,tp,syncard)
local ct=g:GetCount()
return g:CheckWithSumEqual(c1151001.cfilter0_1,syncard:GetLevel(),ct,ct,syncard) and Duel.GetLocationCountFromEx(tp,tp,g,syncard)>0
end
--
function c1151001.cfilter0(c,tp,mg,turner,e)
return c:IsRace(RACE_FIEND) and c:IsType(TYPE_SYNCHRO) and c:IsCanBeSpecialSummoned(e,SUMMON_TYPE_SYNCHRO,tp,true,false) and c1151001.CheckGroup(mg,c1151001.goal,Group.FromCards(turner),2,63,tp,c)
end
--
function c1151001.con0(e,c,og)
if c==nil then return true end
local tp=c:GetControler()
local mg=Duel.GetMatchingGroup(c1151001.ofilter0,tp,LOCATION_MZONE,0,c)
return Duel.IsExistingMatchingCard(c1151001.cfilter0,tp,LOCATION_EXTRA,0,1,nil,tp,mg,c,e)
end
--
function c1151001.ofilter0(c)
return c:IsFaceup() and c:IsRace(RACE_FIEND)
end
function c1151001.op0(e,tp,eg,ep,ev,re,r,rp,c,sg,og)
local tp=c:GetControler()
local g=Duel.GetMatchingGroup(c1151001.ofilter0,tp,LOCATION_MZONE,0,c)
local syncG=Duel.SelectMatchingCard(tp,c1151001.cfilter0,tp,LOCATION_EXTRA,0,1,1,nil,tp,g,c,e)
if syncG:GetCount()<1 then return end
sg:Merge(syncG)
local sync=syncG:GetFirst()
local mg=c1151001.SelectGroup(tp,HINTMSG_TOGRAVE,g,c1151001.goal,Group.FromCards(c),2,63,tp,sync)
sync:SetMaterial(mg)
Duel.SendtoGrave(mg,REASON_MATERIAL+REASON_SYNCHRO)
sync:CompleteProcedure()
end
--
function c1151001.cfilter1(c,e,tp)
return c:IsFaceup()
end
function c1151001.con1(e,tp,eg,ep,ev,re,r,rp)
return eg:IsExists(c1151001.cfilter1,1,e:GetHandler(),e,tp)
end
--
function c1151001.tfilter1(c)
return c1151001.IsLeisp(c) and c:IsAbleToHand()
end
function c1151001.tg1(e,tp,eg,ep,ev,re,r,rp,chk)
if chk==0 then return Duel.IsExistingMatchingCard(c1151001.tfilter1,tp,LOCATION_DECK,0,1,nil) end
Duel.SetOperationInfo(0,CATEGORY_TOHAND,nil,1,tp,LOCATION_DECK)
end
--
function c1151001.op1(e,tp,eg,ep,ev,re,r,rp)
Duel.Hint(HINT_SELECTMSG,tp,HINTMSG_ATOHAND)
local g=Duel.SelectMatchingCard(tp,c1151001.tfilter1,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 c1151003.initial_effect(c)
--
local e1=Effect.CreateEffect(c)
e1:SetCategory(CATEGORY_SPECIAL_SUMMON)
e1:SetType(EFFECT_TYPE_FIELD+EFFECT_TYPE_TRIGGER_O)
e1:SetProperty(EFFECT_FLAG_DELAY+EFFECT_FLAG_DAMAGE_STEP)
e1:SetCode(EVENT_RELEASE)
e1:SetRange(LOCATION_HAND+LOCATION_GRAVE)
e1:SetCountLimit(1,1151003)
e1:SetCondition(c1151003.con1)
e1:SetTarget(c1151003.tg1)
e1:SetOperation(c1151003.op1)
c:RegisterEffect(e1)
--
local e2=Effect.CreateEffect(c)
e2:SetDescription(aux.Stringid(1151003,0))
e2:SetType(EFFECT_TYPE_QUICK_O)
e2:SetRange(LOCATION_MZONE)
e2:SetCode(EVENT_FREE_CHAIN)
e2:SetCountLimit(1,1151004)
e2:SetCost(c1151003.cost2)
e2:SetTarget(c1151003.tg2)
e2:SetOperation(c1151003.op2)
c:RegisterEffect(e2)
--
end
--
c1151003.named_with_Leimi=1
function c1151003.IsLeimi(c)
local m=_G["c"..c:GetCode()]
return m and m.named_with_Leimi
end
function c1151003.IsLeisp(c)
local m=_G["c"..c:GetCode()]
return c.named_with_Leisp
end
--
function c1151003.cfilter1(c,tp)
return c:IsPreviousLocation(LOCATION_MZONE) and c:GetPreviousControler()==tp
end
function c1151003.con1(e,tp,eg,ep,ev,re,r,rp)
return eg:IsExists(c1151003.cfilter1,1,nil,tp)
end
--
function c1151003.tg1(e,tp,eg,ep,ev,re,r,rp,chk)
if chk==0 then return Duel.GetMZoneCount(tp)>0 and e:GetHandler():IsCanBeSpecialSummoned(e,0,tp,false,false) end
Duel.SetOperationInfo(0,CATEGORY_SPECIAL_SUMMON,e:GetHandler(),1,0,0)
end
--
function c1151003.op1(e,tp,eg,ep,ev,re,r,rp)
local c=e:GetHandler()
if c:IsRelateToEffect(e) then
if Duel.SpecialSummon(c,0,tp,tp,false,false,POS_FACEUP)~=0 and Duel.GetMZoneCount(tp)>0 and Duel.IsPlayerCanSpecialSummonMonster(tp,1151997,0,0x4011,200,200,1,RACE_FIEND,ATTRIBUTE_DARK) then
local token=Duel.CreateToken(tp,1151997)
Duel.SpecialSummon(token,0,tp,tp,false,false,POS_FACEUP)
end
end
end
--
function c1151003.cfilter2(c)
return c1151003.IsLeisp(c) and c:IsType(TYPE_SPELL) and c:CheckActivateEffect(true,false,false)~=nil and c:IsLocation(LOCATION_GRAVE) and c:IsAbleToRemoveAsCost()
end
function c1151003.cost2(e,tp,eg,ep,ev,re,r,rp,chk)
if chk==0 then return Duel.IsExistingMatchingCard(c1151003.cfilter2,tp,LOCATION_GRAVE,0,1,nil) end
Duel.Hint(HINT_SELECTMSG,tp,HINTMSG_REMOVE)
local g=Duel.SelectMatchingCard(tp,c1151003.cfilter2,tp,LOCATION_GRAVE,0,1,1,nil)
local rtc=g:GetFirst()
if rtc:IsLocation(LOCATION_GRAVE) then
Duel.Remove(rtc,POS_FACEUP,REASON_COST)
end
e:SetLabelObject(rtc)
end
--
function c1151003.tg2(e,tp,eg,ep,ev,re,r,rp,chk,chkc)
if chk==0 then return true end
e:SetProperty(EFFECT_FLAG_CARD_TARGET)
e:SetCategory(0)
Duel.Hint(HINT_SELECTMSG,tp,HINTMSG_TARGET)
local rtc=e:GetLabelObject()
local te=rtc:CheckActivateEffect(true,true,false)
Duel.ClearTargetCard()
rtc:CreateEffectRelation(e)
e:SetLabelObject(te)
local tg=te:GetTarget()
e:SetCategory(te:GetCategory())
e:SetProperty(te:GetProperty())
if tg then tg(te,tp,eg,ep,ev,re,r,rp,1) end
local cg=Duel.GetChainInfo(0,CHAININFO_TARGET_CARDS)
if not cg then return end
local tc=cg:GetFirst()
while tc do
tc:CreateEffectRelation(te)
tc=cg:GetNext()
end
end
--
function c1151003.op2(e,tp,eg,ep,ev,re,r,rp)
local te=e:GetLabelObject()
if te:GetHandler():IsRelateToEffect(e) then
local cost=te:GetCost()
if cost then
if cost(e,tp,eg,ep,ev,re,r,rp,0)==false then return end
cost(e,tp,eg,ep,ev,re,r,rp,chk)
end
local op=te:GetOperation()
if op then op(te,tp,eg,ep,ev,re,r,rp) end
local cg=Duel.GetChainInfo(0,CHAININFO_TARGET_CARDS)
if not cg then return end
local tc=cg:GetFirst()
while tc do
tc:ReleaseEffectRelation(te)
tc=cg:GetNext()
end
end
end
\ No newline at end of file
--浓雾的吸血鬼·蕾米莉亚
function c1151005.initial_effect(c)
--
local e1=Effect.CreateEffect(c)
e1:SetCategory(CATEGORY_RECOVER+CATEGORY_COUNTER)
e1:SetType(EFFECT_TYPE_SINGLE+EFFECT_TYPE_TRIGGER_O)
e1:SetProperty(EFFECT_FLAG_DELAY)
e1:SetCode(EVENT_RELEASE)
e1:SetCountLimit(1,1151005)
e1:SetTarget(c1151005.tg1)
e1:SetOperation(c1151005.op1)
c:RegisterEffect(e1)
--
local e2=Effect.CreateEffect(c)
e2:SetProperty(EFFECT_FLAG_CARD_TARGET)
e2:SetType(EFFECT_TYPE_IGNITION)
e2:SetRange(LOCATION_MZONE)
e2:SetCountLimit(1,1151006)
e2:SetTarget(c1151005.tg2)
e2:SetOperation(c1151005.op2)
c:RegisterEffect(e2)
end
--
c1151005.named_with_Leimi=1
function c1151005.IsLeimi(c)
local m=_G["c"..c:GetCode()]
return m and m.named_with_Leimi
end
function c1151005.IsLeisp(c)
local m=_G["c"..c:GetCode()]
return c.named_with_Leisp
end
--
function c1151005.tfilter1(c)
return c:IsAbleToHand() and c1151005.IsLeimi(c)
end
function c1151005.tg1(e,tp,eg,ep,ev,re,r,rp,chk)
if chk==0 then return Duel.IsExistingMatchingCard(c1151005.tfilter1,tp,LOCATION_DECK,0,1,nil) end
Duel.SetOperationInfo(0,CATEGORY_TOHAND,nil,1,tp,LOCATION_DECK)
end
--
function c1151005.op1(e,tp,eg,ep,ev,re,r,rp)
Duel.Hint(HINT_SELECTMSG,tp,HINTMSG_ATOHAND)
local g=Duel.SelectMatchingCard(tp,c1151005.tfilter1,tp,LOCATION_DECK,0,1,1,nil)
if g:GetCount()>0 then
if Duel.SendtoHand(g,nil,REASON_EFFECT)~=0 then
Duel.ConfirmCards(1-tp,g)
if Duel.GetFieldGroupCount(tp,LOCATION_DECK,0)>0 then
Duel.ShuffleDeck(tp)
Duel.Hint(HINT_SELECTMSG,tp,aux.Stringid(1151005,0))
local tc=Duel.GetDecktopGroup(tp,1):GetFirst()
local t=0
local opt=Duel.SelectOption(tp,70,71,72)
if opt==0 then t=TYPE_MONSTER
else
if opt==1 then
t=TYPE_SPELL
else t=TYPE_TRAP
end
end
Duel.ConfirmDecktop(tp,1)
Duel.ShuffleDeck(tp)
if tc:IsType(t) and Duel.GetFieldGroupCount(tp,0,LOCATION_DECK)>0 then
if Duel.GetFieldGroupCount(tp,0,LOCATION_DECK)==1 then
Duel.SortDecktop(tp,1-tp,1)
else
Duel.SortDecktop(tp,1-tp,2)
end
end
end
end
end
end
--
function c1151005.tfilter2(c)
return c1151005.IsLeisp(c) and c:IsType(TYPE_SPELL)
end
function c1151005.tg2(e,tp,eg,ep,ev,re,r,rp,chk)
if chkc then return chkc:IsLocation(LOCATION_GRAVE) and c1151005.tfilter2(chkc) end
if chk==0 then return Duel.IsExistingMatchingCard(c1151005.tfilter2,tp,LOCATION_GRAVE,0,1,nil) and Duel.GetLocationCount(tp,LOCATION_SZONE)>0 end
Duel.Hint(HINT_SELECTMSG,tp,aux.Stringid(1151005,1))
local g=Duel.SelectTarget(tp,c1151005.tfilter2,tp,LOCATION_GRAVE,0,1,1,nil)
end
--
function c1151005.op2(e,tp,eg,ep,ev,re,r,rp)
local tc=Duel.GetFirstTarget()
if tc:IsRelateToEffect(e) and tc:IsLocation(LOCATION_GRAVE) then
local e2_1=Effect.CreateEffect(e:GetHandler())
e2_1:SetType(EFFECT_TYPE_SINGLE)
e2_1:SetCode(EFFECT_CHANGE_TYPE)
e2_1:SetProperty(EFFECT_FLAG_CANNOT_DISABLE)
e2_1:SetValue(TYPE_CONTINUOUS+TYPE_SPELL)
e2_1:SetReset(RESET_EVENT+0x1fe0000)
tc:RegisterEffect(e2_1,true)
Duel.MoveToField(tc,tp,tp,LOCATION_SZONE,POS_FACEUP,true)
local e2_2=Effect.CreateEffect(e:GetHandler())
e2_2:SetType(EFFECT_TYPE_SINGLE)
e2_2:SetProperty(EFFECT_FLAG_SINGLE_RANGE)
e2_2:SetCode(EFFECT_CHANGE_CODE)
e2_2:SetRange(LOCATION_SZONE)
e2_2:SetValue(1151999)
e2_2:SetReset(RESET_EVENT+0x1fe0000)
tc:RegisterEffect(e2_2,true)
local e2_3=Effect.CreateEffect(e:GetHandler())
e2_3:SetType(EFFECT_TYPE_FIELD)
e2_3:SetCode(EFFECT_SPSUMMON_PROC_G)
e2_3:SetRange(LOCATION_SZONE)
e2_3:SetCountLimit(1)
e2_3:SetCondition(c1151005.con2_3)
e2_3:SetOperation(c1151005.op2_3)
e2_3:SetReset(RESET_EVENT+0x1fe0000)
tc:RegisterEffect(e2_3,true)
end
end
--
function c1151005.cfilter2_3(c,e,tp)
return c:IsType(TYPE_MONSTER) and c:IsCanBeSpecialSummoned(e,0,tp,false,false) and c:GetLevel()<5 and c:IsRace(RACE_FIEND)
end
function c1151005.con2_3(e,c,og)
local tp=e:GetHandlerPlayer()
local c=e:GetHandler()
return Duel.IsExistingMatchingCard(c1151005.cfilter2_3,tp,LOCATION_HAND,0,1,nil,e,tp) and c:IsFaceup() and not c:IsDisabled() and Duel.GetMZoneCount(tp)>0
end
--
function c1151005.op2_3(e,tp,eg,ep,ev,re,r,rp,c,sg,og)
local c=e:GetHandler()
Duel.Hint(HINT_SELECTMSG,tp,HINTMSG_SPSUMMON)
local g=Duel.SelectMatchingCard(tp,c1151005.cfilter2_3,tp,LOCATION_HAND,0,1,1,nil,e,tp)
sg:Merge(g)
end
--
--红色的夜行恶魔·蕾米莉亚
function c1151007.initial_effect(c)
--
local e1=Effect.CreateEffect(c)
e1:SetCategory(CATEGORY_SPECIAL_SUMMON)
e1:SetType(EFFECT_TYPE_SINGLE+EFFECT_TYPE_TRIGGER_O)
e1:SetCode(EVENT_REMOVE)
e1:SetProperty(EFFECT_FLAG_DELAY)
e1:SetCountLimit(1,1151007)
e1:SetTarget(c1151007.tg1)
e1:SetOperation(c1151007.op1)
c:RegisterEffect(e1)
--
local e2=Effect.CreateEffect(c)
e2:SetCategory(CATEGORY_SPECIAL_SUMMON)
e2:SetType(EFFECT_TYPE_IGNITION)
e2:SetRange(LOCATION_MZONE)
e2:SetCountLimit(1,1151008)
e2:SetCost(c1151007.cost2)
e2:SetTarget(c1151007.tg2)
e2:SetOperation(c1151007.op2)
c:RegisterEffect(e2)
--
end
--
c1151007.named_with_Leimi=1
function c1151007.IsLeimi(c)
local m=_G["c"..c:GetCode()]
return m and m.named_with_Leimi
end
function c1151007.IsLeisp(c)
local m=_G["c"..c:GetCode()]
return c.named_with_Leisp
end
--
function c1151007.tg1(e,tp,eg,ep,ev,re,r,rp,chk)
if chk==0 then return Duel.GetMZoneCount(tp)>0 and e:GetHandler():IsCanBeSpecialSummoned(e,0,tp,false,false) end
Duel.SetOperationInfo(0,CATEGORY_SPECIAL_SUMMON,e:GetHandler(),1,0,LOCATION_REMOVED)
end
--
function c1151007.ofilter1(c)
return c1151007.IsLeisp(c)
end
function c1151007.op1(e,tp,eg,ep,ev,re,r,rp)
local c=e:GetHandler()
if c:IsRelateToEffect(e) then
if Duel.SpecialSummon(c,0,tp,tp,false,false,POS_FACEUP)~=0 and Duel.IsExistingMatchingCard(c1151007.ofilter1,tp,LOCATION_DECK,0,1,nil) then
Duel.BreakEffect()
Duel.Hint(HINT_SELECTMSG,tp,aux.Stringid(1151007,0))
local g=Duel.SelectMatchingCard(tp,c1151007.ofilter1,tp,LOCATION_DECK,0,1,1,nil)
if g:GetCount()>0 then
local tc=g:GetFirst()
Duel.ShuffleDeck(tp)
Duel.MoveSequence(tc,0)
Duel.ConfirmDecktop(tp,1)
end
end
end
end
--
function c1151007.cfilter2(c)
return c:IsType(TYPE_MONSTER)
end
function c1151007.cost2(e,tp,eg,ep,ev,re,r,rp,chk)
if chk==0 then return Duel.CheckReleaseGroup(tp,c1151007.cfilter2,1,nil) end
Duel.Hint(HINT_SELECTMSG,tp,HINTMSG_RELEASE)
local g=Duel.SelectReleaseGroup(tp,c1151007.cfilter2,1,1,nil)
if g:GetCount()>0 then
Duel.Release(g,REASON_EFFECT)
end
end
--
function c1151007.tfilter2(c)
return c:IsCode(1151999) and c:IsFaceup()
end
function c1151007.tfilter2x1(c,e,tp)
return c:IsRace(RACE_FIEND) and c:IsCanBeSpecialSummoned(e,0,tp,false,false)
end
function c1151007.tfilter2x2(c,e,tp)
return c:IsRace(RACE_FIEND) and c:GetLevel()<5 and c:IsCanBeSpecialSummoned(e,0,tp,false,false)
end
function c1151007.tg2(e,tp,eg,ep,ev,re,r,rp,chk)
if chk==0 then
if Duel.IsExistingMatchingCard(c1151007.tfilter2,tp,LOCATION_ONFIELD,0,1,nil) then
return Duel.IsExistingMatchingCard(c1151007.tfilter2x1,tp,LOCATION_GRAVE,0,1,nil,e,tp) or Duel.IsExistingMatchingCard(c1151007.tfilter2x2,tp,LOCATION_GRAVE,0,1,nil,e,tp)
else
return Duel.IsExistingMatchingCard(c1151007.tfilter2x1,tp,LOCATION_GRAVE,0,1,nil,e,tp)
end
end
Duel.SetOperationInfo(0,CATEGORY_SPECIAL_SUMMON,nil,1,0,0)
end
--
function c1151007.op2(e,tp,eg,ep,ev,re,r,rp)
if Duel.IsExistingMatchingCard(c1151007.tfilter2,tp,LOCATION_ONFIELD,0,1,nil) then
Duel.Hint(HINT_SELECTMSG,tp,HINTMSG_SPSUMMON)
local g1=Duel.GetMatchingGroup(c1151007.tfilter2x1,tp,LOCATION_GRAVE,0,nil,e,tp)
local g2=Duel.GetMatchingGroup(c1151007.tfilter2x2,tp,LOCATION_DECK,0,nil,e,tp)
g1:Merge(g2)
if g1:GetCount()>0 then
local g=g1:Select(tp,1,1,nil,e,tp)
if g:GetCount()>0 then
Duel.SpecialSummon(g,0,tp,tp,false,false,POS_FACEUP)
end
end
else
Duel.Hint(HINT_SELECTMSG,tp,HINTMSG_SPSUMMON)
local g=Duel.SelectMatchingCard(tp,c1151007.tfilter2x1,tp,LOCATION_GRAVE,0,1,1,nil,e,tp)
if g:GetCount()>0 then
Duel.SpecialSummon(g,0,tp,tp,false,false,POS_FACEUP)
end
end
end
\ No newline at end of file
--红魔馆的恶魔·蕾米莉亚
function c1151009.initial_effect(c)
--
local e1=Effect.CreateEffect(c)
e1:SetCategory(CATEGORY_SPECIAL_SUMMON)
e1:SetType(EFFECT_TYPE_IGNITION)
e1:SetRange(LOCATION_HAND)
e1:SetCode(EVENT_FREE_CHAIN)
e1:SetCountLimit(1,1151009)
e1:SetTarget(c1151009.tg1)
e1:SetOperation(c1151009.op1)
c:RegisterEffect(e1)
--
local e2=Effect.CreateEffect(c)
e2:SetCategory(CATEGORY_TOHAND+CATEGORY_SEARCH+CATEGORY_SPECIAL_SUMMON)
e2:SetType(EFFECT_TYPE_SINGLE+EFFECT_TYPE_TRIGGER_O)
e2:SetCode(EVENT_TO_GRAVE)
e2:SetProperty(EFFECT_FLAG_DELAY)
e2:SetCountLimit(1,1151010)
e2:SetCondition(c1151009.con2)
e2:SetTarget(c1151009.tg2)
e2:SetOperation(c1151009.op2)
c:RegisterEffect(e2)
--
Duel.AddCustomActivityCounter(1151009,ACTIVITY_SPSUMMON,c1151009.counterfilter)
end
--
c1151009.named_with_Leimi=1
function c1151009.IsLeimi(c)
local m=_G["c"..c:GetCode()]
return m and m.named_with_Leimi
end
function c1151009.IsLeisp(c)
local m=_G["c"..c:GetCode()]
return c.named_with_Leisp
end
--
function c1151009.counterfilter(c)
return c:IsRace(RACE_FIEND)
end
--
function c1151009.cost1(e,tp,eg,ep,ev,re,r,rp,chk)
if chk==0 then return Duel.GetCustomActivityCount(1151009,tp,ACTIVITY_SPSUMMON)==0 end
local e1_1=Effect.CreateEffect(e:GetHandler())
e1_1:SetType(EFFECT_TYPE_FIELD)
e1_1:SetProperty(EFFECT_FLAG_PLAYER_TARGET+EFFECT_FLAG_OATH)
e1_1:SetCode(EFFECT_CANNOT_SPECIAL_SUMMON)
e1_1:SetReset(RESET_PHASE+PHASE_END)
e1_1:SetTargetRange(1,0)
e1_1:SetTarget(c1151009.limit1_1)
Duel.RegisterEffect(e1_1,tp)
end
function c1151009.limit1_1(e,c,sump,sumtype,sumpos,targetp,se)
return not c:IsRace(RACE_FIEND)
end
--
function c1151009.tfilter1(c)
return c:IsRace(RACE_FIEND) and c:IsType(TYPE_MONSTER)
end
function c1151009.tg1(e,tp,eg,ep,ev,re,r,rp,chk)
if chk==0 then return Duel.GetMZoneCount(tp)>0 and e:GetHandler():IsCanBeSpecialSummoned(e,0,tp,false,false) and Duel.GetMatchingGroupCount(c1151009.tfilter1,tp,LOCATION_ONFIELD,0,nil)>0 end
Duel.SetOperationInfo(0,CATEGORY_SPECIAL_SUMMON,e:GetHandler(),1,0,LOCATION_REMOVED)
end
--
function c1151009.op1(e,tp,eg,ep,ev,re,r,rp)
local c=e:GetHandler()
if c:IsRelateToEffect(e) then
if Duel.SpecialSummon(c,0,tp,tp,false,false,POS_FACEUP)~=0 then
if Duel.GetFieldGroupCount(tp,LOCATION_DECK,0)==1 then
Duel.SortDecktop(tp,tp,1)
else
Duel.SortDecktop(tp,tp,2)
end
end
end
end
--
function c1151009.con2(e,tp,eg,ep,ev,re,r,rp)
return e:GetHandler():GetPreviousLocation()==LOCATION_DECK
end
--
function c1151009.tg2(e,tp,eg,ep,ev,re,r,rp,chk)
if chk==0 then return Duel.GetFieldGroupCount(tp,LOCATION_DECK,0)>0 end
end
--
function c1151009.op2(e,tp,eg,ep,ev,re,r,rp)
Duel.Hint(HINT_SELECTMSG,tp,aux.Stringid(1151005,0))
local tc=Duel.GetDecktopGroup(tp,1):GetFirst()
if tc then
local t=0
local opt=Duel.SelectOption(tp,70,71,72)
if opt==0 then
t=TYPE_MONSTER
else
if opt==1 then
t=TYPE_SPELL
else t=TYPE_TRAP
end
end
Duel.ConfirmDecktop(tp,1)
if tc:IsType(t) then
if tc:IsAbleToHand() and not (e:GetHandler():IsLocation(LOCATION_GRAVE) and e:GetHandler():IsCanBeSpecialSummoned(e,0,tp,false,false)) then
local sel=Duel.SelectOption(tp,aux.Stringid(1151009,1))
if sel==0 then
Duel.SendtoHand(tc,nil,REASON_EFFECT)
Duel.ConfirmCards(1-tp,tc)
end
else
if tc:IsAbleToHand() and (e:GetHandler():IsLocation(LOCATION_GRAVE) and e:GetHandler():IsCanBeSpecialSummoned(e,0,tp,false,false)) then
local sel=Duel.SelectOption(tp,aux.Stringid(1151009,1),aux.Stringid(1151009,2))
if sel==0 then
Duel.SendtoHand(tc,nil,REASON_EFFECT)
Duel.ConfirmCards(1-tp,tc)
end
if sel==1 then
Duel.SpecialSummon(e:GetHandler(),0,tp,tp,false,false,POS_FACEUP)
Duel.ShuffleDeck(tp)
end
else
if not tc:IsAbleToHand() and (e:GetHandler():IsLocation(LOCATION_GRAVE) and e:GetHandler():IsCanBeSpecialSummoned(e,0,tp,false,false)) then
local sel=Duel.SelectOption(tp,aux.Stringid(1151009,2))
if sel==0 then
Duel.SpecialSummon(e:GetHandler(),0,tp,tp,false,false,POS_FACEUP)
Duel.ShuffleDeck(tp)
end
end
end
end
else
Duel.ShuffleDeck(tp)
end
end
end
--蕾米莉亚·斯卡蕾特
function c1151101.initial_effect(c)
--
aux.AddSynchroProcedure(c,c1151101.filter0_1,c1151101.filter0_2,1)
c:EnableReviveLimit()
--
local e1=Effect.CreateEffect(c)
e1:SetDescription(aux.Stringid(1151101,0))
e1:SetCategory(CATEGORY_TODECK)
e1:SetType(EFFECT_TYPE_SINGLE+EFFECT_TYPE_TRIGGER_O)
e1:SetCode(EVENT_SPSUMMON_SUCCESS)
e1:SetCountLimit(1,1151101)
e1:SetTarget(c1151101.tg1)
e1:SetOperation(c1151101.op1)
c:RegisterEffect(e1)
--
local e2=Effect.CreateEffect(c)
e2:SetDescription(aux.Stringid(1151101,0))
e2:SetCategory(CATEGORY_TODECK)
e2:SetType(EFFECT_TYPE_QUICK_O)
e2:SetCode(EVENT_CHAINING)
e2:SetProperty(EFFECT_FLAG_DAMAGE_STEP+EFFECT_FLAG_DAMAGE_CAL)
e2:SetRange(LOCATION_MZONE)
e2:SetCountLimit(1,1151101)
e2:SetCondition(c1151101.con2)
e2:SetTarget(c1151101.tg1)
e2:SetOperation(c1151101.op1)
c:RegisterEffect(e2)
--
local e3=Effect.CreateEffect(c)
e3:SetType(EFFECT_TYPE_SINGLE)
e3:SetCode(EFFECT_CANNOT_BE_EFFECT_TARGET)
e3:SetProperty(EFFECT_FLAG_SINGLE_RANGE)
e3:SetRange(LOCATION_MZONE)
e3:SetValue(aux.tgoval)
c:RegisterEffect(e3)
--
local e4=Effect.CreateEffect(c)
e4:SetDescription(aux.Stringid(1151101,1))
e4:SetCategory(CATEGORY_TOHAND+CATEGORY_TOGRAVE)
e4:SetType(EFFECT_TYPE_QUICK_O)
e4:SetCode(EVENT_FREE_CHAIN)
e4:SetRange(LOCATION_MZONE)
e4:SetCountLimit(1,1151102)
e4:SetTarget(c1151101.tg4)
e4:SetOperation(c1151101.op4)
c:RegisterEffect(e4)
--
end
--
c1151101.named_with_Leimi=1
function c1151101.IsLeimi(c)
local m=_G["c"..c:GetCode()]
return m and m.named_with_Leimi
end
function c1151101.IsLeisp(c)
local m=_G["c"..c:GetCode()]
return c.named_with_Leisp
end
--
function c1151101.filter0_1(c)
return c1151101.IsLeimi(c) and c:IsType(TYPE_TUNER)
end
function c1151101.filter0_2(c)
return c:IsRace(RACE_FIEND)
end
--
function c1151101.tfilter1(c)
return c:IsAbleToHand()
end
function c1151101.tg1(e,tp,eg,ep,ev,re,r,rp,chk,chkc)
if chk==0 then return Duel.IsExistingMatchingCard(c1151101.tfilter1,tp,LOCATION_GRAVE,0,1,nil) end
Duel.SetOperationInfo(0,CATEGORY_TOHAND,nil,1,1-tp,LOCATION_GRAVE)
end
--
function c1151101.op1(e,tp,eg,ep,ev,re,r,rp)
Duel.Hint(HINT_SELECTMSG,tp,HINTMSG_TODECK)
local g=Duel.SelectMatchingCard(tp,c1151101.tfilter1,tp,0,LOCATION_GRAVE,1,1,nil)
if g:GetCount()>0 then
Duel.SendtoDeck(g,nil,0,REASON_EFFECT)
end
end
--
function c1151101.con2(e,tp,eg,ep,ev,re,r,rp)
return ep~=tp
end
--
function c1151101.tg4(e,tp,eg,ep,ev,re,r,rp,chk)
if chk==0 then return Duel.GetFieldGroupCount(tp,LOCATION_DECK,0)>0 end
Duel.Hint(HINT_OPSELECTED,1-tp,aux.Stringid(1151101,2))
Duel.Hint(HINT_SELECTMSG,tp,0)
local ac=Duel.AnnounceCard(tp)
e:SetLabel(ac)
end
--
function c1151101.ofilter4(c)
return c:IsAbleToGrave()
end
function c1151101.op4(e,tp,eg,ep,ev,re,r,rp)
if not e:GetHandler():IsRelateToEffect(e) or Duel.GetFieldGroupCount(tp,LOCATION_DECK,0)==0 then return end
Duel.ConfirmDecktop(tp,1)
local g=Duel.GetDecktopGroup(tp,1)
local tc=g:GetFirst()
if tc:GetCode()==e:GetLabel() and tc:IsAbleToHand() then
Duel.DisableShuffleCheck()
if Duel.SendtoHand(tc,nil,REASON_EFFECT)~=0 then
Duel.ConfirmCards(1-tp,tc)
if Duel.IsExistingMatchingCard(c1152101.ofilter4,tp,LOCATION_ONFIELD,0,1,nil) then
Duel.Hint(HINT_SELECTMSG,tp,HINTMSG_TOGRAVE)
local g2=Duel.SelectMatchingCard(tp,c1151101.ofilter4,tp,0,LOCATION_ONFIELD,1,1,nil)
if g2:GetCount()>0 then
Duel.SendtoGrave(g2,REASON_EFFECT)
end
end
Duel.ShuffleHand(tp)
end
else
Duel.DisableShuffleCheck()
Duel.SendtoGrave(tc,REASON_EFFECT)
end
end
--
--神罚『年幼的恶魔之王』
function c1151202.initial_effect(c)
--
local e1=Effect.CreateEffect(c)
e1:SetCategory(CATEGORY_DESTROY+CATEGORY_TODECK+CATEGORY_DRAW+CATEGORY_SEARCH+CATEGORY_TOHAND)
e1:SetType(EFFECT_TYPE_ACTIVATE)
e1:SetCode(EVENT_FREE_CHAIN)
e1:SetCountLimit(1,1151202+EFFECT_COUNT_CODE_OATH)
e1:SetCost(c1151202.cost1)
e1:SetOperation(c1151202.op1)
c:RegisterEffect(e1)
--
end
--
function c1151202.IsLeimi(c)
local m=_G["c"..c:GetCode()]
return m and m.named_with_Leimi
end
c1151202.named_with_Leisp=1
function c1151202.IsLeisp(c)
local m=_G["c"..c:GetCode()]
return c.named_with_Leisp
end
--
function c1151202.cfilter1(c)
return (c1151202.IsLeisp(c) or (c:IsType(TYPE_MONSTER) and c:IsRace(RACE_FIEND))) and c:IsAbleToRemoveAsCost()
end
function c1151202.cost1(e,tp,eg,ep,ev,re,r,rp,chk)
if chk==0 then return Duel.IsExistingMatchingCard(c1151202.cfilter1,tp,LOCATION_GRAVE,0,1,e:GetHandler()) end
Duel.Hint(HINT_SELECTMSG,tp,HINTMSG_REMOVE)
local g=Duel.SelectMatchingCard(tp,c1151202.cfilter1,tp,LOCATION_GRAVE,0,1,2,e:GetHandler())
if g:GetCount()>0 then
local rnum=Duel.Remove(g,POS_FACEUP,REASON_EFFECT)
e:SetLabel(rnum)
end
end
--
function c1151202.ofilter1(c)
return (c1151202.IsLeisp(c) or (c:IsType(TYPE_MONSTER) and c:IsRace(RACE_FIEND))) and c:IsAbleToHand()
end
function c1151202.ofilter1x(c)
return c:IsDestructable()
end
function c1151202.ofilter1x1(c)
return c:IsAbleToDeck()
end
function c1151202.op1(e,tp,eg,ep,ev,re,r,rp)
if e:GetLabel()==nil then return false end
local rnum=e:GetLabel()
if Duel.IsExistingMatchingCard(c1151202.ofilter1,tp,LOCATION_DECK,0,1,nil) and rnum>0 and Duel.SelectYesNo(tp,aux.Stringid(1151202,0)) then
Duel.Hint(HINT_SELECTMSG,tp,HINTMSG_ATOHAND)
local g=Duel.SelectMatchingCard(tp,c1151202.ofilter1,tp,LOCATION_DECK,0,1,1,nil)
if g:GetCount()>0 then
local tc=g:GetFirst()
if Duel.SendtoHand(tc,nil,REASON_EFFECT)~=0 then
Duel.ConfirmCards(1-tp,tc)
if tc:IsType(TYPE_MONSTER) and not c1151202.IsLeimi(tc) then
local e1_1=Effect.CreateEffect(e:GetHandler())
e1_1:SetType(EFFECT_TYPE_SINGLE)
e1_1:SetCode(EFFECT_CANNOT_TRIGGER)
e1_1:SetReset(RESET_PHASE+PHASE_END)
tc:RegisterEffect(e1_1,true)
end
end
end
end
if Duel.GetFieldGroupCount(tp,0,LOCATION_HAND)>0 and rnum>1 and Duel.SelectYesNo(tp,aux.Stringid(1151202,1)) then
local g2=Duel.GetFieldGroup(tp,0,LOCATION_HAND)
if g2:GetCount()>0 then
Duel.ConfirmCards(1-tp,g2)
Duel.Hint(HINT_SELECTMSG,tp,HINTMSG_DESTROY)
local g3=g2:FilterSelect(tp,c1151202.ofilter1x,1,1,nil)
if g3:GetCount()>0 then
if Duel.Destroy(g3,REASON_EFFECT)~=0 then
if Duel.Draw(1-tp,1,REASON_EFFECT)~=0 and Duel.IsExistingMatchingCard(c1151202.ofilter1x1,tp,0,LOCATION_GRAVE+LOCATION_REMOVED,1,nil) and Duel.SelectYesNo(tp,aux.Stringid(1151202,2)) then
local g5=Duel.GetFieldGroup(tp,0,LOCATION_HAND)
Duel.Hint(HINT_SELECTMSG,tp,HINTMSG_REMOVE)
local g4=Duel.SelectMatchingCard(tp,c1151202.tfilter1x1,tp,0,LOCATION_GRAVE+LOCATION_REMOVED,1,1,nil)
if g4:GetCount()>0 then
Duel.SendtoDeck(g4,nil,0,REASON_EFFECT)
end
end
end
end
Duel.ShuffleHand(1-tp)
end
end
end
--冥符『红色的冥界』
function c1151203.initial_effect(c)
--
local e1=Effect.CreateEffect(c)
e1:SetCategory(CATEGORY_SPECIAL_SUMMON+CATEGORY_TOKEN)
e1:SetType(EFFECT_TYPE_ACTIVATE)
e1:SetCode(EVENT_FREE_CHAIN)
e1:SetCountLimit(1,1151203+EFFECT_COUNT_CODE_OATH)
e1:SetCost(c1151203.cost1)
e1:SetTarget(c1151203.tg1)
e1:SetOperation(c1151203.op1)
c:RegisterEffect(e1)
--
local e2=Effect.CreateEffect(c)
e2:SetCategory(CATEGORY_TODECK+CATEGORY_RELEASE+CATEGORY_DRAW)
e2:SetType(EFFECT_TYPE_IGNITION)
e2:SetRange(LOCATION_GRAVE)
e2:SetCost(c1151203.cost2)
e2:SetTarget(c1151203.tg2)
e2:SetOperation(c1151203.op2)
c:RegisterEffect(e2)
--
Duel.AddCustomActivityCounter(1151203,ACTIVITY_SPSUMMON,c1151203.counterfilter)
end
--
function c1151203.IsLeimi(c)
local m=_G["c"..c:GetCode()]
return m and m.named_with_Leimi
end
c1151203.named_with_Leisp=1
function c1151203.IsLeisp(c)
local m=_G["c"..c:GetCode()]
return c.named_with_Leisp
end
--
function c1151203.counterfilter(c)
return c:IsRace(RACE_FIEND)
end
--
function c1151203.cfilter1(c)
return c:IsRace(RACE_FIEND) and c:IsAbleToGraveAsCost()
end
function c1151203.cost1(e,tp,eg,ep,ev,re,r,rp,chk)
if chk==0 then return Duel.GetCustomActivityCount(1151203,tp,ACTIVITY_SPSUMMON)==0 and Duel.IsExistingMatchingCard(c1151203.cfilter1,tp,LOCATION_DECK,0,1,nil) end
--
local e1_1=Effect.CreateEffect(e:GetHandler())
e1_1:SetType(EFFECT_TYPE_FIELD)
e1_1:SetProperty(EFFECT_FLAG_PLAYER_TARGET+EFFECT_FLAG_OATH)
e1_1:SetCode(EFFECT_CANNOT_SPECIAL_SUMMON)
e1_1:SetReset(RESET_PHASE+PHASE_END)
e1_1:SetTargetRange(1,0)
e1_1:SetTarget(c1151203.splimit1_1)
Duel.RegisterEffect(e1_1,tp)
--
Duel.Hint(HINT_SELECTMSG,tp,HINTMSG_TOGRAVE)
local g=Duel.SelectMatchingCard(tp,c1151203.cfilter1,tp,LOCATION_DECK,0,1,1,nil)
if g:GetCount()>0 then
Duel.SendtoGrave(g,REASON_EFFECT)
end
end
function c1151203.splimit1_1(e,c)
return not c:IsRace(RACE_FIEND)
end
--
function c1151203.tg1(e,tp,eg,ep,ev,re,r,rp,chk)
if chk==0 then return Duel.GetMZoneCount(tp)>0 and Duel.IsPlayerCanSpecialSummonMonster(tp,1151996,0,0x4011,200,200,1,RACE_FIEND,ATTRIBUTE_DARK) end
Duel.SetOperationInfo(0,CATEGORY_TOKEN,nil,1,0,0)
Duel.SetOperationInfo(0,CATEGORY_SPECIAL_SUMMON,nil,1,0,0)
end
--
function c1151203.op1(e,tp,eg,ep,ev,re,r,rp)
if Duel.GetMZoneCount(tp)>0 and Duel.IsPlayerCanSpecialSummonMonster(tp,1151996,0,0x4011,200,200,1,RACE_FIEND,ATTRIBUTE_DARK) then
local token=Duel.CreateToken(tp,1151996)
Duel.SpecialSummon(token,0,tp,tp,false,false,POS_FACEUP)
end
end
--
function c1151203.cost2(e,tp,eg,ep,ev,re,r,rp,chk)
if chk==0 then return e:GetHandler():IsAbleToRemoveAsCost() end
Duel.Remove(e:GetHandler(),POS_FACEUP,REASON_COST)
end
--
function c1151203.tfilter2(c,e,tp)
return ((c:IsRace(RACE_FIEND) and c:IsType(TYPE_MONSTER)) or c1151203.IsLeisp(c)) and c:IsAbleToDeck()
end
function c1151203.tg2(e,tp,eg,ep,ev,re,r,rp,chk)
if chk==0 then return Duel.IsExistingMatchingCard(c1151203.tfilter2,tp,LOCATION_REMOVED,0,1,e:GetHandler()) end
Duel.SetOperationInfo(0,CATEGORY_TODECK,nil,0,tp,0)
end
--
function c1151203.ofilter2(c)
return c:IsRace(RACE_FIEND)
end
function c1151203.op2(e,tp,eg,ep,ev,re,r,rp)
Duel.Hint(HINT_SELECTMSG,tp,HINTMSG_TODECK)
local g=Duel.SelectMatchingCard(tp,c1151203.tfilter2,tp,LOCATION_REMOVED,0,1,3,e:GetHandler())
if g:GetCount()>0 then
if Duel.SendtoDeck(g,nil,2,REASON_EFFECT)~=0 then
Duel.ShuffleDeck(tp)
if Duel.CheckReleaseGroup(tp,c1151203.ofilter2,1,nil) and Duel.IsPlayerCanDraw(tp,1) and Duel.SelectYesNo(tp,aux.Stringid(1151203,0)) then
Duel.BreakEffect()
Duel.Hint(HINT_SELECTMSG,tp,HINTMSG_RELEASE)
local g2=Duel.SelectReleaseGroup(tp,c1151203.ofilter2,1,1,nil)
if g2:GetCount()>0 then
if Duel.Release(g2,REASON_EFFECT)~=0 then
Duel.Draw(tp,1,REASON_EFFECT)
end
end
end
end
end
end
--
--神术『吸血鬼幻想』
function c1151205.initial_effect(c)
--
local e1=Effect.CreateEffect(c)
e1:SetCategory(CATEGORY_TOHAND+CATEGORY_SEARCH)
e1:SetType(EFFECT_TYPE_ACTIVATE)
e1:SetCode(EVENT_FREE_CHAIN)
e1:SetCountLimit(1,1151205+EFFECT_COUNT_CODE_OATH)
e1:SetCondition(c1151205.con1)
e1:SetTarget(c1151205.tg1)
e1:SetOperation(c1151205.op1)
c:RegisterEffect(e1)
--
local e2=Effect.CreateEffect(c)
e2:SetCategory(CATEGORY_TOHAND+CATEGORY_SEARCH)
e2:SetType(EFFECT_TYPE_ACTIVATE)
e2:SetCode(EVENT_FREE_CHAIN)
e2:SetCountLimit(1,1151205+EFFECT_COUNT_CODE_OATH)
e2:SetCondition(c1151205.con2)
e2:SetTarget(c1151205.tg2)
e2:SetOperation(c1151205.op2)
c:RegisterEffect(e2)
end
--
function c1151205.IsLeimi(c)
local m=_G["c"..c:GetCode()]
return m and m.named_with_Leimi
end
c1151205.named_with_Leisp=1
function c1151205.IsLeisp(c)
local m=_G["c"..c:GetCode()]
return c.named_with_Leisp
end
--
function c1151205.cfilter1(c)
return c:IsFaceup() and c1151205.IsLeimi(c)
end
function c1151205.con1(e,tp,eg,ep,ev,re,r,rp)
return not Duel.IsExistingMatchingCard(c1151205.cfilter1,tp,LOCATION_ONFIELD,0,1,nil)
end
--
function c1151205.tfilter1(c)
return c1151205.IsLeimi(c) and c:IsAbleToHand()
end
function c1151205.tg1(e,tp,eg,ep,ev,re,r,rp,chk)
if chk==0 then return Duel.IsExistingMatchingCard(c1151205.tfilter1,tp,LOCATION_DECK,0,1,nil) end
Duel.SetOperationInfo(0,CATEGORY_TOHAND,nil,1,tp,LOCATION_DECK)
end
--
function c1151205.op1(e,tp,eg,ep,ev,re,r,rp)
Duel.Hint(HINT_SELECTMSG,tp,HINTMSG_ATOHAND)
local g=Duel.SelectMatchingCard(tp,c1151205.tfilter1,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 c1151205.cfilter2(c)
return c:IsFaceup() and c1151205.IsLeimi(c)
end
function c1151205.con2(e,tp,eg,ep,ev,re,r,rp)
return Duel.IsExistingMatchingCard(c1151205.cfilter2,tp,LOCATION_ONFIELD,0,1,nil)
end
--
function c1151205.tfilter2(c)
return c:IsFaceup() and not c:IsType(TYPE_XYZ)
end
function c1151205.tg2(e,tp,eg,ep,ev,re,r,rp,chk,chkc)
if chkc then return chkc:IsLocation(LOCATION_MZONE) and chkc:IsControler(tp) and c1151205.tfilter2(chkc) and chkc:IsFaceup() end
if chk==0 then return Duel.IsExistingTarget(c1151205.tfilter2,tp,LOCATION_MZONE,LOCATION_MZONE,1,nil) end
Duel.Hint(HINT_SELECTMSG,tp,HINTMSG_FACEUP)
Duel.SelectTarget(tp,c1151205.tfilter2,tp,LOCATION_MZONE,LOCATION_MZONE,1,1,nil)
end
--
function c1151205.ofilter2(c)
return c1151205.IsLeisp(c) and c:IsAbleToHand() and not c:IsCode(1151205)
end
function c1151205.op2(e,tp,eg,ep,ev,re,r,rp)
local tc=Duel.GetFirstTarget()
if tc:IsRelateToEffect(e) then
Duel.Hint(HINT_SELECTMSG,1-tp,567)
local lv=Duel.AnnounceNumber(tp,1,2,3,4,5,6,7,8,9,10,11,12)
local e2_1=Effect.CreateEffect(e:GetHandler())
e2_1:SetType(EFFECT_TYPE_SINGLE)
e2_1:SetCode(EFFECT_CHANGE_LEVEL)
e2_1:SetValue(lv)
e2_1:SetReset(RESET_EVENT+0x1fe0000)
tc:RegisterEffect(e2_1)
if Duel.IsExistingMatchingCard(c1151205.ofilter2,tp,LOCATION_DECK,0,1,nil) and tc:GetLevel()==lv then
Duel.BreakEffect()
Duel.Hint(HINT_SELECTMSG,tp,HINTMSG_ATOHAND)
local g2=Duel.SelectMatchingCard(tp,c1151205.ofilter2,tp,LOCATION_DECK,0,1,1,nil)
if g2:GetCount()>0 then
local tc2=g2:GetFirst()
Duel.SendtoHand(tc2,nil,REASON_EFFECT)
Duel.ConfirmCards(1-tp,tc2)
end
end
end
end
\ No newline at end of file
--红符「绯红之主」
function c1151207.initial_effect(c)
--
local e1=Effect.CreateEffect(c)
e1:SetCategory(CATEGORY_SPECIAL_SUMMON)
e1:SetType(EFFECT_TYPE_ACTIVATE)
e1:SetCode(EVENT_FREE_CHAIN)
e1:SetCountLimit(1,1151207+EFFECT_COUNT_CODE_OATH)
e1:SetCost(c1151207.cost1)
e1:SetTarget(c1151207.tg1)
e1:SetOperation(c1151207.op1)
c:RegisterEffect(e1)
--
Duel.AddCustomActivityCounter(1151207,ACTIVITY_SPSUMMON,c1151207.counterfilter)
end
--
function c1151207.IsLeimi(c)
local m=_G["c"..c:GetCode()]
return m and m.named_with_Leimi
end
c1151207.named_with_Leisp=1
function c1151207.IsLeisp(c)
local m=_G["c"..c:GetCode()]
return c.named_with_Leisp
end
--
function c1151207.counterfilter(c)
return c:IsRace(RACE_FIEND)
end
--
function c1151207.cost1(e,tp,eg,ep,ev,re,r,rp,chk)
if chk==0 then return Duel.GetCustomActivityCount(1151207,tp,ACTIVITY_SPSUMMON)==0 end
local e1_1=Effect.CreateEffect(e:GetHandler())
e1_1:SetType(EFFECT_TYPE_FIELD)
e1_1:SetProperty(EFFECT_FLAG_PLAYER_TARGET+EFFECT_FLAG_OATH)
e1_1:SetCode(EFFECT_CANNOT_SPECIAL_SUMMON)
e1_1:SetReset(RESET_PHASE+PHASE_END)
e1_1:SetTargetRange(1,0)
e1_1:SetTarget(c1151207.limit1_1)
Duel.RegisterEffect(e1_1,tp)
end
function c1151207.limit1_1(e,c,sump,sumtype,sumpos,targetp,se)
return not c:IsRace(RACE_FIEND)
end
--
function c1151207.tfilter1_1(c,e,tp)
return c:IsType(TYPE_TUNER) and c1151207.IsLeimi(c) and c:GetLevel()==4 and c:IsCanBeSpecialSummoned(e,0,tp,false,false)
end
function c1151207.tfilter1_2(c,e,tp)
return c:IsRace(RACE_FIEND) and c:GetLevel()==4 and c:IsCanBeSpecialSummoned(e,0,tp,false,false)
end
function c1151207.tg1(e,tp,eg,ep,ev,re,r,rp,chk)
if chk==0 then
local g1=Duel.GetMatchingGroup(c1151207.tfilter1_1,tp,LOCATION_DECK,0,nil,e,tp)
local prepare=0
if g1:GetCount()>0 then
local tc1=g1:GetFirst()
while tc1 do
local g2=Duel.GetMatchingGroup(c1151207.tfilter1_2,tp,LOCATION_DECK,0,tc1,e,tp)
if g2:GetCount()>0 then
prepare=1
break
end
tc1=g1:GetNext()
end
end
if prepare==1 then
return Duel.GetMZoneCount(tp)>1 and not Duel.IsPlayerAffectedByEffect(tp,59822133) and Duel.GetFieldGroupCount(tp,LOCATION_MZONE,0)<1
else
return false
end
end
Duel.SetOperationInfo(0,CATEGORY_SPECIAL_SUMMON,nil,2,tp,LOCATION_DECK)
end
--
function c1151207.ofilter1(c,mg,e,tp)
if not c:IsCode(1151101) then return false end
if c:IsType(TYPE_SYNCHRO) then
return c:IsSynchroSummonable(nil,mg)
else
return false
end
end
function c1151207.op1(e,tp,eg,ep,ev,re,r,rp)
if Duel.GetMZoneCount(tp)<2 then return end
if Duel.IsPlayerAffectedByEffect(tp,59822133) then return end
local gall=Group.CreateGroup()
local real=Group.CreateGroup()
local g1=Duel.GetMatchingGroup(c1151207.tfilter1_1,tp,LOCATION_DECK,0,nil,e,tp)
if g1:GetCount()>0 then
local tc1=g1:GetFirst()
while tc1 do
local g2=Duel.GetMatchingGroup(c1151207.tfilter1_2,tp,LOCATION_DECK,0,tc1,e,tp)
if g2:GetCount()>0 then
gall:AddCard(tc1)
end
tc1=g1:GetNext()
end
end
if gall:GetCount()>0 then
Duel.Hint(HINT_SELECTMSG,tp,HINTMSG_SPSUMMON)
local g3=gall:Select(tp,1,1,nil)
if g3:GetCount()>0 then
local tc3=g3:GetFirst()
real:AddCard(tc3)
local g4=Duel.GetMatchingGroup(c1151207.tfilter1_2,tp,LOCATION_DECK,0,tc3,e,tp)
if g4:GetCount()>0 then
local g5=Duel.SelectMatchingCard(tp,c1151207.tfilter1_2,tp,LOCATION_DECK,0,1,1,tc3,e,tp)
if g5:GetCount()>0 then
local tc5=g5:GetFirst()
real:AddCard(tc5)
if Duel.SpecialSummon(real,0,tp,tp,false,false,POS_FACEUP)==2 then
Duel.BreakEffect()
local g6=Duel.GetMatchingGroup(c1151207.ofilter1,tp,LOCATION_EXTRA,0,nil,real,e,tp)
if not g6 or g6:GetCount()==0 then
Duel.SendtoGrave(real,REASON_EFFECT)
return
end
Duel.Hint(HINT_SELECTMSG,tp,HINTMSG_SPSUMMON)
local g7=g6:Select(tp,1,1,nil)
local tc7=g7:GetFirst()
if tc7:IsType(TYPE_SYNCHRO) then
Duel.SynchroSummon(tp,tc7,nil,real)
end
end
end
end
end
end
end
--红符『红色不夜城』
function c1151211.initial_effect(c)
--
local e1=Effect.CreateEffect(c)
e1:SetCategory(CATEGORY_DESTROY+CATEGORY_DRAW)
e1:SetType(EFFECT_TYPE_ACTIVATE)
e1:SetCode(EVENT_FREE_CHAIN)
e1:SetCountLimit(1,1151211+EFFECT_COUNT_CODE_OATH)
e1:SetCondition(c1151211.con1)
e1:SetTarget(c1151211.tg1)
e1:SetOperation(c1151211.op1)
c:RegisterEffect(e1)
--
end
--
function c1151211.IsLeimi(c)
local m=_G["c"..c:GetCode()]
return m and m.named_with_Leimi
end
c1151211.named_with_Leisp=1
function c1151211.IsLeisp(c)
local m=_G["c"..c:GetCode()]
return c.named_with_Leisp
end
--
function c1151211.cfilter1(c)
return c1151211.IsLeimi(c) and c:IsFaceup()
end
function c1151211.con1(e,tp,eg,ep,ev,re,r,rp)
return Duel.GetMatchingGroupCount(c1151211.cfilter1,tp,LOCATION_MZONE,0,nil)>0
end
--
function c1151211.tfilter1(c)
return c:IsDestructable()
end
function c1151211.GetAvailableCards(c)
local tp=c:GetControler()
local seq=c:GetSequence()
local g=Duel.GetMatchingGroup(aux.checksamecolumn,0,LOCATION_ONFIELD,LOCATION_ONFIELD,nil,c)
g:AddCard(c)
if seq<4 then
local tc1=Duel.GetFieldCard(tp,LOCATION_MZONE,seq+1)
if tc1 then g:AddCard(tc1) end
end
if seq<5 and seq>0 then
local tc1=Duel.GetFieldCard(tp,LOCATION_MZONE,seq-1)
if tc1 then g:AddCard(tc1) end
end
return g
end
function c1151211.tg1(e,tp,eg,ep,ev,re,r,rp,chk,chkc)
if chkc then return chkc:IsLocation(LOCATION_MZONE) and chkc:IsControler(1-tp) and c1151211.tfilter1(chkc) end
if chk==0 then return Duel.IsExistingTarget(c1151211.tfilter1,tp,0,LOCATION_MZONE,1,nil) end
Duel.Hint(HINT_SELECTMSG,tp,HINTMSG_OPPO)
local g=Duel.SelectTarget(tp,c1151211.tfilter1,tp,0,LOCATION_MZONE,1,1,nil)
local gn=c1151211.GetAvailableCards(g:GetFirst())
Duel.SetOperationInfo(0,CATEGORY_DESTROY,gn,gn:GetCount(),0,0)
Duel.SetOperationInfo(0,CATEGORY_TODECK,nil,gn:GetCount(),tp,LOCATION_GRAVE)
end
--
function c1151211.op1(e,tp,eg,ep,ev,re,r,rp)
local tc=Duel.GetFirstTarget()
if tc:IsRelateToEffect(e) and tc:IsLocation(LOCATION_MZONE) then
local g=c1151211.GetAvailableCards(tc)
if Duel.Destroy(g,REASON_EFFECT)~=0 then
Duel.BreakEffect()
local tc2=g:GetFirst()
local num=0
while tc2 do
if tc2:GetOwner()==tp and tc2~=e:GetHandler() then
num=1
break
else
tc2=g:GetNext()
end
end
if num==1 then
Duel.Draw(tp,1,REASON_EFFECT)
end
end
end
end
--必杀『碎心』
function c1151212.initial_effect(c)
--
local e1=Effect.CreateEffect(c)
e1:SetCategory(CATEGORY_DESTROY+CATEGORY_TODECK)
e1:SetProperty(EFFECT_FLAG_CARD_TARGET)
e1:SetType(EFFECT_TYPE_ACTIVATE)
e1:SetCode(EVENT_FREE_CHAIN)
e1:SetCountLimit(1,1151212+EFFECT_COUNT_CODE_OATH)
e1:SetTarget(c1151212.tg1)
e1:SetOperation(c1151212.op1)
c:RegisterEffect(e1)
--
local e2=Effect.CreateEffect(c)
e2:SetCategory(CATEGORY_TOGRAVE+CATEGORY_TODECK+CATEGORY_DRAW)
e2:SetProperty(EFFECT_FLAG_DELAY+EFFECT_FLAG_DAMAGE_STEP)
e2:SetType(EFFECT_TYPE_SINGLE+EFFECT_TYPE_TRIGGER_O)
e2:SetCode(EVENT_REMOVE)
e2:SetCountLimit(1,1151213)
e2:SetCondition(c1151212.con2)
e2:SetTarget(c1151212.tg2)
e2:SetOperation(c1151212.op2)
c:RegisterEffect(e2)
--
end
--
function c1151212.IsLeimi(c)
local m=_G["c"..c:GetCode()]
return m and m.named_with_Leimi
end
c1151212.named_with_Leisp=1
function c1151212.IsLeisp(c)
local m=_G["c"..c:GetCode()]
return c.named_with_Leisp
end
--
function c1151212.tfilter1(c)
return c:IsRace(RACE_FIEND) and c:IsFaceup()
end
function c1151212.tfilter1x(c)
return (c:IsAbleToDeck() or c:IsDestructable()) and c:IsType(TYPE_MONSTER)
end
function c1151212.tg1(e,tp,eg,ep,ev,re,r,rp,chk,chkc)
if chkc then return chkc:IsLocation(LOCATION_ONFIELD) and chkc:IsControler(1-tp) and c1151212.tfilter1x(chkc) end
if chk==0 then return Duel.IsExistingMatchingCard(c1151212.tfilter1,tp,LOCATION_MZONE,0,1,nil) and Duel.IsExistingTarget(c1151212.tfilter1x,tp,0,LOCATION_ONFIELD,1,nil) end
Duel.Hint(HINT_SELECTMSG,tp,HINTMSG_OPPO)
local g=Duel.SelectTarget(tp,c1151212.tfilter1x,tp,0,LOCATION_ONFIELD,1,1,nil)
end
--
function c1151212.op1(e,tp,eg,ep,ev,re,r,rp)
local tc=Duel.GetFirstTarget()
if tc and tc:IsRelateToEffect(e) and tc:IsLocation(LOCATION_MZONE) and not tc:IsImmuneToEffect(e) then
local code=tc:GetCode()
if tc:IsDestructable() and not tc:IsAbleToDeck() then
local sel=Duel.SelectOption(tp,aux.Stringid(1151212,0))
if sel==0 then
Duel.Destroy(tc,REASON_EFFECT)
end
else
if tc:IsDestructable() and tc:IsAbleToDeck() then
local sel=Duel.SelectOption(tp,aux.Stringid(1151212,0),aux.Stringid(1151212,1))
if sel==0 then
Duel.Destroy(tc,REASON_EFFECT)
else
Duel.SendtoDeck(tc,nil,1,REASON_EFFECT)
end
else
if not tc:IsDestructable() and tc:IsAbleToDeck() then
local sel=Duel.SelectOption(tp,aux.Stringid(1151212,1))
if sel==0 then
Duel.SendtoDeck(tc,1,REASON_EFFECT)
end
end
end
end
local e1_1=Effect.CreateEffect(e:GetHandler())
e1_1:SetType(EFFECT_TYPE_FIELD)
e1_1:SetProperty(EFFECT_FLAG_PLAYER_TARGET)
e1_1:SetCode(EFFECT_CANNOT_SPECIAL_SUMMON)
e1_1:SetTargetRange(0,1)
e1_1:SetTarget(c1151212.limit1_1)
e1_1:SetLabel(code)
e1_1:SetReset(RESET_PHASE+PHASE_END)
Duel.RegisterEffect(e1_1,tp)
local e1_2=e1_1:Clone()
e1_2:SetCode(EFFECT_CANNOT_SUMMON)
Duel.RegisterEffect(e1_2,tp)
Duel.Damage(tp,800,REASON_EFFECT)
end
end
function c1151212.limit1_1(e,c,sump,sumtype,sumpos,targetp,se)
return c:IsCode(e:GetLabel())
end
--
function c1151212.con2(e,tp,eg,ep,ev,re,r,rp)
return e:GetHandler():IsPreviousLocation(LOCATION_GRAVE)
end
--
function c1151212.tfilter2(c)
return c:IsAbleToGrave() or c:IsAbleToDeck()
end
function c1151212.tg2(e,tp,eg,ep,ev,re,r,rp,chk)
if chk==0 then return Duel.GetFieldGroupCount(c1151212.tfilter2,tp,0,LOCATION_HAND,1,nil) end
end
function c1151212.op2(e,tp,eg,ep,ev,re,r,rp)
local gn=Duel.GetFieldGroup(1-tp,0,LOCATION_HAND)
Duel.ConfirmCards(1-tp,gn)
Duel.Hint(HINT_SELECTMSG,tp,HINTMSG_OPPO)
local g=Duel.SelectMatchingCard(tp,c1151212.tfilter2,tp,0,LOCATION_HAND,1,1,nil)
if g:GetCount()>0 then
local tc=g:GetFirst()
if tc:IsAbleToGrave() and not tc:IsAbleToDeck() then
local sel=Duel.SelectOption(tp,aux.Stringid(1151212,2))
if sel==0 then
if Duel.SendtoGrave(tc,REASON_EFFECT)~=0 and Duel.IsPlayerCanDraw(1-tp,1) then
Duel.BreakEffect()
Duel.Draw(1-tp,1,REASON_EFFECT)
end
end
else
if tc:IsAbleToGrave() and tc:IsAbleToDeck() then
local sel=Duel.SelectOption(tp,aux.Stringid(1151212,2),aux.Stringid(1151212,3))
if sel==0 then
if Duel.SendtoGrave(tc,REASON_EFFECT)~=0 and Duel.IsPlayerCanDraw(1-tp,1) then
Duel.BreakEffect()
Duel.Draw(1-tp,1,REASON_EFFECT)
end
else
if Duel.SendtoDeck(tc,nil,1,REASON_EFFECT)~=0 and Duel.IsPlayerCanDraw(1-tp,1) then
Duel.BreakEffect()
Duel.Draw(1-tp,1,REASON_EFFECT)
end
end
else
if not tc:IsAbleToGrave() and tc:IsAbleToDeck() then
local sel=Duel.SelectOption(tp,aux.Stringid(1151212,3))
if sel==0 then
if Duel.SendtoDeck(tc,nil,1,REASON_EFFECT)~=0 and Duel.IsPlayerCanDraw(1-tp,1) then
Duel.BreakEffect()
Duel.Draw(1-tp,1,REASON_EFFECT)
end
end
end
end
end
end
end
--
--神枪『冈格尼尔之枪』
function c1151214.initial_effect(c)
--
local e1=Effect.CreateEffect(c)
e1:SetCategory(CATEGORY_DRAW+CATEGORY_DESTROY)
e1:SetType(EFFECT_TYPE_ACTIVATE)
e1:SetCode(EVENT_FREE_CHAIN)
e1:SetCountLimit(1,1151214+EFFECT_COUNT_CODE_OATH)
e1:SetTarget(c1151214.tg1)
e1:SetOperation(c1151214.op1)
c:RegisterEffect(e1)
--
local e2=Effect.CreateEffect(c)
e2:SetCategory(CATEGORY_EQUIP)
e2:SetType(EFFECT_TYPE_IGNITION)
e2:SetRange(LOCATION_GRAVE)
e2:SetCountLimit(1,1151215)
e2:SetTarget(c1151214.tg2)
e2:SetOperation(c1151214.op2)
c:RegisterEffect(e2)
--
local e3=Effect.CreateEffect(c)
e3:SetType(EFFECT_TYPE_SINGLE)
e3:SetCode(EFFECT_EQUIP_LIMIT)
e3:SetProperty(EFFECT_FLAG_CANNOT_DISABLE)
e3:SetValue(c1151214.limit3)
c:RegisterEffect(e3)
--
local e4=Effect.CreateEffect(c)
e4:SetType(EFFECT_TYPE_FIELD+EFFECT_TYPE_CONTINUOUS)
e4:SetCode(EVENT_EQUIP)
e4:SetRange(LOCATION_SZONE)
e4:SetOperation(c1151214.op4)
c:RegisterEffect(e4)
--
end
--
function c1151214.IsLeimi(c)
local m=_G["c"..c:GetCode()]
return m and m.named_with_Leimi
end
c1151214.named_with_Leisp=1
function c1151214.IsLeisp(c)
local m=_G["c"..c:GetCode()]
return c.named_with_Leisp
end
--
function c1151214.tg1(e,tp,eg,ep,ev,re,r,rp,chk)
local g=Duel.GetMatchingGroupCount(aux.TRUE,tp,0,LOCATION_MZONE,nil)
local g2=Duel.GetMatchingGroupCount(aux.TRUE,tp,LOCATION_MZONE,0,nil)
if chk==0 then return Duel.IsPlayerCanDraw(tp,1) and g>g2 end
Duel.SetOperationInfo(0,CATEGORY_DRAW,nil,0,tp,1)
end
function c1151214.op1(e,tp,eg,ep,ev,re,r,rp)
if Duel.Draw(tp,1,REASON_EFFECT)~=0 then
local tc=Duel.GetOperatedGroup():GetFirst()
Duel.ConfirmCards(1-tp,tc)
if (c1151214.IsLeisp(tc) or tc:IsRace(RACE_FIEND)) then
if Duel.GetMatchingGroupCount(Card.IsDestructable,tp,0,LOCATION_ONFIELD,nil)>0 and Duel.SelectYesNo(tp,aux.Stringid(1151214,0)) then
Duel.Hint(HINT_SELECTMSG,tp,HINTMSG_DESTROY)
local dg=Duel.SelectMatchingCard(tp,Card.IsDestructable,tp,0,LOCATION_ONFIELD,1,1,nil)
Duel.Destroy(dg,REASON_EFFECT)
end
end
else
Duel.Destroy(tc,REASON_EFFECT)
end
Duel.ShuffleHand(tp)
end
--
function c1151214.tfilter2(c)
return c:IsFaceup() and c1151214.IsLeimi(c)
end
function c1151214.tg2(e,tp,eg,ep,ev,re,r,rp,chk,chkc)
if chkc then return chkc:IsLocation(LOCATION_MZONE) and chkc:IsControler(tp) and c1151214.tfilter2(chkc) end
if chk==0 then return Duel.GetLocationCount(tp,LOCATION_SZONE)>0 and Duel.IsExistingTarget(c1151214.tfilter2,tp,LOCATION_MZONE,0,1,nil) end
Duel.Hint(HINT_SELECTMSG,tp,HINTMSG_EQUIP)
Duel.SelectTarget(tp,c1151214.tfilter2,tp,LOCATION_MZONE,0,1,1,nil)
end
--
function c1151214.op2(e,tp,eg,ep,ev,re,r,rp)
local c=e:GetHandler()
if c:IsRelateToEffect(e) and c:IsLocation(LOCATION_MZONE) then
local tc=Duel.GetFirstTarget()
if Duel.GetLocationCount(tp,LOCATION_SZONE)>0 and tc:IsFaceup() and tc:IsRelateToEffect(e) then
local e2_1=Effect.CreateEffect(c)
e2_1:SetType(EFFECT_TYPE_SINGLE)
e2_1:SetCode(EFFECT_CHANGE_TYPE)
e2_1:SetProperty(EFFECT_FLAG_CANNOT_DISABLE)
e2_1:SetValue(TYPE_EQUIP+TYPE_SPELL)
e2_1:SetReset(RESET_EVENT+0x1fe0000)
c:RegisterEffect(e2_1,true)
Duel.Equip(tp,c,tc,true)
local e2_2=Effect.CreateEffect(c)
e2_2:SetType(EFFECT_TYPE_SINGLE)
e2_2:SetCode(EFFECT_LEAVE_FIELD_REDIRECT)
e2_2:SetProperty(EFFECT_FLAG_CANNOT_DISABLE)
e2_2:SetReset(RESET_EVENT+0x47e0000)
e2_2:SetValue(LOCATION_REMOVED)
c:RegisterEffect(e2_2,true)
end
end
end
--
function c1151214.limit3(e,c)
return c1151214.IsLeimi(c)
end
--
function c1151214.op4(e,tp,eg,ep,ev,re,r,rp)
if eg:GetFirst()~=e:GetHandler() then return end
local tc=e:GetHandler():GetEquipTarget()
if tc then
local e4_1=Effect.CreateEffect(e:GetHandler())
e4_1:SetDescription(aux.Stringid(1151214,0))
e4_1:SetCategory(CATEGORY_TOHAND+CATEGORY_TODECK)
e4_1:SetType(EFFECT_TYPE_SINGLE+EFFECT_TYPE_TRIGGER_O)
e4_1:SetRange(LOCATION_MZONE)
e4_1:SetCode(EVENT_BATTLE_DAMAGE)
e4_1:SetLabelObject(e:GetHandler())
e4_1:SetCondition(c1151214.con4_1)
e4_1:SetTarget(c1151214.tg4_1)
e4_1:SetOperation(c1151214.op4_1)
tc:RegisterEffect(e4_1,true)
if e4_1:GetHandler()==nil then return end
end
end
--
function c1151214.con4_1(e)
local g=e:GetHandler():GetEquipGroup()
if g:IsContains(e:GetLabelObject()) then
return not e:GetLabelObject():IsDisabled()
else return false
end
end
--
function c1151214.tfilter4_1(c)
return c:IsAbleToHand()
end
function c1151214.tg4_1(e,tp,eg,ep,ev,re,r,rp,chk)
if chk==0 then return Duel.IsExistingMatchingCard(c1151214.tfilter4_1,tp,LOCATION_GRAVE,0,1,nil) end
Duel.SetOperationInfo(0,CATEGORY_TOHAND,0,1,0,LOCATION_GRAVE)
end
--
function c1151214.ofilter4_1(c)
return c:IsAbleToDeck()
end
function c1151214.op4_1(e,tp,eg,ep,ev,re,r,rp)
Duel.Hint(HINT_SELECTMSG,tp,HINTMSG_ATOHAND)
local g=Duel.SelectMatchingCard(tp,c1151214.tfilter4_1,tp,LOCATION_GRAVE,0,1,1,nil)
if g:GetCount()>0 then
if Duel.SendtoHand(g,1-tp,REASON_EFFECT)~=0 and Duel.GetFieldGroupCount(tp,0,LOCATION_HAND)>0 then
local g2=Duel.GetFieldGroup(tp,0,LOCATION_HAND)
if g2:GetCount()>0 then
Duel.ConfirmCards(tp,g2)
local g3=Duel.SelectMatchingCard(tp,c1151214.ofilter4_1,tp,0,LOCATION_HAND,1,1,nil)
if g3:GetCount()>0 then
local sel=Duel.SelectOption(tp,aux.Stringid(1151214,1),aux.Stringid(1151214,2))
if sel==0 then
Duel.SendtoDeck(g3,nil,2,REASON_EFFECT)
else
Duel.SendtoDeck(g3,nil,1,REASON_EFFECT)
end
end
end
end
end
end
----
--红蝙蝠『吸血鬼之夜』
function c1151216.initial_effect(c)
--
local e1=Effect.CreateEffect(c)
e1:SetCategory(CATEGORY_SPECIAL_SUMMON)
e1:SetType(EFFECT_TYPE_ACTIVATE)
e1:SetCode(EVENT_FREE_CHAIN)
e1:SetCountLimit(1,1151216+EFFECT_COUNT_CODE_OATH)
e1:SetCost(c1151216.cost1)
e1:SetCondition(c1151216.con1)
e1:SetTarget(c1151216.tg1)
e1:SetOperation(c1151216.op1)
c:RegisterEffect(e1)
--
local e2=Effect.CreateEffect(c)
e2:SetCategory(CATEGORY_DRAW+CATEGORY_TODECK)
e2:SetProperty(EFFECT_FLAG_PLAYER_TARGET)
e2:SetType(EFFECT_TYPE_IGNITION)
e2:SetRange(LOCATION_GRAVE)
e2:SetCountLimit(1,1151222)
e2:SetCost(c1151216.cost2)
e2:SetTarget(c1151216.tg2)
e2:SetOperation(c1151216.op2)
c:RegisterEffect(e2)
--
Duel.AddCustomActivityCounter(1151216,ACTIVITY_SUMMON,c1151216.counterfilter)
end
--
function c1151216.IsLeimi(c)
local m=_G["c"..c:GetCode()]
return m and m.named_with_Leimi
end
c1151216.named_with_Leisp=1
function c1151216.IsLeisp(c)
local m=_G["c"..c:GetCode()]
return c.named_with_Leisp
end
--
function c1151216.counterfilter(c)
return c1151216.IsLeimi(c)
end
--
function c1151216.cfilter1(c)
return c:IsRace(RACE_FIEND) and c:IsFaceup()
end
function c1151216.con1(e,tp,eg,ep,ev,re,r,rp)
return Duel.IsExistingMatchingCard(c1151216.cfilter1,tp,LOCATION_MZONE,0,1,nil)
end
--
function c1151216.cost1(e,tp,eg,ep,ev,re,r,rp,chk)
if chk==0 then return Duel.CheckLPCost(tp,1200) and Duel.GetCustomActivityCount(1151216,tp,ACTIVITY_SUMMON)==0 end
local e1_1=Effect.CreateEffect(e:GetHandler())
e1_1:SetType(EFFECT_TYPE_FIELD)
e1_1:SetProperty(EFFECT_FLAG_PLAYER_TARGET+EFFECT_FLAG_OATH)
e1_1:SetCode(EFFECT_CANNOT_SUMMON)
e1_1:SetReset(RESET_PHASE+PHASE_END)
e1_1:SetTargetRange(1,0)
e1_1:SetTarget(c1151216.splimit1_1)
Duel.RegisterEffect(e1_1,tp)
Duel.PayLPCost(tp,1200)
end
function c1151216.splimit1_1(e,c)
return not c1151216.IsLeimi(c)
end
--
function c1151216.tg1(e,tp,eg,ep,ev,re,r,rp,chk)
if chk==0 then return Duel.GetMZoneCount(tp)>0 and Duel.IsPlayerCanSpecialSummonMonster(tp,1151998,0,0x4011,200,200,1,RACE_FIEND,ATTRIBUTE_DARK) end
Duel.SetOperationInfo(0,CATEGORY_TOKEN,nil,1,0,0)
Duel.SetOperationInfo(0,CATEGORY_SPECIAL_SUMMON,nil,1,0,0)
end
--
function c1151216.op1(e,tp,eg,ep,ev,re,r,rp)
if Duel.GetMZoneCount(tp)>0 and Duel.IsPlayerCanSpecialSummonMonster(tp,1151998,0,0x4011,200,200,1,RACE_FIEND,ATTRIBUTE_DARK) then
local ft=2
if Duel.IsPlayerAffectedByEffect(tp,59822133) then
ft=1
end
for i=1,ft do
if Duel.GetMZoneCount(tp)>0 then
local token=Duel.CreateToken(tp,1151998)
Duel.SpecialSummonStep(token,0,tp,tp,false,false,POS_FACEUP)
end
end
Duel.SpecialSummonComplete()
end
end
--
function c1151216.cfilter2(c)
return c:IsRace(RACE_FIEND) and c:IsAbleToRemoveAsCost()
end
function c1151216.cost2(e,tp,eg,ep,ev,re,r,rp,chk)
if chk==0 then return e:GetHandler():IsAbleToRemoveAsCost() and Duel.IsExistingMatchingCard(c1151216.cfilter2,tp,LOCATION_GRAVE,0,1,nil) end
Duel.Hint(HINT_SELECTMSG,tp,HINTMSG_REMOVE)
local g=Duel.SelectMatchingCard(tp,c1151216.cfilter2,tp,LOCATION_GRAVE,0,1,1,nil)
g:AddCard(e:GetHandler())
Duel.Remove(g,POS_FACEUP,REASON_COST)
end
--
function c1151216.tfilter2(c)
return c:IsRace(RACE_FIEND)
end
function c1151216.tg2(e,tp,eg,ep,ev,re,r,rp,chk)
if chk==0 then return Duel.IsPlayerCanDraw(tp,1) and Duel.CheckReleaseGroup(tp,c1151216.tfilter2,1,nil) end
Duel.SetOperationInfo(0,CATEGORY_DRAW,nil,1,0,0)
end
--
function c1151216.op2(e,tp,eg,ep,ev,re,r,rp)
Duel.Hint(HINT_SELECTMSG,tp,HINTMSG_RELEASE)
local g=Duel.SelectReleaseGroup(tp,c1151216.tfilter2,1,1,nil)
if g:GetCount()>0 then
if Duel.Release(g,REASON_EFFECT)~=0 then
Duel.Draw(tp,1,REASON_EFFECT)
Duel.BreakEffect()
local e2_1=Effect.CreateEffect(e:GetHandler())
e2_1:SetType(EFFECT_TYPE_FIELD)
e2_1:SetCode(EFFECT_REFLECT_DAMAGE)
e2_1:SetProperty(EFFECT_FLAG_PLAYER_TARGET)
e2_1:SetTargetRange(1,0)
e2_1:SetReset(RESET_PHASE+PHASE_END)
Duel.RegisterEffect(e2_1,tp)
end
end
end
--神鬼『蕾米莉亚潜行者』
function c1151217.initial_effect(c)
--
local e1=Effect.CreateEffect(c)
e1:SetCategory(CATEGORY_TOGRAVE+CATEGORY_REMOVE)
e1:SetType(EFFECT_TYPE_ACTIVATE)
e1:SetCode(EVENT_CHAINING)
e1:SetCountLimit(1,1151217+EFFECT_COUNT_CODE_OATH)
e1:SetCondition(c1151217.con1)
e1:SetTarget(c1151217.tg1)
e1:SetOperation(c1151217.op1)
c:RegisterEffect(e1)
--
local e2=Effect.CreateEffect(c)
e2:SetCategory(CATEGORY_SPECIAL_SUMMON)
e2:SetType(EFFECT_TYPE_IGNITION)
e2:SetRange(LOCATION_GRAVE)
e2:SetCountLimit(1,1151218)
e2:SetCost(c1151217.cost2)
e2:SetCondition(c1151217.con2)
e2:SetTarget(c1151217.tg2)
e2:SetOperation(c1151217.op2)
c:RegisterEffect(e2)
--
end
--
function c1151217.IsLeimi(c)
local m=_G["c"..c:GetCode()]
return m and m.named_with_Leimi
end
c1151217.named_with_Leisp=1
function c1151217.IsLeisp(c)
local m=_G["c"..c:GetCode()]
return c.named_with_Leisp
end
--
function c1151217.cfilter1(c)
return c:IsRace(RACE_FIEND) and c:IsFaceup()
end
function c1151217.con1(e,tp,eg,ep,ev,re,r,rp)
return Duel.IsExistingMatchingCard(c1151217.cfilter1,tp,LOCATION_MZONE,0,1,nil)
end
--
function c1151217.tg1(e,tp,eg,ep,ev,re,r,rp,chk)
if chk==0 then return Duel.GetFieldGroupCount(tp,0,LOCATION_EXTRA+LOCATION_HAND+LOCATION_DECK)>0 end
end
--
function c1151217.op1(e,tp,eg,ep,ev,re,r,rp)
local code=re:GetHandler():GetCode()
local g=Duel.GetFieldGroup(tp,0,LOCATION_EXTRA+LOCATION_HAND+LOCATION_DECK)
Duel.ConfirmCards(tp,g)
local tg=g:Filter(Card.IsCode,nil,code)
if tg:GetCount()>0 then
local sel=Duel.SelectOption(tp,aux.Stringid(1151217,0),aux.Stringid(1151217,1))
if sel==0 then
Duel.Remove(tg,POS_FACEUP,REASON_EFFECT)
else
Duel.SendtoGrave(tg,REASON_EFFECT)
end
end
Duel.ShuffleHand(1-tp)
end
--
function c1151217.cfilter2(c)
return c:IsRace(RACE_FIEND) and c:IsAbleToRemoveAsCost()
end
function c1151217.cost2(e,tp,eg,ep,ev,re,r,rp,chk)
if chk==0 then return e:GetHandler():IsAbleToRemoveAsCost() and Duel.IsExistingMatchingCard(c1151217.cfilter2,tp,LOCATION_GRAVE,0,1,nil) end
Duel.Hint(HINT_SELECTMSG,tp,HINTMSG_REMOVE)
local g=Duel.SelectMatchingCard(tp,c1151217.cfilter2,tp,LOCATION_GRAVE,0,1,1,nil)
g:AddCard(e:GetHandler())
Duel.Remove(g,POS_FACEUP,REASON_COST)
end
--
function c1151217.confilter2(c)
return c1151217.IsLeimi(c) and c:IsFaceup()
end
function c1151217.con2(e,tp,eg,ep,ev,re,r,rp)
return not Duel.IsExistingMatchingCard(c1151217.confilter2,tp,LOCATION_MZONE,0,1,nil)
end
--
function c1151217.tfilter2(c,e,tp)
return c1151217.IsLeimi(c) and c:IsCanBeSpecialSummoned(e,0,tp,false,false)
end
function c1151217.tg2(e,tp,eg,ep,ev,re,r,rp,chk)
if chk==0 then return Duel.IsExistingMatchingCard(c1151217.tfilter2,tp,LOCATION_DECK,0,1,nil,e,tp) end
Duel.SetOperationInfo(0,CATEGORY_SPECIAL_SUMMON,nil,1,tp,LOCATION_DECK)
end
--
function c1151217.op2(e,tp,eg,ep,ev,re,r,rp)
Duel.Hint(HINT_SELECTMSG,tp,HINTMSG_SPSUMMON)
local g=Duel.SelectMatchingCard(tp,c1151217.tfilter2,tp,LOCATION_DECK,0,1,1,nil,e,tp)
if g:GetCount()>0 then
Duel.SpecialSummon(g,0,tp,tp,false,false,POS_FACEUP)
end
end
--运命『悲惨的命运』
function c1151219.initial_effect(c)
--
local e1=Effect.CreateEffect(c)
e1:SetCategory(CATEGORY_TOGRAVE+CATEGORY_TOHAND+CATEGORY_DESTROY+CATEGORY_SEARCH)
e1:SetType(EFFECT_TYPE_ACTIVATE)
e1:SetCode(EVENT_FREE_CHAIN)
e1:SetCountLimit(1,1151219+EFFECT_COUNT_CODE_OATH)
e1:SetCost(c1151219.cost1)
e1:SetTarget(c1151219.tg1)
e1:SetOperation(c1151219.op1)
c:RegisterEffect(e1)
--
local e2=Effect.CreateEffect(c)
e2:SetDescription(aux.Stringid(1151219,2))
e2:SetType(EFFECT_TYPE_CONTINUOUS+EFFECT_TYPE_FIELD)
e2:SetCode(EFFECT_DESTROY_REPLACE)
e2:SetRange(LOCATION_GRAVE)
e2:SetCountLimit(1)
e2:SetCondition(c1151219.con2)
e2:SetTarget(c1151219.tg2)
e2:SetValue(c1151219.val2)
e2:SetOperation(c1151219.op2)
c:RegisterEffect(e2)
--
end
--
function c1151219.IsLeimi(c)
local m=_G["c"..c:GetCode()]
return m and m.named_with_Leimi
end
c1151219.named_with_Leisp=1
function c1151219.IsLeisp(c)
local m=_G["c"..c:GetCode()]
return c.named_with_Leisp
end
--
function c1151219.cfilter1(c)
return c:IsRace(RACE_FIEND) and c:IsReleasable()
end
function c1151219.cfilter1x(c)
return c:IsRace(RACE_FIEND) and c:IsAbleToRemoveAsCost()
end
function c1151219.cost1(e,tp,eg,ep,ev,re,r,rp,chk)
if chk==0 then return Duel.CheckReleaseGroup(tp,c1151219.cfilter1,1,nil) or Duel.IsExistingMatchingCard(c1151219.cfilter1x,tp,LOCATION_GRAVE,0,2,nil) end
if Duel.CheckReleaseGroup(tp,c1151219.cfilter1,1,nil) and not Duel.IsExistingMatchingCard(c1151219.cfilter1x,tp,LOCATION_GRAVE,0,2,nil) then
Duel.Hint(HINT_SELECTMSG,tp,HINTMSG_RELEASE)
local g=Duel.SelectMatchingCard(tp,c1151219.cfilter1,tp,LOCATION_MZONE,0,1,1,nil)
if g:GetCount()>0 then
Duel.Release(g,REASON_EFFECT)
end
else
if Duel.IsExistingMatchingCard(c1151219.cfilter1x,tp,LOCATION_GRAVE,0,2,nil) and not Duel.CheckReleaseGroup(tp,c1151219.cfilter1,1,nil) then
Duel.Hint(HINT_SELECTMSG,tp,HINTMSG_REMOVE)
local g=Duel.SelectMatchingCard(tp,c1151219.cfilter1x,tp,LOCATION_GRAVE,0,2,2,nil)
if g:GetCount()>0 then
Duel.Remove(g,POS_FACEUP,REASON_EFFECT)
end
else
if Duel.IsExistingMatchingCard(c1151219.cfilter1x,tp,LOCATION_GRAVE,0,2,nil) and Duel.CheckReleaseGroup(tp,c1151219.cfilter1,1,nil) then
local sel=Duel.SelectOption(tp,aux.Stringid(1151219,0),aux.Stringid(1151219,1))
if sel==0 then
Duel.Hint(HINT_SELECTMSG,tp,HINTMSG_RELEASE)
local g=Duel.SelectMatchingCard(tp,c1151219.cfilter1,tp,LOCATION_MZONE,0,1,1,nil)
if g:GetCount()>0 then
Duel.Release(g,REASON_EFFECT)
end
else
Duel.Hint(HINT_SELECTMSG,tp,HINTMSG_REMOVE)
local g=Duel.SelectMatchingCard(tp,c1151219.cfilter1x,tp,LOCATION_GRAVE,0,2,2,nil)
if g:GetCount()>0 then
Duel.Remove(g,POS_FACEUP,REASON_EFFECT)
end
end
end
end
end
end
--
function c1151219.tfilter1_M(c)
return c:IsType(TYPE_MONSTER)
end
function c1151219.tfilter1_S(c)
return c:IsType(TYPE_SPELL)
end
function c1151219.tfilter1_T(c)
return c:IsType(TYPE_TRAP)
end
function c1151219.tg1(e,tp,eg,ep,ev,re,r,rp,chk)
if chk==0 then return Duel.GetFieldGroupCount(1-tp,LOCATION_DECK,0)>1 end
end
--
function c1151219.ofilter1x1(c)
return c:IsRace(RACE_FIEND) and c:IsAbleToGrave()
end
function c1151219.ofilter1x2(c)
return c:IsAbleToHand()
end
function c1151219.ofilter1x3(c)
return (c:IsType(TYPE_SPELL) or c:IsType(TYPE_TRAP)) and c:IsDestructable()
end
function c1151219.op1(e,tp,eg,ep,ev,re,r,rp)
if Duel.GetFieldGroupCount(1-tp,LOCATION_DECK,0)>1 then
Duel.ConfirmDecktop(1-tp,2)
local g=Duel.GetDecktopGroup(1-tp,2)
if g:GetCount()>0 then
if g:IsExists(c1151219.tfilter1_M,1,nil) then
local g1=Duel.GetMatchingGroup(c1151219.ofilter1x1,tp,LOCATION_DECK,0,nil)
if g1:GetCount()>0 then
Duel.Hint(HINT_SELECTMSG,tp,HINTMSG_TOGRAVE)
local g2=Duel.SelectMatchingCard(tp,c1151219.ofilter1x1,tp,LOCATION_DECK,0,1,1,nil)
if g2:GetCount()>0 then
Duel.SendtoGrave(g2,REASON_EFFECT)
end
end
end
if g:IsExists(c1151219.tfilter1_S,1,nil) then
if g:IsExists(c1151219.ofilter1x2,1,nil) then
Duel.Hint(HINT_SELECTMSG,tp,HINTMSG_ATOHAND)
local g3=g:FilterSelect(tp,c1151219.ofilter1x2,1,1,nil)
if g3:GetCount()>0 then
Duel.SendtoHand(g3,tp,REASON_EFFECT)
Duel.ConfirmCards(1-tp,g3)
end
end
end
if g:IsExists(c1151219.tfilter1_T,1,nil) then
local g4=Duel.GetMatchingGroup(c1151219.ofilter1x1,tp,0,LOCATION_HAND,nil)
if g4:GetCount()>0 then
Duel.ConfirmCards(tp,g4)
if g4:IsExists(c1151219.ofilter1x3,1,nil) then
Duel.Hint(HINT_SELECTMSG,tp,HINTMSG_DESTROY)
local g4=Duel.SelectMatchingCard(tp,c1151219.ofilter1x3,tp,0,LOCATION_HAND,1,1,nil)
if g4:GetCount()>0 then
Duel.Destroy(g4,REASON_EFFECT)
end
end
end
end
end
Duel.ShuffleDeck(1-tp)
end
end
--
function c1151219.cfilter2(c)
return c1151219.IsLeimi(c) and c:IsFaceup()
end
function c1151219.con2(e,tp,eg,ep,ev,re,r,rp)
return Duel.IsExistingMatchingCard(c1151219.cfilter2,tp,LOCATION_MZONE,0,1,nil)
end
--
function c1151219.tfilter2(c,tp)
return c:IsLocation(LOCATION_ONFIELD) and c:IsControler(tp) and c:IsReason(REASON_EFFECT)
end
function c1151219.tg2(e,tp,eg,ep,ev,re,r,rp,chk)
if chk==0 then return e:GetHandler():IsAbleToRemove() and eg:IsExists(c1151219.tfilter2,1,nil,tp) end
return Duel.SelectYesNo(tp,aux.Stringid(1151219,2))
end
--
function c1151219.val2(e,c)
return c1151219.tfilter2(c,e:GetHandlerPlayer())
end
--
function c1151219.op2(e,tp,eg,ep,ev,re,r,rp)
Duel.Remove(e:GetHandler(),POS_FACEUP,REASON_EFFECT)
end
--
\ No newline at end of file
--『绯色命运』
function c1151220.initial_effect(c)
--
local e1=Effect.CreateEffect(c)
e1:SetCategory(CATEGORY_TOGRAVE+CATEGORY_TOHAND+CATEGORY_SEARCH)
e1:SetType(EFFECT_TYPE_ACTIVATE)
e1:SetCode(EVENT_FREE_CHAIN)
e1:SetCountLimit(1,1151220+EFFECT_COUNT_CODE_OATH)
e1:SetTarget(c1151220.tg1)
e1:SetOperation(c1151220.op1)
c:RegisterEffect(e1)
--
local e2=Effect.CreateEffect(c)
e2:SetType(EFFECT_TYPE_QUICK_O)
e2:SetCode(EVENT_FREE_CHAIN)
e2:SetRange(LOCATION_GRAVE)
e2:SetCountLimit(1,1151221)
e2:SetCondition(c1151220.con2)
e2:SetCost(c1151220.cost2)
e2:SetOperation(c1151220.op2)
c:RegisterEffect(e2)
--
end
--
function c1151220.IsLeimi(c)
local m=_G["c"..c:GetCode()]
return m and m.named_with_Leimi
end
c1151220.named_with_Leisp=1
function c1151220.IsLeisp(c)
local m=_G["c"..c:GetCode()]
return c.named_with_Leisp
end
--
function c1151220.tg1(e,tp,eg,ep,ev,re,r,rp,chk)
local tc=Duel.GetDecktopGroup(tp,1):GetFirst()
if chk==0 then return tc end
Duel.Hint(HINT_SELECTMSG,tp,aux.Stringid(1151220,3))
e:SetLabel(Duel.SelectOption(tp,70,71,72))
end
--
function c1151220.ofilter1(c)
return c:IsAbleToGrave() and c1151220.IsLeimi(c)
end
function c1151220.op1(e,tp,eg,ep,ev,re,r,rp)
local tc=Duel.GetDecktopGroup(tp,1):GetFirst()
if tc then
local t=0
local opt=e:GetLabel()
if opt==0 then t=TYPE_MONSTER
else
if opt==1 then t=TYPE_SPELL
else t=TYPE_TRAP
end
end
Duel.ConfirmDecktop(tp,1)
if tc:IsType(t) and tc:IsAbleToHand() then
Duel.SendtoHand(tc,tp,REASON_EFFECT)
Duel.ConfirmCards(1-tp,tc)
end
if not tc:IsType(t) and tc:IsAbleToGrave() then
if Duel.SendtoGrave(tc,REASON_EFFECT)~=0 and Duel.IsExistingMatchingCard(c1151220.ofilter1,tp,LOCATION_DECK,0,1,nil) then
Duel.BreakEffect()
Duel.Hint(HINT_SELECTMSG,tp,HINTMSG_TOGRAVE)
local g=Duel.SelectMatchingCard(tp,c1151220.ofilter1,tp,LOCATION_DECK,0,1,1,nil)
if g:GetCount()>0 then
Duel.SendtoGrave(g,nil,REASON_EFFECT)
end
end
end
end
end
--
function c1151220.con2(e,tp,eg,ep,ev,re,r,rp)
local ph=Duel.GetCurrentPhase()
return Duel.GetTurnPlayer()~=tp and ph~=PHASE_MAIN2 and ph~=PHASE_END
end
--
function c1151220.cost2(e,tp,eg,ep,ev,re,r,rp,chk)
if chk==0 then return e:GetHandler():IsAbleToRemoveAsCost() end
Duel.Remove(e:GetHandler(),POS_FACEUP,REASON_COST)
end
--
function c1151220.cfilter2(c)
return c1151220.IsLeimi(c)
end
function c1151220.cfilter2x1(c)
return c:IsRace(RACE_FIEND)
end
function c1151220.cfilter2x2(c)
return c1151220.IsLeimi(c) and c:IsAbleToHand()
end
function c1151220.tg2(e,tp,eg,ep,ev,re,r,rp,chk)
if chk==0 then return Duel.IsExistingMatchingCard(c1151220.cfilter2,tp,LOCATION_DECK,0,1,nil) or (Duel.CheckReleaseGroup(tp,c1151220.tfilter2x1,1,nil) and Duel.IsExistingMatchingCard(c1151220.cfilter2x2,tp,LOCATION_GRAVE,0,1,nil)) end
end
--
function c1151220.ofilter2(c)
return c1151220.IsLeimi(c)
end
function c1151220.ofilter2x1(c)
return c:IsRace(RACE_FIEND)
end
function c1151220.ofilter2x2(c)
return c1151220.IsLeimi(c)
end
function c1151220.op2(e,tp,eg,ep,ev,re,r,rp)
if Duel.IsExistingMatchingCard(c1151220.cfilter2,tp,LOCATION_DECK,0,1,nil) and not (Duel.CheckReleaseGroup(tp,c1151220.tfilter2x1,1,nil) and Duel.IsExistingMatchingCard(c1151220.cfilter2x2,tp,LOCATION_GRAVE,0,1,nil)) then
local sel=Duel.SelectOption(tp,aux.Stringid(1151220,0))
if sel==0 then
Duel.Hint(HINT_SELECTMSG,tp,aux.Stringid(1151220,2))
local g=Duel.SelectMatchingCard(tp,c1151220.ofilter2,tp,LOCATION_DECK,0,1,1,nil)
if g:GetCount()>0 then
local tc=g:GetFirst()
Duel.ShuffleDeck(tp)
Duel.MoveSequence(tc,0)
Duel.ConfirmDecktop(tp,1)
end
end
end
if Duel.IsExistingMatchingCard(c1151220.cfilter2,tp,LOCATION_DECK,0,1,nil) and (Duel.CheckReleaseGroup(tp,c1151220.tfilter2x1,1,nil) and Duel.IsExistingMatchingCard(c1151220.cfilter2x2,tp,LOCATION_GRAVE,0,1,nil)) then
local sel=Duel.SelectOption(tp,aux.Stringid(1151220,0),aux.Stringid(1151220,1))
if sel==0 then
Duel.Hint(HINT_SELECTMSG,tp,aux.Stringid(1151220,2))
local g=Duel.SelectMatchingCard(tp,c1151220.ofilter2,tp,LOCATION_DECK,0,1,1,nil)
if g:GetCount()>0 then
local tc=g:GetFirst()
Duel.ShuffleDeck(tp)
Duel.MoveSequence(tc,0)
Duel.ConfirmDecktop(tp,1)
end
else
Duel.Hint(HINT_SELECTMSG,tp,HINTMSG_RELEASE)
local g=Duel.SelectReleaseGroup(tp,c1151220.ofilter2x1,1,1,nil)
if g:GetCount()>0 then
if Duel.Release(g,REASON_EFFECT)~=0 and Duel.SelectMatchingCard(tp,c1151220.ofilter2x2,tp,LOCATION_GRAVE,0,1,1,nil) then
Duel.Hint(HINT_SELECTMSG,tp,HINTMSG_ATOHAND)
local g2=Duel.SelectMatchingCard(tp,c1151220.ofilter2x2,tp,LOCATION_GRAVE,0,1,1,nil)
if g2:GetCount()>0 then
Duel.SendtoHand(g2,nil,REASON_EFFECT)
Duel.ConfirmCards(1-tp,g2)
end
end
end
end
end
if not Duel.IsExistingMatchingCard(c1151220.cfilter2,tp,LOCATION_DECK,0,1,nil) and (Duel.CheckReleaseGroup(tp,c1151220.tfilter2x1,1,nil) and Duel.IsExistingMatchingCard(c1151220.cfilter2x2,tp,LOCATION_GRAVE,0,1,nil)) then
local sel=Duel.SelectOption(tp,aux.Stringid(1151220,1))
if sel==0 then
Duel.Hint(HINT_SELECTMSG,tp,HINTMSG_RELEASE)
local g=Duel.SelectReleaseGroup(tp,c1151220.ofilter2x1,1,1,nil)
if g:GetCount()>0 then
if Duel.Release(g,REASON_EFFECT)~=0 and Duel.SelectMatchingCard(tp,c1151220.ofilter2x2,tp,LOCATION_GRAVE,0,1,1,nil) then
Duel.Hint(HINT_SELECTMSG,tp,HINTMSG_ATOHAND)
local g2=Duel.SelectMatchingCard(tp,c1151220.ofilter2x2,tp,LOCATION_GRAVE,0,1,1,nil)
if g2:GetCount()>0 then
Duel.SendtoHand(g2,nil,REASON_EFFECT)
Duel.ConfirmCards(1-tp,g2)
end
end
end
end
end
end
--ELF·水精灵
function c1190001.initial_effect(c)
--
local e1=Effect.CreateEffect(c)
e1:SetCategory(CATEGORY_TOHAND+CATEGORY_SEARCH)
e1:SetType(EFFECT_TYPE_SINGLE+EFFECT_TYPE_TRIGGER_O)
e1:SetCode(EVENT_BE_MATERIAL)
e1:SetProperty(EFFECT_FLAG_DELAY)
e1:SetCountLimit(1,1190001)
e1:SetCondition(c1190001.con1)
e1:SetTarget(c1190001.tg1)
e1:SetOperation(c1190001.op1)
c:RegisterEffect(e1)
--
local e2=Effect.CreateEffect(c)
e2:SetCategory(CATEGORY_TOHAND)
e2:SetProperty(EFFECT_FLAG_CARD_TARGET)
e2:SetType(EFFECT_TYPE_IGNITION)
e2:SetRange(LOCATION_GRAVE)
e2:SetCountLimit(1,1190051)
e2:SetCost(c1190001.cost2)
e2:SetTarget(c1190001.tg2)
e2:SetOperation(c1190001.op2)
c:RegisterEffect(e2)
end
--
c1190001.named_with_ELF=1
function c1190001.IsELF(c)
local m=_G["c"..c:GetCode()]
return m and m.named_with_ELF
end
--
function c1190001.filter(c)
return c1190001.IsELF(c) and not c:IsCode(1190001) and c:IsAbleToHand() and c:IsType(TYPE_MONSTER) and c:IsLevelBelow(1)
end
function c1190001.con1(e,tp,eg,ep,ev,re,r,rp)
local c=e:GetHandler()
return c:IsLocation(LOCATION_GRAVE) and c:IsPreviousLocation(LOCATION_MZONE) and r==REASON_SYNCHRO
end
function c1190001.tg1(e,tp,eg,ep,ev,re,r,rp,chk)
if chk==0 then return Duel.IsExistingMatchingCard(c1190001.filter,tp,LOCATION_DECK,0,1,nil) end
Duel.SetOperationInfo(0,CATEGORY_TOHAND,nil,1,tp,LOCATION_DECK)
end
function c1190001.op1(e,tp,eg,ep,ev,re,r,rp)
Duel.Hint(HINT_SELECTMSG,tp,HINTMSG_ATOHAND)
local g=Duel.SelectMatchingCard(tp,c1190001.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 c1190001.cost2(e,tp,eg,ep,ev,re,r,rp,chk)
if chk==0 then return e:GetHandler():IsAbleToDeckAsCost() end
Duel.SendtoDeck(e:GetHandler(),nil,2,REASON_COST)
end
function c1190001.filter2(c)
return c1190001.IsELF(c) and c:IsType(TYPE_MONSTER) and c:IsAbleToHand() and not c:IsCode(1190001)
end
function c1190001.tg2(e,tp,eg,ep,ev,re,r,rp,chk,chkc)
if chkc then return chkc:IsLocation(LOCATION_GRAVE) and chkc:IsControler(tp) and c1190001.filter2(chkc) end
if chk==0 then return Duel.IsExistingTarget(c1190001.filter2,tp,LOCATION_GRAVE,0,1,nil) end
Duel.Hint(HINT_SELECTMSG,tp,HINTMSG_ATOHAND)
local g=Duel.SelectTarget(tp,c1190001.filter2,tp,LOCATION_GRAVE,0,1,1,nil)
Duel.SetOperationInfo(0,CATEGORY_TOHAND,g,1,0,0)
end
function c1190001.op2(e,tp,eg,ep,ev,re,r,rp)
local tc=Duel.GetFirstTarget()
if tc and tc:IsRelateToEffect(e) then
Duel.SendtoHand(tc,nil,REASON_EFFECT)
Duel.ConfirmCards(1-tp,tc)
end
end
--
\ No newline at end of file
--ELF·精语者
function c1190002.initial_effect(c)
--
local e1=Effect.CreateEffect(c)
e1:SetCategory(CATEGORY_SPECIAL_SUMMON)
e1:SetType(EFFECT_TYPE_SINGLE+EFFECT_TYPE_TRIGGER_O)
e1:SetProperty(EFFECT_FLAG_CARD_TARGET+EFFECT_FLAG_DELAY)
e1:SetCode(EVENT_SUMMON_SUCCESS)
e1:SetCountLimit(1,1190002)
e1:SetTarget(c1190002.tg1)
e1:SetOperation(c1190002.op1)
c:RegisterEffect(e1)
local e2=e1:Clone()
e2:SetCode(EVENT_SPSUMMON_SUCCESS)
c:RegisterEffect(e2)
--
local e3=Effect.CreateEffect(c)
e3:SetCategory(CATEGORY_TOHAND+CATEGORY_SEARCH)
e3:SetType(EFFECT_TYPE_IGNITION)
e3:SetRange(LOCATION_HAND)
e3:SetCountLimit(1,1190052)
e3:SetCost(c1190002.cost3)
e3:SetTarget(c1190002.tg3)
e3:SetOperation(c1190002.op3)
c:RegisterEffect(e3)
end
--
c1190002.named_with_ELF=1
function c1190002.IsELF(c)
local m=_G["c"..c:GetCode()]
return m and m.named_with_ELF
end
--
function c1190002.filter1(c,e,tp)
return c1190002.IsELF(c) and c:IsCanBeSpecialSummoned(e,0,tp,false,false) and not c:IsType(TYPE_SYNCHRO)
end
function c1190002.tg1(e,tp,eg,ep,ev,re,r,rp,chk,chkc)
if chkc then return chkc:IsControler(tp) and chkc:IsLocation(LOCATION_GRAVE) and c1190002.filter1(chkc,e,tp) end
if chk==0 then return Duel.GetMZoneCount(tp)>0
and Duel.IsExistingTarget(c1190002.filter1,tp,LOCATION_GRAVE,0,1,nil,e,tp) end
Duel.Hint(HINT_SELECTMSG,tp,HINTMSG_SPSUMMON)
local g=Duel.SelectTarget(tp,c1190002.filter1,tp,LOCATION_GRAVE,0,1,1,nil,e,tp)
Duel.SetOperationInfo(0,CATEGORY_SPECIAL_SUMMON,g,1,0,0)
end
--
function c1190002.op1(e,tp,eg,ep,ev,re,r,rp)
local tc=Duel.GetFirstTarget()
if tc:IsRelateToEffect(e) then
Duel.SpecialSummon(tc,0,tp,tp,false,false,POS_FACEUP)
end
end
--
function c1190002.cost3(e,tp,eg,ep,ev,re,r,rp,chk)
local c=e:GetHandler()
if chk==0 then return c:IsAbleToGraveAsCost() and c:IsDiscardable() end
Duel.SendtoGrave(c,REASON_COST+REASON_DISCARD)
end
function c1190002.filter3(c)
return c:IsCode(1191002) and c:IsAbleToHand()
end
function c1190002.tg3(e,tp,eg,ep,ev,re,r,rp,chk,chkc)
if chk==0 then return Duel.IsExistingMatchingCard(c1190002.filter3,tp,LOCATION_DECK,0,1,nil) end
Duel.SetOperationInfo(0,CATEGORY_TOHAND,nil,1,tp,LOCATION_DECK)
end
function c1190002.op3(e,tp,eg,ep,ev,re,r,rp,chk)
Duel.Hint(HINT_SELECTMSG,tp,HINTMSG_ATOHAND)
local g=Duel.SelectMatchingCard(tp,c1190002.filter3,tp,LOCATION_DECK,0,1,1,nil,e,tp)
if g:GetCount()>0 then
Duel.SendtoHand(g,nil,REASON_EFFECT)
Duel.ConfirmCards(1-tp,g)
end
end
--ELF·蔷薇花园护卫
function c1190003.initial_effect(c)
--
local e1=Effect.CreateEffect(c)
e1:SetCategory(CATEGORY_TOHAND+CATEGORY_SEARCH)
e1:SetType(EFFECT_TYPE_IGNITION)
e1:SetCountLimit(1,1190003)
e1:SetRange(LOCATION_MZONE)
e1:SetTarget(c1190003.tg1)
e1:SetOperation(c1190003.op1)
c:RegisterEffect(e1)
--
local e2=Effect.CreateEffect(c)
e2:SetCategory(CATEGORY_TOHAND)
e2:SetType(EFFECT_TYPE_SINGLE+EFFECT_TYPE_TRIGGER_O)
e2:SetProperty(EFFECT_FLAG_CARD_TARGET+EFFECT_FLAG_DELAY)
e2:SetCode(EVENT_SPSUMMON_SUCCESS)
e2:SetCountLimit(1,1190053)
e2:SetCondition(c1190003.con2)
e2:SetTarget(c1190003.tg2)
e2:SetOperation(c1190003.op2)
c:RegisterEffect(e2)
--
end
--
c1190003.named_with_ELF=1
function c1190003.IsELF(c)
local m=_G["c"..c:GetCode()]
return m and m.named_with_ELF
end
--
function c1190003.filter1(c)
return c:IsCode(1191006) and c:IsAbleToHand()
end
function c1190003.tg1(e,tp,eg,ep,ev,re,r,rp,chk)
if chk==0 then return Duel.IsExistingMatchingCard(c1190003.filter1,tp,LOCATION_DECK+LOCATION_GRAVE,0,1,nil,e,tp) and Duel.GetFieldGroupCount(tp,LOCATION_DECK,0)>0 end
Duel.SetOperationInfo(0,CATEGORY_TOHAND,nil,1,tp,LOCATION_DECK+LOCATION_GRAVE)
end
--
function c1190003.op1(e,tp,eg,ep,ev,re,r,rp)
if Duel.GetFieldGroupCount(tp,LOCATION_DECK,0)==0 then return end
Duel.ConfirmDecktop(tp,1)
local g=Duel.GetDecktopGroup(tp,1)
local tc=g:GetFirst()
if c1190003.IsELF(tc) then
Duel.Hint(HINT_SELECTMSG,tp,HINTMSG_ATOHAND)
local g=Duel.SelectMatchingCard(tp,c1190003.filter1,tp,LOCATION_DECK+LOCATION_GRAVE,0,1,1,nil,e,tp)
if g:GetCount()>0 then
Duel.SendtoHand(g,nil,REASON_EFFECT)
Duel.ConfirmCards(1-tp,g)
end
end
Duel.ShuffleDeck(tp)
end
--
function c1190003.con2(e,tp,eg,ep,ev,re,r,rp)
return e:GetHandler():IsPreviousLocation(LOCATION_DECK)
end
function c1190003.filter2(c,e,tp)
return c:IsType(TYPE_MONSTER) and c:IsAbleToHand()
end
function c1190003.tg2(e,tp,eg,ep,ev,re,r,rp,chk,chkc)
if chkc then return chkc:IsControler(1-tp) and c1190003.filter2(chkc,e,tp) and chkc:IsLocation(LOCATION_MZONE) end
if chk==0 then return Duel.IsExistingTarget(c1190003.filter2,tp,0,LOCATION_MZONE,1,nil,e,tp) end
Duel.Hint(HINT_SELECTMSG,tp,HINTMSG_ATOHAND)
local g=Duel.SelectTarget(tp,c1190003.filter2,tp,0,LOCATION_MZONE,1,1,nil,e,tp)
Duel.SetOperationInfo(0,CATEGORY_TOHAND,g,1,0,0)
end
--
function c1190003.op2(e,tp,eg,ep,ev,re,r,rp)
local tg=Duel.GetFirstTarget()
if tg:IsRelateToEffect(e) then
Duel.SendtoHand(tg,nil,REASON_EFFECT)
end
local atk=tg:GetTextAttack()
if atk<0 then atk=0 end
Duel.Damage(1-tp,atk/2,REASON_EFFECT)
end
--
--ELF·莉莎
function c1190004.initial_effect(c)
--
local e1=Effect.CreateEffect(c)
e1:SetCategory(CATEGORY_TOGRAVE+CATEGORY_SEARCH)
e1:SetType(EFFECT_TYPE_SINGLE+EFFECT_TYPE_TRIGGER_O)
e1:SetProperty(EFFECT_FLAG_DELAY)
e1:SetCode(EVENT_SPSUMMON_SUCCESS)
e1:SetCountLimit(1,1190004)
e1:SetTarget(c1190004.tg1)
e1:SetOperation(c1190004.op1)
c:RegisterEffect(e1)
--
local e2=Effect.CreateEffect(c)
e2:SetCategory(CATEGORY_TOHAND+CATEGORY_SEARCH)
e2:SetType(EFFECT_TYPE_SINGLE+EFFECT_TYPE_TRIGGER_O)
e2:SetCode(EVENT_TO_GRAVE)
e2:SetProperty(EFFECT_FLAG_DAMAGE_STEP+EFFECT_FLAG_DELAY)
e2:SetCountLimit(1,1190054)
e2:SetCondition(c1190004.con2)
e2:SetTarget(c1190004.tg2)
e2:SetOperation(c1190004.op2)
c:RegisterEffect(e2)
end
--
c1190004.named_with_ELF=1
function c1190004.IsELF(c)
local m=_G["c"..c:GetCode()]
return m and m.named_with_ELF
end
--
function c1190004.tfilter(c)
return c1190004.IsELF(c) and c:IsAbleToGrave()
end
function c1190004.tgfilter(c)
return c:IsCode(1191003) and c:IsAbleToHand()
end
function c1190004.tg1(e,tp,eg,ep,ev,re,r,rp,chk)
if chk==0 then return Duel.IsExistingMatchingCard(c1190004.tfilter,tp,LOCATION_HAND,0,1,nil,tp) and Duel.IsExistingMatchingCard(c1190004.tgfilter,tp,LOCATION_DECK,0,1,nil,tp) end
Duel.SetOperationInfo(0,CATEGORY_TOGRAVE,nil,1,tp,LOCATION_HAND)
Duel.SetOperationInfo(0,CATEGORY_TOHAND,nil,1,tp,LOCATION_DECK)
end
--
function c1190004.op1(e,tp,eg,ep,ev,re,r,rp)
Duel.Hint(HINT_SELECTMSG,tp,HINTMSG_TOGRAVE)
local g=Duel.SelectMatchingCard(tp,c1190004.tfilter,tp,LOCATION_HAND,0,1,1,nil,e,tp)
if g:GetCount()>0 then
Duel.SendtoGrave(g,REASON_EFFECT)
end
Duel.Hint(HINT_SELECTMSG,tp,HINTMSG_ATOHAND)
local g2=Duel.SelectMatchingCard(tp,c1190004.tgfilter,tp,LOCATION_DECK,0,1,1,nil,e,tp)
if g2:GetCount()>0 then
Duel.SendtoHand(g2,nil,REASON_EFFECT)
Duel.ConfirmCards(1-tp,g2)
end
end
--
function c1190004.con2(e,tp,eg,ep,ev,re,r,rp)
return e:GetHandler():IsPreviousLocation(LOCATION_HAND)
end
function c1190004.filter2(c,e,tp)
return c:IsCode(1190014) and c:IsCanBeSpecialSummoned(e,0,tp,false,false)
end
function c1190004.tg2(e,tp,eg,ep,ev,re,r,rp,chk)
if chk==0 then return Duel.GetMZoneCount(tp)>0
and Duel.IsExistingMatchingCard(c1190004.filter2,tp,LOCATION_DECK,0,1,nil,e,tp) end
Duel.SetOperationInfo(0,CATEGORY_SPECIAL_SUMMON,nil,1,0,LOCATION_DECK)
end
function c1190004.op2(e,tp,eg,ep,ev,re,r,rp)
if Duel.GetMZoneCount(tp)<=0 then return end
Duel.Hint(HINT_SELECTMSG,tp,HINTMSG_SPSUMMON)
local g=Duel.SelectMatchingCard(tp,c1190004.filter2,tp,LOCATION_DECK,0,1,1,nil,e,tp)
if g:GetCount()>0 then
local tc=g:GetFirst()
Duel.SpecialSummon(g,0,tp,tp,false,false,POS_FACEUP)
local e1=Effect.CreateEffect(e:GetHandler())
e1:SetType(EFFECT_TYPE_SINGLE)
e1:SetCode(EFFECT_CANNOT)
e1:SetValue(c1190004.efilter)
e1:SetReset(RESET_EVENT+0x1fe0000+RESET_PHASE+RESET_OPPO_TURN,1)
tc:RegisterEffect(e1)
end
end
function c1190004.efilter(e,re)
return e:GetOwnerPlayer()~=re:GetOwnerPlayer()
end
\ No newline at end of file
--ELF·莉莉
function c1190005.initial_effect(c)
--
local e1=Effect.CreateEffect(c)
e1:SetType(EFFECT_TYPE_IGNITION)
e1:SetRange(LOCATION_GRAVE)
e1:SetCode(EVENT_FREE_CHAIN)
e1:SetCategory(CATEGORY_SPECIAL_SUMMON)
e1:SetCountLimit(1,1190005)
e1:SetCondition(c1190005.con1)
e1:SetTarget(c1190005.tg1)
e1:SetOperation(c1190005.op1)
c:RegisterEffect(e1)
--
local e2=Effect.CreateEffect(c)
e2:SetCategory(CATEGORY_)
e2:SetType(EFFECT_TYPE_IGNITION)
e2:SetCountLimit(1,1190055)
e2:SetRange(LOCATION_MZONE)
e2:SetTarget(c1190005.tg2)
e2:SetOperation(c1190005.op2)
c:RegisterEffect(e2)
end
--
c1190005.named_with_ELF=1
function c1190005.IsELF(c)
local m=_G["c"..c:GetCode()]
return m and m.named_with_ELF
end
--
function c1190005.cfilter(c)
return c:IsFaceup() and c1190005.IsELF(c) and c:IsLevelAbove(3)
end
function c1190005.con1(e,tp,eg,ep,ev,re,r,rp)
return Duel.IsExistingMatchingCard(c1190005.cfilter,tp,LOCATION_MZONE,0,1,nil)
end
--
function c1190005.tg1(e,tp,eg,ep,ev,re,r,rp,chk,chkc)
if chk==0 then return Duel.IsExistingMatchingCard(c1190005.cfilter,tp,LOCATION_MZONE,0,1,nil) and Duel.GetMZoneCount(tp)>0 and e:GetHandler():IsCanBeSpecialSummoned(e,0,tp,false,false) end
Duel.SetOperationInfo(0,CATEGORY_SPECIAL_SUMMON,e:GetHandler(),1,0,0)
end
--
function c1190005.op1(e,tp,eg,ep,ev,re,r,rp)
local c=e:GetHandler()
if c:IsRelateToEffect(e) and Duel.SpecialSummon(c,0,tp,tp,false,false,POS_FACEUP)~=0 then
local e1=Effect.CreateEffect(c)
e1:SetType(EFFECT_TYPE_SINGLE)
e1:SetCode(EFFECT_LEAVE_FIELD_REDIRECT)
e1:SetProperty(EFFECT_FLAG_CANNOT_DISABLE)
e1:SetReset(RESET_EVENT+0x47e0000)
e1:SetValue(LOCATION_DECK)
c:RegisterEffect(e1,true)
end
end
--
function c1190005.filter2(c,e,tp)
return c:IsType(TYPE_MONSTER)
end
function c1190005.tg2(e,tp,eg,ep,ev,re,r,rp,chk,chkc)
if chkc then return chkc:IsControler(1-tp) and c1190005.filter2(chkc,e,tp) and chkc:IsLocation(LOCATION_MZONE) end
if chk==0 then return Duel.IsExistingTarget(c1190003.filter2,tp,0,LOCATION_MZONE,1,nil,e,tp) end
Duel.Hint(HINT_SELECTMSG,tp,HINTMSG_TARGET)
local g=Duel.SelectTarget(tp,c1190005.filter2,tp,0,LOCATION_MZONE,1,1,nil,e,tp)
Duel.HintSelection(g)
-- Duel.SetOperationInfo(0,CATEGORY_,g,1,0,0)
end
function c1190005.op2(e,tp,eg,ep,ev,re,r,rp)
local tc=Duel.GetFirstTarget()
if tc:IsRelateToEffect(e) then
local e1=Effect.CreateEffect(e:GetHandler())
e1:SetType(EFFECT_TYPE_FIELD)
e1:SetProperty(EFFECT_FLAG_SET_AVAILABLE+EFFECT_FLAG_IGNORE_RANGE)
e1:SetCode(EFFECT_FORBIDDEN)
e1:SetTarget(c1190005.bantg)
e1:SetLabelObject(tc)
e1:SetReset(RESET_PHASE+PHASE_END+RESET_OPPO_TURN)
Duel.RegisterEffect(e1,tp)
local e2=Effect.CreateEffect(e:GetHandler())
e2:SetType(EFFECT_TYPE_FIELD)
e2:SetCode(EFFECT_DISABLE)
e2:SetTargetRange(0,LOCATION_MZONE)
e2:SetTarget(c1190005.bantg)
e2:SetLabelObject(tc)
e2:SetReset(RESET_PHASE+PHASE_END+RESET_OPPO_TURN)
Duel.RegisterEffect(e2,tp)
end
end
function c1190005.bantg(e,c)
return c==e:GetLabelObject()
end
--ELF·宝石妖精
function c1190006.initial_effect(c)
--
local e1=Effect.CreateEffect(c)
e1:SetType(EFFECT_TYPE_IGNITION)
e1:SetRange(LOCATION_HAND)
e1:SetCode(EVENT_FREE_CHAIN)
e1:SetCategory(CATEGORY_SPECIAL_SUMMON)
e1:SetCountLimit(1,1190006)
e1:SetCondition(c1190006.con1)
e1:SetTarget(c1190006.tg1)
e1:SetOperation(c1190006.op1)
c:RegisterEffect(e1)
--
local e2=Effect.CreateEffect(c)
e2:SetDescription(aux.Stringid(1190006,1))
e2:SetCategory(CATEGORY_SPECIAL_SUMMON)
e2:SetType(EFFECT_TYPE_SINGLE+EFFECT_TYPE_TRIGGER_O)
e2:SetCode(EVENT_TO_HAND)
e2:SetProperty(EFFECT_FLAG_DAMAGE_STEP+EFFECT_FLAG_DELAY)
e2:SetCountLimit(1,1190056)
e2:SetCondition(c1190006.con2)
e2:SetTarget(c1190006.tg2)
e2:SetOperation(c1190006.op2)
c:RegisterEffect(e2)
end
--
c1190006.named_with_ELF=1
function c1190006.IsELF(c)
local m=_G["c"..c:GetCode()]
return m and m.named_with_ELF
end
--
function c1190006.cfilter(c)
return c:IsFaceup() and c1190006.IsELF(c) and c:IsType(TYPE_SYNCHRO)
end
function c1190006.confilter(c)
return c:IsFaceup() and c1190006.IsELF(c) and c:IsType(TYPE_TUNER) and c:GetLevel()==2 and not c:IsCode(1190016)
end
function c1190006.con1(e,tp,eg,ep,ev,re,r,rp)
return Duel.IsExistingMatchingCard(c1190006.cfilter,tp,LOCATION_MZONE,0,1,nil) and Duel.IsExistingMatchingCard(c1190006.confilter,tp,LOCATION_MZONE,0,1,nil)
end
--
function c1190006.tg1(e,tp,eg,ep,ev,re,r,rp,chk,chkc)
if chk==0 then return Duel.IsExistingMatchingCard(c1190006.cfilter,tp,LOCATION_MZONE,0,1,nil) and Duel.IsExistingMatchingCard(c1190006.confilter,tp,LOCATION_MZONE,0,1,nil) and Duel.GetMZoneCount(tp)>0 and e:GetHandler():IsCanBeSpecialSummoned(e,0,tp,false,false) end
Duel.SetOperationInfo(0,CATEGORY_SPECIAL_SUMMON,e:GetHandler(),1,0,0)
end
--
function c1190006.filter(c)
return c1190006.IsELF(c) and c:IsAbleToGrave()
end
function c1190006.filter1(c)
return c:IsCode(1191001) and c:IsAbleToHand()
end
function c1190006.op1(e,tp,eg,ep,ev,re,r,rp)
local c=e:GetHandler()
if c:IsRelateToEffect(e) then
Duel.SpecialSummon(c,0,tp,tp,false,false,POS_FACEUP)
local g=Duel.GetMatchingGroup(c1190006.filter,tp,LOCATION_HAND,0,nil)
local g2=Duel.GetMatchingGroup(c1190006.filter1,tp,LOCATION_DECK,0,nil)
if g:GetCount()>0 and g2:GetCount()>0 and Duel.SelectYesNo(tp,aux.Stringid(1190006,0)) then
Duel.Hint(HINT_SELECTMSG,tp,HINTMSG_TOGRAVE)
local g3=Duel.SelectMatchingCard(tp,c1190006.filter,tp,LOCATION_HAND,0,1,1,nil,e,tp)
if g3:GetCount()>0 then
local tc2=g3:GetFirst()
Duel.SendtoGrave(g3,REASON_EFFECT)
Duel.Hint(HINT_SELECTMSG,tp,HINTMSG_ATOHAND)
local g4=Duel.SelectMatchingCard(tp,c1190006.filter1,tp,LOCATION_DECK,0,1,1,nil,e,tp)
if g4:GetCount()>0 then
Duel.SendtoHand(g4,tp,REASON_EFFECT)
end
end
end
end
end
--
--
function c1190006.con2(e,tp,eg,ep,ev,re,r,rp)
return ((e:GetHandler():IsPreviousLocation(LOCATION_ONFIELD)
and e:GetHandler():IsPreviousPosition(POS_FACEUP)) or e:GetHandler():IsPreviousLocation(LOCATION_GRAVE))
end
function c1190006.filter2(c,e,tp)
return c:IsCode(1190013) and c:IsCanBeSpecialSummoned(e,0,tp,false,false)
end
function c1190006.tg2(e,tp,eg,ep,ev,re,r,rp,chk)
if chk==0 then return Duel.GetMZoneCount(tp)>0
and Duel.IsExistingMatchingCard(c1190006.filter2,tp,LOCATION_DECK,0,1,nil,e,tp) end
Duel.SetOperationInfo(0,CATEGORY_SPECIAL_SUMMON,nil,1,0,LOCATION_DECK)
end
function c1190006.op2(e,tp,eg,ep,ev,re,r,rp)
if Duel.GetMZoneCount(tp)<=0 then return end
Duel.Hint(HINT_SELECTMSG,tp,HINTMSG_SPSUMMON)
local g=Duel.SelectMatchingCard(tp,c1190006.filter2,tp,LOCATION_DECK,0,1,1,nil,e,tp)
if g:GetCount()>0 then
Duel.SpecialSummon(g,0,tp,tp,false,false,POS_FACEUP)
end
end
--ELF·威斯特
function c1190011.initial_effect(c)
--
local e1=Effect.CreateEffect(c)
e1:SetCategory(CATEGORY_TOGRAVE+CATEGORY_SEARCH)
e1:SetType(EFFECT_TYPE_SINGLE+EFFECT_TYPE_TRIGGER_O)
e1:SetCode(EVENT_TO_HAND)
e1:SetProperty(EFFECT_FLAG_DAMAGE_STEP+EFFECT_FLAG_DELAY)
e1:SetCountLimit(1,1190011)
e1:SetCondition(c1190011.con1)
e1:SetTarget(c1190011.tg1)
e1:SetOperation(c1190011.op1)
c:RegisterEffect(e1)
local e2=Effect.CreateEffect(c)
e2:SetCategory(CATEGORY_TOGRAVE+CATEGORY_SEARCH)
e2:SetType(EFFECT_TYPE_SINGLE+EFFECT_TYPE_TRIGGER_O)
e2:SetCode(EVENT_TO_DECK)
e2:SetProperty(EFFECT_FLAG_DAMAGE_STEP+EFFECT_FLAG_DELAY)
e2:SetCountLimit(1,1190011)
e2:SetCondition(c1190011.con1)
e2:SetTarget(c1190011.tg1)
e2:SetOperation(c1190011.op1)
c:RegisterEffect(e2)
--
local e3=Effect.CreateEffect(c)
e3:SetCategory(CATEGORY_SPECIAL_SUMMON)
e3:SetType(EFFECT_TYPE_SINGLE+EFFECT_TYPE_TRIGGER_O)
e3:SetCode(EVENT_TO_GRAVE)
e3:SetProperty(EFFECT_FLAG_CARD_TARGET+EFFECT_FLAG_DAMAGE_STEP+EFFECT_FLAG_DELAY)
e3:SetCountLimit(1,1190061)
e3:SetCondition(c1190011.con3)
e3:SetTarget(c1190011.tg3)
e3:SetOperation(c1190011.op3)
c:RegisterEffect(e3)
--
end
--
c1190011.named_with_ELF=1
function c1190011.IsELF(c)
local m=_G["c"..c:GetCode()]
return m and m.named_with_ELF
end
--
function c1190011.con1(e,tp,eg,ep,ev,re,r,rp)
return e:GetHandler():IsPreviousLocation(LOCATION_ONFIELD)
and e:GetHandler():IsPreviousPosition(POS_FACEUP)
end
function c1190011.tfilter(c)
return c1190011.IsELF(c) and c:IsAbleToGrave() and not c:IsCode(1190011)
end
function c1190011.tgfilter(c)
return c:IsCode(1191301) and c:IsAbleToHand()
end
function c1190011.tg1(e,tp,eg,ep,ev,re,r,rp,chk)
if chk==0 then return Duel.IsExistingMatchingCard(c1190011.tfilter,tp,LOCATION_HAND,0,1,nil,tp) and Duel.IsExistingMatchingCard(c1190011.tgfilter,tp,LOCATION_DECK,0,1,nil,tp) end
Duel.SetOperationInfo(0,CATEGORY_TOGRAVE,nil,1,tp,LOCATION_HAND)
Duel.SetOperationInfo(0,CATEGORY_TOHAND,nil,1,tp,LOCATION_DECK)
end
--
function c1190011.op1(e,tp,eg,ep,ev,re,r,rp)
Duel.Hint(HINT_SELECTMSG,tp,HINTMSG_TOGRAVE)
local g=Duel.SelectMatchingCard(tp,c1190011.tfilter,tp,LOCATION_HAND,0,1,1,nil,e,tp)
if g:GetCount()>0 then
Duel.SendtoGrave(g,REASON_EFFECT)
end
Duel.Hint(HINT_SELECTMSG,tp,HINTMSG_ATOHAND)
local g2=Duel.SelectMatchingCard(tp,c1190011.tgfilter,tp,LOCATION_DECK,0,1,1,nil,e,tp)
if g2:GetCount()>0 then
Duel.SendtoHand(g2,nil,REASON_EFFECT)
Duel.ConfirmCards(1-tp,g2)
end
end
--
function c1190011.con3(e,tp,eg,ep,ev,re,r,rp)
return e:GetHandler():IsPreviousLocation(LOCATION_HAND)
end
--
function c1190011.filter2(c,e,tp)
return c:IsCode(1190102) and c:IsCanBeSpecialSummoned(e,0,tp,false,false)
end
function c1190011.tg3(e,tp,eg,ep,ev,re,r,rp,chk,chkc)
if chkc then return chkc:IsControler(tp) and chkc:IsLocation(LOCATION_GRAVE) and c1190011.filter2(chkc,e,tp) end
if chk==0 then return Duel.GetMZoneCount(tp)>0
and Duel.IsExistingTarget(c1190011.filter2,tp,LOCATION_GRAVE,0,1,nil,e,tp) end
Duel.Hint(HINT_SELECTMSG,tp,HINTMSG_SPSUMMON)
local g=Duel.SelectTarget(tp,c1190011.filter2,tp,LOCATION_GRAVE,0,1,1,nil,e,tp)
Duel.SetOperationInfo(0,CATEGORY_SPECIAL_SUMMON,g,1,0,0)
end
--
function c1190011.op3(e,tp,eg,ep,ev,re,r,rp)
local tc=Duel.GetFirstTarget()
if tc:IsRelateToEffect(e) then
Duel.SpecialSummon(tc,0,tp,tp,false,false,POS_FACEUP)
end
end
--ELF·魔法精灵公主
function c1190012.initial_effect(c)
--
local e1=Effect.CreateEffect(c)
e1:SetCategory(CATEGORY_TOHAND+CATEGORY_SEARCH)
e1:SetType(EFFECT_TYPE_IGNITION)
e1:SetRange(LOCATION_HAND)
e1:SetCountLimit(1,1190012)
e1:SetCost(c1190012.cost1)
e1:SetTarget(c1190012.tg1)
e1:SetOperation(c1190012.op1)
c:RegisterEffect(e1)
--
local e2=Effect.CreateEffect(c)
e2:SetType(EFFECT_TYPE_IGNITION)
e2:SetRange(LOCATION_MZONE)
e2:SetCategory(CATEGORY_SPECIAL_SUMMON+CATEGORY_TODECK+CATEGORY_DAMAGE)
e2:SetCountLimit(1,1190062)
e2:SetTarget(c1190012.tg2)
e2:SetOperation(c1190012.op2)
c:RegisterEffect(e2)
end
--
c1190012.named_with_ELF=1
function c1190012.IsELF(c)
local m=_G["c"..c:GetCode()]
return m and m.named_with_ELF
end
--
function c1190012.cost1(e,tp,eg,ep,ev,re,r,rp,chk)
local c=e:GetHandler()
if chk==0 then return c:IsAbleToGraveAsCost() and c:IsDiscardable() end
Duel.SendtoGrave(c,REASON_COST+REASON_DISCARD)
end
function c1190012.filter1(c)
return c:IsCode(1191004) and c:IsAbleToHand()
end
function c1190012.tg1(e,tp,eg,ep,ev,re,r,rp,chk,chkc)
if chk==0 then return Duel.IsExistingMatchingCard(c1190012.filter1,tp,LOCATION_DECK,0,1,nil) end
Duel.SetOperationInfo(0,CATEGORY_TOHAND,nil,1,tp,LOCATION_DECK)
end
function c1190012.op1(e,tp,eg,ep,ev,re,r,rp,chk)
Duel.Hint(HINT_SELECTMSG,tp,HINTMSG_ATOHAND)
local g=Duel.SelectMatchingCard(tp,c1190012.filter1,tp,LOCATION_DECK,0,1,1,nil,e,tp)
if g:GetCount()>0 then
Duel.SendtoHand(g,nil,REASON_EFFECT)
Duel.ConfirmCards(1-tp,g)
end
end
--
function c1190012.filter2(c,e,tp)
return c1190012.IsELF(c) and c:IsType(TYPE_MONSTER) and c:GetLevel()==1 and c:IsCanBeSpecialSummoned(e,0,tp,false,false)
end
function c1190012.tg2(e,tp,eg,ep,ev,re,r,rp,chk)
if chk==0 then return Duel.GetMZoneCount(tp)>1
and Duel.IsExistingMatchingCard(c1190012.filter2,tp,LOCATION_GRAVE+LOCATION_HAND,0,2,nil,e,tp) and e:GetHandler():IsAbleToDeck() end
Duel.SetOperationInfo(0,CATEGORY_SPECIAL_SUMMON,nil,1,0,LOCATION_GRAVE+LOCATION_HAND)
end
function c1190012.op2(e,tp,eg,ep,ev,re,r,rp)
local c=e:GetHandler()
if c:IsRelateToEffect(e) then
Duel.SendtoDeck(c,nil,2,REASON_EFFECT)
end
if Duel.GetMZoneCount(tp)<=0 then return end
Duel.Hint(HINT_SELECTMSG,tp,HINTMSG_SPSUMMON)
local g=Duel.SelectMatchingCard(tp,c1190012.filter2,tp,LOCATION_GRAVE+LOCATION_HAND,0,2,2,nil,e,tp)
if g:GetCount()>1 then
Duel.SpecialSummon(g,0,tp,tp,false,false,POS_FACEUP)
Duel.Damage(1-tp,400,REASON_EFFECT)
end
end
\ No newline at end of file
--ELF·妖精兽
function c1190013.initial_effect(c)
local e1=Effect.CreateEffect(c)
e1:SetType(EFFECT_TYPE_SINGLE+EFFECT_TYPE_TRIGGER_O)
e1:SetCode(EVENT_TO_DECK)
e1:SetProperty(EFFECT_FLAG_DAMAGE_STEP+EFFECT_FLAG_DELAY)
e1:SetCondition(c1190013.con1)
e1:SetOperation(c1190013.op1)
c:RegisterEffect(e1)
--
local e2=Effect.CreateEffect(c)
e2:SetType(EFFECT_TYPE_IGNITION)
e2:SetRange(LOCATION_HAND)
e2:SetCode(EVENT_FREE_CHAIN)
e2:SetCategory(CATEGORY_SPECIAL_SUMMON+CATEGORY_TODECK)
e2:SetProperty(EFFECT_FLAG_CARD_TARGET)
e2:SetCountLimit(1,1190013)
e2:SetTarget(c1190013.tg2)
e2:SetOperation(c1190013.op2)
c:RegisterEffect(e2)
end
--
c1190013.named_with_ELF=1
function c1190013.IsELF(c)
local m=_G["c"..c:GetCode()]
return m and m.named_with_ELF
end
--
function c1190013.con1(e,tp,eg,ep,ev,re,r,rp)
return e:GetHandler():IsPreviousLocation(LOCATION_ONFIELD)
and e:GetHandler():IsPreviousPosition(POS_FACEUP)
end
function c1190013.op1(e,tp,eg,ep,ev,re,r,rp)
local e2=Effect.CreateEffect(e:GetHandler())
e2:SetType(EFFECT_TYPE_FIELD)
e2:SetCode(EFFECT_CANNOT_SPECIAL_SUMMON)
e2:SetProperty(EFFECT_FLAG_PLAYER_TARGET)
e2:SetTargetRange(0,1)
e2:SetTarget(c1190013.splimit)
e2:SetReset(RESET_PHASE+PHASE_END,2)
Duel.RegisterEffect(e2,tp)
end
function c1190013.splimit(e,c,sump,sumtype,sumpos,targetp,se)
return (se:IsActiveType(TYPE_SPELL) or se:IsActiveType(TYPE_TRAP)) and se:IsHasType(0x7f0)
end
--
--
function c1190013.filter1(c,e,tp)
return c1190013.IsELF(c) and c:IsAbleToDeck() and c:IsType(TYPE_MONSTER) and c:IsFaceup()
end
function c1190013.tg2(e,tp,eg,ep,ev,re,r,rp,chk,chkc)
if chkc then return chkc:IsControler(tp) and chkc:IsLocation(LOCATION_MZONE) and c1190013.filter1(chkc,e,tp) end
if chk==0 then return Duel.IsExistingTarget(c1190013.filter1,tp,LOCATION_MZONE,0,1,nil,e,tp) and e:GetHandler():IsCanBeSpecialSummoned(e,0,tp,false,false) and Duel.IsPlayerCanDraw(tp,1) end
Duel.Hint(HINT_SELECTMSG,tp,HINTMSG_TODECK)
local g=Duel.SelectTarget(tp,c1190013.filter1,tp,LOCATION_MZONE,0,1,1,nil,e,tp)
Duel.SetOperationInfo(0,CATEGORY_TODECK,g,1,tp,LOCATION_MZONE)
Duel.SetOperationInfo(0,CATEGORY_SPECIAL_SUMMON,e:GetHandler(),1,0,0)
Duel.SetOperationInfo(0,CATEGORY_DRAW,nil,0,tp,1)
end
function c1190013.op2(e,tp,eg,ep,ev,re,r,rp)
local tc=Duel.GetFirstTarget()
if tc:IsRelateToEffect(e) then
Duel.SendtoDeck(tc,nil,2,REASON_EFFECT)
end
Duel.ShuffleDeck(tp)
local c=e:GetHandler()
if c:IsRelateToEffect(e) then
Duel.SpecialSummon(c,0,tp,tp,false,false,POS_FACEUP)
end
Duel.Draw(tp,1,REASON_EFFECT)
end
\ No newline at end of file
--ELF·古森林的白狼
function c1190014.initial_effect(c)
--
local e1=Effect.CreateEffect(c)
e1:SetCategory(CATEGORY_NEGATE+CATEGORY_DESTROY)
e1:SetType(EFFECT_TYPE_QUICK_O)
e1:SetCode(EVENT_CHAINING)
e1:SetProperty(EFFECT_FLAG_CARD_TARGET+EFFECT_FLAG_DAMAGE_STEP+EFFECT_FLAG_DAMAGE_CAL)
e1:SetRange(LOCATION_MZONE)
e1:SetCountLimit(1,1190014)
e1:SetCondition(c1190014.con1)
e1:SetCost(c1190014.cost1)
e1:SetTarget(c1190014.tg1)
e1:SetOperation(c1190014.op1)
c:RegisterEffect(e1)
--
local e2=Effect.CreateEffect(c)
e2:SetCategory(CATEGORY_TOHAND+CATEGORY_DAMAGE)
e2:SetProperty(EFFECT_FLAG_DAMAGE_STEP+EFFECT_FLAG_DELAY)
e2:SetType(EFFECT_TYPE_SINGLE+EFFECT_TYPE_TRIGGER_O)
e2:SetCode(EVENT_TO_DECK)
e2:SetCountLimit(1,1190064)
e2:SetTarget(c1190014.tg2)
e2:SetOperation(c1190014.op2)
c:RegisterEffect(e2)
end
--
c1190014.named_with_ELF=1
function c1190014.IsELF(c)
local m=_G["c"..c:GetCode()]
return m and m.named_with_ELF
end
--
function c1190014.con1(e,tp,eg,ep,ev,re,r,rp)
local c=e:GetHandler()
return not c:IsStatus(STATUS_BATTLE_DESTROYED) and not c:IsStatus(STATUS_CHAINING) and Duel.IsChainNegatable(ev)
end
function c1190014.cost1(e,tp,eg,ep,ev,re,r,rp,chk)
if chk==0 then return Duel.CheckLPCost(tp,800) end
Duel.PayLPCost(tp,800)
end
function c1190014.filter(c,code)
return c:IsFaceup() and c1190014.IsELF(c) and c:IsAbleToHand() and not c:IsCode(code)
end
function c1190014.tg1(e,tp,eg,ep,ev,re,r,rp,chk,chkc)
if chkc then return chkc:IsOnField() and chkc:IsControler(tp) and c1190014.filter(chkc,e:GetHandler():GetCode()) end
if chk==0 then return Duel.IsExistingTarget(c1190014.filter,tp,LOCATION_ONFIELD,0,1,nil,e:GetHandler():GetCode()) end
Duel.Hint(HINT_SELECTMSG,tp,HINTMSG_RTOHAND)
local g=Duel.SelectTarget(tp,c1190014.filter,tp,LOCATION_ONFIELD,0,1,1,nil,e:GetHandler():GetCode())
Duel.SetOperationInfo(0,CATEGORY_TOHAND,g,1,0,0)
Duel.SetOperationInfo(0,CATEGORY_NEGATE,eg,1,0,0)
if re:GetHandler():IsDestructable() and re:GetHandler():IsRelateToEffect(re) then
Duel.SetOperationInfo(0,CATEGORY_DESTROY,eg,1,0,0)
end
end
function c1190014.op1(e,tp,eg,ep,ev,re,r,rp)
local tc=Duel.GetFirstTarget()
if tc:IsFacedown() or not tc:IsRelateToEffect(e) then return end
Duel.SendtoHand(tc,nil,REASON_EFFECT)
if not tc:IsLocation(LOCATION_HAND) then return end
if Duel.NegateActivation(ev) and re:GetHandler():IsRelateToEffect(re) then
Duel.Destroy(eg,REASON_EFFECT)
end
end
--
function c1190014.filter2(c)
return c:IsCode(1190004) and c:IsAbleToHand()
end
function c1190014.tg2(e,tp,eg,ep,ev,re,r,rp,chk)
if chk==0 then return Duel.IsExistingMatchingCard(c1190014.filter2,tp,LOCATION_DECK,0,1,nil) end
Duel.SetOperationInfo(0,CATEGORY_TOHAND,nil,1,tp,LOCATION_DECK)
Duel.SetOperationInfo(0,CATEGORY_DAMAGE,nil,0,1-tp,400)
end
function c1190014.op2(e,tp,eg,ep,ev,re,r,rp)
if Duel.IsExistingMatchingCard(c1190014.filter2,tp,LOCATION_DECK,0,1,nil) then
Duel.Hint(HINT_SELECTMSG,tp,HINTMSG_ATOHAND)
local g=Duel.SelectMatchingCard(tp,c1190014.filter2,tp,LOCATION_DECK,0,1,1,nil)
Duel.SendtoHand(g,nil,REASON_EFFECT)
Duel.ConfirmCards(1-tp,g)
Duel.Damage(1-tp,400,REASON_EFFECT)
end
end
--ELF·地宫妖精
function c1190015.initial_effect(c)
--
local e1=Effect.CreateEffect(c)
e1:SetType(EFFECT_TYPE_IGNITION)
e1:SetRange(LOCATION_HAND)
e1:SetCode(EVENT_FREE_CHAIN)
e1:SetCategory(CATEGORY_SPECIAL_SUMMON+CATEGORY_TOHAND)
e1:SetProperty(EFFECT_FLAG_CARD_TARGET)
e1:SetCountLimit(1,1190015)
e1:SetTarget(c1190015.tg1)
e1:SetOperation(c1190015.op1)
c:RegisterEffect(e1)
--
local e2=Effect.CreateEffect(c)
e2:SetCategory(CATEGORY_TOHAND+CATEGORY_SEARCH)
e2:SetType(EFFECT_TYPE_IGNITION)
e2:SetRange(LOCATION_MZONE)
e2:SetCountLimit(1,1190065)
-- e2:SetCondition(c1190015.con2)
e2:SetTarget(c1190015.tg2)
e2:SetOperation(c1190015.op2)
c:RegisterEffect(e2)
end
--
c1190015.named_with_ELF=1
function c1190015.IsELF(c)
local m=_G["c"..c:GetCode()]
return m and m.named_with_ELF
end
--
function c1190015.filter1(c,e,tp)
return c1190015.IsELF(c) and c:IsAbleToHand() and c:IsType(TYPE_MONSTER) and c:IsFaceup()
end
function c1190015.tg1(e,tp,eg,ep,ev,re,r,rp,chk,chkc)
if chkc then return chkc:IsControler(tp) and chkc:IsLocation(LOCATION_MZONE) and c1190015.filter1(chkc,e,tp) end
if chk==0 then return Duel.IsExistingTarget(c1190015.filter1,tp,LOCATION_MZONE,0,1,nil,e,tp) and e:GetHandler():IsCanBeSpecialSummoned(e,0,tp,false,false) end
Duel.Hint(HINT_SELECTMSG,tp,HINTMSG_ATOHAND)
local g=Duel.SelectTarget(tp,c1190015.filter1,tp,LOCATION_MZONE,0,1,1,nil,e,tp)
Duel.SetOperationInfo(0,CATEGORY_TOHAND,g,1,tp,LOCATION_MZONE)
Duel.SetOperationInfo(0,CATEGORY_SPECIAL_SUMMON,e:GetHandler(),1,0,0)
end
function c1190015.op1(e,tp,eg,ep,ev,re,r,rp)
local tc=Duel.GetFirstTarget()
if tc:IsRelateToEffect(e) then
Duel.SendtoHand(tc,nil,REASON_EFFECT)
end
local c=e:GetHandler()
if c:IsRelateToEffect(e) then
Duel.SpecialSummon(c,0,tp,tp,false,false,POS_FACEUP)
end
end
--
function c1190015.tfilter2(c)
return c1190015.IsELF(c) and c:IsAbleToDeck() and c:IsType(TYPE_MONSTER)
end
function c1190015.tgfilter2(c)
return c:IsCode(1191201) and c:IsAbleToHand()
end
function c1190015.tg2(e,tp,eg,ep,ev,re,r,rp,chk,chkc)
if chk==0 then return Duel.IsExistingMatchingCard(c1190015.tfilter2,tp,LOCATION_MZONE+LOCATION_HAND,0,1,nil) and Duel.IsExistingMatchingCard(c1190015.tgfilter2,tp,LOCATION_DECK,0,1,nil) end
Duel.SetOperationInfo(0,CATEGORY_TODECK,nil,1,tp,LOCATION_HAND+LOCATION_MZONE)
Duel.SetOperationInfo(0,CATEGORY_TOHAND,nil,1,tp,LOCATION_DECK)
end
function c1190015.op2(e,tp,eg,ep,ev,re,r,rp)
Duel.Hint(HINT_SELECTMSG,tp,HINTMSG_TODECK)
local g=Duel.SelectMatchingCard(tp,c1190015.tfilter2,tp,LOCATION_HAND+LOCATION_MZONE,0,1,1,nil,e,tp)
if g:GetCount()>0 then
Duel.SendtoDeck(g,nil,2,REASON_EFFECT)
end
Duel.Hint(HINT_SELECTMSG,tp,HINTMSG_ATOHAND)
local g2=Duel.SelectMatchingCard(tp,c1190015.tgfilter2,tp,LOCATION_DECK,0,1,1,nil,e,tp)
if g2:GetCount()>0 then
Duel.SendtoHand(g2,nil,REASON_EFFECT)
Duel.ConfirmCards(1-tp,g2)
end
end
--
--ELF·精灵奇迹法师
function c1190016.initial_effect(c)
--
local e1=Effect.CreateEffect(c)
e1:SetCategory(CATEGORY_SPECIAL_SUMMON)
e1:SetType(EFFECT_TYPE_IGNITION)
e1:SetRange(LOCATION_HAND)
e1:SetCode(EVENT_FREE_CHAIN)
e1:SetCountLimit(1,1190016)
e1:SetCost(c1190016.cost1)
e1:SetTarget(c1190016.tg1)
e1:SetOperation(c1190016.op1)
c:RegisterEffect(e1)
--
local e2=Effect.CreateEffect(c)
e2:SetCategory(CATEGORY_SPECIAL_SUMMON)
e2:SetType(EFFECT_TYPE_SINGLE+EFFECT_TYPE_TRIGGER_O)
e2:SetCode(EVENT_TO_GRAVE)
e2:SetProperty(EFFECT_FLAG_CARD_TARGET+EFFECT_FLAG_DAMAGE_STEP+EFFECT_FLAG_DELAY)
e2:SetCountLimit(1,1190066)
e2:SetCondition(c1190016.con2)
e2:SetTarget(c1190016.tg2)
e2:SetOperation(c1190016.op2)
c:RegisterEffect(e2)
end
--
c1190016.named_with_ELF=1
function c1190016.IsELF(c)
local m=_G["c"..c:GetCode()]
return m and m.named_with_ELF
end
--
function c1190016.filter(c)
return c1190016.IsELF(c) and c:IsAbleToDeck()
end
function c1190016.cost1(e,tp,eg,ep,ev,re,r,rp,chk)
if chk==0 then return Duel.IsExistingMatchingCard(c1190016.filter,tp,LOCATION_GRAVE,0,3,nil) end
Duel.Hint(HINT_SELECTMSG,tp,HINTMSG_TODECK)
local g=Duel.SelectMatchingCard(tp,c1190016.filter,tp,LOCATION_GRAVE,0,3,3,nil)
Duel.SendtoDeck(g,nil,2,REASON_COST)
end
--
function c1190016.tg1(e,tp,eg,ep,ev,re,r,rp,chk,chkc)
if chk==0 then return Duel.GetMZoneCount(tp)>0 and e:GetHandler():IsCanBeSpecialSummoned(e,0,tp,false,false) end
Duel.SetOperationInfo(0,CATEGORY_SPECIAL_SUMMON,e:GetHandler(),1,0,0)
end
--
function c1190016.op1(e,tp,eg,ep,ev,re,r,rp)
local c=e:GetHandler()
if c:IsRelateToEffect(e) then
Duel.SpecialSummon(c,0,tp,tp,false,false,POS_FACEUP)
if Duel.GetFieldGroupCount(tp,LOCATION_DECK,0)==0 then return end
Duel.ConfirmDecktop(tp,1)
local g=Duel.GetDecktopGroup(tp,1)
local tc=g:GetFirst()
if c1190016.IsELF(tc) then
Duel.Damage(1-tp,400,REASON_EFFECT)
end
Duel.ShuffleDeck(tp)
end
end
--
function c1190016.con2(e,tp,eg,ep,ev,re,r,rp)
return e:GetHandler():IsPreviousLocation(LOCATION_HAND)
end
--
function c1190016.filter2(c,e,tp)
return c1190016.IsELF(c) and c:IsCanBeSpecialSummoned(e,0,tp,false,false) and c:IsLevelBelow(1)
end
function c1190016.tg2(e,tp,eg,ep,ev,re,r,rp,chk,chkc)
if chkc then return chkc:IsControler(tp) and chkc:IsLocation(LOCATION_GRAVE) and c1190016.filter2(chkc,e,tp) end
if chk==0 then return Duel.GetMZoneCount(tp)>0
and Duel.IsExistingTarget(c1190016.filter2,tp,LOCATION_GRAVE,0,1,nil,e,tp) end
Duel.Hint(HINT_SELECTMSG,tp,HINTMSG_SPSUMMON)
local g=Duel.SelectTarget(tp,c1190016.filter2,tp,LOCATION_GRAVE,0,1,1,nil,e,tp)
Duel.SetOperationInfo(0,CATEGORY_SPECIAL_SUMMON,g,1,0,0)
end
--
function c1190016.op2(e,tp,eg,ep,ev,re,r,rp)
local tc=Duel.GetFirstTarget()
if tc:IsRelateToEffect(e) then
Duel.SpecialSummon(tc,0,tp,tp,false,false,POS_FACEUP)
end
end
\ No newline at end of file
--ELF·水晶公主·缇娅
function c1190101.initial_effect(c)
--
aux.AddSynchroProcedure(c,c1190101.syfilter1,c1190101.syfilter2,1)
c:EnableReviveLimit()
--
local e1=Effect.CreateEffect(c)
e1:SetCategory(CATEGORY_SPECIAL_SUMMON+CATEGORY_TOKEN)
e1:SetType(EFFECT_TYPE_TRIGGER_O+EFFECT_TYPE_SINGLE)
e1:SetCode(EVENT_SPSUMMON_SUCCESS)
e1:SetCountLimit(1,1190101)
e1:SetCondition(c1190101.con1)
e1:SetTarget(c1190101.tg1)
e1:SetOperation(c1190101.op1)
c:RegisterEffect(e1)
--
local e2=Effect.CreateEffect(c)
e2:SetCategory(CATEGORY_NEGATE)
e2:SetType(EFFECT_TYPE_QUICK_O)
e2:SetCode(EVENT_CHAINING)
e2:SetProperty(EFFECT_FLAG_DAMAGE_STEP+EFFECT_FLAG_DAMAGE_CAL)
e2:SetRange(LOCATION_MZONE)
e2:SetCondition(c1190101.con2)
e2:SetCost(c1190101.cost2)
e2:SetTarget(c1190101.tg2)
e2:SetOperation(c1190101.op2)
c:RegisterEffect(e2)
end
--
c1190101.named_with_ELF=1
function c1190101.IsELF(c)
local m=_G["c"..c:GetCode()]
return m and m.named_with_ELF
end
--
function c1190101.syfilter1(c)
return c1190101.IsELF(c) and c:IsType(TYPE_TUNER)
end
function c1190101.syfilter2(c)
return c1190101.IsELF(c) and c:IsType(TYPE_MONSTER)
end
--
function c1190101.con1(e,tp,eg,ep,ev,re,r,rp)
return e:GetHandler():IsSummonType(SUMMON_TYPE_SYNCHRO)
end
--
function c1190101.tg1(e,tp,eg,ep,ev,re,r,rp,chk)
if chk==0 then return not Duel.IsPlayerAffectedByEffect(tp,59822133)
and Duel.GetMZoneCount(tp)>1
and Duel.IsPlayerCanSpecialSummonMonster(tp,1190901,0,0x4011,0,0,1,RACE_FAIRY,ATTRIBUTE_LIGHT) end
Duel.SetOperationInfo(0,CATEGORY_TOKEN,nil,2,0,0)
Duel.SetOperationInfo(0,CATEGORY_SPECIAL_SUMMON,nil,2,0,0)
end
function c1190101.op1(e,tp,eg,ep,ev,re,r,rp)
if Duel.IsPlayerAffectedByEffect(tp,59822133) then return end
if Duel.GetMZoneCount(tp)>1
and Duel.IsPlayerCanSpecialSummonMonster(tp,1190901,0,0x4011,0,0,1,RACE_WINDBEAST,ATTRIBUTE_DARK) then
for i=1,2 do
local token=Duel.CreateToken(tp,1190901)
Duel.SpecialSummonStep(token,0,tp,tp,false,false,POS_FACEUP)
local e1=Effect.CreateEffect(e:GetHandler())
e1:SetType(EFFECT_TYPE_SINGLE)
e1:SetValue(1)
e1:SetReset(RESET_EVENT+0x1fe0000)
e1:SetCode(EFFECT_CANNOT_BE_SYNCHRO_MATERIAL)
token:RegisterEffect(e1,true)
end
Duel.SpecialSummonComplete()
end
end
--
function c1190101.con2(e,tp,eg,ep,ev,re,r,rp)
return not e:GetHandler():IsStatus(STATUS_BATTLE_DESTROYED) and Duel.IsChainNegatable(ev) and ep~=tp
end
function c1190101.filter2(c)
return c:IsCode(1190901) and c:IsReleasable()
end
function c1190101.cost2(e,tp,eg,ep,ev,re,r,rp,chk)
if chk==0 then return Duel.IsExistingMatchingCard(c1190101.filter2,tp,LOCATION_MZONE,0,1,nil) end
local sg=Duel.SelectMatchingCard(tp,c1190101.filter2,tp,LOCATION_MZONE,0,1,1,nil)
Duel.Release(sg,REASON_COST)
end
function c1190101.tg2(e,tp,eg,ep,ev,re,r,rp,chk)
if chk==0 then return true end
Duel.SetOperationInfo(0,CATEGORY_NEGATE,eg,1,0,0)
end
function c1190101.op2(e,tp,eg,ep,ev,re,r,rp)
Duel.NegateActivation(ev)
end
--ELF·妖精公主
function c1190102.initial_effect(c)
--
aux.AddSynchroProcedure(c,c1190102.syfilter1,c1190102.syfilter2,1)
c:EnableReviveLimit()
--
local e1=Effect.CreateEffect(c)
e1:SetProperty(EFFECT_FLAG_CARD_TARGET)
e1:SetCategory(CATEGORY_SPECIAL_SUMMON+CATEGORY_TODECK)
e1:SetType(EFFECT_TYPE_TRIGGER_O+EFFECT_TYPE_SINGLE)
e1:SetCode(EVENT_SPSUMMON_SUCCESS)
e1:SetCountLimit(1,1190102)
e1:SetCondition(c1190102.con1)
e1:SetTarget(c1190102.tg1)
e1:SetOperation(c1190102.op1)
c:RegisterEffect(e1)
--
local e2=Effect.CreateEffect(c)
e2:SetCategory(CATEGORY_NEGATE)
e2:SetProperty(EFFECT_FLAG_DAMAGE_STEP+EFFECT_FLAG_DAMAGE_CAL)
e2:SetType(EFFECT_TYPE_QUICK_O)
e2:SetRange(LOCATION_MZONE)
e2:SetCountLimit(1,1190152)
e2:SetCode(EVENT_CHAINING)
e2:SetCondition(c1190102.con2)
e2:SetTarget(c1190102.tg2)
e2:SetOperation(c1190102.op2)
c:RegisterEffect(e2)
end
--
c1190102.named_with_ELF=1
function c1190102.IsELF(c)
local m=_G["c"..c:GetCode()]
return m and m.named_with_ELF
end
--
function c1190102.syfilter1(c)
return c1190102.IsELF(c) and c:IsType(TYPE_TUNER)
end
function c1190102.syfilter2(c)
return c1190102.IsELF(c) and c:IsType(TYPE_MONSTER)
end
--
function c1190102.con1(e,tp,eg,ep,ev,re,r,rp)
return e:GetHandler():IsSummonType(SUMMON_TYPE_SYNCHRO)
end
--
function c1190102.filter1(c,e,tp)
return c1190102.IsELF(c) and c:IsCanBeSpecialSummoned(e,0,tp,false,false)
end
function c1190102.tg1(e,tp,eg,ep,ev,re,r,rp,chk,chkc)
if chkc then return chkc:IsControler(tp) and chkc:IsLocation(LOCATION_GRAVE) and c1190102.filter1(chkc,e,tp) end
if chk==0 then return Duel.GetMZoneCount(tp)>0
and Duel.IsExistingTarget(c1190102.filter1,tp,LOCATION_GRAVE,0,1,nil,e,tp) end
Duel.Hint(HINT_SELECTMSG,tp,HINTMSG_SPSUMMON)
local g=Duel.SelectTarget(tp,c1190102.filter1,tp,LOCATION_GRAVE,0,1,1,nil,e,tp)
Duel.SetOperationInfo(0,CATEGORY_SPECIAL_SUMMON,g,1,0,0)
end
--
function c1190102.op1(e,tp,eg,ep,ev,re,r,rp)
local tc=Duel.GetFirstTarget()
if tc:IsRelateToEffect(e) then
Duel.SpecialSummon(tc,0,tp,tp,false,false,POS_FACEUP)
end
Duel.Damage(1-tp,400,REASON_EFFECT)
end
--
--
function c1190102.con2(e,tp,eg,ep,ev,re,r,rp)
return not e:GetHandler():IsStatus(STATUS_BATTLE_DESTROYED)
and ep~=tp and Duel.IsChainNegatable(ev)
end
function c1190102.tg2(e,tp,eg,ep,ev,re,r,rp,chk)
if chk==0 then return true end
Duel.SetOperationInfo(0,CATEGORY_NEGATE,eg,1,0,0)
end
function c1190102.op2(e,tp,eg,ep,ev,re,r,rp)
Duel.NegateActivation(ev)
local e2=Effect.CreateEffect(e:GetHandler())
e2:SetType(EFFECT_TYPE_FIELD)
e2:SetCode(EFFECT_CANNOT_TO_HAND)
e2:SetReset(RESET_PHASE+PHASE_END,2)
e2:SetTargetRange(0,LOCATION_DECK)
Duel.RegisterEffect(e2,tp)
end
--ELF·远古森林巨龙
function c1190103.initial_effect(c)
--
aux.AddSynchroProcedure(c,c1190103.syfilter1,c1190103.syfilter2,1)
c:EnableReviveLimit()
--
local e1=Effect.CreateEffect(c)
e1:SetProperty(EFFECT_FLAG_CARD_TARGET)
e1:SetCategory(CATEGORY_SPECIAL_SUMMON)
e1:SetType(EFFECT_TYPE_TRIGGER_O+EFFECT_TYPE_SINGLE)
e1:SetCode(EVENT_SPSUMMON_SUCCESS)
e1:SetCountLimit(1,1190103)
e1:SetCost(c1190103.cost1)
e1:SetCondition(c1190103.con1)
e1:SetOperation(c1190103.op1)
c:RegisterEffect(e1)
--
local e2=Effect.CreateEffect(c)
e2:SetCategory(CATEGORY_SPECIAL_SUMMON)
e2:SetType(EFFECT_TYPE_SINGLE+EFFECT_TYPE_TRIGGER_O)
e2:SetProperty(EFFECT_FLAG_DELAY)
e2:SetCode(EVENT_TO_GRAVE)
e2:SetCountLimit(1,1190153)
e2:SetCondition(c1190103.con2)
e2:SetTarget(c1190103.tg2)
e2:SetOperation(c1190103.op2)
c:RegisterEffect(e2)
local e5=e2:Clone()
e5:SetCode(EVENT_REMOVE)
c:RegisterEffect(e5)
local e6=e2:Clone()
e6:SetCode(EVENT_TO_DECK)
c:RegisterEffect(e6)
--
end
--
c1190103.named_with_ELF=1
function c1190103.IsELF(c)
local m=_G["c"..c:GetCode()]
return m and m.named_with_ELF
end
--
function c1190103.syfilter1(c)
return c1190002.IsELF(c) and c:IsType(TYPE_TUNER)
end
function c1190103.syfilter2(c)
return c1190002.IsELF(c) and c:IsType(TYPE_MONSTER)
end
--
function c1190103.con1(e,tp,eg,ep,ev,re,r,rp)
return e:GetHandler():IsSummonType(SUMMON_TYPE_SYNCHRO)
end
function c1190103.cost1(e,tp,eg,ep,ev,re,r,rp,chk)
if chk==0 then return Duel.CheckLPCost(tp,2000) end
Duel.PayLPCost(tp,2000)
end
function c1190103.op1(e,tp,eg,ep,ev,re,r,rp)
local e1=Effect.CreateEffect(e:GetHandler())
e1:SetType(EFFECT_TYPE_FIELD)
e1:SetCode(EFFECT_CANNOT_ATTACK)
e1:SetTargetRange(0,LOCATION_MZONE)
e1:SetReset(RESET_PHASE+PHASE_END,2)
Duel.RegisterEffect(e1,tp)
end
--
function c1190103.con2(e,tp,eg,ep,ev,re,r,rp)
return e:GetHandler():IsPreviousLocation(LOCATION_ONFIELD) and e:GetHandler():IsPreviousPosition(POS_FACEUP)
end
function c1190103.filter2(c,e,tp)
return c1190002.IsELF(c) and c:IsCanBeSpecialSummoned(e,0,tp,false,false) and c:IsLevelBelow(1) and c:IsType(TYPE_MONSTER)
end
function c1190103.tg2(e,tp,eg,ep,ev,re,r,rp,chk)
if chk==0 then return Duel.GetMZoneCount(tp)>0
and Duel.IsExistingMatchingCard(c1190103.filter2,tp,LOCATION_DECK,0,1,nil,e,tp) end
Duel.SetOperationInfo(0,CATEGORY_SPECIAL_SUMMON,nil,1,0,LOCATION_DECK)
end
function c1190103.op2(e,tp,eg,ep,ev,re,r,rp)
if Duel.GetMZoneCount(tp)<=0 then return end
Duel.Hint(HINT_SELECTMSG,tp,HINTMSG_SPSUMMON)
local g=Duel.SelectMatchingCard(tp,c1190103.filter2,tp,LOCATION_DECK,0,1,1,nil,e,tp)
if g:GetCount()>0 then
Duel.SpecialSummon(g,0,tp,tp,false,false,POS_FACEUP)
end
end
\ No newline at end of file
--ELF·始源妖精女皇
function c1190104.initial_effect(c)
--
aux.AddSynchroProcedure(c,c1190104.syfilter1,c1190104.syfilter2,1)
c:EnableReviveLimit()
--
local e1=Effect.CreateEffect(c)
e1:SetProperty(EFFECT_FLAG_CARD_TARGET)
e1:SetCategory(CATEGORY_SPECIAL_SUMMON)
e1:SetType(EFFECT_TYPE_TRIGGER_O+EFFECT_TYPE_SINGLE)
e1:SetCode(EVENT_SPSUMMON_SUCCESS)
e1:SetCountLimit(1,1190104)
e1:SetCondition(c1190104.con1)
e1:SetOperation(c1190104.op1)
c:RegisterEffect(e1)
--
local e2=Effect.CreateEffect(c)
e2:SetCategory(CATEGORY_NEGATE)
e2:SetProperty(EFFECT_FLAG_DAMAGE_STEP+EFFECT_FLAG_DAMAGE_CAL)
e2:SetType(EFFECT_TYPE_QUICK_O)
e2:SetRange(LOCATION_MZONE)
e2:SetCountLimit(1,1190154)
e2:SetCode(EVENT_CHAINING)
e2:SetCondition(c1190104.con2)
e2:SetTarget(c1190104.tg2)
e2:SetOperation(c1190104.op2)
c:RegisterEffect(e2)
end
--
c1190104.named_with_ELF=1
function c1190104.IsELF(c)
local m=_G["c"..c:GetCode()]
return m and m.named_with_ELF
end
--
function c1190104.syfilter1(c)
return c1190104.IsELF(c) and c:IsType(TYPE_TUNER)
end
function c1190104.syfilter2(c)
return c1190104.IsELF(c) and c:IsType(TYPE_MONSTER)
end
--
function c1190104.con1(e,tp,eg,ep,ev,re,r,rp)
return e:GetHandler():IsSummonType(SUMMON_TYPE_SYNCHRO)
end
function c1190104.op1(e,tp,eg,ep,ev,re,r,rp)
Duel.SetLP(1-tp,Duel.GetLP(1-tp)/2)
end
--
function c1190104.con2(e,tp,eg,ep,ev,re,r,rp)
return not e:GetHandler():IsStatus(STATUS_BATTLE_DESTROYED)
and ep~=tp and Duel.IsChainNegatable(ev)
end
function c1190104.tg2(e,tp,eg,ep,ev,re,r,rp,chk)
if chk==0 then return true end
Duel.SetOperationInfo(0,CATEGORY_NEGATE,eg,1,0,0)
end
function c1190104.op2(e,tp,eg,ep,ev,re,r,rp)
Duel.NegateActivation(ev)
local e2=Effect.CreateEffect(e:GetHandler())
e2:SetType(EFFECT_TYPE_FIELD)
e2:SetProperty(EFFECT_FLAG_PLAYER_TARGET)
e2:SetCode(EFFECT_CANNOT_ACTIVATE)
e2:SetTargetRange(0,1)
e2:SetValue(c1190104.aclimit)
e2:SetReset(RESET_PHASE+PHASE_END,2)
Duel.RegisterEffect(e2,tp)
end
function c1190104.aclimit(e,re,tp)
return (re:IsActiveType(TYPE_SPELL) or re:IsActiveType(TYPE_TRAP)) and not re:GetHandler():IsImmuneToEffect(e)
end
--ELF·伊芙衍生物
function c1190901.initial_effect(c)
end
--
c1190901.named_with_ELF=1
function c1190901.IsELF(c)
local m=_G["c"..c:GetCode()]
return m and m.named_with_ELF
end
--
\ No newline at end of file
--ELF·翼之辉
function c1191001.initial_effect(c)
--
local e1=Effect.CreateEffect(c)
e1:SetCategory(CATEGORY_DRAW)
e1:SetType(EFFECT_TYPE_ACTIVATE)
e1:SetCode(EVENT_FREE_CHAIN)
e1:SetProperty(EFFECT_FLAG_PLAYER_TARGET)
e1:SetCountLimit(1,1191001+EFFECT_COUNT_CODE_OATH)
e1:SetCost(c1191001.cost1)
e1:SetTarget(c1191001.tg1)
e1:SetOperation(c1191001.op1)
c:RegisterEffect(e1)
--
end
--
c1191001.named_with_ELF=1
function c1191001.IsELF(c)
local m=_G["c"..c:GetCode()]
return m and m.named_with_ELF
end
--
function c1191001.cfilter(c)
return c1191001.IsELF(c) and c:IsAbleToGraveAsCost()
end
function c1191001.cost1(e,tp,eg,ep,ev,re,r,rp,chk)
if chk==0 then return Duel.IsExistingMatchingCard(c1191001.cfilter,tp,LOCATION_HAND,0,1,e:GetHandler()) end
Duel.DiscardHand(tp,c1191001.cfilter,1,1,REASON_COST,nil)
end
function c1191001.tg1(e,tp,eg,ep,ev,re,r,rp,chk)
if chk==0 then return Duel.IsPlayerCanDraw(tp,2) end
Duel.SetTargetPlayer(tp)
Duel.SetTargetParam(2)
Duel.SetOperationInfo(0,CATEGORY_DRAW,nil,0,tp,2)
end
function c1191001.filter1(c)
return c:IsType(TYPE_MONSTER) and c1191001.IsELF(c) and c:IsLevelBelow(1)
end
function c1191001.opfilter1(c,e,tp)
return c:IsType(TYPE_MONSTER) and c1191001.IsELF(c) and c:IsLevelBelow(1) and c:IsCanBeSpecialSummoned(e,0,tp,false,false,POS_FACEUP)
end
function c1191001.ofilter1(c)
return c1191001.IsELF(c)
end
function c1191001.op1(e,tp,eg,ep,ev,re,r,rp)
local p,d=Duel.GetChainInfo(0,CHAININFO_TARGET_PLAYER,CHAININFO_TARGET_PARAM)
Duel.Draw(p,d,REASON_EFFECT)
local dc=Duel.GetOperatedGroup()
if Duel.GetMZoneCount(tp)<=0 then return end
local sg=dc:Filter(c1191001.ofilter1,nil)
if sg:GetCount()==2 then
local g3=Duel.GetMatchingGroup(c1191001.filter1,tp,LOCATION_HAND+LOCATION_GRAVE,0,nil)
if g3:GetCount()>0 and Duel.SelectYesNo(tp,aux.Stringid(1191001,0)) then
Duel.ConfirmCards(1-tp,dc)
Duel.ShuffleHand(tp)
Duel.Hint(HINT_SELECTMSG,tp,HINTMSG_SPSUMMON)
local g2=Duel.SelectMatchingCard(tp,c1191001.opfilter1,tp,LOCATION_HAND+LOCATION_GRAVE,0,1,1,nil,e,tp)
if g2:GetCount()>0 then
Duel.SpecialSummon(g2,0,tp,tp,false,false,POS_FACEUP)
end
end
end
end
--ELF·精灵环绕
function c1191002.initial_effect(c)
--
local e1=Effect.CreateEffect(c)
e1:SetDescription(aux.Stringid(1191002,1))
e1:SetCategory(CATEGORY_SPECIAL_SUMMON+CATEGORY_DRAW)
e1:SetType(EFFECT_TYPE_ACTIVATE)
e1:SetCode(EVENT_FREE_CHAIN)
e1:SetCountLimit(1,1191002+EFFECT_COUNT_CODE_OATH)
e1:SetTarget(c1191002.tg1)
e1:SetOperation(c1191002.op1)
c:RegisterEffect(e1)
--
--
local e2=Effect.CreateEffect(c)
e2:SetDescription(aux.Stringid(1191002,2))
e2:SetCategory(CATEGORY_SPECIAL_SUMMON)
e2:SetProperty(EFFECT_FLAG_CARD_TARGET)
e2:SetType(EFFECT_TYPE_ACTIVATE)
e2:SetCode(EVENT_FREE_CHAIN)
e2:SetCountLimit(1,1191002+EFFECT_COUNT_CODE_OATH)
e2:SetTarget(c1191002.tg2)
e2:SetOperation(c1191002.op2)
c:RegisterEffect(e2)
--
end
--
c1191002.named_with_ELF=1
function c1191002.IsELF(c)
local m=_G["c"..c:GetCode()]
return m and m.named_with_ELF
end
--
--function c1191002.cfilter(c)
-- return c1191002.IsELF(c) and c:IsType(TYPE_MONSTER)
--end
function c1191002.tg1(e,tp,eg,ep,ev,re,r,rp,chk)
if chk==0 then return Duel.GetFieldGroupCount(tp,LOCATION_DECK,0)>0 end
Duel.SetOperationInfo(0,CATEGORY_SPECIAL_SUMMON,nil,0,tp,LOCATION_DECK)
Duel.SetOperationInfo(0,CATEGORY_SPECIAL_SUMMON,nil,0,tp,LOCATION_GRAVE)
Duel.SetOperationInfo(0,CATEGORY_DRAW,nil,0,tp,1)
end
--
function c1191002.filter(c,e,tp)
return c1191002.IsELF(c) and c:IsType(TYPE_MONSTER) and c:IsLevelBelow(1)-- and c:IsCanBeSpecialSummoned(e,0,tp,false,false,POS_FACEUP)
end
function c1191002.opfilter(c,e,tp)
return c1191002.IsELF(c) and c:IsType(TYPE_MONSTER) and c:IsLevelBelow(1) and c:IsCanBeSpecialSummoned(e,0,tp,false,false,POS_FACEUP)
end
function c1191002.op1(e,tp,eg,ep,ev,re,r,rp)
if Duel.GetFieldGroupCount(tp,LOCATION_DECK,0)==0 then return end
Duel.ConfirmDecktop(tp,1)
local g=Duel.GetDecktopGroup(tp,1)
local tc=g:GetFirst()
if c1191002.IsELF(tc) and tc:IsCanBeSpecialSummoned(e,0,tp,false,false,POS_FACEUP) and Duel.GetMZoneCount(tp)>0 then
-- Duel.DisableShuffleCheck()
Duel.SpecialSummon(tc,0,tp,tp,false,false,POS_FACEUP)
--
if Duel.GetMZoneCount(tp)<=0 then return end
local g3=Duel.GetMatchingGroup(c1191002.filter,tp,LOCATION_GRAVE,0,nil)
if g3:GetCount()>0 and Duel.SelectYesNo(tp,aux.Stringid(1191002,0)) then
Duel.BreakEffect()
Duel.Hint(HINT_SELECTMSG,tp,HINTMSG_SPSUMMON)
local g2=Duel.SelectMatchingCard(tp,c1191002.opfilter,tp,LOCATION_GRAVE,0,1,1,nil,e,tp)
if g2:GetCount()>0 then
local tc2=g2:GetFirst()
Duel.SpecialSummon(g2,0,tp,tp,false,false,POS_FACEUP)
end
end
else if c1191002.IsELF(tc) and (tc:IsType(TYPE_SPELL) or tc:IsType(TYPE_TRAP)) then
-- Duel.DisableShuffleCheck()
Duel.Draw(tp,1,REASON_EFFECT)
else
Duel.ShuffleDeck(tp)
end
end
end
--
--
function c1191002.filter2(c,e,tp)
return c1191002.IsELF(c) and c:IsAbleToHand() and c:IsType(TYPE_MONSTER)
end
function c1191002.tg2(e,tp,eg,ep,ev,re,r,rp,chk,chkc)
if chkc then return chkc:IsControler(tp) and chkc:IsLocation(LOCATION_GRAVE) and c1191002.filter2(chkc,e,tp) end
if chk==0 then return Duel.IsExistingTarget(c1191002.filter2,tp,LOCATION_GRAVE,0,1,nil,e,tp) end
if chk==0 then return Duel.IsPlayerCanDraw(tp,1) end
Duel.Hint(HINT_SELECTMSG,tp,HINTMSG_ATOHAND)
local g=Duel.SelectTarget(tp,c1191002.filter2,tp,LOCATION_GRAVE,0,1,1,nil,e,tp)
Duel.SetOperationInfo(0,CATEGORY_TOHAND,g,1,0,0)
Duel.SetOperationInfo(0,CATEGORY_TOGRAVE,g,1,0,0)
Duel.SetOperationInfo(0,CATEGORY_DRAW,nil,0,tp,1)
end
--
function c1191002.opfilter2(c,e,tp)
return c1191002.IsELF(c) and c:IsAbleToGrave()
end
function c1191002.op2(e,tp,eg,ep,ev,re,r,rp)
local tg=Duel.GetFirstTarget()
if tg:IsRelateToEffect(e) then
Duel.SendtoHand(tg,tp,REASON_EFFECT)
end
Duel.Draw(tp,1,REASON_EFFECT)
Duel.Hint(HINT_SELECTMSG,tp,HINTMSG_TOGRAVE)
local g=Duel.SelectMatchingCard(tp,c1191002.opfilter2,tp,LOCATION_HAND,0,1,1,nil,e,tp)
Duel.SendtoGrave(g,REASON_EFFECT)
end
\ No newline at end of file
--ELF·自然指引
function c1191003.initial_effect(c)
--
local e1=Effect.CreateEffect(c)
e1:SetCategory(CATEGORY_TOHAND+CATEGORY_DRAW+CATEGORY_SPECIAL_SUMMON)
e1:SetType(EFFECT_TYPE_ACTIVATE)
e1:SetCode(EVENT_FREE_CHAIN)
e1:SetProperty(EFFECT_FLAG_CARD_TARGET)
e1:SetCountLimit(1,1191003+EFFECT_COUNT_CODE_OATH)
e1:SetTarget(c1191003.tg1)
e1:SetOperation(c1191003.op1)
c:RegisterEffect(e1)
--
end
--
c1191003.named_with_ELF=1
function c1191003.IsELF(c)
local m=_G["c"..c:GetCode()]
return m and m.named_with_ELF
end
--
function c1191003.tfilter(c,tp)
return c1191003.IsELF(c) and c:IsType(TYPE_MONSTER) and c:IsAbleToHand()
end
function c1191003.tg1(e,tp,eg,ep,ev,re,r,rp,chk,chkc)
if chkc then return chkc:IsLocation(LOCATION_MZONE) and chkc:IsControler(tp) and c1191003.filter2(chkc,tp) end
if chk==0 then return Duel.IsExistingTarget(c1191003.tfilter,tp,LOCATION_MZONE,0,1,nil,tp) end
if chk==0 then return Duel.IsPlayerCanDraw(tp,1) end
Duel.Hint(HINT_SELECTMSG,tp,HINTMSG_ATOHAND)
local g=Duel.SelectTarget(tp,c1191003.tfilter,tp,LOCATION_MZONE,0,1,1,nil,e,tp)
Duel.SetOperationInfo(0,CATEGORY_TOHAND,g,1,0,0)
Duel.SetOperationInfo(0,CATEGORY_DRAW,nil,0,tp,1)
end
--
function c1191003.filter1(c)
return c:IsCode(1190001)
end
function c1191003.opfilter(c,e,tp)
return c:IsCode(1190001) and c:IsCanBeSpecialSummoned(e,0,tp,false,false,POS_FACEUP)
end
function c1191003.op1(e,tp,eg,ep,ev,re,r,rp)
local tg=Duel.GetFirstTarget()
if tg:IsRelateToEffect(e) then
Duel.SendtoHand(tg,tp,REASON_EFFECT)
end
Duel.Draw(tp,1,REASON_EFFECT)
local dc=Duel.GetOperatedGroup():GetFirst()
if Duel.GetMZoneCount(tp)<=0 then return end
if c1191003.IsELF(dc) then
local g3=Duel.GetMatchingGroup(c1191003.filter1,tp,LOCATION_DECK,0,nil)
if g3:GetCount()>0 and Duel.SelectYesNo(tp,aux.Stringid(1191003,0)) then
Duel.ConfirmCards(1-tp,dc)
Duel.Hint(HINT_SELECTMSG,tp,HINTMSG_SPSUMMON)
local g2=Duel.SelectMatchingCard(tp,c1191003.opfilter,tp,LOCATION_DECK,0,1,1,nil,e,tp)
if g2:GetCount()>0 then
Duel.SpecialSummon(g2,0,tp,tp,false,false,POS_FACEUP)
end
end
end
end
--ELF·回归根源
function c1191004.initial_effect(c)
--
local e1=Effect.CreateEffect(c)
e1:SetCategory(CATEGORY_TOHAND)
e1:SetType(EFFECT_TYPE_ACTIVATE)
e1:SetCode(EVENT_FREE_CHAIN)
e1:SetCountLimit(1,1191004+EFFECT_COUNT_CODE_OATH)
e1:SetCost(c1191004.cost1)
e1:SetCondition(c1191004.con1)
e1:SetTarget(c1191004.tg1)
e1:SetOperation(c1191004.op1)
c:RegisterEffect(e1)
--
end
--
c1191004.named_with_ELF=1
function c1191004.IsELF(c)
local m=_G["c"..c:GetCode()]
return m and m.named_with_ELF
end
--
function c1191004.cost1(e,tp,eg,ep,ev,re,r,rp,chk)
if chk==0 then return Duel.CheckLPCost(tp,1000) end
Duel.PayLPCost(tp,1000)
end
function c1191004.confilter(c)
return c:IsFaceup() and c:IsCode(1190104)
end
function c1191004.con1(e,tp,eg,ep,ev,re,r,rp)
return Duel.IsExistingMatchingCard(c1191004.confilter,tp,LOCATION_MZONE,0,1,nil)
end
--
function c1191004.tg1(e,tp,eg,ep,ev,re,r,rp,chk)
if chk==0 then return Duel.IsExistingMatchingCard(aux.TRUE,tp,0,LOCATION_ONFIELD,1,nil) end
local g=Duel.GetMatchingGroup(aux.TRUE,tp,0,LOCATION_ONFIELD,nil)
Duel.SetOperationInfo(0,CATEGORY_TOHAND,g,g:GetCount(),0,0)
end
function c1191004.op1(e,tp,eg,ep,ev,re,r,rp)
local g=Duel.GetMatchingGroup(aux.TRUE,tp,0,LOCATION_ONFIELD,nil)
Duel.SendtoHand(g,nil,REASON_EFFECT)
end
--ELF·白银箭矢
function c1191005.initial_effect(c)
--
local e1=Effect.CreateEffect(c)
e1:SetType(EFFECT_TYPE_ACTIVATE)
e1:SetCode(EVENT_FREE_CHAIN)
e1:SetProperty(EFFECT_FLAG_CARD_TARGET)
e1:SetCountLimit(1,1191005)
e1:SetTarget(c1191005.tg1)
e1:SetOperation(c1191005.op1)
c:RegisterEffect(e1)
--
local e2=Effect.CreateEffect(c)
e2:SetDescription(aux.Stringid(1191005,0))
e2:SetCategory(CATEGORY_TOHAND)
e2:SetType(EFFECT_TYPE_FIELD+EFFECT_TYPE_TRIGGER_O)
e2:SetCode(EVENT_PREDRAW)
e2:SetRange(LOCATION_GRAVE)
e2:SetCondition(c1191005.con2)
e2:SetTarget(c1191005.tg2)
e2:SetOperation(c1191005.op2)
c:RegisterEffect(e2)
--
end
--
c1191005.named_with_ELF=1
function c1191005.IsELF(c)
local m=_G["c"..c:GetCode()]
return m and m.named_with_ELF
end
--
function c1191005.filter1(c,tp)
return c:IsFaceup() and c1191005.IsELF(c) and c:IsType(TYPE_MONSTER)
end
function c1191005.tg1(e,tp,eg,ep,ev,re,r,rp,chk,chkc)
if chkc then return chkc:IsLocation(LOCATION_MZONE) and chkc:IsControler(tp) and c1191005.filter1(chkc,tp) end
if chk==0 then return Duel.IsExistingTarget(c1191005.filter1,tp,LOCATION_MZONE,0,1,nil,tp) and Duel.IsPlayerCanDraw(tp,1) end
Duel.Hint(HINT_SELECTMSG,tp,HINTMSG_TARGET)
Duel.SelectTarget(tp,c1191005.filter1,tp,LOCATION_MZONE,0,1,1,nil)
Duel.SetOperationInfo(0,CATEGORY_DRAW,nil,0,tp,1)
end
function c1191005.op1(e,tp,eg,ep,ev,re,r,rp)
local tc=Duel.GetFirstTarget()
if tc:IsFaceup() and tc:IsRelateToEffect(e) then
local Lv=tc:GetLevel()
Duel.Damage(1-tp,Lv*145,REASON_EFFECT)
Duel.Draw(tp,1,REASON_EFFECT)
end
end
--
function c1191005.con2(e,tp,eg,ep,ev,re,r,rp)
return tp==Duel.GetTurnPlayer() and Duel.GetFieldGroupCount(tp,LOCATION_DECK,0)>0
and Duel.GetDrawCount(tp)>0
end
function c1191005.tg2(e,tp,eg,ep,ev,re,r,rp,chk)
if chk==0 then return e:GetHandler():IsAbleToHand() end
local dt=Duel.GetDrawCount(tp)
if dt~=0 then
_replace_count=0
_replace_max=dt
local e1=Effect.CreateEffect(e:GetHandler())
e1:SetType(EFFECT_TYPE_FIELD)
e1:SetProperty(EFFECT_FLAG_PLAYER_TARGET)
e1:SetCode(EFFECT_DRAW_COUNT)
e1:SetTargetRange(1,0)
e1:SetReset(RESET_PHASE+PHASE_DRAW)
e1:SetValue(0)
Duel.RegisterEffect(e1,tp)
end
Duel.SetOperationInfo(0,CATEGORY_TOHAND,e:GetHandler(),1,0,0)
end
function c1191005.op2(e,tp,eg,ep,ev,re,r,rp)
local c=e:GetHandler()
_replace_count=_replace_count+1
if _replace_count<=_replace_max and c:IsRelateToEffect(e) then
Duel.SendtoHand(c,nil,REASON_EFFECT)
Duel.ConfirmCards(1-tp,c)
end
end
--ELF·茑萝魔弹
function c1191006.initial_effect(c)
--
local e1=Effect.CreateEffect(c)
e1:SetType(EFFECT_TYPE_ACTIVATE)
e1:SetCode(EVENT_FREE_CHAIN)
e1:SetCategory(CATEGORY_TOGRAVE+CATEGORY_DAMAGE)
e1:SetProperty(EFFECT_FLAG_CARD_TARGET)
e1:SetCountLimit(1,1191006)
e1:SetCondition(c1191006.con1)
e1:SetTarget(c1191006.tg1)
e1:SetOperation(c1191006.op1)
c:RegisterEffect(e1)
--
local e2=Effect.CreateEffect(c)
e2:SetType(EFFECT_TYPE_IGNITION)
e2:SetProperty(EFFECT_FLAG_CARD_TARGET)
e2:SetRange(LOCATION_GRAVE)
e2:SetCost(c1191006.cost2)
e2:SetTarget(c1191006.tg2)
e2:SetOperation(c1191006.op2)
c:RegisterEffect(e2)
end
--
c1191006.named_with_ELF=1
function c1191006.IsELF(c)
local m=_G["c"..c:GetCode()]
return m and m.named_with_ELF
end
--
function c1191006.confilter(c)
return c:IsFaceup() and c1191006.IsELF(c) and c:IsType(TYPE_MONSTER)
end
function c1191006.con1(e,tp,eg,ep,ev,re,r,rp)
return Duel.IsExistingMatchingCard(c1191006.confilter,tp,LOCATION_MZONE,0,1,nil)
end
function c1191006.filter(c,e,tp)
return c:IsType(TYPE_MONSTER) and c:IsAbleToGrave()
end
function c1191006.tg1(e,tp,eg,ep,ev,re,r,rp,chk,chkc)
if chkc then return chkc:IsControler(1-tp) and c1191006.filter(chkc,e,tp) and chkc:IsLocation(LOCATION_MZONE) end
if chk==0 then return Duel.IsExistingTarget(c1191006.filter,tp,0,LOCATION_MZONE,1,nil,e,tp) end
Duel.Hint(HINT_SELECTMSG,tp,HINTMSG_TOGRAVE)
local g=Duel.SelectTarget(tp,c1191006.filter,tp,0,LOCATION_MZONE,1,1,nil,e,tp)
Duel.SetOperationInfo(0,CATEGORY_TOGRAVE,g,1,0,0)
end
--
function c1191006.op1(e,tp,eg,ep,ev,re,r,rp)
local tg=Duel.GetFirstTarget()
if tg:IsRelateToEffect(e) then
Duel.SendtoGrave(tg,REASON_EFFECT)
end
local atk=tg:GetTextAttack()
if atk<0 then atk=0 end
Duel.Damage(1-tp,atk/2,REASON_EFFECT)
end
--
function c1191006.cost2(e,tp,eg,ep,ev,re,r,rp,chk)
if chk==0 then return e:GetHandler():IsAbleToDeckAsCost() and Duel.IsExistingMatchingCard(c1191006.filter2,tp,LOCATION_DECK,0,1,nil,e,tp) end
Duel.SendtoDeck(e:GetHandler(),tp,2,REASON_COST)
end
function c1191006.filter2(c)
return c:IsCode(1190005) and c:IsAbleToGrave()
end
function c1191006.tg2(e,tp,eg,ep,ev,re,r,rp,chk)
if chk==0 then return Duel.IsExistingMatchingCard(c1191006.filter2,tp,LOCATION_DECK,0,1,nil,e,tp) end
Duel.SetOperationInfo(0,CATEGORY_TOGRAVE,nil,1,tp,LOCATION_DECK)
end
function c1191006.op2(e,tp,eg,ep,ev,re,r,rp)
Duel.Hint(HINT_SELECTMSG,tp,HINTMSG_TOGRAVE)
local g=Duel.SelectMatchingCard(tp,c1191006.filter2,tp,LOCATION_DECK,0,1,1,nil,e,tp)
if g:GetCount()>0 then
Duel.SendtoGrave(g,REASON_EFFECT)
end
end
--ELF·诱人庭院
function c1191201.initial_effect(c)
--
c:SetUniqueOnField(1,0,1191201)
--
local e1=Effect.CreateEffect(c)
e1:SetType(EFFECT_TYPE_ACTIVATE)
e1:SetCode(EVENT_FREE_CHAIN)
e1:SetCondition(c1191201.con1)
c:RegisterEffect(e1)
--
local e4=Effect.CreateEffect(c)
e4:SetType(EFFECT_TYPE_SINGLE)
e4:SetCode(EFFECT_CANNOT_BE_EFFECT_TARGET)
e4:SetProperty(EFFECT_FLAG_SINGLE_RANGE)
e4:SetRange(LOCATION_ONFIELD)
e4:SetValue(1)
c:RegisterEffect(e4)
--
local e2=Effect.CreateEffect(c)
e2:SetType(EFFECT_TYPE_FIELD+EFFECT_TYPE_CONTINUOUS)
e2:SetCode(EVENT_CHAINING)
e2:SetRange(LOCATION_SZONE)
e2:SetProperty(EFFECT_FLAG_CANNOT_DISABLE)
e2:SetOperation(c1191201.op2)
c:RegisterEffect(e2)
local e3=Effect.CreateEffect(c)
e3:SetType(EFFECT_TYPE_FIELD+EFFECT_TYPE_CONTINUOUS)
e3:SetCode(EVENT_CHAIN_SOLVED)
e3:SetRange(LOCATION_SZONE)
e3:SetCondition(c1191201.con3)
e3:SetOperation(c1191201.op3)
c:RegisterEffect(e3)
--
local e5=Effect.CreateEffect(c)
e5:SetCategory(CATEGORY_TOHAND+CATEGORY_SEARCH)
e5:SetType(EFFECT_TYPE_SINGLE+EFFECT_TYPE_TRIGGER_O)
e5:SetProperty(EFFECT_FLAG_DELAY)
e5:SetCode(EVENT_TO_GRAVE)
e5:SetCondition(c1191201.con5)
e5:SetTarget(c1191201.tg5)
e5:SetOperation(c1191201.op5)
c:RegisterEffect(e5)
end
--
c1191201.named_with_ELF=1
function c1191201.IsELF(c)
local m=_G["c"..c:GetCode()]
return m and m.named_with_ELF
end
--
function c1191201.filter(c)
return c:IsFaceup() and c1191201.IsELF(c) and c:IsType(TYPE_SYNCHRO)
end
function c1191201.con1(e,tp,eg,ep,ev,re,r,rp)
return Duel.IsExistingMatchingCard(c1191201.filter,tp,LOCATION_MZONE,0,1,nil)
end
--
function c1191201.op2(e,tp,eg,ep,ev,re,r,rp)
if rp==tp then return end
e:GetHandler():RegisterFlagEffect(1191201,RESET_EVENT+0x1fc0000+RESET_CHAIN,0,1)
end
function c1191201.con3(e,tp,eg,ep,ev,re,r,rp)
local c=e:GetHandler()
return ep~=tp and c:GetFlagEffect(1191201)~=0
end
function c1191201.op3(e,tp,eg,ep,ev,re,r,rp)
Duel.Hint(HINT_CARD,0,1191201)
Duel.Damage(1-tp,200,REASON_EFFECT)
end
--
function c1191201.con5(e,tp,eg,ep,ev,re,r,rp)
return e:GetHandler():IsPreviousLocation(LOCATION_ONFIELD)
end
function c1191201.tg5(e,tp,eg,ep,ev,re,r,rp,chk)
if chk==0 then return Duel.IsExistingMatchingCard(aux.TRUE,tp,0,LOCATION_MZONE,1,nil) end
local g=Duel.GetMatchingGroup(aux.TRUE,tp,0,LOCATION_MZONE,nil)
Duel.SetOperationInfo(0,CATEGORY_TOGRAVE,g,g:GetCount(),0,0)
end
function c1191201.op5(e,tp,eg,ep,ev,re,r,rp)
local g=Duel.GetMatchingGroup(aux.TRUE,tp,0,LOCATION_MZONE,nil)
Duel.SendtoGrave(g,REASON_EFFECT)
end
\ No newline at end of file
--ELF·丰收庆典
function c1191301.initial_effect(c)
--
local e1=Effect.CreateEffect(c)
e1:SetType(EFFECT_TYPE_ACTIVATE)
e1:SetCode(EVENT_FREE_CHAIN)
c:RegisterEffect(e1)
--
local e2=Effect.CreateEffect(c)
e2:SetType(EFFECT_TYPE_IGNITION)
e2:SetRange(LOCATION_FZONE)
e2:SetCategory(CATEGORY_SPECIAL_SUMMON+CATEGORY_TODECK)
e2:SetProperty(EFFECT_FLAG_CARD_TARGET)
e2:SetCountLimit(1,1191301)
e2:SetTarget(c1191301.tg1)
e2:SetOperation(c1191301.op1)
c:RegisterEffect(e2)
--
local e3=Effect.CreateEffect(c)
e3:SetType(EFFECT_TYPE_FIELD)
e3:SetCode(EFFECT_IMMUNE_EFFECT)
e3:SetRange(LOCATION_SZONE)
e3:SetTargetRange(LOCATION_MZONE,0)
e3:SetTarget(c1191301.tg3)
e3:SetValue(c1191301.efilter)
c:RegisterEffect(e3)
--
local e4=Effect.CreateEffect(c)
e4:SetCategory(CATEGORY_SPECIAL_SUMMON)
e4:SetType(EFFECT_TYPE_SINGLE+EFFECT_TYPE_TRIGGER_O)
e4:SetCode(EVENT_TO_GRAVE)
e4:SetProperty(EFFECT_FLAG_CARD_TARGET+EFFECT_FLAG_DAMAGE_STEP+EFFECT_FLAG_DELAY)
e4:SetCondition(c1191301.con4)
e4:SetTarget(c1191301.tg4)
e4:SetOperation(c1191301.op4)
c:RegisterEffect(e4)
end
--
c1191301.named_with_ELF=1
function c1191301.IsELF(c)
local m=_G["c"..c:GetCode()]
return m and m.named_with_ELF
end
--
function c1191301.filter1(c,e,tp)
return c1191301.IsELF(c) and c:IsAbleToDeck() and c:IsType(TYPE_MONSTER) and c:IsFaceup() and c:GetLevel()==2 and not c:IsType(TYPE_SYNCHRO)
end
function c1191301.tfilter1(c,e,tp)
return c1191301.IsELF(c) and c:IsType(TYPE_MONSTER) and c:GetLevel()==2 and c:IsCanBeSpecialSummoned(e,0,tp,false,false)
end
function c1191301.tg1(e,tp,eg,ep,ev,re,r,rp,chk,chkc)
if chkc then return chkc:IsControler(tp) and chkc:IsLocation(LOCATION_MZONE) and c1191301.filter1(chkc,e,tp) end
if chk==0 then return Duel.IsExistingTarget(c1191301.filter1,tp,LOCATION_MZONE,0,1,nil,e,tp) and Duel.IsExistingMatchingCard(c1191301.tfilter1,tp,LOCATION_DECK,0,1,nil,e,tp) end
Duel.Hint(HINT_SELECTMSG,tp,HINTMSG_TODECK)
local g=Duel.SelectTarget(tp,c1191301.filter1,tp,LOCATION_MZONE,0,1,1,nil,e,tp)
Duel.SetOperationInfo(0,CATEGORY_TODECK,g,1,tp,LOCATION_MZONE)
Duel.SetOperationInfo(0,CATEGORY_SPECIAL_SUMMON,nil,1,0,LOCATION_DECK)
end
function c1191301.op1(e,tp,eg,ep,ev,re,r,rp)
local tc=Duel.GetFirstTarget()
if tc:IsRelateToEffect(e) then
Duel.SendtoDeck(tc,nil,2,REASON_EFFECT)
end
if Duel.GetMZoneCount(tp)<=0 then return end
Duel.Hint(HINT_SELECTMSG,tp,HINTMSG_SPSUMMON)
local g=Duel.SelectMatchingCard(tp,c1191301.tfilter1,tp,LOCATION_DECK,0,1,1,nil,e,tp)
if g:GetCount()>0 then
local tc=g:GetFirst()
Duel.SpecialSummon(g,0,tp,tp,false,false,POS_FACEUP)
end
end
--
function c1191301.tgfilter3(c)
return c:IsFaceup() and c1191301.IsELF(c) and c:IsControler(tp) and c:IsType(TYPE_MONSTER)
end
function c1191301.tg3(e,c)
local g=Duel.GetMatchingGroup(c1191301.tgfilter3,c:GetControler(),LOCATION_MZONE,0,nil)
return g
end
function c1191301.efilter(e,te)
return te:GetOwnerPlayer()~=e:GetHandlerPlayer() and te:IsActiveType(TYPE_MONSTER)
end
--
function c1191301.con4(e,tp,eg,ep,ev,re,r,rp)
return e:GetHandler():IsPreviousLocation(LOCATION_ONFIELD)
end
function c1191301.filter4(c,e,tp)
return c1191301.ELF(c) and c:IsCanBeSpecialSummoned(e,0,tp,false,false)
end
function c1191301.tg4(e,tp,eg,ep,ev,re,r,rp,chk,chkc)
if chkc then return chkc:IsLocation(LOCATION_GRAVE) and chkc:IsControler(tp) and c1191301.filter4(chkc,e,tp) end
if chk==0 then return Duel.GetMZoneCount(tp)>0
and Duel.IsExistingTarget(c1191301.filter4,tp,LOCATION_GRAVE,0,1,nil,e,tp) end
Duel.Hint(HINT_SELECTMSG,tp,HINTMSG_SPSUMMON)
local g=Duel.SelectTarget(tp,c1191301.filter4,tp,LOCATION_GRAVE,0,1,1,nil,e,tp)
Duel.SetOperationInfo(0,CATEGORY_SPECIAL_SUMMON,g,1,0,0)
end
function c1191301.op4(e,tp,eg,ep,ev,re,r,rp)
local tc=Duel.GetFirstTarget()
if tc:IsRelateToEffect(e) then
Duel.SpecialSummon(tc,0,tp,tp,false,false,POS_FACEUP)
end
end
\ No newline at end of file
--传颂之初章
function c16063001.initial_effect(c)
--Activate
local e1=Effect.CreateEffect(c)
e1:SetCategory(CATEGORY_TOHAND+CATEGORY_SEARCH)
e1:SetType(EFFECT_TYPE_ACTIVATE)
e1:SetCode(EVENT_FREE_CHAIN)
e1:SetCountLimit(1,16063001+EFFECT_COUNT_CODE_OATH)
e1:SetTarget(c16063001.target)
e1:SetOperation(c16063001.activate)
c:RegisterEffect(e1)
--spsummon
local e2=Effect.CreateEffect(c)
e2:SetDescription(aux.Stringid(16063001,0))
e2:SetCategory(CATEGORY_SPECIAL_SUMMON)
e2:SetType(EFFECT_TYPE_SINGLE+EFFECT_TYPE_TRIGGER_O)
e2:SetProperty(EFFECT_FLAG_DAMAGE_STEP+EFFECT_FLAG_DELAY)
e2:SetCode(EVENT_TO_GRAVE)
e2:SetCondition(c16063001.spcon)
e2:SetTarget(c16063001.sptg)
e2:SetOperation(c16063001.spop)
c:RegisterEffect(e2)
end
function c16063001.filter(c)
return c:IsSetCard(0x5c5) and c:IsAbleToHand()
end
function c16063001.target(e,tp,eg,ep,ev,re,r,rp,chk)
if chk==0 then return Duel.IsExistingMatchingCard(c16063001.filter,tp,LOCATION_DECK,0,1,nil) end
Duel.SetOperationInfo(0,CATEGORY_TOHAND,nil,1,tp,LOCATION_DECK)
end
function c16063001.activate(e,tp,eg,ep,ev,re,r,rp)
Duel.Hint(HINT_SELECTMSG,tp,HINTMSG_ATOHAND)
local g=Duel.SelectMatchingCard(tp,c16063001.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 c16063001.spcon(e,tp,eg,ep,ev,re,r,rp)
return e:GetHandler():IsPreviousLocation(LOCATION_ONFIELD) and e:GetHandler():IsReason(REASON_DESTROY)
end
function c16063001.spfilter(c,e,tp)
return c:IsSetCard(0x5c5) and c:IsLevelBelow(4) and c:IsCanBeSpecialSummoned(e,0,tp,false,false)
end
function c16063001.sptg(e,tp,eg,ep,ev,re,r,rp,chk)
if chk==0 then return Duel.GetMZoneCount(tp)>0
and Duel.IsExistingMatchingCard(c16063001.spfilter,tp,LOCATION_DECK,0,1,nil,e,tp) end
Duel.SetOperationInfo(0,CATEGORY_SPECIAL_SUMMON,nil,1,0,0)
end
function c16063001.spop(e,tp,eg,ep,ev,re,r,rp)
Duel.Hint(HINT_SELECTMSG,tp,HINTMSG_SPSUMMON)
local g=Duel.SelectMatchingCard(tp,c16063001.spfilter,tp,LOCATION_DECK,0,1,1,nil,e,tp)
if g:GetCount()>0 then
Duel.SpecialSummon(g,0,tp,tp,false,false,POS_FACEUP)
end
end
\ No newline at end of file
--传颂之中章
function c16063002.initial_effect(c)
--Activate
local e1=Effect.CreateEffect(c)
e1:SetCategory(CATEGORY_DESTROY+CATEGORY_SPECIAL_SUMMON)
e1:SetProperty(EFFECT_FLAG_CARD_TARGET)
e1:SetType(EFFECT_TYPE_ACTIVATE)
e1:SetCode(EVENT_FREE_CHAIN)
e1:SetCountLimit(1,16063002+EFFECT_COUNT_CODE_OATH)
e1:SetTarget(c16063002.target)
e1:SetOperation(c16063002.activate)
c:RegisterEffect(e1)
--tohand
local e2=Effect.CreateEffect(c)
e2:SetDescription(aux.Stringid(16063002,0))
e2:SetCategory(CATEGORY_TOHAND)
e2:SetType(EFFECT_TYPE_SINGLE+EFFECT_TYPE_TRIGGER_O)
e2:SetProperty(EFFECT_FLAG_DAMAGE_STEP+EFFECT_FLAG_DELAY)
e2:SetCode(EVENT_TO_GRAVE)
e2:SetCondition(c16063002.thcon)
e2:SetTarget(c16063002.thtg)
e2:SetOperation(c16063002.thop)
c:RegisterEffect(e2)
end
function c16063002.desfilter(c,e,tp)
local lv=c:GetLevel()
return c:IsDestructable()
and Duel.IsExistingMatchingCard(c16063002.spfilter,tp,LOCATION_DECK,0,1,nil,e,tp,lv)
end
function c16063002.spfilter(c,e,tp,lv)
return c:GetLevel()==lv and c:IsSetCard(0x5c5) and c:IsCanBeSpecialSummoned(e,0,tp,false,false)
end
function c16063002.target(e,tp,eg,ep,ev,re,r,rp,chk,chkc)
if chkc then return c16063002.desfilter(chkc,e,tp) and chkc:IsControler(tp) and chkc:IsLocation(LOCATION_MZONE) end
if chk==0 then return Duel.GetMZoneCount(tp)>-1
and Duel.IsExistingTarget(c16063002.desfilter,tp,LOCATION_MZONE,0,1,nil,e,tp) end
Duel.Hint(HINT_SELECTMSG,tp,HINTMSG_DESTROY)
local g=Duel.SelectTarget(tp,c16063002.desfilter,tp,LOCATION_MZONE,0,1,1,nil,e,tp)
Duel.SetOperationInfo(0,CATEGORY_DESTROY,g,1,0,0)
Duel.SetOperationInfo(0,CATEGORY_SPECIAL_SUMMON,nil,1,0,0)
end
function c16063002.activate(e,tp,eg,ep,ev,re,r,rp)
local tc=Duel.GetFirstTarget()
local lv=tc:GetLevel()
if tc:IsRelateToEffect(e) and Duel.Destroy(tc,REASON_EFFECT)>0 then
Duel.Hint(HINT_SELECTMSG,tp,HINTMSG_SPSUMMON)
local g=Duel.SelectMatchingCard(tp,c16063002.spfilter,tp,LOCATION_DECK,0,1,1,nil,e,tp,lv)
if g:GetCount()>0 then
Duel.SpecialSummon(g,0,tp,tp,false,false,POS_FACEUP)
end
end
end
function c16063002.thcon(e,tp,eg,ep,ev,re,r,rp)
return e:GetHandler():IsPreviousLocation(LOCATION_ONFIELD) and e:GetHandler():IsReason(REASON_DESTROY)
end
function c16063002.thfilter(c)
return c:IsSetCard(0x5c5) and c:IsType(TYPE_MONSTER) and c:IsAbleToHand()
end
function c16063002.thtg(e,tp,eg,ep,ev,re,r,rp,chk)
if chk==0 then return Duel.IsExistingMatchingCard(c16063002.thfilter,tp,LOCATION_GRAVE,0,1,nil) end
Duel.SetOperationInfo(0,CATEGORY_TOHAND,nil,1,0,0)
end
function c16063002.thop(e,tp,eg,ep,ev,re,r,rp)
Duel.Hint(HINT_SELECTMSG,tp,HINTMSG_ATOHAND)
local g=Duel.SelectMatchingCard(tp,c16063002.thfilter,tp,LOCATION_GRAVE,0,1,1,nil)
if g:GetCount()>0 then
Duel.SendtoHand(g,nil,REASON_EFFECT)
Duel.ConfirmCards(1-tp,g)
end
end
\ No newline at end of file
--传颂之物 久远
function c16063003.initial_effect(c)
--Destroy
local e1=Effect.CreateEffect(c)
e1:SetDescription(aux.Stringid(16063003,0))
e1:SetProperty(EFFECT_FLAG_CARD_TARGET)
e1:SetType(EFFECT_TYPE_QUICK_O)
e1:SetRange(LOCATION_MZONE)
e1:SetCode(EVENT_FREE_CHAIN)
e1:SetCountLimit(1,16063003)
e1:SetCategory(CATEGORY_DESTROY+CATEGORY_TOHAND)
e1:SetCondition(c16063003.descon)
e1:SetTarget(c16063003.destg)
e1:SetOperation(c16063003.desop)
c:RegisterEffect(e1)
--tohand
local e2=Effect.CreateEffect(c)
e2:SetDescription(aux.Stringid(63002,0))
e2:SetCategory(CATEGORY_SEARCH+CATEGORY_TOHAND)
e2:SetType(EFFECT_TYPE_SINGLE+EFFECT_TYPE_TRIGGER_O)
e2:SetProperty(EFFECT_FLAG_DAMAGE_STEP+EFFECT_FLAG_DELAY)
e2:SetCode(EVENT_TO_GRAVE)
e2:SetCountLimit(1,16063003)
e2:SetCondition(c16063003.thcon)
e2:SetTarget(c16063003.thtg)
e2:SetOperation(c16063003.thop)
c:RegisterEffect(e2)
end
function c16063003.descon(e,tp,eg,ep,ev,re,r,rp)
return Duel.GetTurnPlayer()==tp
end
function c16063003.desfilter(c)
return c:IsSetCard(0x5c5) and c:IsDestructable() and c:IsFaceup()
end
function c16063003.filter(c)
return c:IsSetCard(0x5c5) and c:IsType(TYPE_TRAP+TYPE_SPELL) and c:IsAbleToHand()
end
function c16063003.destg(e,tp,eg,ep,ev,re,r,rp,chk,chkc)
if chkc then return false end
if chk==0 then return Duel.IsExistingTarget(c16063003.desfilter,tp,LOCATION_ONFIELD,0,2,nil)
and Duel.IsExistingMatchingCard(c16063003.filter,tp,LOCATION_GRAVE,0,1,nil) end
Duel.Hint(HINT_SELECTMSG,tp,HINTMSG_DESTROY)
local g1=Duel.SelectTarget(tp,c16063003.desfilter,tp,LOCATION_ONFIELD,0,1,1,nil)
Duel.Hint(HINT_SELECTMSG,tp,HINTMSG_DESTROY)
local g2=Duel.SelectTarget(tp,c16063003.desfilter,tp,LOCATION_ONFIELD,0,1,1,g1:GetFirst())
g1:Merge(g2)
Duel.SetOperationInfo(0,CATEGORY_DESTROY,g1,2,0,0)
Duel.SetOperationInfo(0,CATEGORY_TOHAND,nil,1,tp,LOCATION_GRAVE)
end
function c16063003.desop(e,tp,eg,ep,ev,re,r,rp)
local g=Duel.GetChainInfo(0,CHAININFO_TARGET_CARDS)
local tg=g:Filter(Card.IsRelateToEffect,nil,e)
if tg:GetCount()>0 and Duel.Destroy(tg,REASON_EFFECT)>0 then
Duel.Hint(HINT_SELECTMSG,tp,HINTMSG_ATOHAND)
local tc=Duel.SelectMatchingCard(tp,c16063003.filter,tp,LOCATION_GRAVE,0,1,1,nil)
if tc:GetCount()>0 then
Duel.SendtoHand(tc,nil,REASON_EFFECT)
Duel.ConfirmCards(1-tp,tc)
end
end
end
function c16063003.thcon(e,tp,eg,ep,ev,re,r,rp)
return e:GetHandler():IsPreviousLocation(LOCATION_ONFIELD)
end
function c16063003.thfilter(c)
return c:IsSetCard(0x5c5) and c:IsType(TYPE_MONSTER) and c:IsAbleToHand()
end
function c16063003.thtg(e,tp,eg,ep,ev,re,r,rp,chk)
if chk==0 then return Duel.IsExistingMatchingCard(c16063003.thfilter,tp,LOCATION_DECK,0,1,nil) end
Duel.SetOperationInfo(0,CATEGORY_TOHAND,nil,1,tp,LOCATION_DECK)
end
function c16063003.thop(e,tp,eg,ep,ev,re,r,rp)
Duel.Hint(HINT_SELECTMSG,tp,HINTMSG_ATOHAND)
local g=Duel.SelectMatchingCard(tp,c16063003.thfilter,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 c16063004.initial_effect(c)
--synchro summon
aux.AddSynchroProcedure(c,aux.FilterBoolFunction(Card.IsSetCard,0x5c5),aux.NonTuner(nil),1)
c:EnableReviveLimit()
--spsummon
local e1=Effect.CreateEffect(c)
e1:SetDescription(aux.Stringid(16063004,1))
e1:SetCategory(CATEGORY_SPECIAL_SUMMON+CATEGORY_DESTROY)
e1:SetType(EFFECT_TYPE_IGNITION)
e1:SetProperty(EFFECT_FLAG_CARD_TARGET)
e1:SetRange(LOCATION_MZONE)
e1:SetCountLimit(1)
e1:SetTarget(c16063004.sptg)
e1:SetOperation(c16063004.spop)
c:RegisterEffect(e1)
--disable
local e2=Effect.CreateEffect(c)
e2:SetDescription(aux.Stringid(16063004,0))
e2:SetCategory(CATEGORY_DISABLE)
e2:SetType(EFFECT_TYPE_SINGLE+EFFECT_TYPE_TRIGGER_O)
e2:SetProperty(EFFECT_FLAG_DAMAGE_STEP+EFFECT_FLAG_DELAY)
e2:SetCode(EVENT_TO_GRAVE)
e2:SetCondition(c16063004.discon)
e2:SetTarget(c16063004.distg)
e2:SetOperation(c16063004.disop)
c:RegisterEffect(e2)
end
function c16063004.desfilter(c)
return c:IsDestructable() and c:IsSetCard(0x5c5) and c:IsFaceup()
end
function c16063004.spfilter(c,e,tp)
return c:IsLevelBelow(4) and c:IsSetCard(0x5c5) and c:IsCanBeSpecialSummoned(e,0,tp,false,false)
end
function c16063004.sptg(e,tp,eg,ep,ev,re,r,rp,chk,chkc)
if chkc then return c16063004.desfilter(chkc) and chkc:IsControler(tp) and c:IsLocation(LOCATION_ONFIELD) end
if chk==0 then return Duel.GetMZoneCount(tp)>-1
and Duel.IsExistingTarget(c16063004.desfilter,tp,LOCATION_ONFIELD,0,1,nil)
and Duel.IsExistingMatchingCard(c16063004.spfilter,tp,LOCATION_GRAVE,0,1,nil,e,tp) end
Duel.Hint(HINT_SELECTMSG,tp,HINTMSG_DESTROY)
local g=Duel.SelectTarget(tp,c16063004.desfilter,tp,LOCATION_ONFIELD,0,1,1,nil)
Duel.SetOperationInfo(0,CATEGORY_DESTROY,g,1,0,0)
Duel.SetOperationInfo(0,CATEGORY_SPECIAL_SUMMON,nil,1,0,0)
end
function c16063004.spop(e,tp,eg,ep,ev,re,r,rp)
local tc=Duel.GetFirstTarget()
if tc:IsRelateToEffect(e) and Duel.Destroy(tc,REASON_EFFECT)>0 then
Duel.Hint(HINT_SELECTMSG,tp,HINTMSG_SPSUMMON)
local g=Duel.SelectMatchingCard(tp,c16063004.spfilter,tp,LOCATION_GRAVE,0,1,1,nil,e,tp)
if g:GetCount()>0 then
Duel.SpecialSummon(g,0,tp,tp,false,false,POS_FACEUP)
end
end
end
function c16063004.discon(e,tp,eg,ep,ev,re,r,rp)
return e:GetHandler():IsPreviousLocation(LOCATION_ONFIELD)
end
function c16063004.disfilter(c)
return c:IsFaceup() and not c:IsDisabled()
end
function c16063004.distg(e,tp,eg,ep,ev,re,r,rp,chk)
if chk==0 then return Duel.IsExistingTarget(c16063004.disfilter,tp,0,LOCATION_ONFIELD,1,nil) end
Duel.Hint(HINT_SELECTMSG,tp,HINTMSG_DESTROY)
local g=Duel.GetMatchingGroup(c16063004.disfilter,tp,0,LOCATION_ONFIELD,nil)
Duel.SetOperationInfo(0,CATEGORY_DISABLE,g,g:GetCount(),0,0)
end
function c16063004.disop(e,tp,eg,ep,ev,re,r,rp)
local g=Duel.GetMatchingGroup(c16063004.disfilter,tp,0,LOCATION_ONFIELD,nil)
local tc=g:GetFirst()
while tc do
local e1=Effect.CreateEffect(e:GetHandler())
e1:SetType(EFFECT_TYPE_SINGLE)
e1:SetCode(EFFECT_DISABLE)
e1:SetReset(RESET_EVENT+0x1fe0000)
tc:RegisterEffect(e1)
local e2=Effect.CreateEffect(e:GetHandler())
e2:SetType(EFFECT_TYPE_SINGLE)
e2:SetCode(EFFECT_DISABLE_EFFECT)
e2:SetReset(RESET_EVENT+0x1fe0000)
tc:RegisterEffect(e2)
tc=g:GetNext()
end
end
\ No newline at end of file
--传颂之物 哈克
function c16063005.initial_effect(c)
--special summon
local e1=Effect.CreateEffect(c)
e1:SetType(EFFECT_TYPE_FIELD)
e1:SetCode(EFFECT_SPSUMMON_PROC)
e1:SetProperty(EFFECT_FLAG_UNCOPYABLE)
e1:SetRange(LOCATION_HAND)
e1:SetCountLimit(1,63101)
e1:SetCondition(c16063005.spcon)
c:RegisterEffect(e1)
--destroy
local e2=Effect.CreateEffect(c)
e2:SetDescription(aux.Stringid(16063005,0))
e2:SetCategory(CATEGORY_DESTROY)
e2:SetType(EFFECT_TYPE_SINGLE+EFFECT_TYPE_TRIGGER_O)
e2:SetProperty(EFFECT_FLAG_DAMAGE_STEP+EFFECT_FLAG_DELAY)
e2:SetCode(EVENT_TO_GRAVE)
e2:SetCountLimit(1,16063005)
e2:SetCondition(c16063005.descon)
e2:SetTarget(c16063005.destg)
e2:SetOperation(c16063005.desop)
c:RegisterEffect(e2)
end
function c16063005.filter(c)
return c:IsFaceup() and c:IsSetCard(0x5c5) and not c:IsCode(16063005)
end
function c16063005.spcon(e,c)
if c==nil then return true end
return Duel.GetMZoneCount(c:GetControler())>0
and Duel.IsExistingMatchingCard(c16063005.filter,c:GetControler(),LOCATION_MZONE,0,1,nil)
end
function c16063005.descon(e,tp,eg,ep,ev,re,r,rp)
return e:GetHandler():IsPreviousLocation(LOCATION_ONFIELD)
end
function c16063005.desfilter(c)
return c:IsType(TYPE_TRAP+TYPE_SPELL) and c:IsDestructable()
end
function c16063005.destg(e,tp,eg,ep,ev,re,r,rp,chk)
if chk==0 then return Duel.IsExistingMatchingCard(c16063005.desfilter,tp,LOCATION_ONFIELD,LOCATION_ONFIELD,1,nil) end
local g=Duel.GetMatchingGroup(c16063005.desfilter,tp,LOCATION_ONFIELD,LOCATION_ONFIELD,nil)
Duel.SetOperationInfo(0,CATEGORY_DESTROY,g,1,0,0)
end
function c16063005.desop(e,tp,eg,ep,ev,re,r,rp)
Duel.Hint(HINT_SELECTMSG,tp,HINTMSG_DESTROY)
local g=Duel.SelectMatchingCard(tp,c16063005.desfilter,tp,LOCATION_ONFIELD,LOCATION_ONFIELD,1,1,nil)
if g:GetCount()>0 then
Duel.HintSelection(g)
Duel.Destroy(g,REASON_EFFECT)
end
end
--传颂之物 艾露露
function c16063006.initial_effect(c)
--spsummon
local e1=Effect.CreateEffect(c)
e1:SetDescription(aux.Stringid(16063006,1))
e1:SetCategory(CATEGORY_SPECIAL_SUMMON)
e1:SetType(EFFECT_TYPE_IGNITION)
e1:SetRange(LOCATION_MZONE)
e1:SetCountLimit(1,16063006)
e1:SetCost(c16063006.spcost)
e1:SetTarget(c16063006.sptg)
e1:SetOperation(c16063006.spop)
c:RegisterEffect(e1)
--destroy
local e2=Effect.CreateEffect(c)
e2:SetDescription(aux.Stringid(16063006,0))
e2:SetCategory(CATEGORY_DESTROY)
e2:SetType(EFFECT_TYPE_SINGLE+EFFECT_TYPE_TRIGGER_O)
e2:SetProperty(EFFECT_FLAG_CARD_TARGET+EFFECT_FLAG_DAMAGE_STEP+EFFECT_FLAG_DELAY)
e2:SetCode(EVENT_TO_GRAVE)
e2:SetCountLimit(1,16063006)
e2:SetCondition(c16063006.descon)
e2:SetTarget(c16063006.destg)
e2:SetOperation(c16063006.desop)
c:RegisterEffect(e2)
end
function c16063006.spcost(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 c16063006.filter(c,e,tp)
return c:IsSetCard(0x5c5) and c:IsCanBeSpecialSummoned(e,0,tp,false,false)
end
function c16063006.sptg(e,tp,eg,ep,ev,re,r,rp,chk)
if chk==0 then return Duel.GetMZoneCount(tp)>-1
and Duel.IsExistingMatchingCard(c16063006.filter,tp,LOCATION_GRAVE,0,1,nil,e,tp) end
Duel.SetOperationInfo(0,CATEGORY_SPECIAL_SUMMON,nil,1,tp,LOCATION_GRAVE)
end
function c16063006.spop(e,tp,eg,ep,ev,re,r,rp)
if Duel.GetMZoneCount(tp)<=0 then return end
Duel.Hint(HINT_SELECTMSG,tp,HINTMSG_SPSUMMON)
local g=Duel.SelectMatchingCard(tp,c16063006.filter,tp,LOCATION_GRAVE,0,1,1,nil,e,tp)
local tc=g:GetFirst()
if tc then
Duel.SpecialSummon(tc,0,tp,tp,false,false,POS_FACEUP)
end
end
function c16063006.descon(e,tp,eg,ep,ev,re,r,rp)
return e:GetHandler():IsPreviousLocation(LOCATION_ONFIELD)
end
function c16063006.desfilter(c)
return c:IsDestructable()
end
function c16063006.destg(e,tp,eg,ep,ev,re,r,rp,chk,chkc)
if chkc then return chkc:IsOnField() and c16063006.desfilter(chkc) end
if chk==0 then return Duel.IsExistingTarget(c16063006.desfilter,tp,LOCATION_ONFIELD,LOCATION_ONFIELD,1,nil) end
Duel.Hint(HINT_SELECTMSG,tp,HINTMSG_DESTROY)
local g=Duel.SelectTarget(tp,c16063006.desfilter,tp,LOCATION_ONFIELD,LOCATION_ONFIELD,1,1,nil)
Duel.SetOperationInfo(0,CATEGORY_DESTROY,g,1,0,0)
end
function c16063006.desop(e,tp,eg,ep,ev,re,r,rp)
local tc=Duel.GetFirstTarget()
if tc:IsRelateToEffect(e) then
Duel.Destroy(tc,REASON_EFFECT)
end
end
\ No newline at end of file
--传颂之物 阿露露
function c16063007.initial_effect(c)
--tograve
local e1=Effect.CreateEffect(c)
e1:SetDescription(aux.Stringid(16063007,0))
e1:SetCategory(CATEGORY_TOHAND)
e1:SetType(EFFECT_TYPE_SINGLE+EFFECT_TYPE_TRIGGER_O)
e1:SetCode(EVENT_SUMMON_SUCCESS)
e1:SetProperty(EFFECT_FLAG_DAMAGE_STEP+EFFECT_FLAG_DELAY)
e1:SetCountLimit(1,16063007)
e1:SetTarget(c16063007.thtg)
e1:SetOperation(c16063007.thop)
c:RegisterEffect(e1)
local e2=e1:Clone()
e2:SetCode(EVENT_SPSUMMON_SUCCESS)
c:RegisterEffect(e2)
--spsummon
local e3=Effect.CreateEffect(c)
e3:SetDescription(aux.Stringid(16063007,0))
e3:SetCategory(CATEGORY_SPECIAL_SUMMON)
e3:SetType(EFFECT_TYPE_SINGLE+EFFECT_TYPE_TRIGGER_O)
e3:SetProperty(EFFECT_FLAG_DAMAGE_STEP+EFFECT_FLAG_DELAY)
e3:SetCode(EVENT_TO_GRAVE)
e3:SetCountLimit(1,16063007)
e3:SetCondition(c16063007.spcon)
e3:SetTarget(c16063007.sptg)
e3:SetOperation(c16063007.spop)
c:RegisterEffect(e3)
end
function c16063007.thfilter(c)
return c:IsSetCard(0x5c5) and c:IsType(TYPE_MONSTER) and c:IsAbleToHand()
end
function c16063007.thtg(e,tp,eg,ep,ev,re,r,rp,chk)
if chk==0 then return Duel.IsExistingMatchingCard(c16063007.thfilter,tp,LOCATION_GRAVE,0,1,nil) end
Duel.SetOperationInfo(0,CATEGORY_TOHAND,nil,1,tp,LOCATION_GRAVE)
end
function c16063007.thop(e,tp,eg,ep,ev,re,r,rp)
Duel.Hint(HINT_SELECTMSG,tp,HINTMSG_ATOHAND)
local g=Duel.SelectMatchingCard(tp,c16063007.thfilter,tp,LOCATION_GRAVE,0,1,1,nil)
if g:GetCount()>0 then
Duel.SendtoHand(g,nil,REASON_EFFECT)
Duel.ConfirmCards(1-tp,g)
end
end
function c16063007.spcon(e,tp,eg,ep,ev,re,r,rp)
return e:GetHandler():IsPreviousLocation(LOCATION_ONFIELD)
end
function c16063007.spfilter(c,e,tp)
return c:IsSetCard(0x5c5) and c:IsCanBeSpecialSummoned(e,0,tp,false,false)
end
function c16063007.sptg(e,tp,eg,ep,ev,re,r,rp,chk)
if chk==0 then return Duel.GetMZoneCount(tp)>0
and Duel.IsExistingMatchingCard(c16063007.spfilter,tp,LOCATION_HAND,0,1,nil,e,tp) end
Duel.SetOperationInfo(0,CATEGORY_SPECIAL_SUMMON,nil,1,0,0)
end
function c16063007.spop(e,tp,eg,ep,ev,re,r,rp)
Duel.Hint(HINT_SELECTMSG,tp,HINTMSG_SPSUMMON)
local g=Duel.SelectMatchingCard(tp,c16063007.spfilter,tp,LOCATION_HAND,0,1,1,nil,e,tp)
if g:GetCount()>0 then
Duel.SpecialSummon(g,0,tp,tp,false,false,POS_FACEUP)
end
end
\ No newline at end of file
--传颂之物 哈克奥罗
function c16063008.initial_effect(c)
--spsummon
local e1=Effect.CreateEffect(c)
e1:SetDescription(aux.Stringid(16063008,0))
e1:SetCategory(CATEGORY_SPECIAL_SUMMON)
e1:SetType(EFFECT_TYPE_SINGLE+EFFECT_TYPE_TRIGGER_O)
e1:SetCode(EVENT_SUMMON_SUCCESS)
e1:SetProperty(EFFECT_FLAG_DAMAGE_STEP+EFFECT_FLAG_DELAY)
e1:SetCountLimit(1,16063008)
e1:SetTarget(c16063008.sptg)
e1:SetOperation(c16063008.spop)
c:RegisterEffect(e1)
local e2=e1:Clone()
e2:SetCode(EVENT_SPSUMMON_SUCCESS)
c:RegisterEffect(e2)
--tograve
local e3=Effect.CreateEffect(c)
e3:SetDescription(aux.Stringid(16063008,0))
e3:SetCategory(CATEGORY_TOGRAVE)
e3:SetType(EFFECT_TYPE_SINGLE+EFFECT_TYPE_TRIGGER_O)
e3:SetProperty(EFFECT_FLAG_DAMAGE_STEP+EFFECT_FLAG_DELAY)
e3:SetCode(EVENT_TO_GRAVE)
e3:SetCountLimit(1,16063008)
e3:SetCondition(c16063008.tgcon)
e3:SetTarget(c16063008.tgtg)
e3:SetOperation(c16063008.tgop)
c:RegisterEffect(e3)
end
function c16063008.filter(c,e,tp)
return c:IsLevelBelow(4) and c:IsSetCard(0x5c5) and c:IsCanBeSpecialSummoned(e,0,tp,false,false)
end
function c16063008.sptg(e,tp,eg,ep,ev,re,r,rp,chk)
if chk==0 then return Duel.GetMZoneCount(tp)>0
and Duel.IsExistingMatchingCard(c16063008.filter,tp,LOCATION_GRAVE,0,1,nil,e,tp) end
Duel.SetOperationInfo(0,CATEGORY_SPECIAL_SUMMON,nil,1,0,0)
end
function c16063008.spop(e,tp,eg,ep,ev,re,r,rp)
local c=e:GetHandler()
Duel.Hint(HINT_SELECTMSG,tp,HINTMSG_SPSUMMON)
local g=Duel.SelectMatchingCard(tp,c16063008.filter,tp,LOCATION_GRAVE,0,1,1,nil,e,tp)
local tc=g:GetFirst()
if tc and Duel.SpecialSummonStep(tc,0,tp,tp,false,false,POS_FACEUP) then
local e1=Effect.CreateEffect(c)
e1:SetType(EFFECT_TYPE_SINGLE)
e1:SetCode(EFFECT_DISABLE)
e1:SetReset(RESET_EVENT+0x1fe0000)
tc:RegisterEffect(e1)
local e2=Effect.CreateEffect(c)
e2:SetType(EFFECT_TYPE_SINGLE)
e2:SetCode(EFFECT_DISABLE_EFFECT)
e2:SetReset(RESET_EVENT+0x1fe0000)
tc:RegisterEffect(e2)
end
Duel.SpecialSummonComplete()
end
function c16063008.tgcon(e,tp,eg,ep,ev,re,r,rp)
return e:GetHandler():IsPreviousLocation(LOCATION_ONFIELD)
end
function c16063008.tgfilter(c)
return c:IsSetCard(0x5c5) and c:IsType(TYPE_MONSTER) and c:IsAbleToGrave()
end
function c16063008.tgtg(e,tp,eg,ep,ev,re,r,rp,chk)
if chk==0 then return Duel.IsExistingMatchingCard(c16063008.tgfilter,tp,LOCATION_DECK,0,1,nil) end
Duel.SetOperationInfo(0,CATEGORY_TOGRAVE,nil,1,tp,LOCATION_DECK)
end
function c16063008.tgop(e,tp,eg,ep,ev,re,r,rp)
Duel.Hint(HINT_SELECTMSG,tp,HINTMSG_TOGRAVE)
local g=Duel.SelectMatchingCard(tp,c16063008.tgfilter,tp,LOCATION_DECK,0,1,1,nil)
if g:GetCount()>0 then
Duel.SendtoGrave(g,REASON_EFFECT)
end
end
\ No newline at end of file
--传颂篇章 白皇
function c16063009.initial_effect(c)
c:EnableReviveLimit()
--
local e1=Effect.CreateEffect(c)
e1:SetType(EFFECT_TYPE_FIELD)
e1:SetCode(EFFECT_SPSUMMON_PROC)
e1:SetProperty(EFFECT_FLAG_UNCOPYABLE+EFFECT_FLAG_IGNORE_IMMUNE)
e1:SetRange(LOCATION_EXTRA)
e1:SetCondition(c16063009.syncon)
e1:SetOperation(c16063009.synop)
e1:SetValue(SUMMON_TYPE_SYNCHRO)
c:RegisterEffect(e1)
local e4=Effect.CreateEffect(c)
e4:SetProperty(EFFECT_FLAG_CANNOT_DISABLE+EFFECT_FLAG_UNCOPYABLE)
e4:SetType(EFFECT_TYPE_SINGLE)
e4:SetCode(EFFECT_SPSUMMON_CONDITION)
e4:SetValue(aux.FALSE)
c:RegisterEffect(e4)
--negate
local e2=Effect.CreateEffect(c)
e2:SetDescription(aux.Stringid(16063009,0))
e2:SetCategory(CATEGORY_NEGATE+CATEGORY_DESTROY)
e2:SetType(EFFECT_TYPE_QUICK_O)
e2:SetCode(EVENT_CHAINING)
e2:SetProperty(EFFECT_FLAG_DAMAGE_STEP+EFFECT_FLAG_DAMAGE_CAL)
e2:SetRange(LOCATION_MZONE)
e2:SetCondition(c16063009.discon)
e2:SetCost(c16063009.cost)
e2:SetTarget(c16063009.distg)
e2:SetOperation(c16063009.disop)
c:RegisterEffect(e2)
--spsummon
local e3=Effect.CreateEffect(c)
e3:SetDescription(aux.Stringid(16063009,0))
e3:SetCategory(CATEGORY_SPECIAL_SUMMON)
e3:SetType(EFFECT_TYPE_SINGLE+EFFECT_TYPE_TRIGGER_O)
e3:SetProperty(EFFECT_FLAG_DAMAGE_STEP+EFFECT_FLAG_DELAY)
e3:SetCode(EVENT_TO_GRAVE)
e3:SetCondition(c16063009.spcon)
e3:SetTarget(c16063009.sptg)
e3:SetOperation(c16063009.spop)
c:RegisterEffect(e3)
end
function c16063009.matfilter1(c,syncard)
return c:IsSetCard(0x5c5) and c:IsType(TYPE_TUNER) and (c:IsLocation(LOCATION_HAND) or c:IsFaceup()) and c:IsCanBeSynchroMaterial(syncard)
end
function c16063009.matfilter2(c,syncard)
return c:IsNotTuner() and (c:IsLocation(LOCATION_HAND) or c:IsFaceup()) and c:IsSetCard(0x5c5) and c:IsCanBeSynchroMaterial(syncard)
end
function c16063009.synfilter1(c,syncard,lv,g1,g2,g3,g4)
local tlv=c:GetSynchroLevel(syncard)
if lv-tlv<=0 then return false end
local f1=c.tuner_filter
if c:IsHasEffect(55863245) then
return g3:IsExists(c16063009.synfilter2,1,c,syncard,lv-tlv,g2,g4,f1,c)
else
return g1:IsExists(c16063009.synfilter2,1,c,syncard,lv-tlv,g2,g4,f1,c)
end
end
function c16063009.synfilter2(c,syncard,lv,g2,g4,f1,tuner1)
local tlv=c:GetSynchroLevel(syncard)
if lv-tlv<=0 then return false end
local f2=c.tuner_filter
if f1 and not f1(c) then return false end
if f2 and not f2(tuner1) then return false end
if (tuner1:IsHasEffect(55863245) and not c:IsLocation(LOCATION_HAND)) or c:IsHasEffect(55863245) then
return g4:IsExists(c16063009.synfilter3,1,nil,syncard,lv-tlv,f1,f2)
else
return g2:IsExists(c16063009.synfilter3,1,nil,syncard,lv-tlv,f1,f2)
end
end
function c16063009.synfilter3(c,syncard,lv,f1,f2)
local mlv=c:GetSynchroLevel(syncard)
local lv1=bit.band(mlv,0xffff)
local lv2=bit.rshift(mlv,16)
return (lv1==lv or lv2==lv) and (not f1 or f1(c)) and (not f2 or f2(c))
end
function c16063009.syncon(e,c,tuner,mg)
if c==nil then return true end
local tp=c:GetControler()
if Duel.GetMZoneCount(tp)<-2 then return false end
local g1=nil
local g2=nil
local g3=nil
local g4=nil
if mg then
g1=mg:Filter(c16063009.matfilter1,nil,c)
g2=mg:Filter(c16063009.matfilter2,nil,c)
g3=mg:Filter(c16063009.matfilter1,nil,c)
g4=mg:Filter(c16063009.matfilter2,nil,c)
else
g1=Duel.GetMatchingGroup(c16063009.matfilter1,tp,LOCATION_MZONE,LOCATION_MZONE,nil,c)
g2=Duel.GetMatchingGroup(c16063009.matfilter2,tp,LOCATION_MZONE,LOCATION_MZONE,nil,c)
g3=Duel.GetMatchingGroup(c16063009.matfilter1,tp,LOCATION_MZONE+LOCATION_HAND,LOCATION_MZONE,nil,c)
g4=Duel.GetMatchingGroup(c16063009.matfilter2,tp,LOCATION_MZONE+LOCATION_HAND,LOCATION_MZONE,nil,c)
end
local pe=Duel.IsPlayerAffectedByEffect(tp,EFFECT_MUST_BE_SMATERIAL)
local lv=c:GetLevel()
if tuner then
local tlv=tuner:GetSynchroLevel(c)
if lv-tlv<=0 then return false end
local f1=tuner.tuner_filter
if not pe then
return g1:IsExists(c16063009.synfilter2,1,tuner,c,lv-tlv,g2,g4,f1,tuner)
else
return c16063009.synfilter2(pe:GetOwner(),c,lv-tlv,g2,nil,f1,tuner)
end
end
if not pe then
return g1:IsExists(c16063009.synfilter1,1,nil,c,lv,g1,g2,g3,g4)
else
return c16063009.synfilter1(pe:GetOwner(),c,lv,g1,g2,g3,g4)
end
end
function c16063009.synop(e,tp,eg,ep,ev,re,r,rp,c,tuner,mg)
local g=Group.CreateGroup()
local g1=nil
local g2=nil
local g3=nil
local g4=nil
if mg then
g1=mg:Filter(c16063009.matfilter1,nil,c)
g2=mg:Filter(c16063009.matfilter2,nil,c)
g3=mg:Filter(c16063009.matfilter1,nil,c)
g4=mg:Filter(c16063009.matfilter2,nil,c)
else
g1=Duel.GetMatchingGroup(c16063009.matfilter1,tp,LOCATION_MZONE,LOCATION_MZONE,nil,c)
g2=Duel.GetMatchingGroup(c16063009.matfilter2,tp,LOCATION_MZONE,LOCATION_MZONE,nil,c)
g3=Duel.GetMatchingGroup(c16063009.matfilter1,tp,LOCATION_MZONE+LOCATION_HAND,LOCATION_MZONE,nil,c)
g4=Duel.GetMatchingGroup(c16063009.matfilter2,tp,LOCATION_MZONE+LOCATION_HAND,LOCATION_MZONE,nil,c)
end
local pe=Duel.IsPlayerAffectedByEffect(tp,EFFECT_MUST_BE_SMATERIAL)
local lv=c:GetLevel()
if tuner then
g:AddCard(tuner)
local lv1=tuner:GetSynchroLevel(c)
local f1=tuner.tuner_filter
Duel.Hint(HINT_SELECTMSG,tp,HINTMSG_SMATERIAL)
local tuner2=nil
if not pe then
local t2=g1:FilterSelect(tp,c16063009.synfilter2,1,1,tuner,c,lv-lv1,g2,g4,f1,tuner)
tuner2=t2:GetFirst()
else
tuner2=pe:GetOwner()
Group.FromCards(tuner2):Select(tp,1,1,nil)
end
g:AddCard(tuner2)
local lv2=tuner2:GetSynchroLevel(c)
local f2=tuner2.tuner_filter
local m3=nil
Duel.Hint(HINT_SELECTMSG,tp,HINTMSG_SMATERIAL)
if tuner2:IsHasEffect(55863245) then
m3=g4:FilterSelect(tp,c16063009.synfilter3,1,1,nil,c,lv-lv1-lv2,f1,f2)
else
m3=g2:FilterSelect(tp,c16063009.synfilter3,1,1,nil,c,lv-lv1-lv2,f1,f2)
end
g:Merge(m3)
else
Duel.Hint(HINT_SELECTMSG,tp,HINTMSG_SMATERIAL)
local tuner1=nil
local hand=nil
if not pe then
local t1=g1:FilterSelect(tp,c16063009.synfilter1,1,1,nil,c,lv,g1,g2,g3,g4)
tuner1=t1:GetFirst()
else
tuner1=pe:GetOwner()
Group.FromCards(tuner1):Select(tp,1,1,nil)
end
g:AddCard(tuner1)
local lv1=tuner1:GetSynchroLevel(c)
local f1=tuner1.tuner_filter
local tuner2=nil
Duel.Hint(HINT_SELECTMSG,tp,HINTMSG_SMATERIAL)
if tuner1:IsHasEffect(55863245) then
local t2=g3:FilterSelect(tp,c16063009.synfilter2,1,1,tuner1,c,lv-lv1,g2,g4,f1,tuner1)
tuner2=t2:GetFirst()
else
local t2=g1:FilterSelect(tp,c16063009.synfilter2,1,1,tuner1,c,lv-lv1,g2,g4,f1,tuner1)
tuner2=t2:GetFirst()
end
g:AddCard(tuner2)
local lv2=tuner2:GetSynchroLevel(c)
local f2=tuner2.tuner_filter
local m3=nil
Duel.Hint(HINT_SELECTMSG,tp,HINTMSG_SMATERIAL)
if (tuner1:IsHasEffect(55863245) and not tuner2:IsLocation(LOCATION_HAND))
or tuner2:IsHasEffect(55863245) then
m3=g4:FilterSelect(tp,c16063009.synfilter3,1,1,nil,c,lv-lv1-lv2,f1,f2)
else
m3=g2:FilterSelect(tp,c16063009.synfilter3,1,1,nil,c,lv-lv1-lv2,f1,f2)
end
g:Merge(m3)
end
c:SetMaterial(g)
Duel.SendtoGrave(g,REASON_MATERIAL+REASON_SYNCHRO)
end
function c16063009.discon(e,tp,eg,ep,ev,re,r,rp)
if ep==tp then return false end
return not e:GetHandler():IsStatus(STATUS_BATTLE_DESTROYED) and Duel.IsChainNegatable(ev)
end
function c16063009.tgfilter(c)
return c:IsSetCard(0x5c5) and c:IsAbleToGraveAsCost()
end
function c16063009.cost(e,tp,eg,ep,ev,re,r,rp,chk)
if chk==0 then return Duel.IsExistingMatchingCard(c16063009.tgfilter,tp,LOCATION_ONFIELD,0,1,nil) end
local g=Duel.SelectMatchingCard(tp,c16063009.tgfilter,tp,LOCATION_ONFIELD,0,1,1,nil)
Duel.SendtoGrave(g,REASON_COST)
end
function c16063009.distg(e,tp,eg,ep,ev,re,r,rp,chk)
if chk==0 then return true end
Duel.SetOperationInfo(0,CATEGORY_NEGATE,eg,1,0,0)
if re:GetHandler():IsDestructable() and re:GetHandler():IsRelateToEffect(re) then
Duel.SetOperationInfo(0,CATEGORY_DESTROY,eg,1,0,0)
end
end
function c16063009.disop(e,tp,eg,ep,ev,re,r,rp)
Duel.NegateActivation(ev)
if re:GetHandler():IsRelateToEffect(re) then
Duel.Destroy(eg,REASON_EFFECT)
end
end
function c16063009.spcon(e,tp,eg,ep,ev,re,r,rp)
return e:GetHandler():IsPreviousLocation(LOCATION_ONFIELD)
end
function c16063009.spfilter(c,e,tp)
return c:IsCode(16063005) and c:IsCanBeSpecialSummoned(e,0,tp,false,false)
end
function c16063009.sptg(e,tp,eg,ep,ev,re,r,rp,chk)
if chk==0 then return Duel.GetMZoneCount(tp)>0
and Duel.IsExistingMatchingCard(c16063009.spfilter,tp,LOCATION_GRAVE,0,1,nil,e,tp) end
Duel.SetOperationInfo(0,CATEGORY_SPECIAL_SUMMON,nil,1,0,0)
end
function c16063009.spop(e,tp,eg,ep,ev,re,r,rp)
Duel.Hint(HINT_SELECTMSG,tp,HINTMSG_SPSUMMON)
local g=Duel.SelectMatchingCard(tp,c16063009.spfilter,tp,LOCATION_GRAVE,0,1,1,nil,e,tp)
if g:GetCount()>0 then
Duel.SpecialSummon(g,0,tp,tp,false,false,POS_FACEUP)
end
end
\ No newline at end of file
--传颂篇章 双皇激斗
function c16063010.initial_effect(c)
--set
local e1=Effect.CreateEffect(c)
e1:SetType(EFFECT_TYPE_ACTIVATE)
e1:SetCode(EVENT_FREE_CHAIN)
e1:SetTarget(c16063010.tg)
e1:SetOperation(c16063010.op)
c:RegisterEffect(e1)
--tohand
local e2=Effect.CreateEffect(c)
e2:SetDescription(aux.Stringid(16063010,0))
e2:SetCategory(CATEGORY_SEARCH+CATEGORY_TOHAND)
e2:SetType(EFFECT_TYPE_SINGLE+EFFECT_TYPE_TRIGGER_O)
e2:SetProperty(EFFECT_FLAG_DAMAGE_STEP+EFFECT_FLAG_DELAY)
e2:SetCode(EVENT_TO_GRAVE)
e2:SetCondition(c16063010.thcon)
e2:SetTarget(c16063010.thtg)
e2:SetOperation(c16063010.thop)
c:RegisterEffect(e2)
end
function c16063010.sfilter(c)
return c:GetCode()==16063010 and c:IsSSetable()
end
function c16063010.tg(e,tp,eg,ep,ev,re,r,rp,chk)
if chk==0 then return Duel.GetLocationCount(tp,LOCATION_SZONE)>0
and Duel.IsExistingMatchingCard(c16063010.sfilter,tp,LOCATION_HAND+LOCATION_DECK,0,1,nil) end
end
function c16063010.op(e,tp,eg,ep,ev,re,r,rp)
local ft=Duel.GetLocationCount(tp,LOCATION_SZONE)
if ft<=0 then return end
Duel.Hint(HINT_SELECTMSG,tp,HINTMSG_SET)
local setg=Duel.SelectMatchingCard(tp,c16063010.sfilter,tp,LOCATION_DECK+LOCATION_HAND,0,1,1,nil)
if setg:GetCount()>0 then
Duel.SSet(tp,setg)
Duel.ConfirmCards(1-tp,setg)
end
end
function c16063010.thcon(e,tp,eg,ep,ev,re,r,rp)
return e:GetHandler():IsPreviousLocation(LOCATION_ONFIELD) and e:GetHandler():IsReason(REASON_DESTROY)
end
function c16063010.thfilter(c)
return c:IsSetCard(0x5c5) and c:IsType(TYPE_TRAP+TYPE_SPELL) and c:IsAbleToHand()
end
function c16063010.thtg(e,tp,eg,ep,ev,re,r,rp,chk)
if chk==0 then return Duel.IsExistingMatchingCard(c16063010.thfilter,tp,LOCATION_DECK+LOCATION_GRAVE,0,1,nil) end
Duel.SetOperationInfo(0,CATEGORY_SEARCH+CATEGORY_TOHAND,nil,1,tp,LOCATION_DECK+LOCATION_GRAVE)
end
function c16063010.thop(e,tp,eg,ep,ev,re,r,rp)
Duel.Hint(HINT_SELECTMSG,tp,HINTMSG_ATOHAND)
local g=Duel.SelectMatchingCard(tp,c16063010.thfilter,tp,LOCATION_DECK+LOCATION_GRAVE,0,1,1,nil)
if g:GetCount()>0 then
Duel.SendtoHand(g,nil,REASON_EFFECT)
Duel.ConfirmCards(1-tp,g)
end
end
\ No newline at end of file
This diff is collapsed.
This diff is collapsed.
This diff is collapsed.
This diff is collapsed.
This diff is collapsed.
This diff is collapsed.
This diff is collapsed.
This diff is collapsed.
This diff is collapsed.
This diff is collapsed.
This diff is collapsed.
This diff is collapsed.
This diff is collapsed.
This diff is collapsed.
This diff is collapsed.
This diff is collapsed.
This diff is collapsed.
This diff is collapsed.
This diff is collapsed.
This diff is collapsed.
This diff is collapsed.
This diff is collapsed.
This diff is collapsed.
This diff is collapsed.
This diff is collapsed.
This diff is collapsed.
This diff is collapsed.
This diff is collapsed.
This diff is collapsed.
This diff is collapsed.
This diff is collapsed.
This diff is collapsed.
This diff is collapsed.
This diff is collapsed.
This diff is collapsed.
This diff is collapsed.
This diff is collapsed.
This diff is collapsed.
This diff is collapsed.
This diff is collapsed.
This diff is collapsed.
This diff is collapsed.
This diff is collapsed.
This diff is collapsed.
This diff is collapsed.
This diff is collapsed.
This diff is collapsed.
This diff is collapsed.
This diff is collapsed.
This diff is collapsed.
This diff is collapsed.
This diff is collapsed.
This diff is collapsed.
This diff is collapsed.
This diff is collapsed.
This diff is collapsed.
This diff is collapsed.
This diff is collapsed.
This diff is collapsed.
This diff is collapsed.
This diff is collapsed.
This diff is collapsed.
This diff is collapsed.
This diff is collapsed.
This diff is collapsed.
This diff is collapsed.
This diff is collapsed.
This diff is collapsed.
This diff is collapsed.
This diff is collapsed.
This diff is collapsed.
This diff is collapsed.
This diff is collapsed.
This diff is collapsed.
This diff is collapsed.
This diff is collapsed.
This diff is collapsed.
This diff is collapsed.
This diff is collapsed.
This diff is collapsed.
This diff is collapsed.
This diff is collapsed.
This diff is collapsed.
This diff is collapsed.
This diff is collapsed.
This diff is collapsed.
This diff is collapsed.
This diff is collapsed.
This diff is collapsed.
This diff is collapsed.
This diff is collapsed.
This diff is collapsed.
This diff is collapsed.
This diff is collapsed.
This diff is collapsed.
This diff is collapsed.
This diff is collapsed.
This diff is collapsed.
This diff is collapsed.
This diff is collapsed.
This diff is collapsed.
This diff is collapsed.
This diff is collapsed.
This diff is collapsed.
This diff is collapsed.
This diff is collapsed.
This diff is collapsed.
This diff is collapsed.
This diff is collapsed.
This diff is collapsed.
This diff is collapsed.
This diff is collapsed.
This diff is collapsed.
This diff is collapsed.
This diff is collapsed.
This diff is collapsed.
This diff is collapsed.
This diff is collapsed.
This diff is collapsed.
This diff is collapsed.
This diff is collapsed.
This diff is collapsed.
This diff is collapsed.
This diff is collapsed.
This diff is collapsed.
This diff is collapsed.
This diff is collapsed.
This diff is collapsed.
This diff is collapsed.
This diff is collapsed.
This diff is collapsed.
This diff is collapsed.
This diff is collapsed.
This diff is collapsed.
This diff is collapsed.
This diff is collapsed.
This diff is collapsed.
This diff is collapsed.
This diff is collapsed.
This diff is collapsed.
This diff is collapsed.
This diff is collapsed.
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