Commit 418a9185 authored by REIKAI's avatar REIKAI 💬

2022.9.13 reikai do

parent addc10e7
No preview for this file type
expansions/pics/10710001.jpg

13.3 KB | W: | H:

expansions/pics/10710001.jpg

65.9 KB | W: | H:

expansions/pics/10710001.jpg
expansions/pics/10710001.jpg
expansions/pics/10710001.jpg
expansions/pics/10710001.jpg
  • 2-up
  • Swipe
  • Onion skin
expansions/pics/10983003.jpg

150 KB | W: | H:

expansions/pics/10983003.jpg

78.2 KB | W: | H:

expansions/pics/10983003.jpg
expansions/pics/10983003.jpg
expansions/pics/10983003.jpg
expansions/pics/10983003.jpg
  • 2-up
  • Swipe
  • Onion skin
expansions/pics/10983004.jpg

166 KB | W: | H:

expansions/pics/10983004.jpg

90.2 KB | W: | H:

expansions/pics/10983004.jpg
expansions/pics/10983004.jpg
expansions/pics/10983004.jpg
expansions/pics/10983004.jpg
  • 2-up
  • Swipe
  • Onion skin
expansions/pics/14175006.jpg

139 KB | W: | H:

expansions/pics/14175006.jpg

75.7 KB | W: | H:

expansions/pics/14175006.jpg
expansions/pics/14175006.jpg
expansions/pics/14175006.jpg
expansions/pics/14175006.jpg
  • 2-up
  • Swipe
  • Onion skin
expansions/pics/17035220.jpg

148 KB | W: | H:

expansions/pics/17035220.jpg

100 KB | W: | H:

expansions/pics/17035220.jpg
expansions/pics/17035220.jpg
expansions/pics/17035220.jpg
expansions/pics/17035220.jpg
  • 2-up
  • Swipe
  • Onion skin
expansions/pics/17035310.jpg

56.7 KB | W: | H:

expansions/pics/17035310.jpg

103 KB | W: | H:

expansions/pics/17035310.jpg
expansions/pics/17035310.jpg
expansions/pics/17035310.jpg
expansions/pics/17035310.jpg
  • 2-up
  • Swipe
  • Onion skin
expansions/pics/20066024.jpg

152 KB | W: | H:

expansions/pics/20066024.jpg

83.2 KB | W: | H:

expansions/pics/20066024.jpg
expansions/pics/20066024.jpg
expansions/pics/20066024.jpg
expansions/pics/20066024.jpg
  • 2-up
  • Swipe
  • Onion skin
expansions/pics/20066025.jpg

182 KB | W: | H:

expansions/pics/20066025.jpg

79.2 KB | W: | H:

expansions/pics/20066025.jpg
expansions/pics/20066025.jpg
expansions/pics/20066025.jpg
expansions/pics/20066025.jpg
  • 2-up
  • Swipe
  • Onion skin
expansions/pics/20066026.jpg

159 KB | W: | H:

expansions/pics/20066026.jpg

87.4 KB | W: | H:

expansions/pics/20066026.jpg
expansions/pics/20066026.jpg
expansions/pics/20066026.jpg
expansions/pics/20066026.jpg
  • 2-up
  • Swipe
  • Onion skin
expansions/pics/20066036.jpg

163 KB | W: | H:

expansions/pics/20066036.jpg

93.6 KB | W: | H:

expansions/pics/20066036.jpg
expansions/pics/20066036.jpg
expansions/pics/20066036.jpg
expansions/pics/20066036.jpg
  • 2-up
  • Swipe
  • Onion skin
expansions/pics/24865310.jpg

12.3 KB | W: | H:

expansions/pics/24865310.jpg

18.4 KB | W: | H:

expansions/pics/24865310.jpg
expansions/pics/24865310.jpg
expansions/pics/24865310.jpg
expansions/pics/24865310.jpg
  • 2-up
  • Swipe
  • Onion skin
expansions/pics/24865311.jpg

11.8 KB | W: | H:

expansions/pics/24865311.jpg

17.9 KB | W: | H:

expansions/pics/24865311.jpg
expansions/pics/24865311.jpg
expansions/pics/24865311.jpg
expansions/pics/24865311.jpg
  • 2-up
  • Swipe
  • Onion skin
expansions/pics/24865312.jpg

10.6 KB | W: | H:

expansions/pics/24865312.jpg

16 KB | W: | H:

expansions/pics/24865312.jpg
expansions/pics/24865312.jpg
expansions/pics/24865312.jpg
expansions/pics/24865312.jpg
  • 2-up
  • Swipe
  • Onion skin
expansions/pics/24865313.jpg

12.8 KB | W: | H:

expansions/pics/24865313.jpg

19.2 KB | W: | H:

expansions/pics/24865313.jpg
expansions/pics/24865313.jpg
expansions/pics/24865313.jpg
expansions/pics/24865313.jpg
  • 2-up
  • Swipe
  • Onion skin
expansions/pics/24865314.jpg

15.1 KB | W: | H:

expansions/pics/24865314.jpg

22.6 KB | W: | H:

expansions/pics/24865314.jpg
expansions/pics/24865314.jpg
expansions/pics/24865314.jpg
expansions/pics/24865314.jpg
  • 2-up
  • Swipe
  • Onion skin
expansions/pics/24865315.jpg

15.3 KB | W: | H:

expansions/pics/24865315.jpg

22.7 KB | W: | H:

expansions/pics/24865315.jpg
expansions/pics/24865315.jpg
expansions/pics/24865315.jpg
expansions/pics/24865315.jpg
  • 2-up
  • Swipe
  • Onion skin
expansions/pics/24865316.jpg

15.1 KB | W: | H:

expansions/pics/24865316.jpg

22.4 KB | W: | H:

expansions/pics/24865316.jpg
expansions/pics/24865316.jpg
expansions/pics/24865316.jpg
expansions/pics/24865316.jpg
  • 2-up
  • Swipe
  • Onion skin
expansions/pics/24865317.jpg

14.1 KB | W: | H:

expansions/pics/24865317.jpg

21 KB | W: | H:

expansions/pics/24865317.jpg
expansions/pics/24865317.jpg
expansions/pics/24865317.jpg
expansions/pics/24865317.jpg
  • 2-up
  • Swipe
  • Onion skin
expansions/pics/24865318.jpg

14.3 KB | W: | H:

expansions/pics/24865318.jpg

21.3 KB | W: | H:

expansions/pics/24865318.jpg
expansions/pics/24865318.jpg
expansions/pics/24865318.jpg
expansions/pics/24865318.jpg
  • 2-up
  • Swipe
  • Onion skin
expansions/pics/24865320.jpg

14.9 KB | W: | H:

expansions/pics/24865320.jpg

22 KB | W: | H:

expansions/pics/24865320.jpg
expansions/pics/24865320.jpg
expansions/pics/24865320.jpg
expansions/pics/24865320.jpg
  • 2-up
  • Swipe
  • Onion skin
expansions/pics/24865321.jpg

15.1 KB | W: | H:

expansions/pics/24865321.jpg

22.4 KB | W: | H:

expansions/pics/24865321.jpg
expansions/pics/24865321.jpg
expansions/pics/24865321.jpg
expansions/pics/24865321.jpg
  • 2-up
  • Swipe
  • Onion skin
expansions/pics/24865322.jpg

11.6 KB | W: | H:

expansions/pics/24865322.jpg

17.3 KB | W: | H:

expansions/pics/24865322.jpg
expansions/pics/24865322.jpg
expansions/pics/24865322.jpg
expansions/pics/24865322.jpg
  • 2-up
  • Swipe
  • Onion skin
expansions/pics/24865323.jpg

15.8 KB | W: | H:

expansions/pics/24865323.jpg

22.9 KB | W: | H:

expansions/pics/24865323.jpg
expansions/pics/24865323.jpg
expansions/pics/24865323.jpg
expansions/pics/24865323.jpg
  • 2-up
  • Swipe
  • Onion skin
expansions/pics/24865324.jpg

11.7 KB | W: | H:

expansions/pics/24865324.jpg

80.5 KB | W: | H:

expansions/pics/24865324.jpg
expansions/pics/24865324.jpg
expansions/pics/24865324.jpg
expansions/pics/24865324.jpg
  • 2-up
  • Swipe
  • Onion skin
expansions/pics/24865331.jpg

13.4 KB | W: | H:

expansions/pics/24865331.jpg

73.3 KB | W: | H:

expansions/pics/24865331.jpg
expansions/pics/24865331.jpg
expansions/pics/24865331.jpg
expansions/pics/24865331.jpg
  • 2-up
  • Swipe
  • Onion skin
expansions/pics/24865340.jpg

13.9 KB | W: | H:

expansions/pics/24865340.jpg

20.5 KB | W: | H:

expansions/pics/24865340.jpg
expansions/pics/24865340.jpg
expansions/pics/24865340.jpg
expansions/pics/24865340.jpg
  • 2-up
  • Swipe
  • Onion skin
expansions/pics/30005130.jpg

56.7 KB | W: | H:

expansions/pics/30005130.jpg

95.3 KB | W: | H:

expansions/pics/30005130.jpg
expansions/pics/30005130.jpg
expansions/pics/30005130.jpg
expansions/pics/30005130.jpg
  • 2-up
  • Swipe
  • Onion skin
expansions/pics/33381018.jpg

141 KB | W: | H:

expansions/pics/33381018.jpg

93.1 KB | W: | H:

expansions/pics/33381018.jpg
expansions/pics/33381018.jpg
expansions/pics/33381018.jpg
expansions/pics/33381018.jpg
  • 2-up
  • Swipe
  • Onion skin
expansions/pics/51300081.jpg

12.9 KB | W: | H:

expansions/pics/51300081.jpg

17.9 KB | W: | H:

expansions/pics/51300081.jpg
expansions/pics/51300081.jpg
expansions/pics/51300081.jpg
expansions/pics/51300081.jpg
  • 2-up
  • Swipe
  • Onion skin
expansions/pics/66914000.jpg

53.9 KB | W: | H:

expansions/pics/66914000.jpg

83.3 KB | W: | H:

expansions/pics/66914000.jpg
expansions/pics/66914000.jpg
expansions/pics/66914000.jpg
expansions/pics/66914000.jpg
  • 2-up
  • Swipe
  • Onion skin
expansions/pics/66914001.jpg

60.1 KB | W: | H:

expansions/pics/66914001.jpg

90.5 KB | W: | H:

expansions/pics/66914001.jpg
expansions/pics/66914001.jpg
expansions/pics/66914001.jpg
expansions/pics/66914001.jpg
  • 2-up
  • Swipe
  • Onion skin
expansions/pics/66914005.jpg

62.6 KB | W: | H:

expansions/pics/66914005.jpg

94.2 KB | W: | H:

expansions/pics/66914005.jpg
expansions/pics/66914005.jpg
expansions/pics/66914005.jpg
expansions/pics/66914005.jpg
  • 2-up
  • Swipe
  • Onion skin
expansions/pics/66914009.jpg

64.9 KB | W: | H:

expansions/pics/66914009.jpg

91.8 KB | W: | H:

expansions/pics/66914009.jpg
expansions/pics/66914009.jpg
expansions/pics/66914009.jpg
expansions/pics/66914009.jpg
  • 2-up
  • Swipe
  • Onion skin
expansions/pics/67210104.jpg

11.9 KB | W: | H:

expansions/pics/67210104.jpg

15.2 KB | W: | H:

expansions/pics/67210104.jpg
expansions/pics/67210104.jpg
expansions/pics/67210104.jpg
expansions/pics/67210104.jpg
  • 2-up
  • Swipe
  • Onion skin
expansions/pics/67210106.jpg

14.4 KB | W: | H:

expansions/pics/67210106.jpg

18.4 KB | W: | H:

expansions/pics/67210106.jpg
expansions/pics/67210106.jpg
expansions/pics/67210106.jpg
expansions/pics/67210106.jpg
  • 2-up
  • Swipe
  • Onion skin
expansions/pics/67210108.jpg

13.9 KB | W: | H:

expansions/pics/67210108.jpg

17.8 KB | W: | H:

expansions/pics/67210108.jpg
expansions/pics/67210108.jpg
expansions/pics/67210108.jpg
expansions/pics/67210108.jpg
  • 2-up
  • Swipe
  • Onion skin
expansions/pics/81026000.jpg

171 KB | W: | H:

expansions/pics/81026000.jpg

88.4 KB | W: | H:

expansions/pics/81026000.jpg
expansions/pics/81026000.jpg
expansions/pics/81026000.jpg
expansions/pics/81026000.jpg
  • 2-up
  • Swipe
  • Onion skin
expansions/pics/81026001.jpg

158 KB | W: | H:

expansions/pics/81026001.jpg

75 KB | W: | H:

expansions/pics/81026001.jpg
expansions/pics/81026001.jpg
expansions/pics/81026001.jpg
expansions/pics/81026001.jpg
  • 2-up
  • Swipe
  • Onion skin
expansions/pics/81026002.jpg

151 KB | W: | H:

expansions/pics/81026002.jpg

76.3 KB | W: | H:

expansions/pics/81026002.jpg
expansions/pics/81026002.jpg
expansions/pics/81026002.jpg
expansions/pics/81026002.jpg
  • 2-up
  • Swipe
  • Onion skin
expansions/pics/81026003.jpg

144 KB | W: | H:

expansions/pics/81026003.jpg

79.1 KB | W: | H:

expansions/pics/81026003.jpg
expansions/pics/81026003.jpg
expansions/pics/81026003.jpg
expansions/pics/81026003.jpg
  • 2-up
  • Swipe
  • Onion skin
expansions/pics/81026004.jpg

52.5 KB | W: | H:

expansions/pics/81026004.jpg

80.2 KB | W: | H:

expansions/pics/81026004.jpg
expansions/pics/81026004.jpg
expansions/pics/81026004.jpg
expansions/pics/81026004.jpg
  • 2-up
  • Swipe
  • Onion skin
expansions/pics/81026005.jpg

141 KB | W: | H:

expansions/pics/81026005.jpg

74.9 KB | W: | H:

expansions/pics/81026005.jpg
expansions/pics/81026005.jpg
expansions/pics/81026005.jpg
expansions/pics/81026005.jpg
  • 2-up
  • Swipe
  • Onion skin
expansions/pics/81026006.jpg

124 KB | W: | H:

expansions/pics/81026006.jpg

79.3 KB | W: | H:

expansions/pics/81026006.jpg
expansions/pics/81026006.jpg
expansions/pics/81026006.jpg
expansions/pics/81026006.jpg
  • 2-up
  • Swipe
  • Onion skin
expansions/pics/81026070.jpg

152 KB | W: | H:

expansions/pics/81026070.jpg

72.8 KB | W: | H:

expansions/pics/81026070.jpg
expansions/pics/81026070.jpg
expansions/pics/81026070.jpg
expansions/pics/81026070.jpg
  • 2-up
  • Swipe
  • Onion skin
expansions/pics/81026071.jpg

62.2 KB | W: | H:

expansions/pics/81026071.jpg

77.4 KB | W: | H:

expansions/pics/81026071.jpg
expansions/pics/81026071.jpg
expansions/pics/81026071.jpg
expansions/pics/81026071.jpg
  • 2-up
  • Swipe
  • Onion skin
expansions/pics/81026072.jpg

62.7 KB | W: | H:

expansions/pics/81026072.jpg

66.5 KB | W: | H:

expansions/pics/81026072.jpg
expansions/pics/81026072.jpg
expansions/pics/81026072.jpg
expansions/pics/81026072.jpg
  • 2-up
  • Swipe
  • Onion skin
expansions/pics/81041046.jpg

71.4 KB | W: | H:

expansions/pics/81041046.jpg

94 KB | W: | H:

expansions/pics/81041046.jpg
expansions/pics/81041046.jpg
expansions/pics/81041046.jpg
expansions/pics/81041046.jpg
  • 2-up
  • Swipe
  • Onion skin
expansions/pics/81046021.jpg

115 KB | W: | H:

expansions/pics/81046021.jpg

84.6 KB | W: | H:

expansions/pics/81046021.jpg
expansions/pics/81046021.jpg
expansions/pics/81046021.jpg
expansions/pics/81046021.jpg
  • 2-up
  • Swipe
  • Onion skin
expansions/pics/81046024.jpg

122 KB | W: | H:

expansions/pics/81046024.jpg

89.3 KB | W: | H:

expansions/pics/81046024.jpg
expansions/pics/81046024.jpg
expansions/pics/81046024.jpg
expansions/pics/81046024.jpg
  • 2-up
  • Swipe
  • Onion skin
expansions/pics/96001060.jpg

11.9 KB | W: | H:

expansions/pics/96001060.jpg

19.5 KB | W: | H:

expansions/pics/96001060.jpg
expansions/pics/96001060.jpg
expansions/pics/96001060.jpg
expansions/pics/96001060.jpg
  • 2-up
  • Swipe
  • Onion skin
expansions/pics/96001061.jpg

14.1 KB | W: | H:

expansions/pics/96001061.jpg

23.3 KB | W: | H:

expansions/pics/96001061.jpg
expansions/pics/96001061.jpg
expansions/pics/96001061.jpg
expansions/pics/96001061.jpg
  • 2-up
  • Swipe
  • Onion skin
expansions/pics/96001062.jpg

13.6 KB | W: | H:

expansions/pics/96001062.jpg

22.2 KB | W: | H:

expansions/pics/96001062.jpg
expansions/pics/96001062.jpg
expansions/pics/96001062.jpg
expansions/pics/96001062.jpg
  • 2-up
  • Swipe
  • Onion skin
expansions/pics/96001063.jpg

13 KB | W: | H:

expansions/pics/96001063.jpg

21.7 KB | W: | H:

expansions/pics/96001063.jpg
expansions/pics/96001063.jpg
expansions/pics/96001063.jpg
expansions/pics/96001063.jpg
  • 2-up
  • Swipe
  • Onion skin
expansions/pics/96001064.jpg

12.2 KB | W: | H:

expansions/pics/96001064.jpg

20.5 KB | W: | H:

expansions/pics/96001064.jpg
expansions/pics/96001064.jpg
expansions/pics/96001064.jpg
expansions/pics/96001064.jpg
  • 2-up
  • Swipe
  • Onion skin
expansions/pics/96001065.jpg

11.9 KB | W: | H:

expansions/pics/96001065.jpg

19.9 KB | W: | H:

expansions/pics/96001065.jpg
expansions/pics/96001065.jpg
expansions/pics/96001065.jpg
expansions/pics/96001065.jpg
  • 2-up
  • Swipe
  • Onion skin
expansions/pics/96001066.jpg

14 KB | W: | H:

expansions/pics/96001066.jpg

23.5 KB | W: | H:

expansions/pics/96001066.jpg
expansions/pics/96001066.jpg
expansions/pics/96001066.jpg
expansions/pics/96001066.jpg
  • 2-up
  • Swipe
  • Onion skin
expansions/pics/98609000.jpg

158 KB | W: | H:

expansions/pics/98609000.jpg

93 KB | W: | H:

expansions/pics/98609000.jpg
expansions/pics/98609000.jpg
expansions/pics/98609000.jpg
expansions/pics/98609000.jpg
  • 2-up
  • Swipe
  • Onion skin
expansions/pics/98609001.jpg

163 KB | W: | H:

expansions/pics/98609001.jpg

86.6 KB | W: | H:

expansions/pics/98609001.jpg
expansions/pics/98609001.jpg
expansions/pics/98609001.jpg
expansions/pics/98609001.jpg
  • 2-up
  • Swipe
  • Onion skin
expansions/pics/field/19000180.jpg

74.7 KB | W: | H:

expansions/pics/field/19000180.jpg

79.4 KB | W: | H:

expansions/pics/field/19000180.jpg
expansions/pics/field/19000180.jpg
expansions/pics/field/19000180.jpg
expansions/pics/field/19000180.jpg
  • 2-up
  • Swipe
  • Onion skin
