Commit e0ade281 authored by 聖園ミカ's avatar 聖園ミカ 🐟

byd

parent ff0d3ebf
Pipeline #29784 passed with stage
in 13 minutes and 8 seconds
No preview for this file type
...@@ -856,7 +856,6 @@ ...@@ -856,7 +856,6 @@
31300045 1 --Biboo 31300045 1 --Biboo
#332 #332
33200251 1 --机略纵横 鲁子敬 33200251 1 --机略纵横 鲁子敬
33200431 1 --魔力联合 紫鸢尾
33200907 1 --寒霜灵兽 玛狃拉 33200907 1 --寒霜灵兽 玛狃拉
33200912 1 --寒霜灵兽 象牙猪 33200912 1 --寒霜灵兽 象牙猪
33200951 1 --星辉末裔 沃尔夫冈 33200951 1 --星辉末裔 沃尔夫冈
......
--异界旅人 Voyageurs
function c33200400.initial_effect(c)
--effect
local e1=Effect.CreateEffect(c)
e1:SetDescription(aux.Stringid(33200400,0))
e1:SetCategory(CATEGORY_TOHAND+CATEGORY_SEARCH)
e1:SetProperty(EFFECT_FLAG_DAMAGE_STEP)
e1:SetType(EFFECT_TYPE_TRIGGER_O+EFFECT_TYPE_SINGLE)
e1:SetCode(EVENT_SUMMON_SUCCESS)
e1:SetCountLimit(1,33200400)
e1:SetCondition(c33200400.thcon)
e1:SetTarget(c33200400.thtg)
e1:SetOperation(c33200400.thop)
c:RegisterEffect(e1)
--to grave
local e2=Effect.CreateEffect(c)
e2:SetType(EFFECT_TYPE_SINGLE+EFFECT_TYPE_CONTINUOUS)
e2:SetProperty(EFFECT_FLAG_CANNOT_DISABLE)
e2:SetCode(EVENT_TO_GRAVE)
e2:SetOperation(c33200400.regop)
c:RegisterEffect(e2)
--to hand
local e3=Effect.CreateEffect(c)
e3:SetCategory(CATEGORY_TODECK)
e3:SetType(EFFECT_TYPE_FIELD+EFFECT_TYPE_TRIGGER_O)
e3:SetCode(EVENT_PHASE+PHASE_END)
e3:SetRange(LOCATION_GRAVE)
e3:SetCondition(c33200400.tdcon)
e3:SetTarget(c33200400.tdtg)
e3:SetOperation(c33200400.tdop)
c:RegisterEffect(e3)
--cannot release
local e4=Effect.CreateEffect(c)
e4:SetType(EFFECT_TYPE_SINGLE)
e4:SetProperty(EFFECT_FLAG_SINGLE_RANGE)
e4:SetRange(LOCATION_MZONE)
e4:SetCode(EFFECT_UNRELEASABLE_SUM)
e4:SetValue(1)
c:RegisterEffect(e4)
end
--e1
function c33200400.thcon(e,tp,eg,ep,ev,re,r,rp)
return Duel.GetFieldGroupCount(tp,LOCATION_EXTRA,0)==0
end
function c33200400.thfilter(c)
return c:IsSetCard(0x329) and c:IsType(TYPE_MONSTER) and c:IsAbleToHand() and not c:IsCode(33200400)
end
function c33200400.thtg(e,tp,eg,ep,ev,re,r,rp,chk)
if chk==0 then return Duel.IsExistingMatchingCard(c33200400.thfilter,tp,LOCATION_DECK,0,1,nil) end
Duel.SetOperationInfo(0,CATEGORY_TOHAND,nil,1,tp,LOCATION_DECK)
end
function c33200400.thop(e,tp,eg,ep,ev,re,r,rp)
local g=Duel.GetMatchingGroup(c33200400.thfilter,tp,LOCATION_DECK,0,nil)
if g:GetCount()<1 then return end
Duel.ConfirmCards(1-tp,g)
local thg=g:RandomSelect(1-tp,1)
if thg:GetCount()>0 then
if Duel.SendtoHand(thg,nil,REASON_EFFECT) then
Duel.ConfirmCards(1-tp,thg)
if Duel.GetFlagEffect(tp,33200400)~=0 then return end
local e1=Effect.CreateEffect(e:GetHandler())
e1:SetDescription(aux.Stringid(33200400,2))
e1:SetType(EFFECT_TYPE_FIELD)
e1:SetTargetRange(LOCATION_HAND,0)
e1:SetCode(EFFECT_EXTRA_SUMMON_COUNT)
e1:SetTarget(aux.TargetBoolFunction(Card.IsSetCard,0x329))
e1:SetReset(RESET_PHASE+PHASE_END)
Duel.RegisterEffect(e1,tp)
Duel.RegisterFlagEffect(tp,33200400,RESET_PHASE+PHASE_END,0,1)
end
end
end
--e2
function c33200400.regop(e,tp,eg,ep,ev,re,r,rp)
local c=e:GetHandler()
c:RegisterFlagEffect(33200400,RESET_EVENT+RESETS_STANDARD+RESET_PHASE+PHASE_END,0,1)
end
function c33200400.tdcon(e,tp,eg,ep,ev,re,r,rp)
return e:GetHandler():GetFlagEffect(33200400)>0
end
function c33200400.tdtg(e,tp,eg,ep,ev,re,r,rp,chk)
if chk==0 then return e:GetHandler():IsAbleToDeck() end
Duel.SetOperationInfo(0,CATEGORY_TODECK,e:GetHandler(),1,0,0)
end
function c33200400.tdop(e,tp,eg,ep,ev,re,r,rp)
if e:GetHandler():IsRelateToEffect(e) then
Duel.SendtoDeck(e:GetHandler(),nil,0,REASON_EFFECT)
end
end
\ No newline at end of file
--夜幕魔术团 黑桃杰克
function c33200401.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,33200401+EFFECT_COUNT_CODE_OATH)
e1:SetCondition(c33200401.spcon)
e1:SetOperation(c33200401.spop)
c:RegisterEffect(e1)
--remove and destory
local e2=Effect.CreateEffect(c)
e2:SetDescription(aux.Stringid(33200401,0))
e2:SetCategory(CATEGORY_REMOVE+CATEGORY_DESTROY)
e2:SetProperty(EFFECT_FLAG_CARD_TARGET)
e2:SetType(EFFECT_TYPE_IGNITION)
e2:SetRange(LOCATION_MZONE)
e2:SetCountLimit(1,33200402)
e2:SetTarget(c33200401.rdtg)
e2:SetOperation(c33200401.rdop)
c:RegisterEffect(e2)
--to grave
local e3=Effect.CreateEffect(c)
e3:SetType(EFFECT_TYPE_SINGLE+EFFECT_TYPE_CONTINUOUS)
e3:SetProperty(EFFECT_FLAG_CANNOT_DISABLE)
e3:SetCode(EVENT_TO_GRAVE)
e3:SetOperation(c33200401.regop)
c:RegisterEffect(e3)
--to hand
local e4=Effect.CreateEffect(c)
e4:SetCategory(CATEGORY_SEARCH+CATEGORY_TOHAND)
e4:SetType(EFFECT_TYPE_FIELD+EFFECT_TYPE_TRIGGER_O)
e4:SetCode(EVENT_PHASE+PHASE_END)
e4:SetRange(LOCATION_GRAVE)
e4:SetCountLimit(1,33200403)
e4:SetCondition(c33200401.thcon)
e4:SetTarget(c33200401.thtg)
e4:SetOperation(c33200401.thop)
c:RegisterEffect(e4)
end
--e1
function c33200401.spcon(e,c)
if c==nil then return true end
local tp=c:GetControler()
return Duel.GetLocationCount(tp,LOCATION_MZONE)>0 and Duel.GetFieldGroupCount(tp,LOCATION_EXTRA,0)==0
and Duel.IsExistingMatchingCard(c33200401.spfilter,tp,LOCATION_HAND,0,1,c)
end
function c33200401.spop(e,tp,eg,ep,ev,re,r,rp,c)
Duel.Hint(HINT_SELECTMSG,tp,HINTMSG_TOGRAVE)
local g=Duel.SelectMatchingCard(tp,c33200401.spfilter,tp,LOCATION_HAND,0,1,1,c)
Duel.SendtoGrave(g,REASON_COST)
end
function c33200401.spfilter(c)
return c:IsSetCard(0x329) and c:IsAbleToGraveAsCost()
end
--e2
function c33200401.rmfilter(c)
return c:IsType(TYPE_SPELL) and c:IsAbleToRemove()
end
function c33200401.rdtg(e,tp,eg,ep,ev,re,r,rp,chk,chkc)
if chkc then return chkc:IsControler(1-tp) and chkc:IsLocation(LOCATION_GRAVE) and c33200401.rmfilter(chkc) end
if chk==0 then return Duel.IsExistingTarget(c33200401.rmfilter,tp,0,LOCATION_GRAVE,1,nil) end
Duel.Hint(HINT_SELECTMSG,tp,HINTMSG_REMOVE)
local g=Duel.SelectTarget(tp,c33200401.rmfilter,tp,0,LOCATION_GRAVE,1,2,nil)
Duel.SetOperationInfo(0,CATEGORY_REMOVE,g,g:GetCount(),1-tp,LOCATION_GRAVE)
end
function c33200401.rdop(e,tp,eg,ep,ev,re,r,rp)
local g=Duel.GetChainInfo(0,CHAININFO_TARGET_CARDS)
local tg=g:Filter(Card.IsRelateToEffect,nil,e)
local rg=Duel.Remove(tg,POS_FACEUP,REASON_EFFECT)
if Duel.IsExistingMatchingCard(aux.TRUE,tp,LOCATION_ONFIELD,LOCATION_ONFIELD,1,nil) and rg~=0
and Duel.SelectYesNo(tp,aux.Stringid(33200401,1)) then
Duel.BreakEffect()
Duel.Hint(HINT_SELECTMSG,tp,HINTMSG_DESTROY)
local dg=Duel.SelectMatchingCard(tp,aux.TRUE,tp,LOCATION_ONFIELD,LOCATION_ONFIELD,1,rg,nil)
Duel.HintSelection(dg)
Duel.Destroy(dg,REASON_EFFECT)
end
end
--e3
function c33200401.regop(e,tp,eg,ep,ev,re,r,rp)
local c=e:GetHandler()
c:RegisterFlagEffect(33200401,RESET_EVENT+RESETS_STANDARD+RESET_PHASE+PHASE_END,0,1)
end
function c33200401.thcon(e,tp,eg,ep,ev,re,r,rp)
return e:GetHandler():GetFlagEffect(33200401)>0
end
function c33200401.thfilter(c,e,tp)
return c:IsAbleToHand() and c:IsSetCard(0xa329) and not c:IsCode(33200401)
end
function c33200401.thtg(e,tp,eg,ep,ev,re,r,rp,chk)
if chk==0 then return Duel.IsExistingMatchingCard(c33200401.thfilter,tp,LOCATION_DECK,0,1,nil,e,tp) end
end
function c33200401.thop(e,tp,eg,ep,ev,re,r,rp)
Duel.Hint(HINT_SELECTMSG,tp,HINTMSG_ATOHAND)
local g=Duel.SelectMatchingCard(tp,c33200401.thfilter,tp,LOCATION_DECK,0,1,1,nil,e,tp)
local tc=g:GetFirst()
if tc and tc:IsAbleToHand() then
Duel.SendtoHand(tc,nil,REASON_EFFECT)
Duel.ConfirmCards(1-tp,tc)
end
end
--夜幕魔术团 红心女王
function c33200404.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,33200404+EFFECT_COUNT_CODE_OATH)
e1:SetCondition(c33200404.spcon)
e1:SetOperation(c33200404.spop)
c:RegisterEffect(e1)
--change effect
local e2=Effect.CreateEffect(c)
e2:SetDescription(aux.Stringid(33200404,1))
e2:SetType(EFFECT_TYPE_QUICK_O)
e2:SetRange(LOCATION_MZONE)
e2:SetCode(EVENT_CHAINING)
e2:SetCountLimit(1,33200405)
e2:SetCondition(c33200404.chcon)
e2:SetOperation(c33200404.chop)
c:RegisterEffect(e2)
--to grave
local e3=Effect.CreateEffect(c)
e3:SetType(EFFECT_TYPE_SINGLE+EFFECT_TYPE_CONTINUOUS)
e3:SetProperty(EFFECT_FLAG_CANNOT_DISABLE)
e3:SetCode(EVENT_TO_GRAVE)
e3:SetOperation(c33200404.regop)
c:RegisterEffect(e3)
--to hand
local e4=Effect.CreateEffect(c)
e4:SetCategory(CATEGORY_SEARCH+CATEGORY_TOHAND)
e4:SetType(EFFECT_TYPE_FIELD+EFFECT_TYPE_TRIGGER_O)
e4:SetCode(EVENT_PHASE+PHASE_END)
e4:SetRange(LOCATION_GRAVE)
e4:SetCountLimit(1,33200406)
e4:SetCondition(c33200404.thcon)
e4:SetTarget(c33200404.thtg)
e4:SetOperation(c33200404.thop)
c:RegisterEffect(e4)
end
--e1
function c33200404.spcon(e,c)
if c==nil then return true end
local tp=c:GetControler()
return Duel.GetLocationCount(tp,LOCATION_MZONE)>0 and Duel.GetFieldGroupCount(tp,LOCATION_EXTRA,0)==0
and Duel.IsExistingMatchingCard(c33200404.spfilter,tp,LOCATION_HAND,0,1,c)
end
function c33200404.spop(e,tp,eg,ep,ev,re,r,rp,c)
Duel.Hint(HINT_SELECTMSG,tp,HINTMSG_TOGRAVE)
local g=Duel.SelectMatchingCard(tp,c33200404.spfilter,tp,LOCATION_HAND,0,1,1,c)
Duel.SendtoGrave(g,REASON_COST)
end
function c33200404.spfilter(c)
return c:IsSetCard(0x329) and c:IsAbleToGraveAsCost()
end
--e2
function c33200404.chcon(e,tp,eg,ep,ev,re,r,rp)
local ct=Duel.GetCurrentChain()
if ct<2 then return end
local te,p=Duel.GetChainInfo(ct-1,CHAININFO_TRIGGERING_EFFECT,CHAININFO_TRIGGERING_PLAYER)
return te and te:GetHandler():IsSetCard(0xa329) and p==tp and rp==1-tp
end
function c33200404.chop(e,tp,eg,ep,ev,re,r,rp)
local g=Group.CreateGroup()
Duel.ChangeTargetCard(ev,g)
Duel.ChangeChainOperation(ev,c33200404.repop)
end
function c33200404.repop(e,tp,eg,ep,ev,re,r,rp)
Duel.Damage(tp,500,REASON_EFFECT)
Duel.Recover(1-tp,500,REASON_EFFECT)
end
--e3
function c33200404.regop(e,tp,eg,ep,ev,re,r,rp)
local c=e:GetHandler()
c:RegisterFlagEffect(33200404,RESET_EVENT+RESETS_STANDARD+RESET_PHASE+PHASE_END,0,1)
end
function c33200404.thcon(e,tp,eg,ep,ev,re,r,rp)
return e:GetHandler():GetFlagEffect(33200404)>0
end
function c33200404.thfilter(c,e,tp)
return c:IsAbleToHand() and c:IsSetCard(0xa329) and not c:IsCode(33200404)
end
function c33200404.thtg(e,tp,eg,ep,ev,re,r,rp,chk)
if chk==0 then return Duel.IsExistingMatchingCard(c33200404.thfilter,tp,LOCATION_DECK,0,1,nil,e,tp) end
end
function c33200404.thop(e,tp,eg,ep,ev,re,r,rp)
Duel.Hint(HINT_SELECTMSG,tp,HINTMSG_ATOHAND)
local g=Duel.SelectMatchingCard(tp,c33200404.thfilter,tp,LOCATION_DECK,0,1,1,nil,e,tp)
local tc=g:GetFirst()
if tc and tc:IsAbleToHand() then
Duel.SendtoHand(tc,nil,REASON_EFFECT)
Duel.ConfirmCards(1-tp,tc)
end
end
--夜幕魔术团 红心女王-升华
function c33200407.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,33200407+EFFECT_COUNT_CODE_OATH)
e1:SetCondition(c33200407.spcon)
e1:SetOperation(c33200407.spop)
c:RegisterEffect(e1)
--immune spell
local e2=Effect.CreateEffect(c)
e2:SetType(EFFECT_TYPE_SINGLE)
e2:SetCode(EFFECT_IMMUNE_EFFECT)
e2:SetProperty(EFFECT_FLAG_SINGLE_RANGE)
e2:SetRange(LOCATION_MZONE)
e2:SetValue(c33200407.efilter)
c:RegisterEffect(e2)
--Destroy
local e3=Effect.CreateEffect(c)
e3:SetDescription(aux.Stringid(33200407,0))
e3:SetCategory(CATEGORY_DESTROY+CATEGORY_TOHAND)
e3:SetType(EFFECT_TYPE_IGNITION)
e3:SetRange(LOCATION_MZONE)
e3:SetProperty(EFFECT_FLAG_CARD_TARGET)
e3:SetCountLimit(1,33200408)
e3:SetCondition(c33200407.descon1)
e3:SetTarget(c33200407.destg)
e3:SetOperation(c33200407.desop)
c:RegisterEffect(e3)
local e4=e3:Clone()
e4:SetType(EFFECT_TYPE_QUICK_O)
e4:SetCode(EVENT_FREE_CHAIN)
e4:SetHintTiming(0,TIMINGS_CHECK_MONSTER+TIMING_END_PHASE)
e4:SetCondition(c33200407.descon2)
c:RegisterEffect(e4)
end
--e1
function c33200407.spfilter(c,ft)
return c:IsFaceup() and c:IsSetCard(0x329) and not c:IsCode(33200407) and c:IsReleasable()
and (ft>0 or c:GetSequence()<5)
end
function c33200407.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.IsExistingMatchingCard(c33200407.spfilter,tp,LOCATION_MZONE,0,1,nil,ft)
and Duel.GetFieldGroupCount(tp,LOCATION_EXTRA,0)==0
end
function c33200407.spop(e,tp,eg,ep,ev,re,r,rp,c)
local ft=Duel.GetLocationCount(tp,LOCATION_MZONE)
Duel.Hint(HINT_SELECTMSG,tp,HINTMSG_RELEASE)
local g=Duel.SelectMatchingCard(tp,c33200407.spfilter,tp,LOCATION_MZONE,0,1,1,nil,ft)
Duel.Release(g,REASON_COST)
end
--e2
function c33200407.efilter(e,te)
return te:IsActiveType(TYPE_SPELL)
end
--e3
function c33200407.descon1(e,c)
return Duel.IsExistingMatchingCard(Card.IsType,e:GetHandlerPlayer(),LOCATION_GRAVE,0,1,nil,TYPE_SPELL)
end
function c33200407.descon2(e,c)
return not Duel.IsExistingMatchingCard(Card.IsType,e:GetHandlerPlayer(),LOCATION_GRAVE,0,1,nil,TYPE_SPELL)
end
function c33200407.destg(e,tp,eg,ep,ev,re,r,rp,chk,chkc)
if chkc then return false end
if chk==0 then return Duel.IsExistingTarget(Card.IsAbleToHand,tp,LOCATION_ONFIELD,0,1,e:GetHandler())
and Duel.IsExistingTarget(aux.TRUE,tp,0,LOCATION_ONFIELD,1,nil) end
Duel.Hint(HINT_SELECTMSG,tp,HINTMSG_RTOHAND)
local g1=Duel.SelectTarget(tp,aux.TRUE,tp,LOCATION_ONFIELD,0,1,1,e:GetHandler())
Duel.Hint(HINT_SELECTMSG,tp,HINTMSG_DESTROY)
local g2=Duel.SelectTarget(tp,aux.TRUE,tp,0,LOCATION_ONFIELD,1,1,nil)
Duel.SetOperationInfo(0,CATEGORY_TOHAND,g1,1,0,0)
Duel.SetOperationInfo(0,CATEGORY_DESTROY,g2,1,0,0)
end
function c33200407.desop(e,tp,eg,ep,ev,re,r,rp)
local g=Duel.GetChainInfo(0,CHAININFO_TARGET_CARDS):Filter(Card.IsRelateToEffect,nil,e)
local g1=g:Filter(Card.IsControler,nil,1-tp)
local g2=g:Filter(Card.IsControler,nil,tp)
if g1:GetCount()>0 then
Duel.Destroy(g1,REASON_EFFECT)
end
if g2:GetCount()>0 then
Duel.SendtoHand(g2,nil,REASON_EFFECT)
end
end
\ No newline at end of file
--夜幕魔术团 红心女王-龙骑
function c33200409.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,33200409+EFFECT_COUNT_CODE_OATH)
e1:SetCondition(c33200409.spcon)
e1:SetOperation(c33200409.spop)
c:RegisterEffect(e1)
--immune spell
local e2=Effect.CreateEffect(c)
e2:SetType(EFFECT_TYPE_SINGLE)
e2:SetCode(EFFECT_IMMUNE_EFFECT)
e2:SetProperty(EFFECT_FLAG_SINGLE_RANGE)
e2:SetRange(LOCATION_MZONE)
e2:SetValue(c33200409.efilter)
c:RegisterEffect(e2)
--atk twice
local e3=Effect.CreateEffect(c)
e3:SetType(EFFECT_TYPE_SINGLE)
e3:SetCode(EFFECT_EXTRA_ATTACK)
e3:SetValue(1)
c:RegisterEffect(e3)
--effect
local e4=Effect.CreateEffect(c)
e4:SetProperty(EFFECT_FLAG_DAMAGE_STEP)
e4:SetCategory(CATEGORY_DESTROY)
e4:SetType(EFFECT_TYPE_TRIGGER_F+EFFECT_TYPE_SINGLE)
e4:SetCode(EVENT_SUMMON_SUCCESS)
e4:SetCountLimit(1,33200410)
e4:SetCondition(c33200409.descon)
e4:SetTarget(c33200409.destg)
e4:SetOperation(c33200409.desop)
c:RegisterEffect(e4)
local e5=e4:Clone()
e5:SetCode(EVENT_SPSUMMON_SUCCESS)
c:RegisterEffect(e5)
end
--e1
function c33200409.spfilter(c)
return c:IsSetCard(0x329) and c:IsAbleToRemoveAsCost()
end
function c33200409.spcon(e,c)
if c==nil then return true end
local tp=c:GetControler()
local ft=Duel.GetLocationCount(tp,LOCATION_MZONE)
return Duel.GetLocationCount(tp,LOCATION_MZONE)>0
and Duel.GetFieldGroupCount(tp,LOCATION_EXTRA,0)==0
and Duel.IsExistingMatchingCard(c33200409.spfilter,tp,LOCATION_GRAVE,0,4,nil)
end
function c33200409.spop(e,tp,eg,ep,ev,re,r,rp,c)
Duel.Hint(HINT_SELECTMSG,tp,HINTMSG_REMOVE)
local g=Duel.SelectMatchingCard(tp,c33200409.spfilter,tp,LOCATION_GRAVE,0,4,4,nil)
Duel.Remove(g,POS_FACEUP,REASON_COST)
end
--e2
function c33200409.efilter(e,te)
return te:IsActiveType(TYPE_SPELL)
end
--e4
function c33200409.descon(e,c)
return not Duel.IsExistingMatchingCard(Card.IsType,e:GetHandlerPlayer(),LOCATION_GRAVE,0,1,nil,TYPE_SPELL)
end
function c33200409.desfilter(c)
return c:IsType(TYPE_SPELL+TYPE_TRAP)
end
function c33200409.destg(e,tp,eg,ep,ev,re,r,rp,chk)
if chk==0 then return Duel.IsExistingMatchingCard(c33200409.desfilter,tp,0,LOCATION_ONFIELD,1,nil) end
local g=Duel.GetMatchingGroup(c33200409.desfilter,tp,0,LOCATION_ONFIELD,nil)
Duel.SetOperationInfo(0,CATEGORY_DESTROY,g,g:GetCount(),0,0)
Duel.SetChainLimit(c33200409.climit)
end
function c33200409.desop(e,tp,eg,ep,ev,re,r,rp)
local desg=Duel.GetMatchingGroup(c33200409.desfilter,tp,0,LOCATION_ONFIELD,nil)
Duel.Destroy(desg,REASON_EFFECT)
end
function c33200409.climit(e,lp,tp)
return lp==tp or not e:IsHasType(EFFECT_TYPE_ACTIVATE)
end
--夜幕魔术团 方块二
function c33200411.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,33200411+EFFECT_COUNT_CODE_OATH)
e1:SetCondition(c33200411.spcon)
c:RegisterEffect(e1)
local e2=Effect.CreateEffect(c)
e2:SetType(EFFECT_TYPE_SINGLE+EFFECT_TYPE_CONTINUOUS)
e2:SetCode(EVENT_SPSUMMON_SUCCESS)
e2:SetProperty(EFFECT_FLAG_UNCOPYABLE+EFFECT_FLAG_IGNORE_IMMUNE)
e2:SetCondition(c33200411.thcon)
e2:SetOperation(c33200411.thop)
e2:SetLabelObject(e1)
c:RegisterEffect(e2)
--search
local e3=Effect.CreateEffect(c)
e3:SetCategory(CATEGORY_ATKCHANGE)
e3:SetType(EFFECT_TYPE_SINGLE+EFFECT_TYPE_TRIGGER_O)
e3:SetProperty(EFFECT_FLAG_DELAY)
e3:SetCode(EVENT_TO_GRAVE)
e3:SetOperation(c33200411.atkop)
c:RegisterEffect(e3)
end
--e1
function c33200411.spcon(e,c)
if c==nil then return true end
local tp=c:GetControler()
return Duel.GetLocationCount(tp,LOCATION_MZONE)>0 and Duel.GetFieldGroupCount(tp,LOCATION_EXTRA,0)==0
end
function c33200411.thcon(e,tp,eg,ep,ev,re,r,rp)
local te=e:GetLabelObject()
return re==te
end
function c33200411.thfilter(c)
return c:IsSetCard(0xa329) and c:IsAbleToHand()
end
function c33200411.thop(e,tp,eg,ep,ev,re,r,rp)
if Duel.IsExistingMatchingCard(c33200411.thfilter,tp,LOCATION_GRAVE,0,1,nil) and Duel.SelectYesNo(tp,aux.Stringid(33200411,0)) then
Duel.Hint(HINT_SELECTMSG,tp,HINTMSG_ATOHAND)
local g=Duel.SelectMatchingCard(tp,c33200411.thfilter,tp,LOCATION_GRAVE,0,1,1,nil)
if g:GetCount()>0 then
Duel.SendtoHand(g,nil,REASON_EFFECT)
Duel.ConfirmCards(1-tp,g)
end
end
end
--e3
function c33200411.atkop(e,tp,eg,ep,ev,re,r,rp)
--atk up
local e1=Effect.CreateEffect(e:GetHandler())
e1:SetType(EFFECT_TYPE_FIELD)
e1:SetCode(EFFECT_UPDATE_ATTACK)
e1:SetTargetRange(LOCATION_MZONE,0)
e1:SetTarget(aux.TargetBoolFunction(Card.IsSetCard,0x329))
e1:SetValue(c33200411.atkval)
e1:SetReset(RESET_PHASE+PHASE_END,2)
Duel.RegisterEffect(e1,tp)
end
function c33200411.atkval(e,c)
return Duel.GetMatchingGroupCount(Card.IsSetCard,c:GetControler(),LOCATION_GRAVE,0,nil,0xa329)*300
end
--夜幕魔术团 梅花三
function c33200412.initial_effect(c)
--effect
local e1=Effect.CreateEffect(c)
e1:SetDescription(aux.Stringid(33200412,0))
e1:SetCategory(CATEGORY_DRAW+CATEGORY_HANDES+CATEGORY_SUMMON)
e1:SetProperty(EFFECT_FLAG_DAMAGE_STEP)
e1:SetType(EFFECT_TYPE_TRIGGER_O+EFFECT_TYPE_SINGLE)
e1:SetCode(EVENT_SUMMON_SUCCESS)
e1:SetCountLimit(1,33200412)
e1:SetCondition(c33200412.thcon)
e1:SetTarget(c33200412.thtg)
e1:SetOperation(c33200412.thop)
c:RegisterEffect(e1)
--destroy
local e2=Effect.CreateEffect(c)
e2:SetCategory(CATEGORY_DESTROY)
e2:SetType(EFFECT_TYPE_SINGLE+EFFECT_TYPE_TRIGGER_O)
e2:SetCode(EVENT_TO_GRAVE)
e2:SetProperty(EFFECT_FLAG_CARD_TARGET+EFFECT_FLAG_DELAY)
e2:SetCountLimit(1,33200399)
e2:SetTarget(c33200412.destg)
e2:SetOperation(c33200412.desop)
c:RegisterEffect(e2)
end
--e1
function c33200412.thcon(e,tp,eg,ep,ev,re,r,rp)
return Duel.GetFieldGroupCount(tp,LOCATION_EXTRA,0)==0
end
function c33200412.thtg(e,tp,eg,ep,ev,re,r,rp,chk)
if chk==0 then return Duel.IsPlayerCanDraw(tp,1) end
Duel.SetOperationInfo(0,CATEGORY_HANDES,nil,0,tp,1)
Duel.SetOperationInfo(0,CATEGORY_DRAW,nil,0,tp,1)
end
function c33200412.thop(e,tp,eg,ep,ev,re,r,rp)
local h=Duel.Draw(tp,1,REASON_EFFECT)
if h>0 then
Duel.BreakEffect()
Duel.DiscardHand(tp,aux.TRUE,1,1,REASON_EFFECT+REASON_DISCARD)
Duel.ShuffleHand(tp)
if Duel.IsExistingMatchingCard(c33200412.mfilter,tp,LOCATION_HAND,0,1,nil) and Duel.SelectYesNo(tp,aux.Stringid(33200412,1)) then
Duel.Hint(HINT_SELECTMSG,tp,HINTMSG_SUMMON)
local sg=Duel.SelectMatchingCard(tp,c33200412.mfilter,tp,LOCATION_HAND,0,1,1,nil)
if sg:GetCount()>0 then
Duel.Summon(tp,sg:GetFirst(),true,nil)
end
end
end
end
function c33200412.mfilter(c)
return c:IsSetCard(0x329) and c:IsSummonable(true,nil)
end
--e2
function c33200412.destg(e,tp,eg,ep,ev,re,r,rp,chk,chkc)
if chkc then return chkc:IsLocation(LOCATION_ONFIELD) end
if chk==0 then return Duel.IsExistingTarget(aux.TRUE,tp,LOCATION_ONFIELD,LOCATION_ONFIELD,1,nil) end
Duel.Hint(HINT_SELECTMSG,tp,HINTMSG_DESTROY)
local g=Duel.SelectTarget(tp,aux.TRUE,tp,LOCATION_ONFIELD,LOCATION_ONFIELD,1,1,nil)
Duel.SetOperationInfo(0,CATEGORY_DESTROY,g,1,0,0)
end
function c33200412.desop(e,tp,eg,ep,ev,re,r,rp)
local tc=Duel.GetFirstTarget()
if tc:IsRelateToEffect(e) then
Duel.Destroy(tc,REASON_EFFECT)
end
end
\ No newline at end of file
--罪城特警 洛兹
function c33200413.initial_effect(c)
--special summon
local e1=Effect.CreateEffect(c)
e1:SetDescription(aux.Stringid(33200413,0))
e1:SetType(EFFECT_TYPE_FIELD+EFFECT_TYPE_TRIGGER_O)
e1:SetCode(EVENT_LEAVE_FIELD)
e1:SetProperty(EFFECT_FLAG_DAMAGE_STEP+EFFECT_FLAG_DELAY+EFFECT_FLAG_CARD_TARGET)
e1:SetRange(LOCATION_HAND)
e1:SetCountLimit(1,33200413)
e1:SetCondition(c33200413.spcon)
e1:SetTarget(c33200413.sptg)
e1:SetOperation(c33200413.spop)
c:RegisterEffect(e1)
--tograve
local e2=Effect.CreateEffect(c)
e2:SetDescription(aux.Stringid(33200413,1))
e2:SetCategory(CATEGORY_TOGRAVE)
e2:SetType(EFFECT_TYPE_SINGLE+EFFECT_TYPE_TRIGGER_O)
e2:SetCode(EVENT_SUMMON_SUCCESS)
e2:SetProperty(EFFECT_FLAG_DAMAGE_STEP+EFFECT_FLAG_DELAY)
e2:SetCountLimit(1,33200414)
e2:SetTarget(c33200413.tgtg)
e2:SetOperation(c33200413.tgop)
c:RegisterEffect(e2)
local e3=e2:Clone()
e3:SetCode(EVENT_SPSUMMON_SUCCESS)
c:RegisterEffect(e3)
local e4=e2:Clone()
e4:SetCode(EVENT_MOVE)
e4:SetCondition(c33200413.tgcon)
c:RegisterEffect(e4)
--Remove
local e5=Effect.CreateEffect(c)
e5:SetDescription(aux.Stringid(33200413,2))
e5:SetType(EFFECT_TYPE_FIELD+EFFECT_TYPE_TRIGGER_F)
e5:SetCategory(CATEGORY_REMOVE)
e5:SetCode(EVENT_PHASE+PHASE_END)
e5:SetRange(LOCATION_MZONE)
e5:SetCountLimit(1,33200398)
e5:SetCondition(c33200413.recon)
e5:SetTarget(c33200413.retg)
e5:SetOperation(c33200413.reop)
c:RegisterEffect(e5)
end
--e1
function c33200413.spcfilter(c,tp,rp)
return c:IsPreviousPosition(POS_FACEUP) and c:GetPreviousControler()==tp and c:IsPreviousSetCard(0x329)
and (c:IsReason(REASON_BATTLE) or (rp==1-tp and c:IsReason(REASON_EFFECT)))
end
function c33200413.spcon(e,tp,eg,ep,ev,re,r,rp)
return eg:IsExists(c33200413.spcfilter,1,nil,tp,rp) and Duel.GetFieldGroupCount(tp,LOCATION_EXTRA,0)==0
end
function c33200413.sptg(e,tp,eg,ep,ev,re,r,rp,chk,chkc)
if chk==0 then return e:GetHandler():IsCanBeSpecialSummoned(e,0,tp,false,false) end
Duel.SetOperationInfo(0,CATEGORY_SPECIAL_SUMMON,e:GetHandler(),1,0,0)
end
function c33200413.spop(e,tp,eg,ep,ev,re,r,rp)
local c=e:GetHandler()
if not c:IsRelateToEffect(e) then return end
if Duel.GetLocationCount(tp,LOCATION_MZONE)<=0 then return end
Duel.SpecialSummon(c,0,tp,tp,false,false,POS_FACEUP)
end
--e2
function c33200413.tgfilter(c,g)
return c:IsAbleToGrave() and g:IsContains(c)
end
function c33200413.tgtg(e,tp,eg,ep,ev,re,r,rp,chk)
local cg=e:GetHandler():GetColumnGroup()
if chk==0 then return Duel.IsExistingMatchingCard(c33200413.tgfilter,tp,0,LOCATION_ONFIELD,1,nil,cg) end
local g=Duel.GetMatchingGroup(c33200413.tgfilter,tp,0,LOCATION_ONFIELD,nil,cg)
Duel.SetOperationInfo(0,CATEGORY_TOGRAVE,g,g:GetCount(),0,0)
end
function c33200413.tgop(e,tp,eg,ep,ev,re,r,rp)
local c=e:GetHandler()
local cg=c:GetColumnGroup()
if c:IsRelateToEffect(e) and c:IsFaceup() then
local g=Duel.GetMatchingGroup(c33200413.tgfilter,tp,0,LOCATION_ONFIELD,nil,cg)
if g:GetCount()>0 then
Duel.SendtoGrave(g,REASON_EFFECT)
end
end
end
function c33200413.tgcon(e,tp,eg,ep,ev,re,r,rp)
local c=e:GetHandler()
return c:IsLocation(LOCATION_MZONE) and c:IsPreviousLocation(LOCATION_REMOVED) and not c:IsReason(REASON_SPSUMMON)
end
--e5
function c33200413.recon(e,tp,eg,ep,ev,re,r,rp)
return Duel.GetTurnPlayer()==tp
end
function c33200413.retg(e,tp,eg,ep,ev,re,r,rp,chk,chkc)
if chk==0 then return e:GetHandler():IsAbleToRemove() end
Duel.SetOperationInfo(0,CATEGORY_REMOVE,e:GetHandler(),1,0,0)
end
function c33200413.reop(e,tp,eg,ep,ev,re,r,rp)
local c=e:GetHandler()
if c:IsRelateToEffect(e) and Duel.Remove(c,0,REASON_EFFECT+REASON_TEMPORARY)~=0 then
local e1=Effect.CreateEffect(c)
e1:SetType(EFFECT_TYPE_FIELD+EFFECT_TYPE_CONTINUOUS)
e1:SetCode(EVENT_PHASE+PHASE_STANDBY)
e1:SetCountLimit(1)
e1:SetLabel(Duel.GetTurnCount())
e1:SetLabelObject(c)
e1:SetCondition(c33200413.retcon)
e1:SetOperation(c33200413.retop)
e1:SetReset(RESET_EVENT+RESETS_STANDARD+RESET_PHASE+PHASE_END,3)
Duel.RegisterEffect(e1,tp)
end
end
function c33200413.retcon(e,tp,eg,ep,ev,re,r,rp)
return Duel.GetTurnCount()>e:GetLabel() and Duel.GetTurnPlayer()==tp
end
function c33200413.retop(e,tp,eg,ep,ev,re,r,rp)
Duel.ReturnToField(e:GetLabelObject())
end
\ No newline at end of file
--罪城特警 本杰明
function c33200415.initial_effect(c)
--special summon
local e1=Effect.CreateEffect(c)
e1:SetDescription(aux.Stringid(33200415,0))
e1:SetType(EFFECT_TYPE_FIELD+EFFECT_TYPE_TRIGGER_O)
e1:SetCode(EVENT_LEAVE_FIELD)
e1:SetProperty(EFFECT_FLAG_DAMAGE_STEP+EFFECT_FLAG_DELAY+EFFECT_FLAG_CARD_TARGET)
e1:SetRange(LOCATION_HAND)
e1:SetCountLimit(1,33200415)
e1:SetCondition(c33200415.spcon)
e1:SetTarget(c33200415.sptg)
e1:SetOperation(c33200415.spop)
c:RegisterEffect(e1)
--Remove
local e2=Effect.CreateEffect(c)
e2:SetDescription(aux.Stringid(33200415,1))
e2:SetCategory(CATEGORY_REMOVE)
e2:SetType(EFFECT_TYPE_SINGLE+EFFECT_TYPE_TRIGGER_O)
e2:SetCode(EVENT_SUMMON_SUCCESS)
e2:SetProperty(EFFECT_FLAG_DAMAGE_STEP+EFFECT_FLAG_DELAY)
e2:SetCountLimit(1,33200416)
e2:SetTarget(c33200415.rmtg)
e2:SetOperation(c33200415.rmop)
c:RegisterEffect(e2)
local e3=e2:Clone()
e3:SetCode(EVENT_SPSUMMON_SUCCESS)
c:RegisterEffect(e3)
local e4=e2:Clone()
e4:SetCode(EVENT_MOVE)
e4:SetCondition(c33200415.rmcon)
c:RegisterEffect(e4)
--Remove
local e5=Effect.CreateEffect(c)
e5:SetDescription(aux.Stringid(33200415,2))
e5:SetType(EFFECT_TYPE_FIELD+EFFECT_TYPE_TRIGGER_F)
e5:SetCategory(CATEGORY_REMOVE)
e5:SetCode(EVENT_PHASE+PHASE_END)
e5:SetRange(LOCATION_MZONE)
e5:SetCountLimit(1,33200417)
e5:SetCondition(c33200415.recon)
e5:SetTarget(c33200415.retg)
e5:SetOperation(c33200415.reop)
c:RegisterEffect(e5)
end
--e1
function c33200415.spcfilter(c,tp,rp)
return c:IsPreviousPosition(POS_FACEUP) and c:GetPreviousControler()==tp and c:IsPreviousSetCard(0x329)
and (c:IsReason(REASON_BATTLE) or (rp==1-tp and c:IsReason(REASON_EFFECT)))
end
function c33200415.spcon(e,tp,eg,ep,ev,re,r,rp)
return eg:IsExists(c33200415.spcfilter,1,nil,tp,rp) and Duel.GetFieldGroupCount(tp,LOCATION_EXTRA,0)==0
end
function c33200415.sptg(e,tp,eg,ep,ev,re,r,rp,chk,chkc)
if chk==0 then return e:GetHandler():IsCanBeSpecialSummoned(e,0,tp,false,false) end
Duel.SetOperationInfo(0,CATEGORY_SPECIAL_SUMMON,e:GetHandler(),1,0,0)
end
function c33200415.spop(e,tp,eg,ep,ev,re,r,rp)
local c=e:GetHandler()
if not c:IsRelateToEffect(e) then return end
if Duel.GetLocationCount(tp,LOCATION_MZONE)<=0 then return end
Duel.SpecialSummon(c,0,tp,tp,false,false,POS_FACEUP)
end
--e2
function c33200415.rmfilter(c,g)
return c:IsAbleToGrave() and g:IsContains(c)
end
function c33200415.rmtg(e,tp,eg,ep,ev,re,r,rp,chk)
if chk==0 then
if Duel.GetFieldGroupCount(1-tp,LOCATION_DECK,0)<5 then return false end
local g=Duel.GetDecktopGroup(1-tp,5)
local result=g:FilterCount(Card.IsAbleToRemove,nil)>0
return result
end
Duel.SetTargetPlayer(tp)
Duel.SetOperationInfo(0,CATEGORY_REMOVE,nil,1,0,LOCATION_DECK)
end
function c33200415.rmop(e,tp,eg,ep,ev,re,r,rp)
local p=Duel.GetChainInfo(0,CHAININFO_TARGET_PLAYER)
Duel.ConfirmDecktop(1-p,5)
local g=Duel.GetDecktopGroup(1-p,5)
if g:GetCount()>0 then
g1=g:Filter(Card.IsAbleToRemove,nil)
Duel.Hint(HINT_SELECTMSG,p,HINTMSG_REMOVE)
local sg=g1:Select(p,1,1,nil)
Duel.Remove(sg,POS_FACEUP,REASON_EFFECT)
Duel.ShuffleDeck(1-p)
local rg=Group.CreateGroup()
local tc=sg:GetFirst()
if tc:IsLocation(LOCATION_REMOVED) then
local tpe=tc:GetType()
if bit.band(tpe,TYPE_TOKEN)==0 then
local g1=Duel.GetMatchingGroup(Card.IsCode,tp,0,LOCATION_ONFIELD+LOCATION_GRAVE+LOCATION_HAND,nil,tc:GetCode())
rg:Merge(g1)
end
end
if rg:GetCount()>0 then
Duel.BreakEffect()
Duel.Remove(rg,POS_FACEUP,REASON_EFFECT)
end
end
end
function c33200415.rmcon(e,tp,eg,ep,ev,re,r,rp)
local c=e:GetHandler()
return c:IsLocation(LOCATION_MZONE) and c:IsPreviousLocation(LOCATION_REMOVED) and not c:IsReason(REASON_SPSUMMON)
end
--e5
function c33200415.recon(e,tp,eg,ep,ev,re,r,rp)
return Duel.GetTurnPlayer()==tp
end
function c33200415.retg(e,tp,eg,ep,ev,re,r,rp,chk,chkc)
if chk==0 then return e:GetHandler():IsAbleToRemove() end
Duel.SetOperationInfo(0,CATEGORY_REMOVE,e:GetHandler(),1,0,0)
end
function c33200415.reop(e,tp,eg,ep,ev,re,r,rp)
local c=e:GetHandler()
if c:IsRelateToEffect(e) and Duel.Remove(c,0,REASON_EFFECT+REASON_TEMPORARY)~=0 then
local e1=Effect.CreateEffect(c)
e1:SetType(EFFECT_TYPE_FIELD+EFFECT_TYPE_CONTINUOUS)
e1:SetCode(EVENT_PHASE+PHASE_STANDBY)
e1:SetCountLimit(1)
e1:SetLabel(Duel.GetTurnCount())
e1:SetLabelObject(c)
e1:SetCondition(c33200415.retcon)
e1:SetOperation(c33200415.retop)
e1:SetReset(RESET_EVENT+RESETS_STANDARD+RESET_PHASE+PHASE_END,3)
Duel.RegisterEffect(e1,tp)
end
end
function c33200415.retcon(e,tp,eg,ep,ev,re,r,rp)
return Duel.GetTurnCount()>e:GetLabel() and Duel.GetTurnPlayer()==tp
end
function c33200415.retop(e,tp,eg,ep,ev,re,r,rp)
Duel.ReturnToField(e:GetLabelObject())
end
\ No newline at end of file
--魔力联合 赤红之鬼
function c33200429.initial_effect(c)
--spsm
local e1=Effect.CreateEffect(c)
e1:SetDescription(aux.Stringid(33200429,1))
e1:SetCategory(CATEGORY_SPECIAL_SUMMON+CATEGORY_DESTROY)
e1:SetType(EFFECT_TYPE_QUICK_O)
e1:SetCode(EVENT_CHAINING)
e1:SetRange(LOCATION_HAND)
e1:SetCountLimit(1,33200429)
e1:SetCondition(c33200429.spcon1)
e1:SetTarget(c33200429.sptg)
e1:SetOperation(c33200429.spop)
c:RegisterEffect(e1)
local e2=Effect.CreateEffect(c)
e2:SetDescription(aux.Stringid(33200429,2))
e2:SetCategory(CATEGORY_SPECIAL_SUMMON+CATEGORY_DESTROY)
e2:SetType(EFFECT_TYPE_FIELD+EFFECT_TYPE_QUICK_O)
e2:SetCode(EVENT_ATTACK_ANNOUNCE)
e2:SetRange(LOCATION_HAND)
e2:SetCountLimit(1,33200429)
e2:SetCondition(c33200429.spcon2)
e2:SetTarget(c33200429.sptg)
e2:SetOperation(c33200429.spop)
c:RegisterEffect(e2)
local e3=Effect.CreateEffect(c)
e3:SetType(EFFECT_TYPE_FIELD+EFFECT_TYPE_CONTINUOUS)
e3:SetCode(EVENT_SPSUMMON_SUCCESS)
e3:SetRange(LOCATION_MZONE)
e3:SetCondition(c33200429.atkcon)
e3:SetOperation(c33200429.atkop)
c:RegisterEffect(e3)
--damage
local e4=Effect.CreateEffect(c)
e4:SetCategory(CATEGORY_DAMAGE+CATEGORY_TOGRAVE)
e4:SetType(EFFECT_TYPE_SINGLE+EFFECT_TYPE_TRIGGER_O)
e4:SetProperty(EFFECT_FLAG_CARD_TARGET)
e4:SetCode(EVENT_BATTLE_DESTROYING)
e4:SetCondition(aux.bdocon)
e4:SetTarget(c33200429.damtg)
e4:SetOperation(c33200429.damop)
c:RegisterEffect(e4)
end
--spsm
function c33200429.spcon1(e,tp,eg,ep,ev,re,r,rp)
return ep~=tp and re:IsHasType(EFFECT_TYPE_ACTIVATE) and re:IsActiveType(TYPE_SPELL) and Duel.GetFieldGroupCount(tp,LOCATION_EXTRA,0)==0
end
function c33200429.spcon2(e,tp,eg,ep,ev,re,r,rp)
local ac=Duel.GetAttacker()
local tc=Duel.GetAttackTarget()
if not ac:IsControler(tp) then ac,tc=tc,ac end
return ac and ac:IsControler(tp) and ac:IsFaceup() and ac:IsSetCard(0x3329)
end
function c33200429.sptg(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 c33200429.spop(e,tp,eg,ep,ev,re,r,rp)
if Duel.GetLocationCount(tp,LOCATION_MZONE)<=0 or not e:GetHandler():IsRelateToEffect(e) then return end
if Duel.SpecialSummon(e:GetHandler(),0,tp,tp,false,false,POS_FACEUP) and Duel.IsExistingTarget(aux.TRUE,tp,0,LOCATION_ONFIELD,1,nil) and Duel.SelectYesNo(tp,aux.Stringid(33200429,0)) then
Duel.BreakEffect()
Duel.Hint(HINT_SELECTMSG,tp,HINTMSG_DESTROY)
local g=Duel.SelectMatchingCard(tp,aux.TRUE,tp,0,LOCATION_ONFIELD,1,1,nil)
Duel.HintSelection(g)
Duel.Destroy(g,REASON_EFFECT)
end
end
--e3
function c33200429.atkfilter(c,tp)
return c:IsFaceup() and c:IsSetCard(0x329) and c:IsControler(tp)
end
function c33200429.atkcon(e,tp,eg,ep,ev,re,r,rp)
return not eg:IsContains(e:GetHandler()) and eg:IsExists(c33200429.atkfilter,1,nil,tp)
and Duel.GetMatchingGroupCount(Card.IsType,tp,LOCATION_GRAVE,0,nil,TYPE_SPELL)==0
and Duel.GetMatchingGroupCount(Card.IsType,tp,0,LOCATION_GRAVE,nil,TYPE_SPELL)>0
end
function c33200429.atkop(e,tp,eg,ep,ev,re,r,rp)
local c=e:GetHandler()
local e2=Effect.CreateEffect(c)
e2:SetType(EFFECT_TYPE_SINGLE)
e2:SetCode(EFFECT_UPDATE_ATTACK)
e2:SetReset(RESET_EVENT+RESETS_STANDARD)
e2:SetValue(300)
c:RegisterEffect(e2)
end
--e4
function c33200429.dmgfilter(c)
return c:IsSetCard(0x3329) and c:IsFaceup() and c:GetAttack()~=0
end
function c33200429.tgfilter(c)
return c:IsType(TYPE_SPELL) and c:IsAbleToGrave()
end
function c33200429.damtg(e,tp,eg,ep,ev,re,r,rp,chk)
if chkc then return chkc:IsControler(tp) and chkc:IsLocation(LOCATION_MZONE) and c33200429.dmgfilter(chkc,e,tp) end
if chk==0 then return Duel.IsExistingTarget(c33200429.dmgfilter,tp,LOCATION_MZONE,0,1,e:GetHandler()) end
Duel.Hint(HINT_SELECTMSG,tp,HINTMSG_FACEUP)
Duel.SelectTarget(tp,c33200429.dmgfilter,tp,LOCATION_MZONE,0,1,1,e:GetHandler())
Duel.SetOperationInfo(0,CATEGORY_TOGRAVE,nil,1,1-tp,LOCATION_DECK+LOCATION_HAND)
end
function c33200429.damop(e,tp,eg,ep,ev,re,r,rp)
local tc=Duel.GetFirstTarget()
if tc:IsRelateToEffect(e) and Duel.GetMatchingGroupCount(c33200429.tgfilter,1-tp,LOCATION_DECK+LOCATION_HAND,0,nil,TYPE_SPELL)>=2 then
Duel.Hint(HINT_SELECTMSG,1-tp,HINTMSG_TOGRAVE)
local g=Duel.SelectMatchingCard(1-tp,c33200429.tgfilter,1-tp,LOCATION_DECK+LOCATION_HAND,0,2,2,nil)
if g:GetCount()~=0 then
Duel.SendtoGrave(g,REASON_EFFECT)
end
else
local dmg=tc:GetAttack()
Duel.Damage(1-tp,dmg,REASON_EFFECT)
end
end
\ No newline at end of file
--魔力联合 魅影鬼姬
function c33200431.initial_effect(c)
c:SetUniqueOnField(1,0,33200431)
--cannot special summon
local e0=Effect.CreateEffect(c)
e0:SetType(EFFECT_TYPE_SINGLE)
e0:SetProperty(EFFECT_FLAG_CANNOT_DISABLE+EFFECT_FLAG_UNCOPYABLE)
e0:SetCode(EFFECT_SPSUMMON_CONDITION)
e0:SetValue(c33200431.splimit)
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,33200431+EFFECT_COUNT_CODE_OATH)
e1:SetCondition(c33200431.spcon)
e1:SetOperation(c33200431.sprop)
c:RegisterEffect(e1)
--can't Activate
local e6=Effect.CreateEffect(c)
e6:SetType(EFFECT_TYPE_CONTINUOUS+EFFECT_TYPE_FIELD)
e6:SetProperty(EFFECT_FLAG_CANNOT_DISABLE)
e6:SetCode(EVENT_CHAINING)
e6:SetRange(LOCATION_MZONE)
e6:SetOperation(aux.chainreg)
c:RegisterEffect(e6)
local e2=Effect.CreateEffect(c)
e2:SetType(EFFECT_TYPE_FIELD+EFFECT_TYPE_CONTINUOUS)
e2:SetProperty(EFFECT_FLAG_CANNOT_DISABLE)
e2:SetCode(EVENT_CHAIN_SOLVED)
e2:SetRange(LOCATION_MZONE)
e2:SetCountLimit(1)
e2:SetOperation(c33200431.actop)
c:RegisterEffect(e2)
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:SetCondition(c33200431.condition)
e3:SetValue(c33200431.aclimit)
c:RegisterEffect(e3)
--to hand
local e4=Effect.CreateEffect(c)
e4:SetType(EFFECT_TYPE_SINGLE+EFFECT_TYPE_CONTINUOUS)
e4:SetProperty(EFFECT_FLAG_CANNOT_DISABLE)
e4:SetCode(EVENT_TO_GRAVE)
e4:SetOperation(c33200431.regop)
c:RegisterEffect(e4)
local e5=Effect.CreateEffect(c)
e5:SetCategory(CATEGORY_SEARCH+CATEGORY_TOHAND)
e5:SetType(EFFECT_TYPE_FIELD+EFFECT_TYPE_TRIGGER_O)
e5:SetCode(EVENT_PHASE+PHASE_END)
e5:SetRange(LOCATION_GRAVE)
e5:SetCountLimit(1,33200432)
e5:SetCondition(c33200431.thcon)
e5:SetTarget(c33200431.thtg)
e5:SetOperation(c33200431.thop)
c:RegisterEffect(e5)
end
--spsm
function c33200431.splimit(e,se,sp,st)
return se:IsHasType(EFFECT_TYPE_ACTIONS)
end
function c33200431.thspfilter(c,ft)
return c:IsFaceup() and c:IsSetCard(0x3329) and c:IsAbleToHandAsCost()
and (ft>0 or c:GetSequence()<5)
end
function c33200431.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.IsExistingMatchingCard(c33200431.thspfilter,tp,LOCATION_MZONE,0,1,nil,ft) and
Duel.GetMatchingGroupCount(Card.IsType,c:GetControler(),0,LOCATION_GRAVE+LOCATION_REMOVED,nil,TYPE_SPELL)>=5
end
function c33200431.sprop(e,tp,eg,ep,ev,re,r,rp,c)
local ft=Duel.GetLocationCount(tp,LOCATION_MZONE)
Duel.Hint(HINT_SELECTMSG,tp,HINTMSG_RTOHAND)
local g=Duel.SelectMatchingCard(tp,c33200431.thspfilter,tp,LOCATION_MZONE,0,1,1,nil,ft)
Duel.SendtoHand(g,nil,REASON_COST)
end
--e2
function c33200431.actop(e,tp,eg,ep,ev,re,r,rp)
if re:IsHasType(EFFECT_TYPE_ACTIVATE) and re:IsActiveType(TYPE_SPELL) and e:GetHandler():GetFlagEffect(1)>0 then
e:GetHandler():RegisterFlagEffect(33200431,RESET_EVENT+RESETS_STANDARD+RESET_PHASE+PHASE_END,0,1)
e:GetHandler():RegisterFlagEffect(0,RESET_EVENT+RESETS_STANDARD+RESET_PHASE+PHASE_END,EFFECT_FLAG_CLIENT_HINT,1,0,aux.Stringid(33200431,0))
end
end
function c33200431.condition(e)
return e:GetHandler():GetFlagEffect(33200431)==0 and Duel.GetMatchingGroupCount(Card.IsType,tp,LOCATION_GRAVE,0,nil,TYPE_SPELL)==0
end
function c33200431.aclimit(e,re,tp)
return re:IsActiveType(TYPE_MONSTER)
end
--e4
function c33200431.regop(e,tp,eg,ep,ev,re,r,rp)
local c=e:GetHandler()
c:RegisterFlagEffect(33200432,RESET_EVENT+RESETS_STANDARD+RESET_PHASE+PHASE_END,0,1)
end
function c33200431.thcon(e,tp,eg,ep,ev,re,r,rp)
return e:GetHandler():GetFlagEffect(33200432)>0
end
function c33200431.thfilter(c)
return c:IsAbleToHand() and c:IsSetCard(0x3329) and not c:IsCode(33200431)
end
function c33200431.thtg(e,tp,eg,ep,ev,re,r,rp,chk)
if chk==0 then return Duel.IsExistingMatchingCard(c33200431.thfilter,tp,LOCATION_GRAVE,0,1,nil,e,tp) end
end
function c33200431.thop(e,tp,eg,ep,ev,re,r,rp)
Duel.Hint(HINT_SELECTMSG,tp,HINTMSG_ATOHAND)
local g=Duel.SelectMatchingCard(tp,c33200431.thfilter,tp,LOCATION_GRAVE,0,1,1,nil)
local tc=g:GetFirst()
if tc and tc:IsAbleToHand() then
Duel.SendtoHand(tc,nil,REASON_EFFECT)
Duel.ConfirmCards(1-tp,tc)
end
end
\ No newline at end of file
--魔力联合 翠之恩惠
function c33200433.initial_effect(c)
--spsm
local e1=Effect.CreateEffect(c)
e1:SetDescription(aux.Stringid(33200433,1))
e1:SetCategory(CATEGORY_SPECIAL_SUMMON+CATEGORY_DRAW)
e1:SetType(EFFECT_TYPE_QUICK_O)
e1:SetCode(EVENT_CHAINING)
e1:SetRange(LOCATION_HAND)
e1:SetCountLimit(1,33200433)
e1:SetCondition(c33200433.spcon1)
e1:SetTarget(c33200433.sptg)
e1:SetOperation(c33200433.spop)
c:RegisterEffect(e1)
local e2=Effect.CreateEffect(c)
e2:SetDescription(aux.Stringid(33200433,2))
e2:SetCategory(CATEGORY_SPECIAL_SUMMON+CATEGORY_DRAW)
e2:SetType(EFFECT_TYPE_FIELD+EFFECT_TYPE_TRIGGER_O)
e2:SetCode(EVENT_SPSUMMON_SUCCESS)
e2:SetRange(LOCATION_HAND)
e2:SetProperty(EFFECT_FLAG_DELAY+EFFECT_FLAG_DAMAGE_STEP)
e2:SetCountLimit(1,33200433)
e2:SetCondition(c33200433.spcon2)
e2:SetTarget(c33200433.sptg)
e2:SetOperation(c33200433.spop)
c:RegisterEffect(e2)
--tograve
local e3=Effect.CreateEffect(c)
e3:SetDescription(aux.Stringid(33200433,3))
e3:SetCategory(CATEGORY_TOGRAVE)
e3:SetType(EFFECT_TYPE_IGNITION)
e3:SetRange(LOCATION_MZONE)
e3:SetCountLimit(1,33200434)
e3:SetCost(c33200433.tgcost)
e3:SetTarget(c33200433.tgtg)
e3:SetOperation(c33200433.tgop)
c:RegisterEffect(e3)
end
--spsm
function c33200433.spcon1(e,tp,eg,ep,ev,re,r,rp)
return ep~=tp and re:IsHasType(EFFECT_TYPE_ACTIVATE) and re:IsActiveType(TYPE_SPELL) and Duel.GetFieldGroupCount(tp,LOCATION_EXTRA,0)==0
end
function c33200433.sptg(e,tp,eg,ep,ev,re,r,rp,chk)
if chk==0 then return Duel.GetLocationCount(tp,LOCATION_MZONE)>0 and Duel.IsPlayerCanDraw(tp,1)
and e:GetHandler():IsCanBeSpecialSummoned(e,0,tp,false,false) end
Duel.SetOperationInfo(0,CATEGORY_SPECIAL_SUMMON,e:GetHandler(),1,0,0)
Duel.SetOperationInfo(0,CATEGORY_DRAW,nil,0,tp,1)
end
function c33200433.spop(e,tp,eg,ep,ev,re,r,rp)
if Duel.GetLocationCount(tp,LOCATION_MZONE)<=0 or not e:GetHandler():IsRelateToEffect(e) then return end
if Duel.SpecialSummon(e:GetHandler(),0,tp,tp,false,false,POS_FACEUP) and Duel.IsPlayerCanDraw(tp,1) then
Duel.BreakEffect()
Duel.Draw(tp,1,REASON_EFFECT)
local tc=Duel.GetOperatedGroup():GetFirst()
Duel.ConfirmCards(1-tp,tc)
if tc:IsType(TYPE_SPELL) then Duel.SendtoGrave(tc,REASON_EFFECT) end
Duel.ShuffleHand(tp)
end
end
function c33200433.cfilter(c,tp)
return c:IsFaceup() and c:IsSetCard(0x3329) and c:GetSummonPlayer()==tp
end
function c33200433.spcon2(e,tp,eg,ep,ev,re,r,rp)
return eg:IsExists(c33200433.cfilter,1,nil,tp) and Duel.GetLocationCount(tp,LOCATION_MZONE)>0
end
--e3
function c33200433.tgdfilter(c)
return c:IsSetCard(0x3329) and c:IsAbleToGraveAsCost()
end
function c33200433.tgcost(e,tp,eg,ep,ev,re,r,rp,chk)
if chk==0 then return Duel.IsExistingMatchingCard(c33200433.tgdfilter,tp,LOCATION_DECK,0,1,nil) end
Duel.Hint(HINT_SELECTMSG,tp,HINTMSG_TOGRAVE)
local cg=Duel.SelectMatchingCard(tp,c33200433.tgdfilter,tp,LOCATION_DECK,0,1,1,nil)
Duel.SendtoGrave(cg,REASON_COST)
end
function c33200433.tgtg(e,tp,eg,ep,ev,re,r,rp,chk)
if chk==0 then return true end
Duel.SetOperationInfo(0,CATEGORY_TOGRAVE,nil,1,1-tp,LOCATION_DECK+LOCATION_HAND)
end
function c33200433.tgfilter(c)
return c:IsType(TYPE_SPELL) and c:IsAbleToGrave()
end
function c33200433.thfilter(c)
return c:IsAbleToHand() and c:IsSetCard(0x3329)
end
function c33200433.tgop(e,tp,eg,ep,ev,re,r,rp)
if Duel.GetMatchingGroupCount(c33200433.tgfilter,1-tp,LOCATION_DECK+LOCATION_HAND,0,nil)>=2 then
Duel.Hint(HINT_SELECTMSG,1-tp,HINTMSG_TOGRAVE)
local g=Duel.SelectMatchingCard(1-tp,c33200433.tgfilter,1-tp,LOCATION_DECK+LOCATION_HAND,0,2,2,nil)
if g:GetCount()~=0 then
Duel.SendtoGrave(g,REASON_EFFECT)
end
else
if Duel.IsExistingMatchingCard(c33200433.thfilter,tp,LOCATION_GRAVE,0,1,nil) and Duel.SelectYesNo(tp,aux.Stringid(33200433,0)) then
Duel.Hint(HINT_SELECTMSG,tp,HINTMSG_ATOHAND)
local g=Duel.SelectMatchingCard(tp,c33200433.thfilter,tp,LOCATION_GRAVE,0,1,1,nil)
local tc=g:GetFirst()
if tc and tc:IsAbleToHand() then
Duel.SendtoHand(tc,nil,REASON_EFFECT)
Duel.ConfirmCards(1-tp,tc)
Duel.ShuffleHand(tp)
end
end
end
end
--魔力联合 黄槐决明
function c33200435.initial_effect(c)
--spsummon proc
local e1=Effect.CreateEffect(c)
e1:SetType(EFFECT_TYPE_FIELD)
e1:SetCode(EFFECT_SPSUMMON_PROC)
e1:SetProperty(EFFECT_FLAG_UNCOPYABLE)
e1:SetRange(LOCATION_HAND+LOCATION_DECK)
e1:SetCountLimit(1,33200435+EFFECT_COUNT_CODE_OATH)
e1:SetCondition(c33200435.spcon)
e1:SetOperation(c33200435.spop)
e1:SetValue(SUMMON_VALUE_SELF)
c:RegisterEffect(e1)
local e2=Effect.CreateEffect(c)
e2:SetDescription(aux.Stringid(33200435,1))
e2:SetCategory(CATEGORY_SPECIAL_SUMMON)
e2:SetType(EFFECT_TYPE_IGNITION)
e2:SetCountLimit(1)
e2:SetRange(LOCATION_MZONE)
e2:SetCost(c33200435.cost)
e2:SetTarget(c33200435.tg)
e2:SetOperation(c33200435.op)
c:RegisterEffect(e2)
end
--e1
function c33200435.spfilter(c)
return c:IsType(TYPE_SPELL) and c:IsAbleToRemoveAsCost()
end
function c33200435.spcon(e,c)
if c==nil then return true end
local tp=c:GetControler()
return Duel.GetLocationCount(tp,LOCATION_MZONE)>0 and Duel.GetFieldGroupCount(tp,LOCATION_EXTRA,0)==0
and Duel.IsExistingMatchingCard(c33200435.spfilter,tp,0,LOCATION_GRAVE,1,nil)
end
function c33200435.spop(e,tp,eg,ep,ev,re,r,rp,c)
Duel.Hint(HINT_SELECTMSG,tp,HINTMSG_REMOVE)
local g=Duel.SelectMatchingCard(tp,c33200435.spfilter,tp,0,LOCATION_GRAVE,1,1,nil)
Duel.Remove(g,POS_FACEUP,REASON_COST)
end
--e2
function c33200435.costfilter(c)
return c:IsSetCard(0x329) and c:IsDiscardable()
end
function c33200435.cost(e,tp,eg,ep,ev,re,r,rp,chk)
if chk==0 then return Duel.IsExistingMatchingCard(c33200435.costfilter,tp,LOCATION_HAND,0,1,e:GetHandler()) end
Duel.DiscardHand(tp,c33200435.costfilter,1,1,REASON_COST+REASON_DISCARD)
end
function c33200435.tg(e,tp,eg,ep,ev,re,r,rp,chk)
if chk==0 then return Duel.GetFieldGroupCount(tp,LOCATION_DECK,0)>=3 end
end
function c33200435.op(e,tp,eg,ep,ev,re,r,rp)
if Duel.GetFieldGroupCount(tp,LOCATION_DECK,0)<3 then return end
Duel.ConfirmDecktop(tp,3)
local g=Duel.GetDecktopGroup(tp,3)
if g:GetCount()>0 then
Duel.Hint(HINT_SELECTMSG,tp,aux.Stringid(33200435,2))
local sg=g:Select(tp,1,1,nil)
local tc=sg:GetFirst()
Duel.MoveSequence(tc,1)
end
Duel.SortDecktop(tp,tp,2)
if Duel.IsExistingMatchingCard(c33200435.mfilter,tp,LOCATION_HAND,0,1,nil) and Duel.SelectYesNo(tp,aux.Stringid(33200435,1)) then
Duel.Hint(HINT_SELECTMSG,tp,HINTMSG_SUMMON)
local smg=Duel.SelectMatchingCard(tp,c33200435.mfilter,tp,LOCATION_HAND,0,1,1,nil)
if smg:GetCount()>0 then
Duel.Summon(tp,smg:GetFirst(),true,nil)
end
end
end
function c33200435.mfilter(c)
return c:IsSetCard(0x329) and c:IsSummonable(true,nil)
end
\ No newline at end of file
--魔力联合 毒漆藤
function c33200436.initial_effect(c)
--spsummon proc
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,33200436+EFFECT_COUNT_CODE_OATH)
e1:SetCondition(c33200436.spcon)
e1:SetOperation(c33200436.spop)
e1:SetValue(SUMMON_VALUE_SELF)
c:RegisterEffect(e1)
--atk down
local e2=Effect.CreateEffect(c)
e2:SetDescription(aux.Stringid(33200436,0))
e2:SetCategory(CATEGORY_SEARCH)
e2:SetType(EFFECT_TYPE_QUICK_O)
e2:SetHintTiming(0,TIMINGS_CHECK_MONSTER+TIMING_END_PHASE)
e2:SetCode(EVENT_FREE_CHAIN)
e2:SetRange(LOCATION_MZONE)
e2:SetCountLimit(1,33200437)
e2:SetTarget(c33200436.atktg)
e2:SetOperation(c33200436.atkop)
c:RegisterEffect(e2)
--immune spell
local e3=Effect.CreateEffect(c)
e3:SetType(EFFECT_TYPE_SINGLE)
e3:SetCode(EFFECT_IMMUNE_EFFECT)
e3:SetProperty(EFFECT_FLAG_SINGLE_RANGE)
e3:SetRange(LOCATION_MZONE)
e3:SetValue(c33200436.efilter)
c:RegisterEffect(e3)
end
--e1
function c33200436.spfilter(c)
return c:IsType(TYPE_SPELL) and c:IsAbleToRemoveAsCost()
end
function c33200436.spcon(e,c)
if c==nil then return true end
local tp=c:GetControler()
return Duel.GetLocationCount(tp,LOCATION_MZONE)>0 and Duel.GetFieldGroupCount(tp,LOCATION_EXTRA,0)==0
and Duel.IsExistingMatchingCard(c33200436.spfilter,tp,0,LOCATION_GRAVE,2,nil)
end
function c33200436.spop(e,tp,eg,ep,ev,re,r,rp,c)
Duel.Hint(HINT_SELECTMSG,tp,HINTMSG_REMOVE)
local g=Duel.SelectMatchingCard(tp,c33200436.spfilter,tp,0,LOCATION_GRAVE,2,2,nil)
Duel.Remove(g,POS_FACEUP,REASON_COST)
end
--e2
function c33200436.efilter(e,te)
return te:IsActiveType(TYPE_SPELL)
end
--e3
function c33200436.atkfilter(c)
return c:IsFaceup() and not c:IsAttack(0)
end
function c33200436.atktg(e,tp,eg,ep,ev,re,r,rp,chk)
local g=Duel.GetMatchingGroup(Card.IsType,tp,0,LOCATION_GRAVE+LOCATION_REMOVED,nil,TYPE_SPELL)
if chk==0 then return Duel.IsExistingMatchingCard(c33200436.atkfilter,tp,0,LOCATION_MZONE,1,nil)
and g:GetCount()>0 end
end
function c33200436.atkop(e,tp,eg,ep,ev,re,r,rp)
local sg=Duel.GetMatchingGroup(c33200436.atkfilter,tp,0,LOCATION_MZONE,nil)
local g=Duel.GetMatchingGroup(Card.IsType,tp,0,LOCATION_GRAVE+LOCATION_REMOVED,nil,TYPE_SPELL)
if g:GetCount()==0 or sg:GetCount()==0 then return end
local atkval=g:GetCount()*-500
for tc in aux.Next(sg) do
local e1=Effect.CreateEffect(e:GetHandler())
e1:SetType(EFFECT_TYPE_SINGLE)
e1:SetCode(EFFECT_UPDATE_ATTACK)
e1:SetReset(RESET_EVENT+RESETS_STANDARD)
e1:SetValue(atkval)
tc:RegisterEffect(e1)
if tc:IsAttack(0) then Duel.Destroy(tc,REASON_EFFECT) end
end
end
--魔力联合 梧桐
function c33200439.initial_effect(c)
--spsummon proc
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,33200439+EFFECT_COUNT_CODE_OATH)
e1:SetCondition(c33200439.spcon)
e1:SetOperation(c33200439.spop)
e1:SetValue(SUMMON_VALUE_SELF)
c:RegisterEffect(e1)
--negate
local e2=Effect.CreateEffect(c)
e2:SetDescription(aux.Stringid(33200439,0))
e2:SetCategory(CATEGORY_TOGRAVE+CATEGORY_DISABLE)
e2:SetType(EFFECT_TYPE_QUICK_O)
e2:SetHintTiming(0,TIMINGS_CHECK_MONSTER+TIMING_END_PHASE)
e2:SetCode(EVENT_FREE_CHAIN)
e2:SetRange(LOCATION_MZONE)
e2:SetCountLimit(1,33200440)
e2:SetTarget(c33200439.negtg)
e2:SetOperation(c33200439.negop)
c:RegisterEffect(e2)
--to grave
local e3=Effect.CreateEffect(c)
e3:SetCategory(CATEGORY_TOHAND+CATEGORY_SEARCH)
e3:SetType(EFFECT_TYPE_SINGLE+EFFECT_TYPE_TRIGGER_O)
e3:SetCode(EVENT_TO_GRAVE)
e3:SetProperty(EFFECT_FLAG_DELAY)
e3:SetCountLimit(1,33200441)
e3:SetTarget(c33200439.thtg)
e3:SetOperation(c33200439.thop)
c:RegisterEffect(e3)
end
--e1
function c33200439.spfilter(c)
return c:IsType(TYPE_SPELL) and c:IsAbleToRemoveAsCost()
end
function c33200439.spcon(e,c)
if c==nil then return true end
local tp=c:GetControler()
return Duel.GetLocationCount(tp,LOCATION_MZONE)>0 and Duel.GetFieldGroupCount(tp,LOCATION_EXTRA,0)==0
and Duel.IsExistingMatchingCard(c33200439.spfilter,tp,0,LOCATION_GRAVE,2,nil)
end
function c33200439.spop(e,tp,eg,ep,ev,re,r,rp,c)
Duel.Hint(HINT_SELECTMSG,tp,HINTMSG_REMOVE)
local g=Duel.SelectMatchingCard(tp,c33200439.spfilter,tp,0,LOCATION_GRAVE,2,2,nil)
Duel.Remove(g,POS_FACEUP,REASON_COST)
end
--e2
function c33200439.negtg(e,tp,eg,ep,ev,re,r,rp,chk)
if chk==0 then return true end
Duel.SetOperationInfo(0,CATEGORY_TOGRAVE,nil,1,1-tp,LOCATION_DECK+LOCATION_HAND)
end
function c33200439.tgfilter(c)
return c:IsType(TYPE_SPELL) and c:IsAbleToGrave()
end
function c33200439.negop(e,tp,eg,ep,ev,re,r,rp)
local c=e:GetHandler()
if Duel.GetMatchingGroupCount(c33200439.tgfilter,1-tp,LOCATION_DECK+LOCATION_HAND,0,nil)>=2 then
Duel.Hint(HINT_SELECTMSG,1-tp,HINTMSG_TOGRAVE)
local g=Duel.SelectMatchingCard(1-tp,c33200439.tgfilter,1-tp,LOCATION_DECK+LOCATION_HAND,0,2,2,nil)
if g:GetCount()~=0 then
Duel.SendtoGrave(g,REASON_EFFECT)
end
else
if Duel.IsExistingMatchingCard(aux.NegateAnyFilter,tp,0,LOCATION_ONFIELD,1,nil) and Duel.SelectYesNo(tp,aux.Stringid(33200439,1)) then
Duel.Hint(HINT_SELECTMSG,tp,HINTMSG_FACEUP)
local g=Duel.SelectMatchingCard(tp,aux.NegateAnyFilter,tp,0,LOCATION_ONFIELD,1,1,nil)
local tc=g:GetFirst()
if ((tc:IsFaceup() and not tc:IsDisabled()) or tc:IsType(TYPE_TRAPMONSTER)) then
local e1=Effect.CreateEffect(c)
e1:SetType(EFFECT_TYPE_SINGLE)
e1:SetProperty(EFFECT_FLAG_CANNOT_DISABLE)
e1:SetCode(EFFECT_DISABLE)
e1:SetReset(RESET_EVENT+RESETS_STANDARD+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+RESETS_STANDARD+RESET_PHASE+PHASE_END)
tc:RegisterEffect(e2)
if tc:IsType(TYPE_TRAPMONSTER) then
local e3=Effect.CreateEffect(c)
e3:SetType(EFFECT_TYPE_SINGLE)
e3:SetProperty(EFFECT_FLAG_CANNOT_DISABLE)
e3:SetCode(EFFECT_DISABLE_TRAPMONSTER)
e3:SetReset(RESET_EVENT+RESETS_STANDARD+RESET_PHASE+PHASE_END)
tc:RegisterEffect(e3)
end
end
end
end
end
--e3
function c33200439.thfilter1(c)
return c:IsSetCard(0x3329) and c:IsAbleToHand()
end
function c33200439.thfilter2(c)
return c:IsType(TYPE_SPELL) and c:IsAbleToHand()
end
function c33200439.thtg(e,tp,eg,ep,ev,re,r,rp,chk)
if chk==0 then return Duel.IsExistingMatchingCard(c33200439.thfilter1,tp,LOCATION_DECK,0,1,nil)
or Duel.IsExistingMatchingCard(c33200439.thfilter2,tp,0,LOCATION_GRAVE+LOCATION_REMOVED,1,nil) end
Duel.SetOperationInfo(0,CATEGORY_TOHAND,nil,1,tp,LOCATION_DECK+LOCATION_GRAVE+LOCATION_REMOVED)
end
function c33200439.thop(e,tp,eg,ep,ev,re,r,rp)
local c=e:GetHandler()
local g1=Duel.GetMatchingGroup(c33200439.thfilter1,tp,LOCATION_DECK,0,nil)
local g2=Duel.GetMatchingGroup(c33200439.thfilter2,tp,0,LOCATION_GRAVE+LOCATION_REMOVED,nil)
g1:Merge(g2)
if g1:GetCount()>0 then
Duel.Hint(HINT_SELECTMSG,tp,HINTMSG_ATOHAND)
local g3=g1:Select(tp,1,1,nil)
if g3:GetCount()>0 then
Duel.SendtoHand(g3,tp,REASON_EFFECT)
Duel.ConfirmCards(1-tp,g3)
end
end
end
\ No newline at end of file
--魔力联合 山茶花
function c33200442.initial_effect(c)
--spsm
local e1=Effect.CreateEffect(c)
e1:SetDescription(aux.Stringid(33200442,1))
e1:SetCategory(CATEGORY_SPECIAL_SUMMON+CATEGORY_DRAW)
e1:SetType(EFFECT_TYPE_QUICK_O)
e1:SetCode(EVENT_CHAINING)
e1:SetRange(LOCATION_HAND)
e1:SetCountLimit(1,33200442)
e1:SetCondition(c33200442.spcon1)
e1:SetTarget(c33200442.sptg)
e1:SetOperation(c33200442.spop)
c:RegisterEffect(e1)
local e2=Effect.CreateEffect(c)
e2:SetDescription(aux.Stringid(33200442,2))
e2:SetCategory(CATEGORY_SPECIAL_SUMMON)
e2:SetType(EFFECT_TYPE_FIELD+EFFECT_TYPE_TRIGGER_O)
e2:SetCode(EVENT_SPSUMMON_SUCCESS)
e2:SetRange(LOCATION_HAND)
e2:SetProperty(EFFECT_FLAG_DELAY+EFFECT_FLAG_DAMAGE_STEP)
e2:SetCountLimit(1,33200442)
e2:SetCondition(c33200442.spcon2)
e2:SetTarget(c33200442.sptg)
e2:SetOperation(c33200442.spop)
c:RegisterEffect(e2)
--send to grave
local e3=Effect.CreateEffect(c)
e3:SetCategory(CATEGORY_TOGRAVE+CATEGORY_TODECK+CATEGORY_DRAW)
e3:SetType(EFFECT_TYPE_SINGLE+EFFECT_TYPE_TRIGGER_O)
e3:SetProperty(EFFECT_FLAG_DAMAGE_STEP+EFFECT_FLAG_DELAY)
e3:SetCode(EVENT_SUMMON_SUCCESS)
e3:SetTarget(c33200442.tgtg)
e3:SetOperation(c33200442.tgop)
c:RegisterEffect(e3)
local e4=e3:Clone()
e4:SetCode(EVENT_SPSUMMON_SUCCESS)
c:RegisterEffect(e4)
end
--spsm
function c33200442.spcon1(e,tp,eg,ep,ev,re,r,rp)
return ep~=tp and re:IsHasType(EFFECT_TYPE_ACTIVATE) and re:IsActiveType(TYPE_SPELL) and Duel.GetFieldGroupCount(tp,LOCATION_EXTRA,0)==0
end
function c33200442.sptg(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 c33200442.spop(e,tp,eg,ep,ev,re,r,rp)
if Duel.GetLocationCount(tp,LOCATION_MZONE)<=0 or not e:GetHandler():IsRelateToEffect(e) then return end
Duel.SpecialSummon(e:GetHandler(),0,tp,tp,false,false,POS_FACEUP)
end
function c33200442.cfilter(c,tp)
return c:IsSummonLocation(LOCATION_EXTRA) and c:IsSummonPlayer(1-tp)
end
function c33200442.spcon2(e,tp,eg,ep,ev,re,r,rp)
return eg:IsExists(c33200442.cfilter,1,nil,tp) and Duel.GetLocationCount(tp,LOCATION_MZONE)>0
end
--e4
function c33200442.tgtg(e,tp,eg,ep,ev,re,r,rp,chk)
if chk==0 then return true end
Duel.SetOperationInfo(0,CATEGORY_TOGRAVE,nil,1,1-tp,LOCATION_DECK+LOCATION_HAND)
Duel.SetOperationInfo(0,CATEGORY_TODECK,nil,nil,tp,LOCATION_GRAVE)
end
function c33200442.tgfilter(c)
return c:IsType(TYPE_SPELL) and c:IsAbleToGrave()
end
function c33200442.tdfilter(c)
return c:IsSetCard(0x329) and c:IsAbleToDeck()
end
function c33200442.tgop(e,tp,eg,ep,ev,re,r,rp)
local c=e:GetHandler()
if Duel.GetMatchingGroupCount(c33200442.tgfilter,1-tp,LOCATION_DECK+LOCATION_HAND,0,nil)>=2 then
Duel.Hint(HINT_SELECTMSG,1-tp,HINTMSG_TOGRAVE)
local g=Duel.SelectMatchingCard(1-tp,c33200442.tgfilter,1-tp,LOCATION_DECK+LOCATION_HAND,0,2,2,nil)
if g:GetCount()~=0 then
Duel.SendtoGrave(g,REASON_EFFECT)
e:SetLabel(100)
end
else
e:SetLabel(0)
end
if Duel.IsExistingMatchingCard(c33200442.tdfilter,tp,LOCATION_GRAVE,0,1,nil) and Duel.SelectYesNo(tp,aux.Stringid(33200442,0)) then
Duel.Hint(HINT_SELECTMSG,1-tp,HINTMSG_TODECK)
local g=Duel.SelectMatchingCard(tp,c33200442.tdfilter,tp,LOCATION_GRAVE,0,1,3,nil)
if g:GetCount()~=0 then
Duel.SendtoDeck(g,nil,2,REASON_EFFECT)
end
end
if e:GetLabel()~=100 then Duel.Draw(tp,1,REASON_EFFECT) end
end
\ No newline at end of file
--夜幕魔术团? 灰白鬼牌
function c33200445.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,33200445+EFFECT_COUNT_CODE_OATH)
e1:SetCondition(c33200445.spcon1)
e1:SetOperation(c33200445.spop)
c:RegisterEffect(e1)
local e2=Effect.CreateEffect(c)
e2:SetType(EFFECT_TYPE_SINGLE+EFFECT_TYPE_CONTINUOUS)
e2:SetCode(EVENT_SPSUMMON_SUCCESS)
e2:SetProperty(EFFECT_FLAG_IGNORE_IMMUNE+EFFECT_FLAG_CANNOT_DISABLE)
e2:SetOperation(c33200445.imop)
c:RegisterEffect(e2)
--send to grave
local e3=Effect.CreateEffect(c)
e3:SetCategory(CATEGORY_TOHAND)
e3:SetType(EFFECT_TYPE_SINGLE+EFFECT_TYPE_TRIGGER_O)
e3:SetProperty(EFFECT_FLAG_DAMAGE_STEP+EFFECT_FLAG_DELAY)
e3:SetCode(EVENT_SUMMON_SUCCESS)
e3:SetCountLimit(1,33200446)
e3:SetTarget(c33200445.thtg)
e3:SetOperation(c33200445.thop)
c:RegisterEffect(e3)
local e4=e3:Clone()
e4:SetCode(EVENT_SPSUMMON_SUCCESS)
c:RegisterEffect(e4)
--spsm
local e5=Effect.CreateEffect(c)
e5:SetCategory(CATEGORY_SPECIAL_SUMMON+CATEGORY_DESTROY)
e5:SetType(EFFECT_TYPE_QUICK_O)
e5:SetCode(EVENT_CHAINING)
e5:SetRange(LOCATION_MZONE)
e5:SetCountLimit(1,33200447)
e5:SetCondition(c33200445.spcon2)
e5:SetCost(c33200445.spcost)
e5:SetTarget(c33200445.sptg)
e5:SetOperation(c33200445.spop2)
c:RegisterEffect(e5)
end
--e1
function c33200445.spcon1(e,c)
if c==nil then return true end
local tp=c:GetControler()
return Duel.GetLocationCount(tp,LOCATION_MZONE)>0 and Duel.GetFieldGroupCount(tp,LOCATION_EXTRA,0)==0
and Duel.IsExistingMatchingCard(c33200445.spfilter,tp,LOCATION_HAND,0,1,c)
end
function c33200445.spop(e,tp,eg,ep,ev,re,r,rp,c)
Duel.Hint(HINT_SELECTMSG,tp,HINTMSG_TOGRAVE)
local g=Duel.SelectMatchingCard(tp,c33200445.spfilter,tp,LOCATION_HAND,0,1,1,c)
Duel.SendtoGrave(g,REASON_COST)
end
function c33200445.spfilter(c)
return c:IsSetCard(0x329) and c:IsAbleToGraveAsCost()
end
--e2
function c33200445.imop(e,tp,eg,ep,ev,re,r,rp)
e:GetHandler():RegisterFlagEffect(33200445,RESET_EVENT+RESETS_STANDARD-RESET_TURN_SET+RESET_PHASE+PHASE_END,0,1)
end
--e3e4
function c33200445.thfilter(c)
return c:IsType(TYPE_SPELL) and c:IsAbleToHand()
end
function c33200445.thtg(e,tp,eg,ep,ev,re,r,rp,chk)
if chk==0 then return Duel.IsExistingMatchingCard(Card.IsAbleToHand,tp,0,LOCATION_GRAVE+LOCATION_REMOVED,1,nil) end
Duel.SetOperationInfo(0,CATEGORY_TOHAND,nil,1,tp,LOCATION_GRAVE+LOCATION_REMOVED)
end
function c33200445.thop(e,tp,eg,ep,ev,re,r,rp)
local c=e:GetHandler()
local g=Duel.GetMatchingGroup(Card.IsAbleToHand,tp,0,LOCATION_GRAVE+LOCATION_REMOVED,nil)
if g:GetCount()>0 then
Duel.Hint(HINT_SELECTMSG,tp,HINTMSG_ATOHAND)
local g=g:Select(tp,1,1,nil)
if g:GetCount()>0 then
Duel.SendtoHand(g,tp,REASON_EFFECT)
Duel.ConfirmCards(1-tp,g)
end
end
end
--spsm
function c33200445.hspfilter(c,e,tp)
return c:IsCode(33200436) and c:IsCanBeSpecialSummoned(e,0,tp,false,false,POS_FACEUP)
end
function c33200445.spcon2(e,tp,eg,ep,ev,re,r,rp)
return ep~=tp and re:IsHasType(EFFECT_TYPE_ACTIVATE) and re:IsActiveType(TYPE_SPELL)
and e:GetHandler():GetFlagEffect(33200445)==0
end
function c33200445.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 c33200445.sptg(e,tp,eg,ep,ev,re,r,rp,chk)
if chk==0 then return Duel.GetMZoneCount(tp,e:GetHandler())>0 and Duel.IsExistingMatchingCard(c33200445.hspfilter,tp,LOCATION_HAND+LOCATION_DECK,0,1,nil,e,tp) end
Duel.SetOperationInfo(0,CATEGORY_SPECIAL_SUMMON,nil,1,tp,LOCATION_HAND+LOCATION_DECK)
end
function c33200445.spop2(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,c33200445.hspfilter,tp,LOCATION_HAND+LOCATION_DECK,0,1,1,nil,e,tp)
local tc=g:GetFirst()
if tc then Duel.SpecialSummon(tc,0,tp,tp,false,false,POS_FACEUP) end
end
\ No newline at end of file
--魔力联合 山茶花
function c33200449.initial_effect(c)
--send to grave
local e1=Effect.CreateEffect(c)
e1:SetCategory(CATEGORY_TOGRAVE+CATEGORY_TODECK)
e1:SetType(EFFECT_TYPE_SINGLE+EFFECT_TYPE_TRIGGER_O)
e1:SetProperty(EFFECT_FLAG_DAMAGE_STEP+EFFECT_FLAG_DELAY)
e1:SetCode(EVENT_SUMMON_SUCCESS)
e1:SetProperty(EFFECT_FLAG_CARD_TARGET)
e1:SetCountLimit(1,33200449)
e1:SetTarget(c33200449.sptg)
e1:SetOperation(c33200449.spop)
c:RegisterEffect(e1)
local e2=e1:Clone()
e2:SetCode(EVENT_SPSUMMON_SUCCESS)
c:RegisterEffect(e2)
--to grave
local e3=Effect.CreateEffect(c)
e3:SetCategory(CATEGORY_SPECIAL_SUMMON+CATEGORY_TODECK)
e3:SetType(EFFECT_TYPE_SINGLE+EFFECT_TYPE_TRIGGER_O)
e3:SetCode(EVENT_TO_GRAVE)
e3:SetProperty(EFFECT_FLAG_DELAY)
e3:SetCountLimit(1,33200450)
e3:SetTarget(c33200449.tgtg)
e3:SetOperation(c33200449.tgop)
c:RegisterEffect(e3)
end
--e1
function c33200449.spfilter(c,e,tp)
return c:IsSetCard(0x329) and c:IsCanBeSpecialSummoned(e,0,tp,false,false)
end
function c33200449.tdfilter(c,e,tp)
return c:IsSetCard(0x3329) and c:IsType(TYPE_MONSTER) and c:IsAbleToDeck()
end
function c33200449.sptg(e,tp,eg,ep,ev,re,r,rp,chk,chkc)
if chkc then return chkc:IsLocation(LOCATION_GRAVE) and c33200449.spfilter(chkc,e,tp) end
if chk==0 then return Duel.GetMZoneCount(tp,e:GetHandler())>0
and Duel.IsExistingTarget(c33200449.spfilter,tp,LOCATION_GRAVE,0,1,nil,e,tp)
and Duel.IsExistingMatchingCard(c33200449.tdfilter,tp,LOCATION_MZONE,0,1,nil) end
Duel.Hint(HINT_SELECTMSG,tp,HINTMSG_SPSUMMON)
local g=Duel.SelectTarget(tp,c33200449.spfilter,tp,LOCATION_GRAVE,0,1,1,nil,e,tp)
Duel.SetOperationInfo(0,CATEGORY_SPECIAL_SUMMON,g,1,0,0)
Duel.SetOperationInfo(0,CATEGORY_TODECK,nil,1,0,0)
end
function c33200449.spop(e,tp,eg,ep,ev,re,r,rp)
local tc=Duel.GetFirstTarget()
if tc:IsRelateToEffect(e) and Duel.GetMZoneCount(tp,e:GetHandler())>0 and Duel.IsExistingMatchingCard(c33200449.tdfilter,tp,LOCATION_MZONE,0,1,nil) then
Duel.Hint(HINT_SELECTMSG,tp,HINTMSG_TODECK)
local g=Duel.SelectMatchingCard(tp,c33200449.tdfilter,tp,LOCATION_MZONE,0,1,1,nil)
if g:GetCount()>0 then
if Duel.SendtoDeck(g,nil,2,REASON_EFFECT) then
Duel.SpecialSummon(tc,0,tp,tp,false,false,POS_FACEUP)
end
end
end
end
--e3
function c33200449.tgfilter(c)
return c:IsType(TYPE_SPELL) and c:IsAbleToGrave()
end
function c33200449.tgtg(e,tp,eg,ep,ev,re,r,rp,chk)
if chk==0 then return e:GetHandler():IsAbleToHand() end
Duel.SetOperationInfo(0,CATEGORY_TOGRAVE,nil,1,1-tp,LOCATION_DECK+LOCATION_HAND)
end
function c33200449.tgop(e,tp,eg,ep,ev,re,r,rp)
local c=e:GetHandler()
if Duel.GetMatchingGroupCount(c33200433.tgfilter,1-tp,LOCATION_DECK+LOCATION_HAND,0,nil,TYPE_SPELL)>=2 then
Duel.Hint(HINT_SELECTMSG,1-tp,HINTMSG_TOGRAVE)
local g=Duel.SelectMatchingCard(1-tp,c33200433.tgfilter,1-tp,LOCATION_DECK+LOCATION_HAND,0,2,2,nil)
if g:GetCount()~=0 then
Duel.SendtoGrave(g,REASON_EFFECT)
end
else
if c:IsRelateToEffect(e) and c:IsAbleToHand() then
Duel.SendtoHand(c,nil,REASON_EFFECT)
Duel.ConfirmCards(1-tp,c)
end
end
end
\ No newline at end of file
--魔力联合 木棉
function c33200452.initial_effect(c)
--spsummon proc
local e0=Effect.CreateEffect(c)
e0:SetType(EFFECT_TYPE_FIELD)
e0:SetCode(EFFECT_SPSUMMON_PROC)
e0:SetProperty(EFFECT_FLAG_UNCOPYABLE)
e0:SetRange(LOCATION_GRAVE)
e0:SetCountLimit(1,33200452+EFFECT_COUNT_CODE_OATH)
e0:SetCondition(c33200452.spcon0)
e0:SetOperation(c33200452.spop0)
c:RegisterEffect(e0)
--send to grave
local e1=Effect.CreateEffect(c)
e1:SetCategory(CATEGORY_TOGRAVE)
e1:SetType(EFFECT_TYPE_SINGLE+EFFECT_TYPE_TRIGGER_O)
e1:SetProperty(EFFECT_FLAG_DAMAGE_STEP+EFFECT_FLAG_DELAY)
e1:SetCode(EVENT_SUMMON_SUCCESS)
e1:SetTarget(c33200452.tgtg)
e1:SetOperation(c33200452.tgop)
c:RegisterEffect(e1)
local e2=e1:Clone()
e2:SetCode(EVENT_SPSUMMON_SUCCESS)
c:RegisterEffect(e2)
--spsm from deck
local e3=Effect.CreateEffect(c)
e3:SetDescription(aux.Stringid(33200452,3))
e3:SetCategory(CATEGORY_SPECIAL_SUMMON+CATEGORY_TODECK)
e3:SetType(EFFECT_TYPE_IGNITION)
e3:SetRange(LOCATION_MZONE)
e3:SetCountLimit(1,33200453)
e3:SetCost(c33200452.spcost)
e3:SetTarget(c33200452.sptg)
e3:SetOperation(c33200452.spop)
c:RegisterEffect(e3)
end
--e0
function c33200452.spfilter0(c)
return c:IsSetCard(0x329) and c:IsReleasable() and Duel.GetMZoneCount(tp,c)>0
end
function c33200452.spcon0(e,c)
if c==nil then return true end
local tp=c:GetControler()
return Duel.GetFieldGroupCount(tp,LOCATION_EXTRA,0)==0 and Duel.IsExistingMatchingCard(c33200452.spfilter0,tp,LOCATION_HAND+LOCATION_ONFIELD,0,2,nil)
end
function c33200452.spop0(e,tp,eg,ep,ev,re,r,rp,c)
Duel.Hint(HINT_SELECTMSG,tp,HINTMSG_RELEASE)
local g=Duel.SelectMatchingCard(tp,c33200452.spfilter0,tp,LOCATION_HAND+LOCATION_ONFIELD,0,2,2,nil)
Duel.Release(g,REASON_COST)
end
--e1e2
function c33200452.tgtg(e,tp,eg,ep,ev,re,r,rp,chk)
if chk==0 then return true end
Duel.SetOperationInfo(0,CATEGORY_TOGRAVE,nil,1,1-tp,LOCATION_DECK+LOCATION_HAND)
end
function c33200452.tgfilter(c)
return c:IsType(TYPE_SPELL) and c:IsAbleToGrave()
end
function c33200452.tgop(e,tp,eg,ep,ev,re,r,rp)
local c=e:GetHandler()
if Duel.GetMatchingGroupCount(c33200452.tgfilter,1-tp,LOCATION_DECK+LOCATION_HAND,0,nil)>=2 then
Duel.Hint(HINT_SELECTMSG,1-tp,HINTMSG_TOGRAVE)
local g=Duel.SelectMatchingCard(1-tp,c33200452.tgfilter,1-tp,LOCATION_DECK+LOCATION_HAND,0,2,2,nil)
if g:GetCount()~=0 then
Duel.SendtoGrave(g,REASON_EFFECT)
end
end
end
--e3
function c33200452.spcost(e,tp,eg,ep,ev,re,r,rp,chk)
if chk==0 then return e:GetHandler():IsAbleToDeckAsCost() end
Duel.SendtoDeck(e:GetHandler(),nil,2,REASON_COST)
end
function c33200452.spfilter(c,e,tp)
return c:IsSetCard(0x3329) and c:IsLevelBelow(7) and not c:IsCode(33200452) and c:IsCanBeSpecialSummoned(e,0,tp,false,false)
end
function c33200452.sptg(e,tp,eg,ep,ev,re,r,rp,chk)
if chk==0 then return Duel.GetLocationCount(tp,LOCATION_MZONE)>-1
and Duel.IsExistingMatchingCard(c33200452.spfilter,tp,LOCATION_DECK,0,1,nil,e,tp) end
Duel.SetOperationInfo(0,CATEGORY_SPECIAL_SUMMON,nil,1,tp,LOCATION_DECK)
end
function c33200452.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,c33200452.spfilter,tp,LOCATION_DECK,0,1,1,nil,e,tp)
if g:GetCount()>0 then
Duel.SpecialSummon(g,0,tp,tp,false,false,POS_FACEUP)
end
end
\ No newline at end of file
--荒野的单调士
function c9310046.initial_effect(c)
--tograve
local e1=Effect.CreateEffect(c)
e1:SetCategory(CATEGORY_DISABLE)
e1:SetType(EFFECT_TYPE_SINGLE+EFFECT_TYPE_TRIGGER_O)
e1:SetCode(EVENT_SUMMON_SUCCESS)
e1:SetProperty(EFFECT_FLAG_DELAY)
e1:SetCountLimit(1,9310046)
e1:SetLabel(0)
e1:SetCost(c9310046.cost)
e1:SetTarget(c9310046.tg)
e1:SetOperation(c9310046.operation)
c:RegisterEffect(e1)
local e2=e1:Clone()
e2:SetCode(EVENT_SPSUMMON_SUCCESS)
c:RegisterEffect(e2)
--nontuner
local e3=Effect.CreateEffect(c)
e3:SetType(EFFECT_TYPE_SINGLE)
e3:SetProperty(EFFECT_FLAG_SINGLE_RANGE)
e3:SetRange(LOCATION_MZONE)
e3:SetCode(EFFECT_NONTUNER)
e3:SetValue(c9310046.tnval)
c:RegisterEffect(e3)
--effect gain
local e4=Effect.CreateEffect(c)
e4:SetType(EFFECT_TYPE_SINGLE+EFFECT_TYPE_CONTINUOUS)
e4:SetCode(EVENT_BE_MATERIAL)
e4:SetProperty(EFFECT_FLAG_EVENT_PLAYER)
e4:SetCondition(c9310046.efcon)
e4:SetOperation(c9310046.efop)
c:RegisterEffect(e4)
end
function c9310046.cost(e,tp,eg,ep,ev,re,r,rp,chk)
e:SetLabel(1)
return true
end
function c9310046.cfilter(c)
return c:IsType(TYPE_EQUIP) and c:IsAbleToGraveAsCost()
end
function c9310046.tg(e,tp,eg,ep,ev,re,r,rp,chk,chkc)
if chk==0 then
if e:GetLabel()~=1 then return false end
e:SetLabel(0)
return Duel.IsExistingMatchingCard(c9310046.cfilter,tp,LOCATION_DECK,0,1,nil)
end
e:SetLabel(0)
Duel.Hint(HINT_SELECTMSG,tp,HINTMSG_TOGRAVE)
local g=Duel.SelectMatchingCard(tp,c9310046.cfilter,tp,LOCATION_DECK,0,1,1,nil)
Duel.SendtoGrave(g,REASON_COST)
e:SetLabelObject(g:GetFirst())
end
function c9310046.operation(e,tp,eg,ep,ev,re,r,rp)
local c=e:GetHandler()
local code=e:GetLabelObject():GetOriginalCodeRule()
local e1=Effect.CreateEffect(c)
e1:SetType(EFFECT_TYPE_FIELD)
e1:SetCode(EFFECT_CANNOT_SPECIAL_SUMMON)
e1:SetProperty(EFFECT_FLAG_PLAYER_TARGET)
e1:SetTargetRange(1,1)
e1:SetTarget(aux.TargetBoolFunction(Card.IsOriginalCodeRule,code))
e1:SetReset(RESET_PHASE+PHASE_END)
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(aux.TargetBoolFunction(Card.IsOriginalCodeRule,code))
e2:SetReset(RESET_PHASE+PHASE_END)
Duel.RegisterEffect(e2,tp)
end
function c9310046.tnval(e,c)
return e:GetHandler():IsDefensePos()
end
function c9310046.efcon(e,tp,eg,ep,ev,re,r,rp)
return bit.band(r,REASON_SYNCHRO+REASON_LINK)~=0
end
function c9310046.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(9310046,0))
e1:SetType(EFFECT_TYPE_CONTINUOUS+EFFECT_TYPE_SINGLE)
e1:SetProperty(EFFECT_FLAG_SINGLE_RANGE+EFFECT_FLAG_CLIENT_HINT)
e1:SetCode(EFFECT_DESTROY_REPLACE)
e1:SetRange(LOCATION_MZONE)
e1:SetTarget(c9310046.reptg)
e1:SetReset(RESET_EVENT+RESETS_STANDARD)
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+RESETS_STANDARD)
rc:RegisterEffect(e2,true)
end
end
function c9310046.repfilter(c)
return c:IsType(TYPE_SPELL) and c:IsAbleToGrave() and c:IsFaceup()
end
function c9310046.reptg(e,tp,eg,ep,ev,re,r,rp,chk)
local c=e:GetHandler()
if chk==0 then return c:IsReason(REASON_BATTLE+REASON_EFFECT) and not c:IsReason(REASON_REPLACE)
and Duel.IsExistingMatchingCard(c9310046.repfilter,tp,LOCATION_REMOVED,0,1,nil) end
if Duel.SelectEffectYesNo(tp,c,aux.Stringid(9310046,1)) then
Duel.Hint(HINT_SELECTMSG,tp,HINTMSG_DESREPLACE)
local g=Duel.GetMatchingGroup(c9310046.repfilter,tp,LOCATION_REMOVED,0,nil)
local tc=g:GetFirst()
Duel.SendtoGrave(tc,REASON_EFFECT+REASON_RETURN+REASON_REPLACE)
if tc:IsType(TYPE_EQUIP) and tc:IsType(TYPE_SPELL)
and tc:IsAbleToHand() and tc:IsLocation(LOCATION_GRAVE)
and Duel.SelectYesNo(tp,aux.Stringid(9310046,2)) then
Duel.BreakEffect()
Duel.SendtoHand(tc,nil,REASON_EFFECT)
end
return true
else return false end
end
\ No newline at end of file
...@@ -601,11 +601,7 @@ ...@@ -601,11 +601,7 @@
!setname 0x326 机略纵横 !setname 0x326 机略纵横
!setname 0xa327 龙契 !setname 0xa327 龙契
!setname 0xc327 契龙圣约 !setname 0xc327 契龙圣约
!setname 0x329 异界旅人
!setname 0x3329 魔力联合
!setname 0x5329 圣殿剑骑 !setname 0x5329 圣殿剑骑
!setname 0xa329 夜幕魔术团
!setname 0xc329 幻兽佣兵团
!setname 0x332a 寒霜灵兽 !setname 0x332a 寒霜灵兽
!setname 0x532a 迷影灵兽 !setname 0x532a 迷影灵兽
!setname 0x632a 星辉末裔 !setname 0x632a 星辉末裔
......
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