Commit 0dc0bfc7 authored by Tachibana's avatar Tachibana

delete

parent 3fa2dd28
No preview for this file type
--一般店员 姬塔
function c47500017.initial_effect(c)
aux.AddCodeList(c,47500000)
--link summon
c:EnableReviveLimit()
aux.AddLinkProcedure(c,aux.FilterBoolFunction(Card.IsCode,47500000),2,2)
--to extra
local e1=Effect.CreateEffect(c)
e1:SetDescription(aux.Stringid(47500017,0))
e1:SetCategory(CATEGORY_TOHAND)
e1:SetType(EFFECT_TYPE_SINGLE+EFFECT_TYPE_TRIGGER_O)
e1:SetCode(EVENT_SPSUMMON_SUCCESS)
e1:SetProperty(EFFECT_FLAG_DELAY)
e1:SetCountLimit(1,47500017)
e1:SetCondition(c47500017.tecon)
e1:SetTarget(c47500017.tetg)
e1:SetOperation(c47500017.teop)
c:RegisterEffect(e1)
--to hand
local e2=Effect.CreateEffect(c)
e2:SetDescription(aux.Stringid(47500017,2))
e2:SetCategory(CATEGORY_TOHAND)
e2:SetType(EFFECT_TYPE_FIELD+EFFECT_TYPE_TRIGGER_F)
e2:SetCode(EVENT_LEAVE_FIELD)
e2:SetProperty(EFFECT_FLAG_PLAYER_TARGET)
e2:SetRange(LOCATION_MZONE)
e2:SetCountLimit(1,47500016)
e2:SetCondition(c47500017.drcon)
e2:SetTarget(c47500017.drtg)
e2:SetOperation(c47500017.drop)
c:RegisterEffect(e2)
end
function c47500017.drcfilter(c,tp)
return c:IsPreviousLocation(LOCATION_PZONE) and c:GetPreviousControler()==tp
end
function c47500017.drcon(e,tp,eg,ep,ev,re,r,rp)
return eg:IsExists(c47500017.drcfilter,1,nil,tp)
end
function c47500017.thfilter(c)
return c:IsFaceup() and c:IsCode(47500000) and c:IsAbleToHand()
end
function c47500017.drtg(e,tp,eg,ep,ev,re,r,rp,chk)
local c=e:GetHandler()
if chk==0 then return Duel.IsExistingMatchingCard(c47500017.thfilter,tp,LOCATION_EXTRA,0,1,nil) end
Duel.SetOperationInfo(0,CATEGORY_TOHAND,nil,1,tp,LOCATION_EXTRA)
end
function c47500017.drop(e,tp,eg,ep,ev,re,r,rp)
Duel.Hint(HINT_SELECTMSG,tp,HINTMSG_ATOHAND)
local g=Duel.SelectMatchingCard(tp,c47500017.thfilter,tp,LOCATION_EXTRA,0,1,1,nil)
if g:GetCount()>0 then
Duel.SendtoHand(g,tp,REASON_EFFECT)
Duel.ConfirmCards(1-tp,g)
end
end
function c47500017.lcheck(g,lc)
return g:IsExists(Card.IsCode,1,nil,47500000)
end
function c47500017.tecon(e,tp,eg,ep,ev,re,r,rp)
return e:GetHandler():IsSummonType(SUMMON_TYPE_LINK)
end
function c47500017.tefilter(c,code)
return aux.IsCodeListed(c,47500000) and c:IsAbleToHand() and c:GetOriginalCode()~=code and c:IsType(TYPE_PENDULUM)
end
function c47500017.penfilter(c)
return aux.IsCodeListed(c,47500000) and c:IsType(TYPE_PENDULUM) and not c:IsForbidden()
end
function c47500017.tetg(e,tp,eg,ep,ev,re,r,rp,chk)
if chk==0 then return Duel.IsExistingMatchingCard(c47500017.tefilter,tp,LOCATION_DECK,0,1,nil) and Duel.IsExistingMatchingCard(c47500017.penfilter,tp,LOCATION_EXTRA,0,1,nil) end
Duel.SetOperationInfo(0,CATEGORY_TOHAND,nil,1,tp,LOCATION_DECK)
end
function c47500017.teop(e,tp,eg,ep,ev,re,r,rp)
local c=e:GetHandler()
Duel.Hint(HINT_SELECTMSG,tp,HINTMSG_TOFIELD)
local g=Duel.SelectMatchingCard(tp,c47500017.penfilter,tp,LOCATION_EXTRA,0,1,1,nil)
local tc=g:GetFirst()
local code=tc:GetOriginalCode()
if tc and Duel.MoveToField(tc,tp,tp,LOCATION_PZONE,POS_FACEUP,true) then
Duel.Hint(HINT_SELECTMSG,tp,HINTMSG_ATOHAND)
local g=Duel.SelectMatchingCard(tp,c47500017.tefilter,tp,LOCATION_DECK,0,1,1,code)
if g:GetCount()>0 then
Duel.SendtoHand(g,tp,REASON_EFFECT)
end
end
local e1=Effect.CreateEffect(c)
e1:SetType(EFFECT_TYPE_FIELD)
e1:SetCode(EFFECT_CANNOT_SPECIAL_SUMMON)
e1:SetProperty(EFFECT_FLAG_PLAYER_TARGET)
e1:SetTargetRange(1,0)
e1:SetTarget(c47500017.splimit)
e1:SetReset(RESET_PHASE+PHASE_END)
Duel.RegisterEffect(e1,tp)
end
function c47500017.splimit(e,c)
return c:IsSetCard(0x5d0) or c:IsSetCard(0x5da) or c:IsSetCard(0x5de) or c:IsSetCard(0x5d3) or aux.IsCodeListed(c,47500000) or c:IsSetCard(0x813)
end
\ No newline at end of file
--雷鸣的星晶兽 巴尔
function c47510019.initial_effect(c)
--pendulum summon
aux.EnablePendulumAttribute(c)
--tograve
local e2=Effect.CreateEffect(c)
e2:SetCategory(CATEGORY_TOGRAVE)
e2:SetType(EFFECT_TYPE_IGNITION)
e2:SetCode(EVENT_FREE_CHAIN)
e2:SetRange(LOCATION_PZONE)
e2:SetCountLimit(1,47510019)
e2:SetTarget(c47510019.thtg)
e2:SetOperation(c47510019.thop)
c:RegisterEffect(e2)
--synchro limit
local e3=Effect.CreateEffect(c)
e3:SetType(EFFECT_TYPE_SINGLE)
e3:SetCode(EFFECT_CANNOT_BE_SYNCHRO_MATERIAL)
e3:SetProperty(EFFECT_FLAG_CANNOT_DISABLE+EFFECT_FLAG_UNCOPYABLE)
e3:SetValue(c47510019.synlimit)
c:RegisterEffect(e3)
--serch
local e4=Effect.CreateEffect(c)
e4:SetCategory(CATEGORY_TOHAND+CATEGORY_SEARCH)
e4:SetType(EFFECT_TYPE_SINGLE+EFFECT_TYPE_TRIGGER_O)
e4:SetCode(EVENT_SUMMON_SUCCESS)
e4:SetProperty(EFFECT_FLAG_DELAY)
e4:SetCountLimit(1,47510020)
e4:SetTarget(c47510019.tetg)
e4:SetOperation(c47510019.teop)
c:RegisterEffect(e4)
local e5=e4:Clone()
e5:SetCode(EVENT_SPSUMMON_SUCCESS)
c:RegisterEffect(e5)
--summoneffect
local e6=Effect.CreateEffect(c)
e6:SetType(EFFECT_TYPE_IGNITION)
e6:SetRange(LOCATION_EXTRA)
e6:SetCode(EVENT_FREE_CHAIN)
e6:SetCountLimit(1,47510000)
e6:SetCost(c47510019.cost)
e6:SetOperation(c47510019.op)
c:RegisterEffect(e6)
c47510019.ss_effect=e6
--synchro level
local e7=Effect.CreateEffect(c)
e7:SetType(EFFECT_TYPE_SINGLE)
e7:SetRange(LOCATION_MZONE)
e7:SetCode(EFFECT_SYNCHRO_LEVEL)
e7:SetValue(c47510019.slevel)
c:RegisterEffect(e7)
end
function c47510019.IsGran(c)
local m=_G["c"..c:GetCode()]
return m and m.is_named_with_Ma_Elf
end
function c47510019.slevel(e,c)
local lv=e:GetHandler():GetLevel()
return 1*65536+lv
end
function c47510019.pefilter(c)
return c:IsRace(RACE_ROCK) or c:IsSetCard(0x5da) or c:IsAttribute(ATTRIBUTE_EARTH)
end
function c47510019.psplimit(e,c,tp,sumtp,sumpos)
return not c47510019.pefilter(c) and bit.band(sumtp,SUMMON_TYPE_PENDULUM)==SUMMON_TYPE_PENDULUM
end
function c47510019.filter(c)
return c:IsAbleToGrave() and (c:IsSetCard(0x5d0) or c:IsSetCard(0x5da) or c:IsSetCard(0x5de) or c:IsSetCard(0x5d3) or aux.IsCodeListed(c,47500000) or c:IsSetCard(0x813) or c47510019.IsGran(c))
end
function c47510019.thtg(e,tp,eg,ep,ev,re,r,rp,chk,chkc)
if chkc then return chkc:IsControler(tp) and chkc:IsLocation(LOCATION_DECK) and c47510019.filter(chkc) end
if chk==0 then return Duel.IsExistingTarget(c47510019.filter,tp,LOCATION_DECK,0,1,nil) end
Duel.Hint(HINT_SELECTMSG,tp,HINTMSG_TOGRAVE)
local g=Duel.SelectTarget(tp,c47510019.filter,tp,LOCATION_DECK,0,1,1,nil)
Duel.SetOperationInfo(0,CATEGORY_TOGRAVE,g,1,0,0)
end
function c47510019.thop(e,tp,eg,ep,ev,re,r,rp)
local g=Duel.GetChainInfo(0,CHAININFO_TARGET_CARDS)
local sg=g:Filter(Card.IsRelateToEffect,nil,e)
if sg:GetCount()>0 then
Duel.SendtoGrave(sg,nil,REASON_EFFECT)
end
end
function c47510019.synlimit(e,c)
if not c then return false end
return not c:IsAttribute(ATTRIBUTE_EARTH) or c:IsSetCard(0x5da)
end
function c47510019.tefilter(c)
return c:IsType(TYPE_PENDULUM) and c:IsSetCard(0x5da) and not c:IsForbidden()
end
function c47510019.tetg(e,tp,eg,ep,ev,re,r,rp,chk)
if chk==0 then return Duel.IsExistingMatchingCard(c47510019.tefilter,tp,LOCATION_GRAVE,0,1,nil) end
Duel.SetOperationInfo(0,CATEGORY_TOEXTRA,nil,2,tp,LOCATION_GRAVE)
end
function c47510019.teop(e,tp,eg,ep,ev,re,r,rp)
Duel.Hint(HINT_SELECTMSG,tp,aux.Stringid(47510019,3))
local g=Duel.SelectMatchingCard(tp,c47510019.tefilter,tp,LOCATION_GRAVE,0,1,2,nil)
if g:GetCount()>0 then
Duel.SendtoExtraP(g,tp,REASON_EFFECT)
end
end
function c47510019.cost(e,tp,eg,ep,ev,re,r,rp,chk)
if chk==0 then return e:GetHandler():IsAbleToGraveAsCost() end
Duel.SendtoGrave(e:GetHandler(),REASON_COST)
end
function c47510019.filter1(c)
return c:IsFaceup() and c:IsAttribute(ATTRIBUTE_EARTH) or c:IsSetCard(0x5da)
end
function c47510019.op(e,tp,eg,ep,ev,re,r,rp)
local c=e:GetHandler()
local e1=Effect.CreateEffect(c)
e1:SetType(EFFECT_TYPE_FIELD+EFFECT_TYPE_CONTINUOUS)
e1:SetCode(EVENT_CHAINING)
e1:SetRange(LOCATION_MZONE)
e1:SetOperation(c47510019.chainop)
Duel.RegisterEffect(e1,tp)
end
function c47510019.chainop(e,tp,eg,ep,ev,re,r,rp)
if re:GetHandler():IsType(TYPE_PENDULUM) and ep==tp then
Duel.SetChainLimit(c47510019.chainlm)
end
end
function c47510019.chainlm(e,rp,tp)
return tp==rp
end
\ No newline at end of file
--魔龙统 法尔提
function c47551109.initial_effect(c)
--pendulum summon
aux.EnablePendulumAttribute(c)
c:EnableReviveLimit()
aux.AddXyzProcedure(c,c47551109.mfilter,8,2)
--splimit
local e1=Effect.CreateEffect(c)
e1:SetType(EFFECT_TYPE_FIELD)
e1:SetRange(LOCATION_PZONE)
e1:SetCode(EFFECT_CANNOT_SPECIAL_SUMMON)
e1:SetProperty(EFFECT_FLAG_PLAYER_TARGET+EFFECT_FLAG_CANNOT_DISABLE+EFFECT_FLAG_CANNOT_NEGATE)
e1:SetTargetRange(1,0)
e1:SetTarget(c47551109.psplimit)
c:RegisterEffect(e1)
--pendulum set
local e2=Effect.CreateEffect(c)
e2:SetCategory(CATEGORY_DESTROY)
e2:SetType(EFFECT_TYPE_IGNITION)
e2:SetRange(LOCATION_PZONE)
e2:SetCountLimit(1,47551109)
e2:SetCondition(c47551109.tpencon)
e2:SetTarget(c47551109.tpentg)
e2:SetOperation(c47551109.tpenop)
c:RegisterEffect(e2)
--battle
local e3=Effect.CreateEffect(c)
e3:SetType(EFFECT_TYPE_SINGLE)
e3:SetRange(LOCATION_MZONE)
e3:SetCode(EFFECT_PIERCE)
c:RegisterEffect(e3)
local e4=Effect.CreateEffect(c)
e4:SetType(EFFECT_TYPE_SINGLE)
e4:SetRange(LOCATION_MZONE)
e4:SetCode(EFFECT_EXTRA_ATTACK)
e4:SetValue(1)
c:RegisterEffect(e4)
--pendulum
local e5=Effect.CreateEffect(c)
e5:SetCategory(CATEGORY_DESTROY)
e5:SetType(EFFECT_TYPE_SINGLE+EFFECT_TYPE_TRIGGER_O)
e5:SetCode(EVENT_DESTROYED)
e5:SetProperty(EFFECT_FLAG_DELAY)
e5:SetCondition(c47551109.pencon)
e5:SetTarget(c47551109.pentg)
e5:SetOperation(c47551109.penop)
c:RegisterEffect(e5)
--sunmoneffect
local e6=Effect.CreateEffect(c)
e6:SetCategory(CATEGORY_ATKCHANGE)
e6:SetType(EFFECT_TYPE_QUICK_O)
e6:SetRange(LOCATION_MZONE)
e6:SetCode(EVENT_FREE_CHAIN)
e6:SetCountLimit(1)
e6:SetCost(c47551109.cost)
e6:SetTarget(c47551109.distg)
e6:SetOperation(c47551109.disop)
c:RegisterEffect(e6)
end
c47551109.pendulum_level=8
function c47551109.IsGran(c)
local m=_G["c"..c:GetCode()]
return m and m.is_named_with_Ma_Elf
end
function c47551109.mfilter(c,xyzc)
return c:IsType(TYPE_PENDULUM)
end
function c47551109.pefilter(c)
return c:IsRace(RACE_DRAGON) or c:IsRace(RACE_WARRIOR) or c:IsRace(RACE_SPELLCASTER) or c:IsRace(RACE_WYRM)
end
function c47551109.psplimit(e,c,tp,sumtp,sumpos)
return not c47551109.pefilter(c) and bit.band(sumtp,SUMMON_TYPE_PENDULUM)==SUMMON_TYPE_PENDULUM
end
function c47551109.tcfilter(c)
return c:IsType(TYPE_PENDULUM)
end
function c47551109.tpencon(e,tp,eg,ep,ev,re,r,rp)
return Duel.IsExistingMatchingCard(c47551109.tcfilter,tp,LOCATION_PZONE,0,1,e:GetHandler())
end
function c47551109.tpenfilter(c)
return c:IsType(TYPE_PENDULUM) and (c:IsSetCard(0x5d0) or c:IsSetCard(0x5da) or c:IsSetCard(0x5de) or c:IsSetCard(0x5d3) or aux.IsCodeListed(c,47500000) or c:IsSetCard(0x813) or c47551109.IsGran(c))
end
function c47551109.tpentg(e,tp,eg,ep,ev,re,r,rp,chk)
local sc=Duel.GetFirstMatchingCard(nil,tp,LOCATION_PZONE,0,e:GetHandler())
if chk==0 then return e:GetHandler():IsDestructable()
and Duel.IsExistingMatchingCard(c47551109.tpenfilter,tp,LOCATION_DECK,0,1,nil) end
Duel.SetTargetCard(sc)
Duel.SetOperationInfo(0,CATEGORY_DESTROY,sc,1,0,0)
end
function c47551109.tpenop(e,tp,eg,ep,ev,re,r,rp)
if not e:GetHandler():IsRelateToEffect(e) then return end
local tc=Duel.GetFirstTarget()
if tc:IsRelateToEffect(e) and Duel.Destroy(tc,REASON_EFFECT)~=0 then
Duel.Hint(HINT_SELECTMSG,tp,HINTMSG_TOFIELD)
local g=Duel.SelectMatchingCard(tp,c47551109.tpenfilter,tp,LOCATION_DECK,0,1,1,nil)
local tc=g:GetFirst()
if tc then
Duel.MoveToField(tc,tp,tp,LOCATION_PZONE,POS_FACEUP,true)
end
end
end
function c47551109.pencon(e,tp,eg,ep,ev,re,r,rp)
local c=e:GetHandler()
return bit.band(r,REASON_EFFECT+REASON_BATTLE)~=0 and c:IsPreviousLocation(LOCATION_MZONE) and c:IsFaceup()
end
function c47551109.pentg(e,tp,eg,ep,ev,re,r,rp,chk)
if chk==0 then return Duel.GetFieldGroupCount(tp,LOCATION_PZONE,0)>0 end
local g=Duel.GetFieldGroup(tp,LOCATION_PZONE,0)
Duel.SetOperationInfo(0,CATEGORY_DESTROY,g,g:GetCount(),0,0)
end
function c47551109.penop(e,tp,eg,ep,ev,re,r,rp)
local g=Duel.GetFieldGroup(tp,LOCATION_PZONE,0)
if Duel.Destroy(g,REASON_EFFECT)~=0 and e:GetHandler():IsRelateToEffect(e) then
Duel.MoveToField(e:GetHandler(),tp,tp,LOCATION_PZONE,POS_FACEUP,true)
end
end
function c47551109.cost(e,tp,eg,ep,ev,re,r,rp,chk)
if chk==0 then return e:GetHandler():CheckRemoveOverlayCard(tp,1,REASON_COST) end
e:GetHandler():RemoveOverlayCard(tp,1,1,REASON_COST)
end
function c47551109.distg(e,tp,eg,ep,ev,re,r,rp,chk)
if chk==0 then return Duel.IsExistingMatchingCard(Card.IsFaceup,tp,0,LOCATION_MZONE,1,nil) end
end
function c47551109.disop(e,tp,eg,ep,ev,re,r,rp)
local g=Duel.GetMatchingGroup(Card.IsFaceup,tp,0,LOCATION_MZONE,nil)
local tc=g:GetFirst()
local c=e:GetHandler()
local atk=tc:GetBaseAttack()
while tc do
local e1=Effect.CreateEffect(e:GetHandler())
e1:SetType(EFFECT_TYPE_SINGLE)
e1:SetCode(EFFECT_SET_BASE_ATTACK)
e1:SetValue(atk-500)
e1:SetReset(RESET_EVENT+RESETS_STANDARD)
tc:RegisterEffect(e1)
tc=g:GetNext()
end
Duel.Hint(HINT_SELECTMSG,tp,HINTMSG_REMOVE)
local rg=Duel.SelectMatchingCard(tp,Card.IsAbleToRemove,tp,0,LOCATION_ONFIELD,1,1,nil)
if rg:GetCount()>0 then
Duel.Remove(rg,POS_FACEDOWN,REASON_EFFECT)
end
end
\ No newline at end of file
Markdown is supported
0% or
You are about to add 0 people to the discussion. Proceed with caution.
Finish editing this message first!
Please register or to comment