Commit c9618fc1 authored by POLYMER's avatar POLYMER

update 250915

parent 340466f2
......@@ -3351,7 +3351,6 @@
40010894 0
42620027 0
42620045 0
98920173 2
98920491 0
99990220 1
10173058 2
......@@ -7194,7 +7193,6 @@
11451972 1
11451997 1
11513042 1
33202007 1
71200816 1
7457077 1
95101148 1
......@@ -7252,7 +7250,6 @@
23558733 0 --Phoenixian Cluster Amaryllis
1357146 0 --Ronintoadin
75732622 0 --Grinder Golem
67441435 0 --Glow-up Bulb
91258852 0 --SPYRAL Master Plan
20292186 0 --Artifact Scythe
73356503 0 --Barrier Statue of the Stormwinds
......@@ -7281,14 +7278,12 @@
50588353 0 --Crystron Halqifibrax
39064822 0 --Knightmare Goblin
22593417 0 --Topologic Gumblar Dragon
61665245 0 --Summon Sorceress
3679218 0 --Knightmare Mermaid
85243784 0 --Linkross
59537380 0 --Guardragon Agarpain
24094258 0 --Heavymetalfoes Electrumite
83152482 0 --Union Carrier
86148577 0 --Guardragon Elpy
48905153 0 --Zoodiac Drident
72330894 0 --Simorgh, Bird of Sovereignty
44097050 0 --Mecha Phantom Beast Auroradon
25725326 0 --Prank-Kids Meow-Meow-Mu
......@@ -7299,10 +7294,8 @@
95474755 0 --Number 89: Diablosis the Mind Hacker
48626373 0 --Kashtira Arise-Heart
59934749 0 --Isolde, Two Tales of the Noble Knights
41999284 0 --Linkuriboh
84815190 0 --Baronne de Fleur
27548199 0 --Borreload Savage Dragon
46640168 0 --Fiendsmith's Lacrima
04280258 0 --Apollousa, Bow of the Goddess
62242678 0 --Hot Red Dragon Archfiend King Calamity
27552504 0 --Beatrice, Lady of the Eternal
......@@ -7310,6 +7303,10 @@
30342076 0
21044178 0
440556 0
71818935 0
59859086 0
11398059 0
35772782 0
##SPELLS CARDS
69243953 0 --Butterfly Dagger - Elma
57953380 0 --Card of Safe Return
......@@ -7357,7 +7354,6 @@
33396948 1 --Exodia the Forbidden One
78872731 1 --Zoodiac Ratpier
14536035 1 --Dark Grepher
12958919 1 --Phantom Skyblaster
38572779 1 --Miscellaneousaurus
76794549 1 --Astrograph Sorcerer
20663556 1 --Substitoad
......@@ -7368,11 +7364,13 @@
572850 1 --Tearlaments Scheiren
38814750 1 --PSY-Framegear Gamma
33854624 1 --Bystial Magnamhut
21377582 1 --Master Peace, The True Dracoslaying King
36521307 1 --Mathmech Circular
91810826 1
6637331 1
91800273 1
34022970 1
32061192 1
29302858 1
##EXTRA DECK MONSTERS
39512984 1 --Gem-Knight Master Diamond
90953320 1 --T.G. Hyper Librarian
......@@ -7384,8 +7382,13 @@
6728559 1 --Archnemeses Protos
75433814 1 --Number 40: Gimmick Puppet of Strings
69170557 1 --Number C40: Gimmick Puppet of Dark Strings
46640168 1 --Fiendsmith's Lacrima
41999284 1 --Linkuriboh
61665245 1 --Summon Sorceress
48905153 1 --Zoodiac Drident
80453041 1
34909328 1
79606837 1
##SPELLS CARDS
95308449 1 --Final Countdown
81439173 1 --Foolish Burial
......@@ -7407,7 +7410,6 @@
24940422 1 --Sekka's Light
15854426 1 --Divine Wind of the Mist Valley
71650854 1 --Magical Mid-Breaker Field
13035077 1 --Dragonic Diagram
91623717 1 --Chain Strike
72892473 1 --Card Destruction
24224830 1 --Called by the Grave
......@@ -7418,16 +7420,17 @@
99266988 1 --Chaos Space
45986603 1 --Snatch Steal
67616300 1 --Chicken Game
44362883 1 --Branded Fusion
30336082 1 --Sangen Summoning
84211599 1 --Pot of Prosperity
11110587 1 --That Grass Looks Greener
46060017 1 --Zoodiac Barrage
7394770 1 --Brilliant Fusion
66730191 1
85106525 1
65681983 1
25311006 1
31552317 1
72537897 1
54562327 1
##TRAPS CARDS
32723153 1 --Magical Explosion
3734202 1 --Naturia Sacred Tree
......@@ -7436,21 +7439,17 @@
24207889 1 --There Can Be Only One
58921041 1 --Anti-Spell Fragrance
82732705 1 --Skill Drain
41420027 1
#Semi-Limited TCG
14532163 2 --Lightning Storm
55584558 2 --Purrely Delicious Memory
21347668 2 --Purrely Sleepy Memory
92107604 2 --Runick Fountain
33508719 2 --Morphing Jar
09674034 2 --Snake-Eye Ash
90241276 2 --Snake-Eyes Poplar
99234526 2 --White Dragon Wyverburster
61901281 2 --Black Dragon Collapserpent
41165831 2 --Unchained Soul of Sharvara
34022970 2
44362883 2 --Branded Fusion
8633261 2
35844557 2
32061192 2
69272449 2
68337209 2
......@@ -7646,7 +7645,6 @@
23558733 1 --Phoenixian Cluster Amaryllis
1357146 1 --Ronintoadin
75732622 1 --Grinder Golem
67441435 1 --Glow-up Bulb
91258852 1 --SPYRAL Master Plan
20292186 1 --Artifact Scythe
73356503 1 --Barrier Statue of the Stormwinds
......@@ -7655,6 +7653,10 @@
25926710 1 --Kelbek the Ancient Vanguard
41855169 1
55204071 1
71818935 1
59859086 1
11398059 1
35772782 1
##EXTRA DECK MONSTERS
17412721 1 --Elder Entity Norden
43387895 1 --Supreme King Dragon Starving Venom
......@@ -7675,14 +7677,12 @@
50588353 1 --Crystron Halqifibrax
39064822 1 --Knightmare Goblin
22593417 1 --Topologic Gumblar Dragon
61665245 1 --Summon Sorceress
3679218 1 --Knightmare Mermaid
85243784 1 --Linkross
59537380 1 --Guardragon Agarpain
24094258 1 --Heavymetalfoes Electrumite
83152482 1 --Union Carrier
86148577 1 --Guardragon Elpy
48905153 1 --Zoodiac Drident
72330894 1 --Simorgh, Bird of Sovereignty
44097050 1 --Mecha Phantom Beast Auroradon
25725326 1 --Prank-Kids Meow-Meow-Mu
......@@ -7693,10 +7693,8 @@
95474755 1 --Number 89: Diablosis the Mind Hacker
48626373 1 --Kashtira Arise-Heart
59934749 1 --Isolde, Two Tales of the Noble Knights
41999284 1 --Linkuriboh
84815190 1 --Baronne de Fleur
27548199 1 --Borreload Savage Dragon
46640168 1 --Fiendsmith's Lacrima
04280258 1 --Apollousa, Bow of the Goddess
62242678 1 --Hot Red Dragon Archfiend King Calamity
27552504 1 --Beatrice, Lady of the Eternal
......
No preview for this file type
expansions/pics/33202007.jpg

28.7 KB | W: | H:

expansions/pics/33202007.jpg

80.2 KB | W: | H:

expansions/pics/33202007.jpg
expansions/pics/33202007.jpg
expansions/pics/33202007.jpg
expansions/pics/33202007.jpg
  • 2-up
  • Swipe
  • Onion skin
expansions/pics/66680110.jpg

49.4 KB | W: | H:

expansions/pics/66680110.jpg

49.6 KB | W: | H:

expansions/pics/66680110.jpg
expansions/pics/66680110.jpg
expansions/pics/66680110.jpg
expansions/pics/66680110.jpg
  • 2-up
  • Swipe
  • Onion skin
expansions/pics/66680115.jpg

48.3 KB | W: | H:

expansions/pics/66680115.jpg

48.4 KB | W: | H:

expansions/pics/66680115.jpg
expansions/pics/66680115.jpg
expansions/pics/66680115.jpg
expansions/pics/66680115.jpg
  • 2-up
  • Swipe
  • Onion skin
expansions/pics/66680120.jpg

51.4 KB | W: | H:

expansions/pics/66680120.jpg

49.4 KB | W: | H:

expansions/pics/66680120.jpg
expansions/pics/66680120.jpg
expansions/pics/66680120.jpg
expansions/pics/66680120.jpg
  • 2-up
  • Swipe
  • Onion skin
expansions/pics/66680125.jpg

50.3 KB | W: | H:

expansions/pics/66680125.jpg

50.6 KB | W: | H:

expansions/pics/66680125.jpg
expansions/pics/66680125.jpg
expansions/pics/66680125.jpg
expansions/pics/66680125.jpg
  • 2-up
  • Swipe
  • Onion skin
expansions/pics/66680130.jpg

50.1 KB | W: | H:

expansions/pics/66680130.jpg

51 KB | W: | H:

expansions/pics/66680130.jpg
expansions/pics/66680130.jpg
expansions/pics/66680130.jpg
expansions/pics/66680130.jpg
  • 2-up
  • Swipe
  • Onion skin
expansions/pics/66680135.jpg

52 KB | W: | H:

expansions/pics/66680135.jpg

51.1 KB | W: | H:

expansions/pics/66680135.jpg
expansions/pics/66680135.jpg
expansions/pics/66680135.jpg
expansions/pics/66680135.jpg
  • 2-up
  • Swipe
  • Onion skin
expansions/pics/66680210.jpg

53.5 KB | W: | H:

expansions/pics/66680210.jpg

53.7 KB | W: | H:

expansions/pics/66680210.jpg
expansions/pics/66680210.jpg
expansions/pics/66680210.jpg
expansions/pics/66680210.jpg
  • 2-up
  • Swipe
  • Onion skin
expansions/pics/66680215.jpg

49.7 KB | W: | H:

expansions/pics/66680215.jpg

49.9 KB | W: | H:

expansions/pics/66680215.jpg
expansions/pics/66680215.jpg
expansions/pics/66680215.jpg
expansions/pics/66680215.jpg
  • 2-up
  • Swipe
  • Onion skin
expansions/pics/66680220.jpg

57.2 KB | W: | H:

expansions/pics/66680220.jpg

57.3 KB | W: | H:

expansions/pics/66680220.jpg
expansions/pics/66680220.jpg
expansions/pics/66680220.jpg
expansions/pics/66680220.jpg
  • 2-up
  • Swipe
  • Onion skin
expansions/pics/66680310.jpg

51.9 KB | W: | H:

expansions/pics/66680310.jpg

52.1 KB | W: | H:

expansions/pics/66680310.jpg
expansions/pics/66680310.jpg
expansions/pics/66680310.jpg
expansions/pics/66680310.jpg
  • 2-up
  • Swipe
  • Onion skin
expansions/pics/66680315.jpg

55.9 KB | W: | H:

expansions/pics/66680315.jpg

55.4 KB | W: | H:

expansions/pics/66680315.jpg
expansions/pics/66680315.jpg
expansions/pics/66680315.jpg
expansions/pics/66680315.jpg
  • 2-up
  • Swipe
  • Onion skin
expansions/pics/66680320.jpg

49.4 KB | W: | H:

expansions/pics/66680320.jpg

50 KB | W: | H:

expansions/pics/66680320.jpg
expansions/pics/66680320.jpg
expansions/pics/66680320.jpg
expansions/pics/66680320.jpg
  • 2-up
  • Swipe
  • Onion skin
expansions/pics/66680325.jpg

50.4 KB | W: | H:

expansions/pics/66680325.jpg

50.6 KB | W: | H:

expansions/pics/66680325.jpg
expansions/pics/66680325.jpg
expansions/pics/66680325.jpg
expansions/pics/66680325.jpg
  • 2-up
  • Swipe
  • Onion skin
expansions/pics/66680330.jpg

48 KB | W: | H:

expansions/pics/66680330.jpg

46.2 KB | W: | H:

expansions/pics/66680330.jpg
expansions/pics/66680330.jpg
expansions/pics/66680330.jpg
expansions/pics/66680330.jpg
  • 2-up
  • Swipe
  • Onion skin
expansions/pics/66680335.jpg

50.4 KB | W: | H:

expansions/pics/66680335.jpg

50.6 KB | W: | H:

expansions/pics/66680335.jpg
expansions/pics/66680335.jpg
expansions/pics/66680335.jpg
expansions/pics/66680335.jpg
  • 2-up
  • Swipe
  • Onion skin
expansions/pics/66690235.jpg

67.6 KB | W: | H:

expansions/pics/66690235.jpg

67.1 KB | W: | H:

expansions/pics/66690235.jpg
expansions/pics/66690235.jpg
expansions/pics/66690235.jpg
expansions/pics/66690235.jpg
  • 2-up
  • Swipe
  • Onion skin
expansions/pics/75646150.jpg

49.7 KB | W: | H:

expansions/pics/75646150.jpg

66.5 KB | W: | H:

expansions/pics/75646150.jpg
expansions/pics/75646150.jpg
expansions/pics/75646150.jpg
expansions/pics/75646150.jpg
  • 2-up
  • Swipe
  • Onion skin
expansions/pics/75646151.jpg

41.4 KB | W: | H:

expansions/pics/75646151.jpg

51.1 KB | W: | H:

expansions/pics/75646151.jpg
expansions/pics/75646151.jpg
expansions/pics/75646151.jpg
expansions/pics/75646151.jpg
  • 2-up
  • Swipe
  • Onion skin
expansions/pics/75646152.jpg

45.9 KB | W: | H:

expansions/pics/75646152.jpg

62.2 KB | W: | H:

expansions/pics/75646152.jpg
expansions/pics/75646152.jpg
expansions/pics/75646152.jpg
expansions/pics/75646152.jpg
  • 2-up
  • Swipe
  • Onion skin
expansions/pics/75646153.jpg

44.6 KB | W: | H:

expansions/pics/75646153.jpg

62.4 KB | W: | H:

expansions/pics/75646153.jpg
expansions/pics/75646153.jpg
expansions/pics/75646153.jpg
expansions/pics/75646153.jpg
  • 2-up
  • Swipe
  • Onion skin
expansions/pics/75646154.jpg

38.2 KB | W: | H:

expansions/pics/75646154.jpg

54.7 KB | W: | H:

expansions/pics/75646154.jpg
expansions/pics/75646154.jpg
expansions/pics/75646154.jpg
expansions/pics/75646154.jpg
  • 2-up
  • Swipe
  • Onion skin
expansions/pics/75646155.jpg

46.5 KB | W: | H:

expansions/pics/75646155.jpg

62.7 KB | W: | H:

expansions/pics/75646155.jpg
expansions/pics/75646155.jpg
expansions/pics/75646155.jpg
expansions/pics/75646155.jpg
  • 2-up
  • Swipe
  • Onion skin
expansions/pics/75646156.jpg

48.8 KB | W: | H:

expansions/pics/75646156.jpg

65 KB | W: | H:

expansions/pics/75646156.jpg
expansions/pics/75646156.jpg
expansions/pics/75646156.jpg
expansions/pics/75646156.jpg
  • 2-up
  • Swipe
  • Onion skin
expansions/pics/75646157.jpg

46.6 KB | W: | H:

expansions/pics/75646157.jpg

62.4 KB | W: | H:

expansions/pics/75646157.jpg
expansions/pics/75646157.jpg
expansions/pics/75646157.jpg
expansions/pics/75646157.jpg
  • 2-up
  • Swipe
  • Onion skin
expansions/pics/75646159.jpg

46.9 KB | W: | H:

expansions/pics/75646159.jpg

62.4 KB | W: | H:

expansions/pics/75646159.jpg
expansions/pics/75646159.jpg
expansions/pics/75646159.jpg
expansions/pics/75646159.jpg
  • 2-up
  • Swipe
  • Onion skin
expansions/pics/75646161.jpg

47.9 KB | W: | H:

expansions/pics/75646161.jpg

62.7 KB | W: | H:

expansions/pics/75646161.jpg
expansions/pics/75646161.jpg
expansions/pics/75646161.jpg
expansions/pics/75646161.jpg
  • 2-up
  • Swipe
  • Onion skin
expansions/pics/75646163.jpg

51.2 KB | W: | H:

expansions/pics/75646163.jpg

66.1 KB | W: | H:

expansions/pics/75646163.jpg
expansions/pics/75646163.jpg
expansions/pics/75646163.jpg
expansions/pics/75646163.jpg
  • 2-up
  • Swipe
  • Onion skin
expansions/pics/75646165.jpg

51 KB | W: | H:

expansions/pics/75646165.jpg

63.9 KB | W: | H:

expansions/pics/75646165.jpg
expansions/pics/75646165.jpg
expansions/pics/75646165.jpg
expansions/pics/75646165.jpg
  • 2-up
  • Swipe
  • Onion skin
expansions/pics/75646167.jpg

49.2 KB | W: | H:

expansions/pics/75646167.jpg

63.3 KB | W: | H:

expansions/pics/75646167.jpg
expansions/pics/75646167.jpg
expansions/pics/75646167.jpg
expansions/pics/75646167.jpg
  • 2-up
  • Swipe
  • Onion skin
expansions/pics/75646168.jpg

49.3 KB | W: | H:

expansions/pics/75646168.jpg

60.4 KB | W: | H:

expansions/pics/75646168.jpg
expansions/pics/75646168.jpg
expansions/pics/75646168.jpg
expansions/pics/75646168.jpg
  • 2-up
  • Swipe
  • Onion skin
expansions/pics/75646169.jpg

49.3 KB | W: | H:

expansions/pics/75646169.jpg

64.6 KB | W: | H:

expansions/pics/75646169.jpg
expansions/pics/75646169.jpg
expansions/pics/75646169.jpg
expansions/pics/75646169.jpg
  • 2-up
  • Swipe
  • Onion skin
expansions/pics/75646170.jpg

47.3 KB | W: | H:

expansions/pics/75646170.jpg

62.3 KB | W: | H:

expansions/pics/75646170.jpg
expansions/pics/75646170.jpg
expansions/pics/75646170.jpg
expansions/pics/75646170.jpg
  • 2-up
  • Swipe
  • Onion skin
expansions/pics/75646171.jpg

41.8 KB | W: | H:

expansions/pics/75646171.jpg

61.9 KB | W: | H:

expansions/pics/75646171.jpg
expansions/pics/75646171.jpg
expansions/pics/75646171.jpg
expansions/pics/75646171.jpg
  • 2-up
  • Swipe
  • Onion skin
expansions/pics/75646172.jpg

40.5 KB | W: | H:

expansions/pics/75646172.jpg

59.6 KB | W: | H:

expansions/pics/75646172.jpg
expansions/pics/75646172.jpg
expansions/pics/75646172.jpg
expansions/pics/75646172.jpg
  • 2-up
  • Swipe
  • Onion skin
expansions/pics/75646200.jpg

45.7 KB | W: | H:

expansions/pics/75646200.jpg

58.4 KB | W: | H:

expansions/pics/75646200.jpg
expansions/pics/75646200.jpg
expansions/pics/75646200.jpg
expansions/pics/75646200.jpg
  • 2-up
  • Swipe
  • Onion skin
expansions/pics/75646201.jpg

42.8 KB | W: | H:

expansions/pics/75646201.jpg

57 KB | W: | H:

expansions/pics/75646201.jpg
expansions/pics/75646201.jpg
expansions/pics/75646201.jpg
expansions/pics/75646201.jpg
  • 2-up
  • Swipe
  • Onion skin
expansions/pics/75646202.jpg

46.8 KB | W: | H:

expansions/pics/75646202.jpg

59.5 KB | W: | H:

expansions/pics/75646202.jpg
expansions/pics/75646202.jpg
expansions/pics/75646202.jpg
expansions/pics/75646202.jpg
  • 2-up
  • Swipe
  • Onion skin
expansions/pics/75646203.jpg

48.5 KB | W: | H:

expansions/pics/75646203.jpg

59 KB | W: | H:

expansions/pics/75646203.jpg
expansions/pics/75646203.jpg
expansions/pics/75646203.jpg
expansions/pics/75646203.jpg
  • 2-up
  • Swipe
  • Onion skin
expansions/pics/75646204.jpg

45 KB | W: | H:

expansions/pics/75646204.jpg

50 KB | W: | H:

expansions/pics/75646204.jpg
expansions/pics/75646204.jpg
expansions/pics/75646204.jpg
expansions/pics/75646204.jpg
  • 2-up
  • Swipe
  • Onion skin
expansions/pics/75646522.jpg

44.3 KB | W: | H:

expansions/pics/75646522.jpg

50.6 KB | W: | H:

expansions/pics/75646522.jpg
expansions/pics/75646522.jpg
expansions/pics/75646522.jpg
expansions/pics/75646522.jpg
  • 2-up
  • Swipe
  • Onion skin
expansions/pics/75646601.jpg

49.3 KB | W: | H:

expansions/pics/75646601.jpg

61.3 KB | W: | H:

expansions/pics/75646601.jpg
expansions/pics/75646601.jpg
expansions/pics/75646601.jpg
expansions/pics/75646601.jpg
  • 2-up
  • Swipe
  • Onion skin
expansions/pics/9910731.jpg

49.5 KB | W: | H:

expansions/pics/9910731.jpg

49.9 KB | W: | H:

expansions/pics/9910731.jpg
expansions/pics/9910731.jpg
expansions/pics/9910731.jpg
expansions/pics/9910731.jpg
  • 2-up
  • Swipe
  • Onion skin
expansions/pics/9910747.jpg

44.6 KB | W: | H:

expansions/pics/9910747.jpg

45.2 KB | W: | H:

expansions/pics/9910747.jpg
expansions/pics/9910747.jpg
expansions/pics/9910747.jpg
expansions/pics/9910747.jpg
  • 2-up
  • Swipe
  • Onion skin
expansions/pics/9910750.jpg

45.6 KB | W: | H:

expansions/pics/9910750.jpg

46.7 KB | W: | H:

expansions/pics/9910750.jpg
expansions/pics/9910750.jpg
expansions/pics/9910750.jpg
expansions/pics/9910750.jpg
  • 2-up
  • Swipe
  • Onion skin
