Commit d4e05ebe authored by nanahira's avatar nanahira

1.999zc

parent e72bd72a
No preview for this file type
......@@ -123,6 +123,7 @@
!setname 0x240 青娥
!setname 0x242 宫古芳香
!setname 0x246 仙符
!setname 0x250 原神
!setname 0x251 星莲
!setname 0x251a 一轮
!setname 0x251b 云山
......@@ -174,6 +175,8 @@
!setname 0x443 精灵剑舞
!setname 0x451 游戏界
!setname 0x456 银雨
!setname 0x492 蛇符
!setname 0x493 蛙符
!setname 0x494 奇迹
!setname 0x496 秘术『...』
!setname 0x497 早苗
......@@ -262,6 +265,7 @@
!setname 0x403 黄金拼图
!setname 0x378 飞落之羽
!setname 0x372 遗存
!setname 0xaa2 慧音
!setname 0xbad 茧墨阿座化
!setname 0xcaa 时椿之景
......
No preview for this file type
--瞳中所示之物
function c22200005.initial_effect(c)
--spsummon
local e1=Effect.CreateEffect(c)
e1:SetDescription(aux.Stringid(22200005,0))
e1:SetCategory(CATEGORY_SPECIAL_SUMMON+CATEGORY_TOKEN+CATEGORY_DAMAGE+CATEGORY_DESTROY)
e1:SetType(EFFECT_TYPE_FIELD+EFFECT_TYPE_TRIGGER_O)
e1:SetCode(EVENT_ATTACK_ANNOUNCE)
e1:SetRange(LOCATION_HAND)
e1:SetCondition(c22200005.condition)
e1:SetCost(c22200005.cost)
e1:SetTarget(c22200005.target)
e1:SetOperation(c22200005.operation)
c:RegisterEffect(e1)
end
function c22200005.condition(e,tp,eg,ep,ev,re,r,rp)
return Duel.GetAttacker():GetControler()~=tp
end
function c22200005.cost(e,tp,eg,ep,ev,re,r,rp,chk)
local c=e:GetHandler()
if chk==0 then return c:IsDiscardable() end
Duel.SendtoGrave(c,REASON_COST+REASON_DISCARD)
end
function c22200005.target(e,tp,eg,ep,ev,re,r,rp,chk)
if chk==0 then return Duel.GetLocationCount(tp,LOCATION_MZONE)>0
and Duel.IsPlayerCanSpecialSummonMonster(tp,22200999,0,0x4011,0,0,1,RACE_PSYCHO,ATTRIBUTE_DARK) end
Duel.SetOperationInfo(0,CATEGORY_TOKEN,nil,1,0,0)
Duel.SetOperationInfo(0,CATEGORY_SPECIAL_SUMMON,nil,1,0,0)
end
function c22200005.operation(e,tp,eg,ep,ev,re,r,rp)
local c=e:GetHandler()
if Duel.GetLocationCount(tp,LOCATION_MZONE)<=0 then return end
if not Duel.IsPlayerCanSpecialSummonMonster(tp,22200999,0,0x4011,0,0,1,RACE_PSYCHO,ATTRIBUTE_DARK) then return end
local token=Duel.CreateToken(tp,22200999)
if Duel.SpecialSummon(token,0,tp,tp,false,false,POS_FACEUP_DEFENSE)>0 then
local a=Duel.GetAttacker()
if a:IsAttackable() and not a:IsImmuneToEffect(e) then
Duel.CalculateDamage(a,token)
Duel.BreakEffect()
local c=e:GetHandler()
local e1=Effect.CreateEffect(c)
e1:SetType(EFFECT_TYPE_CONTINUOUS+EFFECT_TYPE_FIELD)
e1:SetProperty(EFFECT_FLAG_DELAY)
e1:SetCode(EVENT_BATTLE_DESTROYED)
e1:SetCondition(c22200005.spcon)
e1:SetOperation(c22200005.spop)
e1:SetReset(RESET_PHASE+PHASE_END)
Duel.RegisterEffect(e1,tp)
local e2=Effect.CreateEffect(c)
e2:SetType(EFFECT_TYPE_CONTINUOUS+EFFECT_TYPE_FIELD)
e1:SetProperty(EFFECT_FLAG_DELAY)
e2:SetCode(EVENT_PHASE+PHASE_BATTLE)
e2:SetCountLimit(1)
e2:SetOperation(c22200005.desop)
e2:SetReset(RESET_PHASE+PHASE_END)
Duel.RegisterEffect(e2,tp)
end
end
end
function c22200005.cfilter(c,tp)
return c:IsReason(REASON_BATTLE) and c:IsType(TYPE_TOKEN) and c:GetPreviousControler()==tp
end
function c22200005.spcon(e,tp,eg,ep,ev,re,r,rp)
return eg:IsExists(c22200005.cfilter,1,nil,tp) and Duel.GetLocationCount(tp,LOCATION_MZONE)>0 and Duel.IsPlayerCanSpecialSummonMonster(tp,22200999,0,0x4011,0,0,1,RACE_PSYCHO,ATTRIBUTE_DARK)
end
function c22200005.spop(e,tp,eg,ep,ev,re,r,rp)
if Duel.GetLocationCount(tp,LOCATION_MZONE)<=0 then return end
if not Duel.IsPlayerCanSpecialSummonMonster(tp,22200999,0,0x4011,0,0,1,RACE_PSYCHO,ATTRIBUTE_DARK) then return end
Duel.Hint(HINT_CARD,tp,22200005)
local token=Duel.CreateToken(tp,22200999)
Duel.SpecialSummon(token,0,tp,tp,false,false,POS_FACEUP_DEFENSE)
end
function c22200005.desop(e,tp,eg,ep,ev,re,r,rp)
Duel.Hint(HINT_CARD,tp,22200005)
local c=e:GetHandler()
local g=Duel.GetFieldGroup(tp,LOCATION_ONFIELD,LOCATION_ONFIELD):Filter(Card.IsFaceup,nil):Filter(Card.IsType,nil,TYPE_TOKEN)
if g:GetCount()>0 and Duel.Destroy(g,REASON_EFFECT)>0 then
local dm=Duel.GetOperatedGroup():GetCount()*500
Duel.Damage(tp,dm,REASON_EFFECT)
end
e:Reset()
end
\ No newline at end of file
--未曾预见
function c22201106.initial_effect(c)
--Activate
local e1=Effect.CreateEffect(c)
e1:SetCategory(CATEGORY_SPECIAL_SUMMON)
e1:SetProperty(EFFECT_FLAG_CARD_TARGET)
e1:SetType(EFFECT_TYPE_ACTIVATE)
e1:SetCode(EVENT_FREE_CHAIN)
e1:SetTarget(c22201106.target)
e1:SetOperation(c22201106.activate)
c:RegisterEffect(e1)
end
function c22201106.filter(c)
return c:IsFaceup() and c:IsCanOverlay()
end
function c22201106.filter2(c,g)
return g:IsExists(Card.IsOriginalCodeRule,1,c,c:GetOriginalCode())
end
function c22201106.spfilter(c,e,tp,ec)
return c:IsCode(22200122) and c:IsCanBeSpecialSummoned(e,0,tp,false,false) and Duel.GetLocationCountFromEx(tp,tp,ec,c,0x60)>0
end
function c22201106.target(e,tp,eg,ep,ev,re,r,rp,chk,chkc)
if chkc then return chkc:IsLocation(LOCATION_ONFIELD) and c22201106.filter(chkc) end
local g=Duel.GetMatchingGroup(c22201106.filter,tp,LOCATION_ONFIELD,LOCATION_ONFIELD,nil)
local sg=g:Filter(c22201106.filter2,nil,g)
if chk==0 then
return sg:GetCount()>0 and Duel.IsExistingMatchingCard(c22201106.spfilter,tp,LOCATION_EXTRA,0,1,nil,e,tp,e:GetHandler())
end
Duel.Hint(HINT_SELECTMSG,tp,HINTMSG_TARGET)
local hg1=sg:Select(tp,1,1,nil)
local hg2=sg:Filter(Card.IsOriginalCodeRule,hg1:GetFirst(),hg1:GetFirst():GetOriginalCode())
Duel.Hint(HINT_SELECTMSG,tp,HINTMSG_TARGET)
hg1:AddCard(hg2:Select(tp,1,1,nil):GetFirst())
Duel.SetTargetCard(hg1)
Duel.SetOperationInfo(0,CATEGORY_SPECIAL_SUMMON,nil,1,tp,LOCATION_EXTRA)
end
function c22201106.activate(e,tp,eg,ep,ev,re,r,rp)
local c=e:GetHandler()
Duel.Hint(HINT_SELECTMSG,tp,HINTMSG_SPSUMMON)
local tc=Duel.SelectMatchingCard(tp,c22201106.spfilter,tp,LOCATION_EXTRA,0,1,1,nil,e,tp,e:GetHandler()):GetFirst()
if tc and Duel.SpecialSummon(tc,0,tp,tp,false,false,POS_FACEUP,0x60)>0 then
local e2=Effect.CreateEffect(c)
e2:SetType(EFFECT_TYPE_FIELD+EFFECT_TYPE_CONTINUOUS)
e2:SetCode(EVENT_PHASE+PHASE_END)
e2:SetCountLimit(1)
e2:SetProperty(EFFECT_FLAG_IGNORE_IMMUNE)
e2:SetLabelObject(tc)
e2:SetCondition(c22201106.descon)
e2:SetOperation(c22201106.desop)
Duel.RegisterEffect(e2,tp)
local e3=Effect.CreateEffect(c)
e3:SetType(EFFECT_TYPE_SINGLE)
e3:SetCode(EFFECT_CANNOT_BE_FUSION_MATERIAL)
e3:SetValue(1)
e3:SetReset(RESET_EVENT+RESETS_STANDARD)
tc:RegisterEffect(e3,true)
local e4=e3:Clone()
e4:SetCode(EFFECT_CANNOT_BE_SYNCHRO_MATERIAL)
tc:RegisterEffect(e4,true)
local e5=e3:Clone()
e5:SetCode(EFFECT_CANNOT_BE_XYZ_MATERIAL)
tc:RegisterEffect(e5,true)
local e6=e5:Clone()
e6:SetCode(EFFECT_CANNOT_BE_LINK_MATERIAL)
tc:RegisterEffect(e6,true)
tc:RegisterFlagEffect(22201106,RESET_EVENT+RESETS_STANDARD,0,1)
local tg=Duel.GetChainInfo(0,CHAININFO_TARGET_CARDS):Filter(Card.IsRelateToEffect,nil,e)
if tg:GetCount()<1 then return end
local tg1=tg:GetFirst():GetOverlayGroup()
local tg2=tg:GetNext():GetOverlayGroup()
tg1:Merge(tg2)
if tg1:GetCount()>0 then
Duel.SendtoGrave(tg1,REASON_RULE)
end
local tc1=tg:GetFirst()
while tc1 do
if tc1:IsType(TYPE_SPELL+TYPE_TRAP) then tc1:CancelToGrave() end
tc1=tg:GetNext()
end
Duel.Overlay(tc,tg)
local e1=Effect.CreateEffect(c)
e1:SetType(EFFECT_TYPE_SINGLE)
e1:SetCode(EFFECT_CHANGE_CODE)
e1:SetProperty(EFFECT_FLAG_CANNOT_DISABLE)
e1:SetValue(tg:GetFirst():GetOriginalCode())
e1:SetReset(RESET_EVENT+RESETS_STANDARD)
tc:RegisterEffect(e1)
end
end
function c22201106.descon(e,tp,eg,ep,ev,re,r,rp)
local tc=e:GetLabelObject()
if tc:GetFlagEffect(22201106)~=0 then
return true
else
e:Reset()
return false
end
end
function c22201106.desop(e,tp,eg,ep,ev,re,r,rp)
local tc=e:GetLabelObject()
Duel.Destroy(tc,REASON_EFFECT)
end
\ No newline at end of file
--咏唱破弃
function c22201301.initial_effect(c)
--Activate
local e1=Effect.CreateEffect(c)
e1:SetDescription(aux.Stringid(22201301,0))
e1:SetCategory(CATEGORY_SPECIAL_SUMMON)
e1:SetType(EFFECT_TYPE_ACTIVATE)
e1:SetCode(EVENT_FREE_CHAIN)
e1:SetCountLimit(1,22201301+EFFECT_COUNT_CODE_OATH)
e1:SetTarget(c22201301.target)
e1:SetOperation(c22201301.operation)
c:RegisterEffect(e1)
end
function c22201301.ritfilter(c,e,tp)
return c:IsType(TYPE_RITUAL) and c:IsType(TYPE_MONSTER) and not c:IsPublic()
end
function c22201301.target(e,tp,eg,ep,ev,re,r,rp,chk)
if chk==0 then
return Duel.IsExistingMatchingCard(c22201301.ritfilter,tp,LOCATION_HAND,0,1,nil)
end
end
function c22201301.operation(e,tp,eg,ep,ev,re,r,rp)
local g=Duel.SelectMatchingCard(tp,c22201301.ritfilter,tp,LOCATION_HAND,0,1,1,nil)
if g:GetCount()<1 then return end
local tc=g:GetFirst()
Duel.ConfirmCards(1-tp,tc)
Duel.ShuffleHand(tp)
local c=e:GetHandler()
if c:IsRelateToEffect(e) or not c:IsReason(REASON_DESTROY) then return end
if Duel.GetMZoneCount(tp)>0 and tc:IsCanBeSpecialSummoned(e,SUMMON_TYPE_RITUAL,tp,false,false) and Duel.SelectYesNo(tp,aux.Stringid(22201301,1)) then
Duel.SpecialSummon(tc,SUMMON_TYPE_RITUAL,tp,tp,false,false,POS_FACEUP)
tc:CompleteProcedure()
end
end
--逸散的恐惧
function c22202012.initial_effect(c)
--Activate
local e1=Effect.CreateEffect(c)
e1:SetDescription(aux.Stringid(22202012,0))
e1:SetType(EFFECT_TYPE_ACTIVATE)
e1:SetProperty(EFFECT_FLAG_CARD_TARGET)
e1:SetCode(EVENT_FREE_CHAIN)
e1:SetHintTiming(0,TIMINGS_CHECK_MONSTER+TIMING_END_PHASE)
e1:SetTarget(c22202012.target)
e1:SetOperation(c22202012.activate)
c:RegisterEffect(e1)
--ChangePosition
local e2=Effect.CreateEffect(c)
e2:SetDescription(aux.Stringid(22202012,1))
e2:SetCategory(CATEGORY_POSITION)
e2:SetType(EFFECT_TYPE_FIELD+EFFECT_TYPE_TRIGGER_O)
e2:SetCode(EVENT_ATTACK_ANNOUNCE)
e2:SetRange(LOCATION_GRAVE)
e2:SetCondition(c22202012.poscon)
e2:SetCost(aux.bfgcost)
e2:SetTarget(c22202012.postg)
e2:SetOperation(c22202012.posop)
c:RegisterEffect(e2)
end
function c22202012.target(e,tp,eg,ep,ev,re,r,rp,chk,chkc)
if chkc then return 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)
end
function c22202012.activate(e,tp,eg,ep,ev,re,r,rp)
local c=e:GetHandler()
local tc=Duel.GetFirstTarget()
if tc and tc:IsRelateToEffect(e) then
local e1=Effect.CreateEffect(c)
e1:SetType(EFFECT_TYPE_SINGLE)
e1:SetCode(EFFECT_CANNOT_BE_EFFECT_TARGET)
e1:SetProperty(EFFECT_FLAG_SINGLE_RANGE)
e1:SetRange(LOCATION_MZONE)
e1:SetValue(aux.tgoval)
e1:SetReset(RESET_EVENT+RESETS_STANDARD+RESET_PHASE+PHASE_END)
tc:RegisterEffect(e1)
local e2=Effect.CreateEffect(c)
e2:SetType(EFFECT_TYPE_SINGLE)
e2:SetCode(EFFECT_CANNOT_BE_BATTLE_TARGET)
e2:SetProperty(EFFECT_FLAG_SINGLE_RANGE)
e2:SetRange(LOCATION_MZONE)
e2:SetValue(1)
e2:SetReset(RESET_EVENT+RESETS_STANDARD+RESET_PHASE+PHASE_END)
tc:RegisterEffect(e2)
end
end
function c22202012.poscon(e,tp,eg,ep,ev,re,r,rp)
local ac=Duel.GetAttacker()
return ac:IsControler(1-tp) and ac:IsAttackPos() and Duel.GetAttackTarget()==nil and aux.exccon(e,tp,eg,ep,ev,re,r,rp)
end
function c22202012.postg(e,tp,eg,ep,ev,re,r,rp,chk,chkc)
local ac=Duel.GetAttacker()
if chk==0 then return ac:IsCanChangePosition() end
Duel.SetOperationInfo(0,CATEGORY_POSITION,ac,1,0,0)
end
function c22202012.posop(e,tp,eg,ep,ev,re,r,rp)
local ac=Duel.GetAttacker()
if ac:IsAttackPos() and ac:IsRelateToBattle() then
Duel.ChangePosition(ac,POS_FACEUP_DEFENSE)
end
end
\ No newline at end of file
--猜拳胜负
function c22202104.initial_effect(c)
--Activate
local e1=Effect.CreateEffect(c)
e1:SetDescription(aux.Stringid(22202104,0))
e1:SetCategory(CATEGORY_NEGATE+CATEGORY_DESTROY)
e1:SetType(EFFECT_TYPE_ACTIVATE)
e1:SetCode(EVENT_CHAINING)
e1:SetCountLimit(1,22202104+EFFECT_COUNT_CODE_OATH)
e1:SetCondition(c22202104.condition)
e1:SetTarget(c22202104.target)
e1:SetOperation(c22202104.activate)
c:RegisterEffect(e1)
--act in hand
local e2=Effect.CreateEffect(c)
e2:SetType(EFFECT_TYPE_SINGLE)
e2:SetCode(EFFECT_TRAP_ACT_IN_HAND)
e2:SetCondition(c22202104.handcon)
c:RegisterEffect(e2)
end
function c22202104.condition(e,tp,eg,ep,ev,re,r,rp)
return re:IsHasType(EFFECT_TYPE_ACTIVATE) and Duel.IsChainNegatable(ev)
end
function c22202104.target(e,tp,eg,ep,ev,re,r,rp,chk)
if chk==0 then return true end
end
function c22202104.activate(e,tp,eg,ep,ev,re,r,rp)
if Duel.RockPaperScissors()~=tp then return end
if Duel.NegateActivation(ev) and re:GetHandler():IsRelateToEffect(re) then
Duel.Destroy(eg,REASON_EFFECT)
end
end
function c22202104.handcon(e)
local tp=e:GetHandlerPlayer()
return (Duel.GetTurnCount()%2==1 and Duel.GetTurnPlayer()==1-tp) or (Duel.GetTurnCount()%2==0 and Duel.GetTurnPlayer()==tp)
end
\ No newline at end of file
--执掌令旗之人
function c22290001.initial_effect(c)
--special summon
local e1=Effect.CreateEffect(c)
e1:SetDescription(aux.Stringid(22290001,0))
e1:SetCategory(CATEGORY_SPECIAL_SUMMON+CATEGORY_SEARCH)
e1:SetType(EFFECT_TYPE_QUICK_O)
e1:SetCode(EVENT_FREE_CHAIN)
e1:SetRange(LOCATION_HAND)
e1:SetCountLimit(1,22290001)
e1:SetTarget(c22290001.sptg)
e1:SetOperation(c22290001.spop)
c:RegisterEffect(e1)
local e2=Effect.CreateEffect(c)
e2:SetType(EFFECT_TYPE_SINGLE+EFFECT_TYPE_TRIGGER_O)
e2:SetCode(EVENT_SUMMON_SUCCESS)
e2:SetProperty(EFFECT_FLAG_DELAY+EFFECT_FLAG_DAMAGE_STEP)
e2:SetTarget(c22290001.tg)
e2:SetOperation(c22290001.op)
c:RegisterEffect(e2)
local e3=e2:Clone()
e3:SetCode(EVENT_SPSUMMON_SUCCESS)
c:RegisterEffect(e3)
if c22290001.counter==nil then
c22290001.counter=true
c22290001[0]=0
c22290001[1]=0
local e4=Effect.CreateEffect(c)
e4:SetType(EFFECT_TYPE_CONTINUOUS+EFFECT_TYPE_FIELD)
e4:SetCode(EVENT_PHASE_START+PHASE_DRAW)
e4:SetOperation(c22290001.resetcount)
Duel.RegisterEffect(e4,0)
local e5=Effect.CreateEffect(c)
e5:SetType(EFFECT_TYPE_CONTINUOUS+EFFECT_TYPE_FIELD)
e5:SetCode(EVENT_CHAINING)
e5:SetOperation(c22290001.addcount)
Duel.RegisterEffect(e5,0)
end
end
c22290001.named_with_Saihai=1
function c22290001.IsSaihai(c)
local m=_G["c"..c:GetCode()]
return m and m.named_with_Saihai
end
function c22290001.resetcount(e,tp,eg,ep,ev,re,r,rp)
c22290001[0]=0
c22290001[1]=0
end
function c22290001.addcount(e,tp,eg,ep,ev,re,r,rp)
if not re:IsHasType(EFFECT_TYPE_ACTIVATE) or not c22290001.IsSaihai(re:GetHandler()) then return end
c22290001[rp]=c22290001[rp]+1
end
function c22290001.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) and c22290001[tp]>0 end
Duel.SetOperationInfo(0,CATEGORY_SPECIAL_SUMMON,e:GetHandler(),1,0,0)
end
function c22290001.thfilter(c)
return c:IsCode(22291001) and c:IsAbleToHand()
end
function c22290001.spop(e,tp,eg,ep,ev,re,r,rp,c)
local c=e:GetHandler()
if not (c:IsRelateToEffect(e) and Duel.GetLocationCount(tp,LOCATION_MZONE)>0) then return end
if Duel.SpecialSummon(c,0,tp,tp,false,false,POS_FACEUP)>0 and Duel.GetMatchingGroupCount(Card.IsFacedown,tp,LOCATION_SZONE,0,nil)<1 and Duel.IsExistingMatchingCard(c22290001.thfilter,tp,LOCATION_DECK,0,1,nil) and Duel.SelectYesNo(tp,aux.Stringid(22290001,1)) then
Duel.BreakEffect()
Duel.Hint(HINT_SELECTMSG,tp,HINTMSG_ATOHAND)
local g=Duel.SelectMatchingCard(tp,c22290001.thfilter,tp,LOCATION_DECK,0,1,1,nil)
if g:GetCount()>0 then
Duel.SendtoHand(g,nil,REASON_EFFECT)
Duel.ConfirmCards(1-tp,g)
end
end
end
function c22290001.filter1(c)
return c22290001.IsSaihai(c) and c:IsType(TYPE_SPELL+TYPE_TRAP) and c:IsSSetable(false)
end
function c22290001.filter2(c)
return c:IsCode(22290002) and c:IsAbleToHand()
end
function c22290001.tg(e,tp,eg,ep,ev,re,r,rp,chk,chkc)
if chkc then return chkc:IsLocation(LOCATION_REMOVED+LOCATION_GRAVE) and chkc:IsControler(tp) and c22290001.filter1(chkc) end
local b1=Duel.IsExistingTarget(c22290001.filter1,tp,LOCATION_REMOVED+LOCATION_GRAVE,0,1,nil) and Duel.GetLocationCount(tp,LOCATION_SZONE)>0
local b2=Duel.IsExistingMatchingCard(c22290001.filter2,tp,LOCATION_DECK,0,1,nil)
if chk==0 then return b1 or b2 end
local op=0
if b1 and b2 then op=Duel.SelectOption(tp,aux.Stringid(22290001,2),aux.Stringid(22290001,3))
elseif b1 then op=Duel.SelectOption(tp,aux.Stringid(22290001,2))
else op=Duel.SelectOption(tp,aux.Stringid(22290001,3))+1 end
e:SetLabel(op)
if op==0 then
e:SetProperty(EFFECT_FLAG_CARD_TARGET+EFFECT_FLAG_DELAY)
Duel.Hint(HINT_SELECTMSG,tp,HINTMSG_SET)
local g=Duel.SelectTarget(tp,c22290001.filter1,tp,LOCATION_REMOVED+LOCATION_GRAVE,0,1,1,nil)
else
e:SetCategory(CATEGORY_SEARCH+CATEGORY_TOHAND)
e:SetProperty(EFFECT_FLAG_DELAY)
Duel.SetOperationInfo(0,CATEGORY_TOHAND,nil,1,tp,LOCATION_DECK)
end
end
function c22290001.op(e,tp,eg,ep,ev,re,r,rp)
if e:GetLabel()==0 then
local tc=Duel.GetFirstTarget()
if tc:IsRelateToEffect(e) and Duel.GetLocationCount(tp,LOCATION_SZONE)>0 and tc:IsSSetable(false) then
Duel.SSet(tp,tc)
end
else
Duel.Hint(HINT_SELECTMSG,tp,HINTMSG_ATOHAND)
local g=Duel.SelectMatchingCard(tp,c22290001.filter2,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
--执掌令旗的二人
function c22290141.initial_effect(c)
--synchro summon
aux.AddSynchroProcedure(c,nil,aux.NonTuner(nil),1,1)
c:EnableReviveLimit()
--tohand
local e1=Effect.CreateEffect(c)
e1:SetDescription(aux.Stringid(22290141,0))
e1:SetCategory(CATEGORY_TOHAND)
e1:SetType(EFFECT_TYPE_QUICK_O)
e1:SetCode(EVENT_FREE_CHAIN)
e1:SetRange(LOCATION_MZONE)
e1:SetCountLimit(1,22290141)
e1:SetCondition(c22290141.thcon)
--e1:SetCost(c22290141.thcost)
e1:SetTarget(c22290141.thtg)
e1:SetOperation(c22290141.thop)
c:RegisterEffect(e1)
--spsummon
local e2=Effect.CreateEffect(c)
e2:SetDescription(aux.Stringid(22290141,1))
e2:SetCategory(CATEGORY_SPECIAL_SUMMON+CATEGORY_NEGATE+CATEGORY_TOHAND)
e2:SetType(EFFECT_TYPE_QUICK_O)
e2:SetCode(EVENT_CHAINING)
e2:SetRange(LOCATION_GRAVE)
e2:SetCountLimit(1,22290141)
e2:SetCondition(c22290141.spcon)
e2:SetTarget(c22290141.sptg)
e2:SetOperation(c22290141.spop)
c:RegisterEffect(e2)
end
c22290141.named_with_Saihai=1
function c22290141.IsSaihai(c)
local m=_G["c"..c:GetCode()]
return m and m.named_with_Saihai
end
function c22290141.thcon(e,tp,eg,ep,ev,re,r,rp)
return Duel.GetCurrentChain()>1
end
function c22290141.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 c22290141.thfilter(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:IsAbleToHand() and not c:IsHasEffect(EFFECT_NECRO_VALLEY)
end
function c22290141.thtg(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:GetSummonType()==SUMMON_TYPE_SYNCHRO and ct>0 and mg:FilterCount(c22290141.thfilter,nil,e,tp,c)==ct end
Duel.SetTargetCard(mg)
Duel.SetOperationInfo(0,CATEGORY_TOHAND,mg,ct,0,0)
end
function c22290141.thop(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
Duel.SendtoHand(g,nil,REASON_FLIP)
end
function c22290141.spcon(e,tp,eg,ep,ev,re,r,rp)
return ep==tp and re:IsHasType(EFFECT_TYPE_ACTIVATE) and c22290141.IsSaihai(re:GetHandler()) and Duel.GetCurrentChain()>1 and Duel.IsChainNegatable(ev)
end
function c22290141.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_NEGATE,eg,1,0,0)
if re:GetHandler():IsRelateToEffect(re) then
Duel.SetOperationInfo(0,CATEGORY_TOHAND,eg,1,0,0)
end
Duel.SetOperationInfo(0,CATEGORY_SPECIAL_SUMMON,e:GetHandler(),1,0,0)
end
function c22290141.spop(e,tp,eg,ep,ev,re,r,rp)
local c=e:GetHandler()
local ec=re:GetHandler()
if Duel.NegateActivation(ev) and re:GetHandler():IsRelateToEffect(re) then
ec:CancelToGrave()
Duel.SendtoHand(ec,nil,REASON_EFFECT)
if c:IsRelateToEffect(e) then
Duel.SpecialSummon(c,0,tp,tp,false,false,POS_FACEUP)
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+RESETS_STANDARD-RESET_TOFIELD)
e1:SetValue(LOCATION_REMOVED)
c:RegisterEffect(e1)
end
end
end
\ No newline at end of file
--战术令旗 真剑胜负
function c22291003.initial_effect(c)
--Negate
local e1=Effect.CreateEffect(c)
e1:SetDescription(aux.Stringid(22291003,0))
e1:SetType(EFFECT_TYPE_ACTIVATE)
e1:SetCategory(CATEGORY_NEGATE)
e1:SetCode(EVENT_FREE_CHAIN)
e1:SetCountLimit(1,22291003+EFFECT_COUNT_CODE_OATH)
e1:SetTarget(c22291003.target)
e1:SetOperation(c22291003.activate)
c:RegisterEffect(e1)
--to grave
local e1=Effect.CreateEffect(c)
e1:SetType(EFFECT_TYPE_SINGLE+EFFECT_TYPE_CONTINUOUS)
e1:SetProperty(EFFECT_FLAG_CANNOT_DISABLE)
e1:SetCode(EVENT_TO_GRAVE)
e1:SetOperation(c22291003.regop)
c:RegisterEffect(e1)
end
c22291003.named_with_Saihai=1
function c22291003.IsSaihai(c)
local m=_G["c"..c:GetCode()]
return m and m.named_with_Saihai
end
function c22291003.target(e,tp,eg,ep,ev,re,r,rp,chk)
if chk==0 then return true end
end
function c22291003.activate(e,tp,eg,ep,ev,re,r,rp)
local c=e:GetHandler()
Duel.RegisterFlagEffect(tp,22291003,RESET_PHASE+PHASE_END,0,1)
if Duel.GetFlagEffect(tp,22291003)==0 then return end
local e1=Effect.CreateEffect(c)
e1:SetType(EFFECT_TYPE_FIELD+EFFECT_TYPE_CONTINUOUS)
e1:SetProperty(EFFECT_FLAG_DELAY)
e1:SetCode(EVENT_CHAINING)
e1:SetReset(RESET_PHASE+PHASE_END)
e1:SetCountLimit(1)
e1:SetCondition(c22291003.con)
e1:SetOperation(c22291003.op)
Duel.RegisterEffect(e1,tp)
end
function c22291003.con(e,tp,eg,ep,ev,re,r,rp)
return re:IsHasType(EFFECT_TYPE_ACTIVATE) and rp==1-tp and Duel.IsChainNegatable(ev)
end
function c22291003.op(e,tp,eg,ep,ev,re,r,rp)
local c=e:GetHandler()
local rc=re:GetHandler()
if Duel.NegateActivation(ev) and rc:IsRelateToEffect(re) and rc:IsCanTurnSet() then
rc:CancelToGrave()
Duel.ChangePosition(rc,POS_FACEDOWN)
Duel.RaiseEvent(rc,EVENT_SSET,e,REASON_EFFECT,tp,tp,0)
if Duel.GetCurrentPhase()>PHASE_MAIN1 and Duel.GetCurrentPhase()<PHASE_MAIN2 then
local e1=Effect.CreateEffect(c)
e1:SetType(EFFECT_TYPE_SINGLE)
e1:SetCode(EFFECT_CANNOT_TRIGGER)
e1:SetReset(RESET_EVENT+RESETS_STANDARD)
e1:SetCondition(c22291003.rcon)
e1:SetValue(1)
rc:RegisterEffect(e1)
end
end
end
function c22291003.rcon(e)
return 1+1==2
end
function c22291003.regop(e,tp,eg,ep,ev,re,r,rp)
local c=e:GetHandler()
local e1=Effect.CreateEffect(c)
e1:SetDescription(aux.Stringid(22291003,1))
e1:SetCategory(CATEGORY_SPECIAL_SUMMON)
e1:SetType(EFFECT_TYPE_FIELD+EFFECT_TYPE_TRIGGER_O)
e1:SetCode(EVENT_PHASE+PHASE_END)
e1:SetRange(LOCATION_GRAVE)
e1:SetCountLimit(1)
e1:SetTarget(c22291003.sptg)
e1:SetOperation(c22291003.spop)
e1:SetReset(RESET_EVENT+RESETS_STANDARD+RESET_PHASE+PHASE_END)
c:RegisterEffect(e1)
end
function c22291003.spfilter(c,e,tp)
return c:IsCode(22290004) and c:IsCanBeSpecialSummoned(e,0,tp,false,false)
end
function c22291003.sptg(e,tp,eg,ep,ev,re,r,rp,chk)
if chk==0 then return Duel.GetLocationCount(tp,LOCATION_MZONE)>0 and Duel.IsExistingMatchingCard(c22291003.spfilter,tp,LOCATION_GRAVE,0,1,nil,e,tp) end
Duel.SetOperationInfo(0,CATEGORY_SPECIAL_SUMMON,nil,1,tp,LOCATION_GRAVE)
end
function c22291003.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,c22291003.spfilter,tp,LOCATION_GRAVE,0,1,1,nil,e,tp)
if g:GetCount()>0 then
Duel.SpecialSummon(g,0,tp,tp,false,false,POS_FACEUP)
end
end
\ No newline at end of file
--蛙与蛇的连接✿东风谷早苗
local Cardno=74563001
local cCardno=_G["c"..Cardno]
function cCardno.initial_effect(c)
--link summon
aux.AddLinkProcedure(c,cCardno.mfilter,2,2)
c:EnableReviveLimit()
--splimit
local e1=Effect.CreateEffect(c)
e1:SetProperty(EFFECT_FLAG_CANNOT_DISABLE)
e1:SetType(EFFECT_TYPE_SINGLE+EFFECT_TYPE_CONTINUOUS)
e1:SetCode(EVENT_SPSUMMON_SUCCESS)
e1:SetCondition(cCardno.regcon)
e1:SetOperation(cCardno.regop)
c:RegisterEffect(e1)
--draw
local e1=Effect.CreateEffect(c)
e1:SetCategory(CATEGORY_SEARCH+CATEGORY_COUNTER)
e1:SetType(EFFECT_TYPE_IGNITION)
e1:SetRange(LOCATION_MZONE)
e1:SetCountLimit(1)
e1:SetCost(cCardno.cost)
e1:SetTarget(cCardno.tg)
e1:SetOperation(cCardno.op)
c:RegisterEffect(e1)
end
function cCardno.mfilter(c)
return c:IsLinkRace(RACE_AQUA+RACE_REPTILE)
end
function cCardno.regcon(e,tp,eg,ep,ev,re,r,rp)
return e:GetHandler():IsSummonType(SUMMON_TYPE_LINK)
end
function cCardno.regop(e,tp,eg,ep,ev,re,r,rp)
local e1=Effect.CreateEffect(e:GetHandler())
e1:SetType(EFFECT_TYPE_FIELD)
e1:SetCode(EFFECT_CANNOT_SPECIAL_SUMMON)
e1:SetProperty(EFFECT_FLAG_PLAYER_TARGET)
e1:SetTargetRange(1,0)
e1:SetReset(RESET_PHASE+PHASE_END)
e1:SetTarget(cCardno.splimit)
Duel.RegisterEffect(e1,tp)
end
function cCardno.splimit(e,c,sump,sumtype,sumpos,targetp,se)
return c:IsCode(Cardno) and bit.band(sumtype,SUMMON_TYPE_LINK)==SUMMON_TYPE_LINK
end
function cCardno.cfilter(c)
return c:IsType(TYPE_MONSTER) and c:IsAbleToDeckAsCost()
end
function cCardno.cost(e,tp,eg,ep,ev,re,r,rp,chk)
if chk==0 then return Duel.IsExistingMatchingCard(cCardno.cfilter,tp,LOCATION_HAND+LOCATION_MZONE,0,1,e:GetHandler()) end
Duel.Hint(HINT_SELECTMSG,tp,HINTMSG_TODECK)
local g=Duel.SelectMatchingCard(tp,cCardno.cfilter,tp,LOCATION_HAND+LOCATION_MZONE,0,1,1,e:GetHandler())
Duel.ConfirmCards(1-tp,g)
Duel.SendtoDeck(g,nil,1,REASON_COST)
end
function cCardno.filter(c)
return (c:IsSetCard(0x493) or c:IsSetCard(0x492)) and c:IsAbleToHand()
end
function cCardno.tg(e,tp,eg,ep,ev,re,r,rp,chk)
local ct=Duel.GetFieldGroupCount(tp,0,LOCATION_ONFIELD)
if chk==0 then return Duel.IsExistingMatchingCard(cCardno.filter,tp,LOCATION_DECK+LOCATION_GRAVE+LOCATION_REMOVED,0,1,nil) and e:GetHandler():IsCanAddCounter(0x128a,ct+1) end
Duel.SetOperationInfo(0,CATEGORY_TOHAND,nil,1,tp,LOCATION_DECK+LOCATION_GRAVE+LOCATION_REMOVED)
end
function cCardno.op(e,tp,eg,ep,ev,re,r,rp)
local ct=Duel.GetFieldGroupCount(tp,0,LOCATION_ONFIELD)
Duel.Hint(HINT_SELECTMSG,tp,HINTMSG_ATOHAND)
local g=Duel.SelectMatchingCard(tp,aux.NecroValleyFilter(cCardno.filter),tp,LOCATION_DECK+LOCATION_GRAVE+LOCATION_REMOVED,0,1,1,nil,e,tp)
if g:GetCount()>0 then
Duel.SendtoHand(g,nil,REASON_EFFECT)
Duel.ConfirmCards(1-tp,g)
Duel.BreakEffect()
if not e:GetHandler():IsCanAddCounter(0x128a,ct+1) then return end
e:GetHandler():AddCounter(0x128a,ct+1)
if Duel.GetFlagEffect(tp,23200)==0 then
Duel.RegisterFlagEffect(tp,23200,0,0,0)
end
end
end
\ No newline at end of file
--蛙符「操纵蛤蟆」
function c74563002.initial_effect(c)
--act in set turn
local e2=Effect.CreateEffect(c)
e2:SetType(EFFECT_TYPE_SINGLE)
e2:SetCode(EFFECT_TRAP_ACT_IN_SET_TURN)
e2:SetProperty(EFFECT_FLAG_SET_AVAILABLE)
e2:SetCondition(c74563002.actcon)
c:RegisterEffect(e2)
--Activate
local e1=Effect.CreateEffect(c)
e1:SetCategory(CATEGORY_SPECIAL_SUMMON+CATEGORY_TOKEN)
e1:SetType(EFFECT_TYPE_ACTIVATE)
e1:SetCode(EVENT_FREE_CHAIN)
e1:SetCost(c74563002.negcost)
e1:SetTarget(c74563002.target)
e1:SetOperation(c74563002.activate)
c:RegisterEffect(e1)
--destroy
local e4=Effect.CreateEffect(c)
e4:SetCategory(CATEGORY_DESTROY)
e4:SetType(EFFECT_TYPE_SINGLE+EFFECT_TYPE_TRIGGER_F)
e4:SetCode(EVENT_LEAVE_FIELD)
e4:SetTarget(c74563002.destg)
e4:SetOperation(c74563002.desop)
c:RegisterEffect(e4)
end
function c74563002.actcon(e)
return Duel.IsExistingMatchingCard(Card.IsSetCard,e:GetHandlerPlayer(),LOCATION_MZONE,0,1,nil,0x497)
end
function c74563002.negcost(e,tp,eg,ep,ev,re,r,rp,chk)
if chk==0 then return Duel.IsCanRemoveCounter(tp,1,1,0x128a,1,REASON_COST) end
Duel.RemoveCounter(tp,1,1,0x128a,1,REASON_COST)
end
function c74563002.target(e,tp,eg,ep,ev,re,r,rp,chk)
if chk==0 then return true end
Duel.SetOperationInfo(0,CATEGORY_TOKEN,nil,2,0,0)
Duel.SetOperationInfo(0,CATEGORY_SPECIAL_SUMMON,nil,2,0,0)
end
function c74563002.activate(e,tp,eg,ep,ev,re,r,rp)
if Duel.GetLocationCount(tp,LOCATION_MZONE)<=0
or Duel.GetLocationCount(1-tp,LOCATION_MZONE)<=0
or not Duel.IsPlayerCanSpecialSummonMonster(tp,74563020,0,TYPES_TOKEN_MONSTER,0,0,1,RACE_MACHINE,ATTRIBUTE_DARK,POS_FACEUP_DEFENSE)
or not Duel.IsPlayerCanSpecialSummonMonster(tp,74563020,0,TYPES_TOKEN_MONSTER,0,0,1,RACE_AQUA,ATTRIBUTE_WATER,POS_FACEUP_DEFENSE,1-tp)
or Duel.IsPlayerAffectedByEffect(tp,59822133) then return end
local token1=Duel.CreateToken(tp,74563020)
local token2=Duel.CreateToken(tp,74563020)
Duel.SpecialSummonStep(token1,0,tp,tp,false,false,POS_FACEUP_DEFENSE)
Duel.SpecialSummonStep(token2,0,tp,1-tp,false,false,POS_FACEUP_DEFENSE)
Duel.SpecialSummonComplete()
end
function c74563002.destg(e,tp,eg,ep,ev,re,r,rp,chk)
if chk==0 then return true end
end
function c74563002.desop(e,tp,eg,ep,ev,re,r,rp)
local c=e:GetHandler()
local sg=Duel.GetMatchingGroup(Card.IsCode,tp,0,LOCATION_MZONE,nil,74563020)
local tc=sg:GetFirst()
local ag=Group.CreateGroup()
while tc do
local seq=tc:GetSequence()
local acg=Duel.GetMatchingGroup(c74563002.seqfilter,tp,0,LOCATION_ONFIELD,tc,tp,seq)
ag:Merge(acg)
tc=sg:GetNext()
end
ag:Merge(sg)
if ag:GetCount()~=0 then Duel.Destroy(ag,REASON_EFFECT) end
end
function c74563002.seqfilter(c,tp,seq)
local loc=LOCATION_MZONE
if seq>8 then
loc=LOCATION_SZONE
seq=seq-8
end
local cseq=c:GetSequence()
-- if tp==c:GetControler() then cseq=cseq>>16 end
if tp==c:GetControler() and (cseq==5 and seq==3 or cseq==6 and seq==1) then return true end
local cloc=c:GetLocation()
if cloc==LOCATION_SZONE and cseq>=5 then return false end
if cloc==LOCATION_MZONE and cseq>=5 and loc==LOCATION_MZONE and tp~=c:GetControler()
and (seq==1 and cseq==5 or seq==3 and cseq==6) then return true end
return cseq==seq or cloc==loc and math.abs(cseq-seq)==1 and tp~=c:GetControler()
end
\ No newline at end of file
--蛇符『神代大蛇』
function c74563003.initial_effect(c)
--Activate
local e1=Effect.CreateEffect(c)
e1:SetCategory(CATEGORY_SPECIAL_SUMMON)
e1:SetType(EFFECT_TYPE_ACTIVATE)
e1:SetCode(EVENT_FREE_CHAIN)
e1:SetTarget(c74563003.sptg)
e1:SetOperation(c74563003.spop)
c:RegisterEffect(e1)
end
function c74563003.sptg(e,tp,eg,ep,ev,re,r,rp,chk)
local c=e:GetHandler()
if chk==0 then return Duel.GetFlagEffect(tp,23200)>0 and Duel.IsPlayerCanSpecialSummonMonster(tp,74563003,0x492,TYPE_MONSTER+TYPE_NORMAL,-2,-2,2,RACE_REPTILE,ATTRIBUTE_DIVINE) end
Duel.SetOperationInfo(0,CATEGORY_SPECIAL_SUMMON,c,1,0,0)
end
function c74563003.spop(e,tp,eg,ep,ev,re,r,rp)
if Duel.GetLocationCount(tp,LOCATION_MZONE)<=0 then return end
local c=e:GetHandler()
if Duel.GetFlagEffect(tp,74563003)==0 then
Duel.RegisterFlagEffect(tp,74563003,0,0,1)
Duel.RegisterFlagEffect(tp,74563002,0,0,1)
end
if c:IsRelateToEffect(e) and Duel.IsPlayerCanSpecialSummonMonster(tp,74563003,0x492,TYPE_MONSTER+TYPE_NORMAL,-2,-2,2,RACE_REPTILE,ATTRIBUTE_DIVINE) then
c:AddMonsterAttribute(TYPE_NORMAL)
Duel.SpecialSummonStep(c,0,tp,tp,true,false,POS_FACEUP)
local e2=Effect.CreateEffect(c)
e2:SetType(EFFECT_TYPE_SINGLE)
e2:SetCode(EFFECT_IMMUNE_EFFECT)
e2:SetProperty(EFFECT_FLAG_SINGLE_RANGE+EFFECT_FLAG_CANNOT_DISABLE)
e2:SetRange(LOCATION_MZONE)
e2:SetValue(c74563003.efilter)
e2:SetReset(RESET_EVENT+RESETS_STANDARD)
c:RegisterEffect(e2,true)
local e1=Effect.CreateEffect(c)
e1:SetType(EFFECT_TYPE_SINGLE)
e1:SetCode(EFFECT_SET_BASE_ATTACK)
e1:SetReset(RESET_EVENT+0xff0000)
e1:SetValue(Duel.GetFlagEffect(tp,74563002)*1000)
c:RegisterEffect(e1,true)
local e3=e1:Clone()
e1:SetCode(EFFECT_SET_BASE_DEFENSE)
c:RegisterEffect(e3,true)
Duel.SpecialSummonComplete()
end
end
function c74563003.efilter(e,re)
return e:GetOwnerPlayer()~=re:GetOwnerPlayer()
end
\ No newline at end of file
--蛇符『云泳大蛇』
function c74563004.initial_effect(c)
--Activate
local e1=Effect.CreateEffect(c)
e1:SetCategory(CATEGORY_SPECIAL_SUMMON)
e1:SetType(EFFECT_TYPE_ACTIVATE)
e1:SetCode(EVENT_FREE_CHAIN)
e1:SetCost(c74563004.setcost)
e1:SetTarget(c74563004.target)
e1:SetOperation(c74563004.activate)
c:RegisterEffect(e1)
--move
local e12=Effect.CreateEffect(c)
e12:SetCategory(CATEGORY_DESTROY)
e12:SetType(EFFECT_TYPE_QUICK_O)
e12:SetCode(EVENT_FREE_CHAIN)
e12:SetRange(LOCATION_MZONE)
e12:SetCondition(c74563004.chcon)
e12:SetCountLimit(1)
e12:SetTarget(c74563004.seqtg)
e12:SetOperation(c74563004.seqop)
c:RegisterEffect(e12)
--disable effect
local e2=Effect.CreateEffect(c)
e2:SetType(EFFECT_TYPE_FIELD+EFFECT_TYPE_CONTINUOUS)
e2:SetCode(EVENT_CHAIN_SOLVING)
e2:SetRange(LOCATION_MZONE)
e2:SetCondition(c74563004.chcon)
e2:SetOperation(c74563004.disop)
c:RegisterEffect(e2)
end
function c74563004.chcon(e,tp,eg,ep,ev,re,r,rp)
return e:GetHandler():GetSummonType()==SUMMON_TYPE_SPECIAL+SUMMON_VALUE_SELF
end
function c74563004.setcost(e,tp,eg,ep,ev,re,r,rp,chk)
if chk==0 then return Duel.IsCanRemoveCounter(tp,1,1,0x128a,8,REASON_COST) end
Duel.RemoveCounter(tp,1,1,0x128a,8,REASON_COST)
end
function c74563004.target(e,tp,eg,ep,ev,re,r,rp,chk)
if chk==0 then return Duel.GetLocationCount(tp,LOCATION_MZONE)>0
and Duel.IsPlayerCanSpecialSummonMonster(tp,74563004,0,TYPE_EFFECT+TYPE_MONSTER,3200,3200,9,RACE_REPTILE,ATTRIBUTE_WIND) end
Duel.SetOperationInfo(0,CATEGORY_SPECIAL_SUMMON,e:GetHandler(),1,0,0)
end
function c74563004.activate(e,tp,eg,ep,ev,re,r,rp)
local c=e:GetHandler()
if Duel.GetFlagEffect(tp,74563004)==0 then
Duel.RegisterFlagEffect(tp,74563004,0,0,1)
Duel.RegisterFlagEffect(tp,74563002,0,0,1)
end
if Duel.GetLocationCount(tp,LOCATION_MZONE)<=0
or not Duel.IsPlayerCanSpecialSummonMonster(tp,74563004,0,TYPE_EFFECT+TYPE_MONSTER,3200,3200,9,RACE_REPTILE,ATTRIBUTE_WIND) then return end
c:AddMonsterAttribute(TYPE_EFFECT+TYPE_TRAP)
Duel.SpecialSummon(c,SUMMON_VALUE_SELF,tp,tp,true,false,POS_FACEUP)
if c:IsRelateToEffect(e) then
local e2=Effect.CreateEffect(c)
e2:SetType(EFFECT_TYPE_SINGLE)
e2:SetCode(EFFECT_LEAVE_FIELD_REDIRECT)
e2:SetProperty(EFFECT_FLAG_CANNOT_DISABLE)
e2:SetReset(RESET_EVENT+RESETS_REDIRECT)
e2:SetValue(LOCATION_HAND)
c:RegisterEffect(e2)
end
end
function c74563004.seqtg(e,tp,eg,ep,ev,re,r,rp,chk)
local c=e:GetHandler()
if chk==0 then return Duel.GetLocationCount(tp,LOCATION_MZONE,PLAYER_NONE,0)>0 end
end
function c74563004.seqop(e,tp,eg,ep,ev,re,r,rp)
local c=e:GetHandler()
if not c:IsRelateToEffect(e) or c:IsImmuneToEffect(e) or not c:IsControler(tp) or Duel.GetLocationCount(tp,LOCATION_MZONE,PLAYER_NONE,0)<=0 then return end
Duel.Hint(HINT_SELECTMSG,tp,HINTMSG_TOZONE)
local fd=Duel.SelectDisableField(tp,1,LOCATION_MZONE,0,0)
Duel.Hint(HINT_ZONE,tp,fd)
local seq=math.log(fd,2)
local pseq=c:GetSequence()
Duel.MoveSequence(c,seq)
if c:GetSequence()==seq then
local g=c:GetColumnGroup():Filter(Card.IsControler,nil,1-tp)
if g:GetCount()>0 then
Duel.BreakEffect()
Duel.SendtoGrave(g,REASON_EFFECT)
end
end
end
function c74563004.disop(e,tp,eg,ep,ev,re,r,rp)
if rp==1-tp and re:IsHasProperty(EFFECT_FLAG_CARD_TARGET) then
local g=Duel.GetChainInfo(ev,CHAININFO_TARGET_CARDS)
if g and g:IsContains(e:GetHandler()) then
Duel.NegateEffect(ev)
end
end
end
\ No newline at end of file
--蛇符『上吧缠蛇』
function c74563005.initial_effect(c)
--Activate
local e1=Effect.CreateEffect(c)
e1:SetCategory(CATEGORY_SPECIAL_SUMMON)
e1:SetType(EFFECT_TYPE_ACTIVATE)
e1:SetCode(EVENT_FREE_CHAIN)
e1:SetCost(c74563005.setcost)
e1:SetTarget(c74563005.target)
e1:SetOperation(c74563005.activate)
c:RegisterEffect(e1)
--equip
local e12=Effect.CreateEffect(c)
e12:SetCategory(CATEGORY_EQUIP)
e12:SetType(EFFECT_TYPE_QUICK_O)
e12:SetRange(LOCATION_MZONE)
e12:SetCode(EVENT_FREE_CHAIN)
e12:SetCountLimit(2,74563005)
e12:SetTarget(c74563005.eqtg)
e12:SetOperation(c74563005.eqop)
c:RegisterEffect(e12)
local e3=Effect.CreateEffect(c)
e3:SetCategory(CATEGORY_SPECIAL_SUMMON)
e3:SetType(EFFECT_TYPE_QUICK_O)
e3:SetCode(EVENT_FREE_CHAIN)
e3:SetRange(LOCATION_SZONE)
e3:SetCountLimit(2,74563004)
e3:SetTarget(c74563005.target)
e3:SetOperation(c74563005.activate)
c:RegisterEffect(e3)
end
function c74563005.setcost(e,tp,eg,ep,ev,re,r,rp,chk)
if chk==0 then return Duel.IsCanRemoveCounter(tp,1,1,0x128a,1,REASON_COST) end
Duel.RemoveCounter(tp,1,1,0x128a,1,REASON_COST)
end
function c74563005.target(e,tp,eg,ep,ev,re,r,rp,chk)
if chk==0 then return Duel.GetLocationCount(tp,LOCATION_MZONE)>0
and Duel.IsPlayerCanSpecialSummonMonster(tp,74563005,0,TYPE_EFFECT+TYPE_MONSTER,1200,1200,3,RACE_REPTILE,ATTRIBUTE_DARK) end
Duel.SetOperationInfo(0,CATEGORY_SPECIAL_SUMMON,e:GetHandler(),1,0,0)
end
function c74563005.activate(e,tp,eg,ep,ev,re,r,rp)
local c=e:GetHandler()
if Duel.GetFlagEffect(tp,74563005)==0 then
Duel.RegisterFlagEffect(tp,74563005,0,0,1)
Duel.RegisterFlagEffect(tp,74563002,0,0,1)
end
if Duel.GetLocationCount(tp,LOCATION_MZONE)<=0
or not Duel.IsPlayerCanSpecialSummonMonster(tp,74563005,0,TYPE_EFFECT+TYPE_MONSTER,1200,1200,3,RACE_REPTILE,ATTRIBUTE_DARK) then return end
c:AddMonsterAttribute(TYPE_EFFECT)
Duel.SpecialSummon(c,SUMMON_VALUE_SELF,tp,tp,true,false,POS_FACEUP)
end
function c74563005.eqtg(e,tp,eg,ep,ev,re,r,rp,chk,chkc)
if chk==0 then return Duel.GetLocationCount(tp,LOCATION_SZONE)>0
and Duel.IsExistingTarget(Card.IsFaceup,tp,LOCATION_MZONE,LOCATION_MZONE,1,e:GetHandler()) end
end
function c74563005.eqlimit(e,c)
return e:GetOwner()==c
end
function c74563005.eqop(e,tp,eg,ep,ev,re,r,rp)
local c=e:GetHandler()
if Duel.GetLocationCount(tp,LOCATION_SZONE)<=0 then return end
Duel.Hint(HINT_SELECTMSG,tp,HINTMSG_TOGRAVE)
local tc=Duel.SelectMatchingCard(tp,Card.IsFaceup,tp,LOCATION_MZONE,LOCATION_MZONE,1,1,e:GetHandler()):GetFirst()
if tc:IsFaceup() then
Duel.Equip(tp,c,tc)
--Add Equip limit
local e1=Effect.CreateEffect(tc)
e1:SetType(EFFECT_TYPE_SINGLE)
e1:SetCode(EFFECT_EQUIP_LIMIT)
e1:SetProperty(EFFECT_FLAG_CANNOT_DISABLE)
e1:SetReset(RESET_EVENT+RESETS_STANDARD)
e1:SetValue(c74563005.eqlimit)
c:RegisterEffect(e1)
local e2=Effect.CreateEffect(c)
e2:SetType(EFFECT_TYPE_EQUIP)
e2:SetCode(EFFECT_DISABLE)
e2:SetReset(RESET_EVENT+RESETS_STANDARD)
c:RegisterEffect(e2)
local e3=e2:Clone()
e3:SetCode(EFFECT_CANNOT_ATTACK)
c:RegisterEffect(e3)
--control
local e4=Effect.CreateEffect(c)
e4:SetDescription(aux.Stringid(74563005,1))
e4:SetCategory(CATEGORY_CONTROL)
e4:SetType(EFFECT_TYPE_SINGLE+EFFECT_TYPE_TRIGGER_F)
e4:SetCode(EVENT_LEAVE_FIELD)
e4:SetCondition(c74563005.ctcon)
e4:SetTarget(c74563005.cttg)
e4:SetOperation(c74563005.ctop)
e4:SetReset(RESET_EVENT+RESET_OVERLAY+RESET_TOFIELD)
c:RegisterEffect(e4)
end
end
function c74563005.ctcon(e,tp,eg,ep,ev,re,r,rp)
return not e:GetHandler():IsReason(REASON_LOST_TARGET)
end
function c74563005.cttg(e,tp,eg,ep,ev,re,r,rp,chk)
if chk==0 then return true end
local ec=e:GetHandler():GetPreviousEquipTarget()
if ec:IsLocation(LOCATION_MZONE) and ec:IsControlerCanBeChanged() then
Duel.SetTargetCard(ec)
Duel.SetOperationInfo(0,CATEGORY_CONTROL,ec,1,0,0)
end
end
function c74563005.ctop(e,tp,eg,ep,ev,re,r,rp)
local ec=Duel.GetFirstTarget()
if ec and ec:IsRelateToEffect(e) then
Duel.GetControl(ec,tp)
end
e:Reset()
end
\ No newline at end of file
--蛇符『上吧绿蛇』
function c74563006.initial_effect(c)
--Activate
local e1=Effect.CreateEffect(c)
e1:SetCategory(CATEGORY_SPECIAL_SUMMON)
e1:SetType(EFFECT_TYPE_ACTIVATE)
e1:SetCode(EVENT_FREE_CHAIN)
e1:SetCost(c74563006.setcost)
e1:SetTarget(c74563006.target)
e1:SetOperation(c74563006.activate)
c:RegisterEffect(e1)
--immune effect
local e4=Effect.CreateEffect(c)
e4:SetType(EFFECT_TYPE_FIELD)
e4:SetCode(EFFECT_IMMUNE_EFFECT)
e4:SetRange(LOCATION_MZONE)
e4:SetTargetRange(LOCATION_FZONE,0)
e4:SetCondition(c74563006.immcon)
e4:SetValue(c74563006.efilter)
c:RegisterEffect(e4)
end
function c74563006.setcost(e,tp,eg,ep,ev,re,r,rp,chk)
if chk==0 then return Duel.IsCanRemoveCounter(tp,1,1,0x128a,2,REASON_COST) end
Duel.RemoveCounter(tp,1,1,0x128a,2,REASON_COST)
end
function c74563006.target(e,tp,eg,ep,ev,re,r,rp,chk)
if chk==0 then return Duel.GetLocationCount(tp,LOCATION_MZONE)>0
and Duel.IsPlayerCanSpecialSummonMonster(tp,74563006,0,TYPE_EFFECT+TYPE_MONSTER,2200,2200,6,RACE_REPTILE,ATTRIBUTE_EARTH) end
Duel.SetOperationInfo(0,CATEGORY_SPECIAL_SUMMON,e:GetHandler(),1,0,0)
end
function c74563006.activate(e,tp,eg,ep,ev,re,r,rp)
local c=e:GetHandler()
if Duel.GetFlagEffect(tp,74563006)==0 then
Duel.RegisterFlagEffect(tp,74563006,0,0,1)
Duel.RegisterFlagEffect(tp,74563002,0,0,1)
end
if Duel.GetLocationCount(tp,LOCATION_MZONE)<=0
or not Duel.IsPlayerCanSpecialSummonMonster(tp,74563006,0,TYPE_EFFECT+TYPE_MONSTER,2200,2200,6,RACE_REPTILE,ATTRIBUTE_EARTH) then return end
c:AddMonsterAttribute(TYPE_EFFECT)
if Duel.SpecialSummonStep(c,SUMMON_VALUE_SELF,tp,tp,true,false,POS_FACEUP) then
local e2=Effect.CreateEffect(c)
e2:SetType(EFFECT_TYPE_SINGLE+EFFECT_TYPE_CONTINUOUS)
e2:SetCode(EFFECT_SEND_REPLACE)
e2:SetRange(LOCATION_MZONE)
e2:SetProperty(EFFECT_FLAG_CANNOT_DISABLE)
e2:SetReset(RESET_EVENT+RESETS_STANDARD)
e2:SetTarget(c74563006.reptg)
e2:SetValue(c74563006.repval)
c:RegisterEffect(e2)
end
Duel.SpecialSummonComplete()
end
function c74563006.reptg(e,tp,eg,ep,ev,re,r,rp,chk)
local c=e:GetHandler()
if chk==0 then return c:IsSSetable() and Duel.GetLocationCount(tp,LOCATION_SZONE)>0 end
Duel.SSet(tp,c)
return true
end
function c74563006.repval(e,c)
return true
end
function c74563006.immcon(e,tp,eg,ep,ev,re,r,rp)
return e:GetHandler():GetSummonType()==SUMMON_TYPE_SPECIAL+SUMMON_VALUE_SELF
end
function c74563006.efilter(e,re)
return re:GetOwnerPlayer()~=e:GetHandlerPlayer()
end
\ No newline at end of file
--赎罪司祭·伊莉丝
function c74563007.initial_effect(c)
--link summon
c:EnableReviveLimit()
aux.AddLinkProcedure(c,c74563007.matfilter,2,2)
--to hand
local e2=Effect.CreateEffect(c)
e2:SetType(EFFECT_TYPE_SINGLE+EFFECT_TYPE_TRIGGER_F)
e2:SetCode(EVENT_SPSUMMON_SUCCESS)
e2:SetProperty(EFFECT_FLAG_CANNOT_INACTIVATE+EFFECT_FLAG_CANNOT_DISABLE+EFFECT_FLAG_CANNOT_NEGATE)
e2:SetCountLimit(1,9523599+EFFECT_COUNT_CODE_DUEL)
e2:SetCondition(c74563007.thcon)
e2:SetTarget(c74563007.thtg)
e2:SetOperation(c74563007.thop)
c:RegisterEffect(e2)
--search
local e21=Effect.CreateEffect(c)
e21:SetCategory(CATEGORY_TOHAND+CATEGORY_SEARCH)
e21:SetType(EFFECT_TYPE_IGNITION)
e21:SetRange(LOCATION_MZONE)
e21:SetCountLimit(1)
e21:SetCost(c74563007.thcost)
e21:SetTarget(c74563007.thtgs)
e21:SetOperation(c74563007.thops)
c:RegisterEffect(e21)
end
function c74563007.matfilter(c)
return c:IsLinkRace(RACE_FAIRY) and (c:IsLinkAttribute(ATTRIBUTE_DARK) or c:IsLinkAttribute(ATTRIBUTE_LIGHT))
end
function c74563007.thcon(e,tp,eg,ep,ev,re,r,rp)
return e:GetHandler():IsSummonType(SUMMON_TYPE_LINK)
end
function c74563007.thtg(e,tp,eg,ep,ev,re,r,rp,chk)
if chk==0 then return true end
end
function c74563007.thop(e,tp,eg,ep,ev,re,r,rp)
local c=e:GetHandler()
--damage
local e2=Effect.CreateEffect(c)
e2:SetType(EFFECT_TYPE_FIELD+EFFECT_TYPE_CONTINUOUS)
e2:SetCode(EVENT_PHASE+PHASE_BATTLE)
e2:SetCountLimit(1)
e2:SetTarget(c74563007.damtg)
e2:SetOperation(c74563007.damop)
Duel.RegisterEffect(e2,tp)
end
function c74563007.filter(c)
return c:IsType(TYPE_SPELL) and c:IsType(TYPE_CONTINUOUS) and c:IsSetCard(0x372) and not c:IsForbidden() and c:CheckUniqueOnField(tp)
end
function c74563007.damtg(e,tp,eg,ep,ev,re,r,rp,chk)
if chk==0 then return Duel.GetLocationCount(tp,LOCATION_SZONE)>0
and Duel.IsExistingMatchingCard(c74563007.filter,tp,LOCATION_DECK+LOCATION_REMOVED+LOCATION_GRAVE,0,1,nil) end
end
function c74563007.damop(e,tp,eg,ep,ev,re,r,rp)
if Duel.GetLocationCount(tp,LOCATION_SZONE)<=0 then return end
Duel.Hint(HINT_SELECTMSG,tp,HINTMSG_TOFIELD)
if Duel.SelectYesNo(tp,aux.Stringid(74563007,0)) then
local tc=Duel.SelectMatchingCard(tp,aux.NecroValleyFilter(c74563007.filter),tp,LOCATION_DECK+LOCATION_REMOVED+LOCATION_GRAVE,0,1,1,nil,tp):GetFirst()
if tc then
Duel.MoveToField(tc,tp,tp,LOCATION_SZONE,POS_FACEUP,true)
end
end
end
function c74563007.thcost(e,tp,eg,ep,ev,re,r,rp,chk)
if chk==0 then return Duel.IsExistingMatchingCard(Card.IsDiscardable,tp,LOCATION_HAND,0,1,e:GetHandler()) end
Duel.DiscardHand(tp,Card.IsDiscardable,1,1,REASON_COST+REASON_DISCARD)
end
function c74563007.thfilter(c)
return c:IsSetCard(0x372) and c:IsAbleToHand()
end
function c74563007.thtgs(e,tp,eg,ep,ev,re,r,rp,chk)
if chk==0 then return Duel.IsExistingMatchingCard(c74563007.thfilter,tp,LOCATION_DECK,0,1,nil) end
Duel.SetOperationInfo(0,CATEGORY_TOHAND,nil,1,tp,LOCATION_DECK)
end
function c74563007.thops(e,tp,eg,ep,ev,re,r,rp)
Duel.Hint(HINT_SELECTMSG,tp,HINTMSG_ATOHAND)
local g=Duel.SelectMatchingCard(tp,c74563007.thfilter,tp,LOCATION_DECK,0,1,1,nil)
if g:GetCount()>0 then
Duel.SendtoHand(g,nil,REASON_EFFECT)
Duel.ConfirmCards(1-tp,g)
end
end
\ No newline at end of file
--遗存的球体
function c74563008.initial_effect(c)
--Activate
local e1=Effect.CreateEffect(c)
e1:SetType(EFFECT_TYPE_ACTIVATE)
e1:SetCode(EVENT_FREE_CHAIN)
c:RegisterEffect(e1)
--Activate
local e1=Effect.CreateEffect(c)
e1:SetCategory(CATEGORY_SPECIAL_SUMMON+CATEGORY_FUSION_SUMMON)
e1:SetType(EFFECT_TYPE_FIELD+EFFECT_TYPE_TRIGGER_O)
e1:SetCode(EVENT_PHASE+PHASE_END)
e1:SetRange(LOCATION_SZONE)
e1:SetTarget(c74563008.target)
e1:SetOperation(c74563008.activate)
c:RegisterEffect(e1)
--remove
local e4=Effect.CreateEffect(c)
e4:SetCategory(CATEGORY_REMOVE)
e4:SetType(EFFECT_TYPE_IGNITION)
e4:SetProperty(EFFECT_FLAG_CARD_TARGET)
e4:SetRange(LOCATION_SZONE)
e4:SetTarget(c74563008.rmtg)
e4:SetOperation(c74563008.rmop)
c:RegisterEffect(e4)
end
function c74563008.filter0(c)
return c:IsCanBeFusionMaterial()
end
function c74563008.filter1(c,e)
return c:IsCanBeFusionMaterial() and not c:IsImmuneToEffect(e)
end
function c74563008.filter2(c,e,tp,m,f,chkf)
return (not f or f(c))
and c:IsCanBeSpecialSummoned(e,SUMMON_TYPE_FUSION,tp,false,false) and c:CheckFusionMaterial(m,nil,chkf)
end
function c74563008.target(e,tp,eg,ep,ev,re,r,rp,chk)
if chk==0 then
local chkf=tp
local mg1=Duel.GetMatchingGroup(c74563008.filter0,tp,LOCATION_ONFIELD+LOCATION_HAND,0,nil)
local res=Duel.IsExistingMatchingCard(c74563008.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(c74563008.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 c74563008.activate(e,tp,eg,ep,ev,re,r,rp)
local chkf=tp
local mg1=Duel.GetMatchingGroup(c74563008.filter1,tp,LOCATION_ONFIELD+LOCATION_HAND,0,nil,e)
local sg1=Duel.GetMatchingGroup(c74563008.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(c74563008.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 c74563008.filters(c)
return c:IsFaceup() and c:IsCode(74563012)
end
function c74563008.cfilter(c,e,tp)
return c:IsType(TYPE_MONSTER) and c:IsAbleToRemove()
end
function c74563008.rmtg(e,tp,eg,ep,ev,re,r,rp,chk,chkc)
local c=e:GetHandler()
local tg=1
if Duel.IsExistingMatchingCard(c74563008.filters,tp,LOCATION_MZONE,0,1,nil) then
tg=2
if chkc then return chkc:IsLocation(LOCATION_MZONE+LOCATION_GRAVE) and chkc:IsControler(1-tp) and c74563008.spfilter2(chkc,e,tp) and c:IsAbleToRemove() end
if chk==0 then return Duel.IsExistingTarget(c74563008.cfilter,tp,0,LOCATION_MZONE+LOCATION_GRAVE,1,nil) and c:IsAbleToRemove() end
else
if chkc then return chkc:IsLocation(LOCATION_MZONE) and chkc:IsControler(1-tp) and c74563008.spfilter2(chkc,e,tp) and c:IsAbleToRemove() end
if chk==0 then return Duel.IsExistingTarget(c74563008.cfilter,tp,0,LOCATION_MZONE,1,nil) and c:IsAbleToRemove() end
end
Duel.Hint(HINT_SELECTMSG,tp,HINTMSG_REMOVE)
if Duel.IsExistingMatchingCard(c74563008.filters,tp,LOCATION_MZONE,0,1,nil) then
local g=Duel.SelectTarget(tp,c74563008.cfilter,tp,0,LOCATION_MZONE+LOCATION_GRAVE,1,tg,nil)
Duel.SetChainLimit(c74563008.chlimit)
else
local g=Duel.SelectTarget(tp,c74563008.cfilter,tp,0,LOCATION_MZONE,1,tg,nil)
end
Duel.SetOperationInfo(0,CATEGORY_REMOVE,g,tg,0,0)
end
function c74563008.chlimit(e,ep,tp)
return tp==ep
end
function c74563008.rmop(e,tp,eg,ep,ev,re,r,rp)
local g=Duel.GetChainInfo(0,CHAININFO_TARGET_CARDS)
local tg=g:Filter(Card.IsRelateToEffect,nil,e)
if tg:GetCount()>0 then
tg:AddCard(e:GetHandler())
Duel.Remove(tg,POS_FACEUP,REASON_EFFECT)
end
end
\ No newline at end of file
--遗存的角柱
function c74563009.initial_effect(c)
--to deck
local e1=Effect.CreateEffect(c)
e1:SetCategory(CATEGORY_DISABLE)
e1:SetType(EFFECT_TYPE_ACTIVATE)
e1:SetCode(EVENT_FREE_CHAIN)
e1:SetTarget(c74563009.target)
e1:SetOperation(c74563009.activate)
c:RegisterEffect(e1)
local e4=e1:Clone(c)
e4:SetType(EFFECT_TYPE_FIELD+EFFECT_TYPE_TRIGGER_F)
e4:SetCode(EVENT_PHASE+PHASE_STANDBY)
e4:SetRange(LOCATION_SZONE)
e4:SetCountLimit(1,74563009)
e4:SetTarget(c74563009.target1)
c:RegisterEffect(e4)
end
function c74563009.filter1(c)
return c:IsFaceup() and c:IsCode(74563012)
end
function c74563009.target(e,tp,eg,ep,ev,re,r,rp,chk)
if chk==0 then return Duel.IsExistingMatchingCard(aux.NegateMonsterFilter,tp,0,LOCATION_MZONE,1,nil) end
local g=Duel.GetMatchingGroup(aux.NegateMonsterFilter,tp,0,LOCATION_MZONE,nil)
if Duel.IsExistingMatchingCard(c74563009.filter1,tp,LOCATION_MZONE,0,1,nil) then
Duel.SetOperationInfo(0,CATEGORY_DISABLE,g,g:GetCount(),0,0)
else
Duel.SetOperationInfo(0,CATEGORY_DISABLE,g,1,0,0)
end
end
function c74563009.target1(e,tp,eg,ep,ev,re,r,rp,chk)
if chk==0 then return true end
local g=Duel.GetMatchingGroup(aux.NegateMonsterFilter,tp,0,LOCATION_MZONE,nil)
if Duel.IsExistingMatchingCard(c74563009.filter1,tp,LOCATION_MZONE,0,1,nil) then
Duel.SetOperationInfo(0,CATEGORY_DISABLE,g,g:GetCount(),0,0)
else
Duel.SetOperationInfo(0,CATEGORY_DISABLE,g,1,0,0)
end
end
function c74563009.activate(e,tp,eg,ep,ev,re,r,rp)
local g=Duel.GetMatchingGroup(aux.NegateMonsterFilter,tp,0,LOCATION_MZONE,nil)
if g:GetCount()==0 then return end
if Duel.IsExistingMatchingCard(c74563009.filter1,tp,LOCATION_MZONE,0,1,nil) then
local tc=g:GetFirst()
while tc do
local e1=Effect.CreateEffect(e:GetHandler())
e1:SetType(EFFECT_TYPE_SINGLE)
e1:SetCode(EFFECT_DISABLE)
e1:SetReset(RESET_EVENT+RESETS_STANDARD+RESET_PHASE+PHASE_END)
tc:RegisterEffect(e1)
local e2=Effect.CreateEffect(e:GetHandler())
e2:SetType(EFFECT_TYPE_SINGLE)
e2:SetCode(EFFECT_DISABLE_EFFECT)
e2:SetReset(RESET_EVENT+RESETS_STANDARD+RESET_PHASE+PHASE_END)
tc:RegisterEffect(e2)
local e12=Effect.CreateEffect(e:GetHandler())
e12:SetType(EFFECT_TYPE_SINGLE)
e12:SetCode(EFFECT_SET_ATTACK_FINAL)
e12:SetValue(0)
e12:SetReset(RESET_EVENT+RESETS_STANDARD+RESET_PHASE+PHASE_END)
tc:RegisterEffect(e12)
local e21=Effect.CreateEffect(e:GetHandler())
e21:SetType(EFFECT_TYPE_SINGLE)
e21:SetCode(EFFECT_SET_DEFENSE_FINAL)
e21:SetValue(0)
e21:SetReset(RESET_EVENT+RESETS_STANDARD+RESET_PHASE+PHASE_END)
tc:RegisterEffect(e21)
tc=g:GetNext()
end
else
local tc=g:RandomSelect(tp,1):GetFirst()
local e1=Effect.CreateEffect(e:GetHandler())
e1:SetType(EFFECT_TYPE_SINGLE)
e1:SetCode(EFFECT_DISABLE)
e1:SetReset(RESET_EVENT+RESETS_STANDARD+RESET_PHASE+PHASE_END)
tc:RegisterEffect(e1)
local e2=Effect.CreateEffect(e:GetHandler())
e2:SetType(EFFECT_TYPE_SINGLE)
e2:SetCode(EFFECT_DISABLE_EFFECT)
e2:SetReset(RESET_EVENT+RESETS_STANDARD+RESET_PHASE+PHASE_END)
tc:RegisterEffect(e2)
local e12=Effect.CreateEffect(e:GetHandler())
e12:SetType(EFFECT_TYPE_SINGLE)
e12:SetCode(EFFECT_SET_ATTACK_FINAL)
e12:SetValue(0)
e12:SetReset(RESET_EVENT+RESETS_STANDARD+RESET_PHASE+PHASE_END)
tc:RegisterEffect(e12)
local e21=Effect.CreateEffect(e:GetHandler())
e21:SetType(EFFECT_TYPE_SINGLE)
e21:SetCode(EFFECT_SET_DEFENSE_FINAL)
e21:SetValue(0)
e21:SetReset(RESET_EVENT+RESETS_STANDARD+RESET_PHASE+PHASE_END)
tc:RegisterEffect(e21)
end
end
\ No newline at end of file
--遗存的圆柱
function c74563010.initial_effect(c)
--to deck
local e1=Effect.CreateEffect(c)
e1:SetCategory(CATEGORY_REMOVE)
e1:SetType(EFFECT_TYPE_ACTIVATE)
e1:SetCode(EVENT_FREE_CHAIN)
e1:SetTarget(c74563010.rmtg)
e1:SetOperation(c74563010.rmop)
c:RegisterEffect(e1)
local e4=e1:Clone(c)
e4:SetType(EFFECT_TYPE_FIELD+EFFECT_TYPE_TRIGGER_F)
e4:SetCode(EVENT_PHASE+PHASE_STANDBY)
e4:SetRange(LOCATION_SZONE)
e4:SetTarget(c74563010.rmtg1)
e4:SetCountLimit(1,74563010)
c:RegisterEffect(e4)
end
function c74563010.spfilter(c,e,tp)
return c:IsAbleToRemove() and c:IsFacedown()
end
function c74563010.rmtg(e,tp,eg,ep,ev,re,r,rp,chk)
if chk==0 then return Duel.IsExistingMatchingCard(c74563010.spfilter,tp,0,LOCATION_ONFIELD,1,nil) end
local g=Duel.GetMatchingGroup(c74563010.spfilter,tp,0,LOCATION_ONFIELD,nil)
Duel.SetOperationInfo(0,CATEGORY_REMOVE,g,1,0,0)
end
function c74563010.rmtg1(e,tp,eg,ep,ev,re,r,rp,chk)
if chk==0 then return true end
local g=Duel.GetMatchingGroup(c74563010.spfilter,tp,0,LOCATION_ONFIELD,nil)
Duel.SetOperationInfo(0,CATEGORY_REMOVE,g,1,0,0)
end
function c74563010.filter1(c)
return c:IsFaceup() and c:IsCode(74563012)
end
function c74563010.rmop(e,tp,eg,ep,ev,re,r,rp)
local c=e:GetHandler()
local g=Duel.GetMatchingGroup(c74563010.spfilter,tp,0,LOCATION_ONFIELD,nil)
if g:GetCount()==0 then return end
local rg=g:RandomSelect(tp,1):GetFirst()
if Duel.IsExistingMatchingCard(c74563010.filter1,tp,LOCATION_MZONE,0,1,nil) then
Duel.Remove(rg,POS_FACEDOWN,REASON_EFFECT)
else
if Duel.Remove(rg,POS_FACEDOWN,REASON_EFFECT+REASON_TEMPORARY)~=0 then
local fid=c:GetFieldID()
local og=Duel.GetOperatedGroup()
local oc=og:GetFirst()
while oc do
oc:RegisterFlagEffect(74563010,RESET_EVENT+RESETS_STANDARD+RESET_PHASE+PHASE_END,0,1,fid)
oc=og:GetNext()
end
og:KeepAlive()
local e1=Effect.CreateEffect(c)
e1:SetType(EFFECT_TYPE_FIELD+EFFECT_TYPE_CONTINUOUS)
e1:SetProperty(EFFECT_FLAG_IGNORE_IMMUNE)
e1:SetCode(EVENT_PHASE+PHASE_END)
e1:SetCountLimit(1)
e1:SetLabel(fid)
e1:SetLabelObject(og)
e1:SetCondition(c74563010.retcon)
e1:SetOperation(c74563010.retop)
e1:SetReset(RESET_PHASE+PHASE_END)
Duel.RegisterEffect(e1,tp)
end
end
end
function c74563010.retfilter(c,fid)
return c:GetFlagEffectLabel(74563010)==fid
end
function c74563010.retcon(e,tp,eg,ep,ev,re,r,rp)
local g=e:GetLabelObject()
if not g:IsExists(c74563010.retfilter,1,nil,e:GetLabel()) then
g:DeleteGroup()
e:Reset()
return false
else return true end
end
function c74563010.retop(e,tp,eg,ep,ev,re,r,rp)
local g=e:GetLabelObject()
local sg=g:Filter(c74563010.retfilter,nil,e:GetLabel())
g:DeleteGroup()
local tc=sg:GetFirst()
while tc do
Duel.ReturnToField(tc)
tc=sg:GetNext()
end
end
\ No newline at end of file
--遗存的正多面体
function c74563011.initial_effect(c)
--to deck
local e1=Effect.CreateEffect(c)
e1:SetCategory(CATEGORY_RECOVER)
e1:SetProperty(EFFECT_FLAG_PLAYER_TARGET)
e1:SetType(EFFECT_TYPE_ACTIVATE)
e1:SetCode(EVENT_FREE_CHAIN)
e1:SetTarget(c74563011.tg)
e1:SetOperation(c74563011.op)
c:RegisterEffect(e1)
local e4=e1:Clone(c)
e4:SetType(EFFECT_TYPE_FIELD+EFFECT_TYPE_TRIGGER_F)
e4:SetCode(EVENT_PHASE+PHASE_STANDBY)
e4:SetRange(LOCATION_SZONE)
e4:SetCountLimit(1,74563011)
c:RegisterEffect(e4)
end
function c74563011.filter1(c)
return c:IsFaceup() and c:IsCode(74563012)
end
function c74563011.tg(e,tp,eg,ep,ev,re,r,rp,chk)
if chk==0 then return true end
Duel.SetTargetPlayer(tp)
if Duel.IsExistingMatchingCard(c74563011.filter1,tp,LOCATION_MZONE,0,1,nil) then
Duel.SetTargetParam(3600)
Duel.SetOperationInfo(0,CATEGORY_RECOVER,nil,0,tp,3600)
else
Duel.SetTargetParam(1200)
Duel.SetOperationInfo(0,CATEGORY_RECOVER,nil,0,tp,1200)
end
end
function c74563011.op(e,tp,eg,ep,ev,re,r,rp)
local p,d=Duel.GetChainInfo(0,CHAININFO_TARGET_PLAYER,CHAININFO_TARGET_PARAM)
Duel.Recover(p,d,REASON_EFFECT)
end
\ No newline at end of file
--遗存的女神
function c74563012.initial_effect(c)
--fusion material
c:EnableReviveLimit()
aux.AddFusionProcCode4(c,74563008,74563009,74563010,74563011,true,true)
--spsummon condition
local e1=Effect.CreateEffect(c)
e1:SetType(EFFECT_TYPE_SINGLE)
e1:SetProperty(EFFECT_FLAG_CANNOT_DISABLE+EFFECT_FLAG_UNCOPYABLE)
e1:SetCode(EFFECT_SPSUMMON_CONDITION)
e1:SetValue(aux.fuslimit)
c:RegisterEffect(e1)
--indes
local e3=Effect.CreateEffect(c)
e3:SetType(EFFECT_TYPE_SINGLE)
e3:SetProperty(EFFECT_FLAG_SINGLE_RANGE)
e3:SetRange(LOCATION_MZONE)
e3:SetCode(EFFECT_INDESTRUCTABLE_BATTLE)
e3:SetValue(1)
c:RegisterEffect(e3)
--immune
local e12=Effect.CreateEffect(c)
e12:SetType(EFFECT_TYPE_SINGLE)
e12:SetCode(EFFECT_IMMUNE_EFFECT)
e12:SetProperty(EFFECT_FLAG_SINGLE_RANGE)
e12:SetRange(LOCATION_MZONE)
e12:SetCondition(c74563012.con)
e12:SetValue(c74563012.efilter)
c:RegisterEffect(e12)
--spsummon
local e2=Effect.CreateEffect(c)
e2:SetCategory(CATEGORY_ATKCHANGE)
e2:SetType(EFFECT_TYPE_CONTINUOUS+EFFECT_TYPE_FIELD)
e2:SetRange(LOCATION_MZONE)
e2:SetCode(EVENT_BECOME_TARGET)
e2:SetCondition(c74563012.spcon)
e2:SetOperation(c74563012.spop)
c:RegisterEffect(e2)
end
function c74563012.con(e)
return e:GetHandler():IsPosition(POS_FACEUP_ATTACK)
end
function c74563012.efilter(e,re)
return e:GetOwnerPlayer()~=re:GetOwnerPlayer()
end
function c74563012.spcon(e,tp,eg,ep,ev,re,r,rp)
return eg:IsContains(e:GetHandler())
end
function c74563012.spop(e,tp,eg,ep,ev,re,r,rp)
local e1=Effect.CreateEffect(e:GetHandler())
e1:SetType(EFFECT_TYPE_SINGLE)
e1:SetProperty(EFFECT_FLAG_COPY_INHERIT)
e1:SetReset(RESET_EVENT+RESETS_STANDARD+RESET_DISABLE)
e1:SetCode(EFFECT_UPDATE_ATTACK)
e1:SetValue(-2000)
e:GetHandler():RegisterEffect(e1)
end
\ No newline at end of file
--亚必迭
function c74563013.initial_effect(c)
--xyz summon
c:EnableReviveLimit()
aux.AddXyzProcedure(c,nil,3,2,c74563013.ovfilter,aux.Stringid(74563013,0),5,c74563013.xyzop)
--ATK Up
local e1=Effect.CreateEffect(c)
e1:SetCategory(CATEGORY_ATKCHANGE+CATEGORY_DEFCHANGE)
e1:SetType(EFFECT_TYPE_SINGLE+EFFECT_TYPE_TRIGGER_O)
e1:SetCode(EVENT_SPSUMMON_SUCCESS)
e1:SetProperty(EFFECT_FLAG_DELAY)
e1:SetCost(c74563013.cost)
e1:SetCondition(c74563013.atkcon)
e1:SetOperation(c74563013.atkop)
c:RegisterEffect(e1)
--banish
local e2=Effect.CreateEffect(c)
e2:SetDescription(aux.Stringid(93568288,1))
e2:SetCategory(CATEGORY_REMOVE)
e2:SetType(EFFECT_TYPE_QUICK_O)
e2:SetRange(LOCATION_MZONE)
e2:SetCode(EVENT_FREE_CHAIN)
e2:SetCountLimit(1)
e2:SetCost(c74563013.rmcost)
e2:SetTarget(c74563013.rmtg)
e2:SetOperation(c74563013.rmop)
c:RegisterEffect(e2)
end
function c74563013.ovfilter(c)
return c:IsFaceup() and c:IsAttribute(ATTRIBUTE_DARK) and c:IsRace(RACE_FAIRY) and c:IsType(TYPE_XYZ)
end
function c74563013.xyzop(e,tp,chk)
if chk==0 then return Duel.GetFlagEffect(tp,74563013)==0 end
Duel.RegisterFlagEffect(tp,74563013,RESET_PHASE+PHASE_END,EFFECT_FLAG_OATH,1)
end
function c74563013.atkcon(e,tp,eg,ep,ev,re,r,rp)
return e:GetHandler():IsSummonType(SUMMON_TYPE_XYZ)
and e:GetHandler():GetOverlayCount()>0
end
function c74563013.cost(e,tp,eg,ep,ev,re,r,rp,chk)
local c=e:GetHandler()
if chk==0 then return c:CheckRemoveOverlayCard(tp,1,REASON_COST) end
local rt=c:GetOverlayCount()
local ct=c:RemoveOverlayCard(tp,1,rt,REASON_COST)
e:SetLabel(ct)
end
function c74563013.atkop(e,tp,eg,ep,ev,re,r,rp)
local e1=Effect.CreateEffect(e:GetHandler())
e1:SetType(EFFECT_TYPE_FIELD)
e1:SetCode(EFFECT_UPDATE_ATTACK)
e1:SetTargetRange(LOCATION_MZONE,0)
e1:SetValue(e:GetLabel()*300)
e1:SetTarget(c74563013.eftg)
Duel.RegisterEffect(e1,tp)
local e2=e1:Clone()
e2:SetCode(EFFECT_UPDATE_DEFENSE)
Duel.RegisterEffect(e2,tp)
end
function c74563013.eftg(e,c)
return c:IsType(TYPE_EFFECT) and c:IsRace(RACE_FAIRY)
end
function c74563013.rmcost(e,tp,eg,ep,ev,re,r,rp,chk)
if chk==0 then return e:GetHandler():CheckRemoveOverlayCard(tp,1,REASON_COST) and Duel.IsExistingMatchingCard(Card.IsAbleToRemoveAsCost,tp,LOCATION_HAND,0,1,nil) end
Duel.Hint(HINT_SELECTMSG,tp,HINTMSG_REMOVE)
local g=Duel.SelectMatchingCard(tp,Card.IsAbleToRemoveAsCost,tp,LOCATION_HAND,0,1,1,nil)
Duel.Remove(g,POS_FACEUP,REASON_COST)
e:GetHandler():RemoveOverlayCard(tp,1,1,REASON_COST)
end
function c74563013.rmtg(e,tp,eg,ep,ev,re,r,rp,chk,chkc)
if chk==0 then return Duel.IsExistingMatchingCard(Card.IsAbleToRemove,tp,LOCATION_ONFIELD+LOCATION_GRAVE,LOCATION_ONFIELD+LOCATION_GRAVE,1,nil) end
local g=Duel.GetMatchingGroup(Card.IsAbleToRemove,tp,LOCATION_ONFIELD+LOCATION_GRAVE,LOCATION_ONFIELD+LOCATION_GRAVE,nil)
Duel.SetOperationInfo(0,CATEGORY_REMOVE,g,1,0,0)
end
function c74563013.rmop(e,tp,eg,ep,ev,re,r,rp)
Duel.Hint(HINT_SELECTMSG,tp,HINTMSG_REMOVE)
local g=Duel.SelectMatchingCard(tp,Card.IsAbleToRemove,tp,LOCATION_ONFIELD+LOCATION_GRAVE,LOCATION_ONFIELD+LOCATION_GRAVE,1,1,nil)
if g:GetCount()>0 then
Duel.Remove(g,POS_FACEUP,REASON_EFFECT)
end
end
\ No newline at end of file
--黑天月兔妖
function c74563014.initial_effect(c)
--fusion material
c:EnableReviveLimit()
aux.AddFusionProcFun2(c,aux.FilterBoolFunction(Card.IsFusionSetCard,0x258),c74563014.matfilter,true)
--equip
local e12=Effect.CreateEffect(c)
e12:SetCategory(CATEGORY_REMOVE)
e12:SetType(EFFECT_TYPE_QUICK_O)
e12:SetRange(LOCATION_MZONE)
e12:SetCode(EVENT_FREE_CHAIN)
e12:SetCost(c74563014.spcost)
e12:SetTarget(c74563014.eqtg)
e12:SetOperation(c74563014.eqop)
c:RegisterEffect(e12)
--draw
local e2=Effect.CreateEffect(c)
e2:SetType(EFFECT_TYPE_FIELD+EFFECT_TYPE_TRIGGER_F)
e2:SetCode(EVENT_RECOVER)
e2:SetRange(LOCATION_MZONE)
e2:SetCountLimit(1,74563014)
e2:SetCondition(c74563014.drcon)
e2:SetTarget(c74563014.drtg)
e2:SetOperation(c74563014.drop)
c:RegisterEffect(e2)
end
c74563014.DescSetName=0x258
function c74563014.matfilter(c)
return c:IsFusionAttribute(ATTRIBUTE_WIND+ATTRIBUTE_DARK)
end
function c74563014.drcon(e,tp,eg,ep,ev,re,r,rp)
return ep==tp
end
function c74563014.drtg(e,tp,eg,ep,ev,re,r,rp,chk)
if chk==0 then return true end
end
function c74563014.drop(e,tp,eg,ep,ev,re,r,rp)
Duel.RegisterFlagEffect(tp,74563013,RESET_PHASE+PHASE_END,0,1)
end
function c74563014.thfilter(c)
return c:IsSetCard(0x258) and c:IsType(TYPE_MONSTER) and c:IsAbleToRemoveAsCost()
end
function c74563014.spcost(e,tp,eg,ep,ev,re,r,rp,chk)
if chk==0 then return Duel.IsExistingMatchingCard(Card.IsDiscardable,tp,LOCATION_HAND,0,1,nil) or Duel.IsExistingMatchingCard(c74563014.thfilter,tp,LOCATION_GRAVE,0,1,nil) end
if Duel.IsExistingMatchingCard(Card.IsDiscardable,tp,LOCATION_HAND,0,1,nil) and (not Duel.IsExistingMatchingCard(c74563014.thfilter,tp,LOCATION_GRAVE,0,1,nil) or not Duel.SelectYesNo(tp,aux.Stringid(74563014,0))) then
Duel.DiscardHand(tp,Card.IsDiscardable,1,1,REASON_DISCARD+REASON_COST,nil)
else
Duel.Hint(HINT_SELECTMSG,tp,HINTMSG_REMOVE)
local g=Duel.SelectMatchingCard(tp,c74563014.thfilter,tp,LOCATION_GRAVE,0,1,1,nil)
Duel.Remove(g,POS_FACEUP,REASON_COST)
end
end
function c74563014.desfilter2(c,num)
if c:IsType(TYPE_LINK) or c:IsFacedown() then
return num>1200 and c:IsAbleToRemove()
elseif c:IsType(TYPE_SPELL+TYPE_TRAP) then
return num>1200 and c:IsSSetable()
else
return c:IsDefenseBelow(num) and (c:IsCanTurnSet() or c:IsAbleToRemove())
end
end
function c74563014.eqtg(e,tp,eg,ep,ev,re,r,rp,chk)
local c=e:GetHandler()
local lp=c:GetAttack()
e:SetLabel(lp)
local counter1=Duel.GetFlagEffect(tp,74563014)
local counter2=Duel.GetFlagEffect(tp,74563013)
if chk==0 then return Duel.IsExistingMatchingCard(c74563014.desfilter2,tp,0,LOCATION_ONFIELD,1,nil,lp) and counter1-counter2<=0 end
Duel.RegisterFlagEffect(tp,74563014,RESET_PHASE+PHASE_END,0,1)
end
function c74563014.gselect(g,num)
local def=0
local tc=g:GetFirst()
while tc do
if tc:IsDefenseAbove(0) and tc:IsFaceup() then
def=def+tc:GetDefense()
else
def=def+1200
end
tc=g:GetNext()
end
return def<=num
end
function c74563014.eqop(e,tp,eg,ep,ev,re,r,rp)
local num=e:GetLabel()
local g=Duel.GetMatchingGroup(c74563014.desfilter2,tp,0,LOCATION_ONFIELD,nil,num)
if g:GetCount()==0 then return end
Duel.Hint(HINT_SELECTMSG,tp,HINTMSG_DESTROY)
local dg=g:SelectSubGroup(tp,c74563014.gselect,false,1,#g,num)
local tg=dg:GetFirst()
while tg do
if tg:IsCanTurnSet() and not (tg:IsType(TYPE_PENDULUM) and tg:IsLocation(LOCATION_PZONE)) then
if tg:IsType(TYPE_MONSTER) then
Duel.ChangePosition(tg,POS_FACEDOWN_DEFENSE)
else
Duel.ChangePosition(tg,POS_FACEDOWN)
end
else
Duel.Remove(tg,POS_FACEUP,REASON_EFFECT)
end
tg=dg:GetNext()
end
end
\ No newline at end of file
--圣拳月兔妖
function c74563015.initial_effect(c)
--fusion material
c:EnableReviveLimit()
aux.AddFusionProcFun2(c,aux.FilterBoolFunction(Card.IsFusionSetCard,0x258),c74563015.matfilter,true)
--equip
local e12=Effect.CreateEffect(c)
e12:SetCategory(CATEGORY_DISABLE)
e12:SetType(EFFECT_TYPE_QUICK_O)
e12:SetRange(LOCATION_MZONE)
e12:SetCode(EVENT_FREE_CHAIN)
e12:SetCost(c74563015.spcost)
e12:SetTarget(c74563015.eqtg)
e12:SetOperation(c74563015.eqop)
c:RegisterEffect(e12)
--draw
local e2=Effect.CreateEffect(c)
e2:SetType(EFFECT_TYPE_FIELD+EFFECT_TYPE_TRIGGER_F)
e2:SetCode(EVENT_RECOVER)
e2:SetRange(LOCATION_MZONE)
e2:SetCountLimit(1,74563015)
e2:SetCondition(c74563015.drcon)
e2:SetTarget(c74563015.drtg)
e2:SetOperation(c74563015.drop)
c:RegisterEffect(e2)
end
c74563015.DescSetName=0x258
function c74563015.matfilter(c)
return c:IsFusionAttribute(ATTRIBUTE_LIGHT+ATTRIBUTE_WATER)
end
function c74563015.drcon(e,tp,eg,ep,ev,re,r,rp)
return ep==tp
end
function c74563015.drtg(e,tp,eg,ep,ev,re,r,rp,chk)
if chk==0 then return true end
end
function c74563015.drop(e,tp,eg,ep,ev,re,r,rp)
Duel.RegisterFlagEffect(tp,74563011,RESET_PHASE+PHASE_END,0,1)
end
function c74563015.thfilter(c)
return c:IsSetCard(0x258) and c:IsType(TYPE_MONSTER) and c:IsAbleToRemoveAsCost()
end
function c74563015.spcost(e,tp,eg,ep,ev,re,r,rp,chk)
if chk==0 then return Duel.IsExistingMatchingCard(Card.IsDiscardable,tp,LOCATION_HAND,0,1,nil) or Duel.IsExistingMatchingCard(c74563015.thfilter,tp,LOCATION_GRAVE,0,1,nil) end
if Duel.IsExistingMatchingCard(Card.IsDiscardable,tp,LOCATION_HAND,0,1,nil) and (not Duel.IsExistingMatchingCard(c74563015.thfilter,tp,LOCATION_GRAVE,0,1,nil) or not Duel.SelectYesNo(tp,aux.Stringid(74563015,0))) then
Duel.DiscardHand(tp,Card.IsDiscardable,1,1,REASON_DISCARD+REASON_COST,nil)
else
Duel.Hint(HINT_SELECTMSG,tp,HINTMSG_REMOVE)
local g=Duel.SelectMatchingCard(tp,c74563015.thfilter,tp,LOCATION_GRAVE,0,1,1,nil)
Duel.Remove(g,POS_FACEUP,REASON_COST)
end
end
function c74563015.desfilter2(c,num)
if c:IsType(TYPE_LINK) then
return num>1200
elseif c:IsType(TYPE_SPELL+TYPE_TRAP) and c:IsFaceup() then
return num>1200
else
return c:IsDefenseBelow(num) and c:IsFaceup()
end
end
function c74563015.eqtg(e,tp,eg,ep,ev,re,r,rp,chk)
local c=e:GetHandler()
local lp=c:GetAttack()
e:SetLabel(lp)
local counter1=Duel.GetFlagEffect(tp,74563015)
local counter2=Duel.GetFlagEffect(tp,74563011)
if chk==0 then return Duel.IsExistingMatchingCard(c74563015.desfilter2,tp,0,LOCATION_ONFIELD+LOCATION_GRAVE+LOCATION_REMOVED,1,nil,lp) and counter1-counter2<=0 end
Duel.RegisterFlagEffect(tp,74563015,RESET_PHASE+PHASE_END,0,1)
end
function c74563015.gselect(g,num)
local def=0
local tc=g:GetFirst()
while tc do
if tc:IsDefenseAbove(0) and tc:IsFaceup() then
def=def+tc:GetDefense()
else
def=def+1200
end
tc=g:GetNext()
end
return def<=num
end
function c74563015.eqop(e,tp,eg,ep,ev,re,r,rp)
local c=e:GetHandler()
local num=e:GetLabel()
local g=Duel.GetMatchingGroup(c74563015.desfilter2,tp,0,LOCATION_ONFIELD+LOCATION_GRAVE+LOCATION_REMOVED,nil,num)
if g:GetCount()==0 then return end
Duel.Hint(HINT_SELECTMSG,tp,HINTMSG_DESTROY)
local dg=g:SelectSubGroup(tp,c74563015.gselect,false,1,#g,num)
local tc=dg:GetFirst()
while tc do
Duel.NegateRelatedChain(tc,RESET_TURN_SET)
local e1=Effect.CreateEffect(c)
e1:SetDescription(aux.Stringid(74563015,2))
e1:SetType(EFFECT_TYPE_SINGLE)
e1:SetProperty(EFFECT_FLAG_CANNOT_DISABLE+EFFECT_FLAG_CLIENT_HINT)
e1:SetCode(EFFECT_DISABLE)
e1:SetReset(RESET_EVENT+RESETS_STANDARD)
tc:RegisterEffect(e1)
local e2=Effect.CreateEffect(c)
e2:SetDescription(aux.Stringid(74563015,2))
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)
tc:RegisterEffect(e2)
if tc:IsType(TYPE_TRAPMONSTER) then
local e3=Effect.CreateEffect(c)
e3:SetDescription(aux.Stringid(74563015,2))
e3:SetType(EFFECT_TYPE_SINGLE)
e3:SetProperty(EFFECT_FLAG_CANNOT_DISABLE)
e3:SetCode(EFFECT_DISABLE_TRAPMONSTER)
e3:SetReset(RESET_EVENT+RESETS_STANDARD)
tc:RegisterEffect(e3)
end
tc=dg:GetNext()
end
end
\ No newline at end of file
--歼灭月兔妖
function c74563016.initial_effect(c)
--fusion material
c:EnableReviveLimit()
aux.AddFusionProcFun2(c,aux.FilterBoolFunction(Card.IsFusionSetCard,0x258),c74563016.matfilter,true)
--equip
local e12=Effect.CreateEffect(c)
e12:SetCategory(CATEGORY_REMOVE)
e12:SetType(EFFECT_TYPE_QUICK_O)
e12:SetRange(LOCATION_MZONE)
e12:SetCode(EVENT_FREE_CHAIN)
e12:SetCost(c74563016.spcost)
e12:SetTarget(c74563016.eqtg)
e12:SetOperation(c74563016.eqop)
c:RegisterEffect(e12)
--draw
local e2=Effect.CreateEffect(c)
e2:SetType(EFFECT_TYPE_FIELD+EFFECT_TYPE_TRIGGER_F)
e2:SetCode(EVENT_RECOVER)
e2:SetRange(LOCATION_MZONE)
e2:SetCountLimit(1,74563016)
e2:SetCondition(c74563016.drcon)
e2:SetTarget(c74563016.drtg)
e2:SetOperation(c74563016.drop)
c:RegisterEffect(e2)
end
c74563016.DescSetName=0x258
function c74563016.matfilter(c)
return c:IsFusionAttribute(ATTRIBUTE_EARTH+ATTRIBUTE_FIRE)
end
function c74563016.drcon(e,tp,eg,ep,ev,re,r,rp)
return ep==tp
end
function c74563016.drtg(e,tp,eg,ep,ev,re,r,rp,chk)
if chk==0 then return true end
end
function c74563016.drop(e,tp,eg,ep,ev,re,r,rp)
Duel.RegisterFlagEffect(tp,74563012,RESET_PHASE+PHASE_END,0,1)
end
function c74563016.thfilter(c)
return c:IsSetCard(0x258) and c:IsType(TYPE_MONSTER) and c:IsAbleToRemoveAsCost()
end
function c74563016.spcost(e,tp,eg,ep,ev,re,r,rp,chk)
if chk==0 then return Duel.IsExistingMatchingCard(Card.IsDiscardable,tp,LOCATION_HAND,0,1,nil) or Duel.IsExistingMatchingCard(c74563016.thfilter,tp,LOCATION_GRAVE,0,1,nil) end
if Duel.IsExistingMatchingCard(Card.IsDiscardable,tp,LOCATION_HAND,0,1,nil) and (not Duel.IsExistingMatchingCard(c74563016.thfilter,tp,LOCATION_GRAVE,0,1,nil) or not Duel.SelectYesNo(tp,aux.Stringid(74563016,0))) then
Duel.DiscardHand(tp,Card.IsDiscardable,1,1,REASON_DISCARD+REASON_COST,nil)
else
Duel.Hint(HINT_SELECTMSG,tp,HINTMSG_REMOVE)
local g=Duel.SelectMatchingCard(tp,c74563016.thfilter,tp,LOCATION_GRAVE,0,1,1,nil)
Duel.Remove(g,POS_FACEUP,REASON_COST)
end
end
function c74563016.desfilter2(c,num)
if c:IsType(TYPE_LINK) or c:IsFacedown() then
return num>1200
elseif c:IsType(TYPE_SPELL+TYPE_TRAP) then
return num>1200
else
return c:IsDefenseBelow(num)
end
end
function c74563016.eqtg(e,tp,eg,ep,ev,re,r,rp,chk)
local c=e:GetHandler()
local lp=c:GetAttack()
e:SetLabel(lp)
local counter1=Duel.GetFlagEffect(tp,74563016)
local counter2=Duel.GetFlagEffect(tp,74563012)
if chk==0 then return Duel.IsExistingMatchingCard(c74563016.desfilter2,tp,0,LOCATION_ONFIELD,1,nil,lp) and counter1-counter2<=0 end
Duel.RegisterFlagEffect(tp,74563016,RESET_PHASE+PHASE_END,0,1)
end
function c74563016.gselect(g,num)
local def=0
local tc=g:GetFirst()
while tc do
if tc:IsDefenseAbove(0) and tc:IsFaceup() then
def=def+tc:GetDefense()
else
def=def+1200
end
tc=g:GetNext()
end
return def<=num
end
function c74563016.eqop(e,tp,eg,ep,ev,re,r,rp)
local num=e:GetLabel()
local g=Duel.GetMatchingGroup(c74563016.desfilter2,tp,0,LOCATION_ONFIELD,nil,num)
if g:GetCount()==0 then return end
Duel.Hint(HINT_SELECTMSG,tp,HINTMSG_DESTROY)
local dg=g:SelectSubGroup(tp,c74563016.gselect,false,1,#g,num)
Duel.Destroy(dg,REASON_EFFECT)
end
\ No newline at end of file
--祸流巨蛇
function c74563017.initial_effect(c)
--special summon
local e1=Effect.CreateEffect(c)
e1:SetCategory(CATEGORY_SPECIAL_SUMMON)
e1:SetType(EFFECT_TYPE_FIELD+EFFECT_TYPE_TRIGGER_O)
e1:SetProperty(EFFECT_FLAG_DAMAGE_STEP)
e1:SetRange(LOCATION_HAND)
e1:SetCode(EVENT_DAMAGE)
e1:SetCondition(c74563017.sumcon)
e1:SetTarget(c74563017.sumtg)
e1:SetOperation(c74563017.sumop)
c:RegisterEffect(e1)
--damage
local e2=Effect.CreateEffect(c)
e2:SetCategory(CATEGORY_SPECIAL_SUMMON)
e2:SetType(EFFECT_TYPE_SINGLE+EFFECT_TYPE_TRIGGER_F)
e2:SetCode(EVENT_SUMMON_SUCCESS)
e2:SetCountLimit(1,74563017)
e2:SetTarget(c74563017.damtg)
e2:SetOperation(c74563017.damop)
c:RegisterEffect(e2)
local e3=e2:Clone()
e3:SetCode(EVENT_SPSUMMON_SUCCESS)
c:RegisterEffect(e3)
if not c74563017.global_check then
c74563017.global_check=true
c74563017[0]=0
c74563017[1]=0
c74563017[2]=0
c74563017[3]=0
local ge1=Effect.CreateEffect(c)
ge1:SetType(EFFECT_TYPE_FIELD+EFFECT_TYPE_CONTINUOUS)
ge1:SetCode(EVENT_DAMAGE)
ge1:SetOperation(c74563017.checkop)
Duel.RegisterEffect(ge1,0)
local ge2=Effect.CreateEffect(c)
ge2:SetType(EFFECT_TYPE_FIELD+EFFECT_TYPE_CONTINUOUS)
ge2:SetCode(EVENT_TURN_END)
ge2:SetOperation(c74563017.clear)
Duel.RegisterEffect(ge2,0)
end
end
function c74563017.checkop(e,tp,eg,ep,ev,re,r,rp)
if ep==tp and (bit.band(r,REASON_BATTLE)~=0 or (bit.band(r,REASON_EFFECT)~=0 and rp==1-tp)) then
local val=ev
c74563017[0]=c74563017[0]+val
end
end
function c74563017.clear(e,tp,eg,ep,ev,re,r,rp)
c74563017[0]=c74563017[0]
c74563017[0]=0
end
function c74563017.sumcon(e,tp,eg,ep,ev,re,r,rp)
return ep==tp and (bit.band(r,REASON_BATTLE)~=0 or (bit.band(r,REASON_EFFECT)~=0 and rp==1-tp))
end
function c74563017.sumtg(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 c74563017.sumop(e,tp,eg,ep,ev,re,r,rp)
local c=e:GetHandler()
if not c:IsRelateToEffect(e) then return end
Duel.SpecialSummon(c,SUMMON_VALUE_SELF,tp,tp,false,false,POS_FACEUP)
end
function c74563017.damtg(e,tp,eg,ep,ev,re,r,rp,chk)
if chk==0 then return true end
end
function c74563017.damop(e,tp,eg,ep,ev,re,r,rp)
local val=c74563017[0]
if val>=5000 then
local token1=Duel.CreateToken(tp, 74563017)
local token2=Duel.CreateToken(tp, 74563017)
local token3=Duel.CreateToken(tp, 74563017)
local token4=Duel.CreateToken(tp, 74563017)
local token5=Duel.CreateToken(tp, 74563017)
local token6=Duel.CreateToken(tp, 74563017)
local token7=Duel.CreateToken(tp, 74563017)
local token8=Duel.CreateToken(tp, 74563017)
local token9=Duel.CreateToken(tp, 74563017)
local token10=Duel.CreateToken(tp, 74563017)
local token11=Duel.CreateToken(tp, 74563017)
local token12=Duel.CreateToken(tp, 74563017)
local token13=Duel.CreateToken(tp, 74563017)
local g=Group.CreateGroup()
g:AddCard(token1)
g:AddCard(token2)
g:AddCard(token3)
g:AddCard(token4)
g:AddCard(token5)
g:AddCard(token6)
g:AddCard(token7)
g:AddCard(token8)
g:AddCard(token9)
g:AddCard(token10)
g:AddCard(token11)
g:AddCard(token12)
g:AddCard(token13)
if g and g:GetCount()>0 then
Duel.SendtoDeck(g,nil,2,REASON_EFFECT)
end
Duel.BreakEffect()
Duel.Release(e:GetHandler(),REASON_COST)
local ct=Duel.GetLocationCount(tp,LOCATION_MZONE)
local g=Duel.GetMatchingGroup(c74563017.spfilter,tp,LOCATION_DECK,0,nil,e,tp)
if ct<=0 or g:GetCount()==0 then return end
ct=math.min(ct,g:GetCount())
if Duel.IsPlayerAffectedByEffect(tp,59822133) then ct=1 end
Duel.Hint(HINT_SELECTMSG,tp,HINTMSG_SPSUMMON)
local g=Duel.SelectMatchingCard(tp,c74563017.spfilter,tp,LOCATION_DECK,0,ct,ct,nil,e,tp)
if g and g:GetCount()>0 then
Duel.SpecialSummon(g,0,tp,tp,false,false,POS_FACEUP)
end
else
local g1=Duel.GetMatchingGroup(c74563017.spfilter,tp,LOCATION_DECK,0,nil,e,tp)
if g1:GetCount()>0 then
opt=Duel.SelectOption(tp,aux.Stringid(74563017,0),aux.Stringid(74563017,1))
else
opt=0
end
if opt==0 then
local token1=Duel.CreateToken(tp, 74563017)
local token2=Duel.CreateToken(tp, 74563017)
local token3=Duel.CreateToken(tp, 74563017)
local token4=Duel.CreateToken(tp, 74563017)
local token5=Duel.CreateToken(tp, 74563017)
local token6=Duel.CreateToken(tp, 74563017)
local token7=Duel.CreateToken(tp, 74563017)
local token8=Duel.CreateToken(tp, 74563017)
local token9=Duel.CreateToken(tp, 74563017)
local token10=Duel.CreateToken(tp, 74563017)
local token11=Duel.CreateToken(tp, 74563017)
local token12=Duel.CreateToken(tp, 74563017)
local token13=Duel.CreateToken(tp, 74563017)
local g=Group.CreateGroup()
g:AddCard(token1)
g:AddCard(token2)
g:AddCard(token3)
g:AddCard(token4)
g:AddCard(token5)
g:AddCard(token6)
g:AddCard(token7)
g:AddCard(token8)
g:AddCard(token9)
g:AddCard(token10)
g:AddCard(token11)
g:AddCard(token12)
g:AddCard(token13)
if g and g:GetCount()>0 then
Duel.SendtoDeck(g,nil,2,REASON_EFFECT)
end
else
Duel.Release(e:GetHandler(),REASON_COST)
local ct=Duel.GetLocationCount(tp,LOCATION_MZONE)
local g=Duel.GetMatchingGroup(c74563017.spfilter,tp,LOCATION_DECK,0,nil,e,tp)
if ct<=0 or g:GetCount()==0 then return end
ct=math.min(ct,g:GetCount())
if Duel.IsPlayerAffectedByEffect(tp,59822133) then ct=1 end
Duel.Hint(HINT_SELECTMSG,tp,HINTMSG_SPSUMMON)
local g=Duel.SelectMatchingCard(tp,c74563017.spfilter,tp,LOCATION_DECK,0,ct,ct,nil,e,tp)
if g and g:GetCount()>0 then
Duel.SpecialSummon(g,0,tp,tp,false,false,POS_FACEUP)
end
end
end
end
function c74563017.spfilter(c,e,tp)
return c:IsCode(74563017) and c:IsCanBeSpecialSummoned(e,0,tp,false,false)
end
\ No newline at end of file
--红魔✿不明的魔法之元 帕秋莉
function c74563018.initial_effect(c)
--special summon
local e1=Effect.CreateEffect(c)
e1:SetCategory(CATEGORY_SPECIAL_SUMMON)
e1:SetType(EFFECT_TYPE_QUICK_O)
e1:SetCode(EVENT_FREE_CHAIN)
e1:SetRange(LOCATION_HAND)
e1:SetCountLimit(1,74563018)
e1:SetCost(c74563018.spcost)
e1:SetTarget(c74563018.sptg)
e1:SetOperation(c74563018.spop)
c:RegisterEffect(e1)
--equip
local e12=Effect.CreateEffect(c)
e12:SetType(EFFECT_TYPE_QUICK_O)
e12:SetRange(LOCATION_MZONE)
e12:SetCode(EVENT_FREE_CHAIN)
e12:SetCountLimit(1,74563019)
e12:SetTarget(c74563018.eqtg)
e12:SetOperation(c74563018.eqop)
c:RegisterEffect(e12)
--
local e5=Effect.CreateEffect(c)
e5:SetType(EFFECT_TYPE_SINGLE)
e5:SetProperty(EFFECT_FLAG_SINGLE_RANGE)
e5:SetRange(LOCATION_MZONE)
e5:SetCode(EFFECT_INDESTRUCTABLE_EFFECT)
e5:SetValue(1)
c:RegisterEffect(e5)
end
function c74563018.cfilter(c)
return (c:IsSetCard(0x177) or c:IsSetCard(0x813)) and c:IsType(TYPE_SPELL) and not c:IsPublic()
end
function c74563018.spcost(e,tp,eg,ep,ev,re,r,rp,chk)
if chk==0 then return Duel.IsExistingMatchingCard(c74563018.cfilter,tp,LOCATION_HAND,0,1,nil) end
Duel.Hint(HINT_SELECTMSG,tp,HINTMSG_CONFIRM)
local g=Duel.SelectMatchingCard(tp,c74563018.cfilter,tp,LOCATION_HAND,0,1,1,nil)
Duel.ConfirmCards(1-tp,g)
Duel.ShuffleHand(tp)
end
function c74563018.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 c74563018.spop(e,tp,eg,ep,ev,re,r,rp)
local c=e:GetHandler()
if not c:IsRelateToEffect(e) then return end
Duel.SpecialSummon(c,0,tp,tp,false,false,POS_FACEUP)
end
function c74563018.eqtg(e,tp,eg,ep,ev,re,r,rp,chk)
if chk==0 then return Duel.IsExistingMatchingCard(aux.TRUE,tp,0,LOCATION_ONFIELD,1,nil)end
end
function c74563018.eqop(e,tp,eg,ep,ev,re,r,rp)
local ct=Duel.GetFieldGroupCount(tp,0,LOCATION_ONFIELD)
if ct==0 then return end
for i=1,ct do
local c1,c2,c3=Duel.TossCoin(tp,3)
if c1==0 and c2==0 and c3==0 then
local token=Duel.CreateToken(tp, 22131)
Duel.SendtoDeck(token,nil,2,REASON_EFFECT)
end
if c1==0 and c2==0 and c3==1 then
local token=Duel.CreateToken(tp, 22132)
Duel.SendtoDeck(token,nil,2,REASON_EFFECT)
end
if c1==0 and c2==1 and c3==0 then
local token=Duel.CreateToken(tp, 22133)
Duel.SendtoDeck(token,nil,2,REASON_EFFECT)
end
if c1==1 and c2==0 and c3==0 then
local token=Duel.CreateToken(tp, 22134)
Duel.SendtoDeck(token,nil,2,REASON_EFFECT)
end
if c1==0 and c2==1 and c3==1 then
local token=Duel.CreateToken(tp, 22135)
Duel.SendtoDeck(token,nil,2,REASON_EFFECT)
end
if c1==1 and c2==0 and c3==1 then
local token=Duel.CreateToken(tp, 22161)
Duel.SendtoDeck(token,nil,2,REASON_EFFECT)
end
if c1==1 and c2==1 and c3==0 then
local token=Duel.CreateToken(tp, 22162)
Duel.SendtoDeck(token,nil,2,REASON_EFFECT)
end
if c1==1 and c2==1 and c3==1 then
local token=Duel.CreateToken(tp, 22191)
Duel.SendtoDeck(token,nil,2,REASON_EFFECT)
end
end
end
\ No newline at end of file
--红魔✿星期的魔女 帕秋莉诺蕾姬
function c74563019.initial_effect(c)
--synchro summon
aux.AddSynchroProcedure(c,aux.FilterBoolFunction(Card.IsSetCard,0x813),aux.NonTuner(nil),1)
c:EnableReviveLimit()
--synchro success
local e2=Effect.CreateEffect(c)
e2:SetType(EFFECT_TYPE_SINGLE+EFFECT_TYPE_TRIGGER_F)
e2:SetCode(EVENT_SPSUMMON_SUCCESS)
e2:SetCondition(c74563019.addcc)
e2:SetTarget(c74563019.addct)
e2:SetOperation(c74563019.addc)
c:RegisterEffect(e2)
--search
local e21=Effect.CreateEffect(c)
e21:SetCategory(CATEGORY_TOHAND+CATEGORY_SEARCH)
e21:SetType(EFFECT_TYPE_IGNITION)
e21:SetRange(LOCATION_MZONE)
e21:SetCountLimit(1)
e21:SetCost(c74563019.thcost)
e21:SetTarget(c74563019.thtgs)
e21:SetOperation(c74563019.thops)
c:RegisterEffect(e21)
end
function c74563019.addcc(e,tp,eg,ep,ev,re,r,rp)
return e:GetHandler():IsSummonType(SUMMON_TYPE_SYNCHRO)
end
function c74563019.addct(e,tp,eg,ep,ev,re,r,rp,chk)
if chk==0 then return true end
end
function c74563019.addc(e,tp,eg,ep,ev,re,r,rp)
local c=e:GetHandler()
--damage
local e2=Effect.CreateEffect(c)
e2:SetType(EFFECT_TYPE_FIELD+EFFECT_TYPE_CONTINUOUS)
e2:SetCode(EVENT_PHASE+PHASE_BATTLE_START)
e2:SetCountLimit(1)
e2:SetTarget(c74563019.damtg)
e2:SetOperation(c74563019.damop)
Duel.RegisterEffect(e2,tp)
end
function c74563019.filter(c)
local ct=Duel.GetTurnCount()%7
if ct==0 then
return c:IsType(TYPE_SPELL) and c:IsType(TYPE_CONTINUOUS) and not c:IsForbidden() and c:CheckUniqueOnField(tp) and c:IsCode(22161)
elseif ct==1 then
return c:IsType(TYPE_SPELL) and c:IsType(TYPE_CONTINUOUS) and not c:IsForbidden() and c:CheckUniqueOnField(tp) and c:IsCode(22162)
elseif ct==2 then
return c:IsType(TYPE_SPELL) and c:IsType(TYPE_CONTINUOUS) and not c:IsForbidden() and c:CheckUniqueOnField(tp) and (c:IsCode(22131) or c:IsCode(22191))
elseif ct==3 then
return c:IsType(TYPE_SPELL) and c:IsType(TYPE_CONTINUOUS) and not c:IsForbidden() and c:CheckUniqueOnField(tp) and c:IsCode(22132)
elseif ct==4 then
return c:IsType(TYPE_SPELL) and c:IsType(TYPE_CONTINUOUS) and not c:IsForbidden() and c:CheckUniqueOnField(tp) and c:IsCode(22133)
elseif ct==5 then
return c:IsType(TYPE_SPELL) and c:IsType(TYPE_CONTINUOUS) and not c:IsForbidden() and c:CheckUniqueOnField(tp) and c:IsCode(22134)
else
return c:IsType(TYPE_SPELL) and c:IsType(TYPE_CONTINUOUS) and not c:IsForbidden() and c:CheckUniqueOnField(tp) and c:IsCode(22135)
end
end
function c74563019.damtg(e,tp,eg,ep,ev,re,r,rp,chk)
if chk==0 then return Duel.GetLocationCount(tp,LOCATION_SZONE)>0
and Duel.IsExistingMatchingCard(c74563019.filter,tp,LOCATION_DECK+LOCATION_REMOVED+LOCATION_GRAVE,0,1,nil) end
end
function c74563019.damop(e,tp,eg,ep,ev,re,r,rp)
if Duel.GetLocationCount(tp,LOCATION_SZONE)<=0 then return end
Duel.Hint(HINT_SELECTMSG,tp,HINTMSG_TOFIELD)
local ct=Duel.GetTurnCount()%7
if Duel.SelectYesNo(tp,aux.Stringid(74563019,ct)) then
local tc=Duel.SelectMatchingCard(tp,aux.NecroValleyFilter(c74563019.filter),tp,LOCATION_DECK+LOCATION_REMOVED+LOCATION_GRAVE,0,1,1,nil,tp):GetFirst()
if tc then
Duel.MoveToField(tc,tp,tp,LOCATION_SZONE,POS_FACEUP,true)
end
end
end
function c74563019.thcost(e,tp,eg,ep,ev,re,r,rp,chk)
if chk==0 then return Duel.IsExistingMatchingCard(Card.IsDiscardable,tp,LOCATION_HAND,0,1,e:GetHandler()) end
Duel.DiscardHand(tp,Card.IsDiscardable,1,1,REASON_COST+REASON_DISCARD)
end
function c74563019.thfilter(c)
return c:IsSetCard(0x177) and c:IsType(TYPE_SPELL) and c:IsAbleToHand()
end
function c74563019.thtgs(e,tp,eg,ep,ev,re,r,rp,chk)
if chk==0 then return Duel.IsExistingMatchingCard(c74563019.thfilter,tp,LOCATION_DECK,0,2,nil) end
Duel.SetOperationInfo(0,CATEGORY_TOHAND,nil,1,tp,LOCATION_DECK)
end
function c74563019.thops(e,tp,eg,ep,ev,re,r,rp)
Duel.Hint(HINT_SELECTMSG,tp,HINTMSG_ATOHAND)
local g=Duel.SelectMatchingCard(tp,c74563019.thfilter,tp,LOCATION_DECK,0,2,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
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