Commit ac406b24 authored by Momobako's avatar Momobako

Push by Appveyor

parent a20ab702
No preview for this file type
--LA Da'ath 基礎的珈百璃
function c1200002.initial_effect(c)
--deck
local e1=Effect.CreateEffect(c)
e1:SetDescription(aux.Stringid(1200002,0))
e1:SetCategory(CATEGORY_TOGRAVE+CATEGORY_DRAW)
e1:SetType(EFFECT_TYPE_IGNITION)
e1:SetCountLimit(1,1200002)
e1:SetRange(LOCATION_HAND)
e1:SetTarget(c1200002.target)
e1:SetOperation(c1200002.operation)
c:RegisterEffect(e1)
--copylevel
local e2=Effect.CreateEffect(c)
e1:SetDescription(aux.Stringid(1200002,0))
e2:SetType(EFFECT_TYPE_SINGLE+EFFECT_TYPE_TRIGGER_O)
e2:SetProperty(EFFECT_FLAG_CARD_TARGET+EFFECT_FLAG_DELAY)
e2:SetCode(EVENT_SPSUMMON_SUCCESS)
e2:SetTarget(c1200002.tg)
e2:SetOperation(c1200002.op)
c:RegisterEffect(e2)
end
function c1200002.filter(c)
return c:IsSetCard(0xfba) and c:IsType(TYPE_MONSTER) and not c:IsPublic()
end
function c1200002.target(e,tp,eg,ep,ev,re,r,rp,chk)
if chk==0 then return e:GetHandler():IsAbleToGrave() and Duel.IsPlayerCanDraw(tp,1) and Duel.IsExistingMatchingCard(c1200002.filter,tp,LOCATION_HAND,0,1,e:GetHandler()) end
Duel.SetOperationInfo(0,CATEGORY_DRAW,nil,0,tp,1)
Duel.SetOperationInfo(0,CATEGORY_TOGRAVE,e:GetHandler(),1,0,0)
end
function c1200002.cfilter(c)
return c:IsDiscardable()
end
function c1200002.operation(e,tp,eg,ep,ev,re,r,rp)
if not Duel.IsExistingMatchingCard(c1200002.filter,tp,LOCATION_HAND,0,1,e:GetHandler()) then return false end
local dis=false
if Duel.IsPlayerCanDraw(1) and Duel.IsChainDisablable(0) then
local g=Duel.GetMatchingGroup(c1200002.cfilter,tp,0,LOCATION_HAND,nil)
if g:GetCount()>0 and Duel.SelectYesNo(1-tp,aux.Stringid(1200002,1)) then
Duel.DiscardHand(1-tp,Card.IsDiscardable,1,1,REASON_EFFECT,nil)
Duel.ShuffleHand(1-tp)
dis=true
end
end
if not dis then
local sg=Duel.SelectMatchingCard(tp,c1200002.filter,tp,LOCATION_HAND,0,1,1,e:GetHandler())
Duel.ConfirmCards(1-tp,sg)
if Duel.IsPlayerCanDraw(tp,1) then
Duel.BreakEffect()
if Duel.SendtoGrave(e:GetHandler(),REASON_EFFECT) then
Duel.Draw(tp,1,REASON_EFFECT)
end
end
end
end
function c1200002.tg(e,tp,eg,ep,ev,re,r,rp,chk,chkc)
if chkc then return chkc:IsLocation(LOCATION_MZONE) and chkc:IsControler(1-tp) and chkc:IsFaceup() end
if chk==0 then return Duel.IsExistingTarget(Card.IsFaceup,tp,0,LOCATION_MZONE,1,nil) end
Duel.Hint(HINT_SELECTMSG,tp,HINTMSG_FACEUP)
Duel.SelectTarget(tp,Card.IsFaceup,tp,0,LOCATION_MZONE,1,1,nil)
end
function c1200002.op(e,tp,eg,ep,ev,re,r,rp)
local tc=Duel.GetFirstTarget()
if tc:IsRelateToEffect(e) and tc:IsFaceup() and not tc:IsType(TYPE_LINK) then
local lv=0
if tc:IsType(TYPE_XYZ) then
lv=tc:GetRank()
else
lv=tc:GetLevel()
end
local e1=Effect.CreateEffect(e:GetHandler())
e1:SetType(EFFECT_TYPE_SINGLE)
e1:SetCode(EFFECT_CHANGE_LEVEL)
e1:SetValue(lv)
e1:SetReset(RESET_EVENT+0x1fe0000)
e:GetHandler():RegisterEffect(e1)
end
end
--LA Da'ath 理解的亞夫結
function c1200003.initial_effect(c)
--tograve+copy
local e2=Effect.CreateEffect(c)
e2:SetDescription(aux.Stringid(1200003,0))
e2:SetCategory(CATEGORY_TOGRAVE)
e2:SetType(EFFECT_TYPE_SINGLE+EFFECT_TYPE_TRIGGER_O)
e2:SetCode(EVENT_SUMMON_SUCCESS)
e2:SetProperty(EFFECT_FLAG_DELAY)
e2:SetCountLimit(1,1200003)
e2:SetTarget(c1200003.tgtg)
e2:SetOperation(c1200003.tgop)
c:RegisterEffect(e2)
local e3=e2:Clone()
e3:SetCode(EVENT_SPSUMMON_SUCCESS)
c:RegisterEffect(e3)
--SpecialSummon
local e8=Effect.CreateEffect(c)
e8:SetDescription(aux.Stringid(1200003,1))
e8:SetCategory(CATEGORY_SPECIAL_SUMMON)
e8:SetType(EFFECT_TYPE_SINGLE+EFFECT_TYPE_TRIGGER_O)
e8:SetCode(EVENT_RELEASE)
e8:SetProperty(EFFECT_FLAG_CARD_TARGET+EFFECT_FLAG_DAMAGE_STEP+EFFECT_FLAG_DELAY)
e8:SetCountLimit(1)
e8:SetTarget(c1200003.sptg)
e8:SetOperation(c1200003.spop)
c:RegisterEffect(e8)
end
function c1200003.filter(c)
return c:IsSetCard(0xfba) and c:IsAbleToGrave()
end
function c1200003.tgtg(e,tp,eg,ep,ev,re,r,rp,chk)
if chk==0 then return Duel.IsExistingMatchingCard(c1200003.filter,tp,LOCATION_DECK,0,1,nil) end
Duel.SetOperationInfo(0,CATEGORY_TOGRAVE,nil,1,tp,LOCATION_DECK)
end
function c1200003.tgop(e,tp,eg,ep,ev,re,r,rp)
local c=e:GetHandler()
Duel.Hint(HINT_SELECTMSG,tp,HINTMSG_TOGRAVE)
local g=Duel.SelectMatchingCard(tp,c1200003.filter,tp,LOCATION_DECK,0,1,1,nil)
if g:GetCount()>0 then
if Duel.SendtoGrave(g,REASON_EFFECT)>0 then
Duel.BreakEffect()
local tc=g:GetFirst()
local code=tc:GetOriginalCode()
if c:IsRelateToEffect(e) and c:IsFaceup() then
local e1=Effect.CreateEffect(c)
e1:SetType(EFFECT_TYPE_SINGLE)
e1:SetProperty(EFFECT_FLAG_CANNOT_DISABLE)
e1:SetReset(RESET_EVENT+0x1ff0000+RESET_PHASE+PHASE_END)
e1:SetCode(EFFECT_CHANGE_CODE)
e1:SetValue(code)
c:RegisterEffect(e1)
c:CopyEffect(code,RESET_EVENT+0x1fe0000+RESET_PHASE+PHASE_END,1)
end
end
end
end
function c1200003.spfilter(c,e,tp)
return c:IsSetCard(0xfba) and c:IsCanBeSpecialSummoned(e,0,tp,false,false) and not c:IsCode(1200003)
end
function c1200003.sptg(e,tp,eg,ep,ev,re,r,rp,chk,chkc)
if chkc then return chkc:IsLocation(LOCATION_GRAVE) and c1200003.spfilter(chkc,e,tp) and chkc:IsControler(tp) end
if chk==0 then return Duel.GetLocationCount(tp,LOCATION_MZONE)>0
and Duel.IsExistingTarget(c1200003.spfilter,tp,LOCATION_GRAVE,0,1,nil,e,tp) end
Duel.Hint(HINT_SELECTMSG,tp,HINTMSG_SPSUMMON)
local g=Duel.SelectTarget(tp,c1200003.spfilter,tp,LOCATION_GRAVE,0,1,1,nil,e,tp)
Duel.SetOperationInfo(0,CATEGORY_SPECIAL_SUMMON,g,1,0,0)
end
function c1200003.spop(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
--LA Da'ath 美麗的丘依兒
function c1200004.initial_effect(c)
--to deck
local e1=Effect.CreateEffect(c)
e1:SetDescription(aux.Stringid(1200004,0))
e1:SetCategory(CATEGORY_TODECK+CATEGORY_SEARCH+CATEGORY_TOHAND)
e1:SetType(EFFECT_TYPE_QUICK_O)
e1:SetRange(LOCATION_HAND)
e1:SetCountLimit(1,1200004)
e1:SetCode(EVENT_FREE_CHAIN)
e1:SetCondition(c1200004.thcon)
e1:SetCost(c1200004.thcost)
e1:SetTarget(c1200004.thtg)
e1:SetOperation(c1200004.thop)
c:RegisterEffect(e1)
--SpecialSummon
local e8=Effect.CreateEffect(c)
e8:SetDescription(aux.Stringid(1200004,1))
e8:SetCategory(CATEGORY_SPECIAL_SUMMON)
e8:SetType(EFFECT_TYPE_SINGLE+EFFECT_TYPE_TRIGGER_O)
e8:SetCode(EVENT_RELEASE)
e8:SetProperty(EFFECT_FLAG_DAMAGE_STEP+EFFECT_FLAG_DELAY)
e8:SetCountLimit(1)
e8:SetTarget(c1200004.sptg)
e8:SetOperation(c1200004.spop)
c:RegisterEffect(e8)
end
function c1200004.thcon(e,tp,eg,ep,ev,re,r,rp)
return Duel.GetCurrentPhase()==PHASE_MAIN1 or Duel.GetCurrentPhase()==PHASE_MAIN2
end
function c1200004.thcost(e,tp,eg,ep,ev,re,r,rp,chk)
if chk==0 then return not e:GetHandler():IsPublic() end
Duel.ConfirmCards(1-tp,e:GetHandler())
end
function c1200004.thfilter(c)
return c:IsAbleToDeck() and c:IsType(TYPE_MONSTER) and c:IsSetCard(0xfba)
end
function c1200004.thtg(e,tp,eg,ep,ev,re,r,rp,chk)
if chk==0 then return Duel.IsExistingMatchingCard(c1200004.thfilter,tp,LOCATION_HAND,0,1,nil) end
Duel.SetOperationInfo(0,CATEGORY_TODECK,nil,1,0,LOCATION_HAND)
Duel.SetOperationInfo(0,CATEGORY_TOHAND,nil,1,0,LOCATION_DECK)
end
function c1200004.thfilter2(c,att)
return c:IsAbleToHand() and c:IsType(TYPE_MONSTER) and c:IsSetCard(0xfba) and c:IsRace(RACE_BEASTWARRIOR) and c:IsAttribute(att)
end
function c1200004.thop(e,tp,eg,ep,ev,re,r,rp)
local g=Duel.SelectMatchingCard(tp,c1200004.thfilter,tp,LOCATION_HAND,0,1,1,nil)
if g:GetCount()>0 then
local att=g:GetFirst():GetAttribute()
Duel.ConfirmCards(1-tp,g)
if Duel.SendtoDeck(g,nil,2,REASON_EFFECT)>0 and Duel.IsExistingMatchingCard(c1200004.thfilter2,tp,LOCATION_DECK,0,1,nil,att) and Duel.SelectYesNo(tp,aux.Stringid(1200004,2)) then
Duel.BreakEffect()
Duel.Hint(HINT_SELECTMSG,tp,HINTMSG_ATOHAND)
local sg=Duel.SelectMatchingCard(tp,c1200004.thfilter2,tp,LOCATION_DECK+LOCATION_GRAVE,0,1,1,nil,att)
Duel.SendtoHand(sg,nil,REASON_EFFECT)
Duel.ConfirmCards(1-tp,sg)
end
end
end
function c1200004.spfilter(c,e,tp)
return c:IsSetCard(0xfba) and c:IsCanBeSpecialSummoned(e,0,tp,false,false) and c:IsFaceup() and c:IsType(TYPE_PENDULUM)
end
function c1200004.sptg(e,tp,eg,ep,ev,re,r,rp,chk,chkc)
if chk==0 then return Duel.GetLocationCountFromEx(tp)>0
and Duel.IsExistingTarget(c1200004.spfilter,tp,LOCATION_EXTRA,0,1,nil,e,tp) end
Duel.SetOperationInfo(0,CATEGORY_SPECIAL_SUMMON,nil,1,tp,LOCATION_EXTRA)
end
function c1200004.spop(e,tp,eg,ep,ev,re,r,rp)
local c=e:GetHandler()
if Duel.GetLocationCountFromEx(tp)<=0 then return false end
if not Duel.IsExistingTarget(c1200004.spfilter,tp,LOCATION_EXTRA,0,1,nil,e,tp) then return false end
local g=Duel.SelectMatchingCard(tp,c1200004.spfilter,tp,LOCATION_EXTRA,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)
local e1=Effect.CreateEffect(c)
e1:SetType(EFFECT_TYPE_SINGLE)
e1:SetCode(EFFECT_SET_ATTACK_FINAL)
e1:SetProperty(EFFECT_FLAG_IGNORE_IMMUNE)
e1:SetReset(RESET_EVENT+0xfe0000)
e1:SetValue(0)
tc:RegisterEffect(e1)
Duel.SpecialSummonComplete()
end
end
--LA Da'ath 榮耀的拉斐兒
function c1200005.initial_effect(c)
--tograve
local e4=Effect.CreateEffect(c)
e4:SetDescription(aux.Stringid(1200005,0))
e4:SetCategory(CATEGORY_TOGRAVE)
e4:SetType(EFFECT_TYPE_SINGLE+EFFECT_TYPE_TRIGGER_O)
e4:SetCode(EVENT_TO_GRAVE)
e4:SetProperty(EFFECT_FLAG_DAMAGE_STEP+EFFECT_FLAG_DELAY)
e4:SetCountLimit(1,1200005)
e4:SetTarget(c1200005.tgtg)
e4:SetOperation(c1200005.tgop)
c:RegisterEffect(e4)
--disable and SpecialSummon
local e2=Effect.CreateEffect(c)
e4:SetDescription(aux.Stringid(1200005,1))
e2:SetCategory(CATEGORY_SPECIAL_SUMMON)
e2:SetType(EFFECT_TYPE_FIELD+EFFECT_TYPE_CONTINUOUS)
e2:SetCode(EVENT_CHAIN_SOLVING)
e2:SetRange(LOCATION_GRAVE)
e2:SetCountLimit(1)
e2:SetOperation(c1200005.disop)
c:RegisterEffect(e2)
end
function c1200005.tgfilter(c)
return c:IsCode(1200005) and c:IsAbleToGrave()
end
function c1200005.tgtg(e,tp,eg,ep,ev,re,r,rp,chk)
if chk==0 then return Duel.IsExistingMatchingCard(c1200005.tgfilter,tp,LOCATION_DECK,0,1,nil) end
Duel.SetOperationInfo(0,CATEGORY_TOGRAVE,nil,nil,tp,LOCATION_DECK)
end
function c1200005.tgop(e,tp,eg,ep,ev,re,r,rp)
local g=Duel.GetMatchingGroup(c1200005.tgfilter,tp,LOCATION_DECK,0,nil)
if g then Duel.SendtoGrave(g,REASON_EFFECT) end
end
function c1200005.distg(e,tp,eg,ep,ev,re,r,rp,chk)
if chk==0 then return Duel.GetLocationCount(tp,LOCATION_MZONE)>0 and e:GetHandler():IsCanBeSpecialSummoned(e,0,tp,false,false) end
Duel.SetOperationInfo(0,CATEGORY_SPECIAL_SUMMON,e:GetHandler(),1,tp,LOCATION_GRAVE)
end
function c1200005.disop(e,tp,eg,ep,ev,re,r,rp)
local ec=e:GetHandler()
if not re:IsHasProperty(EFFECT_FLAG_CARD_TARGET) then return end
local g=Duel.GetChainInfo(ev,CHAININFO_TARGET_CARDS)
if g:IsContains(ec) and (re:GetHandler():IsSetCard(0xfba) or re:GetHandler():IsSetCard(0xfbc)) and Duel.GetLocationCount(tp,LOCATION_MZONE)>0 then
if Duel.SelectYesNo(tp,aux.Stringid(1200005,2)) then
if Duel.NegateEffect(ev) then
Duel.SpecialSummon(ec,0,tp,tp,false,false,POS_FACEUP)
end
end
end
end
--LA Da'ath 王冠的梅丹佐
function c1200006.initial_effect(c)
--des
local e2=Effect.CreateEffect(c)
e2:SetCategory(CATEGORY_ATKCHANGE)
e2:SetDescription(aux.Stringid(1200006,0))
e2:SetType(EFFECT_TYPE_QUICK_O)
e2:SetCode(EVENT_FREE_CHAIN)
e2:SetCountLimit(1)
e2:SetRange(LOCATION_MZONE)
e2:SetTarget(c1200006.atktg)
e2:SetOperation(c1200006.atkop)
c:RegisterEffect(e2)
--SpecialSummon
local e1=Effect.CreateEffect(c)
e1:SetCategory(CATEGORY_SPECIAL_SUMMON)
e1:SetProperty(EFFECT_FLAG_CARD_TARGET)
e1:SetDescription(aux.Stringid(1200006,1))
e1:SetType(EFFECT_TYPE_IGNITION)
e1:SetRange(LOCATION_HAND)
e1:SetTarget(c1200006.target2)
e1:SetOperation(c1200006.operation2)
c:RegisterEffect(e1)
--spsummon
local e3=Effect.CreateEffect(c)
e3:SetDescription(aux.Stringid(1200006,2))
e3:SetCategory(CATEGORY_SPECIAL_SUMMON)
e3:SetType(EFFECT_TYPE_SINGLE+EFFECT_TYPE_TRIGGER_O)
e3:SetProperty(EFFECT_FLAG_DELAY+EFFECT_FLAG_CARD_TARGET)
e3:SetCode(EVENT_DESTROYED)
e3:SetCountLimit(1)
e3:SetCondition(c1200006.spcon)
e3:SetTarget(c1200006.sptg)
e3:SetOperation(c1200006.spop)
c:RegisterEffect(e3)
end
function c1200006.atkfilter(c)
return c:IsFaceup() and c:IsSetCard(0xfba) and c:IsType(TYPE_MONSTER)
end
function c1200006.refilter(c)
return c:IsSetCard(0xfba) and c:IsType(TYPE_MONSTER) and c:IsReleasable()
end
function c1200006.atktg(e,tp,eg,ep,ev,re,r,rp,chk,chkc)
if chk==0 then return Duel.IsExistingMatchingCard(c1200006.refilter,tp,LOCATION_HAND,0,1,nil) and Duel.IsExistingMatchingCard(c1200006.refilter,tp,LOCATION_DECK,0,1,nil) end
end
function c1200006.atkop(e,tp,eg,ep,ev,re,r,rp)
local c=e:GetHandler()
if not Duel.IsExistingMatchingCard(c1200006.refilter,tp,LOCATION_HAND,0,1,nil) then return false end
if not Duel.IsExistingMatchingCard(c1200006.refilter,tp,LOCATION_DECK,0,1,nil) then return false end
local g1=Duel.SelectMatchingCard(tp,c1200006.refilter,tp,LOCATION_HAND,0,1,1,nil)
local g2=Duel.SelectMatchingCard(tp,c1200006.refilter,tp,LOCATION_DECK,0,1,1,nil)
g1:Merge(g2)
local m=g1:GetCount()
if m>0 then
Duel.SendtoGrave(g1,REASON_RELEASE+REASON_EFFECT)
Duel.BreakEffect()
local sg=Duel.GetMatchingGroup(c1200006.atkfilter,tp,LOCATION_MZONE,0,nil)
local tc=sg:GetFirst()
while tc do
local e1=Effect.CreateEffect(c)
e1:SetType(EFFECT_TYPE_SINGLE)
e1:SetCode(EFFECT_UPDATE_ATTACK)
e1:SetValue(500)
e1:SetReset(RESET_EVENT+0x1fe0000+RESET_PHASE+PHASE_END)
tc:RegisterEffect(e1)
tc=sg:GetNext()
end
end
end
function c1200006.filter2(c)
return c:IsFaceup() and c:GetAttack()~=c:GetBaseAttack()
end
function c1200006.target2(e,tp,eg,ep,ev,re,r,rp,chk,chkc)
if chkc then return chkc:GetLocation()==LOCATION_MZONE and c1200006.filter2(chkc) end
if chk==0 then return Duel.IsExistingTarget(c1200006.filter2,tp,LOCATION_MZONE,LOCATION_MZONE,1,nil) and Duel.GetLocationCount(tp,LOCATION_MZONE)>0 and e:GetHandler():IsCanBeSpecialSummoned(e,0,tp,false,false) end
Duel.Hint(HINT_SELECTMSG,tp,aux.Stringid(1200006,2))
local g=Duel.SelectTarget(tp,c1200006.filter2,tp,LOCATION_MZONE,LOCATION_MZONE,1,1,nil)
end
function c1200006.operation2(e,tp,eg,ep,ev,re,r,rp)
local c=e:GetHandler()
local tc=Duel.GetFirstTarget()
if Duel.GetLocationCount(tp,LOCATION_MZONE)>0 and c:IsCanBeSpecialSummoned(e,0,tp,false,false) and c:IsLocation(LOCATION_HAND) then
if Duel.SpecialSummon(c,0,tp,tp,false,false,POS_FACEUP) then
if tc and tc:IsFaceup() and tc:IsRelateToEffect(e) and tc:IsLocation(LOCATION_MZONE) then
Duel.BreakEffect()
Duel.Destroy(tc,REASON_EFFECT)
end
end
end
end
function c1200006.spcon(e,tp,eg,ep,ev,re,r,rp)
local c=e:GetHandler()
return c:IsReason(REASON_EFFECT+REASON_BATTLE) and c:IsPreviousLocation(LOCATION_MZONE) and c:GetPreviousAttackOnField()>c:GetBaseAttack()
end
function c1200006.spfilter(c,e,tp)
return c:IsCanBeSpecialSummoned(e,0,tp,false,false) and c:IsSetCard(0xfba) and c:IsType(TYPE_MONSTER)
end
function c1200006.sptg(e,tp,eg,ep,ev,re,r,rp,chk,chkc)
if chkc then return chkc:IsLocation(LOCATION_GRAVE) and chkc:IsControler(tp)
and chkc:IsCanBeSpecialSummoned(e,0,tp,false,false) end
if chk==0 then return Duel.GetLocationCount(tp,LOCATION_MZONE)>0
and Duel.IsExistingTarget(c1200006.spfilter,tp,LOCATION_GRAVE,0,1,nil,e,tp) end
Duel.Hint(HINT_SELECTMSG,tp,HINTMSG_SPSUMMON)
local g=Duel.SelectTarget(tp,c1200006.spfilter,tp,LOCATION_GRAVE,0,1,1,nil,e,tp)
Duel.SetOperationInfo(0,CATEGORY_SPECIAL_SUMMON,g,1,0,0)
end
function c1200006.spop(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
--LA Da'ath 智慧的拉結兒
function c1200007.initial_effect(c)
--SpecialSummon
local e2=Effect.CreateEffect(c)
e2:SetDescription(aux.Stringid(1200007,0))
e2:SetCategory(CATEGORY_TOHAND+CATEGORY_SPECIAL_SUMMON)
e2:SetType(EFFECT_TYPE_IGNITION)
e2:SetRange(LOCATION_HAND)
e2:SetProperty(EFFECT_FLAG_CARD_TARGET)
e2:SetCountLimit(1,1200007)
e2:SetTarget(c1200007.sptg)
e2:SetOperation(c1200007.spop)
c:RegisterEffect(e2)
end
function c1200007.spfilter(c)
return c:IsSetCard(0xfba) and c:IsFaceup() and c:IsAbleToHand()
end
function c1200007.sptg(e,tp,eg,ep,ev,re,r,rp,chk,chkc)
if chkc then return chkc:IsLocation(LOCATION_MZONE) and c1200007.spfilter(chkc) and chkc:IsControler(tp) end
if chk==0 then return Duel.GetLocationCount(tp,LOCATION_MZONE)>0 and Duel.IsExistingTarget(c1200007.spfilter,tp,LOCATION_MZONE,0,1,nil) and e:GetHandler():IsCanBeSpecialSummoned(e,0,tp,false,false) end
Duel.Hint(HINT_SELECTMSG,tp,HINTMSG_ATOHAND)
local g=Duel.SelectTarget(tp,c1200007.spfilter,tp,LOCATION_MZONE,0,1,1,nil)
Duel.SetOperationInfo(0,CATEGORY_TOHAND,g,1,0,0)
Duel.SetOperationInfo(0,CATEGORY_SPECIAL_SUMMON,e:GetHandler(),1,0,0)
end
function c1200007.spthfilter(c)
return c:IsSetCard(0xfbc) and c:IsAbleToHand() and c:IsType(TYPE_SPELL+TYPE_TRAP)
end
function c1200007.spop(e,tp,eg,ep,ev,re,r,rp)
local tc=Duel.GetFirstTarget()
if tc:IsRelateToEffect(e) and Duel.GetLocationCount(tp,LOCATION_MZONE)>0 then
if Duel.SendtoHand(tc,nil,REASON_EFFECT) then
if Duel.SpecialSummon(e:GetHandler(),0,tp,tp,false,false,POS_FACEUP) then
if (tc:GetRace()==e:GetHandler():GetRace() or tc:GetAttribute()==e:GetHandler():GetAttribute()) and Duel.IsExistingMatchingCard(c1200007.spthfilter,tp,LOCATION_DECK,0,1,nil) then
if Duel.SelectYesNo(tp,aux.Stringid(1200007,1)) then
local g=Duel.SelectMatchingCard(tp,c1200007.spthfilter,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
end
end
end
end
end
--LA SG Envy 普靈思
function c1200011.initial_effect(c)
--search
local e2=Effect.CreateEffect(c)
e2:SetDescription(aux.Stringid(1200011,0))
e2:SetCategory(CATEGORY_TOHAND+CATEGORY_SEARCH)
e2:SetType(EFFECT_TYPE_SINGLE+EFFECT_TYPE_TRIGGER_O)
e2:SetProperty(EFFECT_FLAG_DELAY+EFFECT_FLAG_DAMAGE_STEP)
e2:SetCode(EVENT_SUMMON_SUCCESS)
e2:SetCountLimit(1,1200011)
e2:SetTarget(c1200011.thtg)
e2:SetOperation(c1200011.thop)
c:RegisterEffect(e2)
local e3=e2:Clone()
e3:SetCode(EVENT_SPSUMMON_SUCCESS)
c:RegisterEffect(e3)
--SpecialSummon
local e2=Effect.CreateEffect(c)
e2:SetDescription(aux.Stringid(1200011,1))
e2:SetCategory(CATEGORY_SPECIAL_SUMMON)
e2:SetType(EFFECT_TYPE_IGNITION)
e2:SetRange(LOCATION_GRAVE)
e2:SetCountLimit(1,1200011)
e2:SetCost(c1200011.cost)
e2:SetTarget(c1200011.target)
e2:SetOperation(c1200011.activate)
c:RegisterEffect(e2)
--tograve
local e3=Effect.CreateEffect(c)
e3:SetDescription(aux.Stringid(1200011,2))
e3:SetCategory(CATEGORY_TOHAND+CATEGORY_SEARCH)
e3:SetType(EFFECT_TYPE_SINGLE+EFFECT_TYPE_TRIGGER_O)
e3:SetProperty(EFFECT_FLAG_CARD_TARGET+EFFECT_FLAG_DELAY)
e3:SetCode(EVENT_BE_MATERIAL)
e3:SetCountLimit(1)
e3:SetCondition(c1200011.tgcon)
e3:SetTarget(c1200011.tgtg)
e3:SetOperation(c1200011.tgop)
c:RegisterEffect(e3)
end
function c1200011.thfilter(c)
return c:IsCode(1200035) and c:IsAbleToHand()
end
function c1200011.thtg(e,tp,eg,ep,ev,re,r,rp,chk)
if chk==0 then return Duel.IsExistingMatchingCard(c1200011.thfilter,tp,LOCATION_DECK,0,1,nil) end
Duel.SetOperationInfo(0,CATEGORY_TOHAND,nil,1,tp,LOCATION_DECK)
end
function c1200011.thop(e,tp,eg,ep,ev,re,r,rp)
local tc=Duel.GetFirstMatchingCard(c1200011.thfilter,tp,LOCATION_DECK,0,nil)
if tc then
Duel.SendtoHand(tc,nil,REASON_EFFECT)
Duel.ConfirmCards(1-tp,tc)
end
end
function c1200011.cost(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 c1200011.spfilter(c,e,tp)
return c:IsSetCard(0xfba) and c:IsType(TYPE_MONSTER) and c:IsCanBeSpecialSummoned(e,0,tp,false,false)
end
function c1200011.target(e,tp,eg,ep,ev,re,r,rp,chk)
if chk==0 then return Duel.IsExistingMatchingCard(c1200011.spfilter,tp,LOCATION_HAND,0,1,nil,e,tp) end
Duel.SetOperationInfo(0,CATEGORY_SPECIAL_SUMMON,nil,1,tp,LOCATION_HAND)
end
function c1200011.activate(e,tp,eg,ep,ev,re,r,rp)
Duel.Hint(HINT_SELECTMSG,tp,HINTMSG_SPSUMMON)
local g=Duel.SelectMatchingCard(tp,c1200011.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
function c1200011.tgcon(e,tp,eg,ep,ev,re,r,rp)
local c=e:GetHandler()
return c:IsLocation(LOCATION_GRAVE) and r==REASON_FUSION and c:GetReasonCard():IsSetCard(0xfba)
end
function c1200011.tgfilter(c)
return c:IsSetCard(0xfba) and c:IsType(TYPE_MONSTER) and c:IsAbleToHand()
end
function c1200011.tgtg(e,tp,eg,ep,ev,re,r,rp,chk,chkc)
if chk==0 then return Duel.IsExistingMatchingCard(c1200011.tgfilter,tp,LOCATION_DECK,0,1,nil) end
Duel.SetOperationInfo(0,CATEGORY_TOHAND,nil,1,tp,LOCATION_DECK)
end
function c1200011.tgop(e,tp,eg,ep,ev,re,r,rp)
Duel.Hint(HINT_SELECTMSG,tp,HINTMSG_ATOHAND)
local g=Duel.SelectMatchingCard(tp,c1200011.tgfilter,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
\ No newline at end of file
--LA SG Greed 席維
function c1200012.initial_effect(c)
--SpecialSummon
local e2=Effect.CreateEffect(c)
e2:SetDescription(aux.Stringid(1200012,0))
e2:SetCategory(CATEGORY_SPECIAL_SUMMON)
e2:SetType(EFFECT_TYPE_IGNITION)
e2:SetRange(LOCATION_HAND)
e2:SetCountLimit(1,1200012)
e2:SetTarget(c1200012.sptg)
e2:SetOperation(c1200012.spop)
c:RegisterEffect(e2)
--tuner
local e1=Effect.CreateEffect(c)
e1:SetDescription(aux.Stringid(1200012,1))
e1:SetType(EFFECT_TYPE_IGNITION)
e1:SetCountLimit(1)
e1:SetRange(LOCATION_MZONE)
e1:SetProperty(EFFECT_FLAG_CARD_TARGET)
e1:SetTarget(c1200012.ttarget)
e1:SetOperation(c1200012.toperation)
c:RegisterEffect(e1)
--tograve
local e3=Effect.CreateEffect(c)
e3:SetDescription(aux.Stringid(1200012,2))
e3:SetCategory(CATEGORY_TOHAND+CATEGORY_SEARCH)
e3:SetType(EFFECT_TYPE_SINGLE+EFFECT_TYPE_TRIGGER_O)
e3:SetProperty(EFFECT_FLAG_CARD_TARGET+EFFECT_FLAG_DELAY)
e3:SetCode(EVENT_BE_MATERIAL)
e3:SetCountLimit(1)
e3:SetCondition(c1200012.tgcon)
e3:SetTarget(c1200012.tgtg)
e3:SetOperation(c1200012.tgop)
c:RegisterEffect(e3)
end
function c1200012.filter(c,e,tp)
return c:IsSetCard(0xfba) and c:IsCanBeSpecialSummoned(e,0,tp,false,false)
end
function c1200012.sptg(e,tp,eg,ep,ev,re,r,rp,chk)
local c=e:GetHandler()
if chk==0 then return Duel.GetLocationCount(tp,LOCATION_MZONE)>1 and c:IsCanBeSpecialSummoned(e,0,tp,false,false)
and not c:IsStatus(STATUS_CHAINING) and Duel.IsExistingMatchingCard(c1200012.filter,tp,LOCATION_GRAVE,0,1,c,e,tp)
end
Duel.SetOperationInfo(0,CATEGORY_SPECIAL_SUMMON,c,2,0,0)
end
function c1200012.spop(e,tp,eg,ep,ev,re,r,rp,c)
local c=e:GetHandler()
if c:IsRelateToEffect(e) and Duel.GetLocationCount(tp,LOCATION_MZONE)>1 then
local g1=Duel.SelectMatchingCard(tp,c1200012.filter,tp,LOCATION_GRAVE,0,1,1,c,e,tp)
if g1:GetCount()==0 then return end
g1:AddCard(c)
if Duel.SpecialSummon(g1,0,tp,tp,false,false,POS_FACEUP)==2 then
local tc = g1: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 = g1:GetNext()
end
local sg=Duel.GetMatchingGroup(c1200012.extrafilter,tp,LOCATION_EXTRA,0,nil,g1,e,tp)
if not sg or sg:GetCount()==0 or Duel.GetLocationCountFromEx(tp)<0 then
Duel.BreakEffect()
Duel.SendtoGrave(g1,REASON_EFFECT)
return
end
Duel.BreakEffect()
Duel.Hint(HINT_SELECTMSG,tp,HINTMSG_SPSUMMON)
local tc=sg:Select(tp,1,1,nil):GetFirst()
if tc:IsType(TYPE_FUSION) then
Duel.SendtoDeck(g1,nil,2,REASON_EFFECT+REASON_MATERIAL+REASON_FUSION)
Duel.SpecialSummon(tc,SUMMON_TYPE_FUSION,tp,tp,false,false,POS_FACEUP)
tc:CompleteProcedure()
end
end
end
end
function c1200012.extrafilter(c,mg,e,tp)
if not c:IsSetCard(0xfba) then return false end
if c:IsType(TYPE_FUSION) then
return c:IsCanBeSpecialSummoned(e,SUMMON_TYPE_FUSION,tp,false,false) and c:CheckFusionMaterial(mg)
end
return false
end
function c1200012.tfilter(c)
return c:IsFaceup() and c:IsSetCard(0xfba) and not c:IsType(TYPE_TUNER)
end
function c1200012.ttarget(e,tp,eg,ep,ev,re,r,rp,chk,chkc)
if chkc then return chkc:IsLocation(LOCATION_MZONE) and chkc:IsControler(tp) and c1200012.tfilter(chkc) end
if chk==0 then return Duel.IsExistingTarget(c1200012.tfilter,tp,LOCATION_MZONE,0,1,nil) end
Duel.Hint(HINT_SELECTMSG,tp,HINTMSG_FACEUP)
local g=Duel.SelectTarget(tp,c1200012.tfilter,tp,LOCATION_MZONE,0,1,1,nil)
end
function c1200012.toperation(e,tp,eg,ep,ev,re,r,rp)
local tc=Duel.GetFirstTarget()
if tc:IsRelateToEffect(e) and tc:IsFaceup() then
local e1=Effect.CreateEffect(e:GetHandler())
e1:SetType(EFFECT_TYPE_SINGLE)
e1:SetCode(EFFECT_ADD_TYPE)
e1:SetReset(RESET_EVENT+0x1fe0000+RESET_PHASE+PHASE_END)
e1:SetValue(TYPE_TUNER)
tc:RegisterEffect(e1)
end
end
function c1200012.tgcon(e,tp,eg,ep,ev,re,r,rp)
local c=e:GetHandler()
return c:IsLocation(LOCATION_GRAVE) and r==REASON_FUSION and c:GetReasonCard():IsSetCard(0xfba)
end
function c1200012.tgfilter(c)
return c:IsSetCard(0xfba) and c:IsType(TYPE_MONSTER) and c:IsAbleToHand()
end
function c1200012.tgtg(e,tp,eg,ep,ev,re,r,rp,chk,chkc)
if chk==0 then return Duel.IsExistingMatchingCard(c1200012.tgfilter,tp,LOCATION_REMOVED,0,1,nil) end
Duel.SetOperationInfo(0,CATEGORY_TOHAND,nil,nil,tp,LOCATION_REMOVED)
end
function c1200012.tgop(e,tp,eg,ep,ev,re,r,rp)
Duel.Hint(HINT_SELECTMSG,tp,HINTMSG_ATOHAND)
local g=Duel.SelectMatchingCard(tp,c1200012.tgfilter,tp,LOCATION_REMOVED,0,1,2,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
--LA SG Gluttony 阿庫亞
function c1200013.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)
e1:SetCondition(c1200013.spcon)
e1:SetOperation(c1200013.spop)
e1:SetValue(1)
c:RegisterEffect(e1)
--SpecialSummon
local e2=Effect.CreateEffect(c)
e2:SetDescription(aux.Stringid(1200013,0))
e2:SetCategory(CATEGORY_SPECIAL_SUMMON)
e2:SetType(EFFECT_TYPE_IGNITION)
e2:SetRange(LOCATION_HAND+LOCATION_MZONE)
e2:SetCountLimit(1)
e2:SetCost(c1200013.cost)
e2:SetTarget(c1200013.tgtg)
e2:SetOperation(c1200013.tgop)
c:RegisterEffect(e2)
end
function c1200013.ccfilter(c,ft)
return (ft~=0 and c:IsSetCard(0xfba)) or (ft==0 and c:GetSequence()<5)
end
function c1200013.spcon(e,c)
if c==nil then return true end
local tp=c:GetControler()
local ft=Duel.GetLocationCount(tp,LOCATION_MZONE)
return ft>-1 and Duel.CheckReleaseGroup(tp,c1200013.ccfilter,1,nil,ft)
end
function c1200013.spop(e,tp,eg,ep,ev,re,r,rp,c)
local ft=Duel.GetLocationCount(tp,LOCATION_MZONE)
local g=Duel.SelectReleaseGroup(tp,c1200013.ccfilter,1,1,nil,ft)
Duel.Release(g,REASON_COST)
end
function c1200013.cfilter(c,tc,tp)
return c:IsSetCard(0xfba) and c:IsType(TYPE_MONSTER) and Duel.GetLocationCountFromEx(tp,tp,Group.FromCards(c,tc))>0
end
function c1200013.cost(e,tp,eg,ep,ev,re,r,rp,chk)
if chk==0 then return e:GetHandler():IsReleasable() and Duel.IsExistingMatchingCard(c1200013.cfilter,tp,LOCATION_MZONE+LOCATION_HAND,0,1,tc,tc,tp) end
local tc=e:GetHandler()
local g=Duel.SelectMatchingCard(tp,c1200013.cfilter,tp,LOCATION_MZONE+LOCATION_HAND,0,1,1,tc,tc,tp)
g:AddCard(tc)
Duel.Release(g,REASON_COST)
end
function c1200013.tgfilter(c,e,tp)
return c:IsSetCard(0xfba) and c:IsType(TYPE_MONSTER) and c:IsType(TYPE_FUSION) and c:IsCanBeSpecialSummoned(e,SUMMON_TYPE_FUSION,tp,true,false)
end
function c1200013.tgtg(e,tp,eg,ep,ev,re,r,rp,chk,chkc)
if chk==0 then return Duel.IsExistingMatchingCard(c1200013.tgfilter,tp,LOCATION_EXTRA,0,1,nil,e,tp) end
Duel.SetOperationInfo(0,CATEGORY_SPECIAL_SUMMON,nil,1,tp,LOCATION_EXTRA)
end
function c1200013.tgop(e,tp,eg,ep,ev,re,r,rp)
Duel.Hint(HINT_SELECTMSG,tp,HINTMSG_ATOHAND)
local g=Duel.SelectMatchingCard(tp,c1200013.tgfilter,tp,LOCATION_EXTRA,0,1,1,nil,e,tp)
if g:GetCount()>0 then
local tc=g:GetFirst()
Duel.SpecialSummon(g,SUMMON_TYPE_FUSION,tp,tp,true,false,POS_FACEUP)
tc:CompleteProcedure()
end
end
\ No newline at end of file
--LA SG Pride 克耶爾
function c1200014.initial_effect(c)
--SpecialSummon
local e2=Effect.CreateEffect(c)
e2:SetDescription(aux.Stringid(1200014,0))
e2:SetCategory(CATEGORY_SPECIAL_SUMMON)
e2:SetType(EFFECT_TYPE_IGNITION)
e2:SetRange(LOCATION_HAND+LOCATION_MZONE)
e2:SetCountLimit(1)
e2:SetCost(c1200014.cost)
e2:SetTarget(c1200014.tgtg)
e2:SetOperation(c1200014.tgop)
c:RegisterEffect(e2)
--special summon
local e1=Effect.CreateEffect(c)
e1:SetDescription(aux.Stringid(1200014,1))
e1:SetCategory(CATEGORY_SPECIAL_SUMMON)
e1:SetType(EFFECT_TYPE_IGNITION)
e1:SetRange(LOCATION_GRAVE)
e1:SetCountLimit(1,1200014)
e1:SetCost(c1200014.ccost)
e1:SetTarget(c1200014.ctarget)
e1:SetOperation(c1200014.coperation)
c:RegisterEffect(e1)
end
function c1200014.cfilter(c,e,tp)
return c:IsSetCard(0xfba) and c:IsType(TYPE_MONSTER) and c:IsReleasable()
end
function c1200014.cost(e,tp,eg,ep,ev,re,r,rp,chk)
if chk==0 then return e:GetHandler():IsReleasable() and Duel.IsExistingMatchingCard(c1200014.cfilter,tp,LOCATION_MZONE+LOCATION_HAND,0,1,e:GetHandler()) end
local g=Duel.SelectMatchingCard(tp,c1200014.cfilter,tp,LOCATION_MZONE+LOCATION_HAND,0,1,1,e:GetHandler())
g:AddCard(e:GetHandler())
Duel.Release(g,REASON_COST)
end
function c1200014.tgfilter(c,e,tp)
return c:IsSetCard(0xfba) and c:IsType(TYPE_MONSTER) and c:IsType(TYPE_XYZ) and c:IsCanBeSpecialSummoned(e,SUMMON_TYPE_XYZ,tp,true,false)
end
function c1200014.tgtg(e,tp,eg,ep,ev,re,r,rp,chk,chkc)
if chk==0 then return Duel.IsExistingMatchingCard(c1200014.tgfilter,tp,LOCATION_EXTRA,0,1,nil,e,tp) and Duel.GetLocationCountFromEx(tp)>0 end
Duel.SetOperationInfo(0,CATEGORY_SPECIAL_SUMMON,nil,1,tp,LOCATION_EXTRA)
end
function c1200014.tgop(e,tp,eg,ep,ev,re,r,rp)
Duel.Hint(HINT_SELECTMSG,tp,HINTMSG_ATOHAND)
local g=Duel.SelectMatchingCard(tp,c1200014.tgfilter,tp,LOCATION_EXTRA,0,1,1,nil,e,tp)
if g:GetCount()>0 then
local tc=g:GetFirst()
Duel.SpecialSummon(g,SUMMON_TYPE_XYZ,tp,tp,true,false,POS_FACEUP)
tc:CompleteProcedure()
end
end
function c1200014.ccfilter(c)
return c:IsSetCard(0xfba) and c:IsAbleToRemoveAsCost() and c:IsType(TYPE_MONSTER)
end
function c1200014.ccost(e,tp,eg,ep,ev,re,r,rp,chk)
if chk==0 then return Duel.IsExistingMatchingCard(c1200014.ccfilter,tp,LOCATION_GRAVE,0,1,e:GetHandler()) end
Duel.Hint(HINT_SELECTMSG,tp,HINTMSG_REMOVE)
local g=Duel.SelectMatchingCard(tp,c1200014.ccfilter,tp,LOCATION_GRAVE,0,1,1,e:GetHandler())
Duel.Remove(g,POS_FACEUP,REASON_COST)
end
function c1200014.ctarget(e,tp,eg,ep,ev,re,r,rp,chk)
if chk==0 then return Duel.GetLocationCount(tp,LOCATION_MZONE)>0
and e:GetHandler():IsCanBeSpecialSummoned(e,0,tp,false,false) end
Duel.SetOperationInfo(0,CATEGORY_SPECIAL_SUMMON,e:GetHandler(),1,0,0)
end
function c1200014.coperation(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)
end
end
\ No newline at end of file
--LA SG Sloth 席杜梅
function c1200015.initial_effect(c)
--summon & set with no tribute
local e1=Effect.CreateEffect(c)
e1:SetDescription(aux.Stringid(1200015,0))
e1:SetProperty(EFFECT_FLAG_UNCOPYABLE)
e1:SetType(EFFECT_TYPE_SINGLE)
e1:SetCode(EFFECT_SUMMON_PROC)
e1:SetCondition(c1200015.ntcon)
c:RegisterEffect(e1)
local e2=e1:Clone()
e2:SetCode(EFFECT_SET_PROC)
c:RegisterEffect(e2)
--Damage
local e3=Effect.CreateEffect(c)
e3:SetDescription(aux.Stringid(1200015,1))
e3:SetCategory(CATEGORY_DAMAGE+CATEGORY_DESTROY)
e3:SetProperty(EFFECT_FLAG_SINGLE_RANGE+EFFECT_FLAG_CANNOT_DISABLE+EFFECT_FLAG_CANNOT_NEGATE)
e3:SetType(EFFECT_TYPE_SINGLE+EFFECT_TYPE_TRIGGER_O)
e3:SetCode(EVENT_SUMMON_SUCCESS)
e3:SetProperty(EFFECT_FLAG_DELAY)
e3:SetCountLimit(1,1200015)
e3:SetCondition(c1200015.spcon)
e3:SetTarget(c1200015.sptg)
e3:SetOperation(c1200015.spop)
c:RegisterEffect(e3)
--SpecialSummon
local e2=Effect.CreateEffect(c)
e2:SetDescription(aux.Stringid(1200015,0))
e2:SetCategory(CATEGORY_SPECIAL_SUMMON)
e2:SetType(EFFECT_TYPE_IGNITION)
e2:SetRange(LOCATION_MZONE)
e2:SetCountLimit(1,1200015)
e2:SetCondition(c1200015.condition)
e2:SetTarget(c1200015.target)
e2:SetOperation(c1200015.activate)
c:RegisterEffect(e2)
end
function c1200015.ntcon(e,c,minc)
if c==nil then return true end
return minc==0 and c:GetLevel()>4 and Duel.GetLocationCount(c:GetControler(),LOCATION_MZONE)>0 and Duel.GetFieldGroupCount(c:GetControler(),LOCATION_MZONE,0)==0
end
function c1200015.spcon(e,tp,eg,ep,ev,re,r,rp)
return e:GetHandler():IsSummonType(SUMMON_TYPE_ADVANCE)
end
function c1200015.tgfilter(c)
return c:IsSetCard(0xfbc) and c:IsFaceup()
end
function c1200015.sptg(e,tp,eg,ep,ev,re,r,rp,chk)
if chk==0 then return Duel.IsExistingMatchingCard(c1200015.tgfilter,tp,LOCATION_ONFIELD,0,1,nil) end
local g=Duel.GetFieldGroup(tp,LOCATION_ONFIELD,LOCATION_ONFIELD)
Duel.SetOperationInfo(0,CATEGORY_DAMAGE,0,0,0,0)
Duel.SetOperationInfo(0,CATEGORY_DESTROY,g,g:GetCount(),0,0)
end
function c1200015.spop(e,tp,eg,ep,ev,re,r,rp)
local g=Duel.GetMatchingGroup(c1200015.tgfilter,tp,LOCATION_ONFIELD,0,nil)
if not g then return false end
if Duel.Damage(1-tp,g:GetCount()*700,REASON_EFFECT)>0 then
Duel.BreakEffect()
local g=Duel.GetFieldGroup(tp,LOCATION_ONFIELD,LOCATION_ONFIELD)
if g then Duel.Destroy(g,REASON_EFFECT) end
end
end
function c1200015.condition(e,tp,eg,ep,ev,re,r,rp)
return e:GetHandler():GetBaseAttack()~=e:GetHandler():GetAttack()
end
function c1200015.spfilter(c,e,tp)
return c:IsSetCard(0xfba) and c:IsType(TYPE_XYZ) and c:IsCanBeSpecialSummoned(e,SUMMON_TYPE_XYZ,tp,false,false)
end
function c1200015.target(e,tp,eg,ep,ev,re,r,rp,chk)
if chk==0 then return Duel.IsExistingMatchingCard(c1200015.spfilter,tp,LOCATION_EXTRA,0,1,nil,e,tp) end
Duel.SetOperationInfo(0,CATEGORY_DESTROY,nil,1,tp,LOCATION_EXTRA)
end
function c1200015.activate(e,tp,eg,ep,ev,re,r,rp)
local tc=e:GetHandler()
if tc:IsFacedown() or not tc:IsRelateToEffect(e) or tc:IsControler(1-tp) or tc:IsImmuneToEffect(e) then return end
Duel.Hint(HINT_SELECTMSG,tp,HINTMSG_SPSUMMON)
local g=Duel.SelectMatchingCard(tp,c1200015.spfilter,tp,LOCATION_EXTRA,0,1,1,nil,e,tp)
local sc=g:GetFirst()
if sc then
local mg=tc:GetOverlayGroup()
if mg:GetCount()~=0 then
Duel.Overlay(sc,mg)
end
Duel.Overlay(sc,Group.FromCards(tc))
Duel.SpecialSummon(sc,SUMMON_TYPE_XYZ,tp,tp,true,false,POS_FACEUP)
sc:CompleteProcedure()
end
end
--LA SG Wrath 憂拉斯
function c1200016.initial_effect(c)
--tograve+copy
local e2=Effect.CreateEffect(c)
e2:SetDescription(aux.Stringid(1200016,0))
e2:SetCategory(CATEGORY_SPECIAL_SUMMON)
e2:SetType(EFFECT_TYPE_SINGLE+EFFECT_TYPE_TRIGGER_O)
e2:SetCode(EVENT_SUMMON_SUCCESS)
e2:SetProperty(EFFECT_FLAG_DELAY)
e2:SetCountLimit(1,1200016)
e2:SetTarget(c1200016.tgtg)
e2:SetOperation(c1200016.tgop)
c:RegisterEffect(e2)
local e3=e2:Clone()
e3:SetCode(EVENT_SPSUMMON_SUCCESS)
c:RegisterEffect(e3)
--to grave
local e4=Effect.CreateEffect(c)
e4:SetCategory(CATEGORY_RECOVER+CATEGORY_TODECK)
e4:SetType(EFFECT_TYPE_SINGLE+EFFECT_TYPE_TRIGGER_O)
e4:SetProperty(EFFECT_FLAG_CARD_TARGET+EFFECT_FLAG_DELAY)
e4:SetCode(EVENT_TO_GRAVE)
e4:SetCountLimit(1)
e4:SetTarget(c1200016.target2)
e4:SetOperation(c1200016.operation2)
c:RegisterEffect(e4)
end
function c1200016.tgfilter(c)
return c:IsSetCard(0xfba) and c:IsReleasable() and c:IsType(TYPE_MONSTER)
end
function c1200016.tgtg(e,tp,eg,ep,ev,re,r,rp,chk)
if chk==0 then return Duel.IsExistingMatchingCard(c1200016.filter,tp,LOCATION_HAND,0,1,nil) end
Duel.SetOperationInfo(0,CATEGORY_SPECIAL_SUMMON,nil,1,tp,LOCATION_DECK)
end
function c1200016.spfilter(c,e,tp,rec,att)
return c:IsSetCard(0xfba) and c:IsCanBeSpecialSummoned(e,0,tp,false,false) and not c:IsCode(1200016) and c:IsType(TYPE_MONSTER) and (c:IsRace(rec) or c:IsAttribute(att))
end
function c1200016.tgop(e,tp,eg,ep,ev,re,r,rp)
local c=e:GetHandler()
if not Duel.IsExistingMatchingCard(c1200016.filter,tp,LOCATION_HAND,0,1,nil) then return false end
local g=Duel.SelectMatchingCard(tp,c1200016.filter,tp,LOCATION_HAND,0,1,1,nil)
if g then
local tc=g:GetFirst()
if Duel.Release(tc,REASON_EFFECT) then
if Duel.SelectYesNo(tp,aux.Stringid(1200016,1)) then
local rec=tc:GetRace()
local att=tc:GetAttribute()
local sg=Duel.SelectMatchingCard(tp,c1200016.spfilter,tp,LOCATION_GRAVE+LOCATION_REMOVED,0,1,1,nil,e,tp,rec,att)
if sg then
Duel.SpecialSummon(sg,0,tp,tp,false,false,POS_FACEUP)
end
end
end
end
end
function c1200016.filter1(c)
return c:IsSetCard(0xfba) and c:IsType(TYPE_MONSTER) and c:IsAbleToHand()
end
function c1200016.target2(e,tp,eg,ep,ev,re,r,rp,chk,chkc)
if chkc then return chkc:IsLocation(LOCATION_GRAVE) and chkc:IsControler(tp) and c1200016.filter1(chkc) end
if chk==0 then return Duel.IsExistingTarget(c1200016.filter1,tp,LOCATION_GRAVE,0,1,e:GetHandler()) end
Duel.Hint(HINT_SELECTMSG,tp,HINTMSG_ATOHAND)
local g1=Duel.SelectTarget(tp,c1200016.filter1,tp,LOCATION_GRAVE,0,1,1,e:GetHandler())
Duel.SetOperationInfo(0,CATEGORY_TOHAND,g1,1,0,0)
end
function c1200016.operation2(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 then
Duel.SendtoHand(sg,nil,2,REASON_EFFECT)
Duel.ConfirmCards(1-tp,sg)
end
end
\ No newline at end of file
--LA SY 先負的菲斯特菲
function c1200021.initial_effect(c)
--pendulum summon
aux.EnablePendulumAttribute(c)
--atk
local e4=Effect.CreateEffect(c)
e4:SetDescription(aux.Stringid(1200021,0))
e4:SetCategory(CATEGORY_ATKCHANGE)
e4:SetType(EFFECT_TYPE_IGNITION)
e4:SetRange(LOCATION_PZONE)
e4:SetProperty(EFFECT_FLAG_CARD_TARGET)
e4:SetCountLimit(1)
e4:SetCost(c1200021.atkcost)
e4:SetTarget(c1200021.atktg)
e4:SetOperation(c1200021.atkop)
c:RegisterEffect(e4)
--indes
local e2=Effect.CreateEffect(c)
e2:SetType(EFFECT_TYPE_SINGLE)
e2:SetProperty(EFFECT_FLAG_SINGLE_RANGE)
e2:SetRange(LOCATION_PZONE)
e2:SetCode(EFFECT_INDESTRUCTABLE_EFFECT)
e2:SetValue(c1200021.efilter)
c:RegisterEffect(e2)
--poschange
local e2=Effect.CreateEffect(c)
e2:SetDescription(aux.Stringid(1200021,1))
e2:SetCategory(CATEGORY_POSITION+CATEGORY_DESTROY+CATEGORY_TOHAND+CATEGORY_SEARCH)
e2:SetType(EFFECT_TYPE_FIELD+EFFECT_TYPE_QUICK_O)
e2:SetProperty(EFFECT_FLAG_DAMAGE_STEP+EFFECT_FLAG_DAMAGE_CAL)
e2:SetCode(EVENT_ATTACK_ANNOUNCE)
e2:SetRange(LOCATION_HAND)
e2:SetCountLimit(1,1200021)
e2:SetCondition(c1200021.poscon)
e2:SetCost(c1200021.poscost)
e2:SetTarget(c1200021.postg)
e2:SetOperation(c1200021.posop)
c:RegisterEffect(e2)
end
function c1200021.rfilter(c)
return c:IsReleasable() and c:IsSetCard(0xfba) and c:IsType(TYPE_MONSTER)
end
function c1200021.atkcost(e,tp,eg,ep,ev,re,r,rp,chk)
if chk==0 then return Duel.IsExistingMatchingCard(c1200021.rfilter,tp,LOCATION_HAND+LOCATION_MZONE,0,1,nil) end
local g=Duel.SelectMatchingCard(tp,c1200021.rfilter,tp,LOCATION_HAND+LOCATION_MZONE,0,1,1,nil)
Duel.Release(g,REASON_COST)
end
function c1200021.atktg(e,tp,eg,ep,ev,re,r,rp,chk,chkc)
if chkc then return chkc:IsControler(1-tp) and chkc:IsLocation(LOCATION_MZONE) and chkc:IsFaceup() end
if chk==0 then return Duel.IsExistingTarget(Card.IsFaceup,tp,LOCATION_MZONE,LOCATION_MZONE,1,nil) end
Duel.Hint(HINT_SELECTMSG,tp,HINTMSG_FACEUP)
local g=Duel.SelectTarget(tp,Card.IsFaceup,tp,LOCATION_MZONE,LOCATION_MZONE,1,1,nil)
Duel.SetOperationInfo(0,CATEGORY_ATKCHANGE,g,1,0,0)
end
function c1200021.atkop(e,tp,eg,ep,ev,re,r,rp)
local c=e:GetHandler()
if not c:IsRelateToEffect(e) then return false end
local tc=Duel.GetFirstTarget()
if tc:IsFaceup() and tc:IsRelateToEffect(e) then
local e3=Effect.CreateEffect(c)
e3:SetType(EFFECT_TYPE_SINGLE)
e3:SetCode(EFFECT_SET_ATTACK_FINAL)
e3:SetReset(RESET_EVENT+0x1fe0000)
e3:SetValue(0)
tc:RegisterEffect(e3)
local e4=Effect.CreateEffect(c)
e4:SetType(EFFECT_TYPE_SINGLE+EFFECT_TYPE_CONTINUOUS)
e4:SetCode(EVENT_LEAVE_FIELD)
e4:SetOperation(c1200021.operation)
tc:RegisterEffect(e4)
end
end
function c1200021.operation(e,tp,eg,ep,ev,re,r,rp,chk)
Duel.Damage(e:GetHandler():GetControler(),1000,REASON_EFFECT)
e:Reset()
end
function c1200021.efilter(e,te)
return te:GetHandlerPlayer()~=e:GetHandlerPlayer() and te:IsActiveType(TYPE_MONSTER)
end
function c1200021.cfilter(c,tp)
return c:IsFaceup() and c:IsSetCard(0xfba) and c:IsControler(tp)
end
function c1200021.poscon(e,tp,eg,ep,ev,re,r,rp)
local c=Duel.GetAttackTarget()
if not c then return false end
if c:IsControler(1-tp) then c=Duel.GetAttacker() end
return c and c1200021.cfilter(c,tp)
end
function c1200021.poscost(e,tp,eg,ep,ev,re,r,rp,chk)
if chk==0 then return e:GetHandler():IsDiscardable() end
Duel.SendtoGrave(e:GetHandler(),REASON_COST+REASON_DISCARD)
end
function c1200021.thfilter(c,tp)
return c:IsCode(1200025) and c:IsAbleToHand()
end
function c1200021.postg(e,tp,eg,ep,ev,re,r,rp,chk)
local tc=Duel.GetAttackTarget()
if not tc then return false end
if tc:IsControler(tp) then tc=Duel.GetAttacker() end
if chk==0 then return tc:IsFaceup() and tc:IsCanTurnSet() end
Duel.SetOperationInfo(0,CATEGORY_POSITION,tc,1,0,0)
end
function c1200021.posop(e,tp,eg,ep,ev,re,r,rp)
local tc=Duel.GetAttackTarget()
local dc=Duel.GetAttacker()
if not tc then return false end
if tc:IsControler(tp) and tc:IsSetCard(0xfba) then
local sc=tc
tc=dc
dc=sc
end
if Duel.ChangePosition(tc,POS_FACEDOWN_DEFENSE)>0 and Duel.IsExistingMatchingCard(c1200021.thfilter,tp,LOCATION_DECK+LOCATION_GRAVE,0,1,nil) and dc:IsDestructable() then
if Duel.SelectYesNo(tp,aux.Stringid(1200021,2)) then
Duel.BreakEffect()
if Duel.Destroy(dc,REASON_EFFECT)>0 then
local g=Duel.SelectMatchingCard(tp,c1200021.thfilter,tp,LOCATION_DECK+LOCATION_GRAVE,0,1,1,nil)
if g then
Duel.SendtoHand(g,nil,REASON_EFFECT)
Duel.ConfirmCards(1-tp,g)
end
end
end
end
end
\ No newline at end of file
--LA SY 大安的卡蓮特兒
function c1200022.initial_effect(c)
--pendulum summon
aux.EnablePendulumAttribute(c)
--atkup
local e2=Effect.CreateEffect(c)
e2:SetDescription(aux.Stringid(1200022,0))
e2:SetCategory(CATEGORY_TOHAND+CATEGORY_ATKCHANGE)
e2:SetType(EFFECT_TYPE_QUICK_O)
e2:SetCode(EVENT_FREE_CHAIN)
e2:SetCountLimit(1,1200022)
e2:SetRange(LOCATION_PZONE)
e2:SetTarget(c1200022.atktg)
e2:SetOperation(c1200022.atkop)
c:RegisterEffect(e2)
--indes
local e2=Effect.CreateEffect(c)
e2:SetType(EFFECT_TYPE_SINGLE)
e2:SetProperty(EFFECT_FLAG_SINGLE_RANGE)
e2:SetRange(LOCATION_PZONE)
e2:SetCode(EFFECT_INDESTRUCTABLE_EFFECT)
e2:SetValue(c1200022.efilter)
c:RegisterEffect(e2)
--synlimit
local e0=Effect.CreateEffect(c)
e0:SetType(EFFECT_TYPE_SINGLE)
e0:SetCode(EFFECT_CANNOT_BE_SYNCHRO_MATERIAL)
e0:SetProperty(EFFECT_FLAG_CANNOT_DISABLE+EFFECT_FLAG_UNCOPYABLE)
e0:SetValue(c1200022.synlimit)
c:RegisterEffect(e0)
--CopyEffect
local e1=Effect.CreateEffect(c)
e1:SetDescription(aux.Stringid(1200022,1))
e1:SetCategory(CATEGORY_TOHAND+CATEGORY_TOGRAVE)
e1:SetType(EFFECT_TYPE_IGNITION)
e1:SetCountLimit(1)
e1:SetRange(LOCATION_HAND)
e1:SetProperty(EFFECT_FLAG_CARD_TARGET)
e1:SetCost(c1200022.tcost)
e1:SetTarget(c1200022.ttarget)
e1:SetOperation(c1200022.toperation)
c:RegisterEffect(e1)
end
function c1200022.efilter(e,te)
return te:GetHandlerPlayer()~=e:GetHandlerPlayer() and te:IsActiveType(TYPE_MONSTER)
end
function c1200022.synlimit(e,c)
if not c then return false end
return not c:IsSetCard(0xfba)
end
function c1200022.tgfilter(c)
return c:IsFaceup() and c:IsAbleToHand() and c:IsSetCard(0xfba) and c:IsType(TYPE_MONSTER)
end
function c1200022.atktg(e,tp,eg,ep,ev,re,r,rp,chk,chkc)
if chk==0 then return Duel.IsExistingMatchingCard(c1200022.tgfilter,tp,LOCATION_MZONE,0,1,nil) end
Duel.SetOperationInfo(0,CATEGORY_TOHAND,0,1,0,0)
end
function c1200022.atkop(e,tp,eg,ep,ev,re,r,rp)
local c=e:GetHandler()
if not c:IsRelateToEffect(e) then return false end
if not Duel.IsExistingMatchingCard(c1200022.tgfilter,tp,LOCATION_MZONE,0,1,nil) then return false end
local g=Duel.SelectMatchingCard(tp,c1200022.tgfilter,tp,LOCATION_MZONE,0,1,1,nil)
local tc=g:GetFirst()
if tc then
local atk=tc:GetAttack()
if Duel.SendtoHand(tc,nil,REASON_EFFECT) and Duel.IsExistingMatchingCard(Card.IsFaceup,tp,LOCATION_MZONE,LOCATION_MZONE,1,nil) then
Duel.BreakEffect()
local sg=Duel.GetMatchingGroup(Card.IsFaceup,tp,LOCATION_MZONE,LOCATION_MZONE,nil)
local sc=sg:GetFirst()
while sc do
local e1=Effect.CreateEffect(c)
e1:SetType(EFFECT_TYPE_SINGLE)
e1:SetCode(EFFECT_UPDATE_ATTACK)
e1:SetValue(atk)
e1:SetReset(RESET_EVENT+0x1fe0000+RESET_PHASE+PHASE_END)
sc:RegisterEffect(e1)
sc=sg:GetNext()
end
end
end
end
function c1200022.tcost(e,tp,eg,ep,ev,re,r,rp,chk)
if chk==0 then return e:GetHandler():IsDiscardable() end
Duel.SendtoGrave(e:GetHandler(),REASON_COST+REASON_DISCARD)
end
function c1200022.tfilter(c)
return c:IsFaceup() and c:IsSetCard(0xfba)
end
function c1200022.tgfilter(c)
return c:IsAbleToGrave() and c:IsSetCard(0xfba)
end
function c1200022.ttarget(e,tp,eg,ep,ev,re,r,rp,chk,chkc)
if chkc then return chkc:IsLocation(LOCATION_MZONE) and chkc:IsControler(tp) and c1200022.tfilter(chkc) end
if chk==0 then return Duel.IsExistingTarget(c1200022.tfilter,tp,LOCATION_MZONE,0,1,nil) and Duel.IsExistingMatchingCard(c1200022.tgfilter,tp,LOCATION_DECK,0,1,nil) end
Duel.Hint(HINT_SELECTMSG,tp,HINTMSG_FACEUP)
local g=Duel.SelectTarget(tp,c1200022.tfilter,tp,LOCATION_MZONE,0,1,1,nil)
Duel.SetOperationInfo(0,CATEGORY_TOGRAVE,0,1,tp,LOCATION_DECK)
end
function c1200022.toperation(e,tp,eg,ep,ev,re,r,rp)
local tc=Duel.GetFirstTarget()
if not Duel.IsExistingMatchingCard(c1200022.tgfilter,tp,LOCATION_DECK,0,1,nil) then return false end
local g=Duel.SelectMatchingCard(tp,c1200022.tgfilter,tp,LOCATION_DECK,0,1,1,nil)
local sc=g:GetFirst()
if Duel.SendtoGrave(sc,REASON_EFFECT)>0 and tc:IsFaceup() and tc:IsRelateToEffect(e) then
Duel.BreakEffect()
local code=sc:GetOriginalCode()
local e1=Effect.CreateEffect(e:GetHandler())
e1:SetType(EFFECT_TYPE_SINGLE)
e1:SetProperty(EFFECT_FLAG_CANNOT_DISABLE)
e1:SetReset(RESET_EVENT+0x1ff0000+RESET_PHASE+PHASE_END)
e1:SetCode(EFFECT_CHANGE_CODE)
e1:SetValue(code)
tc:RegisterEffect(e1)
tc:CopyEffect(code,RESET_EVENT+0x1fe0000+RESET_PHASE+PHASE_END,1)
end
end
\ No newline at end of file
--LA SY 友引的夕碧姬
function c1200023.initial_effect(c)
--pendulum summon
aux.EnablePendulumAttribute(c)
--indes
local e2=Effect.CreateEffect(c)
e2:SetType(EFFECT_TYPE_SINGLE)
e2:SetProperty(EFFECT_FLAG_SINGLE_RANGE)
e2:SetRange(LOCATION_PZONE)
e2:SetCode(EFFECT_INDESTRUCTABLE_EFFECT)
e2:SetValue(c1200023.efilter)
c:RegisterEffect(e2)
--tohand
local e1=Effect.CreateEffect(c)
e1:SetCategory(CATEGORY_TOHAND)
e1:SetDescription(aux.Stringid(1200023,0))
e1:SetType(EFFECT_TYPE_QUICK_O)
e1:SetCode(EVENT_FREE_CHAIN)
e1:SetCountLimit(1,1200023)
e1:SetRange(LOCATION_PZONE)
e1:SetProperty(EFFECT_FLAG_CARD_TARGET)
e1:SetTarget(c1200023.ttarget)
e1:SetOperation(c1200023.toperation)
c:RegisterEffect(e1)
--SpecialSummon
local e1=Effect.CreateEffect(c)
e1:SetCategory(CATEGORY_SPECIAL_SUMMON)
e1:SetDescription(aux.Stringid(1200023,1))
e1:SetType(EFFECT_TYPE_QUICK_O)
e1:SetCode(EVENT_FREE_CHAIN)
e1:SetCountLimit(1,1200023)
e1:SetRange(LOCATION_PZONE)
e1:SetTarget(c1200023.sptg)
e1:SetOperation(c1200023.spop)
c:RegisterEffect(e1)
--selfdes
local e1=Effect.CreateEffect(c)
e1:SetType(EFFECT_TYPE_SINGLE)
e1:SetProperty(EFFECT_FLAG_SINGLE_RANGE+EFFECT_FLAG_CANNOT_DISABLE)
e1:SetRange(LOCATION_PZONE)
e1:SetCode(EFFECT_SELF_DESTROY)
e1:SetCondition(c1200023.sdcon)
c:RegisterEffect(e1)
--toPZone
local e3 = Effect.CreateEffect(c)
e3:SetDescription(aux.Stringid(1200023,2))
e3:SetType(EFFECT_TYPE_IGNITION)
e3:SetRange(LOCATION_MZONE)
e3:SetCost(c1200023.tpcost)
e3:SetTarget(c1200023.tptar)
e3:SetOperation(c1200023.tpop)
c:RegisterEffect(e3)
end
function c1200023.efilter(e,te)
return te:GetHandlerPlayer()~=e:GetHandlerPlayer() and te:IsActiveType(TYPE_MONSTER)
end
function c1200023.sdcon(e)
local c=e:GetHandler()
return c:GetRightScale()<1 or c:GetRightScale()>12 or c:GetLeftScale()<1 or c:GetLeftScale()>12
end
function c1200023.tfilter(c)
return c:IsFaceup() and c:IsSetCard(0xfba) and not c:IsType(TYPE_TUNER)
end
function c1200023.ttarget(e,tp,eg,ep,ev,re,r,rp,chk,chkc)
if chkc then return chkc:IsLocation(LOCATION_MZONE) and chkc:IsControler(tp) and c1200023.tfilter(chkc) end
if chk==0 then return Duel.IsExistingTarget(c1200023.tfilter,tp,LOCATION_MZONE,0,1,nil) end
Duel.Hint(HINT_SELECTMSG,tp,HINTMSG_FACEUP)
local g=Duel.SelectTarget(tp,c1200023.tfilter,tp,LOCATION_MZONE,0,1,1,nil)
Duel.SetOperationInfo(0,CATEGORY_TOHAND,0,1,tp,LOCATION_MZONE)
end
function c1200023.toperation(e,tp,eg,ep,ev,re,r,rp)
local tc=Duel.GetFirstTarget()
local c=e:GetHandler()
if c:IsRelateToEffect(e) and tc:IsRelateToEffect(e) then
local j=tc:GetRank()
local k=tc:GetLevel()
local m=j+k
if Duel.SendtoHand(tc,nil,REASON_EFFECT)>0 then
Duel.BreakEffect()
local e1=Effect.CreateEffect(c)
e1:SetType(EFFECT_TYPE_SINGLE)
e1:SetCode(EFFECT_UPDATE_LSCALE)
e1:SetValue(m)
e1:SetReset(RESET_EVENT+0x1ff0000)
c:RegisterEffect(e1)
local e2=e1:Clone()
e2:SetCode(EFFECT_UPDATE_RSCALE)
c:RegisterEffect(e2)
end
end
end
function c1200023.spfilter(c,e,tp)
return c:IsFaceup() and c:IsSetCard(0xfba) and c:IsCanBeSpecialSummoned(e,0,tp,false,false)
end
function c1200023.sptg(e,tp,eg,ep,ev,re,r,rp,chk)
if chk==0 then return Duel.GetLocationCount(tp,LOCATION_MZONE)>0 and Duel.IsExistingMatchingCard(c1200023.spfilter,tp,LOCATION_PZONE,0,1,e:GetHandler(),e,tp) end
Duel.SetOperationInfo(0,CATEGORY_SPECIAL_SUMMON,0,1,0,0)
end
function c1200023.spop(e,tp,eg,ep,ev,re,r,rp)
local c=e:GetHandler()
if not c:IsRelateToEffect(e) then return end
local tc=Duel.GetFirstMatchingCard(c1200023.spfilter,tp,LOCATION_PZONE,0,e:GetHandler(),e,tp)
if tc then
if Duel.SpecialSummon(tc,0,tp,tp,false,false,POS_FACEUP)>0 then
Duel.BreakEffect()
local j=tc:GetRank()
local k=tc:GetLevel()
local m=j+k
local e1=Effect.CreateEffect(c)
e1:SetType(EFFECT_TYPE_SINGLE)
e1:SetCode(EFFECT_UPDATE_LSCALE)
e1:SetValue(-m)
e1:SetReset(RESET_EVENT+0x1ff0000)
c:RegisterEffect(e1)
local e2=e1:Clone()
e2:SetCode(EFFECT_UPDATE_RSCALE)
c:RegisterEffect(e2)
end
end
end
function c1200023.tpcost(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 c1200023.tptar(e,tp,eg,ep,ev,re,r,rp,chk,chkc)
if chk==0 then return Duel.IsExistingMatchingCard(c1200023.tpfilter,tp,LOCATION_EXTRA+LOCATION_GRAVE,0,1,nil) and (Duel.CheckLocation(tp,LOCATION_PZONE,0) or Duel.CheckLocation(tp,LOCATION_PZONE,1)) end
end
function c1200023.tpfilter(c)
return c:IsSetCard(0xfba) and c:IsType(TYPE_PENDULUM) and c:IsFaceup()
end
function c1200023.tpop(e,tp,eg,ep,ev,re,r,rp)
if not (Duel.CheckLocation(tp,LOCATION_PZONE,0) or Duel.CheckLocation(tp,LOCATION_PZONE,1)) then return false end
if Duel.CheckLocation(tp,LOCATION_PZONE,0) and Duel.IsExistingMatchingCard(c1200023.tpfilter,tp,LOCATION_EXTRA+LOCATION_GRAVE,0,1,e:GetHandler()) then
Duel.Hint(HINT_SELECTMSG,tp,HINTMSG_TOFIELD)
local g=Duel.SelectMatchingCard(tp,c1200023.tpfilter,tp,LOCATION_EXTRA+LOCATION_GRAVE,0,1,1,e:GetHandler())
Duel.MoveToField(g:GetFirst(),tp,tp,LOCATION_SZONE,POS_FACEUP, true)
end
if Duel.CheckLocation(tp,LOCATION_PZONE,1) and Duel.IsExistingMatchingCard(c1200023.tpfilter,tp,LOCATION_EXTRA+LOCATION_GRAVE,0,1,e:GetHandler()) then
Duel.Hint(HINT_SELECTMSG,tp,HINTMSG_TOFIELD)
local g=Duel.SelectMatchingCard(tp,c1200023.tpfilter,tp,LOCATION_EXTRA+LOCATION_GRAVE,0,1,1,e:GetHandler())
Duel.MoveToField(g:GetFirst(),tp,tp,LOCATION_SZONE,POS_FACEUP, true)
end
end
--LA SY 佛滅的波達蝶斯
function c1200024.initial_effect(c)
--pendulum summon
aux.EnablePendulumAttribute(c)
--atk
local e4=Effect.CreateEffect(c)
e4:SetDescription(aux.Stringid(1200024,0))
e4:SetCategory(CATEGORY_ATKCHANGE)
e4:SetType(EFFECT_TYPE_QUICK_O)
e4:SetCode(EVENT_FREE_CHAIN)
e4:SetRange(LOCATION_PZONE)
e4:SetCountLimit(1)
e4:SetCondition(c1200024.atkcon)
e4:SetCost(c1200024.atkcost)
e4:SetTarget(c1200024.atktg)
e4:SetOperation(c1200024.atkop)
c:RegisterEffect(e4)
--special summon
local e4=Effect.CreateEffect(c)
e4:SetDescription(aux.Stringid(1200024,1))
e4:SetCategory(CATEGORY_SPECIAL_SUMMON)
e4:SetType(EFFECT_TYPE_FIELD+EFFECT_TYPE_TRIGGER_O)
e4:SetCode(EVENT_ATTACK_ANNOUNCE)
e4:SetRange(LOCATION_PZONE)
e4:SetCondition(c1200024.spcon)
e4:SetTarget(c1200024.sptg)
e4:SetOperation(c1200024.spop)
c:RegisterEffect(e4)
--indes
local e2=Effect.CreateEffect(c)
e2:SetType(EFFECT_TYPE_SINGLE)
e2:SetProperty(EFFECT_FLAG_SINGLE_RANGE)
e2:SetRange(LOCATION_PZONE)
e2:SetCode(EFFECT_INDESTRUCTABLE_EFFECT)
e2:SetValue(c1200024.efilter)
c:RegisterEffect(e2)
--search
local e3=Effect.CreateEffect(c)
e3:SetType(EFFECT_TYPE_IGNITION)
e3:SetDescription(aux.Stringid(1200024,2))
e3:SetRange(LOCATION_HAND)
e3:SetCategory(CATEGORY_TOHAND+CATEGORY_SEARCH)
e3:SetCountLimit(1,1200024)
e3:SetCondition(c1200024.thcon)
e3:SetCost(c1200024.cost2)
e3:SetTarget(c1200024.thtg)
e3:SetOperation(c1200024.thop)
c:RegisterEffect(e3)
--todeck
local e2=Effect.CreateEffect(c)
e2:SetDescription(aux.Stringid(1200024,3))
e2:SetCategory(CATEGORY_TODECK+CATEGORY_DRAW)
e2:SetType(EFFECT_TYPE_IGNITION)
e2:SetRange(LOCATION_GRAVE)
e2:SetCountLimit(1)
e2:SetCost(c1200024.cost)
e2:SetTarget(c1200024.target)
e2:SetOperation(c1200024.activate)
c:RegisterEffect(e2)
end
function c1200024.efilter(e,te)
return te:GetHandlerPlayer()~=e:GetHandlerPlayer() and te:IsActiveType(TYPE_MONSTER)
end
function c1200024.rfilter(c)
return c:IsReleasable() and c:IsSetCard(0xfba) and c:IsType(TYPE_MONSTER)
end
function c1200024.atkcon(e,tp,eg,ep,ev,re,r,rp,chk)
return Duel.GetTurnPlayer()==tp
end
function c1200024.atkcost(e,tp,eg,ep,ev,re,r,rp,chk)
if chk==0 then return Duel.IsExistingMatchingCard(c1200024.rfilter,tp,LOCATION_HAND+LOCATION_MZONE,0,1,nil) end
local g=Duel.SelectMatchingCard(tp,c1200024.rfilter,tp,LOCATION_HAND+LOCATION_MZONE,0,1,1,nil)
Duel.Release(g,REASON_COST)
end
function c1200024.tgfilter(c)
return c:IsFaceup() and c:GetAttack()>500
end
function c1200024.atktg(e,tp,eg,ep,ev,re,r,rp,chk,chkc)
if chk==0 then return Duel.IsExistingMatchingCard(c1200024.tgfilter,tp,LOCATION_MZONE,LOCATION_MZONE,1,nil) end
Duel.SetOperationInfo(0,CATEGORY_ATKCHANGE,0,0,0,0)
end
function c1200024.tgfilter2(c)
return c:IsFaceup() and c:GetAttack()>500 and not (c:IsType(TYPE_XYZ) or c:IsType(TYPE_LINK))
end
function c1200024.atkop(e,tp,eg,ep,ev,re,r,rp)
local c=e:GetHandler()
if not c:IsRelateToEffect(e) then return false end
if not Duel.IsExistingMatchingCard(c1200024.tgfilter,tp,LOCATION_MZONE,LOCATION_MZONE,1,nil) then return false end
local g=Duel.GetMatchingGroup(c1200024.tgfilter,tp,LOCATION_MZONE,LOCATION_MZONE,nil)
local tc=g:GetFirst()
while tc do
local e3=Effect.CreateEffect(c)
e3:SetType(EFFECT_TYPE_SINGLE)
e3:SetCode(EFFECT_UPDATE_ATTACK)
e3:SetReset(RESET_EVENT+0x1fe0000)
e3:SetValue(-500)
tc:RegisterEffect(e3)
tc=g:GetNext()
end
local g=Duel.GetMatchingGroup(c1200024.tgfilter2,tp,LOCATION_MZONE,LOCATION_MZONE,nil)
local tc=g:GetFirst()
while tc do
local e3=Effect.CreateEffect(c)
e3:SetType(EFFECT_TYPE_SINGLE)
e3:SetCode(EFFECT_UPDATE_LEVEL)
e3:SetReset(RESET_EVENT+0x1fe0000)
e3:SetValue(1)
tc:RegisterEffect(e3)
tc=g:GetNext()
end
end
function c1200024.spcon(e,tp,eg,ep,ev,re,r,rp)
local at=Duel.GetAttacker()
return at:GetControler()~=tp and Duel.GetAttackTarget()==nil
end
function c1200024.sptg(e,tp,eg,ep,ev,re,r,rp,chk)
local c=e:GetHandler()
if chk==0 then return Duel.GetLocationCount(tp,LOCATION_MZONE)>0
and c:IsCanBeSpecialSummoned(e,0,tp,false,false) end
Duel.SetOperationInfo(0,CATEGORY_SPECIAL_SUMMON,c,1,0,0)
end
function c1200024.spop(e,tp,eg,ep,ev,re,r,rp)
local c=e:GetHandler()
if not c:IsRelateToEffect(e) then return false end
if Duel.SpecialSummon(c,0,tp,tp,false,false,POS_FACEUP)~=0 then
local e1=Effect.CreateEffect(c)
e1:SetType(EFFECT_TYPE_SINGLE+EFFECT_TYPE_CONTINUOUS)
e1:SetCode(EVENT_LEAVE_FIELD)
e1:SetOperation(c1200024.tgop)
c:RegisterEffect(e1)
end
end
function c1200024.tgop(e,tp,eg,ep,ev,re,r,rp)
e:Reset()
Duel.SendtoGrave(e:GetHandler(),REASON_EFFECT)
end
function c1200024.thcfilter(c)
return c:IsSetCard(0xfba) and c:IsFaceup()
end
function c1200024.thcon(e,tp,eg,ep,ev,re,r,rp)
return Duel.IsExistingMatchingCard(c1200024.thcfilter,tp,LOCATION_MZONE,LOCATION_MZONE,1,nil)
end
function c1200024.thfilter(c)
return c:IsSetCard(0xfbc) and c:IsAbleToHand()
end
function c1200024.cost2(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 c1200024.thtg(e,tp,eg,ep,ev,re,r,rp,chk)
if chk==0 then return Duel.IsExistingMatchingCard(c1200024.thfilter,tp,LOCATION_DECK,0,1,nil) end
Duel.SetOperationInfo(0,CATEGORY_TOHAND,nil,1,tp,LOCATION_DECK)
end
function c1200024.thop(e,tp,eg,ep,ev,re,r,rp)
if Duel.IsExistingMatchingCard(c1200024.thfilter,tp,LOCATION_DECK,0,1,nil) then
Duel.Hint(HINT_SELECTMSG,tp,HINTMSG_ATOHAND)
local g=Duel.SelectMatchingCard(tp,c1200024.thfilter,tp,LOCATION_DECK,0,1,1,nil)
Duel.SendtoHand(g,nil,REASON_EFFECT)
Duel.ConfirmCards(1-tp,g)
end
end
function c1200024.cost(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 c1200024.tdfilter(c,e,tp)
return c:IsSetCard(0xfba) and c:IsType(TYPE_MONSTER) and c:IsAbleToDeck()
end
function c1200024.target(e,tp,eg,ep,ev,re,r,rp,chk)
if chk==0 then return Duel.IsExistingMatchingCard(c1200024.tdfilter,tp,LOCATION_GRAVE+LOCATION_REMOVED,0,1,e:GetHandler()) and Duel.IsPlayerCanDraw(tp,1) end
Duel.SetOperationInfo(0,CATEGORY_TODECK,nil,nil,tp,LOCATION_GRAVE+LOCATION_REMOVED)
Duel.SetOperationInfo(0,CATEGORY_DRAW,nil,1,tp,nil)
end
function c1200024.activate(e,tp,eg,ep,ev,re,r,rp)
if not Duel.IsExistingMatchingCard(c1200024.tdfilter,tp,LOCATION_GRAVE+LOCATION_REMOVED,0,1,e:GetHandler()) then return false end
Duel.Hint(HINT_SELECTMSG,tp,HINTMSG_TODECK)
local g=Duel.SelectMatchingCard(tp,c1200024.tdfilter,tp,LOCATION_GRAVE+LOCATION_REMOVED,0,1,5,e:GetHandler())
if Duel.SendtoDeck(g,nil,2,REASON_EFFECT)>0 then
Duel.ShuffleDeck(tp)
Duel.Draw(tp,1,REASON_EFFECT)
end
end
\ No newline at end of file
--LA SY 六耀的卡蓮思特
function c1200025.initial_effect(c)
--special summon
local e4=Effect.CreateEffect(c)
e4:SetDescription(aux.Stringid(1200025,0))
e4:SetCategory(CATEGORY_SPECIAL_SUMMON)
e4:SetType(EFFECT_TYPE_IGNITION)
e4:SetRange(LOCATION_HAND)
e4:SetCountLimit(1,1200025)
e4:SetCondition(c1200025.spcon)
e4:SetTarget(c1200025.sptg)
e4:SetOperation(c1200025.spop)
c:RegisterEffect(e4)
--special summon
local e2=Effect.CreateEffect(c)
e2:SetDescription(aux.Stringid(1200025,1))
e2:SetCategory(CATEGORY_SPECIAL_SUMMON)
e2:SetType(EFFECT_TYPE_SINGLE+EFFECT_TYPE_TRIGGER_O)
e2:SetCode(EVENT_SUMMON_SUCCESS)
e2:SetProperty(EFFECT_FLAG_DELAY)
e2:SetCountLimit(1)
e2:SetCondition(c1200025.spcon1)
e2:SetTarget(c1200025.sptg1)
e2:SetOperation(c1200025.spop1)
c:RegisterEffect(e2)
--Activate
local e1=Effect.CreateEffect(c)
e1:SetDescription(aux.Stringid(1200025,2))
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_GRAVE)
e1:SetCountLimit(1,1200025)
e1:SetCondition(c1200025.condition)
e1:SetTarget(c1200025.target)
e1:SetOperation(c1200025.operation)
c:RegisterEffect(e1)
--atk change
local e2=Effect.CreateEffect(c)
e2:SetDescription(aux.Stringid(1200025,3))
e2:SetCategory(CATEGORY_ATKCHANGE)
e2:SetType(EFFECT_TYPE_SINGLE+EFFECT_TYPE_TRIGGER_O)
e2:SetCode(EVENT_SPSUMMON_SUCCESS)
e2:SetProperty(EFFECT_FLAG_DELAY)
e2:SetCountLimit(1)
e2:SetTarget(c1200025.atktg)
e2:SetOperation(c1200025.atkop)
c:RegisterEffect(e2)
end
function c1200025.spfilter(c)
return c:IsSetCard(0xfba) and c:IsType(TYPE_MONSTER) and c:IsFaceup()
end
function c1200025.spcon(e,tp,eg,ep,ev,re,r,rp)
local g=Duel.GetMatchingGroup(c1200025.spfilter,tp,LOCATION_GRAVE+LOCATION_MZONE+LOCATION_EXTRA,0,nil)
local ct=g:GetClassCount(Card.GetAttribute)
return ct>5
end
function c1200025.sptg(e,tp,eg,ep,ev,re,r,rp,chk)
local c=e:GetHandler()
if chk==0 then return Duel.GetLocationCount(tp,LOCATION_MZONE)>0
and c:IsCanBeSpecialSummoned(e,0,tp,false,false) end
Duel.SetOperationInfo(0,CATEGORY_SPECIAL_SUMMON,c,1,0,0)
end
function c1200025.spop(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
local m=Duel.GetMatchingGroupCount(c1200025.spfilter,tp,LOCATION_GRAVE,0,nil)
local e3=Effect.CreateEffect(c)
e3:SetType(EFFECT_TYPE_SINGLE)
e3:SetCode(EFFECT_SET_ATTACK_FINAL)
e3:SetReset(RESET_EVENT+0x1fe0000)
e3:SetValue(m*300)
c:RegisterEffect(e3)
local e4=Effect.CreateEffect(c)
e4:SetType(EFFECT_TYPE_SINGLE)
e4:SetCode(EFFECT_CHANGE_LEVEL_FINAL)
e4:SetValue(9)
c:RegisterEffect(e4)
Duel.BreakEffect()
local g=Duel.GetMatchingGroup(Card.IsCanTurnSet,tp,LOCATION_MZONE,LOCATION_MZONE,e:GetHandler())
Duel.ChangePosition(g,POS_FACEDOWN_DEFENSE)
end
end
end
function c1200025.spcon1(e,tp,eg,ep,ev,re,r,rp)
return e:GetHandler():IsSummonType(SUMMON_TYPE_ADVANCE)
end
function c1200025.spfilter1(c,e,tp)
return c:IsSetCard(0xfba) and c:IsCanBeSpecialSummoned(e,0,tp,false,false) and c:IsLevelBelow(3)
end
function c1200025.sptg1(e,tp,eg,ep,ev,re,r,rp,chk)
if chk==0 then return Duel.GetLocationCount(tp,LOCATION_MZONE)>0 and Duel.IsExistingMatchingCard(c1200025.spfilter1,tp,LOCATION_DECK,0,1,nil,e,tp) end
Duel.SetOperationInfo(0,CATEGORY_SPECIAL_SUMMON,nil,1,tp,LOCATION_DECK)
end
function c1200025.spop1(e,tp,eg,ep,ev,re,r,rp)
local g=Duel.GetMatchingGroup(c1200025.spfilter1,tp,LOCATION_DECK,0,nil,e,tp)
Duel.Hint(HINT_SELECTMSG,tp,HINTMSG_SPSUMMON)
local tg=g:Select(tp,1,1,nil)
local tc=tg:GetFirst()
if Duel.SpecialSummon(tc,0,tp,tp,false,false,POS_FACEUP)>0 then
local e1=Effect.CreateEffect(e:GetHandler())
e1:SetType(EFFECT_TYPE_FIELD+EFFECT_TYPE_CONTINUOUS)
e1:SetRange(LOCATION_MZONE)
e1:SetCode(EVENT_PHASE+PHASE_END)
e1:SetReset(RESET_EVENT+0x1fe0000+RESET_PHASE+PHASE_END)
e1:SetLabelObject(tc)
e1:SetCountLimit(1)
e1:SetOperation(c1200025.desop)
tc:RegisterEffect(e1)
end
end
function c1200025.desop(e,tp,eg,ep,ev,re,r,rp)
Duel.SendtoHand(e:GetLabelObject(),nil,REASON_EFFECT)
end
function c1200025.cfilter(c,tp)
return c:GetPreviousControler()==tp and c:IsPreviousLocation(LOCATION_MZONE)
end
function c1200025.condition(e,tp,eg,ep,ev,re,r,rp)
return eg:IsExists(c1200025.cfilter,1,nil,tp)
end
function c1200025.target(e,tp,eg,ep,ev,re,r,rp,chk)
if chk==0 then return Duel.GetLocationCount(tp,LOCATION_MZONE)>0
and e:GetHandler():IsCanBeSpecialSummoned(e,0,tp,false,false) end
Duel.SetOperationInfo(0,CATEGORY_SPECIAL_SUMMON,e:GetHandler(),1,tp,LOCATION_GRAVE)
end
function c1200025.operation(e,tp,eg,ep,ev,re,r,rp)
if Duel.GetLocationCount(tp,LOCATION_MZONE)<=0 then return end
Duel.SpecialSummon(e:GetHandler(),0,tp,tp,false,false,POS_FACEUP)
end
function c1200025.atkfilter(c)
return c:IsFaceup()
end
function c1200025.atktg(e,tp,eg,ep,ev,re,r,rp,chk)
if chk==0 then return Duel.IsExistingMatchingCard(c1200025.atkfilter,tp,LOCATION_MZONE,LOCATION_MZONE,1,e:GetHandler()) end
end
function c1200025.atkop(e,tp,eg,ep,ev,re,r,rp)
local g=Duel.SelectMatchingCard(tp,c1200025.atkfilter,tp,LOCATION_MZONE,LOCATION_MZONE,1,1,e:GetHandler())
g:AddCard(e:GetHandler())
local tc=g:GetFirst()
while tc do
local e1=Effect.CreateEffect(e:GetHandler())
e1:SetType(EFFECT_TYPE_SINGLE)
e1:SetCode(EFFECT_SET_ATTACK_FINAL)
e1:SetValue(0)
e1:SetReset(RESET_EVENT+0x1fe0000)
tc:RegisterEffect(e1)
tc=g:GetNext()
end
end
--LA SY 赤口的斯卡雷特
function c1200026.initial_effect(c)
--pendulum summon
aux.EnablePendulumAttribute(c)
--destroy
local e2=Effect.CreateEffect(c)
e2:SetDescription(aux.Stringid(1200026,0))
e2:SetCategory(CATEGORY_RELEASE)
e2:SetType(EFFECT_TYPE_QUICK_O)
e2:SetCode(EVENT_FREE_CHAIN)
e2:SetRange(LOCATION_PZONE)
e2:SetProperty(EFFECT_FLAG_NO_TURN_RESET)
e2:SetCountLimit(1)
e2:SetTarget(c1200026.sctg)
e2:SetOperation(c1200026.scop)
c:RegisterEffect(e2)
--indes
local e2=Effect.CreateEffect(c)
e2:SetType(EFFECT_TYPE_SINGLE)
e2:SetProperty(EFFECT_FLAG_SINGLE_RANGE)
e2:SetRange(LOCATION_PZONE)
e2:SetCode(EFFECT_INDESTRUCTABLE_EFFECT)
e2:SetValue(c1200026.efilter)
c:RegisterEffect(e2)
--synlimit
local e0=Effect.CreateEffect(c)
e0:SetType(EFFECT_TYPE_SINGLE)
e0:SetCode(EFFECT_CANNOT_BE_SYNCHRO_MATERIAL)
e0:SetProperty(EFFECT_FLAG_CANNOT_DISABLE+EFFECT_FLAG_UNCOPYABLE)
e0:SetValue(c1200026.synlimit)
c:RegisterEffect(e0)
--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,1200026)
e1:SetCondition(c1200026.spcon)
c:RegisterEffect(e1)
--pendulum
local e6=Effect.CreateEffect(c)
e6:SetDescription(aux.Stringid(1200026,3))
e6:SetType(EFFECT_TYPE_SINGLE+EFFECT_TYPE_TRIGGER_O)
e6:SetCode(EVENT_DESTROYED)
e6:SetProperty(EFFECT_FLAG_DELAY)
e6:SetCondition(c1200026.pencon)
e6:SetTarget(c1200026.pentg)
e6:SetOperation(c1200026.penop)
c:RegisterEffect(e6)
end
function c1200026.efilter(e,te)
return te:GetHandlerPlayer()~=e:GetHandlerPlayer() and te:IsActiveType(TYPE_MONSTER)
end
function c1200026.synlimit(e,c)
if not c then return false end
return not c:IsSetCard(0xfba)
end
function c1200026.tgfilter(c)
return c:IsReleasable() and c:IsSetCard(0xfba) and c:IsType(TYPE_MONSTER)
end
function c1200026.sctg(e,tp,eg,ep,ev,re,r,rp,chk,chkc)
if chk==0 then return Duel.IsExistingMatchingCard(c1200026.tgfilter,tp,LOCATION_DECK,0,1,nil) end
end
function c1200026.scop(e,tp,eg,ep,ev,re,r,rp)
local c=e:GetHandler()
if not c:IsRelateToEffect(e) then return end
local g=Duel.SelectMatchingCard(tp,c1200026.tgfilter,tp,LOCATION_DECK,0,1,1,nil)
local tc=g:GetFirst()
if tc then
if Duel.SendtoGrave(tc,REASON_RELEASE+REASON_EFFECT)>0 then
Duel.BreakEffect()
local e1=Effect.CreateEffect(c)
e1:SetType(EFFECT_TYPE_SINGLE)
e1:SetCode(EFFECT_UPDATE_LSCALE)
e1:SetValue(tc:GetLevel())
e1:SetReset(RESET_EVENT+0x1ff0000)
c:RegisterEffect(e1)
local e2=e1:Clone()
e2:SetCode(EFFECT_UPDATE_RSCALE)
c:RegisterEffect(e2)
end
end
end
function c1200026.filter(c)
return c:IsFaceup() and c:IsDisabled()
end
function c1200026.spcon(e,c)
if c==nil then return true end
return Duel.GetLocationCount(c:GetControler(),LOCATION_MZONE)>0
and Duel.IsExistingMatchingCard(c1200026.filter,c:GetControler(),LOCATION_ONFIELD,LOCATION_ONFIELD,1,nil)
end
function c1200026.pencon(e,tp,eg,ep,ev,re,r,rp)
local c=e:GetHandler()
return c:IsPreviousLocation(LOCATION_MZONE) and c:IsFaceup()
end
function c1200026.pentg(e,tp,eg,ep,ev,re,r,rp,chk)
if chk==0 then return Duel.CheckLocation(tp,LOCATION_PZONE,0) or Duel.CheckLocation(tp,LOCATION_PZONE,1) end
end
function c1200026.penop(e,tp,eg,ep,ev,re,r,rp)
if not Duel.CheckLocation(tp,LOCATION_PZONE,0) and not Duel.CheckLocation(tp,LOCATION_PZONE,1) then return end
local c=e:GetHandler()
if c:IsRelateToEffect(e) then
Duel.MoveToField(c,tp,tp,LOCATION_SZONE,POS_FACEUP,true)
end
end
--LA SY 先勝的菲斯特文
function c1200027.initial_effect(c)
--pendulum summon
aux.EnablePendulumAttribute(c)
--Activate
local e1=Effect.CreateEffect(c)
e1:SetDescription(aux.Stringid(1200027,0))
e1:SetProperty(EFFECT_FLAG_CARD_TARGET)
e1:SetType(EFFECT_TYPE_IGNITION)
e1:SetRange(LOCATION_PZONE)
e1:SetCountLimit(1)
e1:SetTarget(c1200027.target)
e1:SetOperation(c1200027.activate)
c:RegisterEffect(e1)
--draw
local e1=Effect.CreateEffect(c)
e1:SetDescription(aux.Stringid(1200027,1))
e1:SetCategory(CATEGORY_DRAW+CATEGORY_RELEASE)
e1:SetProperty(EFFECT_FLAG_CARD_TARGET)
e1:SetType(EFFECT_TYPE_IGNITION)
e1:SetRange(LOCATION_PZONE)
e1:SetCountLimit(1,1200027+EFFECT_COUNT_CODE_DUEL)
e1:SetTarget(c1200027.target2)
e1:SetOperation(c1200027.activate2)
c:RegisterEffect(e1)
--indes
local e2=Effect.CreateEffect(c)
e2:SetType(EFFECT_TYPE_SINGLE)
e2:SetProperty(EFFECT_FLAG_SINGLE_RANGE)
e2:SetRange(LOCATION_PZONE)
e2:SetCode(EFFECT_INDESTRUCTABLE_EFFECT)
e2:SetValue(c1200027.efilter)
c:RegisterEffect(e2)
--synlimit
local e0=Effect.CreateEffect(c)
e0:SetType(EFFECT_TYPE_SINGLE)
e0:SetCode(EFFECT_CANNOT_BE_SYNCHRO_MATERIAL)
e0:SetProperty(EFFECT_FLAG_CANNOT_DISABLE+EFFECT_FLAG_UNCOPYABLE)
e0:SetValue(c1200027.synlimit)
c:RegisterEffect(e0)
--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:SetCondition(c1200027.spcon)
c:RegisterEffect(e1)
--effect gain
local e1=Effect.CreateEffect(c)
e1:SetType(EFFECT_TYPE_SINGLE+EFFECT_TYPE_CONTINUOUS)
e1:SetCode(EVENT_BE_MATERIAL)
e1:SetCondition(c1200027.efcon)
e1:SetOperation(c1200027.efop)
c:RegisterEffect(e1)
end
function c1200027.efilter(e,te)
return te:GetHandlerPlayer()~=e:GetHandlerPlayer() and te:IsActiveType(TYPE_MONSTER)
end
function c1200027.synlimit(e,c)
if not c then return false end
return not c:IsSetCard(0xfba)
end
function c1200027.filter(c)
return c:IsSetCard(0xfbc) and c:IsType(TYPE_CONTINUOUS)
end
function c1200027.target(e,tp,eg,ep,ev,re,r,rp,chk,chkc)
if chkc then return chkc:IsLocation(LOCATION_GRAVE) and chkc:IsControler(tp) and c1200027.filter(chkc) end
if chk==0 then return Duel.GetLocationCount(tp,LOCATION_SZONE)>0
and Duel.IsExistingTarget(c1200027.filter,tp,LOCATION_GRAVE,0,1,nil) end
local g=Duel.SelectTarget(tp,c1200027.filter,tp,LOCATION_GRAVE,0,1,1,nil)
end
function c1200027.activate(e,tp,eg,ep,ev,re,r,rp)
local c=e:GetHandler()
if not c:IsRelateToEffect(e) then return false end
if Duel.GetLocationCount(tp,LOCATION_SZONE)<=0 then return false end
local tc=Duel.GetFirstTarget()
if tc:IsRelateToEffect(e) then
Duel.MoveToField(tc,tp,tp,LOCATION_SZONE,POS_FACEUP,true)
Duel.RaiseEvent(tc,EVENT_CHAIN_SOLVED,tc:GetActivateEffect(),0,tp,tp,Duel.GetCurrentChain())
end
end
function c1200027.filter2(c)
return c:IsFaceup() and c:IsReleasable() and ((c:IsSetCard(0xfbc) and (c:IsType(TYPE_SPELL) or c:IsType(TYPE_TRAP))) or (c:IsType(TYPE_MONSTER) and c:IsSetCard(0xfba)))
end
function c1200027.target2(e,tp,eg,ep,ev,re,r,rp,chk,chkc)
if chkc then return chkc:IsLocation(LOCATION_ONFIELD) and chkc:IsControler(tp) and c1200027.filter2(chkc) end
if chk==0 then return Duel.IsPlayerCanDraw(tp,1) and Duel.IsExistingTarget(c1200027.filter2,tp,LOCATION_ONFIELD,0,1,nil) end
local g=Duel.SelectTarget(tp,c1200027.filter2,tp,LOCATION_ONFIELD,0,1,99,nil)
Duel.SetOperationInfo(0,CATEGORY_RELEASE,g,g:GetCount(),0,0)
Duel.SetOperationInfo(0,CATEGORY_DRAW,0,0,tp,0)
end
function c1200027.activate2(e,tp,eg,ep,ev,re,r,rp)
local c=e:GetHandler()
if not c:IsRelateToEffect(e) then return false end
local g=Duel.GetChainInfo(0,CHAININFO_TARGET_CARDS)
local m=g:GetCount()
if Duel.Draw(tp,m,REASON_EFFECT) then
Duel.BreakEffect()
Duel.Release(g,REASON_EFFECT)
end
end
function c1200027.spcon(e,c)
if c==nil then return true end
return Duel.GetFieldGroupCount(c:GetControler(),LOCATION_MZONE,0)==0
and Duel.GetLocationCount(c:GetControler(),LOCATION_MZONE)>0
end
function c1200027.efcon(e,tp,eg,ep,ev,re,r,rp)
return r==REASON_XYZ
end
function c1200027.efop(e,tp,eg,ep,ev,re,r,rp)
local c=e:GetHandler()
local rc=c:GetReasonCard()
local e1=Effect.CreateEffect(rc)
e1:SetDescription(aux.Stringid(1200027,0))
e1:SetCategory(CATEGORY_ATKCHANGE)
e1:SetType(EFFECT_TYPE_SINGLE+EFFECT_TYPE_TRIGGER_F)
e1:SetCode(EVENT_SPSUMMON_SUCCESS)
e1:SetCondition(c1200027.atkcon)
e1:SetOperation(c1200027.atkop)
e1:SetReset(RESET_EVENT+0x1fe0000)
rc:RegisterEffect(e1,true)
if not rc:IsType(TYPE_EFFECT) then
local e2=Effect.CreateEffect(c)
e2:SetType(EFFECT_TYPE_SINGLE)
e2:SetCode(EFFECT_ADD_TYPE)
e2:SetValue(TYPE_EFFECT)
e2:SetReset(RESET_EVENT+0x1fe0000)
rc:RegisterEffect(e2,true)
end
end
function c1200027.atkcon(e,tp,eg,ep,ev,re,r,rp)
return e:GetHandler():IsSummonType(SUMMON_TYPE_XYZ)
end
function c1200027.atkop(e,tp,eg,ep,ev,re,r,rp)
local c=e:GetHandler()
if c:IsRelateToEffect(e) and c:IsFaceup() then
local e1=Effect.CreateEffect(c)
e1:SetType(EFFECT_TYPE_SINGLE)
e1:SetCode(EFFECT_UPDATE_ATTACK)
e1:SetValue(1000)
e1:SetReset(RESET_EVENT+0x1ff0000)
c:RegisterEffect(e1)
end
end
--靜儀式 愛麗絲の万花鏡
function c1200031.initial_effect(c)
--Activate
local e1=Effect.CreateEffect(c)
e1:SetType(EFFECT_TYPE_ACTIVATE)
e1:SetCode(EVENT_FREE_CHAIN)
c:RegisterEffect(e1)
--tohand
local e2=Effect.CreateEffect(c)
e2:SetDescription(aux.Stringid(1200031,0))
e2:SetCategory(CATEGORY_RELEASE+CATEGORY_TOHAND+CATEGORY_SEARCH)
e2:SetType(EFFECT_TYPE_QUICK_O)
e2:SetCode(EVENT_FREE_CHAIN)
e2:SetRange(LOCATION_SZONE)
e2:SetCountLimit(1,1200031)
e2:SetCondition(c1200031.sccon)
e2:SetTarget(c1200031.sctg)
e2:SetOperation(c1200031.scop)
c:RegisterEffect(e2)
--SpecialSummon
local e3=Effect.CreateEffect(c)
e3:SetDescription(aux.Stringid(1200031,1))
e3:SetCategory(CATEGORY_RELEASE+CATEGORY_SPECIAL_SUMMON)
e3:SetType(EFFECT_TYPE_QUICK_O)
e3:SetCode(EVENT_FREE_CHAIN)
e3:SetRange(LOCATION_SZONE)
e3:SetCountLimit(1,1200031)
e3:SetCondition(c1200031.spcon)
e3:SetTarget(c1200031.sptg)
e3:SetOperation(c1200031.spop)
c:RegisterEffect(e3)
end
function c1200031.sccon(e,tp,eg,ep,ev,re,r,rp)
return Duel.GetCurrentPhase()==PHASE_MAIN1 or Duel.GetCurrentPhase()==PHASE_MAIN2
end
function c1200031.scfilter(c)
return c:IsSetCard(0xfba) and c:IsType(TYPE_MONSTER) and c:IsReleasable()
end
function c1200031.sctg(e,tp,eg,ep,ev,re,r,rp,chk,chkc)
if chk==0 then return Duel.IsExistingMatchingCard(c1200031.scfilter,tp,LOCATION_HAND,0,1,nil) end
Duel.SetOperationInfo(0,CATEGORY_TOHAND,nil,1,0,LOCATION_DECK)
end
function c1200031.thfilter(c,att,rec)
return c:IsSetCard(0xfba) and c:IsType(TYPE_MONSTER) and c:IsAbleToHand() and (c:IsAttribute(att) or c:IsRace(rec))
end
function c1200031.scop(e,tp,eg,ep,ev,re,r,rp,chk,chkc)
if not Duel.IsExistingMatchingCard(c1200031.scfilter,tp,LOCATION_HAND,0,1,nil) then return false end
local g=Duel.SelectMatchingCard(tp,c1200031.scfilter,tp,LOCATION_HAND,0,1,1,nil)
local tc=g:GetFirst()
if tc then
local rec=tc:GetRace()
local att=tc:GetAttribute()
if Duel.Release(tc,REASON_EFFECT)>0 and Duel.IsExistingMatchingCard(c1200031.thfilter,tp,LOCATION_DECK,0,1,nil,att,rec) then
if Duel.SelectYesNo(tp,aux.Stringid(1200031,2)) then
Duel.BreakEffect()
local sg=Duel.SelectMatchingCard(tp,c1200031.thfilter,tp,LOCATION_DECK,0,1,1,nil,att,rec)
Duel.SendtoHand(sg,nil,REASON_EFFECT)
Duel.ConfirmCards(1-tp,sg)
end
end
end
end
function c1200031.spcon(e,tp,eg,ep,ev,re,r,rp)
return Duel.GetCurrentPhase()==PHASE_MAIN1 or Duel.GetCurrentPhase()==PHASE_MAIN2
end
function c1200031.spcfilter(c)
return c:IsSetCard(0xfba) and c:IsType(TYPE_MONSTER) and c:IsReleasable()
end
function c1200031.sptg(e,tp,eg,ep,ev,re,r,rp,chk,chkc)
if chk==0 then return Duel.IsExistingMatchingCard(c1200031.spcfilter,tp,LOCATION_MZONE,0,1,nil) end
Duel.SetOperationInfo(0,CATEGORY_SPECIAL_SUMMON,nil,1,0,LOCATION_DECK)
end
function c1200031.spfilter(c,e,tp,atk)
return c:IsSetCard(0xfba) and c:IsType(TYPE_MONSTER) and c:IsCanBeSpecialSummoned(e,0,tp,false,false)
end
function c1200031.spop(e,tp,eg,ep,ev,re,r,rp,chk,chkc)
if not Duel.IsExistingMatchingCard(c1200031.spcfilter,tp,LOCATION_MZONE,0,1,nil) then return false end
local g=Duel.SelectMatchingCard(tp,c1200031.spcfilter,tp,LOCATION_MZONE,0,1,1,nil)
local tc=g:GetFirst()
if tc then
local atk=tc:GetBaseAttack()
if Duel.Release(tc,REASON_EFFECT)>0 and Duel.IsExistingMatchingCard(c1200031.spfilter,tp,LOCATION_DECK,0,1,nil,e,tp,atk) then
if Duel.SelectYesNo(tp,aux.Stringid(1200031,3)) then
Duel.BreakEffect()
local sg=Duel.SelectMatchingCard(tp,c1200031.spfilter,tp,LOCATION_DECK,0,1,1,nil,e,tp,atk)
Duel.SpecialSummon(sg,0,tp,tp,false,false,POS_FACEUP)
end
end
end
end
--靜儀式 靈核結晶
function c1200032.initial_effect(c)
--Activate
local e1=Effect.CreateEffect(c)
e1:SetDescription(aux.Stringid(1200032,0))
e1:SetCategory(CATEGORY_EQUIP)
e1:SetType(EFFECT_TYPE_ACTIVATE)
e1:SetCode(EVENT_FREE_CHAIN)
e1:SetProperty(EFFECT_FLAG_CARD_TARGET)
e1:SetTarget(c1200032.target)
e1:SetOperation(c1200032.operation)
c:RegisterEffect(e1)
--Equip limit
local e3=Effect.CreateEffect(c)
e3:SetType(EFFECT_TYPE_SINGLE)
e3:SetCode(EFFECT_EQUIP_LIMIT)
e3:SetProperty(EFFECT_FLAG_CANNOT_DISABLE)
e3:SetValue(c1200032.eqlimit)
c:RegisterEffect(e3)
--adup
local e4=Effect.CreateEffect(c)
e4:SetType(EFFECT_TYPE_EQUIP)
e4:SetProperty(EFFECT_FLAG_SINGLE_RANGE)
e4:SetRange(LOCATION_SZONE)
e4:SetCode(EFFECT_UPDATE_ATTACK)
e4:SetCondition(c1200032.adcon)
e4:SetValue(c1200032.atkval)
c:RegisterEffect(e4)
--tohand
local e4=Effect.CreateEffect(c)
e4:SetType(EFFECT_TYPE_IGNITION)
e4:SetCategory(CATEGORY_TOHAND)
e4:SetRange(LOCATION_SZONE)
e4:SetCondition(c1200032.thcon)
e4:SetTarget(c1200032.thtg)
e4:SetOperation(c1200032.thop)
c:RegisterEffect(e4)
--betuner
local e4=Effect.CreateEffect(c)
e4:SetType(EFFECT_TYPE_EQUIP)
e4:SetCategory(CATEGORY_TOHAND)
e4:SetRange(LOCATION_SZONE)
e4:SetCode(EFFECT_ADD_TYPE)
e4:SetValue(TYPE_TUNER)
e4:SetCondition(c1200032.tuncon)
c:RegisterEffect(e4)
--spsummon
local e2=Effect.CreateEffect(c)
e2:SetCategory(CATEGORY_SPECIAL_SUMMON)
e2:SetType(EFFECT_TYPE_SINGLE+EFFECT_TYPE_CONTINUOUS)
e2:SetProperty(EFFECT_FLAG_DAMAGE_STEP)
e2:SetCode(EVENT_TO_GRAVE)
e2:SetCondition(c1200032.spcon)
e2:SetTarget(c1200032.sptg)
e2:SetOperation(c1200032.spop)
c:RegisterEffect(e2)
end
function c1200032.filter(c)
return c:IsFaceup() and c:IsSetCard(0xfba)
end
function c1200032.target(e,tp,eg,ep,ev,re,r,rp,chk,chkc)
if chkc then return chkc:IsLocation(LOCATION_MZONE) and c1200032.filter(chkc) end
if chk==0 then return Duel.IsExistingTarget(c1200032.filter,tp,LOCATION_MZONE,LOCATION_MZONE,1,nil) end
Duel.Hint(HINT_SELECTMSG,tp,HINTMSG_EQUIP)
Duel.SelectTarget(tp,c1200032.filter,tp,LOCATION_MZONE,LOCATION_MZONE,1,1,nil)
Duel.SetOperationInfo(0,CATEGORY_EQUIP,e:GetHandler(),1,0,0)
end
function c1200032.operation(e,tp,eg,ep,ev,re,r,rp)
local tc=Duel.GetFirstTarget()
if e:GetHandler():IsRelateToEffect(e) and tc:IsRelateToEffect(e) and tc:IsFaceup() then
Duel.Equip(tp,e:GetHandler(),tc)
end
end
function c1200032.eqlimit(e,c)
return c:IsSetCard(0xfba)
end
function c1200032.adcon(e)
local c=e:GetHandler()
local ph=Duel.GetCurrentPhase()
if not (ph==PHASE_DAMAGE or ph==PHASE_DAMAGE_CAL) then return false end
local a=Duel.GetAttacker()
local d=Duel.GetAttackTarget()
return ((a==e:GetHandler():GetEquipTarget() and d) or d==e:GetHandler():GetEquipTarget())
end
function c1200032.atkval(e,c)
local a=Duel.GetAttacker()
local d=Duel.GetAttackTarget()
if ((a==e:GetHandler():GetEquipTarget() and d) or d==e:GetHandler():GetEquipTarget()) then
local m1=a:GetLevel()
local m2=a:GetRank()
local n1=d:GetLevel()
local n2=d:GetRank()
return (m1+m2+n1+n2)*100
end
end
function c1200032.thcon(e)
return e:GetHandler():GetEquipTarget():IsRace(RACE_WARRIOR)
end
function c1200032.thtg(e,tp,eg,ep,ev,re,r,rp,chk,chkc)
if chk==0 then return e:GetHandler():IsAbleToHand() end
Duel.SetOperationInfo(0,CATEGORY_TOHAND,e:GetHandler(),1,0,0)
end
function c1200032.thop(e,tp,eg,ep,ev,re,r,rp,chk,chkc)
local c=e:GetHandler()
if not c:IsRelateToEffect(e) then return false end
Duel.SendtoHand(c,nil,REASON_EFFECT)
end
function c1200032.tuncon(e)
return e:GetHandler():GetEquipTarget():IsRace(RACE_BEASTWARRIOR)
end
function c1200032.spcon(e,tp,eg,ep,ev,re,r,rp)
local ec=e:GetHandler():GetPreviousEquipTarget()
return e:GetHandler():IsReason(REASON_LOST_TARGET) and e:GetHandler():IsLocation(LOCATION_GRAVE) and ec:IsRace(RACE_MACHINE) and not ec:IsLocation(LOCATION_ONFIELD+LOCATION_OVERLAY)
end
function c1200032.sptg(e,tp,eg,ep,ev,re,r,rp,chk)
if chk==0 then return Duel.GetLocationCount(tp,LOCATION_MZONE)>0
and e:GetHandler():GetPreviousEquipTarget():IsCanBeSpecialSummoned(e,0,tp,false,false) end
Duel.SetOperationInfo(0,CATEGORY_SPECIAL_SUMMON,e:GetHandler():GetPreviousEquipTarget(),1,0,0)
end
function c1200032.spop(e,tp,eg,ep,ev,re,r,rp)
Duel.SpecialSummon(e:GetHandler():GetPreviousEquipTarget(),0,tp,tp,false,false,POS_FACEUP)
end
\ No newline at end of file
--靜儀式 彩壇の神樂
function c1200033.initial_effect(c)
--Activate
local e1=Effect.CreateEffect(c)
e1:SetType(EFFECT_TYPE_ACTIVATE)
e1:SetCode(EVENT_FREE_CHAIN)
c:RegisterEffect(e1)
--indes
local e1=Effect.CreateEffect(c)
e1:SetDescription(aux.Stringid(1200033,0))
e1:SetType(EFFECT_TYPE_QUICK_O)
e1:SetCode(EVENT_CHAINING)
e1:SetRange(LOCATION_SZONE)
e1:SetCondition(c1200033.condition)
e1:SetCost(c1200033.cost)
e1:SetOperation(c1200033.operation)
c:RegisterEffect(e1)
--CopyEffect
local e1=Effect.CreateEffect(c)
e1:SetDescription(aux.Stringid(1200033,1))
e1:SetCategory(CATEGORY_TOHAND+CATEGORY_TOGRAVE)
e1:SetType(EFFECT_TYPE_IGNITION)
e1:SetCountLimit(1,1200033)
e1:SetRange(LOCATION_SZONE)
e1:SetProperty(EFFECT_FLAG_CARD_TARGET)
e1:SetTarget(c1200033.ttarget)
e1:SetOperation(c1200033.toperation)
c:RegisterEffect(e1)
end
function c1200033.cfilter(c)
return c:IsSetCard(0xfba) and c:IsReleasable()
end
function c1200033.condition(e,tp,eg,ep,ev,re,r,rp)
return ep~=tp
end
function c1200033.cost(e,tp,eg,ep,ev,re,r,rp,chk)
if chk==0 then return Duel.IsExistingMatchingCard(c1200033.cfilter,tp,LOCATION_MZONE+LOCATION_HAND,0,1,nil) end
local cg=Duel.SelectMatchingCard(tp,c1200033.cfilter,tp,LOCATION_MZONE+LOCATION_HAND,0,1,1,nil)
Duel.Release(cg,REASON_COST)
end
function c1200033.operation(e,tp,eg,ep,ev,re,r,rp)
local c=e:GetHandler()
if not c:IsRelateToEffect(e) then return false end
if Duel.NegateEffect(ev) then
local tc=eg:GetFirst()
--forbidden
local e1=Effect.CreateEffect(c)
e1:SetType(EFFECT_TYPE_FIELD)
e1:SetProperty(EFFECT_FLAG_SET_AVAILABLE+EFFECT_FLAG_IGNORE_RANGE)
e1:SetCode(EFFECT_FORBIDDEN)
e1:SetTarget(c1200033.bantg)
e1:SetLabelObject(tc)
Duel.RegisterEffect(e1,tp)
local e2=Effect.CreateEffect(c)
e2:SetType(EFFECT_TYPE_FIELD)
e2:SetCode(EFFECT_DISABLE)
e2:SetTargetRange(LOCATION_ONFIELD,LOCATION_ONFIELD)
e2:SetTarget(c1200033.bantg)
e2:SetLabelObject(tc)
Duel.RegisterEffect(e2,tp)
end
end
function c1200033.bantg(e,c)
return c==e:GetLabelObject()
end
function c1200033.tfilter(c)
return c:IsFaceup() and c:IsSetCard(0xfba)
end
function c1200033.tgfilter(c)
return c:IsAbleToGrave() and c:IsSetCard(0xfba)
end
function c1200033.ttarget(e,tp,eg,ep,ev,re,r,rp,chk,chkc)
if chkc then return chkc:IsLocation(LOCATION_MZONE) and chkc:IsControler(tp) and c1200033.tfilter(chkc) end
if chk==0 then return Duel.IsExistingTarget(c1200033.tfilter,tp,LOCATION_MZONE,0,1,nil) and Duel.IsExistingMatchingCard(c1200033.tgfilter,tp,LOCATION_DECK,0,1,nil) end
Duel.Hint(HINT_SELECTMSG,tp,HINTMSG_FACEUP)
local g=Duel.SelectTarget(tp,c1200033.tfilter,tp,LOCATION_MZONE,0,1,1,nil)
Duel.SetOperationInfo(0,CATEGORY_TOGRAVE,0,1,tp,LOCATION_DECK)
end
function c1200033.toperation(e,tp,eg,ep,ev,re,r,rp)
if not e:GetHandler():IsRelateToEffect(e) then return false end
local tc=Duel.GetFirstTarget()
if not Duel.IsExistingMatchingCard(c1200033.tgfilter,tp,LOCATION_DECK,0,1,nil) then return false end
local g=Duel.SelectMatchingCard(tp,c1200033.tgfilter,tp,LOCATION_DECK,0,1,1,nil)
local sc=g:GetFirst()
if Duel.SendtoGrave(sc,REASON_EFFECT)>0 and tc:IsFaceup() and tc:IsRelateToEffect(e) then
Duel.BreakEffect()
local code=sc:GetOriginalCode()
local e1=Effect.CreateEffect(e:GetHandler())
e1:SetType(EFFECT_TYPE_SINGLE)
e1:SetProperty(EFFECT_FLAG_CANNOT_DISABLE)
e1:SetReset(RESET_EVENT+0x1ff0000)
e1:SetCode(EFFECT_CHANGE_CODE)
e1:SetValue(code)
tc:RegisterEffect(e1)
tc:CopyEffect(code,RESET_EVENT+0x1fe0000)
local e1=Effect.CreateEffect(c)
e1:SetType(EFFECT_TYPE_SINGLE)
e1:SetCode(EFFECT_SET_ATTACK_FINAL)
e1:SetReset(RESET_EVENT+0xfe0000)
e1:SetValue(sc:GetAttack())
tc:RegisterEffect(e1)
local e1=Effect.CreateEffect(c)
e1:SetType(EFFECT_TYPE_SINGLE)
e1:SetCode(EFFECT_SET_DEFENSE_FINAL)
e1:SetReset(RESET_EVENT+0xfe0000)
e1:SetValue(sc:GetDefense())
tc:RegisterEffect(e1)
end
end
\ No newline at end of file
--靜儀式 記憶之海
function c1200034.initial_effect(c)
--Activate
local e1=Effect.CreateEffect(c)
e1:SetDescription(aux.Stringid(1200034,0))
e1:SetCategory(CATEGORY_DISABLE+CATEGORY_DESTROY)
e1:SetType(EFFECT_TYPE_ACTIVATE)
e1:SetCode(EVENT_CHAINING)
e1:SetCondition(c1200034.condition)
e1:SetTarget(c1200034.target)
e1:SetOperation(c1200034.activate)
c:RegisterEffect(e1)
--SpecialSummon
local e1=Effect.CreateEffect(c)
e1:SetDescription(aux.Stringid(1200034,1))
e1:SetCategory(CATEGORY_SPECIAL_SUMMON)
e1:SetType(EFFECT_TYPE_FIELD+EFFECT_TYPE_TRIGGER_O)
e1:SetCode(EVENT_LEAVE_FIELD)
e1:SetProperty(EFFECT_FLAG_DAMAGE_STEP+EFFECT_FLAG_DELAY)
e1:SetCountLimit(1,1200034)
e1:SetRange(LOCATION_SZONE)
e1:SetCondition(c1200034.con)
e1:SetTarget(c1200034.sptg)
e1:SetOperation(c1200034.spop)
c:RegisterEffect(e1)
end
function c1200034.filter(c,p)
return c:GetControler()==p and c:IsOnField() and (c:IsSetCard(0xfba) or c:IsSetCard(0xfbc)) and c:IsFaceup()
end
function c1200034.condition(e,tp,eg,ep,ev,re,r,rp)
if not Duel.IsChainNegatable(ev) then return false end
local ex,tg,tc=Duel.GetOperationInfo(ev,CATEGORY_DESTROY)
return ex and tg~=nil and tc+tg:FilterCount(c1200034.filter,nil,tp)-tg:GetCount()>1
end
function c1200034.target(e,tp,eg,ep,ev,re,r,rp,chk)
if chk==0 then return true end
Duel.SetOperationInfo(0,CATEGORY_DISABLE,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 c1200034.activate(e,tp,eg,ep,ev,re,r,rp)
local tc=re:GetHandler()
if not tc:IsDisabled() then
if Duel.NegateEffect(ev) then
Duel.Destroy(eg,REASON_EFFECT)
end
end
end
function c1200034.cfilter(c,tp)
return c:IsPreviousLocation(LOCATION_ONFIELD) and c:GetPreviousControler()==tp and c:IsPreviousPosition(POS_FACEUP)
and (c:IsReason(REASON_BATTLE) or (c:IsReason(REASON_EFFECT) and c:GetReasonPlayer()~=tp)) and (c:IsSetCard(0xfba) and c:IsType(TYPE_MONSTER))
end
function c1200034.con(e,tp,eg,ep,ev,re,r,rp)
return eg:IsExists(c1200034.cfilter,1,nil,tp)
end
function c1200034.spfilter(c,e,tp)
return c:IsType(TYPE_XYZ) and c:IsCanBeSpecialSummoned(e,SUMMON_TYPE_XYZ,tp,true,false,POS_FACEUP) and c:IsSetCard(0xfba)
end
function c1200034.sptg(e,tp,eg,ep,ev,re,r,rp,chk)
if chk==0 then return Duel.IsExistingMatchingCard(c1200034.spfilter,tp,LOCATION_EXTRA,0,1,nil,e,tp) and Duel.GetLocationCountFromEx(tp)>0 end
Duel.SetOperationInfo(0,CATEGORY_SPECIAL_SUMMON,nil,1,0,LOCATION_EXTRA)
end
function c1200034.spop(e,tp,eg,ep,ev,re,r,rp)
local c=e:GetHandler()
if not c:IsRelateToEffect(e) then return false end
if Duel.GetLocationCountFromEx(tp)<1 then return false end
if not Duel.IsExistingMatchingCard(c1200034.spfilter,tp,LOCATION_EXTRA,0,1,nil,e,tp) then return false end
local sg=Duel.SelectMatchingCard(tp,c1200034.spfilter,tp,LOCATION_EXTRA,0,1,1,nil,e,tp)
local sc=sg:GetFirst()
if sc then
if Duel.SpecialSummon(sc,SUMMON_TYPE_XYZ,tp,tp,true,false,POS_FACEUP)>0 then
Duel.Overlay(sc,Group.FromCards(c))
end
end
end
\ No newline at end of file
--靜儀式 鏡世界の七彩
function c1200035.initial_effect(c)
--Activate
local e1=Effect.CreateEffect(c)
e1:SetType(EFFECT_TYPE_ACTIVATE)
e1:SetCode(EVENT_FREE_CHAIN)
c:RegisterEffect(e1)
--SpecialSummon
local e1=Effect.CreateEffect(c)
e1:SetDescription(aux.Stringid(1200035,0))
e1:SetCategory(CATEGORY_SPECIAL_SUMMON+CATEGORY_FUSION_SUMMON)
e1:SetType(EFFECT_TYPE_IGNITION)
e1:SetRange(LOCATION_SZONE)
e1:SetCountLimit(1,1200035)
e1:SetTarget(c1200035.target)
e1:SetOperation(c1200035.activate)
c:RegisterEffect(e1)
end
function c1200035.filter0(c)
return c:IsType(TYPE_MONSTER) and c:IsCanBeFusionMaterial() and c:IsAbleToGrave()
end
function c1200035.filterx(c)
return c:IsType(TYPE_MONSTER) and c:IsCanBeFusionMaterial() and c:IsAbleToGrave() and c:IsFaceup()
end
function c1200035.filter1(c,e)
return not c:IsImmuneToEffect(e)
end
function c1200035.filter2(c,e,tp,m,f,chkf)
return c:IsType(TYPE_FUSION) and c:IsSetCard(0xfba) and (not f or f(c))
and c:IsCanBeSpecialSummoned(e,SUMMON_TYPE_FUSION,tp,false,false) and c:CheckFusionMaterial(m,nil,chkf)
end
function c1200035.cfilter(c)
return c:GetSummonLocation()==LOCATION_EXTRA
end
function c1200035.target(e,tp,eg,ep,ev,re,r,rp,chk)
if chk==0 then
local chkf=tp
local mg1=Duel.GetFusionMaterial(tp)
if Duel.IsExistingMatchingCard(c1200035.cfilter,tp,0,LOCATION_MZONE,1,nil) then
local mg2=Duel.GetMatchingGroup(c1200035.filterx,tp,LOCATION_EXTRA,0,nil)
mg1:Merge(mg2)
end
local res=Duel.IsExistingMatchingCard(c1200035.filter2,tp,LOCATION_EXTRA,0,1,nil,e,tp,mg1,nil,chkf)
if not res then
local ce=Duel.GetChainMaterial(tp)
if ce~=nil then
local fgroup=ce:GetTarget()
local mg3=fgroup(ce,e,tp)
local mf=ce:GetValue()
res=Duel.IsExistingMatchingCard(c1200035.filter2,tp,LOCATION_EXTRA,0,1,nil,e,tp,mg3,mf,chkf)
end
end
return res
end
Duel.SetOperationInfo(0,CATEGORY_SPECIAL_SUMMON,nil,1,tp,LOCATION_EXTRA)
end
function c1200035.activate(e,tp,eg,ep,ev,re,r,rp)
if not e:GetHandler():IsRelateToEffect(e) then return false end
local chkf=tp
local mg1=Duel.GetFusionMaterial(tp):Filter(c1200035.filter1,nil,e)
if Duel.IsExistingMatchingCard(c1200035.cfilter,tp,0,LOCATION_MZONE,1,nil) then
local mg2=Duel.GetMatchingGroup(c1200035.filterx,tp,LOCATION_EXTRA,0,nil)
mg1:Merge(mg2)
end
local sg1=Duel.GetMatchingGroup(c1200035.filter2,tp,LOCATION_EXTRA,0,nil,e,tp,mg1,nil,chkf)
local mg3=nil
local sg2=nil
local ce=Duel.GetChainMaterial(tp)
if ce~=nil then
local fgroup=ce:GetTarget()
mg3=fgroup(ce,e,tp)
local mf=ce:GetValue()
sg2=Duel.GetMatchingGroup(c1200035.filter2,tp,LOCATION_EXTRA,0,nil,e,tp,mg3,mf,chkf)
end
if sg1:GetCount()>0 or (sg2~=nil and sg2:GetCount()>0) then
local sg=sg1:Clone()
if sg2 then sg:Merge(sg2) end
Duel.Hint(HINT_SELECTMSG,tp,HINTMSG_SPSUMMON)
local tg=sg:Select(tp,1,1,nil)
local tc=tg:GetFirst()
if sg1:IsContains(tc) and (sg2==nil or not sg2:IsContains(tc) or not Duel.SelectYesNo(tp,ce:GetDescription())) then
local mat1=Duel.SelectFusionMaterial(tp,tc,mg1,nil,chkf)
tc:SetMaterial(mat1)
Duel.SendtoGrave(mat1,REASON_EFFECT+REASON_MATERIAL+REASON_FUSION)
Duel.BreakEffect()
Duel.SpecialSummon(tc,SUMMON_TYPE_FUSION,tp,tp,false,false,POS_FACEUP)
else
local mat2=Duel.SelectFusionMaterial(tp,tc,mg3,nil,chkf)
local fop=ce:GetOperation()
fop(ce,e,tp,tc,mat2)
end
tc:CompleteProcedure()
end
end
--靜儀式 鏡天城
function c1200036.initial_effect(c)
--Activate
local e1=Effect.CreateEffect(c)
e1:SetType(EFFECT_TYPE_ACTIVATE)
e1:SetCode(EVENT_FREE_CHAIN)
c:RegisterEffect(e1)
--tohand
local e4=Effect.CreateEffect(c)
e4:SetDescription(aux.Stringid(1200036,0))
e4:SetCategory(CATEGORY_SEARCH+CATEGORY_TOHAND+CATEGORY_DAMAGE)
e4:SetType(EFFECT_TYPE_TRIGGER_O+EFFECT_TYPE_FIELD)
e4:SetRange(LOCATION_SZONE)
e4:SetCode(EVENT_PHASE+PHASE_END)
e4:SetCountLimit(1,1200036)
e4:SetCondition(c1200036.thcon)
e4:SetTarget(c1200036.thtg)
e4:SetOperation(c1200036.thop)
c:RegisterEffect(e4)
--tohand
local e4=Effect.CreateEffect(c)
e4:SetDescription(aux.Stringid(1200036,1))
e4:SetCategory(CATEGORY_RELEASE+CATEGORY_RECOVER)
e4:SetType(EFFECT_TYPE_TRIGGER_O+EFFECT_TYPE_FIELD)
e4:SetRange(LOCATION_SZONE)
e4:SetCode(EVENT_PHASE+PHASE_END)
e4:SetCountLimit(1,1200036)
e4:SetCondition(c1200036.recon)
e4:SetTarget(c1200036.retg)
e4:SetOperation(c1200036.reop)
c:RegisterEffect(e4)
end
function c1200036.thcon(e,tp,eg,ep,ev,re,r,rp)
return Duel.GetCurrentPhase()==PHASE_END and Duel.GetLP(tp)>Duel.GetLP(1-tp)
end
function c1200036.thfilter(c,lp)
return c:IsType(TYPE_MONSTER) and c:IsSetCard(0xfba) and c:IsAbleToHand() and c:GetDefense()<lp
end
function c1200036.thtg(e,tp,eg,ep,ev,re,r,rp,chk,chkc)
local lp1=Duel.GetLP(tp)
local lp2=Duel.GetLP(1-tp)
local lp=math.abs(lp1-lp2)
if chk==0 then return Duel.IsExistingMatchingCard(c1200036.thfilter,tp,LOCATION_DECK+LOCATION_GRAVE,0,1,nil,lp) end
Duel.SetOperationInfo(0,CATEGORY_DAMAGE,0,0,tp,0)
Duel.SetOperationInfo(0,CATEGORY_TOHAND,0,1,tp,LOCATION_DECK+LOCATION_GRAVE)
end
function c1200036.thop(e,tp,eg,ep,ev,re,r,rp)
local lp1=Duel.GetLP(tp)
local lp2=Duel.GetLP(1-tp)
local lp=math.abs(lp1-lp2)
local c=e:GetHandler()
if not c:IsRelateToEffect(e) then return false end
if not Duel.IsExistingMatchingCard(c1200036.thfilter,tp,LOCATION_DECK+LOCATION_GRAVE,0,1,nil,lp) then return false end
local g=Duel.SelectMatchingCard(tp,c1200036.thfilter,tp,LOCATION_DECK+LOCATION_GRAVE,0,1,1,nil,lp)
local tc=g:GetFirst()
if tc then
if Duel.SendtoHand(tc,nil,REASON_EFFECT)>0 then
Duel.BreakEffect()
Duel.ConfirmCards(1-tp,tc)
Duel.Damage(tp,tc:GetDefense(),REASON_EFFECT)
end
end
end
function c1200036.recon(e,tp,eg,ep,ev,re,r,rp)
return Duel.GetCurrentPhase()==PHASE_END and Duel.GetLP(tp)<Duel.GetLP(1-tp)
end
function c1200036.refilter(c)
return c:IsType(TYPE_MONSTER) and c:IsSetCard(0xfba) and c:IsReleasable()
end
function c1200036.retg(e,tp,eg,ep,ev,re,r,rp,chk,chkc)
if chk==0 then return Duel.IsExistingMatchingCard(c1200036.refilter,tp,LOCATION_HAND+LOCATION_MZONE,0,1,nil) end
Duel.SetOperationInfo(0,CATEGORY_RECOVER,0,0,tp,0)
Duel.SetOperationInfo(0,CATEGORY_RELEASE,0,1,tp,LOCATION_HAND+LOCATION_MZONE)
end
function c1200036.reop(e,tp,eg,ep,ev,re,r,rp)
local c=e:GetHandler()
if not c:IsRelateToEffect(e) then return false end
if not Duel.IsExistingMatchingCard(c1200036.refilter,tp,LOCATION_HAND+LOCATION_MZONE,0,1,nil) then return false end
local g=Duel.SelectMatchingCard(tp,c1200036.refilter,tp,LOCATION_HAND+LOCATION_MZONE,0,1,1,nil)
local tc=g:GetFirst()
if tc then
if Duel.Release(tc,REASON_EFFECT)>0 then
Duel.BreakEffect()
Duel.Recover(tp,tc:GetBaseAttack()*2,REASON_EFFECT)
end
end
end
\ No newline at end of file
--靜儀式 青の博物館
function c1200037.initial_effect(c)
--Activate
local e1=Effect.CreateEffect(c)
e1:SetType(EFFECT_TYPE_ACTIVATE)
e1:SetCode(EVENT_FREE_CHAIN)
c:RegisterEffect(e1)
--tohand
local e1=Effect.CreateEffect(c)
e1:SetDescription(aux.Stringid(1200037,0))
e1:SetCategory(CATEGORY_TOHAND+CATEGORY_TOGRAVE)
e1:SetType(EFFECT_TYPE_IGNITION)
e1:SetRange(LOCATION_SZONE)
e1:SetCountLimit(1,1200037)
e1:SetCost(c1200037.cost)
e1:SetTarget(c1200037.target)
e1:SetOperation(c1200037.operation)
c:RegisterEffect(e1)
--SpecialSummon
local e1=Effect.CreateEffect(c)
e1:SetDescription(aux.Stringid(1200037,1))
e1:SetCategory(CATEGORY_SPECIAL_SUMMON)
e1:SetProperty(EFFECT_FLAG_CARD_TARGET)
e1:SetType(EFFECT_TYPE_IGNITION)
e1:SetRange(LOCATION_SZONE)
e1:SetCountLimit(1)
e1:SetTarget(c1200037.sptg)
e1:SetOperation(c1200037.spop)
c:RegisterEffect(e1)
end
function c1200037.cfilter(c)
return c:IsFaceup() and c:IsSetCard(0xfbc) and c:IsReleasable()
end
function c1200037.cost(e,tp,eg,ep,ev,re,r,rp,chk)
if chk==0 then return Duel.IsExistingMatchingCard(c1200037.cfilter,tp,LOCATION_ONFIELD+LOCATION_HAND,LOCATION_ONFIELD,1,e:GetHandler()) end
local cg=Duel.SelectMatchingCard(tp,c1200037.cfilter,tp,LOCATION_ONFIELD+LOCATION_HAND,LOCATION_ONFIELD,1,1,e:GetHandler())
Duel.SendtoGrave(cg,REASON_COST+REASON_RELEASE)
end
function c1200037.target(e,tp,eg,ep,ev,re,r,rp,chk)
if chk==0 then return Duel.GetFieldGroupCount(tp,LOCATION_DECK,0)>0 end
end
function c1200037.thfilter(c)
return c:IsAbleToHand() and not c:IsSetCard(0xfbc) and not c:IsCode(1200002,1200003,1200004,1200005,1200006,1200017,1200021,1200022,1200023,1200024,1200025,1200026,1200027)
end
function c1200037.operation(e,tp,eg,ep,ev,re,r,rp)
if not e:GetHandler():IsRelateToEffect(e) then return false end
local g=Duel.GetMatchingGroup(c1200037.thfilter,tp,LOCATION_DECK,0,nil)
local dcount=Duel.GetFieldGroupCount(tp,LOCATION_DECK,0)
if dcount==0 then return false end
if g:GetCount()==0 then
Duel.ConfirmDecktop(tp,dcount)
Duel.ShuffleDeck(tp)
return
end
local seq=-1
local tc=g:GetFirst()
local spcard=nil
while tc do
if tc:GetSequence()>seq then
seq=tc:GetSequence()
spcard=tc
end
tc=g:GetNext()
end
Duel.ConfirmDecktop(tp,dcount-seq)
if spcard:IsAbleToHand() then
Duel.DisableShuffleCheck()
Duel.SendtoHand(spcard,nil,REASON_EFFECT)
Duel.DiscardDeck(tp,dcount-seq-1,REASON_EFFECT+REASON_REVEAL)
Duel.ConfirmCards(1-tp,spcard)
Duel.ShuffleHand(tp)
else Duel.DiscardDeck(tp,dcount-seq,REASON_EFFECT+REASON_REVEAL) end
end
function c1200037.filter1(c,e,tp)
local rk=c:GetRank()
return c:IsFaceup() and c:IsType(TYPE_XYZ)
and Duel.IsExistingMatchingCard(c1200037.filter2,tp,LOCATION_EXTRA,0,1,nil,e,tp,c,rk+2)
and Duel.GetLocationCountFromEx(tp,tp,c)>0
end
function c1200037.filter2(c,e,tp,mc,rk)
return c:GetRank()==rk and c:IsSetCard(0xfba) and mc:IsCanBeXyzMaterial(c)
and c:IsCanBeSpecialSummoned(e,SUMMON_TYPE_XYZ,tp,false,false)
end
function c1200037.sptg(e,tp,eg,ep,ev,re,r,rp,chk,chkc)
if chkc then return chkc:IsControler(tp) and chkc:IsLocation(LOCATION_MZONE) and c1200037.filter1(chkc,e,tp) end
if chk==0 then return Duel.IsExistingTarget(c1200037.filter1,tp,LOCATION_MZONE,0,1,nil,e,tp) end
Duel.Hint(HINT_SELECTMSG,tp,HINTMSG_TARGET)
Duel.SelectTarget(tp,c1200037.filter1,tp,LOCATION_MZONE,0,1,1,nil,e,tp)
Duel.SetOperationInfo(0,CATEGORY_SPECIAL_SUMMON,nil,1,tp,LOCATION_EXTRA)
end
function c1200037.spop(e,tp,eg,ep,ev,re,r,rp)
local tc=Duel.GetFirstTarget()
if Duel.GetLocationCountFromEx(tp,tp,tc)<=0 then return end
if tc:IsFacedown() or not tc:IsRelateToEffect(e) or tc:IsControler(1-tp) or tc:IsImmuneToEffect(e) then return end
Duel.Hint(HINT_SELECTMSG,tp,HINTMSG_SPSUMMON)
local g=Duel.SelectMatchingCard(tp,c1200037.filter2,tp,LOCATION_EXTRA,0,1,1,nil,e,tp,tc,tc:GetRank()+2)
local sc=g:GetFirst()
if sc then
local mg=tc:GetOverlayGroup()
if mg:GetCount()~=0 then
Duel.Overlay(sc,mg)
end
sc:SetMaterial(Group.FromCards(tc))
Duel.Overlay(sc,Group.FromCards(tc))
if Duel.SpecialSummon(sc,SUMMON_TYPE_XYZ,tp,tp,false,false,POS_FACEUP)>0 then
sc:CompleteProcedure()
Duel.Overlay(sc,Group.FromCards(e:GetHandler()))
end
end
end
--靜儀式 忘卻的都市
function c1200038.initial_effect(c)
--Activate
local e1=Effect.CreateEffect(c)
e1:SetType(EFFECT_TYPE_ACTIVATE)
e1:SetCode(EVENT_FREE_CHAIN)
c:RegisterEffect(e1)
--ind
local e1=Effect.CreateEffect(c)
e1:SetDescription(aux.Stringid(1200038,0))
e1:SetType(EFFECT_TYPE_QUICK_O)
e1:SetCode(EVENT_FREE_CHAIN)
e1:SetRange(LOCATION_SZONE)
e1:SetCountLimit(1,1200038)
e1:SetCost(c1200038.cost)
e1:SetTarget(c1200038.target)
e1:SetOperation(c1200038.operation)
c:RegisterEffect(e1)
--draw
local e2=Effect.CreateEffect(c)
e2:SetDescription(aux.Stringid(1200038,1))
e2:SetCategory(CATEGORY_DRAW)
e2:SetType(EFFECT_TYPE_FIELD+EFFECT_TYPE_TRIGGER_F)
e2:SetRange(LOCATION_SZONE)
e2:SetCode(EVENT_RELEASE)
e2:SetCountLimit(1)
e2:SetCondition(c1200038.drcon)
e2:SetTarget(c1200038.drtg)
e2:SetOperation(c1200038.drop)
c:RegisterEffect(e2)
end
function c1200038.cfilter(c)
return c:IsSetCard(0xfba) and c:IsReleasable()
end
function c1200038.cost(e,tp,eg,ep,ev,re,r,rp,chk)
if chk==0 then return Duel.IsExistingMatchingCard(c1200038.cfilter,tp,LOCATION_MZONE,0,1,e:GetHandler()) end
local cg=Duel.SelectMatchingCard(tp,c1200038.cfilter,tp,LOCATION_MZONE,0,1,1,e:GetHandler())
Duel.Release(cg,REASON_COST)
end
function c1200038.indfilter(c)
return c:IsFaceup() and c:IsSetCard(0xfba) and c:IsType(TYPE_MONSTER)
end
function c1200038.target(e,tp,eg,ep,ev,re,r,rp,chk,chkc)
if chk==0 then return Duel.IsExistingMatchingCard(c1200038.indfilter,tp,LOCATION_MZONE,0,1,nil) end
end
function c1200038.operation(e,tp,eg,ep,ev,re,r,rp)
local c=e:GetHandler()
if not c:IsRelateToEffect(e) then return false end
if Duel.IsExistingMatchingCard(c1200038.indfilter,tp,LOCATION_MZONE,0,1,nil) then
local sg=Duel.GetMatchingGroup(c1200038.indfilter,tp,LOCATION_MZONE,0,nil)
local tc=sg:GetFirst()
while tc do
local e1=Effect.CreateEffect(c)
e1:SetType(EFFECT_TYPE_SINGLE)
e1:SetCode(EFFECT_INDESTRUCTABLE)
e1:SetValue(1)
e1:SetReset(RESET_EVENT+0x1fe0000+RESET_PHASE+PHASE_END)
tc:RegisterEffect(e1)
tc=sg:GetNext()
end
end
end
function c1200038.ccfilter(c,tp)
return c:IsReason(REASON_RELEASE) and c:IsPreviousLocation(LOCATION_MZONE) and c:GetPreviousControler()==tp
end
function c1200038.drcon(e,tp,eg,ep,ev,re,r,rp)
return eg:IsExists(c1200038.ccfilter,1,nil,tp)
end
function c1200038.drtg(e,tp,eg,ep,ev,re,r,rp,chk)
if chk==0 then return Duel.IsPlayerCanDraw(tp,1) end
Duel.SetTargetPlayer(tp)
Duel.SetTargetParam(1)
Duel.SetOperationInfo(0,CATEGORY_DRAW,nil,0,tp,1)
end
function c1200038.drop(e,tp,eg,ep,ev,re,r,rp)
if not e:GetHandler():IsRelateToEffect(e) then return end
local p,d=Duel.GetChainInfo(0,CHAININFO_TARGET_PLAYER,CHAININFO_TARGET_PARAM)
Duel.Draw(p,d,REASON_EFFECT)
end
--LA SGA 仁慈的貝露塔
function c1200041.initial_effect(c)
--fusion material
c:EnableReviveLimit()
aux.AddFusionProcFun2(c,c1200041.ffilter,aux.FilterBoolFunction(Card.IsAttackBelow,2000),true)
--fusion success
local e3=Effect.CreateEffect(c)
e3:SetDescription(aux.Stringid(1200041,0))
e3:SetCategory(CATEGORY_TOHAND)
e3:SetType(EFFECT_TYPE_SINGLE+EFFECT_TYPE_TRIGGER_O)
e3:SetCode(EVENT_SPSUMMON_SUCCESS)
e3:SetCountLimit(1,1200041)
e3:SetCondition(c1200041.thcon)
e3:SetTarget(c1200041.thtg)
e3:SetOperation(c1200041.thop)
c:RegisterEffect(e3)
--special summon
local e1=Effect.CreateEffect(c)
e1:SetDescription(aux.Stringid(1200041,1))
e1:SetCategory(CATEGORY_SPECIAL_SUMMON)
e1:SetType(EFFECT_TYPE_IGNITION)
e1:SetCountLimit(1)
e1:SetRange(LOCATION_MZONE)
e1:SetCost(c1200041.spcost)
e1:SetTarget(c1200041.sptg)
e1:SetOperation(c1200041.spop)
c:RegisterEffect(e1)
end
function c1200041.ffilter(c)
return c:IsFusionSetCard(0xfba) and c:IsRace(RACE_MACHINE)
end
function c1200041.thcon(e,tp,eg,ep,ev,re,r,rp)
return e:GetHandler():IsSummonType(SUMMON_TYPE_FUSION)
end
function c1200041.thfilter(c)
return c:IsSetCard(0xfbc) and c:IsAbleToHand() and (c:IsType(TYPE_SPELL) or c:IsType(TYPE_TRAP))
end
function c1200041.thtg(e,tp,eg,ep,ev,re,r,rp,chk)
if chk==0 then return Duel.IsExistingMatchingCard(c1200041.thfilter,tp,LOCATION_GRAVE,0,1,nil) end
Duel.SetOperationInfo(0,CATEGORY_TOHAND,nil,1,0,0)
end
function c1200041.thop(e,tp,eg,ep,ev,re,r,rp)
if not Duel.IsExistingMatchingCard(c1200041.thfilter,tp,LOCATION_GRAVE,0,1,nil) then return false end
local g=Duel.SelectMatchingCard(tp,c1200041.thfilter,tp,LOCATION_GRAVE,0,1,1,nil)
if g:GetCount()>0 then
if Duel.SendtoHand(g,nil,REASON_EFFECT) then
Duel.ConfirmCards(1-tp,g)
end
end
end
function c1200041.cfilter(c)
return c:IsSetCard(0xfba) and c:IsReleasable()
end
function c1200041.spcost(e,tp,eg,ep,ev,re,r,rp,chk)
if chk==0 then return Duel.IsExistingMatchingCard(c1200041.cfilter,tp,LOCATION_MZONE,0,1,nil) end
local cg=Duel.SelectMatchingCard(tp,c1200041.cfilter,tp,LOCATION_MZONE,0,1,1,nil)
Duel.Release(cg,REASON_COST)
end
function c1200041.spfilter(c,e,tp)
return c:IsSetCard(0xfba) and c:IsCanBeSpecialSummoned(e,0,tp,false,false) and not c:IsCode(1200041)
end
function c1200041.sptg(e,tp,eg,ep,ev,re,r,rp,chk,chkc)
if chk==0 then return Duel.GetLocationCount(tp,LOCATION_MZONE)>0
and Duel.IsExistingMatchingCard(c1200041.spfilter,tp,LOCATION_GRAVE,0,1,nil,e,tp) end
Duel.SetOperationInfo(0,CATEGORY_SPECIAL_SUMMON,0,1,0,0)
end
function c1200041.spop(e,tp,eg,ep,ev,re,r,rp,chk)
if not Duel.IsExistingMatchingCard(c1200041.spfilter,tp,LOCATION_GRAVE,0,1,nil,e,tp) then return false end
local sg=Duel.SelectMatchingCard(tp,c1200041.spfilter,tp,LOCATION_GRAVE,0,1,1,nil,e,tp)
if sg:GetCount()>0 then
Duel.SpecialSummon(sg,0,tp,tp,false,false,POS_FACEUP)
end
end
\ No newline at end of file
--LA SGA 里切的得兒塔
function c1200042.initial_effect(c)
--fusion material
c:EnableReviveLimit()
aux.AddFusionProcFunRep(c,c1200042.ffilter,2,true)
--no battle damage
local e1=Effect.CreateEffect(c)
e1:SetType(EFFECT_TYPE_SINGLE)
e1:SetCode(EFFECT_NO_BATTLE_DAMAGE)
c:RegisterEffect(e1)
--attack up
local e2=Effect.CreateEffect(c)
e2:SetCategory(CATEGORY_ATKCHANGE)
e2:SetType(EFFECT_TYPE_SINGLE+EFFECT_TYPE_TRIGGER_F)
e2:SetCode(EVENT_BATTLE_START)
e2:SetCondition(c1200042.condition)
e2:SetOperation(c1200042.operation)
c:RegisterEffect(e2)
--chain attack
local e3=Effect.CreateEffect(c)
e3:SetDescription(aux.Stringid(1200042,0))
e3:SetType(EFFECT_TYPE_SINGLE+EFFECT_TYPE_TRIGGER_O)
e3:SetCode(EVENT_BATTLE_DESTROYING)
e3:SetCondition(c1200042.atcon)
e3:SetOperation(c1200042.atop)
c:RegisterEffect(e3)
--SearchCard
local e2=Effect.CreateEffect(c)
e2:SetCategory(CATEGORY_SEARCH+CATEGORY_ATKCHANGE)
e2:SetType(EFFECT_TYPE_IGNITION)
e2:SetRange(LOCATION_MZONE)
e2:SetCondition(c1200042.condition2)
e2:SetTarget(c1200042.target2)
e2:SetOperation(c1200042.operation2)
c:RegisterEffect(e2)
end
function c1200042.ffilter(c)
return c:IsFusionSetCard(0xfba)
end
function c1200042.condition(e,tp,eg,ep,ev,re,r,rp)
return e:GetHandler():IsRelateToBattle() and e:GetHandler():GetAttack()<3000
end
function c1200042.operation(e,tp,eg,ep,ev,re,r,rp)
local c=e:GetHandler()
if c:IsFaceup() and c:IsRelateToEffect(e) then
local e1=Effect.CreateEffect(c)
e1:SetType(EFFECT_TYPE_SINGLE)
e1:SetCode(EFFECT_UPDATE_ATTACK)
e1:SetValue(1000)
e1:SetReset(RESET_EVENT+0x1ff0000)
c:RegisterEffect(e1)
end
end
function c1200042.atcon(e,tp,eg,ep,ev,re,r,rp)
local c=e:GetHandler()
return Duel.GetAttacker()==c and aux.bdocon(e,tp,eg,ep,ev,re,r,rp)
and c:IsChainAttackable()
end
function c1200042.atop(e,tp,eg,ep,ev,re,r,rp)
Duel.ChainAttack()
end
function c1200042.condition2(e,tp,eg,ep,ev,re,r,rp)
return e:GetHandler():GetAttack()>=4000 and e:GetHandler():IsFaceup()
end
function c1200042.thfilter(c)
return c:IsSetCard(0xfbc) and c:IsAbleToHand()
end
function c1200042.target2(e,tp,eg,ep,ev,re,r,rp,chk)
if chk==0 then return Duel.IsExistingMatchingCard(c1200042.thfilter,tp,LOCATION_DECK+LOCATION_GRAVE,0,1,nil) end
Duel.SetOperationInfo(0,CATEGORY_TOHAND,nil,1,tp,LOCATION_DECK+LOCATION_GRAVE)
end
function c1200042.operation2(e,tp,eg,ep,ev,re,r,rp)
local c=e:GetHandler()
local g=Duel.SelectMatchingCard(tp,c1200042.thfilter,tp,LOCATION_DECK+LOCATION_GRAVE,0,1,1,nil)
if g then
if Duel.SendtoHand(g,nil,REASON_EFFECT) then
Duel.ConfirmCards(1-tp,g)
if c:IsRelateToEffect(e) and c:IsFaceup() then
Duel.BreakEffect()
local e1=Effect.CreateEffect(c)
e1:SetType(EFFECT_TYPE_SINGLE)
e1:SetCode(EFFECT_UPDATE_ATTACK)
e1:SetValue(-4000)
e1:SetReset(RESET_EVENT+0x1ff0000)
c:RegisterEffect(e1)
end
end
end
end
\ No newline at end of file
--LA SGA 節制的阿爾法
function c1200043.initial_effect(c)
--fusion material
c:EnableReviveLimit()
aux.AddFusionProcFun2(c,c1200043.ffilter,aux.FilterBoolFunction(Card.IsFusionSetCard,0xfba),true)
--actlimit
local e3=Effect.CreateEffect(c)
e3:SetType(EFFECT_TYPE_FIELD)
e3:SetProperty(EFFECT_FLAG_PLAYER_TARGET)
e3:SetCode(EFFECT_CANNOT_ACTIVATE)
e3:SetRange(LOCATION_MZONE)
e3:SetTargetRange(0,1)
e3:SetValue(c1200043.aclimit)
e3:SetCondition(c1200043.actcon)
c:RegisterEffect(e3)
--destroy
local e2=Effect.CreateEffect(c)
e3:SetDescription(aux.Stringid(1200043,0))
e2:SetCategory(CATEGORY_DESTROY+CATEGORY_DRAW)
e2:SetType(EFFECT_TYPE_FIELD+EFFECT_TYPE_TRIGGER_O)
e2:SetCode(EVENT_BATTLE_DAMAGE)
e2:SetRange(LOCATION_MZONE)
e2:SetProperty(EFFECT_FLAG_CARD_TARGET)
e2:SetCondition(c1200043.descon)
e2:SetTarget(c1200043.destg)
e2:SetOperation(c1200043.desop)
c:RegisterEffect(e2)
--destroy
local e2=Effect.CreateEffect(c)
e3:SetDescription(aux.Stringid(1200043,1))
e2:SetCategory(CATEGORY_TOGRAVE+CATEGORY_SPECIAL_SUMMON)
e2:SetType(EFFECT_TYPE_IGNITION)
e2:SetRange(LOCATION_MZONE)
e2:SetCountLimit(1,1200043)
e2:SetCost(c1200043.tgcost)
e2:SetTarget(c1200043.tgtg)
e2:SetOperation(c1200043.tgop)
c:RegisterEffect(e2)
end
function c1200043.ffilter(c)
return c:IsFusionSetCard(0xfba) and c:IsRace(RACE_MACHINE) and c:IsLevelAbove(5)
end
function c1200043.aclimit(e,re,tp)
return (re:IsHasType(EFFECT_TYPE_ACTIVATE) or re:IsActiveType(TYPE_MONSTER)) and not re:GetHandler():IsImmuneToEffect(e)
end
function c1200043.actcon(e)
local tp=e:GetHandlerPlayer()
local a=Duel.GetAttacker()
return a and a:IsSetCard(0xfba) and a:IsControler(tp)
end
function c1200043.descon(e,tp,eg,ep,ev,re,r,rp)
local tc=eg:GetFirst()
return ep~=tp and tc:IsControler(tp) and tc:IsSetCard(0xfba)
end
function c1200043.destg(e,tp,eg,ep,ev,re,r,rp,chk,chkc)
if chkc then return chkc:IsOnField() end
if chk==0 then return Duel.IsExistingTarget(aux.TRUE,tp,LOCATION_SZONE,LOCATION_SZONE,1,nil) end
Duel.Hint(HINT_SELECTMSG,tp,HINTMSG_DESTROY)
local g=Duel.SelectTarget(tp,aux.TRUE,tp,LOCATION_SZONE,LOCATION_SZONE,1,1,nil)
Duel.SetOperationInfo(0,CATEGORY_DESTROY,g,1,0,0)
Duel.SetOperationInfo(0,CATEGORY_DRAW,0,1,0,0)
end
function c1200043.desop(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) then
if Duel.Destroy(tc,REASON_EFFECT)>0 then
Duel.Draw(tc:GetControler(),1,REASON_EFFECT)
end
end
end
function c1200043.tgcost(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 c1200043.tgfilter(c)
return c:IsFusionSetCard(0xfba) and c:IsAbleToGrave() and c:IsType(TYPE_MONSTER)
end
function c1200043.tgtg(e,tp,eg,ep,ev,re,r,rp,chk,chkc)
if chk==0 then return Duel.IsExistingMatchingCard(c1200043.tgfilter,tp,LOCATION_DECK,0,1,nil) end
Duel.SetOperationInfo(0,CATEGORY_TOGRAVE,0,1,tp,LOCATION_DECK)
end
function c1200043.spfilter(c,e,tp,atk,def)
return c:IsFusionSetCard(0xfba) and c:IsCanBeSpecialSummoned(e,0,tp,false,false) and c:IsType(TYPE_MONSTER) and (c:GetAttack()==atk or c:GetDefense()==def)
end
function c1200043.tgop(e,tp,eg,ep,ev,re,r,rp)
if not Duel.IsExistingMatchingCard(c1200043.tgfilter,tp,LOCATION_DECK,0,1,nil) then return false end
local tg=Duel.SelectMatchingCard(tp,c1200043.tgfilter,tp,LOCATION_DECK,0,1,1,nil)
local tc=tg:GetFirst()
if tc then
local atk=tc:GetAttack()
local def=tc:GetDefense()
if Duel.SendtoGrave(tc,REASON_EFFECT)>0 and Duel.IsExistingMatchingCard(c1200043.spfilter,tp,LOCATION_DECK,0,1,nil,e,tp,atk,def) and Duel.GetLocationCount(tp,LOCATION_MZONE)>0 then
if Duel.SelectYesNo(tp,aux.Stringid(1200043,2)) then
Duel.BreakEffect()
local m=Duel.GetLocationCount(tp,LOCATION_MZONE)
local sg=Duel.SelectMatchingCard(tp,c1200043.spfilter,tp,LOCATION_DECK,0,1,m,nil,e,tp,atk,def)
if sg:GetCount()>0 then
Duel.SpecialSummon(sg,0,tp,tp,false,false,POS_FACEUP)
end
end
end
end
end
\ No newline at end of file
--LA CDa'ath 物質主義的娜海瑪
function c1200044.initial_effect(c)
--xyz summon
aux.AddXyzProcedure(c,aux.FilterBoolFunction(Card.IsSetCard,0xfba),6,2,c1200044.ovfilter,aux.Stringid(1200044,0))
c:EnableReviveLimit()
--negate
local e1=Effect.CreateEffect(c)
e1:SetDescription(aux.Stringid(1200044,1))
e1:SetCategory(CATEGORY_DISABLE)
e1:SetType(EFFECT_TYPE_FIELD+EFFECT_TYPE_TRIGGER_O)
e1:SetCode(EVENT_PHASE+PHASE_BATTLE_START)
e1:SetRange(LOCATION_MZONE)
e1:SetCountLimit(1)
e1:SetCost(c1200044.negcost)
e1:SetTarget(c1200044.negtg)
e1:SetOperation(c1200044.negop)
c:RegisterEffect(e1)
-- atk up
local e2=Effect.CreateEffect(c)
e2:SetDescription(aux.Stringid(1200044,2))
e2:SetCategory(CATEGORY_NEGATE+CATEGORY_DESTROY)
e2:SetType(EFFECT_TYPE_FIELD+EFFECT_TYPE_QUICK_O)
e2:SetCode(EVENT_CHAINING)
e2:SetRange(LOCATION_MZONE)
e2:SetCost(c1200044.negcost)
e2:SetCondition(c1200044.discon)
e2:SetTarget(c1200044.distg)
e2:SetOperation(c1200044.disop)
c:RegisterEffect(e2)
--cannot direct attack
local e4=Effect.CreateEffect(c)
e4:SetType(EFFECT_TYPE_SINGLE)
e4:SetCode(EFFECT_CANNOT_DIRECT_ATTACK)
c:RegisterEffect(e4)
--attack up
local e3=Effect.CreateEffect(c)
e3:SetType(EFFECT_TYPE_FIELD+EFFECT_TYPE_CONTINUOUS)
e3:SetRange(LOCATION_MZONE)
e3:SetCode(EVENT_DAMAGE)
e3:SetCondition(c1200044.cd)
e3:SetOperation(c1200044.op)
c:RegisterEffect(e3)
end
function c1200044.ovfilter(c)
return c:IsFaceup() and c:IsSetCard(0xfba) and c:IsType(TYPE_XYZ) and c:GetOverlayCount()>0 and not c:IsCode(1200044)
end
function c1200044.negcost(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 c1200044.negtg(e,tp,eg,ep,ev,re,r,rp,chk)
if chk==0 then return Duel.IsExistingMatchingCard(Card.IsFaceup,tp,LOCATION_ONFIELD,LOCATION_ONFIELD,1,e:GetHandler()) end
end
function c1200044.negop(e,tp,eg,ep,ev,re,r,rp)
local c=e:GetHandler()
local g=Duel.GetMatchingGroup(Card.IsFaceup,tp,LOCATION_ONFIELD,LOCATION_ONFIELD,c)
local tc=g:GetFirst()
while tc do
local e1=Effect.CreateEffect(c)
e1:SetType(EFFECT_TYPE_SINGLE)
e1:SetCode(EFFECT_DISABLE)
e1:SetReset(RESET_EVENT+0x1fe0000+RESET_PHASE+PHASE_BATTLE)
tc:RegisterEffect(e1)
local e2=Effect.CreateEffect(c)
e2:SetType(EFFECT_TYPE_SINGLE)
e2:SetCode(EFFECT_DISABLE_EFFECT)
e2:SetReset(RESET_EVENT+0x1fe0000+RESET_PHASE+PHASE_BATTLE)
tc:RegisterEffect(e2)
tc=g:GetNext()
end
end
function c1200044.discon(e,tp,eg,ep,ev,re,r,rp)
return Duel.GetCurrentPhase()>PHASE_MAIN1 and Duel.GetCurrentPhase()<PHASE_MAIN2 and Duel.IsChainNegatable(ev) and not e:GetHandler():IsStatus(STATUS_BATTLE_DESTROYED)
end
function c1200044.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)
Duel.SetOperationInfo(0,CATEGORY_DESTROY,eg,1,0,0)
end
function c1200044.disop(e,tp,eg,ep,ev,re,r,rp)
if Duel.NegateActivation(ev) then
Duel.Destroy(eg,REASON_EFFECT)
end
end
function c1200044.cd(e,tp,eg,ep,ev,re,r,rp)
if e:GetHandler():IsStatus(STATUS_BATTLE_DESTROYED) then return false end
return tp==ep
end
function c1200044.op(e,tp,eg,ep,ev,re,r,rp)
local c=e:GetHandler()
local e1=Effect.CreateEffect(c)
e1:SetType(EFFECT_TYPE_SINGLE)
e1:SetCode(EFFECT_UPDATE_ATTACK)
e1:SetValue(500)
e1:SetReset(RESET_EVENT+0x1ff0000+RESET_PHASE+PHASE_END+RESET_OPPO_TURN)
c:RegisterEffect(e1)
end
\ No newline at end of file
--LA CSY 不安定的莉莉絲
function c1200045.initial_effect(c)
--synchro summon
aux.AddSynchroProcedure(c,aux.FilterBoolFunction(Card.IsSetCard,0xfba),aux.NonTuner(nil),1)
c:EnableReviveLimit()
--atkup
local e3=Effect.CreateEffect(c)
e3:SetType(EFFECT_TYPE_SINGLE)
e3:SetProperty(EFFECT_FLAG_SINGLE_RANGE)
e3:SetCode(EFFECT_UPDATE_ATTACK)
e3:SetRange(LOCATION_MZONE)
e3:SetValue(c1200045.val)
c:RegisterEffect(e3)
--defup
local e3=Effect.CreateEffect(c)
e3:SetType(EFFECT_TYPE_SINGLE)
e3:SetProperty(EFFECT_FLAG_SINGLE_RANGE)
e3:SetCode(EFFECT_UPDATE_DEFENSE)
e3:SetRange(LOCATION_MZONE)
e3:SetValue(c1200045.val)
c:RegisterEffect(e3)
--atk
local e1=Effect.CreateEffect(c)
e1:SetDescription(aux.Stringid(1200045,0))
e1:SetCategory(CATEGORY_ATKCHANGE+CATEGORY_RECOVER)
e1:SetProperty(EFFECT_FLAG_CARD_TARGET)
e1:SetType(EFFECT_TYPE_QUICK_O)
e1:SetRange(LOCATION_MZONE)
e1:SetCountLimit(1)
e1:SetCode(EVENT_FREE_CHAIN)
e1:SetTarget(c1200045.tg)
e1:SetOperation(c1200045.op)
c:RegisterEffect(e1)
--spsummon
local e2=Effect.CreateEffect(c)
e2:SetDescription(aux.Stringid(1200045,1))
e2:SetCategory(CATEGORY_SPECIAL_SUMMON)
e2:SetType(EFFECT_TYPE_QUICK_O)
e2:SetRange(LOCATION_MZONE)
e2:SetCountLimit(1)
e2:SetCode(EVENT_FREE_CHAIN)
e2:SetCost(c1200045.spcost)
e2:SetTarget(c1200045.sptg)
e2:SetOperation(c1200045.spop)
c:RegisterEffect(e2)
end
function c1200045.val(c)
local m=Duel.GetLP(Duel.GetTurnPlayer())
local n=Duel.GetLP(1-Duel.GetTurnPlayer())
return math.abs(m-n)
end
function c1200045.tg(e,tp,eg,ep,ev,re,r,rp,chk,chkc)
if chkc then return chkc:IsLocation(LOCATION_MZONE) and chkc:IsControler(1-tp) and c1200045.filter(chkc) end
if chk==0 then return Duel.IsExistingTarget(c1200045.filter,tp,0,LOCATION_MZONE,1,nil) end
local g=Duel.SelectTarget(tp,c1200045.filter,tp,0,LOCATION_MZONE,1,1,nil)
end
function c1200045.op(e,tp,eg,ep,ev,re,r,rp)
local tc=Duel.GetFirstTarget()
if not tc:IsRelateToEffect(e) then return false end
local c=e:GetHandler()
local m=tc:GetBaseAttack()
local n=tc:GetAttack()
if Duel.Recover(tp,math.abs(m-n)*2,REASON_EFFECT) then
if tc:IsFaceup() and tc:IsLocation(LOCATION_MZONE) then
Duel.BreakEffect()
local e1=Effect.CreateEffect(c)
e1:SetType(EFFECT_TYPE_SINGLE)
e1:SetCode(EFFECT_SET_ATTACK_FINAL)
e1:SetValue(tc:GetBaseAttack())
e1:SetReset(RESET_EVENT+0x1fe0000)
tc:RegisterEffect(e1)
end
end
end
function c1200045.filter(c)
return c:IsFaceup() and c:GetAttack()~=c:GetBaseAttack()
end
function c1200045.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 c1200045.spfilter(c,e,tp,sync)
return c:IsControler(tp) and c:IsLocation(LOCATION_GRAVE)
and bit.band(c:GetReason(),0x80008)==0x80008 and c:GetReasonCard()==sync
and c:IsCanBeSpecialSummoned(e,0,tp,false,false) and not c:IsHasEffect(EFFECT_NECRO_VALLEY)
end
function c1200045.sptg(e,tp,eg,ep,ev,re,r,rp,chk)
local c=e:GetHandler()
local mg=c:GetMaterial()
local ct=mg:GetCount()
if chk==0 then return c:IsSummonType(SUMMON_TYPE_SYNCHRO)
and ct>0 and Duel.GetLocationCount(tp,LOCATION_MZONE)>=ct
and mg:FilterCount(c1200045.spfilter,nil,e,tp,c)==ct end
Duel.SetTargetCard(mg)
Duel.SetOperationInfo(0,CATEGORY_SPECIAL_SUMMON,mg,ct,0,0)
end
function c1200045.spop(e,tp,eg,ep,ev,re,r,rp)
local c=e:GetHandler()
local mg=Duel.GetChainInfo(0,CHAININFO_TARGET_CARDS)
local g=mg:Filter(Card.IsRelateToEffect,nil,e)
if g:GetCount()<mg:GetCount() then return end
if Duel.GetLocationCount(tp,LOCATION_MZONE)<g:GetCount() then return end
local tc=g:GetFirst()
while tc do
Duel.SpecialSummonStep(tc,0,tp,tp,false,false,POS_FACEUP)
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)
tc=g:GetNext()
end
Duel.SpecialSummonComplete()
end
\ No newline at end of file
--LA Da'ath 慈悲的然基兒
function c1200046.initial_effect(c)
--xyz summon
aux.AddXyzProcedure(c,aux.FilterBoolFunction(Card.IsSetCard,0xfba),4,2)
c:EnableReviveLimit()
--change effect
local e8=Effect.CreateEffect(c)
e8:SetDescription(aux.Stringid(1200046,0))
e8:SetCategory(CATEGORY_DESTROY)
e8:SetCode(EVENT_CHAINING)
e8:SetType(EFFECT_TYPE_QUICK_O)
e8:SetRange(LOCATION_MZONE)
e8:SetProperty(EFFECT_FLAG_DAMAGE_STEP+EFFECT_FLAG_DAMAGE_CAL)
e8:SetCountLimit(1)
e8:SetCost(c1200046.chcost)
e8:SetCondition(c1200046.chcon)
e8:SetTarget(c1200046.chtg)
e8:SetOperation(c1200046.chop)
c:RegisterEffect(e8)
--spsummon
local e6=Effect.CreateEffect(c)
e6:SetDescription(aux.Stringid(1200046,1))
e6:SetType(EFFECT_TYPE_SINGLE+EFFECT_TYPE_TRIGGER_O)
e6:SetProperty(EFFECT_FLAG_DAMAGE_STEP+EFFECT_FLAG_DELAY)
e6:SetCode(EVENT_LEAVE_FIELD)
e6:SetCountLimit(1,1200046+EFFECT_COUNT_CODE_DUEL)
e6:SetCondition(c1200046.spcon)
e6:SetTarget(c1200046.sptg)
e6:SetOperation(c1200046.spop)
c:RegisterEffect(e6)
end
function c1200046.chcon(e,tp,eg,ep,ev,re,r,rp)
return not e:GetHandler():IsStatus(STATUS_BATTLE_DESTROYED) and re:IsActiveType(TYPE_TRAP+TYPE_SPELL) and rp~=tp
end
function c1200046.filter(c)
return c:IsFaceup() and c:IsSetCard(0xfbc) and c:IsDestructable()
end
function c1200046.chcost(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 c1200046.chtg(e,tp,eg,ep,ev,re,r,rp,chk)
if chk==0 then return Duel.IsExistingMatchingCard(c1200046.filter,rp,LOCATION_ONFIELD,LOCATION_ONFIELD,1,nil) end
end
function c1200046.chop(e,tp,eg,ep,ev,re,r,rp)
local g=Group.CreateGroup()
Duel.ChangeTargetCard(ev,g)
Duel.ChangeChainOperation(ev,c1200046.repop)
end
function c1200046.repop(e,tp,eg,ep,ev,re,r,rp)
local c=e:GetHandler()
if c:IsType(TYPE_TRAP+TYPE_SPELL) then
c:CancelToGrave(false)
end
Duel.Hint(HINT_SELECTMSG,tp,HINTMSG_DESTROY)
local g=Duel.SelectMatchingCard(tp,c1200046.filter,tp,LOCATION_ONFIELD,LOCATION_ONFIELD,1,1,nil)
if g:GetCount()>0 then
Duel.Destroy(g,REASON_EFFECT)
end
end
function c1200046.spcon(e,tp,eg,ep,ev,re,r,rp)
return e:GetHandler():IsPreviousLocation(LOCATION_ONFIELD) and e:GetHandler():GetOverlayCount()~=0
end
function c1200046.spfilter(c,e,tp)
return c:IsCanBeSpecialSummoned(e,SUMMON_TYPE_XYZ,tp,true,true) and c:IsSetCard(0xfba) and c:IsType(TYPE_XYZ)
end
function c1200046.sptg(e,tp,eg,ep,ev,re,r,rp,chk)
if chk==0 then return Duel.GetLocationCountFromEx(tp)>0
and Duel.IsExistingMatchingCard(c1200046.spfilter,tp,LOCATION_EXTRA,0,1,e:GetHandler(),e,tp) end
Duel.SetOperationInfo(0,CATEGORY_SPECIAL_SUMMON,nil,1,tp,LOCATION_EXTRA)
end
function c1200046.spop(e,tp,eg,ep,ev,re,r,rp)
if Duel.GetLocationCountFromEx(tp)<0 then return end
Duel.Hint(HINT_SELECTMSG,tp,HINTMSG_SPSUMMON)
local g=Duel.SelectMatchingCard(tp,c1200046.spfilter,tp,LOCATION_EXTRA,0,1,1,e:GetHandler(),e,tp)
if g:GetCount()>0 then
local tc=g:GetFirst()
if Duel.SpecialSummon(tc,SUMMON_TYPE_XYZ,tp,tp,true,true,POS_FACEUP)>0 then
tc:CompleteProcedure()
Duel.BreakEffect()
Duel.Overlay(tc,Group.FromCards(e:GetHandler()))
end
end
end
\ No newline at end of file
--LA Da'ath 刻薄的卡麥兒
function c1200047.initial_effect(c)
--xyz summon
aux.AddXyzProcedure(c,aux.FilterBoolFunction(Card.IsSetCard,0xfba),4,2)
c:EnableReviveLimit()
--search
local e1=Effect.CreateEffect(c)
e1:SetDescription(aux.Stringid(1200047,0))
e1:SetCategory(CATEGORY_TOHAND)
e1:SetType(EFFECT_TYPE_IGNITION)
e1:SetRange(LOCATION_MZONE)
e1:SetCountLimit(1)
e1:SetCost(c1200047.cost)
e1:SetTarget(c1200047.target)
e1:SetOperation(c1200047.operation)
c:RegisterEffect(e1)
--disable spsummon
local e4=Effect.CreateEffect(c)
e4:SetDescription(aux.Stringid(1200047,1))
e4:SetCategory(CATEGORY_DISABLE_SUMMON+CATEGORY_DESTROY)
e4:SetType(EFFECT_TYPE_TRIGGER_O+EFFECT_TYPE_FIELD)
e4:SetRange(LOCATION_MZONE)
e4:SetCode(EVENT_SPSUMMON)
e4:SetCondition(c1200047.condition1)
e4:SetCost(c1200047.cost1)
e4:SetTarget(c1200047.target1)
e4:SetOperation(c1200047.operation1)
c:RegisterEffect(e4)
local e5=e4:Clone()
e5:SetCode(EVENT_SUMMON)
c:RegisterEffect(e5)
local e6=e4:Clone()
e6:SetCode(EVENT_FLIP_SUMMON)
c:RegisterEffect(e6)
end
function c1200047.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 c1200047.target(e,tp,eg,ep,ev,re,r,rp,chk)
if chk==0 then return Duel.GetFieldGroupCount(tp,LOCATION_DECK,0)>0 end
end
function c1200047.operation(e,tp,eg,ep,ev,re,r,rp)
local c=e:GetHandler()
if not (c:IsRelateToEffect(e) or Duel.GetFieldGroupCount(tp,LOCATION_DECK,0)>0) then return false end
local g=Duel.GetDecktopGroup(tp,1)
local tc=g:GetFirst()
if (tc:IsSetCard(0xfba) or tc:IsSetCard(0xfbc)) then Duel.SendtoHand(tc,nil,REASON_EFFECT) end
if not (tc:IsSetCard(0xfba) or tc:IsSetCard(0xfbc)) then Duel.Overlay(e:GetHandler(),Group.FromCards(tc)) end
end
function c1200047.condition1(e,tp,eg,ep,ev,re,r,rp)
return e:GetHandler():GetOverlayCount()==0 and Duel.GetCurrentChain()==0
end
function c1200047.cost1(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 c1200047.target1(e,tp,eg,ep,ev,re,r,rp,chk)
if chk==0 then return true end
Duel.SetOperationInfo(0,CATEGORY_DISABLE_SUMMON,eg,1,0,0)
Duel.SetOperationInfo(0,CATEGORY_DESTROY,eg,1,0,0)
end
function c1200047.operation1(e,tp,eg,ep,ev,re,r,rp,chk)
Duel.NegateSummon(eg)
Duel.Destroy(eg,REASON_EFFECT)
end
\ No newline at end of file
--LA Da'ath 勝利的亞娜兒
function c1200048.initial_effect(c)
--xyz summon
aux.AddXyzProcedure(c,aux.FilterBoolFunction(Card.IsSetCard,0xfba),8,2)
c:EnableReviveLimit()
--pendulum summon
aux.EnablePendulumAttribute(c)
--Activate
local e1=Effect.CreateEffect(c)
e1:SetDescription(aux.Stringid(1200048,0))
e1:SetProperty(EFFECT_FLAG_CARD_TARGET)
e1:SetType(EFFECT_TYPE_IGNITION)
e1:SetRange(LOCATION_PZONE)
e1:SetCountLimit(1,1200048)
e1:SetTarget(c1200048.target)
e1:SetOperation(c1200048.activate)
c:RegisterEffect(e1)
--negate
local e3=Effect.CreateEffect(c)
e3:SetDescription(aux.Stringid(1200048,1))
e3:SetCategory(CATEGORY_DISABLE)
e3:SetProperty(EFFECT_FLAG_CARD_TARGET)
e3:SetType(EFFECT_TYPE_IGNITION)
e3:SetRange(LOCATION_PZONE)
e3:SetCountLimit(1,1200048)
e3:SetTarget(c1200048.target2)
e3:SetOperation(c1200048.operation2)
c:RegisterEffect(e3)
--Destroy
local e3=Effect.CreateEffect(c)
e3:SetDescription(aux.Stringid(1200048,2))
e3:SetCategory(CATEGORY_DAMAGE+CATEGORY_DESTROY)
e3:SetType(EFFECT_TYPE_IGNITION)
e3:SetRange(LOCATION_MZONE)
e3:SetCountLimit(1)
e3:SetCondition(c1200048.descon)
e3:SetCost(c1200048.descost)
e3:SetTarget(c1200048.destg)
e3:SetOperation(c1200048.desop)
c:RegisterEffect(e3)
--tohand
local e3=Effect.CreateEffect(c)
e3:SetDescription(aux.Stringid(1200048,3))
e3:SetCategory(CATEGORY_TOHAND)
e3:SetType(EFFECT_TYPE_QUICK_O)
e3:SetCode(EVENT_FREE_CHAIN)
e3:SetRange(LOCATION_MZONE)
e3:SetCountLimit(1)
e3:SetCondition(c1200048.thcon)
e3:SetCost(c1200048.thcost)
e3:SetTarget(c1200048.thtg)
e3:SetOperation(c1200048.thop)
c:RegisterEffect(e3)
--pendulum
local e4=Effect.CreateEffect(c)
e3:SetDescription(aux.Stringid(1200048,4))
e4:SetType(EFFECT_TYPE_SINGLE+EFFECT_TYPE_TRIGGER_O)
e4:SetCode(EVENT_LEAVE_FIELD)
e4:SetProperty(EFFECT_FLAG_DELAY)
e4:SetCondition(c1200048.pencon)
e4:SetTarget(c1200048.pentg)
e4:SetOperation(c1200048.penop)
c:RegisterEffect(e4)
end
c1200048.pendulum_level=8
function c1200048.filter(c)
return c:IsSetCard(0xfbc) and c:IsType(TYPE_CONTINUOUS)
end
function c1200048.target(e,tp,eg,ep,ev,re,r,rp,chk,chkc)
if chkc then return chkc:IsLocation(LOCATION_GRAVE) and chkc:IsControler(tp) and c1200048.filter(chkc) end
if chk==0 then return Duel.GetLocationCount(tp,LOCATION_SZONE)>0
and Duel.IsExistingTarget(c1200048.filter,tp,LOCATION_GRAVE,0,1,nil) end
local g=Duel.SelectTarget(tp,c1200048.filter,tp,LOCATION_GRAVE,0,1,1,nil)
end
function c1200048.activate(e,tp,eg,ep,ev,re,r,rp)
local c=e:GetHandler()
if not c:IsRelateToEffect(e) then return false end
if Duel.GetLocationCount(tp,LOCATION_SZONE)<=0 then return false end
local tc=Duel.GetFirstTarget()
if tc:IsRelateToEffect(e) then
Duel.MoveToField(tc,tp,tp,LOCATION_SZONE,POS_FACEUP,true)
Duel.RaiseEvent(tc,EVENT_CHAIN_SOLVED,tc:GetActivateEffect(),0,tp,tp,Duel.GetCurrentChain())
end
end
function c1200048.nfilter(c)
return c:IsFaceup() and not c:IsDisabled()
end
function c1200048.target2(e,tp,eg,ep,ev,re,r,rp,chk,chkc)
if chkc then return chkc:IsLocation(LOCATION_MZONE) and c1200048.nfilter(chkc) end
if chk==0 then return Duel.IsExistingTarget(c1200048.nfilter,tp,LOCATION_MZONE,LOCATION_MZONE,1,nil) end
Duel.Hint(HINT_SELECTMSG,tp,HINTMSG_FACEUP)
local eg=Duel.SelectTarget(tp,c1200048.nfilter,tp,LOCATION_MZONE,LOCATION_MZONE,1,1,nil)
Duel.SetOperationInfo(0,CATEGORY_DISABLE,eg,1,0,0)
end
function c1200048.operation2(e,tp,eg,ep,ev,re,r,rp)
local c=e:GetHandler()
local tc=Duel.GetFirstTarget()
if c:IsFaceup() and c:IsRelateToEffect(e) and tc:IsFaceup() and tc:IsRelateToEffect(e) then
Duel.NegateRelatedChain(tc,RESET_TURN_SET)
local e1=Effect.CreateEffect(c)
e1:SetType(EFFECT_TYPE_SINGLE)
e1:SetProperty(EFFECT_FLAG_CANNOT_DISABLE)
e1:SetCode(EFFECT_DISABLE)
e1:SetReset(RESET_EVENT+0x1fe0000+RESET_PHASE+PHASE_END)
tc:RegisterEffect(e1)
local e2=Effect.CreateEffect(c)
e2:SetType(EFFECT_TYPE_SINGLE)
e2:SetProperty(EFFECT_FLAG_CANNOT_DISABLE)
e2:SetCode(EFFECT_DISABLE_EFFECT)
e2:SetValue(RESET_TURN_SET)
e2:SetReset(RESET_EVENT+0x1fe0000+RESET_PHASE+PHASE_END)
tc:RegisterEffect(e2)
end
end
function c1200048.descon(e,tp,eg,ep,ev,re,r,rp)
local cg=e:GetHandler():GetOverlayGroup()
return cg:IsExists(Card.IsType,1,nil,TYPE_XYZ)
end
function c1200048.descost(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 c1200048.desfilter(c,atk)
return c:IsFaceup() and c:GetAttack()<atk
end
function c1200048.destg(e,tp,eg,ep,ev,re,r,rp,chk,chkc)
local atk=e:GetHandler():GetAttack()
if chk==0 then return Duel.IsExistingMatchingCard(c1200048.desfilter,tp,LOCATION_ONFIELD,LOCATION_ONFIELD,1,nil,atk) end
Duel.SetOperationInfo(0,CATEGORY_DESTROY,0,0,0,0)
Duel.SetOperationInfo(0,CATEGORY_DAMAGE,0,0,tp,0)
Duel.SetOperationInfo(0,CATEGORY_DAMAGE,0,0,1-tp,0)
Duel.SetChainLimit(aux.FALSE)
end
function c1200048.desop(e,tp,eg,ep,ev,re,r,rp,chk,chkc)
local c=e:GetHandler()
if not c:IsRelateToEffect(e) then return false end
local atk=c:GetAttack()
local dg=Duel.GetMatchingGroup(c1200048.desfilter,tp,LOCATION_ONFIELD,LOCATION_ONFIELD,nil,atk)
if dg:GetCount()>0 then
local m=Duel.Destroy(dg,REASON_EFFECT)
if m>0 then
Duel.BreakEffect()
Duel.Damage(tp,m*1000,REASON_EFFECT)
Duel.Damage(1-tp,m*1000,REASON_EFFECT)
end
end
end
function c1200048.thcon(e,tp,eg,ep,ev,re,r,rp)
return e:GetHandler():GetOverlayCount()==0
end
function c1200048.thcost(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 c1200048.thtg(e,tp,eg,ep,ev,re,r,rp,chk,chkc)
if chk==0 then return Duel.IsExistingMatchingCard(Card.IsAbleToHand,tp,LOCATION_SZONE,0,1,nil) end
Duel.SetOperationInfo(0,CATEGORY_TOHAND,0,0,tp,LOCATION_SZONE)
end
function c1200048.thop(e,tp,eg,ep,ev,re,r,rp,chk,chkc)
local c=e:GetHandler()
local g=Duel.GetMatchingGroup(Card.IsAbleToHand,tp,LOCATION_SZONE,0,nil)
if g:GetCount()>0 then
if Duel.SendtoHand(g,nil,REASON_EFFECT)>0 then
local e1=Effect.CreateEffect(e:GetHandler())
e1:SetType(EFFECT_TYPE_FIELD)
e1:SetCode(EFFECT_CHANGE_DAMAGE)
e1:SetProperty(EFFECT_FLAG_PLAYER_TARGET)
e1:SetTargetRange(1,0)
e1:SetValue(0)
e1:SetReset(RESET_PHASE+PHASE_END)
Duel.RegisterEffect(e1,tp)
end
end
end
function c1200048.pencon(e,tp,eg,ep,ev,re,r,rp)
local c=e:GetHandler()
return c:IsPreviousLocation(LOCATION_MZONE)
end
function c1200048.pentg(e,tp,eg,ep,ev,re,r,rp,chk)
if chk==0 then return Duel.CheckLocation(tp,LOCATION_PZONE,0) or Duel.CheckLocation(tp,LOCATION_PZONE,1) end
end
function c1200048.penop(e,tp,eg,ep,ev,re,r,rp)
if not Duel.CheckLocation(tp,LOCATION_PZONE,0) and not Duel.CheckLocation(tp,LOCATION_PZONE,1) then return end
local c=e:GetHandler()
Duel.MoveToField(c,tp,tp,LOCATION_SZONE,POS_FACEUP,true)
end
\ No newline at end of file
--LA Da'ath 王國的尚達鳳
function c1200049.initial_effect(c)
--xyz summon
aux.AddXyzProcedure(c,aux.FilterBoolFunction(Card.IsSetCard,0xfba),6,2)
c:EnableReviveLimit()
--spsummon limit
local e1=Effect.CreateEffect(c)
e1:SetProperty(EFFECT_FLAG_CANNOT_DISABLE+EFFECT_FLAG_UNCOPYABLE)
e1:SetType(EFFECT_TYPE_SINGLE)
e1:SetCode(EFFECT_SPSUMMON_CONDITION)
e1:SetValue(aux.xyzlimit)
c:RegisterEffect(e1)
--Overlay
local e2=Effect.CreateEffect(c)
e2:SetDescription(aux.Stringid(1200049,0))
e2:SetType(EFFECT_TYPE_IGNITION)
e2:SetRange(LOCATION_MZONE)
e2:SetCountLimit(1)
e2:SetTarget(c1200049.tg)
e2:SetOperation(c1200049.op)
c:RegisterEffect(e2)
--Destroy
local e2=Effect.CreateEffect(c)
e2:SetDescription(aux.Stringid(1200049,1))
e2:SetType(EFFECT_TYPE_IGNITION)
e2:SetRange(LOCATION_MZONE)
e2:SetCountLimit(1)
e2:SetTarget(c1200049.dtg)
e2:SetOperation(c1200049.dop)
c:RegisterEffect(e2)
end
function c1200049.olfilter(c)
return c:IsSetCard(0xfba) and c:IsType(TYPE_MONSTER)
end
function c1200049.tg(e,tp,eg,ep,ev,re,r,rp,chk,chkc)
if chk==0 then return Duel.IsExistingMatchingCard(c1200049.olfilter,tp,LOCATION_HAND+LOCATION_MZONE+LOCATION_GRAVE+LOCATION_REMOVED,0,1,nil) end
end
function c1200049.op(e,tp,eg,ep,ev,re,r,rp,chk,chkc)
if not Duel.IsExistingMatchingCard(c1200049.olfilter,tp,LOCATION_HAND+LOCATION_MZONE+LOCATION_GRAVE+LOCATION_REMOVED,0,1,e:GetHandler()) then return false end
local g=Duel.SelectMatchingCard(tp,c1200049.olfilter,tp,LOCATION_HAND+LOCATION_MZONE+LOCATION_GRAVE+LOCATION_REMOVED,0,1,1,e:GetHandler())
local tc=g:GetFirst()
if e:GetHandler():IsRelateToEffect(e) then
Duel.Overlay(e:GetHandler(),Group.FromCards(tc))
end
end
function c1200049.dtg(e,tp,eg,ep,ev,re,r,rp,chk,chkc)
if chk==0 then return Duel.IsExistingMatchingCard(nil,tp,0,LOCATION_ONFIELD,1,nil) and e:GetHandler():GetOverlayCount()>0 end
SetOperationInfo(0,CATEGORY_DESTROY,0,0,0,0)
end
function c1200049.ffilter(c,e,tp)
return c:IsType(TYPE_MONSTER) and c:IsCanBeSpecialSummoned(e,0,tp,false,false)
end
function c1200049.dop(e,tp,eg,ep,ev,re,r,rp,chk,chkc)
local c=e:GetHandler()
if c:GetOverlayCount()<1 then return false end
local m=c:GetOverlayCount()
c:RemoveOverlayCard(tp,1,m,REASON_EFFECT)
local g=Duel.GetOperatedGroup()
local n=g:GetCount()
if not Duel.IsExistingMatchingCard(nil,tp,0,LOCATION_ONFIELD,1,nil) then return false end
local dg=Duel.SelectMatchingCard(tp,nil,tp,0,LOCATION_ONFIELD,1,n,nil)
Duel.Destroy(dg,REASON_EFFECT)
Duel.BreakEffect()
if g:IsExists(Card.IsType,1,nil,TYPE_FUSION) and Duel.IsExistingMatchingCard(c1200049.ffilter,tp,LOCATION_HAND,0,1,nil,e,tp) then
local fg=Duel.SelectMatchingCard(tp,c1200049.ffilter,tp,LOCATION_HAND,0,1,1,nil,e,tp)
Duel.SpecialSummon(fg,0,tp,tp,false,false,POS_FACEUP)
end
if g:IsExists(Card.IsType,1,nil,TYPE_SYNCHRO) and Duel.IsPlayerCanDraw(tp,1) then
Duel.Draw(tp,1,REASON_EFFECT)
Duel.DiscardHand(tp,Card.IsDiscardable,1,1,REASON_EFFECT,nil)
end
if g:IsExists(Card.IsType,1,nil,TYPE_XYZ) and Duel.IsExistingMatchingCard(Card.IsAbleToRemove,tp,LOCATION_GRAVE,LOCATION_GRAVE,1,nil) then
local xg=Duel.IsExistingMatchingCard(Card.IsAbleToRemove,tp,LOCATION_GRAVE,LOCATION_GRAVE,1,1,nil)
Duel.Remove(xg,POS_FACEUP,REASON_EFFECT)
end
if g:IsExists(Card.IsType,1,nil,TYPE_PENDULUM) and Duel.IsExistingMatchingCard(Card.IsAbleToHand,tp,LOCATION_ONFIELD,LOCATION_ONFIELD,1,nil) then
local pg=Duel.IsExistingMatchingCard(Card.IsAbleToHand,tp,LOCATION_ONFIELD,LOCATION_ONFIELD,1,1,nil)
Duel.SendtoHand(pg,nil,REASON_EFFECT)
end
end
\ No newline at end of file
--LA SGA 希望的特普勒
function c1200050.initial_effect(c)
c:SetUniqueOnField(1,0,1200050)
--fusion material
c:EnableReviveLimit()
aux.AddFusionProcFunFun(c,aux.FilterBoolFunction(Card.IsFusionCode,1200043),c1200050.ffilter,2,true)
--special summon rule
local e2=Effect.CreateEffect(c)
e2:SetType(EFFECT_TYPE_FIELD)
e2:SetCode(EFFECT_SPSUMMON_PROC)
e2:SetProperty(EFFECT_FLAG_UNCOPYABLE)
e2:SetRange(LOCATION_EXTRA)
e2:SetCondition(c1200050.sprcon)
e2:SetOperation(c1200050.sprop)
c:RegisterEffect(e2)
--fimbulvinter
local e1=Effect.CreateEffect(c)
e1:SetDescription(aux.Stringid(1200050,0))
e1:SetType(EFFECT_TYPE_SINGLE+EFFECT_TYPE_TRIGGER_O)
e1:SetCode(EVENT_SPSUMMON_SUCCESS)
e1:SetCountLimit(1)
e1:SetCondition(c1200050.con)
e1:SetTarget(c1200050.tg)
e1:SetOperation(c1200050.op)
c:RegisterEffect(e1)
--atk/def
local e6=Effect.CreateEffect(c)
e6:SetType(EFFECT_TYPE_SINGLE)
e6:SetCode(EFFECT_UPDATE_ATTACK)
e6:SetProperty(EFFECT_FLAG_SINGLE_RANGE)
e6:SetRange(LOCATION_MZONE)
e6:SetValue(c1200050.adval)
c:RegisterEffect(e6)
--cannot announce
local e3=Effect.CreateEffect(c)
e3:SetType(EFFECT_TYPE_FIELD)
e3:SetRange(LOCATION_MZONE)
e3:SetCode(EFFECT_CANNOT_ATTACK_ANNOUNCE)
e3:SetTargetRange(LOCATION_MZONE,0)
e3:SetTarget(c1200050.antarget)
c:RegisterEffect(e3)
end
function c1200050.ffilter(c)
return (c:IsFusionCode(1200041) or c:IsFusionCode(1200042) or c:IsFusionCode(1200043) or c:IsFusionCode(1200050))
end
function c1200050.spfilter1(c,tp,ft)
if c:IsFusionCode(1200043) and c:IsReleasable() and c:IsCanBeFusionMaterial(nil,true) and (c:IsControler(tp) or c:IsFaceup()) then
if ft>0 or (c:IsControler(tp) and c:IsLocation(LOCATION_MZONE)) then
return Duel.IsExistingMatchingCard(c1200050.spfilter2,tp,LOCATION_MZONE,LOCATION_MZONE,2,c,tp,nil)
else
return Duel.IsExistingMatchingCard(c1200050.spfilter3,tp,LOCATION_MZONE,0,1,c,tp,c)
end
else return false end
end
function c1200050.spfilter2(c,tp,rc)
return c:IsCode(1200041,1200042,1200043,1200045) and c:IsReleasable() and c:IsCanBeFusionMaterial() and (c:IsControler(tp) or c:IsFaceup()) and c~=rc
end
function c1200050.spfilter3(c,tp,rc)
return c:IsCode(1200041,1200042,1200043,1200045) and c:IsReleasable() and c:IsCanBeFusionMaterial() and (c:IsControler(tp) or c:IsFaceup()) and Duel.IsExistingMatchingCard(c1200050.spfilter2,tp,LOCATION_MZONE,LOCATION_MZONE,2,c,tp,rc)
end
function c1200050.sprcon(e,c)
if c==nil then return true end
local tp=c:GetControler()
local ft=Duel.GetLocationCount(tp,LOCATION_MZONE)
return ft>-1 and Duel.IsExistingMatchingCard(c1200050.spfilter1,tp,LOCATION_MZONE,LOCATION_MZONE,1,nil,tp,ft)
end
function c1200050.sprop(e,tp,eg,ep,ev,re,r,rp,c)
local ft=Duel.GetLocationCount(tp,LOCATION_MZONE)
local g1=Duel.SelectMatchingCard(tp,c1200050.spfilter1,tp,LOCATION_MZONE,LOCATION_MZONE,1,1,nil,tp,ft)
local tc=g1:GetFirst()
local g=Duel.GetMatchingGroup(c1200050.spfilter2,tp,LOCATION_MZONE,LOCATION_MZONE,tc,tp,nil)
local g2=nil
if ft>0 or (tc:IsControler(tp) and tc:IsLocation(LOCATION_MZONE)) then
g2=g:Select(tp,2,2,nil)
else
g2=g:FilterSelect(tp,Card.IsControler,1,1,nil,tp)
local g3=g:Select(tp,1,1,g2:GetFirst())
g2:Merge(g3)
end
g1:Merge(g2)
Duel.Release(g1,REASON_COST)
end
function c1200050.con(e,tp,eg,ep,ev,re,r,rp)
return e:GetHandler():IsSummonType(SUMMON_TYPE_FUSION)
end
function c1200050.spfilter4(c,e,tp)
return c:IsType(TYPE_MONSTER) and c:IsCode(1200011,1200012,1200013,1200014,1200015,1200016,1200041,1200042,1200043,1200050) and c:IsCanBeSpecialSummoned(e, 0, tp, false, false)
end
function c1200050.tg(e,tp,eg,ep,ev,re,r,rp,chk)
if chk==0 then return Duel.GetLocationCount(tp, LOCATION_MZONE) > 0
and Duel.IsExistingMatchingCard(c1200050.spfilter4, tp, LOCATION_GRAVE, 0, 1, nil, e, tp) end
Duel.SetOperationInfo(0, CATEGORY_SPECIAL_SUMMON, nil, 1, 0, 0)
end
function c1200050.op(e,tp,eg,ep,ev,re,r,rp)
local ft = Duel.GetLocationCount(tp,LOCATION_MZONE)
if ft < 1 then return end
local g = Duel.GetMatchingGroup(c1200050.spfilter4, tp, LOCATION_GRAVE, 0, nil, e, tp)
local count = g:GetCount()
if count < 1 then return end
local min = math.min(count, ft)
local sg = Duel.SelectMatchingCard(tp, c1200050.spfilter4, tp, LOCATION_GRAVE, 0, min, ft, nil, e, tp)
Duel.SpecialSummon(sg, 0, tp, tp, false, false, POS_FACEUP)
local e1=Effect.CreateEffect(e:GetHandler())
e1:SetType(EFFECT_TYPE_FIELD)
e1:SetCode(EFFECT_CHANGE_DAMAGE)
e1:SetProperty(EFFECT_FLAG_PLAYER_TARGET)
e1:SetTargetRange(0, 1)
e1:SetValue(0)
e1:SetReset(RESET_PHASE+PHASE_END)
Duel.RegisterEffect(e1,tp)
end
function c1200050.vfilter(c)
return c:IsType(TYPE_MONSTER) and c:IsSetCard(0xfba) and c:IsFaceup() and not c:IsCode(1200050)
end
function c1200050.adval(e,c)
local vg=Duel.GetMatchingGroup(c1200050.vfilter,tp,LOCATION_MZONE,0,nil)
local sum=vg:GetSum(Card.GetAttack)
return sum
end
function c1200050.antarget(e,c)
return c~=e:GetHandler()
end
\ No newline at end of file
--LA CSGA 拒絕的羅弗寇
function c1200055.initial_effect(c)
--fusion material
c:EnableReviveLimit()
aux.AddFusionProcFun2(c,aux.FilterBoolFunction(Card.IsFusionSetCard,0xfba),c1200055.ffilter,true)
--pendulum summon
aux.EnablePendulumAttribute(c)
--special summon rule
local e2=Effect.CreateEffect(c)
e2:SetType(EFFECT_TYPE_FIELD)
e2:SetCode(EFFECT_SPSUMMON_PROC)
e2:SetProperty(EFFECT_FLAG_UNCOPYABLE)
e2:SetRange(LOCATION_EXTRA)
e2:SetCondition(c1200055.spcon)
e2:SetOperation(c1200055.spop)
c:RegisterEffect(e2)
--des
local e2=Effect.CreateEffect(c)
e2:SetDescription(aux.Stringid(1200055,0))
e2:SetCategory(CATEGORY_DAMAGE+CATEGORY_ATKCHANGE)
e2:SetType(EFFECT_TYPE_SINGLE+EFFECT_TYPE_TRIGGER_O)
e2:SetProperty(EFFECT_FLAG_CARD_TARGET)
e2:SetCode(EVENT_SPSUMMON_SUCCESS)
e2:SetTarget(c1200055.target2)
e2:SetOperation(c1200055.operation2)
c:RegisterEffect(e2)
--pendulum
local e4=Effect.CreateEffect(c)
e4:SetDescription(aux.Stringid(1200055,1))
e4:SetType(EFFECT_TYPE_SINGLE+EFFECT_TYPE_TRIGGER_O)
e4:SetCode(EVENT_LEAVE_FIELD)
e4:SetProperty(EFFECT_FLAG_DELAY)
e4:SetCondition(c1200055.pencon)
e4:SetTarget(c1200055.pentg)
e4:SetOperation(c1200055.penop)
c:RegisterEffect(e4)
--to grave
local e2=Effect.CreateEffect(c)
e2:SetDescription(aux.Stringid(1200055,2))
e2:SetCategory(CATEGORY_TOGRAVE)
e2:SetType(EFFECT_TYPE_IGNITION)
e2:SetRange(LOCATION_PZONE)
e2:SetCountLimit(1)
e2:SetCost(c1200055.pcost)
e2:SetTarget(c1200055.ptg)
e2:SetOperation(c1200055.pop)
c:RegisterEffect(e2)
--to grave
local e2=Effect.CreateEffect(c)
e2:SetDescription(aux.Stringid(1200055,3))
e2:SetProperty(EFFECT_FLAG_CARD_TARGET+EFFECT_FLAG_NO_TURN_RESET)
e2:SetType(EFFECT_TYPE_IGNITION)
e2:SetRange(LOCATION_PZONE)
e2:SetCountLimit(1)
e2:SetTarget(c1200055.pptg)
e2:SetOperation(c1200055.ppop)
c:RegisterEffect(e2)
end
function c1200055.ffilter(c)
return not c:IsRace(RACE_WINDBEAST)
end
function c1200055.matfilter(c)
return (c:IsSetCard(0xfba) or not c:IsRace(RACE_WINDBEAST)) and c:IsReleasable() and c:IsFaceup()
end
function c1200055.cfilter1(c,tp,g)
return g:IsExists(c1200055.cfilter2,1,c,tp,c) and c:IsFaceup()
end
function c1200055.cfilter2(c,tp,mc)
return ((c:IsSetCard(0xfba) and not mc:IsRace(RACE_WINDBEAST)) or (mc:IsSetCard(0xfba) and not c:IsRace(RACE_WINDBEAST)))
and Duel.GetLocationCountFromEx(tp,tp,Group.FromCards(c,mc))>0 and c:IsFaceup() and mc:IsFaceup()
end
function c1200055.spcon(e,c)
if c==nil then return true end
local tp=c:GetControler()
local g=Duel.GetMatchingGroup(c1200055.matfilter,tp,LOCATION_MZONE,0,nil)
return g:IsExists(c1200055.cfilter1,1,nil,tp,g)
end
function c1200055.spop(e,tp,eg,ep,ev,re,r,rp,c)
local g=Duel.GetMatchingGroup(c1200055.matfilter,tp,LOCATION_MZONE,0,nil)
local g1=g:FilterSelect(tp,c1200055.cfilter1,1,1,nil,tp,g)
local mc=g1:GetFirst()
local g2=g:FilterSelect(tp,c1200055.cfilter2,1,1,mc,tp,mc)
g1:Merge(g2)
Duel.Release(g1,POS_FACEUP,REASON_COST)
end
function c1200055.filter2(c)
return c:IsFaceup() and c:GetAttack()~=c:GetBaseAttack()
end
function c1200055.target2(e,tp,eg,ep,ev,re,r,rp,chk,chkc)
if chkc then return chkc:GetLocation()==LOCATION_MZONE and c1200055.filter2(chkc) end
if chk==0 then return Duel.IsExistingTarget(c1200055.filter2,tp,LOCATION_MZONE,LOCATION_MZONE,1,nil) end
local g=Duel.SelectTarget(tp,c1200055.filter2,tp,LOCATION_MZONE,LOCATION_MZONE,1,1,nil)
Duel.SetOperationInfo(0,CATEGORY_DAMAGE,0,0,1-tp,0)
end
function c1200055.operation2(e,tp,eg,ep,ev,re,r,rp)
local c=e:GetHandler()
local tc=Duel.GetFirstTarget()
if tc:IsRelateToEffect(e) and tc:IsFaceup() then
local m=math.abs(tc:GetAttack()-tc:GetBaseAttack())
Duel.Damage(1-tp,m,REASON_EFFECT)
if c:IsFaceup() and c:IsRelateToEffect(e) then
local e1=Effect.CreateEffect(c)
e1:SetType(EFFECT_TYPE_SINGLE)
e1:SetCode(EFFECT_UPDATE_ATTACK)
e1:SetValue(m)
e1:SetReset(RESET_EVENT+0x1ff0000)
c:RegisterEffect(e1)
end
end
end
function c1200055.pencon(e,tp,eg,ep,ev,re,r,rp)
local c=e:GetHandler()
return c:IsPreviousLocation(LOCATION_MZONE)
end
function c1200055.pentg(e,tp,eg,ep,ev,re,r,rp,chk)
if chk==0 then return Duel.CheckLocation(tp,LOCATION_PZONE,0) or Duel.CheckLocation(tp,LOCATION_PZONE,1) end
end
function c1200055.penop(e,tp,eg,ep,ev,re,r,rp)
if not Duel.CheckLocation(tp,LOCATION_PZONE,0) and not Duel.CheckLocation(tp,LOCATION_PZONE,1) then return end
local c=e:GetHandler()
Duel.MoveToField(c,tp,tp,LOCATION_SZONE,POS_FACEUP,true)
end
function c1200055.pcost(e,tp,eg,ep,ev,re,r,rp,chk)
if chk==0 then return Duel.IsExistingMatchingCard(Card.IsDestructable,tp,LOCATION_PZONE,0,1,e:GetHandler()) end
local g=Duel.GetMatchingGroup(Card.IsDestructable,tp,LOCATION_PZONE,0,e:GetHandler())
Duel.Destroy(g,REASON_COST)
end
function c1200055.ptg(e,tp,eg,ep,ev,re,r,rp,chk)
if chk==0 then return Duel.IsExistingMatchingCard(Card.IsSetCard,tp,LOCATION_DECK,0,1,nil,0xfba) end
Duel.SetOperationInfo(0,CATEGORY_TOGRAVE,0,1,tp,LOCATION_DECK)
end
function c1200055.pop(e,tp,eg,ep,ev,re,r,rp)
local c=e:GetHandler()
if not (c:IsRelateToEffect(e) or Duel.IsExistingMatchingCard(Card.IsSetCard,tp,LOCATION_DECK,0,1,nil,0xfba)) then return false end
local g=Duel.SelectMatchingCard(tp,Card.IsSetCard,tp,LOCATION_DECK,0,1,1,nil,0xfba)
if g:GetCount()>0 then
Duel.SendtoGrave(g,REASON_EFFECT)
end
end
function c1200055.ppfilter(c)
return c:IsSetCard(0xfba) and c:IsType(TYPE_PENDULUM)
end
function c1200055.pptg(e,tp,eg,ep,ev,re,r,rp,chk,chkc)
if chkc then return chkc:IsLocation(LOCATION_GRAVE) and c1200055.ppfilter(chkc) end
if chk==0 then return (Duel.CheckLocation(tp,LOCATION_PZONE,0) or Duel.CheckLocation(tp,LOCATION_PZONE,1)) and Duel.IsExistingTarget(c1200055.ppfilter,tp,LOCATION_GRAVE,0,1,nil) end
local g=Duel.SelectTarget(tp,c1200055.ppfilter,tp,LOCATION_GRAVE,0,1,1,nil)
end
function c1200055.ppop(e,tp,eg,ep,ev,re,r,rp)
local c=e:GetHandler()
local tc=Duel.GetFirstTarget()
if tc:IsRelateToEffect(e) and (Duel.CheckLocation(tp,LOCATION_PZONE,0) or Duel.CheckLocation(tp,LOCATION_PZONE,1)) then
if Duel.MoveToField(tc,tp,tp,LOCATION_SZONE,POS_FACEUP,true) then
Duel.BreakEffect()
Duel.BreakEffect()
local e1=Effect.CreateEffect(c)
e1:SetType(EFFECT_TYPE_SINGLE)
e1:SetCode(EFFECT_UPDATE_LSCALE)
e1:SetValue(tc:GetLevel()+tc:GetRank())
e1:SetReset(RESET_EVENT+0x1ff0000)
c:RegisterEffect(e1)
local e2=e1:Clone()
e2:SetCode(EFFECT_UPDATE_RSCALE)
c:RegisterEffect(e2)
end
end
end
\ No newline at end of file
--LA SY 先負的菲斯特菲
function c12001000.initial_effect(c)
--pendulum summon
aux.EnablePendulumAttribute(c)
local e1=Effect.CreateEffect(c)
e1:SetDescription(aux.Stringid(12001000,0))
e1:SetCategory(CATEGORY_DECKDES)
e1:SetType(EFFECT_TYPE_SINGLE+EFFECT_TYPE_TRIGGER_O)
e1:SetProperty(EFFECT_FLAG_DAMAGE_STEP)
e1:SetCode(EVENT_SUMMON_SUCCESS)
e1:SetCountLimit(1,12001000)
e1:SetTarget(c12001000.target)
e1:SetOperation(c12001000.operation)
c:RegisterEffect(e1)
local e2=e1:Clone()
e2:SetCode(EVENT_SPSUMMON_SUCCESS)
c:RegisterEffect(e2)
local e3=Effect.CreateEffect(c)
e3:SetDescription(aux.Stringid(12001000,1))
e3:SetCategory(CATEGORY_SPECIAL_SUMMON)
e3:SetType(EFFECT_TYPE_SINGLE+EFFECT_TYPE_TRIGGER_O)
e3:SetProperty(EFFECT_FLAG_CARD_TARGET+EFFECT_FLAG_DELAY)
e3:SetCode(EVENT_TO_GRAVE)
e3:SetCountLimit(1,12001100)
e3:SetCondition(c12001000.spcon)
e3:SetTarget(c12001000.sptg)
e3:SetOperation(c12001000.spop)
c:RegisterEffect(e3)
end
function c12001000.target(e,tp,eg,ep,ev,re,r,rp,chk)
if chk==0 then return Duel.IsPlayerCanDiscardDeck(tp,1) end
end
function c12001000.operation(e,tp,eg,ep,ev,re,r,rp)
if not Duel.IsPlayerCanDiscardDeck(tp,1) then return end
Duel.ConfirmDecktop(tp,1)
local g=Duel.GetDecktopGroup(tp,1)
local tc=g:GetFirst()
if tc:IsSetCard(0xfb0) then
Duel.DisableShuffleCheck()
Duel.SendtoGrave(g,REASON_EFFECT+REASON_REVEAL)
else
Duel.SendtoHand(g,nil,REASON_EFFECT)
Duel.ShuffleDeck(nil)
Duel.SendtoDeck(e:GetHandler(),nil,0,REASON_EFFECT)
end
end
function c12001000.spcon(e,tp,eg,ep,ev,re,r,rp)
local c=e:GetHandler()
return c:IsPreviousLocation(LOCATION_DECK) and c:IsReason(REASON_REVEAL)
end
function c12001000.filter(c,e,tp)
return c:IsSetCard(0xfb0) and c:IsCanBeSpecialSummoned(e,0,tp,false,false)
end
function c12001000.sptg(e,tp,eg,ep,ev,re,r,rp,chk,chkc)
if chkc then return chkc:IsLocation(LOCATION_GRAVE) and chkc:IsControler(tp) and c12001000.filter(chkc,e,tp) end
if chk==0 then return Duel.GetLocationCount(tp,LOCATION_MZONE)>0
and Duel.IsExistingTarget(c12001000.filter,tp,LOCATION_GRAVE,0,1,nil,e,tp) end
Duel.Hint(HINT_SELECTMSG,tp,HINTMSG_SPSUMMON)
local g=Duel.SelectTarget(tp,c12001000.filter,tp,LOCATION_GRAVE,0,1,1,nil,e,tp)
Duel.SetOperationInfo(0,CATEGORY_SPECIAL_SUMMON,g,1,0,0)
end
function c12001000.spop(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 c12001001.initial_effect(c)
--pendulum summon
aux.EnablePendulumAttribute(c)
local e1=Effect.CreateEffect(c)
e1:SetDescription(aux.Stringid(12001001,0))
e1:SetCategory(CATEGORY_TOGRAVE+CATEGORY_DRAW)
e1:SetType(EFFECT_TYPE_IGNITION)
e1:SetCountLimit(1,12001001)
e1:SetRange(LOCATION_HAND)
e1:SetTarget(c12001001.target)
e1:SetOperation(c12001001.operation)
c:RegisterEffect(e1)
local e3=Effect.CreateEffect(c)
e3:SetDescription(aux.Stringid(12001001,1))
e3:SetCategory(CATEGORY_SPECIAL_SUMMON)
e3:SetType(EFFECT_TYPE_SINGLE+EFFECT_TYPE_TRIGGER_O)
e3:SetProperty(EFFECT_FLAG_CARD_TARGET+EFFECT_FLAG_DELAY)
e3:SetCode(EVENT_TO_GRAVE)
e3:SetCountLimit(1,12001101)
e3:SetCondition(c12001001.dscon)
e3:SetTarget(c12001001.dstg)
e3:SetOperation(c12001001.dsop)
c:RegisterEffect(e3)
end
function c12001001.target(e,tp,eg,ep,ev,re,r,rp,chk)
if chk==0 then return Duel.IsPlayerCanDiscardDeck(tp,1) end
end
function c12001001.operation(e,tp,eg,ep,ev,re,r,rp)
if not Duel.IsPlayerCanDiscardDeck(tp,1) then return end
Duel.ConfirmDecktop(tp,1)
local g=Duel.GetDecktopGroup(tp,1)
local tc=g:GetFirst()
if tc:IsSetCard(0xfb0) then
Duel.DisableShuffleCheck()
Duel.SendtoGrave(g,REASON_EFFECT+REASON_REVEAL)
Duel.SpecialSummon(e:GetHandler(),0,tp,tp,false,false,POS_FACEUP)
else
Duel.SendtoHand(g,nil,REASON_EFFECT)
Duel.ShuffleDeck(nil)
Duel.SendtoDeck(e:GetHandler(),nil,0,REASON_EFFECT)
end
end
function c12001001.dscon(e,tp,eg,ep,ev,re,r,rp)
local c=e:GetHandler()
return c:IsPreviousLocation(LOCATION_DECK) and c:IsReason(REASON_REVEAL)
end
function c12001001.filter(c)
return c:IsPosition(POS_FACEUP_ATTACK)
end
function c12001001.dstg(e,tp,eg,ep,ev,re,r,rp,chk)
if chk==0 then return Duel.IsExistingMatchingCard(c12001001.filter,tp,LOCATION_MZONE,LOCATION_MZONE,1,nil) end
local g=Duel.GetMatchingGroup(c12001001.filter,tp,LOCATION_MZONE,LOCATION_MZONE,nil)
local tg=g:GetMaxGroup(Card.GetAttack)
Duel.SetOperationInfo(0,CATEGORY_DESTROY,tg,1,0,0)
end
function c12001001.dsop(e,tp,eg,ep,ev,re,r,rp)
local g=Duel.GetMatchingGroup(c12001001.filter,tp,LOCATION_MZONE,LOCATION_MZONE,nil)
if g:GetCount()>0 then
local tg=g:GetMaxGroup(Card.GetAttack)
if tg:GetCount()>1 then
Duel.Hint(HINT_SELECTMSG,tp,HINTMSG_DESTROY)
local sg=tg:Select(tp,1,1,nil)
Duel.HintSelection(sg)
local tc=sg:GetFirst()
local atk=tc:IsFaceup() and tc:GetAttack() or 0
if Duel.Destroy(sg,REASON_EFFECT)==1 and atk~=0
then Duel.Recover(tp,atk,REASON_EFFECT)
Duel.Recover(1-tp,atk,REASON_EFFECT)
end
else
local tc=tg:GetFirst()
local atk=tc:IsFaceup() and tc:GetAttack() or 0
if Duel.Destroy(tg,REASON_EFFECT)==1 and atk~=0
then Duel.Recover(tp,atk,REASON_EFFECT)
Duel.Recover(1-tp,atk,REASON_EFFECT)
end
end
end
end
--六曜 友引的夕碧姬
function c12001002.initial_effect(c)
--pendulum summon
aux.EnablePendulumAttribute(c)
local e1=Effect.CreateEffect(c)
e1:SetDescription(aux.Stringid(12001002,0))
e1:SetCategory(CATEGORY_SEARCH+CATEGORY_DECKDES)
e1:SetType(EFFECT_TYPE_IGNITION)
e1:SetRange(LOCATION_MZONE)
e1:SetCountLimit(1,12001002)
e1:SetTarget(c12001002.target)
e1:SetTarget(c12001002.target1)
e1:SetOperation(c12001002.operation)
c:RegisterEffect(e1)
local e2=Effect.CreateEffect(c)
e2:SetDescription(aux.Stringid(12001002,1))
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,12001102)
e2:SetCondition(c12001002.spcon)
e2:SetTarget(c12001002.sptg)
e2:SetOperation(c12001002.spop)
c:RegisterEffect(e2)
end
function c12001002.target(e,tp,eg,ep,ev,re,r,rp,chk)
if chk==0 then return Duel.IsPlayerCanDiscardDeck(tp,1) end
end
function c12001002.filter(c)
return c:IsSetCard(0xfb0) and c:IsAbleToHand() and c:IsType(TYPE_SPELL+TYPE_TRAP)
end
function c12001002.target1(e,tp,eg,ep,ev,re,r,rp,chk)
if chk==0 then return Duel.IsExistingMatchingCard(c12001002.filter,tp,LOCATION_DECK,0,1,nil) end
Duel.SetOperationInfo(0,CATEGORY_TOHAND,nil,1,tp,LOCATION_DECK)
end
function c12001002.operation(e,tp,eg,ep,ev,re,r,rp)
if not Duel.IsPlayerCanDiscardDeck(tp,1) then return end
Duel.ConfirmDecktop(tp,1)
local g=Duel.GetDecktopGroup(tp,1)
local tc=g:GetFirst()
if tc:IsSetCard(0xfb0) then
Duel.DisableShuffleCheck()
Duel.SendtoGrave(g,REASON_EFFECT+REASON_REVEAL)
Duel.Hint(HINT_SELECTMSG,tp,HINTMSG_ATOHAND)
local g=Duel.SelectMatchingCard(tp,c12001002.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
else
Duel.SendtoHand(g,nil,REASON_EFFECT)
Duel.ShuffleDeck(nil)
Duel.SendtoDeck(e:GetHandler(),nil,0,REASON_EFFECT)
end
end
function c12001002.spcon(e,tp,eg,ep,ev,re,r,rp)
local c=e:GetHandler()
return c:IsPreviousLocation(LOCATION_DECK) and c:IsReason(REASON_REVEAL)
end
function c12001002.filter1(c,e,tp)
return c:IsSetCard(0xfb0) and c:IsCanBeSpecialSummoned(e,0,tp,false,false)
end
function c12001002.sptg(e,tp,eg,ep,ev,re,r,rp,chk)
if chk==0 then return Duel.GetLocationCount(tp,LOCATION_MZONE)>0
and Duel.IsExistingMatchingCard(c12001002.filter1,tp,LOCATION_DECK,0,1,nil,e,tp) end
Duel.SetOperationInfo(0,CATEGORY_SPECIAL_SUMMON,nil,1,tp,LOCATION_DECK)
end
function c12001002.spop(e,tp,eg,ep,ev,re,r,rp)
if Duel.GetLocationCount(tp,LOCATION_MZONE)<=0 then return end
Duel.Hint(HINT_SELECTMSG,tp,HINTMSG_SPSUMMON)
local g=Duel.SelectMatchingCard(tp,c12001002.filter1,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 c12001003.initial_effect(c)
--pendulum summon
aux.EnablePendulumAttribute(c)
local e1=Effect.CreateEffect(c)
e1:SetDescription(aux.Stringid(12001003,0))
e1:SetCategory(CATEGORY_SEARCH+CATEGORY_DECKDES)
e1:SetType(EFFECT_TYPE_IGNITION)
e1:SetRange(LOCATION_MZONE)
e1:SetCountLimit(1,12001003)
e1:SetTarget(c12001003.target)
e1:SetOperation(c12001003.operation)
c:RegisterEffect(e1)
local e3=Effect.CreateEffect(c)
e3:SetDescription(aux.Stringid(12001003,1))
e3:SetCategory(CATEGORY_TOGRAVE)
e3:SetType(EFFECT_TYPE_SINGLE+EFFECT_TYPE_TRIGGER_O)
e3:SetProperty(EFFECT_FLAG_CARD_TARGET+EFFECT_FLAG_DELAY)
e3:SetCode(EVENT_TO_GRAVE)
e3:SetCountLimit(1,12001103)
e3:SetCondition(c12001003.dscon)
e3:SetTarget(c12001003.dstg)
e3:SetOperation(c12001003.dsop)
c:RegisterEffect(e3)
end
function c12001003.target(e,tp,eg,ep,ev,re,r,rp,chk)
if chk==0 then return Duel.IsPlayerCanDiscardDeck(tp,1) end
end
function c12001003.operation(e,tp,eg,ep,ev,re,r,rp)
if not Duel.IsPlayerCanDiscardDeck(tp,1) then return end
Duel.ConfirmDecktop(tp,1)
local g=Duel.GetDecktopGroup(tp,1)
local tc=g:GetFirst()
if tc:IsSetCard(0xfb0) then
Duel.DisableShuffleCheck()
Duel.SendtoGrave(g,REASON_EFFECT+REASON_REVEAL)
Duel.ConfirmDecktop(tp,3)
else
Duel.SendtoHand(g,nil,REASON_EFFECT)
Duel.ShuffleDeck(nil)
Duel.SendtoDeck(e:GetHandler(),nil,0,REASON_EFFECT)
end
end
function c12001003.dscon(e,tp,eg,ep,ev,re,r,rp)
local c=e:GetHandler()
return c:IsPreviousLocation(LOCATION_DECK) and c:IsReason(REASON_REVEAL)
end
function c12001003.dstg(e,tp,eg,ep,ev,re,r,rp,chk,chkc)
if chkc then return chkc:IsLocation(LOCATION_MZONE) and c12001003.filter(chkc) end
if chk==0 then return Duel.IsExistingTarget(c12001003.filter,tp,LOCATION_MZONE,LOCATION_MZONE,1,nil) end
Duel.Hint(HINT_SELECTMSG,tp,HINTMSG_FACEUP)
Duel.SelectTarget(tp,c12001003.filter,tp,LOCATION_MZONE,LOCATION_MZONE,1,1,nil)
end
function c12001003.dsop(e,tp,eg,ep,ev,re,r,rp)
local c=e:GetHandler()
local tc=Duel.GetFirstTarget()
if tc:IsRelateToEffect(e) and tc:IsFaceup() then
Duel.NegateRelatedChain(tc,RESET_TURN_SET)
local e1=Effect.CreateEffect(c)
e1:SetType(EFFECT_TYPE_SINGLE)
e1:SetCode(EFFECT_DISABLE)
e1:SetReset(RESET_EVENT+0x1fe0000)
tc:RegisterEffect(e1)
local e2=e1:Clone()
e2:SetCode(EFFECT_DISABLE_EFFECT)
e2:SetValue(RESET_TURN_SET)
tc:RegisterEffect(e2)
local e3=e1:Clone()
e3:SetCode(EFFECT_SET_BASE_ATTACK)
e3:SetValue(tc:GetBaseAttack()/2)
tc:RegisterEffect(e3)
end
end
\ No newline at end of file
--六曜 赤口的斯卡雷特
function c12001004.initial_effect(c)
--pendulum summon
aux.EnablePendulumAttribute(c)
local e1=Effect.CreateEffect(c)
e1:SetCategory(CATEGORY_DESTROY)
e1:SetType(EFFECT_TYPE_QUICK_O)
e1:SetCode(EVENT_FREE_CHAIN)
e1:SetRange(LOCATION_MZONE+LOCATION_HAND)
e1:SetCountLimit(1,12001004)
e1:SetCost(c12001004.cost)
e1:SetTarget(c12001004.target)
e1:SetOperation(c12001004.operation)
c:RegisterEffect(e1)
local e3=Effect.CreateEffect(c)
e3:SetDescription(aux.Stringid(12001004,1))
e3:SetCategory(CATEGORY_TOGRAVE)
e3:SetType(EFFECT_TYPE_SINGLE+EFFECT_TYPE_TRIGGER_O)
e3:SetProperty(EFFECT_FLAG_CARD_TARGET+EFFECT_FLAG_DELAY)
e3:SetCode(EVENT_TO_GRAVE)
e3:SetCountLimit(1,12001104)
e3:SetCondition(c12001004.dscon)
e3:SetTarget(c12001004.dstg)
e3:SetOperation(c12001004.dsop)
c:RegisterEffect(e3)
end
function c12001004.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 c12001004.target(e,tp,eg,ep,ev,re,r,rp,chk)
if chk==0 then return Duel.IsPlayerCanDiscardDeck(tp,1) end
end
function c12001004.operation(e,tp,eg,ep,ev,re,r,rp)
if not Duel.IsPlayerCanDiscardDeck(tp,1) then return end
Duel.ConfirmDecktop(tp,1)
local g=Duel.GetDecktopGroup(tp,1)
local tc=g:GetFirst()
if tc:IsSetCard(0xfb0) then
Duel.DisableShuffleCheck()
Duel.SendtoGrave(g,REASON_EFFECT+REASON_REVEAL)
else
Duel.SendtoHand(g,nil,REASON_EFFECT)
Duel.ShuffleDeck(nil)
Duel.SendtoDeck(e:GetHandler(),nil,0,REASON_EFFECT)
end
end
function c12001004.dscon(e,tp,eg,ep,ev,re,r,rp)
local c=e:GetHandler()
return c:IsPreviousLocation(LOCATION_DECK) and c:IsReason(REASON_REVEAL)
end
function c12001004.dstg(e,tp,eg,ep,ev,re,r,rp,chk)
if chkc then return chkc:IsLocation(LOCATION_ONFIELD) and chkc:IsControler(1-tp) end
if chk==0 then return Duel.IsExistingTarget(aux.TRUE,tp,0,LOCATION_ONFIELD,1,nil) end
Duel.Hint(HINT_SELECTMSG,1-tp,HINTMSG_DESTROY)
local g=Duel.SelectTarget(1-tp,aux.TRUE,tp,0,LOCATION_ONFIELD,1,1,nil)
Duel.SetOperationInfo(0,CATEGORY_REMOVE,g,1,0,0)
end
function c12001004.dsop(e,tp,eg,ep,ev,re,r,rp)
local tc=Duel.GetFirstTarget()
if tc:IsRelateToEffect(e) then
Duel.Remove(tc,POS_FACEUP,REASON_RULE)
end
end
\ No newline at end of file
--六曜 先胜的菲斯特文
function c12001005.initial_effect(c)
--pendulum summon
aux.EnablePendulumAttribute(c)
local e1=Effect.CreateEffect(c)
e1:SetDescription(aux.Stringid(12001005,0))
e1:SetCategory(CATEGORY_DECKDES+CATEGORY_SPECIAL_SUMMON)
e1:SetType(EFFECT_TYPE_SINGLE+EFFECT_TYPE_TRIGGER_O)
e1:SetProperty(EFFECT_FLAG_DAMAGE_STEP)
e1:SetCode(EVENT_SUMMON_SUCCESS)
e1:SetCountLimit(1,12001005)
e1:SetTarget(c12001005.target)
e1:SetTarget(c12001005.target1)
e1:SetOperation(c12001005.operation)
c:RegisterEffect(e1)
local e2=Effect.CreateEffect(c)
e2:SetDescription(aux.Stringid(12001005,2))
e2:SetCategory(CATEGORY_DRAW+CATEGORY_DECKDES)
e2:SetType(EFFECT_TYPE_SINGLE+EFFECT_TYPE_TRIGGER_O)
e2:SetProperty(EFFECT_FLAG_DELAY)
e2:SetCode(EVENT_TO_GRAVE)
e2:SetCountLimit(1,12001105)
e2:SetCondition(c12001005.drcon)
e2:SetTarget(c12001005.drtg)
e2:SetOperation(c12001005.drop)
c:RegisterEffect(e2)
end
function c12001005.target(e,tp,eg,ep,ev,re,r,rp,chk)
if chk==0 then return Duel.IsPlayerCanDiscardDeck(tp,1) end
end
function c12001005.filter1(c,e,tp)
return c:IsSetCard(0xfb0) and c:IsCanBeSpecialSummoned(e,0,tp,false,false)
end
function c12001005.target1(e,tp,eg,ep,ev,re,r,rp,chk)
if chk==0 then return Duel.GetLocationCount(tp,LOCATION_MZONE)>0
and Duel.IsExistingMatchingCard(c12001005.filter,tp,LOCATION_DECK,0,1,nil,e,tp) end
Duel.SetOperationInfo(0,CATEGORY_SPECIAL_SUMMON,nil,1,tp,LOCATION_DECK)
end
function c12001005.operation(e,tp,eg,ep,ev,re,r,rp)
if not Duel.IsPlayerCanDiscardDeck(tp,1) then return end
Duel.ConfirmDecktop(tp,1)
local g=Duel.GetDecktopGroup(tp,1)
local tc=g:GetFirst()
if tc:IsSetCard(0xfb0) then
Duel.DisableShuffleCheck()
Duel.SendtoGrave(g,REASON_EFFECT+REASON_REVEAL)
Duel.Hint(HINT_SELECTMSG,tp,HINTMSG_SPSUMMON)
local g=Duel.SelectMatchingCard(tp,c12001005.filter1,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
else
Duel.SendtoHand(g,nil,REASON_EFFECT)
Duel.ShuffleDeck(nil)
Duel.SendtoDeck(e:GetHandler(),nil,0,REASON_EFFECT)
end
end
function c12001005.drcon(e,tp,eg,ep,ev,re,r,rp)
local c=e:GetHandler()
return c:IsPreviousLocation(LOCATION_DECK) and c:IsReason(REASON_REVEAL)
end
function c12001005.drtg(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)
Duel.SetOperationInfo(0,CATEGORY_HANDES,nil,0,tp,1)
end
function c12001005.drop(e,tp,eg,ep,ev,re,r,rp)
local p=Duel.GetChainInfo(0,CHAININFO_TARGET_PLAYER)
if Duel.Draw(p,2,REASON_EFFECT)==2 then
Duel.ShuffleHand(tp)
Duel.BreakEffect()
Duel.Hint(HINT_SELECTMSG,tp,HINTMSG_TODECK)
local g=Duel.SelectMatchingCard(p,aux.TRUE,p,LOCATION_HAND,0,1,1,nil)
Duel.SendtoDeck(g,nil,0,REASON_EFFECT)
end
end
\ No newline at end of file
--六曜的卜时
function c12001006.initial_effect(c)
local e1=Effect.CreateEffect(c)
e1:SetType(EFFECT_TYPE_ACTIVATE)
e1:SetCode(EVENT_FREE_CHAIN)
c:RegisterEffect(e1)
--announce
local e2=Effect.CreateEffect(c)
e2:SetDescription(aux.Stringid(12001006,0))
e2:SetCategory(CATEGORY_TOHAND+CATEGORY_SEARCH+CATEGORY_DECKDES)
e2:SetType(EFFECT_TYPE_IGNITION)
e2:SetRange(LOCATION_SZONE)
e2:SetCountLimit(1)
e2:SetTarget(c12001006.target)
e2:SetOperation(c12001006.operation)
c:RegisterEffect(e2)
local e4=Effect.CreateEffect(c)
e4:SetCategory(CATEGORY_LEAVE_GRAVE)
e4:SetType(EFFECT_TYPE_QUICK_O)
e4:SetCode(EVENT_FREE_CHAIN)
e4:SetRange(LOCATION_GRAVE)
e4:SetCost(aux.bfgcost)
e4:SetTarget(c12001006.actg)
e4:SetOperation(c12001006.acop)
c:RegisterEffect(e4)
end
function c12001006.target(e,tp,eg,ep,ev,re,r,rp,chk)
if chk==0 then return Duel.IsPlayerCanDiscardDeck(tp,1) end
end
function c12001006.operation(e,tp,eg,ep,ev,re,r,rp)
if not Duel.IsPlayerCanDiscardDeck(tp,1) then return end
Duel.ConfirmDecktop(tp,1)
local g=Duel.GetDecktopGroup(tp,1)
local tc=g:GetFirst()
if tc:IsSetCard(0xfb0) then
Duel.DisableShuffleCheck()
Duel.SendtoGrave(g,REASON_EFFECT+REASON_REVEAL)
Duel.Draw(tp,1,REASON_EFFECT)
else
Duel.SendtoHand(g,nil,REASON_EFFECT)
Duel.ShuffleDeck(nil)
end
local tg=Duel.GetMatchingGroup(Card.IsAbleToDeck,p,LOCATION_HAND,0,nil)
if tg:GetCount()>1 and tg:IsExists(Card.IsSetCard,1,nil,0xfb0) then
Duel.Hint(HINT_SELECTMSG,tp,HINTMSG_TODECK)
local sg1=tg:Select(tp,Card.IsSetCard,1,1,nil,0xfb0)
Duel.ConfirmCards(1-tp,sg1)
Duel.SendtoDeck(sg1,nil,0,REASON_EFFECT)
else
local hg=Duel.GetFieldGroup(tp,LOCATION_HAND,0)
Duel.ConfirmCards(1-tp,hg)
local ct=Duel.SendtoDeck(hg,nil,0,REASON_EFFECT)
Duel.SortDecktop(tp,tp,ct)
end
end
function c12001006.acfilter(c)
return c:IsSetCard(0xfb0) and c:IsAbleToDeck()
end
function c12001006.actg(e,tp,eg,ep,ev,re,r,rp,chk,chkc)
if chkc then return chkc:IsControler(tp) and chkc:IsLocation(LOCATION_GRAVE) and c12001006.acfilter(chkc) end
if chk==0 then return Duel.IsExistingTarget(c12001006.filter1,tp,LOCATION_GRAVE,0,1,nil) end
Duel.Hint(HINT_SELECTMSG,tp,HINTMSG_TODECK)
Duel.SelectTarget(tp,c12001006.acfilter,tp,LOCATION_GRAVE,0,1,1,nil)
end
function c12001006.acop(e,tp,eg,ep,ev,re,r,rp)
local g=Duel.GetChainInfo(0,CHAININFO_TARGET_CARDS)
local sg=g:Filter(Card.IsRelateToEffect,nil,e)
Duel.SendtoDeck(sg,nil,0,REASON_EFFECT)
end
\ No newline at end of file
--六曜的读时
function c12001007.initial_effect(c)
local e1=Effect.CreateEffect(c)
e1:SetCategory(CATEGORY_NEGATE+CATEGORY_DESTROY+CATEGORY_DRAW)
e1:SetType(EFFECT_TYPE_ACTIVATE)
e1:SetProperty(EFFECT_FLAG_DAMAGE_STEP+EFFECT_FLAG_DAMAGE_CAL)
e1:SetCode(EVENT_CHAINING)
e1:SetCondition(c12001007.condition)
e1:SetTarget(c12001007.target)
e1:SetOperation(c12001007.activate)
c:RegisterEffect(e1)
local e2=Effect.CreateEffect(c)
e2:SetType(EFFECT_TYPE_QUICK_O)
e2:SetRange(LOCATION_GRAVE)
e2:SetCode(EVENT_FREE_CHAIN)
e2:SetCondition(c12001007.damcon)
e2:SetCost(aux.bfgcost)
e2:SetOperation(c12001007.damop)
c:RegisterEffect(e2)
end
function c12001007.indtg(e,c)
return c:IsSetCard(0xfb0)
end
function c12001007.cfilter(c)
return c:IsSetCard(0xfb0) and c:IsType(TYPE_MONSTER)
end
function c12001007.damcon(e,tp,eg,ep,ev,re,r,rp)
return Duel.IsExistingMatchingCard(c12001007.cfilter,tp,LOCATION_GRAVE,0,1,nil)
end
function c12001007.damop(e,tp,eg,ep,ev,re,r,rp)
local e1=Effect.CreateEffect(e:GetHandler())
e1:SetType(EFFECT_TYPE_FIELD)
e1:SetCode(EFFECT_CHANGE_DAMAGE)
e1:SetProperty(EFFECT_FLAG_PLAYER_TARGET)
e1:SetTargetRange(1,0)
e1:SetValue(0)
e1:SetReset(RESET_PHASE+PHASE_END)
Duel.RegisterEffect(e1,tp)
Duel.Draw(1-tp,1,REASON_EFFECT)
end
function c12001007.filter(c)
return c:IsFaceup() and c:IsSetCard(0xfb0)
end
function c12001007.condition(e,tp,eg,ep,ev,re,r,rp)
return Duel.IsExistingMatchingCard(c12001007.filter,tp,LOCATION_MZONE,0,1,nil)
and re:IsActiveType(TYPE_MONSTER) and Duel.IsChainNegatable(ev)
end
function c12001007.target(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 c12001007.activate(e,tp,eg,ep,ev,re,r,rp)
if Duel.NegateActivation(ev) and re:GetHandler():IsRelateToEffect(re) then
Duel.Destroy(eg,REASON_EFFECT)
Duel.Draw(1-tp,1,REASON_EFFECT)
end
end
--六曜的梦回
function c12001008.initial_effect(c)
--Activate
local e1=Effect.CreateEffect(c)
e1:SetCategory(CATEGORY_ATKCHANGE)
e1:SetType(EFFECT_TYPE_ACTIVATE)
e1:SetHintTiming(TIMING_DAMAGE_STEP)
e1:SetProperty(EFFECT_FLAG_CARD_TARGET+EFFECT_FLAG_DAMAGE_STEP)
e1:SetCode(EVENT_FREE_CHAIN)
e1:SetCondition(c12001008.condition)
e1:SetTarget(c12001008.target)
e1:SetOperation(c12001008.activate)
c:RegisterEffect(e1)
local e2=Effect.CreateEffect(c)
e2:SetDescription(aux.Stringid(12001008,1))
e2:SetType(EFFECT_TYPE_FIELD+EFFECT_TYPE_TRIGGER_O)
e2:SetProperty(EFFECT_FLAG_DELAY)
e2:SetCode(EVENT_SPSUMMON_SUCCESS)
e2:SetRange(LOCATION_GRAVE)
e2:SetCondition(c12001008.setcon)
e2:SetTarget(c12001008.settg)
e2:SetOperation(c12001008.setop)
c:RegisterEffect(e2)
end
function c12001008.condition(e,tp,eg,ep,ev,re,r,rp)
return Duel.GetCurrentPhase()~=PHASE_DAMAGE or not Duel.IsDamageCalculated()
end
function c12001008.target(e,tp,eg,ep,ev,re,r,rp,chk,chkc)
if chkc then return chkc:IsLocation(LOCATION_MZONE) and chkc:IsFaceup() and chkc:IsSetCard(0xfb0) end
if chk==0 then return Duel.IsExistingTarget(c,tp,LOCATION_MZONE,0,1,nil) end
Duel.Hint(HINT_SELECTMSG,tp,HINTMSG_FACEUP)
Duel.SelectTarget(tp,Card.IsFaceup,tp,LOCATION_MZONE,0,1,1,nil)
end
function c12001008.activate(e,tp,eg,ep,ev,re,r,rp)
local c=e:GetHandler()
local tc=Duel.GetFirstTarget()
if tc:IsRelateToEffect(e) and tc:IsFaceup() then
local e1=Effect.CreateEffect(c)
e1:SetType(EFFECT_TYPE_SINGLE)
e1:SetCode(EFFECT_UPDATE_ATTACK)
e1:SetReset(RESET_EVENT+0x1fe0000+RESET_PHASE+PHASE_END)
e1:SetValue(800)
tc:RegisterEffect(e1)
local e2=Effect.CreateEffect(c)
e2:SetType(EFFECT_TYPE_SINGLE)
e2:SetProperty(EFFECT_FLAG_SINGLE_RANGE)
e2:SetRange(LOCATION_MZONE)
e2:SetCode(EFFECT_IMMUNE_EFFECT)
e2:SetReset(RESET_EVENT+0x1fe0000+RESET_PHASE+PHASE_END)
e2:SetValue(c12001008.efilter)
tc:RegisterEffect(e2)
end
end
function c12001008.efilter(e,te)
return te:GetOwner()~=e:GetOwner()
end
function c12001008.cfilter(c,tp)
return c:GetSummonLocation()==LOCATION_EXTRA and c:GetPreviousControler()==1-tp
end
function c12001008.setcon(e,tp,eg,ep,ev,re,r,rp)
return eg:IsExists(c12001008.cfilter,1,nil,tp)
end
function c12001008.settg(e,tp,eg,ep,ev,re,r,rp,chk)
if chk==0 then return e:GetHandler():IsSSetable() end
Duel.SetOperationInfo(0,CATEGORY_LEAVE_GRAVE,e:GetHandler(),1,0,0)
end
function c12001008.setop(e,tp,eg,ep,ev,re,r,rp)
local c=e:GetHandler()
if c:IsRelateToEffect(e) and c:IsSSetable() then
Duel.SSet(tp,c)
Duel.ConfirmCards(1-tp,c)
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_REMOVED)
c:RegisterEffect(e1)
end
end
\ No newline at end of file
--六曜的先负
function c12001009.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:SetTarget(c12001009.target)
e1:SetOperation(c12001009.activate)
c:RegisterEffect(e1)
local e3=Effect.CreateEffect(c)
e3:SetDescription(aux.Stringid(12001009,1))
e3:SetCategory(CATEGORY_SPECIAL_SUMMON)
e3:SetType(EFFECT_TYPE_SINGLE+EFFECT_TYPE_TRIGGER_O)
e3:SetProperty(EFFECT_FLAG_CARD_TARGET+EFFECT_FLAG_DELAY)
e3:SetCode(EVENT_TO_GRAVE)
e3:SetCountLimit(1,12001100)
e3:SetCondition(c12001009.spcon)
e3:SetTarget(c12001009.sptg)
e3:SetOperation(c12001009.spop)
c:RegisterEffect(e3)
end
function c12001009.filter(c)
return c:IsSetCard(0xfb0) and c:IsType(TYPE_MONSTER) and c:IsAbleToHand()
end
function c12001009.target(e,tp,eg,ep,ev,re,r,rp,chk)
if chk==0 then return Duel.IsExistingMatchingCard(c12001009.filter,tp,LOCATION_DECK,0,1,nil) end
Duel.SetOperationInfo(0,CATEGORY_TOHAND,nil,1,tp,LOCATION_DECK)
end
function c12001009.activate(e,tp,eg,ep,ev,re,r,rp)
Duel.Hint(HINT_SELECTMSG,tp,HINTMSG_ATOHAND)
local g=Duel.SelectMatchingCard(tp,c12001009.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 c12001009.spcon(e,tp,eg,ep,ev,re,r,rp)
local c=e:GetHandler()
return c:IsPreviousLocation(LOCATION_DECK) and c:IsReason(REASON_REVEAL)
end
function c12001009.filter1(c,e,tp)
return c:IsSetCard(0xfb0) and c:IsCanBeSpecialSummoned(e,0,tp,false,false)
end
function c12001009.sptg(e,tp,eg,ep,ev,re,r,rp,chk,chkc)
if chkc then return chkc:IsLocation(LOCATION_GRAVE) and chkc:IsControler(tp) and c12001009.filter1(chkc,e,tp) end
if chk==0 then return Duel.GetLocationCount(tp,LOCATION_MZONE)>0
and Duel.IsExistingTarget(c12001009.filter1,tp,LOCATION_GRAVE,0,1,nil,e,tp) end
Duel.Hint(HINT_SELECTMSG,tp,HINTMSG_SPSUMMON)
local g=Duel.SelectTarget(tp,c12001009.filter1,tp,LOCATION_GRAVE,0,1,1,nil,e,tp)
Duel.SetOperationInfo(0,CATEGORY_SPECIAL_SUMMON,g,1,0,0)
end
function c12001009.spop(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 c12001010.initial_effect(c)
local e1=Effect.CreateEffect(c)
e1:SetCategory(CATEGORY_DRAW+CATEGORY_TODECK)
e1:SetType(EFFECT_TYPE_ACTIVATE)
e1:SetProperty(EFFECT_FLAG_PLAYER_TARGET)
e1:SetCode(EVENT_FREE_CHAIN)
e1:SetCountLimit(1,12001010+EFFECT_COUNT_CODE_OATH)
e1:SetTarget(c12001010.target)
e1:SetOperation(c12001010.activate)
c:RegisterEffect(e1)
local e2=Effect.CreateEffect(c)
e2:SetDescription(aux.Stringid(12001010,2))
e2:SetCategory(CATEGORY_DRAW+CATEGORY_DECKDES)
e2:SetType(EFFECT_TYPE_SINGLE+EFFECT_TYPE_TRIGGER_O)
e2:SetProperty(EFFECT_FLAG_DELAY)
e2:SetCode(EVENT_TO_GRAVE)
e2:SetCountLimit(1,12001105)
e2:SetCondition(c12001010.drcon)
e2:SetTarget(c12001010.drtg)
e2:SetOperation(c12001010.drop)
c:RegisterEffect(e2)
end
function c12001010.target(e,tp,eg,ep,ev,re,r,rp,chk)
if chk==0 then return Duel.IsPlayerCanDraw(tp,3) end
Duel.SetTargetPlayer(tp)
Duel.SetTargetParam(3)
Duel.SetOperationInfo(0,CATEGORY_DRAW,nil,0,tp,3)
Duel.SetOperationInfo(0,CATEGORY_TODECK,nil,0,tp,2)
end
function c12001010.activate(e,tp,eg,ep,ev,re,r,rp)
local p,d=Duel.GetChainInfo(0,CHAININFO_TARGET_PLAYER,CHAININFO_TARGET_PARAM)
if Duel.Draw(p,d,REASON_EFFECT)==3 then
Duel.ShuffleHand(p)
Duel.BreakEffect()
local g=Duel.GetMatchingGroup(Card.IsAbleToDeck,p,LOCATION_HAND,0,nil)
if g:GetCount()>1 and g:IsExists(Card.IsSetCard,1,nil,0xfb0) then
Duel.Hint(HINT_SELECTMSG,p,HINTMSG_TODECK)
local sg1=g:FilterSelect(p,Card.IsSetCard,1,1,nil,0xfb0)
Duel.Hint(HINT_SELECTMSG,p,HINTMSG_TODECK)
local sg2=g:Select(p,1,1,sg1:GetFirst())
sg1:Merge(sg2)
Duel.ConfirmCards(1-p,sg1)
Duel.SendtoDeck(sg1,nil,0,REASON_EFFECT)
Duel.SortDecktop(p,p,2)
else
local hg=Duel.GetFieldGroup(p,LOCATION_HAND,0)
Duel.ConfirmCards(1-p,hg)
local ct=Duel.SendtoDeck(hg,nil,0,REASON_EFFECT)
Duel.SortDecktop(p,p,ct)
end
end
end
function c12001010.drcon(e,tp,eg,ep,ev,re,r,rp)
local c=e:GetHandler()
return c:IsPreviousLocation(LOCATION_DECK) and c:IsReason(REASON_REVEAL)
end
function c12001010.drtg(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)
Duel.SetOperationInfo(0,CATEGORY_HANDES,nil,0,tp,1)
end
function c12001010.drop(e,tp,eg,ep,ev,re,r,rp)
local p=Duel.GetChainInfo(0,CHAININFO_TARGET_PLAYER)
if Duel.Draw(p,2,REASON_EFFECT)==2 then
Duel.ShuffleHand(tp)
Duel.BreakEffect()
Duel.Hint(HINT_SELECTMSG,tp,HINTMSG_TODECK)
local g=Duel.SelectMatchingCard(p,aux.TRUE,p,LOCATION_HAND,0,1,1,nil)
Duel.SendtoDeck(g,nil,0,REASON_EFFECT)
end
end
\ No newline at end of file
--六曜的友引
function c12001011.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:SetTarget(c12001011.target)
e1:SetOperation(c12001011.activate)
c:RegisterEffect(e1)
local e2=Effect.CreateEffect(c)
e2:SetDescription(aux.Stringid(12001011,2))
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,12001102)
e2:SetCondition(c12001011.spcon)
e2:SetTarget(c12001011.sptg)
e2:SetOperation(c12001011.spop)
c:RegisterEffect(e2)
end
function c12001011.filter(c)
return c:IsSetCard(0xfb0) and c:IsType(TYPE_PENDULUM) and c:IsAbleToHand()
end
function c12001011.target(e,tp,eg,ep,ev,re,r,rp,chk)
if not (Duel.CheckLocation(tp,LOCATION_PZONE,0) or Duel.CheckLocation(tp,LOCATION_PZONE,1)) then return false end
if chk==0 then return Duel.IsExistingMatchingCard(c12001011.filter,tp,LOCATION_DECK+LOCATION_GRAVE,0,1,nil) end
Duel.SetOperationInfo(0,HINTMSG_TOFIELD,nil,1,tp,LOCATION_DECK+LOCATION_GRAVE)
end
function c12001011.activate(e,tp,eg,ep,ev,re,r,rp)
if not e:GetHandler():IsRelateToEffect(e) then return end
if not Duel.CheckLocation(tp,LOCATION_PZONE,0) and not Duel.CheckLocation(tp,LOCATION_PZONE,1) then return end
Duel.Hint(HINT_SELECTMSG,tp,HINTMSG_TOFIELD)
local g=Duel.SelectMatchingCard(tp,c12001011.filter,tp,LOCATION_DECK+LOCATION_GRAVE,0,1,1,nil)
if g:GetCount()>0 then
Duel.MoveToField(g:GetFirst(),tp,tp,LOCATION_SZONE,POS_FACEUP,true)
end
end
function c12001011.spcon(e,tp,eg,ep,ev,re,r,rp)
local c=e:GetHandler()
return c:IsPreviousLocation(LOCATION_DECK) and c:IsReason(REASON_REVEAL)
end
function c12001011.filter1(c,e,tp)
return c:IsSetCard(0xfb0) and c:IsCanBeSpecialSummoned(e,0,tp,false,false)
end
function c12001011.sptg(e,tp,eg,ep,ev,re,r,rp,chk)
if chk==0 then return Duel.GetLocationCount(tp,LOCATION_MZONE)>0
and Duel.IsExistingMatchingCard(c12001011.filter1,tp,LOCATION_DECK,0,1,nil,e,tp) end
Duel.SetOperationInfo(0,CATEGORY_SPECIAL_SUMMON,nil,1,tp,LOCATION_DECK)
end
function c12001011.spop(e,tp,eg,ep,ev,re,r,rp)
if Duel.GetLocationCount(tp,LOCATION_MZONE)<=0 then return end
Duel.Hint(HINT_SELECTMSG,tp,HINTMSG_SPSUMMON)
local g=Duel.SelectMatchingCard(tp,c12001011.filter1,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 c12001012.initial_effect(c)
--pendulum summon
aux.EnablePendulumAttribute(c)
local e1=Effect.CreateEffect(c)
e1:SetDescription(aux.Stringid(12001012,0))
e1:SetCategory(CATEGORY_DESTROY)
e1:SetType(EFFECT_TYPE_IGNITION)
e1:SetRange(LOCATION_PZONE)
e1:SetCountLimit(1)
e1:SetTarget(c12001012.target)
e1:SetOperation(c12001012.operation)
c:RegisterEffect(e1)
local e2=Effect.CreateEffect(c)
e2:SetDescription(aux.Stringid(12001012,1))
e2:SetCategory(CATEGORY_DRAW+CATEGORY_DECKDES)
e2:SetType(EFFECT_TYPE_SINGLE+EFFECT_TYPE_TRIGGER_O)
e2:SetProperty(EFFECT_FLAG_DELAY)
e2:SetCode(EVENT_TO_GRAVE)
e2:SetCountLimit(1,12001112)
e2:SetCondition(c12001012.drcon)
e2:SetTarget(c12001012.drtg)
e2:SetOperation(c12001012.drop)
c:RegisterEffect(e2)
end
function c12001012.target(e,tp,eg,ep,ev,re,r,rp,chk)
if chk==0 then return Duel.IsPlayerCanDiscardDeck(tp,1) end
end
function c12001012.operation(e,tp,eg,ep,ev,re,r,rp)
if not Duel.IsPlayerCanDiscardDeck(tp,1) then return end
Duel.ConfirmDecktop(tp,1)
local g=Duel.GetDecktopGroup(tp,1)
local tc=g:GetFirst()
if tc:IsSetCard(0xfb0) then
Duel.DisableShuffleCheck()
Duel.SendtoGrave(g,REASON_EFFECT+REASON_REVEAL)
else
Duel.SendtoHand(g,nil,REASON_EFFECT)
Duel.ShuffleDeck(nil)
Duel.SendtoDeck(e:GetHandler(),nil,0,REASON_EFFECT)
end
end
function c12001012.drcon(e,tp,eg,ep,ev,re,r,rp)
local c=e:GetHandler()
return c:IsPreviousLocation(LOCATION_DECK) and c:IsReason(REASON_REVEAL)
end
function c12001012.drtg(e,tp,eg,ep,ev,re,r,rp,chk)
if chk==0 then return Duel.IsPlayerCanDraw(tp,1) end
Duel.SetTargetPlayer(tp)
Duel.SetTargetParam(1)
Duel.SetOperationInfo(0,CATEGORY_DRAW,nil,0,tp,1)
end
function c12001012.drop(e,tp,eg,ep,ev,re,r,rp)
local p=Duel.GetChainInfo(0,CHAININFO_TARGET_PLAYER)
Duel.Draw(p,1,REASON_EFFECT)
end
\ No newline at end of file
--六曜 虚亡的克尔米
function c12001013.initial_effect(c)
--pendulum summon
aux.EnablePendulumAttribute(c)
--tohand
local e1=Effect.CreateEffect(c)
e1:SetDescription(aux.Stringid(12001013,0))
e1:SetCategory(CATEGORY_TOHAND)
e1:SetType(EFFECT_TYPE_IGNITION)
e1:SetRange(LOCATION_PZONE)
e1:SetCountLimit(1,12001013)
e1:SetTarget(c12001013.thtg)
e1:SetOperation(c12001013.thop)
c:RegisterEffect(e1)
local e2=Effect.CreateEffect(c)
e2:SetDescription(aux.Stringid(12001013,2))
e2:SetCategory(CATEGORY_DRAW+CATEGORY_DECKDES)
e2:SetType(EFFECT_TYPE_SINGLE+EFFECT_TYPE_TRIGGER_O)
e2:SetProperty(EFFECT_FLAG_DELAY)
e2:SetCode(EVENT_TO_GRAVE)
e2:SetCountLimit(1,12001113)
e2:SetCondition(c12001013.necon)
e2:SetOperation(c12001013.neop)
c:RegisterEffect(e2)
end
function c12001013.thfilter(c)
return c:IsFaceup() and c:IsSetCard(0xfb0) and c:IsType(TYPE_PENDULUM) and c:IsAbleToHand()
end
function c12001013.thtg(e,tp,eg,ep,ev,re,r,rp,chk)
if chk==0 then return Duel.IsExistingMatchingCard(c12001013.thfilter,tp,LOCATION_EXTRA,0,1,nil) end
Duel.SetOperationInfo(0,CATEGORY_TOHAND,nil,1,tp,LOCATION_EXTRA)
end
function c12001013.thop(e,tp,eg,ep,ev,re,r,rp)
if not e:GetHandler():IsRelateToEffect(e) then return end
Duel.Hint(HINT_SELECTMSG,tp,HINTMSG_ATOHAND)
local g=Duel.SelectMatchingCard(tp,c12001013.thfilter,tp,LOCATION_EXTRA,0,1,1,nil)
if g:GetCount()>0 then
Duel.SendtoHand(g,nil,REASON_EFFECT)
Duel.ConfirmCards(1-tp,g)
end
end
function c12001013.necon(e,tp,eg,ep,ev,re,r,rp)
local c=e:GetHandler()
return c:IsPreviousLocation(LOCATION_DECK) and c:IsReason(REASON_REVEAL)
end
function c12001013.filter(c)
return c:IsFaceup() and (c:IsLocation(LOCATION_SZONE) or c:IsType(TYPE_EFFECT)) and not c:IsDisabled()
end
function c12001013.neop(e,tp,eg,ep,ev,re,r,rp)
local c=e:GetHandler()
local g=Duel.GetMatchingGroup(c12001013.filter,tp,LOCATION_ONFIELD,LOCATION_ONFIELD,c)
local tc=g:GetFirst()
while tc do
local e1=Effect.CreateEffect(c)
e1:SetType(EFFECT_TYPE_SINGLE)
e1:SetCode(EFFECT_DISABLE)
e1:SetReset(RESET_EVENT+0x1fe0000+RESET_PHASE+PHASE_END)
tc:RegisterEffect(e1)
local e2=Effect.CreateEffect(c)
e2:SetType(EFFECT_TYPE_SINGLE)
e2:SetCode(EFFECT_DISABLE_EFFECT)
e2:SetReset(RESET_EVENT+0x1fe0000+RESET_PHASE+PHASE_END)
tc:RegisterEffect(e2)
tc=g:GetNext()
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.
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