local cm,m=GetID()
function cm.initial_effect(c)
--send to grave
local e1=Effect.CreateEffect(c)
e1:SetDescription(aux.Stringid(m,0))
e1:SetCategory(CATEGORY_TOGRAVE)
e1:SetType(EFFECT_TYPE_IGNITION)
e1:SetRange(LOCATION_HAND)
e1:SetCountLimit(1,m)
e1:SetCost(cm.tgcost)
e1:SetTarget(cm.tgtg)
e1:SetOperation(cm.tgop)
c:RegisterEffect(e1)
cm.discard_effect=e1
--fusion summon
local e2=Effect.CreateEffect(c)
e2:SetDescription(aux.Stringid(m,1))
e2:SetCategory(CATEGORY_SPECIAL_SUMMON+CATEGORY_FUSION_SUMMON)
e2:SetType(EFFECT_TYPE_SINGLE+EFFECT_TYPE_TRIGGER_O)
e2:SetCode(EVENT_REMOVE)
e2:SetProperty(EFFECT_FLAG_DELAY)
e2:SetCountLimit(1,m+1)
e2:SetTarget(cm.fustg)
e2:SetOperation(cm.fusop)
c:RegisterEffect(e2)
end
function cm.tgcost(e,tp,eg,ep,ev,re,r,rp,chk)
if chk==0 then return e:GetHandler():IsDiscardable() end
Duel.SendtoGrave(e:GetHandler(),REASON_COST+REASON_DISCARD)
end
function cm.tgfilter(c)
return c:IsSetCard(0xa450) and c:IsType(TYPE_SPELL+TYPE_TRAP) and c:IsAbleToGrave()
end
function cm.tgtg(e,tp,eg,ep,ev,re,r,rp,chk)
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.tgop(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>0 then
Duel.SendtoGrave(g,REASON_EFFECT)
end
end
function cm.filter0(c)
return c:IsType(TYPE_MONSTER) and c:IsCanBeFusionMaterial() and c:IsAbleToDeck()
end
function cm.filter1(c,e)
return c:IsType(TYPE_MONSTER) and c:IsCanBeFusionMaterial() and c:IsAbleToDeck() and not c:IsImmuneToEffect(e)
end
function cm.filter2(c,e,tp,m,f,chkf)
return c:IsType(TYPE_FUSION) and c:IsAttribute(ATTRIBUTE_FIRE) and (not f or f(c))
and c:IsCanBeSpecialSummoned(e,SUMMON_TYPE_FUSION,tp,false,false) and c:CheckFusionMaterial(m,nil,chkf)
end
function cm.fustg(e,tp,eg,ep,ev,re,r,rp,chk)
if chk==0 then
local chkf=tp
local mg1=Duel.GetMatchingGroup(cm.filter0,tp,LOCATION_MZONE,0,nil)
local mg2=Duel.GetMatchingGroup(cm.filter0,tp,LOCATION_REMOVED,0,nil)
mg1:Merge(mg2)
local res=Duel.IsExistingMatchingCard(cm.filter2,tp,LOCATION_EXTRA,0,1,nil,e,tp,mg1,nil,chkf)
if not res then
local ce=Duel.GetChainMaterial(tp)
if ce~=nil then
local fgroup=ce:GetTarget()
local mg3=fgroup(ce,e,tp)
local mf=ce:GetValue()
res=Duel.IsExistingMatchingCard(cm.filter2,tp,LOCATION_EXTRA,0,1,nil,e,tp,mg3,mf,chkf)
end
end
return res
end
Duel.SetOperationInfo(0,CATEGORY_SPECIAL_SUMMON,nil,1,tp,LOCATION_EXTRA)
Duel.SetOperationInfo(0,CATEGORY_TODECK,nil,1,tp,LOCATION_REMOVED+LOCATION_ONFIELD)
end
function cm.fusop(e,tp,eg,ep,ev,re,r,rp)
local chkf=tp
local mg1=Duel.GetMatchingGroup(cm.filter0,tp,LOCATION_MZONE,0,nil)
local mg2=Duel.GetMatchingGroup(cm.filter1,tp,LOCATION_REMOVED,0,nil,e)
mg1:Merge(mg2)
local sg1=Duel.GetMatchingGroup(cm.filter2,tp,LOCATION_EXTRA,0,nil,e,tp,mg1,nil,chkf)
local mg3=nil
local sg2=nil
local ce=Duel.GetChainMaterial(tp)
if ce~=nil then
local fgroup=ce:GetTarget()
mg3=fgroup(ce,e,tp)
local mf=ce:GetValue()
sg2=Duel.GetMatchingGroup(cm.filter2,tp,LOCATION_EXTRA,0,nil,e,tp,mg3,mf,chkf)
end
if #sg1>0 or (sg2~=nil and #sg2>0) then
local sg=sg1:Clone()
if sg2 then sg:Merge(sg2) end
Duel.Hint(HINT_SELECTMSG,tp,HINTMSG_SPSUMMON)
local tg=sg:Select(tp,1,1,nil)
local tc=tg:GetFirst()
if sg1:IsContains(tc) and (sg2==nil or not sg2:IsContains(tc) or not Duel.SelectYesNo(tp,ce:GetDescription())) then
local mat1=Duel.SelectFusionMaterial(tp,tc,mg1,nil,chkf)
tc:SetMaterial(mat1)
Duel.SendtoDeck(mat1,nil,SEQ_DECKBOTTOM,REASON_EFFECT+REASON_MATERIAL+REASON_FUSION)
Duel.BreakEffect()
Duel.SpecialSummon(tc,SUMMON_TYPE_FUSION,tp,tp,false,false,POS_FACEUP)
else
local mat2=Duel.SelectFusionMaterial(tp,tc,mg3,nil,chkf)
local fop=ce:GetOperation()
fop(ce,e,tp,tc,mat2)
end
tc:CompleteProcedure()
end
end
--蕾纳斯
local cm,m=GetID()
function cm.initial_effect(c)
--remove
local e1=Effect.CreateEffect(c)
e1:SetDescription(aux.Stringid(m,0))
e1:SetCategory(CATEGORY_REMOVE)
e1:SetType(EFFECT_TYPE_IGNITION)
e1:SetRange(LOCATION_HAND)
e1:SetCountLimit(1,m)
e1:SetCost(cm.rmcost)
e1:SetTarget(cm.rmtg)
e1:SetOperation(cm.rmop)
c:RegisterEffect(e1)
cm.discard_effect=e1
--link summon
local e2=Effect.CreateEffect(c)
e2:SetDescription(aux.Stringid(m,1))
e2:SetCategory(CATEGORY_SPECIAL_SUMMON)
e2:SetType(EFFECT_TYPE_SINGLE+EFFECT_TYPE_TRIGGER_O)
e2:SetCode(EVENT_REMOVE)
e2:SetProperty(EFFECT_FLAG_DELAY)
e2:SetCountLimit(1,m+1)
e2:SetTarget(cm.lktg)
e2:SetOperation(cm.lkop)
c:RegisterEffect(e2)
end
function cm.rmcost(e,tp,eg,ep,ev,re,r,rp,chk)
if chk==0 then return e:GetHandler():IsDiscardable() end
Duel.SendtoGrave(e:GetHandler(),REASON_COST+REASON_DISCARD)
end
function cm.rmfilter(c)
return c:IsSetCard(0xa450) and c:IsType(TYPE_MONSTER) and c:IsAbleToRemove()
end
function cm.rmtg(e,tp,eg,ep,ev,re,r,rp,chk)
if chk==0 then return Duel.IsExistingMatchingCard(cm.rmfilter,tp,LOCATION_DECK,0,1,nil) end
Duel.SetOperationInfo(0,CATEGORY_REMOVE,nil,1,tp,LOCATION_DECK)
end
function cm.rmop(e,tp,eg,ep,ev,re,r,rp)
Duel.Hint(HINT_SELECTMSG,tp,HINTMSG_REMOVE)
local g=Duel.SelectMatchingCard(tp,cm.rmfilter,tp,LOCATION_DECK,0,1,1,nil)
if #g>0 then
Duel.Remove(g,POS_FACEUP,REASON_EFFECT)
end
end
function cm.lkfilter(c,g,tc)
return c:IsType(TYPE_LINK) and c:IsAttribute(ATTRIBUTE_WATER) and c:IsLinkSummonable(g,tc)
end
function cm.fitl(c)
return c:IsAbleToDeck() and c:IsType(TYPE_MONSTER) and c:IsCanBeLinkMaterial(nil)
end
function cm.lktg(e,tp,eg,ep,ev,re,r,rp,chk)
local g=Duel.GetMatchingGroup(cm.fitl,tp,LOCATION_ONFIELD+LOCATION_REMOVED,0,nil)
if chk==0 then return Duel.IsExistingMatchingCard(cm.lkfilter,tp,LOCATION_EXTRA,0,1,nil,g,e:GetHandler()) end
Duel.SetOperationInfo(0,CATEGORY_SPECIAL_SUMMON,nil,1,tp,LOCATION_EXTRA)
end
function cm.lkop(e,tp,eg,ep,ev,re,r,rp)
local g=Duel.GetMatchingGroup(cm.fitl,tp,LOCATION_ONFIELD+LOCATION_REMOVED,0,nil)
Duel.Hint(HINT_SELECTMSG,tp,HINTMSG_SPSUMMON)
local lc=Duel.SelectMatchingCard(tp,cm.lkfilter,tp,LOCATION_EXTRA,0,1,1,nil,g,e:GetHandler()):GetFirst()
if not lc then return end
local e1=Effect.CreateEffect(e:GetHandler())
e1:SetType(EFFECT_TYPE_SINGLE+EFFECT_TYPE_CONTINUOUS)
e1:SetCode(EVENT_SPSUMMON_SUCCESS)
e1:SetOperation(cm.lvop)
lc:RegisterEffect(e1)
Duel.LinkSummon(tp,lc,g,e:GetHandler())
end
function cm.lvop(e,tp,eg,ep,ev,re,r,rp)
local sg=e:GetHandler():GetMaterial()
Duel.SendtoDeck(sg,nil,SEQ_DECKBOTTOM,REASON_EFFECT)
e:Reset()
end
--婕拉镭
local cm,m=GetID()
function cm.initial_effect(c)
--remove and search
local e1=Effect.CreateEffect(c)
e1:SetDescription(aux.Stringid(m,0))
e1:SetCategory(CATEGORY_REMOVE+CATEGORY_TOHAND+CATEGORY_SEARCH)
e1:SetType(EFFECT_TYPE_IGNITION)
e1:SetRange(LOCATION_HAND)
e1:SetCountLimit(1,m)
e1:SetCost(cm.rmcost)
e1:SetTarget(cm.rmtg)
e1:SetOperation(cm.rmop)
c:RegisterEffect(e1)
cm.discard_effect=e1
--synchro summon
local e2=Effect.CreateEffect(c)
e2:SetDescription(aux.Stringid(m,1))
e2:SetCategory(CATEGORY_SPECIAL_SUMMON)
e2:SetType(EFFECT_TYPE_SINGLE+EFFECT_TYPE_TRIGGER_O)
e2:SetCode(EVENT_REMOVE)
e2:SetProperty(EFFECT_FLAG_DELAY)
e2:SetCountLimit(1,m+1)
e2:SetTarget(cm.sctg)
e2:SetOperation(cm.scop)
c:RegisterEffect(e2)
end
function cm.rmcost(e,tp,eg,ep,ev,re,r,rp,chk)
if chk==0 then return e:GetHandler():IsDiscardable() end
Duel.SendtoGrave(e:GetHandler(),REASON_COST+REASON_DISCARD)
end
function cm.rmtg(e,tp,eg,ep,ev,re,r,rp,chk)
if chk==0 then return Duel.IsExistingMatchingCard(Card.IsAbleToRemove,tp,LOCATION_HAND+LOCATION_ONFIELD+LOCATION_GRAVE,0,1,nil) end
Duel.SetOperationInfo(0,CATEGORY_REMOVE,nil,1,tp,LOCATION_HAND+LOCATION_ONFIELD+LOCATION_GRAVE)
end
function cm.thfilter(c)
return c:IsSetCard(0xa450) and c:IsType(TYPE_MONSTER) and c:IsAbleToHand()
end
function cm.rmop(e,tp,eg,ep,ev,re,r,rp)
Duel.Hint(HINT_SELECTMSG,tp,HINTMSG_REMOVE)
local g=Duel.SelectMatchingCard(tp,Card.IsAbleToRemove,tp,LOCATION_HAND+LOCATION_ONFIELD+LOCATION_GRAVE,0,1,1,nil)
if #g>0 and Duel.Remove(g,POS_FACEUP,REASON_EFFECT)~=0 then
local tc=g:GetFirst()
if tc:IsSetCard(0xa450) and Duel.IsExistingMatchingCard(cm.thfilter,tp,LOCATION_DECK,0,1,nil)
and Duel.SelectYesNo(tp,aux.Stringid(m,2)) then
Duel.Hint(HINT_SELECTMSG,tp,HINTMSG_ATOHAND)
local sg=Duel.SelectMatchingCard(tp,cm.thfilter,tp,LOCATION_DECK,0,1,1,nil)
Duel.SendtoHand(sg,nil,REASON_EFFECT)
Duel.ConfirmCards(1-tp,sg)
end
end
end
function cm.scfilter(c)
return c:IsType(TYPE_SYNCHRO) and c:IsAttribute(ATTRIBUTE_WIND)
end
function cm.sctg(e,tp,eg,ep,ev,re,r,rp,chk)
if chk==0 then return Duel.IsExistingMatchingCard(cm.scfilter,tp,LOCATION_EXTRA,0,1,nil) end
Duel.SetOperationInfo(0,CATEGORY_SPECIAL_SUMMON,nil,1,tp,LOCATION_EXTRA)
end
function cm.scop(e,tp,eg,ep,ev,re,r,rp)
Duel.Hint(HINT_SELECTMSG,tp,HINTMSG_SPSUMMON)
local sc=Duel.SelectMatchingCard(tp,cm.scfilter,tp,LOCATION_EXTRA,0,1,1,nil):GetFirst()
if not sc then return end
local mg=Duel.GetMatchingGroup(Card.IsAbleToDeck,tp,LOCATION_ONFIELD+LOCATION_REMOVED,0,nil)
local mat=Group.CreateGroup()
Duel.Hint(HINT_SELECTMSG,tp,HINTMSG_TODECK)
local sg=mg:Select(tp,sc:GetLevel(),sc:GetLevel(),nil)
if #sg==sc:GetLevel() then
Duel.SendtoDeck(sg,nil,SEQ_DECKBOTTOM,REASON_EFFECT)
Duel.SpecialSummon(sc,SUMMON_TYPE_SYNCHRO,tp,tp,false,false,POS_FACEUP)
sc:CompleteProcedure()
end
end
--鐳徳斯
local cm,m=GetID()
function cm.initial_effect(c)
--remove and search
local e1=Effect.CreateEffect(c)
e1:SetDescription(aux.Stringid(m,0))
e1:SetCategory(CATEGORY_REMOVE+CATEGORY_TOHAND+CATEGORY_SEARCH)
e1:SetType(EFFECT_TYPE_IGNITION)
e1:SetRange(LOCATION_HAND)
e1:SetCountLimit(1,m)
e1:SetCost(cm.rmcost)
e1:SetTarget(cm.rmtg)
e1:SetOperation(cm.rmop)
c:RegisterEffect(e1)
cm.discard_effect=e1
--synchro summon
local e2=Effect.CreateEffect(c)
e2:SetDescription(aux.Stringid(m,1))
e2:SetCategory(CATEGORY_SPECIAL_SUMMON)
e2:SetType(EFFECT_TYPE_SINGLE+EFFECT_TYPE_TRIGGER_O)
e2:SetCode(EVENT_REMOVE)
e2:SetProperty(EFFECT_FLAG_DELAY)
e2:SetCountLimit(1,m+1)
e2:SetTarget(cm.sctg)
e2:SetOperation(cm.scop)
c:RegisterEffect(e2)
end
function cm.rmcost(e,tp,eg,ep,ev,re,r,rp,chk)
if chk==0 then return e:GetHandler():IsDiscardable() end
Duel.SendtoGrave(e:GetHandler(),REASON_COST+REASON_DISCARD)
end
function cm.rmtg(e,tp,eg,ep,ev,re,r,rp,chk)
if chk==0 then return Duel.IsExistingMatchingCard(Card.IsAbleToRemove,tp,LOCATION_HAND+LOCATION_ONFIELD+LOCATION_GRAVE,0,1,nil) end
Duel.SetOperationInfo(0,CATEGORY_REMOVE,nil,1,tp,LOCATION_HAND+LOCATION_ONFIELD+LOCATION_GRAVE)
end
function cm.thfilter(c)
return c:IsSetCard(0xa450) and c:IsType(TYPE_MONSTER) and c:IsAbleToHand()
end
function cm.rmop(e,tp,eg,ep,ev,re,r,rp)
Duel.Hint(HINT_SELECTMSG,tp,HINTMSG_REMOVE)
local g=Duel.SelectMatchingCard(tp,Card.IsAbleToRemove,tp,LOCATION_HAND+LOCATION_ONFIELD+LOCATION_GRAVE,0,1,1,nil)
if #g>0 and Duel.Remove(g,POS_FACEUP,REASON_EFFECT)~=0 then
local tc=g:GetFirst()
if tc:IsSetCard(0xa450) and Duel.IsExistingMatchingCard(cm.thfilter,tp,LOCATION_DECK,0,1,nil)
and Duel.SelectYesNo(tp,aux.Stringid(m,2)) then
Duel.Hint(HINT_SELECTMSG,tp,HINTMSG_ATOHAND)
local sg=Duel.SelectMatchingCard(tp,cm.thfilter,tp,LOCATION_DECK,0,1,1,nil)
Duel.SendtoHand(sg,nil,REASON_EFFECT)
Duel.ConfirmCards(1-tp,sg)
end
end
end
function cm.scfilter(c)
return c:IsType(TYPE_SYNCHRO) and c:IsAttribute(ATTRIBUTE_WIND)
end
function cm.sctg(e,tp,eg,ep,ev,re,r,rp,chk)
if chk==0 then return Duel.IsExistingMatchingCard(cm.scfilter,tp,LOCATION_EXTRA,0,1,nil) end
Duel.SetOperationInfo(0,CATEGORY_SPECIAL_SUMMON,nil,1,tp,LOCATION_EXTRA)
end
function cm.scop(e,tp,eg,ep,ev,re,r,rp)
Duel.Hint(HINT_SELECTMSG,tp,HINTMSG_SPSUMMON)
local sc=Duel.SelectMatchingCard(tp,cm.scfilter,tp,LOCATION_EXTRA,0,1,1,nil):GetFirst()
if not sc then return end
local mg=Duel.GetMatchingGroup(Card.IsAbleToDeck,tp,LOCATION_ONFIELD+LOCATION_REMOVED,0,nil)
local mat=Group.CreateGroup()
Duel.Hint(HINT_SELECTMSG,tp,HINTMSG_TODECK)
local sg=mg:Select(tp,sc:GetLevel(),sc:GetLevel(),nil)
if #sg==sc:GetLevel() then
Duel.SendtoDeck(sg,nil,SEQ_DECKBOTTOM,REASON_EFFECT)
Duel.SpecialSummon(sc,SUMMON_TYPE_SYNCHRO,tp,tp,false,false,POS_FACEUP)
sc:CompleteProcedure()
end
end
function cm.bnfilter(c)
return c:IsFaceup() and not c:IsSetCard(0xa450)
end
function cm.bncon(e,tp,eg,ep,ev,re,r,rp)
return Duel.IsExistingMatchingCard(cm.bnfilter,tp,LOCATION_ONFIELD,0,1,nil)
end
function cm.bnop(e,tp,eg,ep,ev,re,r,rp)
local g=Duel.GetMatchingGroup(cm.bnfilter,tp,LOCATION_ONFIELD,0,nil)
Duel.Remove(g,POS_FACEDOWN,REASON_EFFECT)
end
--苍鳞龙乡
local cm,m=GetID()
function cm.initial_effect(c)
--activate
local e1=Effect.CreateEffect(c)
e1:SetDescription(aux.Stringid(m,0))
e1:SetCategory(CATEGORY_REMOVE+CATEGORY_TOGRAVE)
e1:SetType(EFFECT_TYPE_ACTIVATE)
e1:SetCode(EVENT_FREE_CHAIN)
e1:SetCountLimit(1,m+EFFECT_COUNT_CODE_OATH)
e1:SetTarget(cm.acttg)
e1:SetOperation(cm.actop)
c:RegisterEffect(e1)
--negate
local e2=Effect.CreateEffect(c)
e2:SetDescription(aux.Stringid(m,1))
e2:SetCategory(CATEGORY_NEGATE+CATEGORY_TODECK)
e2:SetType(EFFECT_TYPE_QUICK_O)
e2:SetCode(EVENT_CHAINING)
e2:SetRange(LOCATION_SZONE)
e2:SetCountLimit(1,m+1)
e2:SetCondition(cm.negcon)
e2:SetCost(cm.negcost)
e2:SetTarget(cm.negtg)
e2:SetOperation(cm.negop)
c:RegisterEffect(e2)
--atk/def
local e3=Effect.CreateEffect(c)
e3:SetDescription(aux.Stringid(m,2))
e3:SetCategory(CATEGORY_ATKCHANGE+CATEGORY_DEFCHANGE)
e3:SetType(EFFECT_TYPE_QUICK_O)
e3:SetCode(EVENT_FREE_CHAIN)
e3:SetRange(LOCATION_SZONE)
e3:SetCountLimit(1,m+2)
e3:SetTarget(cm.atktg)
e3:SetOperation(cm.atkop)
c:RegisterEffect(e3)
end
function cm.rmfilter(c,e,tp,eg,ep,ev,re,r,rp)
if not (c:IsSetCard(0xa450) and c:IsType(TYPE_MONSTER) and c:IsAbleToDeck()) then return false end
local te=c.discard_effect
if not te then return false end
local tg=te:GetTarget()
return not tg or tg and tg(e,tp,eg,ep,ev,re,r,rp,0)
end
function cm.tgfilter(c)
return c:IsSetCard(0xa450) and c:IsAbleToGrave()
end
function cm.acttg(e,tp,eg,ep,ev,re,r,rp,chk)
if chk==0 then return Duel.IsExistingMatchingCard(cm.rmfilter,tp,LOCATION_DECK,0,1,nil,e,tp,eg,ep,ev,re,r,rp) end
Duel.SetOperationInfo(0,CATEGORY_REMOVE,nil,1,tp,LOCATION_DECK)
end
function cm.actop(e,tp,eg,ep,ev,re,r,rp)
Duel.Hint(HINT_SELECTMSG,tp,HINTMSG_REMOVE)
local g=Duel.SelectMatchingCard(tp,cm.rmfilter,tp,LOCATION_DECK,0,1,1,nil,e,tp,eg,ep,ev,re,r,rp)
if #g>0 and Duel.Remove(g,POS_FACEUP,REASON_EFFECT)~=0 then
local tc=g:GetFirst()
tc:CreateEffectRelation(e)
local te=tc.discard_effect
local tg=te:GetTarget()
if tg then tg(e,tp,eg,ep,ev,re,r,rp,1)
local op=te:GetOperation()
if op then op(e,tp,eg,ep,ev,re,r,rp) end
Duel.BreakEffect()
end
if Duel.IsExistingMatchingCard(cm.tgfilter,tp,LOCATION_REMOVED,0,1,nil)
and Duel.SelectYesNo(tp,aux.Stringid(m,0)) then
Duel.Hint(HINT_SELECTMSG,tp,HINTMSG_TOGRAVE)
local sg=Duel.SelectMatchingCard(tp,cm.tgfilter,tp,LOCATION_REMOVED,0,1,1,nil)
Duel.SendtoGrave(sg,REASON_RETURN)
end
end
end
function cm.negcon(e,tp,eg,ep,ev,re,r,rp)
return rp==1-tp and re:IsHasType(EFFECT_TYPE_ACTIVATE) and Duel.IsChainNegatable(ev)
end
function cm.cfilter(c)
return c:IsSetCard(0xa450) and (c:IsLocation(LOCATION_GRAVE) or c:IsFaceup())
end
function cm.negcost(e,tp,eg,ep,ev,re,r,rp,chk)
if chk==0 then return Duel.IsExistingMatchingCard(cm.cfilter,tp,LOCATION_GRAVE+LOCATION_REMOVED,0,5,nil) end
Duel.Hint(HINT_SELECTMSG,tp,HINTMSG_TODECK)
local g=Duel.SelectMatchingCard(tp,cm.cfilter,tp,LOCATION_GRAVE+LOCATION_REMOVED,0,5,5,nil)
Duel.SendtoDeck(g,nil,SEQ_DECKSHUFFLE,REASON_COST)
end
function cm.negtg(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.negop(e,tp,eg,ep,ev,re,r,rp)
if Duel.NegateActivation(ev) then
Duel.SendtoGrave(eg,REASON_EFFECT)
end
end
function cm.atkfilter(c)
return c:IsFaceup() and c:IsSetCard(0xa450) and c:IsType(TYPE_MONSTER)
end
function cm.atktg(e,tp,eg,ep,ev,re,r,rp,chk)
if chk==0 then return Duel.IsExistingMatchingCard(cm.atkfilter,tp,LOCATION_MZONE,0,1,nil) end
end
function cm.atkop(e,tp,eg,ep,ev,re,r,rp)
local g=Duel.GetMatchingGroup(cm.atkfilter,tp,LOCATION_MZONE,0,nil)
for tc in aux.Next(g) do
local e1=Effect.CreateEffect(e:GetHandler())
e1:SetType(EFFECT_TYPE_SINGLE)
e1:SetCode(EFFECT_UPDATE_ATTACK)
e1:SetValue(1000)
e1:SetReset(RESET_EVENT+RESETS_STANDARD+RESET_PHASE+PHASE_END)
tc:RegisterEffect(e1)
local e2=Effect.CreateEffect(e:GetHandler())
e2:SetType(EFFECT_TYPE_SINGLE)
e2:SetCode(EFFECT_UPDATE_DEFENSE)
e2:SetValue(-1000)
e2:SetReset(RESET_EVENT+RESETS_STANDARD+RESET_PHASE+PHASE_END)
tc:RegisterEffect(e2)
end
end
--鳞化病
local cm,m=GetID()
function cm.initial_effect(c)
--special summon
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)
--set
local e2=Effect.CreateEffect(c)
e2:SetDescription(aux.Stringid(m,1))
e2:SetCategory(CATEGORY_REMOVE)
e2:SetType(EFFECT_TYPE_IGNITION)
e2:SetRange(LOCATION_GRAVE)
e2:SetCountLimit(1,m+1)
e2:SetCost(cm.setcost)
e2:SetTarget(cm.settg)
e2:SetOperation(cm.setop)
c:RegisterEffect(e2)
end
function cm.spfilter(c)
return c:IsSetCard(0xa450) and c:IsLevelBelow(4) and c:IsAbleToDeck()
end
function cm.spcost(e,tp,eg,ep,ev,re,r,rp,chk)
if chk==0 then return Duel.IsExistingMatchingCard(cm.spfilter,tp,LOCATION_HAND+LOCATION_MZONE,0,1,e:GetHandler()) end
Duel.Hint(HINT_SELECTMSG,tp,HINTMSG_TODECK)
local g=Duel.SelectMatchingCard(tp,cm.spfilter,tp,LOCATION_HAND+LOCATION_MZONE,0,1,1,e:GetHandler())
e:SetLabel(g:GetFirst():GetAttribute())
Duel.SendtoDeck(g,nil,SEQ_DECKSHUFFLE,REASON_COST)
end
function cm.spfilter2(c,att)
return c:IsSetCard(0xa450) and c:IsAttribute(att) and c:IsType(TYPE_EXTRA) and c:IsCanBeSpecialSummoned(e,0,tp,false,false)
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 Duel.IsExistingMatchingCard(cm.spfilter2,tp,LOCATION_EXTRA,0,1,nil,e:GetLabel()) end
Duel.SetOperationInfo(0,CATEGORY_SPECIAL_SUMMON,nil,1,tp,LOCATION_EXTRA)
end
function cm.spop(e,tp,eg,ep,ev,re,r,rp)
if Duel.GetLocationCount(tp,LOCATION_MZONE)<=0 then return end
Duel.Hint(HINT_SELECTMSG,tp,HINTMSG_SPSUMMON)
local g=Duel.SelectMatchingCard(tp,cm.spfilter2,tp,LOCATION_EXTRA,0,1,1,nil,e:GetLabel())
if #g>0 and Duel.SpecialSummon(g,0,tp,tp,false,false,POS_FACEUP)>0 then
local e1=Effect.CreateEffect(e:GetHandler())
e1:SetType(EFFECT_TYPE_FIELD+EFFECT_TYPE_CONTINUOUS)
e1:SetCode(EVENT_PHASE+PHASE_END)
e1:SetCountLimit(1)
e1:SetOperation(cm.atkop)
e1:SetReset(RESET_PHASE+PHASE_END)
Duel.RegisterEffect(e1,tp)
end
end
function cm.atkop(e,tp,eg,ep,ev,re,r,rp)
local g=Duel.GetMatchingGroup(Card.IsSetCard,tp,LOCATION_MZONE,0,nil,0xa450)
for tc in aux.Next(g) do
local e1=Effect.CreateEffect(e:GetHandler())
e1:SetType(EFFECT_TYPE_SINGLE)
e1:SetCode(EFFECT_UPDATE_ATTACK)
e1:SetValue(1000)
e1:SetReset(RESET_EVENT+RESETS_STANDARD)
tc:RegisterEffect(e1)
local e2=Effect.CreateEffect(e:GetHandler())
e2:SetType(EFFECT_TYPE_SINGLE)
e2:SetCode(EFFECT_UPDATE_DEFENSE)
e2:SetValue(-1000)
e2:SetReset(RESET_EVENT+RESETS_STANDARD)
tc:RegisterEffect(e2)
end
end
function cm.setfilter(c)
return c:IsSetCard(0xa450) and c:IsAbleToRemove()
end
function cm.setcost(e,tp,eg,ep,ev,re,r,rp,chk)
if chk==0 then return e:GetHandler():IsAbleToRemove()
and Duel.IsExistingMatchingCard(cm.setfilter,tp,LOCATION_HAND+LOCATION_ONFIELD+LOCATION_GRAVE,0,1,e:GetHandler()) end
Duel.Hint(HINT_SELECTMSG,tp,HINTMSG_REMOVE)
local g=Duel.SelectMatchingCard(tp,cm.setfilter,tp,LOCATION_HAND+LOCATION_ONFIELD+LOCATION_GRAVE,0,1,1,e:GetHandler())
g:AddCard(e:GetHandler())
Duel.Remove(g,POS_FACEUP,REASON_COST)
end
function cm.setfilter2(c)
return c:IsSetCard(0xa450) and c:IsType(TYPE_SPELL+TYPE_TRAP) and c:IsSSetable()
end
function cm.settg(e,tp,eg,ep,ev,re,r,rp,chk)
if chk==0 then return Duel.IsExistingMatchingCard(cm.setfilter2,tp,LOCATION_DECK,0,1,nil) end
end
function cm.setop(e,tp,eg,ep,ev,re,r,rp)
Duel.Hint(HINT_SELECTMSG,tp,HINTMSG_SET)
local g=Duel.SelectMatchingCard(tp,cm.setfilter2,tp,LOCATION_DECK,0,1,1,nil)
if #g>0 then
Duel.SSet(tp,g)
end
end
--鳞病征兆
local cm,m=GetID()
function cm.initial_effect(c)
--special summon
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)
--send to grave/remove
local e2=Effect.CreateEffect(c)
e2:SetDescription(aux.Stringid(m,1))
e2:SetCategory(CATEGORY_REMOVE)
e2:SetType(EFFECT_TYPE_IGNITION)
e2:SetRange(LOCATION_GRAVE)
e2:SetCountLimit(1,m+1)
e2:SetCost(cm.stgcost)
e2:SetTarget(cm.stgtg)
e2:SetOperation(cm.stgop)
c:RegisterEffect(e2)
end
function cm.spfilter(c)
return c:IsSetCard(0xa450) and c:IsType(TYPE_MONSTER) and c:IsAbleToDeck()
end
function cm.spcost(e,tp,eg,ep,ev,re,r,rp,chk)
if chk==0 then return e:GetHandler():IsDiscardable() end
Duel.SendtoGrave(e:GetHandler(),REASON_COST+REASON_DISCARD)
end
function cm.spfilter2(c,e,tp)
return c:IsSetCard(0xa450) and c:IsType(TYPE_MONSTER) and c:IsCanBeSpecialSummoned(e,0,tp,false,false)
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 Duel.IsExistingMatchingCard(cm.spfilter2,tp,LOCATION_DECK,0,1,nil,e,tp) end
Duel.SetOperationInfo(0,CATEGORY_SPECIAL_SUMMON,nil,1,tp,LOCATION_DECK)
end
function cm.spop(e,tp,eg,ep,ev,re,r,rp)
if Duel.GetLocationCount(tp,LOCATION_MZONE)<=0 then return end
Duel.Hint(HINT_SELECTMSG,tp,HINTMSG_SPSUMMON)
local g=Duel.SelectMatchingCard(tp,cm.spfilter2,tp,LOCATION_DECK,0,1,1,nil,e,tp)
if #g>0 and Duel.SpecialSummon(g,0,tp,tp,false,false,POS_FACEUP)>0 then
local e1=Effect.CreateEffect(e:GetHandler())
e1:SetType(EFFECT_TYPE_FIELD+EFFECT_TYPE_CONTINUOUS)
e1:SetCode(EVENT_PHASE+PHASE_END)
e1:SetCountLimit(1)
e1:SetOperation(cm.atkop)
e1:SetReset(RESET_PHASE+PHASE_END)
Duel.RegisterEffect(e1,tp)
local mg=Duel.GetMatchingGroup(Card.IsFaceup,tp,LOCATION_MZONE,LOCATION_MZONE,nil)
for tc in aux.Next(mg) do
local e2=Effect.CreateEffect(e:GetHandler())
e2:SetType(EFFECT_TYPE_SINGLE)
e2:SetCode(EFFECT_UPDATE_ATTACK)
e2:SetValue(1000)
e2:SetReset(RESET_EVENT+RESETS_STANDARD+RESET_PHASE+PHASE_END)
tc:RegisterEffect(e2)
end
end
end
function cm.atkop(e,tp,eg,ep,ev,re,r,rp)
local g=Duel.GetMatchingGroup(Card.IsDefenseBelow,tp,LOCATION_MZONE,0,nil,1)
if #g>0 then
Duel.Remove(g,POS_FACEDOWN,REASON_EFFECT)
end
end
function cm.stgfilter(c)
return c:IsSetCard(0xa450) and c:IsAbleToRemove()
end
function cm.stgcost(e,tp,eg,ep,ev,re,r,rp,chk)
if chk==0 then return e:GetHandler():IsAbleToRemove()
and Duel.IsExistingMatchingCard(cm.stgfilter,tp,LOCATION_HAND+LOCATION_ONFIELD+LOCATION_GRAVE,0,1,e:GetHandler()) end
Duel.Hint(HINT_SELECTMSG,tp,HINTMSG_REMOVE)
local g=Duel.SelectMatchingCard(tp,cm.stgfilter,tp,LOCATION_HAND+LOCATION_ONFIELD+LOCATION_GRAVE,0,1,1,e:GetHandler())
g:AddCard(e:GetHandler())
Duel.Remove(g,POS_FACEUP,REASON_COST)
end
function cm.stgfilter2(c)
return c:IsSetCard(0xa450) and c:IsType(TYPE_EXTRA) and (c:IsAbleToGrave() or c:IsAbleToRemove())
end
function cm.stgtg(e,tp,eg,ep,ev,re,r,rp,chk)
if chk==0 then return Duel.IsExistingMatchingCard(cm.stgfilter2,tp,LOCATION_EXTRA,0,1,nil) end
Duel.SetOperationInfo(0,CATEGORY_TOGRAVE+CATEGORY_REMOVE,nil,1,tp,LOCATION_EXTRA)
end
function cm.stgop(e,tp,eg,ep,ev,re,r,rp)
Duel.Hint(HINT_SELECTMSG,tp,HINTMSG_TARGET)
local g=Duel.SelectMatchingCard(tp,cm.stgfilter2,tp,LOCATION_EXTRA,0,1,1,nil)
if #g>0 then
local tc=g:GetFirst()
local op=0
if tc:IsAbleToGrave() and tc:IsAbleToRemove() then
op=Duel.SelectOption(tp,aux.Stringid(m,2),aux.Stringid(m,3))
elseif tc:IsAbleToGrave() then
op=0
else
op=1
end
if op==0 then
Duel.SendtoGrave(tc,REASON_EFFECT)
else
Duel.Remove(tc,POS_FACEUP,REASON_EFFECT)
end
end
end
--鳞病瘟疫
local cm,m=GetID()
function cm.initial_effect(c)
--search
local e1=Effect.CreateEffect(c)
e1:SetDescription(aux.Stringid(m,0))
e1:SetCategory(CATEGORY_SEARCH+CATEGORY_TOHAND)
e1:SetType(EFFECT_TYPE_IGNITION)
e1:SetRange(LOCATION_HAND)
e1:SetCountLimit(1,m)
e1:SetCost(cm.srcost)
e1:SetTarget(cm.srtg)
e1:SetOperation(cm.srop)
c:RegisterEffect(e1)
--search from grave
local e2=Effect.CreateEffect(c)
e2:SetDescription(aux.Stringid(m,1))
e2:SetCategory(CATEGORY_TOHAND+CATEGORY_SEARCH)
e2:SetType(EFFECT_TYPE_IGNITION)
e2:SetRange(LOCATION_GRAVE)
e2:SetCountLimit(1,m+1)
e2:SetCost(cm.thcost)
e2:SetTarget(cm.thtg)
e2:SetOperation(cm.thop)
c:RegisterEffect(e2)
--add when extra monster leaves
local e3=Effect.CreateEffect(c)
e3:SetDescription(aux.Stringid(m,2))
e3:SetCategory(CATEGORY_TOHAND+CATEGORY_SEARCH)
e3:SetType(EFFECT_TYPE_FIELD+EFFECT_TYPE_TRIGGER_O)
e3:SetCode(EVENT_LEAVE_FIELD)
e3:SetRange(LOCATION_MZONE)
e3:SetProperty(EFFECT_FLAG_DELAY)
e3:SetCountLimit(1,m+2)
e3:SetCondition(cm.lvcon)
e3:SetTarget(cm.lvtg)
e3:SetOperation(cm.lvop)
c:RegisterEffect(e3)
end
function cm.srcost(e,tp,eg,ep,ev,re,r,rp,chk)
if chk==0 then return Duel.GetMatchingGroupCount(Card.IsType,tp,LOCATION_HAND,0,e:GetHandler(),TYPE_MONSTER)>0 end
end
function cm.srfilter(c,att)
return c:IsSetCard(0xa450) and c:IsAttribute(att) and c:IsAbleToHand()
end
function cm.srtg(e,tp,eg,ep,ev,re,r,rp,chk)
if chk==0 then
local g=Duel.GetMatchingGroup(Card.IsType,tp,LOCATION_HAND,0,e:GetHandler(),TYPE_MONSTER)
return #g>0
end
Duel.SetOperationInfo(0,CATEGORY_TOHAND,nil,1,tp,LOCATION_DECK)
end
function cm.srop(e,tp,eg,ep,ev,re,r,rp)
local g=Duel.GetMatchingGroup(Card.IsType,tp,LOCATION_HAND,0,e:GetHandler(),TYPE_MONSTER)
if #g==0 then return end
Duel.Hint(HINT_SELECTMSG,tp,HINTMSG_CONFIRM)
local tc=Duel.SelectMatchingCard(tp,Card.IsType,tp,LOCATION_HAND,0,1,1,e:GetHandler(),TYPE_MONSTER):GetFirst()
if not tc then return end
Duel.ConfirmCards(1-tp,tc)
local att=tc:GetAttribute()
Duel.Hint(HINT_SELECTMSG,tp,HINTMSG_ATOHAND)
local sg=Duel.SelectMatchingCard(tp,cm.srfilter,tp,LOCATION_DECK,0,1,1,nil,att)
if #sg>0 and Duel.SendtoHand(sg,nil,REASON_EFFECT)>0 then
Duel.ConfirmCards(1-tp,sg)
local dg=Duel.GetMatchingGroup(Card.IsAbleToGrave,tp,LOCATION_HAND+LOCATION_ONFIELD,0,e:GetHandler())
if #dg>0 and Duel.SelectYesNo(tp,aux.Stringid(m,3)) then
Duel.Hint(HINT_SELECTMSG,tp,HINTMSG_TARGET)
local tg=dg:Select(tp,1,1,nil)
if Duel.SelectOption(tp,aux.Stringid(m,4),aux.Stringid(m,5))==0 then
Duel.SendtoGrave(tg,REASON_EFFECT)
else
Duel.Remove(tg,POS_FACEUP,REASON_EFFECT)
end
end
end
end
function cm.thcost(e,tp,eg,ep,ev,re,r,rp,chk)
if chk==0 then return e:GetHandler():IsAbleToRemove()
and Duel.IsExistingMatchingCard(Card.IsSetCard,tp,LOCATION_HAND+LOCATION_ONFIELD+LOCATION_GRAVE,0,1,e:GetHandler(),0xa450) end
Duel.Hint(HINT_SELECTMSG,tp,HINTMSG_REMOVE)
local g=Duel.SelectMatchingCard(tp,Card.IsSetCard,tp,LOCATION_HAND+LOCATION_ONFIELD+LOCATION_GRAVE,0,1,1,e:GetHandler(),0xa450)
g:AddCard(e:GetHandler())
Duel.Remove(g,POS_FACEUP,REASON_COST)
end
function cm.thfilter(c)
return c:IsSetCard(0xa450) 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>0 then
Duel.SendtoHand(g,nil,REASON_EFFECT)
Duel.ConfirmCards(1-tp,g)
end
end
function cm.lvfilter(c,tp)
return c:IsPreviousPosition(POS_FACEUP) and c:IsPreviousControler(tp) and c:IsSetCard(0xa450) and c:IsType(TYPE_EXTRA)
and c:IsReason(REASON_EFFECT) and c:GetReasonPlayer()==1-tp
end
function cm.lvcon(e,tp,eg,ep,ev,re,r,rp)
return eg:IsExists(cm.lvfilter,1,nil,tp)
end
function cm.lvtg(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.lvop(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>0 then
Duel.SendtoHand(g,nil,REASON_EFFECT)
Duel.ConfirmCards(1-tp,g)
end
end
--鳞病蔓延
local cm,m=GetID()
function cm.initial_effect(c)
--Negate
local e1=Effect.CreateEffect(c)
e1:SetDescription(aux.Stringid(m,0))
e1:SetCategory(CATEGORY_NEGATE+CATEGORY_REMOVE)
e1:SetType(EFFECT_TYPE_ACTIVATE)
e1:SetCode(EVENT_CHAINING)
e1:SetCountLimit(1,m)
e1:SetCondition(cm.negcon)
e1:SetTarget(cm.negtg)
e1:SetOperation(cm.negop)
c:RegisterEffect(e1)
--Protection
local e2=Effect.CreateEffect(c)
e2:SetDescription(aux.Stringid(m,1))
e2:SetType(EFFECT_TYPE_QUICK_O)
e2:SetCode(EVENT_FREE_CHAIN)
e2:SetRange(LOCATION_GRAVE)
e2:SetCountLimit(1,m+1)
e2:SetCost(cm.protcost)
e2:SetTarget(cm.prottg)
e2:SetOperation(cm.protop)
c:RegisterEffect(e2)
end
function cm.cfilter(c)
return c:IsFaceup() and c:IsSetCard(0xa450)
end
function cm.negcon(e,tp,eg,ep,ev,re,r,rp)
return Duel.IsExistingMatchingCard(cm.cfilter,tp,LOCATION_ONFIELD,0,1,nil)
and Duel.IsChainNegatable(ev) and (re:IsActiveType(TYPE_MONSTER) or re:IsHasType(EFFECT_TYPE_ACTIVATE))
end
function cm.negtg(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)
if re:GetHandler():IsAbleToRemove() then
Duel.SetOperationInfo(0,CATEGORY_REMOVE,eg,1,0,0)
end
end
function cm.negop(e,tp,eg,ep,ev,re,r,rp)
local rc=re:GetHandler()
if Duel.NegateActivation(ev) and rc:IsRelateToEffect(re) and Duel.Remove(rc,POS_FACEUP,REASON_EFFECT)~=0 then
local e1=Effect.CreateEffect(e:GetHandler())
e1:SetType(EFFECT_TYPE_FIELD)
e1:SetProperty(EFFECT_FLAG_PLAYER_TARGET)
e1:SetCode(EFFECT_CANNOT_ACTIVATE)
e1:SetTargetRange(0,1)
e1:SetValue(cm.actlimit)
e1:SetLabel(rc:GetOriginalCodeRule())
e1:SetReset(RESET_PHASE+PHASE_END,2)
Duel.RegisterEffect(e1,tp)
local g=Duel.GetMatchingGroup(Card.IsFaceup,tp,0,LOCATION_MZONE,nil)
for tc in aux.Next(g) do
local e2=Effect.CreateEffect(e:GetHandler())
e2:SetType(EFFECT_TYPE_SINGLE)
e2:SetCode(EFFECT_UPDATE_ATTACK)
e2:SetValue(3000)
e2:SetReset(RESET_EVENT+RESETS_STANDARD+RESET_PHASE+PHASE_END)
tc:RegisterEffect(e2)
local e3=Effect.CreateEffect(e:GetHandler())
e3:SetType(EFFECT_TYPE_SINGLE)
e3:SetCode(EFFECT_SET_DEFENSE)
e3:SetValue(0)
e3:SetReset(RESET_EVENT+RESETS_STANDARD+RESET_PHASE+PHASE_END)
tc:RegisterEffect(e3)
end
end
end
function cm.actlimit(e,re,tp)
return re:GetHandler():GetOriginalCodeRule()==e:GetLabel()
end
function cm.protcost(e,tp,eg,ep,ev,re,r,rp,chk)
if chk==0 then return e:GetHandler():IsAbleToRemove()
and Duel.IsExistingMatchingCard(Card.IsSetCard,tp,LOCATION_HAND+LOCATION_ONFIELD+LOCATION_GRAVE,0,1,e:GetHandler(),0xa450) end
Duel.Hint(HINT_SELECTMSG,tp,HINTMSG_REMOVE)
local g=Duel.SelectMatchingCard(tp,Card.IsSetCard,tp,LOCATION_HAND+LOCATION_ONFIELD+LOCATION_GRAVE,0,1,1,e:GetHandler(),0xa450)
g:AddCard(e:GetHandler())
Duel.Remove(g,POS_FACEUP,REASON_COST)
end
function cm.prottg(e,tp,eg,ep,ev,re,r,rp,chk)
if chk==0 then return true end
end
function cm.protfilter(c)
return c:IsFaceup() and c:IsSetCard(0xa450)
end
function cm.protop(e,tp,eg,ep,ev,re,r,rp)
local g=Duel.GetMatchingGroup(cm.protfilter,tp,LOCATION_ONFIELD,0,nil)
for tc in aux.Next(g) do
--Indestructible
local e1=Effect.CreateEffect(e:GetHandler())
e1:SetType(EFFECT_TYPE_SINGLE)
e1:SetCode(EFFECT_INDESTRUCTABLE_EFFECT)
e1:SetValue(1)
e1:SetReset(RESET_EVENT+RESETS_STANDARD+RESET_PHASE+PHASE_END,2)
tc:RegisterEffect(e1)
--Cannot be target
local e2=Effect.CreateEffect(e:GetHandler())
e2:SetType(EFFECT_TYPE_SINGLE)
e2:SetCode(EFFECT_CANNOT_BE_EFFECT_TARGET)
e2:SetProperty(EFFECT_FLAG_IGNORE_IMMUNE)
e2:SetValue(1)
e2:SetReset(RESET_EVENT+RESETS_STANDARD+RESET_PHASE+PHASE_END,2)
tc:RegisterEffect(e2)
end
end
--阿蕾斯·炎·阿夏克
local cm,m=GetID()
function cm.initial_effect(c)
c:EnableReviveLimit()
--fusion material
aux.AddFusionProcMixRep(c,true,true,cm.fit,1,99)
--stats change
local e1=Effect.CreateEffect(c)
e1:SetType(EFFECT_TYPE_FIELD+EFFECT_TYPE_CONTINUOUS)
e1:SetCode(EVENT_PHASE+PHASE_END)
e1:SetRange(LOCATION_MZONE)
e1:SetCountLimit(1)
e1:SetOperation(cm.statop)
c:RegisterEffect(e1)
--leave field
local e2=Effect.CreateEffect(c)
e2:SetType(EFFECT_TYPE_SINGLE+EFFECT_TYPE_CONTINUOUS)
e2:SetCode(EVENT_LEAVE_FIELD)
e2:SetOperation(cm.lvop)
c:RegisterEffect(e2)
--effects by atk
local e3=Effect.CreateEffect(c)
e3:SetType(EFFECT_TYPE_SINGLE)
e3:SetCode(EFFECT_UPDATE_ATTACK)
e3:SetRange(LOCATION_MZONE)
e3:SetCondition(cm.atkcon1)
e3:SetValue(1000)
c:RegisterEffect(e3)
local e4=Effect.CreateEffect(c)
e4:SetType(EFFECT_TYPE_SINGLE)
e4:SetCode(EFFECT_UPDATE_ATTACK)
e4:SetRange(LOCATION_MZONE)
e4:SetCondition(cm.atkcon2)
e4:SetValue(2000)
c:RegisterEffect(e4)
local e5=Effect.CreateEffect(c)
e5:SetType(EFFECT_TYPE_SINGLE)
e5:SetCode(EFFECT_UPDATE_ATTACK)
e5:SetRange(LOCATION_MZONE)
e5:SetCondition(cm.atkcon3)
e5:SetValue(3000)
c:RegisterEffect(e5)
--direct attack
local e6=Effect.CreateEffect(c)
e6:SetDescription(aux.Stringid(m,0))
e6:SetCategory(CATEGORY_ATKCHANGE)
e6:SetType(EFFECT_TYPE_IGNITION)
e6:SetRange(LOCATION_GRAVE)
e6:SetCountLimit(1,m)
e6:SetCost(cm.dacost)
e6:SetTarget(cm.datg)
e6:SetOperation(cm.daop)
c:RegisterEffect(e6)
local e10=Effect.CreateEffect(c)
e10:SetType(EFFECT_TYPE_SINGLE)
e10:SetCode(EFFECT_SPSUMMON_COST)
e10:SetProperty(EFFECT_FLAG_CANNOT_DISABLE+EFFECT_FLAG_UNCOPYABLE+EFFECT_FLAG_SINGLE_RANGE)
e10:SetRange(LOCATION_EXTRA)
e10:SetCost(cm.spcost)
e10:SetOperation(cm.spcop)
c:RegisterEffect(e10)
end
function cm.fit(c)
return c:IsType(TYPE_MONSTER)and c:IsSetCard(0xa450)
end
function cm.fit0(c)
return c:IsAbleToDeckAsCost() and c:IsSetCard(0xa450) and c:IsType(TYPE_SPELL+TYPE_TRAP)
end
function cm.spcost(e,c,tp)
return Duel.IsExistingMatchingCard(cm.fit0,tp,LOCATION_ONFIELD+LOCATION_REMOVED,0,1,nil)
end
function cm.spcop(e,tp,eg,ep,ev,re,r,rp)
Duel.Hint(HINT_SELECTMSG,tp,HINTMSG_TODECK)
local g=Duel.SelectMatchingCard(tp,cm.fit0,tp,LOCATION_ONFIELD+LOCATION_REMOVED,0,1,99,nil)
Duel.SendtoDeck(g,nil,3,REASON_COST)
end
function cm.statop(e,tp,eg,ep,ev,re,r,rp)
local c=e:GetHandler()
if c:IsFaceup() then
local e1=Effect.CreateEffect(c)
e1:SetType(EFFECT_TYPE_SINGLE)
e1:SetCode(EFFECT_UPDATE_ATTACK)
e1:SetValue(1000)
e1:SetReset(RESET_EVENT+RESETS_STANDARD+RESET_DISABLE)
c:RegisterEffect(e1)
local e2=Effect.CreateEffect(c)
e2:SetType(EFFECT_TYPE_SINGLE)
e2:SetCode(EFFECT_UPDATE_DEFENSE)
e2:SetValue(-1000)
e2:SetReset(RESET_EVENT+RESETS_STANDARD+RESET_DISABLE)
c:RegisterEffect(e2)
if c:GetDefense()<=0 then
Duel.Release(c,REASON_EFFECT)
end
end
end
function cm.lvop(e,tp,eg,ep,ev,re,r,rp)
local c=e:GetHandler()
if c:IsPreviousLocation(LOCATION_ONFIELD) then
Duel.Remove(c,POS_FACEDOWN,REASON_EFFECT)
end
end
function cm.atkcon1(e)
local c=e:GetHandler()
return c:IsAttackAbove(1000) and c:IsAttackBelow(1999)
end
function cm.atkcon2(e)
local c=e:GetHandler()
return c:IsAttackAbove(2000) and c:IsAttackBelow(2999)
end
function cm.atkcon3(e)
local c=e:GetHandler()
return c:IsAttackAbove(3000)
end
function cm.dacost(e,tp,eg,ep,ev,re,r,rp,chk)
if chk==0 then return e:GetHandler():IsAbleToRemoveAsCost() end
Duel.Remove(e:GetHandler(),POS_FACEUP,REASON_COST)
end
function cm.datg(e,tp,eg,ep,ev,re,r,rp,chk)
if chk==0 then return Duel.IsExistingMatchingCard(Card.IsSetCard,tp,LOCATION_MZONE,0,1,nil,0xa450) end
end
function cm.daop(e,tp,eg,ep,ev,re,r,rp)
local g=Duel.GetMatchingGroup(Card.IsSetCard,tp,LOCATION_MZONE,0,nil,0xa450)
for tc in aux.Next(g) do
local e1=Effect.CreateEffect(e:GetHandler())
e1:SetType(EFFECT_TYPE_SINGLE)
e1:SetCode(EFFECT_DIRECT_ATTACK)
e1:SetReset(RESET_EVENT+RESETS_STANDARD+RESET_PHASE+PHASE_END)
tc:RegisterEffect(e1)
end
end
--鐳徳斯·哈拉丝·磊
local cm,m=GetID()
function cm.initial_effect(c)
--xyz summon
aux.AddXyzProcedure(c,cm.xyzfilter,1,99)
c:EnableReviveLimit()
--stats change
local e1=Effect.CreateEffect(c)
e1:SetType(EFFECT_TYPE_FIELD+EFFECT_TYPE_CONTINUOUS)
e1:SetCode(EVENT_PHASE+PHASE_END)
e1:SetRange(LOCATION_MZONE)
e1:SetCountLimit(1)
e1:SetOperation(cm.statop)
c:RegisterEffect(e1)
--leave field
local e2=Effect.CreateEffect(c)
e2:SetType(EFFECT_TYPE_SINGLE+EFFECT_TYPE_CONTINUOUS)
e2:SetCode(EVENT_LEAVE_FIELD)
e2:SetOperation(cm.lvop)
c:RegisterEffect(e2)
--effects by atk
local e3=Effect.CreateEffect(c)
e3:SetDescription(aux.Stringid(m,0))
e3:SetCategory(CATEGORY_NEGATE+CATEGORY_DESTROY)
e3:SetType(EFFECT_TYPE_QUICK_O)
e3:SetCode(EVENT_CHAINING)
e3:SetProperty(EFFECT_FLAG_DAMAGE_STEP+EFFECT_FLAG_DAMAGE_CAL)
e3:SetRange(LOCATION_MZONE)
e3:SetCondition(cm.negcon1)
e3:SetCost(cm.negcost)
e3:SetTarget(cm.negtg1)
e3:SetOperation(cm.negop1)
c:RegisterEffect(e3)
local e4=Effect.CreateEffect(c)
e4:SetDescription(aux.Stringid(m,1))
e4:SetCategory(CATEGORY_NEGATE+CATEGORY_REMOVE)
e4:SetType(EFFECT_TYPE_QUICK_O)
e4:SetCode(EVENT_CHAINING)
e4:SetProperty(EFFECT_FLAG_DAMAGE_STEP+EFFECT_FLAG_DAMAGE_CAL)
e4:SetRange(LOCATION_MZONE)
e4:SetCondition(cm.negcon2)
e4:SetCost(cm.negcost)
e4:SetTarget(cm.negtg2)
e4:SetOperation(cm.negop2)
c:RegisterEffect(e4)
local e5=Effect.CreateEffect(c)
e5:SetDescription(aux.Stringid(m,2))
e5:SetCategory(CATEGORY_NEGATE+CATEGORY_TODECK)
e5:SetType(EFFECT_TYPE_QUICK_O)
e5:SetCode(EVENT_CHAINING)
e5:SetProperty(EFFECT_FLAG_DAMAGE_STEP+EFFECT_FLAG_DAMAGE_CAL)
e5:SetRange(LOCATION_MZONE)
e5:SetCondition(cm.negcon3)
e5:SetCost(cm.negcost)
e5:SetTarget(cm.negtg3)
e5:SetOperation(cm.negop3)
c:RegisterEffect(e5)
--atk/def up
local e6=Effect.CreateEffect(c)
e6:SetDescription(aux.Stringid(m,3))
e6:SetCategory(CATEGORY_ATKCHANGE+CATEGORY_DEFCHANGE)
e6:SetType(EFFECT_TYPE_IGNITION)
e6:SetRange(LOCATION_GRAVE)
e6:SetCountLimit(1,m)
e6:SetCost(cm.adcost)
e6:SetTarget(cm.adtg)
e6:SetOperation(cm.adop)
c:RegisterEffect(e6)
local e10=Effect.CreateEffect(c)
e10:SetType(EFFECT_TYPE_SINGLE)
e10:SetCode(EFFECT_SPSUMMON_COST)
e10:SetProperty(EFFECT_FLAG_CANNOT_DISABLE+EFFECT_FLAG_UNCOPYABLE+EFFECT_FLAG_SINGLE_RANGE)
e10:SetRange(LOCATION_EXTRA)
e10:SetCost(cm.spcost)
e10:SetOperation(cm.spcop)
c:RegisterEffect(e10)
end
function cm.fit0(c)
return c:IsAbleToDeckAsCost() and c:IsSetCard(0xa450) and c:IsType(TYPE_SPELL+TYPE_TRAP)
end
function cm.spcost(e,c,tp)
return Duel.IsExistingMatchingCard(cm.fit0,tp,LOCATION_ONFIELD+LOCATION_REMOVED,0,1,nil)
end
function cm.spcop(e,tp,eg,ep,ev,re,r,rp)
Duel.Hint(HINT_SELECTMSG,tp,HINTMSG_TODECK)
local g=Duel.SelectMatchingCard(tp,cm.fit0,tp,LOCATION_ONFIELD+LOCATION_REMOVED,0,1,99,nil)
Duel.SendtoDeck(g,nil,3,REASON_COST)
end
function cm.xyzfilter(c)
return c:IsSetCard(0xa450) and c:IsLevel(1)
end
function cm.statop(e,tp,eg,ep,ev,re,r,rp)
local c=e:GetHandler()
if c:IsFaceup() then
local e1=Effect.CreateEffect(c)
e1:SetType(EFFECT_TYPE_SINGLE)
e1:SetCode(EFFECT_UPDATE_ATTACK)
e1:SetValue(1000)
e1:SetReset(RESET_EVENT+RESETS_STANDARD+RESET_DISABLE)
c:RegisterEffect(e1)
local e2=Effect.CreateEffect(c)
e2:SetType(EFFECT_TYPE_SINGLE)
e2:SetCode(EFFECT_UPDATE_DEFENSE)
e2:SetValue(-1000)
e2:SetReset(RESET_EVENT+RESETS_STANDARD+RESET_DISABLE)
c:RegisterEffect(e2)
if c:GetDefense()<=0 then
Duel.Release(c,REASON_EFFECT)
end
end
end
function cm.lvop(e,tp,eg,ep,ev,re,r,rp)
local c=e:GetHandler()
if c:IsPreviousLocation(LOCATION_ONFIELD) then
Duel.Remove(c,POS_FACEDOWN,REASON_EFFECT)
end
end
function cm.negcon1(e,tp,eg,ep,ev,re,r,rp)
local c=e:GetHandler()
return c:IsAttackAbove(1000) and c:IsAttackBelow(1999) and re:IsActiveType(TYPE_TRAP)
and Duel.IsChainNegatable(ev)
end
function cm.negcon2(e,tp,eg,ep,ev,re,r,rp)
local c=e:GetHandler()
return c:IsAttackAbove(2000) and c:IsAttackBelow(2999) and re:IsActiveType(TYPE_SPELL)
and Duel.IsChainNegatable(ev)
end
function cm.negcon3(e,tp,eg,ep,ev,re,r,rp)
local c=e:GetHandler()
return c:IsAttackAbove(3000) and re:IsActiveType(TYPE_MONSTER)
and Duel.IsChainNegatable(ev)
end
function cm.negcost(e,tp,eg,ep,ev,re,r,rp,chk)
if chk==0 then return e:GetHandler():CheckRemoveOverlayCard(tp,1,REASON_COST) end
e:GetHandler():RemoveOverlayCard(tp,1,1,REASON_COST)
end
function cm.negtg1(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)
if re:GetHandler():IsDestructable() then
Duel.SetOperationInfo(0,CATEGORY_DESTROY,eg,1,0,0)
end
end
function cm.negop1(e,tp,eg,ep,ev,re,r,rp)
if Duel.NegateActivation(ev) and re:GetHandler():IsRelateToEffect(re) then
Duel.Destroy(eg,REASON_EFFECT)
end
end
function cm.negtg2(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)
if re:GetHandler():IsAbleToRemove() then
Duel.SetOperationInfo(0,CATEGORY_REMOVE,eg,1,0,0)
end
end
function cm.negop2(e,tp,eg,ep,ev,re,r,rp)
if Duel.NegateActivation(ev) and re:GetHandler():IsRelateToEffect(re) then
Duel.Remove(eg,POS_FACEUP,REASON_EFFECT)
end
end
function cm.negtg3(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)
if re:GetHandler():IsAbleToDeck() then
Duel.SetOperationInfo(0,CATEGORY_TODECK,eg,1,0,0)
end
end
function cm.negop3(e,tp,eg,ep,ev,re,r,rp)
if Duel.NegateActivation(ev) and re:GetHandler():IsRelateToEffect(re) then
Duel.SendtoDeck(eg,nil,SEQ_DECKSHUFFLE,REASON_EFFECT)
end
end
function cm.adcost(e,tp,eg,ep,ev,re,r,rp,chk)
if chk==0 then return e:GetHandler():IsAbleToRemoveAsCost() end
Duel.Remove(e:GetHandler(),POS_FACEUP,REASON_COST)
end
function cm.adtg(e,tp,eg,ep,ev,re,r,rp,chk)
if chk==0 then return Duel.IsExistingMatchingCard(Card.IsFaceup,tp,LOCATION_MZONE,0,1,nil) end
end
function cm.adop(e,tp,eg,ep,ev,re,r,rp)
local g=Duel.GetMatchingGroup(Card.IsFaceup,tp,LOCATION_MZONE,0,nil)
for tc in aux.Next(g) do
local e1=Effect.CreateEffect(e:GetHandler())
e1:SetType(EFFECT_TYPE_SINGLE)
e1:SetCode(EFFECT_UPDATE_ATTACK)
e1:SetValue(1000)
e1:SetReset(RESET_EVENT+RESETS_STANDARD+RESET_PHASE+PHASE_END,2)
tc:RegisterEffect(e1)
local e2=Effect.CreateEffect(e:GetHandler())
e2:SetType(EFFECT_TYPE_SINGLE)
e2:SetCode(EFFECT_UPDATE_DEFENSE)
e2:SetValue(1000)
e2:SetReset(RESET_EVENT+RESETS_STANDARD+RESET_PHASE+PHASE_END,2)
tc:RegisterEffect(e2)
end
end
--婕拉镭·沧酌·旋烽
local cm,m=GetID()
function cm.initial_effect(c)
--synchro summon
c:EnableReviveLimit()
aux.AddSynchroMixProcedure(c,cm.matfilter1,nil,nil,aux.NonTuner(cm.matfilter2),1,99)
--stats change
local e1=Effect.CreateEffect(c)
e1:SetType(EFFECT_TYPE_FIELD+EFFECT_TYPE_CONTINUOUS)
e1:SetCode(EVENT_PHASE+PHASE_END)
e1:SetRange(LOCATION_MZONE)
e1:SetCountLimit(1)
e1:SetOperation(cm.statop)
c:RegisterEffect(e1)
--leave field
local e2=Effect.CreateEffect(c)
e2:SetType(EFFECT_TYPE_SINGLE+EFFECT_TYPE_CONTINUOUS)
e2:SetCode(EVENT_LEAVE_FIELD)
e2:SetOperation(cm.lvop)
c:RegisterEffect(e2)
--effects by atk
local e3=Effect.CreateEffect(c)
e3:SetDescription(aux.Stringid(m,0))
e3:SetCategory(CATEGORY_SPECIAL_SUMMON)
e3:SetType(EFFECT_TYPE_QUICK_O)
e3:SetCode(EVENT_FREE_CHAIN)
e3:SetRange(LOCATION_MZONE)
e3:SetCondition(cm.syncon1)
e3:SetTarget(cm.syntg)
e3:SetOperation(cm.synop)
c:RegisterEffect(e3)
local e4=Effect.CreateEffect(c)
e4:SetDescription(aux.Stringid(m,1))
e4:SetCategory(CATEGORY_DESTROY)
e4:SetType(EFFECT_TYPE_QUICK_O)
e4:SetCode(EVENT_FREE_CHAIN)
e4:SetRange(LOCATION_MZONE)
e4:SetCondition(cm.descon)
e4:SetTarget(cm.destg)
e4:SetOperation(cm.desop)
c:RegisterEffect(e4)
local e5=Effect.CreateEffect(c)
e5:SetType(EFFECT_TYPE_FIELD)
e5:SetCode(EFFECT_QP_ACT_IN_NTPHAND)
e5:SetRange(LOCATION_MZONE)
e5:SetTargetRange(LOCATION_HAND+LOCATION_MZONE+LOCATION_GRAVE,0)
e5:SetTarget(cm.qtg)
e5:SetCondition(cm.qcon)
c:RegisterEffect(e5)
--search
local e6=Effect.CreateEffect(c)
e6:SetDescription(aux.Stringid(m,2))
e6:SetCategory(CATEGORY_TOHAND+CATEGORY_SEARCH)
e6:SetType(EFFECT_TYPE_IGNITION)
e6:SetRange(LOCATION_GRAVE)
e6:SetCountLimit(1,m)
e6:SetCost(cm.thcost)
e6:SetTarget(cm.thtg)
e6:SetOperation(cm.thop)
c:RegisterEffect(e6)
local e10=Effect.CreateEffect(c)
e10:SetType(EFFECT_TYPE_SINGLE)
e10:SetCode(EFFECT_SPSUMMON_COST)
e10:SetProperty(EFFECT_FLAG_CANNOT_DISABLE+EFFECT_FLAG_UNCOPYABLE+EFFECT_FLAG_SINGLE_RANGE)
e10:SetRange(LOCATION_EXTRA)
e10:SetCost(cm.spcost)
e10:SetOperation(cm.spcop)
c:RegisterEffect(e10)
end
function cm.fit0(c)
return c:IsAbleToDeckAsCost() and c:IsSetCard(0xa450) and c:IsType(TYPE_SPELL+TYPE_TRAP)
end
function cm.spcost(e,c,tp)
return Duel.IsExistingMatchingCard(cm.fit0,tp,LOCATION_ONFIELD+LOCATION_REMOVED,0,1,nil)
end
function cm.spcop(e,tp,eg,ep,ev,re,r,rp)
Duel.Hint(HINT_SELECTMSG,tp,HINTMSG_TODECK)
local g=Duel.SelectMatchingCard(tp,cm.fit0,tp,LOCATION_ONFIELD+LOCATION_REMOVED,0,1,99,nil)
Duel.SendtoDeck(g,nil,3,REASON_COST)
end
function cm.matfilter1(c)
return c:IsSetCard(0xa450) and c:IsType(TYPE_TUNER) and c:IsType(TYPE_MONSTER)
end
function cm.matfilter2(c)
return c:IsNotTuner() and c:IsSetCard(0xa450) and c:IsType(TYPE_MONSTER)
end
function cm.statop(e,tp,eg,ep,ev,re,r,rp)
local c=e:GetHandler()
if c:IsFaceup() then
local e1=Effect.CreateEffect(c)
e1:SetType(EFFECT_TYPE_SINGLE)
e1:SetCode(EFFECT_UPDATE_ATTACK)
e1:SetValue(1000)
e1:SetReset(RESET_EVENT+RESETS_STANDARD+RESET_DISABLE)
c:RegisterEffect(e1)
local e2=Effect.CreateEffect(c)
e2:SetType(EFFECT_TYPE_SINGLE)
e2:SetCode(EFFECT_UPDATE_DEFENSE)
e2:SetValue(-1000)
e2:SetReset(RESET_EVENT+RESETS_STANDARD+RESET_DISABLE)
c:RegisterEffect(e2)
if c:GetDefense()<=0 then
Duel.Release(c,REASON_EFFECT)
end
end
end
function cm.lvop(e,tp,eg,ep,ev,re,r,rp)
local c=e:GetHandler()
if c:IsPreviousLocation(LOCATION_ONFIELD) then
Duel.Remove(c,POS_FACEDOWN,REASON_EFFECT)
end
end
function cm.syncon1(e,tp,eg,ep,ev,re,r,rp)
local c=e:GetHandler()
return c:IsAttackAbove(1000) and c:IsAttackBelow(1999)
and (Duel.GetTurnPlayer()==tp or Duel.GetTurnPlayer()==1-tp)
end
function cm.syntg(e,tp,eg,ep,ev,re,r,rp,chk)
if chk==0 then return Duel.IsExistingMatchingCard(Card.IsSynchroSummonable,tp,LOCATION_EXTRA,0,1,nil,e:GetHandler()) end
Duel.SetOperationInfo(0,CATEGORY_SPECIAL_SUMMON,nil,1,tp,LOCATION_EXTRA)
end
function cm.synop(e,tp,eg,ep,ev,re,r,rp)
local c=e:GetHandler()
if c:IsControler(1-tp) or not c:IsRelateToEffect(e) then return end
local g=Duel.GetMatchingGroup(Card.IsSynchroSummonable,tp,LOCATION_EXTRA,0,nil,c)
if g:GetCount()>0 then
Duel.Hint(HINT_SELECTMSG,tp,HINTMSG_SPSUMMON)
local sg=g:Select(tp,1,1,nil)
Duel.SynchroSummon(tp,sg:GetFirst(),c)
end
end
function cm.descon(e,tp,eg,ep,ev,re,r,rp)
local c=e:GetHandler()
return c:IsAttackAbove(2000) and c:IsAttackBelow(2999)
and (Duel.GetTurnPlayer()==tp or Duel.GetTurnPlayer()==1-tp)
end
function cm.destg(e,tp,eg,ep,ev,re,r,rp,chk)
if chk==0 then return Duel.IsExistingMatchingCard(Card.IsType,tp,LOCATION_ONFIELD,LOCATION_ONFIELD,1,nil,TYPE_SPELL+TYPE_TRAP) end
Duel.SetOperationInfo(0,CATEGORY_DESTROY,nil,1,0,LOCATION_ONFIELD)
end
function cm.desop(e,tp,eg,ep,ev,re,r,rp)
Duel.Hint(HINT_SELECTMSG,tp,HINTMSG_DESTROY)
local g=Duel.SelectMatchingCard(tp,Card.IsType,tp,LOCATION_ONFIELD,LOCATION_ONFIELD,1,1,nil,TYPE_SPELL+TYPE_TRAP)
if g:GetCount()>0 then
Duel.Destroy(g,REASON_EFFECT)
end
end
function cm.qcon(e)
local c=e:GetHandler()
return c:IsAttackAbove(3000)
end
function cm.qtg(e,c)
return c:IsSetCard(0xa450) and (c:IsType(TYPE_MONSTER) or c:IsType(TYPE_SPELL))
end
function cm.thcost(e,tp,eg,ep,ev,re,r,rp,chk)
if chk==0 then return e:GetHandler():IsAbleToRemoveAsCost() end
Duel.Remove(e:GetHandler(),POS_FACEUP,REASON_COST)
end
function cm.thfilter(c)
return c:IsSetCard(0xa450) 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
--蕾纳斯·格拉·斯德
local cm,m=GetID()
function cm.initial_effect(c)
--link summon
c:EnableReviveLimit()
aux.AddLinkProcedure(c,cm.lfilter,1,3)
--special summon condition
local e0=Effect.CreateEffect(c)
e0:SetType(EFFECT_TYPE_SINGLE)
e0:SetProperty(EFFECT_FLAG_CANNOT_DISABLE+EFFECT_FLAG_UNCOPYABLE)
e0:SetCode(EFFECT_SPSUMMON_PROC)
e0:SetCondition(cm.lkcon)
e0:SetOperation(cm.lkop)
c:RegisterEffect(e0)
--stats change
local e1=Effect.CreateEffect(c)
e1:SetType(EFFECT_TYPE_FIELD+EFFECT_TYPE_CONTINUOUS)
e1:SetCode(EVENT_PHASE+PHASE_END)
e1:SetRange(LOCATION_MZONE)
e1:SetCountLimit(1)
e1:SetOperation(cm.statop)
c:RegisterEffect(e1)
--leave field
local e2=Effect.CreateEffect(c)
e2:SetType(EFFECT_TYPE_SINGLE+EFFECT_TYPE_CONTINUOUS)
e2:SetCode(EVENT_LEAVE_FIELD)
e2:SetOperation(cm.lvop)
c:RegisterEffect(e2)
--effects by atk
local e3=Effect.CreateEffect(c)
e3:SetDescription(aux.Stringid(m,0))
e3:SetCategory(CATEGORY_TOHAND+CATEGORY_SEARCH)
e3:SetType(EFFECT_TYPE_QUICK_O)
e3:SetCode(EVENT_FREE_CHAIN)
e3:SetRange(LOCATION_MZONE)
e3:SetCondition(cm.thcon1)
e3:SetTarget(cm.thtg1)
e3:SetOperation(cm.thop1)
c:RegisterEffect(e3)
local e4=Effect.CreateEffect(c)
e4:SetDescription(aux.Stringid(m,1))
e4:SetCategory(CATEGORY_TOHAND)
e4:SetType(EFFECT_TYPE_QUICK_O)
e4:SetCode(EVENT_FREE_CHAIN)
e4:SetRange(LOCATION_MZONE)
e4:SetCondition(cm.thcon2)
e4:SetTarget(cm.thtg2)
e4:SetOperation(cm.thop2)
c:RegisterEffect(e4)
local e5=Effect.CreateEffect(c)
e5:SetDescription(aux.Stringid(m,2))
e5:SetCategory(CATEGORY_REMOVE)
e5:SetType(EFFECT_TYPE_QUICK_O)
e5:SetCode(EVENT_FREE_CHAIN)
e5:SetRange(LOCATION_MZONE)
e5:SetCondition(cm.rmcon)
e5:SetTarget(cm.rmtg)
e5:SetOperation(cm.rmop)
c:RegisterEffect(e5)
--send to grave
local e6=Effect.CreateEffect(c)
e6:SetDescription(aux.Stringid(m,3))
e6:SetCategory(CATEGORY_TOGRAVE)
e6:SetType(EFFECT_TYPE_IGNITION)
e6:SetRange(LOCATION_GRAVE)
e6:SetCountLimit(1,m)
e6:SetCost(cm.gvcost)
e6:SetTarget(cm.gvtg)
e6:SetOperation(cm.gvop)
c:RegisterEffect(e6)
local e10=Effect.CreateEffect(c)
e10:SetType(EFFECT_TYPE_SINGLE)
e10:SetCode(EFFECT_SPSUMMON_COST)
e10:SetProperty(EFFECT_FLAG_CANNOT_DISABLE+EFFECT_FLAG_UNCOPYABLE+EFFECT_FLAG_SINGLE_RANGE)
e10:SetRange(LOCATION_EXTRA)
e10:SetCost(cm.spcost)
e10:SetOperation(cm.spcop)
c:RegisterEffect(e10)
end
function cm.fit0(c)
return c:IsAbleToDeckAsCost() and c:IsSetCard(0xa450) and c:IsType(TYPE_SPELL+TYPE_TRAP)
end
function cm.spcost(e,c,tp)
return Duel.IsExistingMatchingCard(cm.fit0,tp,LOCATION_ONFIELD+LOCATION_REMOVED,0,1,nil)
end
function cm.spcop(e,tp,eg,ep,ev,re,r,rp)
Duel.Hint(HINT_SELECTMSG,tp,HINTMSG_TODECK)
local g=Duel.SelectMatchingCard(tp,cm.fit0,tp,LOCATION_ONFIELD+LOCATION_REMOVED,0,1,99,nil)
Duel.SendtoDeck(g,nil,3,REASON_COST)
end
function cm.lfilter(c)
return c:IsSetCard(0xa450)
end
function cm.rfilter(c)
return c:IsSetCard(0xa450) and c:IsType(TYPE_SPELL+TYPE_TRAP) and (c:IsFaceup() or c:IsLocation(LOCATION_REMOVED))
end
function cm.lkcon(e,c)
if c==nil then return true end
return Duel.IsExistingMatchingCard(cm.rfilter,c:GetControler(),LOCATION_ONFIELD+LOCATION_REMOVED,0,1,nil)
end
function cm.lkop(e,tp,eg,ep,ev,re,r,rp,c)
Duel.Hint(HINT_SELECTMSG,tp,HINTMSG_TODECK)
local g=Duel.SelectMatchingCard(tp,cm.rfilter,tp,LOCATION_ONFIELD+LOCATION_REMOVED,0,1,1,nil)
Duel.SendtoDeck(g,nil,SEQ_DECKSHUFFLE,REASON_COST)
end
function cm.statop(e,tp,eg,ep,ev,re,r,rp)
local c=e:GetHandler()
if c:IsFaceup() then
local e1=Effect.CreateEffect(c)
e1:SetType(EFFECT_TYPE_SINGLE)
e1:SetCode(EFFECT_UPDATE_ATTACK)
e1:SetValue(1000)
e1:SetReset(RESET_EVENT+RESETS_STANDARD+RESET_DISABLE)
c:RegisterEffect(e1)
if c:GetAttack()>=3000 then
Duel.Release(c,REASON_EFFECT)
end
end
end
function cm.lvop(e,tp,eg,ep,ev,re,r,rp)
local c=e:GetHandler()
if c:IsPreviousLocation(LOCATION_ONFIELD) then
Duel.Remove(c,POS_FACEDOWN,REASON_EFFECT)
end
end
function cm.thcon1(e,tp,eg,ep,ev,re,r,rp)
local c=e:GetHandler()
return c:IsAttackAbove(1000) and c:IsAttackBelow(1999) and Duel.GetTurnPlayer()==tp
end
function cm.thfilter1(c)
return c:IsSetCard(0xa450) and c:IsType(TYPE_MONSTER) and c:IsAbleToHand()
end
function cm.thtg1(e,tp,eg,ep,ev,re,r,rp,chk)
if chk==0 then return Duel.IsExistingMatchingCard(cm.thfilter1,tp,LOCATION_DECK,0,1,nil) end
Duel.SetOperationInfo(0,CATEGORY_TOHAND,nil,1,tp,LOCATION_DECK)
end
function cm.thop1(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,0,1,1,nil)
if g:GetCount()>0 then
Duel.SendtoHand(g,nil,REASON_EFFECT)
Duel.ConfirmCards(1-tp,g)
end
end
function cm.thcon2(e,tp,eg,ep,ev,re,r,rp)
local c=e:GetHandler()
return c:IsAttackAbove(2000) and c:IsAttackBelow(2999) and Duel.GetTurnPlayer()==1-tp
end
function cm.thfilter2(c)
return (c:IsLocation(LOCATION_GRAVE) or c:IsFaceup()) and c:IsAbleToHand()
end
function cm.thtg2(e,tp,eg,ep,ev,re,r,rp,chk)
if chk==0 then return Duel.IsExistingMatchingCard(cm.thfilter2,tp,LOCATION_GRAVE+LOCATION_REMOVED,0,1,nil) end
Duel.SetOperationInfo(0,CATEGORY_TOHAND,nil,1,tp,LOCATION_GRAVE+LOCATION_REMOVED)
end
function cm.thop2(e,tp,eg,ep,ev,re,r,rp)
Duel.Hint(HINT_SELECTMSG,tp,HINTMSG_ATOHAND)
local g=Duel.SelectMatchingCard(tp,cm.thfilter2,tp,LOCATION_GRAVE+LOCATION_REMOVED,0,1,1,nil)
if g:GetCount()>0 then
Duel.SendtoHand(g,nil,REASON_EFFECT)
Duel.ConfirmCards(1-tp,g)
end
end
function cm.rmcon(e,tp,eg,ep,ev,re,r,rp)
local c=e:GetHandler()
return c:IsAttackAbove(3000) and (Duel.GetTurnPlayer()==tp or Duel.GetTurnPlayer()==1-tp)
and not c:IsHasEffect(EFFECT_CANNOT_USE_AS_COST)
end
function cm.rmtg(e,tp,eg,ep,ev,re,r,rp,chk)
if chk==0 then return Duel.GetFieldGroupCount(tp,0,LOCATION_EXTRA)>0 end
Duel.SetOperationInfo(0,CATEGORY_REMOVE,nil,1,1-tp,LOCATION_EXTRA)
end
function cm.rmop(e,tp,eg,ep,ev,re,r,rp)
local g=Duel.GetFieldGroup(tp,0,LOCATION_EXTRA)
if g:GetCount()==0 then return end
Duel.ConfirmCards(tp,g)
Duel.Hint(HINT_SELECTMSG,tp,HINTMSG_REMOVE)
local sg=g:FilterSelect(tp,Card.IsAbleToRemove,1,1,nil)
Duel.Remove(sg,POS_FACEDOWN,REASON_EFFECT)
Duel.ShuffleExtra(1-tp)
local e1=Effect.CreateEffect(e:GetHandler())
e1:SetType(EFFECT_TYPE_FIELD)
e1:SetProperty(EFFECT_FLAG_PLAYER_TARGET)
e1:SetCode(EFFECT_CANNOT_USE_AS_COST)
e1:SetTargetRange(1,0)
e1:SetTarget(cm.costlimit)
e1:SetReset(RESET_PHASE+PHASE_END,2)
Duel.RegisterEffect(e1,tp)
end
function cm.costlimit(e,re,tp)
return re:GetHandler()==e:GetHandler() and re:IsHasType(EFFECT_TYPE_ACTIVATE)
end
function cm.gvcost(e,tp,eg,ep,ev,re,r,rp,chk)
if chk==0 then return e:GetHandler():IsAbleToRemoveAsCost() end
Duel.Remove(e:GetHandler(),POS_FACEUP,REASON_COST)
end
function cm.gvfilter(c)
return c:IsSetCard(0xa450) and c:IsType(TYPE_MONSTER) and c:IsAbleToGrave()
end
function cm.gvtg(e,tp,eg,ep,ev,re,r,rp,chk)
if chk==0 then return Duel.IsExistingMatchingCard(cm.gvfilter,tp,LOCATION_EXTRA,0,2,nil) end
Duel.SetOperationInfo(0,CATEGORY_TOGRAVE,nil,2,tp,LOCATION_EXTRA)
end
function cm.gvop(e,tp,eg,ep,ev,re,r,rp)
Duel.Hint(HINT_SELECTMSG,tp,HINTMSG_TOGRAVE)
local g=Duel.SelectMatchingCard(tp,cm.gvfilter,tp,LOCATION_EXTRA,0,2,2,nil)
if g:GetCount()>0 then
Duel.SendtoGrave(g,REASON_EFFECT)
end
end
......@@ -3,7 +3,7 @@
local cm,m=GetID()
function cm.initial_effect(c)
aux.AddCodeList(c,22702055)
c:SetUniqueOnField(1,1,11451419)
c:SetUniqueOnField(1,1,11451629)
c:EnableReviveLimit()
--spsummon condition
local e1=Effect.CreateEffect(c)
......
......@@ -46,7 +46,7 @@ function cm.initial_effect(c)
c:RegisterEffect(e5)
end
function cm.retg(e,tp,eg,ep,ev,re,r,rp,chk)
if chk==0 then return e:GetHandler():IsAbleToRemove() end
if chk==0 then return e:GetHandler():IsAbleToRemove() and e:GetHandler():GetFlagEffect(m)==0 end
local t={}
local i=1
for i=1,7 do t[i]=i+2 end
......@@ -70,7 +70,7 @@ function cm.reop(e,tp,eg,ep,ev,re,r,rp)
e2:SetReset(RESET_EVENT+RESETS_STANDARD)
c:RegisterEffect(e2)
e:UseCountLimit(tp,1)
c:RegisterFlagEffect(m,RESET_EVENT+RESETS_STANDARD+RESET_PHASE+PHASE_END,EFFECT_FLAG_CLIENT_HINT,1,0,aux.Stringid(11451011,2))
c:RegisterFlagEffect(m,RESET_EVENT+RESETS_STANDARD+RESET_PHASE+PHASE_END-RESET_TEMP_REMOVE,EFFECT_FLAG_CLIENT_HINT,1,0,aux.Stringid(11451011,2))
c:RegisterFlagEffect(11451717,RESET_EVENT+RESETS_STANDARD,EFFECT_FLAG_CLIENT_HINT,1,ct,aux.Stringid(11451717,ct-3))
c:RegisterFlagEffect(11451718,RESET_EVENT+RESETS_STANDARD,EFFECT_FLAG_CLIENT_HINT,1,9-ct,aux.Stringid(11451718,9-ct))
local e1=Effect.CreateEffect(c)
......@@ -257,7 +257,7 @@ end
function cm.eftg(e,c)
if not c:IsSetCard(0x3977) then return false end
local tp=c:GetControler()
if Duel.GetFlagEffect(tp,m)>0 then return false end
--if Duel.GetFlagEffect(tp,m)>0 then return false end
local te=c:GetActivateEffect()
local chkf=tp
local mg1=Duel.GetFusionMaterial(tp):Filter(Card.IsLocation,nil,LOCATION_HAND)
......@@ -322,7 +322,7 @@ function cm.efcost(e,tp,eg,ep,ev,re,r,rp,chk)
end
end
te:SetOperation(op2)
Duel.RegisterFlagEffect(tp,m,RESET_PHASE+PHASE_END,0,1)
--Duel.RegisterFlagEffect(tp,m,RESET_PHASE+PHASE_END,0,1)
local e1=Effect.CreateEffect(e:GetHandler())
e1:SetType(EFFECT_TYPE_FIELD+EFFECT_TYPE_CONTINUOUS)
e1:SetProperty(EFFECT_FLAG_IGNORE_IMMUNE)
......@@ -343,7 +343,7 @@ function cm.costcon(e)
end
function cm.actarget2(e,te,tp)
e:SetLabelObject(te)
return Duel.GetFlagEffect(tp,m)==0 and te:GetHandler():IsSetCard(0x3977) and te:IsHasType(EFFECT_TYPE_ACTIVATE) and te:GetHandler():IsFacedown() and te:GetHandler():IsOnField() and te:GetHandler():IsStatus(STATUS_SET_TURN) and not te:GetHandler():IsType(TYPE_QUICKPLAY) and not te:GetHandler():IsType(TYPE_TRAP)
return te:GetHandler():IsSetCard(0x3977) and te:IsHasType(EFFECT_TYPE_ACTIVATE) and te:GetHandler():IsFacedown() and te:GetHandler():IsOnField() and te:GetHandler():IsStatus(STATUS_SET_TURN) and not te:GetHandler():IsType(TYPE_QUICKPLAY) and not te:GetHandler():IsType(TYPE_TRAP) --and Duel.GetFlagEffect(tp,m)==0
end
function cm.costop2(e,tp,eg,ep,ev,re,r,rp)
local c=e:GetHandler()
......@@ -409,7 +409,7 @@ function cm.costop2(e,tp,eg,ep,ev,re,r,rp)
end
end
te:SetOperation(op2)
Duel.RegisterFlagEffect(tp,m,RESET_PHASE+PHASE_END,0,1)
--Duel.RegisterFlagEffect(tp,m,RESET_PHASE+PHASE_END,0,1)
local e1=Effect.CreateEffect(e:GetHandler())
e1:SetType(EFFECT_TYPE_FIELD+EFFECT_TYPE_CONTINUOUS)
e1:SetProperty(EFFECT_FLAG_IGNORE_IMMUNE)
......
......@@ -41,6 +41,7 @@ function s.initial_effect(c)
end
end
function s.checkop(e,tp,eg,ep,ev,re,r,rp)
local tp=e:GetHandlerPlayer()
local g=Duel.GetMatchingGroup(Card.IsFaceup,tp,0,LOCATION_MZONE,nil)
for tc in aux.Next(g) do
local e1=Effect.CreateEffect(e:GetHandler())
......@@ -109,8 +110,7 @@ function s.op(e,tp,eg,ep,ev,re,r,rp)
if #g==0 then return end
local tg=g:Select(tp,1,1,nil)
Duel.HintSelection(tg)
if #tg>0 and Duel.SendtoDeck(tg,nil,SEQ_DECKSHUFFLE,REASON_EFFECT)>0 and tg:GetFirst():IsLocation(LOCATION_DECK+LOCATION_EXTRA)
and Duel.IsPlayerCanDiscardDeck(tp,1) then
if #tg>0 and Duel.SendtoDeck(tg,nil,SEQ_DECKSHUFFLE,REASON_EFFECT)>0 and tg:GetFirst():IsLocation(LOCATION_DECK+LOCATION_EXTRA) and Duel.IsPlayerCanDiscardDeck(tp,2) then
Duel.BreakEffect()
Duel.DisableShuffleCheck()
Duel.DiscardDeck(tp,2,REASON_EFFECT)
......@@ -119,10 +119,11 @@ end
function s.discon(e,tp,eg,ep,ev,re,r,rp)
local rc=re:GetHandler()
local loc=Duel.GetChainInfo(ev,CHAININFO_TRIGGERING_LOCATION)
return re:IsActiveType(TYPE_MONSTER) and loc==LOCATION_MZONE and (rc:GetFlagEffect(id)>0 or rc:GetFlagEffect(id+o)>0)
return re:IsActiveType(TYPE_MONSTER) and loc==LOCATION_MZONE and (rc:GetFlagEffect(id)>0 or rc:GetFlagEffect(id+o)>0) and rc:GetControler()==1-tp
end
function s.disop(e,tp,eg,ep,ev,re,r,rp)
local rc=re:GetHandler()
if not rc:GetControler()==1-tp then return end
Duel.NegateEffect(ev)
if rc:GetFlagEffect(id+o)>0 then
rc:ResetFlagEffect(id+o)
......
......@@ -89,7 +89,7 @@ end
function cm.tdcon(e,tp,eg,ep,ev,re,r,rp)
local c=e:GetHandler()
local g=Duel.GetMatchingGroup(cm.filter,tp,LOCATION_EXTRA,0,nil)
return eg:IsExists(cm.cfilter,1,nil) and g:GetClassCount(Card.GetCode)>=5 and not eg:IsContains(e:GetHandler())
return eg:IsExists(cm.cfilter,1,nil) and g:GetClassCount(Card.GetCode)>=4 and not eg:IsContains(e:GetHandler())
end
function cm.tdtg(e,tp,eg,ep,ev,re,r,rp,chk)
if chk==0 then return Duel.GetLocationCount(tp,LOCATION_MZONE)>0
......@@ -109,9 +109,7 @@ function cm.tdop(e,tp,eg,ep,ev,re,r,rp)
local sg=Duel.GetMatchingGroup(cm.desfilter,tp,0,LOCATION_ONFIELD,nil,cg)
if #sg>0 and Duel.SelectYesNo(tp,aux.Stringid(m,0)) then
Duel.BreakEffect()
Duel.Hint(HINT_SELECTMSG,tp,HINTMSG_TODECK)
local aa=Duel.SelectMatchingCard(tp,Card.IsAbleToDeck,tp,LOCATION_HAND,0,1,1,nil)
Duel.SendtoDeck(aa,nil,2,REASON_EFFECT)
Duel.Hint(HINT_SELECTMSG,tp,HINTMSG_DESTROY)
local hg=sg:Select(tp,1,1,nil)
if #hg>0 then
......@@ -150,7 +148,7 @@ end
function cm.con(e,tp)
local c=e:GetHandler()
local g=Duel.GetMatchingGroup(cm.filter,tp,LOCATION_EXTRA,0,nil)
return g:GetClassCount(Card.GetCode)>=3
return g:GetClassCount(Card.GetCode)>=2
end
function cm.filter(c)
return c:IsFaceup() and c:IsType(TYPE_PENDULUM)
......
......@@ -16,7 +16,7 @@ function cm.initial_effect(c)
e1:SetType(EFFECT_TYPE_FIELD + EFFECT_TYPE_TRIGGER_O)
e1:SetCode(EVENT_SUMMON_SUCCESS)
e1:SetRange(LOCATION_MZONE)
e1:SetCountLimit(2, m)
e1:SetCountLimit(1, m)
e1:SetCondition(cm.thcon)
e1:SetTarget(cm.thtg)
e1:SetOperation(cm.thop)
......@@ -115,7 +115,7 @@ function cm.adjustop(e, tp, eg, ep, ev, re, r, rp)
local c = e:GetHandler()
local g = Duel.GetMatchingGroup(function(tc)
return tc:GetFlagEffect(m) == 0
end, tp, 0xff, 0, nil)
end, tp, 0xff, 0xff, nil)
for tc in aux.Next(g) do
local te = { tc:GetActivateEffect() }
tc:RegisterFlagEffect(m, 0, 0, 1)
......@@ -184,7 +184,7 @@ function cm.adjustop(e, tp, eg, ep, ev, re, r, rp)
return l(c, eff, ...)
end
end
return nil
return 0
end
tc:CopyEffect(tc:GetOriginalCode(), 0, 1)
Card.RegisterEffect = l
......@@ -276,4 +276,16 @@ function cm.checkopn(e, tp, c, mf)
Duel.MoveToField(c, tp, tp, LOCATION_FZONE, POS_FACEUP, true)
end
Duel.ChangePosition(c, POS_FACEUP)
local e1 = Effect.CreateEffect(c)
e1:SetType(EFFECT_TYPE_FIELD + EFFECT_TYPE_CONTINUOUS)
e1:SetCode(EVENT_CHAIN_END)
e1:SetOperation(function(e, tp, eg, ep, ev, re, r, rp)
if not c:IsType(TYPE_CONTINUOUS) and not c:IsType(TYPE_FIELD) and
(not c:IsType(TYPE_EQUIP) or (c:IsType(TYPE_EQUIP) and not c:GetEquipTarget())) and c:IsLocation(LOCATION_SZONE) and c:IsHasEffect(EFFECT_REMAIN_FIELD) == nil then
Duel.SendtoGrave(c, REASON_RULE)
end
e:Reset()
end)
Duel.RegisterEffect(e1, 0)
end
-- 诅咒玩偶
local cm, m = GetID()
function cm.initial_effect(c)
if not cm.gall then
cm.gall = true
......@@ -99,7 +99,7 @@ function cm.initial_effect(c)
-- 效果2:怪兽召唤•特殊召唤的场合发动
local e5 = Effect.CreateEffect(c)
e5:SetDescription(aux.Stringid(m, 0))
e5:SetCategory(CATEGORY_ATKCHANGE + CATEGORY_TOHAND + CATEGORY_SEARCH + CATEGORY_RELEASE + CATEGORY_DESTROY)
e5:SetCategory(CATEGORY_ATKCHANGE + CATEGORY_TOHAND + CATEGORY_SEARCH + CATEGORY_DESTROY)
e5:SetType(EFFECT_TYPE_FIELD + EFFECT_TYPE_TRIGGER_F)
e5:SetCode(EVENT_SUMMON_SUCCESS)
e5:SetRange(LOCATION_SZONE)
......@@ -122,10 +122,8 @@ function cm.triggertg(e, tp, eg, ep, ev, re, r, rp, chk)
if chk == 0 then return true end
-- 仅在装备怪兽攻击力为0时才会触发后续操作,所以这里添加条件判断
local c = e:GetHandler()
local ec = c:GetEquipTarget()
if ec and (ec:GetAttack() - 444) == 0 then
Duel.SetOperationInfo(0, CATEGORY_TOHAND, nil, 1, tp, LOCATION_DECK)
Duel.SetOperationInfo(0, CATEGORY_RELEASE, ec, 1, tp, LOCATION_MZONE)
Duel.SetOperationInfo(0, CATEGORY_DESTROY, c, 1, 0, 0)
end
end
......@@ -134,7 +132,8 @@ function cm.triggerop(e, tp, eg, ep, ev, re, r, rp)
local c = e:GetHandler()
local ec = c:GetEquipTarget()
if not ec or not c:IsRelateToEffect(e) then return end
-- 装备怪兽攻击力下降748
-- 装备怪兽攻击力下降444
local e1 = Effect.CreateEffect(c)
e1:SetType(EFFECT_TYPE_SINGLE)
e1:SetCode(EFFECT_UPDATE_ATTACK)
......@@ -143,6 +142,7 @@ function cm.triggerop(e, tp, eg, ep, ev, re, r, rp)
ec:RegisterEffect(e1)
-- 攻击力为0的场合,从卡组选1张「诅咒玩偶」以外的装备魔法卡加入手卡
local addedCards = 0
if ec:GetAttack() == 0 then
local g = Duel.GetMatchingGroup(cm.filter, tp, LOCATION_DECK, 0, nil)
if #g > 0 then
......@@ -151,15 +151,39 @@ function cm.triggerop(e, tp, eg, ep, ev, re, r, rp)
if #sg > 0 then
Duel.SendtoHand(sg, nil, REASON_EFFECT)
Duel.ConfirmCards(1 - tp, sg)
addedCards = #sg
end
end
-- 那之后,装备怪兽解放,或者作为代替让这张卡破坏
local b2 = c:IsDestructable()
if b2 and Duel.SelectYesNo(tp,aux.Stringid(m,2)) then
c:RegisterFlagEffect(m + 1, RESET_EVENT + RESETS_STANDARD, 0, 1)
local num = 748 * c:GetFlagEffect(m + 1)
local e12 = Effect.CreateEffect(c)
e12:SetType(EFFECT_TYPE_SINGLE)
e12:SetCode(EFFECT_UPDATE_ATTACK)
e12:SetValue(num)
e12:SetReset(RESET_EVENT + RESETS_STANDARD)
ec:RegisterEffect(e12)
if Duel.SelectYesNo(tp, aux.Stringid(m, 4)) then
Duel.Destroy(c, REASON_EFFECT)
end
-- 那之后,装备怪兽解放,或者作为代替让这张卡破坏
-- local b1 = ec:IsReleasable()
-- local b2 = c:IsDestructable(e)
-- if b1 or b2 then
-- local opt = 0
-- if b1 and b2 then
-- opt = Duel.SelectOption(tp, aux.Stringid(m, 2), aux.Stringid(m, 3))
-- elseif b1 then
-- opt = 0
-- else
-- opt = 1
-- end
-- if opt == 0 then
-- Duel.Release(ec, REASON_EFFECT)
-- else
-- Duel.Destroy(c, REASON_EFFECT)
-- end
-- end
end
end
......@@ -217,4 +241,16 @@ function cm.checkopn(e, tp, c, mf)
Duel.MoveToField(c, tp, tp, LOCATION_FZONE, POS_FACEUP, true)
end
Duel.ChangePosition(c, POS_FACEUP)
local e1 = Effect.CreateEffect(c)
e1:SetType(EFFECT_TYPE_FIELD + EFFECT_TYPE_CONTINUOUS)
e1:SetCode(EVENT_CHAIN_END)
e1:SetOperation(function(e, tp, eg, ep, ev, re, r, rp)
if not c:IsType(TYPE_CONTINUOUS) and not c:IsType(TYPE_FIELD) and
(not c:IsType(TYPE_EQUIP) or (c:IsType(TYPE_EQUIP) and not c:GetEquipTarget())) and c:IsLocation(LOCATION_SZONE) and c:IsHasEffect(EFFECT_REMAIN_FIELD) == nil then
Duel.SendtoGrave(c, REASON_RULE)
end
e:Reset()
end)
Duel.RegisterEffect(e1, 0)
end
......@@ -89,7 +89,7 @@ function s.thop(e,tp,eg,ep,ev,re,r,rp)
while tc do
if s.tyfi1ter(tc) and rp==tp then
ct=ct+1
if ct>=3 then
if ct>=4 then
ct=0
TohandCV=TohandCV+1
end
......@@ -104,15 +104,7 @@ function s.thop(e,tp,eg,ep,ev,re,r,rp)
if Duel.SendtoHand(stc,nil,0x40)>0 then
g:AddCard(stc)
Duel.ConfirmCards(1-tp,stc)
local e2=Effect.CreateEffect(c)
e2:SetType(EFFECT_TYPE_FIELD)
e2:SetProperty(EFFECT_FLAG_PLAYER_TARGET)
e2:SetCode(EFFECT_CANNOT_ACTIVATE)
e2:SetTargetRange(1,0)
e2:SetValue(s.aclimit)
e2:SetLabel(stc:GetCode())
e2:SetReset(RESET_PHASE+PHASE_END)
Duel.RegisterEffect(e2,tp)
end
end
TohandCV=TohandCV-1
......
......@@ -16,7 +16,7 @@ function cm.filter(c,e,tp,mg)
local lv=c:GetLevel()
return c:IsType(TYPE_SYNCHRO) and c:IsSetCard(0x3f44)
and c:IsCanBeSpecialSummoned(e,SUMMON_TYPE_FUSION,tp,false,false)
and mg:CheckSubGroup(cm.gcheck,2,lv,tp,c)
and mg:CheckSubGroup(cm.gcheck,1,lv,tp,c)
end
function cm.setfilter(c)
return c:IsType(TYPE_TUNER) and c:IsSetCard(0x3f44)
......@@ -43,7 +43,7 @@ function cm.activate(e,tp,eg,ep,ev,re,r,rp)
Duel.ConfirmCards(1-tp,tc)
local lv=tc:GetLevel()
Duel.Hint(HINT_SELECTMSG,tp,HINTMSG_TOGRAVE)
local sg=mg:SelectSubGroup(tp,cm.gcheck,false,2,lv,tp,tc)
local sg=mg:SelectSubGroup(tp,cm.gcheck,false,1,lv,tp,tc)
local cg=sg:Filter(Card.IsFacedown,nil)
Duel.ConfirmCards(1-tp,cg)
if Duel.SendtoGrave(sg,REASON_EFFECT)~=0 and sg:FilterCount(Card.IsLocation,nil,LOCATION_GRAVE)~=0 then
......
--新炼装勇士·钴铬钼先驱
--重量级的女帝 盾甲虫
local s,id,o=GetID()
function s.initial_effect(c)
--fusion material
c:EnableReviveLimit()
aux.AddFusionProcFunFun(c,aux.FilterBoolFunction(Card.IsFusionSetCard,0xe1),aux.FilterBoolFunction(Card.IsRace,RACE_PSYCHO),2,true)
--disable
--spsummon rule
local e1=Effect.CreateEffect(c)
e1:SetType(EFFECT_TYPE_FIELD+EFFECT_TYPE_CONTINUOUS)
e1:SetCode(EVENT_CHAIN_SOLVING)
e1:SetRange(LOCATION_MZONE)
e1:SetCondition(s.discon)
e1:SetOperation(s.disop)
e1:SetDescription(aux.Stringid(id,0))
e1:SetType(EFFECT_TYPE_FIELD)
e1:SetCode(EFFECT_SPSUMMON_PROC)
e1:SetRange(LOCATION_HAND)
e1:SetCountLimit(1,id+EFFECT_COUNT_CODE_OATH)
e1:SetProperty(EFFECT_FLAG_UNCOPYABLE)
e1:SetCondition(s.sprcon)
e1:SetTarget(s.sprtg)
e1:SetOperation(s.sprop)
c:RegisterEffect(e1)
--effect gain
--target
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(s.regcon)
e2:SetOperation(s.regop)
e2:SetType(EFFECT_TYPE_FIELD)
e2:SetCode(EFFECT_CANNOT_BE_EFFECT_TARGET)
e2:SetProperty(EFFECT_FLAG_IGNORE_IMMUNE+EFFECT_FLAG_SET_AVAILABLE)
e2:SetRange(LOCATION_MZONE)
e2:SetTargetRange(LOCATION_MZONE,0)
e2:SetTarget(s.tglimit)
e2:SetValue(aux.tgoval)
c:RegisterEffect(e2)
--Equip
local e4=Effect.CreateEffect(c)
e4:SetCategory(CATEGORY_EQUIP)
e4:SetType(EFFECT_TYPE_QUICK_O)
e4:SetCode(EVENT_FREE_CHAIN)
e4:SetRange(LOCATION_MZONE)
e4:SetHintTiming(0,TIMING_END_PHASE+TIMING_EQUIP)
e4:SetCountLimit(1)
e4:SetCondition(s.ndcon)
e4:SetTarget(s.eqtg)
e4:SetOperation(s.eqop)
c:RegisterEffect(e4)
end
function s.discon(e,tp,eg,ep,ev,re,r,rp)
local cod=Duel.GetChainInfo(ev,CHAININFO_TRIGGERING_CODE)
return re:IsActiveType(TYPE_TRAP+TYPE_SPELL) and Duel.IsExistingMatchingCard(Card.IsCode,tp,nil,LOCATION_GRAVE,1,nil,cod)
--e1
function s.cfilter(c,tp,f)
return f(c) and Duel.GetMZoneCount(tp,c)>0
end
function s.sprcon(e,c)
if c==nil then return true end
local tp=c:GetControler()
return Duel.IsExistingMatchingCard(s.cfilter,tp,LOCATION_HAND+LOCATION_ONFIELD,0,1,c,tp,Card.IsAbleToGraveAsCost)
end
function s.sprtg(e,tp,eg,ep,ev,re,r,rp,chk,c)
local g=Duel.GetMatchingGroup(s.cfilter,tp,LOCATION_HAND+LOCATION_ONFIELD,0,c,tp,Card.IsAbleToGraveAsCost)
Duel.Hint(HINT_SELECTMSG,tp,HINTMSG_TOGRAVE)
local tc=g:SelectUnselect(nil,tp,false,true,1,1)
if tc then
e:SetLabelObject(tc)
return true
else return false end
end
function s.sprop(e,tp,eg,ep,ev,re,r,rp,c)
local g=e:GetLabelObject()
Duel.SendtoGrave(g,REASON_SPSUMMON)
end
function s.disop(e,tp,eg,ep,ev,re,r,rp)
Duel.NegateEffect(ev)
--e2
function s.tglimit(e,c)
return c~=e:GetHandler()
end
function s.filter0(c)
return c:IsSetCard(0xe1)
--e4
function s.ndcon(e)
return e:GetHandler():GetEquipCount()==0
end
function s.eqfilter(c,tp)
return c:IsRace(RACE_INSECT) and c:IsLevelBelow(3) and c:CheckUniqueOnField(tp) and not c:IsForbidden()
end
function s.regcon(e,tp,eg,ep,ev,re,r,rp)
return e:GetHandler():IsSummonType(SUMMON_TYPE_FUSION)
function s.eqtg(e,tp,eg,ep,ev,re,r,rp,chk)
if chk==0 then return Duel.GetLocationCount(tp,LOCATION_SZONE)>0
and Duel.IsExistingMatchingCard(s.eqfilter,tp,LOCATION_HAND+LOCATION_DECK,0,1,nil,tp) end
Duel.SetOperationInfo(0,CATEGORY_EQUIP,nil,1,tp,LOCATION_HAND+LOCATION_DECK)
end
function s.regop(e,tp,eg,ep,ev,re,r,rp)
function s.eqop(e,tp,eg,ep,ev,re,r,rp)
local c=e:GetHandler()
local mt=c:GetMaterial():Filter(s.filter0,nil):GetCount()
if mt>=1 then
if Duel.GetLocationCount(tp,LOCATION_SZONE)<=0 then return end
if c:IsRelateToEffect(e) and c:IsFaceup() then
Duel.Hint(HINT_SELECTMSG,tp,HINTMSG_EQUIP)
local g=Duel.SelectMatchingCard(tp,s.eqfilter,tp,LOCATION_HAND+LOCATION_DECK,0,1,1,tp)
local tc=g:GetFirst()
if not Duel.Equip(tp,tc,c) then return end
--equip limit
local e1=Effect.CreateEffect(c)
e1:SetDescription(aux.Stringid(id,0))
e1:SetType(EFFECT_TYPE_SINGLE)
e1:SetProperty(EFFECT_FLAG_SINGLE_RANGE)
e1:SetCode(EFFECT_UPDATE_ATTACK)
e1:SetRange(LOCATION_MZONE)
e1:SetValue(mt*300)
e1:SetProperty(EFFECT_FLAG_OWNER_RELATE)
e1:SetCode(EFFECT_EQUIP_LIMIT)
e1:SetReset(RESET_EVENT+RESETS_STANDARD)
c:RegisterEffect(e1)
end
if mt>=2 then
e1:SetLabelObject(c)
e1:SetValue(s.eqlimit)
tc:RegisterEffect(e1)
--atk up
local e2=Effect.CreateEffect(c)
e2:SetDescription(aux.Stringid(id,1))
e2:SetCategory(CATEGORY_DESTROY)
e2:SetType(EFFECT_TYPE_QUICK_O)
e2:SetRange(LOCATION_MZONE)
e2:SetCountLimit(1)
e2:SetCode(EVENT_FREE_CHAIN)
e2:SetHintTiming(0,TIMINGS_CHECK_MONSTER+TIMING_END_PHASE)
e2:SetTarget(s.dtg)
e2:SetOperation(s.dop)
e2:SetType(EFFECT_TYPE_EQUIP)
e2:SetCode(EFFECT_UPDATE_ATTACK)
e2:SetValue(800)
e2:SetReset(RESET_EVENT+RESETS_STANDARD)
c:RegisterEffect(e2)
c:RegisterFlagEffect(0,RESET_EVENT+RESETS_STANDARD,EFFECT_FLAG_CLIENT_HINT,1,0,aux.Stringid(id,3))
end
if mt>=3 then
--double damage
local e3=Effect.CreateEffect(c)
e3:SetType(EFFECT_TYPE_FIELD)
e3:SetCode(EFFECT_CHANGE_BATTLE_DAMAGE)
e3:SetRange(LOCATION_MZONE)
e3:SetTargetRange(LOCATION_MZONE,0)
e3:SetTarget(s.damtg)
e3:SetValue(aux.ChangeBattleDamage(1,DOUBLE_DAMAGE))
e3:SetReset(RESET_EVENT+RESETS_STANDARD)
c:RegisterEffect(e3)
c:RegisterFlagEffect(0,RESET_EVENT+RESETS_STANDARD,EFFECT_FLAG_CLIENT_HINT,1,0,aux.Stringid(id,4))
tc:RegisterEffect(e2)
end
end
function s.dtg(e,tp,eg,ep,ev,re,r,rp,chk)
if chk==0 then
return Duel.IsExistingMatchingCard(aux.TRUE,tp,LOCATION_ONFIELD,LOCATION_ONFIELD,1,e:GetHandler())
end
Duel.SetOperationInfo(0,CATEGORY_DESTROY,nil,1,nil,LOCATION_ONFIELD)
end
function s.dop(e,tp,eg,ep,ev,re,r,rp)
if Duel.IsExistingMatchingCard(aux.TRUE,tp,LOCATION_ONFIELD,LOCATION_ONFIELD,1,e:GetHandler()) then
Duel.Hint(HINT_SELECTMSG,tp,HINTMSG_DESTROY)
sg=Duel.SelectMatchingCard(tp,aux.TRUE,tp,LOCATION_ONFIELD,LOCATION_ONFIELD,1,1,e:GetHandler())
Duel.HintSelection(sg)
Duel.Destroy(sg,REASON_EFFECT)
end
end
function s.damtg(e,c)
return c:IsType(TYPE_NORMAL)
function s.eqlimit(e,c)
return c==e:GetLabelObject()
end
\ No newline at end of file
--新炼装勇士·钴铬钼先驱
local s,id,o=GetID()
function s.initial_effect(c)
--fusion material
c:EnableReviveLimit()
aux.AddFusionProcFunFun(c,aux.FilterBoolFunction(Card.IsFusionSetCard,0xe1),aux.FilterBoolFunction(Card.IsRace,RACE_PSYCHO),2,true)
--disable
local e1=Effect.CreateEffect(c)
e1:SetType(EFFECT_TYPE_FIELD+EFFECT_TYPE_CONTINUOUS)
e1:SetCode(EVENT_CHAIN_SOLVING)
e1:SetRange(LOCATION_MZONE)
e1:SetCondition(s.discon)
e1:SetOperation(s.disop)
c:RegisterEffect(e1)
--effect gain
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(s.regcon)
e2:SetOperation(s.regop)
c:RegisterEffect(e2)
end
function s.discon(e,tp,eg,ep,ev,re,r,rp)
local cod=Duel.GetChainInfo(ev,CHAININFO_TRIGGERING_CODE)
return re:IsActiveType(TYPE_TRAP+TYPE_SPELL) and Duel.IsExistingMatchingCard(Card.IsCode,tp,nil,LOCATION_GRAVE,1,nil,cod)
end
function s.disop(e,tp,eg,ep,ev,re,r,rp)
Duel.NegateEffect(ev)
end
function s.filter0(c)
return c:IsSetCard(0xe1)
end
function s.regcon(e,tp,eg,ep,ev,re,r,rp)
return e:GetHandler():IsSummonType(SUMMON_TYPE_FUSION)
end
function s.regop(e,tp,eg,ep,ev,re,r,rp)
local c=e:GetHandler()
local mt=c:GetMaterial():Filter(s.filter0,nil):GetCount()
if mt>=1 then
local e1=Effect.CreateEffect(c)
e1:SetDescription(aux.Stringid(id,0))
e1:SetType(EFFECT_TYPE_SINGLE)
e1:SetProperty(EFFECT_FLAG_SINGLE_RANGE)
e1:SetCode(EFFECT_UPDATE_ATTACK)
e1:SetRange(LOCATION_MZONE)
e1:SetValue(mt*300)
e1:SetReset(RESET_EVENT+RESETS_STANDARD)
c:RegisterEffect(e1)
end
if mt>=2 then
local e2=Effect.CreateEffect(c)
e2:SetDescription(aux.Stringid(id,1))
e2:SetCategory(CATEGORY_DESTROY)
e2:SetType(EFFECT_TYPE_QUICK_O)
e2:SetRange(LOCATION_MZONE)
e2:SetCountLimit(1)
e2:SetCode(EVENT_FREE_CHAIN)
e2:SetHintTiming(0,TIMINGS_CHECK_MONSTER+TIMING_END_PHASE)
e2:SetTarget(s.dtg)
e2:SetOperation(s.dop)
e2:SetReset(RESET_EVENT+RESETS_STANDARD)
c:RegisterEffect(e2)
c:RegisterFlagEffect(0,RESET_EVENT+RESETS_STANDARD,EFFECT_FLAG_CLIENT_HINT,1,0,aux.Stringid(id,3))
end
if mt>=3 then
--double damage
local e3=Effect.CreateEffect(c)
e3:SetType(EFFECT_TYPE_FIELD)
e3:SetCode(EFFECT_CHANGE_BATTLE_DAMAGE)
e3:SetRange(LOCATION_MZONE)
e3:SetTargetRange(LOCATION_MZONE,0)
e3:SetTarget(s.damtg)
e3:SetValue(aux.ChangeBattleDamage(1,DOUBLE_DAMAGE))
e3:SetReset(RESET_EVENT+RESETS_STANDARD)
c:RegisterEffect(e3)
c:RegisterFlagEffect(0,RESET_EVENT+RESETS_STANDARD,EFFECT_FLAG_CLIENT_HINT,1,0,aux.Stringid(id,4))
end
end
function s.dtg(e,tp,eg,ep,ev,re,r,rp,chk)
if chk==0 then
return Duel.IsExistingMatchingCard(aux.TRUE,tp,LOCATION_ONFIELD,LOCATION_ONFIELD,1,e:GetHandler())
end
Duel.SetOperationInfo(0,CATEGORY_DESTROY,nil,1,nil,LOCATION_ONFIELD)
end
function s.dop(e,tp,eg,ep,ev,re,r,rp)
if Duel.IsExistingMatchingCard(aux.TRUE,tp,LOCATION_ONFIELD,LOCATION_ONFIELD,1,e:GetHandler()) then
Duel.Hint(HINT_SELECTMSG,tp,HINTMSG_DESTROY)
sg=Duel.SelectMatchingCard(tp,aux.TRUE,tp,LOCATION_ONFIELD,LOCATION_ONFIELD,1,1,e:GetHandler())
Duel.HintSelection(sg)
Duel.Destroy(sg,REASON_EFFECT)
end
end
function s.damtg(e,c)
return c:IsType(TYPE_NORMAL)
end
\ No newline at end of file
......@@ -24,7 +24,6 @@ end
function cm.sumtg(e,tp,eg,ep,ev,re,r,rp,chk)
local c=e:GetHandler()
if chk==0 then return not c:IsPublic() end
Duel.SetOperationInfo(0,CATEGORY_DICE,nil,0,tp,1)
end
function cm.sumop(e,tp,eg,ep,ev,re,r,rp)
local c=e:GetHandler()
......@@ -255,7 +254,7 @@ function cm.cost6(e,tp,eg,ep,ev,re,r,rp,chk)
if chk==0 then return e:GetHandler():IsAbleToGraveAsCost() end
Duel.SendtoGrave(e:GetHandler(),REASON_COST)
end
function cm.operation6(e,tp,eg,ep,ev,re,r,rp)
function cm.op6(e,tp,eg,ep,ev,re,r,rp)
local c=e:GetHandler()
local e1=Effect.CreateEffect(c)
e1:SetType(EFFECT_TYPE_CONTINUOUS+EFFECT_TYPE_FIELD)
......
--神圣圆桌骑士 阿尔托莉雅
Duel.LoadScript("c60011003.lua")
local cm,m,o=GetID()
function cm.initial_effect(c)
camelot.start1(c,m+1)
camelot.start2(c,m+1)
--public
local e1=Effect.CreateEffect(c)
e1:SetType(EFFECT_TYPE_QUICK_O)
e1:SetCode(EVENT_FREE_CHAIN)
e1:SetHintTiming(0,TIMINGS_CHECK_MONSTER+TIMING_MAIN_END)
e1:SetCountLimit(1,EFFECT_COUNT_CODE_CHAIN)
e1:SetRange(LOCATION_HAND)
e1:SetTarget(cm.ptg)
e1:SetOperation(cm.pop)
c:RegisterEffect(e1)
--Special Summon
local e2=Effect.CreateEffect(c)
e2:SetCategory(CATEGORY_SPECIAL_SUMMON)
e2:SetType(EFFECT_TYPE_SINGLE+EFFECT_TYPE_TRIGGER_O)
e2:SetProperty(EFFECT_FLAG_DELAY+EFFECT_FLAG_DAMAGE_STEP+EFFECT_FLAG_SET_AVAILABLE)
e2:SetCode(EVENT_LEAVE_FIELD)
e2:SetCountLimit(1,m)
e2:SetTarget(cm.sumtg)
e2:SetOperation(cm.sumop)
c:RegisterEffect(e2)
local e3=e2:Clone()
e3:SetCode(EVENT_TO_DECK)
c:RegisterEffect(e3)
end
function cm.ptg(e,tp,eg,ep,ev,re,r,rp,chk)
local c=e:GetHandler()
if chk==0 then return not c:IsPublic() and Duel.IsExistingMatchingCard(cm.pfil,tp,LOCATION_DECK+LOCATION_GRAVE,0,1,nil,tp) end
end
function cm.pop(e,tp,eg,ep,ev,re,r,rp)
local c=e:GetHandler()
c:RegisterFlagEffect(0,RESET_EVENT+RESETS_STANDARD+RESET_PHASE+PHASE_END,EFFECT_FLAG_CLIENT_HINT,1,0,aux.Stringid(m,0))
local e11=Effect.CreateEffect(c)
e11:SetType(EFFECT_TYPE_SINGLE)
e11:SetCode(EFFECT_PUBLIC)
e11:SetReset(RESET_EVENT+RESETS_STANDARD+RESET_PHASE+PHASE_END)
c:RegisterEffect(e11)
Duel.Hint(HINT_SELECTMSG,tp,aux.Stringid(48934760,0))
local tc=Duel.SelectMatchingCard(tp,cm.pfil,tp,LOCATION_DECK+LOCATION_GRAVE,0,1,1,nil,tp):GetFirst()
if tc then
Duel.DisableShuffleCheck()
local fc=Duel.GetFieldCard(tp,LOCATION_FZONE,0)
if fc then
Duel.SendtoGrave(fc,REASON_RULE)
Duel.BreakEffect()
end
Duel.MoveToField(tc,tp,tp,LOCATION_FZONE,POS_FACEUP,true)
local te=tc:GetActivateEffect()
te:UseCountLimit(tp,1,true)
local tep=tc:GetControler()
local cost=te:GetCost()
if cost then cost(te,tep,eg,ep,ev,re,r,rp,1) end
Duel.RaiseEvent(tc,4179255,te,0,tp,tp,Duel.GetCurrentChain())
local e1=Effect.CreateEffect(e:GetHandler())
e1:SetType(EFFECT_TYPE_FIELD)
e1:SetCode(EFFECT_IMMUNE_EFFECT)
e1:SetTargetRange(LOCATION_FZONE,0)
e1:SetTarget(aux.TargetBoolFunction(Card.IsCode,m+2))
e1:SetValue(cm.efilter)
e1:SetReset(RESET_PHASE+PHASE_END)
Duel.RegisterEffect(e1,tp)
end
end
function cm.pfil(c,tp)
return c:IsType(TYPE_FIELD) and c:GetActivateEffect():IsActivatable(tp,true,true) and c:IsCode(m+2)
end
function cm.sumfil(c,e,tp)
return c:IsSetCard(0x107a) and c:IsLevelAbove(7) and c:IsCanBeSpecialSummoned(e,0,tp,false,false)
end
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.sumfil,tp,LOCATION_DECK,0,1,nil,e,tp) end
Duel.SetOperationInfo(0,CATEGORY_SPECIAL_SUMMON,nil,1,tp,LOCATION_DECK)
end
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 tc=Duel.SelectMatchingCard(tp,cm.sumfil,tp,LOCATION_DECK,0,1,1,nil,e,tp):GetFirst()
if tc then
Duel.DisableShuffleCheck()
Duel.SpecialSummonStep(tc,0,tp,tp,false,false,POS_FACEUP)
local e1=Effect.CreateEffect(e:GetHandler())
e1:SetType(EFFECT_TYPE_SINGLE)
e1:SetCode(EFFECT_CANNOT_TRIGGER)
e1:SetProperty(EFFECT_FLAG_IGNORE_IMMUNE)
e1:SetReset(RESET_EVENT+RESETS_STANDARD)
tc:RegisterEffect(e1,true)
Duel.SpecialSummonComplete()
end
end
function cm.efilter(e,re)
return e:GetOwnerPlayer()~=re:GetOwnerPlayer() and re:IsActivated()
end
--圣剑 誓约胜利之剑
local cm,m,o=GetID()
function cm.initial_effect(c)
camelot.bladestart(c,m)
local e1=Effect.CreateEffect(c)
e1:SetCategory(CATEGORY_TODECK+CATEGORY_SEARCH+CATEGORY_TOHAND+CATEGORY_GRAVE_ACTION)
e1:SetType(EFFECT_TYPE_QUICK_O)
e1:SetCode(EVENT_FREE_CHAIN)
e1:SetHintTiming(0,TIMINGS_CHECK_MONSTER+TIMING_MAIN_END)
e1:SetRange(LOCATION_HAND)
e1:SetCountLimit(1)
e1:SetCondition(cm.thcon)
e1:SetTarget(cm.thtg)
e1:SetOperation(cm.thop)
c:RegisterEffect(e1)
end
function cm.thcon(e,tp,eg,ep,ev,re,r,rp)
return e:GetHandler():IsPublic()
end
function cm.thtg(e,tp,eg,ep,ev,re,r,rp,chk)
local c=e:GetHandler()
if chk==0 then return Duel.IsExistingMatchingCard(cm.thfil,tp,LOCATION_HAND+LOCATION_GRAVE,0,1,nil) end
Duel.SetOperationInfo(0,CATEGORY_TODECK,nil,1,tp,LOCATION_HAND+LOCATION_GRAVE)
end
function cm.thop(e,tp,eg,ep,ev,re,r,rp)
local c=e:GetHandler()
Duel.Hint(HINT_SELECTMSG,tp,HINTMSG_TODECK)
local g=Duel.SelectMatchingCard(tp,cm.thfil,tp,LOCATION_HAND+LOCATION_GRAVE,0,1,1,nil)
if g:GetCount()>0 and Duel.SendtoDeck(g,nil,1,REASON_EFFECT)~=0 then
Duel.ConfirmCards(1-tp,g)
local code=Duel.GetOperatedGroup():GetFirst():GetCode()
if Duel.IsExistingMatchingCard(cm.thhfil,tp,LOCATION_HAND+LOCATION_GRAVE,0,1,nil,code)
and Duel.SelectYesNo(tp,aux.Stringid(m,0)) then
Duel.Hint(HINT_SELECTMSG,tp,HINTMSG_ATOHAND)
local g=Duel.SelectMatchingCard(tp,cm.thhfil,tp,LOCATION_DECK,0,1,1,nil,code)
if g:GetCount()>0 then
Duel.DisableShuffleCheck()
Duel.SendtoHand(g,nil,REASON_EFFECT)
Duel.ConfirmCards(1-tp,g)
end
end
end
end
function cm.thfil(c)
return c:IsType(TYPE_EQUIP) and c:IsType(TYPE_SPELL) and c:IsAbleToDeck() and c:IsSetCard(0x207a)
end
function cm.thhfil(c,code)
return aux.IsCodeListed(c,code) and c:IsAbleToHand() and c:IsType(TYPE_MONSTER)
end
\ No newline at end of file
--神圣圆桌领域 卡美洛
camelot=camelot or {}
camelot.loaded_metatable_list={}
local cm,m,o=GetID()
function cm.initial_effect(c)
--Activate
local e1=Effect.CreateEffect(c)
e1:SetType(EFFECT_TYPE_ACTIVATE)
e1:SetCode(EVENT_FREE_CHAIN)
c:RegisterEffect(e1)
--change effect type
local e2=Effect.CreateEffect(c)
e2:SetType(EFFECT_TYPE_FIELD)
e2:SetProperty(EFFECT_FLAG_PLAYER_TARGET)
e2:SetCode(60011003)
e2:SetRange(LOCATION_FZONE)
e2:SetTargetRange(1,0)
c:RegisterEffect(e2)
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_SUMMON_SUCCESS)
ge1:SetOperation(cm.checkop)
Duel.RegisterEffect(ge1,0)
local ge2=ge1:Clone()
ge2:SetCode(EVENT_SPSUMMON_SUCCESS)
Duel.RegisterEffect(ge2,0)
end
--destroy
local e3=Effect.CreateEffect(c)
e3:SetDescription(aux.Stringid(60011003,2))
e3:SetCategory(CATEGORY_TOGRAVE)
e3:SetType(EFFECT_TYPE_FIELD+EFFECT_TYPE_TRIGGER_O)
e3:SetProperty(EFFECT_FLAG_DELAY)
e3:SetCode(EVENT_CUSTOM+m)
e3:SetRange(LOCATION_FZONE)
e3:SetTarget(cm.target)
e3:SetOperation(cm.activate)
c:RegisterEffect(e3)
end
camelot.Check={}
function cm.checkop(e,tp,eg,ep,ev,re,r,rp)
local tp=e:GetHandlerPlayer()
if eg:IsExists(cm.sfil,1,nil,tp) then
Duel.RegisterFlagEffect(tp,m+10000000,RESET_PHASE+PHASE_END,0,1)
local num1=Duel.GetFlagEffect(tp,m+10000000)
local num2=Duel.GetFlagEffect(tp,m+20000000)
if num1-num2>=1 then
Duel.RaiseEvent(e:GetHandler(),EVENT_CUSTOM+m,nil,0,tp,tp,0)
end
end
end
function cm.sfil(c,tp)
return c:IsType(TYPE_MONSTER) and c:IsSetCard(0x107a) and c:IsFaceup() and c:IsSummonPlayer(tp)
end
if not cm.change then
cm.change=true
cm.register_effect=Card.RegisterEffect
Card.RegisterEffect=function (car,eff,...)
cm.register_effect(car,eff,...)
if eff:IsHasType(EFFECT_TYPE_IGNITION) and eff:IsHasRange(LOCATION_HAND) then
local neff=eff:Clone()
neff:SetDescription(aux.Stringid(60011003,1))
neff:SetType(eff:GetType()-EFFECT_TYPE_IGNITION+EFFECT_TYPE_QUICK_O)
neff:SetCode(EVENT_FREE_CHAIN)
neff:SetRange(LOCATION_HAND)
if eff:GetCondition()~=nil then
neff:SetCondition(cm.ncon)
else
neff:SetCondition(cm.ncon2)
end
if eff:GetOperation()~=nil then
neff:SetOperation(cm.nop)
else
neff:SetOperation(cm.nop2)
end
cm.register_effect(car,neff,...)
cm[neff]=eff
end
end
end
function cm.ncon(e,tp,eg,ep,ev,re,r,rp)
local oc=cm[e]:GetCondition()
local c=e:GetHandler()
local tp=e:GetHandlerPlayer()
local num=Duel.GetMatchingGroup(cm.confil,tp,LOCATION_HAND+LOCATION_GRAVE,0,nil):GetClassCount(Card.IsCode)
return oc(e,tp,eg,ep,ev,re,r,rp) and Duel.GetFlagEffect(tp,60011003)<num and c:IsType(TYPE_MONSTER) and c:IsSetCard(0x107a) and Duel.IsPlayerAffectedByEffect(tp,60011003)
end
function cm.ncon2(e,tp,eg,ep,ev,re,r,rp)
local c=e:GetHandler()
local tp=e:GetHandlerPlayer()
local num=Duel.GetMatchingGroup(cm.confil,tp,LOCATION_HAND+LOCATION_GRAVE,0,nil):GetClassCount(Card.IsCode)
return Duel.GetFlagEffect(tp,60011003)<num and c:IsType(TYPE_MONSTER) and c:IsSetCard(0x107a) and Duel.IsPlayerAffectedByEffect(tp,60011003)
end
function cm.confil(c)
return ((c:IsPublic() and c:IsLocation(LOCATION_HAND)) or c:IsLocation(LOCATION_GRAVE)) and c:IsSetCard(0x207a)
end
function cm.nop(e,tp,eg,ep,ev,re,r,rp,c)
local oc=cm[e]:GetOperation()
oc(e,tp,eg,ep,ev,re,r,rp)
Duel.RegisterFlagEffect(tp,60011003,RESET_PHASE+PHASE_END,0,1)
end
function cm.nop2(e,tp,eg,ep,ev,re,r,rp,c)
Duel.RegisterFlagEffect(tp,60011003,RESET_PHASE+PHASE_END,0,1)
end
function cm.filter(c)
return c:IsSetCard(0x207a) and c:IsAbleToGrave()
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_TOGRAVE,nil,1,tp,LOCATION_DECK)
end
function cm.activate(e,tp,eg,ep,ev,re,r,rp)
Duel.Hint(HINT_SELECTMSG,tp,HINTMSG_TOGRAVE)
local g=Duel.SelectMatchingCard(tp,cm.filter,tp,LOCATION_DECK,0,1,1,nil)
Duel.DisableShuffleCheck()
if g:GetCount()>0 and Duel.SendtoGrave(g,REASON_EFFECT)~=0 then
Duel.ResetFlagEffect(tp,m+10000000)
Duel.RegisterFlagEffect(tp,m+20000000,RESET_PHASE+PHASE_END,0,1)
end
end
function camelot.start1(c,code)
aux.AddCodeList(c,code)
--space check
local e0=Effect.CreateEffect(c)
e0:SetType(EFFECT_TYPE_FIELD+EFFECT_TYPE_CONTINUOUS)
e0:SetProperty(EFFECT_FLAG_CANNOT_DISABLE+EFFECT_FLAG_UNCOPYABLE)
e0:SetCode(EVENT_PREDRAW)
e0:SetLabel(code)
e0:SetRange(0x1ff)
e0:SetOperation(camelot.checkop)
c:RegisterEffect(e0)
end
function camelot.start2(c,code)
local e1=Effect.CreateEffect(c)
e1:SetType(EFFECT_TYPE_FIELD+EFFECT_TYPE_CONTINUOUS)
e1:SetProperty(EFFECT_FLAG_CANNOT_DISABLE+EFFECT_FLAG_UNCOPYABLE)
e1:SetCode(EVENT_ADJUST)
e1:SetLabel(code)
e1:SetRange(LOCATION_HAND)
e1:SetOperation(camelot.spop)
c:RegisterEffect(e1)
end
function camelot.checkop(e,tp,eg,ep,ev,re,r,rp)
local c=e:GetHandler()
local code=e:GetLabel()
if Duel.GetTurnCount()~=1 then return end
if not camelot.Check[c:GetOriginalCode()] then
camelot.Check[c:GetOriginalCode()]=1
local g=Duel.GetMatchingGroup(Card.IsOriginalCodeRule,tp,0x1ff,0,nil,c:GetOriginalCode())
if #g==2 then
local tc=g:RandomSelect(tp,1):GetFirst()
tc:SetEntityCode(code,true)
tc:ReplaceEffect(code,0,0)
end
end
end
function camelot.spop(e,tp,eg,ep,ev,re,r,rp)
local c=e:GetHandler()
if c:IsPublic() and Duel.GetLocationCount(tp,LOCATION_MZONE)>0 and c:IsCanBeSpecialSummoned(e,0,tp,false,false) then
Duel.Hint(HINT_CARD,0,c:GetOriginalCode())
Duel.SpecialSummonStep(c,0,tp,tp,false,false,POS_FACEUP)
local e1=Effect.CreateEffect(c)
e1:SetType(EFFECT_TYPE_FIELD+EFFECT_TYPE_CONTINUOUS)
e1:SetProperty(EFFECT_FLAG_CANNOT_DISABLE+EFFECT_FLAG_UNCOPYABLE)
e1:SetCode(EVENT_ADJUST)
e1:SetLabel(e:GetLabel())
e1:SetRange(LOCATION_MZONE)
e1:SetOperation(camelot.pubop)
e1:SetReset(RESET_EVENT+RESETS_REDIRECT)
c:RegisterEffect(e1)
Duel.SpecialSummonComplete()
Duel.Readjust()
end
end
function camelot.pubop(e,tp,eg,ep,ev,re,r,rp)
local c=e:GetHandler()
local g=Duel.GetMatchingGroup(camelot.checkpubfil,tp,LOCATION_HAND,0,nil,c:GetOriginalCode())
if #g==0 then
Duel.Hint(HINT_CARD,0,c:GetOriginalCode())
Duel.Hint(HINT_SELECTMSG,tp,HINTMSG_OPERATECARD)
local tc=Duel.SelectMatchingCard(tp,camelot.pubfil,tp,LOCATION_HAND,0,1,1,nil):GetFirst()
if tc then
tc:RegisterFlagEffect(c:GetOriginalCode(),RESET_EVENT+RESETS_STANDARD+RESET_PHASE+PHASE_END,EFFECT_FLAG_CLIENT_HINT,1,0,aux.Stringid(c:GetOriginalCode(),0))
local e1=Effect.CreateEffect(c)
e1:SetType(EFFECT_TYPE_SINGLE)
e1:SetCode(EFFECT_PUBLIC)
e1:SetReset(RESET_EVENT+RESETS_STANDARD+RESET_PHASE+PHASE_END)
tc:RegisterEffect(e1)
else
if Duel.SendtoDeck(c,nil,1,REASON_EFFECT)==0 then return end
if Duel.IsExistingMatchingCard(camelot.bldfil,tp,LOCATION_DECK,0,1,nil,e:GetLabel()) and Duel.SelectYesNo(tp,aux.Stringid(c:GetOriginalCode(),0)) then
Duel.Hint(HINT_SELECTMSG,tp,HINTMSG_ATOHAND)
local g=Duel.SelectMatchingCard(tp,camelot.bldfil,tp,LOCATION_DECK,0,1,1,nil,e:GetLabel())
if g:GetCount()>0 then
Duel.DisableShuffleCheck()
Duel.SendtoHand(g,nil,REASON_EFFECT)
Duel.ConfirmCards(1-tp,g)
end
end
end
Duel.Readjust()
end
end
function camelot.checkpubfil(c,code)
return c:GetFlagEffect(code)~=0 and c:IsPublic()
end
function camelot.pubfil(c)
return c:IsSetCard(0x207a) and not c:IsPublic()
end
function camelot.bldfil(c,code)
return c:IsCode(code) and c:IsAbleToHand()
end
function camelot.bladestart(c,code)
aux.EnableChangeCode(c,code,0x1ff)
c:SetUniqueOnField(1,0,code)
local e1=Effect.CreateEffect(c)
e1:SetCategory(CATEGORY_EQUIP)
e1:SetType(EFFECT_TYPE_ACTIVATE)
e1:SetCode(EVENT_FREE_CHAIN)
e1:SetProperty(EFFECT_FLAG_CARD_TARGET+EFFECT_FLAG_CONTINUOUS_TARGET)
e1:SetTarget(camelot.eqtg)
e1:SetOperation(camelot.eqop)
c:RegisterEffect(e1)
local e2=Effect.CreateEffect(c)
e2:SetType(EFFECT_TYPE_SINGLE)
e2:SetCode(EFFECT_EQUIP_LIMIT)
e2:SetProperty(EFFECT_FLAG_CANNOT_DISABLE)
e2:SetValue(camelot.eqlimit)
c:RegisterEffect(e2)
--atk
local e3=Effect.CreateEffect(c)
e3:SetType(EFFECT_TYPE_FIELD)
e3:SetCode(EFFECT_UPDATE_ATTACK)
e3:SetRange(LOCATION_HAND)
e3:SetTargetRange(LOCATION_MZONE,0)
e3:SetTarget(camelot.atktg)
e3:SetValue(500)
c:RegisterEffect(e3)
end
function camelot.eqlimit(e,c)
return c:IsRace(RACE_WARRIOR)
end
function camelot.eqfil(c)
return c:IsFaceup() and c:IsRace(RACE_WARRIOR)
end
function camelot.eqtg(e,tp,eg,ep,ev,re,r,rp,chk,chkc)
if chkc then return chkc:IsLocation(LOCATION_MZONE) and camelot.eqfil(chkc) end
if chk==0 then return Duel.IsExistingTarget(camelot.eqfil,tp,LOCATION_MZONE,LOCATION_MZONE,1,nil) end
Duel.Hint(HINT_SELECTMSG,tp,HINTMSG_EQUIP)
Duel.SelectTarget(tp,camelot.eqfil,tp,LOCATION_MZONE,LOCATION_MZONE,1,1,nil)
Duel.SetOperationInfo(0,CATEGORY_EQUIP,e:GetHandler(),1,0,0)
end
function camelot.eqop(e,tp,eg,ep,ev,re,r,rp)
local c=e:GetHandler()
local tc=Duel.GetFirstTarget()
if tc and c:IsRelateToEffect(e) and tc:IsRelateToEffect(e) and tc:IsFaceup() and c:CheckUniqueOnField(tp) then
Duel.Equip(tp,c,tc)
end
end
function camelot.atktg(e,c)
return c:IsSetCard(0x107a) and c:IsFaceup() and e:GetHandler():IsPublic()
end
\ No newline at end of file
--神圣圆桌骑士 伦戈米尼亚德
local s,m=GetID()
function s.initial_effect(c)
camelot.start1(c,m+1)
camelot.start2(c,m+1)
-- (1) Reveal and treat as "Noble Knight"
local e1=Effect.CreateEffect(c)
e1:SetType(EFFECT_TYPE_SINGLE+EFFECT_TYPE_CONTINUOUS)
e1:SetRange(LOCATION_MZONE)
e1:SetCountLimit(1)
e1:SetTarget(s.revtg)
e1:SetOperation(s.revop)
c:RegisterEffect(e1)
-- (3) Special summon when leave field
local e2=Effect.CreateEffect(c)
e2:SetCategory(CATEGORY_SPECIAL_SUMMON)
e2:SetType(EFFECT_TYPE_SINGLE+EFFECT_TYPE_TRIGGER_O)
e2:SetCode(EVENT_LEAVE_FIELD)
e2:SetProperty(EFFECT_FLAG_DAMAGE_STEP+EFFECT_FLAG_DELAY)
e2:SetCondition(s.spcon)
e2:SetTarget(s.sptg)
e2:SetOperation(s.spop)
c:RegisterEffect(e2)
end
local s.fit1(c)
return not c:IsPublic() and c:IsType(TYPE_MONSTER)
end
function s.revtg(e,tp,eg,ep,ev,re,r,rp,chk)
if chk==0 then return Duel.GetMatchingGroup(s.fit1,tp,LOCATION_HAND,0,nil) end
end
function s.filter(c)
return c:IsCode(60011005) and c:IsAbleToHand()
end
function s.revop(e,tp,eg,ep,ev,re,r,rp)
local c=e:GetHandler()
local g=Duel.GetMatchingGroup(s.fit1,tp,LOCATION_HAND,0,nil)
if #g>0 then
Duel.Hint(HINT_SELECTMSG,tp,HINTMSG_CONFIRM)
local g=Duel.SelectMatchingCard(tp,s.fit1,tp,LOCATION_HAND,0,1,1,nil,TYPE_MONSTER)
if g:GetCount()>0 then
local tc=g:GetFirst()
Duel.ConfirmCards(1-tp,tc)
local e1=Effect.CreateEffect(c)
e1:SetType(EFFECT_TYPE_SINGLE)
e1:SetCode(EFFECT_ADD_SETCODE)
e1:SetValue(0x107a)
e1:SetReset(RESET_EVENT+RESETS_STANDARD+RESET_PHASE+PHASE_END)
tc:RegisterEffect(e1)
c:RegisterFlagEffect(m,RESET_EVENT+RESETS_STANDARD+RESET_PHASE+PHASE_END,0,1)
end
else
Duel.SendtoDeck(c,nil,SEQ_DECKBOTTOM,REASON_EFFECT)
if Duel.IsExistingMatchingCard(s.filter,tp,LOCATION_DECK,0,1,nil) then
Duel.Hint(HINT_SELECTMSG,tp,HINTMSG_ATOHAND)
local g=Duel.SelectMatchingCard(tp,s.filter,tp,LOCATION_DECK,0,1,1,nil)
if g:GetCount()>0 then
Duel.DisableShuffleCheck()
Duel.SendtoHand(g,nil,REASON_EFFECT)
Duel.ConfirmCards(1-tp,g)
end
end
end
end
function s.spcon(e,tp,eg,ep,ev,re,r,rp)
local c=e:GetHandler()
return c:IsPreviousPosition(POS_FACEUP) and c:IsPreviousLocation(LOCATION_ONFIELD)
end
function s.spfilter(c,e,tp,lv)
return c:IsRace(RACE_WARRIOR) and c:IsLevelBelow(lv) and c:IsCanBeSpecialSummoned(e,0,tp,false,false)
end
function s.sptg(e,tp,eg,ep,ev,re,r,rp,chk)
if chk==0 then
local count=e:GetHandler():GetFlagEffect(m)*2
return count>0 and Duel.GetLocationCount(tp,LOCATION_MZONE)>0
and Duel.IsExistingMatchingCard(s.spfilter,tp,LOCATION_GRAVE,0,1,nil,e,tp,count)
end
Duel.SetOperationInfo(0,CATEGORY_SPECIAL_SUMMON,nil,1,tp,LOCATION_GRAVE)
end
function s.spop(e,tp,eg,ep,ev,re,r,rp)
local count=e:GetHandler():GetFlagEffect(m)*2
if count<=0 or Duel.GetLocationCount(tp,LOCATION_MZONE)<=0 then return end
Duel.Hint(HINT_SELECTMSG,tp,HINTMSG_SPSUMMON)
local g=Duel.SelectMatchingCard(tp,s.spfilter,tp,LOCATION_GRAVE,0,1,1,nil,e,tp,count)
if g:GetCount()>0 then
local tc=Duel.SpecialSummon(g,0,tp,tp,false,false,POS_FACEUP)
if tc then
local e1=Effect.CreateEffect(e:GetHandler())
e1:SetType(EFFECT_TYPE_SINGLE)
e1:SetCode(EFFECT_INDESTRUCTABLE_BATTLE)
e1:SetValue(1)
e1:SetReset(RESET_EVENT+RESETS_STANDARD)
tc:RegisterEffect(e1)
local e2=e1:Clone()
e2:SetCode(EFFECT_INDESTRUCTABLE_EFFECT)
tc:RegisterEffect(e2)
end
end
end
--圣枪 闪耀于终焉之枪
local s,m=GetID()
function s.initial_effect(c)
camelot.start1(c,m+1)
camelot.start2(c,m+1)
-- (1) Unique
c:SetUniqueOnField(1,0,m,LOCATION_SZONE)
-- (2) Effects while revealed
local e1=Effect.CreateEffect(c)
e1:SetType(EFFECT_TYPE_SINGLE)
e1:SetCode(EFFECT_ADD_SETCODE)
e1:SetRange(LOCATION_HAND)
e1:SetCondition(s.revcon)
e1:SetValue(0x107a)
c:RegisterEffect(e1)
local e2=Effect.CreateEffect(c)
e2:SetType(EFFECT_TYPE_FIELD)
e2:SetCode(EFFECT_UPDATE_ATTACK)
e2:SetRange(LOCATION_HAND)
e2:SetTargetRange(LOCATION_MZONE,0)
e2:SetTarget(aux.TargetBoolFunction(Card.IsSetCard,0x107a))
e2:SetCondition(s.revcon)
e2:SetValue(500)
c:RegisterEffect(e2)
local e3=Effect.CreateEffect(c)
e3:SetCategory(CATEGORY_TODECK+CATEGORY_DESTROY)
e3:SetType(EFFECT_TYPE_QUICK_O)
e3:SetCode(EVENT_FREE_CHAIN)
e3:SetRange(LOCATION_HAND)
e3:SetCountLimit(1)
e3:SetCondition(s.revcon)
e3:SetTarget(s.destg)
e3:SetOperation(s.desop)
c:RegisterEffect(e3)
-- (3) Draw when sent to GY
local e4=Effect.CreateEffect(c)
e4:SetCategory(CATEGORY_DRAW)
e4:SetType(EFFECT_TYPE_SINGLE+EFFECT_TYPE_TRIGGER_O)
e4:SetCode(EVENT_TO_GRAVE)
e4:SetProperty(EFFECT_FLAG_DELAY)
e4:SetCountLimit(1,m)
e4:SetCondition(s.drcon)
e4:SetTarget(s.drtg)
e4:SetOperation(s.drop)
c:RegisterEffect(e4)
local e10=Effect.CreateEffect(c)
e10:SetType(EFFECT_TYPE_SINGLE)
e10:SetCode(EFFECT_EQUIP_LIMIT)
e10:SetProperty(EFFECT_FLAG_CANNOT_DISABLE)
e10:SetValue(s.eqlimit)
c:RegisterEffect(e10)
end
function s.eqlimit(e,c)
return c:IsRace(RACE_WARRIOR)
end
function s.revcon(e)
return e:GetHandler():IsPublic()
end
function s.tdfilter(c)
return c:IsSetCard(0x207a) and c:IsAbleToDeck()
end
function s.destg(e,tp,eg,ep,ev,re,r,rp,chk)
if chk==0 then return Duel.IsExistingMatchingCard(s.tdfilter,tp,LOCATION_HAND+LOCATION_GRAVE,0,1,nil) end
local g=Duel.GetMatchingGroup(nil,tp,0,LOCATION_MZONE,nil)
Duel.SetOperationInfo(0,CATEGORY_TODECK,nil,1,tp,LOCATION_HAND+LOCATION_GRAVE)
Duel.SetOperationInfo(0,CATEGORY_DESTROY,g,1,0,0)
end
function s.desop(e,tp,eg,ep,ev,re,r,rp)
Duel.Hint(HINT_SELECTMSG,tp,HINTMSG_TODECK)
local g=Duel.SelectMatchingCard(tp,aux.NecroValleyFilter(s.tdfilter),tp,LOCATION_HAND+LOCATION_GRAVE,0,1,1,nil)
if g:GetCount()>0 and Duel.SendtoDeck(g,nil,SEQ_DECKTOP,REASON_EFFECT)~=0 then
local dg=Duel.GetFieldGroup(tp,0,LOCATION_ONFIELD)
if dg:GetCount()>0 and Duel.SelectYesNo(tp,aux.Stringid(m,0)) then
Duel.Hint(HINT_SELECTMSG,tp,HINTMSG_DESTROY)
local sg=dg:Select(tp,1,1,nil)
Duel.HintSelection(sg)
Duel.Destroy(sg,REASON_EFFECT)
end
end
end
function s.drcon(e,tp,eg,ep,ev,re,r,rp)
return e:GetHandler():IsPreviousLocation(LOCATION_HAND)
end
function s.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)
end
function s.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
--神圣圆桌骑士 崔斯坦·反转
local s,m=GetID()
function s.initial_effect(c)
-- (1) Reveal and special summon
local e1=Effect.CreateEffect(c)
e1:SetCategory(CATEGORY_TOGRAVE+CATEGORY_SPECIAL_SUMMON)
e1:SetType(EFFECT_TYPE_IGNITION)
e1:SetRange(LOCATION_HAND)
e1:SetCost(s.spcost)
e1:SetTarget(s.sptg)
e1:SetOperation(s.spop)
c:RegisterEffect(e1)
-- (2) Special summon when revealed
local e2=Effect.CreateEffect(c)
e2:SetCategory(CATEGORY_SPECIAL_SUMMON)
e2:SetType(EFFECT_TYPE_IGNITION)
e2:SetRange(LOCATION_HAND)
e2:SetCondition(s.sscon)
e2:SetTarget(s.sstg)
e2:SetOperation(s.ssop)
c:RegisterEffect(e2)
-- (3) Recover and return to deck
local e3=Effect.CreateEffect(c)
e3:SetCategory(CATEGORY_RECOVER+CATEGORY_TODECK)
e3:SetType(EFFECT_TYPE_SINGLE+EFFECT_TYPE_TRIGGER_O)
e3:SetCode(EVENT_LEAVE_FIELD)
e3:SetProperty(EFFECT_FLAG_DELAY)
e3:SetTarget(s.rectg)
e3:SetOperation(s.recop)
c:RegisterEffect(e3)
end
function s.spcost(e,tp,eg,ep,ev,re,r,rp,chk)
if chk==0 then return not e:GetHandler():IsPublic() end
local e1=Effect.CreateEffect(e:GetHandler())
e1:SetType(EFFECT_TYPE_SINGLE)
e1:SetCode(EFFECT_PUBLIC)
e1:SetReset(RESET_EVENT+RESETS_STANDARD+RESET_PHASE+PHASE_END)
e:GetHandler():RegisterEffect(e1)
end
function s.swfilter(c)
return (c:IsSetCard(0x207a) or c:IsSetCard(0x107a)) and ((c:IsPublic() and c:IsType(TYPE_MONSTER)) or c:IsLocation(LOCATION_GRAVE))
end
function s.spfilter(c,lv)
return c:IsSetCard(0x107a) and c:IsLevelBelow(lv) and c:IsCanBeSpecialSummoned(e,0,tp,false,false)
end
function s.sptg(e,tp,eg,ep,ev,re,r,rp,chk)
if chk==0 then
local g=Duel.GetMatchingGroup(s.swfilter,tp,LOCATION_HAND+LOCATION_GRAVE,0,nil)
local ct=g:GetClassCount(Card.GetCode)
return ct>0 and Duel.GetLocationCount(tp,LOCATION_MZONE)>0
and Duel.IsExistingMatchingCard(s.spfilter,tp,LOCATION_DECK,0,1,nil,ct)
end
local g=Duel.GetMatchingGroup(s.swfilter,tp,LOCATION_HAND+LOCATION_GRAVE,0,nil)
local ct=g:GetClassCount(Card.GetCode)
Duel.SetOperationInfo(0,CATEGORY_TOGRAVE,nil,ct,tp,LOCATION_DECK)
Duel.SetOperationInfo(0,CATEGORY_SPECIAL_SUMMON,nil,1,tp,LOCATION_DECK)
end
function s.spop(e,tp,eg,ep,ev,re,r,rp)
local g=Duel.GetMatchingGroup(s.swfilter,tp,LOCATION_HAND+LOCATION_GRAVE,0,nil)
local ct=g:GetClassCount(Card.GetCode)
if ct>0 then
local eqg=Duel.GetMatchingGroup(Card.IsType,tp,LOCATION_DECK,0,nil,TYPE_EQUIP)
if eqg:GetCount()>=ct then
Duel.Hint(HINT_SELECTMSG,tp,HINTMSG_TOGRAVE)
local sg=eqg:Select(tp,ct,ct,nil)
if Duel.SendtoGrave(sg,REASON_EFFECT)~=0 then
if Duel.GetLocationCount(tp,LOCATION_MZONE)>0 then
Duel.Hint(HINT_SELECTMSG,tp,HINTMSG_SPSUMMON)
local spg=Duel.SelectMatchingCard(tp,s.spfilter,tp,LOCATION_DECK,0,1,1,nil,ct)
if spg:GetCount()>0 then
Duel.SpecialSummon(spg,0,tp,tp,false,false,POS_FACEUP)
end
end
end
end
end
end
function s.sscon(e,tp,eg,ep,ev,re,r,rp)
return e:GetHandler():IsPublic()
end
function s.sstg(e,tp,eg,ep,ev,re,r,rp,chk)
if chk==0 then return Duel.GetLocationCount(tp,LOCATION_MZONE)>0
and e:GetHandler():IsCanBeSpecialSummoned(e,0,tp,false,false) end
Duel.SetOperationInfo(0,CATEGORY_SPECIAL_SUMMON,e:GetHandler(),1,0,0)
end
function s.ssop(e,tp,eg,ep,ev,re,r,rp)
local c=e:GetHandler()
if c:IsRelateToEffect(e) and Duel.SpecialSummon(c,0,tp,tp,false,false,POS_FACEUP)~=0 then
local e1=Effect.CreateEffect(c)
e1:SetType(EFFECT_TYPE_SINGLE)
e1:SetCode(EFFECT_ADD_SETCODE)
e1:SetValue(0x108a)
e1:SetReset(RESET_EVENT+RESETS_STANDARD)
c:RegisterEffect(e1)
end
end
function s.rectg(e,tp,eg,ep,ev,re,r,rp,chk)
if chk==0 then
local g=Duel.GetMatchingGroup(Card.IsSetCard,tp,LOCATION_HAND+LOCATION_GRAVE,0,nil,0x108a)
local ct=g:GetClassCount(Card.GetCode)
return ct>0
end
local g=Duel.GetMatchingGroup(Card.IsSetCard,tp,LOCATION_HAND+LOCATION_GRAVE,0,nil,0x108a)
local ct=g:GetClassCount(Card.GetCode)
Duel.SetTargetPlayer(tp)
Duel.SetTargetParam(ct*800)
Duel.SetOperationInfo(0,CATEGORY_RECOVER,nil,0,tp,ct*800)
Duel.SetOperationInfo(0,CATEGORY_TODECK,nil,0,tp,LOCATION_HAND+LOCATION_GRAVE)
end
function s.recop(e,tp,eg,ep,ev,re,r,rp)
local p,d=Duel.GetChainInfo(0,CHAININFO_TARGET_PLAYER,CHAININFO_TARGET_PARAM)
local g=Duel.GetMatchingGroup(Card.IsSetCard,tp,LOCATION_HAND+LOCATION_GRAVE,0,nil,0x108a)
local ct=g:GetClassCount(Card.GetCode)
if ct>0 then
Duel.Recover(p,ct*800,REASON_EFFECT)
if g:GetCount()>0 and Duel.SelectYesNo(tp,aux.Stringid(m,0)) then
Duel.Hint(HINT_SELECTMSG,tp,HINTMSG_TODECK)
local sg=g:Select(tp,1,g:GetCount(),nil)
Duel.SendtoDeck(sg,nil,SEQ_DECKTOP,REASON_EFFECT)
end
local e1=Effect.CreateEffect(e:GetHandler())
e1:SetType(EFFECT_TYPE_FIELD)
e1:SetCode(EFFECT_CANNOT_ATTACK)
e1:SetProperty(EFFECT_FLAG_OATH)
e1:SetTargetRange(LOCATION_MZONE,0)
e1:SetReset(RESET_PHASE+PHASE_END)
Duel.RegisterEffect(e1,tp)
end
end
```
--圣弓 痛哭的幻奏
local s,m=GetID()
function s.initial_effect(c)
-- (1) Unique
-- (2) Effects when revealed
local e3=Effect.CreateEffect(c)
e3:SetType(EFFECT_TYPE_SINGLE)
e3:SetCode(EFFECT_ADD_SETCODE)
e3:SetCondition(s.revcon)
e3:SetValue(0x107a)
c:RegisterEffect(e3)
local e4=Effect.CreateEffect(c)
e4:SetCategory(CATEGORY_ATKCHANGE)
e4:SetType(EFFECT_TYPE_FIELD)
e4:SetCode(EFFECT_UPDATE_ATTACK)
e4:SetRange(LOCATION_HAND)
e4:SetTargetRange(LOCATION_MZONE,0)
e4:SetTarget(aux.TargetBoolFunction(Card.IsSetCard,0x107a))
e4:SetCondition(s.revcon)
e4:SetValue(500)
c:RegisterEffect(e4)
local e5=Effect.CreateEffect(c)
e5:SetCategory(CATEGORY_TODECK+CATEGORY_SEARCH)
e5:SetType(EFFECT_TYPE_QUICK_O)
e5:SetCode(EVENT_FREE_CHAIN)
e5:SetRange(LOCATION_HAND)
e5:SetCondition(s.revcon)
e5:SetCountLimit(1)
e5:SetTarget(s.tdtg)
e5:SetOperation(s.tdop)
c:RegisterEffect(e5)
-- (3) Damage reduction
local e6=Effect.CreateEffect(c)
e6:SetCategory(CATEGORY_DAMAGE)
e6:SetType(EFFECT_TYPE_SINGLE+EFFECT_TYPE_TRIGGER_O)
e6:SetCode(EVENT_TO_GRAVE)
e6:SetProperty(EFFECT_FLAG_DELAY)
e6:SetCondition(s.damcon)
e6:SetTarget(s.damtg)
e6:SetOperation(s.damop)
c:RegisterEffect(e6)
local e10=Effect.CreateEffect(c)
e10:SetType(EFFECT_TYPE_SINGLE)
e10:SetCode(EFFECT_EQUIP_LIMIT)
e10:SetProperty(EFFECT_FLAG_CANNOT_DISABLE)
e10:SetValue(s.eqlimit)
c:RegisterEffect(e10)
end
function s.eqlimit(e,c)
return c:IsRace(RACE_WARRIOR)
end
function s.revcon(e)
return e:GetHandler():IsPublic()
end
function s.tdfilter(c)
return c:IsSetCard(0x207a) and c:IsAbleToDeck()
end
function s.thfilter(c)
return c:IsSetCard(0x107a) and c:IsAbleToHand() and c:IsType(TYPE_MONSTER)
end
function s.tdtg(e,tp,eg,ep,ev,re,r,rp,chk)
if chk==0 then return Duel.IsExistingMatchingCard(s.tdfilter,tp,LOCATION_HAND+LOCATION_GRAVE,0,1,nil)
and Duel.IsExistingMatchingCard(s.thfilter,tp,LOCATION_DECK,0,1,nil) end
Duel.SetOperationInfo(0,CATEGORY_TODECK,nil,1,tp,LOCATION_HAND+LOCATION_GRAVE)
Duel.SetOperationInfo(0,CATEGORY_TOHAND,nil,1,tp,LOCATION_DECK)
end
function s.tdop(e,tp,eg,ep,ev,re,r,rp)
Duel.Hint(HINT_SELECTMSG,tp,HINTMSG_TODECK)
local g=Duel.SelectMatchingCard(tp,aux.NecroValleyFilter(s.tdfilter),tp,LOCATION_HAND+LOCATION_GRAVE,0,1,1,nil)
if g:GetCount()>0 and Duel.SendtoDeck(g,nil,SEQ_DECKTOP,REASON_EFFECT)~=0 then
Duel.Hint(HINT_SELECTMSG,tp,HINTMSG_ATOHAND)
local sg=Duel.SelectMatchingCard(tp,s.thfilter,tp,LOCATION_DECK,0,1,1,nil)
if sg:GetCount()>0 then
Duel.DisableShuffleCheck()
Duel.SendtoHand(sg,nil,REASON_EFFECT)
Duel.ConfirmCards(1-tp,sg)
end
end
end
function s.damcon(e,tp,eg,ep,ev,re,r,rp)
return e:GetHandler():IsReason(REASON_COST) and re:GetHandler():IsSetCard(0x108a)
end
function s.damtg(e,tp,eg,ep,ev,re,r,rp,chk)
if chk==0 then return true end
end
function s.damop(e,tp,eg,ep,ev,re,r,rp)
local e1=Effect.CreateEffect(e:GetHandler())
e1:SetType(EFFECT_TYPE_FIELD)
e1:SetCode(EFFECT_CHANGE_DAMAGE)
e1:SetProperty(EFFECT_FLAG_PLAYER_TARGET)
e1:SetTargetRange(1,0)
e1:SetValue(s.damval)
e1:SetReset(RESET_PHASE+PHASE_END)
Duel.RegisterEffect(e1,tp)
end
function s.damval(e,re,val,r,rp,rc)
if bit.band(r,REASON_EFFECT)~=0 or bit.band(r,REASON_BATTLE)~=0 then
return 800
else
return val
end
end
--归咎圣剑之时
local s,m=GetID()
function s.initial_effect(c)
-- Activate in opponent's turn
local e1=Effect.CreateEffect(c)
e1:SetCategory(CATEGORY_TOHAND+CATEGORY_SPECIAL_SUMMON+CATEGORY_TODECK)
e1:SetType(EFFECT_TYPE_ACTIVATE)
e1:SetCode(EVENT_FREE_CHAIN)
e1:SetCondition(s.condition)
e1:SetTarget(s.target)
e1:SetOperation(s.activate)
c:RegisterEffect(e1)
-- Activate from hand in opponent's turn
local e2=Effect.CreateEffect(c)
e2:SetType(EFFECT_TYPE_SINGLE)
e2:SetCode(EFFECT_QP_ACT_IN_NTPHAND)
e2:SetCondition(s.handcon)
c:RegisterEffect(e2)
end
function s.handcon(e)
return Duel.GetTurnPlayer()==1-e:GetHandlerPlayer()
and Duel.IsExistingMatchingCard(Card.IsSetCard,e:GetHandlerPlayer(),LOCATION_HAND,0,1,e:GetHandler(),0x107a)
end
function s.condition(e,tp,eg,ep,ev,re,r,rp)
return Duel.GetTurnPlayer()==1-tp
end
function s.cfilter(c)
return c:IsFaceup() and c:IsCode(0x107a)
end
function s.thfilter(c)
return c:IsCode(0x107a) and c:IsAbleToHand()
end
function s.spfilter(c,e,tp)
return c:IsSetCard(0x107a) and c:IsLevelBelow(6) and c:IsCanBeSpecialSummoned(e,0,tp,false,false)
end
function s.target(e,tp,eg,ep,ev,re,r,rp,chk)
if chk==0 then return true end
local b1=true
local b2=Duel.IsExistingMatchingCard(Card.IsDiscardable,tp,LOCATION_HAND,0,1,nil)
local b3=Duel.GetLocationCount(tp,LOCATION_MZONE)>0
and Duel.IsExistingMatchingCard(s.spfilter,tp,LOCATION_DECK+LOCATION_GRAVE,0,1,nil,e,tp)
Duel.SetOperationInfo(0,CATEGORY_TOHAND,nil,0,tp,LOCATION_DECK)
Duel.SetOperationInfo(0,CATEGORY_SPECIAL_SUMMON,nil,1,tp,LOCATION_DECK+LOCATION_GRAVE)
Duel.SetOperationInfo(0,CATEGORY_TODECK,nil,1,tp,LOCATION_HAND+LOCATION_ONFIELD)
end
function s.activate(e,tp,eg,ep,ev,re,r,rp)
local c=e:GetHandler()
local g=Duel.GetMatchingGroup(Card.IsSetCard,tp,LOCATION_HAND,0,nil,0x107a)
if g:GetCount()>0 then
Duel.ConfirmCards(1-tp,g)
local e1=Effect.CreateEffect(c)
e1:SetType(EFFECT_TYPE_FIELD)
e1:SetCode(EFFECT_PUBLIC)
e1:SetTargetRange(LOCATION_HAND,0)
e1:SetTarget(aux.TargetBoolFunction(Card.IsSetCard,0x107a))
e1:SetReset(RESET_PHASE+PHASE_END)
Duel.RegisterEffect(e1,tp)
end
local tableland=Duel.IsExistingMatchingCard(s.cfilter,tp,LOCATION_FZONE,0,1,nil)
local op=0
if tableland then
op=Duel.SelectOption(tp,aux.Stringid(m,0),aux.Stringid(m,1),aux.Stringid(m,2))
else
op=Duel.SelectOption(tp,aux.Stringid(m,0),aux.Stringid(m,1),aux.Stringid(m,2))
if op==2 then op=op+1 end
end
if op==0 then
-- Protection effect
local e2=Effect.CreateEffect(c)
e2:SetType(EFFECT_TYPE_FIELD)
e2:SetCode(EFFECT_IMMUNE_EFFECT)
e2:SetTargetRange(LOCATION_MZONE,0)
e2:SetTarget(aux.TargetBoolFunction(Card.IsSetCard,0x107a))
e2:SetValue(s.efilter)
e2:SetReset(RESET_PHASE+PHASE_END)
Duel.RegisterEffect(e2,tp)
elseif op==1 then
-- Search effect
if Duel.DiscardHand(tp,Card.IsSetCard,1,1,REASON_COST+REASON_DISCARD,nil,0x108a) then
local tc=Duel.GetFirstMatchingCard(s.thfilter,tp,LOCATION_DECK,0,nil)
if tc then
Duel.SendtoHand(tc,nil,REASON_EFFECT)
Duel.ConfirmCards(1-tp,tc)
end
end
elseif op==2 then
-- Special summon effect
if Duel.GetLocationCount(tp,LOCATION_MZONE)<=0 then return end
Duel.Hint(HINT_SELECTMSG,tp,HINTMSG_SPSUMMON)
local sg=Duel.SelectMatchingCard(tp,s.spfilter,tp,LOCATION_DECK+LOCATION_GRAVE,0,1,1,nil,e,tp)
if sg:GetCount()>0 and Duel.SpecialSummon(sg,0,tp,tp,false,false,POS_FACEUP)~=0 then
Duel.Hint(HINT_SELECTMSG,tp,HINTMSG_TODECK)
local dg=Duel.SelectMatchingCard(tp,Card.IsAbleToDeck,tp,LOCATION_HAND+LOCATION_ONFIELD,0,1,1,nil)
if dg:GetCount()>0 then
Duel.SendtoDeck(dg,nil,SEQ_DECKBOTTOM,REASON_EFFECT)
end
end
end
end
function s.efilter(e,re)
return re:GetOwnerPlayer()~=e:GetHandlerPlayer()
end
--神圣圆桌骑士 贝狄威尔
local s,m=GetID()
function s.initial_effect(c)
-- search
local e1=Effect.CreateEffect(c)
e1:SetCategory(CATEGORY_TOHAND+CATEGORY_SEARCH)
e1:SetType(EFFECT_TYPE_SINGLE+EFFECT_TYPE_TRIGGER_O)
e1:SetCode(EVENT_SUMMON_SUCCESS)
e1:SetProperty(EFFECT_FLAG_DELAY)
e1:SetCountLimit(1,m)
e1:SetTarget(s.thtg)
e1:SetOperation(s.thop)
c:RegisterEffect(e1)
local e2=e1:Clone()
e2:SetCode(EVENT_SPSUMMON_SUCCESS)
c:RegisterEffect(e2)
-- return to hand
local e3=Effect.CreateEffect(c)
e3:SetCategory(CATEGORY_TOHAND+CATEGORY_TODECK)
e3:SetType(EFFECT_TYPE_SINGLE+EFFECT_TYPE_TRIGGER_O)
e3:SetCode(EVENT_LEAVE_FIELD)
e3:SetProperty(EFFECT_FLAG_DELAY)
e3:SetCountLimit(1,m+1)
e3:SetCondition(s.rtcon)
e3:SetTarget(s.rttg)
e3:SetOperation(s.rtop)
c:RegisterEffect(e3)
end
function s.thfilter(c)
return (c:IsSetCard(0x107a) or c:IsSetCard(0x108a)) and c:IsType(TYPE_SPELL) and c:IsAbleToHand()
end
function s.thtg(e,tp,eg,ep,ev,re,r,rp,chk)
if chk==0 then return Duel.IsExistingMatchingCard(s.thfilter,tp,LOCATION_DECK,0,1,nil) end
Duel.SetOperationInfo(0,CATEGORY_TOHAND,nil,1,tp,LOCATION_DECK)
end
function s.thop(e,tp,eg,ep,ev,re,r,rp)
Duel.Hint(HINT_SELECTMSG,tp,HINTMSG_ATOHAND)
local g=Duel.SelectMatchingCard(tp,s.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 s.rtcon(e,tp,eg,ep,ev,re,r,rp)
local c=e:GetHandler()
return c:IsPreviousPosition(POS_FACEUP) and c:IsPreviousLocation(LOCATION_ONFIELD)
end
function s.rttg(e,tp,eg,ep,ev,re,r,rp,chk)
if chk==0 then return e:GetHandler():IsAbleToHand() end
Duel.SetOperationInfo(0,CATEGORY_TOHAND,e:GetHandler(),1,0,0)
Duel.SetOperationInfo(0,CATEGORY_TODECK,nil,1,tp,LOCATION_HAND)
end
function s.rtop(e,tp,eg,ep,ev,re,r,rp)
local c=e:GetHandler()
if c:IsRelateToEffect(e) and Duel.SendtoHand(c,nil,REASON_EFFECT)~=0 then
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.SendtoDeck(g,nil,SEQ_DECKBOTTOM,REASON_EFFECT)
end
end
end
--银之臂:誓约胜利之剑
local s,m=GetID()
function s.initial_effect(c)
--Cannot have another copy
local e1=Effect.CreateEffect(c)
e1:SetType(EFFECT_TYPE_FIELD)
e1:SetCode(EFFECT_UNIQUE_CHECK)
e1:SetRange(LOCATION_SZONE)
e1:SetTargetRange(LOCATION_SZONE,0)
e1:SetValue(s.uniqueval)
c:RegisterEffect(e1)
--Treat as "Noble Arms"
local e2=Effect.CreateEffect(c)
e2:SetType(EFFECT_TYPE_SINGLE)
e2:SetProperty(EFFECT_FLAG_SINGLE_RANGE)
e2:SetCode(EFFECT_ADD_SETCODE)
e2:SetRange(LOCATION_SZONE)
e2:SetValue(0x107a)
c:RegisterEffect(e2)
--Public continuous effect
local e3=Effect.CreateEffect(c)
e3:SetType(EFFECT_TYPE_SINGLE)
e3:SetCode(EFFECT_PUBLIC)
e3:SetCondition(s.pubcon)
c:RegisterEffect(e3)
--ATK boost effect
local e4=Effect.CreateEffect(c)
e4:SetType(EFFECT_TYPE_FIELD)
e4:SetCode(EFFECT_UPDATE_ATTACK)
e4:SetRange(LOCATION_HAND)
e4:SetTargetRange(LOCATION_MZONE,0)
e4:SetTarget(aux.TargetBoolFunction(Card.IsSetCard,0x107a))
e4:SetValue(500)
e4:SetCondition(s.pubcon)
c:RegisterEffect(e4)
--Return to deck and draw effect
local e5=Effect.CreateEffect(c)
e5:SetCategory(CATEGORY_TODECK+CATEGORY_DESTROY+CATEGORY_DRAW)
e5:SetType(EFFECT_TYPE_QUICK_O)
e5:SetCode(EVENT_FREE_CHAIN)
e5:SetRange(LOCATION_HAND)
e5:SetCountLimit(1)
e5:SetCondition(s.pubcon)
e5:SetTarget(s.rttg)
e5:SetOperation(s.rtop)
c:RegisterEffect(e5)
--Send to GY effect
local e6=Effect.CreateEffect(c)
e6:SetType(EFFECT_TYPE_SINGLE+EFFECT_TYPE_TRIGGER_O)
e6:SetCode(EVENT_TO_GRAVE)
e6:SetProperty(EFFECT_FLAG_DELAY)
e6:SetCountLimit(1,m)
e6:SetCondition(s.sgcon)
e6:SetOperation(s.sgop)
c:RegisterEffect(e6)
end
function s.uniqueval(e,c)
return c:IsCode(e:GetHandler():GetCode())
end
function s.pubcon(e)
return e:GetHandler():IsPublic()
end
function s.rtfilter(c)
return c:IsSetCard(0x107a) and (c:IsLocation(LOCATION_HAND) or c:IsLocation(LOCATION_GRAVE)) and c:IsAbleToDeck()
end
function s.rttg(e,tp,eg,ep,ev,re,r,rp,chk)
if chk==0 then return Duel.IsExistingMatchingCard(s.rtfilter,tp,LOCATION_HAND+LOCATION_GRAVE,0,1,nil) end
Duel.SetOperationInfo(0,CATEGORY_TODECK,nil,1,tp,LOCATION_HAND+LOCATION_GRAVE)
Duel.SetOperationInfo(0,CATEGORY_DESTROY,nil,1,tp,LOCATION_ONFIELD)
Duel.SetOperationInfo(0,CATEGORY_DRAW,nil,0,tp,1)
end
function s.rtop(e,tp,eg,ep,ev,re,r,rp)
Duel.Hint(HINT_SELECTMSG,tp,HINTMSG_TODECK)
local g=Duel.SelectMatchingCard(tp,s.rtfilter,tp,LOCATION_HAND+LOCATION_GRAVE,0,1,1,nil)
if g:GetCount()>0 and Duel.SendtoDeck(g,nil,SEQ_DECKTOP,REASON_EFFECT)~=0 then
Duel.Hint(HINT_SELECTMSG,tp,HINTMSG_DESTROY)
local dg=Duel.SelectMatchingCard(tp,nil,tp,LOCATION_ONFIELD,0,1,1,nil)
if dg:GetCount()>0 and Duel.Destroy(dg,REASON_EFFECT)~=0 then
Duel.Draw(tp,1,REASON_EFFECT)
end
end
end
function s.sgcon(e,tp,eg,ep,ev,re,r,rp)
return e:GetHandler():IsPreviousLocation(LOCATION_HAND)
end
function s.sgop(e,tp,eg,ep,ev,re,r,rp)
local e1=Effect.CreateEffect(e:GetHandler())
e1:SetType(EFFECT_TYPE_FIELD)
e1:SetCode(EFFECT_CANNOT_BE_EFFECT_TARGET)
e1:SetProperty(EFFECT_FLAG_IGNORE_IMMUNE)
e1:SetTargetRange(LOCATION_MZONE,0)
e1:SetTarget(aux.TargetBoolFunction(Card.IsControler,tp))
e1:SetValue(aux.tgoval)
e1:SetReset(RESET_PHASE+PHASE_END)
Duel.RegisterEffect(e1,tp)
end
--神圣圆桌骑士 莫德雷德·失控
local s,m=GetID()
function s.initial_effect(c)
--Public and change ATK to 0
local e1=Effect.CreateEffect(c)
e1:SetCategory(CATEGORY_POSITION+CATEGORY_ATKCHANGE)
e1:SetType(EFFECT_TYPE_QUICK_O)
e1:SetCode(EVENT_FREE_CHAIN)
e1:SetRange(LOCATION_HAND)
e1:SetCountLimit(1,m)
e1:SetCondition(s.pubcon)
e1:SetTarget(s.pubtg)
e1:SetOperation(s.pubop)
c:RegisterEffect(e1)
--Special Summon from hand if public
local e2=Effect.CreateEffect(c)
e2:SetCategory(CATEGORY_SPECIAL_SUMMON)
e2:SetType(EFFECT_TYPE_QUICK_O)
e2:SetCode(EVENT_FREE_CHAIN)
e2:SetRange(LOCATION_HAND)
e2:SetCondition(s.pubcon)
e2:SetTarget(s.sptg)
e2:SetOperation(s.spop)
c:RegisterEffect(e2)
--Special Summon when leaves field
local e3=Effect.CreateEffect(c)
e3:SetCategory(CATEGORY_SPECIAL_SUMMON)
e3:SetType(EFFECT_TYPE_SINGLE+EFFECT_TYPE_TRIGGER_O)
e3:SetCode(EVENT_LEAVE_FIELD)
e3:SetProperty(EFFECT_FLAG_DELAY)
e3:SetCountLimit(1,m+1)
e3:SetTarget(s.sstg)
e3:SetOperation(s.ssop)
c:RegisterEffect(e3)
end
function s.pubcon(e)
return e:GetHandler():IsPublic()
end
function s.pubtg(e,tp,eg,ep,ev,re,r,rp,chk)
if chk==0 then return true end
Duel.SetOperationInfo(0,CATEGORY_POSITION,nil,1,0,0)
Duel.SetOperationInfo(0,CATEGORY_ATKCHANGE,nil,1,0,0)
end
function s.pubop(e,tp,eg,ep,ev,re,r,rp)
local c=e:GetHandler()
if c:IsRelateToEffect(e) then
c:Public()
local g=Duel.GetMatchingGroup(Card.IsFaceup,tp,0,LOCATION_MZONE,nil)
if g:GetCount()>0 then
Duel.ChangePosition(g,POS_FACEUP_ATTACK)
for tc in aux.Next(g) do
local e1=Effect.CreateEffect(c)
e1:SetType(EFFECT_TYPE_SINGLE)
e1:SetCode(EFFECT_SET_ATTACK_FINAL)
e1:SetValue(0)
e1:SetReset(RESET_EVENT+RESETS_STANDARD+RESET_PHASE+PHASE_END)
tc:RegisterEffect(e1)
end
end
end
end
function s.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)
end
function s.spop(e,tp,eg,ep,ev,re,r,rp)
local c=e:GetHandler()
if c:IsRelateToEffect(e) and Duel.SpecialSummon(c,0,tp,tp,false,false,POS_FACEUP)~=0 then
--Public effect
local e1=Effect.CreateEffect(c)
e1:SetType(EFFECT_TYPE_SINGLE+EFFECT_TYPE_CONTINUOUS)
e1:SetCode(EVENT_SPSUMMON_SUCCESS)
e1:SetOperation(s.pubop2)
e1:SetReset(RESET_EVENT+RESETS_STANDARD)
c:RegisterEffect(e1)
end
end
function s.pubop2(e,tp,eg,ep,ev,re,r,rp)
local c=e:GetHandler()
local g=Duel.GetMatchingGroup(Card.IsFacedown,tp,LOCATION_HAND,0,nil)
local sg=g:Filter(Card.IsSetCard,nil,0x107a)
if sg:GetCount()>0 then
Duel.Hint(HINT_SELECTMSG,tp,HINTMSG_PUBLIC)
local tc=sg:Select(tp,1,1,nil):GetFirst()
if tc then
tc:Public()
else
Duel.SendtoDeck(c,nil,SEQ_DECKBOTTOM,REASON_EFFECT)
local addg=Duel.GetDecktopGroup(tp,1)
local ac=addg:GetFirst()
if ac and ac:IsCode(12345678) then
Duel.DisableShuffleCheck()
Duel.SendtoHand(ac,nil,REASON_EFFECT)
end
end
else
Duel.SendtoDeck(c,nil,SEQ_DECKBOTTOM,REASON_EFFECT)
local addg=Duel.GetDecktopGroup(tp,1)
local ac=addg:GetFirst()
if ac and ac:IsCode(12345678) then
Duel.DisableShuffleCheck()
Duel.SendtoHand(ac,nil,REASON_EFFECT)
end
end
end
function s.sstg(e,tp,eg,ep,ev,re,r,rp,chk)
if chk==0 then return Duel.GetLocationCount(tp,LOCATION_MZONE)>0
and e:GetHandler():IsCanBeSpecialSummoned(e,0,tp,false,false) end
Duel.SetOperationInfo(0,CATEGORY_SPECIAL_SUMMON,e:GetHandler(),1,0,0)
end
function s.ssop(e,tp,eg,ep,ev,re,r,rp)
local c=e:GetHandler()
if c:IsRelateToEffect(e) and Duel.SpecialSummon(c,0,tp,tp,false,false,POS_FACEUP)~=0 then
local e1=Effect.CreateEffect(c)
e1:SetType(EFFECT_TYPE_SINGLE)
e1:SetCode(EFFECT_SET_ATTACK_FINAL)
e1:SetValue(c:GetBaseAttack()*2)
e1:SetReset(RESET_EVENT+RESETS_STANDARD)
c:RegisterEffect(e1)
local e2=Effect.CreateEffect(c)
e2:SetType(EFFECT_TYPE_SINGLE)
e2:SetCode(EFFECT_SET_DEFENSE_FINAL)
e2:SetValue(0)
e2:SetReset(RESET_EVENT+RESETS_STANDARD)
c:RegisterEffect(e2)
local e3=Effect.CreateEffect(c)
e3:SetType(EFFECT_TYPE_SINGLE)
e3:SetCode(EFFECT_IMMUNE_EFFECT)
e3:SetValue(s.efilter)
e3:SetReset(RESET_EVENT+RESETS_STANDARD)
c:RegisterEffect(e3)
end
end
function s.efilter(e,te)
return te:GetOwner()~=e:GetOwner()
end
--圣剑 灿然辉耀的王剑-对吾华丽父王的叛逆
local s,m=GetID()
function s.initial_effect(c)
--Cannot have another copy
local e1=Effect.CreateEffect(c)
e1:SetType(EFFECT_TYPE_FIELD)
e1:SetCode(EFFECT_UNIQUE_CHECK)
e1:SetRange(LOCATION_SZONE)
e1:SetTargetRange(LOCATION_SZONE,0)
e1:SetValue(s.uniqueval)
c:RegisterEffect(e1)
--Public continuous effect
local e2=Effect.CreateEffect(c)
e2:SetType(EFFECT_TYPE_SINGLE)
e2:SetCode(EFFECT_PUBLIC)
e2:SetCondition(s.pubcon)
c:RegisterEffect(e2)
--ATK boost effect
local e3=Effect.CreateEffect(c)
e3:SetType(EFFECT_TYPE_FIELD)
e3:SetCode(EFFECT_UPDATE_ATTACK)
e3:SetRange(LOCATION_HAND)
e3:SetTargetRange(LOCATION_MZONE,0)
e3:SetTarget(aux.TargetBoolFunction(Card.IsSetCard,0x107a))
e3:SetValue(500)
e3:SetCondition(s.pubcon)
c:RegisterEffect(e3)
--Return to deck and special summon effect
local e4=Effect.CreateEffect(c)
e4:SetCategory(CATEGORY_TODECK+CATEGORY_SPECIAL_SUMMON)
e4:SetType(EFFECT_TYPE_QUICK_O)
e4:SetCode(EVENT_FREE_CHAIN)
e4:SetRange(LOCATION_HAND)
e4:SetCountLimit(1)
e4:SetCondition(s.pubcon)
e4:SetTarget(s.rttg)
e4:SetOperation(s.rtop)
c:RegisterEffect(e4)
--Send to GY effect
local e5=Effect.CreateEffect(c)
e5:SetCategory(CATEGORY_TODECK)
e5:SetType(EFFECT_TYPE_SINGLE+EFFECT_TYPE_TRIGGER_O)
e5:SetCode(EVENT_TO_GRAVE)
e5:SetProperty(EFFECT_FLAG_DELAY)
e5:SetCountLimit(1,m)
e5:SetCondition(s.sgcon)
e5:SetTarget(s.sgtg)
e5:SetOperation(s.sgop)
c:RegisterEffect(e5)
end
function s.uniqueval(e,c)
return c:IsCode(e:GetHandler():GetCode())
end
function s.pubcon(e)
return e:GetHandler():IsPublic()
end
function s.rtfilter(c)
return c:IsSetCard(0x107a) and (c:IsLocation(LOCATION_HAND) or c:IsLocation(LOCATION_GRAVE)) and c:IsAbleToDeck()
end
function s.spfilter(c,e,tp)
return c:IsSetCard(0x107a) and c:IsCanBeSpecialSummoned(e,0,tp,false,false)
end
function s.rttg(e,tp,eg,ep,ev,re,r,rp,chk)
if chk==0 then return Duel.IsExistingMatchingCard(s.rtfilter,tp,LOCATION_HAND+LOCATION_GRAVE,0,1,nil) end
Duel.SetOperationInfo(0,CATEGORY_TODECK,nil,1,tp,LOCATION_HAND+LOCATION_GRAVE)
Duel.SetOperationInfo(0,CATEGORY_SPECIAL_SUMMON,nil,0,tp,LOCATION_DECK)
end
function s.rtop(e,tp,eg,ep,ev,re,r,rp)
local c=e:GetHandler()
Duel.Hint(HINT_SELECTMSG,tp,HINTMSG_TODECK)
local g=Duel.SelectMatchingCard(tp,s.rtfilter,tp,LOCATION_HAND+LOCATION_GRAVE,0,1,1,nil)
if g:GetCount()>0 and Duel.SendtoDeck(g,nil,SEQ_DECKTOP,REASON_EFFECT)~=0 then
local sg=Group.CreateGroup()
for i=1,5 do
local tc=Duel.GetDecktopGroup(tp,1):GetFirst()
if tc and not sg:IsExists(Card.IsCode,1,nil,tc:GetCode()) then
sg:AddCard(tc)
if tc:IsSetCard(0x107a) then break end
else
break
end
end
if sg:GetCount()>0 then
Duel.ConfirmCards(tp,sg)
local spg=sg:Filter(s.spfilter,nil,e,tp)
if spg:GetCount()>0 then
Duel.SpecialSummon(spg,0,tp,tp,false,false,POS_FACEUP)
end
Duel.ShuffleDeck(tp)
end
end
end
function s.sgcon(e,tp,eg,ep,ev,re,r,rp)
return e:GetHandler():IsPreviousLocation(LOCATION_HAND)
end
function s.sgtg(e,tp,eg,ep,ev,re,r,rp,chk)
if chk==0 then return Duel.GetFieldGroupCount(tp,LOCATION_GRAVE,0)>0 end
Duel.SetOperationInfo(0,CATEGORY_TODECK,nil,0,tp,LOCATION_GRAVE)
end
function s.sgop(e,tp,eg,ep,ev,re,r,rp)
local g=Duel.GetFieldGroup(tp,LOCATION_GRAVE,0)
if g:GetCount()>0 then
Duel.Hint(HINT_SELECTMSG,tp,HINTMSG_TODECK)
local sg=g:Select(tp,1,5,nil)
Duel.SendtoDeck(sg,nil,SEQ_DECKTOP,REASON_EFFECT)
end
end
......@@ -2,16 +2,16 @@
local s,id,o=GetID()
function s.initial_effect(c)
-- 把这张卡和1只怪兽或者和1张「堕福」卡从手卡丢弃才能发动,从手卡·卡组选1张「堕福」卡送去墓地或在自己的超量怪兽下面重叠作为超量素材,那之后,可以从自己墓地把1张「堕福」魔法·陷阱卡加入手卡
-- 这张卡被送去墓地的场合才能发动,同名卡不在自己墓地存在的1张「堕福」卡加入手卡
local e1=Effect.CreateEffect(c)
e1:SetDescription(aux.Stringid(id,0))
e1:SetCategory(CATEGORY_TOGRAVE+CATEGORY_GRAVE_ACTION)
e1:SetType(EFFECT_TYPE_IGNITION)
e1:SetRange(LOCATION_HAND)
e1:SetCategory(CATEGORY_SEARCH+CATEGORY_TOHAND)
e1:SetType(EFFECT_TYPE_SINGLE+EFFECT_TYPE_TRIGGER_O)
e1:SetProperty(EFFECT_FLAG_DELAY+EFFECT_FLAG_PLAYER_TARGET)
e1:SetCode(EVENT_TO_GRAVE)
e1:SetCountLimit(1,id)
e1:SetCost(s.tgcost)
e1:SetTarget(s.tgtg)
e1:SetOperation(s.tgop)
e1:SetTarget(s.thtg)
e1:SetOperation(s.thop)
c:RegisterEffect(e1)
-- 这张卡被除外的场合,以自己场上1只「堕福」超量怪兽为对象才能发动,把这张卡作为那只怪兽的超量素材
......@@ -26,71 +26,26 @@ function s.initial_effect(c)
c:RegisterEffect(e2)
end
-- 把这张卡和1只怪兽或者和1张「堕福」卡从手卡丢弃才能发动,从手卡·卡组选1张「堕福」卡送去墓地或在自己的超量怪兽下面重叠作为超量素材,那之后,可以从自己墓地把1张「堕福」魔法·陷阱卡加入手卡
function s.costfilter(c)
return (c:IsType(TYPE_MONSTER) or c:IsSetCard(0x666c)) and c:IsDiscardable()
-- 这张卡被送去墓地的场合才能发动,同名卡不在自己墓地存在的1张「堕福」卡加入手卡
function s.thfilter(c,tp)
return c:IsSetCard(0x666c) and c:IsAbleToHand()
and not Duel.IsExistingMatchingCard(Card.IsCode,tp,LOCATION_GRAVE,0,1,nil,c:GetCode())
end
function s.tgcost(e,tp,eg,ep,ev,re,r,rp,chk)
local c=e:GetHandler()
local fe=Duel.IsPlayerAffectedByEffect(tp,id)
local b2=Duel.IsExistingMatchingCard(s.costfilter,tp,LOCATION_HAND,0,1,c)
if chk==0 then return c:IsDiscardable() and (fe or b2) end
if fe and (not b2 or Duel.SelectYesNo(tp,aux.Stringid(id,2))) then
Duel.Hint(HINT_CARD,0,id)
fe:UseCountLimit(tp)
Duel.SendtoGrave(c,REASON_COST+REASON_DISCARD)
else
Duel.Hint(HINT_SELECTMSG,tp,HINTMSG_DISCARD)
local g=Duel.SelectMatchingCard(tp,s.costfilter,tp,LOCATION_HAND,0,1,1,c)
g:AddCard(c)
Duel.SendtoGrave(g,REASON_COST+REASON_DISCARD)
end
end
function s.tgfilter(c,e,tp)
return c:IsSetCard(0x666c) and (c:IsAbleToGrave() or (Duel.IsExistingMatchingCard(s.matfilter,tp,LOCATION_MZONE,0,1,nil) and c:IsCanOverlay()))
function s.thtg(e,tp,eg,ep,ev,re,r,rp,chk)
if chk==0 then return Duel.IsExistingMatchingCard(s.thfilter,tp,LOCATION_DECK,0,1,nil,tp) end
Duel.SetOperationInfo(0,CATEGORY_TOHAND,nil,1,tp,LOCATION_DECK)
end
function s.tgtg(e,tp,eg,ep,ev,re,r,rp,chk)
if chk==0 then return Duel.IsExistingMatchingCard(s.tgfilter,tp,LOCATION_HAND+LOCATION_DECK,0,1,nil,e,tp) end
Duel.SetOperationInfo(0,CATEGORY_TOGRAVE,nil,1,tp,LOCATION_HAND+LOCATION_DECK)
end
function s.tgop(e,tp,eg,ep,ev,re,r,rp)
Duel.Hint(HINT_SELECTMSG,tp,HINTMSG_SELECT)
local g=Duel.SelectMatchingCard(tp,s.tgfilter,tp,LOCATION_HAND+LOCATION_DECK,0,1,1,nil,e,tp)
local tc=g:GetFirst()
if tc then
if Duel.IsExistingMatchingCard(s.matfilter,tp,LOCATION_MZONE,0,1,nil) and tc:IsCanOverlay()
and Duel.SelectYesNo(tp,aux.Stringid(id,3)) then
Duel.Hint(HINT_SELECTMSG,tp,HINTMSG_FACEUP)
local sg=Duel.SelectMatchingCard(tp,s.matfilter,tp,LOCATION_MZONE,0,1,1,nil)
if #sg>0 then
Duel.Overlay(sg:GetFirst(),Group.FromCards(tc))
end
else
Duel.SendtoGrave(tc,REASON_EFFECT)
end
local sg=Duel.GetMatchingGroup(aux.NecroValleyFilter(s.thfilter),tp,LOCATION_GRAVE,0,nil)
if #sg>0 and Duel.SelectYesNo(tp,aux.Stringid(id,4)) then
function s.thop(e,tp,eg,ep,ev,re,r,rp)
Duel.Hint(HINT_SELECTMSG,tp,HINTMSG_ATOHAND)
local tg=sg:Select(tp,1,1,nil)
Duel.BreakEffect()
Duel.SendtoHand(tg,nil,REASON_EFFECT)
Duel.ConfirmCards(1-tp,tg)
end
local g=Duel.SelectMatchingCard(tp,s.thfilter,tp,LOCATION_DECK,0,1,1,nil,tp)
if #g>0 then
Duel.SendtoHand(g,nil,REASON_EFFECT)
Duel.ConfirmCards(1-tp,g)
end
end
function s.matfilter(c)
return c:IsFaceup() and c:IsType(TYPE_XYZ)
end
function s.thfilter(c)
return c:IsSetCard(0x666c) and c:IsType(TYPE_SPELL+TYPE_TRAP) and c:IsAbleToHand()
end
-- 这张卡被除外的场合,以自己场上1只「堕福」超量怪兽为对象才能发动,把这张卡作为那只怪兽的超量素材
function s.xyzfilter(c)
return c:IsFaceup() and c:IsSetCard(0x666c) and c:IsType(TYPE_XYZ)
......
......@@ -2,19 +2,15 @@
local s,id,o=GetID()
function s.initial_effect(c)
-- 这张卡被送去墓地的自己·对方回合才能发动,「堕福的静谣·归音巫」以外的自己的墓地·除外状态的1张「堕福」卡加入手卡
-- 这张卡被送去墓地的场合,可以从以下效果选择1个发动
local e1=Effect.CreateEffect(c)
e1:SetDescription(aux.Stringid(id,0))
e1:SetCategory(CATEGORY_TOHAND)
e1:SetType(EFFECT_TYPE_QUICK_O)
e1:SetCode(EVENT_FREE_CHAIN)
e1:SetHintTiming(0,TIMINGS_CHECK_MONSTER+TIMING_END_PHASE)
e1:SetRange(LOCATION_GRAVE)
e1:SetProperty(EFFECT_FLAG_DAMAGE_STEP)
e1:SetType(EFFECT_TYPE_SINGLE+EFFECT_TYPE_TRIGGER_O)
e1:SetProperty(EFFECT_FLAG_DELAY+EFFECT_FLAG_PLAYER_TARGET)
e1:SetCode(EVENT_TO_GRAVE)
e1:SetCountLimit(1,id)
e1:SetCondition(s.thcon)
e1:SetTarget(s.thtg)
e1:SetOperation(s.thop)
e1:SetTarget(s.target)
e1:SetOperation(s.operation)
c:RegisterEffect(e1)
-- 这张卡被除外的场合,以自己场上1只「堕福」超量怪兽为对象才能发动,把这张卡作为那只怪兽的超量素材
......@@ -29,27 +25,44 @@ function s.initial_effect(c)
c:RegisterEffect(e2)
end
-- 这张卡被送去墓地的自己·对方回合才能发动,「堕福的静谣·归音巫」以外的自己的墓地·除外状态的1张「堕福」卡加入手卡
function s.thcon(e,tp,eg,ep,ev,re,r,rp)
return e:GetHandler():GetTurnID()==Duel.GetTurnCount() and not e:GetHandler():IsReason(REASON_RETURN)
end
function s.filter(c)
return (c:IsLocation(LOCATION_GRAVE) or c:IsFaceup()) and c:IsSetCard(0x666c) and not c:IsCode(id) and c:IsAbleToHand()
end
function s.thtg(e,tp,eg,ep,ev,re,r,rp,chk)
if chk==0 then return Duel.IsExistingMatchingCard(s.filter,tp,LOCATION_GRAVE+LOCATION_REMOVED,0,1,nil) end
-- 这张卡被送去墓地的场合,可以从以下效果选择1个发动
function s.target(e,tp,eg,ep,ev,re,r,rp,chk)
local b1=Duel.IsPlayerCanDraw(tp,1)
local b2=Duel.IsExistingMatchingCard(s.thfilter,tp,LOCATION_GRAVE+LOCATION_REMOVED,0,1,nil)
if chk==0 then return b1 or b2 end
local op=0
if b1 and b2 then
op=Duel.SelectOption(tp,aux.Stringid(id,2),aux.Stringid(id,3))
elseif b1 then
op=Duel.SelectOption(tp,aux.Stringid(id,2))
else
op=Duel.SelectOption(tp,aux.Stringid(id,3))+1
end
e:SetLabel(op)
if op==0 then
e:SetCategory(CATEGORY_DRAW)
Duel.SetOperationInfo(0,CATEGORY_DRAW,nil,0,tp,1)
else
e:SetCategory(CATEGORY_TOHAND)
Duel.SetOperationInfo(0,CATEGORY_TOHAND,nil,1,tp,LOCATION_GRAVE+LOCATION_REMOVED)
end
end
function s.thop(e,tp,eg,ep,ev,re,r,rp)
function s.operation(e,tp,eg,ep,ev,re,r,rp)
if e:GetLabel()==0 then
Duel.Draw(tp,1,REASON_EFFECT)
else
Duel.Hint(HINT_SELECTMSG,tp,HINTMSG_ATOHAND)
local g=Duel.SelectMatchingCard(tp,aux.NecroValleyFilter(s.filter),tp,LOCATION_GRAVE+LOCATION_REMOVED,0,1,1,nil)
if g:GetCount()>0 then
local g=Duel.SelectMatchingCard(tp,aux.NecroValleyFilter(s.thfilter),tp,LOCATION_GRAVE+LOCATION_REMOVED,0,1,1,nil)
if #g>0 then
Duel.SendtoHand(g,nil,REASON_EFFECT)
Duel.ConfirmCards(1-tp,g)
end
end
end
function s.thfilter(c)
return c:IsFaceupEx() and c:IsSetCard(0x666c) and c:IsAbleToHand()
end
-- 这张卡被除外的场合,以自己场上1只「堕福」超量怪兽为对象才能发动,把这张卡作为那只怪兽的超量素材
......
......@@ -2,11 +2,11 @@
local s,id,o=GetID()
function s.initial_effect(c)
-- 让这张卡从手卡·墓地回到卡组才能发动,自己的卡组·墓地·除外状态的1张「堕福」永续魔法·永续陷阱卡在自己场上盖放
-- 把这张卡从手卡丢弃才能发动,自己的卡组·墓地·除外状态的1张「堕福」永续魔法·永续陷阱卡在自己场上盖放或在自己的超量怪兽下面重叠作为超量素材
local e1=Effect.CreateEffect(c)
e1:SetDescription(aux.Stringid(id,0))
e1:SetType(EFFECT_TYPE_IGNITION)
e1:SetRange(LOCATION_HAND+LOCATION_GRAVE)
e1:SetRange(LOCATION_HAND)
e1:SetCountLimit(1,id)
e1:SetCost(s.setcost)
e1:SetTarget(s.settg)
......@@ -25,31 +25,46 @@ function s.initial_effect(c)
c:RegisterEffect(e2)
end
-- 让这张卡从手卡·墓地回到卡组才能发动,自己的卡组·墓地·除外状态的1张「堕福」永续魔法·永续陷阱卡在自己场上盖放
-- 把这张卡从手卡丢弃才能发动,自己的卡组·墓地·除外状态的1张「堕福」永续魔法·永续陷阱卡在自己场上盖放或在自己的超量怪兽下面重叠作为超量素材
function s.setcost(e,tp,eg,ep,ev,re,r,rp,chk)
local c=e:GetHandler()
if chk==0 then return c:IsAbleToDeckAsCost() end
Duel.ConfirmCards(1-tp,c)
Duel.SendtoDeck(c,nil,SEQ_DECKSHUFFLE,REASON_COST)
if chk==0 then return c:IsDiscardable() end
Duel.SendtoGrave(c,REASON_COST+REASON_DISCARD)
end
function s.pfilter(c,tp)
return c:IsFaceupEx() and c:IsType(TYPE_CONTINUOUS) and c:IsSetCard(0x666c)
and not c:IsForbidden() and c:CheckUniqueOnField(tp)
and not c:IsForbidden() and c:CheckUniqueOnField(tp) and (c:IsAbleToGrave() or (Duel.IsExistingMatchingCard(s.matfilter,tp,LOCATION_MZONE,0,1,nil) and c:IsCanOverlay()))
end
function s.settg(e,tp,eg,ep,ev,re,r,rp,chk)
if chk==0 then return Duel.GetLocationCount(tp,LOCATION_SZONE)>0
and Duel.IsExistingMatchingCard(s.pfilter,tp,LOCATION_DECK+LOCATION_GRAVE+LOCATION_REMOVED,0,1,nil,tp) end
if chk==0 then
return (Duel.GetLocationCount(tp,LOCATION_SZONE)>0
or Duel.IsExistingMatchingCard(s.matfilter,tp,LOCATION_MZONE,0,1,nil))
and Duel.IsExistingMatchingCard(s.pfilter,tp,LOCATION_DECK+LOCATION_GRAVE+LOCATION_REMOVED,0,1,nil,tp)
end
end
function s.setop(e,tp,eg,ep,ev,re,r,rp)
Duel.Hint(HINT_SELECTMSG,tp,HINTMSG_SET)
Duel.Hint(HINT_SELECTMSG,tp,HINTMSG_SELECT)
local g=Duel.SelectMatchingCard(tp,aux.NecroValleyFilter(s.pfilter),tp,LOCATION_DECK+LOCATION_GRAVE+LOCATION_REMOVED,0,1,1,nil)
local tc=g:GetFirst()
if tc then
if Duel.IsExistingMatchingCard(s.matfilter,tp,LOCATION_MZONE,0,1,nil) and tc:IsCanOverlay()
and Duel.SelectYesNo(tp,aux.Stringid(id,2)) then
Duel.Hint(HINT_SELECTMSG,tp,HINTMSG_FACEUP)
local sg=Duel.SelectMatchingCard(tp,s.matfilter,tp,LOCATION_MZONE,0,1,1,nil)
if #sg>0 then
Duel.Overlay(sg:GetFirst(),Group.FromCards(tc))
end
else
Duel.SSet(tp,tc)
end
end
end
function s.matfilter(c)
return c:IsFaceup() and c:IsType(TYPE_XYZ)
end
-- 这张卡被除外的场合,以自己场上1只「堕福」超量怪兽为对象才能发动,把这张卡作为那只怪兽的超量素材
......
......@@ -2,15 +2,13 @@
local s,id,o=GetID()
function s.initial_effect(c)
-- 自己·对方回合,让这张卡从手卡·墓地回到卡组才能发动,从手卡·卡组选「堕福的选灯 命途照」以外的1张「堕福」卡送去墓地或在自己的超量怪兽下面重叠作为超量素材
-- 把这张卡从手卡丢弃才能发动,从手卡·卡组选1只「堕福」怪兽送去墓地或在自己的超量怪兽下面重叠作为超量素材
local e1=Effect.CreateEffect(c)
e1:SetDescription(aux.Stringid(id,0))
e1:SetCategory(CATEGORY_TOGRAVE)
e1:SetType(EFFECT_TYPE_QUICK_O)
e1:SetCode(EVENT_FREE_CHAIN)
e1:SetRange(LOCATION_HAND+LOCATION_GRAVE)
e1:SetType(EFFECT_TYPE_IGNITION)
e1:SetRange(LOCATION_HAND)
e1:SetCountLimit(1,id)
e1:SetHintTiming(0,TIMINGS_CHECK_MONSTER+TIMING_END_PHASE)
e1:SetCost(s.tgcost)
e1:SetTarget(s.tgtg)
e1:SetOperation(s.tgop)
......@@ -28,16 +26,15 @@ function s.initial_effect(c)
c:RegisterEffect(e2)
end
-- 自己·对方回合,让这张卡从手卡·墓地回到卡组才能发动,从手卡·卡组选「堕福的选灯 命途照」以外的1张「堕福」卡送去墓地或在自己的超量怪兽下面重叠作为超量素材
-- 把这张卡从手卡丢弃才能发动,从手卡·卡组选1只「堕福」怪兽送去墓地或在自己的超量怪兽下面重叠作为超量素材
function s.tgcost(e,tp,eg,ep,ev,re,r,rp,chk)
local c=e:GetHandler()
if chk==0 then return c:IsAbleToDeckAsCost() end
Duel.ConfirmCards(1-tp,c)
Duel.SendtoDeck(c,nil,SEQ_DECKSHUFFLE,REASON_COST)
if chk==0 then return c:IsDiscardable() end
Duel.SendtoGrave(c,REASON_COST+REASON_DISCARD)
end
function s.tgfilter(c,e,tp)
return c:IsSetCard(0x666c) and not c:IsCode(id) and (c:IsAbleToGrave() or (Duel.IsExistingMatchingCard(s.matfilter,tp,LOCATION_MZONE,0,1,nil) and c:IsCanOverlay()))
return c:IsSetCard(0x666c) and c:IsType(TYPE_MONSTER) and (c:IsAbleToGrave() or (Duel.IsExistingMatchingCard(s.matfilter,tp,LOCATION_MZONE,0,1,nil) and c:IsCanOverlay()))
end
function s.tgtg(e,tp,eg,ep,ev,re,r,rp,chk)
......
......@@ -6,24 +6,20 @@ function s.initial_effect(c)
c:EnableReviveLimit()
aux.AddXyzProcedure(c,aux.FilterBoolFunction(Card.IsRace,RACE_FAIRY),6,2,nil,nil,99)
-- 只要持有超量素材的这张卡在怪兽区域存在,对方若不支付600基本分,则不能把卡的效果发动
-- 只要持有超量素材的这张卡在怪兽区域存在,每次对方把怪兽的效果发动,给与对方600伤害
local e1=Effect.CreateEffect(c)
e1:SetType(EFFECT_TYPE_FIELD)
e1:SetCode(EFFECT_ACTIVATE_COST)
e1:SetType(EFFECT_TYPE_FIELD+EFFECT_TYPE_CONTINUOUS)
e1:SetCode(EVENT_CHAINING)
e1:SetRange(LOCATION_MZONE)
e1:SetProperty(EFFECT_FLAG_PLAYER_TARGET)
e1:SetTargetRange(0,1)
e1:SetCondition(s.costcon)
e1:SetCost(s.costchk)
e1:SetOperation(s.costop)
e1:SetProperty(EFFECT_FLAG_CANNOT_DISABLE)
e1:SetOperation(s.regop)
c:RegisterEffect(e1)
local e2=Effect.CreateEffect(c)
e2:SetType(EFFECT_TYPE_FIELD)
e2:SetCode(EFFECT_FLAG_EFFECT+id)
e2:SetType(EFFECT_TYPE_FIELD+EFFECT_TYPE_CONTINUOUS)
e2:SetCode(EVENT_CHAIN_SOLVED)
e2:SetRange(LOCATION_MZONE)
e2:SetProperty(EFFECT_FLAG_PLAYER_TARGET)
e2:SetCondition(s.costcon)
e2:SetTargetRange(0,1)
e2:SetCondition(s.damcon)
e2:SetOperation(s.damop)
c:RegisterEffect(e2)
-- 场上的这张卡被战斗·效果破坏的场合,可以作为代替把这张卡1个超量素材取除
......@@ -54,18 +50,21 @@ function s.initial_effect(c)
c:RegisterEffect(e5)
end
-- 只要持有超量素材的这张卡在怪兽区域存在,对方若不支付600基本分,则不能把卡的效果发动
function s.costcon(e)
return e:GetHandler():GetOverlayCount()>0
-- 只要持有超量素材的这张卡在怪兽区域存在,每次对方把怪兽的效果发动,给与对方600伤害
function s.regop(e,tp,eg,ep,ev,re,r,rp)
if rp==1-tp and re:IsActiveType(TYPE_MONSTER) then
e:GetHandler():RegisterFlagEffect(id,RESET_EVENT+RESETS_STANDARD-RESET_TURN_SET+RESET_CHAIN,0,1)
end
end
function s.costchk(e,te_or_c,tp)
local ct=Duel.GetFlagEffect(tp,id)
return Duel.CheckLPCost(tp,ct*600)
function s.damcon(e,tp,eg,ep,ev,re,r,rp)
local c=e:GetHandler()
return c:GetOverlayCount()>0 and ep~=tp and Duel.GetLP(1-tp)>0 and c:GetFlagEffect(id)~=0 and re:IsActiveType(TYPE_MONSTER)
end
function s.costop(e,tp,eg,ep,ev,re,r,rp)
Duel.PayLPCost(tp,600)
function s.damop(e,tp,eg,ep,ev,re,r,rp)
Duel.Hint(HINT_CARD,0,id)
Duel.Damage(1-tp,600,REASON_EFFECT)
end
-- 场上的这张卡被战斗·效果破坏的场合,可以作为代替把这张卡1个超量素材取除
......
......@@ -34,19 +34,19 @@ function s.initial_effect(c)
e3:SetOperation(s.rthop)
c:RegisterEffect(e3)
-- ●暗:对方场上1只表侧表示怪兽变成里侧守备表示
-- ●暗:对方场上1张卡送去墓地
local e4=Effect.CreateEffect(c)
e4:SetDescription(aux.Stringid(id,3))
e4:SetCategory(CATEGORY_POSITION)
e4:SetCategory(CATEGORY_TOGRAVE)
e4:SetType(EFFECT_TYPE_FIELD+EFFECT_TYPE_TRIGGER_O)
e4:SetProperty(EFFECT_FLAG_DELAY)
e4:SetCode(EVENT_CHAINING)
e4:SetRange(LOCATION_SZONE)
e4:SetCountLimit(1,id+1)
e4:SetCondition(s.fpcon)
e4:SetCost(s.fpcost)
e4:SetTarget(s.fptg)
e4:SetOperation(s.fpop)
e4:SetCondition(s.tgcon)
e4:SetCost(s.tgcost)
e4:SetTarget(s.tgtg)
e4:SetOperation(s.tgop)
c:RegisterEffect(e4)
-- 这些效果发动的回合,自己不能把场上的怪兽的效果发动
......@@ -156,15 +156,15 @@ function s.rthop(e,tp,eg,ep,ev,re,r,rp)
end
end
-- ●暗:对方场上1只表侧表示怪兽变成里侧守备表示
function s.fpcfilter(c)
-- ●暗:对方场上1张卡送去墓地
function s.tgcfilter(c)
return c:IsType(TYPE_MONSTER) and c:IsAttribute(ATTRIBUTE_DARK) and c:IsAbleToRemoveAsCost()
end
function s.fpcost(e,tp,eg,ep,ev,re,r,rp,chk)
if chk==0 then return Duel.GetCustomActivityCount(id,tp,ACTIVITY_CHAIN)==0 and Duel.IsExistingMatchingCard(s.fpcfilter,tp,LOCATION_GRAVE,0,1,nil) end
function s.tgcost(e,tp,eg,ep,ev,re,r,rp,chk)
if chk==0 then return Duel.GetCustomActivityCount(id,tp,ACTIVITY_CHAIN)==0 and Duel.IsExistingMatchingCard(s.tgcfilter,tp,LOCATION_GRAVE,0,1,nil) end
Duel.Hint(HINT_SELECTMSG,tp,HINTMSG_REMOVE)
local g=Duel.SelectMatchingCard(tp,s.fpcfilter,tp,LOCATION_GRAVE,0,1,1,nil)
local g=Duel.SelectMatchingCard(tp,s.tgcfilter,tp,LOCATION_GRAVE,0,1,1,nil)
Duel.Remove(g,POS_FACEUP,REASON_COST)
local e1=Effect.CreateEffect(e:GetHandler())
e1:SetType(EFFECT_TYPE_FIELD)
......@@ -176,23 +176,22 @@ function s.fpcost(e,tp,eg,ep,ev,re,r,rp,chk)
Duel.RegisterEffect(e1,tp)
end
function s.fpcon(e,tp,eg,ep,ev,re,r,rp)
function s.tgcon(e,tp,eg,ep,ev,re,r,rp)
return rp==1-tp
end
function s.fptg(e,tp,eg,ep,ev,re,r,rp,chk)
if chk==0 then
return Duel.IsExistingMatchingCard(Card.IsCanTurnSet,tp,0,LOCATION_MZONE,1,nil)
end
Duel.Hint(HINT_OPSELECTED,1-tp,e:GetDescription())
Duel.SetOperationInfo(0,CATEGORY_POSITION,nil,1,1-tp,LOCATION_MZONE)
function s.tgtg(e,tp,eg,ep,ev,re,r,rp,chk)
local g=Duel.GetMatchingGroup(Card.IsAbleToGrave,tp,0,LOCATION_ONFIELD,nil)
if chk==0 then return #g>0 end
Duel.SetOperationInfo(0,CATEGORY_TOGRAVE,g,1,0,0)
end
function s.fpop(e,tp,eg,ep,ev,re,r,rp)
Duel.Hint(HINT_SELECTMSG,tp,HINTMSG_POSCHANGE)
local g=Duel.SelectMatchingCard(tp,Card.IsCanTurnSet,tp,0,LOCATION_MZONE,1,1,nil)
function s.tgop(e,tp,eg,ep,ev,re,r,rp)
local g=Duel.GetMatchingGroup(Card.IsAbleToGrave,tp,0,LOCATION_ONFIELD,nil)
if #g>0 then
Duel.HintSelection(g)
Duel.ChangePosition(g,POS_FACEDOWN_DEFENSE)
Duel.Hint(HINT_SELECTMSG,tp,HINTMSG_TOGRAVE)
local sg=g:Select(tp,1,1,nil)
Duel.HintSelection(sg)
Duel.SendtoGrave(sg,REASON_EFFECT)
end
end
......@@ -33,19 +33,19 @@ function s.initial_effect(c)
e3:SetOperation(s.drop)
c:RegisterEffect(e3)
-- ●暗:对方手卡随机1张送去墓地
-- ●暗:对方的额外卡组的里侧的卡随机1张除外
local e4=Effect.CreateEffect(c)
e4:SetDescription(aux.Stringid(id,3))
e4:SetCategory(CATEGORY_HANDES)
e4:SetCategory(CATEGORY_REMOVE)
e4:SetType(EFFECT_TYPE_FIELD+EFFECT_TYPE_TRIGGER_O)
e4:SetProperty(EFFECT_FLAG_DELAY)
e4:SetCode(EVENT_CHAINING)
e4:SetRange(LOCATION_SZONE)
e4:SetCountLimit(1,id+1)
e4:SetCondition(s.thcon)
e4:SetCost(s.thcost)
e4:SetTarget(s.thtg)
e4:SetOperation(s.thop)
e4:SetCondition(s.rmcon)
e4:SetCost(s.rmcost)
e4:SetTarget(s.rmtg)
e4:SetOperation(s.rmop)
c:RegisterEffect(e4)
-- 这些效果发动的回合,自己不能把场上的怪兽的效果发动
......@@ -136,15 +136,15 @@ function s.drop(e,tp,eg,ep,ev,re,r,rp)
Duel.Draw(p,d,REASON_EFFECT)
end
-- ●暗:对方手卡随机1张送去墓地
function s.thcfilter(c)
-- ●暗:对方的额外卡组的里侧的卡随机1张除外
function s.rmcfilter(c)
return c:IsType(TYPE_MONSTER) and c:IsAttribute(ATTRIBUTE_DARK) and c:IsAbleToRemoveAsCost()
end
function s.thcost(e,tp,eg,ep,ev,re,r,rp,chk)
if chk==0 then return Duel.GetCustomActivityCount(id,tp,ACTIVITY_CHAIN)==0 and Duel.IsExistingMatchingCard(s.thcfilter,tp,LOCATION_GRAVE,0,1,nil) end
function s.rmcost(e,tp,eg,ep,ev,re,r,rp,chk)
if chk==0 then return Duel.GetCustomActivityCount(id,tp,ACTIVITY_CHAIN)==0 and Duel.IsExistingMatchingCard(s.rmcfilter,tp,LOCATION_GRAVE,0,1,nil) end
Duel.Hint(HINT_SELECTMSG,tp,HINTMSG_REMOVE)
local g=Duel.SelectMatchingCard(tp,s.thcfilter,tp,LOCATION_GRAVE,0,1,1,nil)
local g=Duel.SelectMatchingCard(tp,s.rmcfilter,tp,LOCATION_GRAVE,0,1,1,nil)
Duel.Remove(g,POS_FACEUP,REASON_COST)
local e1=Effect.CreateEffect(e:GetHandler())
e1:SetType(EFFECT_TYPE_FIELD)
......@@ -156,18 +156,23 @@ function s.thcost(e,tp,eg,ep,ev,re,r,rp,chk)
Duel.RegisterEffect(e1,tp)
end
function s.thcon(e,tp,eg,ep,ev,re,r,rp)
function s.rmcon(e,tp,eg,ep,ev,re,r,rp)
return rp==1-tp
end
function s.thtg(e,tp,eg,ep,ev,re,r,rp,chk)
if chk==0 then return Duel.GetFieldGroupCount(tp,0,LOCATION_HAND)>0 end
Duel.Hint(HINT_OPSELECTED,1-tp,e:GetDescription())
Duel.SetOperationInfo(0,CATEGORY_HANDES,0,0,1-tp,1)
function s.rmfilter(c)
return c:IsFacedown() and c:IsAbleToRemove()
end
function s.rmtg(e,tp,eg,ep,ev,re,r,rp,chk)
if chk==0 then return Duel.IsExistingMatchingCard(s.rmfilter,tp,0,LOCATION_EXTRA,1,nil) end
Duel.SetOperationInfo(0,CATEGORY_REMOVE,nil,1,tp,LOCATION_EXTRA)
end
function s.thop(e,tp,eg,ep,ev,re,r,rp)
local g=Duel.GetFieldGroup(ep,LOCATION_HAND,0)
local sg=g:RandomSelect(ep,1)
Duel.SendtoGrave(sg,REASON_EFFECT)
function s.rmop(e,tp,eg,ep,ev,re,r,rp)
local g=Duel.GetMatchingGroup(s.rmfilter,tp,0,LOCATION_EXTRA,nil)
if g:GetCount()>0 then
local sg=g:RandomSelect(tp,1)
Duel.Remove(sg,POS_FACEUP,REASON_EFFECT)
end
end
......@@ -15,19 +15,16 @@ function s.initial_effect(c)
e1:SetOperation(s.activate)
c:RegisterEffect(e1)
-- 这张卡被送去墓地的自己·对方回合才能发动,把自己墓地的「堕福」卡种类数量的卡从自己卡组上面送去墓地
-- 这张卡在墓地存在的场合,从自己墓地把1只「堕福」怪兽除外才能发动,这张卡加入手卡
local e2=Effect.CreateEffect(c)
e2:SetDescription(aux.Stringid(id,1))
e2:SetCategory(CATEGORY_DECKDES)
e2:SetType(EFFECT_TYPE_QUICK_O)
e2:SetCode(EVENT_FREE_CHAIN)
e2:SetHintTiming(0,TIMINGS_CHECK_MONSTER+TIMING_END_PHASE)
e2:SetCategory(CATEGORY_TOHAND)
e2:SetType(EFFECT_TYPE_IGNITION)
e2:SetRange(LOCATION_GRAVE)
e2:SetCountLimit(1,id)
e2:SetCost(s.cost)
e2:SetCondition(s.tgcon)
e2:SetTarget(s.tgtg)
e2:SetOperation(s.tgop)
e2:SetCost(s.thcost)
e2:SetTarget(s.thtg)
e2:SetOperation(s.thop)
c:RegisterEffect(e2)
-- 这些效果发动的回合,自己不能把场上的怪兽的效果发动
......@@ -41,6 +38,16 @@ function s.chainfilter(re,tp,cid)
return not (re:IsActiveType(TYPE_MONSTER) and loc==LOCATION_MZONE)
end
function s.aclimit(e,re,tp)
local rc=re:GetHandler()
return re:IsActiveType(TYPE_MONSTER) and rc:IsLocation(LOCATION_MZONE)
end
-- 自己场上有「堕福」超量怪兽存在,怪兽的效果·魔法·陷阱卡发动时才能发动,那个发动无效并除外
function s.cfilter(c)
return c:IsFaceup() and c:IsSetCard(0x666c) and c:IsType(TYPE_XYZ)
end
function s.cost(e,tp,eg,ep,ev,re,r,rp,chk)
if chk==0 then return Duel.GetCustomActivityCount(id,tp,ACTIVITY_CHAIN)==0 end
local e1=Effect.CreateEffect(e:GetHandler())
......@@ -53,16 +60,6 @@ function s.cost(e,tp,eg,ep,ev,re,r,rp,chk)
Duel.RegisterEffect(e1,tp)
end
function s.aclimit(e,re,tp)
local rc=re:GetHandler()
return re:IsActiveType(TYPE_MONSTER) and rc:IsLocation(LOCATION_MZONE)
end
-- 自己场上有「堕福」超量怪兽存在,怪兽的效果·魔法·陷阱卡发动时才能发动,那个发动无效并除外
function s.cfilter(c)
return c:IsFaceup() and c:IsSetCard(0x666c) and c:IsType(TYPE_XYZ)
end
function s.condition(e,tp,eg,ep,ev,re,r,rp)
return Duel.IsExistingMatchingCard(s.cfilter,tp,LOCATION_MZONE,0,1,nil)
and Duel.IsChainNegatable(ev) and (re:IsActiveType(TYPE_MONSTER) or re:IsHasType(EFFECT_TYPE_ACTIVATE))
......@@ -74,24 +71,35 @@ function s.activate(e,tp,eg,ep,ev,re,r,rp)
end
end
-- 这张卡被送去墓地的自己·对方回合才能发动,把自己墓地的「堕福」卡种类数量的卡从自己卡组上面送去墓地
function s.tgcon(e,tp,eg,ep,ev,re,r,rp)
return e:GetHandler():GetTurnID()==Duel.GetTurnCount() and not e:GetHandler():IsReason(REASON_RETURN)
-- 这张卡在墓地存在的场合,从自己墓地把1只「堕福」怪兽除外才能发动,这张卡加入手卡
function s.thfilter(c)
return c:IsSetCard(0x666c) and c:IsType(TYPE_MONSTER) and c:IsAbleToRemoveAsCost()
end
function s.tgfilter(c)
return c:IsSetCard(0x666c)
function s.thcost(e,tp,eg,ep,ev,re,r,rp,chk)
if chk==0 then return Duel.GetCustomActivityCount(id,tp,ACTIVITY_CHAIN)==0 and Duel.IsExistingMatchingCard(s.thfilter,tp,LOCATION_GRAVE,0,1,nil) end
Duel.Hint(HINT_SELECTMSG,tp,HINTMSG_REMOVE)
local g=Duel.SelectMatchingCard(tp,s.thfilter,tp,LOCATION_GRAVE,0,1,1,nil)
Duel.Remove(g,POS_FACEUP,REASON_COST)
local e1=Effect.CreateEffect(e:GetHandler())
e1:SetType(EFFECT_TYPE_FIELD)
e1:SetCode(EFFECT_CANNOT_ACTIVATE)
e1:SetProperty(EFFECT_FLAG_PLAYER_TARGET+EFFECT_FLAG_OATH)
e1:SetTargetRange(1,0)
e1:SetValue(s.aclimit)
e1:SetReset(RESET_PHASE+PHASE_END)
Duel.RegisterEffect(e1,tp)
end
function s.tgtg(e,tp,eg,ep,ev,re,r,rp,chk)
local ct=Duel.GetMatchingGroup(s.tgfilter,tp,LOCATION_GRAVE,0,nil):GetClassCount(Card.GetCode)
if chk==0 then return ct>0 and Duel.IsPlayerCanDiscardDeck(tp,ct) end
Duel.SetOperationInfo(0,CATEGORY_DECKDES,nil,0,tp,ct)
function s.thtg(e,tp,eg,ep,ev,re,r,rp,chk)
if chk==0 then return e:GetHandler():IsAbleToHand() end
Duel.SetOperationInfo(0,CATEGORY_TOHAND,e:GetHandler(),1,0,0)
end
function s.tgop(e,tp,eg,ep,ev,re,r,rp)
local ct=Duel.GetMatchingGroup(s.tgfilter,tp,LOCATION_GRAVE,0,nil):GetClassCount(Card.GetCode)
if ct>0 then
Duel.DiscardDeck(tp,ct,REASON_EFFECT)
function s.thop(e,tp,eg,ep,ev,re,r,rp)
local c=e:GetHandler()
if c:IsRelateToEffect(e) then
Duel.SendtoHand(c,nil,REASON_EFFECT)
Duel.ConfirmCards(1-tp,c)
end
end
......@@ -2,9 +2,9 @@
local s,id,o=GetID()
function s.initial_effect(c)
-- 包含念动力族怪兽的怪兽3只
-- 包含「蒸汽朋克」怪兽的念动力族怪兽3只
c:EnableReviveLimit()
aux.AddLinkProcedure(c,nil,3,3,s.lcheck)
aux.AddLinkProcedure(c,aux.FilterBoolFunction(Card.IsLinkRace,RACE_PSYCHO),3,3,s.lcheck)
-- 这张卡是已用融合·同调·超量·连接怪兽的其中任意种为素材作连接召唤的场合,这张卡不会被战斗·效果破坏
local e1=Effect.CreateEffect(c)
......@@ -43,9 +43,9 @@ function s.initial_effect(c)
c:RegisterEffect(e5)
end
-- 包含念动力族怪兽的怪兽3只
-- 包含「蒸汽朋克」怪兽的念动力族怪兽3只
function s.lcheck(g,lc)
return g:IsExists(Card.IsLinkRace,1,nil,RACE_PSYCHO)
return g:IsExists(Card.IsLinkSetCard,1,nil,0x666b)
end
-- 这张卡是已用融合·同调·超量·连接怪兽的其中任意种为素材作连接召唤的场合,这张卡不会被战斗·效果破坏
......
--电子化天使-A-
local s,id,o=GetID()
function s.initial_effect(c)
c:EnableReviveLimit()
--change effect type
local e1=Effect.CreateEffect(c)
e1:SetType(EFFECT_TYPE_FIELD)
e1:SetProperty(EFFECT_FLAG_PLAYER_TARGET+EFFECT_FLAG_SET_AVAILABLE)
e1:SetCode(id)
e1:SetRange(LOCATION_HAND+LOCATION_DECK)
e1:SetTargetRange(1,0)
c:RegisterEffect(e1)
--tohand
local e2=Effect.CreateEffect(c)
e2:SetDescription(aux.Stringid(id,1))
e2:SetCategory(CATEGORY_SPECIAL_SUMMON)
e2:SetType(EFFECT_TYPE_SINGLE+EFFECT_TYPE_TRIGGER_O)
e2:SetProperty(EFFECT_FLAG_DAMAGE_STEP+EFFECT_FLAG_DELAY)
e2:SetCode(EVENT_RELEASE)
e2:SetTarget(s.sptg)
e2:SetOperation(s.spop)
c:RegisterEffect(e2)
--
if not s.global_activate_check then
s.global_activate_check=true
--special summon
local e01=Effect.CreateEffect(c)
e01:SetType(EFFECT_TYPE_FIELD)
e01:SetCode(EFFECT_SPSUMMON_PROC)
e01:SetProperty(EFFECT_FLAG_CANNOT_DISABLE+EFFECT_FLAG_UNCOPYABLE)
e01:SetRange(LOCATION_HAND)
e01:SetValue(SUMMON_TYPE_RITUAL)
e01:SetCondition(s.rspcon)
e01:SetOperation(s.rspcop)
--SpecialSummon from ex
local ge1=Effect.CreateEffect(c)
ge1:SetDescription(aux.Stringid(id,2))
ge1:SetType(EFFECT_TYPE_FIELD+EFFECT_TYPE_CONTINUOUS)
ge1:SetCode(EVENT_FREE_CHAIN)
ge1:SetRange(LOCATION_HAND)
ge1:SetProperty(EFFECT_FLAG_CANNOT_DISABLE)
ge1:SetHintTiming(TIMING_BATTLE_PHASE)
ge1:SetLabelObject(e01)
ge1:SetCondition(s.spcon)
ge1:SetTarget(s.sptarget)
ge1:SetOperation(s.spactivate)
local ge3=Effect.CreateEffect(c)
ge3:SetType(EFFECT_TYPE_FIELD+EFFECT_TYPE_GRANT)
ge3:SetTargetRange(LOCATION_HAND,0)
ge3:SetTarget(s.eftg)
ge3:SetLabelObject(ge1)
Duel.RegisterEffect(ge3,0)
local ge4=ge3:Clone()
Duel.RegisterEffect(ge4,1)
end
end
function s.spfilter(c,e,tp)
return c:IsRace(RACE_FAIRY) and c:IsSetCard(0x93) and c:IsCanBeSpecialSummoned(e,0,tp,false,false)
end
function s.sptg(e,tp,eg,ep,ev,re,r,rp,chk)
if chk==0 then return Duel.GetLocationCount(tp,LOCATION_MZONE)>0
and Duel.IsExistingMatchingCard(s.spfilter,tp,LOCATION_HAND+LOCATION_DECK+LOCATION_GRAVE,0,1,nil,e,tp) end
Duel.SetOperationInfo(0,CATEGORY_SPECIAL_SUMMON,nil,1,tp,LOCATION_HAND+LOCATION_DECK+LOCATION_GRAVE)
end
function s.spop(e,tp,eg,ep,ev,re,r,rp)
if Duel.GetLocationCount(tp,LOCATION_MZONE)<=0 then return end
Duel.Hint(HINT_SELECTMSG,tp,HINTMSG_SPSUMMON)
local g=Duel.SelectMatchingCard(tp,aux.NecroValleyFilter(s.spfilter),tp,LOCATION_HAND+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
-------------------------------Global Effect-------------------------------
function s.eftg(e,c)
return bit.band(c:GetType(),0x81)==0x81 and c:IsSetCard(0x2093)
end
function s.spcon(e,tp,eg,ep,ev,re,r,rp)
if Duel.GetTurnPlayer()~=tp then return false end
local ph=Duel.GetCurrentPhase()
return ph>=PHASE_BATTLE_START and ph<=PHASE_BATTLE and Duel.IsPlayerAffectedByEffect(tp,id)
end
function s.sptarget(e,tp,eg,ep,ev,re,r,rp,chk)
if chk==0 then
local ritual_e=e:GetLabelObject()
if not ritual_e then return false end
local ritual_e2=ritual_e:Clone()
e:GetHandler():RegisterEffect(ritual_e2)
local boolean=e:GetHandler():IsSpecialSummonable() and e:GetHandler():GetFlagEffect(id)==0
ritual_e2:Reset()
return boolean
end
e:GetHandler():RegisterFlagEffect(id,RESET_EVENT+RESETS_STANDARD,0,1)
Duel.SetOperationInfo(0,CATEGORY_SPECIAL_SUMMON,e:GetHandler(),1,tp,LOCATION_HAND)
end
function s.spactivate(e,tp,eg,ep,ev,re,r,rp)
e:GetHandler():ResetFlagEffect(id)
local ritual_e=e:GetLabelObject()
if not ritual_e then return false end
local ritual_e2=ritual_e:Clone()
e:GetHandler():RegisterEffect(ritual_e2)
if e:GetHandler():IsSpecialSummonable() then
Duel.SpecialSummonRule(tp,e:GetHandler())
end
ritual_e2:Reset()
end
function s.mfilter(c)
return c:IsReleasable(REASON_EFFECT|REASON_MATERIAL|REASON_RITUAL)
end
function s.rspcon(e,c)
if c==nil then return true end
local tp=c:GetControler()
local m1=Duel.GetRitualMaterial(tp)
if bit.band(c:GetType(),0x81)~=0x81 or not c:IsCanBeSpecialSummoned(e,SUMMON_TYPE_RITUAL,tp,false,true) then return false end
local mg1=m1:Filter(Card.IsCanBeRitualMaterial,c,c)
local mg2=Duel.GetMatchingGroup(s.mfilter,tp,LOCATION_DECK,0,nil)
local mg=Group.__add(mg1,mg2):Filter(Card.IsCode,nil,id)
mg:RemoveCard(c)
local lv=c:GetLevel()
aux.GCheckAdditional=aux.RitualCheckAdditional(c,lv,"Greater")
local res=mg:CheckSubGroup(aux.RitualCheck,1,lv,tp,c,lv,"Greater")
aux.GCheckAdditional=nil
return res
end
function s.rspcop(e,tp,eg,ep,ev,re,r,rp,c)
--::cancel::
local c=e:GetHandler()
if not c then return false end
local mg=Duel.GetRitualMaterial(tp)
mg:RemoveCard(c)
if c then
local lv=c:GetLevel()
local mg1=mg:Filter(Card.IsCanBeRitualMaterial,c,c)
local mg2=Duel.GetMatchingGroup(s.mfilter,tp,LOCATION_DECK,0,nil)
local mg=Group.__add(mg1,mg2):Filter(Card.IsCode,nil,id)
Duel.Hint(HINT_SELECTMSG,tp,HINTMSG_RELEASE)
aux.GCheckAdditional=aux.RitualCheckAdditional(c,lv,"Greater")
local mat=mg:SelectSubGroup(tp,aux.RitualCheck,false,1,lv,tp,c,lv,"Greater")
aux.GCheckAdditional=nil
c:SetMaterial(mat)
Duel.ReleaseRitualMaterial(mat)
end
end
--电子化天使-B-
local s,id,o=GetID()
function s.initial_effect(c)
c:EnableReviveLimit()
--adjust
local e0=Effect.CreateEffect(c)
e0:SetType(EFFECT_TYPE_FIELD+EFFECT_TYPE_CONTINUOUS)
e0:SetProperty(EFFECT_FLAG_IGNORE_IMMUNE)
e0:SetCode(EVENT_ADJUST)
e0:SetRange(0xff)
e0:SetOperation(s.adjustop)
c:RegisterEffect(e0)
--change effect type
local e01=Effect.CreateEffect(c)
e01:SetType(EFFECT_TYPE_FIELD)
e01:SetProperty(EFFECT_FLAG_PLAYER_TARGET+EFFECT_FLAG_SET_AVAILABLE+EFFECT_FLAG_CANNOT_DISABLE+EFFECT_FLAG_UNCOPYABLE)
e01:SetCode(id)
e01:SetRange(LOCATION_HAND+LOCATION_DECK)
e01:SetTargetRange(1,0)
c:RegisterEffect(e01)
--to grave
local e1=Effect.CreateEffect(c)
e1:SetDescription(aux.Stringid(id,0))
e1:SetCategory(CATEGORY_TOGRAVE)
e1:SetType(EFFECT_TYPE_SINGLE+EFFECT_TYPE_TRIGGER_O)
e1:SetProperty(EFFECT_FLAG_DELAY)
e1:SetCode(EVENT_SPSUMMON_SUCCESS)
e1:SetCondition(s.tgcon)
e1:SetTarget(s.tgtg)
e1:SetOperation(s.tgop)
c:RegisterEffect(e1)
--copy
local e3=Effect.CreateEffect(c)
e3:SetDescription(aux.Stringid(id,1))
e3:SetType(EFFECT_TYPE_QUICK_O)
e3:SetCode(EVENT_FREE_CHAIN)
e3:SetRange(LOCATION_MZONE)
e3:SetCountLimit(1)
e3:SetProperty(EFFECT_FLAG_CARD_TARGET)
e3:SetTarget(s.cptg)
e3:SetOperation(s.cpop)
c:RegisterEffect(e3)
end
function s.tgcon(e,tp,eg,ep,ev,re,r,rp)
return e:GetHandler():IsSummonType(SUMMON_TYPE_RITUAL)
end
function s.tgtg(e,tp,eg,ep,ev,re,r,rp,chk)
if chk==0 then return Duel.GetFieldGroupCount(tp,0,LOCATION_ONFIELD)>0 end
Duel.SetOperationInfo(0,CATEGORY_TOGRAVE,nil,1,0,LOCATION_ONFIELD)
end
function s.tgop(e,tp,eg,ep,ev,re,r,rp)
local g=Duel.GetMatchingGroup(nil,1-tp,LOCATION_ONFIELD,0,nil)
if #g>0 then
Duel.Hint(HINT_SELECTMSG,1-tp,HINTMSG_TOGRAVE)
local sg=g:Select(1-tp,1,1,nil)
Duel.HintSelection(sg)
Duel.SendtoGrave(sg,REASON_RULE,1-tp)
end
end
function s.filter(c)
local typ=c:GetType()
return c:IsFaceupEx() and c:IsSetCard(0x124) and (typ==TYPE_SPELL or bit.band(typ,0x82)==0x82)
and c:CheckActivateEffect(false,true,false)
end
function s.cptg(e,tp,eg,ep,ev,re,r,rp,chk,chkc)
if chkc then
local te=e:GetLabelObject()
local tg=te:GetTarget()
return tg and tg(e,tp,eg,ep,ev,re,r,rp,0,chkc)
end
if chk==0 then return Duel.IsExistingTarget(s.filter,tp,LOCATION_GRAVE+LOCATION_REMOVED,0,1,nil) end
Duel.Hint(HINT_SELECTMSG,tp,HINTMSG_TARGET)
local tc=Duel.SelectTarget(tp,s.filter,tp,LOCATION_GRAVE+LOCATION_REMOVED,0,1,1,nil):GetFirst()
local te,ceg,cev,cre,cr,crp=tc:CheckActivateEffect(false,true,true)
Duel.ClearTargetCard()
tc:CreateEffectRelation(e)
local tg=te:GetTarget()
if tg then tg(e,tp,ceg,cev,cre,cr,crp,1) end
te:SetLabelObject(e:GetLabelObject())
e:SetLabelObject(te)
Duel.ClearOperationInfo(0)
end
function s.cpop(e,tp,eg,ep,ev,re,r,rp)
local te=e:GetLabelObject()
if not (te and te:GetHandler():IsRelateToEffect(e)) then return end
e:SetLabelObject(te:GetLabelObject())
local op=te:GetOperation()
if op then op(e,tp,eg,ep,ev,re,r,rp) end
end
-------------------------------Global Effect-------------------------------
function s.adjustop(e,tp,eg,ep,ev,re,r,rp)
--
if not s.globle_check then
s.globle_check=true
local c=e:GetHandler()
local ge1=Effect.CreateEffect(c)
ge1:SetType(EFFECT_TYPE_FIELD)
ge1:SetCode(EFFECT_ACTIVATE_COST)
ge1:SetProperty(EFFECT_FLAG_PLAYER_TARGET+EFFECT_FLAG_CANNOT_DISABLE)
ge1:SetCost(s.costchk)
ge1:SetTargetRange(1,0)
ge1:SetTarget(s.actarget)
ge1:SetOperation(s.costop)
Duel.RegisterEffect(ge1,0)
local ge2=ge1:Clone()
Duel.RegisterEffect(ge2,1)
--
local g=Duel.GetMatchingGroup(s.actfilter,0,0xff,0xff,nil)
for tc in aux.Next(g) do
local te=tc:GetActivateEffect()
local acttg=te:GetTarget()
local actop=te:GetOperation()
--Debug.Message("1")
--
local te2=te:Clone()
te2:SetDescription(aux.Stringid(id,3))
te2:SetType(EFFECT_TYPE_QUICK_O)
te2:SetCode(EVENT_FREE_CHAIN)
te2:SetRange(LOCATION_HAND)
te2:SetHintTiming(TIMING_BATTLE_PHASE,TIMING_BATTLE_PHASE)
te2:SetTarget(
function(e,tp,eg,ep,ev,re,r,rp,chk,chkc)
if chk==0 then
local c=e:GetHandler()
local e1=Effect.CreateEffect(c)
e1:SetType(EFFECT_TYPE_FIELD)
e1:SetCode(EFFECT_CANNOT_SPECIAL_SUMMON)
e1:SetProperty(EFFECT_FLAG_PLAYER_TARGET)
e1:SetTargetRange(1,0)
e1:SetTarget(s.splimit)
Duel.RegisterEffect(e1,tp)
s[tp]=1
local boolean=not acttg or acttg(e,tp,eg,ep,ev,re,r,rp,0,chkc)
s[tp]=0
e1:Reset()
return boolean
end
local c=e:GetHandler()
local e1=Effect.CreateEffect(c)
e1:SetType(EFFECT_TYPE_FIELD)
e1:SetCode(EFFECT_CANNOT_SPECIAL_SUMMON)
e1:SetProperty(EFFECT_FLAG_PLAYER_TARGET)
e1:SetTargetRange(1,0)
e1:SetTarget(s.splimit)
Duel.RegisterEffect(e1,tp)
s[tp]=1
acttg(e,tp,eg,ep,ev,re,r,rp,chk,chkc)
s[tp]=0
e1:Reset()
end)
te2:SetOperation(
function(e,tp,eg,ep,ev,re,r,rp)
local c=e:GetHandler()
local e1=Effect.CreateEffect(c)
e1:SetType(EFFECT_TYPE_FIELD)
e1:SetCode(EFFECT_CANNOT_SPECIAL_SUMMON)
e1:SetProperty(EFFECT_FLAG_PLAYER_TARGET)
e1:SetTargetRange(1,0)
e1:SetTarget(s.splimit)
Duel.RegisterEffect(e1,tp)
s[tp]=1
actop(e,tp,eg,ep,ev,re,r,rp)
s[tp]=0
e1:Reset()
end)
tc:RegisterEffect(te2)
end
--
local Effect_IsHasType=Effect.IsHasType
function Effect.IsHasType(e,type)
if e:GetDescription() and e:GetDescription()==aux.Stringid(id,3) then
return type&(EFFECT_TYPE_FIELD+EFFECT_TYPE_ACTIVATE+EFFECT_TYPE_ACTIONS)~=0
end
return Effect_IsHasType(e,type)
end
s[0]=0
s[1]=0
s.initialization()
end
e:Reset()
end
function s.splimit(e,c)
return not c:IsCode(id)
end
function s.actfilter(c)
return bit.band(c:GetType(),0x82)==0x82
end
function s.costchk(e,te_or_c,tp)
local ph=Duel.GetCurrentPhase()
local b1=ph>=PHASE_BATTLE_START and ph<=PHASE_BATTLE
local b2=e:GetHandler():IsType(TYPE_FIELD) or Duel.GetLocationCount(tp,LOCATION_SZONE)
local b3=Duel.GetCurrentChain()==0
return Duel.IsPlayerAffectedByEffect(tp,id) and b1 and b2 and b3
end
function s.actarget(e,te,tp)
local tc=te:GetHandler()
if te:GetDescription() and te:GetDescription()==(aux.Stringid(id,3)) and bit.band(tc:GetType(),0x82)==0x82 and tc:IsLocation(LOCATION_HAND) then
e:SetLabelObject(te)
return true
end
return false
end
function s.costop(e,tp,eg,ep,ev,re,r,rp)
local te=e:GetLabelObject()
local tc=te:GetHandler()
local tp=te:GetHandlerPlayer()
--confirm
local cg=Duel.GetMatchingGroup(Card.IsCode,tp,LOCATION_DECK,0,nil,id)
if not cg or #cg<=0 then cg=Duel.GetMatchingGroup(Card.IsCode,tp,LOCATION_HAND,0,nil,id) end
if cg and #cg>0 then Duel.ConfirmCards(1-tp,cg:GetFirst()) end
--
if tc:IsType(TYPE_FIELD) then
local fc=Duel.GetFieldCard(tp,LOCATION_FZONE,0)
if fc then
Duel.SendtoGrave(fc,REASON_RULE)
Duel.BreakEffect()
end
Duel.MoveToField(tc,tp,tp,LOCATION_FZONE,POS_FACEUP,false)
else
Duel.MoveToField(tc,tp,tp,LOCATION_SZONE,POS_FACEUP,false)
if not tc:IsType(TYPE_CONTINUOUS) then
tc:CancelToGrave(false)
end
end
end
function s.initialization()
--
if not s.global_select_check2 then
s.global_select_check2=true
s[100]=10
function bit.band(a,b)
if (a&0x81)==0x81 and (b&0x81)==0x81 then s[s[100]+1]=1
end
return a&b
end
--
local _IsCanBeSpecialSummoned=Card.IsCanBeSpecialSummoned
function Card.IsCanBeSpecialSummoned(card,effect,sumtype,sp,nocheck,nolimit,...)
if sumtype&SUMMON_TYPE_RITUAL==SUMMON_TYPE_RITUAL and (not s[s[100]+1] or not s[s[100]+1]~=1) then
s[s[100]+1]=1
end
if card:IsType(TYPE_RITUAL) then
s[s[100]+2]=1
end
return _IsCanBeSpecialSummoned(card,effect,sumtype,sp,nocheck,nolimit,...)
end
local _IsExistingMatchingCard=Duel.IsExistingMatchingCard
function Duel.IsExistingMatchingCard(func,pl,self,o,num,c_g_n,...)
s[100]=s[100]+3
local check=s[100]+1
s[check]=0
s[check+1]=0
local result=_IsExistingMatchingCard(func,pl,self,o,num,c_g_n,...)
local result2=_IsExistingMatchingCard(func,pl,self|LOCATION_DECK,o,num,c_g_n,...)
if s[pl] and s[pl]==1 and s[check]==1 and s[check+1]==1 then
result=result2
end
s[check]=0
s[check+1]=0
s[100]=s[100]-3
return result
end
--
local _GetMatchingGroup=Duel.GetMatchingGroup
function Duel.GetMatchingGroup(func,pl,self,o,c_g_n,...)
s[100]=s[100]+3
local check=s[100]+1
s[check]=0
s[check+1]=0
local result=_GetMatchingGroup(func,pl,self,o,c_g_n,...)
local result2=_GetMatchingGroup(func,pl,self|LOCATION_DECK,o,c_g_n,...)
if s[pl] and s[pl]==1 and s[check]==1 and s[check+1]==1
then
result=result2
end
s[check]=0
s[check+1]=0
s[100]=s[100]-3
return result
end
--
local _SelectMatchingCard=Duel.SelectMatchingCard
function Duel.SelectMatchingCard(spl,func,pl,self,o,min,max,c_g_n,...)
s[100]=s[100]+3
local check=s[100]+1
s[s[100]+1]=0
s[s[100]+2]=0
local result=_IsExistingMatchingCard(func,pl,self|LOCATION_DECK,o,min,c_g_n,...)
if s[pl] and s[pl]==1 and s[check]==1 and s[check+1]==1
then
result=_SelectMatchingCard(spl,func,pl,self|LOCATION_DECK,o,min,max,c_g_n,...)
else
result=_SelectMatchingCard(spl,func,pl,self,o,min,max,c_g_n,...)
end
s[check]=0
s[check+1]=0
s[100]=s[100]-3
return result
end
end
end
--崩崩学园 伊瑟琳
local s,id,o=GetID()
function s.initial_effect(c)
aux.AddCodeList(c,75646600)
--hand link
local e1=Effect.CreateEffect(c)
e1:SetType(EFFECT_TYPE_SINGLE)
e1:SetProperty(EFFECT_FLAG_SINGLE_RANGE)
e1:SetCode(EFFECT_EXTRA_LINK_MATERIAL)
e1:SetRange(LOCATION_HAND)
e1:SetCountLimit(1,id)
e1:SetValue(s.matval)
c:RegisterEffect(e1)
--to grave
local e3=Effect.CreateEffect(c)
e3:SetDescription(aux.Stringid(id,1))
e3:SetCategory(CATEGORY_TOGRAVE)
e3:SetType(EFFECT_TYPE_IGNITION)
e3:SetCountLimit(1,id-70000000)
e3:SetRange(LOCATION_MZONE)
e3:SetCost(s.tgcost)
e3:SetTarget(s.tgtg)
e3:SetOperation(s.tgop)
c:RegisterEffect(e3)
--act limit
local e4=Effect.CreateEffect(c)
e4:SetType(EFFECT_TYPE_FIELD+EFFECT_TYPE_CONTINUOUS)
e4:SetProperty(EFFECT_FLAG_CANNOT_DISABLE)
e4:SetCode(EVENT_CHAINING)
e4:SetRange(LOCATION_MZONE)
e4:SetCondition(s.chaincon)
e4:SetOperation(s.chainop)
c:RegisterEffect(e4)
end
function s.exmfilter(c)
return c:IsLocation(LOCATION_HAND) and c:IsCode(id)
end
function s.matval(e,lc,mg,c,tp)
if not lc:IsSetCard(0x2c0,0x2c5,0xc2c3) then return false,nil end
return true,not mg or not mg:IsExists(s.exmfilter,1,nil)
end
function s.cfilter(c)
if c:IsLocation(LOCATION_GRAVE) then return c:IsAbleToRemoveAsCost() and c:IsHasEffect(75646628,tp) end
return (aux.IsCodeListed(c,75646600) or (c:IsSetCard(0x2c0) and c:IsType(TYPE_EQUIP))) and c:IsAbleToGraveAsCost()
end
function s.tgcost(e,tp,eg,ep,ev,re,r,rp,chk)
if chk==0 then return Duel.IsExistingMatchingCard(s.cfilter,tp,LOCATION_HAND+LOCATION_ONFIELD+LOCATION_GRAVE,0,1,nil) end
Duel.Hint(HINT_SELECTMSG,tp,HINTMSG_TOGRAVE)
local tc=Duel.SelectMatchingCard(tp,s.cfilter,tp,LOCATION_HAND+LOCATION_ONFIELD+LOCATION_GRAVE,0,1,1,nil):GetFirst()
local te=tc:IsHasEffect(75646628,tp)
if te then
Duel.Remove(tc,POS_FACEUP,REASON_COST)
else
if tc:IsCode(75646600) then e:SetLabel(1) end
Duel.SendtoGrave(tc,REASON_COST)
end
end
function s.tgfilter(c)
return (aux.IsCodeListed(c,75646600) or c:IsSetCard(0x2c0)) and c:IsAbleToGrave()
end
function s.tgtg(e,tp,eg,ep,ev,re,r,rp,chk)
if chk==0 then return Duel.IsExistingMatchingCard(s.tgfilter,tp,LOCATION_DECK,0,1,nil) end
Duel.SetOperationInfo(0,CATEGORY_TOGRAVE,nil,1,tp,LOCATION_DECK)
end
function s.tgop(e,tp,eg,ep,ev,re,r,rp)
Duel.Hint(HINT_SELECTMSG,tp,HINTMSG_TOGRAVE)
local g=Duel.SelectMatchingCard(tp,s.tgfilter,tp,LOCATION_DECK,0,1,1,nil)
if g:GetCount()>0 then
Duel.SendtoGrave(g,REASON_EFFECT)
end
local rg=Duel.GetMatchingGroup(Card.IsOriginalCodeRule,tp,0x7f,0,nil,75646600)
if rg:GetCount()>0 then
local rc=rg:GetFirst()
while rc do
if rc:GetFlagEffect(5646600)<15 then
rc:RegisterFlagEffect(5646600,0,0,0)
end
rc:ResetFlagEffect(646600)
rc:RegisterFlagEffect(646600,0,EFFECT_FLAG_CLIENT_HINT,0,0,aux.Stringid(75646600,rc:GetFlagEffect(5646600)))
rc=rg:GetNext()
end
end
end
function s.chaincon(e)
local ph=Duel.GetCurrentPhase()
return ph>=PHASE_BATTLE_START and ph<=PHASE_BATTLE
end
function s.chainop(e,tp,eg,ep,ev,re,r,rp)
local es=re:GetHandler()
if es:IsSetCard(0x2c0) and es:IsType(TYPE_EQUIP) and es:GetEquipTarget()==e:GetHandler() and ep==tp then
if Duel.IsPlayerAffectedByEffect(e:GetHandler():GetControler(),75646210) then
Duel.SetChainLimit(s.chainlm)
else
Duel.SetChainLimit(aux.FALSE)
end
end
end
function s.chainlm(e,rp,tp)
return tp==rp
end
\ No newline at end of file
......@@ -2,15 +2,17 @@
local s,id,o=GetID()
function s.initial_effect(c)
aux.AddCodeList(c,75646600)
--spsummon
--special summon rule
local e1=Effect.CreateEffect(c)
e1:SetDescription(aux.Stringid(id,0))
e1:SetType(EFFECT_TYPE_FIELD)
e1:SetCode(EFFECT_SPSUMMON_PROC)
e1:SetRange(LOCATION_HAND)
e1:SetProperty(EFFECT_FLAG_UNCOPYABLE)
e1:SetRange(LOCATION_HAND+LOCATION_GRAVE)
e1:SetCountLimit(1,id+EFFECT_COUNT_CODE_OATH)
e1:SetCondition(s.spcon)
e1:SetTarget(s.sptg)
e1:SetOperation(s.spop)
c:RegisterEffect(e1)
--search
local e2=Effect.CreateEffect(c)
......@@ -34,9 +36,37 @@ function s.initial_effect(c)
e4:SetOperation(s.keyop)
c:RegisterEffect(e4)
end
function s.cfilter(c,tp)
return c:IsAbleToGraveAsCost() and c:IsCode(75646600)
end
function s.spcon(e,c)
if c==nil then return true end
return Duel.GetLocationCount(c:GetControler(),LOCATION_MZONE)>0 and Duel.GetFlagEffect(c:GetControler(),75646600)~=0
local tp=c:GetControler()
return Duel.GetLocationCount(tp,LOCATION_MZONE)>0 and Duel.IsExistingMatchingCard(s.cfilter,tp,LOCATION_DECK+LOCATION_HAND,0,1,nil,tp)
end
function s.sptg(e,tp,eg,ep,ev,re,r,rp,chk,c)
local g=Duel.GetMatchingGroup(s.cfilter,tp,LOCATION_DECK+LOCATION_HAND,0,nil,tp)
Duel.Hint(HINT_SELECTMSG,tp,HINTMSG_TOGRAVE)
local tc=g:SelectUnselect(nil,tp,false,true,1,1)
if tc then
e:SetLabelObject(tc)
return true
else return false end
end
function s.spop(e,tp,eg,ep,ev,re,r,rp,c)
local g=e:GetLabelObject()
Duel.SendtoGrave(g,REASON_SPSUMMON)
local e1=Effect.CreateEffect(c)
e1:SetType(EFFECT_TYPE_FIELD)
e1:SetCode(EFFECT_CANNOT_SPECIAL_SUMMON)
e1:SetProperty(EFFECT_FLAG_PLAYER_TARGET+EFFECT_FLAG_OATH)
e1:SetTargetRange(1,0)
e1:SetTarget(s.splimit)
e1:SetReset(RESET_PHASE+PHASE_END)
Duel.RegisterEffect(e1,tp)
end
function s.splimit(e,c)
return not c:IsRace(RACE_CYBERSE)
end
function s.thfilter(c)
return aux.IsCodeListed(c,75646600) and c:IsAbleToHand()
......
--片翼
local s,id,o=GetID()
function s.initial_effect(c)
aux.AddCodeList(c,75646600)
--link summon
aux.AddLinkProcedure(c,s.matfilter,2,4)
c:EnableReviveLimit()
--special summon
local e1=Effect.CreateEffect(c)
e1:SetDescription(aux.Stringid(75646626,0))
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,id)
e1:SetTarget(s.sptg)
e1:SetOperation(s.spop)
c:RegisterEffect(e1)
--
local e2=Effect.CreateEffect(c)
e2:SetDescription(aux.Stringid(75646419,1))
e2:SetCategory(CATEGORY_DESTROY+CATEGORY_TOGRAVE)
e2:SetType(EFFECT_TYPE_IGNITION)
e2:SetRange(LOCATION_MZONE)
e2:SetCountLimit(1,EFFECT_COUNT_CODE_SINGLE)
e2:SetCost(s.descost)
e2:SetTarget(s.destg)
e2:SetOperation(s.desop)
c:RegisterEffect(e2)
local e4=e2:Clone()
e4:SetType(EFFECT_TYPE_QUICK_O)
e4:SetCode(EVENT_FREE_CHAIN)
e4:SetCondition(s.con)
c:RegisterEffect(e4)
--atk
local e3=Effect.CreateEffect(c)
e3:SetType(EFFECT_TYPE_FIELD)
e3:SetCode(EFFECT_UPDATE_ATTACK)
e3:SetRange(LOCATION_MZONE)
e3:SetTargetRange(LOCATION_MZONE,0)
e3:SetValue(s.val)
c:RegisterEffect(e3)
end
function s.matfilter(c)
return aux.IsCodeListed(c,75646600)
end
function s.con(e)
local f=Duel.GetFlagEffect(e:GetHandlerPlayer(),75646600)
return f and f~=0
end
function s.spfilter(c,e,tp)
return c:IsSetCard(0x2c5) and c:IsCanBeSpecialSummoned(e,0,tp,false,false)
end
function s.sptg(e,tp,eg,ep,ev,re,r,rp,chk,chkc)
if chkc then return chkc:IsControler(tp) and chkc:IsLocation(LOCATION_GRAVE) and s.spfilter(chkc,e,tp) end
if chk==0 then return Duel.GetLocationCount(tp,LOCATION_MZONE)>0
and Duel.IsExistingTarget(s.spfilter,tp,LOCATION_GRAVE,0,1,nil,e,tp) end
Duel.Hint(HINT_SELECTMSG,tp,HINTMSG_SPSUMMON)
local g=Duel.SelectTarget(tp,s.spfilter,tp,LOCATION_GRAVE,0,1,1,nil,e,tp)
Duel.SetOperationInfo(0,CATEGORY_SPECIAL_SUMMON,g,1,0,0)
end
function s.spop(e,tp,eg,ep,ev,re,r,rp)
local c=e:GetHandler()
local tc=Duel.GetFirstTarget()
if tc:IsRelateToEffect(e) then
Duel.SpecialSummon(tc,0,tp,tp,false,false,POS_FACEUP)
end
end
function s.cfilter(c,tp)
if c:IsLocation(LOCATION_DECK) then return c:IsAbleToGraveAsCost() and aux.IsCodeListed(c,75646600) end
return c:IsAbleToRemoveAsCost() and c:IsHasEffect(75646628,tp)
end
function s.descost(e,tp,eg,ep,ev,re,r,rp,chk)
if chk==0 then return Duel.IsExistingMatchingCard(s.cfilter,tp,LOCATION_DECK+LOCATION_GRAVE,0,1,nil,tp) end
local g=Duel.GetMatchingGroup(s.cfilter,tp,LOCATION_DECK+LOCATION_GRAVE,0,nil,tp)
Duel.Hint(HINT_SELECTMSG,tp,HINTMSG_TOGRAVE)
local tc=g:Select(tp,1,1,e:GetHandler()):GetFirst()
local te=tc:IsHasEffect(75646628,tp)
if te then
e:SetLabel(1)
Duel.Remove(tc,POS_FACEUP,REASON_COST)
else
if tc:IsCode(75646600) then e:SetLabel(1) end
Duel.SendtoGrave(tc,REASON_COST)
end
end
function s.destg(e,tp,eg,ep,ev,re,r,rp,chk)
if chk==0 then return true end
local g=Duel.GetMatchingGroup(nil,tp,0,LOCATION_ONFIELD,nil)
Duel.SetOperationInfo(0,CATEGORY_DESTROY,g,1,0,0)
end
function s.desop(e,tp,eg,ep,ev,re,r,rp)
local rg=Duel.GetMatchingGroup(Card.IsOriginalCodeRule,tp,0x7f,0,nil,75646600)
if rg:GetCount()>0 then
local rc=rg:GetFirst()
while rc do
if rc:GetFlagEffect(5646600)<16 then
rc:RegisterFlagEffect(5646600,0,0,0)
end
rc:ResetFlagEffect(646600)
rc:RegisterFlagEffect(646600,0,EFFECT_FLAG_CLIENT_HINT,0,0,aux.Stringid(75646600,rc:GetFlagEffect(5646600)))
rc=rg:GetNext()
end
end
if Duel.IsExistingMatchingCard(nil,tp,0,LOCATION_ONFIELD,1,nil) and Duel.SelectYesNo(tp,aux.Stringid(75646626,0)) then
Duel.Hint(HINT_SELECTMSG,tp,HINTMSG_DESTROY)
local g=Duel.SelectMatchingCard(tp,nil,tp,0,LOCATION_ONFIELD,1,1,nil)
if #g>0 then
Duel.HintSelection(g)
if Duel.Destroy(g,REASON_EFFECT)==0 and (e:GetLabel()==1 or Duel.GetFlagEffect(tp,75646600)>0) then
Duel.SendtoGrave(g,REASON_RULE)
end
end
end
end
function s.val(e,c)
return c:GetDefense()
end
\ No newline at end of file
......@@ -50,11 +50,11 @@ function c98374826.setfilter(c)
return c:IsSetCard(0x3af2) and c:IsSSetable()
end
function c98374826.settg(e,tp,eg,ep,ev,re,r,rp,chk)
if chk==0 then return Duel.IsExistingMatchingCard(c98374826.setfilter,tp,LOCATION_DECK,0,1,nil) and Duel.IsExistingMatchingCard(Card.IsFaceup,tp,LOCATION_ONFIELD,LOCATION_ONFIELD,1,e:GetHandler()) end
if chk==0 then return Duel.IsExistingMatchingCard(c98374826.setfilter,tp,LOCATION_DECK,0,1,nil) and Duel.IsExistingMatchingCard(Card.IsFaceup,tp,LOCATION_ONFIELD,LOCATION_ONFIELD,1,nil) end
end
function c98374826.setop(e,tp,eg,ep,ev,re,r,rp)
Duel.Hint(HINT_SELECTMSG,tp,HINTMSG_DESTROY)
local tc=Duel.SelectMatchingCard(tp,Card.IsFaceup,tp,LOCATION_ONFIELD,LOCATION_ONFIELD,1,1,aux.ExceptThisCard(e)):GetFirst()
local tc=Duel.SelectMatchingCard(tp,Card.IsFaceup,tp,LOCATION_ONFIELD,LOCATION_ONFIELD,1,1,nil):GetFirst()
if not tc then return end
Duel.HintSelection(Group.FromCards(tc))
if Duel.Destroy(tc,REASON_EFFECT)==0 then return end
......
......@@ -50,11 +50,11 @@ function c98374830.setfilter(c)
return c:IsSetCard(0x3af2) and c:IsSSetable()
end
function c98374830.settg(e,tp,eg,ep,ev,re,r,rp,chk)
if chk==0 then return Duel.IsExistingMatchingCard(c98374830.setfilter,tp,LOCATION_DECK,0,1,nil) and Duel.IsExistingMatchingCard(Card.IsFaceup,tp,LOCATION_ONFIELD,LOCATION_ONFIELD,1,e:GetHandler()) end
if chk==0 then return Duel.IsExistingMatchingCard(c98374830.setfilter,tp,LOCATION_DECK,0,1,nil) and Duel.IsExistingMatchingCard(Card.IsFaceup,tp,LOCATION_ONFIELD,LOCATION_ONFIELD,1,nil) end
end
function c98374830.setop(e,tp,eg,ep,ev,re,r,rp)
Duel.Hint(HINT_SELECTMSG,tp,HINTMSG_DESTROY)
local tc=Duel.SelectMatchingCard(tp,Card.IsFaceup,tp,LOCATION_ONFIELD,LOCATION_ONFIELD,1,1,aux.ExceptThisCard(e)):GetFirst()
local tc=Duel.SelectMatchingCard(tp,Card.IsFaceup,tp,LOCATION_ONFIELD,LOCATION_ONFIELD,1,1,nil):GetFirst()
if not tc then return end
Duel.HintSelection(Group.FromCards(tc))
if Duel.Destroy(tc,REASON_EFFECT)==0 then return end
......
......@@ -52,11 +52,11 @@ function c98374834.setfilter(c)
return c:IsSetCard(0x3af2) and c:IsSSetable()
end
function c98374834.settg(e,tp,eg,ep,ev,re,r,rp,chk)
if chk==0 then return Duel.IsExistingMatchingCard(c98374834.setfilter,tp,LOCATION_DECK,0,1,nil) and Duel.IsExistingMatchingCard(Card.IsFaceup,tp,LOCATION_ONFIELD,LOCATION_ONFIELD,1,e:GetHandler()) end
if chk==0 then return Duel.IsExistingMatchingCard(c98374834.setfilter,tp,LOCATION_DECK,0,1,nil) and Duel.IsExistingMatchingCard(Card.IsFaceup,tp,LOCATION_ONFIELD,LOCATION_ONFIELD,1,nil) end
end
function c98374834.setop(e,tp,eg,ep,ev,re,r,rp)
Duel.Hint(HINT_SELECTMSG,tp,HINTMSG_DESTROY)
local tc=Duel.SelectMatchingCard(tp,Card.IsFaceup,tp,LOCATION_ONFIELD,LOCATION_ONFIELD,1,1,aux.ExceptThisCard(e)):GetFirst()
local tc=Duel.SelectMatchingCard(tp,Card.IsFaceup,tp,LOCATION_ONFIELD,LOCATION_ONFIELD,1,1,nil):GetFirst()
if not tc then return end
Duel.HintSelection(Group.FromCards(tc))
if Duel.Destroy(tc,REASON_EFFECT)==0 then return end
......
......@@ -55,11 +55,11 @@ function c98374838.setfilter(c)
return c:IsSetCard(0x3af2) and c:IsSSetable()
end
function c98374838.settg(e,tp,eg,ep,ev,re,r,rp,chk)
if chk==0 then return Duel.IsExistingMatchingCard(c98374838.setfilter,tp,LOCATION_DECK,0,1,nil) and Duel.IsExistingMatchingCard(Card.IsFaceup,tp,LOCATION_ONFIELD,LOCATION_ONFIELD,1,e:GetHandler()) end
if chk==0 then return Duel.IsExistingMatchingCard(c98374838.setfilter,tp,LOCATION_DECK,0,1,nil) and Duel.IsExistingMatchingCard(Card.IsFaceup,tp,LOCATION_ONFIELD,LOCATION_ONFIELD,1,nil) end
end
function c98374838.setop(e,tp,eg,ep,ev,re,r,rp)
Duel.Hint(HINT_SELECTMSG,tp,HINTMSG_DESTROY)
local tc=Duel.SelectMatchingCard(tp,Card.IsFaceup,tp,LOCATION_ONFIELD,LOCATION_ONFIELD,1,1,aux.ExceptThisCard(e)):GetFirst()
local tc=Duel.SelectMatchingCard(tp,Card.IsFaceup,tp,LOCATION_ONFIELD,LOCATION_ONFIELD,1,1,nil):GetFirst()
if not tc then return end
Duel.HintSelection(Group.FromCards(tc))
if Duel.Destroy(tc,REASON_EFFECT)==0 then return end
......
......@@ -40,11 +40,11 @@ function c98374842.setfilter(c)
return c:IsSetCard(0x3af2) and c:IsSSetable()
end
function c98374842.settg(e,tp,eg,ep,ev,re,r,rp,chk)
if chk==0 then return Duel.IsExistingMatchingCard(c98374842.setfilter,tp,LOCATION_DECK,0,1,nil) and Duel.IsExistingMatchingCard(Card.IsFaceup,tp,LOCATION_ONFIELD,LOCATION_ONFIELD,1,e:GetHandler()) end
if chk==0 then return Duel.IsExistingMatchingCard(c98374842.setfilter,tp,LOCATION_DECK,0,1,nil) and Duel.IsExistingMatchingCard(Card.IsFaceup,tp,LOCATION_ONFIELD,LOCATION_ONFIELD,1,nil) end
end
function c98374842.setop(e,tp,eg,ep,ev,re,r,rp)
Duel.Hint(HINT_SELECTMSG,tp,HINTMSG_DESTROY)
local tc=Duel.SelectMatchingCard(tp,Card.IsFaceup,tp,LOCATION_ONFIELD,LOCATION_ONFIELD,1,1,aux.ExceptThisCard(e)):GetFirst()
local tc=Duel.SelectMatchingCard(tp,Card.IsFaceup,tp,LOCATION_ONFIELD,LOCATION_ONFIELD,1,1,nil):GetFirst()
if not tc then return end
Duel.HintSelection(Group.FromCards(tc))
if Duel.Destroy(tc,REASON_EFFECT)==0 then return end
......
......@@ -61,11 +61,11 @@ function c98374846.setfilter(c)
return c:IsSetCard(0x3af2) and c:IsSSetable()
end
function c98374846.settg(e,tp,eg,ep,ev,re,r,rp,chk)
if chk==0 then return Duel.IsExistingMatchingCard(c98374846.setfilter,tp,LOCATION_DECK,0,1,nil) and Duel.IsExistingMatchingCard(Card.IsFaceup,tp,LOCATION_ONFIELD,LOCATION_ONFIELD,1,e:GetHandler()) end
if chk==0 then return Duel.IsExistingMatchingCard(c98374846.setfilter,tp,LOCATION_DECK,0,1,nil) and Duel.IsExistingMatchingCard(Card.IsFaceup,tp,LOCATION_ONFIELD,LOCATION_ONFIELD,1,nil) end
end
function c98374846.setop(e,tp,eg,ep,ev,re,r,rp)
Duel.Hint(HINT_SELECTMSG,tp,HINTMSG_DESTROY)
local tc=Duel.SelectMatchingCard(tp,Card.IsFaceup,tp,LOCATION_ONFIELD,LOCATION_ONFIELD,1,1,aux.ExceptThisCard(e)):GetFirst()
local tc=Duel.SelectMatchingCard(tp,Card.IsFaceup,tp,LOCATION_ONFIELD,LOCATION_ONFIELD,1,1,nil):GetFirst()
if not tc then return end
Duel.HintSelection(Group.FromCards(tc))
if Duel.Destroy(tc,REASON_EFFECT)==0 then return end
......
......@@ -17,9 +17,9 @@ function c9910731.initial_effect(c)
e2:SetDescription(aux.Stringid(9910731,0))
e2:SetType(EFFECT_TYPE_FIELD+EFFECT_TYPE_TRIGGER_O)
e2:SetCode(EVENT_SSET)
e2:SetProperty(EFFECT_FLAG_DELAY)
e2:SetRange(LOCATION_MZONE)
e2:SetCountLimit(1,EFFECT_COUNT_CODE_CHAIN)
e2:SetCondition(c9910731.concon)
e2:SetTarget(c9910731.contg)
e2:SetOperation(c9910731.conop)
c:RegisterEffect(e2)
......@@ -29,12 +29,13 @@ function c9910731.damval(e,damp)
return Duel.GetMatchingGroupCount(Card.IsFacedown,0,LOCATION_ONFIELD,LOCATION_ONFIELD,nil)*600
else return -1 end
end
function c9910731.concon(e,tp,eg,ep,ev,re,r,rp)
return eg:IsExists(Card.IsControler,1,nil,tp)
end
function c9910731.contg(e,tp,eg,ep,ev,re,r,rp,chk)
local c=e:GetHandler()
if chk==0 then return Duel.GetFieldGroupCount(tp,0,LOCATION_HAND+LOCATION_ONFIELD+LOCATION_GRAVE)>0 end
if chk==0 then return Duel.GetFlagEffect(tp,9910731)==0
and Duel.GetFieldGroupCount(tp,0,LOCATION_HAND+LOCATION_ONFIELD+LOCATION_GRAVE)>0 end
local ph=Duel.GetCurrentPhase()
if ph>PHASE_MAIN1 and ph<PHASE_MAIN2 then ph=PHASE_BATTLE end
Duel.RegisterFlagEffect(tp,9910731,RESET_PHASE+ph,0,1)
end
function c9910731.conop(e,tp,eg,ep,ev,re,r,rp)
local g1=Duel.GetFieldGroup(tp,0,LOCATION_ONFIELD)
......
......@@ -6,19 +6,25 @@ function c9910747.initial_effect(c)
c:EnableReviveLimit()
--flag
QutryYgzw.AddTgFlag(c)
--to hand or to grave
--position
local e1=Effect.CreateEffect(c)
e1:SetCategory(CATEGORY_TOHAND+CATEGORY_SPECIAL_SUMMON)
e1:SetType(EFFECT_TYPE_QUICK_O)
e1:SetCode(EVENT_FREE_CHAIN)
e1:SetCategory(CATEGORY_POSITION)
e1:SetType(EFFECT_TYPE_FIELD+EFFECT_TYPE_TRIGGER_O)
e1:SetCode(EVENT_PHASE+PHASE_END)
e1:SetProperty(EFFECT_FLAG_CARD_TARGET)
e1:SetRange(LOCATION_MZONE)
e1:SetHintTiming(0,TIMINGS_CHECK_MONSTER+TIMING_MAIN_END)
e1:SetRange(LOCATION_HAND+LOCATION_MZONE)
e1:SetCountLimit(1,9910747)
e1:SetCondition(c9910747.thcon)
e1:SetTarget(c9910747.thtg)
e1:SetOperation(c9910747.thop)
e1:SetCondition(c9910747.poscon1)
e1:SetCost(c9910747.poscost)
e1:SetTarget(c9910747.postg)
e1:SetOperation(c9910747.posop)
c:RegisterEffect(e1)
local e3=e1:Clone()
e3:SetType(EFFECT_TYPE_QUICK_O)
e3:SetCode(EVENT_FREE_CHAIN)
e3:SetHintTiming(TIMING_END_PHASE,TIMINGS_CHECK_MONSTER+TIMING_END_PHASE)
e3:SetCondition(c9910747.poscon2)
c:RegisterEffect(e3)
--set
local e2=Effect.CreateEffect(c)
e2:SetType(EFFECT_TYPE_SINGLE+EFFECT_TYPE_TRIGGER_O)
......@@ -29,29 +35,53 @@ function c9910747.initial_effect(c)
e2:SetTarget(c9910747.settg)
e2:SetOperation(c9910747.setop)
c:RegisterEffect(e2)
if not c9910747.global_check then
c9910747.global_check=true
local ge1=Effect.CreateEffect(c)
ge1:SetType(EFFECT_TYPE_FIELD+EFFECT_TYPE_CONTINUOUS)
ge1:SetCode(EVENT_MSET)
ge1:SetOperation(c9910747.checkop)
Duel.RegisterEffect(ge1,0)
local ge2=ge1:Clone()
ge2:SetCode(EVENT_CHANGE_POS)
Duel.RegisterEffect(ge2,0)
local ge3=ge1:Clone()
ge3:SetCode(EVENT_SPSUMMON_SUCCESS)
Duel.RegisterEffect(ge3,0)
local ge4=ge1:Clone()
ge4:SetCode(EVENT_SSET)
Duel.RegisterEffect(ge4,0)
end
end
function c9910747.checkop(e,tp,eg,ep,ev,re,r,rp)
if eg:IsExists(Card.IsFacedown,1,nil) and Duel.GetFlagEffect(0,9910747)==0 then
Duel.RegisterFlagEffect(0,9910747,RESET_PHASE+PHASE_END,0,1)
end
end
function c9910747.poscon1(e,tp,eg,ep,ev,re,r,rp)
return Duel.GetFlagEffect(0,9910747)==0
end
function c9910747.poscon2(e,tp,eg,ep,ev,re,r,rp)
return Duel.GetFlagEffect(0,9910747)>0
end
function c9910747.thcon(e,tp,eg,ep,ev,re,r,rp)
return Duel.GetCurrentPhase()==PHASE_MAIN1 or Duel.GetCurrentPhase()==PHASE_MAIN2
function c9910747.poscost(e,tp,eg,ep,ev,re,r,rp,chk)
if chk==0 then return e:GetHandler():IsAbleToGraveAsCost() end
Duel.SendtoGrave(e:GetHandler(),REASON_COST)
end
function c9910747.thtg(e,tp,eg,ep,ev,re,r,rp,chk)
if chkc then return chkc:IsOnField() and chkc:IsControler(tp) and chkc:IsAbleToHand() end
if chk==0 then return Duel.IsExistingTarget(Card.IsAbleToHand,tp,LOCATION_ONFIELD,0,1,nil) end
Duel.Hint(HINT_SELECTMSG,tp,HINTMSG_RTOHAND)
local g=Duel.SelectTarget(tp,Card.IsAbleToHand,tp,LOCATION_ONFIELD,0,1,1,nil)
Duel.SetOperationInfo(0,CATEGORY_TOHAND,g,1,0,0)
function c9910747.posfilter(c)
return c:IsFaceup() and c:IsCanTurnSet()
end
function c9910747.spfilter(c)
return c:IsType(TYPE_MONSTER) and c:IsSpecialSummonable(0)
function c9910747.postg(e,tp,eg,ep,ev,re,r,rp,chk,chkc)
if chkc then return chkc:IsLocation(LOCATION_MZONE) and c9910747.posfilter(chkc) end
if chk==0 then return Duel.IsExistingTarget(c9910747.posfilter,tp,LOCATION_MZONE,LOCATION_MZONE,1,e:GetHandler()) end
Duel.Hint(HINT_SELECTMSG,tp,HINTMSG_POSCHANGE)
local g=Duel.SelectTarget(tp,c9910747.posfilter,tp,LOCATION_MZONE,LOCATION_MZONE,1,1,nil)
Duel.SetOperationInfo(0,CATEGORY_POSITION,g,1,0,0)
end
function c9910747.thop(e,tp,eg,ep,ev,re,r,rp)
function c9910747.posop(e,tp,eg,ep,ev,re,r,rp)
local tc=Duel.GetFirstTarget()
if tc:IsRelateToEffect(e) and Duel.SendtoHand(tc,nil,REASON_EFFECT)>0 and tc:IsLocation(LOCATION_HAND)
and Duel.IsExistingMatchingCard(c9910747.spfilter,tp,LOCATION_HAND,0,1,nil)
and Duel.SelectYesNo(tp,aux.Stringid(9910747,0)) then
Duel.BreakEffect()
Duel.Hint(HINT_SELECTMSG,tp,HINTMSG_SPSUMMON)
local g=Duel.SelectMatchingCard(tp,c9910747.spfilter,tp,LOCATION_HAND,0,1,1,nil)
Duel.SpecialSummonRule(tp,g:GetFirst(),0)
if tc:IsFaceup() and tc:IsRelateToEffect(e) then
Duel.ChangePosition(tc,POS_FACEDOWN_DEFENSE)
end
end
function c9910747.setcon(e,tp,eg,ep,ev,re,r,rp)
......
......@@ -1207,6 +1207,7 @@
!setname 0xa223 渊洋巨兽
!setname 0x3224 天龙座
!setname 0x5224 海爬兽
!setname 0x6224 封灵
!setname 0x9224 宝可·
!setname 0xa224 裂界
......@@ -1604,6 +1605,7 @@
!setname 0x3450 幻殇
!setname 0x5450 龗龘
!setname 0x6450 龙裔
!setname 0xa450 鳞病
!setname 0x3451 无垠
!setname 0x6451 穹苍
!setname 0x452 星绘
......
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