Commit 94bc3736 authored by Nemo Ma's avatar Nemo Ma

fix

parent 64170b8d
No preview for this file type
expansions/pics/15000470.jpg

53.5 KB | W: | H:

expansions/pics/15000470.jpg

57.6 KB | W: | H:

expansions/pics/15000470.jpg
expansions/pics/15000470.jpg
expansions/pics/15000470.jpg
expansions/pics/15000470.jpg
  • 2-up
  • Swipe
  • Onion skin
expansions/pics/15000471.jpg

55.8 KB | W: | H:

expansions/pics/15000471.jpg

60.9 KB | W: | H:

expansions/pics/15000471.jpg
expansions/pics/15000471.jpg
expansions/pics/15000471.jpg
expansions/pics/15000471.jpg
  • 2-up
  • Swipe
  • Onion skin
expansions/pics/15000472.jpg

56.8 KB | W: | H:

expansions/pics/15000472.jpg

62.1 KB | W: | H:

expansions/pics/15000472.jpg
expansions/pics/15000472.jpg
expansions/pics/15000472.jpg
expansions/pics/15000472.jpg
  • 2-up
  • Swipe
  • Onion skin
expansions/pics/15000473.jpg

60.3 KB | W: | H:

expansions/pics/15000473.jpg

68.4 KB | W: | H:

expansions/pics/15000473.jpg
expansions/pics/15000473.jpg
expansions/pics/15000473.jpg
expansions/pics/15000473.jpg
  • 2-up
  • Swipe
  • Onion skin
expansions/pics/15000474.jpg

57.7 KB | W: | H:

expansions/pics/15000474.jpg

60.2 KB | W: | H:

expansions/pics/15000474.jpg
expansions/pics/15000474.jpg
expansions/pics/15000474.jpg
expansions/pics/15000474.jpg
  • 2-up
  • Swipe
  • Onion skin
expansions/pics/15000480.jpg

53 KB | W: | H:

expansions/pics/15000480.jpg

56.8 KB | W: | H:

expansions/pics/15000480.jpg
expansions/pics/15000480.jpg
expansions/pics/15000480.jpg
expansions/pics/15000480.jpg
  • 2-up
  • Swipe
  • Onion skin
expansions/pics/15000481.jpg

52.9 KB | W: | H:

expansions/pics/15000481.jpg

54.7 KB | W: | H:

expansions/pics/15000481.jpg
expansions/pics/15000481.jpg
expansions/pics/15000481.jpg
expansions/pics/15000481.jpg
  • 2-up
  • Swipe
  • Onion skin
expansions/pics/15000482.jpg

52.8 KB | W: | H:

expansions/pics/15000482.jpg

53.4 KB | W: | H:

expansions/pics/15000482.jpg
expansions/pics/15000482.jpg
expansions/pics/15000482.jpg
expansions/pics/15000482.jpg
  • 2-up
  • Swipe
  • Onion skin
expansions/pics/15000483.jpg

56.7 KB | W: | H:

expansions/pics/15000483.jpg

64.1 KB | W: | H:

expansions/pics/15000483.jpg
expansions/pics/15000483.jpg
expansions/pics/15000483.jpg
expansions/pics/15000483.jpg
  • 2-up
  • Swipe
  • Onion skin
expansions/pics/40009178.jpg

44.2 KB | W: | H:

expansions/pics/40009178.jpg

43.2 KB | W: | H:

expansions/pics/40009178.jpg
expansions/pics/40009178.jpg
expansions/pics/40009178.jpg
expansions/pics/40009178.jpg
  • 2-up
  • Swipe
  • Onion skin
expansions/pics/40009181.jpg

47.3 KB | W: | H:

expansions/pics/40009181.jpg

46.9 KB | W: | H:

expansions/pics/40009181.jpg
expansions/pics/40009181.jpg
expansions/pics/40009181.jpg
expansions/pics/40009181.jpg
  • 2-up
  • Swipe
  • Onion skin
expansions/pics/40009184.jpg

49.8 KB | W: | H:

expansions/pics/40009184.jpg

48.4 KB | W: | H:

expansions/pics/40009184.jpg
expansions/pics/40009184.jpg
expansions/pics/40009184.jpg
expansions/pics/40009184.jpg
  • 2-up
  • Swipe
  • Onion skin
expansions/pics/40009187.jpg

49.3 KB | W: | H:

expansions/pics/40009187.jpg

48.4 KB | W: | H:

expansions/pics/40009187.jpg
expansions/pics/40009187.jpg
expansions/pics/40009187.jpg
expansions/pics/40009187.jpg
  • 2-up
  • Swipe
  • Onion skin
expansions/pics/40009190.jpg

50.1 KB | W: | H:

expansions/pics/40009190.jpg

49.3 KB | W: | H:

expansions/pics/40009190.jpg
expansions/pics/40009190.jpg
expansions/pics/40009190.jpg
expansions/pics/40009190.jpg
  • 2-up
  • Swipe
  • Onion skin
expansions/pics/40009193.jpg

51.4 KB | W: | H:

expansions/pics/40009193.jpg

50.7 KB | W: | H:

expansions/pics/40009193.jpg
expansions/pics/40009193.jpg
expansions/pics/40009193.jpg
expansions/pics/40009193.jpg
  • 2-up
  • Swipe
  • Onion skin
expansions/pics/40009196.jpg

48.8 KB | W: | H:

expansions/pics/40009196.jpg

49.4 KB | W: | H:

expansions/pics/40009196.jpg
expansions/pics/40009196.jpg
expansions/pics/40009196.jpg
expansions/pics/40009196.jpg
  • 2-up
  • Swipe
  • Onion skin
expansions/pics/40009199.jpg

49.1 KB | W: | H:

expansions/pics/40009199.jpg

49.6 KB | W: | H:

expansions/pics/40009199.jpg
expansions/pics/40009199.jpg
expansions/pics/40009199.jpg
expansions/pics/40009199.jpg
  • 2-up
  • Swipe
  • Onion skin
expansions/pics/40009202.jpg

53.9 KB | W: | H:

expansions/pics/40009202.jpg

53.9 KB | W: | H:

expansions/pics/40009202.jpg
expansions/pics/40009202.jpg
expansions/pics/40009202.jpg
expansions/pics/40009202.jpg
  • 2-up
  • Swipe
  • Onion skin
expansions/pics/40009205.jpg

53.1 KB | W: | H:

expansions/pics/40009205.jpg

53.3 KB | W: | H:

expansions/pics/40009205.jpg
expansions/pics/40009205.jpg
expansions/pics/40009205.jpg
expansions/pics/40009205.jpg
  • 2-up
  • Swipe
  • Onion skin
expansions/pics/40009207.jpg

45.1 KB | W: | H:

expansions/pics/40009207.jpg

44.9 KB | W: | H:

expansions/pics/40009207.jpg
expansions/pics/40009207.jpg
expansions/pics/40009207.jpg
expansions/pics/40009207.jpg
  • 2-up
  • Swipe
  • Onion skin
expansions/pics/40009208.jpg

49.1 KB | W: | H:

expansions/pics/40009208.jpg

49.1 KB | W: | H:

expansions/pics/40009208.jpg
expansions/pics/40009208.jpg
expansions/pics/40009208.jpg
expansions/pics/40009208.jpg
  • 2-up
  • Swipe
  • Onion skin
expansions/pics/40009209.jpg

50.5 KB | W: | H:

expansions/pics/40009209.jpg

50.7 KB | W: | H:

expansions/pics/40009209.jpg
expansions/pics/40009209.jpg
expansions/pics/40009209.jpg
expansions/pics/40009209.jpg
  • 2-up
  • Swipe
  • Onion skin
