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) ...@@ -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) Duel.SpecialSummon(c,0,tp,tp,false,false,POS_FACEUP)
end end
function cm.spfilter(c,att,rac,lv,e,tp) 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 end
function cm.sp2filter(c) function cm.sp2filter(c)
return c:IsSetCard(0x41) and c:IsLevelBelow(4) return c:IsSetCard(0x41) and c:IsLevelBelow(4)
......
...@@ -2,6 +2,13 @@ local m=15000471 ...@@ -2,6 +2,13 @@ local m=15000471
local cm=_G["c"..m] local cm=_G["c"..m]
cm.name="星拟龙·零时之默迦尔 LV5" cm.name="星拟龙·零时之默迦尔 LV5"
function cm.initial_effect(c) 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 --search
local e1=Effect.CreateEffect(c) local e1=Effect.CreateEffect(c)
e1:SetCategory(CATEGORY_TOHAND+CATEGORY_SEARCH) e1:SetCategory(CATEGORY_TOHAND+CATEGORY_SEARCH)
...@@ -37,12 +44,15 @@ function cm.initial_effect(c) ...@@ -37,12 +44,15 @@ function cm.initial_effect(c)
end end
cm.lvup={15000472} cm.lvup={15000472}
cm.lvdn={15000470} 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) function cm.cost(e,tp,eg,ep,ev,re,r,rp,chk)
if chk==0 then return e:GetHandler():IsAbleToGraveAsCost() end if chk==0 then return e:GetHandler():IsAbleToGraveAsCost() end
Duel.SendtoGrave(e:GetHandler(),REASON_COST) Duel.SendtoGrave(e:GetHandler(),REASON_COST)
end end
function cm.filter(c,lv) 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 end
function cm.target(e,tp,eg,ep,ev,re,r,rp,chk) 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 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) ...@@ -78,7 +88,7 @@ function cm.stop(e,tp,eg,ep,ev,re,r,rp)
end end
end end
function cm.spfilter(c,att,rac,lv,e,tp) 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 end
function cm.sp2filter(c) function cm.sp2filter(c)
return c:IsLevelBelow(6) return c:IsLevelBelow(6)
......
...@@ -2,6 +2,13 @@ local m=15000472 ...@@ -2,6 +2,13 @@ local m=15000472
local cm=_G["c"..m] local cm=_G["c"..m]
cm.name="星拟龙·零时之默迦尔 LV8" cm.name="星拟龙·零时之默迦尔 LV8"
function cm.initial_effect(c) 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 --search
local e1=Effect.CreateEffect(c) local e1=Effect.CreateEffect(c)
e1:SetCategory(CATEGORY_TOHAND+CATEGORY_SEARCH) e1:SetCategory(CATEGORY_TOHAND+CATEGORY_SEARCH)
...@@ -37,12 +44,15 @@ function cm.initial_effect(c) ...@@ -37,12 +44,15 @@ function cm.initial_effect(c)
end end
cm.lvup={15000473} cm.lvup={15000473}
cm.lvdn={15000471} 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) function cm.cost(e,tp,eg,ep,ev,re,r,rp,chk)
if chk==0 then return e:GetHandler():IsAbleToGraveAsCost() end if chk==0 then return e:GetHandler():IsAbleToGraveAsCost() end
Duel.SendtoGrave(e:GetHandler(),REASON_COST) Duel.SendtoGrave(e:GetHandler(),REASON_COST)
end end
function cm.filter(c,lv) 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 end
function cm.target(e,tp,eg,ep,ev,re,r,rp,chk) 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 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) ...@@ -69,7 +79,7 @@ function cm.spop(e,tp,eg,ep,ev,re,r,rp)
Duel.SendtoGrave(g,REASON_EFFECT) Duel.SendtoGrave(g,REASON_EFFECT)
end end
function cm.spfilter(c,att,rac,lv,e,tp) 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 end
function cm.sp2filter(c) function cm.sp2filter(c)
return c:IsLevelBelow(9) return c:IsLevelBelow(9)
......
...@@ -2,13 +2,13 @@ local m=15000473 ...@@ -2,13 +2,13 @@ local m=15000473
local cm=_G["c"..m] local cm=_G["c"..m]
cm.name="星拟龙·零时之默迦尔 LV10" cm.name="星拟龙·零时之默迦尔 LV10"
function cm.initial_effect(c) function cm.initial_effect(c)
aux.AddCodeList(c,15000472)
c:EnableReviveLimit() c:EnableReviveLimit()
--cannot special summon --cannot special Summon
local e0=Effect.CreateEffect(c) local e0=Effect.CreateEffect(c)
e0:SetProperty(EFFECT_FLAG_CANNOT_DISABLE+EFFECT_FLAG_UNCOPYABLE)
e0:SetType(EFFECT_TYPE_SINGLE) e0:SetType(EFFECT_TYPE_SINGLE)
e0:SetProperty(EFFECT_FLAG_CANNOT_DISABLE+EFFECT_FLAG_UNCOPYABLE)
e0:SetCode(EFFECT_SPSUMMON_CONDITION) e0:SetCode(EFFECT_SPSUMMON_CONDITION)
e0:SetValue(aux.FALSE)
c:RegisterEffect(e0) c:RegisterEffect(e0)
--search --search
local e1=Effect.CreateEffect(c) local e1=Effect.CreateEffect(c)
...@@ -37,7 +37,7 @@ function cm.cost(e,tp,eg,ep,ev,re,r,rp,chk) ...@@ -37,7 +37,7 @@ function cm.cost(e,tp,eg,ep,ev,re,r,rp,chk)
Duel.SendtoGrave(e:GetHandler(),REASON_COST) Duel.SendtoGrave(e:GetHandler(),REASON_COST)
end end
function cm.filter(c,lv) 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 end
function cm.target(e,tp,eg,ep,ev,re,r,rp,chk) function cm.target(e,tp,eg,ep,ev,re,r,rp,chk)
local c=e:GetHandler() local c=e:GetHandler()
...@@ -64,16 +64,17 @@ function cm.distg(e,tp,eg,ep,ev,re,r,rp,chk) ...@@ -64,16 +64,17 @@ function cm.distg(e,tp,eg,ep,ev,re,r,rp,chk)
end end
end end
function cm.tdfilter(c) function cm.tdfilter(c)
return c:IsSetCard(0xaf34) and c:IsAbleToDeck() return c:IsSetCard(0x3f34) and c:IsAbleToDeck()
end end
function cm.disop(e,tp,eg,ep,ev,re,r,rp) function cm.disop(e,tp,eg,ep,ev,re,r,rp)
local c=e:GetHandler() local c=e:GetHandler()
local tp=c:GetControler() local tp=c:GetControler()
if Duel.NegateEffect(ev) and re:GetHandler():IsRelateToEffect(re) then 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() Duel.BreakEffect()
local fg=Duel.GetMatchingGroup(cm.tdfilter,tp,LOCATION_GRAVE,0,nil) 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) local x=g:GetClassCount(Card.GetCode)
if x>=3 and fg:GetCount()~=0 and Duel.SelectYesNo(tp,aux.Stringid(m,0)) then 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) local qg=Duel.SelectMatchingCard(tp,cm.tdfilter,tp,LOCATION_GRAVE,0,1,99,nil)
......
...@@ -2,6 +2,7 @@ local m=15000474 ...@@ -2,6 +2,7 @@ local m=15000474
local cm=_G["c"..m] local cm=_G["c"..m]
cm.name="星拟小龙" cm.name="星拟小龙"
function cm.initial_effect(c) function cm.initial_effect(c)
c:SetSPSummonOnce(m)
--link summon --link summon
aux.AddLinkProcedure(c,aux.FilterBoolFunction(Card.IsLinkSetCard,0x41),1,1) aux.AddLinkProcedure(c,aux.FilterBoolFunction(Card.IsLinkSetCard,0x41),1,1)
c:EnableReviveLimit() c:EnableReviveLimit()
......
...@@ -23,7 +23,7 @@ function cm.initial_effect(c) ...@@ -23,7 +23,7 @@ function cm.initial_effect(c)
c:RegisterEffect(e2) c:RegisterEffect(e2)
end end
function cm.spfilter(c,e,tp) 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 end
function cm.target(e,tp,eg,ep,ev,re,r,rp,chk,chkc) function cm.target(e,tp,eg,ep,ev,re,r,rp,chk,chkc)
local tp=e:GetHandler():GetControler() local tp=e:GetHandler():GetControler()
...@@ -43,7 +43,7 @@ function cm.operation(e,tp,eg,ep,ev,re,r,rp) ...@@ -43,7 +43,7 @@ function cm.operation(e,tp,eg,ep,ev,re,r,rp)
end end
end end
function cm.filter(c) 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 end
function cm.thtg(e,tp,eg,ep,ev,re,r,rp,chk) function cm.thtg(e,tp,eg,ep,ev,re,r,rp,chk)
local tp=e:GetHandler():GetControler() local tp=e:GetHandler():GetControler()
......
...@@ -25,6 +25,7 @@ function cm.initial_effect(c) ...@@ -25,6 +25,7 @@ function cm.initial_effect(c)
e2:SetTarget(cm.sp2tg) e2:SetTarget(cm.sp2tg)
e2:SetOperation(cm.sp2op) e2:SetOperation(cm.sp2op)
c:RegisterEffect(e2) c:RegisterEffect(e2)
cm.self_flip_effect2=e2
--special summon --special summon
local e3=Effect.CreateEffect(c) local e3=Effect.CreateEffect(c)
e3:SetCategory(CATEGORY_SPECIAL_SUMMON) e3:SetCategory(CATEGORY_SPECIAL_SUMMON)
...@@ -32,9 +33,8 @@ function cm.initial_effect(c) ...@@ -32,9 +33,8 @@ function cm.initial_effect(c)
e3:SetType(EFFECT_TYPE_FIELD+EFFECT_TYPE_TRIGGER_O) e3:SetType(EFFECT_TYPE_FIELD+EFFECT_TYPE_TRIGGER_O)
e3:SetRange(LOCATION_GRAVE) e3:SetRange(LOCATION_GRAVE)
e3:SetCode(EVENT_CHAINING) 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:SetCountLimit(1,m)
e3:SetProperty(EFFECT_FLAG_DELAY)
e3:SetCondition(cm.spcon1) e3:SetCondition(cm.spcon1)
e3:SetTarget(cm.sptg1) e3:SetTarget(cm.sptg1)
e3:SetOperation(cm.spop1) e3:SetOperation(cm.spop1)
...@@ -44,7 +44,7 @@ function cm.filter(c,e,tp) ...@@ -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)) 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 end
function cm.condition(e,tp,eg,ep,ev,re,r,rp) 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 end
function cm.target(e,tp,eg,ep,ev,re,r,rp,chk) function cm.target(e,tp,eg,ep,ev,re,r,rp,chk)
if chk==0 then return Duel.GetLocationCount(tp,LOCATION_MZONE)>0 if chk==0 then return Duel.GetLocationCount(tp,LOCATION_MZONE)>0
......
...@@ -25,6 +25,7 @@ function cm.initial_effect(c) ...@@ -25,6 +25,7 @@ function cm.initial_effect(c)
e2:SetTarget(cm.tgtg) e2:SetTarget(cm.tgtg)
e2:SetOperation(cm.tgop) e2:SetOperation(cm.tgop)
c:RegisterEffect(e2) c:RegisterEffect(e2)
cm.self_flip_effect2=e2
--special summon --special summon
local e3=Effect.CreateEffect(c) local e3=Effect.CreateEffect(c)
e3:SetCategory(CATEGORY_SPECIAL_SUMMON) e3:SetCategory(CATEGORY_SPECIAL_SUMMON)
...@@ -32,16 +33,15 @@ function cm.initial_effect(c) ...@@ -32,16 +33,15 @@ function cm.initial_effect(c)
e3:SetType(EFFECT_TYPE_FIELD+EFFECT_TYPE_TRIGGER_O) e3:SetType(EFFECT_TYPE_FIELD+EFFECT_TYPE_TRIGGER_O)
e3:SetRange(LOCATION_GRAVE) e3:SetRange(LOCATION_GRAVE)
e3:SetCode(EVENT_CHAINING) 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:SetCountLimit(1,m)
e3:SetProperty(EFFECT_FLAG_DELAY)
e3:SetCondition(cm.spcon1) e3:SetCondition(cm.spcon1)
e3:SetTarget(cm.sptg1) e3:SetTarget(cm.sptg1)
e3:SetOperation(cm.spop1) e3:SetOperation(cm.spop1)
c:RegisterEffect(e3) c:RegisterEffect(e3)
end end
function cm.condition(e,tp,eg,ep,ev,re,r,rp) 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 end
function cm.target(e,tp,eg,ep,ev,re,r,rp,chk) 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 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) ...@@ -25,6 +25,7 @@ function cm.initial_effect(c)
e2:SetTarget(cm.sp2tg) e2:SetTarget(cm.sp2tg)
e2:SetOperation(cm.sp2op) e2:SetOperation(cm.sp2op)
c:RegisterEffect(e2) c:RegisterEffect(e2)
cm.self_flip_effect2=e2
--special summon --special summon
local e3=Effect.CreateEffect(c) local e3=Effect.CreateEffect(c)
e3:SetCategory(CATEGORY_SPECIAL_SUMMON) e3:SetCategory(CATEGORY_SPECIAL_SUMMON)
...@@ -32,9 +33,8 @@ function cm.initial_effect(c) ...@@ -32,9 +33,8 @@ function cm.initial_effect(c)
e3:SetType(EFFECT_TYPE_FIELD+EFFECT_TYPE_TRIGGER_O) e3:SetType(EFFECT_TYPE_FIELD+EFFECT_TYPE_TRIGGER_O)
e3:SetRange(LOCATION_GRAVE) e3:SetRange(LOCATION_GRAVE)
e3:SetCode(EVENT_CHAINING) 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:SetCountLimit(1,m)
e3:SetProperty(EFFECT_FLAG_DELAY)
e3:SetCondition(cm.spcon1) e3:SetCondition(cm.spcon1)
e3:SetTarget(cm.sptg1) e3:SetTarget(cm.sptg1)
e3:SetOperation(cm.spop1) e3:SetOperation(cm.spop1)
...@@ -44,7 +44,7 @@ function cm.filter(c,e,tp) ...@@ -44,7 +44,7 @@ function cm.filter(c,e,tp)
return c:IsSetCard(0xf3b) and c:IsType(TYPE_SPELL+TYPE_TRAP) and c:IsAbleToHand() return c:IsSetCard(0xf3b) and c:IsType(TYPE_SPELL+TYPE_TRAP) and c:IsAbleToHand()
end end
function cm.condition(e,tp,eg,ep,ev,re,r,rp) 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 end
function cm.target(e,tp,eg,ep,ev,re,r,rp,chk) 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 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) ...@@ -29,10 +29,9 @@ function cm.initial_effect(c)
cm.global_check=true cm.global_check=true
cm[0]=0 cm[0]=0
cm[1]=0 cm[1]=0
cm[2]=0
local ge1=Effect.CreateEffect(c) local ge1=Effect.CreateEffect(c)
ge1:SetType(EFFECT_TYPE_FIELD+EFFECT_TYPE_CONTINUOUS) ge1:SetType(EFFECT_TYPE_FIELD+EFFECT_TYPE_CONTINUOUS)
ge1:SetCode(EVENT_DESTROYED) ge1:SetCode(EVENT_DESTROY)
ge1:SetOperation(cm.checkop) ge1:SetOperation(cm.checkop)
Duel.RegisterEffect(ge1,0) Duel.RegisterEffect(ge1,0)
local ge2=Effect.CreateEffect(c) local ge2=Effect.CreateEffect(c)
...@@ -87,10 +86,9 @@ end ...@@ -87,10 +86,9 @@ end
function cm.checkop(e,tp,eg,ep,ev,re,r,rp) function cm.checkop(e,tp,eg,ep,ev,re,r,rp)
local tc=eg:GetFirst() local tc=eg:GetFirst()
while tc do while tc do
if tc:IsSetCard(0xaf6) and tc:IsType(TYPE_PENDULUM) and tc:GetPreviousControler()==tp then if tc:IsSetCard(0xaf6) and tc:IsType(TYPE_PENDULUM) then
if tc:GetPreviousLocation()==LOCATION_HAND then cm[0]=1 end local p=tc:GetControler()
if tc:GetPreviousLocation()==LOCATION_SZONE then cm[1]=1 end if cm[p]<3 then cm[p]=cm[p]+1 end
if tc:GetPreviousLocation()==LOCATION_MZONE then cm[2]=1 end
end end
tc=eg:GetNext() tc=eg:GetNext()
end end
...@@ -98,20 +96,19 @@ end ...@@ -98,20 +96,19 @@ end
function cm.clearop(e,tp,eg,ep,ev,re,r,rp) function cm.clearop(e,tp,eg,ep,ev,re,r,rp)
cm[0]=0 cm[0]=0
cm[1]=0 cm[1]=0
cm[2]=0
end end
function cm.drcon(e,tp,eg,ep,ev,re,r,rp) 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 return ct>0 and Duel.GetTurnPlayer()==tp
end end
function cm.drtg(e,tp,eg,ep,ev,re,r,rp,chk) 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 if chk==0 then return Duel.IsPlayerCanDraw(tp,ct) end
Duel.SetOperationInfo(0,CATEGORY_DRAW,nil,0,tp,ct) Duel.SetOperationInfo(0,CATEGORY_DRAW,nil,0,tp,ct)
end end
function cm.drop(e,tp,eg,ep,ev,re,r,rp) function cm.drop(e,tp,eg,ep,ev,re,r,rp)
if not e:GetHandler():IsRelateToEffect(e) then return end 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) Duel.Draw(tp,ct,REASON_EFFECT)
end end
......
...@@ -166,15 +166,16 @@ function c33400413.atkop(e,tp,eg,ep,ev,re,r,rp) ...@@ -166,15 +166,16 @@ function c33400413.atkop(e,tp,eg,ep,ev,re,r,rp)
end end
function c33400413.desfilter1(c) 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 end
function c33400413.destg(e,tp,eg,ep,ev,re,r,rp,chk,chkc) function c33400413.destg(e,tp,eg,ep,ev,re,r,rp,chk,chkc)
if chkc then return chkc:IsOnField() end 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) Duel.Hint(HINT_SELECTMSG,tp,HINTMSG_DESTROY)
local g1=Duel.SelectTarget(tp,c33400413.desfilter1,tp,LOCATION_ONFIELD,0,1,1,nil) local g1=Duel.SelectTarget(tp,c33400413.desfilter1,tp,LOCATION_ONFIELD,0,1,1,nil)
Duel.Hint(HINT_SELECTMSG,tp,HINTMSG_DESTROY) 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) g1:Merge(g2)
Duel.SetOperationInfo(0,CATEGORY_DESTROY,g1,g1:GetCount(),0,0) Duel.SetOperationInfo(0,CATEGORY_DESTROY,g1,g1:GetCount(),0,0)
end end
......
...@@ -2,9 +2,18 @@ ...@@ -2,9 +2,18 @@
local m=33400811 local m=33400811
local cm=_G["c"..m] local cm=_G["c"..m]
function cm.initial_effect(c) function cm.initial_effect(c)
--fusion material --fusion material
c:EnableReviveLimit() c:EnableReviveLimit()
aux.AddFusionProcFunRep(c,aux.FilterBoolFunction(Card.IsFusionSetCard,0xa341),2,true) 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 --move
local e1=Effect.CreateEffect(c) local e1=Effect.CreateEffect(c)
e1:SetDescription(aux.Stringid(m,2)) e1:SetDescription(aux.Stringid(m,2))
...@@ -24,9 +33,37 @@ function cm.initial_effect(c) ...@@ -24,9 +33,37 @@ function cm.initial_effect(c)
e2:SetRange(LOCATION_MZONE) e2:SetRange(LOCATION_MZONE)
e2:SetCountLimit(1,m+10000) e2:SetCountLimit(1,m+10000)
e2:SetCondition(cm.stcon) e2:SetCondition(cm.stcon)
e2:SetTarget(cm.sttg)
e2:SetOperation(cm.stop) e2:SetOperation(cm.stop)
c:RegisterEffect(e2) c:RegisterEffect(e2)
end 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) function cm.seqfilter(c)
return c:IsFaceup() return c:IsFaceup()
end end
...@@ -79,6 +116,10 @@ end ...@@ -79,6 +116,10 @@ end
function cm.setfilter(c) function cm.setfilter(c)
return c:IsSetCard(0xa341) and c:IsType(TYPE_TRAP+TYPE_SPELL) and c:IsSSetable() return c:IsSetCard(0xa341) and c:IsType(TYPE_TRAP+TYPE_SPELL) and c:IsSSetable()
end 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) function cm.stop(e,tp,eg,ep,ev,re,r,rp)
c=e:GetHandler() c=e:GetHandler()
if not c:IsRelateToEffect(e) then return end if not c:IsRelateToEffect(e) then return end
...@@ -103,10 +144,10 @@ function cm.stop(e,tp,eg,ep,ev,re,r,rp) ...@@ -103,10 +144,10 @@ function cm.stop(e,tp,eg,ep,ev,re,r,rp)
e2:SetReset(RESET_PHASE+ph) e2:SetReset(RESET_PHASE+ph)
Duel.RegisterEffect(e2,tp) Duel.RegisterEffect(e2,tp)
else 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 and Duel.SelectYesNo(tp,aux.Stringid(m,1))then
Duel.Hint(HINT_SELECTMSG,tp,HINTMSG_SET) 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() local tc=g:GetFirst()
if Duel.SSet(tp,tc)~=0 then if Duel.SSet(tp,tc)~=0 then
local e1=Effect.CreateEffect(e:GetHandler()) local e1=Effect.CreateEffect(e:GetHandler())
......
...@@ -2,12 +2,19 @@ ...@@ -2,12 +2,19 @@
local m=33400855 local m=33400855
local cm=_G["c"..m] local cm=_G["c"..m]
function cm.initial_effect(c) 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) local e1=Effect.CreateEffect(c)
e1:SetCategory(CATEGORY_SPECIAL_SUMMON) 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: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:SetCondition(cm.condition)
e1:SetTarget(cm.target) e1:SetTarget(cm.target)
e1:SetOperation(cm.activate) e1:SetOperation(cm.activate)
...@@ -15,26 +22,20 @@ function cm.initial_effect(c) ...@@ -15,26 +22,20 @@ function cm.initial_effect(c)
local e4=e1:Clone() local e4=e1:Clone()
e1:SetCode(EVENT_SUMMON_SUCCESS) e1:SetCode(EVENT_SUMMON_SUCCESS)
c:RegisterEffect(e4) c:RegisterEffect(e4)
--move --spsummon
local e3=Effect.CreateEffect(c) local e6=Effect.CreateEffect(c)
e3:SetDescription(aux.Stringid(m,0)) e6:SetDescription(aux.Stringid(33401302,1))
e3:SetType(EFFECT_TYPE_IGNITION) e6:SetCategory(CATEGORY_SPECIAL_SUMMON)
e3:SetProperty(EFFECT_FLAG_CARD_TARGET) e6:SetType(EFFECT_TYPE_IGNITION)
e3:SetRange(LOCATION_GRAVE) e6:SetRange(LOCATION_SZONE)
e3:SetCountLimit(1) e6:SetCountLimit(1)
e3:SetCost(aux.bfgcost) e6:SetTarget(cm.sptg2)
e3:SetTarget(cm.mvtg) e6:SetOperation(cm.spop2)
e3:SetOperation(cm.mvop) c:RegisterEffect(e6)
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)
end end
function cm.cfilter(c,tp) function cm.cfilter(c,tp)
return c:GetSummonPlayer()==tp return c:GetSummonPlayer()==tp and c:IsSetCard(0xa341)
end end
function cm.condition(e,tp,eg,ep,ev,re,r,rp) function cm.condition(e,tp,eg,ep,ev,re,r,rp)
return eg:IsExists(cm.cfilter,1,nil,tp) return eg:IsExists(cm.cfilter,1,nil,tp)
...@@ -48,7 +49,7 @@ function cm.target(e,tp,eg,ep,ev,re,r,rp,chk) ...@@ -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) Duel.SetOperationInfo(0,CATEGORY_SPECIAL_SUMMON,nil,1,tp,LOCATION_DECK)
end end
function cm.activate(e,tp,eg,ep,ev,re,r,rp) 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) 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) local g=Duel.SelectMatchingCard(tp,cm.spfilter1,tp,LOCATION_DECK+LOCATION_GRAVE,0,1,1,nil,e,tp)
if g:GetCount()>0 then if g:GetCount()>0 then
...@@ -56,27 +57,19 @@ function cm.activate(e,tp,eg,ep,ev,re,r,rp) ...@@ -56,27 +57,19 @@ function cm.activate(e,tp,eg,ep,ev,re,r,rp)
end end
end end
function cm.spfilter2(c,e,tp)
function cm.ckfilter(c) return c:IsSetCard(0xa341) and c:IsCanBeSpecialSummoned(e,0,tp,false,false)
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)
end end
function cm.mvtg(e,tp,eg,ep,ev,re,r,rp,chk,chkc) function cm.sptg2(e,tp,eg,ep,ev,re,r,rp,chk)
if chkc then return chkc:IsLocation(LOCATION_MZONE) and chkc:IsControler(tp) end if chk==0 then return Duel.GetLocationCount(tp,LOCATION_MZONE)>0
if chk==0 then return Duel.IsExistingTarget(nil,tp,LOCATION_MZONE,0,1,nil) and Duel.IsExistingMatchingCard(cm.spfilter2,tp,LOCATION_HAND,0,1,nil,e,tp) end
and Duel.GetLocationCount(tp,LOCATION_MZONE,PLAYER_NONE,0)>0 end Duel.SetOperationInfo(0,CATEGORY_SPECIAL_SUMMON,nil,1,tp,LOCATION_HAND)
Duel.Hint(HINT_SELECTMSG,tp,HINTMSG_FACEUP)
Duel.SelectTarget(tp,nil,tp,LOCATION_MZONE,0,1,1,nil)
end end
function cm.mvop(e,tp,eg,ep,ev,re,r,rp) function cm.spop2(e,tp,eg,ep,ev,re,r,rp)
local tc=Duel.GetFirstTarget() if not e:GetHandler():IsRelateToEffect(e) then return end
if not tc:IsRelateToEffect(e) or tc:IsControler(1-tp) Duel.Hint(HINT_SELECTMSG,tp,HINTMSG_SPSUMMON)
or Duel.GetLocationCount(tp,LOCATION_MZONE,PLAYER_NONE,0)<=0 then return end local g=Duel.SelectMatchingCard(tp,cm.spfilter2,tp,LOCATION_HAND,0,1,1,nil,e,tp)
Duel.Hint(HINT_SELECTMSG,tp,HINTMSG_TOZONE) if g:GetCount()>0 then
local s=Duel.SelectDisableField(tp,1,LOCATION_MZONE,0,0) Duel.SpecialSummon(g,0,tp,tp,false,false,POS_FACEUP)
local nseq=math.log(s,2) end
Duel.MoveSequence(tc,nseq) end
end \ No newline at end of file
...@@ -28,7 +28,7 @@ function c33401200.condition(e,tp,eg,ep,ev,re,r,rp) ...@@ -28,7 +28,7 @@ function c33401200.condition(e,tp,eg,ep,ev,re,r,rp)
return eg:IsExists(c33401200.cfilter,1,nil,tp) return eg:IsExists(c33401200.cfilter,1,nil,tp)
end end
function c33401200.cfilter2(c,tp,rp) 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 end
function c33401200.condition2(e,tp,eg,ep,ev,re,r,rp) function c33401200.condition2(e,tp,eg,ep,ev,re,r,rp)
return aux.exccon(e) and eg:IsExists(c33401200.cfilter2,1,nil,tp,rp) return aux.exccon(e) and eg:IsExists(c33401200.cfilter2,1,nil,tp,rp)
...@@ -37,7 +37,7 @@ function c33401200.dfilter(c) ...@@ -37,7 +37,7 @@ function c33401200.dfilter(c)
return c:IsSetCard(0x341) and c:IsLevelAbove(1) and c:IsAbleToGrave() return c:IsSetCard(0x341) and c:IsLevelAbove(1) and c:IsAbleToGrave()
end end
function c33401200.filter(c,e,tp,m,ft) 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 or not c:IsCanBeSpecialSummoned(e,SUMMON_TYPE_RITUAL,tp,false,true) then return false end
local mg=m:Filter(Card.IsCanBeRitualMaterial,c,c) local mg=m:Filter(Card.IsCanBeRitualMaterial,c,c)
local dg=Duel.GetMatchingGroup(c33401200.dfilter,tp,LOCATION_DECK+LOCATION_EXTRA,0,nil) 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:EnableReviveLimit()
c:EnableCounterPermit(0x34f) c:EnableCounterPermit(0x34f)
--fusion material --fusion material
aux.AddFusionProcFun2(c,aux.FilterBoolFunction(Card.IsFusionSetCard,0xc342),c33401313.fa,true) aux.AddFusionProcFun2(c,aux.FilterBoolFunction(Card.IsFusionSetCard,0xc342),cm.fa,true)
--set counter --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) local e2=Effect.CreateEffect(c)
e2:SetDescription(aux.Stringid(33401313,0)) e2:SetDescription(aux.Stringid(m,0))
e2:SetCategory(CATEGORY_COUNTER) e2:SetCategory(CATEGORY_COUNTER)
e2:SetType(EFFECT_TYPE_SINGLE+EFFECT_TYPE_TRIGGER_O) e2:SetType(EFFECT_TYPE_SINGLE+EFFECT_TYPE_TRIGGER_O)
e2:SetCode(EVENT_SPSUMMON_SUCCESS) e2:SetCode(EVENT_SPSUMMON_SUCCESS)
e2:SetProperty(EFFECT_FLAG_CARD_TARGET+EFFECT_FLAG_DAMAGE_STEP+EFFECT_FLAG_DELAY) e2:SetProperty(EFFECT_FLAG_CARD_TARGET+EFFECT_FLAG_DAMAGE_STEP+EFFECT_FLAG_DELAY)
e2:SetTarget(c33401313.addct) e2:SetTarget(cm.addct)
e2:SetOperation(c33401313.addc) e2:SetOperation(cm.addc)
c:RegisterEffect(e2) c:RegisterEffect(e2)
--copy --copy
local e6=Effect.CreateEffect(c) local e6=Effect.CreateEffect(c)
e6:SetType(EFFECT_TYPE_QUICK_O) 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:SetProperty(EFFECT_FLAG_CARD_TARGET)
e6:SetCode(EVENT_FREE_CHAIN) e6:SetCode(EVENT_FREE_CHAIN)
e6:SetRange(LOCATION_MZONE) e6:SetRange(LOCATION_MZONE)
e6:SetCountLimit(1,33401313) e6:SetCountLimit(1,m)
e6:SetTarget(c33401313.cptg) e6:SetTarget(cm.cptg)
e6:SetOperation(c33401313.cpop) e6:SetOperation(cm.cpop)
c:RegisterEffect(e6) c:RegisterEffect(e6)
--to hand from grave --to hand from grave
local e4=Effect.CreateEffect(c) local e4=Effect.CreateEffect(c)
e4:SetDescription(aux.Stringid(33401313,2)) e4:SetDescription(aux.Stringid(m,2))
e4:SetCategory(CATEGORY_TOHAND) e4:SetCategory(CATEGORY_TOHAND)
e4:SetType(EFFECT_TYPE_SINGLE+EFFECT_TYPE_TRIGGER_O) e4:SetType(EFFECT_TYPE_SINGLE+EFFECT_TYPE_TRIGGER_O)
e4:SetProperty(EFFECT_FLAG_DAMAGE_STEP+EFFECT_FLAG_DELAY) e4:SetProperty(EFFECT_FLAG_DAMAGE_STEP+EFFECT_FLAG_DELAY)
e4:SetCode(EVENT_TO_GRAVE) e4:SetCode(EVENT_TO_GRAVE)
e4:SetCountLimit(1,33401313+10000) e4:SetCountLimit(1,m+10000)
e4:SetTarget(c33401313.adtg) e4:SetTarget(cm.adtg)
e4:SetOperation(c33401313.adop) e4:SetOperation(cm.adop)
c:RegisterEffect(e4) c:RegisterEffect(e4)
end end
function c33401313.fa(c) function cm.fa(c)
return c:IsFusionAttribute(ATTRIBUTE_DARK) and c:IsRace(RACE_FAIRY) return c:IsFusionAttribute(ATTRIBUTE_DARK) and c:IsRace(RACE_FAIRY)
end 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 end
function c33401313.addct(e,tp,eg,ep,ev,re,r,rp,chk,chkc) function cm.addct(e,tp,eg,ep,ev,re,r,rp,chk,chkc)
if chkc then return chkc:IsOnField() and c33401313.filter(chkc) end if chkc then return chkc:IsOnField() and cm.filter(chkc) end
if chk==0 then return true end if chk==0 then return true end
Duel.Hint(HINT_SELECTMSG,tp,HINTMSG_FACEUP) Duel.Hint(HINT_SELECTMSG,tp,HINTMSG_FACEUP)
Duel.SelectTarget(tp,c33401313.filter,tp,LOCATION_ONFIELD,0,1,1,nil) Duel.SelectTarget(tp,cm.filter,tp,LOCATION_ONFIELD,0,1,1,nil)
Duel.SetOperationInfo(0,CATEGORY_COUNTER,nil,6,0,0x34f) Duel.SetOperationInfo(0,CATEGORY_COUNTER,nil,4,0,0x34f)
end 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() local tc=Duel.GetFirstTarget()
if tc and tc:IsFaceup() and tc:IsRelateToEffect(e) then if tc and tc:IsFaceup() and tc:IsRelateToEffect(e) then
tc:AddCounter(0x34f,6) tc:AddCounter(0x34f,4)
end end
end end
function c33401313.cpfilter(c) function cm.cpfilter(c)
return c:IsType(TYPE_EFFECT) and c:IsSetCard(0x341) and c:IsRace(RACE_FAIRY) return c:IsType(TYPE_EFFECT) and c:IsSetCard(0x341) and c:IsRace(RACE_FAIRY)
end end
function c33401313.cptg(e,tp,eg,ep,ev,re,r,rp,chk,chkc) function cm.cptg(e,tp,eg,ep,ev,re,r,rp,chk,chkc)
if chkc then return c33401313.cpfilter(chkc) end if chkc then return cm.cpfilter(chkc) end
if chk==0 then return Duel.IsExistingTarget(c33401313.cpfilter,tp,LOCATION_GRAVE,LOCATION_GRAVE,1,e:GetHandler()) 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) 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 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() local c=e:GetHandler()
if not c:IsOnField() or c:IsFacedown() then return end if not c:IsOnField() or c:IsFacedown() then return end
local g=Duel.GetChainInfo(0,CHAININFO_TARGET_CARDS) local g=Duel.GetChainInfo(0,CHAININFO_TARGET_CARDS)
...@@ -85,18 +121,18 @@ function c33401313.cpop(e,tp,eg,ep,ev,re,r,rp) ...@@ -85,18 +121,18 @@ function c33401313.cpop(e,tp,eg,ep,ev,re,r,rp)
end end
end end
function c33401313.thfilter3(c) function cm.thfilter3(c)
return c:IsSetCard(0x3340) or c:IsSetCard(0x3341) and c:IsAbleToHand() return c:IsSetCard(0x3340) or c:IsSetCard(0x3341) and c:IsAbleToHand()
end end
function c33401313.adtg(e,tp,eg,ep,ev,re,r,rp,chk) function cm.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) if chk==0 then return Duel.IsExistingMatchingCard(cm.thfilter3,tp,LOCATION_GRAVE,0,1,nil)
end end
Duel.SetOperationInfo(0,CATEGORY_TOHAND,nil,1,tp,LOCATION_GRAVE) Duel.SetOperationInfo(0,CATEGORY_TOHAND,nil,1,tp,LOCATION_GRAVE)
end end
function c33401313.adop(e,tp,eg,ep,ev,re,r,rp) function cm.adop(e,tp,eg,ep,ev,re,r,rp)
local g1=Duel.GetMatchingGroup(c33401313.thfilter3,tp,LOCATION_GRAVE,0,nil) local g1=Duel.GetMatchingGroup(cm.thfilter3,tp,LOCATION_GRAVE,0,nil)
Duel.Hint(HINT_SELECTMSG,tp,HINTMSG_ATOHAND) 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 if g:GetCount()>0 then
Duel.SendtoHand(g,nil,REASON_EFFECT) Duel.SendtoHand(g,nil,REASON_EFFECT)
Duel.ConfirmCards(1-tp,g) Duel.ConfirmCards(1-tp,g)
......
...@@ -64,7 +64,7 @@ function cm.cfilter2(c,tp) ...@@ -64,7 +64,7 @@ function cm.cfilter2(c,tp)
return c:IsFaceup() and c:IsSetCard(0x341) and c:IsType(TYPE_MONSTER) return c:IsFaceup() and c:IsSetCard(0x341) and c:IsType(TYPE_MONSTER)
end end
function cm.spcon2(e,tp,eg,ep,ev,re,r,rp) 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 end
function cm.sptg(e,tp,eg,ep,ev,re,r,rp,chk) function cm.sptg(e,tp,eg,ep,ev,re,r,rp,chk)
local c=e:GetHandler() 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
--首领赎救龙
function c40009170.initial_effect(c)
c:EnableReviveLimit()
--Cannot special summon
local e1=Effect.CreateEffect(c)
e1:SetProperty(EFFECT_FLAG_CANNOT_DISABLE+EFFECT_FLAG_UNCOPYABLE)
e1:SetType(EFFECT_TYPE_SINGLE)
e1:SetCode(EFFECT_SPSUMMON_CONDITION)
e1:SetValue(aux.FALSE)
c:RegisterEffect(e1)
--immune
local e2=Effect.CreateEffect(c)
e2:SetType(EFFECT_TYPE_SINGLE)
e2:SetCode(EFFECT_IMMUNE_EFFECT)
e2:SetProperty(EFFECT_FLAG_SINGLE_RANGE)
e2:SetRange(LOCATION_MZONE)
e2:SetValue(c40009170.efilter)
c:RegisterEffect(e2)
--to hand
local e3=Effect.CreateEffect(c)
e3:SetDescription(aux.Stringid(40009170,0))
e3:SetCategory(CATEGORY_ATKCHANGE)
e3:SetType(EFFECT_TYPE_SINGLE+EFFECT_TYPE_TRIGGER_F)
e3:SetCode(EVENT_SPSUMMON_SUCCESS)
e3:SetProperty(EFFECT_FLAG_DAMAGE_STEP)
e3:SetCountLimit(1,40009170+EFFECT_COUNT_CODE_DUEL)
e3:SetHintTiming(TIMING_DAMAGE_STEP,TIMING_DAMAGE_STEP+TIMINGS_CHECK_MONSTER)
e3:SetTarget(c40009170.atkktg)
e3:SetOperation(c40009170.atkop)
c:RegisterEffect(e3)
--atk up
local e4=Effect.CreateEffect(c)
e4:SetType(EFFECT_TYPE_SINGLE)
e4:SetProperty(EFFECT_FLAG_SINGLE_RANGE)
e4:SetRange(LOCATION_MZONE)
e4:SetCode(EFFECT_UPDATE_ATTACK)
e4:SetValue(c40009170.value)
c:RegisterEffect(e4)
--special summon
local e5=Effect.CreateEffect(c)
e5:SetDescription(aux.Stringid(40009170,1))
e5:SetCategory(CATEGORY_SPECIAL_SUMMON)
e5:SetType(EFFECT_TYPE_IGNITION)
e5:SetRange(LOCATION_MZONE)
e5:SetCountLimit(1,40009171)
e5:SetCost(c40009170.spcost)
e5:SetTarget(c40009170.target)
e5:SetOperation(c40009170.activate)
c:RegisterEffect(e5)
end
function c40009170.efilter(e,te)
local c=e:GetHandler()
local ec=te:GetHandler()
if ec:IsHasCardTarget(c) or (te:IsHasType(EFFECT_TYPE_ACTIONS) and te:IsHasProperty(EFFECT_FLAG_CARD_TARGET) and c:IsRelateToEffect(te)) then return false
end
return true
end
function c40009170.atkktg(e,tp,eg,ep,ev,re,r,rp,chk)
if chk==0 then return true end
Duel.SetChainLimit(c40009170.chlimit)
end
function c40009170.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(c40009170.discon)
e1:SetTarget(c40009170.atktg)
e1:SetValue(2000)
Duel.RegisterEffect(e1,tp)
--Duel.SetChainLimit(c40009170.chlimit)
end
function c40009170.chlimit(e,ep,tp)
return tp==ep
end
function c40009170.discon(e)
local ph=Duel.GetCurrentPhase()
return ph>=PHASE_BATTLE_START and ph<=PHASE_BATTLE
end
function c40009170.atktg(e,c)
return c:GetSequence()>=5
end
function c40009170.cfilter(c)
return c:IsRace(RACE_WARRIOR) and c:IsAbleToRemoveAsCost()
end
function c40009170.spcost(e,tp,eg,ep,ev,re,r,rp,chk)
if chk==0 then return Duel.IsExistingMatchingCard(Card.IsDiscardable,tp,LOCATION_HAND,0,3,nil) and Duel.IsExistingMatchingCard(c40009170.cfilter,tp,LOCATION_GRAVE,0,3,nil) end
Duel.DiscardHand(tp,Card.IsDiscardable,3,3,REASON_COST+REASON_DISCARD)
Duel.Hint(HINT_SELECTMSG,tp,HINTMSG_REMOVE)
local g=Duel.SelectMatchingCard(tp,c40009170.cfilter,tp,LOCATION_GRAVE,0,3,3,nil)
Duel.Remove(g,POS_FACEUP,REASON_COST)
end
function c40009170.spfilter(c,e,tp)
return c:IsCanBeSpecialSummoned(e,0,tp,false,false) and c:IsSetCard(0xbf1d)
end
function c40009170.fcheck(c,g)
return g:IsExists(Card.IsOriginalCodeRule,1,c,c:GetOriginalCodeRule())
end
function c40009170.fselect(g)
return g:GetClassCount(Card.GetLocation)==g:GetCount() and not g:IsExists(c40009170.fcheck,1,nil,g)
end
function c40009170.target(e,tp,eg,ep,ev,re,r,rp,chk)
local g=Duel.GetMatchingGroup(c40009170.spfilter,tp,LOCATION_HAND+LOCATION_DECK+LOCATION_GRAVE+LOCATION_REMOVED,0,nil,e,tp)
if chk==0 then return g:CheckSubGroup(c40009170.fselect,3,3) end
Duel.SetOperationInfo(0,CATEGORY_SPECIAL_SUMMON,nil,3,tp,LOCATION_HAND+LOCATION_DECK+LOCATION_GRAVE+LOCATION_REMOVED)
end
function c40009170.activate(e,tp,eg,ep,ev,re,r,rp)
if Duel.GetLocationCount(tp,LOCATION_MZONE)<3 or Duel.IsPlayerAffectedByEffect(tp,59822133) then return end
local g=Duel.GetMatchingGroup(aux.NecroValleyFilter(c40009170.spfilter),tp,LOCATION_HAND+LOCATION_DECK+LOCATION_GRAVE+LOCATION_REMOVED,0,nil,e,tp)
Duel.Hint(HINT_SELECTMSG,tp,HINTMSG_SPSUMMON)
local sg=g:SelectSubGroup(tp,c40009170.fselect,false,3,3)
if sg and sg:GetCount()==3 then
Duel.SpecialSummon(sg,0,tp,tp,false,false,POS_FACEUP)
end
end
function c40009170.vfilter(c)
return c:IsFaceup() and c:GetSequence()>=5
end
function c40009170.value(e,c)
local g=Duel.GetMatchingGroup(c40009170.vfilter,tp,LOCATION_MZONE,0,c)
return g:GetSum(Card.GetBaseAttack)
end
\ No newline at end of file
--狂风剑刃·超限
function c40009173.initial_effect(c)
--xyz summon
aux.AddXyzProcedure(c,c40009173.mfilter,7,2,c40009173.ovfilter,aux.Stringid(40009173,0),2,c40009173.xyzop)
c:EnableReviveLimit()
--code
local e1=Effect.CreateEffect(c)
e1:SetType(EFFECT_TYPE_SINGLE)
e1:SetProperty(EFFECT_FLAG_SINGLE_RANGE)
e1:SetCode(EFFECT_CHANGE_CODE)
e1:SetRange(LOCATION_MZONE+LOCATION_GRAVE)
e1:SetValue(40009154)
c:RegisterEffect(e1)
--to hand
local e2=Effect.CreateEffect(c)
e2:SetDescription(aux.Stringid(40009173,0))
e2:SetType(EFFECT_TYPE_SINGLE+EFFECT_TYPE_TRIGGER_F)
e2:SetCode(EVENT_SPSUMMON_SUCCESS)
e2:SetProperty(EFFECT_FLAG_DAMAGE_STEP)
e2:SetCountLimit(1,40009173+EFFECT_COUNT_CODE_DUEL)
e2:SetHintTiming(TIMING_DAMAGE_STEP,TIMING_DAMAGE_STEP+TIMINGS_CHECK_MONSTER)
e2:SetCondition(c40009173.atkcon)
e2:SetTarget(c40009173.atkktg)
e2:SetOperation(c40009173.atkop)
c:RegisterEffect(e2)
--to grave
local e8=Effect.CreateEffect(c)
e8:SetDescription(aux.Stringid(40009173,1))
e8:SetCategory(CATEGORY_TOGRAVE)
e8:SetType(EFFECT_TYPE_QUICK_O)
e8:SetCode(EVENT_FREE_CHAIN)
e8:SetRange(LOCATION_MZONE)
e8:SetHintTiming(0,TIMINGS_CHECK_MONSTER+TIMING_END_PHASE)
e8:SetCountLimit(1)
e8:SetCost(c40009173.spcost)
e8:SetTarget(c40009173.tgtg)
e8:SetOperation(c40009173.tgop)
c:RegisterEffect(e8)
end
function c40009173.mfilter(c)
return c:IsRace(RACE_WARRIOR)
end
function c40009173.ovfilter(c)
return c:IsFaceup() and c:IsCode(40009154)
end
function c40009173.xyzop(e,tp,chk)
if chk==0 then return Duel.GetFlagEffect(tp,40009173)==0 end
Duel.RegisterFlagEffect(tp,40009173,RESET_PHASE+PHASE_END,0,1)
end
function c40009173.atkcon(e,tp,eg,ep,ev,re,r,rp)
return e:GetHandler():IsSummonType(SUMMON_TYPE_XYZ)
end
function c40009173.atkktg(e,tp,eg,ep,ev,re,r,rp,chk,chkc)
if chk==0 then return true end
Duel.SetChainLimit(c40009173.chlimit)
end
--function c40009173.atktg(e,tp,eg,ep,ev,re,r,rp,chk)
-- local c=e:GetHandler()
-- if chk==0 then return Duel.GetLocationCount(tp,LOCATION_MZONE,PLAYER_NONE,0)>0 end
-- local flag=Duel.SelectDisableField(tp,1,LOCATION_MZONE,0,0)
-- e:SetLabel(flag)
-- Duel.Hint(HINT_ZONE,tp,flag)
--end
function c40009173.chlimit(e,ep,tp)
return tp==ep
end
function c40009173.atkop(e,tp,eg,ep,ev,re,r,rp)
local e1=Effect.CreateEffect(e:GetHandler())
e1:SetType(EFFECT_TYPE_FIELD)
e1:SetCode(EFFECT_CHANGE_BATTLE_DAMAGE)
e1:SetTargetRange(LOCATION_MZONE,0)
e1:SetTarget(c40009173.atktg1)
e1:SetValue(aux.ChangeBattleDamage(1,DOUBLE_DAMAGE))
Duel.RegisterEffect(e1,tp)
--Duel.SetChainLimit(c40009173.chlimit)
end
function c40009173.atktg1(e,c)
return c:GetSequence()>=5
end
function c40009173.spcost(e,tp,eg,ep,ev,re,r,rp,chk)
if chk==0 then return Duel.IsExistingMatchingCard(Card.IsDiscardable,tp,LOCATION_HAND,0,1,e:GetHandler()) and e:GetHandler():CheckRemoveOverlayCard(tp,1,REASON_COST) end
Duel.DiscardHand(tp,Card.IsDiscardable,1,1,REASON_COST+REASON_DISCARD)
e:GetHandler():RemoveOverlayCard(tp,1,1,REASON_COST)
end
function c40009173.tgtg(e,tp,eg,ep,ev,re,r,rp,chk)
if chk==0 then return Duel.GetFieldGroupCount(tp,0,LOCATION_MZONE+LOCATION_HAND)>0 end
Duel.SetOperationInfo(0,CATEGORY_TOGRAVE,nil,1,0,LOCATION_MZONE+LOCATION_HAND)
end
function c40009173.tgop(e,tp,eg,ep,ev,re,r,rp)
local g=Duel.GetMatchingGroup(Card.IsType,1-tp,LOCATION_MZONE+LOCATION_HAND,0,nil,TYPE_MONSTER)
if g:GetCount()>0 then
Duel.Hint(HINT_SELECTMSG,1-tp,HINTMSG_TOGRAVE)
local sg=g:Select(1-tp,1,1,nil)
Duel.HintSelection(sg)
Duel.SendtoGrave(sg,REASON_RULE)
end
end
\ No newline at end of file
--圣骑士王 阿尔弗雷德·神圣赎救
function c40009175.initial_effect(c)
--synchro summon
aux.AddSynchroProcedure(c,nil,aux.NonTuner(Card.IsRace,RACE_WARRIOR),1)
c:EnableReviveLimit()
--extra attack
local e0=Effect.CreateEffect(c)
e0:SetType(EFFECT_TYPE_SINGLE+EFFECT_TYPE_CONTINUOUS)
e0:SetProperty(EFFECT_FLAG_CANNOT_DISABLE)
e0:SetCode(EVENT_SPSUMMON_SUCCESS)
e0:SetCondition(c40009175.regcon)
e0:SetOperation(c40009175.regop)
c:RegisterEffect(e0)
local e1=Effect.CreateEffect(c)
e1:SetType(EFFECT_TYPE_SINGLE)
e1:SetCode(EFFECT_MATERIAL_CHECK)
e1:SetValue(c40009175.valcheck)
e1:SetLabelObject(e0)
c:RegisterEffect(e1)
local e2=Effect.CreateEffect(c)
e2:SetType(EFFECT_TYPE_SINGLE)
e2:SetCode(EFFECT_EXTRA_ATTACK)
e2:SetCondition(c40009175.condition)
e2:SetValue(1)
c:RegisterEffect(e2)
--to hand
local e3=Effect.CreateEffect(c)
e3:SetDescription(aux.Stringid(40009175,0))
e3:SetType(EFFECT_TYPE_SINGLE+EFFECT_TYPE_TRIGGER_F)
e3:SetCode(EVENT_SPSUMMON_SUCCESS)
e3:SetProperty(EFFECT_FLAG_DAMAGE_STEP)
e3:SetCountLimit(1,40009175+EFFECT_COUNT_CODE_DUEL)
e3:SetHintTiming(TIMING_DAMAGE_STEP,TIMING_DAMAGE_STEP+TIMINGS_CHECK_MONSTER)
e3:SetCondition(c40009175.atkcon)
e3:SetTarget(c40009175.atkktg)
e3:SetOperation(c40009175.atkop)
c:RegisterEffect(e3)
--disable and destroy
local e4=Effect.CreateEffect(c)
e4:SetType(EFFECT_TYPE_CONTINUOUS+EFFECT_TYPE_FIELD)
e4:SetRange(LOCATION_MZONE)
e4:SetCode(EVENT_CHAIN_SOLVING)
e4:SetOperation(c40009175.disop)
c:RegisterEffect(e4)
end
function c40009175.regcon(e,tp,eg,ep,ev,re,r,rp)
return e:GetHandler():IsSummonType(SUMMON_TYPE_SYNCHRO) and e:GetLabel()==1
end
function c40009175.regop(e,tp,eg,ep,ev,re,r,rp)
e:GetHandler():RegisterFlagEffect(40009175,RESET_EVENT+RESETS_STANDARD,EFFECT_FLAG_CLIENT_HINT,1,0,aux.Stringid(40009175,2))
end
function c40009175.valcheck(e,c)
local g=c:GetMaterial()
if g:IsExists(Card.IsCode,1,nil,40009154) then
e:GetLabelObject():SetLabel(1)
else
e:GetLabelObject():SetLabel(0)
end
end
function c40009175.condition(e)
return e:GetHandler():GetFlagEffect(40009175)>0
end
function c40009175.atkcon(e,tp,eg,ep,ev,re,r,rp)
return e:GetHandler():IsSummonType(SUMMON_TYPE_SYNCHRO)
end
function c40009175.atkktg(e,tp,eg,ep,ev,re,r,rp,chk,chkc)
if chk==0 then return true end
Duel.SetChainLimit(c40009175.chlimit)
end
--function c40009175.atktg(e,tp,eg,ep,ev,re,r,rp,chk)
-- local c=e:GetHandler()
-- if chk==0 then return Duel.GetLocationCount(tp,LOCATION_MZONE,PLAYER_NONE,0)>0 end
-- local flag=Duel.SelectDisableField(tp,1,LOCATION_MZONE,0,0)
-- e:SetLabel(flag)
--Duel.Hint(HINT_ZONE,tp,flag)
--end
function c40009175.chlimit(e,ep,tp)
return tp==ep
end
function c40009175.atkop(e,tp,eg,ep,ev,re,r,rp)
local e1=Effect.CreateEffect(e:GetHandler())
e1:SetType(EFFECT_TYPE_FIELD)
e1:SetCode(EFFECT_CHANGE_BATTLE_DAMAGE)
e1:SetTargetRange(LOCATION_MZONE,0)
e1:SetTarget(c40009175.atktg1)
e1:SetValue(aux.ChangeBattleDamage(1,DOUBLE_DAMAGE))
Duel.RegisterEffect(e1,tp)
-- Duel.SetChainLimit(c40009175.chlimit)
end
function c40009175.atktg1(e,c)
return c:GetSequence()>=5
end
function c40009175.disop(e,tp,eg,ep,ev,re,r,rp)
if ep==tp or e:GetHandler():GetAttack()<=6000 then return end
local rc=re:GetHandler()
if Duel.NegateEffect(ev) and rc:IsRelateToEffect(re) then
Duel.Destroy(rc,REASON_EFFECT)
end
end
\ No newline at end of file
...@@ -63,10 +63,10 @@ function c40009178.nnegcost(e,tp,eg,ep,ev,re,r,rp,chk) ...@@ -63,10 +63,10 @@ function c40009178.nnegcost(e,tp,eg,ep,ev,re,r,rp,chk)
Duel.RemoveCounter(tp,1,0,0xf1c,3,REASON_COST) Duel.RemoveCounter(tp,1,0,0xf1c,3,REASON_COST)
end end
function c40009178.setcon1(e,tp,eg,ep,ev,re,r,rp) function c40009178.setcon1(e,tp,eg,ep,ev,re,r,rp)
return not Duel.IsExistingMatchingCard(nil,tp,LOCATION_PZONE,0,1,e:GetHandler()) and not Duel.IsPlayerAffectedByEffect(tp,40009208) return not Duel.IsExistingMatchingCard(nil,tp,LOCATION_PZONE,0,1,e:GetHandler()) and (not Duel.IsPlayerAffectedByEffect(tp,40009208) or (Duel.GetCurrentChain()<1 and Duel.IsPlayerAffectedByEffect(tp,40009208)))
end end
function c40009178.setcon2(e,tp,eg,ep,ev,re,r,rp) function c40009178.setcon2(e,tp,eg,ep,ev,re,r,rp)
return not Duel.IsExistingMatchingCard(nil,tp,LOCATION_PZONE,0,1,e:GetHandler()) and Duel.IsPlayerAffectedByEffect(tp,40009208) return not Duel.IsExistingMatchingCard(nil,tp,LOCATION_PZONE,0,1,e:GetHandler()) and Duel.GetCurrentChain()>0 and Duel.IsPlayerAffectedByEffect(tp,40009208)
end end
function c40009178.setfilter(c) function c40009178.setfilter(c)
return c:IsSetCard(0xf1c) and c:IsType(TYPE_PENDULUM) and not c:IsForbidden() and c:IsFaceup() return c:IsSetCard(0xf1c) and c:IsType(TYPE_PENDULUM) and not c:IsForbidden() and c:IsFaceup()
...@@ -99,10 +99,10 @@ function c40009178.splimit(e,c) ...@@ -99,10 +99,10 @@ function c40009178.splimit(e,c)
return not (c:IsType(TYPE_XYZ) or c:IsSetCard(0xf1c)) and c:IsLocation(LOCATION_EXTRA) return not (c:IsType(TYPE_XYZ) or c:IsSetCard(0xf1c)) and c:IsLocation(LOCATION_EXTRA)
end end
function c40009178.spcon1(e,tp,eg,ep,ev,re,r,rp) function c40009178.spcon1(e,tp,eg,ep,ev,re,r,rp)
return not Duel.IsPlayerAffectedByEffect(tp,40009208) return not Duel.IsPlayerAffectedByEffect(tp,40009208) or (Duel.GetCurrentChain()<1 and Duel.IsPlayerAffectedByEffect(tp,40009208))
end end
function c40009178.spcon2(e,tp,eg,ep,ev,re,r,rp) function c40009178.spcon2(e,tp,eg,ep,ev,re,r,rp)
return Duel.IsPlayerAffectedByEffect(tp,40009208) return Duel.GetCurrentChain()>0 and Duel.IsPlayerAffectedByEffect(tp,40009208)
end end
function c40009178.rmfilter(c,e,tp) function c40009178.rmfilter(c,e,tp)
return c:IsFaceup() and c:IsSetCard(0xf1c) and c:IsAbleToRemove() and c:IsLevelAbove(1) and Duel.IsExistingMatchingCard(c40009178.spfilter,tp,LOCATION_DECK,0,1,nil,c:GetLevel(),e,tp) return c:IsFaceup() and c:IsSetCard(0xf1c) and c:IsAbleToRemove() and c:IsLevelAbove(1) and Duel.IsExistingMatchingCard(c40009178.spfilter,tp,LOCATION_DECK,0,1,nil,c:GetLevel(),e,tp)
...@@ -185,10 +185,10 @@ function c40009178.retop2(e,tp,eg,ep,ev,re,r,rp) ...@@ -185,10 +185,10 @@ function c40009178.retop2(e,tp,eg,ep,ev,re,r,rp)
Duel.SendtoDeck(tc,nil,2,REASON_EFFECT) Duel.SendtoDeck(tc,nil,2,REASON_EFFECT)
end end
function c40009178.tdcon1(e,tp,eg,ep,ev,re,r,rp) function c40009178.tdcon1(e,tp,eg,ep,ev,re,r,rp)
return e:GetHandler():IsFaceup() and not Duel.IsPlayerAffectedByEffect(tp,40009208) return e:GetHandler():IsFaceup() and (not Duel.IsPlayerAffectedByEffect(tp,40009208) or (Duel.GetCurrentChain()<1 and Duel.IsPlayerAffectedByEffect(tp,40009208)))
end end
function c40009178.tdcon2(e,tp,eg,ep,ev,re,r,rp) function c40009178.tdcon2(e,tp,eg,ep,ev,re,r,rp)
return e:GetHandler():IsFaceup() and Duel.IsPlayerAffectedByEffect(tp,40009208) return e:GetHandler():IsFaceup() and Duel.GetCurrentChain()>0 and Duel.IsPlayerAffectedByEffect(tp,40009208)
end end
function c40009178.tdfilter(c) function c40009178.tdfilter(c)
return c:IsSetCard(0xf1c) and c:IsAbleToDeck() and c:IsFaceup() return c:IsSetCard(0xf1c) and c:IsAbleToDeck() and c:IsFaceup()
......
...@@ -63,10 +63,10 @@ function c40009181.nnegcost(e,tp,eg,ep,ev,re,r,rp,chk) ...@@ -63,10 +63,10 @@ function c40009181.nnegcost(e,tp,eg,ep,ev,re,r,rp,chk)
Duel.RemoveCounter(tp,1,0,0xf1c,3,REASON_COST) Duel.RemoveCounter(tp,1,0,0xf1c,3,REASON_COST)
end end
function c40009181.setcon1(e,tp,eg,ep,ev,re,r,rp) function c40009181.setcon1(e,tp,eg,ep,ev,re,r,rp)
return not Duel.IsPlayerAffectedByEffect(tp,40009208) return not Duel.IsPlayerAffectedByEffect(tp,40009208) or (Duel.GetCurrentChain()<1 and Duel.IsPlayerAffectedByEffect(tp,40009208))
end end
function c40009181.setcon2(e,tp,eg,ep,ev,re,r,rp) function c40009181.setcon2(e,tp,eg,ep,ev,re,r,rp)
return Duel.IsPlayerAffectedByEffect(tp,40009208) return Duel.GetCurrentChain()>0 and Duel.IsPlayerAffectedByEffect(tp,40009208)
end end
function c40009181.filter(c) function c40009181.filter(c)
return c:IsSetCard(0xf1c) and c:IsAbleToHand() and c:IsType(TYPE_SPELL+TYPE_TRAP) return c:IsSetCard(0xf1c) and c:IsAbleToHand() and c:IsType(TYPE_SPELL+TYPE_TRAP)
...@@ -95,10 +95,10 @@ function c40009181.splimit(e,c) ...@@ -95,10 +95,10 @@ function c40009181.splimit(e,c)
return not (c:IsType(TYPE_XYZ) or c:IsSetCard(0xf1c)) and c:IsLocation(LOCATION_EXTRA) return not (c:IsType(TYPE_XYZ) or c:IsSetCard(0xf1c)) and c:IsLocation(LOCATION_EXTRA)
end end
function c40009181.spcon1(e,tp,eg,ep,ev,re,r,rp) function c40009181.spcon1(e,tp,eg,ep,ev,re,r,rp)
return not Duel.IsPlayerAffectedByEffect(tp,40009208) return not Duel.IsPlayerAffectedByEffect(tp,40009208) or (Duel.GetCurrentChain()<1 and Duel.IsPlayerAffectedByEffect(tp,40009208))
end end
function c40009181.spcon2(e,tp,eg,ep,ev,re,r,rp) function c40009181.spcon2(e,tp,eg,ep,ev,re,r,rp)
return Duel.IsPlayerAffectedByEffect(tp,40009208) return Duel.GetCurrentChain()>0 and Duel.IsPlayerAffectedByEffect(tp,40009208)
end end
function c40009181.rmfilter(c,e,tp) function c40009181.rmfilter(c,e,tp)
return c:IsFaceup() and c:IsSetCard(0xf1c) and c:IsAbleToRemove() and c:IsLevelAbove(1) and Duel.IsExistingMatchingCard(c40009181.spfilter,tp,LOCATION_DECK,0,1,nil,c:GetLevel(),e,tp) return c:IsFaceup() and c:IsSetCard(0xf1c) and c:IsAbleToRemove() and c:IsLevelAbove(1) and Duel.IsExistingMatchingCard(c40009181.spfilter,tp,LOCATION_DECK,0,1,nil,c:GetLevel(),e,tp)
...@@ -181,10 +181,10 @@ function c40009181.retop2(e,tp,eg,ep,ev,re,r,rp) ...@@ -181,10 +181,10 @@ function c40009181.retop2(e,tp,eg,ep,ev,re,r,rp)
Duel.SendtoDeck(tc,nil,2,REASON_EFFECT) Duel.SendtoDeck(tc,nil,2,REASON_EFFECT)
end end
function c40009181.tdcon1(e,tp,eg,ep,ev,re,r,rp) function c40009181.tdcon1(e,tp,eg,ep,ev,re,r,rp)
return e:GetHandler():IsFaceup() and not Duel.IsPlayerAffectedByEffect(tp,40009208) return e:GetHandler():IsFaceup() and (not Duel.IsPlayerAffectedByEffect(tp,40009208) or (Duel.GetCurrentChain()<1 and Duel.IsPlayerAffectedByEffect(tp,40009208)))
end end
function c40009181.tdcon2(e,tp,eg,ep,ev,re,r,rp) function c40009181.tdcon2(e,tp,eg,ep,ev,re,r,rp)
return e:GetHandler():IsFaceup() and Duel.IsPlayerAffectedByEffect(tp,40009208) return e:GetHandler():IsFaceup() and Duel.GetCurrentChain()>0 and Duel.IsPlayerAffectedByEffect(tp,40009208)
end end
function c40009181.tdfilter(c) function c40009181.tdfilter(c)
return c:IsSetCard(0xf1c) and c:IsAbleToDeck() and c:IsFaceup() return c:IsSetCard(0xf1c) and c:IsAbleToDeck() and c:IsFaceup()
......
...@@ -63,10 +63,10 @@ function c40009184.nnegcost(e,tp,eg,ep,ev,re,r,rp,chk) ...@@ -63,10 +63,10 @@ function c40009184.nnegcost(e,tp,eg,ep,ev,re,r,rp,chk)
Duel.RemoveCounter(tp,1,0,0xf1c,3,REASON_COST) Duel.RemoveCounter(tp,1,0,0xf1c,3,REASON_COST)
end end
function c40009184.setcon1(e,tp,eg,ep,ev,re,r,rp) function c40009184.setcon1(e,tp,eg,ep,ev,re,r,rp)
return not Duel.IsPlayerAffectedByEffect(tp,40009208) return not Duel.IsPlayerAffectedByEffect(tp,40009208) or (Duel.GetCurrentChain()<1 and Duel.IsPlayerAffectedByEffect(tp,40009208))
end end
function c40009184.setcon2(e,tp,eg,ep,ev,re,r,rp) function c40009184.setcon2(e,tp,eg,ep,ev,re,r,rp)
return Duel.IsPlayerAffectedByEffect(tp,40009208) return Duel.GetCurrentChain()>0 and Duel.IsPlayerAffectedByEffect(tp,40009208)
end end
function c40009184.filter(c) function c40009184.filter(c)
return c:IsSetCard(0xf1c) and c:IsAbleToHand() and c:IsType(TYPE_MONSTER) and not c:IsCode(40009184) return c:IsSetCard(0xf1c) and c:IsAbleToHand() and c:IsType(TYPE_MONSTER) and not c:IsCode(40009184)
...@@ -95,10 +95,10 @@ function c40009184.splimit(e,c) ...@@ -95,10 +95,10 @@ function c40009184.splimit(e,c)
return not (c:IsType(TYPE_XYZ) or c:IsSetCard(0xf1c)) and c:IsLocation(LOCATION_EXTRA) return not (c:IsType(TYPE_XYZ) or c:IsSetCard(0xf1c)) and c:IsLocation(LOCATION_EXTRA)
end end
function c40009184.spcon1(e,tp,eg,ep,ev,re,r,rp) function c40009184.spcon1(e,tp,eg,ep,ev,re,r,rp)
return not Duel.IsPlayerAffectedByEffect(tp,40009208) return not Duel.IsPlayerAffectedByEffect(tp,40009208) or (Duel.GetCurrentChain()<1 and Duel.IsPlayerAffectedByEffect(tp,40009208))
end end
function c40009184.spcon2(e,tp,eg,ep,ev,re,r,rp) function c40009184.spcon2(e,tp,eg,ep,ev,re,r,rp)
return Duel.IsPlayerAffectedByEffect(tp,40009208) return Duel.GetCurrentChain()>0 and Duel.IsPlayerAffectedByEffect(tp,40009208)
end end
function c40009184.rmfilter(c,e,tp) function c40009184.rmfilter(c,e,tp)
return c:IsFaceup() and c:IsSetCard(0xf1c) and c:IsAbleToRemove() and c:IsLevelAbove(1) and Duel.IsExistingMatchingCard(c40009184.spfilter,tp,LOCATION_DECK,0,1,nil,c:GetLevel(),e,tp) return c:IsFaceup() and c:IsSetCard(0xf1c) and c:IsAbleToRemove() and c:IsLevelAbove(1) and Duel.IsExistingMatchingCard(c40009184.spfilter,tp,LOCATION_DECK,0,1,nil,c:GetLevel(),e,tp)
...@@ -181,10 +181,10 @@ function c40009184.retop2(e,tp,eg,ep,ev,re,r,rp) ...@@ -181,10 +181,10 @@ function c40009184.retop2(e,tp,eg,ep,ev,re,r,rp)
Duel.SendtoDeck(tc,nil,2,REASON_EFFECT) Duel.SendtoDeck(tc,nil,2,REASON_EFFECT)
end end
function c40009184.tdcon1(e,tp,eg,ep,ev,re,r,rp) function c40009184.tdcon1(e,tp,eg,ep,ev,re,r,rp)
return e:GetHandler():IsFaceup() and not Duel.IsPlayerAffectedByEffect(tp,40009208) return e:GetHandler():IsFaceup() and (not Duel.IsPlayerAffectedByEffect(tp,40009208) or (Duel.GetCurrentChain()<1 and Duel.IsPlayerAffectedByEffect(tp,40009208)))
end end
function c40009184.tdcon2(e,tp,eg,ep,ev,re,r,rp) function c40009184.tdcon2(e,tp,eg,ep,ev,re,r,rp)
return e:GetHandler():IsFaceup() and Duel.IsPlayerAffectedByEffect(tp,40009208) return e:GetHandler():IsFaceup() and Duel.GetCurrentChain()>0 and Duel.IsPlayerAffectedByEffect(tp,40009208)
end end
function c40009184.tdfilter(c) function c40009184.tdfilter(c)
return c:IsSetCard(0xf1c) and c:IsAbleToDeck() and c:IsFaceup() return c:IsSetCard(0xf1c) and c:IsAbleToDeck() and c:IsFaceup()
......
...@@ -64,10 +64,10 @@ function c40009187.nnegcost(e,tp,eg,ep,ev,re,r,rp,chk) ...@@ -64,10 +64,10 @@ function c40009187.nnegcost(e,tp,eg,ep,ev,re,r,rp,chk)
Duel.RemoveCounter(tp,1,0,0xf1c,3,REASON_COST) Duel.RemoveCounter(tp,1,0,0xf1c,3,REASON_COST)
end end
function c40009187.setcon1(e,tp,eg,ep,ev,re,r,rp) function c40009187.setcon1(e,tp,eg,ep,ev,re,r,rp)
return not Duel.IsPlayerAffectedByEffect(tp,40009208) return not Duel.IsPlayerAffectedByEffect(tp,40009208) or (Duel.GetCurrentChain()<1 and Duel.IsPlayerAffectedByEffect(tp,40009208))
end end
function c40009187.setcon2(e,tp,eg,ep,ev,re,r,rp) function c40009187.setcon2(e,tp,eg,ep,ev,re,r,rp)
return Duel.IsPlayerAffectedByEffect(tp,40009208) return Duel.GetCurrentChain()>0 and Duel.IsPlayerAffectedByEffect(tp,40009208)
end end
function c40009187.setfilter(c,e,tp) function c40009187.setfilter(c,e,tp)
return c:IsSetCard(0xf1c) and (not c:IsCode(40009187)) and c:IsCanBeSpecialSummoned(e,0,tp,false,false) return c:IsSetCard(0xf1c) and (not c:IsCode(40009187)) and c:IsCanBeSpecialSummoned(e,0,tp,false,false)
...@@ -98,10 +98,10 @@ function c40009187.splimit(e,c) ...@@ -98,10 +98,10 @@ function c40009187.splimit(e,c)
return not (c:IsType(TYPE_XYZ) or c:IsSetCard(0xf1c)) and c:IsLocation(LOCATION_EXTRA) return not (c:IsType(TYPE_XYZ) or c:IsSetCard(0xf1c)) and c:IsLocation(LOCATION_EXTRA)
end end
function c40009187.spcon1(e,tp,eg,ep,ev,re,r,rp) function c40009187.spcon1(e,tp,eg,ep,ev,re,r,rp)
return not Duel.IsPlayerAffectedByEffect(tp,40009208) return not Duel.IsPlayerAffectedByEffect(tp,40009208) or (Duel.GetCurrentChain()<1 and Duel.IsPlayerAffectedByEffect(tp,40009208))
end end
function c40009187.spcon2(e,tp,eg,ep,ev,re,r,rp) function c40009187.spcon2(e,tp,eg,ep,ev,re,r,rp)
return Duel.IsPlayerAffectedByEffect(tp,40009208) return Duel.GetCurrentChain()>0 and Duel.IsPlayerAffectedByEffect(tp,40009208)
end end
function c40009187.rmfilter(c,e,tp) function c40009187.rmfilter(c,e,tp)
return c:IsFaceup() and c:IsSetCard(0xf1c) and c:IsAbleToRemove() and c:IsLevelAbove(1) and Duel.IsExistingMatchingCard(c40009187.spfilter,tp,LOCATION_DECK,0,1,nil,c:GetLevel(),e,tp) return c:IsFaceup() and c:IsSetCard(0xf1c) and c:IsAbleToRemove() and c:IsLevelAbove(1) and Duel.IsExistingMatchingCard(c40009187.spfilter,tp,LOCATION_DECK,0,1,nil,c:GetLevel(),e,tp)
...@@ -184,10 +184,10 @@ function c40009187.retop2(e,tp,eg,ep,ev,re,r,rp) ...@@ -184,10 +184,10 @@ function c40009187.retop2(e,tp,eg,ep,ev,re,r,rp)
Duel.SendtoDeck(tc,nil,2,REASON_EFFECT) Duel.SendtoDeck(tc,nil,2,REASON_EFFECT)
end end
function c40009187.tdcon1(e,tp,eg,ep,ev,re,r,rp) function c40009187.tdcon1(e,tp,eg,ep,ev,re,r,rp)
return e:GetHandler():IsFaceup() and not Duel.IsPlayerAffectedByEffect(tp,40009208) return e:GetHandler():IsFaceup() and (not Duel.IsPlayerAffectedByEffect(tp,40009208) or (Duel.GetCurrentChain()<1 and Duel.IsPlayerAffectedByEffect(tp,40009208)))
end end
function c40009187.tdcon2(e,tp,eg,ep,ev,re,r,rp) function c40009187.tdcon2(e,tp,eg,ep,ev,re,r,rp)
return e:GetHandler():IsFaceup() and Duel.IsPlayerAffectedByEffect(tp,40009208) return e:GetHandler():IsFaceup() and Duel.GetCurrentChain()>0 and Duel.IsPlayerAffectedByEffect(tp,40009208)
end end
function c40009187.tdfilter(c) function c40009187.tdfilter(c)
return c:IsSetCard(0xf1c) and c:IsAbleToDeck() and c:IsFaceup() return c:IsSetCard(0xf1c) and c:IsAbleToDeck() and c:IsFaceup()
......
...@@ -64,10 +64,10 @@ function c40009190.nnegcost(e,tp,eg,ep,ev,re,r,rp,chk) ...@@ -64,10 +64,10 @@ function c40009190.nnegcost(e,tp,eg,ep,ev,re,r,rp,chk)
Duel.RemoveCounter(tp,1,0,0xf1c,3,REASON_COST) Duel.RemoveCounter(tp,1,0,0xf1c,3,REASON_COST)
end end
function c40009190.setcon1(e,tp,eg,ep,ev,re,r,rp) function c40009190.setcon1(e,tp,eg,ep,ev,re,r,rp)
return not Duel.IsPlayerAffectedByEffect(tp,40009208) return not Duel.IsPlayerAffectedByEffect(tp,40009208) or (Duel.GetCurrentChain()<1 and Duel.IsPlayerAffectedByEffect(tp,40009208))
end end
function c40009190.setcon2(e,tp,eg,ep,ev,re,r,rp) function c40009190.setcon2(e,tp,eg,ep,ev,re,r,rp)
return Duel.IsPlayerAffectedByEffect(tp,40009208) return Duel.GetCurrentChain()>0 and Duel.IsPlayerAffectedByEffect(tp,40009208)
end end
function c40009190.setfilter(c,e,tp) function c40009190.setfilter(c,e,tp)
return c:IsSetCard(0xf1c) and c:IsLevel(3) and c:IsCanBeSpecialSummoned(e,0,tp,false,false) return c:IsSetCard(0xf1c) and c:IsLevel(3) and c:IsCanBeSpecialSummoned(e,0,tp,false,false)
...@@ -97,10 +97,10 @@ function c40009190.splimit(e,c) ...@@ -97,10 +97,10 @@ function c40009190.splimit(e,c)
return not (c:IsType(TYPE_XYZ) or c:IsSetCard(0xf1c)) and c:IsLocation(LOCATION_EXTRA) return not (c:IsType(TYPE_XYZ) or c:IsSetCard(0xf1c)) and c:IsLocation(LOCATION_EXTRA)
end end
function c40009190.spcon1(e,tp,eg,ep,ev,re,r,rp) function c40009190.spcon1(e,tp,eg,ep,ev,re,r,rp)
return not Duel.IsPlayerAffectedByEffect(tp,40009208) return not Duel.IsPlayerAffectedByEffect(tp,40009208) or (Duel.GetCurrentChain()<1 and Duel.IsPlayerAffectedByEffect(tp,40009208))
end end
function c40009190.spcon2(e,tp,eg,ep,ev,re,r,rp) function c40009190.spcon2(e,tp,eg,ep,ev,re,r,rp)
return Duel.IsPlayerAffectedByEffect(tp,40009208) return Duel.GetCurrentChain()>0 and Duel.IsPlayerAffectedByEffect(tp,40009208)
end end
function c40009190.filter1(c,e,tp) function c40009190.filter1(c,e,tp)
return c:IsFaceup() and Duel.IsExistingMatchingCard(c40009190.filter2,tp,LOCATION_EXTRA,0,1,nil,e,tp,c) and c:IsSetCard(0xf1c) and c:IsType(TYPE_PENDULUM) and aux.MustMaterialCheck(c,tp,EFFECT_MUST_BE_XMATERIAL) return c:IsFaceup() and Duel.IsExistingMatchingCard(c40009190.filter2,tp,LOCATION_EXTRA,0,1,nil,e,tp,c) and c:IsSetCard(0xf1c) and c:IsType(TYPE_PENDULUM) and aux.MustMaterialCheck(c,tp,EFFECT_MUST_BE_XMATERIAL)
...@@ -159,10 +159,10 @@ function c40009190.retop2(e,tp,eg,ep,ev,re,r,rp) ...@@ -159,10 +159,10 @@ function c40009190.retop2(e,tp,eg,ep,ev,re,r,rp)
Duel.SendtoDeck(tc,nil,2,REASON_EFFECT) Duel.SendtoDeck(tc,nil,2,REASON_EFFECT)
end end
function c40009190.tdcon1(e,tp,eg,ep,ev,re,r,rp) function c40009190.tdcon1(e,tp,eg,ep,ev,re,r,rp)
return e:GetHandler():IsFaceup() and not Duel.IsPlayerAffectedByEffect(tp,40009208) return e:GetHandler():IsFaceup() and (not Duel.IsPlayerAffectedByEffect(tp,40009208) or (Duel.GetCurrentChain()<1 and Duel.IsPlayerAffectedByEffect(tp,40009208)))
end end
function c40009190.tdcon2(e,tp,eg,ep,ev,re,r,rp) function c40009190.tdcon2(e,tp,eg,ep,ev,re,r,rp)
return e:GetHandler():IsFaceup() and Duel.IsPlayerAffectedByEffect(tp,40009208) return e:GetHandler():IsFaceup() and (Duel.GetCurrentChain()>0 and Duel.IsPlayerAffectedByEffect(tp,40009208))
end end
function c40009190.tdfilter(c) function c40009190.tdfilter(c)
return c:IsSetCard(0xf1c) and c:IsAbleToDeck() and c:IsFaceup() return c:IsSetCard(0xf1c) and c:IsAbleToDeck() and c:IsFaceup()
......
...@@ -64,10 +64,10 @@ function c40009193.nnegcost(e,tp,eg,ep,ev,re,r,rp,chk) ...@@ -64,10 +64,10 @@ function c40009193.nnegcost(e,tp,eg,ep,ev,re,r,rp,chk)
Duel.RemoveCounter(tp,1,0,0xf1c,3,REASON_COST) Duel.RemoveCounter(tp,1,0,0xf1c,3,REASON_COST)
end end
function c40009193.setcon1(e,tp,eg,ep,ev,re,r,rp) function c40009193.setcon1(e,tp,eg,ep,ev,re,r,rp)
return Duel.IsExistingMatchingCard(nil,tp,LOCATION_PZONE,0,1,e:GetHandler()) and not Duel.IsPlayerAffectedByEffect(tp,40009208) return Duel.IsExistingMatchingCard(nil,tp,LOCATION_PZONE,0,1,e:GetHandler()) and (not Duel.IsPlayerAffectedByEffect(tp,40009208) or (Duel.GetCurrentChain()<1 and Duel.IsPlayerAffectedByEffect(tp,40009208)))
end end
function c40009193.setcon2(e,tp,eg,ep,ev,re,r,rp) function c40009193.setcon2(e,tp,eg,ep,ev,re,r,rp)
return Duel.IsExistingMatchingCard(nil,tp,LOCATION_PZONE,0,1,e:GetHandler()) and Duel.IsPlayerAffectedByEffect(tp,40009208) return Duel.IsExistingMatchingCard(nil,tp,LOCATION_PZONE,0,1,e:GetHandler()) and Duel.GetCurrentChain()>0 and Duel.IsPlayerAffectedByEffect(tp,40009208)
end end
function c40009193.setfilter(c,e,tp) function c40009193.setfilter(c,e,tp)
return c:IsSetCard(0xf1c) and c:IsCanBeSpecialSummoned(e,0,tp,false,false) return c:IsSetCard(0xf1c) and c:IsCanBeSpecialSummoned(e,0,tp,false,false)
...@@ -98,10 +98,10 @@ function c40009193.splimit(e,c) ...@@ -98,10 +98,10 @@ function c40009193.splimit(e,c)
return not (c:IsType(TYPE_XYZ) or c:IsSetCard(0xf1c)) and c:IsLocation(LOCATION_EXTRA) return not (c:IsType(TYPE_XYZ) or c:IsSetCard(0xf1c)) and c:IsLocation(LOCATION_EXTRA)
end end
function c40009193.spcon1(e,tp,eg,ep,ev,re,r,rp) function c40009193.spcon1(e,tp,eg,ep,ev,re,r,rp)
return not Duel.IsPlayerAffectedByEffect(tp,40009208) return not Duel.IsPlayerAffectedByEffect(tp,40009208) or (Duel.GetCurrentChain()<1 and Duel.IsPlayerAffectedByEffect(tp,40009208))
end end
function c40009193.spcon2(e,tp,eg,ep,ev,re,r,rp) function c40009193.spcon2(e,tp,eg,ep,ev,re,r,rp)
return Duel.IsPlayerAffectedByEffect(tp,40009208) return Duel.GetCurrentChain()>0 and Duel.IsPlayerAffectedByEffect(tp,40009208)
end end
function c40009193.filter1(c,e,tp) function c40009193.filter1(c,e,tp)
return c:IsFaceup() and Duel.IsExistingMatchingCard(c40009193.filter2,tp,LOCATION_EXTRA,0,1,nil,e,tp,c) and c:IsSetCard(0xf1c) and c:IsType(TYPE_PENDULUM) and aux.MustMaterialCheck(c,tp,EFFECT_MUST_BE_XMATERIAL) return c:IsFaceup() and Duel.IsExistingMatchingCard(c40009193.filter2,tp,LOCATION_EXTRA,0,1,nil,e,tp,c) and c:IsSetCard(0xf1c) and c:IsType(TYPE_PENDULUM) and aux.MustMaterialCheck(c,tp,EFFECT_MUST_BE_XMATERIAL)
...@@ -160,10 +160,10 @@ function c40009193.retop2(e,tp,eg,ep,ev,re,r,rp) ...@@ -160,10 +160,10 @@ function c40009193.retop2(e,tp,eg,ep,ev,re,r,rp)
Duel.SendtoDeck(tc,nil,2,REASON_EFFECT) Duel.SendtoDeck(tc,nil,2,REASON_EFFECT)
end end
function c40009193.tdcon1(e,tp,eg,ep,ev,re,r,rp) function c40009193.tdcon1(e,tp,eg,ep,ev,re,r,rp)
return e:GetHandler():IsFaceup() and not Duel.IsPlayerAffectedByEffect(tp,40009208) return e:GetHandler():IsFaceup() and (not Duel.IsPlayerAffectedByEffect(tp,40009208) or (Duel.GetCurrentChain()<1 and Duel.IsPlayerAffectedByEffect(tp,40009208)))
end end
function c40009193.tdcon2(e,tp,eg,ep,ev,re,r,rp) function c40009193.tdcon2(e,tp,eg,ep,ev,re,r,rp)
return e:GetHandler():IsFaceup() and Duel.IsPlayerAffectedByEffect(tp,40009208) return e:GetHandler():IsFaceup() and Duel.GetCurrentChain()>0 and Duel.IsPlayerAffectedByEffect(tp,40009208)
end end
function c40009193.tdfilter(c) function c40009193.tdfilter(c)
return c:IsSetCard(0xf1c) and c:IsAbleToDeck() and c:IsFaceup() return c:IsSetCard(0xf1c) and c:IsAbleToDeck() and c:IsFaceup()
......
...@@ -26,7 +26,7 @@ function c40009196.initial_effect(c) ...@@ -26,7 +26,7 @@ function c40009196.initial_effect(c)
e3:SetType(EFFECT_TYPE_IGNITION) e3:SetType(EFFECT_TYPE_IGNITION)
e3:SetRange(LOCATION_SZONE) e3:SetRange(LOCATION_SZONE)
e3:SetProperty(EFFECT_FLAG_CARD_TARGET) e3:SetProperty(EFFECT_FLAG_CARD_TARGET)
e3:SetCountLimit(1) e3:SetCountLimit(1,EFFECT_COUNT_CODE_SINGLE)
e3:SetCondition(c40009196.spcon1) e3:SetCondition(c40009196.spcon1)
e3:SetTarget(c40009196.destg) e3:SetTarget(c40009196.destg)
e3:SetOperation(c40009196.desop) e3:SetOperation(c40009196.desop)
...@@ -52,10 +52,10 @@ function c40009196.nnegcost(e,tp,eg,ep,ev,re,r,rp,chk) ...@@ -52,10 +52,10 @@ function c40009196.nnegcost(e,tp,eg,ep,ev,re,r,rp,chk)
Duel.RemoveCounter(tp,1,0,0xf1c,3,REASON_COST) Duel.RemoveCounter(tp,1,0,0xf1c,3,REASON_COST)
end end
function c40009196.spcon1(e,tp,eg,ep,ev,re,r,rp) function c40009196.spcon1(e,tp,eg,ep,ev,re,r,rp)
return not Duel.IsPlayerAffectedByEffect(tp,40009208) return not Duel.IsPlayerAffectedByEffect(tp,40009208) or (Duel.GetCurrentChain()<1 and Duel.IsPlayerAffectedByEffect(tp,40009208))
end end
function c40009196.spcon2(e,tp,eg,ep,ev,re,r,rp) function c40009196.spcon2(e,tp,eg,ep,ev,re,r,rp)
return Duel.IsPlayerAffectedByEffect(tp,40009208) return Duel.GetCurrentChain()>0 and Duel.IsPlayerAffectedByEffect(tp,40009208)
end end
function c40009196.ctfilter(c,tp) function c40009196.ctfilter(c,tp)
return c:IsFaceup() and c:IsSetCard(0xf1c) and c:IsControler(tp) return c:IsFaceup() and c:IsSetCard(0xf1c) and c:IsControler(tp)
...@@ -67,7 +67,8 @@ function c40009196.ctop(e,tp,eg,ep,ev,re,r,rp) ...@@ -67,7 +67,8 @@ function c40009196.ctop(e,tp,eg,ep,ev,re,r,rp)
e:GetHandler():AddCounter(0xf1c,2) e:GetHandler():AddCounter(0xf1c,2)
end end
function c40009196.val(e,c) function c40009196.val(e,c)
return e:GetHandler():GetCounter(0xf1c)*100 --return e:GetHandler():GetCounter(0xf1c)*100
return Duel.GetCounter(0,1,1,0xf1c)*100
end end
function c40009196.desfilter(c) function c40009196.desfilter(c)
return c:IsFaceup() return c:IsFaceup()
......
...@@ -108,7 +108,7 @@ function cm.xyzop(e,tp) ...@@ -108,7 +108,7 @@ function cm.xyzop(e,tp)
end end
sc:SetMaterial(tg) sc:SetMaterial(tg)
Duel.Overlay(sc,tg) Duel.Overlay(sc,tg)
Duel.SpecialSummonStep(sc,SUMMON_TYPE_XYZ,tp,tp,false,false,POS_FACEUP) Duel.SpecialSummonStep(sc,SUMMON_TYPE_XYZ,tp,tp,false,false,POS_FACEUP)
end end
Duel.SpecialSummonComplete() Duel.SpecialSummonComplete()
end end
...@@ -146,7 +146,7 @@ function cm.setcon1(e,tp,eg,ep,ev,re,r,rp) ...@@ -146,7 +146,7 @@ function cm.setcon1(e,tp,eg,ep,ev,re,r,rp)
else else
g=Duel.GetFieldGroup(tp,loc,0) g=Duel.GetFieldGroup(tp,loc,0)
end end
return g:IsExists(aux.PConditionFilter,1,nil,e,tp,lscale,rscale,eset) and not Duel.IsPlayerAffectedByEffect(tp,40009208) return g:IsExists(aux.PConditionFilter,1,nil,e,tp,lscale,rscale,eset) and (not Duel.IsPlayerAffectedByEffect(tp,40009208) or (Duel.GetCurrentChain()<1 and Duel.IsPlayerAffectedByEffect(tp,40009208)))
end end
function cm.setcon2(e,tp,eg,ep,ev,re,r,rp) function cm.setcon2(e,tp,eg,ep,ev,re,r,rp)
local lpz=Duel.GetFieldCard(tp,LOCATION_PZONE,0) local lpz=Duel.GetFieldCard(tp,LOCATION_PZONE,0)
...@@ -165,7 +165,7 @@ function cm.setcon2(e,tp,eg,ep,ev,re,r,rp) ...@@ -165,7 +165,7 @@ function cm.setcon2(e,tp,eg,ep,ev,re,r,rp)
else else
g=Duel.GetFieldGroup(tp,loc,0) g=Duel.GetFieldGroup(tp,loc,0)
end end
return g:IsExists(aux.PConditionFilter,1,nil,e,tp,lscale,rscale,eset) and Duel.IsPlayerAffectedByEffect(tp,40009208) return g:IsExists(aux.PConditionFilter,1,nil,e,tp,lscale,rscale,eset) and Duel.GetCurrentChain()>0 and Duel.IsPlayerAffectedByEffect(tp,40009208)
end end
function cm.pspop(e,tp,eg,ep,ev,re,r,rp,sg,og) function cm.pspop(e,tp,eg,ep,ev,re,r,rp,sg,og)
local rpz=Duel.GetFieldCard(tp,LOCATION_PZONE,0) local rpz=Duel.GetFieldCard(tp,LOCATION_PZONE,0)
......
...@@ -25,7 +25,7 @@ function c40009207.initial_effect(c) ...@@ -25,7 +25,7 @@ function c40009207.initial_effect(c)
e3:SetType(EFFECT_TYPE_IGNITION) e3:SetType(EFFECT_TYPE_IGNITION)
e3:SetRange(LOCATION_SZONE) e3:SetRange(LOCATION_SZONE)
e3:SetProperty(EFFECT_FLAG_CARD_TARGET) e3:SetProperty(EFFECT_FLAG_CARD_TARGET)
e3:SetCountLimit(1) e3:SetCountLimit(1,EFFECT_COUNT_CODE_SINGLE)
e3:SetCondition(c40009207.spcon1) e3:SetCondition(c40009207.spcon1)
e3:SetTarget(c40009207.tdtg) e3:SetTarget(c40009207.tdtg)
e3:SetOperation(c40009207.tdop) e3:SetOperation(c40009207.tdop)
...@@ -114,10 +114,10 @@ function c40009207.nnegcost(e,tp,eg,ep,ev,re,r,rp,chk) ...@@ -114,10 +114,10 @@ function c40009207.nnegcost(e,tp,eg,ep,ev,re,r,rp,chk)
Duel.RemoveCounter(tp,1,0,0xf1c,3,REASON_COST) Duel.RemoveCounter(tp,1,0,0xf1c,3,REASON_COST)
end end
function c40009207.spcon1(e,tp,eg,ep,ev,re,r,rp) function c40009207.spcon1(e,tp,eg,ep,ev,re,r,rp)
return not Duel.IsPlayerAffectedByEffect(tp,40009208) return not Duel.IsPlayerAffectedByEffect(tp,40009208) or (Duel.GetCurrentChain()<1 and Duel.IsPlayerAffectedByEffect(tp,40009208))
end end
function c40009207.spcon2(e,tp,eg,ep,ev,re,r,rp) function c40009207.spcon2(e,tp,eg,ep,ev,re,r,rp)
return Duel.IsPlayerAffectedByEffect(tp,40009208) return Duel.GetCurrentChain()>0 and Duel.IsPlayerAffectedByEffect(tp,40009208)
end end
function c40009207.negcost(e,tp,eg,ep,ev,re,r,rp,chk) function c40009207.negcost(e,tp,eg,ep,ev,re,r,rp,chk)
if chk==0 then return Duel.IsCanRemoveCounter(tp,1,0,0xf1c,5,REASON_COST) end if chk==0 then return Duel.IsCanRemoveCounter(tp,1,0,0xf1c,5,REASON_COST) end
......
...@@ -24,7 +24,7 @@ function c40009208.initial_effect(c) ...@@ -24,7 +24,7 @@ function c40009208.initial_effect(c)
e3:SetType(EFFECT_TYPE_FIELD) e3:SetType(EFFECT_TYPE_FIELD)
e3:SetProperty(EFFECT_FLAG_PLAYER_TARGET) e3:SetProperty(EFFECT_FLAG_PLAYER_TARGET)
e3:SetCode(40009208) e3:SetCode(40009208)
e3:SetRange(LOCATION_FZONE) e3:SetRange(LOCATION_SZONE)
e3:SetTargetRange(1,0) e3:SetTargetRange(1,0)
c:RegisterEffect(e3) c:RegisterEffect(e3)
--remove --remove
...@@ -34,7 +34,7 @@ function c40009208.initial_effect(c) ...@@ -34,7 +34,7 @@ function c40009208.initial_effect(c)
e5:SetProperty(EFFECT_FLAG_CARD_TARGET) e5:SetProperty(EFFECT_FLAG_CARD_TARGET)
e5:SetType(EFFECT_TYPE_IGNITION) e5:SetType(EFFECT_TYPE_IGNITION)
e5:SetRange(LOCATION_SZONE) e5:SetRange(LOCATION_SZONE)
e5:SetCountLimit(1) e5:SetCountLimit(1,EFFECT_COUNT_CODE_SINGLE)
e5:SetCondition(c40009208.spcon1) e5:SetCondition(c40009208.spcon1)
e5:SetTarget(c40009208.sptg) e5:SetTarget(c40009208.sptg)
e5:SetOperation(c40009208.spop) e5:SetOperation(c40009208.spop)
...@@ -42,7 +42,6 @@ function c40009208.initial_effect(c) ...@@ -42,7 +42,6 @@ function c40009208.initial_effect(c)
local e6=e5:Clone() local e6=e5:Clone()
e6:SetType(EFFECT_TYPE_QUICK_O) e6:SetType(EFFECT_TYPE_QUICK_O)
e6:SetCode(EVENT_FREE_CHAIN) e6:SetCode(EVENT_FREE_CHAIN)
e6:SetHintTiming(0,TIMING_END_PHASE)
e6:SetCost(c40009208.negcost) e6:SetCost(c40009208.negcost)
e6:SetCondition(c40009208.spcon2) e6:SetCondition(c40009208.spcon2)
c:RegisterEffect(e6) c:RegisterEffect(e6)
...@@ -61,10 +60,10 @@ function c40009208.ctop(e,tp,eg,ep,ev,re,r,rp) ...@@ -61,10 +60,10 @@ function c40009208.ctop(e,tp,eg,ep,ev,re,r,rp)
e:GetHandler():AddCounter(0xf1c,2) e:GetHandler():AddCounter(0xf1c,2)
end end
function c40009208.spcon1(e,tp,eg,ep,ev,re,r,rp) function c40009208.spcon1(e,tp,eg,ep,ev,re,r,rp)
return not Duel.IsPlayerAffectedByEffect(tp,40009208) return not Duel.IsPlayerAffectedByEffect(tp,40009208) or (Duel.GetCurrentChain()<1 and Duel.IsPlayerAffectedByEffect(tp,40009208))
end end
function c40009208.spcon2(e,tp,eg,ep,ev,re,r,rp) function c40009208.spcon2(e,tp,eg,ep,ev,re,r,rp)
return Duel.IsPlayerAffectedByEffect(tp,40009208) return Duel.GetCurrentChain()>0 and Duel.IsPlayerAffectedByEffect(tp,40009208)
end end
function c40009208.filter1(c,e,tp) function c40009208.filter1(c,e,tp)
return c:IsFaceup() and Duel.IsExistingMatchingCard(c40009208.filter2,tp,LOCATION_EXTRA,0,1,nil,e,tp,c) and c:IsSetCard(0xf1c) and c:IsType(TYPE_PENDULUM) and aux.MustMaterialCheck(c,tp,EFFECT_MUST_BE_XMATERIAL) return c:IsFaceup() and Duel.IsExistingMatchingCard(c40009208.filter2,tp,LOCATION_EXTRA,0,1,nil,e,tp,c) and c:IsSetCard(0xf1c) and c:IsType(TYPE_PENDULUM) and aux.MustMaterialCheck(c,tp,EFFECT_MUST_BE_XMATERIAL)
......
...@@ -63,10 +63,10 @@ function c40009209.nnegcost(e,tp,eg,ep,ev,re,r,rp,chk) ...@@ -63,10 +63,10 @@ function c40009209.nnegcost(e,tp,eg,ep,ev,re,r,rp,chk)
Duel.RemoveCounter(tp,1,0,0xf2c,3,REASON_COST) Duel.RemoveCounter(tp,1,0,0xf2c,3,REASON_COST)
end end
function c40009209.setcon1(e,tp,eg,ep,ev,re,r,rp) function c40009209.setcon1(e,tp,eg,ep,ev,re,r,rp)
return not Duel.IsPlayerAffectedByEffect(tp,40009208) return not Duel.IsPlayerAffectedByEffect(tp,40009208) or (Duel.GetCurrentChain()<1 and Duel.IsPlayerAffectedByEffect(tp,40009208))
end end
function c40009209.setcon2(e,tp,eg,ep,ev,re,r,rp) function c40009209.setcon2(e,tp,eg,ep,ev,re,r,rp)
return Duel.IsPlayerAffectedByEffect(tp,40009208) return Duel.GetCurrentChain()>0 and Duel.IsPlayerAffectedByEffect(tp,40009208)
end end
function c40009209.cfilter(c) function c40009209.cfilter(c)
return c:IsAbleToGraveAsCost() return c:IsAbleToGraveAsCost()
...@@ -101,10 +101,10 @@ function c40009209.desop(e,tp,eg,ep,ev,re,r,rp) ...@@ -101,10 +101,10 @@ function c40009209.desop(e,tp,eg,ep,ev,re,r,rp)
end end
end end
function c40009209.tdcon1(e,tp,eg,ep,ev,re,r,rp) function c40009209.tdcon1(e,tp,eg,ep,ev,re,r,rp)
return not Duel.IsPlayerAffectedByEffect(tp,40009208) and e:GetHandler():GetFlagEffect(40009209)~=0 return (not Duel.IsPlayerAffectedByEffect(tp,40009208) or (Duel.GetCurrentChain()<1 and Duel.IsPlayerAffectedByEffect(tp,40009208))) and e:GetHandler():GetFlagEffect(40009209)~=0
end end
function c40009209.tdcon2(e,tp,eg,ep,ev,re,r,rp) function c40009209.tdcon2(e,tp,eg,ep,ev,re,r,rp)
return Duel.IsPlayerAffectedByEffect(tp,40009208) and e:GetHandler():GetFlagEffect(40009209)~=0 return Duel.GetCurrentChain()>0 and Duel.IsPlayerAffectedByEffect(tp,40009208) and e:GetHandler():GetFlagEffect(40009209)~=0
end end
function c40009209.tdfilter(c) function c40009209.tdfilter(c)
return c:IsAbleToDeck() return c:IsAbleToDeck()
......
--幻影狂风·暗魔
function c40009246.initial_effect(c)
--xyz summon
aux.AddXyzProcedure(c,c40009246.mfilter,7,3,c40009246.ovfilter,aux.Stringid(40009246,0),3,c40009246.xyzop)
--atk
local e2=Effect.CreateEffect(c)
e2:SetType(EFFECT_TYPE_SINGLE)
e2:SetCode(EFFECT_UPDATE_ATTACK)
e2:SetProperty(EFFECT_FLAG_SINGLE_RANGE)
e2:SetRange(LOCATION_MZONE)
e2:SetValue(2500)
e2:SetCondition(c40009246.atkcon)
c:RegisterEffect(e2)
--double
local e4=Effect.CreateEffect(c)
e4:SetType(EFFECT_TYPE_SINGLE)
e4:SetCode(EFFECT_CHANGE_BATTLE_DAMAGE)
e4:SetCondition(c40009246.atkcon)
e4:SetValue(aux.ChangeBattleDamage(1,DOUBLE_DAMAGE))
c:RegisterEffect(e4)
--spsummon
local e1=Effect.CreateEffect(c)
e1:SetDescription(aux.Stringid(40009246,0))
e1:SetCategory(CATEGORY_SPECIAL_SUMMON)
e1:SetType(EFFECT_TYPE_QUICK_O)
e1:SetCode(EVENT_FREE_CHAIN)
e1:SetRange(LOCATION_MZONE)
e1:SetCountLimit(1,40009246)
e1:SetCost(c40009246.tgcost)
e1:SetTarget(c40009246.tgtg)
e1:SetOperation(c40009246.tgop)
c:RegisterEffect(e1)
end
function c40009246.mfilter(c)
return c:IsAttribute(ATTRIBUTE_DARK)
end
function c40009246.ovfilter(c)
return c:IsFaceup() and c:IsType(TYPE_XYZ) and c:GetOverlayGroup():IsExists(Card.IsCode,1,nil,40009249)
end
function c40009246.xyzop(e,tp,chk)
if chk==0 then return Duel.GetFlagEffect(tp,40009246)==0 end
Duel.RegisterFlagEffect(tp,40009246,RESET_PHASE+PHASE_END,EFFECT_FLAG_OATH,1)
end
function c40009246.atkcon(e)
return e:GetHandler():GetOverlayGroup():IsExists(Card.IsCode,1,nil,40009247)
end
function c40009246.tgcost(e,tp,eg,ep,ev,re,r,rp,chk)
if chk==0 then return e:GetHandler():CheckRemoveOverlayCard(tp,1,REASON_COST) end
e:GetHandler():RemoveOverlayCard(tp,1,1,REASON_COST)
end
function c40009246.filter(c)
return c:IsType(TYPE_MONSTER)
end
function c40009246.spfilter(c,e,tp)
return c:IsSetCard(0xbf1d) and c:IsCanBeSpecialSummoned(e,0,tp,false,false)
end
function c40009246.tgtg(e,tp,eg,ep,ev,re,r,rp,chk)
if chk==0 then return Duel.GetLocationCount(tp,LOCATION_MZONE)>0
and Duel.IsExistingMatchingCard(c40009246.spfilter,tp,LOCATION_DECK,0,1,nil,e,tp) end
Duel.SetOperationInfo(0,CATEGORY_SPECIAL_SUMMON,nil,1,tp,LOCATION_DECK)
if Duel.IsExistingMatchingCard(c40009246.filter,tp,LOCATION_MZONE,0,1,nil) then
e:SetCategory(CATEGORY_TOGRAVE+CATEGORY_SPECIAL_SUMMON)
e:SetLabel(1)
else
e:SetCategory(CATEGORY_SPECIAL_SUMMON)
e:SetLabel(0)
end
end
function c40009246.tgop(e,tp,eg,ep,ev,re,r,rp)
local c=e:GetHandler()
if e:GetLabel()==1 and Duel.IsExistingMatchingCard(c40009246.filter,tp,LOCATION_MZONE,0,1,nil) and Duel.SelectYesNo(tp,aux.Stringid(40009246,1)) then
local g1=Duel.GetMatchingGroup(c40009246.filter,tp,LOCATION_MZONE,0,nil)
local g2=Duel.GetMatchingGroup(Card.IsAbleToGrave,tp,0,LOCATION_ONFIELD,nil)
if #g1>0 and #g2>0 then
Duel.Hint(HINT_SELECTMSG,tp,HINTMSG_TOGRAVE)
local sg1=g1:Select(tp,1,#g2,nil)
if Duel.SendtoGrave(sg1,REASON_EFFECT)~=0 and sg1:IsExists(Card.IsLocation,1,nil,LOCATION_GRAVE) then
local og1=Duel.GetOperatedGroup():Filter(Card.IsLocation,nil,LOCATION_GRAVE)
Duel.Hint(HINT_SELECTMSG,tp,HINTMSG_TOGRAVE)
local ct=0
if og1 and og1~=nil then
ct=og1:GetCount()
local sg2=Duel.SelectMatchingCard(1-tp,Card.IsAbleToGrave,tp,0,LOCATION_ONFIELD,ct,ct,nil)
Duel.SendtoGrave(sg2,REASON_EFFECT)
end
end
end
end
if Duel.GetLocationCount(tp,LOCATION_MZONE)<=0 then return end
Duel.Hint(HINT_SELECTMSG,tp,HINTMSG_SPSUMMON)
local g=Duel.SelectMatchingCard(tp,c40009246.spfilter,tp,LOCATION_DECK,0,1,1,nil,e,tp)
local tc=g:GetFirst()
if tc then
Duel.SpecialSummon(tc,0,tp,tp,false,false,POS_FACEUP)
local e1=Effect.CreateEffect(e:GetHandler())
e1:SetType(EFFECT_TYPE_SINGLE)
e1:SetCode(EFFECT_UPDATE_ATTACK)
e1:SetValue(2000)
e1:SetReset(RESET_EVENT+RESETS_STANDARD)
tc:RegisterEffect(e1)
end
Duel.SpecialSummonComplete()
end
--恶魂狂风·暗魔
function c40009247.initial_effect(c)
--xyz summon
aux.AddXyzProcedure(c,aux.FilterBoolFunction(Card.IsAttribute,ATTRIBUTE_DARK),7,2)
c:EnableReviveLimit()
--spsummon
local e1=Effect.CreateEffect(c)
e1:SetDescription(aux.Stringid(40009247,0))
e1:SetCategory(CATEGORY_TOGRAVE)
e1:SetType(EFFECT_TYPE_IGNITION)
e1:SetRange(LOCATION_MZONE)
e1:SetCountLimit(1,40009247)
e1:SetCost(c40009247.tgcost)
e1:SetTarget(c40009247.tgtg)
e1:SetOperation(c40009247.tgop)
c:RegisterEffect(e1)
--damage
local e2=Effect.CreateEffect(c)
e2:SetDescription(aux.Stringid(40009247,1))
e2:SetCategory(CATEGORY_DAMAGE)
e2:SetType(EFFECT_TYPE_IGNITION)
e2:SetRange(LOCATION_MZONE)
e2:SetCountLimit(1,40009248)
e2:SetProperty(EFFECT_FLAG_PLAYER_TARGET)
e2:SetCondition(c40009247.hspcon)
e2:SetTarget(c40009247.target)
e2:SetOperation(c40009247.operation)
c:RegisterEffect(e2)
--indes
local e3=Effect.CreateEffect(c)
e3:SetType(EFFECT_TYPE_SINGLE)
e3:SetProperty(EFFECT_FLAG_SINGLE_RANGE)
e3:SetRange(LOCATION_MZONE)
e3:SetCode(EFFECT_INDESTRUCTABLE_BATTLE)
e3:SetCondition(c40009247.indcon)
e3:SetValue(1)
c:RegisterEffect(e3)
local e4=e3:Clone()
e4:SetCode(EFFECT_INDESTRUCTABLE_EFFECT)
c:RegisterEffect(e4)
end
function c40009247.tgcost(e,tp,eg,ep,ev,re,r,rp,chk)
if chk==0 then return e:GetHandler():CheckRemoveOverlayCard(tp,1,REASON_COST) end
e:GetHandler():RemoveOverlayCard(tp,1,1,REASON_COST)
end
function c40009247.filter(c)
return c:IsType(TYPE_MONSTER)
end
function c40009247.tgtg(e,tp,eg,ep,ev,re,r,rp,chk)
if chk==0 then return Duel.IsExistingMatchingCard(c40009247.filter,tp,LOCATION_MZONE,0,1,nil) end
Duel.SetOperationInfo(0,CATEGORY_TOGRAVE,nil,1,tp,LOCATION_MZONE)
end
function c40009247.tgop(e,tp,eg,ep,ev,re,r,rp)
local c=e:GetHandler()
local g1=Duel.GetMatchingGroup(c40009247.filter,tp,LOCATION_MZONE,0,nil)
local g2=Duel.GetMatchingGroup(Card.IsAbleToGrave,tp,0,LOCATION_ONFIELD,nil)
if #g1>0 and (#g2>0 and #g2<4) then
Duel.Hint(HINT_SELECTMSG,tp,HINTMSG_TOGRAVE)
local sg1=g1:Select(tp,1,#g2,nil)
if Duel.SendtoGrave(sg1,REASON_EFFECT)~=0 and sg1:IsExists(Card.IsLocation,1,nil,LOCATION_GRAVE) then
local og1=Duel.GetOperatedGroup():Filter(Card.IsLocation,nil,LOCATION_GRAVE)
Duel.Hint(HINT_SELECTMSG,tp,HINTMSG_TOGRAVE)
local ct=0
if og1 and og1~=nil then
ct=og1:GetCount()
local sg2=Duel.SelectMatchingCard(1-tp,Card.IsAbleToGrave,tp,0,LOCATION_ONFIELD,ct,ct,nil)
Duel.SendtoGrave(sg2,REASON_EFFECT)
end
end
end
local e1=Effect.CreateEffect(c)
e1:SetType(EFFECT_TYPE_SINGLE)
e1:SetCode(EFFECT_UPDATE_ATTACK)
e1:SetValue(1500)
e1:SetReset(RESET_EVENT+RESETS_STANDARD+RESET_DISABLE+RESET_PHASE+PHASE_END)
c:RegisterEffect(e1)
end
function c40009247.hspcon(e,c)
return not Duel.IsExistingMatchingCard(Card.IsFaceup,tp,0,LOCATION_ONFIELD,1,nil)
end
function c40009247.target(e,tp,eg,ep,ev,re,r,rp,chk)
if chk==0 then return true end
Duel.SetTargetPlayer(1-tp)
Duel.SetTargetParam(1500)
Duel.SetOperationInfo(0,CATEGORY_DAMAGE,nil,0,1-tp,1500)
end
function c40009247.operation(e,tp,eg,ep,ev,re,r,rp)
local p,d=Duel.GetChainInfo(0,CHAININFO_TARGET_PLAYER,CHAININFO_TARGET_PARAM)
Duel.Damage(p,d,REASON_EFFECT)
end
function c40009247.indcon(e)
return e:GetHandler():GetOverlayGroup():IsExists(Card.IsCode,1,nil,40009249)
end
\ No newline at end of file
--暗黑狂风·暗魔
function c40009249.initial_effect(c)
--code
local e0=Effect.CreateEffect(c)
e0:SetType(EFFECT_TYPE_SINGLE)
e0:SetProperty(EFFECT_FLAG_SINGLE_RANGE)
e0:SetCode(EFFECT_CHANGE_CODE)
e0:SetRange(LOCATION_MZONE+LOCATION_GRAVE)
e0:SetValue(40009154)
c:RegisterEffect(e0)
--to grave
local e1=Effect.CreateEffect(c)
e1:SetDescription(aux.Stringid(40009249,0))
e1:SetCategory(CATEGORY_TOGRAVE)
e1:SetType(EFFECT_TYPE_SINGLE+EFFECT_TYPE_TRIGGER_O)
e1:SetProperty(EFFECT_FLAG_DELAY)
e1:SetCode(EVENT_SUMMON_SUCCESS)
e1:SetCountLimit(1,40009249)
e1:SetTarget(c40009249.tgtg)
e1:SetOperation(c40009249.tgop)
c:RegisterEffect(e1)
local e2=e1:Clone()
e2:SetCode(EVENT_SPSUMMON_SUCCESS)
c:RegisterEffect(e2)
--tograve
local e4=Effect.CreateEffect(c)
e4:SetDescription(aux.Stringid(40009249,1))
e4:SetCategory(CATEGORY_TOGRAVE)
e4:SetType(EFFECT_TYPE_QUICK_O)
e4:SetCode(EVENT_FREE_CHAIN)
e4:SetRange(LOCATION_MZONE)
e4:SetCountLimit(1,40009250)
e4:SetCondition(c40009249.tgcon1)
e4:SetTarget(c40009249.tgtg1)
e4:SetOperation(c40009249.tgop1)
c:RegisterEffect(e4)
end
function c40009249.tgfilter(c)
return c:IsType(TYPE_MONSTER) and (c:IsSetCard(0xcf1d) or c:IsSetCard(0xbf1d)) and c:IsAbleToGrave()
end
function c40009249.tgtg(e,tp,eg,ep,ev,re,r,rp,chk)
if chk==0 then return Duel.IsExistingMatchingCard(c40009249.tgfilter,tp,LOCATION_DECK,0,1,nil) end
Duel.SetOperationInfo(0,CATEGORY_TOGRAVE,nil,1,tp,LOCATION_DECK)
end
function c40009249.tgop(e,tp,eg,ep,ev,re,r,rp)
Duel.Hint(HINT_SELECTMSG,tp,HINTMSG_TOGRAVE)
local g=Duel.SelectMatchingCard(tp,c40009249.tgfilter,tp,LOCATION_DECK,0,1,1,nil)
if g:GetCount()>0 then
Duel.SendtoGrave(g,REASON_EFFECT)
end
end
function c40009249.tgcon1(e,tp,eg,ep,ev,re,r,rp)
return Duel.GetCurrentPhase()==PHASE_MAIN1 or Duel.GetCurrentPhase()==PHASE_MAIN2
end
function c40009249.tgtg1(e,tp,eg,ep,ev,re,r,rp,chk)
if chk==0 then return Duel.IsExistingMatchingCard(Card.IsAbleToGrave,tp,0,LOCATION_MZONE,1,nil) and Duel.GetFieldGroupCount(tp,LOCATION_HAND,0)>0 end
Duel.SetOperationInfo(0,CATEGORY_TOGRAVE,nil,1,tp,LOCATION_HAND)
Duel.SetOperationInfo(0,CATEGORY_TOGRAVE,nil,1,1-tp,LOCATION_MZONE)
end
function c40009249.tgop1(e,tp,eg,ep,ev,re,r,rp)
if Duel.GetFieldGroupCount(tp,LOCATION_HAND,0)<=0 then return end
Duel.Hint(HINT_SELECTMSG,tp,HINTMSG_TOGRAVE)
local sg=Duel.SelectMatchingCard(tp,Card.IsAbleToGrave,tp,LOCATION_HAND,0,1,1,nil)
if sg:GetCount()==0 then return end
if Duel.SendtoGrave(sg,REASON_EFFECT)==0 or not sg:GetFirst():IsLocation(LOCATION_GRAVE) then return end
Duel.Hint(HINT_SELECTMSG,1-tp,HINTMSG_TOGRAVE)
local g=Duel.SelectMatchingCard(1-tp,Card.IsAbleToGrave,tp,0,LOCATION_MZONE,1,1,nil)
if g:GetCount()>0 then
Duel.HintSelection(g)
Duel.SendtoGrave(g,REASON_EFFECT)
end
end
\ No newline at end of file
--狂风斧
function c40009251.initial_effect(c)
--to grave
local e1=Effect.CreateEffect(c)
e1:SetDescription(aux.Stringid(40009251,0))
e1:SetType(EFFECT_TYPE_SINGLE+EFFECT_TYPE_TRIGGER_O)
e1:SetProperty(EFFECT_FLAG_DELAY+EFFECT_FLAG_DAMAGE_STEP)
e1:SetCode(EVENT_SUMMON_SUCCESS)
e1:SetHintTiming(TIMING_DAMAGE_STEP,TIMING_DAMAGE_STEP+TIMINGS_CHECK_MONSTER)
e1:SetCountLimit(1,40009251)
e1:SetOperation(c40009251.atkop)
c:RegisterEffect(e1)
local e2=e1:Clone()
e2:SetCode(EVENT_SPSUMMON_SUCCESS)
c:RegisterEffect(e2)
--spsummon
local e3=Effect.CreateEffect(c)
e3:SetDescription(aux.Stringid(40009251,1))
e3:SetCategory(CATEGORY_SPECIAL_SUMMON)
e3:SetType(EFFECT_TYPE_SINGLE+EFFECT_TYPE_TRIGGER_O)
e3:SetProperty(EFFECT_FLAG_DAMAGE_STEP+EFFECT_FLAG_DELAY)
e3:SetCode(EVENT_TO_GRAVE)
e3:SetCountLimit(1,40009252)
e3:SetCondition(c40009251.spcon)
e3:SetTarget(c40009251.sptg)
e3:SetOperation(c40009251.spop)
c:RegisterEffect(e3)
end
function c40009251.tgfilter(c)
return (c:IsCode(40009154) and c:IsFaceup())
end
function c40009251.aspfilter(c,e,tp)
return c:IsCode(40009249) and c:IsCanBeSpecialSummoned(e,0,tp,false,false)
end
function c40009251.atkop(e,tp,eg,ep,ev,re,r,rp)
local e1=Effect.CreateEffect(e:GetHandler())
e1:SetType(EFFECT_TYPE_FIELD)
e1:SetCode(EFFECT_UPDATE_ATTACK)
e1:SetTargetRange(LOCATION_MZONE,0)
e1:SetValue(1000)
e1:SetReset(RESET_PHASE+PHASE_END)
Duel.RegisterEffect(e1,tp)
if not Duel.IsExistingMatchingCard(c40009251.tgfilter,tp,LOCATION_MZONE,0,1,nil) then
if Duel.GetLocationCount(tp,LOCATION_MZONE)<=0 then return end
local sg=Duel.GetMatchingGroup(c40009251.aspfilter,tp,LOCATION_DECK,0,nil,e,tp)
if sg:GetCount()>0 and Duel.SelectYesNo(tp,aux.Stringid(40009251,2)) then
Duel.BreakEffect()
Duel.Hint(HINT_SELECTMSG,tp,HINTMSG_SPSUMMON)
local tg=sg:Select(tp,1,1,nil)
Duel.SpecialSummon(tg,0,tp,tp,false,false,POS_FACEUP)
end
end
local e2=Effect.CreateEffect(e:GetHandler())
e2:SetType(EFFECT_TYPE_FIELD)
e2:SetCode(EFFECT_CANNOT_SPECIAL_SUMMON)
e2:SetProperty(EFFECT_FLAG_PLAYER_TARGET)
e2:SetTargetRange(1,0)
e2:SetTarget(c40009251.splimit)
e2:SetReset(RESET_PHASE+PHASE_END)
Duel.RegisterEffect(e2,tp)
end
function c40009251.splimit(e,c)
return not c:IsSetCard(0xbf1d) and c:IsLocation(LOCATION_EXTRA)
end
function c40009251.spcon(e,tp,eg,ep,ev,re,r,rp)
return e:GetHandler():IsReason(REASON_EFFECT)
end
function c40009251.sptg(e,tp,eg,ep,ev,re,r,rp,chk)
if chk==0 then return Duel.GetLocationCount(tp,LOCATION_MZONE)>0
and e:GetHandler():IsCanBeSpecialSummoned(e,0,tp,false,false,POS_FACEUP) end
Duel.SetOperationInfo(0,CATEGORY_SPECIAL_SUMMON,e:GetHandler(),1,0,0)
end
function c40009251.spop(e,tp,eg,ep,ev,re,r,rp)
local c=e:GetHandler()
if c:IsRelateToEffect(e) and Duel.SpecialSummon(c,0,tp,tp,false,false,POS_FACEUP)~=0 then
local e1=Effect.CreateEffect(c)
e1:SetType(EFFECT_TYPE_SINGLE)
e1:SetCode(EFFECT_LEAVE_FIELD_REDIRECT)
e1:SetProperty(EFFECT_FLAG_CANNOT_DISABLE)
e1:SetReset(RESET_EVENT+RESETS_REDIRECT)
e1:SetValue(LOCATION_REMOVED)
c:RegisterEffect(e1,true)
end
end
--狂风戈
function c40009253.initial_effect(c)
--search
local e1=Effect.CreateEffect(c)
e1:SetDescription(aux.Stringid(40009253,0))
e1:SetCategory(CATEGORY_TOHAND+CATEGORY_SEARCH)
e1:SetType(EFFECT_TYPE_IGNITION)
e1:SetRange(LOCATION_HAND)
e1:SetCountLimit(1,40009253)
e1:SetCost(c40009253.cost)
e1:SetTarget(c40009253.target)
e1:SetOperation(c40009253.operation)
c:RegisterEffect(e1)
--spsummon
local e3=Effect.CreateEffect(c)
e3:SetDescription(aux.Stringid(40009253,1))
e3:SetCategory(CATEGORY_DRAW)
e3:SetType(EFFECT_TYPE_SINGLE+EFFECT_TYPE_TRIGGER_O)
e3:SetProperty(EFFECT_FLAG_DAMAGE_STEP+EFFECT_FLAG_DELAY)
e3:SetCode(EVENT_TO_GRAVE)
e3:SetCountLimit(1,40009254)
e3:SetCondition(c40009253.spcon)
e3:SetTarget(c40009253.drtg)
e3:SetOperation(c40009253.drop)
c:RegisterEffect(e3)
end
function c40009253.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 c40009253.filter(c)
return c:IsSetCard(0xef1d) and c:IsType(TYPE_CONTINUOUS+TYPE_TRAP) and c:IsAbleToHand()
end
function c40009253.tgfilter(c)
return (c:IsCode(40009154) and c:IsFaceup())
end
function c40009253.aspfilter(c,e,tp)
return c:IsCode(40009249) and c:IsCanBeSpecialSummoned(e,0,tp,false,false)
end
function c40009253.target(e,tp,eg,ep,ev,re,r,rp,chk,chkc)
if chk==0 then return Duel.IsExistingMatchingCard(c40009253.filter,tp,LOCATION_DECK,0,1,nil) end
Duel.SetOperationInfo(0,CATEGORY_TOHAND,nil,1,tp,LOCATION_DECK)
end
function c40009253.operation(e,tp,eg,ep,ev,re,r,rp,chk)
Duel.Hint(HINT_SELECTMSG,tp,HINTMSG_ATOHAND)
local g=Duel.SelectMatchingCard(tp,c40009253.filter,tp,LOCATION_DECK,0,1,1,nil)
if g:GetCount()>0 then
Duel.SendtoHand(g,nil,REASON_EFFECT)
Duel.ConfirmCards(1-tp,g)
if not Duel.IsExistingMatchingCard(c40009253.tgfilter,tp,LOCATION_MZONE,0,1,nil) then
if Duel.GetLocationCount(tp,LOCATION_MZONE)<=0 then return end
local sg=Duel.GetMatchingGroup(c40009253.aspfilter,tp,LOCATION_HAND,0,nil,e,tp)
if sg:GetCount()>0 and Duel.SelectYesNo(tp,aux.Stringid(40009253,2)) then
Duel.BreakEffect()
Duel.Hint(HINT_SELECTMSG,tp,HINTMSG_SPSUMMON)
local tg=sg:Select(tp,1,1,nil)
Duel.SpecialSummon(tg,0,tp,tp,false,false,POS_FACEUP)
end
end
end
local e2=Effect.CreateEffect(e:GetHandler())
e2:SetType(EFFECT_TYPE_FIELD)
e2:SetCode(EFFECT_CANNOT_SPECIAL_SUMMON)
e2:SetProperty(EFFECT_FLAG_PLAYER_TARGET)
e2:SetTargetRange(1,0)
e2:SetTarget(c40009253.splimit)
e2:SetReset(RESET_PHASE+PHASE_END)
Duel.RegisterEffect(e2,tp)
end
function c40009253.splimit(e,c)
return not c:IsSetCard(0xbf1d) and c:IsLocation(LOCATION_EXTRA)
end
function c40009253.spcon(e,tp,eg,ep,ev,re,r,rp)
return e:GetHandler():IsReason(REASON_EFFECT)
end
function c40009253.drtg(e,tp,eg,ep,ev,re,r,rp,chk)
if chk==0 then return Duel.IsPlayerCanDraw(tp,1)
and Duel.IsPlayerCanDraw(1-tp,1) end
Duel.SetOperationInfo(0,CATEGORY_DRAW,nil,0,PLAYER_ALL,1)
end
function c40009253.drop(e,tp,eg,ep,ev,re,r,rp)
Duel.Draw(tp,1,REASON_EFFECT)
Duel.Draw(1-tp,1,REASON_EFFECT)
Duel.ShuffleHand(tp)
Duel.ShuffleHand(1-tp)
end
--狂风钺
function c40009255.initial_effect(c)
--spsummon1
local e1=Effect.CreateEffect(c)
e1:SetDescription(aux.Stringid(40009255,0))
e1:SetCategory(CATEGORY_SPECIAL_SUMMON)
e1:SetType(EFFECT_TYPE_IGNITION)
e1:SetRange(LOCATION_HAND)
e1:SetCountLimit(1,40009255)
e1:SetCondition(c40009255.spcon1)
e1:SetTarget(c40009255.sptg1)
e1:SetOperation(c40009255.spop1)
c:RegisterEffect(e1)
--tohand
local e2=Effect.CreateEffect(c)
e2:SetDescription(aux.Stringid(40009255,1))
e2:SetCategory(CATEGORY_TOHAND)
e2:SetType(EFFECT_TYPE_SINGLE+EFFECT_TYPE_TRIGGER_O)
e2:SetProperty(EFFECT_FLAG_DELAY)
e2:SetCode(EVENT_TO_GRAVE)
e2:SetCountLimit(1,40009256)
e2:SetCondition(c40009255.thcon)
e2:SetTarget(c40009255.thtg)
e2:SetOperation(c40009255.thop)
c:RegisterEffect(e2)
end
function c40009255.cfilter(c)
return c:IsFaceup() and c:IsSetCard(0xbf1d) and not c:IsCode(40009255)
end
function c40009255.tgfilter(c)
return (c:IsCode(40009154) and c:IsFaceup())
end
function c40009255.aspfilter(c,e,tp)
return c:IsOriginalCodeRule(40009249) and c:IsCanBeSpecialSummoned(e,0,tp,false,false)
end
function c40009255.spcon1(e,tp,eg,ep,ev,re,r,rp)
return Duel.IsExistingMatchingCard(c40009255.cfilter,tp,LOCATION_MZONE,0,1,nil)
end
function c40009255.sptg1(e,tp,eg,ep,ev,re,r,rp,chk)
if chk==0 then return Duel.GetLocationCount(tp,LOCATION_MZONE)>0
and e:GetHandler():IsCanBeSpecialSummoned(e,0,tp,false,false) end
Duel.SetOperationInfo(0,CATEGORY_SPECIAL_SUMMON,e:GetHandler(),1,0,0)
end
function c40009255.spop1(e,tp,eg,ep,ev,re,r,rp)
local c=e:GetHandler()
if not c:IsRelateToEffect(e) then return end
if Duel.SpecialSummon(c,0,tp,tp,false,false,POS_FACEUP)~=0 and not Duel.IsExistingMatchingCard(c40009255.tgfilter,tp,LOCATION_MZONE,0,1,nil) then
if Duel.GetLocationCount(tp,LOCATION_MZONE)<=0 then return end
local sg=Duel.GetMatchingGroup(aux.NecroValleyFilter(c40009255.aspfilter),tp,LOCATION_GRAVE,0,nil,e,tp)
if sg:GetCount()>0 and Duel.SelectYesNo(tp,aux.Stringid(40009255,2)) then
Duel.BreakEffect()
Duel.Hint(HINT_SELECTMSG,tp,HINTMSG_SPSUMMON)
local tg=sg:Select(tp,1,1,nil)
Duel.SpecialSummon(tg,0,tp,tp,false,false,POS_FACEUP)
end
end
local e2=Effect.CreateEffect(e:GetHandler())
e2:SetType(EFFECT_TYPE_FIELD)
e2:SetCode(EFFECT_CANNOT_SPECIAL_SUMMON)
e2:SetProperty(EFFECT_FLAG_PLAYER_TARGET)
e2:SetTargetRange(1,0)
e2:SetTarget(c40009255.splimit)
e2:SetReset(RESET_PHASE+PHASE_END)
Duel.RegisterEffect(e2,tp)
end
function c40009255.splimit(e,c)
return not c:IsSetCard(0xbf1d) and c:IsLocation(LOCATION_EXTRA)
end
function c40009255.thcon(e,tp,eg,ep,ev,re,r,rp)
return e:GetHandler():IsReason(REASON_EFFECT)
end
function c40009255.thtg(e,tp,eg,ep,ev,re,r,rp,chk)
if chk==0 then return e:GetHandler():IsAbleToHand() end
Duel.SetOperationInfo(0,CATEGORY_TOHAND,e:GetHandler(),1,0,0)
end
function c40009255.thop(e,tp,eg,ep,ev,re,r,rp)
local c=e:GetHandler()
if c:IsRelateToEffect(e) then
Duel.SendtoHand(c,nil,REASON_EFFECT)
Duel.ConfirmCards(1-tp,c)
end
end
--暗魔之黑锁炎舞阵
function c40009257.initial_effect(c)
--Activate
local e1=Effect.CreateEffect(c)
e1:SetType(EFFECT_TYPE_ACTIVATE)
e1:SetCode(EVENT_FREE_CHAIN)
c:RegisterEffect(e1)
--to hand
local e2=Effect.CreateEffect(c)
e2:SetDescription(aux.Stringid(40009257,1))
e2:SetCategory(CATEGORY_HANDES)
e2:SetType(EFFECT_TYPE_FIELD+EFFECT_TYPE_TRIGGER_O)
e2:SetProperty(EFFECT_FLAG_DELAY)
e2:SetCode(EVENT_SPSUMMON_SUCCESS)
e2:SetRange(LOCATION_SZONE)
e2:SetCountLimit(1,40009258)
e2:SetCondition(c40009257.thcon)
e2:SetTarget(c40009257.destg)
e2:SetOperation(c40009257.desop)
c:RegisterEffect(e2)
--activate Necrovalley
local e4=Effect.CreateEffect(c)
e4:SetDescription(aux.Stringid(40009257,0))
e4:SetCategory(CATEGORY_REMOVE)
e4:SetType(EFFECT_TYPE_QUICK_O)
e4:SetRange(LOCATION_SZONE)
e4:SetCode(EVENT_FREE_CHAIN)
e4:SetCountLimit(1,40009257)
e4:SetCondition(c40009257.accon)
e4:SetTarget(c40009257.rmtg)
e4:SetOperation(c40009257.rmop)
c:RegisterEffect(e4)
--act in hand
local e3=Effect.CreateEffect(c)
e3:SetType(EFFECT_TYPE_SINGLE)
e3:SetCode(EFFECT_TRAP_ACT_IN_HAND)
e3:SetCondition(c40009257.handcon)
c:RegisterEffect(e3)
end
function c40009257.cefilter(c)
return c:IsFaceup() and (c:IsCode(40009154) or c:IsCode(40009249))
end
function c40009257.handcon(e)
return Duel.IsExistingMatchingCard(c40009257.cefilter,e:GetHandlerPlayer(),LOCATION_MZONE,0,1,nil)
end
function c40009257.accon(e,tp,eg,ep,ev,re,r,rp)
return Duel.GetCurrentPhase()==PHASE_MAIN1 or Duel.GetCurrentPhase()==PHASE_MAIN2
end
function c40009257.rmtg(e,tp,eg,ep,ev,re,r,rp,chk)
if chk==0 then return true end
Duel.SetOperationInfo(0,CATEGORY_REMOVE,nil,1,tp,LOCATION_GRAVE)
end
function c40009257.rmop(e,tp,eg,ep,ev,re,r,rp,chk)
Duel.Hint(HINT_SELECTMSG,tp,HINTMSG_REMOVE)
local g=Duel.SelectMatchingCard(tp,Card.IsAbleToRemove,tp,LOCATION_GRAVE,LOCATION_GRAVE,1,1,nil)
if #g>0 then
Duel.Remove(g,POS_FACEUP,REASON_EFFECT)
end
end
function c40009257.cfilter(c,tp)
return c:IsFaceup() and (c:IsSetCard(0xcf1d) or c:IsCode(95474755)) and c:GetSummonPlayer()==tp
end
function c40009257.thcon(e,tp,eg,ep,ev,re,r,rp)
return eg:IsExists(c40009257.cfilter,1,nil,tp)
end
function c40009257.filter(c)
return c:IsFaceup() and c:IsCode(40009259)
end
function c40009257.destg(e,tp,eg,ep,ev,re,r,rp,chk)
local draw=Duel.IsExistingMatchingCard(c40009257.filter,tp,LOCATION_ONFIELD,0,1,nil)
if chk==0 then return Duel.GetFieldGroupCount(tp,0,LOCATION_HAND)>0 and (not draw or Duel.IsPlayerCanDraw(tp,1)) end
Duel.SetOperationInfo(0,CATEGORY_HANDES,0,0,1-tp,1)
if draw then
Duel.SetOperationInfo(0,CATEGORY_DRAW,nil,0,tp,1)
end
end
function c40009257.desop(e,tp,eg,ep,ev,re,r,rp)
local g=Duel.GetFieldGroup(tp,0,LOCATION_HAND,nil)
if g:GetCount()==0 then return end
local sg=g:RandomSelect(1-tp,1)
if Duel.SendtoGrave(sg,REASON_DISCARD+REASON_EFFECT)~=0 and Duel.IsExistingMatchingCard(c40009257.filter,tp,LOCATION_ONFIELD,0,1,nil) then
Duel.BreakEffect()
Duel.Draw(tp,1,REASON_EFFECT)
end
end
--狂风之黑锁灵舞阵
function c40009259.initial_effect(c)
--Activate
local e1=Effect.CreateEffect(c)
e1:SetType(EFFECT_TYPE_ACTIVATE)
e1:SetCode(EVENT_FREE_CHAIN)
c:RegisterEffect(e1)
--disable
local e2=Effect.CreateEffect(c)
e2:SetDescription(aux.Stringid(40009259,0))
e2:SetCategory(CATEGORY_DISABLE)
e2:SetType(EFFECT_TYPE_QUICK_O)
e2:SetCode(EVENT_FREE_CHAIN)
e2:SetRange(LOCATION_SZONE)
e2:SetProperty(EFFECT_FLAG_CARD_TARGET)
e2:SetHintTiming(0,TIMING_MAIN_END)
e2:SetCountLimit(1,40009259)
e2:SetCondition(c40009259.discon)
e2:SetTarget(c40009259.target)
e2:SetOperation(c40009259.operation)
c:RegisterEffect(e2)
--act in hand
local e3=Effect.CreateEffect(c)
e3:SetType(EFFECT_TYPE_SINGLE)
e3:SetCode(EFFECT_TRAP_ACT_IN_HAND)
e3:SetCondition(c40009259.handcon)
c:RegisterEffect(e3)
--to hand
local e4=Effect.CreateEffect(c)
e4:SetDescription(aux.Stringid(40009259,1))
e4:SetCategory(CATEGORY_HANDES)
e4:SetType(EFFECT_TYPE_FIELD+EFFECT_TYPE_TRIGGER_O)
e4:SetProperty(EFFECT_FLAG_DELAY)
e4:SetCode(EVENT_SPSUMMON_SUCCESS)
e4:SetRange(LOCATION_SZONE)
e4:SetCountLimit(1,40009258)
e4:SetCondition(c40009259.thcon)
e4:SetTarget(c40009259.destg)
e4:SetOperation(c40009259.desop)
c:RegisterEffect(e4)
end
function c40009259.cefilter(c)
return c:IsFaceup() and (c:IsCode(40009154) or c:IsCode(40009249))
end
function c40009259.handcon(e)
return Duel.IsExistingMatchingCard(c40009259.cefilter,e:GetHandlerPlayer(),LOCATION_MZONE,0,1,nil)
end
function c40009259.discon(e,tp,eg,ep,ev,re,r,rp)
return Duel.GetCurrentPhase()==PHASE_MAIN1 or Duel.GetCurrentPhase()==PHASE_MAIN2
end
function c40009259.target(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,LOCATION_ONFIELD,LOCATION_ONFIELD,1,nil) end
Duel.Hint(HINT_SELECTMSG,tp,HINTMSG_FACEUP)
local g=Duel.SelectTarget(tp,aux.disfilter1,tp,LOCATION_ONFIELD,LOCATION_ONFIELD,1,1,nil)
Duel.SetOperationInfo(0,CATEGORY_DISABLE,g,1,0,0)
end
function c40009259.operation(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
function c40009259.cfilter(c,tp)
return c:IsFaceup() and (c:IsSetCard(0xcf1d) or c:IsCode(95474755)) and c:GetSummonPlayer()==tp
end
function c40009259.thcon(e,tp,eg,ep,ev,re,r,rp)
return eg:IsExists(c40009259.cfilter,1,nil,tp)
end
function c40009259.filter(c)
return c:IsFaceup() and c:IsCode(40009257)
end
function c40009259.destg(e,tp,eg,ep,ev,re,r,rp,chk)
if chk==0 then return Duel.IsPlayerCanDiscardDeck(tp,1) end
end
function c40009259.desop(e,tp,eg,ep,ev,re,r,rp)
local e1=Effect.CreateEffect(e:GetHandler())
e1:SetType(EFFECT_TYPE_FIELD)
e1:SetCode(EFFECT_IMMUNE_EFFECT)
e1:SetProperty(EFFECT_FLAG_IGNORE_IMMUNE)
e1:SetTargetRange(LOCATION_MZONE,0)
e1:SetTarget(c40009259.target1)
e1:SetReset(RESET_PHASE+PHASE_END)
e1:SetValue(c40009259.efilter)
Duel.RegisterEffect(e1,tp)
if Duel.IsExistingMatchingCard(c40009259.filter,tp,LOCATION_ONFIELD,0,1,nil) then
Duel.BreakEffect()
Duel.DiscardDeck(tp,1,REASON_EFFECT)
end
end
function c40009259.target1(e,c)
return c:IsSetCard(0xcf1d)
end
function c40009259.efilter(e,re)
return e:GetOwnerPlayer()~=re:GetOwnerPlayer() and re:IsActiveType(TYPE_TRAP)
end
Markdown is supported
0% or
You are about to add 0 people to the discussion. Proceed with caution.
Finish editing this message first!
Please register or to comment