Commit 35a35faf authored by POLYMER's avatar POLYMER

fix

parent 2bf74dce
......@@ -102,7 +102,7 @@ function c19209539.spop(e,tp,eg,ep,ev,re,r,rp)
end
end
function c19209539.descon(e,tp,eg,ep,ev,re,r,rp)
return re
return re and re:IsHasType(EFFECT_TYPE_ACTIONS)
end
function c19209539.desfilter(c)
return c:IsFaceup() and c:IsSetCard(0x3b50)
......
......@@ -104,22 +104,21 @@ function s.drcost(e,tp,eg,ep,ev,re,r,rp,chk)
if chk==0 then return Duel.IsExistingMatchingCard(s.drcfilter,tp,LOCATION_MZONE+LOCATION_HAND,0,1,nil,tp) end
Duel.Hint(HINT_SELECTMSG,tp,HINTMSG_TOGRAVE)
local g=Duel.SelectMatchingCard(tp,s.drcfilter,tp,LOCATION_MZONE+LOCATION_HAND,0,1,1,nil,tp)
e:SetLabel(g:GetFirst():GetLevel())
Duel.SendtoGrave(g,REASON_RELEASE+REASON_COST)
end
function s.drtg(e,tp,eg,ep,ev,re,r,rp,chk)
if chk==0 then return true end
Duel.SetTargetPlayer(tp)
Duel.SetTargetParam(2)
Duel.SetOperationInfo(0,CATEGORY_DRAW,nil,0,tp,2)
Duel.SetOperationInfo(0,CATEGORY_HANDES,nil,0,tp,1)
Duel.SetOperationInfo(0,CATEGORY_DRAW,nil,0,tp,1)
end
function s.dract(e,tp,eg,ep,ev,re,r,rp)
local p,d=Duel.GetChainInfo(0,CHAININFO_TARGET_PLAYER,CHAININFO_TARGET_PARAM)
local h1=Duel.Draw(p,d,REASON_EFFECT)
if h1==0 then return false end
Duel.BreakEffect()
Duel.ShuffleHand(p)
Duel.DiscardHand(p,aux.TRUE,1,1,REASON_EFFECT+REASON_DISCARD)
local p=Duel.GetChainInfo(0,CHAININFO_TARGET_PLAYER)
local lv=e:GetLabel()
if lv<4 then return false end
local num=math.floor(lv/4)
if num<1 then return end
Duel.Draw(p,num,REASON_EFFECT)
end
function s.thcon(e,tp,eg,ep,ev,re,r,rp)
local c=e:GetHandler()
......
......@@ -18,6 +18,7 @@ function s.initial_effect(c)
local ge1=Effect.CreateEffect(c)
ge1:SetType(EFFECT_TYPE_FIELD+EFFECT_TYPE_CONTINUOUS)
ge1:SetCode(EVENT_TO_GRAVE)
ge1:SetCondition(s.checkcon)
ge1:SetOperation(s.checkop)
Duel.RegisterEffect(ge1,0)
local ge2=ge1:Clone()
......@@ -45,6 +46,9 @@ function s.initial_effect(c)
c:RegisterEffect(e3)
end
s.hackclad=2
function s.checkcon(e,tp,eg,ep,ev,re,r,rp)
return not re or not re:IsActivated()
end
function s.checkop(e,tp,eg,ep,ev,re,r,rp)
local tc=eg:GetFirst()
while tc do
......@@ -138,18 +142,16 @@ function s.drcost(e,tp,eg,ep,ev,re,r,rp,chk)
Duel.Release(g,REASON_COST)
end
function s.drtg(e,tp,eg,ep,ev,re,r,rp,chk)
if chk==0 then return true end
Duel.SetTargetPlayer(tp)
Duel.SetOperationInfo(0,CATEGORY_HANDES,nil,0,tp,1)
Duel.SetOperationInfo(0,CATEGORY_DRAW,nil,0,tp,1)
if chk==0 then return Duel.IsExistingMatchingCard(aux.TRUE,tp,0,0xe,1,nil) end
Duel.SetTargetPlayer(1-tp)
local dam=Duel.GetFieldGroupCount(1-tp,0xe,0)*200
Duel.SetTargetParam(dam)
Duel.SetOperationInfo(0,CATEGORY_DAMAGE,nil,0,1-tp,dam)
end
function s.drop(e,tp,eg,ep,ev,re,r,rp)
local p=Duel.GetChainInfo(0,CHAININFO_TARGET_PLAYER)
local ct=Duel.DiscardHand(p,aux.TRUE,1,60,REASON_EFFECT+REASON_DISCARD)
if ct>0 then
Duel.BreakEffect()
Duel.Draw(p,ct+1,REASON_EFFECT)
end
local dam=Duel.GetFieldGroupCount(1-tp,0xe,0)*200
Duel.Damage(p,dam,REASON_EFFECT)
end
function s.thcon(e,tp,eg,ep,ev,re,r,rp)
local c=e:GetHandler()
......
--世纪末编年史
--Hero
local table1={89943723,
9411399,
9411399,
9411399,
40044918,
40044918,
115072031,
115072031,
115072031,
59392529,
50720316,
50720316,
27780618,
27780618,
16605586,
14558127,
14558127,
14558127,
23434538,
23434538,
97268402,
97268402,
8949584,
8949584,
8949584,
24094653,
45906428,
52947044,
52947044,
52947044,
81439173,
21143940,
21143940,
24224830,
24224830,
65681983,
10045474,
10045474,
10045474,
75047173,
32828466,
56733747,
29095552,
60461804,
40854197,
93347961,
58481572,
58481572,
89870349,
30757127,
1948619,
19324993,
29301450,
58004362,
58004362,
}
--雷火进化
local table2={80186010,
80186010,
80186010,
8633261,
8633261,
8633261,
17045014,
15171722,
15171722,
35844557,
35844557,
72238166,
54266211,
34022970,
14558127,
14558127,
14558127,
89776023,
89776023,
89776023,
23434538,
23434538,
88095331,
13046291,
5338223,
5338223,
7477101,
7477101,
7477101,
73628505,
88760522,
60394026,
10080420,
10080420,
10080420,
10045474,
10045474,
10045474,
74100225,
74100225,
74100225,
90448279,
9940036,
67630394,
35103106,
35103106,
34909328,
2061963,
7511613,
45852939,
74294676,
42752141,
42752141,
63746411,
85747929,
66011101}
--青蛙
local table3={55063751,
26400609,
10963799,
84192580,
84192580,
14558127,
14558127,
14558127,
13533678,
75922381,
76145933,
2311090,
9126351,
9126351,
9126351,
9396662,
88686573,
23434538,
23434538,
68353324,
68353324,
68353324,
112538374,
112538374,
112538374,
1357146,
46239604,
75500286,
81439173,
84211599,
15443125,
24224830,
24224830,
65681983,
43582229,
10045474,
10045474,
10045474,
40366667,
40366667,
40366667,
68250822,
9464441,
42566602,
90448279,
72167543,
90809975,
36776089,
54498517,
45112597,
4280258,
69385019,
79130389,
29301450,
72329844,
65741786,
60303245}
--蛇毒
local table4={22499463,
22499463,
97565997,
48806195,
62383431,
74426895,
9284723,
84900597,
36278828,
20295753,
52543404,
62405028,
62405028,
62405028,
36010310,
36010310,
36010310,
73899015,
14558127,
14558127,
14558127,
23434538,
23434538,
97268402,
97268402,
17189677,
24050692,
24050692,
24050692,
24224830,
24224830,
65681983,
78789356,
10045474,
10045474,
10045474,
39163598,
93217231,
93217231,
1683982,
85888377,
4058,
68319538,
70913714,
70913714,
11398059,
11398059,
98127546,
6908161,
1487805,
75352507,
74974229,
29301450,
1528054,
9763474,
8602351}
table1={29925614,875572,67696066,68819554,68819554,68819554,7934362,7934362,7934362,34323367,34323367,92530005,92530005,7563579,7563579,42544773,42544773,42544773,114707556,114707556,114707556,72498838,72498838,72498838,87257460,14558127,14558127,14558127,23434538,23434538,76218313,97268402,97268402,24224830,24224830,73664385,73664385,73664385,68316358,68316358,31322640,31322640,10045474,10045474,10045474,37260677,66532962,27548199,77855162,90590303,8660395,4280258,95937545,92812851,45819647,20714553,24094258,29301450,47158777,34755994}
table2={89943723,9411399,9411399,9411399,40044918,40044918,115072031,115072031,115072031,59392529,50720316,50720316,27780618,27780618,16605586,14558127,14558127,14558127,23434538,23434538,97268402,97268402,213326,8949584,8949584,8949584,24094653,45906428,52947044,52947044,52947044,81439173,21143940,21143940,24224830,24224830,65681983,10045474,10045474,10045474,75047173,32828466,56733747,29095552,60461804,40854197,93347961,58481572,58481572,89870349,30757127,1948619,19324993,29301450,58004362,58004362}
table3={49036338,49036338,32731036,6637331,33854624,72656408,63198739,63198739,63198739,42141493,42141493,42141493,14558127,14558127,14558127,74203495,74203495,38814750,38814750,38814750,23434538,23434538,1980574,1980574,75425043,75425043,75425043,84211599,29095457,34090915,56506740,56506740,56506740,575512,10045474,97045737,97045737,36970611,36970611,116839253,116839253,116839253,40139997,84815190,27548199,72444406,74586817,30983281,44508095,87837090,37192109,73580471,93039339,8802510,8802510,29301450,24361622}
table4={81108658,81108658,28715905,54700519,54700519,54700519,14959144,14959144,29537493,29537493,29537493,55936191,55936191,42141493,42141493,42141493,79724755,14558127,14558127,14558127,59438930,23434538,23434538,78868119,78868119,78868119,97268402,16471775,16471775,16471775,53865474,32692693,89264428,10045474,10045474,10045474,40366667,40366667,40366667,15758127,96633955,84815190,86682165,92519087,87188910,9464441,53087962,53087962,80086070,62714453,27693363,27693363,131584217,131584217,29301450}
table5={92079625,4928565,4928565,4928565,3717252,572850,30328508,73956664,25926710,99937011,62320425,63542003,117960683,117960683,117960683,37961969,79109599,79109599,14558127,14558127,74078255,92919429,92919429,23434538,23434538,23434538,17266660,17266660,17266660,21074344,121074344,40177746,24094653,35726888,73628505,81439174,6767771,6767771,77103950,38436986,74920585,74920585,39552584,11321089,28226490,84330567,69946549,94977269,79606837,90448279,55285840,90590304,54191698,98127546,4280258,8264361,72329844}
table6={85991529,85991529,55885348,55885348,55885348,20849090,94454495,94454495,94454495,12408276,27869883,1274455,1274455,1274455,14558127,14558127,14558127,56907986,56907986,23434538,23434538,64280356,97631303,12266229,114439429,114439429,114439429,122842126,122842126,122842126,24224830,24224830,67723438,67723438,67237709,67237709,85668449,10045474,10045474,90452877,120366274,120366274,66532962,25862681,10443957,58069384,95992081,4280258,98095162,45819647,8264361,29301450,98462037,50277355,94259633}
table7={60764609,60764609,60764609,98169343,61283655,61283655,61283655,119150521,119150521,21698716,28803166,42141493,42141493,37405032,35199656,14558127,14558127,14558127,1410324,23434538,23434538,97651498,94145021,94145021,73628505,88693151,91706817,98567237,98567237,98567237,24224830,24224830,65681983,35371948,35371948,35371948,5611760,10045474,21076084,99176254,91272072,46640168,64804137,79559912,27552504,4731783,4280258,32448765,37683441,29301450,49867899,71818935,13117073,2463794,298846}
table8={1002,1002,72989439,70095154,70095154,71413901,7572887,83011277,83011277,34853266,1016,1016,1009,1009,34124316,23205979,23205979,33508719,3078576,31560081,31560081,34206604,4031928,12580477,17375316,19613556,42829885,55144522,55144522,55144522,79571449,79571449,79571449,83764718,85602018,45986603,98942059,1004,44095762,53582587,1014,46696593,80727036,28593363,17881964,54541900,80516007,41544074,59036972,31339260,37421579,58528964,1641882,63519819,63519819,63519819}
table9={14799437,14799437,23440231,23440231,23440231,102380,102380,102380,88301393,88301393,51316684,51316684,96055137,96055137,25811989,55623480,55623480,89423971,52038272,26034577,58446973,60551528,1845204,11110587,11110587,25311006,35269904,35269904,35269904,43040603,43040603,43040603,58577036,58577036,58577036,60830240,60830240,60830240,72892473,24299458,24299458,24299458,31444249,31444249,31444249,78748366,113482285,113482285,113482285,6351147,6351147,6351147,31548814,31548814,61411502,62219643,82734805,80532587,97051536,97051536,34446231,66403530,2772337,2857636,48815792,29301450,25577965,49867899,71607202,34989413,23656668}
table10={27204311,6728559,23431858,130918820,130918820,130918820,93490856,93490856,56495147,56495147,20001443,20001443,20001443,52854600,52854600,52854600,55273560,55273560,55273560,14558127,14558127,14558127,59438930,23434538,23434538,97268402,97268402,97268402,35261759,35261759,56465981,56465981,56465981,75500286,93850690,24224830,24224830,10045474,10045474,10045474,14821890,14821890,15982593,40139997,96633955,84815190,86682165,47710198,92519087,9464441,5041348,69248256,69248256,83755611,38030232,78917791,32519092}
table11={21377582,21377582,58984738,58984738,58984738,22499034,22499034,95004025,32181268,32181268,32181268,23434538,23434538,59750328,59750328,59750328,73628505,98645731,98645731,49430782,49430782,75425320,75425320,13035077,13035077,13035077,23516703,24207889,35125879,35125879,35125879,48716527,48716527,48716527,61529473,61529473,82732705,90846359,118776531,118776531,118776531}
table12={14105623,14105623,14105623,16306932,16306932,16306932,27204311,46136942,76794549,113652145,113652145,113652145,17330916,17330916,4836680,21250202,56677752,40318957,40318957,40318957,27869883,14558127,14558127,14558127,23434538,23434538,82224646,76218313,82661461,82661461,82661461,94145021,82768499,82768499,82768499,24224830,24224830,65681983,27564031,27564031,10045474,10045474,53262004,58074177,80666118,16691074,98127546,86066372,4280258,92812851,45819647,2857636,8264361,24094258,29301450,22125101,65741786}
table13={45803070,91812341,91812341,91812341,82738277,82738277,82738277,28868394,75416738,49027020,28201945,14558127,14558127,14558127,59438930,23434538,23434538,97268402,97268402,84211599,19739265,25789292,25789292,25789292,27243130,27243130,27243130,31834488,12801833,10045474,10045474,10045474,29616929,31548215,69599136,74577599,74577599,74577599,97045737,97045737,90448279,93039339,1688285,116511113,116511113,6511113,6511113,48183890,48183890,952523,29301450,43129357,73639099,73639099,73639099}
table14={22499463,22499463,97565997,48806195,62383431,74426895,9284723,9400127,84900597,36278828,20295753,52543404,62405028,62405028,62405028,36010310,36010310,36010310,73899015,14558127,14558127,14558127,23434538,23434538,97268402,97268402,17189677,24050692,24050692,24050692,24224830,24224830,65681983,78789356,10045474,10045474,10045474,39163598,93217231,93217231,1683982,85888377,4058,68319538,70913714,70913714,11398059,11398059,98127546,6908161,1487805,75352507,74974229,29301450,1528054,9763474,8602351}
table15={45710945,80186010,80186010,80186010,8633261,8633261,17045014,15171722,15171722,35844557,35844557,72238166,54266211,34022970,34022970,34022970,14558127,14558127,14558127,89776023,89776023,23434538,23434538,88095331,13046291,5338223,5338223,7477101,7477101,7477101,73628505,85106525,88760522,60394026,10080420,10080420,10080420,10045474,10045474,10045474,74100225,74100225,74100225,90448279,9940036,67630394,35103106,34909328,2061963,7511613,45852939,74294676,42752141,42752141,63746411,85747929,581014,66011101}
table16={29888389,29888389,29888389,14558127,14558127,14558127,9396662,67111213,67111213,47106439,47106439,47106439,38356857,38356857,38356857,23434538,23434538,97268402,88926295,88926295,88926295,72386290,72386290,72386290,84211599,9236985,36982581,46159582,114644893,114644893,114644893,24224830,24224830,65681983,43582229,72932673,10045474,10045474,10045474,40366667,40366667,9464441,63731062,42566602,46956301,90448279,56910167,36776089,45112597,69385019,73898890,79130389,29301450,82184400,72329844,60303245}
table17={89631146,89631146,27204311,27204311,33854624,63198739,63198739,63198739,14558127,14558127,14558127,23434538,23434538,118824150,118824150,118824150,8240199,8240199,17947697,17947697,17947697,97268402,97268402,97268402,17725109,80326401,80326401,24224830,24224830,29095457,65681983,56506740,56506740,56506740,24382602,10045474,10045474,10045474,43219114,97045737,97045737,62089826,56532353,11443677,21123811,89604813,63436931,84815190,10515412,52687916,59822133,59822133,59822133,93039339,24361622,42097666,42097666}
table18={89631146,27204311,27204311,45467446,91810826,91810826,91810826,42141493,42141493,42141493,84192580,84192580,84192580,39931513,39931513,39931513,65326118,14558127,14558127,14558127,59438930,23657016,23657016,23434538,23434538,23434538,97268402,97268402,66730191,66730191,66730191,30336082,30336082,30336082,10045474,10045474,10045474,40366667,40366667,40366667,40139997,18969888,18969888,39402797,82570174,82570174,40509732,80696379,87837090,73580471,118817732,20665527,2772337,48815792,24361622}
table19={55063751,10963799,84192580,84192580,14558127,14558127,14558127,13533678,75922381,76145933,2311090,9126351,9126351,9126351,9396662,88686573,23434538,23434538,68353324,68353324,68353324,112538374,112538374,112538374,1357146,46239604,75500286,81439173,84211599,15443125,24224830,24224830,65681983,43582229,10045474,10045474,10045474,40366667,40366667,40366667,68250822,9464441,42566602,90448279,72167543,90809975,36776089,54498517,45112597,4280258,69385019,79130389,29301450,72329844,65741786,60303245}
table20={60764609,60764609,60764609,31629407,31629407,31629407,28803166,42141493,42141493,117179181,117179181,117179181,68246154,32841045,32841045,32841045,14558127,14558127,14558127,23434538,23434538,97651499,97268402,98567237,98567237,98567237,24224830,24224830,35552985,35552985,65681983,93356623,10045474,10045474,10045474,20745268,26434972,97045737,99989863,29628180,11464648,82135803,58071334,46640168,45445571,93039339,79559912,4731783,32991300,29301450,49867899,65741786,71791814,71791814,2463794}
function c98942059.initial_effect(c)
local e1=Effect.CreateEffect(c)
e1:SetType(EFFECT_TYPE_FIELD+EFFECT_TYPE_CONTINUOUS)
......@@ -242,6 +33,22 @@ function c98942059.selectdeck(random)
elseif random==2 then return table2
elseif random==3 then return table3
elseif random==4 then return table4
elseif random==5 then return table5
elseif random==6 then return table6
elseif random==7 then return table7
elseif random==8 then return table8
elseif random==9 then return table9
elseif random==10 then return table10
elseif random==11 then return table11
elseif random==12 then return table12
elseif random==13 then return table13
elseif random==14 then return table14
elseif random==15 then return table15
elseif random==16 then return table16
elseif random==17 then return table17
elseif random==18 then return table18
elseif random==19 then return table19
elseif random==20 then return table20
else return end
end
function c98942059.op(e,tp,eg,ep,ev,re,r,rp)
......@@ -259,12 +66,83 @@ function c98942059.op(e,tp,eg,ep,ev,re,r,rp)
ec=g:GetNext()
end
local x=0
local rr=math.random(1,4)
local rr=math.random(1,20)
local tableuse=c98942059.selectdeck(rr)
for _,id in pairs(tableuse) do
local token=Duel.CreateToken(tp,id)
Duel.SendtoDeck(token,nil,0,0)
end
local dg=Duel.GetMatchingGroup(c98942059.chaosfilter,tp,LOCATION_DECK,0,nil)
if dg:GetCount()>0 then
local sc=dg:GetFirst()
Duel.MoveToField(sc,tp,tp,LOCATION_FZONE,POS_FACEUP,true)
--cannot set/activate
local e1=Effect.CreateEffect(sc)
e1:SetType(EFFECT_TYPE_FIELD)
e1:SetCode(EFFECT_CANNOT_SSET)
e1:SetProperty(EFFECT_FLAG_PLAYER_TARGET)
e1:SetRange(LOCATION_FZONE)
e1:SetTargetRange(1,0)
e1:SetTarget(c98942059.setlimit)
e1:SetReset(RESET_EVENT+0x1fe0000)
sc:RegisterEffect(e1)
local e2=Effect.CreateEffect(sc)
e2:SetType(EFFECT_TYPE_FIELD)
e2:SetCode(EFFECT_CANNOT_ACTIVATE)
e2:SetRange(LOCATION_FZONE)
e2:SetProperty(EFFECT_FLAG_PLAYER_TARGET)
e2:SetTargetRange(1,0)
e2:SetValue(c98942059.actlimit)
e2:SetReset(RESET_EVENT+0x1fe0000)
sc:RegisterEffect(e2)
local e3=Effect.CreateEffect(sc)
e3:SetType(EFFECT_TYPE_FIELD)
e3:SetCode(EFFECT_CANNOT_ACTIVATE)
e:SetProperty(EFFECT_FLAG_PLAYER_TARGET)
e3:SetRange(LOCATION_FZONE)
e3:SetTargetRange(1,1)
e3:SetValue(c98942059.nofilter)
e3:SetReset(RESET_EVENT+0x1fe0000)
sc:RegisterEffect(e3)
--indes
local e4=Effect.CreateEffect(sc)
e4:SetType(EFFECT_TYPE_SINGLE)
e4:SetProperty(EFFECT_FLAG_SINGLE_RANGE)
e4:SetRange(LOCATION_FZONE)
e4:SetCode(EFFECT_INDESTRUCTABLE)
e4:SetValue(1)
e4:SetReset(RESET_EVENT+0x1fe0000)
sc:RegisterEffect(e4)
local e5=e4:Clone()
e5:SetCode(EFFECT_CANNOT_REMOVE)
sc:RegisterEffect(e5)
local e6=e4:Clone()
e6:SetCode(EFFECT_CANNOT_TO_DECK)
sc:RegisterEffect(e6)
local e7=e4:Clone()
e7:SetCode(EFFECT_CANNOT_TO_HAND)
sc:RegisterEffect(e7)
local e8=e4:Clone()
e8:SetCode(EFFECT_UNRELEASABLE_SUM)
sc:RegisterEffect(e8)
local e9=e4:Clone()
e9:SetCode(EFFECT_UNRELEASABLE_NONSUM)
sc:RegisterEffect(e9)
local e10=e4:Clone()
e10:SetCode(EFFECT_CANNOT_TO_GRAVE)
sc:RegisterEffect(e10)
--chage name
local e0=Effect.CreateEffect(sc)
e0:SetProperty(EFFECT_FLAG_UNCOPYABLE+EFFECT_FLAG_IGNORE_IMMUNE+EFFECT_FLAG_CANNOT_DISABLE+EFFECT_FLAG_REPEAT+EFFECT_FLAG_DELAY+EFFECT_FLAG_SET_AVAILABLE)
e0:SetType(EFFECT_TYPE_FIELD)
e0:SetCode(EFFECT_CHANGE_CODE)
e0:SetRange(LOCATION_FZONE)
e0:SetTargetRange(0xff,0xff)
e0:SetValue(121082833)
c:RegisterEffect(e0)
Duel.RegisterFlagEffect(tp,10469,0,0,0)
Duel.RegisterFlagEffect(1-tp,10469,0,0,0)
end
Duel.BreakEffect()
Duel.ShuffleDeck(tp)
local ht1=Duel.GetFieldGroupCount(tp,LOCATION_HAND,0)
......@@ -273,3 +151,18 @@ function c98942059.op(e,tp,eg,ep,ev,re,r,rp)
end
Duel.BreakEffect()
end
function c98942059.chaosfilter(c)
return c:IsCode(98942059)
end
function c98942059.efilter(e,te)
return te:GetOwner()~=e:GetOwner()
end
function c98942059.setlimit(e,c,tp)
return c:IsType(TYPE_FIELD)
end
function c98942059.actlimit(e,re,tp)
return re:IsActiveType(TYPE_FIELD) and re:IsHasType(EFFECT_TYPE_ACTIVATE)
end
function c98942059.nofilter(e,re,tp)
return re:GetHandler():IsCode(73468603)
end
\ No newline at end of file
......@@ -23,21 +23,29 @@ function c9910056.initial_effect(c)
e1:SetValue(LOCATION_REMOVED)
c:RegisterEffect(e1)
end
function c9910056.filter(c)
return (c:IsLocation(LOCATION_GRAVE) or c:IsFaceup()) and c:IsRace(RACE_FAIRY) and c:IsAbleToDeck()
function c9910056.tdfilter(c)
return c:IsFaceupEx() and c:IsRace(RACE_FAIRY) and c:IsAbleToDeck()
end
function c9910056.drtg(e,tp,eg,ep,ev,re,r,rp,chk)
if chk==0 then return Duel.IsExistingMatchingCard(c9910056.filter,tp,LOCATION_GRAVE+LOCATION_REMOVED,0,2,nil)
if chk==0 then return Duel.IsExistingMatchingCard(c9910056.tdfilter,tp,LOCATION_GRAVE+LOCATION_REMOVED,0,2,nil)
and Duel.IsPlayerCanDraw(tp,1) end
Duel.SetOperationInfo(0,CATEGORY_TODECK,nil,2,tp,LOCATION_GRAVE+LOCATION_REMOVED)
Duel.SetOperationInfo(0,CATEGORY_DRAW,nil,0,tp,1)
end
function c9910056.drop(e,tp,eg,ep,ev,re,r,rp)
local rg=Duel.GetMatchingGroup(aux.NecroValleyFilter(c9910056.tdfilter),tp,LOCATION_GRAVE+LOCATION_REMOVED,0,nil)
if rg:GetCount()<2 then return end
Duel.Hint(HINT_SELECTMSG,tp,HINTMSG_TODECK)
local g=Duel.SelectMatchingCard(tp,aux.NecroValleyFilter(c9910056.filter),tp,LOCATION_GRAVE+LOCATION_REMOVED,0,2,2,nil)
if g:GetCount()==2 and Duel.SendtoDeck(g,nil,2,REASON_EFFECT)==2 then
local sg=rg:Select(tp,2,2,nil)
if sg:GetCount()>0 then
Duel.HintSelection(sg)
if Duel.SendtoDeck(sg,nil,SEQ_DECKSHUFFLE,REASON_EFFECT) then
local og=Duel.GetOperatedGroup()
if og:IsExists(Card.IsLocation,1,nil,LOCATION_DECK) then Duel.ShuffleDeck(tp) end
if og:IsExists(Card.IsLocation,1,nil,LOCATION_DECK+LOCATION_EXTRA) then
Duel.BreakEffect()
Duel.ShuffleDeck(tp)
Duel.Draw(tp,1,REASON_EFFECT)
end
end
end
end
......@@ -55,6 +55,7 @@ function c9910066.activate(e,tp,eg,ep,ev,re,r,rp)
local g=Duel.GetDecktopGroup(tp,ct)
Duel.DisableShuffleCheck()
if Duel.Remove(g,POS_FACEUP,REASON_EFFECT)==0 then return end
Duel.DisableShuffleCheck(false)
local og=Duel.GetOperatedGroup():Filter(Card.IsLocation,nil,LOCATION_REMOVED)
if og:GetCount()==0 then return end
Duel.HintSelection(og)
......
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