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)
e1:SetCost(cm.spcost)
e1:SetTarget(cm.sptg)
e1:SetOperation(cm.spop)
c:RegisterEffect(e1)
--lv
--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)
e2:SetTarget(cm.thtg)
e2:SetOperation(cm.thop)
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)
--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)
--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_CHANGE_LEVEL)
e1:SetProperty(EFFECT_FLAG_CANNOT_DISABLE)
e1:SetValue(lv)
e1:SetReset(RESET_EVENT+RESETS_STANDARD+RESET_PHASE+PHASE_END)
c:RegisterEffect(e1)
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)
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())
--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.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.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.tgop(e,tp,eg,ep,ev,re,r,rp)
local c=e:GetHandler()
if c:IsRelateToEffect(e) then
Duel.SendtoGrave(c,REASON_EFFECT)
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)
Duel.Recover(tp,Duel.GetLP(tp)/2,REASON_EFFECT)
end
--秋夜少女·本田未央
--
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
......@@ -1049,3 +1049,467 @@ function Chikichikibanban.tgspop2(op)
end
end
end
--evolion synchro summon
function Chikichikibanban.SpecialSummonProcedureS(c,c_location,c_pos,c_condition,op)
local c_location=c_location or 0
local c_pos=c_pos or 0
local e0=Effect.CreateEffect(c)
e0:SetDescription(aux.Stringid(17061330,0))
e0:SetType(EFFECT_TYPE_FIELD)
e0:SetCode(EFFECT_SPSUMMON_PROC)
e0:SetProperty(EFFECT_FLAG_UNCOPYABLE+EFFECT_FLAG_IGNORE_IMMUNE)
e0:SetRange(LOCATION_EXTRA)
e0:SetCondition(Chikichikibanban.syncon)
e0:SetTarget(Chikichikibanban.syntg)
e0:SetOperation(Chikichikibanban.synop)
e0:SetValue(SUMMON_TYPE_SYNCHRO)
c:RegisterEffect(e0)
return e1
end
function Chikichikibanban.CheckGroupRecursive(c,sg,g,f,min,max,ext_params)
sg:AddCard(c)
local ct=sg:GetCount()
local res=(ct>=min and f(sg,table.unpack(ext_params)))
or (ct<max and g:IsExists(Chikichikibanban.CheckGroupRecursive,1,sg,sg,g,f,min,max,ext_params))
sg:RemoveCard(c)
return res
end
function Chikichikibanban.CheckGroup(g,f,cg,min,max,...)
local min=min or 1
local max=max or g:GetCount()
if min>max then return false end
local ext_params={...}
local sg=Group.CreateGroup()
if cg then sg:Merge(cg) end
local ct=sg:GetCount()
if ct>=min and ct<max and f(sg,...) then return true end
return g:IsExists(Chikichikibanban.CheckGroupRecursive,1,sg,sg,g,f,min,max,ext_params)
end
function Chikichikibanban.val(c,syncard)
local slv=c:GetSynchroLevel(syncard)
if c:IsSynchroType(TYPE_PENDULUM) and c:IsLocation(LOCATION_PZONE) and c:IsSetCard(0x37f6) then
slv=c:GetLeftScale()*65536+slv
end
return slv
end
function Chikichikibanban.SelectGroup(tp,desc,g,f,cg,min,max,...)
local min=min or 1
local max=max or g:GetCount()
local ext_params={...}
local sg=Group.CreateGroup()
if cg then sg:Merge(cg) end
local ct=sg:GetCount()
while ct<max and not (ct>=min and f(sg,...) and not (g:IsExists(Chikichikibanban.CheckGroupRecursive,1,sg,sg,g,f,min,max,ext_params) and Duel.SelectYesNo(tp,210))) do
Duel.Hint(HINT_SELECTMSG,tp,desc)
local tg=g:FilterSelect(tp,Chikichikibanban.CheckGroupRecursive,1,1,sg,sg,g,f,min,max,ext_params)
if tg:GetCount()==0 then error("Incorrect Group Filter",2) end
sg:Merge(tg)
ct=sg:GetCount()
end
return sg
end
function Chikichikibanban.matfilter1(c,syncard,tp)
if c:IsFacedown() then return false end
if c:IsSetCard(0x37f6) and c:IsSynchroType(TYPE_PENDULUM) and c:IsControler(tp) and c:IsLocation(LOCATION_PZONE) and c:IsType(TYPE_TUNER) then return true end
return c:IsSynchroType(TYPE_TUNER) and c:IsCanBeSynchroMaterial(syncard) and (c:IsFaceup() or not c:IsLocation(LOCATION_MZONE))
and (c:IsSetCard(0x37f6) or not c:IsLocation(LOCATION_PZONE))
end
function Chikichikibanban.matfilter2(c,syncard)
if c:IsSetCard(0x37f6) and c:IsSynchroType(TYPE_PENDULUM) and c:IsControler(tp) and c:IsLocation(LOCATION_PZONE) and not c:IsType(TYPE_TUNER) then return true end
return c:IsSynchroType(TYPE_PENDULUM) and (c:IsLocation(LOCATION_HAND) or c:IsFaceup()) and c:IsNotTuner(syncard) and c:IsCanBeSynchroMaterial(syncard)
and (c:IsFaceup() or not c:IsLocation(LOCATION_MZONE)) and (c:IsSetCard(0x37f6) or not c:IsLocation(LOCATION_PZONE))
end
function Chikichikibanban.synfilter(c,syncard,lv,g2,g3,minc,maxc,tp)
local tsg=c:IsHasEffect(EFFECT_HAND_SYNCHRO) and g3 or g2
local f=c.tuner_filter
if c.tuner_filter then tsg=tsg:Filter(f,nil) end
return Chikichikibanban.CheckGroup(tsg,Chikichikibanban.goal,Group.FromCards(c),minc,maxc,tp,lv,syncard,c)
end
function Chikichikibanban.goal(g,tp,lv,syncard,tuc)
if Duel.GetLocationCountFromEx(tp,tp,g,syncard)<=0 then return false end
if tuc:IsHasEffect(EFFECT_HAND_SYNCHRO) and g:IsExists(Card.IsLocation,2,tuc,LOCATION_HAND) then return false end
local ct=g:GetCount()
return g:CheckWithSumEqual(Chikichikibanban.val,lv,ct,ct,syncard)
end
function Chikichikibanban.syncon(e,c,tuner,mg)
if c==nil then return true end
if c:IsType(TYPE_PENDULUM) and c:IsFaceup() then return false end
local tp=c:GetControler()
local minc=2
local maxc=c:GetLevel()
local g1=nil
local g2=nil
local g3=nil
if mg then
g1=mg:Filter(Chikichikibanban.matfilter1,nil,c,tp)
g2=mg:Filter(Chikichikibanban.matfilter2,nil,c)
g3=g2:Clone()
else
g1=Duel.GetMatchingGroup(Chikichikibanban.matfilter1,tp,LOCATION_MZONE+LOCATION_PZONE,LOCATION_MZONE,nil,c,tp)
g2=Duel.GetMatchingGroup(Chikichikibanban.matfilter2,tp,LOCATION_MZONE+LOCATION_PZONE,LOCATION_MZONE,nil,c)
g3=Duel.GetMatchingGroup(Chikichikibanban.matfilter2,tp,LOCATION_MZONE+LOCATION_HAND,LOCATION_MZONE,nil,c)
end
local lv=c:GetLevel()
local sg=nil
if tuner then
return Chikichikibanban.matfilter1(c,tp) and Chikichikibanban.synfilter(tuner,c,lv,g2,g3,minc,maxc,tp)
else
return g1:IsExists(Chikichikibanban.synfilter,1,nil,c,lv,g2,g3,minc,maxc,tp)
end
end
function Chikichikibanban.syntg(e,tp,eg,ep,ev,re,r,rp,chk,c,tuner,mg)
local minc=2
local maxc=c:GetLevel()
local g1=nil
local g2=nil
local g3=nil
if mg then
g1=mg:Filter(Chikichikibanban.matfilter1,nil,c,tp)
g2=mg:Filter(Chikichikibanban.matfilter2,nil,c)
g3=g2:Clone()
else
g1=Duel.GetMatchingGroup(Chikichikibanban.matfilter1,tp,LOCATION_MZONE+LOCATION_PZONE,LOCATION_MZONE,nil,c,tp)
g2=Duel.GetMatchingGroup(Chikichikibanban.matfilter2,tp,LOCATION_MZONE+LOCATION_PZONE,LOCATION_MZONE,nil,c)
g3=Duel.GetMatchingGroup(Chikichikibanban.matfilter2,tp,LOCATION_MZONE+LOCATION_HAND,LOCATION_MZONE,nil,c)
end
local pe=Duel.IsPlayerAffectedByEffect(tp,EFFECT_MUST_BE_SMATERIAL)
local lv=c:GetLevel()
local tuc=nil
if tuner then
tuner=tuc
else
Duel.Hint(HINT_SELECTMSG,tp,HINTMSG_SMATERIAL)
if not pe then
local t1=g1:FilterSelect(tp,Chikichikibanban.synfilter,1,1,nil,c,lv,g2,g3,minc,maxc,tp)
tuc=t1:GetFirst()
else
tuc=pe:GetOwner()
Group.FromCards(tuc):Select(tp,1,1,nil)
end
end
tuc:RegisterFlagEffect(m,RESET_EVENT+0x1fe0000,0,1)
local tsg=tuc:IsHasEffect(EFFECT_HAND_SYNCHRO) and g3 or g2
local f=tuc.tuner_filter
if tuc.tuner_filter then tsg=tsg:Filter(f,nil) end
local g=Chikichikibanban.SelectGroup(tp,HINTMSG_SMATERIAL,tsg,Chikichikibanban.goal,Group.FromCards(tuc),minc,maxc,tp,lv,c,tuc)
if g then
g:KeepAlive()
e:SetLabelObject(g)
return true
else return false end
end
function Chikichikibanban.synop(e,tp,eg,ep,ev,re,r,rp,c,tuner,mg)
local g=e:GetLabelObject()
c:SetMaterial(g)
Duel.SendtoGrave(g,REASON_MATERIAL+REASON_SYNCHRO)
g:DeleteGroup()
end
--铳影自肃(代写)
function Chikichikibanban.c4a71Limit(c)
--spsummon cost
local e1=Effect.CreateEffect(c)
e1:SetType(EFFECT_TYPE_SINGLE)
e1:SetCode(EFFECT_SPSUMMON_COST)
e1:SetProperty(EFFECT_FLAG_CANNOT_DISABLE)
e1:SetCost(Chikichikibanban.c4a71Limitspcost)
e1:SetOperation(Chikichikibanban.c4a71Limitspcop)
c:RegisterEffect(e1)
--spsummon condition
local e2=Effect.CreateEffect(c)
e2:SetType(EFFECT_TYPE_SINGLE)
e2:SetProperty(EFFECT_FLAG_CANNOT_DISABLE+EFFECT_FLAG_UNCOPYABLE)
e2:SetCode(EFFECT_SPSUMMON_CONDITION)
e2:SetValue(Chikichikibanban.c4a71Limitsplimit2)
c:RegisterEffect(e2)
Duel.AddCustomActivityCounter(12825602,ACTIVITY_SPSUMMON,Chikichikibanban.counterfilter)
end
function Chikichikibanban.counterfilter(c)
return not c:IsSummonLocation(LOCATION_EXTRA) or c:IsType(TYPE_XYZ)
end
function Chikichikibanban.c4a71Limitspcost(e,c,tp)
return Duel.GetCustomActivityCount(12825602,tp,ACTIVITY_SPSUMMON)==0
end
function Chikichikibanban.c4a71Limitspcop(e,tp,eg,ep,ev,re,r,rp)
local c=e:GetHandler()
local e1=Effect.CreateEffect(e:GetHandler())
e1:SetType(EFFECT_TYPE_FIELD)
e1:SetProperty(EFFECT_FLAG_PLAYER_TARGET+EFFECT_FLAG_OATH)
e1:SetCode(EFFECT_CANNOT_SPECIAL_SUMMON)
e1:SetReset(RESET_PHASE+PHASE_END)
e1:SetTargetRange(1,0)
e1:SetTarget(Chikichikibanban.c4a71Limitsplimit)
Duel.RegisterEffect(e1,tp)
end
function Chikichikibanban.c4a71Limitsplimit(e,c)
return c:IsLocation(LOCATION_EXTRA) and not c:IsType(TYPE_XYZ)
end
function Chikichikibanban.c4a71Limitsplimit2(e,se,sp,st)
return se:GetHandler():IsSetCard(0x4a71)
end
--铳影通用回收(代写)
function Chikichikibanban.c4a71tohand(c,tg,op,category)
local tg=tg
if not tg then tg=Chikichikibanban.c4a71tohandthtg end
local op=op
if not op then op=Chikichikibanban.c4a71tohandthop end
local category=category
if not category then category=CATEGORY_TOHAND+CATEGORY_SEARCH end
--to hand
local e1=Effect.CreateEffect(c)
e1:SetDescription(1110)
e1:SetCategory(category)
e1:SetType(EFFECT_TYPE_IGNITION)
e1:SetRange(LOCATION_GRAVE)
e1:SetCost(aux.bfgcost)
e1:SetTarget(tg)
e1:SetOperation(op)
c:RegisterEffect(e1)
end
function Chikichikibanban.c4a71tohandthfilter(c)
return c:IsSetCard(0x4a71) and c:IsAbleToHand()
end
function Chikichikibanban.c4a71tohandthtg(e,tp,eg,ep,ev,re,r,rp,chk)
if chk==0 then return Duel.IsExistingMatchingCard(Chikichikibanban.c4a71tohandthfilter,tp,LOCATION_GRAVE,0,1,nil) end
Duel.SetOperationInfo(0,CATEGORY_TOHAND,nil,1,tp,LOCATION_GRAVE)
end
function Chikichikibanban.c4a71tohandthop(e,tp,eg,ep,ev,re,r,rp)
Duel.Hint(HINT_SELECTMSG,tp,HINTMSG_ATOHAND)
local g=Duel.SelectMatchingCard(tp,Chikichikibanban.c4a71tohandthfilter,tp,LOCATION_GRAVE,0,1,1,nil)
local tc=g:GetFirst()
if tc:IsCode(12825601) and Duel.GetLocationCount(tp,LOCATION_MZONE)>0
and tc:IsCanBeSpecialSummoned(e,0,tp,false,false) and Duel.SelectYesNo(tp,2) then
Duel.SpecialSummon(tc,0,tp,tp,false,false,POS_FACEUP)
else
Duel.SendtoHand(tc,nil,REASON_EFFECT)
Duel.ConfirmCards(1-tp,tc)
end
end
--铳影通用康型效果(代写)
function Chikichikibanban.c4a71kang(c,con,tg,op,category,cardcode,message,excode)
local con=con
if not con then con=Chikichikibanban.c4a71kangdiscon end
local tg=tg
if not tg then tg=Chikichikibanban.c4a71tohandthtg end
local op=op
if not op then op=Chikichikibanban.c4a71tohandthop end
local cardcode=cardcode
local excode=excode
local category=category
if not category then category=CATEGORY_TOHAND+CATEGORY_SEARCH end
--negate
local e1=Effect.CreateEffect(c)
e1:SetDescription(message)
e1:SetCategory(CATEGORY_NEGATE)
e1:SetType(EFFECT_TYPE_QUICK_O)
e1:SetCode(EVENT_CHAINING)
e1:SetProperty(EFFECT_FLAG_DAMAGE_STEP+EFFECT_FLAG_DAMAGE_CAL)
e1:SetRange(LOCATION_MZONE)
e1:SetCountLimit(1,cardcode)
e1:SetCondition(con)
e1:SetTarget(tg)
e1:SetOperation(op)
c:RegisterEffect(e1)
local e2=e1:Clone()
e2:SetCountLimit(1)
e2:SetCost(Chikichikibanban.c4a71kangcost)
e2:SetCondition(Chikichikibanban.c4a71kangdiscon2(con,excode))
c:RegisterEffect(e2)
--summon success
local e3=Effect.CreateEffect(c)
e3:SetType(EFFECT_TYPE_SINGLE+EFFECT_TYPE_CONTINUOUS)
e3:SetCode(EVENT_SPSUMMON_SUCCESS)
e3:SetOperation(Chikichikibanban.sumsuc)
c:RegisterEffect(e3)
end
function Chikichikibanban.c4a71kang2(c,con,tg,op,category,cardcode,message,excode)
local con=con
if not con then con=Chikichikibanban.c4a71kangdiscon end
local tg=tg
if not tg then tg=Chikichikibanban.c4a71tohandthtg end
local op=op
if not op then op=Chikichikibanban.c4a71tohandthop end
local cardcode=cardcode
local excode=excode
local category=category
if not category then category=CATEGORY_TOHAND+CATEGORY_SEARCH end
--negate
local e1=Effect.CreateEffect(c)
e1:SetDescription(message)
e1:SetCategory(CATEGORY_NEGATE)
e1:SetType(EFFECT_TYPE_FIELD+EFFECT_TYPE_TRIGGER_O)
e1:SetCode(EVENT_CHAINING)
e1:SetProperty(EFFECT_FLAG_DELAY)
e1:SetRange(LOCATION_MZONE)
e1:SetCountLimit(1,cardcode)
e1:SetCondition(con)
e1:SetTarget(tg)
e1:SetOperation(op)
c:RegisterEffect(e1)
local e2=e1:Clone()
e2:SetCountLimit(1)
e2:SetCost(Chikichikibanban.c4a71kangcost)
e2:SetCondition(Chikichikibanban.c4a71kangdiscon2(con,excode))
c:RegisterEffect(e2)
--summon success
local e3=Effect.CreateEffect(c)
e3:SetType(EFFECT_TYPE_SINGLE+EFFECT_TYPE_CONTINUOUS)
e3:SetCode(EVENT_SPSUMMON_SUCCESS)
e3:SetOperation(Chikichikibanban.sumsuc)
c:RegisterEffect(e3)
end
function Chikichikibanban.c4a71kangcost(e,tp,eg,ep,ev,re,r,rp,chk)
if chk==0 then return e:GetHandler():CheckRemoveOverlayCard(tp,1,REASON_COST)
and Duel.GetFlagEffect(tp,12825602)==0 end
e:GetHandler():RemoveOverlayCard(tp,1,1,REASON_COST)
Duel.RegisterFlagEffect(tp,12825602,RESET_PHASE+PHASE_END,EFFECT_FLAG_OATH,1)
end
function Chikichikibanban.sumsuc(e,tp,eg,ep,ev,re,r,rp)
local c=e:GetHandler()
if e:GetHandler():GetFlagEffect(12825612)~=0 then return end
c:RegisterFlagEffect(12825612,RESET_PHASE+PHASE_END,0,1)
end
function Chikichikibanban.c4a71kangdiscon(e,tp,eg,ep,ev,re,r,rp)
return rp==1-tp and e:GetHandler():GetFlagEffect(12825612)>0
end
function Chikichikibanban.c4a71kangdiscon2(con,excode)
return function(e,tp,eg,ep,ev,re,r,rp)
return (not con or con(e,tp,eg,ep,ev,re,r,rp)) and e:GetHandler():GetOverlayGroup():IsExists(Card.IsCode,1,nil,excode)
end
end
--铳影通用升阶效果(代写)
function Chikichikibanban.c4a71rankup(c,f1,f2,cardcode)
--Activate
local e1=Effect.CreateEffect(c)
e1:SetDescription(2)
e1:SetCategory(CATEGORY_SPECIAL_SUMMON)
e1:SetType(EFFECT_TYPE_ACTIVATE)
e1:SetCode(EVENT_FREE_CHAIN)
e1:SetCountLimit(1,cardcode)
e1:SetProperty(EFFECT_FLAG_CARD_TARGET)
e1:SetTarget(Chikichikibanban.c4a71rankuptarget(f1,f2))
e1:SetOperation(Chikichikibanban.c4a71rankupactivate(f1,f2))
c:RegisterEffect(e1)
end
function Chikichikibanban.c4a71rankupfilter1(c,e,tp,f1,f2)
return (not f1 or f1(c)) and Duel.IsExistingMatchingCard(Chikichikibanban.c4a71rankupfilter2,tp,LOCATION_EXTRA,0,1,nil,e,tp,c,f2)
and aux.MustMaterialCheck(c,tp,EFFECT_MUST_BE_XMATERIAL)
end
function Chikichikibanban.c4a71rankupfilter2(c,e,tp,mc,f2)
return (not f2 or f2(c)) and mc:IsCanBeXyzMaterial(c)
and c:IsCanBeSpecialSummoned(e,SUMMON_TYPE_XYZ,tp,false,false) and Duel.GetLocationCountFromEx(tp,tp,mc,c)>0
end
function Chikichikibanban.c4a71rankuptarget(f1,f2)
return function(e,tp,eg,ep,ev,re,r,rp,chk,chkc)
if chkc then return chkc:IsControler(tp) and chkc:IsLocation(LOCATION_MZONE) and Chikichikibanban.c4a71rankupfilter1(chkc,e,tp,f1,f2) end
if chk==0 then return Duel.IsExistingTarget(Chikichikibanban.c4a71rankupfilter1,tp,LOCATION_MZONE,0,1,nil,e,tp,f1,f2) end
Duel.Hint(HINT_SELECTMSG,tp,HINTMSG_TARGET)
Duel.SelectTarget(tp,Chikichikibanban.c4a71rankupfilter1,tp,LOCATION_MZONE,0,1,1,nil,e,tp,f1,f2)
Duel.SetOperationInfo(0,CATEGORY_SPECIAL_SUMMON,nil,1,tp,LOCATION_EXTRA)
end
end
function Chikichikibanban.c4a71rankupactivate(f1,f2)
return function(e,tp,eg,ep,ev,re,r,rp)
local c=e:GetHandler()
local tc=Duel.GetFirstTarget()
if not aux.MustMaterialCheck(tc,tp,EFFECT_MUST_BE_XMATERIAL) then return end
if tc:IsFacedown() or not tc:IsRelateToEffect(e) or tc:IsControler(1-tp) or tc:IsImmuneToEffect(e) then return end
Duel.Hint(HINT_SELECTMSG,tp,HINTMSG_SPSUMMON)
local g=Duel.SelectMatchingCard(tp,Chikichikibanban.c4a71rankupfilter2,tp,LOCATION_EXTRA,0,1,1,nil,e,tp,tc,f2)
local sc=g:GetFirst()
if sc then
local mg=tc:GetOverlayGroup()
if mg:GetCount()~=0 then
Duel.Overlay(sc,mg)
end
sc:SetMaterial(Group.FromCards(tc))
Duel.Overlay(sc,Group.FromCards(tc))
Duel.SpecialSummon(sc,SUMMON_TYPE_XYZ,tp,tp,false,false,POS_FACEUP)
sc:CompleteProcedure()
if c:IsRelateToEffect(e) then
c:CancelToGrave()
Duel.Overlay(sc,Group.FromCards(c))
end
end
end
end
--通用墓地启动效果
function Chikichikibanban.chikione(c,location,cost,con,tg,op,category,cardcode,message)
local location=location
if not location then location=LOCATION_MZONE end
local cost=cost
local con=con
local tg=tg
if not tg then tg=Chikichikibanban.c4a71tohandthtg end
local op=op
if not op then op=Chikichikibanban.c4a71tohandthop end
local message=message
local cardcode=cardcode
local category=category
--material
local e1=Effect.CreateEffect(c)
e1:SetDescription(message)
if category then
e1:SetCategory(category)
end
e1:SetType(EFFECT_TYPE_IGNITION)
e1:SetCountLimit(1,cardcode)
e1:SetProperty(EFFECT_FLAG_CARD_TARGET)
e1:SetRange(location)
if con then
e1:SetCondition(con)
end
if cost then
e1:SetCost(cost)
end
e1:SetTarget(tg)
e1:SetOperation(op)
c:RegisterEffect(e1)
end
function Chikichikibanban.chikiav(c,propery,cost,con,tg,op,category,cardcode,message)
local propery=propery
local cost=cost
local con=con
local tg=tg
if not tg then tg=Chikichikibanban.c4a71tohandthtg end
local op=op
if not op then op=Chikichikibanban.c4a71tohandthop end
local category=category
local cardcode=cardcode
local message=message
--Activate
local e1=Effect.CreateEffect(c)
e1:SetDescription(message)
e1:SetCategory(category)
e1:SetType(EFFECT_TYPE_ACTIVATE)
e1:SetCode(EVENT_FREE_CHAIN)
e1:SetCountLimit(1,cardcode)
if propery then
e1:SetProperty(propery)
end
if con then
e1:SetCondition(con)
end
if cost then
e1:SetCost(cost)
end
e1:SetTarget(tg)
e1:SetOperation(op)
c:RegisterEffect(e1)
end
function Chikichikibanban.cost(e,tp,eg,ep,ev,re,r,rp,chk)
if chk==0 then return true end
end
\ No newline at end of file
--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)
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
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
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
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
......@@ -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
......@@ -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)
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)
local g=e:GetLabel()
return e:GetHandler():IsSummonType(SUMMON_TYPE_FUSION) and g>4
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)
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,36 +41,19 @@ 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
......@@ -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,55 +89,11 @@ 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)
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)
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
end
function cm.distg(e,c)
......@@ -175,3 +107,21 @@ 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
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,4,4,nil)
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,LOCATION_MZONE,1,1,nil)
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)
......@@ -100,15 +78,19 @@ local c=e:GetHandler()
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)
--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.efilter(e,re)
return e:GetOwnerPlayer()~=re:GetOwnerPlayer()
end
function cm.discon(e,tp,eg,ep,ev,re,r,rp)
local tc=e:GetLabelObject()
return re:GetHandler():IsOriginalCodeRule(tc:GetOriginalCodeRule())
function cm.dircon(e)
return e:GetHandler():GetControler()==e:GetOwnerPlayer()
end
function cm.disop(e,tp,eg,ep,ev,re,r,rp)
Duel.NegateEffect(ev)
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)
......@@ -111,3 +125,27 @@ function cm.op(e,tp,eg,ep,ev,re,r,rp)
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)
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)
function cm.filter(c,e,tp)
return c:IsSetCard(0x341) and c:IsCanBeSpecialSummoned(e,0,tp,false,false)
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.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.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()
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
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)
end
function c33401304.splimit(e,c,sump,sumtype,sumpos,targetp,se)
return not c:IsSetCard(0x341)
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 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.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
function cm.activate(e,tp,eg,ep,ev,re,r,rp)
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)
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.spfilter(c,e,tp)
return c:IsSetCard(0x341) and c:IsCanBeSpecialSummoned(e,0,tp,false,false)
function cm.thcon(e,tp,eg,ep,ev,re,r,rp)
return Duel.GetTurnPlayer()==tp
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)
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
end
function c33401307.thfilter(c)
return c:IsSetCard(0x341) and c:IsSetCard(0x46) and c:IsType(TYPE_SPELL) and c:IsAbleToHand()
function cm.spfilter2(c,e,tp)
return c:IsSetCard(0x341,0xa342) and c:IsCanBeSpecialSummoned(e,0,tp,false,false)
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)
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 cm.fusfilter5(c)
return c:IsSetCard(0x341)
end
function c33401309.uqfilter(c)
return c:GetOriginalCode()==33401309
function cm.thfilter1(c)
return c:IsSetCard(0xc342) and c:IsAbleToHand()
end
function c33401309.thfilter2(c)
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
......@@ -32,21 +32,17 @@ function cm.cost(e,tp,eg,ep,ev,re,r,rp,chk)
end
function cm.tg(e,tp,eg,ep,ev,re,r,rp,chk,chkc)
if chkc then return chkc:IsOnField() end
if chk==0 then return Duel.IsExistingTarget(Card.IsSetCard,tp,LOCATION_FZONE,0,1,nil,0x341) end
if chk==0 then return Duel.IsExistingTarget(Card.IsSetCard,tp,LOCATION_FZONE,0,1,nil,0x341,0x340) end
end
function cm.op(e,tp,eg,ep,ev,re,r,rp)
local g2=Duel.GetMatchingGroup(nil,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_IMMUNE_EFFECT)
e1:SetTargetRange(LOCATION_MZONE,0)
e1:SetTarget(aux.TargetBoolFunction(Card.IsSetCard,0x341,0x340,0x5344))
e1:SetValue(cm.efilter)
e1:SetReset(RESET_PHASE+Duel.GetCurrentPhase())
Duel.RegisterEffect(e1,tp)
end
function cm.efilter(e,re)
return e:GetOwnerPlayer()~=re:GetOwnerPlayer()
......
......@@ -23,6 +23,7 @@ function cm.initial_effect(c)
e3:SetCategory(CATEGORY_TOHAND+CATEGORY_GRAVE_ACTION)
e3:SetType(EFFECT_TYPE_SINGLE+EFFECT_TYPE_TRIGGER_F)
e3:SetCode(EVENT_SPSUMMON_SUCCESS)
e3:SetCountLimit(1,m)
e3:SetTarget(cm.thtg)
e3:SetOperation(cm.thop)
c:RegisterEffect(e3)
......@@ -32,6 +33,7 @@ function cm.initial_effect(c)
e4:SetCategory(CATEGORY_TOGRAVE)
e4:SetType(EFFECT_TYPE_SINGLE+EFFECT_TYPE_TRIGGER_O)
e4:SetCode(EVENT_SPSUMMON_SUCCESS)
e4:SetCountLimit(1,m+1)
e4:SetTarget(cm.rectg)
e4:SetOperation(cm.recop)
c:RegisterEffect(e4)
......@@ -41,7 +43,7 @@ function cm.initial_effect(c)
e5:SetType(EFFECT_TYPE_SINGLE+EFFECT_TYPE_TRIGGER_O)
e5:SetCode(EVENT_TO_GRAVE)
e5:SetProperty(EFFECT_FLAG_DELAY)
e5:SetCountLimit(1,m)
e5:SetCountLimit(1,m+2)
e5:SetTarget(cm.stg)
e5:SetOperation(cm.sop)
c:RegisterEffect(e5)
......
--神心流剑豪·苏利尔
--神心流剑豪·厄科
function c66914000.initial_effect(c)
--activate from hand
local e1=Effect.CreateEffect(c)
......@@ -31,7 +31,7 @@ function c66914000.condition(e,tp,eg,ep,ev,re,r,rp)
count=count+1
end
end
return count>=2 and Duel.GetCurrentChain()>1
return count>=1 and Duel.GetCurrentChain()>0
end
function c66914000.thtg(e,tp,eg,ep,ev,re,r,rp,chk,chkc)
local count=0
......@@ -42,19 +42,22 @@ function c66914000.thtg(e,tp,eg,ep,ev,re,r,rp,chk,chkc)
count=count+1
end
end
if chk==0 then return (count<3 or Duel.IsPlayerCanDraw(tp,1)) end
if chk==0 then return count>0 and (Duel.GetFieldGroupCount(tp,LOCATION_DECK,0)>=count or count<3) end
local cat=0
if count>=2 then
cat=cat|CATEGORY_DAMAGE
Duel.SetOperationInfo(0,CATEGORY_DAMAGE,nil,0,1-tp,1000)
end
if count>=3 then
cat=cat|CATEGORY_DRAW
Duel.SetOperationInfo(0,CATEGORY_DRAW,nil,0,tp,1)
cat=cat|CATEGORY_TOHAND
cat=cat|CATEGORY_SEARCH
end
e:SetCategory(cat)
e:SetLabel(count)
end
function c66914000.filter(c)
return c:IsSetCard(0x373) and c:IsAbleToHand()
end
function c66914000.thop(e,tp,eg,ep,ev,re,r,rp)
local count=e:GetLabel()
if count>=1 then
......@@ -74,6 +77,16 @@ function c66914000.thop(e,tp,eg,ep,ev,re,r,rp)
end
if count>=3 then
Duel.BreakEffect()
Duel.Draw(tp,1,REASON_EFFECT)
if Duel.GetFieldGroupCount(tp,LOCATION_DECK,0)==0 then return end
Duel.ConfirmDecktop(tp,count)
local dg=Duel.GetDecktopGroup(tp,count)
local g=dg:Filter(c66914000.filter,nil)
if g:GetCount()>0 then
Duel.Hint(HINT_SELECTMSG,tp,HINTMSG_ATOHAND)
local sg=g:Select(tp,1,1,nil)
Duel.SendtoHand(sg,nil,REASON_EFFECT)
Duel.ConfirmCards(1-tp,sg)
end
Duel.ShuffleDeck(tp)
end
end
\ No newline at end of file
......@@ -20,7 +20,7 @@ function c66914001.thtg(e,tp,eg,ep,ev,re,r,rp,chk,chkc)
count=count+1
end
end
if chk==0 then return Duel.IsExistingMatchingCard(Card.IsFaceup,tp,LOCATION_MZONE,0,1,nil) and (count~=1 or Duel.IsExistingMatchingCard(c66914001.filter,tp,LOCATION_GRAVE,0,1,nil)) and (count~=2 or Duel.IsExistingMatchingCard(c66914001.filter,tp,LOCATION_DECK,0,1,nil)) end
if chk==0 then return (count~=1 or Duel.IsExistingMatchingCard(c66914001.filter,tp,LOCATION_GRAVE,0,1,nil)) and (count~=2 or Duel.IsExistingMatchingCard(c66914001.filter,tp,LOCATION_DECK,0,1,nil)) end
local cat=0
if count==2 then
cat=cat|CATEGORY_TOHAND
......@@ -36,20 +36,13 @@ function c66914001.thtg(e,tp,eg,ep,ev,re,r,rp,chk,chkc)
end
function c66914001.thop(e,tp,eg,ep,ev,re,r,rp)
local count=e:GetLabel()
local g=Duel.GetMatchingGroup(Card.IsFaceup,tp,LOCATION_MZONE,0,nil)
local tc=g:GetFirst()
while tc do
local e1=Effect.CreateEffect(e:GetHandler())
e1:SetType(EFFECT_TYPE_SINGLE)
e1:SetType(EFFECT_TYPE_FIELD)
e1:SetCode(EFFECT_UPDATE_ATTACK)
e1:SetTargetRange(LOCATION_MZONE,0)
e1:SetValue(500)
e1:SetReset(RESET_EVENT+RESETS_STANDARD)
tc:RegisterEffect(e1)
local e2=e1:Clone()
e2:SetCode(EFFECT_UPDATE_DEFENSE)
tc:RegisterEffect(e2)
tc=g:GetNext()
end
e1:SetReset(RESET_PHASE+PHASE_END)
Duel.RegisterEffect(e1,tp)
if count==3 then
Duel.BreakEffect()
Duel.Hint(HINT_SELECTMSG,tp,HINTMSG_ATOHAND)
......
......@@ -19,7 +19,7 @@ function c66914005.condition(e,tp,eg,ep,ev,re,r,rp)
count=count+1
end
end
return count>=3 and Duel.GetCurrentChain()>2
return count>=1 and Duel.GetCurrentChain()>1
end
function c66914005.thtg(e,tp,eg,ep,ev,re,r,rp,chk,chkc)
local count=0
......@@ -30,7 +30,7 @@ function c66914005.thtg(e,tp,eg,ep,ev,re,r,rp,chk,chkc)
count=count+1
end
end
if chk==0 then return Duel.IsExistingMatchingCard(aux.NegateAnyFilter,tp,0,LOCATION_GRAVE+LOCATION_ONFIELD,1,nil) and (count~=3 or Duel.GetFlagEffect(tp,666914005)==0 ) and (count~=4 or Duel.GetFlagEffect(tp,666914006)==0) end
if chk==0 then return Duel.IsExistingMatchingCard(aux.NegateAnyFilter,tp,0,LOCATION_GRAVE+LOCATION_ONFIELD,1,nil) end
local te1,tep1=Duel.GetChainInfo(chain,CHAININFO_TRIGGERING_EFFECT,CHAININFO_TRIGGERING_PLAYER)
if tep1~=tp then
Duel.SetChainLimit(c66914005.chainlm)
......@@ -51,7 +51,6 @@ function c66914005.thop(e,tp,eg,ep,ev,re,r,rp)
e1:SetValue(c66914005.aclimit)
e1:SetReset(RESET_PHASE+PHASE_END)
Duel.RegisterEffect(e1,tp)
Duel.RegisterFlagEffect(tp,666914005,RESET_PHASE+PHASE_END,0,0)
end
if count==5 then
local e1=Effect.CreateEffect(c)
......@@ -62,7 +61,6 @@ function c66914005.thop(e,tp,eg,ep,ev,re,r,rp)
e1:SetValue(c66914005.aclimit1)
e1:SetReset(RESET_PHASE+PHASE_END)
Duel.RegisterEffect(e1,tp)
Duel.RegisterFlagEffect(tp,666914006,RESET_PHASE+PHASE_END,0,0)
end
if ((tc:IsFaceup() and not tc:IsDisabled()) or tc:IsType(TYPE_TRAPMONSTER)) then
Duel.NegateRelatedChain(tc,RESET_TURN_SET)
......
......@@ -12,6 +12,7 @@ function c66914009.initial_effect(c)
e1:SetType(EFFECT_TYPE_QUICK_O)
e1:SetCode(EVENT_CHAINING)
e1:SetRange(LOCATION_SZONE)
e1:SetCondition(c66914009.spcon)
e1:SetTarget(c66914009.target)
e1:SetOperation(c66914009.activate)
c:RegisterEffect(e1)
......@@ -41,23 +42,21 @@ function c66914009.activate1(e,tp,eg,ep,ev,re,r,rp)
end
end
end
function c66914009.spcon(e,tp,eg,ep,ev,re,r,rp)
return re:GetHandler()~=e:GetHandler()
end
function c66914009.target(e,tp,eg,ep,ev,re,r,rp,chk)
if chk==0 then return Duel.IsExistingMatchingCard(Card.IsFaceup,tp,LOCATION_MZONE,0,1,nil) and e:GetHandler():GetFlagEffect(66914009)==0 end
if chk==0 then return e:GetHandler():GetFlagEffect(66914009)<=1 end
e:GetHandler():RegisterFlagEffect(66914009,RESET_CHAIN,0,1)
end
function c66914009.activate(e,tp,eg,ep,ev,re,r,rp)
local c=e:GetHandler()
local g=Duel.GetMatchingGroup(Card.IsFaceup,tp,LOCATION_MZONE,0,nil)
local tc=g:GetFirst()
while tc do
local e3=Effect.CreateEffect(c)
e3:SetType(EFFECT_TYPE_SINGLE)
e3:SetCode(EFFECT_UPDATE_ATTACK)
e3:SetReset(RESET_EVENT+RESETS_STANDARD)
e3:SetValue(0)
tc:RegisterEffect(e3)
tc=g:GetNext()
end
local e1=Effect.CreateEffect(e:GetHandler())
e1:SetType(EFFECT_TYPE_FIELD)
e1:SetCode(EFFECT_UPDATE_ATTACK)
e1:SetTargetRange(LOCATION_MZONE,0)
e1:SetValue(0)
e1:SetReset(RESET_PHASE+PHASE_END)
Duel.RegisterEffect(e1,tp)
end
function c66914009.condition2(e,tp,eg,ep,ev,re,r,rp)
return rp==tp and re:GetHandler():IsSetCard(0x373)
......
......@@ -2,7 +2,7 @@
function c67210104.initial_effect(c)
--Activate
local e1=Effect.CreateEffect(c)
e1:SetCategory(CATEGORY_DESTROY+CATEGORY_SPECIAL_SUMMON+CATEGORY_DECKDES)
e1:SetCategory(CATEGORY_DESTROY)
e1:SetType(EFFECT_TYPE_ACTIVATE)
e1:SetCode(EVENT_FREE_CHAIN)
e1:SetHintTiming(0,TIMINGS_CHECK_MONSTER)
......@@ -30,7 +30,6 @@ function c67210104.pctg(e,tp,eg,ep,ev,re,r,rp,chk)
end
function c67210104.pcop(e,tp,eg,ep,ev,re,r,rp)
local c=e:GetHandler()
if not c:IsRelateToEffect(e) then return end
if not Duel.CheckLocation(tp,LOCATION_PZONE,0) and not Duel.CheckLocation(tp,LOCATION_PZONE,1) then return end
Duel.Hint(HINT_SELECTMSG,tp,HINTMSG_TOFIELD)
local g=Duel.SelectMatchingCard(tp,c67210104.pcfilter,tp,LOCATION_EXTRA,0,1,1,nil)
......@@ -43,28 +42,9 @@ function c67210104.pcop(e,tp,eg,ep,ev,re,r,rp)
Duel.Destroy(gg,REASON_EFFECT)
end
end
local e1=Effect.CreateEffect(e:GetHandler())
e1:SetType(EFFECT_TYPE_FIELD+EFFECT_TYPE_CONTINUOUS)
e1:SetCode(EVENT_PHASE+PHASE_END)
e1:SetProperty(EFFECT_FLAG_CANNOT_DISABLE)
e1:SetCountLimit(1)
e1:SetOperation(c67210104.spop2)
e1:SetReset(RESET_PHASE+PHASE_END)
Duel.RegisterEffect(e1,tp)
end
function c67210104.filter(c,e,tp)
return c:IsSetCard(0x67e) and c:IsCanBeSpecialSummoned(e,0,tp,false,false)
and Duel.GetLocationCount(tp,LOCATION_MZONE)>0
end
function c67210104.spop2(e,tp,eg,ep,ev,re,r,rp)
Duel.Hint(HINT_CARD,1-tp,67210104)
local c=e:GetHandler()
Duel.Hint(HINT_SELECTMSG,tp,HINTMSG_SPSUMMON)
local g=Duel.SelectMatchingCard(tp,c67210104.filter,tp,LOCATION_DECK+LOCATION_GRAVE,0,1,1,nil,e,tp)
if g:GetCount()>0 then
Duel.SpecialSummon(g,0,tp,tp,false,false,POS_FACEUP)
end
end
function c67210104.handcon(e)
return Duel.GetFieldGroupCount(e:GetHandlerPlayer(),LOCATION_MZONE,0)==0
end
......
......@@ -16,7 +16,7 @@ function c67210106.initial_effect(c)
e2:SetType(EFFECT_TYPE_CONTINUOUS+EFFECT_TYPE_FIELD)
e2:SetCode(EVENT_TO_GRAVE)
e2:SetRange(LOCATION_PZONE)
e2:SetCountLimit(1)
e2:SetCountLimit(1,67210109)
e2:SetCondition(c67210106.rmcon)
e2:SetOperation(c67210106.rmop)
c:RegisterEffect(e2)
......
......@@ -16,7 +16,7 @@ function c67210108.initial_effect(c)
e2:SetType(EFFECT_TYPE_CONTINUOUS+EFFECT_TYPE_FIELD)
e2:SetCode(EVENT_TO_HAND)
e2:SetRange(LOCATION_PZONE)
e2:SetCountLimit(1)
e2:SetCountLimit(1,67210110)
e2:SetCondition(c67210108.tgcon)
e2:SetOperation(c67210108.tgop)
c:RegisterEffect(e2)
......
......@@ -20,8 +20,7 @@ function c72900060.initial_effect(c)
--Knife to the Soul
local e3=Effect.CreateEffect(c)
e3:SetCategory(CATEGORY_REMOVE)
e3:SetType(EFFECT_TYPE_FIELD+EFFECT_TYPE_TRIGGER_O)
e3:SetProperty(EFFECT_FLAG_CARD_TARGET)
e3:SetType(EFFECT_TYPE_FIELD+EFFECT_TYPE_TRIGGER_F)
e3:SetCode(EVENT_PHASE+PHASE_BATTLE)
e3:SetRange(LOCATION_MZONE)
e3:SetCountLimit(1)
......@@ -114,18 +113,19 @@ function c72900060.con2(e,tp,eg,ep,ev,re,r,rp)
return eqg and eqg:IsExists(Card.IsCode,1,nil,72900061) and c:GetAttackedCount()>0
end
function c72900060.rmfilter(c)
return c:IsAbleToRemove() and (c:IsType(TYPE_SPELL) or c:IsType(TYPE_TRAP))
return c:IsAbleToRemove() and c:IsType(TYPE_SPELL) and c:IsFaceup()
end
function c72900060.rmtg(e,tp,eg,ep,ev,re,r,rp,chk,chkc)
if chkc then return chkc:IsLocation(LOCATION_GRAVE+LOCATION_ONFIELD) and chkc:IsControler(1-tp) and c72900060.rmfilter(chkc) end
if chk==0 then return Duel.IsExistingTarget(c72900060.rmfilter,tp,0,LOCATION_GRAVE+LOCATION_ONFIELD,1,nil) end
if chk==0 then return true end
Duel.Hint(HINT_SELECTMSG,tp,HINTMSG_REMOVE)
local g=Duel.SelectTarget(tp,c72900060.rmfilter,tp,0,LOCATION_GRAVE+LOCATION_ONFIELD,1,1,nil)
Duel.SetOperationInfo(0,CATEGORY_REMOVE,g,1,1-tp,g:GetFirst():GetLocation())
local g=Duel.GetMatchingGroup(c72900060.rmfilter,tp,0,LOCATION_GRAVE+LOCATION_ONFIELD,nil)
if g:GetCount()>0 then
Duel.SetOperationInfo(0,CATEGORY_REMOVE,nil,1,1-tp,LOCATION_GRAVE+LOCATION_SZONE)
end
end
function c72900060.rmop(e,tp,eg,ep,ev,re,r,rp)
local tc=Duel.GetFirstTarget()
if tc:IsRelateToEffect(e) then
local tc=Duel.SelectMatchingCard(tp,c72900060.rmfilter,tp,0,LOCATION_GRAVE+LOCATION_ONFIELD,1,1,nil)
if tc and tc:GetCount()>0 then
Duel.Remove(tc,POS_FACEUP,REASON_EFFECT)
end
end
\ No newline at end of file
......@@ -5,77 +5,64 @@ Duel.LoadScript("c81000000.lua")
function cm.initial_effect(c)
--pendulum summon
aux.EnablePendulumAttribute(c)
--cannot disable spsummon
local e0=Effect.CreateEffect(c)
e0:SetType(EFFECT_TYPE_FIELD)
e0:SetCode(EFFECT_CANNOT_DISABLE_SPSUMMON)
e0:SetProperty(EFFECT_FLAG_IGNORE_RANGE+EFFECT_FLAG_SET_AVAILABLE)
e0:SetRange(LOCATION_PZONE)
e0:SetTarget(cm.distg)
c:RegisterEffect(e0)
--act limit
--tohand
local e1=Effect.CreateEffect(c)
e1:SetType(EFFECT_TYPE_FIELD+EFFECT_TYPE_CONTINUOUS)
e1:SetCode(EVENT_SPSUMMON_SUCCESS)
e1:SetCategory(CATEGORY_TOHAND)
e1:SetType(EFFECT_TYPE_IGNITION)
e1:SetProperty(EFFECT_FLAG_CARD_TARGET)
e1:SetRange(LOCATION_PZONE)
e1:SetCondition(cm.limcon)
e1:SetOperation(cm.limop)
e1:SetCountLimit(1,m)
e1:SetCost(cm.thcost)
e1:SetTarget(cm.thtg)
e1:SetOperation(cm.thop)
c:RegisterEffect(e1)
local e2=Effect.CreateEffect(c)
e2:SetType(EFFECT_TYPE_FIELD+EFFECT_TYPE_CONTINUOUS)
e2:SetRange(LOCATION_PZONE)
e2:SetCode(EVENT_CHAIN_END)
e2:SetOperation(cm.limop2)
c:RegisterEffect(e2)
--tohand
local e3=Effect.CreateEffect(c)
e3:SetCategory(CATEGORY_TOHAND+CATEGORY_SEARCH)
e3:SetType(EFFECT_TYPE_SINGLE+EFFECT_TYPE_TRIGGER_O)
e3:SetCode(EVENT_SUMMON_SUCCESS)
e3:SetProperty(EFFECT_FLAG_DAMAGE_STEP+EFFECT_FLAG_DELAY)
e3:SetCountLimit(1,m)
e3:SetTarget(cm.thtg)
e3:SetOperation(cm.thop)
e3:SetCountLimit(1,m+900)
e3:SetTarget(cm.tstg)
e3:SetOperation(cm.tsop)
c:RegisterEffect(e3)
local e4=e3:Clone()
e4:SetCode(EVENT_SPSUMMON_SUCCESS)
c:RegisterEffect(e4)
end
function cm.distg(e,c)
return c:IsControler(e:GetHandlerPlayer()) and c:IsRace(RACE_SPELLCASTER) and c:IsType(TYPE_RITUAL) and c:IsSummonType(SUMMON_TYPE_RITUAL)
function cm.cfilter(c)
return c:IsRace(RACE_SPELLCASTER) and c:IsDiscardable()
end
function cm.limfilter(c,tp)
return c:IsSummonPlayer(tp) and c:IsFaceup() and c:IsRace(RACE_SPELLCASTER) and c:IsType(TYPE_RITUAL) and c:IsSummonType(SUMMON_TYPE_RITUAL)
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) end
Duel.DiscardHand(tp,cm.cfilter,1,1,REASON_COST+REASON_DISCARD)
end
function cm.limcon(e,tp,eg,ep,ev,re,r,rp)
return eg:IsExists(cm.limfilter,1,nil,tp)
function cm.thfilter(c)
return c:IsFaceup() and c:IsType(TYPE_SPELL) and c:IsAbleToHand()
end
function cm.limop(e,tp,eg,ep,ev,re,r,rp)
if Duel.GetCurrentChain()==0 then
Duel.SetChainLimitTillChainEnd(cm.chainlm)
elseif Duel.GetCurrentChain()==1 then
e:GetHandler():RegisterFlagEffect(m,RESET_EVENT+RESETS_STANDARD+RESET_PHASE+PHASE_END,0,1)
end
function cm.thtg(e,tp,eg,ep,ev,re,r,rp,chk,chkc)
if chkc then return chkc:IsControler(tp) and chkc:IsLocation(LOCATION_REMOVED) and cm.thfilter(chkc) end
if chk==0 then return Duel.IsExistingTarget(cm.thfilter,tp,LOCATION_REMOVED,0,1,nil) end
Duel.Hint(HINT_SELECTMSG,tp,HINTMSG_ATOHAND)
local g=Duel.SelectTarget(tp,cm.thfilter,tp,LOCATION_REMOVED,0,1,1,nil)
Duel.SetOperationInfo(0,CATEGORY_TOHAND,g,1,0,0)
end
function cm.limop2(e,tp,eg,ep,ev,re,r,rp)
if e:GetHandler():GetOverlayCount()>0 and e:GetHandler():GetFlagEffect(m)~=0 then
Duel.SetChainLimitTillChainEnd(cm.chainlm)
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
e:GetHandler():ResetFlagEffect(m)
end
function cm.chlimit(e,rp,tp)
return tp==rp or (e:IsActiveType(TYPE_SPELL+TYPE_TRAP) and not e:IsHasType(EFFECT_TYPE_ACTIVATE))
end
function cm.thfilter(c)
return c:IsCode(33334568) and c:IsAbleToHand()
function cm.tsfilter(c)
return (c:IsCode(33334568) or aux.IsCodeListed(33334568)) and c:IsAbleToHand()
end
function cm.thtg(e,tp,eg,ep,ev,re,r,rp,chk)
if chk==0 then return Duel.IsExistingMatchingCard(cm.thfilter,tp,LOCATION_DECK+LOCATION_GRAVE,0,1,nil) end
function cm.tstg(e,tp,eg,ep,ev,re,r,rp,chk)
if chk==0 then return Duel.IsExistingMatchingCard(cm.tsfilter,tp,LOCATION_DECK+LOCATION_GRAVE,0,1,nil) end
Duel.SetOperationInfo(0,CATEGORY_TOHAND,nil,1,tp,LOCATION_DECK+LOCATION_GRAVE)
end
function cm.thop(e,tp,eg,ep,ev,re,r,rp)
function cm.tsop(e,tp,eg,ep,ev,re,r,rp)
Duel.Hint(HINT_SELECTMSG,tp,HINTMSG_ATOHAND)
local g=Duel.SelectMatchingCard(tp,aux.NecroValleyFilter(cm.thfilter),tp,LOCATION_GRAVE+LOCATION_DECK,0,1,1,nil)
local g=Duel.SelectMatchingCard(tp,aux.NecroValleyFilter(cm.tsfilter),tp,LOCATION_GRAVE+LOCATION_DECK,0,1,1,nil)
if g:GetCount()>0 then
Duel.SendtoHand(g,nil,REASON_EFFECT)
Duel.ConfirmCards(1-tp,g)
......
--尤娜·希斯 Page.4
--尤娜·希斯·Dango
local m=81026001
local cm=_G["c"..m]
Duel.LoadScript("c81000000.lua")
function cm.initial_effect(c)
--pendulum summon
aux.EnablePendulumAttribute(c)
--search
local e1=Effect.CreateEffect(c)
e1:SetDescription(aux.Stringid(m,0))
e1:SetCategory(CATEGORY_TOHAND)
--atk up
local e0=Effect.CreateEffect(c)
e0:SetCategory(CATEGORY_ATKCHANGE)
e0:SetType(EFFECT_TYPE_IGNITION)
e0:SetRange(LOCATION_PZONE)
e0:SetProperty(EFFECT_FLAG_CARD_TARGET)
e0:SetCountLimit(1)
e0:SetTarget(cm.atktg)
e0:SetOperation(cm.atkop)
c:RegisterEffect(e0)
--spsummon
local e1=aux.AddRitualProcGreater2(c,cm.filter,nil,nil,cm.mfilter)
e1:SetType(EFFECT_TYPE_IGNITION)
e1:SetRange(LOCATION_HAND)
e1:SetCode(0)
e1:SetCountLimit(1,m)
e1:SetCost(cm.rthcost)
e1:SetTarget(cm.rthtg)
e1:SetOperation(cm.rthop)
c:RegisterEffect(e1)
--tohand
local e2=Effect.CreateEffect(c)
e2:SetCategory(CATEGORY_TOHAND)
e2:SetType(EFFECT_TYPE_IGNITION)
e2:SetProperty(EFFECT_FLAG_CARD_TARGET)
e2:SetRange(LOCATION_PZONE)
e2:SetCountLimit(1,m+900)
e2:SetCost(cm.thcost)
e2:SetTarget(cm.thtg)
e2:SetOperation(cm.thop)
c:RegisterEffect(e2)
--spsummon
local e3=aux.AddRitualProcGreater2(c,cm.filter,nil,nil,cm.mfilter)
e3:SetType(EFFECT_TYPE_IGNITION)
e3:SetCode(0)
e3:SetCountLimit(1,m+990)
e3:SetRange(LOCATION_MZONE)
end
function cm.rthcostfil(c)
return c:IsType(TYPE_SPELL) and not c:IsType(TYPE_RITUAL) and c:IsAbleToGraveAsCost()
end
function cm.rthcost(e,tp,eg,ep,ev,re,r,rp,chk)
if chk==0 then return Duel.IsExistingMatchingCard(cm.rthcostfil,tp,LOCATION_HAND,0,1,e:GetHandler()) and e:GetHandler():IsAbleToGraveAsCost() end
local g=Duel.SelectMatchingCard(tp,cm.rthcostfil,tp,LOCATION_HAND,0,1,1,e:GetHandler())
g:AddCard(e:GetHandler())
Duel.SendtoGrave(g,REASON_COST)
end
function cm.rthfilter1(c)
return c:IsType(TYPE_RITUAL) and c:IsType(TYPE_SPELL) and c:IsAbleToHand()
e1:SetRange(LOCATION_MZONE)
end
function cm.rthfilter2(c)
return c:IsRace(RACE_SPELLCASTER) and c:IsType(TYPE_RITUAL) and c:IsAbleToHand()
function cm.atkfilter(c)
return c:IsFaceup() and c:IsRace(RACE_SPELLCASTER)
end
function cm.rthtg(e,tp,eg,ep,ev,re,r,rp,chk)
if chk==0 then return Duel.IsExistingMatchingCard(cm.rthfilter1,tp,LOCATION_GRAVE,0,1,nil) and Duel.IsExistingMatchingCard(cm.rthfilter2,tp,LOCATION_GRAVE,0,1,nil) end
Duel.SetOperationInfo(0,CATEGORY_TOHAND,nil,2,tp,LOCATION_GRAVE)
function cm.ctfilter(c)
return c:IsType(TYPE_SPELL)
end
function cm.rthop(e,tp,eg,ep,ev,re,r,rp)
Duel.Hint(HINT_SELECTMSG,tp,HINTMSG_ATOHAND)
local g1=Duel.SelectMatchingCard(tp,aux.NecroValleyFilter(cm.rthfilter1),tp,LOCATION_GRAVE,0,1,1,nil)
local g2=Duel.SelectMatchingCard(tp,aux.NecroValleyFilter(cm.rthfilter2),tp,LOCATION_GRAVE,0,1,1,nil)
if g1:GetCount()>0 and g2:GetCount()>0 then
g1:Merge(g2)
Duel.SendtoHand(g1,nil,REASON_EFFECT)
Duel.ConfirmCards(1-tp,g1)
end
end
function cm.cfilter(c)
return c:IsRace(RACE_SPELLCASTER) and c:IsDiscardable()
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) end
Duel.DiscardHand(tp,cm.cfilter,1,1,REASON_COST+REASON_DISCARD)
function cm.atktg(e,tp,eg,ep,ev,re,r,rp,chk,chkc)
if chkc then return chkc:IsControler(tp) and chkc:IsLocation(LOCATION_MZONE) and cm.atkfilter(chkc) end
if chk==0 then return Duel.IsExistingTarget(cm.atkfilter,tp,LOCATION_MZONE,0,1,nil)
and Duel.IsExistingMatchingCard(cm.ctfilter,tp,LOCATION_GRAVE,0,1,nil) end
Duel.Hint(HINT_SELECTMSG,tp,HINTMSG_FACEUP)
Duel.SelectTarget(tp,cm.atkfilter,tp,LOCATION_MZONE,0,1,1,nil)
end
function cm.thfilter(c)
return c:IsFaceup() and c:IsType(TYPE_SPELL) and c:IsAbleToHand()
end
function cm.thtg(e,tp,eg,ep,ev,re,r,rp,chk,chkc)
if chkc then return chkc:IsControler(tp) and chkc:IsLocation(LOCATION_REMOVED) and cm.thfilter(chkc) end
if chk==0 then return Duel.IsExistingTarget(cm.thfilter,tp,LOCATION_REMOVED,0,1,nil) end
Duel.Hint(HINT_SELECTMSG,tp,HINTMSG_ATOHAND)
local g=Duel.SelectTarget(tp,cm.thfilter,tp,LOCATION_REMOVED,0,1,1,nil)
Duel.SetOperationInfo(0,CATEGORY_TOHAND,g,1,0,0)
end
function cm.thop(e,tp,eg,ep,ev,re,r,rp)
if not e:GetHandler():IsRelateToEffect(e) then return end
function cm.atkop(e,tp,eg,ep,ev,re,r,rp)
local c=e:GetHandler()
local tc=Duel.GetFirstTarget()
if tc:IsRelateToEffect(e) then
Duel.SendtoHand(tc,nil,REASON_EFFECT)
local ct=Duel.GetMatchingGroupCount(cm.ctfilter,tp,LOCATION_GRAVE,0,nil)
if tc:IsFaceup() and tc:IsRelateToEffect(e) and ct>0 then
local e1=Effect.CreateEffect(c)
e1:SetType(EFFECT_TYPE_SINGLE)
e1:SetCode(EFFECT_UPDATE_ATTACK)
e1:SetValue(100*ct)
e1:SetReset(RESET_EVENT+RESETS_STANDARD+RESET_PHASE+PHASE_END,2)
tc:RegisterEffect(e1)
end
end
function cm.filter(c)
......
--尤娜·希斯 Down.7
--尤娜·希斯·Sleepy
local m=81026002
local cm=_G["c"..m]
Duel.LoadScript("c81000000.lua")
function cm.initial_effect(c)
--pendulum summon
aux.EnablePendulumAttribute(c)
--search
--cannot disable spsummon
local e0=Effect.CreateEffect(c)
e0:SetType(EFFECT_TYPE_FIELD)
e0:SetCode(EFFECT_CANNOT_DISABLE_SPSUMMON)
e0:SetProperty(EFFECT_FLAG_IGNORE_RANGE+EFFECT_FLAG_SET_AVAILABLE)
e0:SetRange(LOCATION_PZONE)
e0:SetTarget(cm.distg)
c:RegisterEffect(e0)
--act limit
local e1=Effect.CreateEffect(c)
e1:SetDescription(aux.Stringid(m,0))
e1:SetCategory(CATEGORY_TOHAND)
e1:SetType(EFFECT_TYPE_IGNITION)
e1:SetRange(LOCATION_HAND)
e1:SetCountLimit(1,m)
e1:SetCost(cm.rthcost)
e1:SetTarget(cm.rthtg)
e1:SetOperation(cm.rthop)
e1:SetType(EFFECT_TYPE_FIELD+EFFECT_TYPE_CONTINUOUS)
e1:SetCode(EVENT_SPSUMMON_SUCCESS)
e1:SetRange(LOCATION_PZONE)
e1:SetCondition(cm.limcon)
e1:SetOperation(cm.limop)
c:RegisterEffect(e1)
--tohand
local e2=Effect.CreateEffect(c)
e2:SetCategory(CATEGORY_TOHAND)
e2:SetType(EFFECT_TYPE_IGNITION)
e2:SetProperty(EFFECT_FLAG_CARD_TARGET)
e2:SetType(EFFECT_TYPE_FIELD+EFFECT_TYPE_CONTINUOUS)
e2:SetRange(LOCATION_PZONE)
e2:SetCountLimit(1,m+900)
e2:SetCost(cm.thcost)
e2:SetTarget(cm.thtg)
e2:SetOperation(cm.thop)
e2:SetCode(EVENT_CHAIN_END)
e2:SetOperation(cm.limop2)
c:RegisterEffect(e2)
--tohand
local e3=Effect.CreateEffect(c)
......@@ -33,77 +33,49 @@ function cm.initial_effect(c)
e3:SetType(EFFECT_TYPE_SINGLE+EFFECT_TYPE_TRIGGER_O)
e3:SetCode(EVENT_SUMMON_SUCCESS)
e3:SetProperty(EFFECT_FLAG_DAMAGE_STEP+EFFECT_FLAG_DELAY)
e3:SetCountLimit(1,m+990)
e3:SetTarget(cm.sthtg)
e3:SetOperation(cm.sthop)
e3:SetCountLimit(1,m)
e3:SetTarget(cm.thtg)
e3:SetOperation(cm.thop)
c:RegisterEffect(e3)
local e4=e3:Clone()
e4:SetCode(EVENT_SPSUMMON_SUCCESS)
c:RegisterEffect(e4)
end
function cm.rthcostfil(c)
return c:IsType(TYPE_SPELL) and not c:IsType(TYPE_RITUAL) and c:IsAbleToGraveAsCost()
end
function cm.rthcost(e,tp,eg,ep,ev,re,r,rp,chk)
if chk==0 then return Duel.IsExistingMatchingCard(cm.rthcostfil,tp,LOCATION_HAND,0,1,e:GetHandler()) and e:GetHandler():IsAbleToGraveAsCost() end
local g=Duel.SelectMatchingCard(tp,cm.rthcostfil,tp,LOCATION_HAND,0,1,1,e:GetHandler())
g:AddCard(e:GetHandler())
Duel.SendtoGrave(g,REASON_COST)
end
function cm.rthfilter1(c)
return c:IsType(TYPE_RITUAL) and c:IsType(TYPE_SPELL) and c:IsAbleToHand()
function cm.distg(e,c)
return c:IsControler(e:GetHandlerPlayer()) and c:IsRace(RACE_SPELLCASTER) and c:IsType(TYPE_RITUAL) and c:IsSummonType(SUMMON_TYPE_RITUAL)
end
function cm.rthfilter2(c)
return c:IsRace(RACE_SPELLCASTER) and c:IsType(TYPE_RITUAL) and c:IsAbleToHand()
function cm.limfilter(c,tp)
return c:IsSummonPlayer(tp) and c:IsFaceup() and c:IsRace(RACE_SPELLCASTER) and c:IsType(TYPE_RITUAL) and c:IsSummonType(SUMMON_TYPE_RITUAL)
end
function cm.rthtg(e,tp,eg,ep,ev,re,r,rp,chk)
if chk==0 then return Duel.IsExistingMatchingCard(cm.rthfilter1,tp,LOCATION_GRAVE,0,1,nil) and Duel.IsExistingMatchingCard(cm.rthfilter2,tp,LOCATION_GRAVE,0,1,nil) end
Duel.SetOperationInfo(0,CATEGORY_TOHAND,nil,2,tp,LOCATION_GRAVE)
function cm.limcon(e,tp,eg,ep,ev,re,r,rp)
return eg:IsExists(cm.limfilter,1,nil,tp)
end
function cm.rthop(e,tp,eg,ep,ev,re,r,rp)
Duel.Hint(HINT_SELECTMSG,tp,HINTMSG_ATOHAND)
local g1=Duel.SelectMatchingCard(tp,aux.NecroValleyFilter(cm.rthfilter1),tp,LOCATION_GRAVE,0,1,1,nil)
local g2=Duel.SelectMatchingCard(tp,aux.NecroValleyFilter(cm.rthfilter2),tp,LOCATION_GRAVE,0,1,1,nil)
if g1:GetCount()>0 and g2:GetCount()>0 then
g1:Merge(g2)
Duel.SendtoHand(g1,nil,REASON_EFFECT)
Duel.ConfirmCards(1-tp,g1)
function cm.limop(e,tp,eg,ep,ev,re,r,rp)
if Duel.GetCurrentChain()==0 then
Duel.SetChainLimitTillChainEnd(cm.chainlm)
elseif Duel.GetCurrentChain()==1 then
e:GetHandler():RegisterFlagEffect(m,RESET_EVENT+RESETS_STANDARD+RESET_PHASE+PHASE_END,0,1)
end
end
function cm.cfilter(c)
return c:IsType(TYPE_SPELL) and c:IsDiscardable()
function cm.limop2(e,tp,eg,ep,ev,re,r,rp)
if e:GetHandler():GetOverlayCount()>0 and e:GetHandler():GetFlagEffect(m)~=0 then
Duel.SetChainLimitTillChainEnd(cm.chainlm)
end
e:GetHandler():ResetFlagEffect(m)
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) end
Duel.DiscardHand(tp,cm.cfilter,1,1,REASON_COST+REASON_DISCARD)
function cm.chlimit(e,rp,tp)
return tp==rp or (e:IsActiveType(TYPE_SPELL+TYPE_TRAP) and not e:IsHasType(EFFECT_TYPE_ACTIVATE))
end
function cm.thfilter(c)
return c:IsFaceup() and c:IsRace(RACE_SPELLCASTER) and c:IsAbleToHand()
end
function cm.thtg(e,tp,eg,ep,ev,re,r,rp,chk,chkc)
if chkc then return chkc:IsControler(tp) and chkc:IsLocation(LOCATION_REMOVED) and cm.thfilter(chkc) end
if chk==0 then return Duel.IsExistingTarget(cm.thfilter,tp,LOCATION_REMOVED,0,1,nil) end
Duel.Hint(HINT_SELECTMSG,tp,HINTMSG_ATOHAND)
local g=Duel.SelectTarget(tp,cm.thfilter,tp,LOCATION_REMOVED,0,1,1,nil)
Duel.SetOperationInfo(0,CATEGORY_TOHAND,g,1,0,0)
end
function cm.thop(e,tp,eg,ep,ev,re,r,rp)
if not e:GetHandler():IsRelateToEffect(e) then return end
local tc=Duel.GetFirstTarget()
if tc:IsRelateToEffect(e) then
Duel.SendtoHand(tc,nil,REASON_EFFECT)
end
end
function cm.sthfilter(c)
return c:IsRace(RACE_SPELLCASTER) and c:IsType(TYPE_RITUAL) and c:IsType(TYPE_PENDULUM) and c:IsLevelBelow(9) and c:IsAbleToHand()
return c:IsSetCard(0x3552) and c:IsType(TYPE_RITUAL) and c:IsAbleToHand()
end
function cm.sthtg(e,tp,eg,ep,ev,re,r,rp,chk)
if chk==0 then return Duel.IsExistingMatchingCard(cm.sthfilter,tp,LOCATION_DECK+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.thfilter,tp,LOCATION_DECK+LOCATION_GRAVE,0,1,nil) end
Duel.SetOperationInfo(0,CATEGORY_TOHAND,nil,1,tp,LOCATION_DECK+LOCATION_GRAVE)
end
function cm.sthop(e,tp,eg,ep,ev,re,r,rp)
function cm.thop(e,tp,eg,ep,ev,re,r,rp)
Duel.Hint(HINT_SELECTMSG,tp,HINTMSG_ATOHAND)
local g=Duel.SelectMatchingCard(tp,aux.NecroValleyFilter(cm.sthfilter),tp,LOCATION_GRAVE+LOCATION_DECK,0,1,1,nil)
local g=Duel.SelectMatchingCard(tp,aux.NecroValleyFilter(cm.thfilter),tp,LOCATION_GRAVE+LOCATION_DECK,0,1,1,nil)
if g:GetCount()>0 then
Duel.SendtoHand(g,nil,REASON_EFFECT)
Duel.ConfirmCards(1-tp,g)
......
--尤娜·希斯 Magic Which
--尤娜·希斯·Study
local m=81026003
local cm=_G["c"..m]
Duel.LoadScript("c81000000.lua")
function cm.initial_effect(c)
--pendulum summon
aux.EnablePendulumAttribute(c)
c:EnableReviveLimit()
--atk up
local e0=Effect.CreateEffect(c)
e0:SetCategory(CATEGORY_ATKCHANGE)
e0:SetType(EFFECT_TYPE_IGNITION)
e0:SetRange(LOCATION_PZONE)
e0:SetProperty(EFFECT_FLAG_CARD_TARGET)
e0:SetCountLimit(1)
e0:SetTarget(cm.atktg)
e0:SetOperation(cm.atkop)
c:RegisterEffect(e0)
--search
local e1=Effect.CreateEffect(c)
e1:SetDescription(aux.Stringid(m,0))
e1:SetCategory(CATEGORY_TOHAND+CATEGORY_SEARCH)
e1:SetCategory(CATEGORY_TOHAND)
e1:SetType(EFFECT_TYPE_IGNITION)
e1:SetRange(LOCATION_HAND)
e1:SetCountLimit(1,m)
e1:SetCost(cm.tscost)
e1:SetTarget(cm.tstg)
e1:SetOperation(cm.tsop)
e1:SetCost(cm.rthcost)
e1:SetTarget(cm.rthtg)
e1:SetOperation(cm.rthop)
c:RegisterEffect(e1)
--set
--tohand
local e2=Effect.CreateEffect(c)
e2:SetType(EFFECT_TYPE_SINGLE+EFFECT_TYPE_CONTINUOUS)
e2:SetProperty(EFFECT_FLAG_CANNOT_DISABLE)
e2:SetCode(EVENT_SPSUMMON_SUCCESS)
e2:SetCondition(cm.regcon)
e2:SetOperation(cm.regop)
e2:SetCategory(CATEGORY_TOHAND)
e2:SetType(EFFECT_TYPE_IGNITION)
e2:SetProperty(EFFECT_FLAG_CARD_TARGET)
e2:SetRange(LOCATION_PZONE)
e2:SetCountLimit(1,m+900)
e2:SetCost(cm.thcost)
e2:SetTarget(cm.thtg)
e2:SetOperation(cm.thop)
c:RegisterEffect(e2)
local e3=Effect.CreateEffect(c)
e3:SetType(EFFECT_TYPE_FIELD+EFFECT_TYPE_TRIGGER_O)
e3:SetCode(EVENT_PHASE+PHASE_END)
e3:SetRange(LOCATION_MZONE)
e3:SetCountLimit(1,m+900)
e3:SetCondition(cm.setcon)
e3:SetCost(cm.setcost)
e3:SetTarget(cm.settg)
e3:SetOperation(cm.setop)
c:RegisterEffect(e3)
end
function cm.atkfilter(c)
return c:IsFaceup() and c:IsType(TYPE_RITUAL) and c:IsRace(RACE_SPELLCASTER)
function cm.rthcostfil(c)
return c:IsType(TYPE_SPELL) and not c:IsType(TYPE_RITUAL) and c:IsAbleToGraveAsCost()
end
function cm.ctfilter(c)
return c:IsType(TYPE_SPELL)
function cm.rthcost(e,tp,eg,ep,ev,re,r,rp,chk)
if chk==0 then return Duel.IsExistingMatchingCard(cm.rthcostfil,tp,LOCATION_HAND,0,1,e:GetHandler()) and e:GetHandler():IsAbleToGraveAsCost() end
local g=Duel.SelectMatchingCard(tp,cm.rthcostfil,tp,LOCATION_HAND,0,1,1,e:GetHandler())
g:AddCard(e:GetHandler())
Duel.SendtoGrave(g,REASON_COST)
end
function cm.atktg(e,tp,eg,ep,ev,re,r,rp,chk,chkc)
if chkc then return chkc:IsControler(tp) and chkc:IsLocation(LOCATION_MZONE) and cm.atkfilter(chkc) end
if chk==0 then return Duel.IsExistingTarget(cm.atkfilter,tp,LOCATION_MZONE,0,1,nil)
and Duel.IsExistingMatchingCard(cm.ctfilter,tp,LOCATION_GRAVE,0,1,nil) end
Duel.Hint(HINT_SELECTMSG,tp,HINTMSG_FACEUP)
Duel.SelectTarget(tp,cm.atkfilter,tp,LOCATION_MZONE,0,1,1,nil)
function cm.rthfilter1(c)
return c:IsType(TYPE_RITUAL) and c:IsType(TYPE_SPELL) and c:IsAbleToHand()
end
function cm.atkop(e,tp,eg,ep,ev,re,r,rp)
local c=e:GetHandler()
local tc=Duel.GetFirstTarget()
local ct=Duel.GetMatchingGroupCount(cm.ctfilter,tp,LOCATION_GRAVE,0,nil)
if c:IsRelateToEffect(e) and tc:IsFaceup() and tc:IsRelateToEffect(e) and ct>0 then
local e1=Effect.CreateEffect(c)
e1:SetType(EFFECT_TYPE_SINGLE)
e1:SetCode(EFFECT_UPDATE_ATTACK)
e1:SetValue(100*ct)
e1:SetReset(RESET_EVENT+RESETS_STANDARD+RESET_PHASE+PHASE_END,2)
tc:RegisterEffect(e1)
end
end
function cm.tscost(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.tsfilter(c)
return c:IsType(TYPE_PENDULUM) and c:IsRace(RACE_SPELLCASTER) and c:IsAttribute(ATTRIBUTE_FIRE) and c:IsAbleToHand()
function cm.rthfilter2(c)
return c:IsRace(RACE_SPELLCASTER) and c:IsType(TYPE_RITUAL) and c:IsAbleToHand()
end
function cm.tstg(e,tp,eg,ep,ev,re,r,rp,chk,chkc)
if chk==0 then return Duel.IsExistingMatchingCard(cm.tsfilter,tp,LOCATION_DECK,0,1,nil) end
Duel.SetOperationInfo(0,CATEGORY_TOHAND,nil,1,tp,LOCATION_DECK)
function cm.rthtg(e,tp,eg,ep,ev,re,r,rp,chk)
if chk==0 then return Duel.IsExistingMatchingCard(cm.rthfilter1,tp,LOCATION_GRAVE,0,1,nil) and Duel.IsExistingMatchingCard(cm.rthfilter2,tp,LOCATION_GRAVE,0,1,nil) end
Duel.SetOperationInfo(0,CATEGORY_TOHAND,nil,2,tp,LOCATION_GRAVE)
end
function cm.tsop(e,tp,eg,ep,ev,re,r,rp,chk)
function cm.rthop(e,tp,eg,ep,ev,re,r,rp)
Duel.Hint(HINT_SELECTMSG,tp,HINTMSG_ATOHAND)
local g=Duel.SelectMatchingCard(tp,cm.tsfilter,tp,LOCATION_DECK,0,1,1,nil)
if g:GetCount()>0 then
Duel.SendtoHand(g,nil,REASON_EFFECT)
Duel.ConfirmCards(1-tp,g)
local g1=Duel.SelectMatchingCard(tp,aux.NecroValleyFilter(cm.rthfilter1),tp,LOCATION_GRAVE,0,1,1,nil)
local g2=Duel.SelectMatchingCard(tp,aux.NecroValleyFilter(cm.rthfilter2),tp,LOCATION_GRAVE,0,1,1,nil)
if g1:GetCount()>0 and g2:GetCount()>0 then
g1:Merge(g2)
Duel.SendtoHand(g1,nil,REASON_EFFECT)
Duel.ConfirmCards(1-tp,g1)
end
end
function cm.regcon(e,tp,eg,ep,ev,re,r,rp)
return e:GetHandler():IsSummonType(SUMMON_TYPE_PENDULUM)
function cm.cfilter(c)
return c:IsType(TYPE_SPELL) and c:IsDiscardable()
end
function cm.regop(e,tp,eg,ep,ev,re,r,rp)
e:GetHandler():RegisterFlagEffect(m,RESET_EVENT+RESETS_STANDARD+RESET_PHASE+PHASE_END,0,1)
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) end
Duel.DiscardHand(tp,cm.cfilter,1,1,REASON_COST+REASON_DISCARD)
end
function cm.setcon(e,tp,eg,ep,ev,re,r,rp)
return e:GetHandler():GetFlagEffect(m)~=0 and Duel.GetTurnPlayer()==tp
function cm.thfilter(c)
return c:IsFaceup() and c:IsRace(RACE_SPELLCASTER) and c:IsAbleToHand()
end
function cm.setcost(e,tp,eg,ep,ev,re,r,rp,chk)
if chk==0 then return e:GetHandler():IsReleasable() end
Duel.Release(e:GetHandler(),REASON_COST)
end
function cm.setfilter(c)
return c:IsType(TYPE_SPELL) and c:IsSSetable()
end
function cm.settg(e,tp,eg,ep,ev,re,r,rp,chk,chkc)
if chkc then return chkc:IsLocation(LOCATION_GRAVE) and chkc:IsControler(tp) and cm.setfilter(chkc) end
if chk==0 then return Duel.IsExistingTarget(cm.setfilter,tp,LOCATION_GRAVE,0,1,nil) end
Duel.Hint(HINT_SELECTMSG,tp,HINTMSG_SET)
local g=Duel.SelectTarget(tp,cm.setfilter,tp,LOCATION_GRAVE,0,1,2,nil)
function cm.thtg(e,tp,eg,ep,ev,re,r,rp,chk,chkc)
if chkc then return chkc:IsControler(tp) and chkc:IsLocation(LOCATION_REMOVED) and cm.thfilter(chkc) end
if chk==0 then return Duel.IsExistingTarget(cm.thfilter,tp,LOCATION_REMOVED,0,1,nil) end
Duel.Hint(HINT_SELECTMSG,tp,HINTMSG_ATOHAND)
local g=Duel.SelectTarget(tp,cm.thfilter,tp,LOCATION_REMOVED,0,1,1,nil)
Duel.SetOperationInfo(0,CATEGORY_TOHAND,g,1,0,0)
end
function cm.setop(e,tp,eg,ep,ev,re,r,rp)
local g=Duel.GetChainInfo(0,CHAININFO_TARGET_CARDS)
local tg=g:Filter(Card.IsRelateToEffect,nil,e)
Duel.SSet(tp,tg)
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
end
--尤娜·希斯 Truth
--尤娜·希斯·Seaside
local m=81026004
local cm=_G["c"..m]
Duel.LoadScript("c81000000.lua")
function cm.initial_effect(c)
--pendulum summon
Tenka.Pendulum(c)
c:EnableReviveLimit()
--tohand
local e0=Effect.CreateEffect(c)
e0:SetCategory(CATEGORY_TOHAND)
e0:SetType(EFFECT_TYPE_IGNITION)
e0:SetProperty(EFFECT_FLAG_CARD_TARGET)
e0:SetRange(LOCATION_PZONE)
e0:SetCountLimit(1)
e0:SetTarget(cm.thtg)
e0:SetOperation(cm.thop)
c:RegisterEffect(e0)
--spsummon
aux.EnablePendulumAttribute(c)
--indes
local e1=Effect.CreateEffect(c)
e1:SetDescription(aux.Stringid(m,0))
e1:SetCategory(CATEGORY_SPECIAL_SUMMON)
e1:SetType(EFFECT_TYPE_QUICK_O)
e1:SetCode(EVENT_FREE_CHAIN)
e1:SetHintTiming(0,TIMING_END_PHASE)
e1:SetRange(LOCATION_MZONE)
e1:SetCountLimit(1,m)
e1:SetCost(cm.spcost)
e1:SetTarget(cm.sptg)
e1:SetOperation(cm.spop)
e1:SetType(EFFECT_TYPE_FIELD)
e1:SetCode(EFFECT_INDESTRUCTABLE_COUNT)
e1:SetRange(LOCATION_PZONE)
e1:SetTargetRange(LOCATION_MZONE,0)
e1:SetTarget(cm.target)
e1:SetValue(cm.indct)
c:RegisterEffect(e1)
--negate
--special summon
local e2=Effect.CreateEffect(c)
e2:SetDescription(aux.Stringid(m,1))
e2:SetCategory(CATEGORY_NEGATE)
e2:SetType(EFFECT_TYPE_QUICK_O)
e2:SetCode(EVENT_CHAINING)
e2:SetProperty(EFFECT_FLAG_DAMAGE_STEP+EFFECT_FLAG_DAMAGE_CAL)
e2:SetCategory(CATEGORY_SPECIAL_SUMMON)
e2:SetType(EFFECT_TYPE_IGNITION)
e2:SetProperty(EFFECT_FLAG_CARD_TARGET)
e2:SetRange(LOCATION_MZONE)
e2:SetCountLimit(1,m+900)
e2:SetCondition(cm.discon)
e2:SetCost(cm.discost)
e2:SetTarget(cm.distg)
e2:SetOperation(cm.disop)
e2:SetCountLimit(1,m)
e2:SetCost(cm.spcost)
e2:SetTarget(cm.sptg)
e2:SetOperation(cm.spop)
c:RegisterEffect(e2)
end
cm.pendulum_level=3
function cm.thfilter(c)
return (c:IsFaceup() or c:IsLocation(LOCATION_GRAVE)) and c:IsCode(33334568) and c:IsAbleToHand()
function cm.target(e,c)
return c:IsRace(RACE_SPELLCASTER)
end
function cm.thtg(e,tp,eg,ep,ev,re,r,rp,chk,chkc)
if chkc then return chkc:IsControler(tp) and chkc:IsLocation(LOCATION_REMOVED+LOCATION_GRAVE) and cm.thfilter(chkc) end
if chk==0 then return Duel.IsExistingTarget(cm.thfilter,tp,LOCATION_REMOVED+LOCATION_GRAVE,0,1,nil) end
Duel.Hint(HINT_SELECTMSG,tp,HINTMSG_ATOHAND)
local g=Duel.SelectTarget(tp,cm.thfilter,tp,LOCATION_REMOVED+LOCATION_GRAVE,0,1,1,nil)
Duel.SetOperationInfo(0,CATEGORY_TOHAND,g,1,0,0)
function cm.indct(e,re,r,rp)
if bit.band(r,REASON_BATTLE+REASON_EFFECT)~=0 then
return 1
else return 0 end
end
function cm.thop(e,tp,eg,ep,ev,re,r,rp)
if not e:GetHandler():IsRelateToEffect(e) then return end
local tc=Duel.GetFirstTarget()
if tc:IsRelateToEffect(e) then
Duel.SendtoHand(tc,nil,REASON_EFFECT)
end
function cm.costfilter(c,e,tp)
return c:IsRace(RACE_SPELLCASTER) and Duel.GetMZoneCount(tp,c)>0
and Duel.IsExistingTarget(cm.spfilter,tp,LOCATION_GRAVE,0,1,nil,e,tp,c:GetCode())
end
function cm.cfilter(c,e,tp)
return c:IsRace(RACE_SPELLCASTER) and Duel.IsExistingMatchingCard(cm.filter,tp,LOCATION_EXTRA,0,1,nil,e,tp,c)
function cm.spfilter(c,e,tp,code)
return c:IsSetCard(0x3552) and c:IsType(TYPE_MONSTER) and not c:IsCode(code) and c:IsCanBeSpecialSummoned(e,0,tp,false,false,POS_FACEUP)
end
function cm.spcost(e,tp,eg,ep,ev,re,r,rp,chk)
e:SetLabel(100)
if chk==0 then return Duel.CheckReleaseGroup(tp,cm.cfilter,1,nil,e,tp) end
local g=Duel.SelectReleaseGroup(tp,cm.cfilter,1,1,nil,e,tp)
if chk==0 then return Duel.CheckReleaseGroup(tp,cm.costfilter,1,nil,e,tp) end
local g=Duel.SelectReleaseGroup(tp,cm.costfilter,1,1,nil,e,tp)
e:SetLabel(g:GetFirst():GetCode())
Duel.Release(g,REASON_COST)
end
function cm.filter(c,e,tp,rc)
return c:IsAttribute(ATTRIBUTE_FIRE) and c:IsRace(RACE_SPELLCASTER) and c:IsType(TYPE_PENDULUM) and c:IsFaceup()
and c:IsCanBeSpecialSummoned(e,0,tp,false,false) and Duel.GetLocationCountFromEx(tp,tp,rc,c)>0
end
function cm.sptg(e,tp,eg,ep,ev,re,r,rp,chk)
if chk==0 then
local res=e:GetLabel()==100
e:SetLabel(0)
return res or Duel.IsExistingMatchingCard(cm.filter,tp,LOCATION_EXTRA,0,1,nil,e,tp,nil)
end
e:SetLabel(0)
Duel.SetOperationInfo(0,CATEGORY_SPECIAL_SUMMON,nil,1,tp,LOCATION_EXTRA)
function cm.sptg(e,tp,eg,ep,ev,re,r,rp,chk,chkc)
local code=e:GetLabel()
if chkc then return chkc:IsControler(tp) and chkc:IsLocation(LOCATION_GRAVE) and cm.spfilter(chkc,e,tp,code) end
if chk==0 then return true end
Duel.Hint(HINT_SELECTMSG,tp,HINTMSG_SPSUMMON)
local g=Duel.SelectTarget(tp,cm.spfilter,tp,LOCATION_GRAVE,0,1,1,nil,e,tp,code)
Duel.SetOperationInfo(0,CATEGORY_SPECIAL_SUMMON,g,1,0,0)
end
function cm.spop(e,tp,eg,ep,ev,re,r,rp)
local c=e:GetHandler()
Duel.Hint(HINT_SELECTMSG,tp,HINTMSG_SPSUMMON)
local tc=Duel.SelectMatchingCard(tp,cm.filter,tp,LOCATION_EXTRA,0,1,1,nil,e,tp,nil):GetFirst()
if tc then
local tc=Duel.GetFirstTarget()
if tc:IsRelateToEffect(e) then
Duel.SpecialSummon(tc,0,tp,tp,false,false,POS_FACEUP)
end
end
function cm.discon(e,tp,eg,ep,ev,re,r,rp)
return rp==1-tp and not e:GetHandler():IsStatus(STATUS_BATTLE_DESTROYED) and Duel.IsChainNegatable(ev)
end
function cm.costfilter(c)
return c:IsType(TYPE_SPELL) and c:IsDiscardable()
end
function cm.discost(e,tp,eg,ep,ev,re,r,rp,chk)
if chk==0 then return Duel.IsExistingMatchingCard(cm.costfilter,tp,LOCATION_HAND,0,1,e:GetHandler()) end
Duel.DiscardHand(tp,cm.costfilter,1,1,REASON_COST+REASON_DISCARD)
end
function cm.distg(e,tp,eg,ep,ev,re,r,rp,chk)
if chk==0 then return true end
Duel.SetOperationInfo(0,CATEGORY_NEGATE,eg,1,0,0)
end
function cm.disop(e,tp,eg,ep,ev,re,r,rp)
Duel.NegateActivation(ev)
end
--尤娜·希斯 Summer
--尤娜·希斯·Lazy
local m=81026005
local cm=_G["c"..m]
Duel.LoadScript("c81000000.lua")
function cm.initial_effect(c)
--pendulum summon
Tenka.Pendulum(c)
aux.EnablePendulumAttribute(c)
c:EnableReviveLimit()
--destroy
local e0=Effect.CreateEffect(c)
......@@ -41,20 +41,6 @@ function cm.initial_effect(c)
e2:SetTarget(cm.thtg)
e2:SetOperation(cm.thop)
c:RegisterEffect(e2)
--spsummon bgm
local e3=Effect.CreateEffect(c)
e3:SetType(EFFECT_TYPE_SINGLE+EFFECT_TYPE_CONTINUOUS)
e3:SetCode(EVENT_SPSUMMON_SUCCESS)
e3:SetCondition(cm.sumcon)
e3:SetOperation(cm.sumsuc)
c:RegisterEffect(e3)
end
cm.pendulum_level=3
function cm.sumcon(e,tp,eg,ep,ev,re,r,rp)
return e:GetHandler():IsSummonType(SUMMON_TYPE_RITUAL)
end
function cm.sumsuc(e,tp,eg,ep,ev,re,r,rp)
Duel.Hint(HINT_MUSIC,0,aux.Stringid(81026004,2))
end
function cm.cfilter(c)
return c:IsRace(RACE_SPELLCASTER) and c:IsType(TYPE_MONSTER) and c:IsAbleToRemoveAsCost()
......@@ -73,7 +59,6 @@ function cm.destg(e,tp,eg,ep,ev,re,r,rp,chk,chkc)
Duel.SetOperationInfo(0,CATEGORY_DESTROY,g,1,0,0)
end
function cm.desop(e,tp,eg,ep,ev,re,r,rp)
if not e:GetHandler():IsRelateToEffect(e) then return end
local tc=Duel.GetFirstTarget()
if tc:IsRelateToEffect(e) then
Duel.Destroy(tc,REASON_EFFECT)
......@@ -113,7 +98,7 @@ function cm.thcost(e,tp,eg,ep,ev,re,r,rp,chk)
Duel.Release(e:GetHandler(),REASON_COST)
end
function cm.thfil(c)
return ((c:IsRace(RACE_SPELLCASTER) and c:IsType(TYPE_MONSTER)) or c:IsType(TYPE_SPELL)) and c:IsFaceup() and c:IsAbleToHand()
return (c:IsRace(RACE_SPELLCASTER) or c:IsType(TYPE_SPELL)) and c:IsFaceup() and c:IsAbleToHand()
end
function cm.thtg(e,tp,eg,ep,ev,re,r,rp,chk,chkc)
if chkc then return chkc:IsLocation(LOCATION_REMOVED) and cm.spfil(chkc,e,tp) and chkc:IsControler(tp) end
......
--尤娜·希斯 Balloon
--尤娜·希斯·Teatime
local m=81026006
local cm=_G["c"..m]
Duel.LoadScript("c81000000.lua")
function cm.initial_effect(c)
--pendulum summon
aux.EnablePendulumAttribute(c)
--indes
local e0=Effect.CreateEffect(c)
e0:SetType(EFFECT_TYPE_FIELD)
e0:SetCode(EFFECT_INDESTRUCTABLE_COUNT)
e0:SetRange(LOCATION_PZONE)
e0:SetTargetRange(LOCATION_MZONE,0)
e0:SetTarget(cm.target)
e0:SetValue(cm.indct)
c:RegisterEffect(e0)
Tenka.Pendulum(c)
c:EnableReviveLimit()
--search
local e1=Effect.CreateEffect(c)
e1:SetDescription(aux.Stringid(m,0))
e1:SetCategory(CATEGORY_TOHAND)
e1:SetCategory(CATEGORY_TOHAND+CATEGORY_SEARCH)
e1:SetType(EFFECT_TYPE_IGNITION)
e1:SetRange(LOCATION_HAND)
e1:SetRange(LOCATION_MZONE)
e1:SetCountLimit(1,m)
e1:SetCost(cm.rthcost)
e1:SetTarget(cm.rthtg)
e1:SetOperation(cm.rthop)
e1:SetCost(cm.thcost)
e1:SetTarget(cm.thtg)
e1:SetOperation(cm.thop)
c:RegisterEffect(e1)
--special summon
--search
local e2=Effect.CreateEffect(c)
e2:SetCategory(CATEGORY_SPECIAL_SUMMON)
e2:SetDescription(aux.Stringid(m,1))
e2:SetCategory(CATEGORY_TOHAND+CATEGORY_SEARCH)
e2:SetType(EFFECT_TYPE_IGNITION)
e2:SetProperty(EFFECT_FLAG_CARD_TARGET)
e2:SetRange(LOCATION_MZONE)
e2:SetCountLimit(1,m+900)
e2:SetCost(cm.spcost)
e2:SetTarget(cm.sptg)
e2:SetOperation(cm.spop)
e2:SetCost(cm.tscost)
e2:SetTarget(cm.tstg)
e2:SetOperation(cm.tsop)
c:RegisterEffect(e2)
--destroy replace
local e3=Effect.CreateEffect(c)
e3:SetType(EFFECT_TYPE_CONTINUOUS+EFFECT_TYPE_FIELD)
e3:SetCode(EFFECT_DESTROY_REPLACE)
e3:SetRange(LOCATION_PZONE)
e3:SetCountLimit(1)
e3:SetTarget(cm.reptg)
e3:SetValue(cm.repval)
c:RegisterEffect(e3)
end
function cm.target(e,c)
return c:IsRace(RACE_SPELLCASTER) and c:IsType(TYPE_RITUAL)
end
function cm.indct(e,re,r,rp)
if bit.band(r,REASON_BATTLE+REASON_EFFECT)~=0 then
return 1
else return 0 end
end
function cm.rthcostfil(c)
return c:IsType(TYPE_SPELL) and not c:IsType(TYPE_RITUAL) and c:IsAbleToGraveAsCost()
cm.pendulum_level=3
function cm.costfilter(c)
return c:IsType(TYPE_SPELL) and c:IsDiscardable()
end
function cm.rthcost(e,tp,eg,ep,ev,re,r,rp,chk)
if chk==0 then return Duel.IsExistingMatchingCard(cm.rthcostfil,tp,LOCATION_HAND,0,1,e:GetHandler()) and e:GetHandler():IsAbleToGraveAsCost() end
local g=Duel.SelectMatchingCard(tp,cm.rthcostfil,tp,LOCATION_HAND,0,1,1,e:GetHandler())
g:AddCard(e:GetHandler())
Duel.SendtoGrave(g,REASON_COST)
function cm.thcost(e,tp,eg,ep,ev,re,r,rp,chk)
if chk==0 then return Duel.IsExistingMatchingCard(cm.costfilter,tp,LOCATION_HAND,0,1,e:GetHandler()) end
Duel.DiscardHand(tp,cm.costfilter,1,1,REASON_COST+REASON_DISCARD)
end
function cm.rthfilter1(c)
return c:IsType(TYPE_RITUAL) and c:IsType(TYPE_SPELL) and c:IsAbleToHand()
function cm.thfilter(c)
return c:IsSetCard(0x3552) and c:IsType(TYPE_MONSTER) and c:IsAbleToHand()
end
function cm.rthfilter2(c)
return c:IsRace(RACE_SPELLCASTER) and c:IsType(TYPE_RITUAL) and c:IsAbleToHand()
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.rthtg(e,tp,eg,ep,ev,re,r,rp,chk)
if chk==0 then return Duel.IsExistingMatchingCard(cm.rthfilter1,tp,LOCATION_GRAVE,0,1,nil) and Duel.IsExistingMatchingCard(cm.rthfilter2,tp,LOCATION_GRAVE,0,1,nil) end
Duel.SetOperationInfo(0,CATEGORY_TOHAND,nil,2,tp,LOCATION_GRAVE)
end
function cm.rthop(e,tp,eg,ep,ev,re,r,rp)
function cm.thop(e,tp,eg,ep,ev,re,r,rp)
Duel.Hint(HINT_SELECTMSG,tp,HINTMSG_ATOHAND)
local g1=Duel.SelectMatchingCard(tp,aux.NecroValleyFilter(cm.rthfilter1),tp,LOCATION_GRAVE,0,1,1,nil)
local g2=Duel.SelectMatchingCard(tp,aux.NecroValleyFilter(cm.rthfilter2),tp,LOCATION_GRAVE,0,1,1,nil)
if g1:GetCount()>0 and g2:GetCount()>0 then
g1:Merge(g2)
Duel.SendtoHand(g1,nil,REASON_EFFECT)
Duel.ConfirmCards(1-tp,g1)
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
function cm.costfilter(c,e,tp)
return c:IsRace(RACE_SPELLCASTER) and Duel.GetMZoneCount(tp,c)>0
and Duel.IsExistingTarget(cm.spfilter,tp,LOCATION_GRAVE,0,1,nil,e,tp,c:GetCode())
function cm.cfilter(c)
return c:IsFaceup() and c:IsRace(RACE_SPELLCASTER) and c:IsType(TYPE_PENDULUM) and c:IsAbleToGraveAsCost()
end
function cm.tscost(e,tp,eg,ep,ev,re,r,rp,chk)
if chk==0 then return Duel.IsExistingMatchingCard(cm.cfilter,tp,LOCATION_EXTRA,0,1,nil) end
Duel.DiscardHand(tp,cm.cfilter,1,1,REASON_COST,nil)
end
function cm.spfilter(c,e,tp,code)
return c:IsSetCard(0x3552) and c:IsType(TYPE_MONSTER) and not c:IsCode(code) and c:IsCanBeSpecialSummoned(e,0,tp,false,false,POS_FACEUP)
function cm.tsfilter1(c,tp)
return c:IsFaceup() and c:IsType(TYPE_SPELL)
and Duel.IsExistingMatchingCard(cm.tsfilter2,tp,LOCATION_DECK,0,1,nil,c:GetCode())
end
function cm.spcost(e,tp,eg,ep,ev,re,r,rp,chk)
if chk==0 then return Duel.CheckReleaseGroup(tp,cm.costfilter,1,nil,e,tp) end
local g=Duel.SelectReleaseGroup(tp,cm.costfilter,1,1,nil,e,tp)
e:SetLabel(g:GetFirst():GetCode())
Duel.Release(g,REASON_COST)
function cm.tsfilter2(c,code)
return c:IsCode(code) and c:IsAbleToHand()
end
function cm.sptg(e,tp,eg,ep,ev,re,r,rp,chk,chkc)
local code=e:GetLabel()
if chkc then return chkc:IsControler(tp) and chkc:IsLocation(LOCATION_GRAVE) and cm.spfilter(chkc,e,tp,code) end
if chk==0 then return true end
Duel.Hint(HINT_SELECTMSG,tp,HINTMSG_SPSUMMON)
local g=Duel.SelectTarget(tp,cm.spfilter,tp,LOCATION_GRAVE,0,1,1,nil,e,tp,code)
Duel.SetOperationInfo(0,CATEGORY_SPECIAL_SUMMON,g,1,0,0)
function cm.tstg(e,tp,eg,ep,ev,re,r,rp,chk,chkc)
if chkc then return chkc:IsControler(tp) and chkc:IsLocation(LOCATION_REMOVED) and cm.tsfilter1(chkc,tp) end
if chk==0 then return Duel.IsExistingTarget(cm.tsfilter1,tp,LOCATION_REMOVED,0,1,nil,tp) end
Duel.Hint(HINT_SELECTMSG,tp,HINTMSG_TARGET)
Duel.SelectTarget(tp,cm.tsfilter1,tp,LOCATION_REMOVED,0,1,1,nil,tp)
Duel.SetOperationInfo(0,CATEGORY_TOHAND,nil,1,tp,LOCATION_DECK)
end
function cm.spop(e,tp,eg,ep,ev,re,r,rp)
function cm.tsop(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)
Duel.Hint(HINT_SELECTMSG,tp,HINTMSG_ATOHAND)
local g=Duel.SelectMatchingCard(tp,cm.tsfilter2,tp,LOCATION_DECK,0,1,1,nil,tc:GetCode())
if g:GetCount()>0 then
Duel.SendtoHand(g,nil,REASON_EFFECT)
Duel.ConfirmCards(1-tp,g)
end
end
end
function cm.repfilter(c,tp)
return c:IsLocation(LOCATION_ONFIELD) and c:IsControler(tp)
and c:IsReason(REASON_BATTLE+REASON_EFFECT) and not c:IsReason(REASON_REPLACE)
end
function cm.repcfilter(c)
return c:IsRace(RACE_SPELLCASTER) and c:IsFaceup() and c:IsAbleToDeck()
end
function cm.reptg(e,tp,eg,ep,ev,re,r,rp,chk)
if chk==0 then return eg:IsExists(cm.repfilter,1,nil,tp)
and Duel.IsExistingMatchingCard(cm.repcfilter,tp,LOCATION_REMOVED,0,1,nil) end
if Duel.SelectEffectYesNo(tp,e:GetHandler(),96) then
Duel.Hint(HINT_SELECTMSG,tp,HINTMSG_TODECK)
local g=Duel.SelectMatchingCard(tp,cm.repcfilter,tp,LOCATION_REMOVED,0,1,1,nil)
Duel.HintSelection(g)
Duel.SendtoDeck(g,nil,SEQ_DECKSHUFFLE,REASON_EFFECT+REASON_REPLACE)
return true
end
return false
end
function cm.repval(e,c)
return cm.repfilter(c,e:GetHandlerPlayer())
end
--尤娜·希斯的午后
--尤娜·希斯的星空
local m=81026070
local cm=_G["c"..m]
Duel.LoadScript("c81000000.lua")
function cm.initial_effect(c)
aux.AddCodeList(c,33334568)
aux.AddRitualProcGreater2(c,cm.ritual_filter)
--change name
aux.EnableChangeCode(c,33334568,LOCATION_GRAVE+LOCATION_REMOVED)
--draw
local e2=Effect.CreateEffect(c)
e2:SetDescription(aux.Stringid(m,0))
e2:SetCategory(CATEGORY_TODECK+CATEGORY_DRAW)
e2:SetType(EFFECT_TYPE_IGNITION)
e2:SetProperty(EFFECT_FLAG_CARD_TARGET)
e2:SetRange(LOCATION_GRAVE)
e2:SetCondition(aux.exccon)
e2:SetCost(aux.bfgcost)
e2:SetTarget(cm.drtg)
e2:SetOperation(cm.drop)
c:RegisterEffect(e2)
--set to your field
local e1=Effect.CreateEffect(c)
e1:SetCategory(CATEGORY_TOHAND)
e1:SetType(EFFECT_TYPE_IGNITION)
e1:SetProperty(EFFECT_FLAG_CARD_TARGET)
e1:SetRange(LOCATION_GRAVE)
e1:SetCondition(aux.exccon)
e1:SetCost(aux.bfgcost)
e1:SetTarget(cm.thtg)
e1:SetOperation(cm.thop)
c:RegisterEffect(e1)
end
function cm.ritual_filter(c)
return c:IsType(TYPE_RITUAL) and c:IsRace(RACE_SPELLCASTER)
end
function cm.drfilter(c,e)
return (c:IsType(TYPE_SPELL) or (c:IsType(TYPE_RITUAL) and c:IsRace(RACE_SPELLCASTER))) and c:IsAbleToDeck() and c:IsCanBeEffectTarget(e)
function cm.thfilter(c)
return (c:IsLocation(LOCATION_GRAVE) or c:IsFaceup()) and c:IsCode(33334568) and c:IsAbleToHand()
end
function cm.drtg(e,tp,eg,ep,ev,re,r,rp,chk,chkc)
if chkc then return false end
local g=Duel.GetMatchingGroup(cm.drfilter,tp,LOCATION_GRAVE,0,e:GetHandler(),e)
if chk==0 then return Duel.IsPlayerCanDraw(tp,1)
and g:GetClassCount(Card.GetCode)>4 end
Duel.Hint(HINT_SELECTMSG,tp,HINTMSG_TODECK)
aux.GCheckAdditional=aux.dncheck
local sg=g:SelectSubGroup(tp,aux.TRUE,false,5,5)
aux.GCheckAdditional=nil
Duel.SetTargetCard(sg)
Duel.SetOperationInfo(0,CATEGORY_TODECK,g,5,0,0)
Duel.SetOperationInfo(0,CATEGORY_DRAW,nil,0,tp,1)
function cm.thtg(e,tp,eg,ep,ev,re,r,rp,chk,chkc)
if chkc then return chkc:IsLocation(LOCATION_GRAVE+LOCATION_REMOVED) and chkc:IsControler(tp) and cm.thfilter(chkc) end
if chk==0 then return Duel.IsExistingTarget(cm.thfilter,tp,LOCATION_GRAVE+LOCATION_REMOVED,0,1,e:GetHandler()) end
Duel.Hint(HINT_SELECTMSG,tp,HINTMSG_ATOHAND)
local g=Duel.SelectTarget(tp,cm.thfilter,tp,LOCATION_GRAVE+LOCATION_REMOVED,0,1,1,e:GetHandler())
Duel.SetOperationInfo(0,CATEGORY_TOHAND,g,1,0,0)
end
function cm.drop(e,tp,eg,ep,ev,re,r,rp)
local tg=Duel.GetChainInfo(0,CHAININFO_TARGET_CARDS)
if not tg or tg:FilterCount(Card.IsRelateToEffect,nil,e)~=5 then return end
Duel.SendtoDeck(tg,nil,0,REASON_EFFECT)
local g=Duel.GetOperatedGroup()
if g:IsExists(Card.IsLocation,1,nil,LOCATION_DECK) then Duel.ShuffleDeck(tp) end
local ct=g:FilterCount(Card.IsLocation,nil,LOCATION_DECK+LOCATION_EXTRA)
if ct==5 then
Duel.BreakEffect()
Duel.Draw(tp,1,REASON_EFFECT)
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
end
--尤娜·希斯的下午茶
--尤娜·希斯的黄昏
local m=81026071
local cm=_G["c"..m]
Duel.LoadScript("c81000000.lua")
function cm.initial_effect(c)
aux.AddCodeList(c,33334568)
--Activate
local e1=Effect.CreateEffect(c)
e1:SetCategory(CATEGORY_TOHAND+CATEGORY_SEARCH)
e1:SetType(EFFECT_TYPE_ACTIVATE)
e1:SetCode(EVENT_FREE_CHAIN)
e1:SetCountLimit(1,m+EFFECT_COUNT_CODE_OATH)
e1:SetCost(cm.cost)
e1:SetTarget(cm.target)
e1:SetOperation(cm.activate)
c:RegisterEffect(e1)
--set to your field
local e3=Effect.CreateEffect(c)
e1:SetCategory(CATEGORY_TOHAND)
e3:SetType(EFFECT_TYPE_IGNITION)
e3:SetProperty(EFFECT_FLAG_CARD_TARGET)
e3:SetRange(LOCATION_GRAVE)
e3:SetCountLimit(1,m)
e3:SetCost(aux.bfgcost)
e3:SetTarget(cm.thtg)
e3:SetOperation(cm.thop)
c:RegisterEffect(e3)
--special summon
local e0=Effect.CreateEffect(c)
e0:SetCategory(CATEGORY_SPECIAL_SUMMON)
e0:SetType(EFFECT_TYPE_ACTIVATE)
e0:SetCode(EVENT_FREE_CHAIN)
e0:SetCountLimit(1,m)
e0:SetCost(cm.cost)
e0:SetTarget(cm.target)
e0:SetOperation(cm.operation)
c:RegisterEffect(e0)
--return to gy
local e2=Effect.CreateEffect(c)
e2:SetCategory(CATEGORY_DAMAGE)
e2:SetType(EFFECT_TYPE_IGNITION)
e2:SetRange(LOCATION_GRAVE)
e2:SetCountLimit(1,m)
e2:SetCost(aux.bfgcost)
e2:SetTarget(cm.damtg)
e2:SetOperation(cm.damop)
c:RegisterEffect(e2)
end
function cm.cfilter(c)
return c:IsType(TYPE_MONSTER) and c:IsRace(RACE_SPELLCASTER) and c:IsAbleToRemoveAsCost()
function cm.costfilter(c)
return c:IsType(TYPE_SPELL) and c:IsDiscardable()
end
function cm.cost(e,tp,eg,ep,ev,re,r,rp,chk)
local g=Duel.GetMatchingGroup(cm.cfilter,tp,LOCATION_GRAVE,0,nil)
if chk==0 then return g:GetClassCount(Card.GetCode)>=3 end
Duel.Hint(HINT_SELECTMSG,tp,HINTMSG_REMOVE)
aux.GCheckAdditional=aux.dncheck
local rg=g:SelectSubGroup(tp,aux.TRUE,false,3,3)
aux.GCheckAdditional=nil
Duel.Remove(rg,POS_FACEUP,REASON_COST)
end
function cm.geffilter(c)
return c:IsFaceup() and c:IsSetCard(0x3552) and c:IsType(TYPE_RITUAL)
if chk==0 then return Duel.IsExistingMatchingCard(cm.costfilter,tp,LOCATION_HAND,0,1,e:GetHandler()) end
Duel.DiscardHand(tp,cm.costfilter,1,1,REASON_COST+REASON_DISCARD)
end
function cm.filter(c,tp)
return (aux.IsCodeListed(c,33334568) or Duel.IsExistingMatchingCard(cm.geffilter,tp,LOCATION_MZONE,0,1,nil))
and c:IsType(TYPE_SPELL) and not c:IsCode(m) and c:IsAbleToHand()
function cm.spfilter(c,e,tp)
return c:IsSetCard(0x3552) and c:IsType(TYPE_PENDULUM) and c:IsCanBeSpecialSummoned(e,0,tp,false,false)
end
function cm.target(e,tp,eg,ep,ev,re,r,rp,chk)
if chk==0 then return Duel.IsExistingMatchingCard(cm.filter,tp,LOCATION_DECK,0,1,nil) end
Duel.SetOperationInfo(0,CATEGORY_TOHAND,nil,1,tp,LOCATION_DECK)
if chk==0 then return Duel.GetLocationCount(tp,LOCATION_MZONE)>0
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 cm.activate(e,tp,eg,ep,ev,re,r,rp)
Duel.Hint(HINT_SELECTMSG,tp,HINTMSG_ATOHAND)
local g=Duel.SelectMatchingCard(tp,cm.filter,tp,LOCATION_DECK,0,1,1,nil)
function cm.operation(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_DECK,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
end
function cm.thfilter(c)
return (c:IsLocation(LOCATION_GRAVE) or c:IsFaceup()) and c:IsCode(33334568) and c:IsAbleToHand()
function cm.damtg(e,tp,eg,ep,ev,re,r,rp,chk)
if chk==0 then return true end
Duel.SetOperationInfo(0,CATEGORY_DAMAGE,nil,0,1-tp,800)
end
function cm.thtg(e,tp,eg,ep,ev,re,r,rp,chk,chkc)
if chkc then return chkc:IsLocation(LOCATION_GRAVE+LOCATION_REMOVED) and chkc:IsControler(tp) and cm.thfilter(chkc) end
if chk==0 then return Duel.IsExistingTarget(cm.thfilter,tp,LOCATION_GRAVE+LOCATION_REMOVED,0,1,e:GetHandler()) end
Duel.Hint(HINT_SELECTMSG,tp,HINTMSG_ATOHAND)
local g=Duel.SelectTarget(tp,cm.thfilter,tp,LOCATION_GRAVE+LOCATION_REMOVED,0,1,1,e:GetHandler())
Duel.SetOperationInfo(0,CATEGORY_TOHAND,g,1,0,0)
function cm.rfilter(c)
return (aux.IsCodeListed(c,33334568) or c:IsCode(33334568)) and c:IsFaceup() and c:IsType(TYPE_SPELL) and not c:IsCode(m)
end
function cm.cfilter(c)
return c:IsRace(RACE_SPELLCASTER) and c:IsType(TYPE_RITUAL)
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)
function cm.damop(e,tp,eg,ep,ev,re,r,rp)
if Duel.Damage(1-tp,800,REASON_EFFECT)~=0
and Duel.IsExistingMatchingCard(cm.cfilter,tp,LOCATION_GRAVE,0,1,nil)
and Duel.IsExistingMatchingCard(cm.rfilter,tp,LOCATION_REMOVED,0,1,nil)
and Duel.SelectYesNo(tp,aux.Stringid(m,2)) then
Duel.BreakEffect()
Duel.Hint(HINT_SELECTMSG,tp,HINTMSG_TOGRAVE)
local sg=Duel.SelectMatchingCard(tp,cm.rfilter,tp,LOCATION_REMOVED,0,1,1,nil)
Duel.HintSelection(sg)
Duel.SendtoGrave(sg,REASON_EFFECT+REASON_RETURN)
end
end
--尤娜·希斯的星空
--尤娜·希斯的清晨
local m=81026072
local cm=_G["c"..m]
Duel.LoadScript("c81000000.lua")
function cm.initial_effect(c)
aux.AddCodeList(c,33334568)
--special summon
local e0=Effect.CreateEffect(c)
e0:SetCategory(CATEGORY_SPECIAL_SUMMON)
e0:SetType(EFFECT_TYPE_ACTIVATE)
e0:SetCode(EVENT_FREE_CHAIN)
e0:SetCountLimit(1,m)
e0:SetCost(cm.cost)
e0:SetTarget(cm.target)
e0:SetOperation(cm.operation)
c:RegisterEffect(e0)
--return to gy
--Activate
local e1=Effect.CreateEffect(c)
e1:SetDescription(aux.Stringid(m,0))
e1:SetCategory(CATEGORY_TOGRAVE)
e1:SetType(EFFECT_TYPE_ACTIVATE)
e1:SetCode(EVENT_FREE_CHAIN)
e1:SetCountLimit(1,m)
e1:SetTarget(cm.target)
e1:SetOperation(cm.activate)
c:RegisterEffect(e1)
--to hand
local e2=Effect.CreateEffect(c)
e2:SetCategory(CATEGORY_DAMAGE)
e2:SetDescription(aux.Stringid(m,1))
e2:SetCategory(CATEGORY_TODECK+CATEGORY_TOHAND)
e2:SetType(EFFECT_TYPE_IGNITION)
e2:SetRange(LOCATION_GRAVE)
e2:SetCountLimit(1,m+900)
e2:SetCondition(aux.exccon)
e2:SetCost(aux.bfgcost)
e2:SetTarget(cm.damtg)
e2:SetOperation(cm.damop)
e2:SetProperty(EFFECT_FLAG_CARD_TARGET)
e2:SetCountLimit(1,m)
e2:SetTarget(cm.tg)
e2:SetOperation(cm.op)
c:RegisterEffect(e2)
end
function cm.costfilter(c)
return c:IsType(TYPE_SPELL) and c:IsDiscardable()
end
function cm.cost(e,tp,eg,ep,ev,re,r,rp,chk)
if chk==0 then return Duel.IsExistingMatchingCard(cm.costfilter,tp,LOCATION_HAND,0,1,e:GetHandler()) end
Duel.DiscardHand(tp,cm.costfilter,1,1,REASON_COST+REASON_DISCARD)
end
function cm.spfilter(c,e,tp)
return c:IsRace(RACE_SPELLCASTER) and c:IsAttribute(ATTRIBUTE_FIRE) and c:IsType(TYPE_PENDULUM) and c:IsLevelBelow(3) and c:IsCanBeSpecialSummoned(e,0,tp,false,false)
function cm.tgfilter(c)
return c:IsSetCard(0x3552) and c:IsType(TYPE_MONSTER) and c:IsAbleToGrave()
end
function cm.target(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_DECK,0,1,nil,e,tp) end
Duel.SetOperationInfo(0,CATEGORY_SPECIAL_SUMMON,nil,1,tp,LOCATION_DECK)
if chk==0 then return Duel.IsExistingMatchingCard(cm.tgfilter,tp,LOCATION_DECK,0,1,nil) end
Duel.SetOperationInfo(0,CATEGORY_TOGRAVE,nil,1,tp,LOCATION_DECK)
end
function cm.operation(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_DECK,0,1,1,nil,e,tp)
function cm.activate(e,tp,eg,ep,ev,re,r,rp)
Duel.Hint(HINT_SELECTMSG,tp,HINTMSG_TOGRAVE)
local g=Duel.SelectMatchingCard(tp,cm.tgfilter,tp,LOCATION_DECK,0,1,1,nil)
if g:GetCount()>0 then
Duel.SpecialSummon(g,0,tp,tp,false,false,POS_FACEUP)
Duel.SendtoGrave(g,REASON_EFFECT)
end
end
function cm.damtg(e,tp,eg,ep,ev,re,r,rp,chk)
if chk==0 then return true end
Duel.SetOperationInfo(0,CATEGORY_DAMAGE,nil,0,1-tp,800)
function cm.filter(c,b1,b2)
return (aux.IsCodeListed(c,33334568) or c:IsCode(33334568)) and c:IsType(TYPE_SPELL) and not c:IsCode(m) and ((b1 and c:IsAbleToHand()) or (b2 and c:IsAbleToDeck())) and (c:IsLocation(LOCATION_GRAVE) or c:IsFaceup())
end
function cm.rfilter(c)
return (aux.IsCodeListed(c,33334568) or c:IsCode(33334568)) and c:IsFaceup() and c:IsType(TYPE_SPELL) and not c:IsCode(m)
function cm.tg(e,tp,eg,ep,ev,re,r,rp,chk,chkc)
local c=e:GetHandler()
local b1,b2=c:IsAbleToDeck(),c:IsAbleToHand()
if chkc then return chkc:IsLocation(LOCATION_GRAVE+LOCATION_REMOVED) and chkc:IsControler(tp) and cm.filter(chkc,b1,b2) end
if chk==0 then return Duel.IsExistingTarget(cm.filter,tp,LOCATION_GRAVE+LOCATION_REMOVED,0,1,nil,b1,b2) end
Duel.Hint(HINT_SELECTMSG,tp,HINTMSG_TARGET)
local g=Duel.SelectTarget(tp,cm.filter,tp,LOCATION_GRAVE+LOCATION_REMOVED,0,1,1,nil,b1,b2)
Duel.SetOperationInfo(0,CATEGORY_TOHAND,nil,1,tp,LOCATION_GRAVE+LOCATION_REMOVED)
Duel.SetOperationInfo(0,CATEGORY_TODECK,nil,1,tp,LOCATION_GRAVE+LOCATION_REMOVED)
end
function cm.cfilter(c)
return c:IsRace(RACE_SPELLCASTER) and c:IsType(TYPE_RITUAL)
end
function cm.damop(e,tp,eg,ep,ev,re,r,rp)
if Duel.Damage(1-tp,800,REASON_EFFECT)~=0
and Duel.IsExistingMatchingCard(cm.cfilter,tp,LOCATION_GRAVE,0,1,nil)
and Duel.IsExistingMatchingCard(cm.rfilter,tp,LOCATION_REMOVED,0,1,nil)
and Duel.SelectYesNo(tp,aux.Stringid(m,2)) then
Duel.BreakEffect()
Duel.Hint(HINT_SELECTMSG,tp,HINTMSG_TOGRAVE)
local sg=Duel.SelectMatchingCard(tp,cm.rfilter,tp,LOCATION_REMOVED,0,1,1,nil)
Duel.HintSelection(sg)
Duel.SendtoGrave(sg,REASON_EFFECT+REASON_RETURN)
function cm.op(e,tp,eg,ep,ev,re,r,rp)
local tc=Duel.GetFirstTarget()
local c=e:GetHandler()
if c:IsRelateToEffect(e) and tc:IsRelateToEffect(e) then
local g=Group.FromCards(tc,c)
Duel.Hint(HINT_SELECTMSG,tp,HINTMSG_ATOHAND)
local tg=g:FilterSelect(tp,Card.IsAbleToHand,1,1,nil)
g:Sub(tg)
Duel.SendtoHand(tg,nil,REASON_EFFECT)
Duel.ConfirmCards(1-tp,tg:GetFirst())
Duel.SendtoDeck(g,nil,SEQ_DECKBOTTOM,REASON_EFFECT)
end
end
......@@ -13,7 +13,7 @@ function cm.initial_effect(c)
e0:SetProperty(EFFECT_FLAG_CARD_TARGET)
e0:SetType(EFFECT_TYPE_IGNITION)
e0:SetRange(LOCATION_PZONE)
e0:SetCountLimit(1,m)
e0:SetCountLimit(1)
e0:SetTarget(cm.atktg)
e0:SetOperation(cm.atkop)
c:RegisterEffect(e0)
......@@ -29,10 +29,10 @@ function cm.initial_effect(c)
c:RegisterEffect(e2)
--tograve
local e4=Effect.CreateEffect(c)
e4:SetCategory(CATEGORY_TOGRAVE)
e4:SetCategory(CATEGORY_DECKDES)
e4:SetType(EFFECT_TYPE_IGNITION)
e4:SetRange(LOCATION_MZONE)
e4:SetCountLimit(1,m+900)
e4:SetCountLimit(1,m)
e4:SetTarget(cm.tgtg)
e4:SetOperation(cm.tgop)
c:RegisterEffect(e4)
......@@ -82,9 +82,9 @@ function cm.acop(e,tp,eg,ep,ev,re,r,rp)
end
end
function cm.tgtg(e,tp,eg,ep,ev,re,r,rp,chk)
if chk==0 then return Duel.IsExistingMatchingCard(Card.IsAbleToGrave,tp,LOCATION_ONFIELD,LOCATION_ONFIELD,1,nil)
if chk==0 then return Duel.IsPlayerCanDiscardDeck(1-tp,3)
and e:GetHandler():IsLevelAbove(4) end
Duel.SetOperationInfo(0,CATEGORY_TOGRAVE,nil,1,PLAYER_ALL,LOCATION_ONFIELD)
Duel.SetOperationInfo(0,CATEGORY_DECKDES,nil,0,1-tp,3)
end
function cm.tgop(e,tp,eg,ep,ev,re,r,rp)
local c=e:GetHandler()
......@@ -95,10 +95,5 @@ function cm.tgop(e,tp,eg,ep,ev,re,r,rp)
e1:SetReset(RESET_EVENT+RESETS_STANDARD+RESET_DISABLE)
e1:SetValue(-3)
c:RegisterEffect(e1)
Duel.Hint(HINT_SELECTMSG,tp,HINTMSG_TOGRAVE)
local g=Duel.SelectMatchingCard(tp,Card.IsAbleToGrave,tp,LOCATION_ONFIELD,LOCATION_ONFIELD,1,1,nil)
if g:GetCount()>0 then
Duel.HintSelection(g)
Duel.SendtoGrave(g,REASON_EFFECT)
end
Duel.DiscardDeck(1-tp,3,REASON_EFFECT)
end
--虚拟YouTuber 花守海露希
--虚拟YouTuber 乃木里美恰洛
local m=81046021
local cm=_G["c"..m]
Duel.LoadScript("c81000000.lua")
function cm.initial_effect(c)
--link summon
--fusion material
c:EnableReviveLimit()
aux.AddLinkProcedure(c,aux.FilterBoolFunction(Card.IsLinkType,TYPE_EFFECT),2,99,cm.lcheck)
--cannot be link material
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)
--cannot be target/battle indestructable
aux.AddFusionProcFunRep(c,aux.FilterBoolFunction(Card.IsLevelAbove,8),2,true)
--spsummon
local e1=Effect.CreateEffect(c)
e1:SetCategory(CATEGORY_SPECIAL_SUMMON)
e1:SetType(EFFECT_TYPE_SINGLE+EFFECT_TYPE_TRIGGER_O)
e1:SetProperty(EFFECT_FLAG_DELAY+EFFECT_FLAG_CARD_TARGET)
e1:SetCode(EVENT_SPSUMMON_SUCCESS)
e1:SetCountLimit(1,m)
e1:SetCondition(cm.discon)
e1:SetTarget(cm.distg)
e1:SetOperation(cm.disop)
c:RegisterEffect(e1)
--banish
local e2=Effect.CreateEffect(c)
e2:SetProperty(EFFECT_FLAG_IGNORE_IMMUNE)
e2:SetType(EFFECT_TYPE_FIELD)
e2:SetCode(EFFECT_CANNOT_BE_EFFECT_TARGET)
e2:SetCategory(CATEGORY_REMOVE)
e2:SetType(EFFECT_TYPE_IGNITION)
e2:SetProperty(EFFECT_FLAG_CARD_TARGET)
e2:SetRange(LOCATION_MZONE)
e2:SetTargetRange(LOCATION_MZONE,LOCATION_MZONE)
e2:SetTarget(cm.tgtg)
e2:SetValue(aux.tgoval)
e2:SetCountLimit(1,m+900)
e2:SetTarget(cm.rmtg)
e2:SetOperation(cm.rmop)
c:RegisterEffect(e2)
--to hand
local e4=Effect.CreateEffect(c)
e4:SetCategory(CATEGORY_TOHAND+CATEGORY_SEARCH)
e4:SetType(EFFECT_TYPE_FIELD+EFFECT_TYPE_TRIGGER_O)
e4:SetCode(EVENT_SPSUMMON_SUCCESS)
e4:SetProperty(EFFECT_FLAG_DELAY)
e4:SetCountLimit(1,m)
e4:SetRange(LOCATION_MZONE)
e4:SetCondition(cm.thcon)
e4:SetCost(cm.thcost)
e4:SetTarget(cm.thtg)
e4:SetOperation(cm.thop)
--force direct
local e3=Effect.CreateEffect(c)
e3:SetType(EFFECT_TYPE_FIELD)
e3:SetCode(EFFECT_IGNORE_BATTLE_TARGET)
e3:SetProperty(EFFECT_FLAG_SET_AVAILABLE+EFFECT_FLAG_IGNORE_IMMUNE)
e3:SetRange(LOCATION_MZONE)
e3:SetTargetRange(LOCATION_MZONE,0)
e3:SetCondition(aux.IsDualState)
e3:SetValue(cm.atkcon)
c:RegisterEffect(e3)
local e4=e3:Clone()
e4:SetProperty(0)
e4:SetValue(0)
c:RegisterEffect(e4)
e3:SetLabelObject(e4)
end
function cm.lcheck(g,lc)
return g:IsExists(Card.IsLinkType,1,nil,TYPE_RITUAL)
function cm.mfilter(c)
return c:IsFusionType(TYPE_FUSION+TYPE_SYNCHRO+TYPE_XYZ+TYPE_LINK) and not c:IsFusionCode(m)
end
function cm.thcfilter(c,lg)
return c:IsType(TYPE_RITUAL) and c:IsSummonType(SUMMON_TYPE_RITUAL) and lg:IsContains(c)
function cm.afilter(c)
return c:IsFaceup() and c:IsType(TYPE_FUSION)
end
function cm.thcon(e,tp,eg,ep,ev,re,r,rp)
local lg=e:GetHandler():GetLinkedGroup()
return eg:IsExists(cm.thcfilter,1,nil,lg)
function cm.atkcon(e)
return not Duel.IsExistingMatchingCard(cm.afilter,e:GetHandlerPlayer(),LOCATION_MZONE,0,1,e:GetHandler())
end
function cm.cfilter(c)
return c:IsType(TYPE_MONSTER) and c:IsType(TYPE_RITUAL) and c:IsAbleToRemoveAsCost()
function cm.discon(e,tp,eg,ep,ev,re,r,rp)
return e:GetHandler():IsSummonType(SUMMON_TYPE_FUSION)
end
function cm.thcost(e,tp,eg,ep,ev,re,r,rp,chk)
if chk==0 then return Duel.IsExistingMatchingCard(cm.cfilter,tp,LOCATION_GRAVE,0,1,nil) end
Duel.Hint(HINT_SELECTMSG,tp,HINTMSG_REMOVE)
local g=Duel.SelectMatchingCard(tp,cm.cfilter,tp,LOCATION_GRAVE,0,1,1,nil)
Duel.Remove(g,POS_FACEUP,REASON_COST)
function cm.distg(e,tp,eg,ep,ev,re,r,rp,chk,chkc)
if chkc then return chkc:IsLocation(LOCATION_MZONE) and aux.NegateEffectMonsterFilter(chkc) and chkc:IsControler(1-tp) end
if chk==0 then return Duel.IsExistingTarget(aux.NegateEffectMonsterFilter,tp,0,LOCATION_MZONE,1,nil) end
Duel.Hint(HINT_SELECTMSG,tp,HINTMSG_DISABLE)
local g=Duel.SelectTarget(tp,aux.NegateEffectMonsterFilter,tp,0,LOCATION_MZONE,1,1,nil)
Duel.SetOperationInfo(0,CATEGORY_DISABLE,g,1,0,0)
end
function cm.thfilter(c)
return c:IsType(TYPE_RITUAL) and c:IsType(TYPE_SPELL) and c:IsAbleToHand()
function cm.disop(e,tp,eg,ep,ev,re,r,rp)
local c=e:GetHandler()
local tc=Duel.GetFirstTarget()
if tc:IsFaceup() and tc:IsRelateToEffect(e) and not tc:IsDisabled() then
Duel.NegateRelatedChain(tc,RESET_TURN_SET)
local e1=Effect.CreateEffect(c)
e1:SetType(EFFECT_TYPE_SINGLE)
e1:SetCode(EFFECT_DISABLE)
e1:SetProperty(EFFECT_FLAG_CANNOT_DISABLE)
e1:SetReset(RESET_EVENT+RESETS_STANDARD+RESET_PHASE+PHASE_END)
tc:RegisterEffect(e1)
local e2=Effect.CreateEffect(c)
e2:SetType(EFFECT_TYPE_SINGLE)
e2:SetCode(EFFECT_DISABLE_EFFECT)
e2:SetProperty(EFFECT_FLAG_CANNOT_DISABLE)
e2:SetValue(RESET_TURN_SET)
e2:SetReset(RESET_EVENT+RESETS_STANDARD+RESET_PHASE+PHASE_END)
tc:RegisterEffect(e2)
end
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)
function cm.rmfilter(c,tp)
return c:IsAbleToRemove()
and Duel.IsExistingTarget(Card.IsAbleToRemove,tp,0,LOCATION_ONFIELD,1,c)
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
function cm.rmtg(e,tp,eg,ep,ev,re,r,rp,chk,chkc)
if chkc then return false end
if chk==0 then return Duel.IsExistingTarget(cm.rmfilter,tp,LOCATION_MZONE,0,1,e:GetHandler(),tp) end
Duel.Hint(HINT_SELECTMSG,tp,HINTMSG_REMOVE)
local g1=Duel.SelectTarget(tp,cm.rmfilter,tp,LOCATION_MZONE,0,1,1,e:GetHandler(),tp)
Duel.Hint(HINT_SELECTMSG,tp,HINTMSG_REMOVE)
local g2=Duel.SelectTarget(tp,Card.IsAbleToRemove,tp,0,LOCATION_ONFIELD,1,1,g1)
g1:Merge(g2)
Duel.SetOperationInfo(0,CATEGORY_REMOVE,g1,#g1,0,0)
end
function cm.tgtg(e,c)
return e:GetHandler():GetLinkedGroup():IsContains(c) and c:IsType(TYPE_MONSTER) and c:IsType(TYPE_RITUAL)
function cm.rmop(e,tp,eg,ep,ev,re,r,rp)
local g=Duel.GetChainInfo(0,CHAININFO_TARGET_CARDS):Filter(Card.IsRelateToEffect,nil,e)
if #g>0 then
Duel.Remove(g,POS_FACEUP,REASON_EFFECT)
end
end
--虚拟YouTuber 星奈铃
--
local m=81046024
local cm=_G["c"..m]
Duel.LoadScript("c81000000.lua")
......@@ -9,8 +9,11 @@ function cm.initial_effect(c)
--atklimit
local e0=Effect.CreateEffect(c)
e0:SetType(EFFECT_TYPE_SINGLE)
e0:SetCode(EFFECT_CANNOT_ATTACK)
e0:SetCode(EFFECT_UPDATE_ATTACK)
e0:SetProperty(EFFECT_FLAG_SINGLE_RANGE)
e0:SetRange(LOCATION_MZONE)
e0:SetCondition(cm.atkcon)
e0:SetValue(cm.adval)
c:RegisterEffect(e0)
--spsummon
local e1=Effect.CreateEffect(c)
......@@ -35,16 +38,19 @@ function cm.initial_effect(c)
c:RegisterEffect(e3)
end
function cm.afilter(c)
return c:IsFaceup() and (c:IsType(TYPE_FUSION) or c:IsCode(81046043))
return c:IsFaceup() and c:IsType(TYPE_FUSION)
end
function cm.atkcon(e)
return not Duel.IsExistingMatchingCard(cm.afilter,e:GetHandlerPlayer(),LOCATION_MZONE,0,1,e:GetHandler())
end
function cm.adval(e,c)
return -Duel.GetLP(e:GetHandlerPlayer())
end
function cm.spcon(e,tp,eg,ep,ev,re,r,rp)
return e:GetHandler():IsSummonType(SUMMON_TYPE_FUSION)
end
function cm.spfilter(c,e,tp)
return ((c:IsType(TYPE_FUSION) and c:IsLevelAbove(8)) or c:IsCode(81046043)) and c:IsCanBeSpecialSummoned(e,0,tp,false,false)
return c:IsType(TYPE_FUSION) and c:IsLevelAbove(8) and c:IsCanBeSpecialSummoned(e,0,tp,false,false)
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
......@@ -66,9 +72,9 @@ function cm.rmfilter(c,tp)
end
function cm.rmtg(e,tp,eg,ep,ev,re,r,rp,chk,chkc)
if chkc then return false end
if chk==0 then return Duel.IsExistingTarget(cm.rmfilter,tp,LOCATION_ONFIELD,0,1,e:GetHandler(),tp) end
if chk==0 then return Duel.IsExistingTarget(cm.rmfilter,tp,LOCATION_ONFIELD,0,1,nil,tp) end
Duel.Hint(HINT_SELECTMSG,tp,HINTMSG_REMOVE)
local g1=Duel.SelectTarget(tp,cm.rmfilter,tp,LOCATION_ONFIELD,0,1,1,e:GetHandler(),tp)
local g1=Duel.SelectTarget(tp,cm.rmfilter,tp,LOCATION_ONFIELD,0,1,1,nil,tp)
Duel.Hint(HINT_SELECTMSG,tp,HINTMSG_REMOVE)
local g2=Duel.SelectTarget(tp,Card.IsAbleToRemove,tp,0,LOCATION_ONFIELD,1,1,g1)
g1:Merge(g2)
......
......@@ -44,8 +44,9 @@ function cm.tgf1(c,tc)
return c:IsLinkSummonable(nil) and c:IsLinkAbove(2) and c:IsSetCard(0x6282)
end
function cm.tg1(e,tp,eg,ep,ev,re,r,rp,chk)
if chk==0 then return Duel.IsExistingMatchingCard(cm.tgf1,tp,LOCATION_EXTRA,0,1,nil,e:GetHandler()) end
if chk==0 then return Duel.IsExistingMatchingCard(cm.tgf1,tp,LOCATION_EXTRA,0,1,nil,e:GetHandler()) and e:GetHandler():GetFlagEffect(m)==0 end
Duel.SetOperationInfo(0,CATEGORY_SPECIAL_SUMMON,nil,1,0,0)
e:GetHandler():RegisterFlagEffect(m,RESET_CHAIN,0,1)
end
function cm.op1(e,tp,eg,ep,ev,re,r,rp)
if not e:GetHandler():IsRelateToEffect(e) then return end
......
......@@ -143,6 +143,7 @@
#AddCodeList(10050001) 永远梦想的少女爱丽丝卡名记述
#AddCodeList(10060001) 观测者 贝奥 卡名记述
!counter 0x50b 白蛇指示物
!counter 0x50a BO指示物
#SCL 2798419987 101 0x330-0x33f
!setname 0xa335 灰烬
......@@ -167,6 +168,7 @@
!setname 0x5481 判官司
!setname 0x482 ULTRAMAN
!setname 0x483 降世羽纱
!setname 0x484 L·R
#嘿子 2686488312 109 0x230-0x23f
!setname 0x233 纸上
......@@ -199,6 +201,7 @@
!setname 0x97a 虚诞
!setname 0x97c 珂拉琪
!setname 0x97d 悠久
!setname 0x6977 烬羽
#traveler_saga 幻旅传说
!counter 0x1970 记忆指示物
......@@ -345,6 +348,7 @@
#古木寻斋 1228003719 128 0xa70-0xa7e
!setname 0xa70 亘古械神
!setname 0x3a71 A.O.T.
!setname 0x4a71 铳影
!setname 0x5a71 H.P.K.
!setname 0x6a71 H.P.T.
!setname 0xda71 D.H.P.K.
......@@ -553,6 +557,14 @@
#setcard="PhantomQuantum" 幻量子
#setcard="Shinkansen" 新干线
#龙心 760287105 190 0x920~0x92f
!setname 0x920 七曜
!setname 0x921 帕秋莉
!setname 0x922 小恶魔
!setname 0x924 恶魔的
#umi 860116530 191 0x190~0x19f
#羽岚19.5 386513854 195 0x990-0x99f
!setname 0x3990 七色人形剧
!setname 0x3991 Alice Margatroid
......@@ -572,6 +584,11 @@
!setname 0xfd6 魔凰
!setname 0x3fd6 邪魔凰
!setname 0x6fd6 罪魔凰
!setname 0x9fd5 渊异
!setname 0xfd3 模块
!setname 0x3fd3 应敌模块
!setname 0x5fd3 支援模块
!setname 0x6fd3 联合模块
!counter 0xfd1 机械动力指示物
!counter 0x1fd1 FLAG指示物
!counter 0x1fd2 旗子指示物
......@@ -1123,6 +1140,9 @@
#小K 1318052139 669 0x370-0x37f
!setname 0x373 神心一刀流
!setname 0x374 星曜
!counter 0x1371 斩身指示物
!counter 0x1372 崩神指示物
!counter 0x1373 断魂指示物
!setname 0x1374 星曜女神
!setname 0x2374 堕反星曜
!counter 0x1374 矿化指示物
......@@ -1132,6 +1152,8 @@
#老凤凰 2637275923 672 0x670-0x67f
!setname 0x671 结天缘
!setname 0x3671 结天缘骑
!setname 0x5671 术结天缘
!setname 0x7671 术结天缘骑
!setname 0x672 神采
!setname 0x3672 神采-尤艾拉
!setname 0x5672 神采-艾米莉塔
......@@ -1142,6 +1164,7 @@
!setname 0x676 巧壳
!setname 0x677 征冥天
!setname 0x67e 夏乡追忆
!counter 0x671 结缘指示物
#D9 1309183173 696 0x690-0x69f
!setname 0x3690 格斗技
......@@ -1193,6 +1216,9 @@
!setname 0x32f1 显能者
!setname 0x2f2 恼鼠
#涵涵 2436044657 738 0x730~0x73f
!setname 0x3730 洛克
#龙舞Manto 2294632065 751 0x270-0x27f
!setname 0x276 械龙
!setname 0x3276 械龙铠
......@@ -1343,6 +1369,7 @@
!setname 0x5651 虚言灵
!setname 0x5652 圣刃
!setname 0x3653 木甲
!setname 0x965f 未名天使
#AddCodeList(86570018) 真言灵衍生物卡名记述
!counter 0x5652 追想指示物
!counter 0x651 星巡指示物
......@@ -1375,11 +1402,21 @@
!setname 0x281 布偶
!setname 0x3282 世界异变
!setname 0x6282 闲暇时光
!setname 0x3283 无心骑士
!setname 0x9282 困倦
!setname 0xa282 起床气
!setname 0xc282 安眠
#Jerry 1993043473 988 0xad0-0xadf
!setname 0xad0 超古代的
!setname 0xad2 萝卜-R
#玛丽的对头 998 0x870~0x87f
!setname 0x876 标志灵
!setname 0x3876 交通标志灵
!setname 0x5876 危害标志灵
!counter 0x0876 危害指示物
#公用区间 986 0x870-0x87f
##柚木梨沙 1141457733 000-199
!setname 0x870 少女分形
......
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