......@@ -43,7 +43,7 @@ function cm.spop(e,tp,eg,ep,ev,re,r,rp)
Duel.SpecialSummon(c,0,tp,tp,false,false,POS_FACEUP)
end
function cm.spfilter(c,att,rac,lv,e,tp)
return (c:IsSetCard(0xaf34) or c:IsSetCard(0x41)) and c:GetLevel()>lv and c:GetLevel()<=lv+3 and c:IsAttribute(att) and c:IsRace(rac) and c:IsCanBeSpecialSummoned(e,0,tp,true,true)
return (c:IsSetCard(0x3f34) or c:IsSetCard(0x41)) and c:GetLevel()>lv and c:GetLevel()<=lv+3 and c:IsAttribute(att) and c:IsRace(rac) and c:IsCanBeSpecialSummoned(e,0,tp,true,true)
end
function cm.sp2filter(c)
return c:IsSetCard(0x41) and c:IsLevelBelow(4)
......
......@@ -2,6 +2,13 @@ local m=15000471
local cm=_G["c"..m]
cm.name="星拟龙·零时之默迦尔 LV5"
function cm.initial_effect(c)
--cannot special summon
local e0=Effect.CreateEffect(c)
e0:SetType(EFFECT_TYPE_SINGLE)
e0:SetProperty(EFFECT_FLAG_CANNOT_DISABLE+EFFECT_FLAG_UNCOPYABLE)
e0:SetCode(EFFECT_SPSUMMON_CONDITION)
e0:SetValue(cm.splimit)
c:RegisterEffect(e0)
--search
local e1=Effect.CreateEffect(c)
e1:SetCategory(CATEGORY_TOHAND+CATEGORY_SEARCH)
......@@ -37,12 +44,15 @@ function cm.initial_effect(c)
end
cm.lvup={15000472}
cm.lvdn={15000470}
function cm.splimit(e,se,sp,st)
return se:IsHasType(EFFECT_TYPE_ACTIONS)
end
function cm.cost(e,tp,eg,ep,ev,re,r,rp,chk)
if chk==0 then return e:GetHandler():IsAbleToGraveAsCost() end
Duel.SendtoGrave(e:GetHandler(),REASON_COST)
end
function cm.filter(c,lv)
return (c:IsSetCard(0xaf34) or c:IsSetCard(0x41)) and c:GetLevel()<lv and c:IsAbleToHand() and c:IsType(TYPE_MONSTER)
return (c:IsSetCard(0x3f34) or c:IsSetCard(0x41)) and c:GetLevel()<lv and c:IsAbleToHand() and c:IsType(TYPE_MONSTER)
end
function cm.target(e,tp,eg,ep,ev,re,r,rp,chk)
if chk==0 then return Duel.IsExistingMatchingCard(cm.filter,tp,LOCATION_DECK,0,1,nil,e:GetHandler():GetLevel()) end
......@@ -78,7 +88,7 @@ function cm.stop(e,tp,eg,ep,ev,re,r,rp)
end
end
function cm.spfilter(c,att,rac,lv,e,tp)
return (c:IsSetCard(0xaf34) or c:IsSetCard(0x41)) and c:GetLevel()>lv and c:GetLevel()<=lv+3 and c:IsAttribute(att) and c:IsRace(rac) and c:IsCanBeSpecialSummoned(e,0,tp,true,true)
return (c:IsSetCard(0x3f34) or c:IsSetCard(0x41)) and c:GetLevel()>lv and c:GetLevel()<=lv+3 and c:IsAttribute(att) and c:IsRace(rac) and c:IsCanBeSpecialSummoned(e,0,tp,true,true)
end
function cm.sp2filter(c)
return c:IsLevelBelow(6)
......
......@@ -2,6 +2,13 @@ local m=15000472
local cm=_G["c"..m]
cm.name="星拟龙·零时之默迦尔 LV8"
function cm.initial_effect(c)
--cannot special summon
local e0=Effect.CreateEffect(c)
e0:SetType(EFFECT_TYPE_SINGLE)
e0:SetProperty(EFFECT_FLAG_CANNOT_DISABLE+EFFECT_FLAG_UNCOPYABLE)
e0:SetCode(EFFECT_SPSUMMON_CONDITION)
e0:SetValue(cm.splimit)
c:RegisterEffect(e0)
--search
local e1=Effect.CreateEffect(c)
e1:SetCategory(CATEGORY_TOHAND+CATEGORY_SEARCH)
......@@ -37,12 +44,15 @@ function cm.initial_effect(c)
end
cm.lvup={15000473}
cm.lvdn={15000471}
function cm.splimit(e,se,sp,st)
return se:IsHasType(EFFECT_TYPE_ACTIONS)
end
function cm.cost(e,tp,eg,ep,ev,re,r,rp,chk)
if chk==0 then return e:GetHandler():IsAbleToGraveAsCost() end
Duel.SendtoGrave(e:GetHandler(),REASON_COST)
end
function cm.filter(c,lv)
return (c:IsSetCard(0xaf34) or c:IsSetCard(0x41)) and c:GetLevel()<lv and c:IsAbleToHand() and c:IsType(TYPE_MONSTER)
return (c:IsSetCard(0x3f34) or c:IsSetCard(0x41)) and c:GetLevel()<lv and c:IsAbleToHand() and c:IsType(TYPE_MONSTER)
end
function cm.target(e,tp,eg,ep,ev,re,r,rp,chk)
if chk==0 then return Duel.IsExistingMatchingCard(cm.filter,tp,LOCATION_DECK,0,1,nil,e:GetHandler():GetLevel()) end
......@@ -69,7 +79,7 @@ function cm.spop(e,tp,eg,ep,ev,re,r,rp)
Duel.SendtoGrave(g,REASON_EFFECT)
end
function cm.spfilter(c,att,rac,lv,e,tp)
return (c:IsSetCard(0xaf34) or c:IsSetCard(0x41)) and c:GetLevel()>lv and c:GetLevel()<=lv+3 and c:IsAttribute(att) and c:IsRace(rac) and c:IsCanBeSpecialSummoned(e,0,tp,true,true)
return (c:IsSetCard(0x3f34) or c:IsSetCard(0x41)) and c:GetLevel()>lv and c:GetLevel()<=lv+3 and c:IsAttribute(att) and c:IsRace(rac) and c:IsCanBeSpecialSummoned(e,0,tp,true,true)
end
function cm.sp2filter(c)
return c:IsLevelBelow(9)
......
......@@ -2,13 +2,13 @@ local m=15000473
local cm=_G["c"..m]
cm.name="星拟龙·零时之默迦尔 LV10"
function cm.initial_effect(c)
aux.AddCodeList(c,15000472)
c:EnableReviveLimit()
--cannot special summon
--cannot special Summon
local e0=Effect.CreateEffect(c)
e0:SetProperty(EFFECT_FLAG_CANNOT_DISABLE+EFFECT_FLAG_UNCOPYABLE)
e0:SetType(EFFECT_TYPE_SINGLE)
e0:SetProperty(EFFECT_FLAG_CANNOT_DISABLE+EFFECT_FLAG_UNCOPYABLE)
e0:SetCode(EFFECT_SPSUMMON_CONDITION)
e0:SetValue(aux.FALSE)
c:RegisterEffect(e0)
--search
local e1=Effect.CreateEffect(c)
......@@ -37,7 +37,7 @@ function cm.cost(e,tp,eg,ep,ev,re,r,rp,chk)
Duel.SendtoGrave(e:GetHandler(),REASON_COST)
end
function cm.filter(c,lv)
return (c:IsSetCard(0xaf34) or c:IsSetCard(0x41)) and c:GetLevel()<lv and c:IsAbleToHand() and c:IsType(TYPE_MONSTER)
return (c:IsSetCard(0x3f34) or c:IsSetCard(0x41)) and c:GetLevel()<lv and c:IsAbleToHand() and c:IsType(TYPE_MONSTER)
end
function cm.target(e,tp,eg,ep,ev,re,r,rp,chk)
local c=e:GetHandler()
......@@ -64,16 +64,17 @@ function cm.distg(e,tp,eg,ep,ev,re,r,rp,chk)
end
end
function cm.tdfilter(c)
return c:IsSetCard(0xaf34) and c:IsAbleToDeck()
return c:IsSetCard(0x3f34) and c:IsAbleToDeck()
end
function cm.disop(e,tp,eg,ep,ev,re,r,rp)
local c=e:GetHandler()
local tp=c:GetControler()
if Duel.NegateEffect(ev) and re:GetHandler():IsRelateToEffect(re) then
Duel.Destroy(eg,REASON_EFFECT)
local x=Duel.Destroy(eg,REASON_EFFECT)
if x==0 then return end
Duel.BreakEffect()
local fg=Duel.GetMatchingGroup(cm.tdfilter,tp,LOCATION_GRAVE,0,nil)
local g=Duel.GetMatchingGroup(Card.IsSetCard,tp,LOCATION_GRAVE,0,nil,0xaf34)
local g=Duel.GetMatchingGroup(Card.IsSetCard,tp,LOCATION_GRAVE,0,nil,0x3f34)
local x=g:GetClassCount(Card.GetCode)
if x>=3 and fg:GetCount()~=0 and Duel.SelectYesNo(tp,aux.Stringid(m,0)) then
local qg=Duel.SelectMatchingCard(tp,cm.tdfilter,tp,LOCATION_GRAVE,0,1,99,nil)
......
......@@ -2,6 +2,7 @@ local m=15000474
local cm=_G["c"..m]
cm.name="星拟小龙"
function cm.initial_effect(c)
c:SetSPSummonOnce(m)
--link summon
aux.AddLinkProcedure(c,aux.FilterBoolFunction(Card.IsLinkSetCard,0x41),1,1)
c:EnableReviveLimit()
......
......@@ -23,7 +23,7 @@ function cm.initial_effect(c)
c:RegisterEffect(e2)
end
function cm.spfilter(c,e,tp)
return c:IsSetCard(0xaf34) and c:IsCanBeSpecialSummoned(e,0,tp,false,false)
return c:IsSetCard(0x3f34) and c:IsCanBeSpecialSummoned(e,0,tp,false,false)
end
function cm.target(e,tp,eg,ep,ev,re,r,rp,chk,chkc)
local tp=e:GetHandler():GetControler()
......@@ -43,7 +43,7 @@ function cm.operation(e,tp,eg,ep,ev,re,r,rp)
end
end
function cm.filter(c)
return (c:IsSetCard(0xaf34) or c:IsSetCard(0x41)) and c:IsType(TYPE_MONSTER) and c:IsAbleToHand()
return (c:IsSetCard(0x3f34) or c:IsSetCard(0x41)) and c:IsType(TYPE_MONSTER) and c:IsAbleToHand()
end
function cm.thtg(e,tp,eg,ep,ev,re,r,rp,chk)
local tp=e:GetHandler():GetControler()
......
......@@ -25,6 +25,7 @@ function cm.initial_effect(c)
e2:SetTarget(cm.sp2tg)
e2:SetOperation(cm.sp2op)
c:RegisterEffect(e2)
cm.self_flip_effect2=e2
--special summon
local e3=Effect.CreateEffect(c)
e3:SetCategory(CATEGORY_SPECIAL_SUMMON)
......@@ -32,9 +33,8 @@ function cm.initial_effect(c)
e3:SetType(EFFECT_TYPE_FIELD+EFFECT_TYPE_TRIGGER_O)
e3:SetRange(LOCATION_GRAVE)
e3:SetCode(EVENT_CHAINING)
e3:SetProperty(EFFECT_FLAG_DAMAGE_STEP+EFFECT_FLAG_DAMAGE_CAL)
e3:SetProperty(EFFECT_FLAG_DAMAGE_STEP+EFFECT_FLAG_DAMAGE_CAL+EFFECT_FLAG_DELAY)
e3:SetCountLimit(1,m)
e3:SetProperty(EFFECT_FLAG_DELAY)
e3:SetCondition(cm.spcon1)
e3:SetTarget(cm.sptg1)
e3:SetOperation(cm.spop1)
......@@ -44,7 +44,7 @@ function cm.filter(c,e,tp)
return c:IsSetCard(0xf3b) and c:IsType(TYPE_MONSTER) and not c:IsCode(15000541) and (c:IsCanBeSpecialSummoned(e,0,tp,false,false,POS_FACEUP_ATTACK) or c:IsCanBeSpecialSummoned(e,0,tp,false,false,POS_FACEDOWN_DEFENSE))
end
function cm.condition(e,tp,eg,ep,ev,re,r,rp)
return not re or not re:GetHandler()==e:GetHandler()
return not re or not re==cm.self_flip_effect2
end
function cm.target(e,tp,eg,ep,ev,re,r,rp,chk)
if chk==0 then return Duel.GetLocationCount(tp,LOCATION_MZONE)>0
......
......@@ -25,6 +25,7 @@ function cm.initial_effect(c)
e2:SetTarget(cm.tgtg)
e2:SetOperation(cm.tgop)
c:RegisterEffect(e2)
cm.self_flip_effect2=e2
--special summon
local e3=Effect.CreateEffect(c)
e3:SetCategory(CATEGORY_SPECIAL_SUMMON)
......@@ -32,16 +33,15 @@ function cm.initial_effect(c)
e3:SetType(EFFECT_TYPE_FIELD+EFFECT_TYPE_TRIGGER_O)
e3:SetRange(LOCATION_GRAVE)
e3:SetCode(EVENT_CHAINING)
e3:SetProperty(EFFECT_FLAG_DAMAGE_STEP+EFFECT_FLAG_DAMAGE_CAL)
e3:SetProperty(EFFECT_FLAG_DAMAGE_STEP+EFFECT_FLAG_DAMAGE_CAL+EFFECT_FLAG_DELAY)
e3:SetCountLimit(1,m)
e3:SetProperty(EFFECT_FLAG_DELAY)
e3:SetCondition(cm.spcon1)
e3:SetTarget(cm.sptg1)
e3:SetOperation(cm.spop1)
c:RegisterEffect(e3)
end
function cm.condition(e,tp,eg,ep,ev,re,r,rp)
return not re or not re:GetHandler()==e:GetHandler()
return not re or not re==cm.self_flip_effect2
end
function cm.target(e,tp,eg,ep,ev,re,r,rp,chk)
if chk==0 then return Duel.IsExistingTarget(aux.TURE,tp,LOCATION_ONFIELD,LOCATION_ONFIELD,1,nil) end
......
......@@ -25,6 +25,7 @@ function cm.initial_effect(c)
e2:SetTarget(cm.sp2tg)
e2:SetOperation(cm.sp2op)
c:RegisterEffect(e2)
cm.self_flip_effect2=e2
--special summon
local e3=Effect.CreateEffect(c)
e3:SetCategory(CATEGORY_SPECIAL_SUMMON)
......@@ -32,9 +33,8 @@ function cm.initial_effect(c)
e3:SetType(EFFECT_TYPE_FIELD+EFFECT_TYPE_TRIGGER_O)
e3:SetRange(LOCATION_GRAVE)
e3:SetCode(EVENT_CHAINING)
e3:SetProperty(EFFECT_FLAG_DAMAGE_STEP+EFFECT_FLAG_DAMAGE_CAL)
e3:SetProperty(EFFECT_FLAG_DAMAGE_STEP+EFFECT_FLAG_DAMAGE_CAL+EFFECT_FLAG_DELAY)
e3:SetCountLimit(1,m)
e3:SetProperty(EFFECT_FLAG_DELAY)
e3:SetCondition(cm.spcon1)
e3:SetTarget(cm.sptg1)
e3:SetOperation(cm.spop1)
......@@ -44,7 +44,7 @@ function cm.filter(c,e,tp)
return c:IsSetCard(0xf3b) and c:IsType(TYPE_SPELL+TYPE_TRAP) and c:IsAbleToHand()
end
function cm.condition(e,tp,eg,ep,ev,re,r,rp)
return not re or not re:GetHandler()==e:GetHandler()
return not re or not re==cm.self_flip_effect2
end
function cm.target(e,tp,eg,ep,ev,re,r,rp,chk)
if chk==0 then return Duel.IsExistingMatchingCard(cm.filter,tp,LOCATION_DECK,0,1,nil,e,tp) end
......
......@@ -29,10 +29,9 @@ function cm.initial_effect(c)
cm.global_check=true
cm[0]=0
cm[1]=0
cm[2]=0
local ge1=Effect.CreateEffect(c)
ge1:SetType(EFFECT_TYPE_FIELD+EFFECT_TYPE_CONTINUOUS)
ge1:SetCode(EVENT_DESTROYED)
ge1:SetCode(EVENT_DESTROY)
ge1:SetOperation(cm.checkop)
Duel.RegisterEffect(ge1,0)
local ge2=Effect.CreateEffect(c)
......@@ -87,10 +86,9 @@ end
function cm.checkop(e,tp,eg,ep,ev,re,r,rp)
local tc=eg:GetFirst()
while tc do
if tc:IsSetCard(0xaf6) and tc:IsType(TYPE_PENDULUM) and tc:GetPreviousControler()==tp then
if tc:GetPreviousLocation()==LOCATION_HAND then cm[0]=1 end
if tc:GetPreviousLocation()==LOCATION_SZONE then cm[1]=1 end
if tc:GetPreviousLocation()==LOCATION_MZONE then cm[2]=1 end
if tc:IsSetCard(0xaf6) and tc:IsType(TYPE_PENDULUM) then
local p=tc:GetControler()
if cm[p]<3 then cm[p]=cm[p]+1 end
end
tc=eg:GetNext()
end
......@@ -98,20 +96,19 @@ end
function cm.clearop(e,tp,eg,ep,ev,re,r,rp)
cm[0]=0
cm[1]=0
cm[2]=0
end
function cm.drcon(e,tp,eg,ep,ev,re,r,rp)
local ct=cm[0]+cm[1]+cm[2]
local ct=cm[tp]
return ct>0 and Duel.GetTurnPlayer()==tp
end
function cm.drtg(e,tp,eg,ep,ev,re,r,rp,chk)
local ct=cm[0]+cm[1]+cm[2]
local ct=cm[tp]
if chk==0 then return Duel.IsPlayerCanDraw(tp,ct) end
Duel.SetOperationInfo(0,CATEGORY_DRAW,nil,0,tp,ct)
end
function cm.drop(e,tp,eg,ep,ev,re,r,rp)
if not e:GetHandler():IsRelateToEffect(e) then return end
local ct=cm[0]+cm[1]+cm[2]
local ct=cm[tp]
Duel.Draw(tp,ct,REASON_EFFECT)
end
......
......@@ -166,15 +166,16 @@ function c33400413.atkop(e,tp,eg,ep,ev,re,r,rp)
end
function c33400413.desfilter1(c)
return c:IsReleasable() and (c:IsSetCard(0x341) or c:IsSetCard(0x340) or c:IsSetCard(0x6343))
return (c:IsSetCard(0x341) or c:IsSetCard(0x340) or c:IsSetCard(0x6343))
and Duel.IsExistingTarget(nil,tp,LOCATION_ONFIELD,LOCATION_ONFIELD,1,c)
end
function c33400413.destg(e,tp,eg,ep,ev,re,r,rp,chk,chkc)
if chkc then return chkc:IsOnField() end
if chk==0 then return Duel.IsExistingTarget(nil,tp,0,LOCATION_ONFIELD,1,nil) and Duel.IsExistingTarget(c33400413.desfilter1,tp,LOCATION_ONFIELD,0,1,nil) end
if chk==0 then return Duel.IsExistingTarget(c33400413.desfilter1,tp,LOCATION_ONFIELD,0,1,nil) end
Duel.Hint(HINT_SELECTMSG,tp,HINTMSG_DESTROY)
local g1=Duel.SelectTarget(tp,c33400413.desfilter1,tp,LOCATION_ONFIELD,0,1,1,nil)
Duel.Hint(HINT_SELECTMSG,tp,HINTMSG_DESTROY)
local g2=Duel.SelectTarget(tp,nil,tp,0,LOCATION_ONFIELD,1,2,nil)
local g2=Duel.SelectTarget(tp,nil,tp,LOCATION_ONFIELD,LOCATION_ONFIELD,1,2,g1)
g1:Merge(g2)
Duel.SetOperationInfo(0,CATEGORY_DESTROY,g1,g1:GetCount(),0,0)
end
......
......@@ -2,9 +2,18 @@
local m=33400811
local cm=_G["c"..m]
function cm.initial_effect(c)
--fusion material
--fusion material
c:EnableReviveLimit()
aux.AddFusionProcFunRep(c,aux.FilterBoolFunction(Card.IsFusionSetCard,0xa341),2,true)
--spsummon
local e0=Effect.CreateEffect(c)
e0:SetType(EFFECT_TYPE_FIELD)
e0:SetProperty(EFFECT_FLAG_CANNOT_DISABLE+EFFECT_FLAG_UNCOPYABLE)
e0:SetCode(EFFECT_SPSUMMON_PROC)
e0:SetRange(LOCATION_EXTRA)
e0:SetCondition(cm.hspcon)
e0:SetOperation(cm.hspop)
c:RegisterEffect(e0)
--move
local e1=Effect.CreateEffect(c)
e1:SetDescription(aux.Stringid(m,2))
......@@ -24,9 +33,37 @@ function cm.initial_effect(c)
e2:SetRange(LOCATION_MZONE)
e2:SetCountLimit(1,m+10000)
e2:SetCondition(cm.stcon)
e2:SetTarget(cm.sttg)
e2:SetOperation(cm.stop)
c:RegisterEffect(e2)
end
function cm.hspfilter(c,tp,sc)
return c:IsSetCard(0xa341) and Duel.GetFlagEffect(tp,c:GetCode())==0
and c:IsControler(tp) and c:IsCanBeFusionMaterial(sc,SUMMON_TYPE_SPECIAL) and Duel.CheckReleaseGroup(c:GetControler(),cm.hspfilter2,1,c,c:GetControler(),sc,tc)
end
function cm.hspfilter2(c,tp,sc,tc)
local g=Group.CreateGroup()
g:AddCard(tc)
g:AddCard(c)
return c:IsSetCard(0xa341)
and c:IsControler(tp) and Duel.GetLocationCountFromEx(tp,tp,g,sc)>0 and c:IsCanBeFusionMaterial(sc,SUMMON_TYPE_SPECIAL)
end
function cm.hspcon(e,c)
if c==nil then return true end
return Duel.CheckReleaseGroup(c:GetControler(),cm.hspfilter,1,nil,c:GetControler(),c)
end
function cm.hspop(e,tp,eg,ep,ev,re,r,rp,c)
local g1=Duel.SelectReleaseGroup(tp,cm.hspfilter,1,1,nil,tp,c)
local tc1=g1:GetFirst()
local g2=Duel.SelectReleaseGroup(tp,cm.hspfilter2,1,1,tc1,tp,c,tc1)
local tc2=g2:GetFirst()
g2:Merge(g1)
c:SetMaterial(g2)
Duel.Release(g2,REASON_COST)
Duel.RegisterFlagEffect(tp,tc1:GetCode(),RESET_EVENT+RESET_PHASE+PHASE_END,0,0)
Duel.RegisterFlagEffect(tp,tc2:GetCode(),RESET_EVENT+RESET_PHASE+PHASE_END,0,0)
end
function cm.seqfilter(c)
return c:IsFaceup()
end
......@@ -79,6 +116,10 @@ end
function cm.setfilter(c)
return c:IsSetCard(0xa341) and c:IsType(TYPE_TRAP+TYPE_SPELL) and c:IsSSetable()
end
function cm.sttg(e,tp,eg,ep,ev,re,r,rp,chk)
if chk==0 then return true end
Duel.RegisterFlagEffect(tp,m,RESET_EVENT+RESET_PHASE+PHASE_END,0,0)
end
function cm.stop(e,tp,eg,ep,ev,re,r,rp)
c=e:GetHandler()
if not c:IsRelateToEffect(e) then return end
......@@ -103,10 +144,10 @@ function cm.stop(e,tp,eg,ep,ev,re,r,rp)
e2:SetReset(RESET_PHASE+ph)
Duel.RegisterEffect(e2,tp)
else
if Duel.IsExistingMatchingCard(cm.setfilter,tp,LOCATION_GRAVE+LOCATION_REMOVED,0,1,nil)
if Duel.IsExistingMatchingCard(cm.setfilter,tp,LOCATION_DECK+LOCATION_REMOVED,0,1,nil)
and Duel.SelectYesNo(tp,aux.Stringid(m,1))then
Duel.Hint(HINT_SELECTMSG,tp,HINTMSG_SET)
local g=Duel.SelectMatchingCard(tp,cm.setfilter,tp,LOCATION_GRAVE+LOCATION_REMOVED,0,1,1,nil)
local g=Duel.SelectMatchingCard(tp,cm.setfilter,tp,LOCATION_DECK+LOCATION_REMOVED,0,1,1,nil)
local tc=g:GetFirst()
if Duel.SSet(tp,tc)~=0 then
local e1=Effect.CreateEffect(e:GetHandler())
......
......@@ -2,12 +2,19 @@
local m=33400855
local cm=_G["c"..m]
function cm.initial_effect(c)
--Activate
--Activate
local e0=Effect.CreateEffect(c)
e0:SetType(EFFECT_TYPE_ACTIVATE)
e0:SetCode(EVENT_FREE_CHAIN)
c:RegisterEffect(e0)
--special
local e1=Effect.CreateEffect(c)
e1:SetCategory(CATEGORY_SPECIAL_SUMMON)
e1:SetType(EFFECT_TYPE_ACTIVATE)
e1:SetType(EFFECT_TYPE_FIELD+EFFECT_TYPE_TRIGGER_O)
e1:SetCode(EVENT_SPSUMMON_SUCCESS)
e1:SetCountLimit(1,m+EFFECT_COUNT_CODE_OATH)
e1:SetProperty(EFFECT_FLAG_DELAY)
e1:SetRange(LOCATION_SZONE)
e1:SetCountLimit(1,m)
e1:SetCondition(cm.condition)
e1:SetTarget(cm.target)
e1:SetOperation(cm.activate)
......@@ -15,26 +22,20 @@ function cm.initial_effect(c)
local e4=e1:Clone()
e1:SetCode(EVENT_SUMMON_SUCCESS)
c:RegisterEffect(e4)
--move
local e3=Effect.CreateEffect(c)
e3:SetDescription(aux.Stringid(m,0))
e3:SetType(EFFECT_TYPE_IGNITION)
e3:SetProperty(EFFECT_FLAG_CARD_TARGET)
e3:SetRange(LOCATION_GRAVE)
e3:SetCountLimit(1)
e3:SetCost(aux.bfgcost)
e3:SetTarget(cm.mvtg)
e3:SetOperation(cm.mvop)
c:RegisterEffect(e3)
local e2=e3:Clone()
e2:SetType(EFFECT_TYPE_QUICK_O)
e2:SetCode(EVENT_FREE_CHAIN)
e2:SetCondition(cm.con)
c:RegisterEffect(e2)
--spsummon
local e6=Effect.CreateEffect(c)
e6:SetDescription(aux.Stringid(33401302,1))
e6:SetCategory(CATEGORY_SPECIAL_SUMMON)
e6:SetType(EFFECT_TYPE_IGNITION)
e6:SetRange(LOCATION_SZONE)
e6:SetCountLimit(1)
e6:SetTarget(cm.sptg2)
e6:SetOperation(cm.spop2)
c:RegisterEffect(e6)
end
function cm.cfilter(c,tp)
return c:GetSummonPlayer()==tp
return c:GetSummonPlayer()==tp and c:IsSetCard(0xa341)
end
function cm.condition(e,tp,eg,ep,ev,re,r,rp)
return eg:IsExists(cm.cfilter,1,nil,tp)
......@@ -48,7 +49,7 @@ function cm.target(e,tp,eg,ep,ev,re,r,rp,chk)
Duel.SetOperationInfo(0,CATEGORY_SPECIAL_SUMMON,nil,1,tp,LOCATION_DECK)
end
function cm.activate(e,tp,eg,ep,ev,re,r,rp)
if Duel.GetLocationCount(tp,LOCATION_MZONE)<=0 then return end
if Duel.GetLocationCount(tp,LOCATION_MZONE)<=0 or not e:GetHandler():IsRelateToEffect(e) then return end
Duel.Hint(HINT_SELECTMSG,tp,HINTMSG_SPSUMMON)
local g=Duel.SelectMatchingCard(tp,cm.spfilter1,tp,LOCATION_DECK+LOCATION_GRAVE,0,1,1,nil,e,tp)
if g:GetCount()>0 then
......@@ -56,27 +57,19 @@ function cm.activate(e,tp,eg,ep,ev,re,r,rp)
end
end
function cm.ckfilter(c)
return c:IsFaceup() and c:IsSetCard(0xa341) and c:IsType(TYPE_CONTINUOUS) and c:IsType(TYPE_SPELL)
end
function cm.con(e,tp,eg,ep,ev,re,r,rp)
return Duel.IsExistingMatchingCard(cm.ckfilter,tp,LOCATION_ONFIELD,0,1,nil)
function cm.spfilter2(c,e,tp)
return c:IsSetCard(0xa341) and c:IsCanBeSpecialSummoned(e,0,tp,false,false)
end
function cm.mvtg(e,tp,eg,ep,ev,re,r,rp,chk,chkc)
if chkc then return chkc:IsLocation(LOCATION_MZONE) and chkc:IsControler(tp) end
if chk==0 then return Duel.IsExistingTarget(nil,tp,LOCATION_MZONE,0,1,nil)
and Duel.GetLocationCount(tp,LOCATION_MZONE,PLAYER_NONE,0)>0 end
Duel.Hint(HINT_SELECTMSG,tp,HINTMSG_FACEUP)
Duel.SelectTarget(tp,nil,tp,LOCATION_MZONE,0,1,1,nil)
function cm.sptg2(e,tp,eg,ep,ev,re,r,rp,chk)
if chk==0 then return Duel.GetLocationCount(tp,LOCATION_MZONE)>0
and Duel.IsExistingMatchingCard(cm.spfilter2,tp,LOCATION_HAND,0,1,nil,e,tp) end
Duel.SetOperationInfo(0,CATEGORY_SPECIAL_SUMMON,nil,1,tp,LOCATION_HAND)
end
function cm.mvop(e,tp,eg,ep,ev,re,r,rp)
local tc=Duel.GetFirstTarget()
if not tc:IsRelateToEffect(e) or tc:IsControler(1-tp)
or Duel.GetLocationCount(tp,LOCATION_MZONE,PLAYER_NONE,0)<=0 then return end
Duel.Hint(HINT_SELECTMSG,tp,HINTMSG_TOZONE)
local s=Duel.SelectDisableField(tp,1,LOCATION_MZONE,0,0)
local nseq=math.log(s,2)
Duel.MoveSequence(tc,nseq)
end
function cm.spop2(e,tp,eg,ep,ev,re,r,rp)
if not e:GetHandler():IsRelateToEffect(e) then return end
Duel.Hint(HINT_SELECTMSG,tp,HINTMSG_SPSUMMON)
local g=Duel.SelectMatchingCard(tp,cm.spfilter2,tp,LOCATION_HAND,0,1,1,nil,e,tp)
if g:GetCount()>0 then
Duel.SpecialSummon(g,0,tp,tp,false,false,POS_FACEUP)
end
end
\ No newline at end of file
......@@ -28,7 +28,7 @@ function c33401200.condition(e,tp,eg,ep,ev,re,r,rp)
return eg:IsExists(c33401200.cfilter,1,nil,tp)
end
function c33401200.cfilter2(c,tp,rp)
return c:IsSetCard(0x341) and ((rp==1-tp and c:IsReason(REASON_EFFECT) and c:GetPreviousControler()==tp and c:IsPreviousLocation(LOCATION_ONFIELD)) or c:IsReason(REASON_BATTLE))
return c:IsSetCard(0x341) and ((rp==1-tp and c:IsReason(REASON_EFFECT) and c:GetPreviousControler()==tp and c:IsPreviousLocation(LOCATION_ONFIELD)) or c:IsReason(REASON_BATTLE))
end
function c33401200.condition2(e,tp,eg,ep,ev,re,r,rp)
return aux.exccon(e) and eg:IsExists(c33401200.cfilter2,1,nil,tp,rp)
......@@ -37,7 +37,7 @@ function c33401200.dfilter(c)
return c:IsSetCard(0x341) and c:IsLevelAbove(1) and c:IsAbleToGrave()
end
function c33401200.filter(c,e,tp,m,ft)
if not (c:IsCode(33400037) or c:IsCode(33400222) or c:IsCode(33400320)) or bit.band(c:GetType(),0x81)~=0x81
if not (c:IsCode(33400037) or c:IsCode(33400222) or c:IsCode(33400320) or c:IsCode(33400413)) or bit.band(c:GetType(),0x81)~=0x81
or not c:IsCanBeSpecialSummoned(e,SUMMON_TYPE_RITUAL,tp,false,true) then return false end
local mg=m:Filter(Card.IsCanBeRitualMaterial,c,c)
local dg=Duel.GetMatchingGroup(c33401200.dfilter,tp,LOCATION_DECK+LOCATION_EXTRA,0,nil)
......
--五河士道 刻刻帝
function c33401313.initial_effect(c)
local m=33401313
local cm=_G["c"..m]
function cm.initial_effect(c)
c:EnableReviveLimit()
c:EnableCounterPermit(0x34f)
--fusion material
aux.AddFusionProcFun2(c,aux.FilterBoolFunction(Card.IsFusionSetCard,0xc342),c33401313.fa,true)
--set counter
aux.AddFusionProcFun2(c,aux.FilterBoolFunction(Card.IsFusionSetCard,0xc342),cm.fa,true)
--spsummon
local e0=Effect.CreateEffect(c)
e0:SetType(EFFECT_TYPE_FIELD)
e0:SetProperty(EFFECT_FLAG_CANNOT_DISABLE+EFFECT_FLAG_UNCOPYABLE)
e0:SetCode(EFFECT_SPSUMMON_PROC)
e0:SetRange(LOCATION_EXTRA)
e0:SetCondition(cm.hspcon)
e0:SetOperation(cm.hspop)
c:RegisterEffect(e0)
--set counter
local e2=Effect.CreateEffect(c)
e2:SetDescription(aux.Stringid(33401313,0))
e2:SetDescription(aux.Stringid(m,0))
e2:SetCategory(CATEGORY_COUNTER)
e2:SetType(EFFECT_TYPE_SINGLE+EFFECT_TYPE_TRIGGER_O)
e2:SetCode(EVENT_SPSUMMON_SUCCESS)
e2:SetProperty(EFFECT_FLAG_CARD_TARGET+EFFECT_FLAG_DAMAGE_STEP+EFFECT_FLAG_DELAY)
e2:SetTarget(c33401313.addct)
e2:SetOperation(c33401313.addc)
e2:SetTarget(cm.addct)
e2:SetOperation(cm.addc)
c:RegisterEffect(e2)
--copy
local e6=Effect.CreateEffect(c)
e6:SetType(EFFECT_TYPE_QUICK_O)
e6:SetDescription(aux.Stringid(33401313,1))
e6:SetDescription(aux.Stringid(m,1))
e6:SetProperty(EFFECT_FLAG_CARD_TARGET)
e6:SetCode(EVENT_FREE_CHAIN)
e6:SetRange(LOCATION_MZONE)
e6:SetCountLimit(1,33401313)
e6:SetTarget(c33401313.cptg)
e6:SetOperation(c33401313.cpop)
e6:SetCountLimit(1,m)
e6:SetTarget(cm.cptg)
e6:SetOperation(cm.cpop)
c:RegisterEffect(e6)
--to hand from grave
local e4=Effect.CreateEffect(c)
e4:SetDescription(aux.Stringid(33401313,2))
e4:SetDescription(aux.Stringid(m,2))
e4:SetCategory(CATEGORY_TOHAND)
e4:SetType(EFFECT_TYPE_SINGLE+EFFECT_TYPE_TRIGGER_O)
e4:SetProperty(EFFECT_FLAG_DAMAGE_STEP+EFFECT_FLAG_DELAY)
e4:SetCode(EVENT_TO_GRAVE)
e4:SetCountLimit(1,33401313+10000)
e4:SetTarget(c33401313.adtg)
e4:SetOperation(c33401313.adop)
e4:SetCountLimit(1,m+10000)
e4:SetTarget(cm.adtg)
e4:SetOperation(cm.adop)
c:RegisterEffect(e4)
end
function c33401313.fa(c)
function cm.fa(c)
return c:IsFusionAttribute(ATTRIBUTE_DARK) and c:IsRace(RACE_FAIRY)
end
function c33401313.filter(c)
return c:IsFaceup() and c:IsCanAddCounter(0x34f,6)
function cm.hspfilter(c,tp,sc)
return c:IsSetCard(0xc342)
and c:IsControler(tp) and c:IsCanBeFusionMaterial(sc,SUMMON_TYPE_SPECIAL) and Duel.CheckReleaseGroup(c:GetControler(),cm.hspfilter2,1,c,c:GetControler(),sc,tc)
end
function cm.hspfilter2(c,tp,sc,tc)
local g=Group.CreateGroup()
g:AddCard(tc)
g:AddCard(c)
return c:IsFusionAttribute(ATTRIBUTE_DARK) and c:IsRace(RACE_FAIRY)
and c:IsControler(tp) and Duel.GetLocationCountFromEx(tp,tp,g,sc)>0 and c:IsCanBeFusionMaterial(sc,SUMMON_TYPE_SPECIAL)
end
function cm.hspcon(e,c)
if c==nil then return true end
return Duel.CheckReleaseGroup(c:GetControler(),cm.hspfilter,1,nil,c:GetControler(),c)
end
function cm.hspop(e,tp,eg,ep,ev,re,r,rp,c)
local g1=Duel.SelectReleaseGroup(tp,cm.hspfilter,1,1,nil,tp,c)
local tc1=g1:GetFirst()
local g2=Duel.SelectReleaseGroup(tp,cm.hspfilter2,1,1,tc1,tp,c,tc1)
g2:Merge(g1)
c:SetMaterial(g2)
Duel.Release(g2,REASON_COST)
end
function cm.filter(c)
return c:IsFaceup() and c:IsCanAddCounter(0x34f,4)
end
function c33401313.addct(e,tp,eg,ep,ev,re,r,rp,chk,chkc)
if chkc then return chkc:IsOnField() and c33401313.filter(chkc) end
function cm.addct(e,tp,eg,ep,ev,re,r,rp,chk,chkc)
if chkc then return chkc:IsOnField() and cm.filter(chkc) end
if chk==0 then return true end
Duel.Hint(HINT_SELECTMSG,tp,HINTMSG_FACEUP)
Duel.SelectTarget(tp,c33401313.filter,tp,LOCATION_ONFIELD,0,1,1,nil)
Duel.SetOperationInfo(0,CATEGORY_COUNTER,nil,6,0,0x34f)
Duel.SelectTarget(tp,cm.filter,tp,LOCATION_ONFIELD,0,1,1,nil)
Duel.SetOperationInfo(0,CATEGORY_COUNTER,nil,4,0,0x34f)
end
function c33401313.addc(e,tp,eg,ep,ev,re,r,rp)
function cm.addc(e,tp,eg,ep,ev,re,r,rp)
local tc=Duel.GetFirstTarget()
if tc and tc:IsFaceup() and tc:IsRelateToEffect(e) then
tc:AddCounter(0x34f,6)
tc:AddCounter(0x34f,4)
end
end
function c33401313.cpfilter(c)
function cm.cpfilter(c)
return c:IsType(TYPE_EFFECT) and c:IsSetCard(0x341) and c:IsRace(RACE_FAIRY)
end
function c33401313.cptg(e,tp,eg,ep,ev,re,r,rp,chk,chkc)
if chkc then return c33401313.cpfilter(chkc) end
if chk==0 then return Duel.IsExistingTarget(c33401313.cpfilter,tp,LOCATION_GRAVE,LOCATION_GRAVE,1,e:GetHandler()) end
function cm.cptg(e,tp,eg,ep,ev,re,r,rp,chk,chkc)
if chkc then return cm.cpfilter(chkc) end
if chk==0 then return Duel.IsExistingTarget(cm.cpfilter,tp,LOCATION_GRAVE,LOCATION_GRAVE,1,e:GetHandler()) end
Duel.Hint(HINT_SELECTMSG,tp,HINTMSG_TARGET)
local g1=Duel.SelectTarget(tp,c33401313.cpfilter,tp,LOCATION_GRAVE,LOCATION_GRAVE,1,1,e:GetHandler())
local g1=Duel.SelectTarget(tp,cm.cpfilter,tp,LOCATION_GRAVE,LOCATION_GRAVE,1,1,e:GetHandler())
end
function c33401313.cpop(e,tp,eg,ep,ev,re,r,rp)
function cm.cpop(e,tp,eg,ep,ev,re,r,rp)
local c=e:GetHandler()
if not c:IsOnField() or c:IsFacedown() then return end
local g=Duel.GetChainInfo(0,CHAININFO_TARGET_CARDS)
......@@ -85,18 +121,18 @@ function c33401313.cpop(e,tp,eg,ep,ev,re,r,rp)
end
end
function c33401313.thfilter3(c)
function cm.thfilter3(c)
return c:IsSetCard(0x3340) or c:IsSetCard(0x3341) and c:IsAbleToHand()
end
function c33401313.adtg(e,tp,eg,ep,ev,re,r,rp,chk)
if chk==0 then return Duel.IsExistingMatchingCard(c33401313.thfilter3,tp,LOCATION_GRAVE,0,1,nil)
function cm.adtg(e,tp,eg,ep,ev,re,r,rp,chk)
if chk==0 then return Duel.IsExistingMatchingCard(cm.thfilter3,tp,LOCATION_GRAVE,0,1,nil)
end
Duel.SetOperationInfo(0,CATEGORY_TOHAND,nil,1,tp,LOCATION_GRAVE)
end
function c33401313.adop(e,tp,eg,ep,ev,re,r,rp)
local g1=Duel.GetMatchingGroup(c33401313.thfilter3,tp,LOCATION_GRAVE,0,nil)
function cm.adop(e,tp,eg,ep,ev,re,r,rp)
local g1=Duel.GetMatchingGroup(cm.thfilter3,tp,LOCATION_GRAVE,0,nil)
Duel.Hint(HINT_SELECTMSG,tp,HINTMSG_ATOHAND)
local g=Duel.SelectMatchingCard(tp,c33401313.thfilter3,tp,LOCATION_GRAVE,0,1,1,nil)
local g=Duel.SelectMatchingCard(tp,cm.thfilter3,tp,LOCATION_GRAVE,0,1,1,nil)
if g:GetCount()>0 then
Duel.SendtoHand(g,nil,REASON_EFFECT)
Duel.ConfirmCards(1-tp,g)
......
......@@ -64,7 +64,7 @@ function cm.cfilter2(c,tp)
return c:IsFaceup() and c:IsSetCard(0x341) and c:IsType(TYPE_MONSTER)
end
function cm.spcon2(e,tp,eg,ep,ev,re,r,rp)
return eg:IsExists(cm.cfilter2,1,nil,tp)
return eg:IsExists(cm.cfilter2,1,nil,tp) and Duel.IsExistingMatchingCard(Card.IsSetCard,tp,LOCATION_MZONE,0,1,nil,0x341) and Duel.IsExistingMatchingCard(Card.IsSetCard,tp,0,LOCATION_MZONE,1,nil,0x341)
end
function cm.sptg(e,tp,eg,ep,ev,re,r,rp,chk)
local c=e:GetHandler()
......
--机空队 炎天一式
function c40009021.initial_effect(c)
--link summon
c:EnableReviveLimit()
aux.AddLinkProcedure(c,c40009021.matfilter,1,1)
--equip
local e2=Effect.CreateEffect(c)
e2:SetDescription(aux.Stringid(40009021,0))
e2:SetCategory(CATEGORY_EQUIP)
e2:SetType(EFFECT_TYPE_SINGLE+EFFECT_TYPE_TRIGGER_O)
e2:SetCode(EVENT_SPSUMMON_SUCCESS)
e2:SetProperty(EFFECT_FLAG_DELAY)
e2:SetCountLimit(1,40009021)
e2:SetCondition(c40009021.thcon)
e2:SetTarget(c40009021.eqtg)
e2:SetOperation(c40009021.eqop)
c:RegisterEffect(e2)
--destroy
local e1=Effect.CreateEffect(c)
e1:SetDescription(aux.Stringid(40009021,1))
e1:SetCategory(CATEGORY_REMOVE)
e1:SetType(EFFECT_TYPE_QUICK_O)
e1:SetProperty(EFFECT_FLAG_CARD_TARGET)
e1:SetCode(EVENT_FREE_CHAIN)
e1:SetRange(LOCATION_MZONE)
e1:SetCountLimit(1,40009022)
e1:SetCost(c40009021.descost)
e1:SetTarget(c40009021.rmtg)
e1:SetOperation(c40009021.rmop)
c:RegisterEffect(e1)
end
function c40009021.thcon(e,tp,eg,ep,ev,re,r,rp)
return e:GetHandler():IsSummonType(SUMMON_TYPE_LINK)
end
function c40009021.matfilter(c)
return not c:IsLink(1) and c:GetBaseAttack()==0 and c:IsType(TYPE_EFFECT)
end
function c40009021.eqfilter(c,tp)
return c:IsType(TYPE_QUICKPLAY) and c:IsSetCard(0xf13) and c:CheckUniqueOnField(tp) and not c:IsForbidden()
end
function c40009021.eqtg(e,tp,eg,ep,ev,re,r,rp,chk)
if chk==0 then return Duel.GetLocationCount(tp,LOCATION_SZONE)>0
and Duel.IsExistingMatchingCard(c40009021.eqfilter,tp,LOCATION_GRAVE+LOCATION_DECK+LOCATION_HAND,0,1,nil,tp) end
Duel.SetOperationInfo(0,CATEGORY_EQUIP,nil,1,tp,LOCATION_GRAVE+LOCATION_DECK+LOCATION_HAND)
end
function c40009021.eqop(e,tp,eg,ep,ev,re,r,rp)
local c=e:GetHandler()
if Duel.GetLocationCount(tp,LOCATION_SZONE)<=0 then return end
if c:IsFacedown() or not c:IsRelateToEffect(e) then return end
Duel.Hint(HINT_SELECTMSG,tp,HINTMSG_EQUIP)
local g=Duel.SelectMatchingCard(tp,c40009021.eqfilter,tp,LOCATION_GRAVE+LOCATION_DECK+LOCATION_HAND,0,1,1,nil,tp)
local tc=g:GetFirst()
if tc then
if not Duel.Equip(tp,tc,c) then return end
local e1=Effect.CreateEffect(c)
e1:SetProperty(EFFECT_FLAG_COPY_INHERIT+EFFECT_FLAG_OWNER_RELATE)
e1:SetType(EFFECT_TYPE_SINGLE)
e1:SetCode(EFFECT_EQUIP_LIMIT)
e1:SetReset(RESET_EVENT+RESETS_STANDARD)
e1:SetValue(c40009021.eqlimit)
tc:RegisterEffect(e1)
end
end
function c40009021.eqlimit(e,c)
return e:GetOwner()==c
end
function c40009021.costfilter(c)
return c:IsFaceup() and c:IsSetCard(0xf13) and c:IsType(TYPE_SPELL+TYPE_TRAP) and c:IsAbleToGraveAsCost()
end
function c40009021.descost(e,tp,eg,ep,ev,re,r,rp,chk)
if chk==0 then return Duel.IsExistingMatchingCard(c40009021.costfilter,tp,LOCATION_ONFIELD,0,1,nil) end
if Duel.IsExistingMatchingCard(c40009021.costfilter,tp,LOCATION_ONFIELD,0,1,nil)
then
Duel.Hint(HINT_SELECTMSG,tp,HINTMSG_TOGRAVE)
local g=Duel.SelectMatchingCard(tp,c40009021.costfilter,tp,LOCATION_ONFIELD,0,1,1,nil)
Duel.SendtoGrave(g,REASON_COST)
end
end
function c40009021.rmfilter(c)
return c:IsFaceup() and c:IsAbleToRemove()
end
function c40009021.rmtg(e,tp,eg,ep,ev,re,r,rp,chk,chkc)
if chkc then return chkc:IsLocation(LOCATION_MZONE) and c40009021.rmfilter(chkc) end
if chk==0 then return Duel.IsExistingTarget(c40009021.rmfilter,tp,LOCATION_MZONE,LOCATION_MZONE,1,nil) end
Duel.Hint(HINT_SELECTMSG,tp,HINTMSG_REMOVE)
local g=Duel.SelectTarget(tp,c40009021.rmfilter,tp,LOCATION_MZONE,LOCATION_MZONE,1,1,nil)
Duel.SetOperationInfo(0,CATEGORY_REMOVE,g,1,0,0)
end
function c40009021.rmop(e,tp,eg,ep,ev,re,r,rp)
local tc=Duel.GetFirstTarget()
if tc:IsRelateToEffect(e) and Duel.Remove(tc,0,REASON_EFFECT+REASON_TEMPORARY)~=0 then
local e1=Effect.CreateEffect(e:GetHandler())
e1:SetType(EFFECT_TYPE_FIELD+EFFECT_TYPE_CONTINUOUS)
e1:SetCode(EVENT_PHASE+PHASE_END)
e1:SetLabelObject(tc)
e1:SetCountLimit(1)
e1:SetCondition(c40009021.retcon)
e1:SetOperation(c40009021.retop)
local reset=0
if tc:IsControler(tp) then
reset=RESET_OPPO_TURN
else
reset=RESET_SELF_TURN
end
if Duel.GetTurnPlayer()==1-tp then
e1:SetReset(RESET_PHASE+PHASE_END+RESET_OPPO_TURN,2)
e1:SetValue(Duel.GetTurnCount())
tc:RegisterFlagEffect(40009021,RESET_EVENT+RESETS_STANDARD+RESET_PHASE+PHASE_END+reset,0,2)
else
e1:SetReset(RESET_PHASE+PHASE_END+RESET_OPPO_TURN)
e1:SetValue(0)
tc:RegisterFlagEffect(40009021,RESET_EVENT+RESETS_STANDARD+RESET_PHASE+PHASE_END+reset,0,1)
end
Duel.RegisterEffect(e1,tp)
end
end
function c40009021.retcon(e,tp,eg,ep,ev,re,r,rp)
if Duel.GetTurnPlayer()~=1-tp or Duel.GetTurnCount()==e:GetValue() then return false end
return e:GetLabelObject():GetFlagEffect(40009021)~=0
end
function c40009021.retop(e,tp,eg,ep,ev,re,r,rp)
Duel.ReturnToField(e:GetLabelObject())
end
--机空队 青天四式
function c40009023.initial_effect(c)
--link summon
c:EnableReviveLimit()
aux.AddLinkProcedure(c,c40009023.matfilter,1,1)
--equip
local e2=Effect.CreateEffect(c)
e2:SetDescription(aux.Stringid(40009023,0))
e2:SetCategory(CATEGORY_EQUIP)
e2:SetType(EFFECT_TYPE_SINGLE+EFFECT_TYPE_TRIGGER_O)
e2:SetCode(EVENT_SPSUMMON_SUCCESS)
e2:SetProperty(EFFECT_FLAG_DELAY)
e2:SetCountLimit(1,40009023)
e2:SetCondition(c40009023.thcon)
e2:SetTarget(c40009023.eqtg)
e2:SetOperation(c40009023.eqop)
c:RegisterEffect(e2)
--destroy
local e1=Effect.CreateEffect(c)
e1:SetDescription(aux.Stringid(40009023,1))
e1:SetCategory(CATEGORY_REMOVE)
e1:SetType(EFFECT_TYPE_QUICK_O)
e1:SetProperty(EFFECT_FLAG_CARD_TARGET)
e1:SetCode(EVENT_FREE_CHAIN)
e1:SetRange(LOCATION_MZONE)
e1:SetCountLimit(1,40009024)
e1:SetCost(c40009023.descost)
e1:SetTarget(c40009023.rmtg)
e1:SetOperation(c40009023.rmop)
c:RegisterEffect(e1)
end
function c40009023.thcon(e,tp,eg,ep,ev,re,r,rp)
return e:GetHandler():IsSummonType(SUMMON_TYPE_LINK)
end
function c40009023.matfilter(c)
return not c:IsLink(1) and c:GetBaseAttack()==0 and c:IsType(TYPE_EFFECT)
end
function c40009023.eqfilter(c,tp)
return c:IsType(TYPE_QUICKPLAY) and c:IsSetCard(0xf13) and c:CheckUniqueOnField(tp) and not c:IsForbidden()
end
function c40009023.eqtg(e,tp,eg,ep,ev,re,r,rp,chk)
if chk==0 then return Duel.GetLocationCount(tp,LOCATION_SZONE)>0
and Duel.IsExistingMatchingCard(c40009023.eqfilter,tp,LOCATION_GRAVE+LOCATION_DECK+LOCATION_HAND,0,1,nil,tp) end
Duel.SetOperationInfo(0,CATEGORY_EQUIP,nil,1,tp,LOCATION_GRAVE+LOCATION_DECK+LOCATION_HAND)
end
function c40009023.eqop(e,tp,eg,ep,ev,re,r,rp)
local c=e:GetHandler()
if Duel.GetLocationCount(tp,LOCATION_SZONE)<=0 then return end
if c:IsFacedown() or not c:IsRelateToEffect(e) then return end
Duel.Hint(HINT_SELECTMSG,tp,HINTMSG_EQUIP)
local g=Duel.SelectMatchingCard(tp,c40009023.eqfilter,tp,LOCATION_GRAVE+LOCATION_DECK+LOCATION_HAND,0,1,1,nil,tp)
local tc=g:GetFirst()
if tc then
if not Duel.Equip(tp,tc,c) then return end
local e1=Effect.CreateEffect(c)
e1:SetProperty(EFFECT_FLAG_COPY_INHERIT+EFFECT_FLAG_OWNER_RELATE)
e1:SetType(EFFECT_TYPE_SINGLE)
e1:SetCode(EFFECT_EQUIP_LIMIT)
e1:SetReset(RESET_EVENT+RESETS_STANDARD)
e1:SetValue(c40009023.eqlimit)
tc:RegisterEffect(e1)
end
end
function c40009023.eqlimit(e,c)
return e:GetOwner()==c
end
function c40009023.costfilter(c)
return c:IsFaceup() and c:IsSetCard(0xf13) and c:IsType(TYPE_SPELL+TYPE_TRAP) and c:IsAbleToGraveAsCost()
end
function c40009023.descost(e,tp,eg,ep,ev,re,r,rp,chk)
if chk==0 then return Duel.IsExistingMatchingCard(c40009023.costfilter,tp,LOCATION_ONFIELD,0,1,nil) end
if Duel.IsExistingMatchingCard(c40009023.costfilter,tp,LOCATION_ONFIELD,0,1,nil)
then
Duel.Hint(HINT_SELECTMSG,tp,HINTMSG_TOGRAVE)
local g=Duel.SelectMatchingCard(tp,c40009023.costfilter,tp,LOCATION_ONFIELD,0,1,1,nil)
Duel.SendtoGrave(g,REASON_COST)
end
end
function c40009023.rmfilter(c)
return c:IsType(TYPE_SPELL+TYPE_TRAP) and c:IsAbleToRemove()
end
function c40009023.rmtg(e,tp,eg,ep,ev,re,r,rp,chk,chkc)
if chkc then return chkc:IsOnField() and c40009023.rmfilter(chkc) end
if chk==0 then return Duel.IsExistingTarget(c40009023.rmfilter,tp,LOCATION_ONFIELD,LOCATION_ONFIELD,1,nil) end
Duel.Hint(HINT_SELECTMSG,tp,HINTMSG_REMOVE)
local g=Duel.SelectTarget(tp,c40009023.rmfilter,tp,LOCATION_ONFIELD,LOCATION_ONFIELD,1,1,nil)
Duel.SetOperationInfo(0,CATEGORY_REMOVE,g,1,0,0)
end
function c40009023.rmop(e,tp,eg,ep,ev,re,r,rp)
local tc=Duel.GetFirstTarget()
if tc:IsRelateToEffect(e) and tc:IsFaceup() and tc:IsType(TYPE_SPELL+TYPE_TRAP) then
Duel.Remove(tc,POS_FACEUP,REASON_EFFECT)
end
end
\ No newline at end of file
--机空队 夕云五式
function c40009025.initial_effect(c)
--link summon
c:EnableReviveLimit()
aux.AddLinkProcedure(c,c40009025.matfilter,1,1)
--equip
local e2=Effect.CreateEffect(c)
e2:SetDescription(aux.Stringid(40009025,0))
e2:SetCategory(CATEGORY_EQUIP)
e2:SetType(EFFECT_TYPE_SINGLE+EFFECT_TYPE_TRIGGER_O)
e2:SetCode(EVENT_SPSUMMON_SUCCESS)
e2:SetProperty(EFFECT_FLAG_DELAY)
e2:SetCountLimit(1,40009025)
e2:SetCondition(c40009025.thcon)
e2:SetTarget(c40009025.eqtg)
e2:SetOperation(c40009025.eqop)
c:RegisterEffect(e2)
--destroy
local e1=Effect.CreateEffect(c)
e1:SetDescription(aux.Stringid(40009025,1))
e1:SetType(EFFECT_TYPE_QUICK_O)
e1:SetProperty(EFFECT_FLAG_CARD_TARGET)
e1:SetCode(EVENT_FREE_CHAIN)
e1:SetRange(LOCATION_MZONE)
e1:SetCountLimit(1,40009026)
e1:SetCost(c40009025.descost)
e1:SetTarget(c40009025.seqtg)
e1:SetOperation(c40009025.seqop)
c:RegisterEffect(e1)
end
function c40009025.thcon(e,tp,eg,ep,ev,re,r,rp)
return e:GetHandler():IsSummonType(SUMMON_TYPE_LINK)
end
function c40009025.matfilter(c)
return not c:IsLink(1) and c:GetBaseAttack()==0 and c:IsType(TYPE_EFFECT)
end
function c40009025.eqfilter(c,tp)
return c:IsType(TYPE_QUICKPLAY) and c:IsSetCard(0xf13) and c:CheckUniqueOnField(tp) and not c:IsForbidden()
end
function c40009025.eqtg(e,tp,eg,ep,ev,re,r,rp,chk)
if chk==0 then return Duel.GetLocationCount(tp,LOCATION_SZONE)>0
and Duel.IsExistingMatchingCard(c40009025.eqfilter,tp,LOCATION_GRAVE+LOCATION_DECK+LOCATION_HAND,0,1,nil,tp) end
Duel.SetOperationInfo(0,CATEGORY_EQUIP,nil,1,tp,LOCATION_GRAVE+LOCATION_DECK+LOCATION_HAND)
end
function c40009025.eqop(e,tp,eg,ep,ev,re,r,rp)
local c=e:GetHandler()
if Duel.GetLocationCount(tp,LOCATION_SZONE)<=0 then return end
if c:IsFacedown() or not c:IsRelateToEffect(e) then return end
Duel.Hint(HINT_SELECTMSG,tp,HINTMSG_EQUIP)
local g=Duel.SelectMatchingCard(tp,c40009025.eqfilter,tp,LOCATION_GRAVE+LOCATION_DECK+LOCATION_HAND,0,1,1,nil,tp)
local tc=g:GetFirst()
if tc then
if not Duel.Equip(tp,tc,c) then return end
local e1=Effect.CreateEffect(c)
e1:SetProperty(EFFECT_FLAG_COPY_INHERIT+EFFECT_FLAG_OWNER_RELATE)
e1:SetType(EFFECT_TYPE_SINGLE)
e1:SetCode(EFFECT_EQUIP_LIMIT)
e1:SetReset(RESET_EVENT+RESETS_STANDARD)
e1:SetValue(c40009025.eqlimit)
tc:RegisterEffect(e1)
end
end
function c40009025.eqlimit(e,c)
return e:GetOwner()==c
end
function c40009025.costfilter(c)
return c:IsFaceup() and c:IsSetCard(0xf13) and c:IsType(TYPE_SPELL+TYPE_TRAP) and c:IsAbleToGraveAsCost()
end
function c40009025.descost(e,tp,eg,ep,ev,re,r,rp,chk)
if chk==0 then return Duel.IsExistingMatchingCard(c40009025.costfilter,tp,LOCATION_ONFIELD,0,1,nil) end
if Duel.IsExistingMatchingCard(c40009025.costfilter,tp,LOCATION_ONFIELD,0,1,nil)
then
Duel.Hint(HINT_SELECTMSG,tp,HINTMSG_TOGRAVE)
local g=Duel.SelectMatchingCard(tp,c40009025.costfilter,tp,LOCATION_ONFIELD,0,1,1,nil)
Duel.SendtoGrave(g,REASON_COST)
end
end
function c40009025.seqfilter(c)
local tp=c:GetControler()
return c:IsFaceup() and c:GetSequence()<5 and Duel.GetLocationCount(tp,LOCATION_MZONE,tp,LOCATION_REASON_CONTROL)>0
end
function c40009025.seqtg(e,tp,eg,ep,ev,re,r,rp,chk,chkc)
local c=e:GetHandler()
if chkc then return chkc:IsLocation(LOCATION_MZONE) and c40009025.seqfilter(chkc) and chkc~=c end
if chk==0 then return Duel.IsExistingTarget(c40009025.seqfilter,tp,LOCATION_MZONE,LOCATION_MZONE,1,c) end
Duel.Hint(HINT_SELECTMSG,tp,aux.Stringid(40009025,1))
Duel.SelectTarget(tp,c40009025.seqfilter,tp,LOCATION_MZONE,LOCATION_MZONE,1,1,c)
end
function c40009025.seqop(e,tp,eg,ep,ev,re,r,rp)
local tc=Duel.GetFirstTarget()
local ttp=tc:GetControler()
if not tc:IsRelateToEffect(e) or tc:IsImmuneToEffect(e) or Duel.GetLocationCount(ttp,LOCATION_MZONE,ttp,LOCATION_REASON_CONTROL)<=0 then return end
local p1,p2
if tc:IsControler(tp) then
p1=LOCATION_MZONE
p2=0
else
p1=0
p2=LOCATION_MZONE
end
Duel.Hint(HINT_SELECTMSG,tp,HINTMSG_TOZONE)
local seq=math.log(Duel.SelectDisableField(tp,1,p1,p2,0),2)
if tc:IsControler(1-tp) then seq=seq-16 end
Duel.MoveSequence(tc,seq)
end
\ No newline at end of file
--机空队 雪天一式
function c40009027.initial_effect(c)
--link summon
c:EnableReviveLimit()
aux.AddLinkProcedure(c,c40009027.matfilter,1,1)
--equip
local e2=Effect.CreateEffect(c)
e2:SetDescription(aux.Stringid(40009027,0))
e2:SetCategory(CATEGORY_EQUIP)
e2:SetType(EFFECT_TYPE_SINGLE+EFFECT_TYPE_TRIGGER_O)
e2:SetCode(EVENT_SPSUMMON_SUCCESS)
e2:SetProperty(EFFECT_FLAG_DELAY)
e2:SetCountLimit(1,40009027)
e2:SetCondition(c40009027.thcon)
e2:SetTarget(c40009027.eqtg)
e2:SetOperation(c40009027.eqop)
c:RegisterEffect(e2)
--destroy
local e1=Effect.CreateEffect(c)
e1:SetDescription(aux.Stringid(40009027,1))
e1:SetCategory(CATEGORY_DECKDES)
e1:SetType(EFFECT_TYPE_QUICK_O)
e1:SetCode(EVENT_FREE_CHAIN)
e1:SetRange(LOCATION_MZONE)
e1:SetCountLimit(1,40009028)
e1:SetCost(c40009027.descost)
e1:SetTarget(c40009027.target)
e1:SetOperation(c40009027.operation)
c:RegisterEffect(e1)
end
function c40009027.thcon(e,tp,eg,ep,ev,re,r,rp)
return e:GetHandler():IsSummonType(SUMMON_TYPE_LINK)
end
function c40009027.matfilter(c)
return not c:IsLink(1) and c:GetBaseAttack()==0 and c:IsType(TYPE_EFFECT)
end
function c40009027.eqfilter(c,tp)
return c:IsType(TYPE_QUICKPLAY) and c:IsSetCard(0xf13) and c:CheckUniqueOnField(tp) and not c:IsForbidden()
end
function c40009027.eqtg(e,tp,eg,ep,ev,re,r,rp,chk)
if chk==0 then return Duel.GetLocationCount(tp,LOCATION_SZONE)>0
and Duel.IsExistingMatchingCard(c40009027.eqfilter,tp,LOCATION_GRAVE+LOCATION_DECK+LOCATION_HAND,0,1,nil,tp) end
Duel.SetOperationInfo(0,CATEGORY_EQUIP,nil,1,tp,LOCATION_GRAVE+LOCATION_DECK+LOCATION_HAND)
end
function c40009027.eqop(e,tp,eg,ep,ev,re,r,rp)
local c=e:GetHandler()
if Duel.GetLocationCount(tp,LOCATION_SZONE)<=0 then return end
if c:IsFacedown() or not c:IsRelateToEffect(e) then return end
Duel.Hint(HINT_SELECTMSG,tp,HINTMSG_EQUIP)
local g=Duel.SelectMatchingCard(tp,c40009027.eqfilter,tp,LOCATION_GRAVE+LOCATION_DECK+LOCATION_HAND,0,1,1,nil,tp)
local tc=g:GetFirst()
if tc then
if not Duel.Equip(tp,tc,c) then return end
local e1=Effect.CreateEffect(c)
e1:SetProperty(EFFECT_FLAG_COPY_INHERIT+EFFECT_FLAG_OWNER_RELATE)
e1:SetType(EFFECT_TYPE_SINGLE)
e1:SetCode(EFFECT_EQUIP_LIMIT)
e1:SetReset(RESET_EVENT+RESETS_STANDARD)
e1:SetValue(c40009027.eqlimit)
tc:RegisterEffect(e1)
end
end
function c40009027.eqlimit(e,c)
return e:GetOwner()==c
end
function c40009027.costfilter(c)
return c:IsFaceup() and c:IsSetCard(0xf13) and c:IsType(TYPE_SPELL+TYPE_TRAP) and c:IsAbleToGraveAsCost()
end
function c40009027.descost(e,tp,eg,ep,ev,re,r,rp,chk)
if chk==0 then return Duel.IsExistingMatchingCard(c40009027.costfilter,tp,LOCATION_ONFIELD,0,1,nil) end
if Duel.IsExistingMatchingCard(c40009027.costfilter,tp,LOCATION_ONFIELD,0,1,nil)
then
Duel.Hint(HINT_SELECTMSG,tp,HINTMSG_TOGRAVE)
local g=Duel.SelectMatchingCard(tp,c40009027.costfilter,tp,LOCATION_ONFIELD,0,1,1,nil)
Duel.SendtoGrave(g,REASON_COST)
end
end
function c40009027.target(e,tp,eg,ep,ev,re,r,rp,chk)
if chk==0 then return Duel.IsPlayerCanDiscardDeck(tp,3) and Duel.IsPlayerCanDiscardDeck(1-tp,3) end
Duel.SetOperationInfo(0,CATEGORY_DECKDES,nil,0,PLAYER_ALL,3)
end
function c40009027.operation(e,tp,eg,ep,ev,re,r,rp)
local g1=Duel.GetDecktopGroup(tp,3)
local g2=Duel.GetDecktopGroup(1-tp,3)
g1:Merge(g2)
Duel.DisableShuffleCheck()
Duel.SendtoGrave(g1,REASON_EFFECT)
end
\ No newline at end of file
--机空队 碧空四式
function c40009029.initial_effect(c)
--link summon
c:EnableReviveLimit()
aux.AddLinkProcedure(c,c40009029.matfilter,2,2)
--equip
local e2=Effect.CreateEffect(c)
e2:SetDescription(aux.Stringid(40009029,0))
e2:SetCategory(CATEGORY_EQUIP)
e2:SetType(EFFECT_TYPE_SINGLE+EFFECT_TYPE_TRIGGER_O)
e2:SetCode(EVENT_SPSUMMON_SUCCESS)
e2:SetProperty(EFFECT_FLAG_DELAY)
e2:SetCountLimit(1,40009029)
e2:SetCondition(c40009029.thcon)
e2:SetTarget(c40009029.eqtg)
e2:SetOperation(c40009029.eqop)
c:RegisterEffect(e2)
--destroy
local e1=Effect.CreateEffect(c)
e1:SetDescription(aux.Stringid(40009029,1))
e1:SetCategory(CATEGORY_DISABLE)
e1:SetType(EFFECT_TYPE_QUICK_O)
e1:SetProperty(EFFECT_FLAG_CARD_TARGET)
e1:SetCode(EVENT_FREE_CHAIN)
e1:SetRange(LOCATION_MZONE)
e1:SetHintTiming(0,TIMINGS_CHECK_MONSTER)
e1:SetCountLimit(1,40009030)
e1:SetCost(c40009029.descost)
e1:SetTarget(c40009029.distg)
e1:SetOperation(c40009029.disop)
c:RegisterEffect(e1)
end
function c40009029.thcon(e,tp,eg,ep,ev,re,r,rp)
return e:GetHandler():IsSummonType(SUMMON_TYPE_LINK)
end
function c40009029.matfilter(c)
return c:GetBaseAttack()==0 and c:IsType(TYPE_EFFECT)
end
function c40009029.eqfilter(c,tp)
return c:IsType(TYPE_QUICKPLAY) and c:IsSetCard(0xf13) and c:CheckUniqueOnField(tp) and not c:IsForbidden()
end
function c40009029.eqtg(e,tp,eg,ep,ev,re,r,rp,chk)
if chk==0 then return Duel.GetLocationCount(tp,LOCATION_SZONE)>0
and Duel.IsExistingMatchingCard(c40009029.eqfilter,tp,LOCATION_GRAVE+LOCATION_DECK+LOCATION_HAND,0,1,nil,tp) end
Duel.SetOperationInfo(0,CATEGORY_EQUIP,nil,1,tp,LOCATION_GRAVE+LOCATION_DECK+LOCATION_HAND)
end
function c40009029.eqop(e,tp,eg,ep,ev,re,r,rp)
local c=e:GetHandler()
if Duel.GetLocationCount(tp,LOCATION_SZONE)<=0 then return end
if c:IsFacedown() or not c:IsRelateToEffect(e) then return end
Duel.Hint(HINT_SELECTMSG,tp,HINTMSG_EQUIP)
local g=Duel.SelectMatchingCard(tp,c40009029.eqfilter,tp,LOCATION_GRAVE+LOCATION_DECK+LOCATION_HAND,0,1,1,nil,tp)
local tc=g:GetFirst()
if tc then
if not Duel.Equip(tp,tc,c) then return end
local e1=Effect.CreateEffect(c)
e1:SetProperty(EFFECT_FLAG_COPY_INHERIT+EFFECT_FLAG_OWNER_RELATE)
e1:SetType(EFFECT_TYPE_SINGLE)
e1:SetCode(EFFECT_EQUIP_LIMIT)
e1:SetReset(RESET_EVENT+RESETS_STANDARD)
e1:SetValue(c40009029.eqlimit)
tc:RegisterEffect(e1)
end
end
function c40009029.eqlimit(e,c)
return e:GetOwner()==c
end
function c40009029.costfilter(c)
return c:IsFaceup() and c:IsSetCard(0xf13) and c:IsType(TYPE_SPELL+TYPE_TRAP) and c:IsAbleToGraveAsCost()
end
function c40009029.descost(e,tp,eg,ep,ev,re,r,rp,chk)
if chk==0 then return Duel.IsExistingMatchingCard(c40009029.costfilter,tp,LOCATION_ONFIELD,0,1,nil) end
if Duel.IsExistingMatchingCard(c40009029.costfilter,tp,LOCATION_ONFIELD,0,1,nil)
then
Duel.Hint(HINT_SELECTMSG,tp,HINTMSG_TOGRAVE)
local g=Duel.SelectMatchingCard(tp,c40009029.costfilter,tp,LOCATION_ONFIELD,0,1,1,nil)
Duel.SendtoGrave(g,REASON_COST)
end
end
function c40009029.distg(e,tp,eg,ep,ev,re,r,rp,chk,chkc)
if chkc then return chkc:IsControler(1-tp) and chkc:IsOnField() and aux.disfilter1(chkc) end
if chk==0 then return Duel.IsExistingTarget(aux.disfilter1,tp,0,LOCATION_ONFIELD,1,nil) end
Duel.Hint(HINT_SELECTMSG,tp,HINTMSG_FACEUP)
local g=Duel.SelectTarget(tp,aux.disfilter1,tp,0,LOCATION_ONFIELD,1,1,nil)
Duel.SetOperationInfo(0,CATEGORY_DISABLE,g,1,0,0)
end
function c40009029.disop(e,tp,eg,ep,ev,re,r,rp)
local c=e:GetHandler()
local tc=Duel.GetFirstTarget()
if ((tc:IsFaceup() and not tc:IsDisabled()) or tc:IsType(TYPE_TRAPMONSTER)) and tc:IsRelateToEffect(e) then
Duel.NegateRelatedChain(tc,RESET_TURN_SET)
local e1=Effect.CreateEffect(c)
e1:SetType(EFFECT_TYPE_SINGLE)
e1:SetProperty(EFFECT_FLAG_CANNOT_DISABLE)
e1:SetCode(EFFECT_DISABLE)
e1:SetReset(RESET_EVENT+RESETS_STANDARD+RESET_PHASE+PHASE_END)
tc:RegisterEffect(e1)
local e2=Effect.CreateEffect(c)
e2:SetType(EFFECT_TYPE_SINGLE)
e2:SetProperty(EFFECT_FLAG_CANNOT_DISABLE)
e2:SetCode(EFFECT_DISABLE_EFFECT)
e2:SetValue(RESET_TURN_SET)
e2:SetReset(RESET_EVENT+RESETS_STANDARD+RESET_PHASE+PHASE_END)
tc:RegisterEffect(e2)
if tc:IsType(TYPE_TRAPMONSTER) then
local e3=Effect.CreateEffect(c)
e3:SetType(EFFECT_TYPE_SINGLE)
e3:SetProperty(EFFECT_FLAG_CANNOT_DISABLE)
e3:SetCode(EFFECT_DISABLE_TRAPMONSTER)
e3:SetReset(RESET_EVENT+RESETS_STANDARD+RESET_PHASE+PHASE_END)
tc:RegisterEffect(e3)
end
end
end
\ No newline at end of file
--机空队 薄云一式
function c40009031.initial_effect(c)
--link summon
c:EnableReviveLimit()
aux.AddLinkProcedure(c,c40009031.matfilter,2,2)
--equip
local e2=Effect.CreateEffect(c)
e2:SetDescription(aux.Stringid(40009031,0))
e2:SetCategory(CATEGORY_EQUIP)
e2:SetType(EFFECT_TYPE_SINGLE+EFFECT_TYPE_TRIGGER_O)
e2:SetCode(EVENT_SPSUMMON_SUCCESS)
e2:SetProperty(EFFECT_FLAG_DELAY)
e2:SetCountLimit(1,40009031)
e2:SetCondition(c40009031.thcon)
e2:SetTarget(c40009031.eqtg)
e2:SetOperation(c40009031.eqop)
c:RegisterEffect(e2)
--destroy
local e1=Effect.CreateEffect(c)
e1:SetDescription(aux.Stringid(40009031,1))
e1:SetCategory(CATEGORY_TOHAND+CATEGORY_SEARCH)
e1:SetType(EFFECT_TYPE_QUICK_O)
e1:SetCode(EVENT_FREE_CHAIN)
e1:SetRange(LOCATION_MZONE)
e1:SetCountLimit(1,40009032)
e1:SetCost(c40009031.descost)
e1:SetTarget(c40009031.thtg)
e1:SetOperation(c40009031.thop)
c:RegisterEffect(e1)
end
function c40009031.thcon(e,tp,eg,ep,ev,re,r,rp)
return e:GetHandler():IsSummonType(SUMMON_TYPE_LINK)
end
function c40009031.matfilter(c)
return c:GetBaseAttack()==0 and c:IsType(TYPE_EFFECT)
end
function c40009031.eqfilter(c,tp)
return c:IsType(TYPE_QUICKPLAY) and c:IsSetCard(0xf13) and c:CheckUniqueOnField(tp) and not c:IsForbidden()
end
function c40009031.eqtg(e,tp,eg,ep,ev,re,r,rp,chk)
if chk==0 then return Duel.GetLocationCount(tp,LOCATION_SZONE)>0
and Duel.IsExistingMatchingCard(c40009031.eqfilter,tp,LOCATION_GRAVE+LOCATION_DECK+LOCATION_HAND,0,1,nil,tp) end
Duel.SetOperationInfo(0,CATEGORY_EQUIP,nil,1,tp,LOCATION_GRAVE+LOCATION_DECK+LOCATION_HAND)
end
function c40009031.eqop(e,tp,eg,ep,ev,re,r,rp)
local c=e:GetHandler()
if Duel.GetLocationCount(tp,LOCATION_SZONE)<=0 then return end
if c:IsFacedown() or not c:IsRelateToEffect(e) then return end
Duel.Hint(HINT_SELECTMSG,tp,HINTMSG_EQUIP)
local g=Duel.SelectMatchingCard(tp,c40009031.eqfilter,tp,LOCATION_GRAVE+LOCATION_DECK+LOCATION_HAND,0,1,1,nil,tp)
local tc=g:GetFirst()
if tc then
if not Duel.Equip(tp,tc,c) then return end
local e1=Effect.CreateEffect(c)
e1:SetProperty(EFFECT_FLAG_COPY_INHERIT+EFFECT_FLAG_OWNER_RELATE)
e1:SetType(EFFECT_TYPE_SINGLE)
e1:SetCode(EFFECT_EQUIP_LIMIT)
e1:SetReset(RESET_EVENT+RESETS_STANDARD)
e1:SetValue(c40009031.eqlimit)
tc:RegisterEffect(e1)
end
end
function c40009031.eqlimit(e,c)
return e:GetOwner()==c
end
function c40009031.costfilter(c)
return c:IsFaceup() and c:IsSetCard(0xf13) and c:IsType(TYPE_SPELL+TYPE_TRAP) and c:IsAbleToGraveAsCost()
end
function c40009031.descost(e,tp,eg,ep,ev,re,r,rp,chk)
if chk==0 then return Duel.IsExistingMatchingCard(c40009031.costfilter,tp,LOCATION_ONFIELD,0,1,nil) end
if Duel.IsExistingMatchingCard(c40009031.costfilter,tp,LOCATION_ONFIELD,0,1,nil)
then
Duel.Hint(HINT_SELECTMSG,tp,HINTMSG_TOGRAVE)
local g=Duel.SelectMatchingCard(tp,c40009031.costfilter,tp,LOCATION_ONFIELD,0,1,1,nil)
Duel.SendtoGrave(g,REASON_COST)
end
end
function c40009031.thfilter(c)
return c:IsSetCard(0xf13) and c:IsType(TYPE_SPELL+TYPE_TRAP) and c:IsAbleToHand()
end
function c40009031.thtg(e,tp,eg,ep,ev,re,r,rp,chk)
if chk==0 then return Duel.IsExistingMatchingCard(c40009031.thfilter,tp,LOCATION_DECK,0,1,nil) end
Duel.SetOperationInfo(0,CATEGORY_TOHAND,nil,1,tp,LOCATION_DECK)
end
function c40009031.thop(e,tp,eg,ep,ev,re,r,rp)
Duel.Hint(HINT_SELECTMSG,tp,HINTMSG_ATOHAND)
local g=Duel.SelectMatchingCard(tp,c40009031.thfilter,tp,LOCATION_DECK,0,1,1,nil)
if g:GetCount()>0 then
Duel.SendtoHand(g,nil,REASON_EFFECT)
Duel.ConfirmCards(1-tp,g)
end
end
\ No newline at end of file
--机空队 苍天零式
function c40009033.initial_effect(c)
--link summon
c:EnableReviveLimit()
aux.AddLinkProcedure(c,c40009033.matfilter,2)
--equip
local e2=Effect.CreateEffect(c)
e2:SetDescription(aux.Stringid(40009033,0))
e2:SetCategory(CATEGORY_EQUIP)
e2:SetType(EFFECT_TYPE_SINGLE+EFFECT_TYPE_TRIGGER_O)
e2:SetCode(EVENT_SPSUMMON_SUCCESS)
e2:SetProperty(EFFECT_FLAG_DELAY)
e2:SetCountLimit(1,40009033)
e2:SetCondition(c40009033.eqcon)
e2:SetTarget(c40009033.eqtg)
e2:SetOperation(c40009033.eqop)
c:RegisterEffect(e2)
--Activate
local e1=Effect.CreateEffect(c)
e1:SetDescription(aux.Stringid(40009033,1))
e1:SetCategory(CATEGORY_DESTROY)
e1:SetType(EFFECT_TYPE_QUICK_O)
e1:SetRange(LOCATION_MZONE)
e1:SetCode(EVENT_FREE_CHAIN)
e1:SetProperty(EFFECT_FLAG_CARD_TARGET)
e1:SetCountLimit(1,40009034)
e1:SetTarget(c40009033.target)
e1:SetOperation(c40009033.activate)
c:RegisterEffect(e1)
--indes
local e3=Effect.CreateEffect(c)
e3:SetType(EFFECT_TYPE_FIELD)
e3:SetCode(EFFECT_INDESTRUCTABLE_COUNT)
e3:SetRange(LOCATION_MZONE)
e3:SetTargetRange(LOCATION_ONFIELD,0)
e3:SetTarget(c40009033.target1)
e3:SetValue(c40009033.indct)
c:RegisterEffect(e3)
end
function c40009033.matfilter(c)
return c:GetBaseAttack()==0 and c:IsType(TYPE_EFFECT)
end
function c40009033.eqcon(e,tp,eg,ep,ev,re,r,rp)
return e:GetHandler():IsSummonType(SUMMON_TYPE_LINK)
end
function c40009033.eqfilter(c,ec)
return (c:IsSetCard(0xf13) and c:IsType(TYPE_QUICKPLAY)) and not c:IsForbidden()
end
function c40009033.eqtg(e,tp,eg,ep,ev,re,r,rp,chk,chkc)
if chk==0 then return Duel.GetLocationCount(tp,LOCATION_SZONE)>0
and Duel.IsExistingMatchingCard(c40009033.eqfilter,tp,LOCATION_HAND+LOCATION_DECK+LOCATION_GRAVE,0,1,nil,e:GetHandler()) end
Duel.SetOperationInfo(0,CATEGORY_EQUIP,nil,1,tp,LOCATION_HAND+LOCATION_DECK+LOCATION_GRAVE)
end
function c40009033.eqop(e,tp,eg,ep,ev,re,r,rp)
local c=e:GetHandler()
if Duel.GetLocationCount(tp,LOCATION_SZONE)<=0 then return end
local ft=Duel.GetLocationCount(tp,LOCATION_SZONE)
if c:IsRelateToEffect(e) and c:IsFaceup() then
Duel.Hint(HINT_SELECTMSG,tp,HINTMSG_EQUIP)
if ft>=3 then
g=Duel.SelectMatchingCard(tp,c40009033.eqfilter,tp,LOCATION_HAND+LOCATION_DECK+LOCATION_GRAVE,0,1,3,c)
else
g=Duel.SelectMatchingCard(tp,c40009033.eqfilter,tp,LOCATION_HAND+LOCATION_DECK+LOCATION_GRAVE,0,1,ft,c)
end
local tc=g:GetFirst()
while tc do
Duel.Equip(tp,tc,c,true,true)
-- Duel.Equip(tp,tc,c)
--equip limit
local e1=Effect.CreateEffect(c)
e1:SetType(EFFECT_TYPE_SINGLE)
e1:SetProperty(EFFECT_FLAG_OWNER_RELATE)
e1:SetCode(EFFECT_EQUIP_LIMIT)
e1:SetReset(RESET_EVENT+RESETS_STANDARD)
e1:SetLabelObject(c)
e1:SetValue(c40009033.eqlimit)
tc:RegisterEffect(e1)
tc=g:GetNext()
end
Duel.EquipComplete()
end
end
function c40009033.eqlimit(e,c)
return c==e:GetLabelObject()
end
function c40009033.cfilter(c)
return c:IsFaceup() and c:IsSetCard(0xf13)
end
function c40009033.target(e,tp,eg,ep,ev,re,r,rp,chk,chkc)
if chkc then return chkc:IsOnField() and chkc:IsFaceup() end
if chk==0 then return Duel.IsExistingMatchingCard(c40009033.cfilter,tp,LOCATION_SZONE,0,1,nil)
and Duel.IsExistingTarget(aux.TRUE,tp,LOCATION_ONFIELD,LOCATION_ONFIELD,1,nil) end
local g=Duel.GetMatchingGroup(c40009033.cfilter,tp,LOCATION_SZONE,0,nil)
local ct=g:GetClassCount(Card.GetCode)
Duel.Hint(HINT_SELECTMSG,tp,HINTMSG_DESTROY)
local sg=Duel.SelectTarget(tp,aux.TRUE,tp,LOCATION_ONFIELD,LOCATION_ONFIELD,1,ct,nil)
Duel.SetOperationInfo(0,CATEGORY_DESTROY,sg,sg:GetCount(),0,0)
end
function c40009033.activate(e,tp,eg,ep,ev,re,r,rp)
local g=Duel.GetChainInfo(0,CHAININFO_TARGET_CARDS):Filter(Card.IsRelateToEffect,nil,e)
Duel.Destroy(g,REASON_EFFECT)
end
function c40009033.target1(e,c)
return c:IsSetCard(0xf13)
end
function c40009033.indct(e,re,r,rp)
if bit.band(r,REASON_BATTLE+REASON_EFFECT)~=0 then
return 1
else return 0 end
end
--机空队 神风
function c40009035.initial_effect(c)
--damage conversion
local e2=Effect.CreateEffect(c)
e2:SetDescription(aux.Stringid(40009035,0))
e2:SetType(EFFECT_TYPE_QUICK_O)
e2:SetCode(EVENT_FREE_CHAIN)
e2:SetRange(LOCATION_HAND)
e2:SetCountLimit(1,40009035)
e2:SetHintTiming(0,TIMING_DRAW_PHASE+TIMING_STANDBY_PHASE)
e2:SetCost(c40009035.cost)
e2:SetOperation(c40009035.operation)
c:RegisterEffect(e2)
--special summon
local e3=Effect.CreateEffect(c)
e3:SetDescription(aux.Stringid(40009035,1))
e3:SetCategory(CATEGORY_SPECIAL_SUMMON)
e3:SetType(EFFECT_TYPE_FIELD+EFFECT_TYPE_TRIGGER_O)
e3:SetCode(EVENT_SPSUMMON_SUCCESS)
e3:SetRange(LOCATION_GRAVE)
e3:SetCondition(c40009035.spcon)
e3:SetTarget(c40009035.sptg)
e3:SetOperation(c40009035.spop)
c:RegisterEffect(e3)
end
function c40009035.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 c40009035.operation(e,tp,eg,ep,ev,re,r,rp)
local e1=Effect.CreateEffect(e:GetHandler())
e1:SetType(EFFECT_TYPE_FIELD)
e1:SetCode(EFFECT_QP_ACT_IN_NTPHAND)
e1:SetTargetRange(LOCATION_HAND,0)
e1:SetTarget(c40009035.etarget)
e1:SetReset(RESET_PHASE+PHASE_END)
Duel.RegisterEffect(e1,tp)
local e2=e1:Clone()
e2:SetCode(EFFECT_TRAP_ACT_IN_HAND)
Duel.RegisterEffect(e2,tp)
end
function c40009035.etarget(e,c)
return c:IsSetCard(0xf13)
end
function c40009035.cfilter(c,tp)
return c:IsControler(tp) and c:IsSetCard(0xf13) and c:IsType(TYPE_LINK) and c:IsSummonType(SUMMON_TYPE_LINK)
end
function c40009035.spcon(e,tp,eg,ep,ev,re,r,rp)
return eg:IsExists(c40009035.cfilter,1,nil,tp)
end
function c40009035.sptg(e,tp,eg,ep,ev,re,r,rp,chk)
local zone=0
local lg=eg:Filter(c40009035.cfilter,nil,tp)
for tc in aux.Next(lg) do
zone=bit.bor(zone,tc:GetLinkedZone())
end
if chk==0 then return Duel.GetLocationCount(tp,LOCATION_MZONE)>0
and e:GetHandler():IsCanBeSpecialSummoned(e,0,tp,false,false,POS_FACEUP,tp,zone) end
Duel.SetOperationInfo(0,CATEGORY_SPECIAL_SUMMON,e:GetHandler(),1,0,0)
end
function c40009035.spop(e,tp,eg,ep,ev,re,r,rp)
local c=e:GetHandler()
local zone=0
local lg=eg:Filter(c40009035.cfilter,nil,tp)
for tc in aux.Next(lg) do
zone=bit.bor(zone,tc:GetLinkedZone())
end
if c:IsRelateToEffect(e) and zone~=0 and Duel.SpecialSummonStep(c,0,tp,tp,false,false,POS_FACEUP,zone) then
local e2=Effect.CreateEffect(c)
e2:SetType(EFFECT_TYPE_SINGLE)
e2:SetProperty(EFFECT_FLAG_CANNOT_DISABLE)
e2:SetCode(EFFECT_LEAVE_FIELD_REDIRECT)
e2:SetValue(LOCATION_REMOVED)
e2:SetReset(RESET_EVENT+RESETS_REDIRECT)
c:RegisterEffect(e2,true)
Duel.SpecialSummonComplete()
end
end
\ No newline at end of file
--机空武装 朝日
function c40009036.initial_effect(c)
--Activate
local e1=Effect.CreateEffect(c)
e1:SetCategory(CATEGORY_EQUIP+CATEGORY_DESTROY)
e1:SetType(EFFECT_TYPE_ACTIVATE)
e1:SetProperty(EFFECT_FLAG_CARD_TARGET)
e1:SetCode(EVENT_ATTACK_ANNOUNCE)
e1:SetCost(c40009036.cost)
e1:SetCondition(c40009036.condition)
e1:SetTarget(c40009036.target)
e1:SetOperation(c40009036.operation)
c:RegisterEffect(e1)
--atk up
local e2=Effect.CreateEffect(c)
e2:SetType(EFFECT_TYPE_EQUIP)
e2:SetCode(EFFECT_UPDATE_ATTACK)
e2:SetValue(c40009036.atkval)
c:RegisterEffect(e2)
--battle indestructable
local e4=Effect.CreateEffect(c)
e4:SetType(EFFECT_TYPE_EQUIP)
e4:SetCode(EFFECT_INDESTRUCTABLE_BATTLE)
e4:SetValue(1)
c:RegisterEffect(e4)
end
function c40009036.atkval(e,c)
return Duel.GetFieldGroupCount(0,LOCATION_GRAVE,LOCATION_GRAVE)*100
end
function c40009036.condition(e,tp,eg,ep,ev,re,r,rp)
return Duel.GetAttacker():GetControler()~=tp
end
function c40009036.cost(e,tp,eg,ep,ev,re,r,rp,chk)
if chk==0 then return true end
local c=e:GetHandler()
local cid=Duel.GetChainInfo(0,CHAININFO_CHAIN_ID)
local e1=Effect.CreateEffect(c)
e1:SetType(EFFECT_TYPE_SINGLE)
e1:SetCode(EFFECT_REMAIN_FIELD)
e1:SetProperty(EFFECT_FLAG_OATH)
e1:SetReset(RESET_CHAIN)
c:RegisterEffect(e1)
local e2=Effect.CreateEffect(c)
e2:SetType(EFFECT_TYPE_FIELD+EFFECT_TYPE_CONTINUOUS)
e2:SetCode(EVENT_CHAIN_DISABLED)
e2:SetOperation(c40009036.tgop)
e2:SetLabel(cid)
e2:SetReset(RESET_CHAIN)
Duel.RegisterEffect(e2,tp)
end
function c40009036.tgop(e,tp,eg,ep,ev,re,r,rp)
local cid=Duel.GetChainInfo(ev,CHAININFO_CHAIN_ID)
if cid~=e:GetLabel() then return end
if e:GetOwner():IsRelateToChain(ev) then
e:GetOwner():CancelToGrave(false)
end
end
function c40009036.filter(c)
return c:IsFaceup() and c:IsType(TYPE_MONSTER) and c:IsSetCard(0xf13)
end
function c40009036.target(e,tp,eg,ep,ev,re,r,rp,chk,chkc)
if chkc then return chkc:IsLocation(LOCATION_MZONE) and chkc:IsControler(tp) and c40009036.filter(chkc) end
if chk==0 then return
e:IsHasType(EFFECT_TYPE_ACTIVATE)
and Duel.IsExistingTarget(c40009036.filter,tp,LOCATION_MZONE,0,1,nil)
and Duel.GetAttacker():IsRelateToBattle() end
Duel.SetTargetCard(Duel.GetAttacker())
Duel.Hint(HINT_SELECTMSG,tp,HINTMSG_EQUIP)
Duel.SelectTarget(tp,c40009036.filter,tp,LOCATION_MZONE,0,1,1,nil)
Duel.SetOperationInfo(0,CATEGORY_EQUIP,e:GetHandler(),1,0,0)
Duel.SetOperationInfo(0,CATEGORY_DESTROY,Duel.GetAttacker(),1,0,0)
end
function c40009036.eqlimit(e,c)
return c:GetControler()==e:GetHandlerPlayer() and c:IsType(TYPE_MONSTER) and c:IsSetCard(0xf13)
end
function c40009036.operation(e,tp,eg,ep,ev,re,r,rp)
local c=e:GetHandler()
if not c:IsLocation(LOCATION_SZONE) then return end
if not c:IsRelateToEffect(e) or c:IsStatus(STATUS_LEAVE_CONFIRMED) then return end
local tc=Duel.GetFirstTarget()
local dc=Duel.GetAttacker()
if dc:IsRelateToEffect(e) and Duel.Destroy(dc,REASON_EFFECT)~=0 and tc:IsRelateToEffect(e) and tc:IsFaceup() then
Duel.BreakEffect()
Duel.Equip(tp,c,tc)
local e2=Effect.CreateEffect(c)
e2:SetType(EFFECT_TYPE_EQUIP)
e2:SetCode(EFFECT_CANNOT_BE_EFFECT_TARGET)
e2:SetProperty(EFFECT_FLAG_IGNORE_IMMUNE)
e2:SetValue(aux.tgoval)
e2:SetReset(RESET_EVENT+RESETS_STANDARD)
c:RegisterEffect(e2)
local e3=Effect.CreateEffect(c)
e3:SetType(EFFECT_TYPE_SINGLE)
e3:SetCode(EFFECT_EQUIP_LIMIT)
e3:SetProperty(EFFECT_FLAG_CANNOT_DISABLE)
e3:SetValue(c40009036.eqlimit)
e3:SetReset(RESET_EVENT+RESETS_STANDARD)
c:RegisterEffect(e3)
else
c:CancelToGrave(false)
end
end
\ No newline at end of file
--机空武装 轻羽
function c40009037.initial_effect(c)
--Activate
local e1=Effect.CreateEffect(c)
e1:SetCategory(CATEGORY_NEGATE+CATEGORY_EQUIP+CATEGORY_DESTROY)
e1:SetType(EFFECT_TYPE_ACTIVATE)
e1:SetCode(EVENT_CHAINING)
e1:SetProperty(EFFECT_FLAG_CARD_TARGET+EFFECT_FLAG_DAMAGE_STEP+EFFECT_FLAG_DAMAGE_CAL)
e1:SetCost(c40009037.cost)
e1:SetCondition(c40009037.condition)
e1:SetTarget(c40009037.target)
e1:SetOperation(c40009037.operation)
c:RegisterEffect(e1)
--atk up
local e2=Effect.CreateEffect(c)
e2:SetType(EFFECT_TYPE_EQUIP)
e2:SetCode(EFFECT_UPDATE_ATTACK)
e2:SetValue(c40009037.atkval)
c:RegisterEffect(e2)
--immune
local e4=Effect.CreateEffect(c)
e4:SetType(EFFECT_TYPE_EQUIP)
e4:SetCode(EFFECT_IMMUNE_EFFECT)
e4:SetValue(c40009037.efilter)
c:RegisterEffect(e4)
end
function c40009037.efilter(e,te)
return te:GetOwnerPlayer()~=e:GetHandlerPlayer() and te:GetOwner()~=e:GetOwner()
and te:IsActiveType(TYPE_MONSTER)
end
function c40009037.atkval(e,c)
return Duel.GetFieldGroupCount(0,LOCATION_GRAVE,LOCATION_GRAVE)*100
end
function c40009037.condition(e,tp,eg,ep,ev,re,r,rp)
return ep~=tp and re:IsActiveType(TYPE_MONSTER) and Duel.IsChainNegatable(ev)
end
function c40009037.cost(e,tp,eg,ep,ev,re,r,rp,chk)
if chk==0 then return true end
local c=e:GetHandler()
local cid=Duel.GetChainInfo(0,CHAININFO_CHAIN_ID)
local e1=Effect.CreateEffect(c)
e1:SetType(EFFECT_TYPE_SINGLE)
e1:SetCode(EFFECT_REMAIN_FIELD)
e1:SetProperty(EFFECT_FLAG_OATH)
e1:SetReset(RESET_CHAIN)
c:RegisterEffect(e1)
local e2=Effect.CreateEffect(c)
e2:SetType(EFFECT_TYPE_FIELD+EFFECT_TYPE_CONTINUOUS)
e2:SetCode(EVENT_CHAIN_DISABLED)
e2:SetOperation(c40009037.tgop)
e2:SetLabel(cid)
e2:SetReset(RESET_CHAIN)
Duel.RegisterEffect(e2,tp)
end
function c40009037.tgop(e,tp,eg,ep,ev,re,r,rp)
local cid=Duel.GetChainInfo(ev,CHAININFO_CHAIN_ID)
if cid~=e:GetLabel() then return end
if e:GetOwner():IsRelateToChain(ev) then
e:GetOwner():CancelToGrave(false)
end
end
function c40009037.filter(c)
return c:IsFaceup() and c:IsType(TYPE_MONSTER) and c:IsSetCard(0xf13)
end
function c40009037.target(e,tp,eg,ep,ev,re,r,rp,chk,chkc)
if chkc then return chkc:IsLocation(LOCATION_MZONE) and chkc:IsControler(tp) and c40009037.filter(chkc) end
if chk==0 then return not e:GetHandler():IsStatus(STATUS_CHAINING) and
e:IsHasType(EFFECT_TYPE_ACTIVATE)
and Duel.IsExistingTarget(c40009037.filter,tp,LOCATION_MZONE,0,1,nil)
end
Duel.Hint(HINT_SELECTMSG,tp,HINTMSG_EQUIP)
Duel.SelectTarget(tp,c40009037.filter,tp,LOCATION_MZONE,0,1,1,nil)
Duel.SetOperationInfo(0,CATEGORY_EQUIP,e:GetHandler(),1,0,0)
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 c40009037.eqlimit(e,c)
return c:GetControler()==e:GetHandlerPlayer() and c:IsType(TYPE_MONSTER) and c:IsSetCard(0xf13)
end
function c40009037.operation(e,tp,eg,ep,ev,re,r,rp)
local c=e:GetHandler()
if not c:IsLocation(LOCATION_SZONE) then return end
if not c:IsRelateToEffect(e) or c:IsStatus(STATUS_LEAVE_CONFIRMED) then return end
local tc=Duel.GetFirstTarget()
if Duel.NegateActivation(ev) and re:GetHandler():IsRelateToEffect(re) and Duel.Destroy(eg,REASON_EFFECT)~=0 and tc:IsRelateToEffect(e) and tc:IsFaceup() then
Duel.BreakEffect()
Duel.Equip(tp,c,tc)
local e2=Effect.CreateEffect(c)
e2:SetType(EFFECT_TYPE_EQUIP)
e2:SetCode(EFFECT_CANNOT_BE_EFFECT_TARGET)
e2:SetProperty(EFFECT_FLAG_IGNORE_IMMUNE)
e2:SetValue(aux.tgoval)
e2:SetReset(RESET_EVENT+RESETS_STANDARD)
c:RegisterEffect(e2)
local e3=Effect.CreateEffect(c)
e3:SetType(EFFECT_TYPE_SINGLE)
e3:SetCode(EFFECT_EQUIP_LIMIT)
e3:SetProperty(EFFECT_FLAG_CANNOT_DISABLE)
e3:SetValue(c40009037.eqlimit)
e3:SetReset(RESET_EVENT+RESETS_STANDARD)
c:RegisterEffect(e3)
else
c:CancelToGrave(false)
end
end
\ No newline at end of file
--机空武装 奔星
function c40009038.initial_effect(c)
--Activate
local e1=Effect.CreateEffect(c)
e1:SetCategory(CATEGORY_NEGATE+CATEGORY_EQUIP+CATEGORY_DESTROY)
e1:SetType(EFFECT_TYPE_ACTIVATE)
e1:SetCode(EVENT_CHAINING)
e1:SetProperty(EFFECT_FLAG_CARD_TARGET+EFFECT_FLAG_DAMAGE_STEP+EFFECT_FLAG_DAMAGE_CAL)
e1:SetCost(c40009038.cost)
e1:SetCondition(c40009038.condition)
e1:SetTarget(c40009038.target)
e1:SetOperation(c40009038.operation)
c:RegisterEffect(e1)
--atk up
local e2=Effect.CreateEffect(c)
e2:SetType(EFFECT_TYPE_EQUIP)
e2:SetCode(EFFECT_UPDATE_ATTACK)
e2:SetValue(c40009038.atkval)
c:RegisterEffect(e2)
--immune
local e4=Effect.CreateEffect(c)
e4:SetType(EFFECT_TYPE_EQUIP)
e4:SetCode(EFFECT_IMMUNE_EFFECT)
e4:SetValue(c40009038.efilter)
c:RegisterEffect(e4)
end
function c40009038.efilter(e,te)
return te:GetOwnerPlayer()~=e:GetHandlerPlayer() and te:GetOwner()~=e:GetOwner()
and te:IsActiveType(TYPE_TRAP)
end
function c40009038.atkval(e,c)
return Duel.GetFieldGroupCount(0,LOCATION_GRAVE,LOCATION_GRAVE)*100
end
function c40009038.condition(e,tp,eg,ep,ev,re,r,rp)
return ep~=tp and re:IsActiveType(TYPE_TRAP) and Duel.IsChainNegatable(ev)
end
function c40009038.cost(e,tp,eg,ep,ev,re,r,rp,chk)
if chk==0 then return true end
local c=e:GetHandler()
local cid=Duel.GetChainInfo(0,CHAININFO_CHAIN_ID)
local e1=Effect.CreateEffect(c)
e1:SetType(EFFECT_TYPE_SINGLE)
e1:SetCode(EFFECT_REMAIN_FIELD)
e1:SetProperty(EFFECT_FLAG_OATH)
e1:SetReset(RESET_CHAIN)
c:RegisterEffect(e1)
local e2=Effect.CreateEffect(c)
e2:SetType(EFFECT_TYPE_FIELD+EFFECT_TYPE_CONTINUOUS)
e2:SetCode(EVENT_CHAIN_DISABLED)
e2:SetOperation(c40009038.tgop)
e2:SetLabel(cid)
e2:SetReset(RESET_CHAIN)
Duel.RegisterEffect(e2,tp)
end
function c40009038.tgop(e,tp,eg,ep,ev,re,r,rp)
local cid=Duel.GetChainInfo(ev,CHAININFO_CHAIN_ID)
if cid~=e:GetLabel() then return end
if e:GetOwner():IsRelateToChain(ev) then
e:GetOwner():CancelToGrave(false)
end
end
function c40009038.filter(c)
return c:IsFaceup() and c:IsType(TYPE_MONSTER) and c:IsSetCard(0xf13)
end
function c40009038.target(e,tp,eg,ep,ev,re,r,rp,chk,chkc)
if chkc then return chkc:IsLocation(LOCATION_MZONE) and chkc:IsControler(tp) and c40009038.filter(chkc) end
if chk==0 then return not e:GetHandler():IsStatus(STATUS_CHAINING) and
e:IsHasType(EFFECT_TYPE_ACTIVATE)
and Duel.IsExistingTarget(c40009038.filter,tp,LOCATION_MZONE,0,1,nil)
end
Duel.Hint(HINT_SELECTMSG,tp,HINTMSG_EQUIP)
Duel.SelectTarget(tp,c40009038.filter,tp,LOCATION_MZONE,0,1,1,nil)
Duel.SetOperationInfo(0,CATEGORY_EQUIP,e:GetHandler(),1,0,0)
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 c40009038.eqlimit(e,c)
return c:GetControler()==e:GetHandlerPlayer() and c:IsType(TYPE_MONSTER) and c:IsSetCard(0xf13)
end
function c40009038.operation(e,tp,eg,ep,ev,re,r,rp)
local c=e:GetHandler()
if not c:IsLocation(LOCATION_SZONE) then return end
if not c:IsRelateToEffect(e) or c:IsStatus(STATUS_LEAVE_CONFIRMED) then return end
local tc=Duel.GetFirstTarget()
if Duel.NegateActivation(ev) and re:GetHandler():IsRelateToEffect(re) and Duel.Destroy(eg,REASON_EFFECT)~=0 and tc:IsRelateToEffect(e) and tc:IsFaceup() then
Duel.BreakEffect()
Duel.Equip(tp,c,tc)
local e2=Effect.CreateEffect(c)
e2:SetType(EFFECT_TYPE_EQUIP)
e2:SetCode(EFFECT_CANNOT_BE_EFFECT_TARGET)
e2:SetProperty(EFFECT_FLAG_IGNORE_IMMUNE)
e2:SetValue(aux.tgoval)
e2:SetReset(RESET_EVENT+RESETS_STANDARD)
c:RegisterEffect(e2)
local e3=Effect.CreateEffect(c)
e3:SetType(EFFECT_TYPE_SINGLE)
e3:SetCode(EFFECT_EQUIP_LIMIT)
e3:SetProperty(EFFECT_FLAG_CANNOT_DISABLE)
e3:SetValue(c40009038.eqlimit)
e3:SetReset(RESET_EVENT+RESETS_STANDARD)
c:RegisterEffect(e3)
else
c:CancelToGrave(false)
end
end
--机空武装 暮雨
function c40009039.initial_effect(c)
--Activate
local e1=Effect.CreateEffect(c)
e1:SetCategory(CATEGORY_NEGATE+CATEGORY_EQUIP+CATEGORY_DESTROY)
e1:SetType(EFFECT_TYPE_ACTIVATE)
e1:SetCode(EVENT_CHAINING)
e1:SetProperty(EFFECT_FLAG_CARD_TARGET+EFFECT_FLAG_DAMAGE_STEP+EFFECT_FLAG_DAMAGE_CAL)
e1:SetCost(c40009039.cost)
e1:SetCondition(c40009039.condition)
e1:SetTarget(c40009039.target)
e1:SetOperation(c40009039.operation)
c:RegisterEffect(e1)
--atk up
local e2=Effect.CreateEffect(c)
e2:SetType(EFFECT_TYPE_EQUIP)
e2:SetCode(EFFECT_UPDATE_ATTACK)
e2:SetValue(c40009039.atkval)
c:RegisterEffect(e2)
--immune
local e4=Effect.CreateEffect(c)
e4:SetType(EFFECT_TYPE_EQUIP)
e4:SetCode(EFFECT_IMMUNE_EFFECT)
e4:SetValue(c40009039.efilter)
c:RegisterEffect(e4)
end
function c40009039.efilter(e,te)
return te:GetOwnerPlayer()~=e:GetHandlerPlayer() and te:GetOwner()~=e:GetOwner()
and te:IsActiveType(TYPE_SPELL)
end
function c40009039.atkval(e,c)
return Duel.GetFieldGroupCount(0,LOCATION_GRAVE,LOCATION_GRAVE)*100
end
function c40009039.condition(e,tp,eg,ep,ev,re,r,rp)
return ep~=tp and re:IsActiveType(TYPE_SPELL) and Duel.IsChainNegatable(ev)
end
function c40009039.cost(e,tp,eg,ep,ev,re,r,rp,chk)
if chk==0 then return true end
local c=e:GetHandler()
local cid=Duel.GetChainInfo(0,CHAININFO_CHAIN_ID)
local e1=Effect.CreateEffect(c)
e1:SetType(EFFECT_TYPE_SINGLE)
e1:SetCode(EFFECT_REMAIN_FIELD)
e1:SetProperty(EFFECT_FLAG_OATH)
e1:SetReset(RESET_CHAIN)
c:RegisterEffect(e1)
local e2=Effect.CreateEffect(c)
e2:SetType(EFFECT_TYPE_FIELD+EFFECT_TYPE_CONTINUOUS)
e2:SetCode(EVENT_CHAIN_DISABLED)
e2:SetOperation(c40009039.tgop)
e2:SetLabel(cid)
e2:SetReset(RESET_CHAIN)
Duel.RegisterEffect(e2,tp)
end
function c40009039.tgop(e,tp,eg,ep,ev,re,r,rp)
local cid=Duel.GetChainInfo(ev,CHAININFO_CHAIN_ID)
if cid~=e:GetLabel() then return end
if e:GetOwner():IsRelateToChain(ev) then
e:GetOwner():CancelToGrave(false)
end
end
function c40009039.filter(c)
return c:IsFaceup() and c:IsType(TYPE_MONSTER) and c:IsSetCard(0xf13)
end
function c40009039.target(e,tp,eg,ep,ev,re,r,rp,chk,chkc)
if chkc then return chkc:IsLocation(LOCATION_MZONE) and chkc:IsControler(tp) and c40009039.filter(chkc) end
if chk==0 then return not e:GetHandler():IsStatus(STATUS_CHAINING) and
e:IsHasType(EFFECT_TYPE_ACTIVATE)
and Duel.IsExistingTarget(c40009039.filter,tp,LOCATION_MZONE,0,1,nil)
end
Duel.Hint(HINT_SELECTMSG,tp,HINTMSG_EQUIP)
Duel.SelectTarget(tp,c40009039.filter,tp,LOCATION_MZONE,0,1,1,nil)
Duel.SetOperationInfo(0,CATEGORY_EQUIP,e:GetHandler(),1,0,0)
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 c40009039.eqlimit(e,c)
return c:GetControler()==e:GetHandlerPlayer() and c:IsType(TYPE_MONSTER) and c:IsSetCard(0xf13)
end
function c40009039.operation(e,tp,eg,ep,ev,re,r,rp)
local c=e:GetHandler()
if not c:IsLocation(LOCATION_SZONE) then return end
if not c:IsRelateToEffect(e) or c:IsStatus(STATUS_LEAVE_CONFIRMED) then return end
local tc=Duel.GetFirstTarget()
if Duel.NegateActivation(ev) and re:GetHandler():IsRelateToEffect(re) and Duel.Destroy(eg,REASON_EFFECT)~=0 and tc:IsRelateToEffect(e) and tc:IsFaceup() then
Duel.BreakEffect()
Duel.Equip(tp,c,tc)
local e2=Effect.CreateEffect(c)
e2:SetType(EFFECT_TYPE_EQUIP)
e2:SetCode(EFFECT_CANNOT_BE_EFFECT_TARGET)
e2:SetProperty(EFFECT_FLAG_IGNORE_IMMUNE)
e2:SetValue(aux.tgoval)
e2:SetReset(RESET_EVENT+RESETS_STANDARD)
c:RegisterEffect(e2)
local e3=Effect.CreateEffect(c)
e3:SetType(EFFECT_TYPE_SINGLE)
e3:SetCode(EFFECT_EQUIP_LIMIT)
e3:SetProperty(EFFECT_FLAG_CANNOT_DISABLE)
e3:SetValue(c40009039.eqlimit)
e3:SetReset(RESET_EVENT+RESETS_STANDARD)
c:RegisterEffect(e3)
else
c:CancelToGrave(false)
end
end
--机空援护 苍天降临
function c40009040.initial_effect(c)
--activate
local e1=Effect.CreateEffect(c)
e1:SetType(EFFECT_TYPE_ACTIVATE)
e1:SetCode(EVENT_FREE_CHAIN)
e1:SetHintTiming(0,TIMINGS_CHECK_MONSTER+TIMING_END_PHASE)
c:RegisterEffect(e1)
--synchro effect
local e2=Effect.CreateEffect(c)
e2:SetDescription(aux.Stringid(40009040,1))
e2:SetCategory(CATEGORY_SPECIAL_SUMMON)
e2:SetType(EFFECT_TYPE_QUICK_O)
e2:SetCode(EVENT_FREE_CHAIN)
e2:SetRange(LOCATION_SZONE)
e2:SetHintTiming(0,TIMING_BATTLE_START+TIMING_BATTLE_END)
e2:SetCountLimit(1,40009040)
e2:SetCondition(c40009040.sccon)
e2:SetTarget(c40009040.target)
e2:SetOperation(c40009040.activate)
c:RegisterEffect(e2)
--special summon
local e3=Effect.CreateEffect(c)
e3:SetDescription(aux.Stringid(40009040,2))
e3:SetCategory(CATEGORY_SPECIAL_SUMMON)
e3:SetType(EFFECT_TYPE_QUICK_O)
e3:SetProperty(EFFECT_FLAG_CARD_TARGET)
e3:SetCode(EVENT_FREE_CHAIN)
e3:SetRange(LOCATION_SZONE)
e3:SetCountLimit(1,40009040)
e3:SetCost(c40009040.spcost)
e3:SetTarget(c40009040.sptg2)
e3:SetOperation(c40009040.spop2)
c:RegisterEffect(e3)
end
function c40009040.sccon(e,tp,eg,ep,ev,re,r,rp)
if Duel.GetTurnPlayer()==tp then return false end
local ph=Duel.GetCurrentPhase()
return ph==PHASE_MAIN1 or (ph>=PHASE_BATTLE_START and ph<=PHASE_BATTLE) or ph==PHASE_MAIN2
end
function c40009040.filter1(c)
return c:IsLinkSummonable(nil)
end
function c40009040.target(e,tp,eg,ep,ev,re,r,rp,chk)
if chk==0 then return Duel.IsExistingMatchingCard(c40009040.filter1,tp,LOCATION_EXTRA,0,1,nil) end
Duel.SetOperationInfo(0,CATEGORY_SPECIAL_SUMMON,nil,1,0,0)
end
function c40009040.activate(e,tp,eg,ep,ev,re,r,rp)
Duel.Hint(HINT_SELECTMSG,tp,HINTMSG_SPSUMMON)
local g=Duel.SelectMatchingCard(tp,c40009040.filter1,tp,LOCATION_EXTRA,0,1,1,nil)
local tc=g:GetFirst()
if tc then
Duel.LinkSummon(tp,tc,nil)
end
end
function c40009040.spcost(e,tp,eg,ep,ev,re,r,rp,chk)
if chk==0 then return e:GetHandler():IsAbleToGraveAsCost() end
Duel.SendtoGrave(e:GetHandler(),REASON_COST)
end
function c40009040.filter(c)
return c:IsFaceup() and c:IsSetCard(0xf13) and c:IsType(TYPE_LINK)
end
function c40009040.spfilter2(c,e,tp)
return c:IsSetCard(0xf13) and c:IsType(TYPE_LINK) and c:IsCanBeSpecialSummoned(e,0,tp,false,false,POS_FACEUP)
end
function c40009040.sptg2(e,tp,eg,ep,ev,re,r,rp,chk,chkc)
if chkc then return chkc:IsControler(tp) and chkc:IsLocation(LOCATION_MZONE) and c40009040.filter(chkc) end
if chk==0 then return Duel.GetLocationCount(tp,LOCATION_MZONE)>0
and Duel.IsExistingTarget(c40009040.filter,tp,LOCATION_MZONE,0,1,nil)
and Duel.IsExistingMatchingCard(c40009040.spfilter2,tp,LOCATION_GRAVE,0,1,nil,e,tp) end
Duel.Hint(HINT_SELECTMSG,tp,HINTMSG_FACEUP)
Duel.SelectTarget(tp,c40009040.filter,tp,LOCATION_MZONE,0,1,1,nil)
Duel.SetOperationInfo(0,CATEGORY_SPECIAL_SUMMON,nil,1,tp,LOCATION_GRAVE)
end
function c40009040.spop2(e,tp,eg,ep,ev,re,r,rp)
local tc=Duel.GetFirstTarget()
if not tc:IsRelateToEffect(e) then return end
local ft=math.min(Duel.GetLocationCount(tp,LOCATION_MZONE),tc:GetLink())
if ft<=0 then return end
if Duel.IsPlayerAffectedByEffect(tp,59822133) then ft=1 end
Duel.Hint(HINT_SELECTMSG,tp,HINTMSG_SPSUMMON)
local g=Duel.SelectMatchingCard(tp,aux.NecroValleyFilter(c40009040.spfilter2),tp,LOCATION_GRAVE,0,1,ft,nil,e,tp)
if g:GetCount()>0 then
Duel.SpecialSummon(g,0,tp,tp,false,false,POS_FACEUP)
end
end
--机空援护 导流屏障
function c40009041.initial_effect(c)
--activate
local e1=Effect.CreateEffect(c)
e1:SetType(EFFECT_TYPE_ACTIVATE)
e1:SetCode(EVENT_FREE_CHAIN)
c:RegisterEffect(e1)
--search
local e2=Effect.CreateEffect(c)
e2:SetDescription(aux.Stringid(40009041,0))
e2:SetCategory(CATEGORY_TOHAND+CATEGORY_SEARCH)
e2:SetType(EFFECT_TYPE_QUICK_O)
e2:SetCode(EVENT_CHAINING)
e2:SetRange(LOCATION_SZONE)
e2:SetCountLimit(1,40009041)
e2:SetCondition(c40009041.thcon)
e2:SetTarget(c40009041.thtg)
e2:SetOperation(c40009041.thop)
c:RegisterEffect(e2)
--
local e3=Effect.CreateEffect(c)
e3:SetType(EFFECT_TYPE_FIELD)
e3:SetRange(LOCATION_SZONE)
e3:SetTargetRange(LOCATION_MZONE,0)
e3:SetCode(EFFECT_UPDATE_ATTACK)
e3:SetTarget(aux.TargetBoolFunction(Card.IsSetCard,0xf13))
e3:SetValue(c40009041.atkval)
c:RegisterEffect(e3)
end
function c40009041.cfilter(c,tp)
return c:IsSetCard(0xf13) and c:IsControler(tp) and c:IsType(TYPE_QUICKPLAY)
end
function c40009041.atkval(e,c)
return Duel.GetFieldGroupCount(0,LOCATION_GRAVE,LOCATION_GRAVE)*100
end
function c40009041.thcon(e,tp,eg,ep,ev,re,r,rp)
return eg:IsExists(c40009041.cfilter,1,nil,tp)
end
function c40009041.thfilter(c,tp)
return c:IsSetCard(0xf13) and c:IsType(TYPE_QUICKPLAY) and c:IsAbleToHand()
and not Duel.IsExistingMatchingCard(Card.IsCode,tp,LOCATION_ONFIELD,0,1,nil,c:GetCode())
end
function c40009041.thtg(e,tp,eg,ep,ev,re,r,rp,chk)
if chk==0 then return Duel.IsExistingMatchingCard(c40009041.thfilter,tp,LOCATION_DECK,0,1,nil,tp) end
Duel.SetOperationInfo(0,CATEGORY_TOHAND,nil,1,tp,LOCATION_DECK)
end
function c40009041.thop(e,tp,eg,ep,ev,re,r,rp)
Duel.Hint(HINT_SELECTMSG,tp,HINTMSG_ATOHAND)
local g=Duel.SelectMatchingCard(tp,c40009041.thfilter,tp,LOCATION_DECK,0,1,1,nil,tp)
if g:GetCount()>0 then
Duel.SendtoHand(g,nil,REASON_EFFECT)
Duel.ConfirmCards(1-tp,g)
end
end
--机空援护 资讯操作
function c40009042.initial_effect(c)
--Activate
local e1=Effect.CreateEffect(c)
e1:SetCategory(CATEGORY_TOHAND+CATEGORY_SEARCH)
e1:SetType(EFFECT_TYPE_ACTIVATE)
e1:SetCode(EVENT_FREE_CHAIN)
e1:SetCountLimit(1,40009042)
e1:SetTarget(c40009042.target)
e1:SetOperation(c40009042.activate)
c:RegisterEffect(e1)
--to hand
local e3=Effect.CreateEffect(c)
e3:SetDescription(aux.Stringid(40009042,0))
e3:SetCategory(CATEGORY_TOHAND+CATEGORY_SEARCH)
e3:SetType(EFFECT_TYPE_IGNITION)
e3:SetRange(LOCATION_GRAVE)
e3:SetCost(c40009042.cost)
e3:SetTarget(c40009042.thtg)
e3:SetOperation(c40009042.thop)
c:RegisterEffect(e3)
end
function c40009042.filter2(c)
return c:IsSetCard(0xf13) and c:IsType(TYPE_SPELL+TYPE_TRAP) and c:IsAbleToHand() and not c:IsCode(40009042)
end
function c40009042.filter1(c)
return c:IsCode(40009035) and c:IsAbleToHand()
end
function c40009042.target(e,tp,eg,ep,ev,re,r,rp,chk,chkc)
if chk==0 then return Duel.IsExistingMatchingCard(c40009042.filter2,tp,LOCATION_DECK,0,1,nil) and Duel.IsExistingMatchingCard(c40009042.filter1,tp,LOCATION_DECK,0,1,nil) end
Duel.SetOperationInfo(0,CATEGORY_TOHAND,nil,1,tp,LOCATION_DECK)
end
function c40009042.activate(e,tp,eg,ep,ev,re,r,rp)
Duel.Hint(HINT_SELECTMSG,tp,HINTMSG_ATOHAND)
local g1=Duel.SelectMatchingCard(tp,c40009042.filter2,tp,LOCATION_DECK,0,1,1,nil)
local g2=Duel.SelectMatchingCard(tp,c40009042.filter1,tp,LOCATION_DECK,0,1,1,nil)
local g=g1+g2
if g:GetCount()>0 then
Duel.SendtoHand(g,nil,REASON_EFFECT)
Duel.ConfirmCards(1-tp,g)
end
end
function c40009042.cfilter(c)
return c:IsSetCard(0xf13) and c:IsFaceup() and c:IsAbleToGraveAsCost()
end
function c40009042.cost(e,tp,eg,ep,ev,re,r,rp,chk)
if chk==0 then return Duel.IsExistingMatchingCard(c40009042.cfilter,tp,LOCATION_ONFIELD,0,2,nil) and e:GetHandler():IsAbleToRemoveAsCost() end
Duel.Hint(HINT_SELECTMSG,tp,HINTMSG_TOGRAVE)
local g=Duel.SelectMatchingCard(tp,c40009042.cfilter,tp,LOCATION_ONFIELD,0,2,2,nil)
Duel.SendtoGrave(g,REASON_COST)
Duel.Remove(e:GetHandler(),POS_FACEUP,REASON_COST)
end
function c40009042.thfilter(c)
return c:IsSetCard(0xf13) and c:IsType(TYPE_QUICKPLAY) and c:IsAbleToHand()
end
function c40009042.thtg(e,tp,eg,ep,ev,re,r,rp,chk)
if chk==0 then return Duel.IsExistingMatchingCard(c40009042.thfilter,tp,LOCATION_GRAVE,0,1,nil) end
Duel.SetOperationInfo(0,CATEGORY_TOHAND,nil,1,tp,LOCATION_GRAVE)
end
function c40009042.thop(e,tp,eg,ep,ev,re,r,rp)
local g=Duel.GetMatchingGroup(c40009042.thfilter,tp,LOCATION_GRAVE,0,nil)
if g:GetCount()<=0 then return end
Duel.Hint(HINT_SELECTMSG,tp,HINTMSG_ATOHAND)
local sg1=g:SelectSubGroup(tp,aux.dncheck,false,1,2)
Duel.SendtoHand(sg1,nil,REASON_EFFECT)
Duel.ConfirmCards(1-tp,sg1)
end
--机空援护 湍流消逝
function c40009044.initial_effect(c)
--Activate
local e1=Effect.CreateEffect(c)
e1:SetCategory(CATEGORY_NEGATE+CATEGORY_REMOVE)
e1:SetType(EFFECT_TYPE_ACTIVATE)
e1:SetCode(EVENT_CHAINING)
e1:SetRange(LOCATION_HAND)
e1:SetCondition(c40009044.condition)
e1:SetCost(c40009044.thcost)
e1:SetTarget(c40009044.target)
e1:SetOperation(c40009044.activate)
c:RegisterEffect(e1)
end
function c40009044.thcost(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 c40009044.cfilter(c)
return c:IsFaceup() and c:IsCode(40009033)
end
function c40009044.condition(e,tp,eg,ep,ev,re,r,rp)
return Duel.IsExistingMatchingCard(c40009044.cfilter,tp,LOCATION_MZONE,0,1,nil)
and (re:IsActiveType(TYPE_MONSTER) or re:IsHasType(EFFECT_TYPE_ACTIVATE)) and Duel.IsChainNegatable(ev)
end
function c40009044.target(e,tp,eg,ep,ev,re,r,rp,chk)
if chk==0 then return aux.nbcon(tp,re) end
Duel.SetOperationInfo(0,CATEGORY_NEGATE,eg,1,0,0)
if re:GetHandler():IsRelateToEffect(re) then
Duel.SetOperationInfo(0,CATEGORY_REMOVE,eg,1,0,0)
end
end
function c40009044.activate(e,tp,eg,ep,ev,re,r,rp)
local tc=re:GetHandler()
if Duel.NegateActivation(ev) and tc:IsRelateToEffect(re) and Duel.Remove(eg,POS_FACEUP,REASON_EFFECT)~=0 and tc:IsLocation(LOCATION_REMOVED) then
local e1=Effect.CreateEffect(e:GetHandler())
e1:SetType(EFFECT_TYPE_FIELD)
e1:SetProperty(EFFECT_FLAG_PLAYER_TARGET)
e1:SetCode(EFFECT_CANNOT_ACTIVATE)
e1:SetTargetRange(0,1)
e1:SetValue(c40009044.aclimit)
e1:SetLabelObject(tc)
e1:SetReset(RESET_PHASE+PHASE_END,2)
Duel.RegisterEffect(e1,tp)
end
end
function c40009044.aclimit(e,re,tp)
local c=re:GetHandler()
local tc=e:GetLabelObject()
return c:IsOriginalCodeRule(tc:GetOriginalCodeRule())
end
--机空援护 联合出击
function c40009045.initial_effect(c)
--activate
local e1=Effect.CreateEffect(c)
e1:SetCategory(CATEGORY_SPECIAL_SUMMON)
e1:SetType(EFFECT_TYPE_ACTIVATE)
e1:SetCode(EVENT_FREE_CHAIN)
e1:SetProperty(EFFECT_FLAG_CARD_TARGET)
e1:SetCountLimit(1,40009045+EFFECT_COUNT_CODE_OATH)
e1:SetTarget(c40009045.target)
e1:SetOperation(c40009045.activate)
c:RegisterEffect(e1)
end
function c40009045.filter(c,e,tp)
if not (c:IsType(TYPE_LINK) and c:IsSetCard(0xf13)) then return false end
local zone=c:GetLinkedZone(tp)
return Duel.IsExistingMatchingCard(c40009045.gfilter,tp,LOCATION_EXTRA,0,1,nil,e,tp,zone)
end
function c40009045.gfilter(c,e,tp,zone)
return c:IsSetCard(0xf13) and c:IsType(TYPE_LINK) and c:IsLink(1)
and c:IsCanBeSpecialSummoned(e,0,tp,false,false,POS_FACEUP,tp,zone)
end
function c40009045.target(e,tp,eg,ep,ev,re,r,rp,chk,chkc)
if chkc then return chkc:IsLocation(LOCATION_MZONE) and chkc:IsControler(tp) and c40009045.filter(chkc,e,tp) end
if chk==0 then return Duel.IsExistingTarget(c40009045.filter,tp,LOCATION_MZONE,0,1,nil,e,tp) end
Duel.Hint(HINT_SELECTMSG,tp,HINTMSG_TARGET)
local g=Duel.SelectTarget(tp,c40009045.filter,tp,LOCATION_MZONE,0,1,1,nil,e,tp)
Duel.SetOperationInfo(0,CATEGORY_SPECIAL_SUMMON,nil,1,tp,LOCATION_EXTRA)
end
function c40009045.activate(e,tp,eg,ep,ev,re,r,rp)
local tc=Duel.GetFirstTarget()
if not tc:IsRelateToEffect(e) then return end
local zone=bit.band(tc:GetLinkedZone(tp),0x1f)
local upbound=Duel.GetLocationCount(tp,LOCATION_MZONE,tp,LOCATION_REASON_TOFIELD,zone)
if upbound<=0 then return end
Duel.Hint(HINT_SELECTMSG,tp,HINTMSG_SPSUMMON)
local g=Duel.SelectMatchingCard(tp,aux.NecroValleyFilter(c40009045.gfilter),tp,LOCATION_EXTRA,0,1,upbound,nil,e,tp,zone)
if g:GetCount()>0 then
local fid=e:GetHandler():GetFieldID()
local tc=g:GetFirst()
while tc do
Duel.SpecialSummonStep(tc,0,tp,tp,false,false,POS_FACEUP,zone)
tc=g:GetNext()
end
Duel.SpecialSummonComplete()
end
end
\ No newline at end of file
--骑士王 阿尔弗雷德
function c40009152.initial_effect(c)
--link summon
aux.AddLinkProcedure(c,aux.FilterBoolFunction(Card.IsLinkAttribute,ATTRIBUTE_LIGHT),2)
c:EnableReviveLimit()
--to hand
local e2=Effect.CreateEffect(c)
e2:SetDescription(aux.Stringid(40009152,0))
e2:SetCategory(CATEGORY_ATKCHANGE)
e2:SetType(EFFECT_TYPE_SINGLE+EFFECT_TYPE_TRIGGER_F)
e2:SetCode(EVENT_SPSUMMON_SUCCESS)
e2:SetCountLimit(1,40009152+EFFECT_COUNT_CODE_DUEL)
e2:SetCondition(c40009152.thcon)
e2:SetTarget(c40009152.atkktg)
e2:SetOperation(c40009152.atkop)
c:RegisterEffect(e2)
--special summon
local e1=Effect.CreateEffect(c)
e1:SetDescription(aux.Stringid(40009152,1))
e1:SetCategory(CATEGORY_SPECIAL_SUMMON)
e1:SetType(EFFECT_TYPE_IGNITION)
e1:SetRange(LOCATION_MZONE)
e1:SetCountLimit(1,40009153)
e1:SetCost(c40009152.cost)
e1:SetTarget(c40009152.target)
e1:SetOperation(c40009152.operation)
c:RegisterEffect(e1)
--atk
local e3=Effect.CreateEffect(c)
e3:SetType(EFFECT_TYPE_SINGLE)
e3:SetProperty(EFFECT_FLAG_SINGLE_RANGE)
e3:SetRange(LOCATION_MZONE)
e3:SetCode(EFFECT_UPDATE_ATTACK)
e3:SetCondition(c40009152.atkcon)
e3:SetValue(2000)
c:RegisterEffect(e3)
local e4=e3:Clone()
e4:SetCode(EFFECT_PIERCE)
c:RegisterEffect(e4)
end
function c40009152.thcon(e,tp,eg,ep,ev,re,r,rp)
return e:GetHandler():IsSummonType(SUMMON_TYPE_LINK)
end
function c40009152.atkktg(e,tp,eg,ep,ev,re,r,rp,chk)
if chk==0 then return true end
Duel.SetChainLimit(c40009152.chlimit)
end
function c40009152.atkop(e,tp,eg,ep,ev,re,r,rp)
local c=e:GetHandler()
local e1=Effect.CreateEffect(c)
e1:SetType(EFFECT_TYPE_FIELD)
e1:SetCode(EFFECT_UPDATE_ATTACK)
e1:SetTargetRange(LOCATION_MZONE,0)
e1:SetCondition(c40009152.discon)
e1:SetTarget(c40009152.atktg)
e1:SetValue(2000)
Duel.RegisterEffect(e1,tp)
--Duel.SetChainLimit(c40009152.chlimit)
end
function c40009152.chlimit(e,ep,tp)
return tp==ep
end
function c40009152.discon(e)
local ph=Duel.GetCurrentPhase()
return ph>=PHASE_BATTLE_START and ph<=PHASE_BATTLE
end
function c40009152.atktg(e,c)
return c:GetSequence()>=5
end
function c40009152.cost(e,tp,eg,ep,ev,re,r,rp,chk)
if chk==0 then return Duel.IsExistingMatchingCard(Card.IsDiscardable,tp,LOCATION_HAND,0,1,nil) end
Duel.DiscardHand(tp,Card.IsDiscardable,1,1,REASON_COST+REASON_DISCARD)
end
function c40009152.filter(c,e,tp,zone)
return c:IsCode(40009154) and c:IsCanBeSpecialSummoned(e,0,tp,false,false,POS_FACEUP,tp,zone)
end
function c40009152.target(e,tp,eg,ep,ev,re,r,rp,chk)
if chk==0 then
local zone=e:GetHandler():GetLinkedZone(tp)
return zone~=0 and Duel.IsExistingMatchingCard(c40009152.filter,tp,LOCATION_DECK,0,1,nil,e,tp,zone)
end
Duel.SetOperationInfo(0,CATEGORY_SPECIAL_SUMMON,nil,1,tp,LOCATION_DECK)
end
function c40009152.operation(e,tp,eg,ep,ev,re,r,rp)
local zone=e:GetHandler():GetLinkedZone(tp)
if zone==0 then return end
Duel.Hint(HINT_SELECTMSG,tp,HINTMSG_SPSUMMON)
local sg=Duel.SelectMatchingCard(tp,c40009152.filter,tp,LOCATION_DECK,0,1,1,nil,e,tp,zone)
local tc=sg:GetFirst()
if tc and Duel.SpecialSummon(sg,0,tp,tp,false,false,POS_FACEUP,zone) then
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+RESET_PHASE+PHASE_END)
tc:RegisterEffect(e1)
end
Duel.SpecialSummonComplete()
end
function c40009152.atkfilter(c)
return c:IsFaceup() and c:IsCode(40009154)
end
function c40009152.atkcon(e)
return Duel.IsExistingMatchingCard(c40009152.atkfilter,e:GetHandler():GetControler(),LOCATION_MZONE,0,1,nil)
end
--狂风剑刃
function c40009154.initial_effect(c)
--spsummon
local e2=Effect.CreateEffect(c)
e2:SetDescription(aux.Stringid(40009154,0))
e2:SetCategory(CATEGORY_SPECIAL_SUMMON)
e2:SetType(EFFECT_TYPE_SINGLE+EFFECT_TYPE_TRIGGER_O)
e2:SetProperty(EFFECT_FLAG_DELAY)
e2:SetCode(EVENT_SUMMON_SUCCESS)
e2:SetCountLimit(1,40009154)
e2:SetTarget(c40009154.sptg)
e2:SetOperation(c40009154.spop)
c:RegisterEffect(e2)
local e3=e2:Clone()
e3:SetCode(EVENT_SPSUMMON_SUCCESS)
c:RegisterEffect(e3)
--to grave
local e1=Effect.CreateEffect(c)
e1:SetDescription(aux.Stringid(40009155,1))
e1:SetCategory(CATEGORY_TOGRAVE)
e1:SetType(EFFECT_TYPE_QUICK_O)
e1:SetCode(EVENT_FREE_CHAIN)
e1:SetRange(LOCATION_MZONE)
e1:SetHintTiming(0,TIMINGS_CHECK_MONSTER+TIMING_END_PHASE)
e1:SetCountLimit(1,40009155)
e1:SetCost(c40009154.cost)
e1:SetTarget(c40009154.tg)
e1:SetOperation(c40009154.op)
c:RegisterEffect(e1)
--destroy replace
local e4=Effect.CreateEffect(c)
e4:SetType(EFFECT_TYPE_CONTINUOUS+EFFECT_TYPE_FIELD)
e4:SetCode(EFFECT_DESTROY_REPLACE)
e4:SetRange(LOCATION_MZONE)
e4:SetTarget(c40009154.reptg)
e4:SetValue(c40009154.repval)
e4:SetOperation(c40009154.repop)
c:RegisterEffect(e4)
end
function c40009154.filter1(c,e,tp)
return c:IsSetCard(0xbf1d) and c:IsCanBeSpecialSummoned(e,0,tp,false,false)
end
function c40009154.sptg(e,tp,eg,ep,ev,re,r,rp,chk)
if chk==0 then return Duel.GetLocationCount(tp,LOCATION_MZONE)>0
and Duel.IsExistingMatchingCard(c40009154.filter1,tp,LOCATION_HAND,0,1,nil,e,tp) end
Duel.SetOperationInfo(0,CATEGORY_SPECIAL_SUMMON,nil,1,tp,LOCATION_HAND)
end
function c40009154.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,c40009154.filter1,tp,LOCATION_HAND,0,1,1,nil,e,tp)
if g:GetCount()>0 then
Duel.SpecialSummon(g,0,tp,tp,false,false,POS_FACEUP)
end
local e1=Effect.CreateEffect(e:GetHandler())
e1:SetType(EFFECT_TYPE_FIELD)
e1:SetCode(EFFECT_CANNOT_SPECIAL_SUMMON)
e1:SetProperty(EFFECT_FLAG_PLAYER_TARGET)
e1:SetTargetRange(1,0)
e1:SetTarget(c40009154.splimit)
e1:SetReset(RESET_PHASE+PHASE_END)
Duel.RegisterEffect(e1,tp)
end
function c40009154.splimit(e,c)
return not c:IsSetCard(0xbf1d) and c:IsLocation(LOCATION_EXTRA)
end
function c40009154.cost(e,tp,eg,ep,ev,re,r,rp,chk)
if chk==0 then return Duel.IsExistingMatchingCard(Card.IsDiscardable,tp,LOCATION_HAND,0,2,e:GetHandler()) end
Duel.DiscardHand(tp,Card.IsDiscardable,2,2,REASON_COST+REASON_DISCARD)
end
function c40009154.tg(e,tp,eg,ep,ev,re,r,rp,chk)
if chk==0 then return Duel.IsExistingMatchingCard(Card.IsAbleToGrave,tp,LOCATION_MZONE,LOCATION_MZONE,1,nil) end
Duel.SetOperationInfo(0,CATEGORY_TOGRAVE,nil,1,PLAYER_ALL,LOCATION_MZONE)
end
function c40009154.op(e,tp,eg,ep,ev,re,r,rp)
Duel.Hint(HINT_SELECTMSG,tp,HINTMSG_TOGRAVE)
local g=Duel.SelectMatchingCard(tp,Card.IsAbleToGrave,tp,LOCATION_MZONE,LOCATION_MZONE,1,1,nil)
if g:GetCount()>0 then
Duel.HintSelection(g)
Duel.SendtoGrave(g,REASON_EFFECT)
end
end
function c40009154.filter(c,tp)
return c:IsFaceup() and c:IsControler(tp) and c:IsLocation(LOCATION_MZONE)
and c:GetSequence()>=5
end
function c40009154.reptg(e,tp,eg,ep,ev,re,r,rp,chk)
local c=e:GetHandler()
if chk==0 then return eg:IsExists(c40009154.filter,1,nil,tp)
and c:IsDestructable(e) and not c:IsStatus(STATUS_DESTROY_CONFIRMED) end
return Duel.SelectEffectYesNo(tp,c,97)
end
function c40009154.repval(e,c)
return c40009154.filter(c,e:GetHandlerPlayer())
end
function c40009154.repop(e,tp,eg,ep,ev,re,r,rp)
Duel.Destroy(e:GetHandler(),REASON_EFFECT+REASON_REPLACE)
end
\ No newline at end of file
--狂风领主
function c40009156.initial_effect(c)
--link summon
aux.AddLinkProcedure(c,aux.FilterBoolFunction(Card.IsLinkCode,40009154),1,1)
c:EnableReviveLimit()
--effect
local e1=Effect.CreateEffect(c)
e1:SetCategory(CATEGORY_ATKCHANGE)
e1:SetDescription(aux.Stringid(40009156,0))
e1:SetType(EFFECT_TYPE_IGNITION)
e1:SetCountLimit(1,40009156)
e1:SetRange(LOCATION_MZONE)
e1:SetCost(c40009156.cost)
e1:SetOperation(c40009156.operation)
c:RegisterEffect(e1)
--spsummon
local e3=Effect.CreateEffect(c)
e1:SetDescription(aux.Stringid(40009156,1))
e3:SetCategory(CATEGORY_SPECIAL_SUMMON)
e3:SetType(EFFECT_TYPE_SINGLE+EFFECT_TYPE_TRIGGER_O)
e3:SetCode(EVENT_TO_GRAVE)
e3:SetProperty(EFFECT_FLAG_CARD_TARGET+EFFECT_FLAG_DAMAGE_STEP+EFFECT_FLAG_DELAY)
e3:SetCountLimit(1,40009157)
e3:SetCondition(c40009156.spcon)
e3:SetTarget(c40009156.sptg)
e3:SetOperation(c40009156.spop)
c:RegisterEffect(e3)
end
function c40009156.cfilter1(c)
return c:IsCode(40009154) and ((c:IsFaceup() and c:IsLocation(LOCATION_MZONE)) or c:IsLocation(LOCATION_HAND)) and c:IsAbleToGraveAsCost()
end
function c40009156.cost(e,tp,eg,ep,ev,re,r,rp,chk)
if chk==0 then return Duel.IsExistingMatchingCard(c40009156.cfilter1,tp,LOCATION_HAND+LOCATION_MZONE,0,1,nil,tp) end
Duel.Hint(HINT_SELECTMSG,tp,HINTMSG_TOGRAVE)
local g=Duel.SelectMatchingCard(tp,c40009156.cfilter1,tp,LOCATION_HAND+LOCATION_MZONE,0,1,1,nil,tp)
Duel.SendtoGrave(g,REASON_COST)
end
function c40009156.operation(e,tp,eg,ep,ev,re,r,rp)
local c=e:GetHandler()
if not c:IsRelateToEffect(e) then return end
local e1=Effect.CreateEffect(c)
e1:SetType(EFFECT_TYPE_SINGLE+EFFECT_TYPE_CONTINUOUS)
e1:SetProperty(EFFECT_FLAG_CANNOT_DISABLE)
e1:SetCode(EVENT_BATTLE_START)
e1:SetOperation(c40009156.atkop)
e1:SetReset(RESET_EVENT+RESETS_STANDARD+RESET_PHASE+PHASE_END)
c:RegisterEffect(e1)
end
function c40009156.atkop(e,tp,eg,ep,ev,re,r,rp)
local c=e:GetHandler()
local e1=Effect.CreateEffect(c)
e1:SetType(EFFECT_TYPE_SINGLE)
e1:SetProperty(EFFECT_FLAG_CANNOT_DISABLE)
e1:SetCode(EFFECT_UPDATE_ATTACK)
e1:SetValue(2100)
e1:SetReset(RESET_EVENT+RESETS_STANDARD+RESET_PHASE+PHASE_DAMAGE)
c:RegisterEffect(e1)
c:RegisterFlagEffect(40009156,RESET_EVENT+RESETS_STANDARD+RESET_PHASE+PHASE_DAMAGE,0,1)
end
function c40009156.spcon(e,tp,eg,ep,ev,re,r,rp)
return e:GetHandler():IsPreviousLocation(LOCATION_ONFIELD)
end
function c40009156.spfilter(c,e,tp)
return not c:IsCode(40009156) and c:IsSetCard(0xbf1d) and c:IsCanBeSpecialSummoned(e,0,tp,false,false)
end
function c40009156.sptg(e,tp,eg,ep,ev,re,r,rp,chk,chkc)
if chkc then return chkc:IsLocation(LOCATION_GRAVE) and chkc:IsControler(tp) and c40009156.spfilter(chkc,e,tp) end
if chk==0 then return Duel.GetLocationCount(tp,LOCATION_MZONE)>0
and Duel.IsExistingTarget(c40009156.spfilter,tp,LOCATION_GRAVE,0,1,nil,e,tp) end
Duel.Hint(HINT_SELECTMSG,tp,HINTMSG_SPSUMMON)
local g=Duel.SelectTarget(tp,c40009156.spfilter,tp,LOCATION_GRAVE,0,1,1,nil,e,tp)
Duel.SetOperationInfo(0,CATEGORY_SPECIAL_SUMMON,g,1,0,0)
end
function c40009156.spop(e,tp,eg,ep,ev,re,r,rp)
local tc=Duel.GetFirstTarget()
if tc:IsRelateToEffect(e) then
Duel.SpecialSummon(tc,0,tp,tp,false,false,POS_FACEUP)
end
local e1=Effect.CreateEffect(e:GetHandler())
e1:SetType(EFFECT_TYPE_FIELD)
e1:SetCode(EFFECT_CANNOT_SPECIAL_SUMMON)
e1:SetProperty(EFFECT_FLAG_PLAYER_TARGET)
e1:SetTargetRange(1,0)
e1:SetTarget(c40009156.splimit)
e1:SetReset(RESET_PHASE+PHASE_END)
Duel.RegisterEffect(e1,tp)
end
function c40009156.splimit(e,c)
return not c:IsSetCard(0xbf1d) and c:IsLocation(LOCATION_EXTRA)
end
--狂风匕首
function c40009158.initial_effect(c)
--tohand
local e1=Effect.CreateEffect(c)
e1:SetDescription(aux.Stringid(40009158,0))
e1:SetCategory(CATEGORY_TOHAND+CATEGORY_SEARCH)
e1:SetType(EFFECT_TYPE_SINGLE+EFFECT_TYPE_TRIGGER_O)
e1:SetCode(EVENT_SUMMON_SUCCESS)
e1:SetProperty(EFFECT_FLAG_DAMAGE_STEP+EFFECT_FLAG_DELAY)
e1:SetCountLimit(1,40009158)
e1:SetTarget(c40009158.thtg)
e1:SetOperation(c40009158.thop)
c:RegisterEffect(e1)
local e2=e1:Clone()
e2:SetCode(EVENT_SPSUMMON_SUCCESS)
c:RegisterEffect(e2)
--special summon
local e3=Effect.CreateEffect(c)
e3:SetDescription(aux.Stringid(40009158,1))
e3:SetCategory(CATEGORY_SPECIAL_SUMMON)
e3:SetType(EFFECT_TYPE_IGNITION)
e3:SetRange(LOCATION_MZONE)
e3:SetCountLimit(1,40009159)
e3:SetCost(c40009158.spcost)
e3:SetTarget(c40009158.sptg)
e3:SetOperation(c40009158.spop)
c:RegisterEffect(e3)
end
function c40009158.thfilter(c)
return c:IsSetCard(0xbf1d) and c:IsType(TYPE_MONSTER) and c:IsAbleToHand() and not c:IsCode(40009158)
end
function c40009158.thtg(e,tp,eg,ep,ev,re,r,rp,chk)
if chk==0 then return Duel.IsExistingMatchingCard(c40009158.thfilter,tp,LOCATION_DECK,0,1,nil) end
Duel.SetOperationInfo(0,CATEGORY_TOHAND,nil,1,tp,LOCATION_DECK)
end
function c40009158.thop(e,tp,eg,ep,ev,re,r,rp)
Duel.Hint(HINT_SELECTMSG,tp,HINTMSG_ATOHAND)
local g=Duel.SelectMatchingCard(tp,c40009158.thfilter,tp,LOCATION_DECK,0,1,1,nil)
if #g>0 then
Duel.SendtoHand(g,nil,REASON_EFFECT)
Duel.ConfirmCards(1-tp,g)
end
end
function c40009158.cfilter(c)
return c:IsCode(40009154) and c:IsAbleToDeckAsCost()
end
function c40009158.spcost(e,tp,eg,ep,ev,re,r,rp,chk)
if chk==0 then return e:GetHandler():IsReleasable() and Duel.IsExistingMatchingCard(c40009158.cfilter,tp,LOCATION_GRAVE,0,1,nil) end
Duel.Hint(HINT_SELECTMSG,tp,HINTMSG_TODECK)
local g=Duel.SelectMatchingCard(tp,c40009158.cfilter,tp,LOCATION_GRAVE,0,1,1,nil)
Duel.Release(e:GetHandler(),REASON_COST)
Duel.SendtoDeck(g,nil,2,REASON_COST)
end
function c40009158.spfilter(c,e,tp)
return c:IsSetCard(0xbf1d) and c:IsCanBeSpecialSummoned(e,0,tp,false,false)
end
function c40009158.sptg(e,tp,eg,ep,ev,re,r,rp,chk)
if chk==0 then return Duel.GetLocationCount(tp,LOCATION_MZONE)>-1
and Duel.IsExistingMatchingCard(c40009158.spfilter,tp,LOCATION_DECK,0,1,nil,e,tp) end
Duel.SetOperationInfo(0,CATEGORY_SPECIAL_SUMMON,nil,1,tp,LOCATION_DECK)
end
function c40009158.spop(e,tp,eg,ep,ev,re,r,rp)
if Duel.GetLocationCount(tp,LOCATION_MZONE)>0 then
Duel.Hint(HINT_SELECTMSG,tp,HINTMSG_SPSUMMON)
local g=Duel.SelectMatchingCard(tp,c40009158.spfilter,tp,LOCATION_DECK,0,1,1,nil,e,tp)
if g:GetCount()>0 then
Duel.SpecialSummon(g,0,tp,tp,false,false,POS_FACEUP)
end
end
local e1=Effect.CreateEffect(e:GetHandler())
e1:SetType(EFFECT_TYPE_FIELD)
e1:SetCode(EFFECT_CANNOT_SPECIAL_SUMMON)
e1:SetProperty(EFFECT_FLAG_PLAYER_TARGET)
e1:SetTargetRange(1,0)
e1:SetTarget(c40009158.splimit)
e1:SetReset(RESET_PHASE+PHASE_END)
Duel.RegisterEffect(e1,tp)
end
function c40009158.splimit(e,c)
return not c:IsSetCard(0xbf1d) and c:IsLocation(LOCATION_EXTRA)
end
--狂风标枪
function c40009160.initial_effect(c)
--tohand
local e1=Effect.CreateEffect(c)
e1:SetDescription(aux.Stringid(40009160,0))
e1:SetCategory(CATEGORY_DRAW)
e1:SetType(EFFECT_TYPE_SINGLE+EFFECT_TYPE_TRIGGER_O)
e1:SetCode(EVENT_SUMMON_SUCCESS)
e1:SetProperty(EFFECT_FLAG_DAMAGE_STEP+EFFECT_FLAG_DELAY)
e1:SetCountLimit(1,40009160)
e1:SetTarget(c40009160.target)
e1:SetOperation(c40009160.activate)
c:RegisterEffect(e1)
local e2=e1:Clone()
e2:SetCode(EVENT_SPSUMMON_SUCCESS)
c:RegisterEffect(e2)
--special summon
local e3=Effect.CreateEffect(c)
e3:SetDescription(aux.Stringid(40009160,1))
e3:SetType(EFFECT_TYPE_IGNITION)
e3:SetRange(LOCATION_MZONE)
e3:SetCountLimit(1,40009161)
e3:SetCost(c40009160.spcost)
e3:SetTarget(c40009160.settg)
e3:SetOperation(c40009160.setop)
c:RegisterEffect(e3)
end
function c40009160.filter(c)
return c:IsSetCard(0xbf1d) and c:IsDiscardable(REASON_EFFECT)
end
function c40009160.target(e,tp,eg,ep,ev,re,r,rp,chk)
if chk==0 then return Duel.IsPlayerCanDraw(tp,2)
and Duel.IsExistingMatchingCard(c40009160.filter,tp,LOCATION_HAND,0,1,e:GetHandler()) end
Duel.SetOperationInfo(0,CATEGORY_DRAW,nil,0,tp,2)
end
function c40009160.activate(e,tp,eg,ep,ev,re,r,rp)
if Duel.DiscardHand(tp,c40009160.filter,1,1,REASON_EFFECT+REASON_DISCARD,nil)~=0 then
Duel.BreakEffect()
Duel.Draw(tp,2,REASON_EFFECT)
end
end
function c40009160.cfilter(c)
return c:IsCode(40009154) and c:IsAbleToDeckAsCost()
end
function c40009160.spcost(e,tp,eg,ep,ev,re,r,rp,chk)
if chk==0 then return e:GetHandler():IsReleasable() and Duel.IsExistingMatchingCard(c40009160.cfilter,tp,LOCATION_GRAVE,0,1,nil) end
Duel.Hint(HINT_SELECTMSG,tp,HINTMSG_TODECK)
local g=Duel.SelectMatchingCard(tp,c40009160.cfilter,tp,LOCATION_GRAVE,0,1,1,nil)
Duel.Release(e:GetHandler(),REASON_COST)
Duel.SendtoDeck(g,nil,2,REASON_COST)
end
function c40009160.setfilter(c)
return c:IsCode(40009166) and c:IsSSetable()
end
function c40009160.settg(e,tp,eg,ep,ev,re,r,rp,chk)
if chk==0 then return Duel.IsExistingMatchingCard(c40009160.setfilter,tp,LOCATION_DECK,0,1,nil) end
end
function c40009160.setop(e,tp,eg,ep,ev,re,r,rp)
Duel.Hint(HINT_SELECTMSG,tp,HINTMSG_SET)
local g=Duel.SelectMatchingCard(tp,c40009160.setfilter,tp,LOCATION_DECK,0,1,1,nil)
if #g>0 then
Duel.SSet(tp,g)
end
end
--狂风刺剑
function c40009162.initial_effect(c)
--tohand
local e1=Effect.CreateEffect(c)
e1:SetDescription(aux.Stringid(40009162,0))
e1:SetCategory(CATEGORY_SPECIAL_SUMMON)
e1:SetType(EFFECT_TYPE_SINGLE+EFFECT_TYPE_TRIGGER_O)
e1:SetCode(EVENT_SUMMON_SUCCESS)
e1:SetProperty(EFFECT_FLAG_DAMAGE_STEP+EFFECT_FLAG_DELAY)
e1:SetCountLimit(1,40009162)
e1:SetTarget(c40009162.sptg)
e1:SetOperation(c40009162.spop)
c:RegisterEffect(e1)
local e2=e1:Clone()
e2:SetCode(EVENT_SPSUMMON_SUCCESS)
c:RegisterEffect(e2)
--special summon
local e3=Effect.CreateEffect(c)
e3:SetDescription(aux.Stringid(40009162,1))
e3:SetCategory(CATEGORY_SPECIAL_SUMMON)
e3:SetType(EFFECT_TYPE_IGNITION)
e3:SetRange(LOCATION_MZONE)
e3:SetCountLimit(1,40009163)
e3:SetCost(c40009162.spcost)
e3:SetTarget(c40009162.thtg)
e3:SetOperation(c40009162.thop)
c:RegisterEffect(e3)
end
function c40009162.spfilter(c,e,tp)
return c:IsSetCard(0xbf1d) and not c:IsCode(40009162) and c:IsCanBeSpecialSummoned(e,0,tp,false,false)
end
function c40009162.sptg(e,tp,eg,ep,ev,re,r,rp,chk)
if chk==0 then return Duel.GetLocationCount(tp,LOCATION_MZONE)>0
and Duel.IsExistingMatchingCard(c40009162.spfilter,tp,LOCATION_DECK,0,1,nil,e,tp) end
Duel.SetOperationInfo(0,CATEGORY_SPECIAL_SUMMON,nil,1,tp,LOCATION_DECK)
end
function c40009162.spop(e,tp,eg,ep,ev,re,r,rp)
if not e:GetHandler():IsRelateToEffect(e) then return end
if Duel.GetLocationCount(tp,LOCATION_MZONE)<=0 then return end
Duel.Hint(HINT_SELECTMSG,tp,HINTMSG_SPSUMMON)
local g=Duel.SelectMatchingCard(tp,c40009162.spfilter,tp,LOCATION_DECK,0,1,1,nil,e,tp)
if g:GetCount()>0 then
Duel.SpecialSummon(g,0,tp,tp,false,false,POS_FACEUP)
end
local e1=Effect.CreateEffect(e:GetHandler())
e1:SetType(EFFECT_TYPE_FIELD)
e1:SetCode(EFFECT_CANNOT_SPECIAL_SUMMON)
e1:SetProperty(EFFECT_FLAG_PLAYER_TARGET)
e1:SetTargetRange(1,0)
e1:SetTarget(c40009162.splimit)
e1:SetReset(RESET_PHASE+PHASE_END)
Duel.RegisterEffect(e1,tp)
end
function c40009162.splimit(e,c)
return not c:IsSetCard(0xbf1d) and c:IsLocation(LOCATION_EXTRA)
end
function c40009162.cfilter(c)
return c:IsCode(40009154) and c:IsAbleToDeckAsCost()
end
function c40009162.spcost(e,tp,eg,ep,ev,re,r,rp,chk)
if chk==0 then return e:GetHandler():IsReleasable() and Duel.IsExistingMatchingCard(c40009162.cfilter,tp,LOCATION_GRAVE,0,1,nil) end
Duel.Hint(HINT_SELECTMSG,tp,HINTMSG_TODECK)
local g=Duel.SelectMatchingCard(tp,c40009162.cfilter,tp,LOCATION_GRAVE,0,1,1,nil)
Duel.Release(e:GetHandler(),REASON_COST)
Duel.SendtoDeck(g,nil,2,REASON_COST)
end
function c40009162.thfilter(c)
return c:IsCode(40009168) and c:IsAbleToHand()
end
function c40009162.thtg(e,tp,eg,ep,ev,re,r,rp,chk,chkc)
if chk==0 then return Duel.IsExistingMatchingCard(c40009162.thfilter,tp,LOCATION_DECK,0,1,nil) end
Duel.SetOperationInfo(0,CATEGORY_TOHAND,nil,1,tp,LOCATION_DECK)
end
function c40009162.thop(e,tp,eg,ep,ev,re,r,rp,chk)
local tg=Duel.GetFirstMatchingCard(c40009162.thfilter,tp,LOCATION_DECK,0,nil)
if tg then
Duel.SendtoHand(tg,nil,REASON_EFFECT)
Duel.ConfirmCards(1-tp,tg)
end
end
\ No newline at end of file
--狂风箭矢
function c40009164.initial_effect(c)
--tohand
local e1=Effect.CreateEffect(c)
e1:SetDescription(aux.Stringid(40009164,0))
e1:SetCategory(CATEGORY_TOGRAVE+CATEGORY_DESTROY)
e1:SetType(EFFECT_TYPE_SINGLE+EFFECT_TYPE_TRIGGER_O)
e1:SetCode(EVENT_SUMMON_SUCCESS)
e1:SetProperty(EFFECT_FLAG_DAMAGE_STEP+EFFECT_FLAG_DELAY)
e1:SetCountLimit(1,40009164)
e1:SetTarget(c40009164.target)
e1:SetOperation(c40009164.operation)
c:RegisterEffect(e1)
local e2=e1:Clone()
e2:SetCode(EVENT_SPSUMMON_SUCCESS)
c:RegisterEffect(e2)
--special summon
local e3=Effect.CreateEffect(c)
e3:SetDescription(aux.Stringid(40009164,1))
e3:SetCategory(CATEGORY_TODECK+CATEGORY_DRAW)
e3:SetType(EFFECT_TYPE_IGNITION)
e3:SetProperty(EFFECT_FLAG_CARD_TARGET)
e3:SetRange(LOCATION_MZONE)
e3:SetCountLimit(1,40009165)
e3:SetCost(c40009164.spcost)
e3:SetTarget(c40009164.tdtg)
e3:SetOperation(c40009164.tdop)
c:RegisterEffect(e3)
end
function c40009164.filter(c)
return c:IsCode(40009154) and c:IsAbleToGrave()
end
function c40009164.target(e,tp,eg,ep,ev,re,r,rp,chk)
if chk==0 then return Duel.IsExistingMatchingCard(c40009164.filter,tp,LOCATION_DECK+LOCATION_HAND,0,1,nil) end
Duel.SetOperationInfo(0,CATEGORY_TOGRAVE,nil,1,tp,LOCATION_DECK+LOCATION_HAND)
end
function c40009164.operation(e,tp,eg,ep,ev,re,r,rp)
Duel.Hint(HINT_SELECTMSG,tp,HINTMSG_TOGRAVE)
local g=Duel.SelectMatchingCard(tp,c40009164.filter,tp,LOCATION_DECK+LOCATION_HAND,0,1,1,nil)
if Duel.SendtoGrave(g,REASON_EFFECT)~=0 then return end
Duel.Hint(HINT_SELECTMSG,tp,HINTMSG_DESTROY)
local sg=Duel.SelectMatchingCard(tp,Card.IsType,tp,0,LOCATION_ONFIELD,1,1,nil,TYPE_SPELL+TYPE_TRAP)
if sg:GetCount()>0 and Duel.SelectYesNo(tp,aux.Stringid(40009164,2)) then
Duel.BreakEffect()
Duel.HintSelection(sg)
Duel.Destroy(sg,REASON_EFFECT)
end
end
function c40009164.cfilter(c)
return c:IsCode(40009154) and c:IsAbleToDeckAsCost()
end
function c40009164.spcost(e,tp,eg,ep,ev,re,r,rp,chk)
if chk==0 then return e:GetHandler():IsReleasable() and Duel.IsExistingMatchingCard(c40009164.cfilter,tp,LOCATION_GRAVE,0,1,nil) end
Duel.Hint(HINT_SELECTMSG,tp,HINTMSG_TODECK)
local g=Duel.SelectMatchingCard(tp,c40009164.cfilter,tp,LOCATION_GRAVE,0,1,1,nil)
Duel.Release(e:GetHandler(),REASON_COST)
Duel.SendtoDeck(g,nil,2,REASON_COST)
end
function c40009164.tdfilter(c)
return c:IsRace(RACE_WARRIOR) and c:IsAbleToDeck()
end
function c40009164.tdtg(e,tp,eg,ep,ev,re,r,rp,chk,chkc)
if chkc then return chkc:IsLocation(LOCATION_GRAVE) and chkc:IsControler(tp) and c40009164.tdfilter(chkc) end
if chk==0 then return Duel.IsExistingTarget(c40009164.tdfilter,tp,LOCATION_GRAVE,0,1,nil) end
Duel.Hint(HINT_SELECTMSG,tp,HINTMSG_TODECK)
local g=Duel.SelectTarget(tp,c40009164.tdfilter,tp,LOCATION_GRAVE,0,1,3,nil)
Duel.SetOperationInfo(0,CATEGORY_TODECK,g,g:GetCount(),0,0)
end
function c40009164.tdop(e,tp,eg,ep,ev,re,r,rp)
local g=Duel.GetChainInfo(0,CHAININFO_TARGET_CARDS):Filter(Card.IsRelateToEffect,nil,e)
if Duel.SendtoDeck(g,nil,2,REASON_EFFECT)~=0 then
Duel.ShuffleDeck(tp)
Duel.BreakEffect()
Duel.Draw(tp,1,REASON_EFFECT)
end
end
\ No newline at end of file
--救世主式·狂风领主
function c40009166.initial_effect(c)
--Activate
local e1=Effect.CreateEffect(c)
e1:SetType(EFFECT_TYPE_ACTIVATE)
e1:SetCode(EVENT_FREE_CHAIN)
e1:SetCountLimit(1,40009166+EFFECT_COUNT_CODE_OATH)
e1:SetTarget(c40009166.target)
c:RegisterEffect(e1)
--atkup
local e2=Effect.CreateEffect(c)
e2:SetType(EFFECT_TYPE_FIELD)
e2:SetCode(EFFECT_UPDATE_ATTACK)
e2:SetRange(LOCATION_SZONE)
e2:SetTargetRange(LOCATION_MZONE,LOCATION_MZONE)
e2:SetTarget(aux.TargetBoolFunction(Card.IsRace,RACE_WARRIOR))
e2:SetValue(1000)
c:RegisterEffect(e2)
--atkdown
local e3=Effect.CreateEffect(c)
e3:SetDescription(aux.Stringid(40009166,1))
e3:SetCategory(CATEGORY_ATKCHANGE)
e3:SetType(EFFECT_TYPE_FIELD+EFFECT_TYPE_TRIGGER_O)
e3:SetProperty(EFFECT_FLAG_DELAY)
e3:SetCode(EVENT_SPSUMMON_SUCCESS)
e3:SetRange(LOCATION_SZONE)
e3:SetCountLimit(1,40009166+EFFECT_COUNT_CODE_DUEL)
e3:SetCondition(c40009166.atkcon2)
e3:SetTarget(c40009166.atkktg)
e3:SetCost(c40009166.spcost)
e3:SetOperation(c40009166.atkop)
c:RegisterEffect(e3)
end
function c40009166.tgfilter(c)
return c:IsCode(40009154) and c:IsAbleToGrave()
end
function c40009166.target(e,tp,eg,ep,ev,re,r,rp,chk)
if chk==0 then return true end
if Duel.IsExistingMatchingCard(c40009166.tgfilter,tp,LOCATION_HAND+LOCATION_DECK,0,1,nil)
and Duel.SelectEffectYesNo(tp,e:GetHandler(),aux.Stringid(40009166,0)) then
e:SetCategory(CATEGORY_SPECIAL_SUMMON)
e:SetOperation(c40009166.activate)
local rg=Duel.SelectMatchingCard(tp,c40009166.tgfilter,tp,LOCATION_HAND+LOCATION_DECK,0,1,1,nil)
e:SetLabel(1)
Duel.SendtoGrave(rg,REASON_EFFECT)
Duel.SetOperationInfo(0,CATEGORY_SPECIAL_SUMMON,nil,1,tp,LOCATION_GRAVE)
else
e:SetLabel(0)
e:SetCategory(0)
e:SetOperation(nil)
end
end
function c40009166.spfilter(c,e,tp)
return c:IsSetCard(0xbf1d) and c:IsType(TYPE_MONSTER)
and c:IsCanBeSpecialSummoned(e,0,tp,false,false)
end
function c40009166.activate(e,tp,eg,ep,ev,re,r,rp)
if Duel.GetLocationCount(tp,LOCATION_MZONE)<=0 then return end
if e:GetHandler():IsRelateToEffect(e) and e:GetLabel()==1 then
Duel.Hint(HINT_SELECTMSG,tp,HINTMSG_SPSUMMON)
local g=Duel.SelectMatchingCard(tp,aux.NecroValleyFilter(c40009166.spfilter),tp,LOCATION_GRAVE,0,1,1,nil,e,tp)
if g:GetCount()>0 then
Duel.SpecialSummon(g,0,tp,tp,false,false,POS_FACEUP)
end
local e1=Effect.CreateEffect(e:GetHandler())
e1:SetType(EFFECT_TYPE_FIELD)
e1:SetCode(EFFECT_CANNOT_SPECIAL_SUMMON)
e1:SetProperty(EFFECT_FLAG_PLAYER_TARGET)
e1:SetTargetRange(1,0)
e1:SetTarget(c40009166.splimit)
e1:SetReset(RESET_PHASE+PHASE_END)
Duel.RegisterEffect(e1,tp)
end
end
function c40009166.splimit(e,c)
return not c:IsSetCard(0xbf1d) and c:IsLocation(LOCATION_EXTRA)
end
function c40009166.atkcon2(e,tp,eg,ep,ev,re,r,rp)
return eg:IsExists(Card.IsCode,1,nil,tp,SUMMON_TYPE_LINK,40009156)
end
function c40009166.spcost(e,tp,eg,ep,ev,re,r,rp,chk)
local c=e:GetHandler()
if chk==0 then return c:IsAbleToGraveAsCost() end
Duel.SendtoGrave(c,REASON_COST)
end
function c40009166.atkktg(e,tp,eg,ep,ev,re,r,rp,chk)
if chk==0 then return true end
Duel.SetChainLimit(c40009166.chlimit)
end
function c40009166.atkop(e,tp,eg,ep,ev,re,r,rp)
local c=e:GetHandler()
local e1=Effect.CreateEffect(c)
e1:SetType(EFFECT_TYPE_FIELD)
e1:SetCode(EFFECT_UPDATE_ATTACK)
e1:SetTargetRange(LOCATION_MZONE,0)
e1:SetCondition(c40009166.discon)
e1:SetTarget(c40009166.atktg)
e1:SetValue(2000)
Duel.RegisterEffect(e1,tp)
--Duel.SetChainLimit(c40009166.chlimit)
end
function c40009166.chlimit(e,ep,tp)
return tp==ep
end
function c40009166.discon(e)
local ph=Duel.GetCurrentPhase()
return ph>=PHASE_BATTLE_START and ph<=PHASE_BATTLE
end
function c40009166.atktg(e,c)
return c:GetSequence()>=5
end
This diff is collapsed.
This diff is collapsed.
This diff is collapsed.
This diff is collapsed.
This diff is collapsed.
This diff is collapsed.
This diff is collapsed.
This diff is collapsed.
This diff is collapsed.
This diff is collapsed.
This diff is collapsed.
This diff is collapsed.
This diff is collapsed.
This diff is collapsed.
This diff is collapsed.
This diff is collapsed.
This diff is collapsed.
This diff is collapsed.
This diff is collapsed.
This diff is collapsed.
This diff is collapsed.
This diff is collapsed.
Markdown is supported
0% or
You are about to add 0 people to the discussion. Proceed with caution.
Finish editing this message first!
Please register or to comment