Commit f18b6d28 authored by Nemo Ma's avatar Nemo Ma

upd

parent 72d4c29f
......@@ -1706,6 +1706,11 @@
130006037 0
130006038 0
130006039 0
#「闪刀姬」 - 黑莲
75147500 0
75147501 0
75147502 0
75147503 0
#Tears are now in Japari Park Again!
572850 1
4928565 0
......@@ -1722,6 +1727,26 @@
60362066 0
74920585 0
77103950 1
#230806
9300018 0
10105555 0
11451804 0
24094998 0
31421008 0
53796085 0
60002128 0
60002257 0
60002258 0
60002279 0
11451739 1
11451753 1
33330076 1
33730073 1
43990016 1
60002214 1
98920071 1
11561016 2
98920342 2
#230723
11451701 0
79029550 0
......@@ -1785,7 +1810,6 @@
82209081 0
6109001 1
10105552 1
11561016 1
15000604 1
60159943 1
98920192 1
......@@ -1931,7 +1955,6 @@
82228528 0
98920482 0
9910179 1
11451804 1
22348141 1
22348143 1
22348144 1
......@@ -1951,7 +1974,6 @@
98920003 0
98920046 0
98920289 0
98920342 1
98920352 1
98920405 1
98850000 1
......@@ -5549,6 +5571,10 @@
30010000 0
30012000 0
#forbidden
#230806
11560321 0
11560322 0
11560323 0
72100025 0
72100125 0
90700058 0
......@@ -6073,7 +6099,7 @@
90351999 0
#WILDEST
60002192 0
130006110 0
130006110 1
67200810 0
67200812 0
67200814 0
......
No preview for this file type
--终至楼兰
--21.06.20
local m=11451577
local cm=_G["c"..m]
local cm,m=GetID()
function cm.initial_effect(c)
--act in hand
local e0=Effect.CreateEffect(c)
......@@ -11,6 +10,7 @@ function cm.initial_effect(c)
c:RegisterEffect(e0)
--activate
local e1=Effect.CreateEffect(c)
e1:SetHintTiming(TIMING_STANDBY_PHASE)
e1:SetType(EFFECT_TYPE_ACTIVATE)
e1:SetCode(EVENT_FREE_CHAIN)
c:RegisterEffect(e1)
......
......@@ -4278,6 +4278,37 @@ function cm.RabbitTeamspop(e,tp,eg,ep,ev,re,r,rp,c)
local ct=Duel.GetFlagEffect(tp,num)
Duel.ResetFlagEffect(tp,num)
for i=1,ct-1 do Duel.RegisterFlagEffect(tp,num,RESET_PHASE+PHASE_END,0,1) end
local e2=Effect.CreateEffect(c)
e2:SetType(EFFECT_TYPE_FIELD+EFFECT_TYPE_CONTINUOUS)
e2:SetCode(EVENT_SPSUMMON_NEGATED)
e2:SetOperation(cm.RTreset1)
Duel.RegisterEffect(e2,tp)
local e3=Effect.CreateEffect(c)
e3:SetType(EFFECT_TYPE_FIELD+EFFECT_TYPE_CONTINUOUS)
e3:SetCode(EVENT_SPSUMMON_SUCCESS)
e3:SetLabelObject(e2)
e3:SetOperation(cm.RTreset2)
Duel.RegisterEffect(e3,tp)
local e4=Effect.CreateEffect(c)
e4:SetType(EFFECT_TYPE_FIELD+EFFECT_TYPE_CONTINUOUS)
e4:SetCode(EVENT_CUSTOM+53728000)
e4:SetLabelObject(e3)
e4:SetOperation(cm.RTreset3)
Duel.RegisterEffect(e4,tp)
end
function cm.RTreset1(e,tp,eg,ep,ev,re,r,rp)
Duel.ShuffleDeck(tp)
Duel.RaiseEvent(e:GetHandler(),EVENT_CUSTOM+53728000,re,r,rp,ep,ev)
e:Reset()
end
function cm.RTreset2(e,tp,eg,ep,ev,re,r,rp)
Duel.ShuffleDeck(tp)
if e:GetLabelObject() then e:GetLabelObject():Reset() end
e:Reset()
end
function cm.RTreset3(e,tp,eg,ep,ev,re,r,rp)
if e:GetLabelObject() then e:GetLabelObject():Reset() end
e:Reset()
end
function cm.RabbitTeamrecon(e)
local c=e:GetHandler()
......
--加农炮水手
local m=60001209
local cm=_G["c"..m]
cm.name="加农炮水手"
function cm.initial_effect(c)
--direct attack
local e1=Effect.CreateEffect(c)
e1:SetType(EFFECT_TYPE_SINGLE)
e1:SetCode(EFFECT_DIRECT_ATTACK)
c:RegisterEffect(e1)
--draw
local e7=Effect.CreateEffect(c)
e7:SetDescription(aux.Stringid(m,2))
e7:SetCategory(CATEGORY_SEARCH)
e7:SetType(EFFECT_TYPE_SINGLE+EFFECT_TYPE_TRIGGER_O)
e7:SetProperty(EFFECT_FLAG_DELAY)
e7:SetCode(EVENT_TO_GRAVE)
e7:SetCountLimit(1)
e7:SetCondition(cm.drcon)
e7:SetTarget(cm.drtg)
e7:SetOperation(cm.drop)
c:RegisterEffect(e7)
end
cm.named_with_treasure=true
function cm.drcon(e,tp,eg,ep,ev,re,r,rp)
return e:GetHandler():IsPreviousLocation(LOCATION_ONFIELD)
end
function cm.filter(c)
return c:IsCode(60001220) and c:IsAbleToHand()
end
function cm.drtg(e,tp,eg,ep,ev,re,r,rp,chk)
if chk==0 then return Duel.IsExistingMatchingCard(cm.filter,tp,LOCATION_DECK+LOCATION_GRAVE,0,1,nil) end
Duel.SetOperationInfo(0,CATEGORY_TOHAND,nil,1,tp,LOCATION_DECK+LOCATION_GRAVE)
end
function cm.drop(e,tp,eg,ep,ev,re,r,rp)
Duel.Hint(HINT_SELECTMSG,tp,HINTMSG_ATOHAND)
local g=Duel.SelectMatchingCard(tp,cm.filter,tp,LOCATION_DECK+LOCATION_GRAVE,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
--出航的罪人 巴巴洛丝
local m=60001210
local cm=_G["c"..m]
cm.name="出航的罪人 巴巴洛丝"
function cm.initial_effect(c)
--爆能强化
local e3=Effect.CreateEffect(c)
e3:SetDescription(aux.Stringid(m,0))
e3:SetType(EFFECT_TYPE_SINGLE)
e3:SetProperty(EFFECT_FLAG_CANNOT_DISABLE+EFFECT_FLAG_UNCOPYABLE)
e3:SetCode(EFFECT_SUMMON_PROC)
e3:SetCondition(cm.sumcon)
e3:SetOperation(cm.sumop)
e3:SetValue(SUMMON_TYPE_ADVANCE)
c:RegisterEffect(e3)
--进化
local e4=Effect.CreateEffect(c)
e4:SetDescription(aux.Stringid(m,0))
e4:SetCategory(CATEGORY_ATKCHANGE+CATEGORY_DEFCHANGE)
e4:SetType(EFFECT_TYPE_IGNITION)
e4:SetRange(LOCATION_MZONE)
e4:SetCost(cm.drcost)
e4:SetOperation(cm.drop)
c:RegisterEffect(e4)
--入场曲
local e1=Effect.CreateEffect(c)
e1:SetDescription(aux.Stringid(m,0))
e1:SetCategory(CATEGORY_TOHAND+CATEGORY_SEARCH)
e1:SetType(EFFECT_TYPE_TRIGGER_O+EFFECT_TYPE_SINGLE)
e1:SetProperty(EFFECT_FLAG_DELAY)
e1:SetCode(EVENT_SUMMON_SUCCESS)
e1:SetTarget(cm.thtg)
e1:SetOperation(cm.thop)
c:RegisterEffect(e1)
local e2=e1:Clone()
e2:SetCode(EVENT_SPSUMMON_SUCCESS)
c:RegisterEffect(e2)
-- if not cm.global_check then
-- cm.global_check=true
-- local ge1=Effect.CreateEffect(c)
-- ge1:SetType(EFFECT_TYPE_FIELD+EFFECT_TYPE_CONTINUOUS)
-- ge1:SetCode(EVENT_CHAIN_SOLVED)
-- ge1:SetOperation(cm.checkop)
-- Duel.RegisterEffect(ge1,0)
-- end
local e4=Effect.CreateEffect(c)
e4:SetCategory(CATEGORY_TOHAND+CATEGORY_SEARCH)
e4:SetType(EFFECT_TYPE_IGNITION)
e4:SetRange(LOCATION_HAND)
e4:SetCountLimit(1)
e4:SetCost(cm.spcost)
e4:SetCondition(cm.spcon2)
e4:SetTarget(cm.target)
e4:SetOperation(cm.op)
c:RegisterEffect(e4)
end
cm.named_with_treasure=true
function cm.spcost(e,tp,eg,ep,ev,re,r,rp,chk)
local c=e:GetHandler()
local e1=Effect.CreateEffect(c)
e1:SetType(EFFECT_TYPE_SINGLE)
e1:SetCode(EFFECT_PUBLIC)
e1:SetReset(RESET_EVENT+RESETS_STANDARD+RESET_PHASE+PHASE_END+RESET_OPPO_TURN)
c:RegisterEffect(e1)
end
function cm.cfilter(c,tp)
return (c:IsControler(tp) or c:IsFaceup())
end
function cm.sumcon(e,c,minc)
if c==nil then return true end
local min=1
if minc>=1 then min=minc end
local tp=c:GetControler()
local mg=Duel.GetMatchingGroup(cm.cfilter,tp,LOCATION_MZONE,LOCATION_MZONE,nil,tp)
return c:IsLevelAbove(5) and Duel.CheckTribute(c,min,10,mg)
end
function cm.sumop(e,tp,eg,ep,ev,re,r,rp,c,minc)
local min=1
if minc>=1 then min=minc end
local mg=Duel.GetMatchingGroup(cm.cfilter,tp,LOCATION_MZONE,LOCATION_MZONE,nil,tp)
local sg=Duel.SelectTribute(tp,c,min,10,mg)
c:SetMaterial(sg)
Duel.Release(sg,REASON_SUMMON+REASON_MATERIAL)
end
function cm.mgfilter(c,e,tp,fusc)
return bit.band(c:GetReason(),0x12)==0x12 and c:GetReasonCard()==fusc
and (c:IsAbleToDeckAsCost() or c:IsAbleToExtraAsCost())
end
function cm.mgfilter2(c,e,tp,fusc)
return not c:IsDisabled() and c:IsAbleToDeck() and c:IsCode(1231611)
end
function cm.drcost(e,tp,eg,ep,ev,re,r,rp,chk)
local c=e:GetHandler()
local ag=c:GetMaterial()
if chk==0 then return (ag and ag:GetCount()>0 and ag:IsExists(cm.mgfilter,2,nil,e,tp,c))
or Duel.IsExistingMatchingCard(cm.mgfilter2,tp,LOCATION_GRAVE,0,2,nil) end
if not (ag and ag:GetCount()>0 and ag:IsExists(cm.mgfilter,2,nil,e,tp,c)) then
local g=Duel.SelectMatchingCard(tp,cm.mgfilter2,tp,LOCATION_GRAVE,0,2,2,nil)
Duel.SendtoDeck(g,nil,2,REASON_COST)
return
end
if Duel.IsExistingMatchingCard(cm.mgfilter2,tp,LOCATION_GRAVE,0,2,nil)
and Duel.SelectYesNo(tp,aux.Stringid(m,5)) then
local g=Duel.SelectMatchingCard(tp,cm.mgfilter2,tp,LOCATION_GRAVE,0,2,2,nil)
Duel.SendtoDeck(g,nil,2,REASON_COST)
return
end
local dc=ag:FilterSelect(tp,cm.mgfilter,2,2,nil,e,tp,c)
Duel.SendtoDeck(dc,nil,2,REASON_COST)
end
function cm.drop(e,tp,eg,ep,ev,re,r,rp)
local c=e:GetHandler()
if c:IsFaceup() and c:IsRelateToEffect(e) then
local e1=Effect.CreateEffect(c)
e1:SetType(EFFECT_TYPE_SINGLE)
e1:SetCode(EFFECT_SET_BASE_ATTACK)
e1:SetValue(c:GetBaseAttack()*2)
e1:SetReset(RESET_EVENT+RESETS_STANDARD+RESET_DISABLE)
c:RegisterEffect(e1)
local e2=Effect.CreateEffect(c)
e2:SetType(EFFECT_TYPE_SINGLE)
e2:SetCode(EFFECT_SET_BASE_DEFENSE)
e2:SetValue(c:GetBaseDefense()*2)
e2:SetReset(RESET_EVENT+RESETS_STANDARD+RESET_DISABLE)
c:RegisterEffect(e2)
end
local g=Duel.SelectMatchingCard(tp,aux.TRUE,tp,0,LOCATION_ONFIELD,1,1,nil)
if g:GetCount()>0 then
Duel.Destroy(g,REASON_EFFECT)
end
end
--function cm.checkop(e,tp,eg,ep,ev,re,r,rp)
-- for i=1,ev do
-- local te,tgp=Duel.GetChainInfo(i,CHAININFO_TRIGGERING_EFFECT,CHAININFO_TRIGGERING_PLAYER)
-- local w=te:GetHandler()
-- if tgp==tp and w:IsSetCard(0x6a6) then
-- return Duel.RegisterFlagEffect(tp,m,RESET_PHASE+PHASE_END,0,1000)
-- end
-- end
--end
function cm.thfilter(c)
return c:IsCode(60001221) and c:IsAbleToHand()
end
function cm.thtg(e,tp,eg,ep,ev,re,r,rp,chk)
if chk==0 then return Duel.IsExistingMatchingCard(cm.thfilter,tp,LOCATION_DECK+LOCATION_GRAVE,0,1,nil) end
Duel.SetOperationInfo(0,CATEGORY_TOHAND,nil,1,tp,LOCATION_DECK+LOCATION_GRAVE)
if Duel.GetFlagEffect(tp,60001211)>=7 then
if chk==0 then return Duel.IsPlayerCanDraw(tp,2) end
Duel.SetTargetPlayer(tp)
Duel.SetTargetParam(2)
Duel.SetOperationInfo(0,CATEGORY_DRAW,nil,0,tp,2)
end
end
function cm.thop(e,tp,eg,ep,ev,re,r,rp)
Duel.Hint(HINT_SELECTMSG,tp,HINTMSG_ATOHAND)
local g=Duel.SelectMatchingCard(tp,cm.thfilter,tp,LOCATION_DECK+LOCATION_GRAVE,0,1,1,nil)
if g:GetCount()>0 then
Duel.SendtoHand(g,nil,REASON_EFFECT)
Duel.ConfirmCards(1-tp,g)
end
if Duel.GetFlagEffect(tp,60001211)>=7 then
local p,d=Duel.GetChainInfo(0,CHAININFO_TARGET_PLAYER,CHAININFO_TARGET_PARAM)
Duel.Draw(p,d,REASON_EFFECT)
end
end
function cm.spfilter(c,e,tp)
return c:IsSetCard(0x6a6) and Duel.IsPlayerCanSpecialSummonMonster(tp,c:GetCode(),nil,TYPE_MONSTER+TYPE_NORMAL,0,0,0,0,0,POS_FACEDOWN_DEFENSE)
and c:IsCanBeSpecialSummoned(e,0,tp,true,true,POS_FACEUP)
end
function cm.target(e,tp,eg,ep,ev,re,r,rp,chk)
if chk==0 then return Duel.GetLocationCount(tp,LOCATION_MZONE)>1
and Duel.IsExistingMatchingCard(cm.spfilter,tp,LOCATION_HAND,0,1,nil,e,tp)
end
Duel.SetOperationInfo(0,CATEGORY_SPECIAL_SUMMON,nil,1,tp,0)
end
function cm.op(e,tp,eg,ep,ev,re,r,rp)
local c=e:GetHandler()
if chk==0 then return Duel.IsExistingMatchingCard(cm.spfilter,tp,LOCATION_HAND,0,1,nil,e,tp) end
local g=Duel.GetMatchingGroup(cm.spfilter,tp,LOCATION_HAND,0,nil,e,tp)
if g:GetCount()<1 then return end
local sg=g:Select(tp,1,1,nil)
Duel.SpecialSummon(sg,0,tp,tp,true,false,POS_FACEUP)
Duel.RegisterFlagEffect(tp,60001211,RESET_PHASE+PHASE_END,0,1000)
end
function cm.spcon2(e,tp,eg,ep,ev,re,r,rp)
return Duel.GetTurnPlayer()==tp and Duel.GetCurrentChain()==0
end
--亚里沙的小本本
local m=60001211
local cm=_G["c"..m]
function cm.initial_effect(c)
--查询玩家任务进度
local e4=Effect.CreateEffect(c)--融合或使用财宝卡的次数
e4:SetDescription(aux.Stringid(m,0))
e4:SetType(EFFECT_TYPE_FIELD+EFFECT_TYPE_CONTINUOUS)
e4:SetCode(EVENT_FREE_CHAIN)
e4:SetRange(LOCATION_EXTRA)
e4:SetOperation(cm.op1)
c:RegisterEffect(e4)
local e4=Effect.CreateEffect(c)--进化次数
e4:SetDescription(aux.Stringid(m,1))
e4:SetType(EFFECT_TYPE_FIELD+EFFECT_TYPE_CONTINUOUS)
e4:SetCode(EVENT_FREE_CHAIN)
e4:SetRange(LOCATION_EXTRA)
e4:SetOperation(cm.op2)
c:RegisterEffect(e4)
--
if not cm.global_check then
cm.global_check=true
--融合或使用财宝卡的次数
local ge1=Effect.CreateEffect(c)
ge1:SetType(EFFECT_TYPE_FIELD+EFFECT_TYPE_CONTINUOUS)
ge1:SetCode(EVENT_CHAIN_SOLVED)
ge1:SetOperation(cm.checkop1)
Duel.RegisterEffect(ge1,0)
end
end
--融合或使用财宝卡的次数:60001211
--进化次数:60001212
--查询玩家任务进度
function cm.op1(e,tp,eg,ep,ev,re,r,rp,nm) --融合或使用财宝卡的次数
Debug.Message(Duel.GetFlagEffect(tp,60001211))
end
function cm.op2(e,tp,eg,ep,ev,re,r,rp,nm) --进化次数
Debug.Message(Duel.GetFlagEffect(tp,60001212))
end
--融合或使用财宝卡的次数
function cm.checkop1(e,tp,eg,ep,ev,re,r,rp)
for i=1,ev do
local te,tgp=Duel.GetChainInfo(i,CHAININFO_TRIGGERING_EFFECT,CHAININFO_TRIGGERING_PLAYER)
local w=te:GetHandler()
if tgp==tp and w:IsSetCard(0x6a6) then
return Duel.RegisterFlagEffect(tp,60001211,RESET_PHASE+PHASE_END,0,1000)
end
end
end
\ No newline at end of file
--空绝的崇拜者
local m=60001212
local cm=_G["c"..m]
cm.name="空绝的崇拜者"
function cm.initial_effect(c)
--draw
local e2=Effect.CreateEffect(c)
e2:SetCategory(CATEGORY_TOHAND+CATEGORY_DRAW)
e2:SetType(EFFECT_TYPE_FIELD+EFFECT_TYPE_TRIGGER_O)
e2:SetRange(LOCATION_MZONE)
e2:SetCode(EVENT_SUMMON_SUCCESS)
e2:SetProperty(EFFECT_FLAG_DELAY)
e2:SetCountLimit(1)
e2:SetCondition(cm.drcon)
e2:SetTarget(cm.drtg)
e2:SetOperation(cm.drop)
c:RegisterEffect(e2)
local e3=e2:Clone()
e3:SetCode(EVENT_SPSUMMON_SUCCESS)
c:RegisterEffect(e3)
--negate
local e2=Effect.CreateEffect(c)
e2:SetDescription(aux.Stringid(m,0))
e2:SetCategory(CATEGORY_DRAW+CATEGORY_DESTROY)
e2:SetType(EFFECT_TYPE_QUICK_O)
e2:SetCode(EVENT_CHAINING)
e2:SetProperty(EFFECT_FLAG_DAMAGE_STEP+EFFECT_FLAG_DAMAGE_CAL)
e2:SetRange(LOCATION_MZONE)
e2:SetCountLimit(1)
e2:SetCondition(cm.rmcon)
e2:SetTarget(cm.sptg)
e2:SetOperation(cm.spop)
c:RegisterEffect(e2)
end
cm.named_with_treasure=true
function cm.thfilter(c)
return (c:IsCode(60001220) or c:IsCode(60001222) or c:IsCode(60001223) or c:IsCode(60001224)) and c:IsAbleToHand()
end
function cm.drcon(e,tp,eg,ep,ev,re,r,rp)
local ec=eg:GetFirst()
return ep==tp and not eg:IsContains(e:GetHandler())
end
function cm.drtg(e,tp,eg,ep,ev,re,r,rp,chk)
if chk==0 then return Duel.IsExistingMatchingCard(cm.thfilter,tp,LOCATION_DECK+LOCATION_GRAVE,0,1,nil) end
Duel.SetOperationInfo(0,CATEGORY_TOHAND,nil,1,tp,LOCATION_DECK+LOCATION_GRAVE)
end
function cm.drop(e,tp,eg,ep,ev,re,r,rp)
Duel.Hint(HINT_SELECTMSG,tp,HINTMSG_ATOHAND)
local g=Duel.SelectMatchingCard(tp,cm.thfilter,tp,LOCATION_DECK+LOCATION_GRAVE,0,1,1,nil)
if g:GetCount()>0 then
Duel.SendtoHand(g,nil,REASON_EFFECT)
Duel.ConfirmCards(1-tp,g)
end
end
function cm.rmcon(e,tp,eg,ep,ev,re,r,rp,c,w)
local w=re:GetHandler()
return rp==tp and re:IsHasType(EFFECT_TYPE_ACTIVATE) and re:IsActiveType(TYPE_SPELL+TYPE_TRAP) and w:IsSetCard(0x6a6)
end
function cm.sptg(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 cm.spop(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)
local g=Duel.SelectMatchingCard(tp,aux.TRUE,tp,0,LOCATION_ONFIELD,1,1,nil)
if g:GetCount()>0 then
Duel.Destroy(g,REASON_EFFECT)
end
end
\ No newline at end of file
--空绝的隐者
local m=60001213
local cm=_G["c"..m]
cm.name="空绝的隐者"
function cm.initial_effect(c)
--to hand
local e1=Effect.CreateEffect(c)
e1:SetDescription(aux.Stringid(m,0))
e1:SetCategory(CATEGORY_TOHAND+CATEGORY_SEARCH)
e1:SetType(EFFECT_TYPE_TRIGGER_O+EFFECT_TYPE_SINGLE)
e1:SetProperty(EFFECT_FLAG_DELAY)
e1:SetCode(EVENT_SUMMON_SUCCESS)
e1:SetTarget(cm.thtg)
e1:SetOperation(cm.thop)
c:RegisterEffect(e1)
local e2=e1:Clone()
e2:SetCode(EVENT_SPSUMMON_SUCCESS)
c:RegisterEffect(e2)
if not cm.global_check then
cm.global_check=true
local ge1=Effect.CreateEffect(c)
ge1:SetType(EFFECT_TYPE_FIELD+EFFECT_TYPE_CONTINUOUS)
ge1:SetCode(EVENT_SUMMON_SUCCESS)
ge1:SetOperation(cm.checkop)
Duel.RegisterEffect(ge1,0)
local ge2=ge1:Clone()
ge2:SetCode(EVENT_SPSUMMON_SUCCESS)
Duel.RegisterEffect(ge2,0)
end
end
cm.named_with_treasure=true
function cm.checkop(e,tp,eg,ep,ev,re,r,rp)
local tc=eg:GetFirst()
while tc do
Duel.RegisterFlagEffect(tc:GetSummonPlayer(),m,RESET_PHASE+PHASE_END,0,1000)
tc=eg:GetNext()
end
end
function cm.thfilter(c)
return (c:IsCode(60001229) or c:IsCode(60001222) or c:IsCode(60001223) or c:IsCode(60001224)) and c:IsAbleToHand()
end
function cm.thtg(e,tp,eg,ep,ev,re,r,rp,chk)
if chk==0 then return Duel.IsExistingMatchingCard(cm.thfilter,tp,LOCATION_DECK+LOCATION_GRAVE,0,1,nil) end
Duel.SetOperationInfo(0,CATEGORY_TOHAND,nil,1,tp,LOCATION_DECK+LOCATION_GRAVE)
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 cm.thop(e,tp,eg,ep,ev,re,r,rp)
Duel.Hint(HINT_SELECTMSG,tp,HINTMSG_ATOHAND)
if Duel.GetFlagEffect(tp,m)<=6 then
local g=Duel.SelectMatchingCard(tp,cm.thfilter,tp,LOCATION_DECK+LOCATION_GRAVE,0,1,1,nil)
if g:GetCount()>0 then
Duel.SendtoHand(g,nil,REASON_EFFECT)
Duel.ConfirmCards(1-tp,g)
end
else
local g=Duel.SelectMatchingCard(tp,cm.thfilter,tp,LOCATION_DECK+LOCATION_GRAVE,0,2,2,nil)
if g:GetCount()>0 then
Duel.SendtoHand(g,nil,REASON_EFFECT)
Duel.ConfirmCards(1-tp,g)
end
local p,d=Duel.GetChainInfo(0,CHAININFO_TARGET_PLAYER,CHAININFO_TARGET_PARAM)
Duel.Draw(p,d,REASON_EFFECT)
end
end
\ No newline at end of file
--空绝的残光
local m=60001214
local cm=_G["c"..m]
cm.name="空绝的残光"
function cm.initial_effect(c)
local e4=Effect.CreateEffect(c)
e4:SetDescription(aux.Stringid(m,0))
e4:SetCategory(CATEGORY_TOHAND+CATEGORY_SEARCH)
e4:SetType(EFFECT_TYPE_IGNITION)
e4:SetRange(LOCATION_HAND)
e4:SetCountLimit(1)
e4:SetCost(cm.spcost)
e4:SetTarget(cm.target)
e4:SetOperation(cm.op)
c:RegisterEffect(e4)
--damage
local e1=Effect.CreateEffect(c)
e1:SetDescription(aux.Stringid(m,1))
e1:SetType(EFFECT_TYPE_ACTIVATE)
e1:SetCategory(CATEGORY_DAMAGE)
e1:SetProperty(EFFECT_FLAG_PLAYER_TARGET)
e1:SetCode(EVENT_FREE_CHAIN)
e1:SetCountLimit(1,m)
e1:SetTarget(cm.damtg)
e1:SetOperation(cm.damop)
c:RegisterEffect(e1)
if not cm.global_check then
cm.global_check=true
local ge1=Effect.CreateEffect(c)
ge1:SetType(EFFECT_TYPE_FIELD+EFFECT_TYPE_CONTINUOUS)
ge1:SetCode(EVENT_SUMMON_SUCCESS)
ge1:SetOperation(cm.checkop)
Duel.RegisterEffect(ge1,0)
end
end
function cm.spcost(e,tp,eg,ep,ev,re,r,rp,chk)
local c=e:GetHandler()
local e1=Effect.CreateEffect(c)
e1:SetType(EFFECT_TYPE_SINGLE)
e1:SetCode(EFFECT_PUBLIC)
e1:SetReset(RESET_EVENT+RESETS_STANDARD+RESET_PHASE+PHASE_END+RESET_OPPO_TURN)
c:RegisterEffect(e1)
end
function cm.checkop(e,tp,eg,ep,ev,re,r,rp)
local tc=eg:GetFirst()
while tc do
Duel.RegisterFlagEffect(tp,60001209,RESET_PHASE+PHASE_END,0,1)
tc=eg:GetNext()
end
end
function cm.thfilter(c)
return c.named_with_treasure and c:IsAbleToHand()
end
function cm.target(e,tp,eg,ep,ev,re,r,rp,chk)
if chk==0 then return Duel.IsExistingMatchingCard(Card.IsSetCard,tp,LOCATION_HAND,0,1,nil,0x6a6) and Duel.IsExistingMatchingCard(cm.thfilter,tp,LOCATION_DECK+LOCATION_GRAVE,0,1,nil) end
Duel.DiscardHand(tp,Card.IsSetCard,1,1,REASON_DISCARD,nil,0x6a6)
Duel.SetOperationInfo(0,CATEGORY_TOHAND,nil,1,tp,LOCATION_DECK+LOCATION_GRAVE)
end
function cm.op(e,tp,eg,ep,ev,re,r,rp)
local c=e:GetHandler()
Duel.Hint(HINT_SELECTMSG,tp,HINTMSG_ATOHAND)
local g=Duel.SelectMatchingCard(tp,cm.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
local e1=Effect.CreateEffect(c)
e1:SetType(EFFECT_TYPE_SINGLE)
e1:SetCode(EFFECT_PUBLIC)
e1:SetReset(RESET_EVENT+RESETS_STANDARD+RESET_PHASE+PHASE_END+RESET_OPPO_TURN)
c:RegisterEffect(e1)
Duel.RegisterFlagEffect(tp,60001211,RESET_PHASE+PHASE_END,0,1000)
Duel.RegisterFlagEffect(tp,m,RESET_PHASE+PHASE_END,0,1000)
end
function cm.damtg(e,tp,eg,ep,ev,re,r,rp,chk)
if Duel.GetFlagEffect(tp,m)<=3 then
if chk==0 then return true end
Duel.SetTargetPlayer(1-tp)
Duel.SetTargetParam(1600)
Duel.SetOperationInfo(0,CATEGORY_DAMAGE,nil,0,1-tp,1600)
else
if chk==0 then return true end
Duel.SetTargetPlayer(1-tp)
Duel.SetTargetParam(3200)
Duel.SetOperationInfo(0,CATEGORY_DAMAGE,nil,0,1-tp,3200)
end
end
function cm.damop(e,tp,eg,ep,ev,re,r,rp)
local p,d=Duel.GetChainInfo(0,CHAININFO_TARGET_PLAYER,CHAININFO_TARGET_PARAM)
Duel.Damage(p,d,REASON_EFFECT)
Duel.RegisterFlagEffect(tp,60001210,RESET_PHASE+PHASE_END,0,1)
local ut=Duel.GetFlagEffect(tp,60001210)+1
local e1=Effect.CreateEffect(e:GetHandler())
e1:SetType(EFFECT_TYPE_FIELD)
e1:SetCode(EFFECT_SET_SUMMON_COUNT_LIMIT)
e1:SetProperty(EFFECT_FLAG_PLAYER_TARGET)
e1:SetTargetRange(1,0)
e1:SetValue(ut)
e1:SetReset(RESET_PHASE+PHASE_END)
Duel.RegisterEffect(e1,tp)
if Duel.GetFlagEffect(tp,60001209)==0 then
else
local e1=Effect.CreateEffect(e:GetHandler())
e1:SetType(EFFECT_TYPE_FIELD)
e1:SetProperty(EFFECT_FLAG_PLAYER_TARGET)
e1:SetCode(EFFECT_CANNOT_SUMMON)
e1:SetTargetRange(1,0)
e1:SetTarget(cm.splimit)
e1:SetReset(RESET_PHASE+PHASE_END)
Duel.RegisterEffect(e1,tp)
end
end
function cm.splimit(e,c)
return not c.named_with_treasure
end
--空绝篡夺 欧克托利亚
local m=60001215
local cm=_G["c"..m]
cm.name="空绝篡夺 欧克托利亚"
function cm.initial_effect(c)
--to hand
local e1=Effect.CreateEffect(c)
e1:SetDescription(aux.Stringid(m,0))
e1:SetCategory(CATEGORY_TOHAND+CATEGORY_SEARCH)
e1:SetType(EFFECT_TYPE_TRIGGER_O+EFFECT_TYPE_SINGLE)
e1:SetProperty(EFFECT_FLAG_DELAY)
e1:SetCode(EVENT_SUMMON_SUCCESS)
e1:SetTarget(cm.thtg)
e1:SetOperation(cm.thop)
c:RegisterEffect(e1)
local e2=e1:Clone()
e2:SetCode(EVENT_SPSUMMON_SUCCESS)
c:RegisterEffect(e2)
if not cm.global_check then
cm.global_check=true
local ge1=Effect.CreateEffect(c)
ge1:SetType(EFFECT_TYPE_FIELD+EFFECT_TYPE_CONTINUOUS)
ge1:SetCode(EVENT_SUMMON_SUCCESS)
ge1:SetOperation(cm.checkop)
Duel.RegisterEffect(ge1,0)
local ge2=ge1:Clone()
ge2:SetCode(EVENT_SPSUMMON_SUCCESS)
Duel.RegisterEffect(ge2,0)
end
--Disable
local e1=Effect.CreateEffect(c)
e1:SetDescription(aux.Stringid(m,0))
e1:SetCategory(CATEGORY_DISABLE)
e1:SetType(EFFECT_TYPE_IGNITION)
e1:SetProperty(EFFECT_FLAG_CARD_TARGET)
e1:SetHintTiming(0,TIMINGS_CHECK_MONSTER+TIMING_END_PHASE)
e1:SetRange(LOCATION_MZONE)
e1:SetCountLimit(1)
e1:SetTarget(cm.distg)
e1:SetOperation(cm.disop)
c:RegisterEffect(e1)
end
cm.named_with_treasure=true
function cm.checkop(e,tp,eg,ep,ev,re,r,rp)
local tc=eg:GetFirst()
while tc do
Duel.RegisterFlagEffect(tc:GetSummonPlayer(),m,RESET_PHASE+PHASE_END,0,1000)
tc=eg:GetNext()
end
end
function cm.thfilter(c)
return (c:IsCode(60001220) or c:IsCode(60001222) or c:IsCode(60001223) or c:IsCode(60001224)) and c:IsAbleToHand()
end
function cm.thfilter2(c)
return c:IsCode(60001214) and c:IsAbleToHand()
end
function cm.thtg(e,tp,eg,ep,ev,re,r,rp,chk)
if chk==0 then return Duel.IsExistingMatchingCard(cm.thfilter,tp,LOCATION_DECK+LOCATION_GRAVE,0,1,nil) end
Duel.SetOperationInfo(0,CATEGORY_TOHAND,nil,1,tp,LOCATION_DECK+LOCATION_GRAVE)
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 cm.thop(e,tp,eg,ep,ev,re,r,rp)
Duel.Hint(HINT_SELECTMSG,tp,HINTMSG_ATOHAND)
if Duel.GetFlagEffect(tp,m)<=6 then
local g=Duel.SelectMatchingCard(tp,cm.thfilter,tp,LOCATION_DECK+LOCATION_GRAVE,0,1,1,nil)
if g:GetCount()>0 then
Duel.SendtoHand(g,nil,REASON_EFFECT)
Duel.ConfirmCards(1-tp,g)
end
else
local g=Duel.SelectMatchingCard(tp,cm.thfilter,tp,LOCATION_DECK+LOCATION_GRAVE,0,1,1,nil)
if g:GetCount()>0 then
Duel.SendtoHand(g,nil,REASON_EFFECT)
Duel.ConfirmCards(1-tp,g)
end
local g=Duel.SelectMatchingCard(tp,cm.thfilter2,tp,LOCATION_DECK+LOCATION_GRAVE,0,1,1,nil)
if g:GetCount()>0 then
Duel.SendtoHand(g,nil,REASON_EFFECT)
Duel.ConfirmCards(1-tp,g)
end
local p,d=Duel.GetChainInfo(0,CHAININFO_TARGET_PLAYER,CHAININFO_TARGET_PARAM)
Duel.Draw(p,d,REASON_EFFECT)
end
end
function cm.distg(e,tp,eg,ep,ev,re,r,rp,chk,chkc)
if chkc then return chkc:IsLocation(LOCATION_MZONE) and chkc:IsControler(1-tp) and aux.disfilter1(chkc) end
if chk==0 then return Duel.IsExistingTarget(aux.disfilter1,tp,0,LOCATION_MZONE,1,nil) end
Duel.Hint(HINT_SELECTMSG,tp,HINTMSG_FACEUP)
local g=Duel.SelectTarget(tp,aux.disfilter1,tp,0,LOCATION_MZONE,1,1,nil)
Duel.SetOperationInfo(0,CATEGORY_DISABLE,g,1,0,0)
end
function cm.disop(e,tp,eg,ep,ev,re,r,rp)
local tc=Duel.GetFirstTarget()
local c=e:GetHandler()
if tc:IsFaceup() and tc:IsRelateToEffect(e) then
local e1=Effect.CreateEffect(c)
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(c)
e2:SetType(EFFECT_TYPE_SINGLE)
e2:SetCode(EFFECT_DISABLE_EFFECT)
e2:SetReset(RESET_EVENT+RESETS_STANDARD+RESET_PHASE+PHASE_END)
tc:RegisterEffect(e2)
Duel.MajesticCopy(c,tc)
end
end
\ No newline at end of file
--精炼的空绝
local m=60001216
local cm=_G["c"..m]
cm.name="精炼的空绝"
function cm.initial_effect(c)
--Activate
local e1=Effect.CreateEffect(c)
e1:SetCategory(CATEGORY_DESTROY)
e1:SetType(EFFECT_TYPE_ACTIVATE)
e1:SetProperty(EFFECT_FLAG_CARD_TARGET)
e1:SetCode(EVENT_FREE_CHAIN)
e1:SetHintTiming(TIMING_ATTACK,0x11e0)
e1:SetTarget(cm.target)
e1:SetOperation(cm.activate)
c:RegisterEffect(e1)
if not cm.global_check then
cm.global_check=true
local ge1=Effect.CreateEffect(c)
ge1:SetType(EFFECT_TYPE_FIELD+EFFECT_TYPE_CONTINUOUS)
ge1:SetCode(EVENT_SUMMON_SUCCESS)
ge1:SetOperation(cm.checkop)
Duel.RegisterEffect(ge1,0)
end
end
function cm.checkop(e,tp,eg,ep,ev,re,r,rp)
local tc=eg:GetFirst()
while tc do
Duel.RegisterFlagEffect(tp,60001209,RESET_PHASE+PHASE_END,0,1)
tc=eg:GetNext()
end
end
function cm.target(e,tp,eg,ep,ev,re,r,rp,chk,chkc)
if chkc then return chkc:IsOnField() and chkc~=e:GetHandler() end
if chk==0 then return Duel.IsExistingTarget(aux.TRUE,tp,LOCATION_MZONE,LOCATION_MZONE,1,e:GetHandler()) end
Duel.Hint(HINT_SELECTMSG,tp,HINTMSG_DESTROY)
local g=Duel.SelectTarget(tp,aux.TRUE,tp,LOCATION_ONFIELD,LOCATION_ONFIELD,1,1,e:GetHandler())
Duel.SetOperationInfo(0,CATEGORY_DESTROY,g,1,0,0)
if chk==0 then return true end
Duel.SetTargetPlayer(tp)
Duel.SetTargetParam(2000)
Duel.SetOperationInfo(0,CATEGORY_RECOVER,nil,0,tp,2000)
end
function cm.activate(e,tp,eg,ep,ev,re,r,rp)
local tc=Duel.GetFirstTarget()
if tc:IsRelateToEffect(e) then
Duel.Destroy(tc,REASON_EFFECT)
end
if Duel.GetFlagEffect(tp,60001211)>=7 then
local p,d=Duel.GetChainInfo(0,CHAININFO_TARGET_PLAYER,CHAININFO_TARGET_PARAM)
Duel.Recover(p,d,REASON_EFFECT)
end
Duel.RegisterFlagEffect(tp,60001210,RESET_PHASE+PHASE_END,0,1)
local ut=Duel.GetFlagEffect(tp,60001210)+1
local e1=Effect.CreateEffect(e:GetHandler())
e1:SetType(EFFECT_TYPE_FIELD)
e1:SetCode(EFFECT_SET_SUMMON_COUNT_LIMIT)
e1:SetProperty(EFFECT_FLAG_PLAYER_TARGET)
e1:SetTargetRange(1,0)
e1:SetValue(ut)
e1:SetReset(RESET_PHASE+PHASE_END)
Duel.RegisterEffect(e1,tp)
if Duel.GetFlagEffect(tp,60001209)==0 then
else
local e1=Effect.CreateEffect(e:GetHandler())
e1:SetType(EFFECT_TYPE_FIELD)
e1:SetProperty(EFFECT_FLAG_PLAYER_TARGET)
e1:SetCode(EFFECT_CANNOT_SUMMON)
e1:SetTargetRange(1,0)
e1:SetTarget(cm.splimit)
e1:SetReset(RESET_PHASE+PHASE_END)
Duel.RegisterEffect(e1,tp)
end
end
function cm.splimit(e,c)
return not c.named_with_treasure
end
--亚森·罗萃
local m=60001217
local cm=_G["c"..m]
cm.name="亚森·罗萃"
function cm.initial_effect(c)
--to hand
local e1=Effect.CreateEffect(c)
e1:SetDescription(aux.Stringid(m,0))
e1:SetCategory(CATEGORY_TOHAND+CATEGORY_SEARCH)
e1:SetType(EFFECT_TYPE_TRIGGER_O+EFFECT_TYPE_SINGLE)
e1:SetProperty(EFFECT_FLAG_DELAY)
e1:SetCode(EVENT_SUMMON_SUCCESS)
e1:SetTarget(cm.thtg)
e1:SetOperation(cm.thop)
c:RegisterEffect(e1)
local e2=e1:Clone()
e2:SetCode(EVENT_SPSUMMON_SUCCESS)
c:RegisterEffect(e2)
if not cm.global_check then
cm.global_check=true
local ge1=Effect.CreateEffect(c)
ge1:SetType(EFFECT_TYPE_FIELD+EFFECT_TYPE_CONTINUOUS)
ge1:SetCode(EVENT_SUMMON_SUCCESS)
ge1:SetOperation(cm.checkop)
Duel.RegisterEffect(ge1,0)
local ge2=ge1:Clone()
ge2:SetCode(EVENT_SPSUMMON_SUCCESS)
Duel.RegisterEffect(ge2,0)
end
end
cm.named_with_treasure=true
function cm.checkop(e,tp,eg,ep,ev,re,r,rp)
local tc=eg:GetFirst()
while tc do
Duel.RegisterFlagEffect(tc:GetSummonPlayer(),m,RESET_PHASE+PHASE_END,0,1000)
tc=eg:GetNext()
end
end
function cm.thfilter(c)
return c:IsCode(60001222) and c:IsAbleToHand()
end
function cm.thtg(e,tp,eg,ep,ev,re,r,rp,chk)
if chk==0 then return Duel.IsExistingMatchingCard(cm.thfilter,tp,LOCATION_DECK+LOCATION_GRAVE,0,1,nil) end
Duel.SetOperationInfo(0,CATEGORY_TOHAND,nil,1,tp,LOCATION_DECK+LOCATION_GRAVE)
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)
if chk==0 then return true end
Duel.SetTargetPlayer(tp)
Duel.SetOperationInfo(0,CATEGORY_HANDES,nil,0,1-tp,1)
end
function cm.thop(e,tp,eg,ep,ev,re,r,rp)
Duel.Hint(HINT_SELECTMSG,tp,HINTMSG_ATOHAND)
if Duel.GetFlagEffect(tp,m)<=14 then
local g=Duel.SelectMatchingCard(tp,cm.thfilter,tp,LOCATION_DECK+LOCATION_GRAVE,0,1,1,nil)
if g:GetCount()>0 then
Duel.SendtoHand(g,nil,REASON_EFFECT)
Duel.ConfirmCards(1-tp,g)
end
else
local g=Duel.SelectMatchingCard(tp,cm.thfilter,tp,LOCATION_DECK+LOCATION_GRAVE,0,1,1,nil)
if g:GetCount()>0 then
Duel.SendtoHand(g,nil,REASON_EFFECT)
Duel.ConfirmCards(1-tp,g)
end
local p,d=Duel.GetChainInfo(0,CHAININFO_TARGET_PLAYER,CHAININFO_TARGET_PARAM)
Duel.Draw(p,d,REASON_EFFECT)
local p=Duel.GetChainInfo(0,CHAININFO_TARGET_PLAYER)
local g=Duel.GetFieldGroup(p,0,LOCATION_HAND)
if g:GetCount()>0 then
Duel.ConfirmCards(p,g)
Duel.Hint(HINT_SELECTMSG,p,HINTMSG_DISCARD)
local sg=g:Select(p,1,1,nil)
Duel.SendtoGrave(sg,REASON_EFFECT+REASON_DISCARD)
Duel.ShuffleHand(1-p)
end
end
end
\ No newline at end of file
--强袭侠客
local m=60001218
local cm=_G["c"..m]
cm.name="强袭侠客"
function cm.initial_effect(c)
--battle
local e9=Effect.CreateEffect(c)
e9:SetDescription(aux.Stringid(m,0))
e9:SetType(EFFECT_TYPE_QUICK_O)
e9:SetCode(EVENT_FREE_CHAIN)
e9:SetProperty(EFFECT_FLAG_CARD_TARGET)
e9:SetRange(LOCATION_MZONE)
e9:SetHintTiming(0,TIMING_END_PHASE)
e9:SetCountLimit(1)
e9:SetTarget(cm.batg)
e9:SetOperation(cm.baop)
c:RegisterEffect(e9)
end
cm.named_with_treasure=true
function cm.thfilter(c)
return c:IsCode(60001223) and c:IsAbleToHand()
end
function cm.batg(e,tp,eg,ep,ev,re,r,rp,chk,chkc)
local c=e:GetHandler()
if chkc then return chkc:IsControler(1-tp) and chkc:IsLocation(LOCATION_MZONE) end
if chk==0 then return c:IsAttackable()
and Duel.IsExistingTarget(nil,tp,0,LOCATION_MZONE,1,nil) end
Duel.Hint(HINT_SELECTMSG,tp,HINTMSG_OPPO)
local g=Duel.SelectTarget(tp,nil,tp,0,LOCATION_MZONE,1,1,nil)
end
function cm.baop(e,tp,eg,ep,ev,re,r,rp)
local c=e:GetHandler()
if c:IsAttackable() and c:IsControler(tp) and c:IsFaceup() and c:IsRelateToEffect(e) then
local g=Duel.GetChainInfo(0,CHAININFO_TARGET_CARDS)
local tc=g:GetFirst()
if tc:IsControler(1-tp) and tc:IsRelateToEffect(e) then
Duel.CalculateDamage(c,tc)
end
end
local g=Duel.SelectMatchingCard(tp,cm.thfilter,tp,LOCATION_DECK+LOCATION_GRAVE,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
--大洋斥候
local m=60001219
local cm=_G["c"..m]
cm.name="大洋斥候"
function cm.initial_effect(c)
--to hand
local e1=Effect.CreateEffect(c)
e1:SetDescription(aux.Stringid(m,0))
e1:SetCategory(CATEGORY_TOHAND+CATEGORY_SEARCH)
e1:SetType(EFFECT_TYPE_TRIGGER_O+EFFECT_TYPE_SINGLE)
e1:SetProperty(EFFECT_FLAG_DELAY)
e1:SetCode(EVENT_SUMMON_SUCCESS)
e1:SetTarget(cm.thtg)
e1:SetOperation(cm.thop)
c:RegisterEffect(e1)
local e2=e1:Clone()
e2:SetCode(EVENT_SPSUMMON_SUCCESS)
c:RegisterEffect(e2)
--if not c60001200.global_check then
-- c60001200.global_check=true
-- local ge1=Effect.CreateEffect(c)
-- ge1:SetType(EFFECT_TYPE_FIELD+EFFECT_TYPE_CONTINUOUS)
-- ge1:SetCode(EVENT_CHAIN_SOLVED)
-- ge1:SetOperation(cm.checkop)
-- Duel.RegisterEffect(ge1,0)
-- end
--negate
local e2=Effect.CreateEffect(c)
e2:SetDescription(aux.Stringid(m,0))
e2:SetCategory(CATEGORY_DRAW)
e2:SetType(EFFECT_TYPE_QUICK_O)
e2:SetCode(EVENT_CHAINING)
e2:SetProperty(EFFECT_FLAG_DAMAGE_STEP+EFFECT_FLAG_DAMAGE_CAL)
e2:SetRange(LOCATION_MZONE)
e2:SetCondition(cm.rmcon)
e2:SetTarget(cm.sptg)
e2:SetOperation(cm.spop)
c:RegisterEffect(e2)
end
cm.named_with_treasure=true
--function cm.checkop(e,tp,eg,ep,ev,re,r,rp)
-- for i=1,ev do
-- local te,tgp=Duel.GetChainInfo(i,CHAININFO_TRIGGERING_EFFECT,CHAININFO_TRIGGERING_PLAYER)
-- local w=te:GetHandler()
-- if tgp==tp and w:IsSetCard(0x6a6) then
-- return Duel.RegisterFlagEffect(tp,60001200,RESET_PHASE+PHASE_END,0,1000)
-- end
-- end
--end
function cm.thfilter(c)
return c:IsCode(60001220) and c:IsAbleToHand()
end
function cm.thfilter2(c)
return c:IsCode(60001221) and c:IsAbleToHand()
end
function cm.thtg(e,tp,eg,ep,ev,re,r,rp,chk)
if Duel.GetFlagEffect(tp,60001211)<=6 then
if chk==0 then return Duel.IsExistingMatchingCard(cm.thfilter,tp,LOCATION_DECK+LOCATION_GRAVE,0,1,nil) end
Duel.SetOperationInfo(0,CATEGORY_TOHAND,nil,1,tp,LOCATION_DECK+LOCATION_GRAVE)
else
if chk==0 then return Duel.IsExistingMatchingCard(cm.thfilter2,tp,LOCATION_DECK+LOCATION_GRAVE,0,1,nil) end
Duel.SetOperationInfo(0,CATEGORY_TOHAND,nil,1,tp,LOCATION_DECK+LOCATION_GRAVE)
end
end
function cm.thop(e,tp,eg,ep,ev,re,r,rp)
Duel.Hint(HINT_SELECTMSG,tp,HINTMSG_ATOHAND)
if Duel.GetFlagEffect(tp,60001211)<=6 then
local g=Duel.SelectMatchingCard(tp,cm.thfilter,tp,LOCATION_DECK+LOCATION_GRAVE,0,1,1,nil)
if g:GetCount()>0 then
Duel.SendtoHand(g,nil,REASON_EFFECT)
Duel.ConfirmCards(1-tp,g)
end
else
local g=Duel.SelectMatchingCard(tp,cm.thfilter2,tp,LOCATION_DECK+LOCATION_GRAVE,0,1,1,nil)
if g:GetCount()>0 then
Duel.SendtoHand(g,nil,REASON_EFFECT)
Duel.ConfirmCards(1-tp,g)
end
end
end
function cm.rmcon(e,tp,eg,ep,ev,re,r,rp,s)
local s=re:GetHandler()
return rp==tp and s:IsSetCard(0x6a6)
end
function cm.sptg(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 cm.spop(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
--黄金之靴
local m=60001220
local cm=_G["c"..m]
cm.name="黄金之靴"
function cm.initial_effect(c)
--Activate
local e1=Effect.CreateEffect(c)
e1:SetType(EFFECT_TYPE_ACTIVATE)
e1:SetCode(EVENT_FREE_CHAIN)
e1:SetTarget(cm.target)
e1:SetOperation(cm.activate)
c:RegisterEffect(e1)
if not cm.global_check then
cm.global_check=true
local ge1=Effect.CreateEffect(c)
ge1:SetType(EFFECT_TYPE_FIELD+EFFECT_TYPE_CONTINUOUS)
ge1:SetCode(EVENT_SUMMON_SUCCESS)
ge1:SetOperation(cm.checkop)
Duel.RegisterEffect(ge1,0)
end
end
function cm.checkop(e,tp,eg,ep,ev,re,r,rp)
local tc=eg:GetFirst()
while tc do
Duel.RegisterFlagEffect(tp,60001209,RESET_PHASE+PHASE_END,0,1)
tc=eg:GetNext()
end
end
function cm.filter(c)
return c:IsFaceup()
end
function cm.filter2(c)
return c.named_with_treasure
end
function cm.target(e,tp,eg,ep,ev,re,r,rp,chk,chkc)
if chk==0 then return Duel.IsExistingMatchingCard(cm.filter,tp,LOCATION_MZONE,0,1,nil) and Duel.IsPlayerCanSummon(tp) end
end
function cm.activate(e,tp,eg,ep,ev,re,r,rp)
local g=Duel.GetMatchingGroup(cm.filter,tp,LOCATION_MZONE,0,nil)
local tc=g:GetFirst()
while tc do
local e1=Effect.CreateEffect(e:GetHandler())
e1:SetType(EFFECT_TYPE_SINGLE)
e1:SetCode(EFFECT_DIRECT_ATTACK)
e1:SetReset(RESET_EVENT+RESETS_STANDARD+RESET_PHASE+PHASE_END)
tc:RegisterEffect(e1)
tc=g:GetNext()
end
Duel.RegisterFlagEffect(tp,60001210,RESET_PHASE+PHASE_END,0,1)
local ut=Duel.GetFlagEffect(tp,60001210)+1
local e1=Effect.CreateEffect(e:GetHandler())
e1:SetType(EFFECT_TYPE_FIELD)
e1:SetCode(EFFECT_SET_SUMMON_COUNT_LIMIT)
e1:SetProperty(EFFECT_FLAG_PLAYER_TARGET)
e1:SetTargetRange(1,0)
e1:SetValue(ut)
e1:SetReset(RESET_PHASE+PHASE_END)
Duel.RegisterEffect(e1,tp)
if Duel.GetFlagEffect(tp,60001209)==0 then
else
local e1=Effect.CreateEffect(e:GetHandler())
e1:SetType(EFFECT_TYPE_FIELD)
e1:SetProperty(EFFECT_FLAG_PLAYER_TARGET)
e1:SetCode(EFFECT_CANNOT_SUMMON)
e1:SetTargetRange(1,0)
e1:SetTarget(cm.splimit)
e1:SetReset(RESET_PHASE+PHASE_END)
Duel.RegisterEffect(e1,tp)
end
end
function cm.splimit(e,c)
return not c.named_with_treasure
end
--战栗的海盗旗
local m=60001221
local cm=_G["c"..m]
cm.name="战栗的海盗旗"
function cm.initial_effect(c)
--Activate
local e1=Effect.CreateEffect(c)
e1:SetCategory(CATEGORY_ATKCHANGE+CATEGORY_DESTROY)
e1:SetType(EFFECT_TYPE_ACTIVATE)
e1:SetCode(EVENT_FREE_CHAIN)
e1:SetTarget(cm.actg)
e1:SetOperation(cm.acop)
c:RegisterEffect(e1)
if not cm.global_check then
cm.global_check=true
local ge1=Effect.CreateEffect(c)
ge1:SetType(EFFECT_TYPE_FIELD+EFFECT_TYPE_CONTINUOUS)
ge1:SetCode(EVENT_SUMMON_SUCCESS)
ge1:SetOperation(cm.checkop)
Duel.RegisterEffect(ge1,0)
end
end
function cm.checkop(e,tp,eg,ep,ev,re,r,rp)
local tc=eg:GetFirst()
while tc do
Duel.RegisterFlagEffect(tp,60001209,RESET_PHASE+PHASE_END,0,1)
tc=eg:GetNext()
end
end
function cm.actg(e,tp,eg,ep,ev,re,r,rp,chk)
if chk==0 then return Duel.IsExistingMatchingCard(nil,tp,0,LOCATION_MZONE,1,nil) and Duel.IsPlayerCanSummon(tp) end
if e:GetHandler():IsStatus(STATUS_ACT_FROM_HAND) and Duel.GetTurnPlayer()~=tp then
Duel.DiscardHand(tp,Card.IsDiscardable,1,1,REASON_COST+REASON_DISCARD)
end
local sg=Duel.GetMatchingGroup(Card.IsAttackBelow,tp,0,LOCATION_MZONE,nil,1000)
Duel.SetOperationInfo(0,CATEGORY_DESTROY,sg,sg:GetCount(),0,0)
Duel.SetOperationInfo(0,CATEGORY_ATKCHANGE,nil,Duel.GetMatchingGroupCount(nil,tp,0,LOCATION_MZONE,nil),0,0)
if chk==0 then return true end
Duel.SetTargetPlayer(1-tp)
Duel.SetTargetParam(1000)
Duel.SetOperationInfo(0,CATEGORY_DAMAGE,nil,0,1-tp,1000)
end
function cm.filter2(c)
return c.named_with_treasure
end
function cm.acop(e,tp,eg,ep,ev,re,r,rp)
local c=e:GetHandler()
local g=Duel.GetMatchingGroup(nil,tp,0,LOCATION_MZONE,nil)
local tc=g:GetFirst()
while tc do
local e1=Effect.CreateEffect(e:GetHandler())
e1:SetType(EFFECT_TYPE_SINGLE)
e1:SetCode(EFFECT_UPDATE_ATTACK)
e1:SetValue(-1000)
e1:SetReset(RESET_EVENT+RESETS_STANDARD)
tc:RegisterEffect(e1)
tc=g:GetNext()
end
local dg=Duel.GetMatchingGroup(Card.IsAttack,tp,LOCATION_MZONE,LOCATION_MZONE,nil,0)
Duel.Destroy(dg,REASON_EFFECT)
local p,d=Duel.GetChainInfo(0,CHAININFO_TARGET_PLAYER,CHAININFO_TARGET_PARAM)
Duel.Damage(p,d,REASON_EFFECT)
Duel.RegisterFlagEffect(tp,60001210,RESET_PHASE+PHASE_END,0,1)
local ut=Duel.GetFlagEffect(tp,60001210)+1
local e1=Effect.CreateEffect(e:GetHandler())
e1:SetType(EFFECT_TYPE_FIELD)
e1:SetCode(EFFECT_SET_SUMMON_COUNT_LIMIT)
e1:SetProperty(EFFECT_FLAG_PLAYER_TARGET)
e1:SetTargetRange(1,0)
e1:SetValue(ut)
e1:SetReset(RESET_PHASE+PHASE_END)
Duel.RegisterEffect(e1,tp)
if Duel.GetFlagEffect(tp,60001209)==0 then
else
local e1=Effect.CreateEffect(e:GetHandler())
e1:SetType(EFFECT_TYPE_FIELD)
e1:SetProperty(EFFECT_FLAG_PLAYER_TARGET)
e1:SetCode(EFFECT_CANNOT_SUMMON)
e1:SetTargetRange(1,0)
e1:SetTarget(cm.splimit)
e1:SetReset(RESET_PHASE+PHASE_END)
Duel.RegisterEffect(e1,tp)
end
end
function cm.splimit(e,c)
return not c.named_with_treasure
end
\ No newline at end of file
--黄金首饰
local m=60001222
local cm=_G["c"..m]
cm.name="黄金首饰"
function cm.initial_effect(c)
--Activate
local e1=Effect.CreateEffect(c)
e1:SetCategory(CATEGORY_ATKCHANGE)
e1:SetType(EFFECT_TYPE_ACTIVATE)
e1:SetProperty(EFFECT_FLAG_CARD_TARGET)
e1:SetCode(EVENT_FREE_CHAIN)
e1:SetTarget(cm.target)
e1:SetOperation(cm.activate)
c:RegisterEffect(e1)
if not cm.global_check then
cm.global_check=true
local ge1=Effect.CreateEffect(c)
ge1:SetType(EFFECT_TYPE_FIELD+EFFECT_TYPE_CONTINUOUS)
ge1:SetCode(EVENT_SUMMON_SUCCESS)
ge1:SetOperation(cm.checkop)
Duel.RegisterEffect(ge1,0)
end
end
function cm.checkop(e,tp,eg,ep,ev,re,r,rp)
local tc=eg:GetFirst()
while tc do
Duel.RegisterFlagEffect(tp,60001209,RESET_PHASE+PHASE_END,0,1)
tc=eg:GetNext()
end
end
function cm.filter(c)
return c:IsFaceup()
end
function cm.filter2(c)
return c.named_with_treasure
end
function cm.target(e,tp,eg,ep,ev,re,r,rp,chk,chkc)
if chkc then return chkc:IsLocation(LOCATION_MZONE) and chkc:IsControler(tp) and cm.filter(chkc) and Duel.IsPlayerCanSummon(tp) end
if chk==0 then return Duel.IsExistingTarget(cm.filter,tp,LOCATION_MZONE,0,1,nil) end
Duel.Hint(HINT_SELECTMSG,tp,HINTMSG_FACEUP)
Duel.SelectTarget(tp,cm.filter,tp,LOCATION_MZONE,0,1,1,nil)
end
function cm.activate(e,tp,eg,ep,ev,re,r,rp)
local tc=Duel.GetFirstTarget()
if tc:IsRelateToEffect(e) and tc:IsFaceup() then
local e1=Effect.CreateEffect(e:GetHandler())
e1:SetType(EFFECT_TYPE_SINGLE)
e1:SetCode(EFFECT_UPDATE_ATTACK)
e1:SetReset(RESET_EVENT+RESETS_STANDARD)
e1:SetValue(500)
tc:RegisterEffect(e1)
end
Duel.RegisterFlagEffect(tp,60001210,RESET_PHASE+PHASE_END,0,1)
local ut=Duel.GetFlagEffect(tp,60001210)+1
local e1=Effect.CreateEffect(e:GetHandler())
e1:SetType(EFFECT_TYPE_FIELD)
e1:SetCode(EFFECT_SET_SUMMON_COUNT_LIMIT)
e1:SetProperty(EFFECT_FLAG_PLAYER_TARGET)
e1:SetTargetRange(1,0)
e1:SetValue(ut)
e1:SetReset(RESET_PHASE+PHASE_END)
Duel.RegisterEffect(e1,tp)
if Duel.GetFlagEffect(tp,60001209)==0 then
else
local e1=Effect.CreateEffect(e:GetHandler())
e1:SetType(EFFECT_TYPE_FIELD)
e1:SetProperty(EFFECT_FLAG_PLAYER_TARGET)
e1:SetCode(EFFECT_CANNOT_SUMMON)
e1:SetTargetRange(1,0)
e1:SetTarget(cm.splimit)
e1:SetReset(RESET_PHASE+PHASE_END)
Duel.RegisterEffect(e1,tp)
end
end
function cm.splimit(e,c)
return not c.named_with_treasure
end
\ No newline at end of file
--黄金之杯
local m=60001223
local cm=_G["c"..m]
cm.name="黄金之杯"
function cm.initial_effect(c)
--recover
local e1=Effect.CreateEffect(c)
e1:SetType(EFFECT_TYPE_ACTIVATE)
e1:SetCategory(CATEGORY_RECOVER)
e1:SetProperty(EFFECT_FLAG_PLAYER_TARGET)
e1:SetCode(EVENT_FREE_CHAIN)
e1:SetTarget(cm.rectg)
e1:SetOperation(cm.recop)
c:RegisterEffect(e1)
if not cm.global_check then
cm.global_check=true
local ge1=Effect.CreateEffect(c)
ge1:SetType(EFFECT_TYPE_FIELD+EFFECT_TYPE_CONTINUOUS)
ge1:SetCode(EVENT_SUMMON_SUCCESS)
ge1:SetOperation(cm.checkop)
Duel.RegisterEffect(ge1,0)
end
end
function cm.checkop(e,tp,eg,ep,ev,re,r,rp)
local tc=eg:GetFirst()
while tc do
Duel.RegisterFlagEffect(tp,60001209,RESET_PHASE+PHASE_END,0,1)
tc=eg:GetNext()
end
end
function cm.filter2(c)
return c.named_with_treasure
end
function cm.rectg(e,tp,eg,ep,ev,re,r,rp,chk)
if chk==0 then return Duel.IsPlayerCanSummon(tp) end
Duel.SetTargetPlayer(tp)
Duel.SetTargetParam(500)
Duel.SetOperationInfo(0,CATEGORY_RECOVER,nil,0,tp,500)
end
function cm.recop(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)
Duel.RegisterFlagEffect(tp,60001210,RESET_PHASE+PHASE_END,0,1)
local ut=Duel.GetFlagEffect(tp,60001210)+1
local e1=Effect.CreateEffect(e:GetHandler())
e1:SetType(EFFECT_TYPE_FIELD)
e1:SetCode(EFFECT_SET_SUMMON_COUNT_LIMIT)
e1:SetProperty(EFFECT_FLAG_PLAYER_TARGET)
e1:SetTargetRange(1,0)
e1:SetValue(ut)
e1:SetReset(RESET_PHASE+PHASE_END)
Duel.RegisterEffect(e1,tp)
if Duel.GetFlagEffect(tp,60001209)==0 then
else
local e1=Effect.CreateEffect(e:GetHandler())
e1:SetType(EFFECT_TYPE_FIELD)
e1:SetProperty(EFFECT_FLAG_PLAYER_TARGET)
e1:SetCode(EFFECT_CANNOT_SUMMON)
e1:SetTargetRange(1,0)
e1:SetTarget(cm.splimit)
e1:SetReset(RESET_PHASE+PHASE_END)
Duel.RegisterEffect(e1,tp)
end
end
function cm.splimit(e,c)
return not c.named_with_treasure
end
\ No newline at end of file
--黄金匕首
local m=60001224
local cm=_G["c"..m]
cm.name="黄金匕首"
function cm.initial_effect(c)
--Activate
local e1=Effect.CreateEffect(c)
e1:SetCategory(CATEGORY_ATKCHANGE+CATEGORY_DESTROY)
e1:SetType(EFFECT_TYPE_ACTIVATE)
e1:SetCode(EVENT_FREE_CHAIN)
e1:SetTarget(cm.actg)
e1:SetOperation(cm.acop)
c:RegisterEffect(e1)
if not cm.global_check then
cm.global_check=true
local ge1=Effect.CreateEffect(c)
ge1:SetType(EFFECT_TYPE_FIELD+EFFECT_TYPE_CONTINUOUS)
ge1:SetCode(EVENT_SUMMON_SUCCESS)
ge1:SetOperation(cm.checkop)
Duel.RegisterEffect(ge1,0)
end
end
function cm.checkop(e,tp,eg,ep,ev,re,r,rp)
local tc=eg:GetFirst()
while tc do
Duel.RegisterFlagEffect(tp,60001209,RESET_PHASE+PHASE_END,0,1)
tc=eg:GetNext()
end
end
function cm.filter2(c)
return c.named_with_treasure
end
function cm.actg(e,tp,eg,ep,ev,re,r,rp,chk)
if chk==0 then return Duel.IsExistingMatchingCard(nil,tp,0,LOCATION_MZONE,1,nil) and Duel.IsPlayerCanSummon(tp) end
if e:GetHandler():IsStatus(STATUS_ACT_FROM_HAND) and Duel.GetTurnPlayer()~=tp then
Duel.DiscardHand(tp,Card.IsDiscardable,1,1,REASON_COST+REASON_DISCARD)
end
local sg=Duel.GetMatchingGroup(Card.IsAttackBelow,tp,0,LOCATION_MZONE,nil,500)
Duel.SetOperationInfo(0,CATEGORY_DESTROY,sg,sg:GetCount(),0,0)
Duel.SetOperationInfo(0,CATEGORY_ATKCHANGE,nil,Duel.GetMatchingGroupCount(nil,tp,0,LOCATION_MZONE,nil),0,0)
end
function cm.acop(e,tp,eg,ep,ev,re,r,rp)
local c=e:GetHandler()
local g=Duel.GetMatchingGroup(nil,tp,0,LOCATION_MZONE,nil)
local tc=g:GetFirst()
while tc do
local e1=Effect.CreateEffect(e:GetHandler())
e1:SetType(EFFECT_TYPE_SINGLE)
e1:SetCode(EFFECT_UPDATE_ATTACK)
e1:SetValue(-500)
e1:SetReset(RESET_EVENT+RESETS_STANDARD)
tc:RegisterEffect(e1)
tc=g:GetNext()
end
local dg=Duel.GetMatchingGroup(Card.IsAttack,tp,LOCATION_MZONE,LOCATION_MZONE,nil,0)
Duel.Destroy(dg,REASON_EFFECT)
Duel.RegisterFlagEffect(tp,60001210,RESET_PHASE+PHASE_END,0,1)
local ut=Duel.GetFlagEffect(tp,60001210)+1
local e1=Effect.CreateEffect(e:GetHandler())
e1:SetType(EFFECT_TYPE_FIELD)
e1:SetCode(EFFECT_SET_SUMMON_COUNT_LIMIT)
e1:SetProperty(EFFECT_FLAG_PLAYER_TARGET)
e1:SetTargetRange(1,0)
e1:SetValue(ut)
e1:SetReset(RESET_PHASE+PHASE_END)
Duel.RegisterEffect(e1,tp)
if Duel.GetFlagEffect(tp,60001209)==0 then
else
local e1=Effect.CreateEffect(e:GetHandler())
e1:SetType(EFFECT_TYPE_FIELD)
e1:SetProperty(EFFECT_FLAG_PLAYER_TARGET)
e1:SetCode(EFFECT_CANNOT_SUMMON)
e1:SetTargetRange(1,0)
e1:SetTarget(cm.splimit)
e1:SetReset(RESET_PHASE+PHASE_END)
Duel.RegisterEffect(e1,tp)
end
end
function cm.splimit(e,c)
return not c.named_with_treasure
end
\ No newline at end of file
--海潮炮手
local m=60001225
local cm=_G["c"..m]
cm.name="海潮炮手"
function cm.initial_effect(c)
--to hand
local e1=Effect.CreateEffect(c)
e1:SetDescription(aux.Stringid(m,0))
e1:SetCategory(CATEGORY_TOHAND+CATEGORY_SEARCH)
e1:SetType(EFFECT_TYPE_TRIGGER_O+EFFECT_TYPE_SINGLE)
e1:SetProperty(EFFECT_FLAG_DELAY)
e1:SetCode(EVENT_SUMMON_SUCCESS)
e1:SetTarget(cm.thtg)
e1:SetOperation(cm.thop)
c:RegisterEffect(e1)
local e2=e1:Clone()
e2:SetCode(EVENT_SPSUMMON_SUCCESS)
c:RegisterEffect(e2)
--if not cm.global_check then
-- cm.global_check=true
-- local ge1=Effect.CreateEffect(c)
-- ge1:SetType(EFFECT_TYPE_FIELD+EFFECT_TYPE_CONTINUOUS)
--ge1:SetCode(EVENT_CHAIN_SOLVED)
--ge1:SetOperation(cm.checkop)
-- Duel.RegisterEffect(ge1,0)
-- end
--negate
local e2=Effect.CreateEffect(c)
e2:SetDescription(aux.Stringid(m,0))
e2:SetCategory(CATEGORY_DAMAGE)
e2:SetType(EFFECT_TYPE_QUICK_O)
e2:SetCode(EVENT_CHAINING)
e2:SetProperty(EFFECT_FLAG_DAMAGE_STEP+EFFECT_FLAG_DAMAGE_CAL)
e2:SetRange(LOCATION_MZONE)
e2:SetCondition(cm.rmcon)
e2:SetTarget(cm.sptg)
e2:SetOperation(cm.spop)
c:RegisterEffect(e2)
end
cm.named_with_treasure=true
--function cm.checkop(e,tp,eg,ep,ev,re,r,rp)
-- for i=1,ev do
-- local te,tgp=Duel.GetChainInfo(i,CHAININFO_TRIGGERING_EFFECT,CHAININFO_TRIGGERING_PLAYER)
-- local w=te:GetHandler()
-- if tgp==tp and w:IsSetCard(0x6a6) then
-- return Duel.RegisterFlagEffect(tp,m,RESET_PHASE+PHASE_END,0,1000)
-- end
-- end
--end
function cm.thfilter(c)
return c:IsCode(60001223) and c:IsAbleToHand()
end
function cm.thfilter2(c)
return c:IsCode(60001221) and c:IsAbleToHand()
end
function cm.thtg(e,tp,eg,ep,ev,re,r,rp,chk)
if Duel.GetFlagEffect(tp,60001211)<=6 then
if chk==0 then return Duel.IsExistingMatchingCard(cm.thfilter,tp,LOCATION_DECK+LOCATION_GRAVE,0,1,nil) end
Duel.SetOperationInfo(0,CATEGORY_TOHAND,nil,1,tp,LOCATION_DECK+LOCATION_GRAVE)
else
if chk==0 then return Duel.IsExistingMatchingCard(cm.thfilter2,tp,LOCATION_DECK+LOCATION_GRAVE,0,1,nil) end
Duel.SetOperationInfo(0,CATEGORY_TOHAND,nil,1,tp,LOCATION_DECK+LOCATION_GRAVE)
end
end
function cm.thop(e,tp,eg,ep,ev,re,r,rp)
Duel.Hint(HINT_SELECTMSG,tp,HINTMSG_ATOHAND)
if Duel.GetFlagEffect(tp,60001211)<=6 then
local g=Duel.SelectMatchingCard(tp,cm.thfilter,tp,LOCATION_DECK+LOCATION_GRAVE,0,1,1,nil)
if g:GetCount()>0 then
Duel.SendtoHand(g,nil,REASON_EFFECT)
Duel.ConfirmCards(1-tp,g)
end
else
local g=Duel.SelectMatchingCard(tp,cm.thfilter2,tp,LOCATION_DECK+LOCATION_GRAVE,0,1,1,nil)
if g:GetCount()>0 then
Duel.SendtoHand(g,nil,REASON_EFFECT)
Duel.ConfirmCards(1-tp,g)
end
end
end
function cm.rmcon(e,tp,eg,ep,ev,re,r,rp,s)
local s=re:GetHandler()
return rp==tp and s:IsSetCard(0x6a6)
end
function cm.sptg(e,tp,eg,ep,ev,re,r,rp,chk)
if chk==0 then return true end
Duel.SetTargetPlayer(1-tp)
Duel.SetTargetParam(400)
Duel.SetOperationInfo(0,CATEGORY_DAMAGE,nil,0,1-tp,400)
end
function cm.spop(e,tp,eg,ep,ev,re,r,rp)
local p,d=Duel.GetChainInfo(0,CHAININFO_TARGET_PLAYER,CHAININFO_TARGET_PARAM)
Duel.Damage(p,d,REASON_EFFECT)
end
\ No newline at end of file
--怒涛副船长
local m=60001226
local cm=_G["c"..m]
cm.name="怒涛副船长"
function cm.initial_effect(c)
--to hand
local e1=Effect.CreateEffect(c)
e1:SetDescription(aux.Stringid(m,0))
e1:SetCategory(CATEGORY_TOHAND+CATEGORY_SEARCH)
e1:SetType(EFFECT_TYPE_TRIGGER_O+EFFECT_TYPE_SINGLE)
e1:SetProperty(EFFECT_FLAG_DELAY)
e1:SetCode(EVENT_SUMMON_SUCCESS)
e1:SetTarget(cm.thtg)
e1:SetOperation(cm.thop)
c:RegisterEffect(e1)
local e2=e1:Clone()
e2:SetCode(EVENT_SPSUMMON_SUCCESS)
c:RegisterEffect(e2)
-- if not cm.global_check then
-- cm.global_check=true
-- local ge1=Effect.CreateEffect(c)
--- ge1:SetType(EFFECT_TYPE_FIELD+EFFECT_TYPE_CONTINUOUS)
-- ge1:SetCode(EVENT_CHAIN_SOLVED)
-- ge1:SetOperation(cm.checkop)
-- Duel.RegisterEffect(ge1,0)
-- end
--negate
local e2=Effect.CreateEffect(c)
e2:SetDescription(aux.Stringid(m,0))
e2:SetCategory(CATEGORY_LEAVE_GRAVE+CATEGORY_GRAVE_SPSUMMON+CATEGORY_SPECIAL_SUMMON)
e2:SetType(EFFECT_TYPE_QUICK_O)
e2:SetCode(EVENT_CHAINING)
e2:SetProperty(EFFECT_FLAG_DAMAGE_STEP+EFFECT_FLAG_DAMAGE_CAL)
e2:SetRange(LOCATION_MZONE)
e2:SetCondition(cm.rmcon)
e2:SetTarget(cm.sptg)
e2:SetOperation(cm.spop)
c:RegisterEffect(e2)
end
cm.named_with_treasure=true
--function cm.checkop(e,tp,eg,ep,ev,re,r,rp)
-- for i=1,ev do
-- local te,tgp=Duel.GetChainInfo(i,CHAININFO_TRIGGERING_EFFECT,CHAININFO_TRIGGERING_PLAYER)
-- local w=te:GetHandler()
-- if tgp==tp and w:IsSetCard(0x6a6) then
-- return Duel.RegisterFlagEffect(tp,m,RESET_PHASE+PHASE_END,0,1000)
-- end
--end
--end
function cm.thfilter(c)
return c:IsCode(60001222) and c:IsAbleToHand()
end
function cm.thfilter2(c)
return c:IsCode(60001221) and c:IsAbleToHand()
end
function cm.thtg(e,tp,eg,ep,ev,re,r,rp,chk)
if Duel.GetFlagEffect(tp,60001211)<=6 then
if chk==0 then return Duel.IsExistingMatchingCard(cm.thfilter,tp,LOCATION_DECK+LOCATION_GRAVE,0,1,nil) end
Duel.SetOperationInfo(0,CATEGORY_TOHAND,nil,1,tp,LOCATION_DECK+LOCATION_GRAVE)
else
if chk==0 then return Duel.IsExistingMatchingCard(cm.thfilter2,tp,LOCATION_DECK+LOCATION_GRAVE,0,1,nil) end
Duel.SetOperationInfo(0,CATEGORY_TOHAND,nil,1,tp,LOCATION_DECK+LOCATION_GRAVE)
end
end
function cm.thop(e,tp,eg,ep,ev,re,r,rp)
Duel.Hint(HINT_SELECTMSG,tp,HINTMSG_ATOHAND)
if Duel.GetFlagEffect(tp,60001211)<=6 then
local g=Duel.SelectMatchingCard(tp,cm.thfilter,tp,LOCATION_DECK+LOCATION_GRAVE,0,1,1,nil)
if g:GetCount()>0 then
Duel.SendtoHand(g,nil,REASON_EFFECT)
Duel.ConfirmCards(1-tp,g)
end
else
local g=Duel.SelectMatchingCard(tp,cm.thfilter2,tp,LOCATION_DECK+LOCATION_GRAVE,0,1,1,nil)
if g:GetCount()>0 then
Duel.SendtoHand(g,nil,REASON_EFFECT)
Duel.ConfirmCards(1-tp,g)
end
end
end
function cm.rmcon(e,tp,eg,ep,ev,re,r,rp,s)
local s=re:GetHandler()
return rp==tp and s:IsSetCard(0x6a6)
end
function cm.filter(c,e,tp)
return (c:IsCode(60001227) or c:IsCode(60001209)) and c:IsCanBeSpecialSummoned(e,0,tp,false,false)
end
function cm.sptg(e,tp,eg,ep,ev,re,r,rp,chk)
if chk==0 then return Duel.GetLocationCount(tp,LOCATION_MZONE)>0
and Duel.IsExistingMatchingCard(cm.filter,tp,LOCATION_DECK+LOCATION_GRAVE,0,1,nil,e,tp) end
Duel.SetOperationInfo(0,CATEGORY_SPECIAL_SUMMON,nil,1,tp,LOCATION_DECK+LOCATION_GRAVE)
end
function cm.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,cm.filter,tp,LOCATION_DECK+LOCATION_GRAVE,0,1,1,nil,e,tp)
if g:GetCount()>0 then
Duel.SpecialSummon(g,0,tp,tp,false,false,POS_FACEUP)
local e1=Effect.CreateEffect(e:GetHandler())
e1:SetType(EFFECT_TYPE_FIELD)
e1:SetProperty(EFFECT_FLAG_PLAYER_TARGET)
e1:SetCode(EFFECT_CANNOT_SPECIAL_SUMMON)
e1:SetTargetRange(1,0)
e1:SetTarget(cm.splimit)
e1:SetReset(RESET_PHASE+PHASE_END)
Duel.RegisterEffect(e1,tp)
end
end
function cm.splimit(e,c)
return c:IsType(TYPE_LINK)
end
\ No newline at end of file
--巡洋突击兵
local m=60001227
local cm=_G["c"..m]
cm.name="巡洋突击兵"
function cm.initial_effect(c)
--to grave
local e4=Effect.CreateEffect(c)
e4:SetDescription(aux.Stringid(m,1))
e4:SetCategory(CATEGORY_DAMAGE+CATEGORY_TOGRAVE)
e4:SetType(EFFECT_TYPE_SINGLE+EFFECT_TYPE_TRIGGER_O)
e4:SetCode(EVENT_BATTLE_START)
e4:SetTarget(cm.tgtg)
e4:SetOperation(cm.tgop)
c:RegisterEffect(e4)
--draw
local e7=Effect.CreateEffect(c)
e7:SetDescription(aux.Stringid(m,2))
e7:SetCategory(CATEGORY_SEARCH)
e7:SetType(EFFECT_TYPE_SINGLE+EFFECT_TYPE_TRIGGER_O)
e7:SetProperty(EFFECT_FLAG_DELAY)
e7:SetCode(EVENT_TO_GRAVE)
e7:SetCountLimit(1)
e7:SetCondition(cm.drcon)
e7:SetTarget(cm.drtg)
e7:SetOperation(cm.drop)
c:RegisterEffect(e7)
end
cm.named_with_treasure=true
function cm.tgtg(e,tp,eg,ep,ev,re,r,rp,chk)
local d=Duel.GetAttackTarget()
if chk==0 then return Duel.GetAttacker()==e:GetHandler() and d end
Duel.SetOperationInfo(0,CATEGORY_TOGRAVE,d,1,0,0)
end
function cm.tgop(e,tp,eg,ep,ev,re,r,rp)
local d=Duel.GetAttackTarget()
if d:IsRelateToBattle() then
Duel.SendtoGrave(d,REASON_EFFECT)
end
end
function cm.drcon(e,tp,eg,ep,ev,re,r,rp)
return e:GetHandler():IsPreviousLocation(LOCATION_ONFIELD)
end
function cm.filter(c)
return c:IsCode(60001224) and c:IsAbleToHand()
end
function cm.drtg(e,tp,eg,ep,ev,re,r,rp,chk)
if chk==0 then return Duel.IsExistingMatchingCard(cm.filter,tp,LOCATION_DECK+LOCATION_GRAVE,0,1,nil) end
Duel.SetOperationInfo(0,CATEGORY_TOHAND,nil,1,tp,LOCATION_DECK+LOCATION_GRAVE)
end
function cm.drop(e,tp,eg,ep,ev,re,r,rp)
Duel.Hint(HINT_SELECTMSG,tp,HINTMSG_ATOHAND)
local g=Duel.SelectMatchingCard(tp,cm.filter,tp,LOCATION_DECK+LOCATION_GRAVE,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
......@@ -43,7 +43,7 @@ function cm.initial_effect(c)
e4:SetOperation(cm.winop)
c:RegisterEffect(e4)
end
cm.xyz_number=88
aux.xyz_number[m]=88
function cm.ovfilter(c)
return c:IsFaceup() and c:IsSetCard(0x1083) and c:IsRankBelow(8)
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