......@@ -505,9 +505,6 @@ function future.lv4(c,m)
e1:SetCondition(future.ntcon)
e1:SetOperation(future.ntop)
c:RegisterEffect(e1)
local e2=e1:Clone()
e2:SetCode(EFFECT_SET_PROC)
c:RegisterEffect(e2)
end
function future.ntcon(e,c,minc)
if c==nil then return true end
......@@ -550,70 +547,27 @@ function future.effect(c,m)
end)
return e1
end
----------------------------------------------------异夕光物--------------------------------------------------
yixi={}
yixi.loaded_metatable_list={}
function yixi.load_metatable(code)
local m1=_G["c"..code]
if m1 then return m1 end
local m2=yixi.loaded_metatable_list[code]
if m2 then return m2 end
_G["c"..code]={}
if pcall(function() dofile("expansions/script/c"..code..".lua") end) or pcall(function() dofile("script/c"..code..".lua") end) then
local mt=_G["c"..code]
_G["c"..code]=nil
if mt then
yixi.loaded_metatable_list[code]=mt
return mt
end
else
_G["c"..code]=nil
end
end
--SpecialSummon self
function yixi.spself(c,m,count)
--cannot special summon
local e1=Effect.CreateEffect(c)
e1:SetType(EFFECT_TYPE_SINGLE)
e1:SetProperty(EFFECT_FLAG_CANNOT_DISABLE+EFFECT_FLAG_UNCOPYABLE)
e1:SetCode(EFFECT_SPSUMMON_CONDITION)
c:RegisterEffect(e1)
--special summon
local e2=Effect.CreateEffect(c)
e2:SetType(EFFECT_TYPE_FIELD)
e2:SetCode(EFFECT_SPSUMMON_PROC)
e2:SetProperty(EFFECT_FLAG_CANNOT_DISABLE+EFFECT_FLAG_UNCOPYABLE)
e2:SetRange(LOCATION_HAND)
e2:SetLabel(count)
e2:SetCondition(yixi.spcon)
e2:SetOperation(yixi.spop)
c:RegisterEffect(e2)
return e1,e2
end
function yixi.spfilter(c)
return c:IsSetCard(0xa01) and c:IsType(TYPE_MONSTER) and c:IsReleasable() and not c:IsCode(51300051)
end
function yixi.spcon(e,c)
if c==nil then return true end
local tp=c:GetControler()
local ct=e:GetLabel()
return Duel.GetLocationCount(tp,LOCATION_MZONE)>0
and Duel.IsExistingMatchingCard(yixi.spfilter,tp,LOCATION_HAND,0,ct,c)
-----------------------------------------black order-------------------------------------------------
bo=bo or {}
function bo.base(c,m)
c:EnableCounterPermit(0x50a)
--act limit
local e3=Effect.CreateEffect(c)
e3:SetType(EFFECT_TYPE_SINGLE)
e3:SetCode(EFFECT_CANNOT_TRIGGER)
e3:SetRange(LOCATION_MZONE)
e3:SetCondition(bo.base_condition)
e3:SetValue(1)
c:RegisterEffect(e3)
return e3
end
function yixi.spop(e,tp,eg,ep,ev,re,r,rp,c)
local ct=e:GetLabel()
Duel.Hint(HINT_SELECTMSG,tp,HINTMSG_RELEASE)
local g=Duel.SelectMatchingCard(tp,yixi.spfilter,tp,LOCATION_HAND,0,ct,ct,c)
Duel.Release(g,REASON_COST)
function bo.base_condition(e,tp,eg,ep,ev,re,r,rp)
return e:GetHandler():GetCounter(0x50a)>0
end
--when Release
function yixi.released(c,m)
--cannot special summon
local e1=Effect.CreateEffect(c)
e1:SetDescription(aux.Stringid(m,1))
e1:SetType(EFFECT_TYPE_SINGLE+EFFECT_TYPE_TRIGGER_F)
e1:SetCode(EVENT_RELEASE)
return e1
function bo.base_cost(e,tp,eg,ep,ev,re,r,rp,chk)
local c=e:GetHandler()
if chk==0 then return c:IsCanAddCounter(0x50a,1) end
c:AddCounter(0x50a,1)
end
------------------------------------------------------伴生双子------------------------------------------
twins=twins or {}
......
......@@ -2,132 +2,132 @@
local m=10710001
local cm=_G["c"..m]
function cm.initial_effect(c)
--ntr
--summon self
local e1=Effect.CreateEffect(c)
e1:SetDescription(aux.Stringid(m,0))
e1:SetCategory(CATEGORY_SPECIAL_SUMMON+CATEGORY_DISABLE)
e1:SetCategory(CATEGORY_TOHAND+CATEGORY_SEARCH+CATEGORY_SPECIAL_SUMMON)
e1:SetType(EFFECT_TYPE_FIELD+EFFECT_TYPE_TRIGGER_O)
e1:SetRange(LOCATION_HAND)
e1:SetCode(EVENT_SPSUMMON_SUCCESS)
e1:SetProperty(EFFECT_FLAG_CARD_TARGET+EFFECT_FLAG_DELAY)
e1:SetProperty(EFFECT_FLAG_DELAY+EFFECT_FLAG_CARD_TARGET)
e1:SetRange(LOCATION_HAND)
e1:SetCountLimit(1,m)
e1:SetCondition(cm.ntrcon)
e1:SetCost(cm.ntrcost)
e1:SetTarget(cm.ntrtg)
e1:SetOperation(cm.ntrop)
c:RegisterEffect(e1)
--lv
e1:SetCost(cm.spcost)
e1:SetTarget(cm.sptg)
e1:SetOperation(cm.spop)
c:RegisterEffect(e1)
--to hand
local e2=Effect.CreateEffect(c)
e2:SetDescription(aux.Stringid(m,1))
e2:SetCategory(CATEGORY_SEARCH+CATEGORY_TOHAND)
e2:SetType(EFFECT_TYPE_SINGLE+EFFECT_TYPE_TRIGGER_O)
e2:SetProperty(EFFECT_FLAG_DELAY)
e2:SetCode(EVENT_SPSUMMON_SUCCESS)
e2:SetCountLimit(1,m+1)
e2:SetTarget(cm.lvtg)
e2:SetOperation(cm.lvop)
c:RegisterEffect(e2)
end
--ntr
function cm.cfilter(c,tp)
return c:IsSummonPlayer(1-tp)
end
function cm.ntrcon(e,tp,eg,ep,ev,re,r,rp)
return eg:IsExists(cm.cfilter,1,nil,tp)
end
function cm.ntrcost(e,tp,eg,ep,ev,re,r,rp,chk)
e2:SetTarget(cm.thtg)
e2:SetOperation(cm.thop)
c:RegisterEffect(e2)
--draw and Recover
local e3=Effect.CreateEffect(c)
e3:SetDescription(aux.Stringid(m,1))
e3:SetCategory(CATEGORY_DRAW+CATEGORY_RECOVER)
e3:SetType(EFFECT_TYPE_FIELD+EFFECT_TYPE_TRIGGER_O)
e3:SetCode(EVENT_CHAINING)
e3:SetRange(LOCATION_GRAVE)
e3:SetProperty(EFFECT_FLAG_PLAYER_TARGET+EFFECT_FLAG_DELAY)
e3:SetCost(aux.bfgcost)
e3:SetCondition(cm.drcon)
e3:SetTarget(cm.drtg)
e3:SetOperation(cm.drop)
c:RegisterEffect(e3)
end
--tohand or SpecialSummon
function cm.spcost(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 cm.nfilter(c)
return c:IsSummonType(SUMMON_TYPE_SPECIAL)
function cm.cfilter(c,tp)
return c:IsControler(tp) and c:IsLocation(LOCATION_MZONE) and c:IsSummonType(SUMMON_TYPE_SPECIAL)
end
function cm.ntrtg(e,tp,eg,ep,ev,re,r,rp,chk,chkc)
if chkc then return chkc:IsLocation(LOCATION_MZONE) and chkc:IsControler(1-tp) and cm.nfilter(chkc) end
if chk==0 then return Duel.IsExistingTarget(cm.nfilter,tp,0,LOCATION_MZONE,1,nil) end
function cm.sptg(e,tp,eg,ep,ev,re,r,rp,chk,chkc)
if chkc then return eg:IsContains(chkc) and cm.cfilter(chkc,1-tp) end
if chk==0 then return e:GetHandler():IsCanBeSpecialSummoned(e,0,tp,false,false)
and Duel.GetLocationCount(tp,LOCATION_MZONE)>0
and eg:IsExists(cm.cfilter,1,nil,1-tp) end
Duel.Hint(HINT_SELECTMSG,tp,HINTMSG_OPERATECARD)
Duel.SelectTarget(tp,cm.nfilter,tp,0,LOCATION_MZONE,1,1,nil)
local g=eg:FilterSelect(tp,cm.cfilter,1,1,nil,1-tp)
Duel.SetTargetCard(g)
Duel.SetOperationInfo(0,CATEGORY_TOHAND,nil,2,tp,LOCATION_DECK)
end
function cm.spfilter(c,e,tp,code)
return c:IsCode(code) and c:IsCanBeSpecialSummoned(e,0,tp,false,false,POS_FACEUP,1-tp)
function cm.thcfilter(c,code,tp)
return c:IsAbleToHand(tp) and c:IsCode(code)
end
function cm.ntrop(e,tp,eg,ep,ev,re,r,rp)
local c=e:GetHandler()
function cm.spop(e,tp,eg,ep,ev,re,r,rp)
local tc=Duel.GetFirstTarget()
local code=tc:GetCode()
if tc:IsRelateToEffect(e) then
if Duel.GetLocationCount(tp,LOCATION_MZONE)>0 and Duel.IsExistingMatchingCard(cm.spfilter,1-tp,LOCATION_EXTRA+LOCATION_DECK,0,1,nil,e,1-tp,code) then
Duel.Hint(HINT_SELECTMSG,1-tp,HINTMSG_SPSUMMON)
local g=Duel.SelectMatchingCard(1-tp,cm.spfilter,1-tp,LOCATION_EXTRA+LOCATION_DECK,0,1,1,nil,e,1-tp,code)
Duel.SpecialSummon(g,0,1-tp,tp,false,false,POS_FACEUP)
else
local e1=Effect.CreateEffect(c)
e1:SetType(EFFECT_TYPE_FIELD)
e1:SetCode(EFFECT_DISABLE)
e1:SetTargetRange(LOCATION_MZONE,LOCATION_MZONE)
e1:SetTarget(cm.distg)
e1:SetLabelObject(tc)
e1:SetReset(RESET_PHASE+PHASE_END)
Duel.RegisterEffect(e1,tp)
local e2=Effect.CreateEffect(c)
e2:SetType(EFFECT_TYPE_FIELD+EFFECT_TYPE_CONTINUOUS)
e2:SetCode(EVENT_CHAIN_SOLVING)
e2:SetCondition(cm.discon)
e2:SetOperation(cm.disop)
e2:SetLabelObject(tc)
e2:SetReset(RESET_PHASE+PHASE_END)
Duel.RegisterEffect(e2,tp)
Duel.Hint(HINT_SELECTMSG,1-tp,HINTMSG_ATOHAND)
local g=Duel.SelectMatchingCard(1-tp,cm.thcfilter,1-tp,LOCATION_HAND+LOCATION_GRAVE+LOCATION_DECK,0,2,2,nil,tc:GetCode(),tp)
if Duel.SendtoHand(g,tp,REASON_EFFECT)==0 and e:GetHandler():IsCanBeSpecialSummoned(e,0,tp,false,false) then
Duel.SpecialSummon(e:GetHandler(),0,tp,tp,false,false,POS_FACEUP)
end
end
end
function cm.distg(e,c)
local tc=e:GetLabelObject()
return c:IsOriginalCodeRule(tc:GetOriginalCodeRule()) and (c:IsType(TYPE_EFFECT) or c:GetOriginalType()&TYPE_EFFECT~=0)
end
function cm.discon(e,tp,eg,ep,ev,re,r,rp)
local tc=e:GetLabelObject()
return re:IsActiveType(TYPE_MONSTER) and re:GetHandler():IsOriginalCodeRule(tc:GetOriginalCodeRule())
end
function cm.disop(e,tp,eg,ep,ev,re,r,rp)
Duel.NegateEffect(ev)
end
--lv
function cm.filter(c)
return c:IsFaceup() and c:GetLevel()>0 and c:IsRace(RACE_FAIRY) and c:IsType(TYPE_TUNER)
end
function cm.lvtg(e,tp,eg,ep,ev,re,r,rp,chk,chkc)
if chkc then return chkc:IsLocation(LOCATION_MZONE) and chkc:IsControler(tp) and cm.filter(chkc) end
if chk==0 then return Duel.IsExistingTarget(cm.filter,tp,LOCATION_MZONE,0,1,e:GetHandler()) end
Duel.Hint(HINT_SELECTMSG,tp,HINTMSG_FACEUP)
Duel.SelectTarget(tp,cm.filter,tp,LOCATION_MZONE,0,1,1,e:GetHandler())
end
function cm.lvop(e,tp,eg,ep,ev,re,r,rp)
local c=e:GetHandler()
local tc=Duel.GetFirstTarget()
if c:IsRelateToEffect(e) and c:IsFaceup() and tc:IsRelateToEffect(e) and tc:IsFaceup() then
local lv=tc:GetLevel()
local e1=Effect.CreateEffect(c)
e1:SetType(EFFECT_TYPE_SINGLE)
e1:SetCode(EFFECT_CHANGE_LEVEL)
e1:SetProperty(EFFECT_FLAG_CANNOT_DISABLE)
e1:SetValue(lv)
e1:SetReset(RESET_EVENT+RESETS_STANDARD+RESET_PHASE+PHASE_END)
c:RegisterEffect(e1)
--to hand
function cm.thfilter(c,tp)
return c:IsAbleToHand(1-tp) and Duel.IsExistingMatchingCard(cm.thfilter2,tp,LOCATION_DECK,0,1,c,1-tp,c:GetCode())
end
function cm.thfilter2(c,tp,code)
return c:IsAbleToHand(tp) and c:IsCode(code)
end
function cm.ntrfilter(c)
return c:IsFaceup() and c:IsControlerCanBeChanged()
end
function cm.thtg(e,tp,eg,ep,ev,re,r,rp,chk)
if chk==0 then return Duel.IsExistingMatchingCard(cm.thfilter,tp,LOCATION_DECK,0,1,nil,tp)
and Duel.IsExistingMatchingCard(cm.ntrfilter,tp,0,LOCATION_MZONE,1,nil) end
Duel.SetOperationInfo(0,CATEGORY_TOHAND,nil,2,tp,LOCATION_DECK)
Duel.SetOperationInfo(0,CATEGORY_CONTROL,nil,1,0,LOCATION_MZONE)
end
function cm.thop(e,tp,eg,ep,ev,re,r,rp)
Duel.Hint(HINT_SELECTMSG,tp,HINTMSG_ATOHAND)
if not Duel.IsExistingMatchingCard(cm.thfilter,tp,LOCATION_DECK,0,1,nil,tp) then return end
local g=Duel.SelectMatchingCard(tp,cm.thfilter,tp,LOCATION_DECK,0,1,1,nil,tp)
g:AddCard(Duel.GetFirstMatchingCard(cm.thfilter2,tp,LOCATION_DECK,0,nil,1-tp,g:GetFirst():GetCode()))
if g:GetCount()>0 then
Duel.SendtoHand(g,1-tp,REASON_EFFECT)
local tc=g:GetFirst()
while tc do
local e1=Effect.CreateEffect(e:GetHandler())
e1:SetType(EFFECT_TYPE_SINGLE)
e1:SetCode(EFFECT_PUBLIC)
e1:SetReset(RESET_EVENT+RESETS_STANDARD)
tc:RegisterEffect(e1)
tc=g:GetNext()
end
Duel.Hint(HINT_SELECTMSG,tp,HINTMSG_CONTROL)
local ntc=Duel.SelectMatchingCard(tp,cm.ntrfilter,tp,0,LOCATION_MZONE,1,1,nil):GetFirst()
Duel.GetControl(ntc,tp)
--cannot attack, trigger
local e4=Effect.CreateEffect(e:GetHandler())
e4:SetType(EFFECT_TYPE_SINGLE)
e4:SetCode(EFFECT_CANNOT_TRIGGER)
e4:SetRange(LOCATION_MZONE)
e4:SetReset(RESET_EVENT+RESETS_STANDARD)
ntc:RegisterEffect(e4)
end
end
--grave
function cm.tgfilter(c)
return c:IsFaceup() and c:IsRace(RACE_FAIRY) and c:IsType(TYPE_TUNER)
--Recover
function cm.drcon(e,tp,eg,ep,ev,re,r,rp)
return re:GetHandler():GetOwner()==1-tp and re:GetActivateLocation(LOCATION_ONFIELD)
end
function cm.tgcon(e,tp,eg,ep,ev,re,r,rp)
return not Duel.IsExistingMatchingCard(cm.tgfilter,tp,LOCATION_MZONE,0,1,e:GetHandler())
function cm.drtg(e,tp,eg,ep,ev,re,r,rp,chk)
if chk==0 then return Duel.IsPlayerCanDraw(tp,1) end
Duel.SetTargetPlayer(tp)
Duel.SetTargetParam(1)
Duel.SetOperationInfo(0,CATEGORY_DRAW,nil,0,tp,1)
Duel.SetOperationInfo(0,CATEGORY_RECOVER,nil,0,tp,Duel.GetLP(tp)/2)
end
function cm.tgtg(e,tp,eg,ep,ev,re,r,rp,chk)
if chk==0 then return true end
Duel.SetOperationInfo(0,CATEGORY_TOGRAVE,e:GetHandler(),1,0,0)
function cm.drop(e,tp,eg,ep,ev,re,r,rp)
local p,d=Duel.GetChainInfo(0,CHAININFO_TARGET_PLAYER,CHAININFO_TARGET_PARAM)
Duel.Draw(p,d,REASON_EFFECT)
Duel.Recover(tp,Duel.GetLP(tp)/2,REASON_EFFECT)
end
function cm.tgop(e,tp,eg,ep,ev,re,r,rp)
local c=e:GetHandler()
if c:IsRelateToEffect(e) then
Duel.SendtoGrave(c,REASON_EFFECT)
end
end
\ No newline at end of file
--秋夜少女·本田未央
--
local m=10983003
local cm=_G["c"..m]
function cm.initial_effect(c)
--special summon
--spsummon
local e0=Effect.CreateEffect(c)
e0:SetCategory(CATEGORY_SPECIAL_SUMMON)
e0:SetType(EFFECT_TYPE_IGNITION)
e0:SetRange(LOCATION_HAND)
e0:SetCountLimit(1,m)
e0:SetCondition(cm.spcon)
e0:SetTarget(cm.sptg)
e0:SetOperation(cm.spop)
c:RegisterEffect(e0)
--atkup
local e1=Effect.CreateEffect(c)
e1:SetCategory(CATEGORY_SPECIAL_SUMMON)
e1:SetType(EFFECT_TYPE_IGNITION)
e1:SetRange(LOCATION_HAND)
e1:SetCost(cm.spcost)
e1:SetTarget(cm.sptg)
e1:SetOperation(cm.spop)
e1:SetType(EFFECT_TYPE_SINGLE)
e1:SetProperty(EFFECT_FLAG_SINGLE_RANGE)
e1:SetRange(LOCATION_MZONE)
e1:SetCode(EFFECT_UPDATE_ATTACK)
e1:SetValue(cm.value)
c:RegisterEffect(e1)
--indes
--
local e2=Effect.CreateEffect(c)
e2:SetType(EFFECT_TYPE_SINGLE)
e2:SetProperty(EFFECT_FLAG_SINGLE_RANGE)
......@@ -28,57 +37,30 @@ function cm.initial_effect(c)
e4:SetCategory(CATEGORY_SPECIAL_SUMMON+CATEGORY_TOKEN)
e4:SetType(EFFECT_TYPE_IGNITION)
e4:SetRange(LOCATION_MZONE)
e4:SetCountLimit(1,m)
e4:SetCountLimit(1,m+900)
e4:SetCost(cm.spcost2)
e4:SetTarget(cm.sptg2)
e4:SetOperation(cm.spop2)
c:RegisterEffect(e4)
end
function cm.fselect(c,tp,rg,sg)
sg:AddCard(c)
local res=cm.fgoal(tp,sg) or rg:IsExists(cm.fselect,1,sg,tp,rg,sg)
sg:RemoveCard(c)
return res
end
function cm.relfilter(c,g)
return g:IsContains(c)
end
function cm.fgoal(tp,sg)
if sg:GetCount()>0 and Duel.GetMZoneCount(tp,sg)>0 then
Duel.SetSelectedCard(sg)
return Duel.CheckReleaseGroup(tp,nil,0,nil)
else return false end
end
function cm.spcost(e,tp,eg,ep,ev,re,r,rp,chk)
local rg=Duel.GetReleaseGroup(tp):Filter(Card.IsType,nil,TYPE_TOKEN)
local g=Group.CreateGroup()
if chk==0 then return rg:IsExists(cm.fselect,1,nil,tp,rg,g) end
while true do
local mg=rg:Filter(cm.fselect,g,tp,rg,g)
if mg:GetCount()==0 or (cm.fgoal(tp,g) and not Duel.SelectYesNo(tp,210)) then break end
Duel.Hint(HINT_SELECTMSG,tp,HINTMSG_RELEASE)
local sg=Duel.SelectReleaseGroup(tp,cm.relfilter,1,1,nil,mg)
g:Merge(sg)
end
e:SetLabel(g:GetCount())
Duel.Release(g,REASON_COST)
function cm.spcon(e,tp,eg,ep,ev,re,r,rp)
return Duel.IsExistingMatchingCard(Card.IsType,tp,LOCATION_MZONE,0,1,nil,TYPE_TOKEN)
end
function cm.sptg(e,tp,eg,ep,ev,re,r,rp,chk)
if chk==0 then return e:GetHandler():IsCanBeSpecialSummoned(e,0,tp,false,false) end
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 cm.spop(e,tp,eg,ep,ev,re,r,rp)
local c=e:GetHandler()
if c:IsRelateToEffect(e) and Duel.SpecialSummonStep(c,0,tp,tp,false,false,POS_FACEUP) then
local ct=e:GetLabel()
local e1=Effect.CreateEffect(c)
e1:SetType(EFFECT_TYPE_SINGLE)
e1:SetCode(EFFECT_UPDATE_ATTACK)
e1:SetValue(ct*800)
e1:SetReset(RESET_EVENT+RESETS_STANDARD+RESET_DISABLE)
c:RegisterEffect(e1)
Duel.SpecialSummonComplete()
end
if not c:IsRelateToEffect(e) then return end
Duel.SpecialSummon(c,0,tp,tp,false,false,POS_FACEUP)
end
function cm.filter(c)
return c:IsType(TYPE_TOKEN)
end
function cm.value(e,c)
return Duel.GetMatchingGroupCount(cm.filter,0,LOCATION_MZONE,LOCATION_MZONE,nil)*800
end
function cm.indcon(e)
return Duel.IsExistingMatchingCard(Card.IsType,e:GetHandlerPlayer(),LOCATION_MZONE,0,1,nil,TYPE_TOKEN)
......
--约定兑现·本田未央
--月白五十铃·兔女郎
local m=10983004
local cm=_G["c"..m]
function cm.initial_effect(c)
--special summon
local e0=Effect.CreateEffect(c)
e0:SetCategory(CATEGORY_SPECIAL_SUMMON)
e0:SetType(EFFECT_TYPE_IGNITION)
e0:SetRange(LOCATION_HAND)
e0:SetCountLimit(1,m)
e0:SetCondition(cm.spcon)
e0:SetTarget(cm.sptg)
e0:SetOperation(cm.spop)
c:RegisterEffect(e0)
--link summon
aux.AddLinkProcedure(c,nil,3,3,cm.lcheck)
c:EnableReviveLimit()
--atkup
local e1=Effect.CreateEffect(c)
e1:SetType(EFFECT_TYPE_SINGLE)
......@@ -32,41 +25,64 @@ function cm.initial_effect(c)
local e3=e2:Clone()
e3:SetCode(EFFECT_INDESTRUCTABLE_EFFECT)
c:RegisterEffect(e3)
--token
local e4=Effect.CreateEffect(c)
e4:SetCategory(CATEGORY_SPECIAL_SUMMON+CATEGORY_TOKEN)
e4:SetType(EFFECT_TYPE_IGNITION)
e4:SetProperty(EFFECT_FLAG_BOTH_SIDE)
e4:SetRange(LOCATION_MZONE)
e4:SetCost(cm.spcost)
e4:SetTarget(cm.sptg)
e4:SetOperation(cm.spop)
c:RegisterEffect(e4)
end
function cm.lcheck(g,lc)
return g:IsExists(Card.IsLinkType,1,nil,TYPE_TOKEN)
end
function cm.filter(c)
return c:IsType(TYPE_TOKEN)
end
function cm.value(e,c)
return Duel.GetMatchingGroupCount(cm.filter,0,LOCATION_MZONE,LOCATION_MZONE,nil)*800
return Duel.GetMatchingGroupCount(cm.filter,0,LOCATION_MZONE,LOCATION_MZONE,nil)*1000
end
function cm.indcon(e)
return Duel.IsExistingMatchingCard(Card.IsType,e:GetHandlerPlayer(),LOCATION_MZONE,0,1,nil,TYPE_TOKEN)
end
function cm.cfilter(c)
return c:IsFaceup() and c:IsType(TYPE_TOKEN)
end
function cm.spcon(e,tp,eg,ep,ev,re,r,rp)
return Duel.IsExistingMatchingCard(cm.cfilter,tp,LOCATION_MZONE,0,1,nil)
function cm.spcost(e,tp,eg,ep,ev,re,r,rp,chk)
if chk==0 then return Duel.IsExistingMatchingCard(Card.IsDiscardable,tp,LOCATION_HAND,0,1,nil) end
Duel.DiscardHand(tp,Card.IsDiscardable,1,1,REASON_COST+REASON_DISCARD)
end
function cm.sptg(e,tp,eg,ep,ev,re,r,rp,chk)
if chk==0 then return not Duel.IsPlayerAffectedByEffect(tp,59822133)
and Duel.GetLocationCount(tp,LOCATION_MZONE)>0
and Duel.GetLocationCount(1-tp,LOCATION_MZONE)>0
and e:GetHandler():IsCanBeSpecialSummoned(e,0,tp,false,false)
if chk==0 then return Duel.GetLocationCount(tp,LOCATION_MZONE)>0
and Duel.IsPlayerCanSpecialSummonMonster(tp,10983099,0,0x4011,1500,1500,5,RACE_FIEND,ATTRIBUTE_FIRE) end
Duel.SetOperationInfo(0,CATEGORY_TOKEN,nil,1,0,0)
Duel.SetOperationInfo(0,CATEGORY_SPECIAL_SUMMON,nil,2,0,0)
Duel.SetOperationInfo(0,CATEGORY_SPECIAL_SUMMON,nil,1,0,0)
end
function cm.spop(e,tp,eg,ep,ev,re,r,rp)
local c=e:GetHandler()
if not Duel.IsPlayerAffectedByEffect(tp,59822133) and c:IsRelateToEffect(e) then
if Duel.SpecialSummonStep(c,0,tp,tp,false,false,POS_FACEUP) then
if Duel.GetLocationCount(1-tp,LOCATION_MZONE,tp)>0
and Duel.IsPlayerCanSpecialSummonMonster(tp,10983099,0,0x4011,1500,1500,5,RACE_FIEND,ATTRIBUTE_FIRE) then
local token=Duel.CreateToken(tp,10983099)
Duel.SpecialSummonStep(token,0,tp,1-tp,false,false,POS_FACEUP)
end
end
Duel.SpecialSummonComplete()
local e1=Effect.CreateEffect(e:GetHandler())
e1:SetType(EFFECT_TYPE_FIELD)
e1:SetCode(EFFECT_CANNOT_BE_FUSION_MATERIAL)
e1:SetTargetRange(0xff,0xff)
e1:SetTarget(aux.NOT(aux.TargetBoolFunction(Card.IsType,TYPE_TOKEN)))
e1:SetValue(cm.sumlimit)
e1:SetReset(RESET_PHASE+PHASE_END)
Duel.RegisterEffect(e1,tp)
local e2=e1:Clone()
e2:SetCode(EFFECT_CANNOT_BE_SYNCHRO_MATERIAL)
Duel.RegisterEffect(e2,tp)
local e3=e1:Clone()
e3:SetCode(EFFECT_CANNOT_BE_XYZ_MATERIAL)
Duel.RegisterEffect(e3,tp)
local e4=e1:Clone()
e4:SetCode(EFFECT_CANNOT_BE_LINK_MATERIAL)
Duel.RegisterEffect(e4,tp)
if Duel.GetLocationCount(tp,LOCATION_MZONE)<=0 then return end
if Duel.IsPlayerCanSpecialSummonMonster(tp,10983099,0,0x4011,1500,1500,5,RACE_FIEND,ATTRIBUTE_FIRE) then
local token=Duel.CreateToken(tp,10983999)
Duel.SpecialSummon(token,0,tp,tp,false,false,POS_FACEUP)
end
end
function cm.sumlimit(e,c)
if not c then return false end
return c:IsControler(e:GetHandlerPlayer())
end
--积雨云·椎名咪玉
--不言之中·椎名咪玉
local m=14175006
local cm=_G["c"..m]
function cm.initial_effect(c)
--link summon
aux.AddLinkProcedure(c,aux.FilterBoolFunction(Card.IsLinkAttribute,ATTRIBUTE_WATER),2)
c:EnableReviveLimit()
--add counter
--summon success
local e1=Effect.CreateEffect(c)
e1:SetDescription(aux.Stringid(m,0))
e1:SetCategory(CATEGORY_COUNTER)
e1:SetType(EFFECT_TYPE_QUICK_O)
e1:SetCode(EVENT_FREE_CHAIN)
e1:SetRange(LOCATION_MZONE)
e1:SetCountLimit(1,m)
e1:SetHintTiming(0,TIMINGS_CHECK_MONSTER+TIMING_END_PHASE)
e1:SetCost(cm.ctcost)
e1:SetTarget(cm.cttg)
e1:SetOperation(cm.ctop)
e1:SetCategory(CATEGORY_SPECIAL_SUMMON)
e1:SetType(EFFECT_TYPE_SINGLE+EFFECT_TYPE_TRIGGER_O)
e1:SetCode(EVENT_SUMMON_SUCCESS)
e1:SetTarget(cm.sumtg)
e1:SetOperation(cm.sumop)
c:RegisterEffect(e1)
--to hand
--search
local e3=Effect.CreateEffect(c)
e3:SetDescription(aux.Stringid(94243005,1))
e3:SetCategory(CATEGORY_TOHAND+CATEGORY_SEARCH)
e3:SetType(EFFECT_TYPE_IGNITION)
e3:SetCountLimit(1,m+900)
e3:SetDescription(aux.Stringid(m,1))
e3:SetCategory(CATEGORY_DRAW+CATEGORY_TODECK)
e3:SetType(EFFECT_TYPE_FIELD+EFFECT_TYPE_TRIGGER_O)
e3:SetCode(EVENT_SPSUMMON_SUCCESS)
e3:SetProperty(EFFECT_FLAG_DELAY)
e3:SetRange(LOCATION_MZONE)
e3:SetTarget(cm.thtg)
e3:SetOperation(cm.thop)
e3:SetCountLimit(1,m)
e3:SetCondition(cm.drcon)
e3:SetTarget(cm.drtg)
e3:SetOperation(cm.drop)
c:RegisterEffect(e3)
end
function cm.costfilter(c)
return c:IsType(TYPE_MONSTER) and c:IsAttribute(ATTRIBUTE_WATER) and c:IsLevelAbove(1) and c:IsDiscardable()
function cm.filter(c,e,tp)
return c:IsLevel(4) and c:IsAttribute(ATTRIBUTE_LIGHT) and c:IsCanBeSpecialSummoned(e,0,tp,false,false)
end
function cm.ctcost(e,tp,eg,ep,ev,re,r,rp,chk)
if chk==0 then return Duel.IsExistingMatchingCard(cm.costfilter,tp,LOCATION_HAND,0,1,nil) end
Duel.Hint(HINT_SELECTMSG,tp,HINTMSG_DISCARD)
local g=Duel.SelectMatchingCard(tp,cm.costfilter,tp,LOCATION_HAND,0,1,1,nil)
e:SetLabel(g:GetFirst():GetOriginalLevel())
Duel.SendtoGrave(g,REASON_COST+REASON_DISCARD)
function cm.sumtg(e,tp,eg,ep,ev,re,r,rp,chk)
if chk==0 then return Duel.GetLocationCount(tp,LOCATION_MZONE)>0
and Duel.IsExistingMatchingCard(cm.filter,tp,LOCATION_HAND,0,1,nil,e,tp) end
Duel.SetOperationInfo(0,CATEGORY_SPECIAL_SUMMON,nil,1,tp,LOCATION_HAND)
end
function cm.cttg(e,tp,eg,ep,ev,re,r,rp,chk)
if chk==0 then return Duel.IsExistingMatchingCard(Card.IsCanAddCounter,tp,LOCATION_MZONE,LOCATION_MZONE,1,nil,0x1015,1) end
Duel.SetOperationInfo(0,CATEGORY_COUNTER,nil,e:GetLabel(),0,0x1015)
end
function cm.ctop(e,tp,eg,ep,ev,re,r,rp)
local ct=e:GetLabel()
local g=Duel.GetMatchingGroup(Card.IsCanAddCounter,tp,LOCATION_MZONE,LOCATION_MZONE,nil,0x1015,1)
if g:GetCount()==0 then return end
for i=1,ct do
Duel.Hint(HINT_SELECTMSG,tp,HINTMSG_COUNTER)
local sg=g:Select(tp,1,1,nil)
sg:GetFirst():AddCounter(0x1015,1)
end
end
function cm.thfilter1(c,tp)
local lv=c:GetLevel()
return (c:IsLocation(LOCATION_DECK) or (c:IsFaceup() and c:IsType(TYPE_PENDULUM))) and lv>0 and c:IsAttribute(ATTRIBUTE_WATER)
and Duel.IsCanRemoveCounter(tp,1,1,0x1015,lv,REASON_COST) and c:IsAbleToHand()
end
function cm.thtg(e,tp,eg,ep,ev,re,r,rp,chk)
if chk==0 then return Duel.IsExistingMatchingCard(cm.thfilter1,tp,LOCATION_DECK+LOCATION_EXTRA,0,1,nil,tp) end
local g=Duel.GetMatchingGroup(cm.thfilter1,tp,LOCATION_DECK+LOCATION_EXTRA,0,nil,tp)
local lvt={}
local tc=g:GetFirst()
while tc do
local tlv=tc:GetLevel()
lvt[tlv]=tlv
tc=g:GetNext()
end
local pc=1
for i=1,12 do
if lvt[i] then lvt[i]=nil lvt[pc]=i pc=pc+1 end
end
lvt[pc]=nil
Duel.Hint(HINT_SELECTMSG,tp,aux.Stringid(m,1))
local lv=Duel.AnnounceNumber(tp,table.unpack(lvt))
Duel.RemoveCounter(tp,1,1,0x1015,lv,REASON_COST)
e:SetLabel(lv)
Duel.SetOperationInfo(0,CATEGORY_TOHAND,nil,1,tp,LOCATION_DECK+LOCATION_EXTRA)
end
function cm.thfilter2(c,lv)
return (c:IsLocation(LOCATION_DECK) or (c:IsFaceup() and c:IsType(TYPE_PENDULUM))) and c:IsAttribute(ATTRIBUTE_WATER)
and c:IsLevel(lv) and c:IsAbleToHand()
end
function cm.thop(e,tp,eg,ep,ev,re,r,rp)
local c=e:GetHandler()
local lv=e:GetLabel()
Duel.Hint(HINT_SELECTMSG,tp,HINTMSG_ATOHAND)
local g=Duel.SelectMatchingCard(tp,cm.thfilter2,tp,LOCATION_DECK+LOCATION_EXTRA,0,1,1,nil,lv)
function cm.sumop(e,tp,eg,ep,ev,re,r,rp)
if Duel.GetLocationCount(tp,LOCATION_MZONE)<=0 then return end
Duel.Hint(HINT_SELECTMSG,tp,HINTMSG_SPSUMMON)
local g=Duel.SelectMatchingCard(tp,cm.filter,tp,LOCATION_HAND,0,1,1,nil,e,tp)
if g:GetCount()>0 then
Duel.SendtoHand(g,nil,REASON_EFFECT)
Duel.ConfirmCards(1-tp,g)
Duel.SpecialSummon(g,0,tp,tp,false,false,POS_FACEUP)
end
local e1=Effect.CreateEffect(c)
local e1=Effect.CreateEffect(e:GetHandler())
e1:SetType(EFFECT_TYPE_FIELD)
e1:SetProperty(EFFECT_FLAG_PLAYER_TARGET)
e1:SetCode(EFFECT_CANNOT_SUMMON)
e1:SetCode(EFFECT_CANNOT_SPECIAL_SUMMON)
e1:SetTargetRange(1,0)
e1:SetTarget(cm.splimit)
e1:SetReset(RESET_PHASE+PHASE_END)
Duel.RegisterEffect(e1,tp)
local e2=e1:Clone()
e2:SetCode(EFFECT_CANNOT_SPECIAL_SUMMON)
Duel.RegisterEffect(e2,tp)
end
function cm.splimit(e,c)
return not c:IsAttribute(ATTRIBUTE_WATER)
function cm.splimit(e,c,tp,sumtp,sumpos)
return c:GetAttribute()~=ATTRIBUTE_LIGHT
end
function cm.cfilter(c,tp)
return c:IsPreviousLocation(LOCATION_HAND) and c:GetPreviousControler()==tp
end
function cm.drcon(e,tp,eg,ep,ev,re,r,rp)
return not eg:IsContains(e:GetHandler()) and eg:IsExists(cm.cfilter,1,nil,tp)
end
function cm.drtg(e,tp,eg,ep,ev,re,r,rp,chk)
if chk==0 then return Duel.IsPlayerCanDraw(tp,1) end
Duel.SetTargetPlayer(tp)
Duel.SetTargetParam(1)
Duel.SetOperationInfo(0,CATEGORY_DRAW,nil,0,tp,1)
Duel.SetOperationInfo(0,CATEGORY_TODECK,nil,0,tp,1)
end
function cm.drop(e,tp,eg,ep,ev,re,r,rp)
local p,d=Duel.GetChainInfo(0,CHAININFO_TARGET_PLAYER,CHAININFO_TARGET_PARAM)
if Duel.Draw(p,d,REASON_EFFECT)==0 then return end
Duel.Hint(HINT_SELECTMSG,tp,HINTMSG_TODECK)
local g=Duel.SelectMatchingCard(tp,Card.IsAbleToDeck,tp,LOCATION_HAND,0,1,1,nil)
if g:GetCount()>0 then
Duel.BreakEffect()
Duel.SendtoDeck(g,nil,1,REASON_EFFECT)
end
end
......@@ -44,6 +44,21 @@ local cate_table_for_reikai={
['ct'] = CATEGORY_COUNTER,
['des'] = CATEGORY_DESTROY,
}
rk.List_A_Counter = {
1487805,
20985997,
21768554,
24104865,
38468214,
53291093,
57384901,
58012107,
59258334,
62315111,
84491298,
91070115,
99532708
}
function rk.set(code,setcode,rkflag,excode)
if not _G["c"..code] then _G["c"..code]={}
setmetatable(_G["c"..code],Card)
......@@ -86,6 +101,10 @@ function rk.set(code,setcode,rkflag,excode)
end
return code,ccodem
end
function Card.IsListedACounter(c)
local code = c:GetOriginalCode()
return aux.IsCounterAdded(c,0x100e) or IsInTable(code,rk.List_A_Counter) or rk.check(c,"Acounter")
end
function rk.rkcardcheck(c)
return c.rkcheck==true
end
......
......@@ -22,6 +22,7 @@ function c17032830.initial_effect(c)
e2:SetCode(EVENT_RECOVER)
e2:SetRange(LOCATION_MZONE)
e2:SetProperty(EFFECT_FLAG_DELAY)
e2:SetCountLimit(1,17032830)
e2:SetTarget(c17032830.target)
e2:SetOperation(c17032830.activate)
c:RegisterEffect(e2)
......
--P.C. 可可罗
local m=17035020
local cm=_G["c"..m]
function cm.initial_effect(c)
--draw
local e1=Effect.CreateEffect(c)
e1:SetDescription(aux.Stringid(17035020,0))
e1:SetCategory(CATEGORY_DRAW)
e1:SetType(EFFECT_TYPE_IGNITION)
e1:SetProperty(EFFECT_FLAG_PLAYER_TARGET)
e1:SetRange(LOCATION_HAND)
e1:SetCountLimit(1,17035020)
e1:SetCost(cm.drcost)
e1:SetTarget(cm.drtg)
e1:SetOperation(cm.drop)
c:RegisterEffect(e1)
--destroy and set
local e2=Effect.CreateEffect(c)
e2:SetDescription(aux.Stringid(17035020,1))
e2:SetCategory(CATEGORY_RECOVER+CATEGORY_ATKCHANGE)
e2:SetType(EFFECT_TYPE_SINGLE+EFFECT_TYPE_TRIGGER_O)
e2:SetCode(EVENT_SPSUMMON_SUCCESS)
e2:SetProperty(EFFECT_FLAG_DELAY)
e2:SetCondition(cm.rccon)
e2:SetTarget(cm.rctg)
e2:SetOperation(cm.rcop)
c:RegisterEffect(e2)
--tohand
local e3=Effect.CreateEffect(c)
e3:SetDescription(aux.Stringid(17035020,2))
e3:SetCategory(CATEGORY_TOHAND)
e3:SetType(EFFECT_TYPE_SINGLE+EFFECT_TYPE_TRIGGER_O)
e3:SetProperty(EFFECT_FLAG_CARD_TARGET+EFFECT_FLAG_DELAY)
e3:SetCode(EVENT_TO_GRAVE)
e3:SetCountLimit(1,17035021)
e3:SetCondition(cm.thcon)
e3:SetTarget(cm.thtg)
e3:SetOperation(cm.thop)
c:RegisterEffect(e3)
end
function cm.cfilter(c)
return c:IsSetCard(0x7f5) and c:IsDiscardable()
end
function cm.drcost(e,tp,eg,ep,ev,re,r,rp,chk)
if chk==0 then return e:GetHandler():IsDiscardable()
and Duel.IsExistingMatchingCard(cm.cfilter,tp,LOCATION_HAND,0,1,e:GetHandler()) end
Duel.Hint(HINT_SELECTMSG,tp,HINTMSG_DISCARD)
local g=Duel.SelectMatchingCard(tp,cm.cfilter,tp,LOCATION_HAND,0,1,1,e:GetHandler())
g:AddCard(e:GetHandler())
Duel.SendtoGrave(g,REASON_DISCARD+REASON_COST)
end
function cm.drtg(e,tp,eg,ep,ev,re,r,rp,chk)
if chk==0 then return Duel.IsPlayerCanDraw(tp,2) end
Duel.SetTargetPlayer(tp)
Duel.SetTargetParam(2)
Duel.SetOperationInfo(0,CATEGORY_DRAW,nil,0,tp,2)
end
function cm.drop(e,tp,eg,ep,ev,re,r,rp)
local p,d=Duel.GetChainInfo(0,CHAININFO_TARGET_PLAYER,CHAININFO_TARGET_PARAM)
Duel.Draw(p,d,REASON_EFFECT)
end
function cm.rccon(e,tp,eg,ep,ev,re,r,rp)
return re and re:IsActiveType(TYPE_MONSTER) and re:GetHandler():IsCode(17035300)
end
function cm.rctg(e,tp,eg,ep,ev,re,r,rp,chk)
if chk==0 then return true end
Duel.SetTargetPlayer(tp)
Duel.SetTargetParam(2000)
Duel.SetOperationInfo(0,CATEGORY_RECOVER,nil,0,tp,2000)
end
function cm.rcop(e,tp,eg,ep,ev,re,r,rp)
if not e:GetHandler():IsRelateToEffect(e) then return end
local p,d=Duel.GetChainInfo(0,CHAININFO_TARGET_PLAYER,CHAININFO_TARGET_PARAM)
Duel.Recover(p,d,REASON_EFFECT)
local e1=Effect.CreateEffect(e:GetHandler())
e1:SetType(EFFECT_TYPE_FIELD)
e1:SetCode(EFFECT_UPDATE_ATTACK)
e1:SetTargetRange(LOCATION_MZONE,0)
e1:SetValue(600)
Duel.RegisterEffect(e1,tp)
local e2=e1:Clone()
e2:SetCode(EFFECT_UPDATE_DEFENSE)
Duel.RegisterEffect(e2,tp)
end
function cm.thcon(e,tp,eg,ep,ev,re,r,rp)
return e:GetHandler():IsPreviousLocation(LOCATION_ONFIELD)
end
function cm.thfilter(c)
return c:IsSetCard(0x7f5) and c:IsAbleToHand()
end
function cm.thtg(e,tp,eg,ep,ev,re,r,rp,chk,chkc)
if chkc then return chkc:IsLocation(LOCATION_GRAVE) and chkc:IsControler(tp) and cm.thfilter(chkc) end
if chk==0 then return Duel.IsExistingTarget(cm.thfilter,tp,LOCATION_GRAVE,0,1,e:GetHandler()) end
Duel.Hint(HINT_SELECTMSG,tp,HINTMSG_ATOHAND)
local g=Duel.SelectTarget(tp,cm.thfilter,tp,LOCATION_GRAVE,0,1,1,e:GetHandler())
Duel.SetOperationInfo(0,CATEGORY_TOHAND,g,1,0,0)
end
function cm.thop(e,tp,eg,ep,ev,re,r,rp)
local tc=Duel.GetFirstTarget()
if tc:IsRelateToEffect(e) then
Duel.SendtoHand(tc,nil,REASON_EFFECT)
end
xpcall(function() require("expansions/script/c17035021") end,function() require("script/c17035021") end)
function c17035020.initial_effect(c)
pcr.Union_Burst(c,nil,pcr.kkrubtg,pcr.kkrubop,1123,Kokkoro)
pcr.Gourmet_Edifice(c,17035020)
pcr.Kokkoro(c)
end
\ No newline at end of file
This diff is collapsed.
--P.C. 佩可莉姆/公主形态
local m=17035210
local cm=_G["c"..m]
function cm.initial_effect(c)
aux.AddCodeList(c,17035310)
--pendulum summon
aux.EnablePendulumAttribute(c)
--Cannot special summon
local e0=Effect.CreateEffect(c)
e0:SetProperty(EFFECT_FLAG_CANNOT_DISABLE+EFFECT_FLAG_UNCOPYABLE)
e0:SetType(EFFECT_TYPE_SINGLE)
e0:SetCode(EFFECT_SPSUMMON_CONDITION)
c:RegisterEffect(e0)
--extra attack
local e1=Effect.CreateEffect(c)
e1:SetType(EFFECT_TYPE_SINGLE)
e1:SetCode(EFFECT_EXTRA_ATTACK)
e1:SetValue(1)
c:RegisterEffect(e1)
--actlimit
local e2=Effect.CreateEffect(c)
e2:SetType(EFFECT_TYPE_FIELD)
e2:SetProperty(EFFECT_FLAG_PLAYER_TARGET)
e2:SetCode(EFFECT_CANNOT_ACTIVATE)
e2:SetRange(LOCATION_MZONE)
e2:SetTargetRange(0,1)
e2:SetValue(1)
e2:SetCondition(cm.actcon)
c:RegisterEffect(e2)
--recover
local e3=Effect.CreateEffect(c)
e3:SetCategory(CATEGORY_RECOVER)
e3:SetType(EFFECT_TYPE_SINGLE+EFFECT_TYPE_TRIGGER_O)
e3:SetProperty(EFFECT_FLAG_PLAYER_TARGET)
e3:SetCode(EVENT_BATTLE_DESTROYING)
e3:SetCondition(aux.bdocon)
e3:SetTarget(cm.rctg)
e3:SetOperation(cm.rcop)
c:RegisterEffect(e3)
--tohand and destroy
local e4=Effect.CreateEffect(c)
e4:SetCategory(CATEGORY_TOHAND+CATEGORY_DESTROY)
e4:SetType(EFFECT_TYPE_FIELD+EFFECT_TYPE_TRIGGER_F)
e4:SetCode(EVENT_PHASE+PHASE_END)
e4:SetProperty(EFFECT_FLAG_PLAYER_TARGET)
e4:SetRange(LOCATION_MZONE)
e4:SetCountLimit(1)
e4:SetCondition(cm.descon)
e4:SetTarget(cm.destg)
e4:SetOperation(cm.desop)
c:RegisterEffect(e4)
--splimit
local e5=Effect.CreateEffect(c)
e5:SetType(EFFECT_TYPE_FIELD)
e5:SetRange(LOCATION_PZONE)
e5:SetCode(EFFECT_CANNOT_SPECIAL_SUMMON)
e5:SetProperty(EFFECT_FLAG_PLAYER_TARGET+EFFECT_FLAG_CANNOT_DISABLE)
e5:SetTargetRange(1,0)
e5:SetCondition(cm.splimcon)
e5:SetTarget(cm.splimit)
c:RegisterEffect(e5)
--tohand
local e6=Effect.CreateEffect(c)
e6:SetDescription(aux.Stringid(17035210,0))
e6:SetCategory(CATEGORY_TODECK+CATEGORY_TOHAND+CATEGORY_SEARCH)
e6:SetType(EFFECT_TYPE_FIELD+EFFECT_TYPE_TRIGGER_O)
e6:SetRange(LOCATION_PZONE)
e6:SetCode(EVENT_SPSUMMON_SUCCESS)
e6:SetProperty(EFFECT_FLAG_DELAY)
e6:SetCondition(cm.thcon)
e6:SetTarget(cm.thtg)
e6:SetOperation(cm.thop)
c:RegisterEffect(e6)
end
cm.princess_name=17035320
function cm.actcon(e)
return Duel.GetAttacker()==e:GetHandler() or Duel.GetAttackTarget()==e:GetHandler()
end
function cm.rctg(e,tp,eg,ep,ev,re,r,rp,chk)
if chk==0 then return true end
local c=e:GetHandler()
local bc=c:GetBattleTarget()
local dam=bc:GetAttack()
if dam<0 then dam=0 end
Duel.SetTargetPlayer(tp)
Duel.SetTargetParam(dam)
Duel.SetOperationInfo(0,CATEGORY_RECOVER,nil,0,tp,dam)
end
function cm.rcop(e,tp,eg,ep,ev,re,r,rp)
local p,d=Duel.GetChainInfo(0,CHAININFO_TARGET_PLAYER,CHAININFO_TARGET_PARAM)
Duel.Recover(p,d,REASON_EFFECT)
end
function cm.descon(e,tp,eg,ep,ev,re,r,rp)
return Duel.GetTurnPlayer()~=tp
end
function cm.destg(e,tp,eg,ep,ev,re,r,rp,chk)
if chk==0 then return true end
local g=Duel.GetMatchingGroup(aux.TRUE,tp,0,LOCATION_ONFIELD,nil)
Duel.SetOperationInfo(0,CATEGORY_TOHAND,e:GetHandler(),1,0,0)
Duel.SetOperationInfo(0,CATEGORY_DESTROY,g,1,0,0)
end
function cm.desop(e,tp,eg,ep,ev,re,r,rp)
local c=e:GetHandler()
local g=Duel.GetMatchingGroup(aux.TRUE,tp,0,LOCATION_ONFIELD,nil)
if c:IsRelateToEffect(e) and Duel.SendtoHand(c,nil,REASON_EFFECT)~=0 and #g>0 then
Duel.Hint(HINT_SELECTMSG,tp,HINTMSG_DESTROY)
local sg=g:Select(tp,1,2,nil)
Duel.Destroy(sg,REASON_EFFECT)
end
end
function cm.splimcon(e)
return not e:GetHandler():IsForbidden()
end
function cm.splimit(e,c,tp,sumtp,sumpos)
return not c:IsSetCard(0x7f5) and bit.band(sumtp,SUMMON_TYPE_PENDULUM)==SUMMON_TYPE_PENDULUM
end
function cm.cfilter(c,tp)
return c:IsControler(tp) and c:IsType(TYPE_LINK) and c:IsLinkAbove(3) and c:IsFaceup()
end
function cm.thcon(e,tp,eg,ep,ev,re,r,rp)
return eg:IsExists(cm.cfilter,1,nil,tp)
end
function cm.thfilter(c)
return c:IsCode(17035320) and c:IsAbleToHand()
end
function cm.thtg(e,tp,eg,ep,ev,re,r,rp,chk)
if chk==0 then return e:GetHandler():IsAbleToDeck() and Duel.IsExistingMatchingCard(cm.thfilter,tp,LOCATION_DECK,0,1,nil) end
Duel.SetOperationInfo(0,CATEGORY_TOHAND,nil,1,tp,LOCATION_DECK)
end
function cm.thop(e,tp,eg,ep,ev,re,r,rp)
local c=e:GetHandler()
if c:IsRelateToEffect(e) and Duel.SendtoDeck(c,nil,2,REASON_EFFECT)~=0 then
Duel.Hint(HINT_SELECTMSG,tp,HINTMSG_ATOHAND)
local g=Duel.SelectMatchingCard(tp,cm.thfilter,tp,LOCATION_DECK,0,1,1,nil)
if g:GetCount()>0 then
Duel.SendtoHand(g,nil,REASON_EFFECT)
Duel.ConfirmCards(1-tp,g)
end
end
xpcall(function() require("expansions/script/c17035021") end,function() require("script/c17035021") end)
function c17035210.initial_effect(c)
pcr.Princess_Mode(c)
pcr.atklimit(c)
pcr.atkup(c,pcr.atkupval_link)
end
c17035210.princess_name=17035320
--P.C. ɿ/̬
local m=17035220
local cm=_G["c"..m]
function cm.initial_effect(c)
aux.AddCodeList(c,17035200)
--pendulum summon
aux.EnablePendulumAttribute(c)
--Cannot special summon
local e0=Effect.CreateEffect(c)
e0:SetProperty(EFFECT_FLAG_CANNOT_DISABLE+EFFECT_FLAG_UNCOPYABLE)
e0:SetType(EFFECT_TYPE_SINGLE)
e0:SetCode(EFFECT_SPSUMMON_CONDITION)
c:RegisterEffect(e0)
--atk up
local e1=Effect.CreateEffect(c)
e1:SetType(EFFECT_TYPE_FIELD)
e1:SetCode(EFFECT_UPDATE_ATTACK)
e1:SetRange(LOCATION_MZONE)
e1:SetTargetRange(LOCATION_MZONE,0)
e1:SetTarget(cm.atktg)
e1:SetValue(500)
c:RegisterEffect(e1)
--indes
local e2=e1:Clone()
e2:SetCode(EFFECT_INDESTRUCTABLE_EFFECT)
e2:SetValue(1)
c:RegisterEffect(e2)
--disable spsummon
local e3=Effect.CreateEffect(c)
e3:SetDescription(aux.Stringid(17035220,0))
e3:SetCategory(CATEGORY_DISABLE_SUMMON+CATEGORY_DESTROY)
e3:SetType(EFFECT_TYPE_QUICK_O)
e3:SetRange(LOCATION_MZONE)
e3:SetCode(EVENT_SUMMON)
e3:SetCountLimit(1,17035220)
e3:SetCondition(cm.dscon)
e3:SetTarget(cm.dstg)
e3:SetOperation(cm.dsop)
c:RegisterEffect(e3)
local e4=e3:Clone()
e4:SetCode(EVENT_FLIP_SUMMON)
c:RegisterEffect(e4)
local e5=e3:Clone()
e5:SetCode(EVENT_SPSUMMON)
c:RegisterEffect(e5)
--tohand and draw
local e6=Effect.CreateEffect(c)
e6:SetCategory(CATEGORY_TOHAND+CATEGORY_DRAW)
e6:SetType(EFFECT_TYPE_FIELD+EFFECT_TYPE_TRIGGER_F)
e6:SetCode(EVENT_PHASE+PHASE_END)
e6:SetProperty(EFFECT_FLAG_PLAYER_TARGET)
e6:SetRange(LOCATION_MZONE)
e6:SetCountLimit(1)
e6:SetCondition(cm.drcon)
e6:SetTarget(cm.drtg)
e6:SetOperation(cm.drop)
c:RegisterEffect(e6)
--splimit
local e7=Effect.CreateEffect(c)
e7:SetType(EFFECT_TYPE_FIELD)
e7:SetRange(LOCATION_PZONE)
e7:SetCode(EFFECT_CANNOT_SPECIAL_SUMMON)
e7:SetProperty(EFFECT_FLAG_PLAYER_TARGET+EFFECT_FLAG_CANNOT_DISABLE)
e7:SetTargetRange(1,0)
e7:SetCondition(cm.splimcon)
e7:SetTarget(cm.splimit)
c:RegisterEffect(e7)
--tohand
local e8=Effect.CreateEffect(c)
e8:SetDescription(aux.Stringid(17035220,1))
e8:SetCategory(CATEGORY_TODECK+CATEGORY_TOHAND+CATEGORY_SEARCH)
e8:SetType(EFFECT_TYPE_FIELD+EFFECT_TYPE_TRIGGER_O)
e8:SetRange(LOCATION_PZONE)
e8:SetCode(EVENT_SPSUMMON_SUCCESS)
e8:SetProperty(EFFECT_FLAG_DELAY)
e8:SetCondition(cm.thcon)
e8:SetTarget(cm.thtg)
e8:SetOperation(cm.thop)
c:RegisterEffect(e8)
xpcall(function() require("expansions/script/c17035021") end,function() require("script/c17035021") end)
function c17035220.initial_effect(c)
pcr.Princess_Mode(c)
pcr.atkupbuff(c)
pcr.dissummon(c)
end
cm.princess_name=17035020
function cm.atktg(e,c)
return c~=e:GetHandler()
end
function cm.dscon(e,tp,eg,ep,ev,re,r,rp)
return tp~=ep and Duel.GetCurrentChain()==0
end
function cm.dstg(e,tp,eg,ep,ev,re,r,rp,chk)
if chk==0 then return true end
Duel.SetOperationInfo(0,CATEGORY_DISABLE_SUMMON,eg,eg:GetCount(),0,0)
Duel.SetOperationInfo(0,CATEGORY_DESTROY,eg,eg:GetCount(),0,0)
end
function cm.dsop(e,tp,eg,ep,ev,re,r,rp)
Duel.NegateSummon(eg)
Duel.Remove(eg,POS_FACEUP,REASON_EFFECT)
end
function cm.drcon(e,tp,eg,ep,ev,re,r,rp)
return Duel.GetTurnPlayer()~=tp
end
function cm.drtg(e,tp,eg,ep,ev,re,r,rp,chk)
if chk==0 then return Duel.IsPlayerCanDraw(tp,1) end
Duel.SetTargetPlayer(tp)
Duel.SetTargetParam(1)
Duel.SetOperationInfo(0,CATEGORY_TOHAND,e:GetHandler(),1,0,0)
Duel.SetOperationInfo(0,CATEGORY_DRAW,nil,0,tp,1)
end
function cm.drop(e,tp,eg,ep,ev,re,r,rp)
local c=e:GetHandler()
local p,d=Duel.GetChainInfo(0,CHAININFO_TARGET_PLAYER,CHAININFO_TARGET_PARAM)
if c:IsRelateToEffect(e) and Duel.SendtoHand(c,nil,REASON_EFFECT)~=0 then
Duel.Draw(p,d,REASON_EFFECT)
end
end
function cm.splimcon(e)
return not e:GetHandler():IsForbidden()
end
function cm.splimit(e,c,tp,sumtp,sumpos)
return not c:IsSetCard(0x7f5) and bit.band(sumtp,SUMMON_TYPE_PENDULUM)==SUMMON_TYPE_PENDULUM
end
function cm.cfilter(c,tp)
return c:IsControler(tp) and c:IsType(TYPE_LINK) and c:IsLinkAbove(3) and c:IsFaceup()
end
function cm.thcon(e,tp,eg,ep,ev,re,r,rp)
return eg:IsExists(cm.cfilter,1,nil,tp)
end
function cm.thfilter(c)
return c:IsCode(17035020) and c:IsAbleToHand()
end
function cm.thtg(e,tp,eg,ep,ev,re,r,rp,chk)
if chk==0 then return e:GetHandler():IsAbleToDeck() and Duel.IsExistingMatchingCard(cm.thfilter,tp,LOCATION_DECK,0,1,nil) end
Duel.SetOperationInfo(0,CATEGORY_TODECK,e:GetHandler(),1,0,0)
Duel.SetOperationInfo(0,CATEGORY_TOHAND,nil,1,tp,LOCATION_DECK)
end
function cm.thop(e,tp,eg,ep,ev,re,r,rp)
local c=e:GetHandler()
if c:IsRelateToEffect(e) and Duel.SendtoDeck(c,nil,2,REASON_EFFECT)~=0 then
Duel.Hint(HINT_SELECTMSG,tp,HINTMSG_ATOHAND)
local g=Duel.SelectMatchingCard(tp,cm.thfilter,tp,LOCATION_DECK,0,1,1,nil)
if g:GetCount()>0 then
Duel.SendtoHand(g,nil,REASON_EFFECT)
Duel.ConfirmCards(1-tp,g)
end
end
end
\ No newline at end of file
c17035220.princess_name=17035020
\ No newline at end of file
--公主模式
local m=17035310
local cm=_G["c"..m]
function cm.initial_effect(c)
aux.AddCodeList(c,m)
--Activate
local e1=Effect.CreateEffect(c)
e1:SetDescription(aux.Stringid(17035310,0))
e1:SetCategory(CATEGORY_SPECIAL_SUMMON)
e1:SetType(EFFECT_TYPE_ACTIVATE)
e1:SetCode(EVENT_FREE_CHAIN)
e1:SetHintTiming(0,TIMING_END_PHASE)
e1:SetCost(cm.cost)
e1:SetTarget(cm.target)
e1:SetOperation(cm.activate)
c:RegisterEffect(e1)
--spsummon
local e2=Effect.CreateEffect(c)
e2:SetDescription(aux.Stringid(17035310,1))
e2:SetCategory(CATEGORY_TOHAND+CATEGORY_SEARCH)
e2:SetType(EFFECT_TYPE_IGNITION)
e2:SetRange(LOCATION_GRAVE)
e2:SetCountLimit(1,17035310)
e2:SetCost(cm.thcost)
e2:SetTarget(cm.thtg)
e2:SetOperation(cm.thop)
c:RegisterEffect(e2)
end
function cm.cost(e,tp,eg,ep,ev,re,r,rp,chk)
e:SetLabel(1)
return true
end
function cm.codefilter(c)
return c:IsCode(17035300) and c:IsFaceup()
end
function cm.filter1(c,e,tp)
local loc=LOCATION_HAND
if Duel.IsExistingMatchingCard(cm.codefilter,tp,LOCATION_ONFIELD,0,1,nil) then
loc=loc+LOCATION_DECK
end
return c:IsSetCard(0x7f5) and Duel.GetMZoneCount(tp,c)>0
and Duel.IsExistingMatchingCard(cm.filter2,tp,loc,0,1,nil,e,tp,c:GetCode())
end
function cm.filter2(c,e,tp,tcode)
return c:IsSetCard(0x97f5) and c.princess_name==tcode and c:IsCanBeSpecialSummoned(e,0,tp,true,false)
end
function cm.target(e,tp,eg,ep,ev,re,r,rp,chk)
if chk==0 then
if e:GetLabel()~=1 then return false end
e:SetLabel(0)
return Duel.CheckReleaseGroup(tp,cm.filter1,1,nil,e,tp)
end
local rg=Duel.SelectReleaseGroup(tp,cm.filter1,1,1,nil,e,tp)
e:SetLabel(rg:GetFirst():GetCode())
Duel.Release(rg,REASON_COST)
Duel.SetOperationInfo(0,CATEGORY_SPECIAL_SUMMON,nil,1,tp,LOCATION_HAND+LOCATION_DECK)
end
function cm.activate(e,tp,eg,ep,ev,re,r,rp)
if Duel.GetLocationCount(tp,LOCATION_MZONE)<=0 then return end
local loc=LOCATION_HAND
if Duel.IsExistingMatchingCard(cm.codefilter,tp,LOCATION_ONFIELD,0,1,nil) then
loc=loc+LOCATION_DECK
end
Duel.Hint(HINT_SELECTMSG,tp,HINTMSG_SPSUMMON)
local tc=Duel.SelectMatchingCard(tp,cm.filter2,tp,loc,0,1,1,nil,e,tp,e:GetLabel()):GetFirst()
if tc and Duel.SpecialSummon(tc,0,tp,tp,true,false,POS_FACEUP_ATTACK)>0 then
tc:CompleteProcedure()
end
end
function cm.cfilter2(c,tp)
return c:IsSetCard(0x97f5) and not c:IsPublic()
and Duel.IsExistingMatchingCard(cm.cfilter3,tp,LOCATION_DECK,0,1,nil,c:GetCode())
end
function cm.cfilter3(c,code)
return c:IsSetCard(0x97f5) and not c:IsCode(code) and c:IsAbleToHand()
end
function cm.thcost(e,tp,eg,ep,ev,re,r,rp,chk)
if chk==0 then return Duel.IsExistingMatchingCard(cm.cfilter,tp,LOCATION_HAND,0,1,nil)
and Duel.IsExistingMatchingCard(cm.cfilter2,tp,LOCATION_HAND,0,1,nil,tp) end
Duel.Hint(HINT_SELECTMSG,tp,HINTMSG_CONFIRM)
local g=Duel.SelectMatchingCard(tp,cm.cfilter2,tp,LOCATION_HAND,0,1,1,nil,tp)
e:SetLabel(g:GetFirst():GetCode())
Duel.SetTargetCard(g:GetFirst())
Duel.ConfirmCards(1-tp,g)
Duel.ShuffleHand(tp)
end
function cm.thtg(e,tp,eg,ep,ev,re,r,rp,chk)
if chk==0 then return true end
Duel.SetOperationInfo(0,CATEGORY_TOHAND,nil,1,tp,LOCATION_DECK)
end
function cm.thop(e,tp,eg,ep,ev,re,r,rp)
local tc=Duel.GetFirstTarget()
if tc:IsRelateToEffect(e) and Duel.SendtoDeck(tc,nil,2,REASON_EFFECT)~=0 then
Duel.Hint(HINT_SELECTMSG,tp,HINTMSG_ATOHAND)
local g=Duel.SelectMatchingCard(tp,cm.cfilter3,tp,LOCATION_DECK,0,1,1,nil,e:GetLabel())
if g:GetCount()>0 then
Duel.SendtoHand(g,nil,REASON_EFFECT)
Duel.ConfirmCards(1-tp,g)
end
Duel.BreakEffect()
Duel.SendtoHand(e:GetHandler(),nil,REASON_EFFECT)
end
end
xpcall(function() require("expansions/script/c17035021") end,function() require("script/c17035021") end)
function c17035310.initial_effect(c)
pcr.Princess_Mode_Magic(c)
end
\ No newline at end of file
--埃莉丝·科菲
local m=20066024
local cm=_G["c"..m]
Duel.LoadScript("c81000000.lua")
function cm.initial_effect(c)
--Activate
local e1=Effect.CreateEffect(c)
......
--埃莉丝·科菲 蘑菇头
local m=20066026
local cm=_G["c"..m]
Duel.LoadScript("c81000000.lua")
function cm.initial_effect(c)
--Activate
local e1=Effect.CreateEffect(c)
......@@ -70,7 +69,7 @@ function cm.aclimit(e,re,tp)
return re:IsActiveType(TYPE_MONSTER)
end
function cm.cfilter(c)
return c:IsFaceup() and c:IsType(TYPE_MONSTER) and not (c:IsType(TYPE_TOKEN) or c:IsType(TYPE_EFFECT))
return c:IsFaceup() and c:IsType(TYPE_MONSTER) and not c:IsType(TYPE_EFFECT)
end
function cm.condition(e,tp,eg,ep,ev,re,r,rp)
if not Duel.IsExistingMatchingCard(cm.cfilter,tp,LOCATION_MZONE,0,1,nil) then return false end
......
......@@ -71,7 +71,7 @@ function cm.aclimit(e,re,tp)
return re:IsActiveType(TYPE_MONSTER)
end
function cm.cfilter(c)
return c:IsFaceup() and c:IsType(TYPE_MONSTER) and not (c:IsType(TYPE_TOKEN) or c:IsType(TYPE_EFFECT))
return c:IsFaceup() and c:IsType(TYPE_MONSTER) and not c:IsType(TYPE_EFFECT)
end
function cm.condition(e,tp,eg,ep,ev,re,r,rp)
return Duel.IsExistingMatchingCard(cm.cfilter,tp,LOCATION_MZONE,0,1,nil)
......
......@@ -14,7 +14,6 @@ function c24865310.initial_effect(c)
e2:SetType(EFFECT_TYPE_IGNITION)
e2:SetRange(LOCATION_GRAVE)
e2:SetOperation(c24865310.dtop)
e2:SetCost(c24865310.discost)
c:RegisterEffect(e2)
end
function c24865310.thfilter(c)
......@@ -36,14 +35,12 @@ function c24865310.thop(e,tp,eg,ep,ev,re,r,rp)
Duel.Destroy(c,REASON_EFFECT)
end
end
function c24865310.discost(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 c24865310.dtop(e,tp,eg,ep,ev,re,r,rp)
Duel.RegisterFlagEffect(tp,24865312,RESET_EVENT+RESET_PHASE+PHASE_END,0,1)
if e:GetHandler():IsRelateToEffect(e) then
Duel.SendtoDeck(e:GetHandler(),nil,2,REASON_EFFECT)
Duel.Draw(tp,1,REASON_EFFECT)
end
end
function c24865310.atcd(e,tp,eg,ep,ev,re,r,rp)
......
......@@ -55,5 +55,6 @@ function c24865311.drop(e,tp,eg,ep,ev,re,r,rp)
local tc=Duel.GetFirstTarget()
if tc:IsRelateToEffect(e) and Duel.SendtoDeck(tc,nil,2,REASON_EFFECT)~=0 and tc:IsLocation(LOCATION_DECK) and c:IsRelateToEffect(e) then
Duel.SendtoDeck(c,nil,0,REASON_EFFECT)
Duel.Draw(tp,1,REASON_EFFECT)
end
end
\ No newline at end of file
......@@ -65,5 +65,6 @@ function cm.drop(e,tp,eg,ep,ev,re,r,rp)
local tc=Duel.GetFirstTarget()
if tc:IsRelateToEffect(e) and Duel.SendtoDeck(tc,nil,2,REASON_EFFECT)~=0 and tc:IsLocation(LOCATION_DECK) and c:IsRelateToEffect(e) then
Duel.SendtoDeck(c,nil,0,REASON_EFFECT)
Duel.Draw(tp,1,REASON_EFFECT)
end
end
\ No newline at end of file
......@@ -160,5 +160,6 @@ function c24865313.drop(e,tp,eg,ep,ev,re,r,rp)
local tc=Duel.GetFirstTarget()
if tc:IsRelateToEffect(e) and Duel.SendtoDeck(tc,nil,2,REASON_EFFECT)~=0 and tc:IsLocation(LOCATION_DECK) and c:IsRelateToEffect(e) then
Duel.SendtoDeck(c,nil,0,REASON_EFFECT)
Duel.Draw(tp,1,REASON_EFFECT)
end
end
\ No newline at end of file
......@@ -2,12 +2,6 @@
local m=24865314
local cm=_G["c"..m]
function c24865314.initial_effect(c)
local e0=Effect.CreateEffect(c)
e0:SetType(EFFECT_TYPE_SINGLE)
e0:SetProperty(EFFECT_FLAG_CANNOT_DISABLE+EFFECT_FLAG_UNCOPYABLE)
e0:SetCode(EFFECT_CANNOT_BE_LINK_MATERIAL)
e0:SetValue(1)
c:RegisterEffect(e0)
local e1=Effect.CreateEffect(c)
e1:SetDescription(aux.Stringid(24865314,0))
e1:SetType(EFFECT_TYPE_QUICK_O)
......
......@@ -2,12 +2,7 @@
local m=24865315
local cm=_G["c"..m]
function c24865315.initial_effect(c)
e0=Effect.CreateEffect(c)
e0:SetType(EFFECT_TYPE_SINGLE)
e0:SetProperty(EFFECT_FLAG_CANNOT_DISABLE+EFFECT_FLAG_UNCOPYABLE)
e0:SetCode(EFFECT_CANNOT_BE_LINK_MATERIAL)
e0:SetValue(1)
c:RegisterEffect(e0)
local e1=Effect.CreateEffect(c)
e1:SetDescription(aux.Stringid(24865315,0))
e1:SetCategory(CATEGORY_SPECIAL_SUMMON+CATEGORY_TOKEN)
......
......@@ -2,12 +2,7 @@
local m=24865316
local cm=_G["c"..m]
function c24865316.initial_effect(c)
e0=Effect.CreateEffect(c)
e0:SetType(EFFECT_TYPE_SINGLE)
e0:SetProperty(EFFECT_FLAG_CANNOT_DISABLE+EFFECT_FLAG_UNCOPYABLE)
e0:SetCode(EFFECT_CANNOT_BE_LINK_MATERIAL)
e0:SetValue(1)
c:RegisterEffect(e0)
local e1=Effect.CreateEffect(c)
e1:SetDescription(aux.Stringid(24865316,0))
e1:SetCategory(CATEGORY_SPECIAL_SUMMON+CATEGORY_TOKEN)
......
......@@ -2,12 +2,7 @@
local m=24865317
local cm=_G["c"..m]
function c24865317.initial_effect(c)
e0=Effect.CreateEffect(c)
e0:SetType(EFFECT_TYPE_SINGLE)
e0:SetProperty(EFFECT_FLAG_CANNOT_DISABLE+EFFECT_FLAG_UNCOPYABLE)
e0:SetCode(EFFECT_CANNOT_BE_LINK_MATERIAL)
e0:SetValue(1)
c:RegisterEffect(e0)
local e1=Effect.CreateEffect(c)
e1:SetDescription(aux.Stringid(24865317,0))
e1:SetType(EFFECT_TYPE_QUICK_O)
......
......@@ -2,12 +2,7 @@
local m=24865318
local cm=_G["c"..m]
function c24865318.initial_effect(c)
local e0=Effect.CreateEffect(c)
e0:SetType(EFFECT_TYPE_SINGLE)
e0:SetProperty(EFFECT_FLAG_CANNOT_DISABLE+EFFECT_FLAG_UNCOPYABLE)
e0:SetCode(EFFECT_CANNOT_BE_LINK_MATERIAL)
e0:SetValue(1)
c:RegisterEffect(e0)
local e1=Effect.CreateEffect(c)
e1:SetDescription(aux.Stringid(24865318,0))
e1:SetCategory(CATEGORY_SPECIAL_SUMMON+CATEGORY_TOKEN)
......
......@@ -2,12 +2,6 @@
local m=24865321
local cm=_G["c"..m]
function c24865321.initial_effect(c)
e0=Effect.CreateEffect(c)
e0:SetType(EFFECT_TYPE_SINGLE)
e0:SetProperty(EFFECT_FLAG_CANNOT_DISABLE+EFFECT_FLAG_UNCOPYABLE)
e0:SetCode(EFFECT_CANNOT_BE_LINK_MATERIAL)
e0:SetValue(1)
c:RegisterEffect(e0)
local e1=Effect.CreateEffect(c)
e1:SetDescription(aux.Stringid(24865321,0))
e1:SetCategory(CATEGORY_SPECIAL_SUMMON+CATEGORY_TOKEN)
......
......@@ -14,7 +14,7 @@ function c24865322.initial_effect(c)
e2:SetCategory(CATEGORY_TODECK)
e2:SetRange(LOCATION_GRAVE)
e2:SetProperty(EFFECT_FLAG_CARD_TARGET)
e2:SetCountLimit(1,24865323)
e2:SetCountLimit(1,24865322)
e2:SetTarget(c24865322.drtg)
e2:SetOperation(c24865322.drop)
c:RegisterEffect(e2)
......@@ -47,6 +47,7 @@ function c24865322.drop(e,tp,eg,ep,ev,re,r,rp)
local tc=Duel.GetFirstTarget()
if tc:IsRelateToEffect(e) and Duel.SendtoDeck(tc,nil,2,REASON_EFFECT)~=0 and tc:IsLocation(LOCATION_DECK) and c:IsRelateToEffect(e) then
Duel.SendtoDeck(c,nil,0,REASON_EFFECT)
Duel.Draw(tp,1,REASON_EFFECT)
end
end
function c24865322.drtg(e,tp,eg,ep,ev,re,r,rp,chk,chkc)
......
--柏拉图水晶的狂信徒
local m=24865331
local cm=_G["c"..m]
--量子妖海暴涨
function c24865331.initial_effect(c)
local e1=Effect.CreateEffect(c)
e1:SetDescription(aux.Stringid(m,0))
e1:SetCategory(CATEGORY_SPECIAL_SUMMON)
e1:SetType(EFFECT_TYPE_IGNITION)
e1:SetRange(LOCATION_HAND)
e1:SetCountLimit(1,m)
e1:SetCost(cm.spcost)
e1:SetTarget(cm.sptg)
e1:SetOperation(cm.spop)
c:RegisterEffect(e1)
local e3=Effect.CreateEffect(c)
e3:SetDescription(aux.Stringid(24865331,0))
e3:SetType(EFFECT_TYPE_ACTIVATE)
e3:SetRange(LOCATION_SZONE)
e3:SetProperty(EFFECT_FLAG_CARD_TARGET+CATEGORY_TOGRAVE)
e3:SetCode(EVENT_FREE_CHAIN)
e3:SetCountLimit(1,24865331)
e3:SetTarget(c24865331.mttg)
e3:SetOperation(c24865331.mtop)
c:RegisterEffect(e3)
local e2=Effect.CreateEffect(c)
e2:SetDescription(aux.Stringid(m,1))
e2:SetType(EFFECT_TYPE_SINGLE+EFFECT_TYPE_TRIGGER_O)
e2:SetProperty(EFFECT_FLAG_DELAY)
e2:SetCountLimit(1,m+100)
e2:SetCode(EVENT_SPSUMMON_SUCCESS)
e2:SetOperation(cm.lvop)
e2:SetType(EFFECT_TYPE_QUICK_O)
e2:SetCategory(CATEGORY_TODECK)
e2:SetCountLimit(1,24865331)
e2:SetCode(EVENT_FREE_CHAIN)
e2:SetRange(LOCATION_GRAVE)
e2:SetProperty(EFFECT_FLAG_CARD_TARGET)
e2:SetTarget(c24865331.drtg)
e2:SetOperation(c24865331.drop)
c:RegisterEffect(e2)
local e3=e2:Clone()
e3:SetCode(EVENT_SUMMON_SUCCESS)
c:RegisterEffect(e3)
local e4=Effect.CreateEffect(c)
e4:SetDescription(aux.Stringid(m,0))
e4:SetCategory(CATEGORY_SPECIAL_SUMMON)
e4:SetType(EFFECT_TYPE_IGNITION)
e4:SetRange(LOCATION_MZONE)
e4:SetCountLimit(1,m+200)
e4:SetTarget(cm.spntg)
e4:SetOperation(cm.spnop)
c:RegisterEffect(e4)
end
cm.Plato=true
function cm.spfilter(c)
return c:IsType(TYPE_MONSTER) and not c:IsPublic()
end
function cm.fselect(g,c)
local tp=c:GetControler()
return g:GetSum(Card.GetLevel)>=20 and Duel.GetLocationCount(tp,LOCATION_MZONE)>0
end
function cm.spcost(e,tp,eg,ep,ev,re,r,rp,chk)
local c=e:GetHandler()
local g=Duel.GetMatchingGroup(cm.spfilter,tp,LOCATION_HAND,0,nil)
if chk==0 then return g:CheckSubGroup(cm.fselect,1,#g,c) end
local sg=g:SelectWithSumGreater(tp,Card.GetLevel,20)
Duel.ConfirmCards(1-tp,sg)
Duel.ShuffleHand(tp)
function c24865331.filter1(c,e,tp,ct)
return c:IsFaceup() and c:IsType(TYPE_XYZ) and c:IsRank(9)
and Duel.IsExistingMatchingCard(c24865331.tfilter,tp,0,LOCATION_MZONE,ct,nil,e,tp,c)
end
function cm.sptg(e,tp,eg,ep,ev,re,r,rp,chk)
if chk==0 then return Duel.GetLocationCount(tp,LOCATION_MZONE)>0
and e:GetHandler():IsCanBeSpecialSummoned(e,0,tp,false,false) end
Duel.SetOperationInfo(0,CATEGORY_SPECIAL_SUMMON,e:GetHandler(),1,0,0)
function c24865331.tfilter(c,e,tp,tc)
return Duel.IsPlayerCanSendtoGrave(1-tp)
end
function cm.spop(e,tp,eg,ep,ev,re,r,rp)
local c=e:GetHandler()
if not c:IsRelateToEffect(e) then return end
Duel.SpecialSummon(c,0,tp,tp,false,false,POS_FACEUP)
function c24865331.mttg(e,tp,eg,ep,ev,re,r,rp,chk,chkc)
local ng=Duel.GetFieldGroup(tp,0,LOCATION_MZONE)
if chkc then return chkc:IsControler(tp) and chkc:IsLocation(LOCATION_MZONE) and c24865331.filter1(chkc,e,tp,e:GetLabel()) end
if chk==0 then return Duel.IsExistingTarget(c24865331.filter1,tp,LOCATION_MZONE,0,1,nil,e,tp) end
Duel.Hint(HINT_SELECTMSG,tp,HINTMSG_TARGET)
local g=Duel.SelectTarget(tp,c24865331.filter2,tp,LOCATION_MZONE,0,1,1,nil,e,tp)
local ct=ng:GetCount()-g:GetFirst():GetOverlayCount()
g:KeepAlive()
e:SetLabelObject(g:GetFirst())
e:SetLabel(ct)
end
--特招效果
function cm.lvop(e,tp,eg,ep,ev,re,r,rp)
local c=e:GetHandler()
if c:IsRelateToEffect(e) and c:IsFaceup() then
local e1=Effect.CreateEffect(c)
e1:SetType(EFFECT_TYPE_SINGLE)
e1:SetCode(EFFECT_CHANGE_LEVEL)
e1:SetValue(12)
e1:SetReset(RESET_EVENT+RESETS_STANDARD+RESET_DISABLE)
c:RegisterEffect(e1)
function c24865331.mtop(e,tp,eg,ep,ev,re,r,rp)
if not Duel.IsPlayerCanSendtoGrave(1-tp) then return end
local ng=e:GetLabelObject()
local g=Duel.GetFieldGroup(tp,0,LOCATION_MZONE)
local ct=ng:GetOverlayCount()
if ct>0 and ct<g:GetCount() then
Duel.Hint(HINT_SELECTMSG,1-tp,HINTMSG_TOGRAVE)
local sg=g:Select(1-tp,ct,ct,nil)
Duel.SendtoGrave(sg,REASON_RULE)
Duel.SendtoDeck(ng,nil,0,REASON_EFFECT)
end
end
--等级效果
function cm.spnfilter(c,e,tp)
return c.Plato and not c:IsCode(m) and c:IsCanBeSpecialSummoned(e,0,tp,false,false)
function c24865331.texfilter(c)
return (c:IsFaceup() or c:IsLocation(LOCATION_GRAVE)) and c:IsCode(24865310) and c:IsAbleToDeck()
end
function cm.spntg(e,tp,eg,ep,ev,re,r,rp,chk)
if chk==0 then return Duel.GetLocationCount(tp,LOCATION_MZONE)>0
and Duel.IsExistingMatchingCard(cm.spfilter,tp,LOCATION_GRAVE,0,1,nil,e,tp) end
Duel.SetOperationInfo(0,CATEGORY_SPECIAL_SUMMON,nil,1,tp,LOCATION_GRAVE)
function c24865331.drtg(e,tp,eg,ep,ev,re,r,rp,chk,chkc)
local c=e:GetHandler()
if chkc then return chkc:IsLocation(LOCATION_GRAVE) and chkc:IsControler(tp) and c24865331.texfilter(chkc) and chkc~=c end
if chk==0 then return Duel.IsExistingTarget(c24865331.texfilter,tp,LOCATION_GRAVE,0,1,c) and c:IsAbleToDeck() end
Duel.Hint(HINT_SELECTMSG,tp,HINTMSG_TARGET)
local g=Duel.SelectTarget(tp,c24865331.texfilter,tp,LOCATION_GRAVE,0,1,1,c)
Duel.SetOperationInfo(0,CATEGORY_TODECK,g,1,0,0)
Duel.SetOperationInfo(0,CATEGORY_TODECK,c,1,0,0)
end
function cm.spnop(e,tp,eg,ep,ev,re,r,rp)
if Duel.GetLocationCount(tp,LOCATION_MZONE)<=0 then return end
Duel.Hint(HINT_SELECTMSG,tp,HINTMSG_SPSUMMON)
local g=Duel.SelectMatchingCard(tp,cm.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)
function c24865331.drop(e,tp,eg,ep,ev,re,r,rp)
local c=e:GetHandler()
local tc=Duel.GetFirstTarget()
if tc:IsRelateToEffect(e) and Duel.SendtoDeck(tc,nil,2,REASON_EFFECT)~=0 and tc:IsLocation(LOCATION_DECK) and c:IsRelateToEffect(e) then
Duel.SendtoDeck(c,nil,0,REASON_EFFECT)
Duel.Draw(tp,1,REASON_EFFECT)
end
local e1=Effect.CreateEffect(e:GetHandler())
e1:SetType(EFFECT_TYPE_FIELD)
e1:SetProperty(EFFECT_FLAG_PLAYER_TARGET)
e1:SetCode(EFFECT_CANNOT_SPECIAL_SUMMON)
e1:SetTargetRange(1,0)
e1:SetTarget(cm.splimit)
e1:SetReset(RESET_PHASE+PHASE_END)
Duel.RegisterEffect(e1,tp)
end
function cm.splimit(e,c)
return not (c:GetLevel()%2==0) and not (c:GetRank()%2==0) and not (c:GetLink()%2==0)
end
\ No newline at end of file
......@@ -23,8 +23,7 @@ function cm.initial_effect(c)
e1:SetProperty(EFFECT_FLAG_DELAY)
e1:SetCode(EVENT_SPSUMMON_SUCCESS)
e1:SetCondition(cm.spcon)
e1:SetTarget(cm.sptg)
e1:SetOperation(cm.spop)
e1:SetTarget(cm.anctg)
c:RegisterEffect(e1)
local e2=Effect.CreateEffect(c)
e2:SetType(EFFECT_TYPE_SINGLE)
......@@ -39,7 +38,6 @@ function cm.initial_effect(c)
e32:SetType(EFFECT_TYPE_IGNITION)
e32:SetRange(LOCATION_GRAVE)
e32:SetCountLimit(1)
e32:SetCondition(cm.retcon)
e32:SetTarget(cm.rettg)
e32:SetOperation(cm.retop)
c:RegisterEffect(e32)
......@@ -55,27 +53,6 @@ function cm.initial_effect(c)
e12:SetTarget(cm.tetg)
e12:SetOperation(cm.teop)
c:RegisterEffect(e12)
if not cm.global_check then
cm.global_check=true
local ge1=Effect.CreateEffect(c)
ge1:SetType(EFFECT_TYPE_FIELD+EFFECT_TYPE_CONTINUOUS)
ge1:SetCode(EVENT_TO_GRAVE)
ge1:SetLabel(m)
ge1:SetProperty(EFFECT_FLAG_CANNOT_DISABLE)
ge1:SetOperation(cm.sumreg)
Duel.RegisterEffect(ge1,0)
end
end
function cm.sumreg(e,tp,eg,ep,ev,re,r,rp)
local tc=eg:GetFirst()
local code=e:GetLabel()
while tc do
if tc:GetOriginalCode()==code then
tc:RegisterFlagEffect(code,RESET_EVENT+0x1ec0000+RESET_PHASE+PHASE_END,0,1)
tc:RegisterFlagEffect(code,RESET_EVENT+0x1ec0000+RESET_PHASE+PHASE_END,EFFECT_FLAG_CLIENT_HINT,1,0,aux.Stringid(code,0))
end
tc=eg:GetNext()
end
end
function cm.ffilter(c,fc,sub,mg,sg)
if not sg then return true end
......@@ -86,7 +63,7 @@ function cm.ffilter(c,fc,sub,mg,sg)
end
function cm.matlimit(e,c,fc,st)
if st~=SUMMON_TYPE_FUSION then return true end
return c:IsLocation(LOCATION_HAND) or c:IsControler(fc:GetControler()) and c:IsOnField()
return c:IsLocation(LOCATION_HAND) or c:IsControler(fc:GetControler()) and c:IsOnField()
end
--Effect 1
function cm.valcheck(e,c)
......@@ -94,79 +71,48 @@ function cm.valcheck(e,c)
e:GetLabelObject():SetLabel(g)
end
function cm.spcon(e,tp,eg,ep,ev,re,r,rp)
return e:GetHandler():IsSummonType(SUMMON_TYPE_FUSION)
local g=e:GetLabel()
return e:GetHandler():IsSummonType(SUMMON_TYPE_FUSION) and g>4
end
function cm.tg(c,e)
return not c:IsImmuneToEffect(e)
end
function cm.sptg(e,tp,eg,ep,ev,re,r,rp,chk)
local ct=e:GetLabel()
local g=Duel.GetMatchingGroup(cm.tg,tp,LOCATION_ONFIELD+LOCATION_GRAVE+LOCATION_REMOVED,LOCATION_ONFIELD+LOCATION_GRAVE+LOCATION_REMOVED,e:GetHandler(),e)
if chk==0 then return ct>0 and #g>=ct end
Duel.SetChainLimit(aux.FALSE)
end
function cm.spop(e,tp,eg,ep,ev,re,r,rp)
local c=e:GetHandler()
local ct=e:GetLabel()
local sg=Duel.GetMatchingGroup(cm.tg,tp,LOCATION_ONFIELD+LOCATION_GRAVE+LOCATION_REMOVED,LOCATION_ONFIELD+LOCATION_GRAVE+LOCATION_REMOVED,e:GetHandler(),e)
if ct==0 or sg==0 then return end
if c:IsLocation(LOCATION_MZONE) and c:IsFaceup() then
local xg=Group.CreateGroup()
local mg=Group.CreateGroup()
local g=sg:Select(tp,ct,ct,nil)
local tc=g:GetFirst()
while tc do
if tc:IsControler(1-tp) then
tc:RegisterFlagEffect(m+100,RESET_EVENT+RESETS_STANDARD,0,1)
xg:AddCard(tc)
else
tc:RegisterFlagEffect(m+101,RESET_EVENT+RESETS_STANDARD,0,1)
mg:AddCard(tc)
end
tc=g:GetNext()
end
Duel.HintSelection(g)
if #xg>0 or #mg>0 then
local e2=Effect.CreateEffect(c)
e2:SetType(EFFECT_TYPE_FIELD)
e2:SetRange(LOCATION_MZONE)
e2:SetCode(EFFECT_CANNOT_ACTIVATE)
e2:SetProperty(EFFECT_FLAG_PLAYER_TARGET)
e2:SetTargetRange(0,1)
e2:SetValue(cm.aclimit)
e2:SetReset(RESET_EVENT+RESETS_STANDARD)
c:RegisterEffect(e2)
local e4=Effect.CreateEffect(c)
e4:SetType(EFFECT_TYPE_FIELD)
e4:SetCode(EFFECT_CANNOT_INACTIVATE)
e4:SetRange(LOCATION_MZONE)
e4:SetValue(cm.effectfilter)
e4:SetReset(RESET_EVENT+RESETS_STANDARD)
c:RegisterEffect(e4)
local e5=Effect.CreateEffect(c)
e5:SetType(EFFECT_TYPE_FIELD)
e5:SetCode(EFFECT_CANNOT_DISEFFECT)
e5:SetRange(LOCATION_MZONE)
e5:SetValue(cm.effectfilter)
e5:SetReset(RESET_EVENT+RESETS_STANDARD)
c:RegisterEffect(e5)
end
function cm.anctg(e,tp,eg,ep,ev,re,r,rp,chk)
if chk==0 then
return true
end
Duel.Hint(HINT_SELECTMSG,tp,HINTMSG_CODE)
local ac1=Duel.AnnounceCard(tp)
Duel.Hint(HINT_SELECTMSG,tp,HINTMSG_CODE)
local ac2=Duel.AnnounceCard(tp)
Duel.Hint(HINT_SELECTMSG,tp,HINTMSG_CODE)
local ac3=Duel.AnnounceCard(tp)
Duel.Hint(HINT_SELECTMSG,tp,HINTMSG_CODE)
local ac4=Duel.AnnounceCard(tp)
Duel.Hint(HINT_SELECTMSG,tp,HINTMSG_CODE)
local ac5=Duel.AnnounceCard(tp)
e:SetOperation(cm.codeop(ac1,ac2,ac3,ac4,ac5))
end
function cm.codeop(ac1,ac2,ac3,ac4,ac5)
return
function (e,tp,eg,ep,ev,re,r,rp)
local c=e:GetHandler()
local tsp=e:GetHandlerPlayer()
local e12=Effect.CreateEffect(c)
e12:SetType(EFFECT_TYPE_FIELD)
e12:SetRange(LOCATION_MZONE)
e12:SetCode(EFFECT_CANNOT_ACTIVATE)
e12:SetProperty(EFFECT_FLAG_PLAYER_TARGET)
e12:SetAbsoluteRange(tsp,0,1)
e12:SetLabel(ac1,ac2,ac3,ac4,ac5)
e12:SetValue(cm.aclimit)
e12:SetReset(RESET_EVENT+RESETS_STANDARD)
c:RegisterEffect(e12)
end
end
function cm.aclimit(e,re)
local c=re:GetHandler()
return c:GetFlagEffect(m+100)>0
end
function cm.effectfilter(e,ct)
local p=e:GetHandler():GetControler()
local te,tp=Duel.GetChainInfo(ct,CHAININFO_TRIGGERING_EFFECT,CHAININFO_TRIGGERING_PLAYER)
local c=te:GetHandler()
return p==tp and c:GetFlagEffect(m+101)>0
function cm.aclimit(e,re,tp)
local ac1,ac2,ac3,ac4,ac5=e:GetLabel()
local tc=re:GetHandler()
return tc:IsCode(ac1,ac2,ac3,ac4,ac5)
end
--Effect 2
function cm.retcon(e,tp,eg,ep,ev,re,r,rp)
return e:GetHandler():GetFlagEffect(m)>0
end
function cm.rettg(e,tp,eg,ep,ev,re,r,rp,chk)
if chk==0 then return e:GetHandler():IsAbleToExtra() end
Duel.SetOperationInfo(0,CATEGORY_TOEXTRA,e:GetHandler(),1,0,0)
......@@ -239,3 +185,4 @@ function cm.teop(e,tp,eg,ep,ev,re,r,rp)
end
end
--白雪安娜·转校生
--白雪安娜·幻舞
local m=33381018
local cm=_G["c"..m]
function cm.initial_effect(c)
--xyz summon
aux.AddXyzProcedure(c,nil,2,2,nil,nil,99)
--link summon
aux.AddLinkProcedure(c,aux.FilterBoolFunction(Card.IsLinkAttribute,ATTRIBUTE_WATER),2)
c:EnableReviveLimit()
--spsummon
--add counter
local e1=Effect.CreateEffect(c)
e1:SetCategory(CATEGORY_SPECIAL_SUMMON)
e1:SetDescription(aux.Stringid(m,0))
e1:SetCategory(CATEGORY_COUNTER)
e1:SetType(EFFECT_TYPE_QUICK_O)
e1:SetCode(EVENT_FREE_CHAIN)
e1:SetRange(LOCATION_MZONE)
e1:SetProperty(EFFECT_FLAG_CARD_TARGET)
e1:SetCountLimit(1,m)
e1:SetCost(cm.spcost)
e1:SetTarget(cm.sptg)
e1:SetOperation(cm.spop)
e1:SetHintTiming(0,TIMINGS_CHECK_MONSTER+TIMING_END_PHASE)
e1:SetCost(cm.ctcost)
e1:SetTarget(cm.cttg)
e1:SetOperation(cm.ctop)
c:RegisterEffect(e1)
--special summon
local e2=Effect.CreateEffect(c)
e2:SetCategory(CATEGORY_TOHAND+CATEGORY_SEARCH)
e2:SetType(EFFECT_TYPE_SINGLE+EFFECT_TYPE_TRIGGER_O)
e2:SetProperty(EFFECT_FLAG_DELAY)
e2:SetCode(EVENT_TO_GRAVE)
e2:SetCountLimit(1,m+900)
e2:SetCondition(cm.thcon)
e2:SetTarget(cm.thtg)
e2:SetOperation(cm.thop)
c:RegisterEffect(e2)
--to hand
local e3=Effect.CreateEffect(c)
e3:SetDescription(aux.Stringid(m,1))
e3:SetCategory(CATEGORY_TOHAND+CATEGORY_SEARCH)
e3:SetType(EFFECT_TYPE_IGNITION)
e3:SetCountLimit(1,m+900)
e3:SetRange(LOCATION_MZONE)
e3:SetTarget(cm.thtg)
e3:SetOperation(cm.thop)
c:RegisterEffect(e3)
end
cm.is_named_with_shirayukianna=1
function cm.spcost(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)
function cm.costfilter(c)
return c:IsType(TYPE_MONSTER) and c:IsAttribute(ATTRIBUTE_WATER) and c:IsLevelAbove(1) and c:IsDiscardable()
end
function cm.spfilter(c,e,tp)
return c:IsLevel(2) and c:IsCanBeSpecialSummoned(e,0,tp,false,false)
function cm.ctcost(e,tp,eg,ep,ev,re,r,rp,chk)
if chk==0 then return Duel.IsExistingMatchingCard(cm.costfilter,tp,LOCATION_HAND,0,1,nil) end
Duel.Hint(HINT_SELECTMSG,tp,HINTMSG_DISCARD)
local g=Duel.SelectMatchingCard(tp,cm.costfilter,tp,LOCATION_HAND,0,1,1,nil)
e:SetLabel(g:GetFirst():GetOriginalLevel())
Duel.SendtoGrave(g,REASON_COST+REASON_DISCARD)
end
function cm.sptg(e,tp,eg,ep,ev,re,r,rp,chk,chkc)
if chkc then return chkc:IsLocation(LOCATION_GRAVE) and chkc:IsControler(tp) and cm.spfilter(chkc,e,tp) end
if chk==0 then return Duel.GetLocationCount(tp,LOCATION_MZONE)>0
and Duel.IsExistingMatchingCard(cm.spfilter,tp,LOCATION_GRAVE,0,1,nil,e,tp) end
Duel.Hint(HINT_SELECTMSG,tp,HINTMSG_SPSUMMON)
local g=Duel.SelectTarget(tp,cm.spfilter,tp,LOCATION_GRAVE,0,1,1,nil,e,tp)
Duel.SetOperationInfo(0,CATEGORY_SPECIAL_SUMMON,g,1,0,0)
function cm.cttg(e,tp,eg,ep,ev,re,r,rp,chk)
if chk==0 then return Duel.IsExistingMatchingCard(Card.IsCanAddCounter,tp,LOCATION_MZONE,LOCATION_MZONE,1,nil,0x1015,1) end
Duel.SetOperationInfo(0,CATEGORY_COUNTER,nil,e:GetLabel(),0,0x1015)
end
function cm.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)
function cm.ctop(e,tp,eg,ep,ev,re,r,rp)
local ct=e:GetLabel()
local g=Duel.GetMatchingGroup(Card.IsCanAddCounter,tp,LOCATION_MZONE,LOCATION_MZONE,nil,0x1015,1)
if g:GetCount()==0 then return end
for i=1,ct do
Duel.Hint(HINT_SELECTMSG,tp,HINTMSG_COUNTER)
local sg=g:Select(tp,1,1,nil)
sg:GetFirst():AddCounter(0x1015,1)
end
end
function cm.thcon(e,tp,eg,ep,ev,re,r,rp)
local c=e:GetHandler()
return c:IsPreviousLocation(LOCATION_MZONE) and c:IsSummonType(SUMMON_TYPE_XYZ) and rp==1-tp and c:IsPreviousControler(tp)
end
function cm.thfilter(c)
return c:IsLevel(2) and c:IsAbleToHand()
function cm.thfilter1(c,tp)
local lv=c:GetLevel()
return (c:IsLocation(LOCATION_DECK) or (c:IsFaceup() and c:IsType(TYPE_PENDULUM))) and lv>0 and c:IsAttribute(ATTRIBUTE_WATER)
and Duel.IsCanRemoveCounter(tp,1,1,0x1015,lv,REASON_COST) and c:IsAbleToHand()
end
function cm.thtg(e,tp,eg,ep,ev,re,r,rp,chk)
if chk==0 then return Duel.IsExistingMatchingCard(cm.thfilter,tp,LOCATION_DECK,0,1,nil) end
Duel.SetOperationInfo(0,CATEGORY_TOHAND,nil,1,tp,LOCATION_DECK)
if chk==0 then return Duel.IsExistingMatchingCard(cm.thfilter1,tp,LOCATION_DECK+LOCATION_EXTRA,0,1,nil,tp) end
local g=Duel.GetMatchingGroup(cm.thfilter1,tp,LOCATION_DECK+LOCATION_EXTRA,0,nil,tp)
local lvt={}
local tc=g:GetFirst()
while tc do
local tlv=tc:GetLevel()
lvt[tlv]=tlv
tc=g:GetNext()
end
local pc=1
for i=1,12 do
if lvt[i] then lvt[i]=nil lvt[pc]=i pc=pc+1 end
end
lvt[pc]=nil
Duel.Hint(HINT_SELECTMSG,tp,aux.Stringid(m,1))
local lv=Duel.AnnounceNumber(tp,table.unpack(lvt))
Duel.RemoveCounter(tp,1,1,0x1015,lv,REASON_COST)
e:SetLabel(lv)
Duel.SetOperationInfo(0,CATEGORY_TOHAND,nil,1,tp,LOCATION_DECK+LOCATION_EXTRA)
end
function cm.thfilter2(c,lv)
return (c:IsLocation(LOCATION_DECK) or (c:IsFaceup() and c:IsType(TYPE_PENDULUM))) and c:IsAttribute(ATTRIBUTE_WATER)
and c:IsLevel(lv) and c:IsAbleToHand()
end
function cm.thop(e,tp,eg,ep,ev,re,r,rp)
local c=e:GetHandler()
local lv=e:GetLabel()
Duel.Hint(HINT_SELECTMSG,tp,HINTMSG_ATOHAND)
local g=Duel.SelectMatchingCard(tp,cm.thfilter,tp,LOCATION_DECK,0,1,1,nil)
local g=Duel.SelectMatchingCard(tp,cm.thfilter2,tp,LOCATION_DECK+LOCATION_EXTRA,0,1,1,nil,lv)
if g:GetCount()>0 then
Duel.SendtoHand(g,nil,REASON_EFFECT)
Duel.ConfirmCards(1-tp,g)
end
local e1=Effect.CreateEffect(c)
e1:SetType(EFFECT_TYPE_FIELD)
e1:SetProperty(EFFECT_FLAG_PLAYER_TARGET)
e1:SetCode(EFFECT_CANNOT_SUMMON)
e1:SetTargetRange(1,0)
e1:SetTarget(cm.splimit)
e1:SetReset(RESET_PHASE+PHASE_END)
Duel.RegisterEffect(e1,tp)
local e2=e1:Clone()
e2:SetCode(EFFECT_CANNOT_SPECIAL_SUMMON)
Duel.RegisterEffect(e2,tp)
end
function cm.splimit(e,c)
return not c:IsAttribute(ATTRIBUTE_WATER)
end
......@@ -3,8 +3,6 @@ local m=33400651
local cm=_G["c"..m]
function cm.initial_effect(c)
c:SetUniqueOnField(1,0,m)
cm.dfc_front_side=m
cm.dfc_back_side=m+1
--Activate
local e1=Effect.CreateEffect(c)
e1:SetType(EFFECT_TYPE_ACTIVATE)
......@@ -12,18 +10,26 @@ cm.dfc_back_side=m+1
c:RegisterEffect(e1)
--
local e2=Effect.CreateEffect(c)
e2:SetCategory(CATEGORY_TODECK+CATEGORY_DISABLE+CATEGORY_ATKCHANGE+CATEGORY_SPECIAL_SUMMON)
e2:SetDescription(aux.Stringid(m,5))
e2:SetCategory(CATEGORY_REMOVE+CATEGORY_DISABLE)
e2:SetType(EFFECT_TYPE_QUICK_O)
e2:SetRange(LOCATION_SZONE)
e2:SetCode(EVENT_FREE_CHAIN)
e2:SetCondition(cm.con)
e2:SetCountLimit(1,m)
e2:SetCost(cm.cost)
e2:SetOperation(cm.activate)
c:RegisterEffect(e2)
end
function cm.con(e,tp,eg,ep,ev,re,r,rp)
local c=e:GetHandler()
return not c:IsStatus(STATUS_CHAINING) and (Duel.GetFlagEffect(tp,m+70001)==0 or Duel.GetFlagEffect(tp,m+70002)==0 or Duel.GetFlagEffect(tp,m+70003)==0 or Duel.GetFlagEffect(tp,m+70004)==0 or Duel.GetFlagEffect(tp,m+70005)==0 ) and Duel.GetFlagEffect(tp,m+70006)<3
--change code
local e4=Effect.CreateEffect(c)
e4:SetDescription(aux.Stringid(m,4))
e4:SetType(EFFECT_TYPE_QUICK_O)
e4:SetCode(EVENT_FREE_CHAIN)
e4:SetRange(LOCATION_SZONE)
e4:SetCountLimit(1,m+10000)
e4:SetCondition(cm.changecon)
e4:SetTarget(cm.changetg)
e4:SetOperation(cm.changeop)
c:RegisterEffect(e4)
end
function cm.cfilter(c)
return c:IsSetCard(0x9342) and c:IsAbleToRemoveAsCost()
......@@ -35,37 +41,20 @@ function cm.cost(e,tp,eg,ep,ev,re,r,rp,chk)
local tc=g:GetFirst()
Duel.Remove(tc,POS_FACEUP,REASON_COST)
end
function cm.tdfilter(c)
return c:IsSetCard(0x9342) and c:IsAbleToDeck()
end
function cm.spfilter(c,e,tp)
return c:IsSetCard(0x341) and c:IsCanBeSpecialSummoned(e,0,tp,false,false)
end
function cm.activate(e,tp,eg,ep,ev,re,r,rp)
local c=e:GetHandler()
local op={}
local i=1
if Duel.GetFlagEffect(tp,m+70001)==0 then
op[i]=1
i=i+1
end
if Duel.GetFlagEffect(tp,m+70002)==0 and Duel.IsExistingMatchingCard(cm.tdfilter,tp,LOCATION_REMOVED,0,2,nil) and Duel.IsExistingMatchingCard(aux.disfilter1,tp,LOCATION_ONFIELD,LOCATION_ONFIELD,1,nil) then
if Duel.IsExistingMatchingCard(aux.disfilter1,tp,LOCATION_ONFIELD+LOCATION_GRAVE,LOCATION_ONFIELD+LOCATION_GRAVE,1,nil) then
op[i]=2
i=i+1
end
if Duel.GetFlagEffect(tp,m+70003)==0 and Duel.IsExistingMatchingCard(cm.tdfilter,tp,LOCATION_REMOVED,0,4,nil) and Duel.IsExistingMatchingCard(Card.IsFaceup,tp,LOCATION_MZONE,LOCATION_MZONE,1,nil) then
if Duel.IsExistingMatchingCard(Card.IsAbleToRemove,tp,LOCATION_ONFIELD+LOCATION_GRAVE,LOCATION_ONFIELD+LOCATION_GRAVE,1,nil) then
op[i]=3
i=i+1
end
if Duel.GetFlagEffect(tp,m+70004)==0 and Duel.GetLocationCount(tp,LOCATION_MZONE)>0
and Duel.IsExistingMatchingCard(cm.spfilter,tp,LOCATION_REMOVED,0,1,nil,e,tp) then
op[i]=4
i=i+1
end
if Duel.GetFlagEffect(tp,m+70005)==0 and c.dfc_back_side and c.dfc_front_side==c:GetOriginalCode() then
op[i]=5
i=i+1
end
if i==2 then
op1=1
end
......@@ -76,26 +65,13 @@ local c=e:GetHandler()
if i==4 then
Duel.Hint(HINT_SELECTMSG,tp,aux.Stringid(m,0))
op1=Duel.SelectOption(tp,aux.Stringid(m,op[1]),aux.Stringid(m,op[2]),aux.Stringid(m,op[3]))+1
end
if i==5 then
Duel.Hint(HINT_SELECTMSG,tp,aux.Stringid(m,0))
op1=Duel.SelectOption(tp,aux.Stringid(m,op[1]),aux.Stringid(m,op[2]),aux.Stringid(m,op[3]),aux.Stringid(m,op[4]))+1
end
if i==6 then
Duel.Hint(HINT_SELECTMSG,tp,aux.Stringid(m,0))
op1=Duel.SelectOption(tp,aux.Stringid(m,op[1]),aux.Stringid(m,op[2]),aux.Stringid(m,op[3]),aux.Stringid(m,op[4]),aux.Stringid(m,op[5]))+1
end
if op[op1]==1 then
Duel.RegisterFlagEffect(tp,m+60000,RESET_EVENT+RESET_PHASE+PHASE_END,0,0)
Duel.RegisterFlagEffect(tp,m+70001,RESET_EVENT+RESET_PHASE+PHASE_END,0,0)
Duel.RegisterFlagEffect(tp,m+70006,RESET_EVENT+RESET_PHASE+PHASE_END,0,0)
end
if op[op1]==2 then
Duel.Hint(HINT_SELECTMSG,tp,HINTMSG_TODECK)
local tdc=Duel.SelectMatchingCard(tp,cm.tdfilter,tp,LOCATION_REMOVED,0,2,2,nil)
Duel.SendtoDeck(tdc,tp,2,REASON_EFFECT)
Duel.Hint(HINT_SELECTMSG,tp,HINTMSG_FACEUP)
local disg=Duel.SelectMatchingCard(tp,aux.disfilter1,tp,LOCATION_ONFIELD,LOCATION_ONFIELD,1,1,nil)
local disg=Duel.SelectMatchingCard(tp,aux.disfilter1,tp,LOCATION_ONFIELD+LOCATION_GRAVE,LOCATION_ONFIELD+LOCATION_GRAVE,1,1,nil)
local disc=disg:GetFirst()
local e1=Effect.CreateEffect(c)
e1:SetType(EFFECT_TYPE_FIELD)
......@@ -113,56 +89,12 @@ local c=e:GetHandler()
e2:SetLabelObject(disc)
e2:SetReset(RESET_PHASE+PHASE_END)
Duel.RegisterEffect(e2,tp)
Duel.RegisterFlagEffect(tp,m+70002,RESET_EVENT+RESET_PHASE+PHASE_END,0,0)
Duel.RegisterFlagEffect(tp,m+70006,RESET_EVENT+RESET_PHASE+PHASE_END,0,0)
end
if op[op1]==3 then
Duel.Hint(HINT_SELECTMSG,tp,HINTMSG_TODECK)
local tdc=Duel.SelectMatchingCard(tp,cm.tdfilter,tp,LOCATION_REMOVED,0,4,4,nil)
Duel.SendtoDeck(tdc,tp,2,REASON_EFFECT)
Duel.Hint(HINT_SELECTMSG,tp,HINTMSG_FACEUP)
local disg=Duel.SelectMatchingCard(tp,Card.IsFaceup,tp,LOCATION_MZONE,LOCATION_MZONE,1,1,nil)
local tc=disg:GetFirst()
local e1=Effect.CreateEffect(c)
e1:SetType(EFFECT_TYPE_SINGLE)
e1:SetCode(EFFECT_SET_ATTACK_FINAL)
e1:SetValue(tc:GetBaseAttack()*2)
e1:SetReset(RESET_EVENT+RESETS_STANDARD+RESET_PHASE+PHASE_END)
tc:RegisterEffect(e1)
local e2=Effect.CreateEffect(c)
e2:SetType(EFFECT_TYPE_SINGLE)
e2:SetCode(EFFECT_SET_DEFENSE_FINAL)
e2:SetValue(tc:GetBaseDefense()*2)
e2:SetReset(RESET_EVENT+RESETS_STANDARD+RESET_PHASE+PHASE_END)
tc:RegisterEffect(e2)
Duel.RegisterFlagEffect(tp,m+70003,RESET_EVENT+RESET_PHASE+PHASE_END,0,0)
Duel.RegisterFlagEffect(tp,m+70006,RESET_EVENT+RESET_PHASE+PHASE_END,0,0)
end
if op[op1]==4 then
Duel.Hint(HINT_SELECTMSG,tp,HINTMSG_SPSUMMON)
local tg=Duel.SelectMatchingCard(tp,cm.spfilter,tp,LOCATION_REMOVED,0,1,1,nil,e,tp)
Duel.SpecialSummon(tg,0,tp,tp,false,false,POS_FACEUP)
local tc=tg:GetFirst()
local e1=Effect.CreateEffect(c)
e1:SetType(EFFECT_TYPE_SINGLE)
e1:SetCode(EFFECT_DISABLE)
e1:SetReset(RESET_EVENT+RESETS_STANDARD)
tc:RegisterEffect(e1)
local e2=Effect.CreateEffect(c)
e2:SetType(EFFECT_TYPE_SINGLE)
e2:SetCode(EFFECT_DISABLE_EFFECT)
e2:SetReset(RESET_EVENT+RESETS_STANDARD)
tc:RegisterEffect(e2)
Duel.RegisterFlagEffect(tp,m+70004,RESET_EVENT+RESET_PHASE+PHASE_END,0,0)
Duel.RegisterFlagEffect(tp,m+70006,RESET_EVENT+RESET_PHASE+PHASE_END,0,0)
if op[op1]==3 then
Duel.Hint(HINT_SELECTMSG,tp,HINTMSG_REMOVE)
local rg=Duel.SelectMatchingCard(tp,Card.IsAbleToRemove,tp,LOCATION_ONFIELD+LOCATION_GRAVE,LOCATION_ONFIELD+LOCATION_GRAVE,1,1,nil)
Duel.Remove(rg,POS_FACEUP,REASON_EFFECT)
end
if op[op1]==5 then
local tcode=c.dfc_back_side
c:SetEntityCode(tcode,true)
c:ReplaceEffect(tcode,0,0)
Duel.RegisterFlagEffect(tp,m+70005,RESET_EVENT+RESET_PHASE+PHASE_END,0,0)
Duel.RegisterFlagEffect(tp,m+70006,RESET_EVENT+RESET_PHASE+PHASE_END,0,0)
end
end
function cm.distg(e,c)
local tc=e:GetLabelObject()
......@@ -174,4 +106,22 @@ function cm.discon(e,tp,eg,ep,ev,re,r,rp)
end
function cm.disop(e,tp,eg,ep,ev,re,r,rp)
Duel.NegateEffect(ev)
end
function cm.filter4(c)
return c:IsFaceup() and c:IsSetCard(0x9342) and c:IsType(TYPE_XYZ)
end
function cm.changecon(e,tp,eg,ep,ev,re,r,rp)
return Duel.IsExistingMatchingCard(cm.filter4,tp,LOCATION_MZONE,0,1,nil)
end
function cm.changetg(e,tp,eg,ep,ev,re,r,rp,chk)
local c=e:GetHandler()
if chk==0 then return m+1 and m==c:GetOriginalCode() end
Duel.Hint(HINT_OPSELECTED,1-tp,e:GetDescription())
end
function cm.changeop(e,tp,eg,ep,ev,re,r,rp,chk)
local c=e:GetHandler()
if not c:IsRelateToEffect(e) or c:IsFacedown() or c:IsImmuneToEffect(e) then return end
c:SetEntityCode(m+1,true)
c:ReplaceEffect(m+1,0,0)
end
\ No newline at end of file
......@@ -3,8 +3,6 @@ local m=33400652
local cm=_G["c"..m]
function cm.initial_effect(c)
c:SetUniqueOnField(1,0,m)
cm.dfc_front_side=33400651
cm.dfc_back_side=33400652
--Activate
local e10=Effect.CreateEffect(c)
e10:SetType(EFFECT_TYPE_ACTIVATE)
......@@ -12,15 +10,25 @@ cm.dfc_back_side=33400652
c:RegisterEffect(e10)
--
local e2=Effect.CreateEffect(c)
e2:SetDescription(aux.Stringid(m,1))
e2:SetCategory(CATEGORY_TODECK+CATEGORY_DISABLE+CATEGORY_ATKCHANGE+CATEGORY_SPECIAL_SUMMON)
e2:SetDescription(aux.Stringid(m,4))
e2:SetCategory(CATEGORY_TODECK+CATEGORY_ATKCHANGE)
e2:SetType(EFFECT_TYPE_QUICK_O)
e2:SetRange(LOCATION_SZONE)
e2:SetCode(EVENT_FREE_CHAIN)
e2:SetCondition(cm.con)
e2:SetCountLimit(1,m)
e2:SetCost(cm.cost)
e2:SetOperation(cm.activate)
c:RegisterEffect(e2)
--change code
local e4=Effect.CreateEffect(c)
e4:SetDescription(aux.Stringid(m,3))
e4:SetType(EFFECT_TYPE_QUICK_O)
e4:SetCode(EVENT_FREE_CHAIN)
e4:SetRange(LOCATION_SZONE)
e4:SetCountLimit(1,m+10000)
e4:SetTarget(cm.changetg)
e4:SetOperation(cm.changeop)
c:RegisterEffect(e4)
--back
local e9=Effect.CreateEffect(c)
e9:SetType(EFFECT_TYPE_FIELD+EFFECT_TYPE_CONTINUOUS)
......@@ -31,10 +39,6 @@ cm.dfc_back_side=33400652
e9:SetOperation(cm.backop)
c:RegisterEffect(e9)
end
function cm.con(e,tp,eg,ep,ev,re,r,rp)
local c=e:GetHandler()
return not c:IsStatus(STATUS_CHAINING) and (Duel.GetFlagEffect(tp,m+80001)==0 or Duel.GetFlagEffect(tp,m+80002)==0 or Duel.GetFlagEffect(tp,m+80003)==0 )
end
function cm.cfilter(c)
return c:IsSetCard(0x9342) and c:IsAbleToRemoveAsCost()
end
......@@ -47,47 +51,21 @@ end
function cm.tdfilter(c)
return c:IsSetCard(0x9342) and c:IsAbleToDeck()
end
function cm.spfilter(c,e,tp)
return c:IsSetCard(0x341) and c:IsCanBeSpecialSummoned(e,0,tp,false,false)
end
function cm.stfilter(c)
return c:IsSetCard(0x341) and c:IsType(TYPE_XYZ)
return c:IsSetCard(0x341) and c:IsFaceup()
end
function cm.activate(e,tp,eg,ep,ev,re,r,rp)
local c=e:GetHandler()
local op={}
local i=1
if Duel.GetFlagEffect(tp,m+80001)==0 and Duel.IsExistingMatchingCard(cm.stfilter,tp,LOCATION_MZONE,0,1,nil) and Duel.IsExistingMatchingCard(cm.tdfilter,tp,LOCATION_REMOVED,0,4,nil) then
op[i]=1
i=i+1
end
if Duel.GetFlagEffect(tp,m+80002)==0 and Duel.IsExistingMatchingCard(cm.stfilter,tp,LOCATION_MZONE,0,1,nil) and Duel.IsExistingMatchingCard(cm.tdfilter,tp,LOCATION_REMOVED,0,4,nil) then
op[i]=2
i=i+1
end
if Duel.GetFlagEffect(tp,m+80003)==0 and 33400651 and c:GetOriginalCode()==33400652 then
op[i]=3
i=i+1
end
if i==2 then
op1=1
end
if i==3 then
Duel.Hint(HINT_SELECTMSG,tp,aux.Stringid(m,0))
op1=Duel.SelectOption(tp,aux.Stringid(m,op[1]),aux.Stringid(m,op[2]))+1
end
if i==4 then
Duel.Hint(HINT_SELECTMSG,tp,aux.Stringid(m,0))
op1=Duel.SelectOption(tp,aux.Stringid(m,op[1]),aux.Stringid(m,op[2]),aux.Stringid(m,op[3]))+1
end
if op[op1]==1 then
Duel.Hint(HINT_SELECTMSG,tp,HINTMSG_TODECK)
local tdc=Duel.SelectMatchingCard(tp,cm.tdfilter,tp,LOCATION_REMOVED,0,4,4,nil)
Duel.SendtoDeck(tdc,tp,2,REASON_EFFECT)
Duel.Hint(HINT_SELECTMSG,tp,HINTMSG_FACEUP)
local tg=Duel.SelectMatchingCard(tp,cm.stfilter,tp,LOCATION_MZONE,LOCATION_MZONE,1,1,nil)
local tc=tg:GetFirst()
if not (Duel.IsExistingMatchingCard(cm.stfilter,tp,LOCATION_MZONE,0,1,nil) and Duel.IsExistingMatchingCard(cm.tdfilter,tp,LOCATION_REMOVED,0,6,nil)) then return end
Duel.Hint(HINT_SELECTMSG,tp,HINTMSG_TODECK)
local tdc=Duel.SelectMatchingCard(tp,cm.tdfilter,tp,LOCATION_REMOVED,0,6,6,nil)
Duel.SendtoDeck(tdc,tp,2,REASON_EFFECT)
Duel.Hint(HINT_SELECTMSG,tp,HINTMSG_FACEUP)
local tg=Duel.SelectMatchingCard(tp,cm.stfilter,tp,LOCATION_MZONE,0,1,1,nil)
local tc=tg:GetFirst()
Duel.Hint(HINT_SELECTMSG,tp,aux.Stringid(m,0))
local op1=Duel.SelectOption(tp,aux.Stringid(m,1),aux.Stringid(m,2),aux.Stringid(m,5))+1
if op1==1 then
local e1=Effect.CreateEffect(c)
e1:SetType(EFFECT_TYPE_SINGLE)
e1:SetCode(EFFECT_SET_ATTACK_FINAL)
......@@ -99,16 +77,20 @@ local c=e:GetHandler()
e2:SetCode(EFFECT_SET_DEFENSE_FINAL)
e2:SetValue(tc:GetDefense()*2)
e2:SetReset(RESET_EVENT+RESETS_STANDARD+RESET_PHASE+PHASE_END)
tc:RegisterEffect(e2)
Duel.RegisterFlagEffect(tp,m+80001,RESET_EVENT+RESET_PHASE+PHASE_END,0,0)
tc:RegisterEffect(e2)
--actlimit
local e3=Effect.CreateEffect(c)
e3:SetType(EFFECT_TYPE_FIELD)
e3:SetProperty(EFFECT_FLAG_PLAYER_TARGET)
e3:SetCode(EFFECT_CANNOT_ACTIVATE)
e3:SetRange(LOCATION_MZONE)
e3:SetTargetRange(0,1)
e3:SetValue(1)
e3:SetCondition(cm.actcon)
e3:SetReset(RESET_EVENT+RESETS_STANDARD+RESET_PHASE+PHASE_END)
tc:RegisterEffect(e3)
end
if op[op1]==2 then
Duel.Hint(HINT_SELECTMSG,tp,HINTMSG_TODECK)
local tdc=Duel.SelectMatchingCard(tp,cm.tdfilter,tp,LOCATION_REMOVED,0,4,4,nil)
Duel.SendtoDeck(tdc,tp,2,REASON_EFFECT)
Duel.Hint(HINT_SELECTMSG,tp,HINTMSG_FACEUP)
local tg=Duel.SelectMatchingCard(tp,cm.stfilter,tp,LOCATION_MZONE,0,1,1,nil)
local tc=tg:GetFirst()
if op1==2 then
local e1=Effect.CreateEffect(c)
e1:SetType(EFFECT_TYPE_SINGLE)
e1:SetCode(EFFECT_ATTACK_ALL)
......@@ -122,24 +104,45 @@ Duel.RegisterFlagEffect(tp,m+80001,RESET_EVENT+RESET_PHASE+PHASE_END,0,0)
e2:SetCode(EFFECT_PIERCE)
e2:SetReset(RESET_EVENT+RESETS_STANDARD+RESET_PHASE+PHASE_END)
tc:RegisterEffect(e2)
Duel.RegisterFlagEffect(tp,m+80002,RESET_EVENT+RESET_PHASE+PHASE_END,0,0)
end
if op[op1]==3 then
c:SetEntityCode(33400651,true)
c:ReplaceEffect(33400651,0,0)
Duel.RegisterFlagEffect(tp,m+80003,RESET_EVENT+RESET_PHASE+PHASE_END,0,0)
if op1==3 then
local e1=Effect.CreateEffect(c)
e1:SetType(EFFECT_TYPE_SINGLE)
e1:SetProperty(EFFECT_FLAG_SINGLE_RANGE)
e1:SetRange(LOCATION_MZONE)
e1:SetCode(EFFECT_IMMUNE_EFFECT)
e1:SetReset(RESET_EVENT+RESETS_STANDARD+RESET_PHASE+PHASE_END)
e1:SetValue(cm.efilter)
e1:SetOwnerPlayer(tp)
tc:RegisterEffect(e1,true)
local e2=Effect.CreateEffect(c)
e2:SetType(EFFECT_TYPE_SINGLE)
e2:SetCode(EFFECT_DIRECT_ATTACK)
e2:SetCondition(cm.dircon)
e2:SetReset(RESET_EVENT+RESETS_STANDARD+RESET_PHASE+PHASE_END)
tc:RegisterEffect(e2)
end
end
function cm.distg(e,c)
local tc=e:GetLabelObject()
return c:IsOriginalCodeRule(tc:GetOriginalCodeRule())
function cm.actcon(e)
return Duel.GetAttacker()==e:GetHandler() or Duel.GetAttackTarget()==e:GetHandler()
end
function cm.discon(e,tp,eg,ep,ev,re,r,rp)
local tc=e:GetLabelObject()
return re:GetHandler():IsOriginalCodeRule(tc:GetOriginalCodeRule())
function cm.efilter(e,re)
return e:GetOwnerPlayer()~=re:GetOwnerPlayer()
end
function cm.disop(e,tp,eg,ep,ev,re,r,rp)
Duel.NegateEffect(ev)
function cm.dircon(e)
return e:GetHandler():GetControler()==e:GetOwnerPlayer()
end
function cm.changetg(e,tp,eg,ep,ev,re,r,rp,chk)
local c=e:GetHandler()
if chk==0 then return m-1 and m==c:GetOriginalCode() end
Duel.Hint(HINT_OPSELECTED,1-tp,e:GetDescription())
end
function cm.changeop(e,tp,eg,ep,ev,re,r,rp,chk)
local c=e:GetHandler()
if not c:IsRelateToEffect(e) or c:IsFacedown() or c:IsImmuneToEffect(e) then return end
c:SetEntityCode(m-1,true)
c:ReplaceEffect(m-1,0,0)
end
function cm.backon(e,tp,eg,ep,ev,re,r,rp)
......
......@@ -2,16 +2,18 @@
local m=33401005
local cm=_G["c"..m]
function cm.initial_effect(c)
--destroy replace
local e2=Effect.CreateEffect(c)
e2:SetType(EFFECT_TYPE_FIELD+EFFECT_TYPE_CONTINUOUS)
e2:SetCode(EFFECT_DESTROY_REPLACE)
e2:SetRange(LOCATION_HAND+LOCATION_MZONE)
e2:SetCountLimit(1,m)
e2:SetTarget(cm.reptg)
e2:SetValue(cm.repval)
e2:SetOperation(cm.repop)
c:RegisterEffect(e2)
--
local e1=Effect.CreateEffect(c)
e1:SetDescription(aux.Stringid(m,0))
e1:SetCategory(CATEGORY_DESTROY)
e1:SetType(EFFECT_TYPE_QUICK_O)
e1:SetCode(EVENT_CHAINING)
e1:SetRange(LOCATION_MZONE+LOCATION_HAND)
e1:SetCountLimit(1,m)
e1:SetCondition(cm.condition)
e1:SetTarget(cm.target)
e1:SetOperation(cm.activate)
c:RegisterEffect(e1)
--sps
local e3=Effect.CreateEffect(c)
e3:SetDescription(aux.Stringid(m,1))
......@@ -24,19 +26,40 @@ function cm.initial_effect(c)
e3:SetOperation(cm.srop)
c:RegisterEffect(e3)
end
function cm.repfilter(c,tp)
return c:IsFaceup() and c:IsSetCard(0x9341)
and c:IsOnField() and c:IsControler(tp) and c:IsReason(REASON_EFFECT+REASON_BATTLE) and not c:IsReason(REASON_REPLACE)
function cm.condition(e,tp,eg,ep,ev,re,r,rp)
return rp==1-tp
end
function cm.reptg(e,tp,eg,ep,ev,re,r,rp,chk)
if chk==0 then return e:GetHandler():IsAbleToRemove() and eg:IsExists(cm.repfilter,1,e:GetHandler():IsCode(m),tp) end
return Duel.SelectEffectYesNo(tp,e:GetHandler(),96)
function cm.target(e,tp,eg,ep,ev,re,r,rp,chk)
Duel.SetOperationInfo(0,CATEGORY_DESTROY,e:GetHandler(),1,0,0)
end
function cm.repval(e,c)
return cm.repfilter(c,e:GetHandlerPlayer())
function cm.ckfilter1(c)
return c:IsSetCard(0x9341) and c:IsFaceup()
end
function cm.repop(e,tp,eg,ep,ev,re,r,rp)
Duel.Destroy(e:GetHandler(),REASON_EFFECT)
function cm.activate(e,tp,eg,ep,ev,re,r,rp)
local c=e:GetHandler()
local g2=Duel.GetMatchingGroup(cm.ckfilter1,tp,LOCATION_ONFIELD,0,nil)
local tc=g2:GetFirst()
while tc do
local e4=Effect.CreateEffect(e:GetHandler())
e4:SetType(EFFECT_TYPE_SINGLE)
e4:SetCode(EFFECT_IMMUNE_EFFECT)
e4:SetValue(cm.efilter)
e4:SetReset(RESET_EVENT+0x1fe0000+RESET_CHAIN)
e4:SetOwnerPlayer(tp)
tc:RegisterEffect(e4)
tc=g2:GetNext()
end
local e1=Effect.CreateEffect(e:GetHandler())
e1:SetType(EFFECT_TYPE_FIELD)
e1:SetCode(EFFECT_CANNOT_REMOVE)
e1:SetProperty(EFFECT_FLAG_PLAYER_TARGET)
e1:SetTargetRange(0,1)
e1:SetValue(1)
e1:SetReset(RESET_CHAIN)
Duel.RegisterEffect(e1,tp)
if c:IsRelateToEffect(e) then
Duel.Destroy(c,REASON_EFFECT)
end
end
function cm.srtg(e,tp,eg,ep,ev,re,r,rp,chk)
......
......@@ -15,12 +15,11 @@ c:EnableReviveLimit()
--Destroy all
local e1=Effect.CreateEffect(c)
e1:SetDescription(aux.Stringid(m,0))
e1:SetType(EFFECT_TYPE_FIELD+EFFECT_TYPE_TRIGGER_O)
e1:SetType(EFFECT_TYPE_QUICK_O)
e1:SetProperty(EFFECT_FLAG_DELAY+EFFECT_FLAG_DAMAGE_STEP)
e1:SetCode(EVENT_DESTROYED)
e1:SetCode(EVENT_FREE_CHAIN)
e1:SetRange(LOCATION_MZONE)
e1:SetCountLimit(1,m)
e1:SetCondition(cm.condition)
e1:SetCountLimit(1)
e1:SetTarget(cm.destg)
e1:SetOperation(cm.desop)
c:RegisterEffect(e1)
......@@ -64,12 +63,6 @@ function cm.splimit(e,se,sp,st)
return not e:GetHandler():IsLocation(LOCATION_EXTRA) or bit.band(st,SUMMON_TYPE_FUSION)==SUMMON_TYPE_FUSION
end
function cm.cfilter(c,tp)
return c:IsReason(REASON_BATTLE+REASON_EFFECT) and c:IsPreviousLocation(LOCATION_ONFIELD)
end
function cm.condition(e,tp,eg,ep,ev,re,r,rp)
return eg:IsExists(cm.cfilter,1,nil,tp)
end
function cm.destg(e,tp,eg,ep,ev,re,r,rp,chk)
local g=Duel.GetFieldGroup(tp,0,LOCATION_ONFIELD)
if chk==0 then return g:GetCount()>0 end
......
......@@ -9,7 +9,7 @@ function cm.initial_effect(c)
c:RegisterEffect(e0)
--spsummon
local e1=Effect.CreateEffect(c)
e1:SetDescription(aux.Stringid(m,4))
e1:SetDescription(aux.Stringid(m,3))
e1:SetType(EFFECT_TYPE_FIELD+EFFECT_TYPE_TRIGGER_O)
e1:SetCode(EVENT_SPSUMMON_SUCCESS)
e1:SetProperty(EFFECT_FLAG_DELAY+EFFECT_FLAG_DAMAGE_STEP)
......@@ -18,6 +18,20 @@ function cm.initial_effect(c)
e1:SetTarget(cm.tg)
e1:SetOperation(cm.op)
c:RegisterEffect(e1)
--Remove
local e2=Effect.CreateEffect(c)
e2:SetDescription(aux.Stringid(m,4))
e2:SetCategory(CATEGORY_SPECIAL_SUMMON)
e2:SetType(EFFECT_TYPE_FIELD+EFFECT_TYPE_TRIGGER_O)
e2:SetCode(EVENT_DESTROYED)
e2:SetProperty(EFFECT_FLAG_DAMAGE_STEP+EFFECT_FLAG_DELAY)
e2:SetRange(LOCATION_GRAVE)
e2:SetCountLimit(1,m)
e2:SetCost(aux.bfgcost)
e2:SetCondition(cm.dscon)
e2:SetTarget(cm.dstg)
e2:SetOperation(cm.dsop)
c:RegisterEffect(e2)
end
function cm.spfilter(c,tp)
return c:GetSummonLocation()==LOCATION_GRAVE and c:GetPreviousControler()==tp and c:IsSetCard(0x9341)
......@@ -110,4 +124,28 @@ function cm.op(e,tp,eg,ep,ev,re,r,rp)
tc=tg:GetNext()
end
end
end
function cm.cfilter(c,tp)
return c:IsReason(REASON_BATTLE+REASON_EFFECT)
and c:GetPreviousControler()==tp and c:IsPreviousLocation(LOCATION_MZONE)
end
function cm.dscon(e,tp,eg,ep,ev,re,r,rp)
return eg:IsExists(cm.cfilter,1,nil,tp)
end
function cm.filter(c,e,tp)
return c:IsSetCard(0x9341) and c:IsCanBeSpecialSummoned(e,0,tp,false,false,POS_FACEUP_DEFENSE)
end
function cm.dstg(e,tp,eg,ep,ev,re,r,rp,chk)
if chk==0 then return Duel.GetLocationCount(tp,LOCATION_MZONE)>0
and Duel.IsExistingMatchingCard(cm.filter,tp,LOCATION_GRAVE,0,1,nil,e,tp) end
Duel.SetOperationInfo(0,CATEGORY_SPECIAL_SUMMON,nil,1,tp,LOCATION_GRAVE)
end
function cm.dsop(e,tp,eg,ep,ev,re,r,rp)
if Duel.GetLocationCount(tp,LOCATION_MZONE)<=0 then return end
Duel.Hint(HINT_SELECTMSG,tp,HINTMSG_SPSUMMON)
local g=Duel.SelectMatchingCard(tp,cm.filter,tp,LOCATION_GRAVE,0,1,1,nil,e,tp)
if g:GetCount()>0 then
Duel.SpecialSummon(g,0,tp,tp,false,false,POS_FACEUP_DEFENSE)
end
end
\ No newline at end of file
......@@ -41,9 +41,9 @@ function cm.target(e,tp,eg,ep,ev,re,r,rp,chk)
Duel.SetOperationInfo(0,CATEGORY_RECOVER,nil,0,tp,1500)
end
function cm.activate(e,tp,eg,ep,ev,re,r,rp)
Duel.Recover(tp,1500,REASON_EFFECT)
Duel.Recover(tp,1500,REASON_EFFECT)
if Duel.GetLocationCount(tp,LOCATION_MZONE)>0 then
local tc=Duel.SelectMatchingCard(tp,cm.filter2,tp,LOCATION_DECK+LOCATION_GRAVE,0,1,1,nil,e,tp)
local tc=Duel.SelectMatchingCard(tp,cm.filter2,tp,LOCATION_DECK+LOCATION_GRAVE+LOCATION_REMOVED,0,1,1,nil,e,tp)
Duel.SpecialSummon(tc,0,tp,tp,false,false,POS_FACEUP)
end
local e3=Effect.CreateEffect(e:GetHandler())
......@@ -59,25 +59,44 @@ function cm.ckfilter(c)
return c:IsSetCard(0x9341) and c:IsType(TYPE_FUSION) and c:GetOriginalAttribute()==ATTRIBUTE_FIRE and c:IsAbleToExtra()
end
function cm.tdcon(e,tp,eg,ep,ev,re,r,rp)
return Duel.IsExistingMatchingCard(cm.ckfilter,tp,LOCATION_MZONE,0,1,nil)
return Duel.IsExistingMatchingCard(cm.ckfilter,tp,LOCATION_MZONE,LOCATION_MZONE,1,nil)
end
function cm.ckfilter2(c,e,tp)
return c:IsSetCard(0x9341) and c:IsLevel(4) and c:IsCanBeSpecialSummoned(e,0,tp,false,false)
end
function cm.tdop(e,tp,eg,ep,ev,re,r,rp)
local dg=Duel.GetMatchingGroup(cm.ckfilter,tp,LOCATION_MZONE,0,nil)
if dg:GetCount()>0 then
local ct1=Duel.SendtoDeck(dg,tp,2,REASON_EFFECT)
Duel.Recover(tp,ct1*500,REASON_EFFECT)
if Duel.IsExistingMatchingCard(cm.ckfilter2,tp,LOCATION_GRAVE,0,1,nil,e,tp) and Duel.SelectYesNo(tp,aux.Stringid(m,0)) then
local dg=Duel.GetMatchingGroup(cm.ckfilter,tp,LOCATION_MZONE,LOCATION_MZONE,nil)
if dg:GetCount()>0 and Duel.SelectYesNo(tp,aux.Stringid(m,2)) then
Duel.Hint(HINT_SELECTMSG,tp,HINTMSG_TODECK)
local tdg=dg:Select(tp,1,dg:GetCount(),nil)
local tdg2=Duel.SendtoDeck(tdg,tp,2,REASON_EFFECT)
local tc1=tdg2:GetFirst()
local ct1=0
local ct2=0
while tc1 do
if tc1:GetOwner()==tp then ct1=ct1+1 end
if tc1:GetOwner()==1-tp then ct2=ct2+1 end
tc1=tdg2:GetNext()
end
Duel.Recover(tp,ct1*1000,REASON_EFFECT)
Duel.Recover(1-tp,ct2*1000,REASON_EFFECT)
if ct1>0 and Duel.IsExistingMatchingCard(cm.ckfilter2,tp,LOCATION_GRAVE,0,1,nil,e,tp) and Duel.SelectYesNo(tp,aux.Stringid(m,0)) then
local sl=Duel.GetLocationCount(tp,LOCATION_MZONE)
if ct1*2<sl then sl=ct1*2 end
Duel.Hint(HINT_SELECTMSG,tp,HINTMSG_SPSUMMON)
local g=Duel.SelectMatchingCard(tp,cm.ckfilter2,tp,LOCATION_GRAVE,0,1,ct1*2,nil,e,tp)
local g=Duel.SelectMatchingCard(tp,cm.ckfilter2,tp,LOCATION_GRAVE,0,1,sl,nil,e,tp)
Duel.SpecialSummon(g,0,tp,tp,false,false,POS_FACEUP)
end
if ct2>0 and Duel.IsExistingMatchingCard(cm.ckfilter2,1-tp,LOCATION_GRAVE,0,1,nil,e,1-tp) and Duel.SelectYesNo(1-tp,aux.Stringid(m,0)) then
local sl=Duel.GetLocationCount(1-tp,LOCATION_MZONE)
if ct2*2<sl then sl=ct2*2 end
Duel.Hint(HINT_SELECTMSG,1-tp,HINTMSG_SPSUMMON)
local g=Duel.SelectMatchingCard(1-tp,cm.ckfilter2,1-tp,LOCATION_GRAVE,0,1,sl,nil,e,1-tp)
Duel.SpecialSummon(g,0,1-tp,1-tp,false,false,POS_FACEUP)
end
end
end
function cm.filter(c,e,tp)
return c:GetPreviousControler()==tp and c:IsPreviousLocation(LOCATION_MZONE)
and ((c:IsReason(REASON_EFFECT) and c:GetReasonPlayer()==1-tp) or (c:IsReason(REASON_BATTLE) and Duel.GetAttacker():IsControler(1-tp)))
......
--D.A.L 空间震
function c33401304.initial_effect(c)
--Activate
local m=33401304
local cm=_G["c"..m]
function cm.initial_effect(c)
--Activate
local e1=Effect.CreateEffect(c)
e1:SetDescription(aux.Stringid(33401304,0))
e1:SetCategory(CATEGORY_DESTROY+CATEGORY_SPECIAL_SUMMON)
e1:SetCategory(CATEGORY_REMOVE+CATEGORY_SPECIAL_SUMMON)
e1:SetType(EFFECT_TYPE_ACTIVATE)
e1:SetCode(EVENT_FREE_CHAIN)
e1:SetCountLimit(1,33401304+EFFECT_COUNT_CODE_OATH)
e1:SetTarget(c33401304.target)
e1:SetOperation(c33401304.activate)
e1:SetCountLimit(1,m)
e1:SetTarget(cm.sptg)
e1:SetOperation(cm.spop)
c:RegisterEffect(e1)
--spsummon
--lv
local e2=Effect.CreateEffect(c)
e2:SetDescription(aux.Stringid(33401304,0))
e2:SetCategory(CATEGORY_SPECIAL_SUMMON)
e2:SetType(EFFECT_TYPE_QUICK_O)
e2:SetCode(EVENT_FREE_CHAIN)
e2:SetCategory(CATEGORY_REMOVE+CATEGORY_SPECIAL_SUMMON)
e2:SetType(EFFECT_TYPE_IGNITION)
e2:SetRange(LOCATION_GRAVE)
e2:SetCountLimit(1,33401304+10000)
e2:SetCondition(aux.exccon)
e2:SetCost(c33401304.cost)
e2:SetTarget(c33401304.sptg)
e2:SetOperation(c33401304.spop)
e2:SetCountLimit(1,m)
e2:SetCost(aux.bfgcost)
e2:SetTarget(cm.target)
e2:SetOperation(cm.activate)
c:RegisterEffect(e2)
end
function c33401304.chkfilter1(c,e,tp)
return (not c:IsSetCard(0xc342)) and c:IsSetCard(0x341) and c:IsType(TYPE_MONSTER) and
not c:IsHasEffect(EFFECT_REVIVE_LIMIT) and Duel.IsPlayerCanSpecialSummon(tp,0,POS_FACEUP,tp,c)
and Duel.IsExistingMatchingCard(c33401304.chkfilter2,tp,LOCATION_DECK,0,1,nil,e,tp,c:GetCode())
end
function c33401304.chkfilter2(c,e,tp,cd)
return (not c:IsSetCard(0xc342)) and c:IsSetCard(0x341) and c:IsType(TYPE_MONSTER) and not c:IsCode(cd)
and not c:IsHasEffect(EFFECT_REVIVE_LIMIT) and Duel.IsPlayerCanSpecialSummon(tp,0,POS_FACEUP,1-tp,c)
end
function c33401304.filter1(c,e,tp)
return (not c:IsSetCard(0xc342)) and c:IsSetCard(0x341) and c:IsType(TYPE_MONSTER) and c:IsCanBeSpecialSummoned(e,0,tp,false,false)
and Duel.IsExistingMatchingCard(c33401304.filter2,tp,LOCATION_DECK,0,1,nil,e,tp,c:GetCode())
end
function c33401304.filter2(c,e,tp,cd)
return (not c:IsSetCard(0xc342)) and c:IsSetCard(0x341) and c:IsType(TYPE_MONSTER) and not c:IsCode(cd)
and c:IsCanBeSpecialSummoned(e,0,tp,false,false,POS_FACEUP_ATTACK,1-tp)
end
function c33401304.target(e,tp,eg,ep,ev,re,r,rp,chk)
if chk==0 then return not Duel.IsPlayerAffectedByEffect(tp,59822133)
and Duel.IsExistingMatchingCard(c33401304.chkfilter1,tp,LOCATION_DECK,0,1,nil,e,tp) end
local g=Duel.GetFieldGroup(tp,LOCATION_MZONE,LOCATION_MZONE)
if g then Duel.SetOperationInfo(0,CATEGORY_DESTROY,g,g:GetCount(),0,0) end
Duel.SetOperationInfo(0,CATEGORY_SPECIAL_SUMMON,nil,2,tp,LOCATION_DECK)
function cm.filter(c,e,tp)
return c:IsSetCard(0x341) and c:IsCanBeSpecialSummoned(e,0,tp,false,false)
end
function c33401304.activate(e,tp,eg,ep,ev,re,r,rp)
local dg=Duel.GetFieldGroup(tp,LOCATION_MZONE,LOCATION_MZONE)
if dg then Duel.Destroy(dg,REASON_EFFECT) end
local sg=Duel.GetMatchingGroup(c33401304.filter1,tp,LOCATION_DECK,0,nil,e,tp)
if sg:GetCount()>0 and not Duel.IsPlayerAffectedByEffect(tp,59822133)
and Duel.GetLocationCount(tp,LOCATION_MZONE)>0 and Duel.GetLocationCount(1-tp,LOCATION_MZONE)>0 then
Duel.BreakEffect()
Duel.Hint(HINT_SELECTMSG,tp,aux.Stringid(33401304,2))
local g1=sg:Select(tp,1,1,nil)
local tc1=g1:GetFirst()
Duel.Hint(HINT_SELECTMSG,tp,aux.Stringid(33401304,3))
local g2=Duel.SelectMatchingCard(tp,c33401304.filter2,tp,LOCATION_DECK,0,1,1,nil,e,tp,tc1:GetCode())
local tc2=g2:GetFirst()
Duel.SpecialSummonStep(tc1,0,tp,tp,false,false,POS_FACEUP_ATTACK)
Duel.SpecialSummonStep(tc2,0,tp,1-tp,false,false,POS_FACEUP_ATTACK)
Duel.SpecialSummonComplete()
end
local e3=Effect.CreateEffect(e:GetHandler())
e3:SetType(EFFECT_TYPE_FIELD)
e3:SetCode(EFFECT_CANNOT_SPECIAL_SUMMON)
e3:SetProperty(EFFECT_FLAG_PLAYER_TARGET)
e3:SetTargetRange(1,0)
e3:SetTarget(c33401304.splimit)
e3:SetReset(RESET_PHASE+PHASE_END)
Duel.RegisterEffect(e3,tp)
function cm.sptg(e,tp,eg,ep,ev,re,r,rp,chk,chkc)
if chkc then return chkc:IsLocation(LOCATION_HAND+LOCATION_GRAVE+LOCATION_REMOVED) and chkc:IsControler(tp) and cm.filter(chkc,e,tp) end
if chk==0 then return Duel.GetLocationCount(tp,LOCATION_MZONE)>0
and Duel.IsExistingTarget(cm.filter,tp,LOCATION_HAND+LOCATION_GRAVE+LOCATION_REMOVED,0,1,nil,e,tp) end
Duel.Hint(HINT_SELECTMSG,tp,HINTMSG_SPSUMMON)
local g=Duel.SelectTarget(tp,cm.filter,tp,LOCATION_HAND+LOCATION_GRAVE+LOCATION_REMOVED,0,1,1,nil,e,tp)
Duel.SetOperationInfo(0,CATEGORY_SPECIAL_SUMMON,g,1,0,0)
Duel.SetOperationInfo(0,CATEGORY_DESTROY,g,g:GetCount(),0,0)
Duel.SetOperationInfo(0,CATEGORY_REMOVE,g,g:GetCount(),0,0)
end
function c33401304.splimit(e,c,sump,sumtype,sumpos,targetp,se)
return not c:IsSetCard(0x341)
function cm.spop(e,tp,eg,ep,ev,re,r,rp)
local tc=Duel.GetFirstTarget()
if tc:IsRelateToEffect(e) and Duel.SpecialSummon(tc,0,tp,tp,false,false,POS_FACEUP)~=0 and Duel.SelectYesNo(tp,aux.Stringid(m,1)) then
Duel.Hint(HINT_SELECTMSG,tp,HINTMSG_REMOVE)
local g=Duel.SelectMatchingCard(tp,Card.IsAbleToRemove,tp,LOCATION_ONFIELD,LOCATION_ONFIELD,1,1,nil)
if g:GetCount()>0 then
Duel.Destroy(g,REASON_EFFECT,LOCATION_REMOVED)
end
end
end
function c33401304.cfilter(c,e,tp)
return c:IsSetCard(0x341) and c:IsAbleToRemoveAsCost()
function cm.cfilter(c)
return c:IsSetCard(0x341) and c:IsLevel(4) and c:IsAbleToRemove()
end
function c33401304.cost(e,tp,eg,ep,ev,re,r,rp,chk)
if chk==0 then return e:GetHandler():IsAbleToRemoveAsCost()
and Duel.IsExistingMatchingCard(c33401304.cfilter,tp,LOCATION_GRAVE,0,1,e:GetHandler(),e,tp) end
Duel.Hint(HINT_SELECTMSG,tp,HINTMSG_REMOVE)
local g=Duel.SelectMatchingCard(tp,c33401304.cfilter,tp,LOCATION_GRAVE,0,1,1,e:GetHandler(),e,tp)
g:AddCard(e:GetHandler())
Duel.Remove(g,POS_FACEUP,REASON_COST)
function cm.target(e,tp,eg,ep,ev,re,r,rp,chk)
if chk==0 then return Duel.IsExistingMatchingCard(cm.cfilter,tp,LOCATION_DECK,0,1,nil) end
Duel.SetOperationInfo(0,CATEGORY_REMOVE,nil,1,tp,LOCATION_DECK)
end
function c33401304.spfilter(c,e,tp)
return c:IsSetCard(0x341) and c:IsCanBeSpecialSummoned(e,0,tp,false,false)
function cm.activate(e,tp,eg,ep,ev,re,r,rp)
Duel.Hint(HINT_SELECTMSG,tp,HINTMSG_REMOVE)
local g=Duel.SelectMatchingCard(tp,cm.cfilter,tp,LOCATION_DECK,0,1,1,nil)
local tc=g:GetFirst()
if tc==nil then return end
Duel.Remove(tc,POS_FACEUP,REASON_EFFECT)
local e1=Effect.CreateEffect(e:GetHandler())
e1:SetType(EFFECT_TYPE_FIELD+EFFECT_TYPE_CONTINUOUS)
e1:SetRange(LOCATION_REMOVED)
e1:SetCode(EVENT_PHASE+PHASE_STANDBY)
e1:SetCountLimit(1)
e1:SetReset(RESET_EVENT+RESETS_STANDARD+RESET_PHASE+PHASE_STANDBY+RESET_SELF_TURN)
e1:SetCondition(cm.thcon)
e1:SetOperation(cm.thop)
tc:RegisterEffect(e1)
local e3=Effect.CreateEffect(e:GetHandler())
e3:SetDescription(aux.Stringid(m,2))
e3:SetType(EFFECT_TYPE_SINGLE)
e3:SetCode(EFFECT_CANNOT_TRIGGER)
e3:SetProperty(EFFECT_FLAG_SINGLE_RANGE+EFFECT_FLAG_CLIENT_HINT)
e3:SetRange(LOCATION_REMOVED)
e3:SetReset(RESET_EVENT+RESETS_STANDARD)
tc:RegisterEffect(e3)
end
function c33401304.sptg(e,tp,eg,ep,ev,re,r,rp,chk,chkc)
if chkc then return chkc:IsControler(tp) and chkc:IsLocation(LOCATION_DECK) and c33401304.spfilter(chkc,e,tp) end
if chk==0 then return Duel.GetLocationCount(1-tp,LOCATION_MZONE)>0
and Duel.IsExistingTarget(c33401304.spfilter,tp,LOCATION_DECK,0,1,nil,e,tp) end
Duel.Hint(HINT_SELECTMSG,tp,HINTMSG_SPSUMMON)
local g=Duel.SelectTarget(tp,c33401304.spfilter,tp,LOCATION_DECK,0,1,1,nil,e,tp)
Duel.SetOperationInfo(0,CATEGORY_SPECIAL_SUMMON,g,1,0,0)
function cm.thcon(e,tp,eg,ep,ev,re,r,rp)
return Duel.GetTurnPlayer()==tp
end
function c33401304.spop(e,tp,eg,ep,ev,re,r,rp)
if Duel.GetLocationCount(1-tp,LOCATION_MZONE)<=0 then return end
local tc=Duel.GetFirstTarget()
if tc:IsRelateToEffect(e) then Duel.SpecialSummon(tc,0,tp,1-tp,false,false,POS_FACEUP) end
function cm.thop(e,tp,eg,ep,ev,re,r,rp)
local c=e:GetHandler()
if c:IsType(TYPE_RITUAL) then Duel.SpecialSummon(c,SUMMON_TYPE_RITUAL,tp,tp,true,true,POS_FACEUP)
else
Duel.SpecialSummon(c,0,tp,tp,false,false,POS_FACEUP)
end
end
......@@ -2,7 +2,7 @@
function c33401306.initial_effect(c)
--Activate
local e1=Effect.CreateEffect(c)
e1:SetCategory(CATEGORY_DESTROY)
e1:SetCategory(CATEGORY_REMOVE)
e1:SetType(EFFECT_TYPE_ACTIVATE)
e1:SetCode(EVENT_FREE_CHAIN)
e1:SetCondition(c33401306.condition)
......@@ -28,13 +28,13 @@ function c33401306.condition(e,tp,eg,ep,ev,re,r,rp)
return Duel.IsExistingMatchingCard(c33401306.cfilter,tp,LOCATION_MZONE,0,1,nil)
end
function c33401306.target(e,tp,eg,ep,ev,re,r,rp,chk)
if chk==0 then return Duel.IsExistingMatchingCard(aux.TRUE,tp,0,LOCATION_MZONE+LOCATION_FZONE,1,nil) end
local sg=Duel.GetMatchingGroup(aux.TRUE,tp,0,LOCATION_MZONE+LOCATION_FZONE,nil)
Duel.SetOperationInfo(0,CATEGORY_DESTROY,sg,sg:GetCount(),0,0)
if chk==0 then return Duel.IsExistingMatchingCard(Card.IsAbleToRemove,tp,0,LOCATION_ONFIELD,1,nil) end
local sg=Duel.GetMatchingGroup(Card.IsAbleToRemove,tp,0,LOCATION_ONFIELD,nil)
Duel.SetOperationInfo(0,CATEGORY_REMOVE,sg,sg:GetCount(),0,0)
end
function c33401306.activate(e,tp,eg,ep,ev,re,r,rp)
local sg=Duel.GetMatchingGroup(aux.TRUE,tp,0,LOCATION_MZONE+LOCATION_FZONE,nil)
Duel.Destroy(sg,REASON_EFFECT)
local sg=Duel.GetMatchingGroup(aux.TRUE,tp,0,LOCATION_ONFIELD,nil)
Duel.Remove(sg,POS_FACEUP,REASON_EFFECT)
end
function c33401306.condition2(e,tp,eg,ep,ev,re,r,rp)
......
--五河士道 祈福
function c33401307.initial_effect(c)
local m=m
local cm=_G["c"..m]
function cm.initial_effect(c)
--link summon
aux.AddLinkProcedure(c,nil,2,2,c33401307.lcheck)
aux.AddLinkProcedure(c,nil,2,2,cm.lcheck)
c:EnableReviveLimit()
--special summon
local e1=Effect.CreateEffect(c)
e1:SetDescription(aux.Stringid(33401307,0))
e1:SetDescription(aux.Stringid(m,0))
e1:SetCategory(CATEGORY_SPECIAL_SUMMON)
e1:SetType(EFFECT_TYPE_SINGLE+EFFECT_TYPE_TRIGGER_O)
e1:SetProperty(EFFECT_FLAG_DELAY)
e1:SetCode(EVENT_SPSUMMON_SUCCESS)
e1:SetCountLimit(1,33401307)
e1:SetCondition(c33401307.spcon)
e1:SetTarget(c33401307.sptg)
e1:SetOperation(c33401307.spop)
e1:SetCountLimit(1,m)
e1:SetCondition(cm.spcon)
e1:SetTarget(cm.sptg)
e1:SetOperation(cm.spop)
c:RegisterEffect(e1)
--tohand
--spsummon
local e2=Effect.CreateEffect(c)
e2:SetType(EFFECT_TYPE_FIELD+EFFECT_TYPE_CONTINUOUS)
e2:SetProperty(EFFECT_FLAG_CANNOT_DISABLE)
e2:SetCode(EVENT_CHAINING)
e2:SetRange(LOCATION_MZONE)
e2:SetOperation(aux.chainreg)
e2:SetCategory(CATEGORY_SPECIAL_SUMMON)
e2:SetType(EFFECT_TYPE_IGNITION)
e2:SetRange(LOCATION_GRAVE)
e2:SetCountLimit(1,m+10000)
e2:SetCondition(aux.exccon)
e2:SetCost(aux.bfgcost)
e2:SetTarget(cm.sptg2)
e2:SetOperation(cm.spop2)
c:RegisterEffect(e2)
local e3=Effect.CreateEffect(c)
e3:SetDescription(aux.Stringid(33401307,1))
e3:SetType(EFFECT_TYPE_FIELD+EFFECT_TYPE_TRIGGER_O)
e3:SetCode(EVENT_CHAIN_SOLVED)
e3:SetRange(LOCATION_MZONE)
e3:SetCountLimit(1,33401307+10000)
e3:SetCondition(c33401307.thcon)
e3:SetTarget(c33401307.thtg)
e3:SetOperation(c33401307.thop)
c:RegisterEffect(e3)
end
function c33401307.lcheck(g)
function cm.lcheck(g)
return g:IsExists(Card.IsLinkSetCard,1,nil,0xc342)
end
function c33401307.spcon(e,tp,eg,ep,ev,re,r,rp)
function cm.spcon(e,tp,eg,ep,ev,re,r,rp)
return e:GetHandler():IsSummonType(SUMMON_TYPE_LINK)
end
function c33401307.spfilter(c,e,tp)
return c:IsSetCard(0x341) and c:IsCanBeSpecialSummoned(e,0,tp,false,false,POS_FACEUP_DEFENSE)
function cm.spfilter(c,e,tp)
return c:IsSetCard(0xc342) and c:IsCanBeSpecialSummoned(e,0,tp,false,false,POS_FACEUP_DEFENSE)
end
function c33401307.sptg(e,tp,eg,ep,ev,re,r,rp,chk)
function cm.sptg(e,tp,eg,ep,ev,re,r,rp,chk)
if chk==0 then return Duel.GetLocationCount(tp,LOCATION_MZONE)>0
and Duel.IsExistingMatchingCard(c33401307.spfilter,tp,LOCATION_DECK,0,1,nil,e,tp) end
and Duel.IsExistingMatchingCard(cm.spfilter,tp,LOCATION_DECK,0,1,nil,e,tp) end
Duel.SetOperationInfo(0,CATEGORY_SPECIAL_SUMMON,nil,1,tp,LOCATION_DECK)
end
function c33401307.spop(e,tp,eg,ep,ev,re,r,rp)
function cm.spop(e,tp,eg,ep,ev,re,r,rp)
local c=e:GetHandler()
if Duel.GetLocationCount(tp,LOCATION_MZONE)<=0 then return end
Duel.Hint(HINT_SELECTMSG,tp,HINTMSG_SPSUMMON)
local g=Duel.SelectMatchingCard(tp,c33401307.spfilter,tp,LOCATION_DECK,0,1,1,nil,e,tp)
local g=Duel.SelectMatchingCard(tp,cm.spfilter,tp,LOCATION_DECK,0,1,1,nil,e,tp)
local tc=g:GetFirst()
if tc and Duel.SpecialSummonStep(tc,0,tp,tp,false,false,POS_FACEUP_DEFENSE) then
local e1=Effect.CreateEffect(c)
e1:SetType(EFFECT_TYPE_SINGLE)
e1:SetCode(EFFECT_DISABLE)
e1:SetReset(RESET_EVENT+RESETS_STANDARD)
tc:RegisterEffect(e1)
local e2=Effect.CreateEffect(c)
e2:SetType(EFFECT_TYPE_SINGLE)
e2:SetCode(EFFECT_DISABLE_EFFECT)
e2:SetReset(RESET_EVENT+RESETS_STANDARD)
tc:RegisterEffect(e2)
local e3=Effect.CreateEffect(c)
e3:SetType(EFFECT_TYPE_SINGLE)
e3:SetCode(EFFECT_CANNOT_BE_LINK_MATERIAL)
e3:SetValue(1)
e3:SetReset(RESET_EVENT+RESETS_STANDARD)
tc:RegisterEffect(e3)
end
Duel.SpecialSummonComplete()
if tc then Duel.SpecialSummon(tc,0,tp,tp,false,false,POS_FACEUP_DEFENSE) end
local e3=Effect.CreateEffect(e:GetHandler())
e3:SetType(EFFECT_TYPE_FIELD)
e3:SetCode(EFFECT_CANNOT_SPECIAL_SUMMON)
e3:SetProperty(EFFECT_FLAG_PLAYER_TARGET)
e3:SetTargetRange(1,0)
e3:SetTarget(c33401307.splimit)
e3:SetTarget(cm.splimit)
e3:SetReset(RESET_PHASE+PHASE_END)
Duel.RegisterEffect(e3,tp)
end
function c33401307.splimit(e,c,sump,sumtype,sumpos,targetp,se)
function cm.splimit(e,c,sump,sumtype,sumpos,targetp,se)
return not (c:IsSetCard(0x341) or c:IsSetCard(0xa342))
end
function c33401307.thcon(e,tp,eg,ep,ev,re,r,rp)
local rc=re:GetHandler()
return re:IsActiveType(TYPE_XYZ) and rc:IsSetCard(0x341) and rc:IsControler(tp) and e:GetHandler():GetFlagEffect(1)>0
function cm.spfilter2(c,e,tp)
return c:IsSetCard(0x341,0xa342) and c:IsCanBeSpecialSummoned(e,0,tp,false,false)
end
function c33401307.thfilter(c)
return c:IsSetCard(0x341) and c:IsSetCard(0x46) and c:IsType(TYPE_SPELL) and c:IsAbleToHand()
end
function c33401307.thtg(e,tp,eg,ep,ev,re,r,rp,chk)
if chk==0 then return Duel.IsExistingMatchingCard(c33401307.thfilter,tp,LOCATION_DECK,0,1,nil) end
Duel.SetOperationInfo(0,CATEGORY_TOHAND,nil,1,tp,LOCATION_DECK)
function cm.sptg2(e,tp,eg,ep,ev,re,r,rp,chk)
if chk==0 then return Duel.GetLocationCount(tp,LOCATION_MZONE)>0
and Duel.IsExistingMatchingCard(cm.spfilter2,tp,LOCATION_GRAVE,0,1,nil,e,tp) end
Duel.SetOperationInfo(0,CATEGORY_SPECIAL_SUMMON,nil,1,tp,LOCATION_GRAVE)
end
function c33401307.thop(e,tp,eg,ep,ev,re,r,rp)
Duel.Hint(HINT_SELECTMSG,tp,HINTMSG_ATOHAND)
local g=Duel.SelectMatchingCard(tp,c33401307.thfilter,tp,LOCATION_DECK,0,1,1,nil)
function cm.spop2(e,tp,eg,ep,ev,re,r,rp)
if Duel.GetLocationCount(tp,LOCATION_MZONE)<=0 then return end
Duel.Hint(HINT_SELECTMSG,tp,HINTMSG_SPSUMMON)
local g=Duel.SelectMatchingCard(tp,cm.spfilter2,tp,LOCATION_GRAVE,0,1,1,nil,e,tp)
local tc=g:GetFirst()
if tc then
Duel.SendtoHand(tc,tp,REASON_EFFECT)
Duel.ConfirmCards(1-tp,g)
local res=Duel.SpecialSummonStep(tc,0,tp,tp,false,false,POS_FACEUP)
if res then
local e1=Effect.CreateEffect(c)
e1:SetType(EFFECT_TYPE_SINGLE)
e1:SetCode(EFFECT_DISABLE)
e1:SetReset(RESET_EVENT+RESETS_STANDARD)
tc:RegisterEffect(e1)
local e2=Effect.CreateEffect(c)
e2:SetType(EFFECT_TYPE_SINGLE)
e2:SetCode(EFFECT_DISABLE_EFFECT)
e2:SetValue(RESET_TURN_SET)
e2:SetReset(RESET_EVENT+RESETS_STANDARD)
tc:RegisterEffect(e2)
end
local e3=Effect.CreateEffect(e:GetHandler())
e3:SetType(EFFECT_TYPE_FIELD)
e3:SetCode(EFFECT_CANNOT_SPECIAL_SUMMON)
e3:SetProperty(EFFECT_FLAG_PLAYER_TARGET)
e3:SetTargetRange(1,0)
e3:SetTarget(c33401307.splimit)
e3:SetReset(RESET_PHASE+PHASE_END)
Duel.RegisterEffect(e3,tp)
Duel.SpecialSummonComplete()
end
--五河士道 暴走形态
function c33401309.initial_effect(c)
aux.AddFusionProcFunFunRep(c,c33401309.matfilter1,c33401309.matfilter,2,2,true)
c:SetUniqueOnField(1,1,c33401309.uqfilter,LOCATION_MZONE)
--search
local m=33401309
local cm=_G["c"..m]
function cm.initial_effect(c)
--fusion material
c:EnableReviveLimit()
aux.AddFusionProcMix(c,false,true,cm.fusfilter1,cm.fusfilter2,cm.fusfilter2,cm.fusfilter2,cm.fusfilter5)
--spsummon condition
local e1=Effect.CreateEffect(c)
e1:SetDescription(aux.Stringid(33401309,1))
e1:SetType(EFFECT_TYPE_IGNITION)
e1:SetType(EFFECT_TYPE_SINGLE)
e1:SetProperty(EFFECT_FLAG_CANNOT_DISABLE+EFFECT_FLAG_UNCOPYABLE)
e1:SetCode(EFFECT_SPSUMMON_CONDITION)
e1:SetValue(aux.fuslimit)
c:RegisterEffect(e1)
--activate from hand
local e1=Effect.CreateEffect(c)
e1:SetType(EFFECT_TYPE_FIELD)
e1:SetCode(EFFECT_QP_ACT_IN_NTPHAND)
e1:SetRange(LOCATION_MZONE)
e1:SetCountLimit(1,33401309)
e1:SetTarget(c33401309.thtg2)
e1:SetOperation(c33401309.thop2)
e1:SetTarget(aux.TargetBoolFunction(Card.IsSetCard,0x341,0x340))
e1:SetTargetRange(LOCATION_HAND,0)
c:RegisterEffect(e1)
local e2=e1:Clone()
e2:SetCode(EFFECT_TRAP_ACT_IN_HAND)
c:RegisterEffect(e2)
--
local e3=Effect.CreateEffect(c)
e3:SetDescription(aux.Stringid(m,1))
e3:SetCategory(CATEGORY_SEARCH+CATEGORY_TOHAND)
e3:SetType(EFFECT_TYPE_QUICK_O)
e3:SetCode(EVENT_FREE_CHAIN)
e3:SetRange(LOCATION_MZONE)
e3:SetCountLimit(1,m)
e3:SetTarget(cm.thtg)
e3:SetOperation(cm.thop)
c:RegisterEffect(e3)
--copy
local e6=Effect.CreateEffect(c)
e6:SetType(EFFECT_TYPE_QUICK_O)
e6:SetDescription(aux.Stringid(33401309,2))
e6:SetDescription(aux.Stringid(m,2))
e6:SetCode(EVENT_FREE_CHAIN)
e6:SetRange(LOCATION_MZONE)
e6:SetCountLimit(1,33401309+10000)
e6:SetTarget(c33401309.cptg)
e6:SetOperation(c33401309.cpop)
e6:SetCountLimit(1,m+10000)
e6:SetTarget(cm.cptg)
e6:SetOperation(cm.cpop)
c:RegisterEffect(e6)
end
function c33401309.matfilter1(c)
return c:IsSetCard(0x341) and c:IsFusionType(TYPE_FUSION) or c:IsFusionType(TYPE_SYNCHRO) or c:IsFusionType(TYPE_XYZ)
function cm.fusfilter1(c)
return c:IsSetCard(0xc342)
end
function c33401309.matfilter(c)
return c:IsSetCard(0x341)
function cm.fusfilter2(c)
return c:IsSetCard(0x341) and (c:IsFusionType(TYPE_SYNCHRO+TYPE_FUSION+TYPE_XYZ) or (c:IsLinkAbove(2) and c:IsFusionType(TYPE_LINK)))
end
function c33401309.uqfilter(c)
return c:GetOriginalCode()==33401309
function cm.fusfilter5(c)
return c:IsSetCard(0x341)
end
function c33401309.thfilter2(c)
function cm.thfilter1(c)
return c:IsSetCard(0xc342) and c:IsAbleToHand()
end
function cm.thfilter2(c)
return c:IsSetCard(0x340) and c:IsType(TYPE_CONTINUOUS) and c:IsType(TYPE_SPELL) and not c:IsForbidden()
end
function c33401309.thtg2(e,tp,eg,ep,ev,re,r,rp,chk)
if chk==0 then return Duel.IsExistingMatchingCard(c33401309.thfilter2,tp,LOCATION_GRAVE,0,1,nil) end
function cm.thtg(e,tp,eg,ep,ev,re,r,rp,chk)
if chk==0 then return Duel.IsExistingMatchingCard(cm.thfilter1,tp,LOCATION_GRAVE+LOCATION_DECK+LOCATION_REMOVED,0,1,nil) end
Duel.SetOperationInfo(0,CATEGORY_TOHAND,nil,1,tp,LOCATION_DECK+LOCATION_GRAVE+LOCATION_REMOVED)
end
function c33401309.thop2(e,tp,eg,ep,ev,re,r,rp)
Duel.Hint(HINT_SELECTMSG,tp,aux.Stringid(33401309,0))
local g=Duel.SelectMatchingCard(tp,c33401309.thfilter2,tp,LOCATION_GRAVE,0,1,1,nil)
function cm.thop(e,tp,eg,ep,ev,re,r,rp)
Duel.Hint(HINT_SELECTMSG,tp,HINTMSG_ATOHAND)
local g=Duel.SelectMatchingCard(tp,cm.thfilter1,tp,LOCATION_DECK+LOCATION_GRAVE+LOCATION_REMOVED,0,1,1,nil)
local tc=g:GetFirst()
if tc then
Duel.SendtoHand(tc,nil,REASON_EFFECT)
Duel.ConfirmCards(1-tp,tc)
end
if Duel.IsExistingMatchingCard(cm.thfilter2,tp,LOCATION_GRAVE+LOCATION_DECK+LOCATION_REMOVED,0,1,nil) and Duel.GetLocationCount(tp,LOCATION_SZONE)>0 and Duel.SelectYesNo(tp,aux.Stringid(m,3)) then
Duel.Hint(HINT_SELECTMSG,tp,aux.Stringid(m,0))
local g=Duel.SelectMatchingCard(tp,cm.thfilter2,tp,LOCATION_GRAVE+LOCATION_DECK+LOCATION_REMOVED,0,1,1,nil)
local tc=g:GetFirst()
if #g>0 then
Duel.MoveToField(tc,tp,tp,LOCATION_SZONE,POS_FACEUP,true)
end
end
function c33401309.cptg(e,tp,eg,ep,ev,re,r,rp,chk,chkc)
if chk==0 then return Duel.IsExistingMatchingCard(c33401309.matfilter,tp,LOCATION_EXTRA,0,1,nil) end
function cm.matfilter(c)
return c:IsOriginalSetCard(0x341) and c:IsType(TYPE_MONSTER)
end
function cm.cptg(e,tp,eg,ep,ev,re,r,rp,chk,chkc)
if chk==0 then return Duel.IsExistingMatchingCard(cm.matfilter,tp,LOCATION_EXTRA+LOCATION_DECK+LOCATION_GRAVE+LOCATION_REMOVED,0,1,nil) end
end
function c33401309.cpop(e,tp,eg,ep,ev,re,r,rp)
function cm.cpop(e,tp,eg,ep,ev,re,r,rp)
local c=e:GetHandler()
if not c:IsRelateToEffect(e) or c:IsFacedown() then return end
Duel.Hint(HINT_SELECTMSG,tp,HINTMSG_CONFIRM)
local cg=Duel.SelectMatchingCard(tp,c33401309.matfilter,tp,LOCATION_EXTRA,0,1,1,nil,c)
local cg=Duel.SelectMatchingCard(tp,cm.matfilter,tp,LOCATION_EXTRA+LOCATION_DECK+LOCATION_GRAVE+LOCATION_REMOVED,0,1,1,nil)
if cg:GetCount()==0 then return end
Duel.ConfirmCards(1-tp,cg)
local code=cg:GetFirst():GetOriginalCode()
local c=e:GetHandler()
if not c:IsOnField() or c:IsFacedown() then return end
local e1=Effect.CreateEffect(c)
e1:SetType(EFFECT_TYPE_SINGLE)
e1:SetProperty(EFFECT_FLAG_CANNOT_DISABLE)
e1:SetReset(RESET_EVENT+0x1fe0000+RESET_PHASE+PHASE_END,2)
e1:SetCode(EFFECT_CHANGE_CODE)
e1:SetProperty(EFFECT_FLAG_CANNOT_DISABLE)
e1:SetValue(code)
e1:SetLabel(tp)
e1:SetReset(RESET_EVENT+RESETS_STANDARD+RESET_PHASE+PHASE_END)
c:RegisterEffect(e1)
c:CopyEffect(code,RESET_EVENT+0x1fe0000+RESET_PHASE+PHASE_END,2)
c:RegisterFlagEffect(33401301,RESET_EVENT+0x1fe0000+RESET_PHASE+PHASE_END,0,2)
c:CopyEffect(code,RESET_EVENT+0x1fe0000+RESET_PHASE+PHASE_END,1)
c:RegisterFlagEffect(33401301,RESET_EVENT+0x1fe0000+RESET_PHASE+PHASE_END,0,1)
end
\ No newline at end of file
--奥义!瞬闪轰爆破!
function c33401315.initial_effect(c)
local m=33401315
local cm=_G["c"..m]
function cm.initial_effect(c)
--Activate
local e1=Effect.CreateEffect(c)
e1:SetCategory(CATEGORY_DESTROY)
e1:SetCategory(CATEGORY_TOGRAVE+CATEGORY_DAMAGE)
e1:SetType(EFFECT_TYPE_ACTIVATE)
e1:SetCode(EVENT_FREE_CHAIN)
e1:SetCountLimit(1,33401315+EFFECT_COUNT_CODE_OATH)
e1:SetCondition(c33401315.condition)
e1:SetTarget(c33401315.destg)
e1:SetOperation(c33401315.desop)
e1:SetCountLimit(1,m)
e1:SetCondition(cm.condition)
e1:SetTarget(cm.destg)
e1:SetOperation(cm.desop)
c:RegisterEffect(e1)
--to hand
local e3=Effect.CreateEffect(c)
e3:SetCategory(CATEGORY_TOHAND+CATEGORY_SEARCH)
e3:SetType(EFFECT_TYPE_IGNITION)
e3:SetRange(LOCATION_GRAVE)
e3:SetCountLimit(1,m)
e3:SetCost(aux.bfgcost)
e3:SetTarget(cm.thtg)
e3:SetOperation(cm.thop)
c:RegisterEffect(e3)
end
function c33401315.cfilter(c,tp)
return c:IsFaceup() and c:IsOriginalCodeRule(33401309)
function cm.cfilter(c)
return c:IsFaceup() and c:IsOriginalSetCard(0xc342) and c:IsType(TYPE_FUSION)
end
function c33401315.condition(e,tp,eg,ep,ev,re,r,rp)
return Duel.IsExistingMatchingCard(c33401315.cfilter,tp,LOCATION_MZONE,0,1,nil)
function cm.condition(e,tp,eg,ep,ev,re,r,rp)
return Duel.IsExistingMatchingCard(cm.cfilter,tp,LOCATION_MZONE,0,1,nil)
end
function c33401315.destg(e,tp,eg,ep,ev,re,r,rp,chk)
function cm.destg(e,tp,eg,ep,ev,re,r,rp,chk)
local g=Duel.GetFieldGroup(tp,0,LOCATION_ONFIELD)
if chk==0 then return g:GetCount()>0 end
Duel.SetOperationInfo(0,CATEGORY_DESTROY,g,g:GetCount(),0,0)
Duel.SetOperationInfo(0,CATEGORY_TOGRAVE,g,g:GetCount(),0,0)
Duel.SetOperationInfo(0,CATEGORY_DAMAGE,nil,0,1-tp,500*g:GetCount())
end
function c33401315.desop(e,tp,eg,ep,ev,re,r,rp)
function cm.desop(e,tp,eg,ep,ev,re,r,rp)
local g=Duel.GetFieldGroup(tp,0,LOCATION_ONFIELD)
if g:GetCount()>0 then
local ss=Duel.Destroy(g,REASON_EFFECT)
local ss=Duel.SendtoGrave(g,REASON_EFFECT)
Duel.Damage(1-tp,500*ss,REASON_EFFECT)
end
end
function cm.thfilter(c)
return c:IsSetCard(0xc342) and c:IsType(TYPE_SPELL+TYPE_TRAP) and c:IsAbleToHand()
end
function cm.thtg(e,tp,eg,ep,ev,re,r,rp,chk)
if chk==0 then return Duel.IsExistingMatchingCard(cm.thfilter,tp,LOCATION_DECK,0,1,nil) end
Duel.SetOperationInfo(0,CATEGORY_TOHAND,nil,1,tp,LOCATION_DECK)
end
function cm.thop(e,tp,eg,ep,ev,re,r,rp)
Duel.Hint(HINT_SELECTMSG,tp,HINTMSG_ATOHAND)
local g=Duel.SelectMatchingCard(tp,cm.thfilter,tp,LOCATION_DECK,0,1,1,nil)
if g:GetCount()>0 then
Duel.SendtoHand(g,nil,REASON_EFFECT)
Duel.ConfirmCards(1-tp,g)
end
end
This diff is collapsed.
This diff is collapsed.
This diff is collapsed.
This diff is collapsed.
This diff is collapsed.
This diff is collapsed.
This diff is collapsed.
This diff is collapsed.
This diff is collapsed.
This diff is collapsed.
This diff is collapsed.
This diff is collapsed.
This diff is collapsed.
This diff is collapsed.
This diff is collapsed.
This diff is collapsed.
This diff is collapsed.
This diff is collapsed.
This diff is collapsed.
This diff is collapsed.
This diff is collapsed.
This diff is collapsed.
This diff is collapsed.
This diff is collapsed.
This diff is collapsed.
Markdown is supported
0% or
You are about to add 0 people to the discussion. Proceed with caution.
Finish editing this message first!
Please register or to comment