Commit 99248f29 authored by POLYMER's avatar POLYMER

fix

parent 67572809
......@@ -2055,7 +2055,7 @@
88888002 1
98920576 1
88880225 2
88897017 2
88897017 0
#230507
25000035 0
33330093 0
......@@ -2334,9 +2334,6 @@
14010120 2
25800018 2
#230108
60000101 0
60000103 0
60000104 0
65000000 0
65020212 0
99922020 0
......@@ -5182,7 +5179,7 @@
6100010 0
6100013 0
10133001 0
11630223 1
11630223 0
22060010 0
40010814 0
82209003 0
......@@ -5205,6 +5202,12 @@
98940045 0
98941043 0
98941048 0
115007 0
10105659 0
11561024 0
14010014 0
33330078 0
88880235 0
#limit
33403513 1
82204250 1
......@@ -5442,6 +5445,9 @@
40009748 1
98920592 1
98920664 1
11451654 1
11451733 1
87697574 1
#semi limit
9950623 2
9950045 2
......@@ -5466,6 +5472,8 @@
33700405 2
117960683 0
9950742 2
72410620 2
72421540 2
#Forbidden TCG
##MAIN DECK MONSTERS
94689206 0 --Block Dragon
......@@ -6334,6 +6342,7 @@
14000706 0
53587967 0
14000973 0
31400007 0
!THE WILDEST LIST
#forbidden
44910027 0
......@@ -8011,7 +8020,7 @@
33330024 0
33330048 0
33330076 1
33330078 2
33330078 0
33330092 0
33330093 1
33330102 0
......
No preview for this file type
......@@ -85,6 +85,7 @@ function cm.chainlm(e,rp,tp)
return tp==rp
end
function cm.sumcostfilter1(c)
local tp=c:GetControler()
return c:IsSetCard(0x20b5) and c:IsType(TYPE_MONSTER) and c:IsAbleToRemoveAsCost() and Duel.IsExistingMatchingCard(cm.sumcostfilter2,tp,LOCATION_DECK,0,1,c)
end
function cm.sumcostfilter2(c)
......
......@@ -17,7 +17,7 @@ function c49811180.initial_effect(c)
e1:SetRange(LOCATION_PZONE)
e1:SetCondition(c49811180.imcon)
e1:SetTargetRange(LOCATION_MZONE,0)
e1:SetTarget(aux.TargetBoolFunction(Card.IsSetCard,1))
e1:SetTarget(aux.TargetBoolFunction(Card.IsSetCard,0x1))
e1:SetValue(c49811180.indval)
c:RegisterEffect(e1)
--immune effect
......@@ -27,7 +27,7 @@ function c49811180.initial_effect(c)
e2:SetRange(LOCATION_PZONE)
e1:SetCondition(c49811180.imcon)
e2:SetTargetRange(LOCATION_MZONE,0)
e2:SetTarget(aux.TargetBoolFunction(Card.IsSetCard,1))
e2:SetTarget(aux.TargetBoolFunction(Card.IsSetCard,0x1))
e2:SetValue(c49811180.efilter)
c:RegisterEffect(e2)
--spsummon
......@@ -72,7 +72,7 @@ function c49811180.sdcon(e)
and not Duel.IsExistingMatchingCard(Card.IsFacedown,e:GetHandlerPlayer(),0,LOCATION_ONFIELD,1,nil)
end
function c49811180.imfilter(c)
return c:IsSetCard(1) and c:IsType(TYPE_SYNCHRO) and c:IsFaceup()
return c:IsSetCard(0x1) and c:IsType(TYPE_SYNCHRO) and c:IsFaceup()
end
function c49811180.imcon(e)
return Duel.IsExistingMatchingCard(c49811180.imfilter,e:GetHandlerPlayer(),LOCATION_MZONE,0,1,nil)
......@@ -84,7 +84,7 @@ function c49811180.efilter(e,te)
return te:GetHandler():IsAttribute(ATTRIBUTE_LIGHT) and te:IsActiveType(TYPE_MONSTER)
end
function c49811180.cfilter(c)
return c:IsSetCard(1) and not c:IsPublic()
return c:IsSetCard(0x1) and not c:IsPublic()
end
function c49811180.spcost(e,tp,eg,ep,ev,re,r,rp,chk)
if chk==0 then return Duel.IsExistingMatchingCard(c49811180.cfilter,tp,LOCATION_HAND,0,1,e:GetHandler()) end
......@@ -104,11 +104,11 @@ function c49811180.spop(e,tp,eg,ep,ev,re,r,rp)
if c:IsRelateToEffect(e) then Duel.SpecialSummon(c,0,tp,tp,false,false,POS_FACEUP) end
end
function c49811180.filter(c,e,sp)
return c:IsSetCard(1) and c:IsCanBeSpecialSummoned(e,0,sp,false,false)
return c:IsSetCard(0x1) and c:IsCanBeSpecialSummoned(e,0,sp,false,false)
end
function c49811180.dsptg(e,tp,eg,ep,ev,re,r,rp,chk)
if chk==0 then return Duel.GetLocationCount(tp,LOCATION_MZONE)>0
and Duel.IsExistingMatchingCard(c49811180.filter,tp,LOCATION_DECK,0,1,nil,e,tp) end
and Duel.IsExistingMatchingCard(c49811180.filter,tp,LOCATION_DECK,0,1,nil,e,tp) and (Duel.CheckLocation(tp,LOCATION_PZONE,0) or Duel.CheckLocation(tp,LOCATION_PZONE,1)) end
Duel.SetOperationInfo(0,CATEGORY_SPECIAL_SUMMON,nil,1,tp,LOCATION_DECK)
end
function c49811180.dspop(e,tp,eg,ep,ev,re,r,rp)
......
......@@ -22,7 +22,7 @@ function c49811184.initial_effect(c)
c:RegisterEffect(e2)
--destroy
local e3=Effect.CreateEffect(c)
e3:SetCategory(CATEGORY_DESTROY+CATEGORY_DRAW)
e3:SetCategory(CATEGORY_DESTROY)
e3:SetDescription(aux.Stringid(49811184,2))
e3:SetProperty(EFFECT_FLAG_CARD_TARGET)
e3:SetType(EFFECT_TYPE_QUICK_O)
......
......@@ -7,7 +7,7 @@ function s.initial_effect(c)
--search
local e1=Effect.CreateEffect(c)
e1:SetDescription(aux.Stringid(id,2))
e1:SetCategory(CATEGORY_TOHAND+CATEGORY_SEARCH+CATEGORY_REMOVE)
e1:SetCategory(CATEGORY_TOHAND+CATEGORY_SEARCH)
e1:SetType(EFFECT_TYPE_SINGLE+EFFECT_TYPE_TRIGGER_O)
e1:SetProperty(EFFECT_FLAG_DELAY)
e1:SetCode(EVENT_SPSUMMON_SUCCESS)
......
--端午节的萤草
function c8709001.initial_effect(c)
--search
local e1=Effect.CreateEffect(c)
e1:SetType(EFFECT_TYPE_IGNITION)
e1:SetRange(LOCATION_HAND)
e1:SetCountLimit(1,8709001)
e1:SetCost(c8709001.cost)
e1:SetTarget(c8709001.target)
e1:SetOperation(c8709001.operation)
c:RegisterEffect(e1)
--to hand
local e3=Effect.CreateEffect(c)
e3:SetDescription(aux.Stringid(8709001,1))
e3:SetCategory(CATEGORY_TOHAND)
e3:SetType(EFFECT_TYPE_IGNITION)
e3:SetRange(LOCATION_GRAVE)
e3:SetCountLimit(1,8809001)
e3:SetCost(c8709001.thcost2)
e3:SetTarget(c8709001.thtg2)
e3:SetOperation(c8709001.thop2)
c:RegisterEffect(e3)
end
function c8709001.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 c8709001.filter(c)
return c:IsSetCard(0xafa) and c:IsType(TYPE_MONSTER) and not c:IsForbidden()
end
function c8709001.target(e,tp,eg,ep,ev,re,r,rp,chk)
if chk==0 then return Duel.IsExistingMatchingCard(c8709001.filter,tp,LOCATION_DECK+LOCATION_GRAVE,0,1,nil)
and Duel.GetLocationCount(tp,LOCATION_SZONE)>0 end
end
function c8709001.operation(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 g=Duel.SelectMatchingCard(tp,aux.NecroValleyFilter(c8709001.filter),tp,LOCATION_DECK+LOCATION_GRAVE,0,1,1,nil)
local tc=g:GetFirst()
if tc then
Duel.MoveToField(tc,tp,tp,LOCATION_SZONE,POS_FACEUP,true)
local e1=Effect.CreateEffect(e:GetHandler())
e1:SetCode(EFFECT_CHANGE_TYPE)
e1:SetType(EFFECT_TYPE_SINGLE)
e1:SetProperty(EFFECT_FLAG_CANNOT_DISABLE)
e1:SetReset(RESET_EVENT+RESETS_STANDARD-RESET_TURN_SET)
e1:SetValue(TYPE_SPELL+TYPE_CONTINUOUS)
tc:RegisterEffect(e1)
end
end
function c8709001.thcost2(e,tp,eg,ep,ev,re,r,rp,chk)
if chk==0 then return Duel.CheckLPCost(tp,1000) end
Duel.PayLPCost(tp,1000)
end
function c8709001.thtg2(e,tp,eg,ep,ev,re,r,rp,chk)
local c=e:GetHandler()
if chk==0 then return c:IsAbleToHand() end
Duel.SetOperationInfo(0,CATEGORY_TOHAND,c,1,0,0)
end
function c8709001.thop2(e,tp,eg,ep,ev,re,r,rp)
local c=e:GetHandler()
if c:IsRelateToEffect(e) then
Duel.SendtoHand(c,nil,REASON_EFFECT)
end
end
--端午节的数珠
function c8709002.initial_effect(c)
--tohand
local e1=Effect.CreateEffect(c)
e1:SetDescription(aux.Stringid(8709002,0))
e1:SetCategory(CATEGORY_TOHAND+CATEGORY_SEARCH)
e1:SetType(EFFECT_TYPE_IGNITION)
e1:SetRange(LOCATION_HAND)
e1:SetProperty(EFFECT_FLAG_PLAYER_TARGET)
e1:SetCountLimit(1,8709002)
e1:SetCost(c8709002.thcost)
e1:SetTarget(c8709002.thtg)
e1:SetOperation(c8709002.thop)
c:RegisterEffect(e1)
--set
local e2=Effect.CreateEffect(c)
e2:SetDescription(aux.Stringid(8709002,1))
e2:SetType(EFFECT_TYPE_QUICK_O)
e2:SetCode(EVENT_FREE_CHAIN)
e2:SetHintTiming(0,TIMINGS_CHECK_MONSTER+TIMING_MAIN_END)
e2:SetRange(LOCATION_GRAVE)
e2:SetCountLimit(1,8809002)
e2:SetCost(c8709002.spcost)
e2:SetTarget(c8709002.sptg)
e2:SetOperation(c8709002.spop)
c:RegisterEffect(e2)
end
function c8709002.thcost(e,tp,eg,ep,ev,re,r,rp,chk)
if chk==0 then return e:GetHandler():IsDiscardable() end
Duel.SendtoGrave(e:GetHandler(),REASON_COST+REASON_DISCARD)
end
function c8709002.thfilter(c)
return c:IsSetCard(0xafa) and c:IsAbleToHand()
end
function c8709002.thtg(e,tp,eg,ep,ev,re,r,rp,chk)
if chk==0 then return Duel.IsExistingMatchingCard(c8709002.thfilter,tp,LOCATION_DECK,0,1,nil) end
Duel.SetOperationInfo(0,CATEGORY_TOHAND,nil,1,tp,LOCATION_DECK)
end
function c8709002.thop(e,tp,eg,ep,ev,re,r,rp)
Duel.Hint(HINT_SELECTMSG,tp,HINTMSG_ATOHAND)
local g=Duel.SelectMatchingCard(tp,c8709002.thfilter,tp,LOCATION_DECK,0,1,1,nil)
if g:GetCount()>0 then
Duel.SendtoHand(g,nil,REASON_EFFECT)
Duel.ConfirmCards(1-tp,g)
end
end
function c8709002.spcost(e,tp,eg,ep,ev,re,r,rp,chk)
if chk==0 then return e:GetHandler():IsAbleToDeckAsCost() and Duel.CheckLPCost(tp,1000) end
Duel.SendtoDeck(e:GetHandler(),nil,2,REASON_COST)
Duel.PayLPCost(tp,1000)
end
function c8709002.filter(c)
return c:IsSetCard(0xafa) and c:IsType(TYPE_MONSTER) and not c:IsForbidden()
end
function c8709002.sptg(e,tp,eg,ep,ev,re,r,rp,chk)
if chk==0 then return Duel.IsExistingMatchingCard(c8709002.filter,tp,LOCATION_HAND,0,1,nil)
and Duel.GetLocationCount(tp,LOCATION_SZONE)>0 end
end
function c8709002.spop(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 g=Duel.SelectMatchingCard(tp,aux.NecroValleyFilter(c8709002.filter),tp,LOCATION_HAND,0,1,1,nil)
local tc=g:GetFirst()
if tc then
Duel.MoveToField(tc,tp,tp,LOCATION_SZONE,POS_FACEUP,true)
local e1=Effect.CreateEffect(e:GetHandler())
e1:SetCode(EFFECT_CHANGE_TYPE)
e1:SetType(EFFECT_TYPE_SINGLE)
e1:SetProperty(EFFECT_FLAG_CANNOT_DISABLE)
e1:SetReset(RESET_EVENT+RESETS_STANDARD-RESET_TURN_SET)
e1:SetValue(TYPE_SPELL+TYPE_CONTINUOUS)
tc:RegisterEffect(e1)
end
end
--端午节的兔丸
function c8709003.initial_effect(c)
--Activate
local e1=Effect.CreateEffect(c)
e1:SetDescription(aux.Stringid(8709003,0))
e1:SetCategory(CATEGORY_SPECIAL_SUMMON)
e1:SetProperty(EFFECT_FLAG_CARD_TARGET)
e1:SetType(EFFECT_TYPE_IGNITION)
e1:SetRange(LOCATION_HAND)
e1:SetCountLimit(1,8709003)
e1:SetCost(c8709003.thcost)
e1:SetTarget(c8709003.target)
e1:SetOperation(c8709003.activate)
c:RegisterEffect(e1)
--reflect
local e2=Effect.CreateEffect(c)
e2:SetType(EFFECT_TYPE_FIELD)
e2:SetRange(LOCATION_SZONE)
e2:SetTargetRange(LOCATION_MZONE,0)
e2:SetCode(EFFECT_REFLECT_BATTLE_DAMAGE)
e2:SetTarget(c8709003.reftg)
e2:SetValue(1)
c:RegisterEffect(e2)
end
function c8709003.thcost(e,tp,eg,ep,ev,re,r,rp,chk)
if chk==0 then return e:GetHandler():IsDiscardable() end
Duel.SendtoGrave(e:GetHandler(),REASON_COST+REASON_DISCARD)
end
function c8709003.filter(c,e,tp)
return c:IsFaceup() and c:IsSetCard(0xafa) and c:GetSequence()<5 and c:IsCanBeSpecialSummoned(e,0,tp,false,false)
end
function c8709003.target(e,tp,eg,ep,ev,re,r,rp,chk,chkc)
if chkc then return chkc:IsControler(tp) and chkc:IsLocation(LOCATION_SZONE) and c8709003.filter(chkc,e,tp) end
if chk==0 then return Duel.GetLocationCount(tp,LOCATION_MZONE)>0
and Duel.IsExistingTarget(c8709003.filter,tp,LOCATION_SZONE,0,1,nil,e,tp) end
Duel.Hint(HINT_SELECTMSG,tp,HINTMSG_SPSUMMON)
local g=Duel.SelectTarget(tp,c8709003.filter,tp,LOCATION_SZONE,0,1,1,nil,e,tp)
Duel.SetOperationInfo(0,CATEGORY_SPECIAL_SUMMON,g,1,0,0)
end
function c8709003.activate(e,tp,eg,ep,ev,re,r,rp)
local tc=Duel.GetFirstTarget()
if tc:IsRelateToEffect(e) then
Duel.SpecialSummon(tc,0,tp,tp,false,false,POS_FACEUP)
end
end
function c8709003.reftg(e,c)
return c:IsSetCard(0xafa)
end
--端午节的虫师
function c8709004.initial_effect(c)
--todeck
local e1=Effect.CreateEffect(c)
e1:SetDescription(aux.Stringid(8709004,0))
e1:SetCategory(CATEGORY_TODECK)
e1:SetType(EFFECT_TYPE_SINGLE+EFFECT_TYPE_TRIGGER_F)
e1:SetCode(EVENT_SPSUMMON_SUCCESS)
e1:SetProperty(EFFECT_FLAG_DELAY)
e1:SetCountLimit(1,8709004)
e1:SetCondition(c8709004.descon)
e1:SetTarget(c8709004.destg)
e1:SetOperation(c8709004.desop)
c:RegisterEffect(e1)
--destroy
local e2=Effect.CreateEffect(c)
e2:SetDescription(aux.Stringid(8709004,0))
e2:SetCategory(CATEGORY_DESTROY)
e2:SetType(EFFECT_TYPE_QUICK_O)
e2:SetProperty(EFFECT_FLAG_CARD_TARGET)
e2:SetCode(EVENT_FREE_CHAIN)
e2:SetHintTiming(0,TIMING_END_PHASE+TIMING_EQUIP)
e2:SetRange(LOCATION_SZONE)
e2:SetCountLimit(1)
e2:SetCost(c8709004.cost)
e2:SetTarget(c8709004.target)
e2:SetOperation(c8709004.operation)
c:RegisterEffect(e2)
end
function c8709004.descon(e,tp,eg,ep,ev,re,r,rp)
local c=e:GetHandler()
return c:IsPreviousLocation(LOCATION_SZONE) and c:GetPreviousSequence()<5
end
function c8709004.desfilter(c)
return (c:IsFacedown() or not c:IsSetCard(0xafa)) and c:IsType(TYPE_SPELL+TYPE_TRAP)
end
function c8709004.destg(e,tp,eg,ep,ev,re,r,rp,chk)
if chk==0 then return Duel.IsExistingMatchingCard(c8709004.desfilter,tp,LOCATION_ONFIELD,LOCATION_ONFIELD,1,nil) end
local g=Duel.GetMatchingGroup(c8709004.desfilter,tp,LOCATION_ONFIELD,LOCATION_ONFIELD,nil)
Duel.SetOperationInfo(0,CATEGORY_TODECK,g,g:GetCount(),0,0)
end
function c8709004.desop(e,tp,eg,ep,ev,re,r,rp)
local g=Duel.GetMatchingGroup(c8709004.desfilter,tp,LOCATION_ONFIELD,LOCATION_ONFIELD,nil)
if g:GetCount()>0 then
Duel.SendtoDeck(g,nil,2,REASON_EFFECT)
end
end
function c8709004.cost(e,tp,eg,ep,ev,re,r,rp,chk)
if chk==0 then return Duel.CheckLPCost(tp,1000) end
Duel.PayLPCost(tp,1000)
end
function c8709004.target(e,tp,eg,ep,ev,re,r,rp,chk,chkc)
if chkc then return chkc:IsOnField() and chkc:IsType(TYPE_SPELL+TYPE_TRAP) end
if chk==0 then return Duel.IsExistingTarget(Card.IsType,tp,0,LOCATION_ONFIELD,1,nil,TYPE_SPELL+TYPE_TRAP) end
Duel.Hint(HINT_SELECTMSG,tp,HINTMSG_DESTROY)
local g=Duel.SelectTarget(tp,Card.IsType,tp,0,LOCATION_ONFIELD,1,1,nil,TYPE_SPELL+TYPE_TRAP)
Duel.SetOperationInfo(0,CATEGORY_DESTROY,g,1,0,0)
end
function c8709004.operation(e,tp,eg,ep,ev,re,r,rp)
local tc=Duel.GetFirstTarget()
if tc:IsRelateToEffect(e) then
Duel.Destroy(tc,REASON_EFFECT)
end
end
--端午节的小袖之手
function c8709005.initial_effect(c)
--DES
local e1=Effect.CreateEffect(c)
e1:SetDescription(aux.Stringid(8709005,0))
e1:SetCategory(CATEGORY_TODECK)
e1:SetType(EFFECT_TYPE_SINGLE+EFFECT_TYPE_TRIGGER_F)
e1:SetCode(EVENT_SPSUMMON_SUCCESS)
e1:SetProperty(EFFECT_FLAG_DELAY)
e1:SetCountLimit(1,8709005)
e1:SetCondition(c8709005.descon)
e1:SetTarget(c8709005.destg)
e1:SetOperation(c8709005.desop)
c:RegisterEffect(e1)
--disable
local e4=Effect.CreateEffect(c)
e4:SetType(EFFECT_TYPE_FIELD+EFFECT_TYPE_CONTINUOUS)
e4:SetCode(EVENT_CHAIN_SOLVING)
e4:SetRange(LOCATION_SZONE)
e4:SetCondition(c8709005.discon)
e4:SetOperation(c8709005.disop)
c:RegisterEffect(e4)
end
function c8709005.descon(e,tp,eg,ep,ev,re,r,rp)
local c=e:GetHandler()
return c:IsPreviousLocation(LOCATION_SZONE) and c:GetPreviousSequence()<5
end
function c8709005.desfilter(c)
return (c:IsFacedown() or not c:IsSetCard(0xafa)) and c:IsType(TYPE_MONSTER)
end
function c8709005.destg(e,tp,eg,ep,ev,re,r,rp,chk)
if chk==0 then return Duel.IsExistingMatchingCard(c8709005.desfilter,tp,LOCATION_ONFIELD,LOCATION_ONFIELD,1,nil) end
local g=Duel.GetMatchingGroup(c8709005.desfilter,tp,LOCATION_ONFIELD,LOCATION_ONFIELD,nil)
Duel.SetOperationInfo(0,CATEGORY_DESTROY,g,g:GetCount(),0,0)
end
function c8709005.desop(e,tp,eg,ep,ev,re,r,rp)
local g=Duel.GetMatchingGroup(c8709005.desfilter,tp,LOCATION_ONFIELD,LOCATION_ONFIELD,nil)
if g:GetCount()>0 then
Duel.Destroy(g,REASON_EFFECT)
end
end
function c8709005.cfilter(c,seq2)
local seq1=aux.MZoneSequence(c:GetSequence())
return c:IsFaceup() and c:IsSetCard(0xafa) and seq1==4-seq2
end
function c8709005.discon(e,tp,eg,ep,ev,re,r,rp)
local loc,seq=Duel.GetChainInfo(ev,CHAININFO_TRIGGERING_LOCATION,CHAININFO_TRIGGERING_SEQUENCE)
seq=aux.MZoneSequence(seq)
return rp==1-tp and re:IsActiveType(TYPE_MONSTER) and loc==LOCATION_MZONE
and Duel.IsExistingMatchingCard(c8709005.cfilter,tp,LOCATION_MZONE,0,1,nil,seq)
end
function c8709005.disop(e,tp,eg,ep,ev,re,r,rp)
Duel.Hint(HINT_CARD,0,8709005)
Duel.NegateEffect(ev)
end
--端午节的三尾狐
function c8709006.initial_effect(c)
--spsummon1
local e1=Effect.CreateEffect(c)
e1:SetDescription(aux.Stringid(8709006,0))
e1:SetCategory(CATEGORY_SPECIAL_SUMMON)
e1:SetType(EFFECT_TYPE_IGNITION)
e1:SetRange(LOCATION_HAND)
e1:SetCountLimit(1,8709006)
e1:SetCondition(c8709006.spcon1)
e1:SetTarget(c8709006.sptg1)
e1:SetOperation(c8709006.spop1)
c:RegisterEffect(e1)
--set
local e2=Effect.CreateEffect(c)
e2:SetType(EFFECT_TYPE_QUICK_O)
e2:SetCode(EVENT_FREE_CHAIN)
e2:SetHintTiming(0,TIMINGS_CHECK_MONSTER+TIMING_MAIN_END)
e2:SetRange(LOCATION_MZONE)
e2:SetProperty(EFFECT_FLAG_CARD_TARGET)
e2:SetCountLimit(1,8809006)
e2:SetCost(c8709006.cost)
e2:SetTarget(c8709006.target)
e2:SetOperation(c8709006.operation)
c:RegisterEffect(e2)
--atk
local e4=Effect.CreateEffect(c)
e4:SetType(EFFECT_TYPE_FIELD)
e4:SetCode(EFFECT_UPDATE_ATTACK)
e4:SetRange(LOCATION_SZONE)
e4:SetTargetRange(LOCATION_MZONE,0)
e4:SetTarget(aux.TargetBoolFunction(Card.IsSetCard,0xafa))
e4:SetValue(c8709006.value)
c:RegisterEffect(e4)
local e3=e4:Clone()
e3:SetCode(EFFECT_UPDATE_DEFENSE)
c:RegisterEffect(e3)
end
function c8709006.cfilter(c)
return c:IsFaceup() and c:IsSetCard(0xafa) and c:IsType(TYPE_MONSTER)
end
function c8709006.spcon1(e,tp,eg,ep,ev,re,r,rp)
return Duel.IsExistingMatchingCard(c8709006.cfilter,tp,LOCATION_MZONE,0,1,nil)
end
function c8709006.sptg1(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 c8709006.spop1(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 c8709006.cost(e,tp,eg,ep,ev,re,r,rp,chk)
if chk==0 then return Duel.CheckLPCost(tp,1000) end
Duel.PayLPCost(tp,1000)
end
function c8709006.filter(c)
return c:IsSetCard(0xafa) and c:IsType(TYPE_MONSTER) and not c:IsForbidden()
end
function c8709006.target(e,tp,eg,ep,ev,re,r,rp,chk)
if chk==0 then return Duel.IsExistingMatchingCard(c8709006.filter,tp,LOCATION_GRAVE,0,1,nil)
and Duel.GetLocationCount(tp,LOCATION_SZONE)>0 end
end
function c8709006.operation(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 g=Duel.SelectMatchingCard(tp,aux.NecroValleyFilter(c8709006.filter),tp,LOCATION_GRAVE,0,1,1,nil)
local tc=g:GetFirst()
if tc then
Duel.MoveToField(tc,tp,tp,LOCATION_SZONE,POS_FACEUP,true)
local e1=Effect.CreateEffect(e:GetHandler())
e1:SetCode(EFFECT_CHANGE_TYPE)
e1:SetType(EFFECT_TYPE_SINGLE)
e1:SetProperty(EFFECT_FLAG_CANNOT_DISABLE)
e1:SetReset(RESET_EVENT+RESETS_STANDARD-RESET_TURN_SET)
e1:SetValue(TYPE_SPELL+TYPE_CONTINUOUS)
tc:RegisterEffect(e1)
end
end
function c8709006.atkfilter(c)
return c:IsFaceup() and c:IsSetCard(0xafa)
end
function c8709006.value(e,c)
return Duel.GetMatchingGroupCount(c8709006.atkfilter,0,LOCATION_ONFIELD,LOCATION_ONFIELD,nil)*300
end
--端午节的龙舟湖
function c8709007.initial_effect(c)
--activate
local e1=Effect.CreateEffect(c)
e1:SetType(EFFECT_TYPE_ACTIVATE)
e1:SetCode(EVENT_FREE_CHAIN)
c:RegisterEffect(e1)
--SearchCard
local e2=Effect.CreateEffect(c)
e2:SetDescription(aux.Stringid(8709007,0))
e2:SetCategory(CATEGORY_TOHAND+CATEGORY_SEARCH)
e2:SetType(EFFECT_TYPE_IGNITION)
e2:SetRange(LOCATION_FZONE)
e2:SetCountLimit(1,8709007)
e2:SetCondition(c8709007.spcon)
e2:SetTarget(c8709007.sptg)
e2:SetOperation(c8709007.spop)
c:RegisterEffect(e2)
--indes
local e4=Effect.CreateEffect(c)
e4:SetType(EFFECT_TYPE_FIELD)
e4:SetCode(EFFECT_INDESTRUCTABLE_EFFECT)
e4:SetRange(LOCATION_FZONE)
e4:SetTargetRange(LOCATION_MZONE,0)
e4:SetTarget(aux.TargetBoolFunction(Card.IsSetCard,0xafa))
e4:SetValue(aux.indoval)
c:RegisterEffect(e4)
--cannot be target
local e5=Effect.CreateEffect(c)
e5:SetType(EFFECT_TYPE_FIELD)
e5:SetProperty(EFFECT_FLAG_IGNORE_IMMUNE)
e5:SetCode(EFFECT_CANNOT_BE_EFFECT_TARGET)
e5:SetRange(LOCATION_FZONE)
e5:SetTargetRange(LOCATION_MZONE,0)
e5:SetTarget(aux.TargetBoolFunction(Card.IsSetCard,0xafa))
e5:SetValue(aux.tgoval)
c:RegisterEffect(e5)
--Cost Change
local e8=Effect.CreateEffect(c)
e8:SetType(EFFECT_TYPE_FIELD)
e8:SetCode(EFFECT_LPCOST_CHANGE)
e8:SetProperty(EFFECT_FLAG_PLAYER_TARGET)
e8:SetRange(LOCATION_FZONE)
e8:SetTargetRange(1,0)
e8:SetValue(c8709007.costchange)
c:RegisterEffect(e8)
end
function c8709007.spcon(e,tp,eg,ep,ev,re,r,rp)
return Duel.GetFieldGroupCount(tp,LOCATION_MZONE,0)==0
end
function c8709007.thfilter(c)
return c:IsSetCard(0xafa) and c:IsType(TYPE_MONSTER) and c:IsAbleToHand()
end
function c8709007.sptg(e,tp,eg,ep,ev,re,r,rp,chk)
if chk==0 then return Duel.IsExistingMatchingCard(c8709007.thfilter,tp,LOCATION_DECK,0,1,nil) end
Duel.SetOperationInfo(0,CATEGORY_TOHAND,nil,1,tp,LOCATION_DECK)
end
function c8709007.spop(e,tp,eg,ep,ev,re,r,rp)
Duel.Hint(HINT_SELECTMSG,tp,HINTMSG_ATOHAND)
local g=Duel.SelectMatchingCard(tp,c8709007.thfilter,tp,LOCATION_DECK,0,1,1,nil)
if g:GetCount()>0 then
Duel.SendtoHand(g,nil,REASON_EFFECT)
Duel.ConfirmCards(1-tp,g)
end
end
function c8709007.costchange(e,re,rp,val)
if re and re:IsHasType(0xafa) and re:GetHandler():IsType(TYPE_MONSTER) then
return 0
else
return val
end
end
--端午节的觉醒兔丸
function c8709008.initial_effect(c)
--xyz summon
aux.AddXyzProcedure(c,nil,3,2,c8709008.ovfilter,aux.Stringid(8709008,0),2,c8709008.xyzop)
c:EnableReviveLimit()
--atk
local e1=Effect.CreateEffect(c)
e1:SetType(EFFECT_TYPE_SINGLE)
e1:SetCode(EFFECT_UPDATE_ATTACK)
e1:SetProperty(EFFECT_FLAG_SINGLE_RANGE)
e1:SetRange(LOCATION_MZONE)
e1:SetValue(c8709008.atkval)
c:RegisterEffect(e1)
local e2=e1:Clone()
e2:SetCode(EFFECT_UPDATE_DEFENSE)
e2:SetValue(c8709008.defval)
c:RegisterEffect(e2)
--special summon
local e3=Effect.CreateEffect(c)
e3:SetDescription(aux.Stringid(8709008,1))
e3:SetCategory(CATEGORY_SPECIAL_SUMMON)
e3:SetType(EFFECT_TYPE_QUICK_O)
e3:SetCode(EVENT_FREE_CHAIN)
e3:SetHintTiming(0,TIMINGS_CHECK_MONSTER+TIMING_MAIN_END)
e3:SetRange(LOCATION_MZONE)
e3:SetCountLimit(1)
e3:SetCost(c8709008.spcost1)
e3:SetTarget(c8709008.sptg1)
e3:SetOperation(c8709008.spop1)
c:RegisterEffect(e3)
end
function c8709008.ovfilter(c)
return c:IsFaceup() and c:IsSetCard(0xafa) and not c:IsCode(8709008)
end
function c8709008.xyzop(e,tp,chk)
if chk==0 then return Duel.GetFlagEffect(tp,8709008)==0 end
Duel.RegisterFlagEffect(tp,8709008,RESET_PHASE+PHASE_END,EFFECT_FLAG_OATH,1)
end
function c8709008.atkfilter(c)
return c:IsSetCard(0xafa) and c:GetAttack()>=0
end
function c8709008.atkval(e,c)
local g=e:GetHandler():GetOverlayGroup():Filter(c8709008.atkfilter,nil)
return g:GetSum(Card.GetAttack)
end
function c8709008.deffilter(c)
return c:IsSetCard(0xafa) and c:GetDefense()>=0
end
function c8709008.defval(e,c)
local g=e:GetHandler():GetOverlayGroup():Filter(c8709008.deffilter,nil)
return g:GetSum(Card.GetDefense)
end
function c8709008.spcost1(e,tp,eg,ep,ev,re,r,rp,chk)
if chk==0 then return e:GetHandler():CheckRemoveOverlayCard(tp,1,REASON_COST) end
e:GetHandler():RemoveOverlayCard(tp,1,1,REASON_COST)
end
function c8709008.spfilter1(c,e,tp)
return c:IsSetCard(0xafa) and c:IsCanBeSpecialSummoned(e,0,tp,false,false)
end
function c8709008.sptg1(e,tp,eg,ep,ev,re,r,rp,chk)
if chk==0 then return Duel.GetLocationCount(tp,LOCATION_MZONE)>0
and Duel.IsExistingMatchingCard(c8709008.spfilter1,tp,LOCATION_DECK,0,1,nil,e,tp) end
Duel.SetOperationInfo(0,CATEGORY_SPECIAL_SUMMON,nil,1,tp,LOCATION_DECK)
end
function c8709008.spop1(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,c8709008.spfilter1,tp,LOCATION_DECK,0,1,1,nil,e,tp)
if g:GetCount()>0 then
Duel.SpecialSummon(g,0,tp,tp,false,false,POS_FACEUP)
end
end
--端午节的觉醒萤草
function c8709009.initial_effect(c)
--xyz summon
aux.AddXyzProcedure(c,nil,3,2,c8709009.ovfilter,aux.Stringid(8709009,0),2,c8709009.xyzop)
c:EnableReviveLimit()
--atk
local e1=Effect.CreateEffect(c)
e1:SetType(EFFECT_TYPE_SINGLE)
e1:SetCode(EFFECT_UPDATE_ATTACK)
e1:SetProperty(EFFECT_FLAG_SINGLE_RANGE)
e1:SetRange(LOCATION_MZONE)
e1:SetValue(c8709009.atkval)
c:RegisterEffect(e1)
local e2=e1:Clone()
e2:SetCode(EFFECT_UPDATE_DEFENSE)
e2:SetValue(c8709009.defval)
c:RegisterEffect(e2)
--draw
local e3=Effect.CreateEffect(c)
e3:SetDescription(aux.Stringid(8709009,1))
e3:SetCategory(CATEGORY_TODECK+CATEGORY_DRAW)
e3:SetProperty(EFFECT_FLAG_CARD_TARGET)
e3:SetType(EFFECT_TYPE_IGNITION)
e3:SetRange(LOCATION_MZONE)
e3:SetCountLimit(1)
e3:SetCost(c8709009.spcost1)
e3:SetTarget(c8709009.drtg)
e3:SetOperation(c8709009.drop)
c:RegisterEffect(e3)
end
function c8709009.ovfilter(c)
return c:IsFaceup() and c:IsSetCard(0xafa) and not c:IsCode(8709009)
end
function c8709009.xyzop(e,tp,chk)
if chk==0 then return Duel.GetFlagEffect(tp,8709009)==0 end
Duel.RegisterFlagEffect(tp,8709009,RESET_PHASE+PHASE_END,EFFECT_FLAG_OATH,1)
end
function c8709009.atkfilter(c)
return c:IsSetCard(0xafa) and c:GetAttack()>=0
end
function c8709009.atkval(e,c)
local g=e:GetHandler():GetOverlayGroup():Filter(c8709009.atkfilter,nil)
return g:GetSum(Card.GetAttack)
end
function c8709009.deffilter(c)
return c:IsSetCard(0xafa) and c:GetDefense()>=0
end
function c8709009.defval(e,c)
local g=e:GetHandler():GetOverlayGroup():Filter(c8709009.deffilter,nil)
return g:GetSum(Card.GetDefense)
end
function c8709009.spcost1(e,tp,eg,ep,ev,re,r,rp,chk)
if chk==0 then return e:GetHandler():CheckRemoveOverlayCard(tp,1,REASON_COST) end
e:GetHandler():RemoveOverlayCard(tp,1,1,REASON_COST)
end
function c8709009.tdfilter(c)
return c:IsSetCard(0xafa) and c:IsAbleToDeck()
end
function c8709009.drtg(e,tp,eg,ep,ev,re,r,rp,chk,chkc)
if chkc then return chkc:IsLocation(LOCATION_GRAVE) and chkc:IsControler(tp) and c8709009.tdfilter(chkc) end
if chk==0 then return Duel.IsPlayerCanDraw(tp,1)
and Duel.IsExistingTarget(c8709009.tdfilter,tp,LOCATION_GRAVE,0,3,nil) end
Duel.Hint(HINT_SELECTMSG,tp,HINTMSG_TODECK)
local g=Duel.SelectTarget(tp,c8709009.tdfilter,tp,LOCATION_GRAVE,0,3,3,nil)
Duel.SetOperationInfo(0,CATEGORY_TODECK,g,g:GetCount(),0,0)
Duel.SetOperationInfo(0,CATEGORY_DRAW,nil,0,tp,1)
end
function c8709009.drop(e,tp,eg,ep,ev,re,r,rp)
local tg=Duel.GetChainInfo(0,CHAININFO_TARGET_CARDS):Filter(Card.IsRelateToEffect,nil,e)
if tg:GetCount()<=0 then return end
Duel.SendtoDeck(tg,nil,0,REASON_EFFECT)
local g=Duel.GetOperatedGroup()
if g:IsExists(Card.IsLocation,1,nil,LOCATION_DECK) then Duel.ShuffleDeck(tp) end
local ct=g:FilterCount(Card.IsLocation,nil,LOCATION_DECK+LOCATION_EXTRA)
if ct>0 then
Duel.BreakEffect()
Duel.Draw(tp,1,REASON_EFFECT)
end
end
--端午节的觉醒数珠
function c8709010.initial_effect(c)
--xyz summon
aux.AddXyzProcedure(c,nil,3,2,c8709010.ovfilter,aux.Stringid(8709010,0),2,c8709010.xyzop)
c:EnableReviveLimit()
--atk
local e1=Effect.CreateEffect(c)
e1:SetType(EFFECT_TYPE_SINGLE)
e1:SetCode(EFFECT_UPDATE_ATTACK)
e1:SetProperty(EFFECT_FLAG_SINGLE_RANGE)
e1:SetRange(LOCATION_MZONE)
e1:SetValue(c8709010.atkval)
c:RegisterEffect(e1)
local e2=e1:Clone()
e2:SetCode(EFFECT_UPDATE_DEFENSE)
e2:SetValue(c8709010.defval)
c:RegisterEffect(e2)
--search limit
local e1=Effect.CreateEffect(c)
e1:SetDescription(aux.Stringid(8709010,1))
e1:SetProperty(EFFECT_FLAG_DELAY)
e1:SetType(EFFECT_TYPE_QUICK_O)
e1:SetCode(EVENT_CUSTOM+8709010)
e1:SetRange(LOCATION_MZONE)
e1:SetCountLimit(1,8709010)
e1:SetCondition(c8709010.condition)
e1:SetCost(c8709010.cost)
e1:SetOperation(c8709010.operation)
c:RegisterEffect(e1)
if not c8709010.global_check then
c8709010.global_check=true
local ge1=Effect.CreateEffect(c)
ge1:SetType(EFFECT_TYPE_FIELD+EFFECT_TYPE_CONTINUOUS)
ge1:SetCode(EVENT_TO_HAND)
ge1:SetCondition(c8709010.regcon)
ge1:SetOperation(c8709010.regop)
Duel.RegisterEffect(ge1,0)
end
end
function c8709010.ovfilter(c)
return c:IsFaceup() and c:IsSetCard(0xafa) and not c:IsCode(8709010)
end
function c8709010.xyzop(e,tp,chk)
if chk==0 then return Duel.GetFlagEffect(tp,8709010)==0 end
Duel.RegisterFlagEffect(tp,8709010,RESET_PHASE+PHASE_END,EFFECT_FLAG_OATH,1)
end
function c8709010.atkfilter(c)
return c:IsSetCard(0xafa) and c:GetAttack()>=0
end
function c8709010.atkval(e,c)
local g=e:GetHandler():GetOverlayGroup():Filter(c8709010.atkfilter,nil)
return g:GetSum(Card.GetAttack)
end
function c8709010.deffilter(c)
return c:IsSetCard(0xafa) and c:GetDefense()>=0
end
function c8709010.defval(e,c)
local g=e:GetHandler():GetOverlayGroup():Filter(c8709010.deffilter,nil)
return g:GetSum(Card.GetDefense)
end
function c8709010.cfilter(c,tp)
return c:IsControler(tp) and c:IsPreviousLocation(LOCATION_DECK)
end
function c8709010.regcon(e,tp,eg,ep,ev,re,r,rp)
if Duel.GetCurrentPhase()==PHASE_DRAW then return false end
local v=0
if eg:IsExists(c8709010.cfilter,1,nil,0) then v=v+1 end
if eg:IsExists(c8709010.cfilter,1,nil,1) then v=v+2 end
if v==0 then return false end
e:SetLabel(({0,1,PLAYER_ALL})[v])
return true
end
function c8709010.regop(e,tp,eg,ep,ev,re,r,rp)
Duel.RaiseEvent(eg,EVENT_CUSTOM+8709010,re,r,rp,ep,e:GetLabel())
end
function c8709010.condition(e,tp,eg,ep,ev,re,r,rp)
return ev==1-tp or ev==PLAYER_ALL
end
function c8709010.cost(e,tp,eg,ep,ev,re,r,rp,chk)
if chk==0 then return e:GetHandler():CheckRemoveOverlayCard(tp,1,REASON_COST) end
e:GetHandler():RemoveOverlayCard(tp,1,1,REASON_COST)
end
function c8709010.operation(e,tp,eg,ep,ev,re,r,rp)
local e1=Effect.CreateEffect(e:GetHandler())
e1:SetType(EFFECT_TYPE_FIELD)
e1:SetCode(EFFECT_CANNOT_TO_HAND)
e1:SetProperty(EFFECT_FLAG_PLAYER_TARGET)
e1:SetTargetRange(1,1)
e1:SetTarget(aux.TargetBoolFunction(Card.IsLocation,LOCATION_DECK))
e1:SetReset(RESET_PHASE+PHASE_END)
Duel.RegisterEffect(e1,tp)
local e2=Effect.CreateEffect(e:GetHandler())
e2:SetType(EFFECT_TYPE_FIELD)
e2:SetProperty(EFFECT_FLAG_PLAYER_TARGET)
e2:SetCode(EFFECT_CANNOT_DRAW)
e2:SetReset(RESET_PHASE+PHASE_END)
e2:SetTargetRange(1,1)
Duel.RegisterEffect(e2,tp)
end
--端午节的觉醒虫师
function c8709011.initial_effect(c)
--xyz summon
aux.AddXyzProcedure(c,nil,4,2,c8709011.ovfilter,aux.Stringid(8709011,0),2,c8709011.xyzop)
c:EnableReviveLimit()
--atk
local e1=Effect.CreateEffect(c)
e1:SetType(EFFECT_TYPE_SINGLE)
e1:SetCode(EFFECT_UPDATE_ATTACK)
e1:SetProperty(EFFECT_FLAG_SINGLE_RANGE)
e1:SetRange(LOCATION_MZONE)
e1:SetValue(c8709011.atkval)
c:RegisterEffect(e1)
local e2=e1:Clone()
e2:SetCode(EFFECT_UPDATE_DEFENSE)
e2:SetValue(c8709011.defval)
c:RegisterEffect(e2)
--
local e3=Effect.CreateEffect(c)
e3:SetDescription(aux.Stringid(8709011,1))
e3:SetCategory(CATEGORY_NEGATE+CATEGORY_DESTROY)
e3:SetType(EFFECT_TYPE_QUICK_O)
e3:SetRange(LOCATION_MZONE)
e3:SetCountLimit(1)
e3:SetProperty(EFFECT_FLAG_DAMAGE_STEP+EFFECT_FLAG_DAMAGE_CAL)
e3:SetCode(EVENT_CHAINING)
e3:SetCondition(c8709011.discon)
e3:SetCost(c8709011.discost)
e3:SetTarget(c8709011.distg)
e3:SetOperation(c8709011.disop)
c:RegisterEffect(e3)
end
function c8709011.ovfilter(c)
return c:IsFaceup() and c:IsSetCard(0xafa) and not c:IsCode(8709011)
end
function c8709011.xyzop(e,tp,chk)
if chk==0 then return Duel.GetFlagEffect(tp,8709011)==0 end
Duel.RegisterFlagEffect(tp,8709011,RESET_PHASE+PHASE_END,EFFECT_FLAG_OATH,1)
end
function c8709011.atkfilter(c)
return c:IsSetCard(0xafa) and c:GetAttack()>=0
end
function c8709011.atkval(e,c)
local g=e:GetHandler():GetOverlayGroup():Filter(c8709011.atkfilter,nil)
return g:GetSum(Card.GetAttack)
end
function c8709011.deffilter(c)
return c:IsSetCard(0xafa) and c:GetDefense()>=0
end
function c8709011.defval(e,c)
local g=e:GetHandler():GetOverlayGroup():Filter(c8709011.deffilter,nil)
return g:GetSum(Card.GetDefense)
end
function c8709011.discon(e,tp,eg,ep,ev,re,r,rp)
if e:GetHandler():IsStatus(STATUS_BATTLE_DESTROYED) then return false end
return rp==1-tp and re:IsHasType(EFFECT_TYPE_ACTIVATE) and Duel.IsChainNegatable(ev)
end
function c8709011.discost(e,tp,eg,ep,ev,re,r,rp,chk)
if chk==0 then return e:GetHandler():CheckRemoveOverlayCard(tp,1,REASON_COST) end
e:GetHandler():RemoveOverlayCard(tp,1,1,REASON_COST)
end
function c8709011.distg(e,tp,eg,ep,ev,re,r,rp,chk)
if chk==0 then return true end
Duel.SetOperationInfo(0,CATEGORY_NEGATE,eg,1,0,0)
if re:GetHandler():IsDestructable() and re:GetHandler():IsRelateToEffect(re) then
Duel.SetOperationInfo(0,CATEGORY_DESTROY,eg,1,0,0)
end
end
function c8709011.disop(e,tp,eg,ep,ev,re,r,rp)
if Duel.NegateActivation(ev) and re:GetHandler():IsRelateToEffect(re) then
Duel.Destroy(eg,REASON_EFFECT)
end
end
--端午节的觉醒小袖之手
function c8709012.initial_effect(c)
--xyz summon
aux.AddXyzProcedure(c,nil,4,3,c8709012.ovfilter,aux.Stringid(8709012,0),3,c8709012.xyzop)
c:EnableReviveLimit()
--atk
local e1=Effect.CreateEffect(c)
e1:SetType(EFFECT_TYPE_SINGLE)
e1:SetCode(EFFECT_UPDATE_ATTACK)
e1:SetProperty(EFFECT_FLAG_SINGLE_RANGE)
e1:SetRange(LOCATION_MZONE)
e1:SetValue(c8709012.atkval)
c:RegisterEffect(e1)
local e2=e1:Clone()
e2:SetCode(EFFECT_UPDATE_DEFENSE)
e2:SetValue(c8709012.defval)
c:RegisterEffect(e2)
--disable spsummon
local e3=Effect.CreateEffect(c)
e3:SetDescription(aux.Stringid(8709012,1))
e3:SetCategory(CATEGORY_DISABLE_SUMMON+CATEGORY_DESTROY)
e3:SetType(EFFECT_TYPE_QUICK_O)
e3:SetRange(LOCATION_MZONE)
e3:SetCode(EVENT_SUMMON)
e3:SetCountLimit(1)
e3:SetCondition(c8709012.dscon)
e3:SetCost(c8709012.cost)
e3:SetTarget(c8709012.dstg)
e3:SetOperation(c8709012.dsop)
c:RegisterEffect(e3)
local e4=e3:Clone()
e4:SetCode(EVENT_SPSUMMON)
c:RegisterEffect(e4)
end
function c8709012.ovfilter(c)
return c:IsFaceup() and c:IsSetCard(0xafa) and not c:IsCode(8709012)
end
function c8709012.xyzop(e,tp,chk)
if chk==0 then return Duel.GetFlagEffect(tp,8709012)==0 end
Duel.RegisterFlagEffect(tp,8709012,RESET_PHASE+PHASE_END,EFFECT_FLAG_OATH,1)
end
function c8709012.atkfilter(c)
return c:IsSetCard(0xafa) and c:GetAttack()>=0
end
function c8709012.atkval(e,c)
local g=e:GetHandler():GetOverlayGroup():Filter(c8709012.atkfilter,nil)
return g:GetSum(Card.GetAttack)
end
function c8709012.deffilter(c)
return c:IsSetCard(0xafa) and c:GetDefense()>=0
end
function c8709012.defval(e,c)
local g=e:GetHandler():GetOverlayGroup():Filter(c8709012.deffilter,nil)
return g:GetSum(Card.GetDefense)
end
function c8709012.dscon(e,tp,eg,ep,ev,re,r,rp)
return tp~=ep and Duel.GetCurrentChain()==0
end
function c8709012.cost(e,tp,eg,ep,ev,re,r,rp,chk)
if chk==0 then return e:GetHandler():CheckRemoveOverlayCard(tp,1,REASON_COST) end
e:GetHandler():RemoveOverlayCard(tp,1,1,REASON_COST)
end
function c8709012.dstg(e,tp,eg,ep,ev,re,r,rp,chk)
if chk==0 then return true end
Duel.SetOperationInfo(0,CATEGORY_DISABLE_SUMMON,eg,eg:GetCount(),0,0)
Duel.SetOperationInfo(0,CATEGORY_DESTROY,eg,eg:GetCount(),0,0)
end
function c8709012.dsop(e,tp,eg,ep,ev,re,r,rp)
Duel.NegateSummon(eg)
Duel.Destroy(eg,REASON_EFFECT)
end
--端午节的觉醒三尾狐
function c8709013.initial_effect(c)
--xyz summon
c:EnableReviveLimit()
aux.AddXyzProcedureLevelFree(c,c8709013.mfilter,c8709013.xyzcheck,2,2)
--atk
local e1=Effect.CreateEffect(c)
e1:SetType(EFFECT_TYPE_SINGLE)
e1:SetCode(EFFECT_UPDATE_ATTACK)
e1:SetProperty(EFFECT_FLAG_SINGLE_RANGE)
e1:SetRange(LOCATION_MZONE)
e1:SetValue(c8709013.atkval)
c:RegisterEffect(e1)
local e2=e1:Clone()
e2:SetCode(EFFECT_UPDATE_DEFENSE)
e2:SetValue(c8709013.defval)
c:RegisterEffect(e2)
--Activate
local e3=Effect.CreateEffect(c)
e3:SetDescription(aux.Stringid(8709013,0))
e3:SetCategory(CATEGORY_SPECIAL_SUMMON)
e3:SetProperty(EFFECT_FLAG_CARD_TARGET)
e3:SetType(EFFECT_TYPE_QUICK_O)
e3:SetCode(EVENT_FREE_CHAIN)
e3:SetHintTiming(0,TIMINGS_CHECK_MONSTER+TIMING_MAIN_END)
e3:SetRange(LOCATION_MZONE)
e3:SetCountLimit(1,8709013)
e3:SetCost(c8709013.thcost)
e3:SetTarget(c8709013.target)
e3:SetOperation(c8709013.activate)
c:RegisterEffect(e3)
--
local e4=Effect.CreateEffect(c)
e4:SetDescription(aux.Stringid(8709013,1))
e4:SetCategory(CATEGORY_ATKCHANGE+CATEGORY_DEFCHANGE)
e4:SetType(EFFECT_TYPE_QUICK_O)
e4:SetCode(EVENT_FREE_CHAIN)
e4:SetHintTiming(0,TIMINGS_CHECK_MONSTER+TIMING_MAIN_END)
e4:SetRange(LOCATION_MZONE)
e4:SetCountLimit(1,8809013)
e4:SetCost(c8709013.thcost1)
e4:SetTarget(c8709013.atktg)
e4:SetOperation(c8709013.atkop)
c:RegisterEffect(e4)
end
function c8709013.mfilter(c,xyzc)
return c:IsXyzType(TYPE_XYZ)
end
function c8709013.xyzcheck(g)
return g:GetClassCount(Card.GetRank)==1
end
function c8709013.atkfilter(c)
return c:IsSetCard(0xafa) and c:GetAttack()>=0
end
function c8709013.atkval(e,c)
local g=e:GetHandler():GetOverlayGroup():Filter(c8709013.atkfilter,nil)
return g:GetSum(Card.GetAttack)
end
function c8709013.deffilter(c)
return c:IsSetCard(0xafa) and c:GetDefense()>=0
end
function c8709013.defval(e,c)
local g=e:GetHandler():GetOverlayGroup():Filter(c8709013.deffilter,nil)
return g:GetSum(Card.GetDefense)
end
function c8709013.thcost(e,tp,eg,ep,ev,re,r,rp,chk)
if chk==0 then return Duel.CheckLPCost(tp,1000) end
Duel.PayLPCost(tp,1000)
end
function c8709013.filter(c,e,tp)
return c:IsFaceup() and c:IsSetCard(0xafa) and c:GetSequence()<5 and c:IsCanBeSpecialSummoned(e,0,tp,false,false)
end
function c8709013.target(e,tp,eg,ep,ev,re,r,rp,chk,chkc)
if chkc then return chkc:IsControler(tp) and chkc:IsLocation(LOCATION_SZONE) and c8709013.filter(chkc,e,tp) end
if chk==0 then return Duel.GetLocationCount(tp,LOCATION_MZONE)>0
and Duel.IsExistingTarget(c8709013.filter,tp,LOCATION_SZONE,0,1,nil,e,tp) end
Duel.Hint(HINT_SELECTMSG,tp,HINTMSG_SPSUMMON)
local g=Duel.SelectTarget(tp,c8709013.filter,tp,LOCATION_SZONE,0,1,1,nil,e,tp)
Duel.SetOperationInfo(0,CATEGORY_SPECIAL_SUMMON,g,1,0,0)
end
function c8709013.activate(e,tp,eg,ep,ev,re,r,rp)
local tc=Duel.GetFirstTarget()
if tc:IsRelateToEffect(e) then
Duel.SpecialSummon(tc,0,tp,tp,false,false,POS_FACEUP)
end
end
function c8709013.thcost1(e,tp,eg,ep,ev,re,r,rp,chk)
if chk==0 then return e:GetHandler():CheckRemoveOverlayCard(tp,1,REASON_COST) end
e:GetHandler():RemoveOverlayCard(tp,1,1,REASON_COST)
end
function c8709013.atkfilter(c)
return c:IsFaceup() and c:IsSetCard(0xafa)
end
function c8709013.atktg(e,tp,eg,ep,ev,re,r,rp,chk)
if chk==0 then return Duel.IsExistingMatchingCard(c8709013.atkfilter,tp,LOCATION_ONFIELD,LOCATION_ONFIELD,1,nil)
and Duel.IsExistingMatchingCard(Card.IsFaceup,tp,0,LOCATION_MZONE,1,nil) end
end
function c8709013.atkop(e,tp,eg,ep,ev,re,r,rp)
local ct=Duel.GetMatchingGroupCount(c8709013.atkfilter,tp,LOCATION_ONFIELD,LOCATION_ONFIELD,nil)
local g=Duel.GetMatchingGroup(Card.IsFaceup,tp,0,LOCATION_MZONE,nil)
if ct>0 then
local tc=g:GetFirst()
while tc do
local c=e:GetHandler()
local e1=Effect.CreateEffect(c)
e1:SetType(EFFECT_TYPE_SINGLE)
e1:SetCode(EFFECT_UPDATE_ATTACK)
e1:SetProperty(EFFECT_FLAG_CANNOT_DISABLE)
e1:SetReset(RESET_EVENT+RESETS_STANDARD+RESET_PHASE+PHASE_END)
e1:SetValue(-300*ct)
tc:RegisterEffect(e1)
local e2=e1:Clone()
e2:SetCode(EFFECT_UPDATE_DEFENSE)
tc:RegisterEffect(e2)
tc=g:GetNext()
end
end
end
--端午节的秋意萤草
function c8709014.initial_effect(c)
--draw
local e1=Effect.CreateEffect(c)
e1:SetDescription(aux.Stringid(8709014,0))
e1:SetCategory(CATEGORY_DRAW)
e1:SetType(EFFECT_TYPE_SINGLE+EFFECT_TYPE_TRIGGER_O)
e1:SetCode(EVENT_SPSUMMON_SUCCESS)
e1:SetProperty(EFFECT_FLAG_DELAY)
e1:SetCountLimit(1,8709014)
e1:SetCondition(c8709014.drcon)
e1:SetTarget(c8709014.drtg)
e1:SetOperation(c8709014.drop)
c:RegisterEffect(e1)
end
function c8709014.drcon(e,tp,eg,ep,ev,re,r,rp)
return re and re:GetHandler():IsSetCard(0xafa)
end
function c8709014.drtg(e,tp,eg,ep,ev,re,r,rp,chk)
if chk==0 then return Duel.IsPlayerCanDraw(tp,1) end
Duel.SetTargetPlayer(tp)
Duel.SetTargetParam(1)
Duel.SetOperationInfo(0,CATEGORY_DRAW,nil,0,tp,1)
end
function c8709014.drop(e,tp,eg,ep,ev,re,r,rp)
local p,d=Duel.GetChainInfo(0,CHAININFO_TARGET_PLAYER,CHAININFO_TARGET_PARAM)
Duel.Draw(p,d,REASON_EFFECT)
end
\ No newline at end of file
--端午节的萌意数珠
function c8709015.initial_effect(c)
--draw
local e1=Effect.CreateEffect(c)
e1:SetDescription(aux.Stringid(8709015,0))
e1:SetCategory(CATEGORY_HANDES)
e1:SetType(EFFECT_TYPE_SINGLE+EFFECT_TYPE_TRIGGER_O)
e1:SetCode(EVENT_SPSUMMON_SUCCESS)
e1:SetProperty(EFFECT_FLAG_DELAY)
e1:SetCountLimit(1,8709015)
e1:SetCondition(c8709015.drcon)
e1:SetTarget(c8709015.drtg)
e1:SetOperation(c8709015.drop)
c:RegisterEffect(e1)
end
function c8709015.drcon(e,tp,eg,ep,ev,re,r,rp)
return re and re:GetHandler():IsSetCard(0xafa)
end
function c8709015.drtg(e,tp,eg,ep,ev,re,r,rp,chk)
if chk==0 then return Duel.GetFieldGroupCount(tp,0,LOCATION_HAND)>0 end
Duel.SetOperationInfo(0,CATEGORY_HANDES,nil,0,1-tp,1)
end
function c8709015.drop(e,tp,eg,ep,ev,re,r,rp)
local g=Duel.GetFieldGroup(tp,0,LOCATION_HAND):RandomSelect(tp,1)
Duel.SendtoGrave(g,REASON_EFFECT+REASON_DISCARD)
end
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