Commit d12a42c4 authored by Tachibana's avatar Tachibana

eme

parent ef37b5a5
No preview for this file type
......@@ -113,16 +113,6 @@
09399400 1 --替身箭-寻资之矢
09399420 1 --替身使者-大柳贤
09399498 1 --不能回头的小巷
#99
09910873 1 --缠毒的赛德瑞娅
09910875 0 --幽视的斯特利吉芙
09910877 1 --舞丝的阿瑞妮达
09910879 0 --铁躯的奥托姆特
09910882 0 --狡伏的柯妮沃拉
09910884 0 --基因重塑
09910886 0 --继魄的战士 艾莉雅安
09910888 0 --异律的雅克安琪
09910891 0 --惑蔓的亚基斯普姆
#100
10070018 0 --走丢的亲卫鲷
10071121 1 --这份思念直到永远 佳代
......@@ -1650,7 +1640,6 @@
81052002 2 --克里斯汀·罗森塔尔-c239b3
81056002 1 --浅见空子·月色
81057000 0 --水晶艾蕾娜
81057004 1 --水晶艾蕾娜·雨夜
81058004 0 --原田秋叶·夏祭
81060008 0 --薇薇安·伊文捷琳 θ
81060016 1 --薇薇安·伊文捷琳 π
......
expansions/pics/35100101.jpg

146 KB | W: | H:

expansions/pics/35100101.jpg

142 KB | W: | H:

expansions/pics/35100101.jpg
expansions/pics/35100101.jpg
expansions/pics/35100101.jpg
expansions/pics/35100101.jpg
  • 2-up
  • Swipe
  • Onion skin
expansions/pics/35100105.jpg

128 KB | W: | H:

expansions/pics/35100105.jpg

125 KB | W: | H:

expansions/pics/35100105.jpg
expansions/pics/35100105.jpg
expansions/pics/35100105.jpg
expansions/pics/35100105.jpg
  • 2-up
  • Swipe
  • Onion skin
expansions/pics/35100127.jpg

159 KB | W: | H:

expansions/pics/35100127.jpg

155 KB | W: | H:

expansions/pics/35100127.jpg
expansions/pics/35100127.jpg
expansions/pics/35100127.jpg
expansions/pics/35100127.jpg
  • 2-up
  • Swipe
  • Onion skin
expansions/pics/35100129.jpg

127 KB | W: | H:

expansions/pics/35100129.jpg

124 KB | W: | H:

expansions/pics/35100129.jpg
expansions/pics/35100129.jpg
expansions/pics/35100129.jpg
expansions/pics/35100129.jpg
  • 2-up
  • Swipe
  • Onion skin
expansions/pics/35100141.jpg

141 KB | W: | H:

expansions/pics/35100141.jpg

138 KB | W: | H:

expansions/pics/35100141.jpg
expansions/pics/35100141.jpg
expansions/pics/35100141.jpg
expansions/pics/35100141.jpg
  • 2-up
  • Swipe
  • Onion skin
expansions/pics/35100143.jpg

120 KB | W: | H:

expansions/pics/35100143.jpg

116 KB | W: | H:

expansions/pics/35100143.jpg
expansions/pics/35100143.jpg
expansions/pics/35100143.jpg
expansions/pics/35100143.jpg
  • 2-up
  • Swipe
  • Onion skin
expansions/pics/35100145.jpg

105 KB | W: | H:

expansions/pics/35100145.jpg

103 KB | W: | H:

expansions/pics/35100145.jpg
expansions/pics/35100145.jpg
expansions/pics/35100145.jpg
expansions/pics/35100145.jpg
  • 2-up
  • Swipe
  • Onion skin
expansions/pics/35100147.jpg

105 KB | W: | H:

expansions/pics/35100147.jpg

102 KB | W: | H:

expansions/pics/35100147.jpg
expansions/pics/35100147.jpg
expansions/pics/35100147.jpg
expansions/pics/35100147.jpg
  • 2-up
  • Swipe
  • Onion skin
expansions/pics/53700000.jpg

16.9 KB | W: | H:

expansions/pics/53700000.jpg

64.3 KB | W: | H:

expansions/pics/53700000.jpg
expansions/pics/53700000.jpg
expansions/pics/53700000.jpg
expansions/pics/53700000.jpg
  • 2-up
  • Swipe
  • Onion skin
expansions/pics/53700001.jpg

11 KB | W: | H:

expansions/pics/53700001.jpg

37.9 KB | W: | H:

expansions/pics/53700001.jpg
expansions/pics/53700001.jpg
expansions/pics/53700001.jpg
expansions/pics/53700001.jpg
  • 2-up
  • Swipe
  • Onion skin
expansions/pics/53700002.jpg

16.7 KB | W: | H:

expansions/pics/53700002.jpg

64 KB | W: | H:

expansions/pics/53700002.jpg
expansions/pics/53700002.jpg
expansions/pics/53700002.jpg
expansions/pics/53700002.jpg
  • 2-up
  • Swipe
  • Onion skin
expansions/pics/53700003.jpg

15 KB | W: | H:

expansions/pics/53700003.jpg

54.9 KB | W: | H:

expansions/pics/53700003.jpg
expansions/pics/53700003.jpg
expansions/pics/53700003.jpg
expansions/pics/53700003.jpg
  • 2-up
  • Swipe
  • Onion skin
expansions/pics/53700004.jpg

17.4 KB | W: | H:

expansions/pics/53700004.jpg

69.6 KB | W: | H:

expansions/pics/53700004.jpg
expansions/pics/53700004.jpg
expansions/pics/53700004.jpg
expansions/pics/53700004.jpg
  • 2-up
  • Swipe
  • Onion skin
expansions/pics/53700005.jpg

13.5 KB | W: | H:

expansions/pics/53700005.jpg

48.7 KB | W: | H:

expansions/pics/53700005.jpg
expansions/pics/53700005.jpg
expansions/pics/53700005.jpg
expansions/pics/53700005.jpg
  • 2-up
  • Swipe
  • Onion skin
expansions/pics/53700006.jpg

15.8 KB | W: | H:

expansions/pics/53700006.jpg

60.1 KB | W: | H:

expansions/pics/53700006.jpg
expansions/pics/53700006.jpg
expansions/pics/53700006.jpg
expansions/pics/53700006.jpg
  • 2-up
  • Swipe
  • Onion skin
expansions/pics/53700007.jpg

16.9 KB | W: | H:

expansions/pics/53700007.jpg

63.4 KB | W: | H:

expansions/pics/53700007.jpg
expansions/pics/53700007.jpg
expansions/pics/53700007.jpg
expansions/pics/53700007.jpg
  • 2-up
  • Swipe
  • Onion skin
expansions/pics/53700008.jpg

14.9 KB | W: | H:

expansions/pics/53700008.jpg

57.1 KB | W: | H:

expansions/pics/53700008.jpg
expansions/pics/53700008.jpg
expansions/pics/53700008.jpg
expansions/pics/53700008.jpg
  • 2-up
  • Swipe
  • Onion skin
expansions/pics/53700009.jpg

15.6 KB | W: | H:

expansions/pics/53700009.jpg

57.2 KB | W: | H:

expansions/pics/53700009.jpg
expansions/pics/53700009.jpg
expansions/pics/53700009.jpg
expansions/pics/53700009.jpg
  • 2-up
  • Swipe
  • Onion skin
expansions/pics/53705001.jpg

15.6 KB | W: | H:

expansions/pics/53705001.jpg

61.7 KB | W: | H:

expansions/pics/53705001.jpg
expansions/pics/53705001.jpg
expansions/pics/53705001.jpg
expansions/pics/53705001.jpg
  • 2-up
  • Swipe
  • Onion skin
expansions/pics/53705002.jpg

17.4 KB | W: | H:

expansions/pics/53705002.jpg

70.3 KB | W: | H:

expansions/pics/53705002.jpg
expansions/pics/53705002.jpg
expansions/pics/53705002.jpg
expansions/pics/53705002.jpg
  • 2-up
  • Swipe
  • Onion skin
expansions/pics/53705004.jpg

15.7 KB | W: | H:

expansions/pics/53705004.jpg

62.7 KB | W: | H:

expansions/pics/53705004.jpg
expansions/pics/53705004.jpg
expansions/pics/53705004.jpg
expansions/pics/53705004.jpg
  • 2-up
  • Swipe
  • Onion skin
expansions/pics/53705009.jpg

15.5 KB | W: | H:

expansions/pics/53705009.jpg

61.9 KB | W: | H:

expansions/pics/53705009.jpg
expansions/pics/53705009.jpg
expansions/pics/53705009.jpg
expansions/pics/53705009.jpg
  • 2-up
  • Swipe
  • Onion skin
expansions/pics/53705010.jpg

15.7 KB | W: | H:

expansions/pics/53705010.jpg

62.5 KB | W: | H:

expansions/pics/53705010.jpg
expansions/pics/53705010.jpg
expansions/pics/53705010.jpg
expansions/pics/53705010.jpg
  • 2-up
  • Swipe
  • Onion skin
expansions/pics/53705012.jpg

14 KB | W: | H:

expansions/pics/53705012.jpg

53 KB | W: | H:

expansions/pics/53705012.jpg
expansions/pics/53705012.jpg
expansions/pics/53705012.jpg
expansions/pics/53705012.jpg
  • 2-up
  • Swipe
  • Onion skin
expansions/pics/53705013.jpg

16.2 KB | W: | H:

expansions/pics/53705013.jpg

65.1 KB | W: | H:

expansions/pics/53705013.jpg
expansions/pics/53705013.jpg
expansions/pics/53705013.jpg
expansions/pics/53705013.jpg
  • 2-up
  • Swipe
  • Onion skin
expansions/pics/53705018.jpg

16.3 KB | W: | H:

expansions/pics/53705018.jpg

66.1 KB | W: | H:

expansions/pics/53705018.jpg
expansions/pics/53705018.jpg
expansions/pics/53705018.jpg
expansions/pics/53705018.jpg
  • 2-up
  • Swipe
  • Onion skin
expansions/pics/53705020.jpg

16.1 KB | W: | H:

expansions/pics/53705020.jpg

64.7 KB | W: | H:

expansions/pics/53705020.jpg
expansions/pics/53705020.jpg
expansions/pics/53705020.jpg
expansions/pics/53705020.jpg
  • 2-up
  • Swipe
  • Onion skin
expansions/pics/53705021.jpg

15.7 KB | W: | H:

expansions/pics/53705021.jpg

62.8 KB | W: | H:

expansions/pics/53705021.jpg
expansions/pics/53705021.jpg
expansions/pics/53705021.jpg
expansions/pics/53705021.jpg
  • 2-up
  • Swipe
  • Onion skin
expansions/pics/53705023.jpg

15.4 KB | W: | H:

expansions/pics/53705023.jpg

63.1 KB | W: | H:

expansions/pics/53705023.jpg
expansions/pics/53705023.jpg
expansions/pics/53705023.jpg
expansions/pics/53705023.jpg
  • 2-up
  • Swipe
  • Onion skin
expansions/pics/53711001.jpg

63.1 KB | W: | H:

expansions/pics/53711001.jpg

61.6 KB | W: | H:

expansions/pics/53711001.jpg
expansions/pics/53711001.jpg
expansions/pics/53711001.jpg
expansions/pics/53711001.jpg
  • 2-up
  • Swipe
  • Onion skin
expansions/pics/53711002.jpg

62.3 KB | W: | H:

expansions/pics/53711002.jpg

60.7 KB | W: | H:

expansions/pics/53711002.jpg
expansions/pics/53711002.jpg
expansions/pics/53711002.jpg
expansions/pics/53711002.jpg
  • 2-up
  • Swipe
  • Onion skin
expansions/pics/53711003.jpg

66.9 KB | W: | H:

expansions/pics/53711003.jpg

65.2 KB | W: | H:

expansions/pics/53711003.jpg
expansions/pics/53711003.jpg
expansions/pics/53711003.jpg
expansions/pics/53711003.jpg
  • 2-up
  • Swipe
  • Onion skin
expansions/pics/53711004.jpg

61.5 KB | W: | H:

expansions/pics/53711004.jpg

59.9 KB | W: | H:

expansions/pics/53711004.jpg
expansions/pics/53711004.jpg
expansions/pics/53711004.jpg
expansions/pics/53711004.jpg
  • 2-up
  • Swipe
  • Onion skin
expansions/pics/53711005.jpg

65.7 KB | W: | H:

expansions/pics/53711005.jpg

64 KB | W: | H:

expansions/pics/53711005.jpg
expansions/pics/53711005.jpg
expansions/pics/53711005.jpg
expansions/pics/53711005.jpg
  • 2-up
  • Swipe
  • Onion skin
expansions/pics/53711006.jpg

70.6 KB | W: | H:

expansions/pics/53711006.jpg

68.8 KB | W: | H:

expansions/pics/53711006.jpg
expansions/pics/53711006.jpg
expansions/pics/53711006.jpg
expansions/pics/53711006.jpg
  • 2-up
  • Swipe
  • Onion skin
expansions/pics/53711007.jpg

63.8 KB | W: | H:

expansions/pics/53711007.jpg

62.1 KB | W: | H:

expansions/pics/53711007.jpg
expansions/pics/53711007.jpg
expansions/pics/53711007.jpg
expansions/pics/53711007.jpg
  • 2-up
  • Swipe
  • Onion skin
expansions/pics/53711008.jpg

70.6 KB | W: | H:

expansions/pics/53711008.jpg

68.7 KB | W: | H:

expansions/pics/53711008.jpg
expansions/pics/53711008.jpg
expansions/pics/53711008.jpg
expansions/pics/53711008.jpg
  • 2-up
  • Swipe
  • Onion skin
expansions/pics/53711009.jpg

59.1 KB | W: | H:

expansions/pics/53711009.jpg

57.6 KB | W: | H:

expansions/pics/53711009.jpg
expansions/pics/53711009.jpg
expansions/pics/53711009.jpg
expansions/pics/53711009.jpg
  • 2-up
  • Swipe
  • Onion skin
expansions/pics/53711010.jpg

57.7 KB | W: | H:

expansions/pics/53711010.jpg

56.2 KB | W: | H:

expansions/pics/53711010.jpg
expansions/pics/53711010.jpg
expansions/pics/53711010.jpg
expansions/pics/53711010.jpg
  • 2-up
  • Swipe
  • Onion skin
expansions/pics/53711011.jpg

72.7 KB | W: | H:

expansions/pics/53711011.jpg

70.6 KB | W: | H:

expansions/pics/53711011.jpg
expansions/pics/53711011.jpg
expansions/pics/53711011.jpg
expansions/pics/53711011.jpg
  • 2-up
  • Swipe
  • Onion skin
expansions/pics/53711012.jpg

71.3 KB | W: | H:

expansions/pics/53711012.jpg

69.4 KB | W: | H:

expansions/pics/53711012.jpg
expansions/pics/53711012.jpg
expansions/pics/53711012.jpg
expansions/pics/53711012.jpg
  • 2-up
  • Swipe
  • Onion skin
expansions/pics/53711013.jpg

55.5 KB | W: | H:

expansions/pics/53711013.jpg

54.2 KB | W: | H:

expansions/pics/53711013.jpg
expansions/pics/53711013.jpg
expansions/pics/53711013.jpg
expansions/pics/53711013.jpg
  • 2-up
  • Swipe
  • Onion skin
expansions/pics/53711014.jpg

74.2 KB | W: | H:

expansions/pics/53711014.jpg

72.6 KB | W: | H:

expansions/pics/53711014.jpg
expansions/pics/53711014.jpg
expansions/pics/53711014.jpg
expansions/pics/53711014.jpg
  • 2-up
  • Swipe
  • Onion skin
expansions/pics/53711015.jpg

60 KB | W: | H:

expansions/pics/53711015.jpg

58.5 KB | W: | H:

expansions/pics/53711015.jpg
expansions/pics/53711015.jpg
expansions/pics/53711015.jpg
expansions/pics/53711015.jpg
  • 2-up
  • Swipe
  • Onion skin
expansions/pics/53715001.jpg

17.4 KB | W: | H:

expansions/pics/53715001.jpg

63.8 KB | W: | H:

expansions/pics/53715001.jpg
expansions/pics/53715001.jpg
expansions/pics/53715001.jpg
expansions/pics/53715001.jpg
  • 2-up
  • Swipe
  • Onion skin
expansions/pics/53715002.jpg

18.5 KB | W: | H:

expansions/pics/53715002.jpg

70.4 KB | W: | H:

expansions/pics/53715002.jpg
expansions/pics/53715002.jpg
expansions/pics/53715002.jpg
expansions/pics/53715002.jpg
  • 2-up
  • Swipe
  • Onion skin
expansions/pics/53715003.jpg

17.6 KB | W: | H:

expansions/pics/53715003.jpg

67 KB | W: | H:

expansions/pics/53715003.jpg
expansions/pics/53715003.jpg
expansions/pics/53715003.jpg
expansions/pics/53715003.jpg
  • 2-up
  • Swipe
  • Onion skin
expansions/pics/53715004.jpg

17.4 KB | W: | H:

expansions/pics/53715004.jpg

66.8 KB | W: | H:

expansions/pics/53715004.jpg
expansions/pics/53715004.jpg
expansions/pics/53715004.jpg
expansions/pics/53715004.jpg
  • 2-up
  • Swipe
  • Onion skin
expansions/pics/53715005.jpg

17.6 KB | W: | H:

expansions/pics/53715005.jpg

67.5 KB | W: | H:

expansions/pics/53715005.jpg
expansions/pics/53715005.jpg
expansions/pics/53715005.jpg
expansions/pics/53715005.jpg
  • 2-up
  • Swipe
  • Onion skin
expansions/pics/53715006.jpg

17.1 KB | W: | H:

expansions/pics/53715006.jpg

64.9 KB | W: | H:

expansions/pics/53715006.jpg
expansions/pics/53715006.jpg
expansions/pics/53715006.jpg
expansions/pics/53715006.jpg
  • 2-up
  • Swipe
  • Onion skin
expansions/pics/53715008.jpg

17.6 KB | W: | H:

expansions/pics/53715008.jpg

64.9 KB | W: | H:

expansions/pics/53715008.jpg
expansions/pics/53715008.jpg
expansions/pics/53715008.jpg
expansions/pics/53715008.jpg
  • 2-up
  • Swipe
  • Onion skin
expansions/pics/53715011.jpg

18.3 KB | W: | H:

expansions/pics/53715011.jpg

67.9 KB | W: | H:

expansions/pics/53715011.jpg
expansions/pics/53715011.jpg
expansions/pics/53715011.jpg
expansions/pics/53715011.jpg
  • 2-up
  • Swipe
  • Onion skin
expansions/pics/53715012.jpg

17.2 KB | W: | H:

expansions/pics/53715012.jpg

63.9 KB | W: | H:

expansions/pics/53715012.jpg
expansions/pics/53715012.jpg
expansions/pics/53715012.jpg
expansions/pics/53715012.jpg
  • 2-up
  • Swipe
  • Onion skin
expansions/pics/53715013.jpg

18.1 KB | W: | H:

expansions/pics/53715013.jpg

67.9 KB | W: | H:

expansions/pics/53715013.jpg
expansions/pics/53715013.jpg
expansions/pics/53715013.jpg
expansions/pics/53715013.jpg
  • 2-up
  • Swipe
  • Onion skin
expansions/pics/53715014.jpg

17.3 KB | W: | H:

expansions/pics/53715014.jpg

66.4 KB | W: | H:

expansions/pics/53715014.jpg
expansions/pics/53715014.jpg
expansions/pics/53715014.jpg
expansions/pics/53715014.jpg
  • 2-up
  • Swipe
  • Onion skin
expansions/pics/53715015.jpg

17.5 KB | W: | H:

expansions/pics/53715015.jpg

66.9 KB | W: | H:

expansions/pics/53715015.jpg
expansions/pics/53715015.jpg
expansions/pics/53715015.jpg
expansions/pics/53715015.jpg
  • 2-up
  • Swipe
  • Onion skin
expansions/pics/53715016.jpg

17.8 KB | W: | H:

expansions/pics/53715016.jpg

66.9 KB | W: | H:

expansions/pics/53715016.jpg
expansions/pics/53715016.jpg
expansions/pics/53715016.jpg
expansions/pics/53715016.jpg
  • 2-up
  • Swipe
  • Onion skin
expansions/pics/53715017.jpg

18.3 KB | W: | H:

expansions/pics/53715017.jpg

68.5 KB | W: | H:

expansions/pics/53715017.jpg
expansions/pics/53715017.jpg
expansions/pics/53715017.jpg
expansions/pics/53715017.jpg
  • 2-up
  • Swipe
  • Onion skin
expansions/pics/53719001.jpg

16.3 KB | W: | H:

expansions/pics/53719001.jpg

60.1 KB | W: | H:

expansions/pics/53719001.jpg
expansions/pics/53719001.jpg
expansions/pics/53719001.jpg
expansions/pics/53719001.jpg
  • 2-up
  • Swipe
  • Onion skin
expansions/pics/53719002.jpg

16.1 KB | W: | H:

expansions/pics/53719002.jpg

60.8 KB | W: | H:

expansions/pics/53719002.jpg
expansions/pics/53719002.jpg
expansions/pics/53719002.jpg
expansions/pics/53719002.jpg
  • 2-up
  • Swipe
  • Onion skin
expansions/pics/53719003.jpg

17.9 KB | W: | H:

expansions/pics/53719003.jpg

69.3 KB | W: | H:

expansions/pics/53719003.jpg
expansions/pics/53719003.jpg
expansions/pics/53719003.jpg
expansions/pics/53719003.jpg
  • 2-up
  • Swipe
  • Onion skin
expansions/pics/53719004.jpg

17.9 KB | W: | H:

expansions/pics/53719004.jpg

72 KB | W: | H:

expansions/pics/53719004.jpg
expansions/pics/53719004.jpg
expansions/pics/53719004.jpg
expansions/pics/53719004.jpg
  • 2-up
  • Swipe
  • Onion skin
expansions/pics/53719005.jpg

14.4 KB | W: | H:

expansions/pics/53719005.jpg

54.4 KB | W: | H:

expansions/pics/53719005.jpg
expansions/pics/53719005.jpg
expansions/pics/53719005.jpg
expansions/pics/53719005.jpg
  • 2-up
  • Swipe
  • Onion skin
expansions/pics/53719007.jpg

15.9 KB | W: | H:

expansions/pics/53719007.jpg

61.9 KB | W: | H:

expansions/pics/53719007.jpg
expansions/pics/53719007.jpg
expansions/pics/53719007.jpg
expansions/pics/53719007.jpg
  • 2-up
  • Swipe
  • Onion skin
expansions/pics/53719008.jpg

16.5 KB | W: | H:

expansions/pics/53719008.jpg

63.7 KB | W: | H:

expansions/pics/53719008.jpg
expansions/pics/53719008.jpg
expansions/pics/53719008.jpg
expansions/pics/53719008.jpg
  • 2-up
  • Swipe
  • Onion skin
expansions/pics/53719009.jpg

16.8 KB | W: | H:

expansions/pics/53719009.jpg

65.2 KB | W: | H:

expansions/pics/53719009.jpg
expansions/pics/53719009.jpg
expansions/pics/53719009.jpg
expansions/pics/53719009.jpg
  • 2-up
  • Swipe
  • Onion skin
expansions/pics/53719010.jpg

17.5 KB | W: | H:

expansions/pics/53719010.jpg

66.9 KB | W: | H:

expansions/pics/53719010.jpg
expansions/pics/53719010.jpg
expansions/pics/53719010.jpg
expansions/pics/53719010.jpg
  • 2-up
  • Swipe
  • Onion skin
expansions/pics/53719011.jpg

14.6 KB | W: | H:

expansions/pics/53719011.jpg

56.2 KB | W: | H:

expansions/pics/53719011.jpg
expansions/pics/53719011.jpg
expansions/pics/53719011.jpg
expansions/pics/53719011.jpg
  • 2-up
  • Swipe
  • Onion skin
expansions/pics/53719012.jpg

13.6 KB | W: | H:

expansions/pics/53719012.jpg

50.3 KB | W: | H:

expansions/pics/53719012.jpg
expansions/pics/53719012.jpg
expansions/pics/53719012.jpg
expansions/pics/53719012.jpg
  • 2-up
  • Swipe
  • Onion skin
expansions/pics/53799004.jpg

17.9 KB | W: | H:

expansions/pics/53799004.jpg

66.6 KB | W: | H:

expansions/pics/53799004.jpg
expansions/pics/53799004.jpg
expansions/pics/53799004.jpg
expansions/pics/53799004.jpg
  • 2-up
  • Swipe
  • Onion skin
expansions/pics/53799005.jpg

17.6 KB | W: | H:

expansions/pics/53799005.jpg

66.3 KB | W: | H:

expansions/pics/53799005.jpg
expansions/pics/53799005.jpg
expansions/pics/53799005.jpg
expansions/pics/53799005.jpg
  • 2-up
  • Swipe
  • Onion skin
expansions/pics/53799094.jpg

15.3 KB | W: | H:

expansions/pics/53799094.jpg

56.1 KB | W: | H:

expansions/pics/53799094.jpg
expansions/pics/53799094.jpg
expansions/pics/53799094.jpg
expansions/pics/53799094.jpg
  • 2-up
  • Swipe
  • Onion skin
expansions/pics/53799123.jpg

15 KB | W: | H:

expansions/pics/53799123.jpg

55 KB | W: | H:

expansions/pics/53799123.jpg
expansions/pics/53799123.jpg
expansions/pics/53799123.jpg
expansions/pics/53799123.jpg
  • 2-up
  • Swipe
  • Onion skin
......@@ -55,8 +55,8 @@ function cm.tgop(e,tp,eg,ep,ev,re,r,rp)
local g1=Duel.GetMatchingGroup(cm.filter,tp,0,LOCATION_MZONE,nil)
local g2=Duel.GetMatchingGroup(cm.filter,tp,LOCATION_MZONE,0,nil)
if not ( g1 and g2 ) then return end
g2:Merge(g1)
local tg1=g2:GetMaxGroup(Card.GetDefense)
local tg2=g1:GetMaxGroup(Card.GetDefense)
local g=Duel.GetMatchingGroup(aux.TRUE,tp,LOCATION_MZONE,LOCATION_MZONE,1,tg1)
if #g>0 then
Duel.SendtoGrave(g,REASON_EFFECT)
......
--ALSTROEMERIA+
function c26808000.initial_effect(c)
--fusion material
c:EnableReviveLimit()
aux.AddFusionProcCode3(c,81000000,81011000,26807000,false,false)
end
--虚拟水神泳者
if not pcall(function() require("expansions/script/c64831501") end) then require("script/c64831501") end
local m,cm=rscf.DefineCard(26812013,"VrAqua")
function cm.initial_effect(c)
--special summon
local e1=Effect.CreateEffect(c)
e1:SetCategory(CATEGORY_SUMMON)
e1:SetType(EFFECT_TYPE_QUICK_O)
e1:SetCode(EVENT_FREE_CHAIN)
e1:SetHintTiming(0,TIMING_MAIN_END+TIMING_BATTLE_START)
e1:SetRange(LOCATION_MZONE)
e1:SetCountLimit(1,m)
e1:SetCondition(cm.spcon)
e1:SetCost(cm.spcost)
e1:SetTarget(cm.sptg)
e1:SetOperation(cm.spop)
c:RegisterEffect(e1)
--search
local e2=Effect.CreateEffect(c)
e2:SetCategory(CATEGORY_TOHAND+CATEGORY_SEARCH)
e2:SetType(EFFECT_TYPE_SINGLE+EFFECT_TYPE_TRIGGER_O)
e2:SetProperty(EFFECT_FLAG_DELAY)
e2:SetCode(EVENT_SUMMON_SUCCESS)
e2:SetCountLimit(1,m)
e2:SetTarget(cm.thtg)
e2:SetOperation(cm.thop)
c:RegisterEffect(e2)
local e3=e2:Clone()
e3:SetCode(EVENT_FLIP)
c:RegisterEffect(e3)
end
function cm.thfilter(c)
return c:IsAbleToHand() and (rsva.IsSetST(c) or rsva.filter_al(c))
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
function cm.spcon(e,tp,eg,ep,ev,re,r,rp)
return Duel.GetTurnPlayer()~=tp and aux.bpcon(e)
end
function cm.spcost(e,tp,eg,ep,ev,re,r,rp,chk)
if chk==0 then return e:GetHandler():IsAbleToHandAsCost() end
Duel.SendtoHand(e:GetHandler(),nil,REASON_COST)
end
function cm.sumfilter(c)
return c:IsRace(RACE_CYBERSE) and c:IsSummonable(true,nil)
end
function cm.sptg(e,tp,eg,ep,ev,re,r,rp,chk)
if chk==0 then return Duel.GetMZoneCount(tp,e:GetHandler())>0 and Duel.IsExistingMatchingCard(cm.sumfilter,tp,LOCATION_HAND,0,1,nil) end
Duel.SetOperationInfo(0,CATEGORY_SUMMON,nil,1,0,0)
end
function cm.spop(e,tp,eg,ep,ev,re,r,rp)
local e1=Effect.CreateEffect(e:GetHandler())
e1:SetType(EFFECT_TYPE_FIELD)
e1:SetCode(EFFECT_CANNOT_SELECT_BATTLE_TARGET)
e1:SetTargetRange(0,LOCATION_MZONE)
e1:SetValue(cm.atlimit)
e1:SetReset(RESET_PHASE+PHASE_END)
Duel.RegisterEffect(e1,tp)
Duel.Hint(HINT_SELECTMSG,tp,HINTMSG_SUMMON)
local g=Duel.SelectMatchingCard(tp,cm.sumfilter,tp,LOCATION_HAND,0,1,1,nil)
local tc=g:GetFirst()
if tc then
Duel.Summon(tp,tc,true,nil)
end
end
function cm.atlimit(e,c)
return c:IsFaceup() and c:IsSummonType(SUMMON_TYPE_NORMAL) and c:IsLevel(10)
end
--虚拟水神幼女
if not pcall(function() require("expansions/script/c64831501") end) then require("script/c64831501") end
local m,cm=rscf.DefineCard(26812014,"VrAqua")
function cm.initial_effect(c)
--spsummon
local e0=Effect.CreateEffect(c)
e0:SetCategory(CATEGORY_SPECIAL_SUMMON)
e0:SetType(EFFECT_TYPE_IGNITION)
e0:SetRange(LOCATION_HAND)
e0:SetCondition(cm.spcon)
e0:SetTarget(cm.sptg)
e0:SetOperation(cm.spop)
c:RegisterEffect(e0)
--spsummon
local e1=Effect.CreateEffect(c)
e1:SetCategory(CATEGORY_SPECIAL_SUMMON)
e1:SetType(EFFECT_TYPE_QUICK_O)
e1:SetCode(EVENT_FREE_CHAIN)
e1:SetRange(LOCATION_HAND)
e1:SetHintTiming(0,TIMING_MAIN_END+TIMING_END_PHASE)
e1:SetCountLimit(1,m+900)
e1:SetCondition(cm.sscon)
e1:SetTarget(cm.sptg)
e1:SetOperation(cm.spop)
c:RegisterEffect(e1)
--special summon
local e2=Effect.CreateEffect(c)
e2:SetCategory(CATEGORY_SUMMON)
e2:SetType(EFFECT_TYPE_QUICK_O)
e2:SetCode(EVENT_FREE_CHAIN)
e2:SetHintTiming(0,TIMING_MAIN_END+TIMING_BATTLE_START)
e2:SetRange(LOCATION_MZONE)
e2:SetCountLimit(1,m)
e2:SetCondition(aux.bpcon)
e2:SetCost(cm.tscost)
e2:SetTarget(cm.tstg)
e2:SetOperation(cm.tsop)
c:RegisterEffect(e2)
end
function cm.spcon(e,tp,eg,ep,ev,re,r,rp)
return Duel.GetFieldGroupCount(tp,LOCATION_MZONE,0)==0 and Duel.GetFieldGroupCount(1-tp,LOCATION_MZONE,0)>0
end
function cm.sscon(e,tp,eg,ep,ev,re,r,rp)
return Duel.GetFieldGroupCount(tp,LOCATION_MZONE,0)==0 and Duel.GetFieldGroupCount(1-tp,LOCATION_MZONE,0)>0 and Duel.GetTurnPlayer()~=tp
end
function cm.sptg(e,tp,eg,ep,ev,re,r,rp,chk)
if chk==0 then return Duel.GetLocationCount(tp,LOCATION_MZONE)>0
and e:GetHandler():IsCanBeSpecialSummoned(e,0,tp,false,false) end
Duel.SetOperationInfo(0,CATEGORY_SPECIAL_SUMMON,e:GetHandler(),1,0,0)
end
function cm.spop(e,tp,eg,ep,ev,re,r,rp)
local c=e:GetHandler()
if not c:IsRelateToEffect(e) then return end
Duel.SpecialSummon(c,0,tp,tp,false,false,POS_FACEUP)
end
function cm.tscost(e,tp,eg,ep,ev,re,r,rp,chk)
if chk==0 then return e:GetHandler():IsAbleToHandAsCost() end
Duel.SendtoHand(e:GetHandler(),nil,REASON_COST)
end
function cm.sumfilter(c)
return c:IsRace(RACE_CYBERSE) and c:IsSummonable(true,nil)
end
function cm.tstg(e,tp,eg,ep,ev,re,r,rp,chk)
if chk==0 then return Duel.GetMZoneCount(tp,e:GetHandler())>0 and Duel.IsExistingMatchingCard(cm.sumfilter,tp,LOCATION_HAND,0,1,nil) end
Duel.SetOperationInfo(0,CATEGORY_SUMMON,nil,1,0,0)
end
function cm.tsop(e,tp,eg,ep,ev,re,r,rp)
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:SetCondition(cm.actcon)
e1:SetValue(1)
e1:SetReset(RESET_PHASE+PHASE_END)
Duel.RegisterEffect(e1,tp)
Duel.Hint(HINT_SELECTMSG,tp,HINTMSG_SUMMON)
local g=Duel.SelectMatchingCard(tp,cm.sumfilter,tp,LOCATION_HAND,0,1,1,nil)
local tc=g:GetFirst()
if tc then
Duel.Summon(tp,tc,true,nil)
end
end
function cm.actcon(e)
local tp=e:GetHandlerPlayer()
local a=Duel.GetAttacker()
local d=Duel.GetAttackTarget()
return (a and cm.cfilter(a,tp)) or (d and cm.cfilter(d,tp))
end
function cm.cfilter(c,tp)
return c:IsFaceup() and c:IsSummonType(SUMMON_TYPE_NORMAL) and c:IsLevel(10) and c:IsControler(tp)
end
--Neo-Geo MVS基板-GIGA
local m=28303009
local cm=_G["c"..m]
function cm.initial_effect(c)
--spsummon
local e2=Effect.CreateEffect(c)
e2:SetCategory(CATEGORY_SPECIAL_SUMMON)
e2:SetType(EFFECT_TYPE_IGNITION)
e2:SetRange(LOCATION_HAND)
e2:SetCountLimit(1,m)
e2:SetCost(cm.spcost)
e2:SetTarget(cm.sptg)
e2:SetOperation(cm.spop)
c:RegisterEffect(e2)
end
function cm.spcost(e,tp,eg,ep,ev,re,r,rp,chk)
local c=e:GetHandler()
if chk==0 then return c:IsDiscardable() end
Duel.SendtoGrave(c,REASON_COST+REASON_DISCARD)
end
function cm.spfilter(c,e,tp)
return c:IsType(TYPE_NORMAL) and c:IsSetCard(0xddd) 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.spfilter,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.spfilter,tp,LOCATION_DECK,0,1,1,nil,e,tp)
if g:GetCount()>0 then
Duel.SpecialSummon(g,0,tp,tp,false,false,POS_FACEUP)
end
end
--微光·椎名咪玉
local m=28315005
local cm=_G["c"..m]
function cm.initial_effect(c)
--to hand
local e1=Effect.CreateEffect(c)
e1:SetCategory(CATEGORY_TODECK)
e1:SetType(EFFECT_TYPE_IGNITION)
e1:SetProperty(EFFECT_FLAG_CARD_TARGET+EFFECT_FLAG_NO_TURN_RESET)
e1:SetRange(LOCATION_REMOVED)
e1:SetCountLimit(1,m)
e1:SetCondition(cm.thcon)
e1:SetTarget(cm.tdtg)
e1:SetOperation(cm.tdop)
c:RegisterEffect(e1)
--destroy replace
local e2=Effect.CreateEffect(c)
e2:SetType(EFFECT_TYPE_FIELD+EFFECT_TYPE_CONTINUOUS)
e2:SetCode(EFFECT_DESTROY_REPLACE)
e2:SetRange(LOCATION_GRAVE+LOCATION_MZONE+LOCATION_HAND)
e2:SetCountLimit(1,m+900)
e2:SetTarget(cm.reptg)
e2:SetValue(cm.repval)
e2:SetOperation(cm.repop)
c:RegisterEffect(e2)
end
function cm.thcon(e,tp,eg,ep,ev,re,r,rp)
return e:GetHandler():IsFaceup()
end
function cm.tdtg(e,tp,eg,ep,ev,re,r,rp,chk,chkc)
if chkc then return chkc:IsLocation(LOCATION_REMOVED) and chkc:IsAbleToDeck() end
if chk==0 then return Duel.IsExistingTarget(Card.IsAbleToDeck,tp,LOCATION_REMOVED,LOCATION_REMOVED,1,nil) end
Duel.Hint(HINT_SELECTMSG,tp,HINTMSG_TODECK)
local g=Duel.SelectTarget(tp,Card.IsAbleToDeck,tp,LOCATION_REMOVED,LOCATION_REMOVED,1,1,nil)
Duel.SetOperationInfo(0,CATEGORY_TODECK,g,1,0,0)
end
function cm.tdop(e,tp,eg,ep,ev,re,r,rp)
local tc=Duel.GetFirstTarget()
if tc:IsRelateToEffect(e) then
Duel.SendtoDeck(tc,nil,2,REASON_EFFECT)
end
end
function cm.repfilter(c,tp)
return c:IsFaceup() and c:IsControler(tp) and c:IsLocation(LOCATION_MZONE)
and c:IsRace(RACE_SPELLCASTER) and c:IsAttribute(ATTRIBUTE_DARK) and c:IsReason(REASON_BATTLE+REASON_EFFECT) and not c:IsReason(REASON_REPLACE)
end
function cm.reptg(e,tp,eg,ep,ev,re,r,rp,chk)
local c=e:GetHandler()
if chk==0 then return eg:IsExists(cm.repfilter,1,c,tp) and c:IsAbleToRemove()
and not c:IsStatus(STATUS_DESTROY_CONFIRMED) end
return Duel.SelectEffectYesNo(tp,c,96)
end
function cm.repval(e,c)
return cm.repfilter(c,e:GetHandlerPlayer())
end
function cm.repop(e,tp,eg,ep,ev,re,r,rp)
Duel.Remove(e:GetHandler(),POS_FACEUP,REASON_EFFECT+REASON_REPLACE)
end
--不言之中·椎名咪玉
local m=28315008
local cm=_G["c"..m]
function cm.initial_effect(c)
--summon success
local e1=Effect.CreateEffect(c)
e1:SetDescription(aux.Stringid(m,0))
e1:SetCategory(CATEGORY_SPECIAL_SUMMON)
e1:SetType(EFFECT_TYPE_SINGLE+EFFECT_TYPE_TRIGGER_O)
e1:SetCode(EVENT_SUMMON_SUCCESS)
e1:SetTarget(cm.sumtg)
e1:SetOperation(cm.sumop)
c:RegisterEffect(e1)
--search
local e3=Effect.CreateEffect(c)
e3:SetDescription(aux.Stringid(m,1))
e3:SetCategory(CATEGORY_DRAW+CATEGORY_TODECK)
e3:SetType(EFFECT_TYPE_FIELD+EFFECT_TYPE_TRIGGER_O)
e3:SetCode(EVENT_SPSUMMON_SUCCESS)
e3:SetProperty(EFFECT_FLAG_DELAY)
e3:SetRange(LOCATION_MZONE)
e3:SetCountLimit(1,m)
e3:SetCondition(cm.drcon)
e3:SetTarget(cm.drtg)
e3:SetOperation(cm.drop)
c:RegisterEffect(e3)
end
function cm.filter(c,e,tp)
return c:IsLevel(4) 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.filter,tp,LOCATION_HAND,0,1,nil,e,tp) end
Duel.SetOperationInfo(0,CATEGORY_SPECIAL_SUMMON,nil,1,tp,LOCATION_HAND)
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 g=Duel.SelectMatchingCard(tp,cm.filter,tp,LOCATION_HAND,0,1,1,nil,e,tp)
if g:GetCount()>0 then
Duel.SpecialSummon(g,0,tp,tp,false,false,POS_FACEUP)
end
end
function cm.cfilter(c,tp)
return c:IsPreviousLocation(LOCATION_HAND) and c:GetPreviousControler()==tp and not c:IsCode(m) and c:IsLevel(4)
end
function cm.drcon(e,tp,eg,ep,ev,re,r,rp)
return not eg:IsContains(e:GetHandler()) and eg:IsExists(cm.cfilter,1,nil,tp)
end
function cm.drtg(e,tp,eg,ep,ev,re,r,rp,chk)
if chk==0 then return Duel.IsPlayerCanDraw(tp,1) end
Duel.SetTargetPlayer(tp)
Duel.SetTargetParam(1)
Duel.SetOperationInfo(0,CATEGORY_DRAW,nil,0,tp,1)
Duel.SetOperationInfo(0,CATEGORY_TODECK,nil,0,tp,1)
end
function cm.drop(e,tp,eg,ep,ev,re,r,rp)
local p,d=Duel.GetChainInfo(0,CHAININFO_TARGET_PLAYER,CHAININFO_TARGET_PARAM)
if Duel.Draw(p,d,REASON_EFFECT)==0 then return end
Duel.Hint(HINT_SELECTMSG,tp,HINTMSG_TODECK)
local g=Duel.SelectMatchingCard(tp,Card.IsAbleToDeck,tp,LOCATION_HAND,0,1,1,nil)
if g:GetCount()>0 then
Duel.BreakEffect()
Duel.SendtoDeck(g,nil,1,REASON_EFFECT)
end
end
--蜃气楼·椎名咪玉
local m=28315009
local cm=_G["c"..m]
function cm.initial_effect(c)
--name
local e1=Effect.CreateEffect(c)
e1:SetType(EFFECT_TYPE_QUICK_O)
e1:SetCode(EVENT_FREE_CHAIN)
e1:SetRange(LOCATION_MZONE)
e1:SetProperty(EFFECT_FLAG_CARD_TARGET)
e1:SetCountLimit(1,m)
e1:SetTarget(cm.nmtg)
e1:SetOperation(cm.nmop)
c:RegisterEffect(e1)
--draw
local e2=Effect.CreateEffect(c)
e2:SetCategory(CATEGORY_DRAW+CATEGORY_HANDES)
e2:SetType(EFFECT_TYPE_SINGLE+EFFECT_TYPE_TRIGGER_O)
e2:SetProperty(EFFECT_FLAG_DELAY+EFFECT_FLAG_PLAYER_TARGET)
e2:SetCode(EVENT_BE_MATERIAL)
e2:SetCountLimit(1,m+900)
e2:SetCondition(cm.drcon)
e2:SetTarget(cm.drtg)
e2:SetOperation(cm.drop)
c:RegisterEffect(e2)
end
function cm.nmfilter(c,cd)
return (c:IsFaceup() or c:IsLocation(LOCATION_GRAVE)) and c:IsType(TYPE_MONSTER)
and not c:IsCode(cd)
end
function cm.nmtg(e,tp,eg,ep,ev,re,r,rp,chk,chkc)
local cd=e:GetHandler():GetCode()
if chkc then return chkc:IsLocation(LOCATION_MZONE+LOCATION_GRAVE) and cm.nmfilter(chkc,cd) end
if chk==0 then return Duel.IsExistingTarget(cm.nmfilter,tp,LOCATION_MZONE+LOCATION_GRAVE,LOCATION_MZONE+LOCATION_GRAVE,1,nil,cd) end
Duel.Hint(HINT_SELECTMSG,tp,HINTMSG_TARGET)
Duel.SelectTarget(tp,cm.nmfilter,tp,LOCATION_MZONE+LOCATION_GRAVE,LOCATION_MZONE+LOCATION_GRAVE,1,1,nil,cd)
end
function cm.nmop(e,tp,eg,ep,ev,re,r,rp)
local c=e:GetHandler()
local tc=Duel.GetFirstTarget()
if c:IsRelateToEffect(e) and c:IsFaceup() and tc:IsRelateToEffect(e) and (tc:IsLocation(LOCATION_GRAVE) or tc:IsFaceup()) then
local e1=Effect.CreateEffect(c)
e1:SetType(EFFECT_TYPE_SINGLE)
e1:SetCode(EFFECT_CHANGE_CODE)
e1:SetValue(tc:GetCode())
e1:SetReset(RESET_EVENT+RESETS_STANDARD+RESET_PHASE+PHASE_END)
c:RegisterEffect(e1)
if tc:IsLocation(LOCATION_MZONE) and tc:IsFaceup() and Duel.SelectYesNo(tp,aux.Stringid(m,0)) then
local e2=Effect.CreateEffect(c)
e2:SetType(EFFECT_TYPE_SINGLE)
e2:SetCode(EFFECT_CHANGE_CODE)
e2:SetValue(m)
e2:SetReset(RESET_EVENT+RESETS_STANDARD+RESET_PHASE+PHASE_END)
tc:RegisterEffect(e2)
end
end
end
function cm.drcon(e,tp,eg,ep,ev,re,r,rp)
local c=e:GetHandler()
return c:IsLocation(LOCATION_GRAVE+LOCATION_REMOVED) and r==REASON_FUSION
end
function cm.drtg(e,tp,eg,ep,ev,re,r,rp,chk)
if chk==0 then return Duel.IsPlayerCanDraw(tp,2) end
Duel.SetTargetPlayer(tp)
Duel.SetTargetParam(2)
Duel.SetOperationInfo(0,CATEGORY_DRAW,nil,0,tp,2)
Duel.SetOperationInfo(0,CATEGORY_HANDES,nil,0,tp,1)
end
function cm.drop(e,tp,eg,ep,ev,re,r,rp)
local p,d=Duel.GetChainInfo(0,CHAININFO_TARGET_PLAYER,CHAININFO_TARGET_PARAM)
if Duel.Draw(p,d,REASON_EFFECT)==2 then
Duel.ShuffleHand(p)
Duel.BreakEffect()
Duel.DiscardHand(p,nil,1,1,REASON_EFFECT+REASON_DISCARD)
end
end
--二人的相簿
local m=28315010
local cm=_G["c"..m]
function cm.initial_effect(c)
--Activate
local e1=Effect.CreateEffect(c)
e1:SetCategory(CATEGORY_SPECIAL_SUMMON)
e1:SetType(EFFECT_TYPE_ACTIVATE)
e1:SetCode(EVENT_FREE_CHAIN)
e1:SetTarget(cm.tg)
e1:SetOperation(cm.op)
c:RegisterEffect(e1)
--to hand
local e2=Effect.CreateEffect(c)
e2:SetCategory(CATEGORY_TOHAND)
e2:SetType(EFFECT_TYPE_FIELD+EFFECT_TYPE_TRIGGER_O)
e2:SetCode(EVENT_BATTLE_DESTROYING)
e2:SetProperty(EFFECT_FLAG_DAMAGE_STEP)
e2:SetRange(LOCATION_GRAVE)
e2:SetCountLimit(1,m)
e2:SetCondition(cm.thcon)
e2:SetTarget(cm.thtg)
e2:SetOperation(cm.thop)
c:RegisterEffect(e2)
end
function cm.filter(c,e,tp)
return c:IsRace(RACE_WARRIOR)
end
function cm.tg(e,tp,eg,ep,ev,re,r,rp,chk)
if chk==0 then
local mg=Duel.GetRitualMaterial(tp)
return Duel.IsExistingMatchingCard(aux.RitualUltimateFilter,tp,LOCATION_HAND,0,1,nil,cm.filter,e,tp,mg,nil,Card.GetLevel,"Greater")
end
Duel.SetOperationInfo(0,CATEGORY_SPECIAL_SUMMON,nil,1,tp,LOCATION_HAND)
end
function cm.op(e,tp,eg,ep,ev,re,r,rp)
local mg=Duel.GetRitualMaterial(tp)
Duel.Hint(HINT_SELECTMSG,tp,HINTMSG_SPSUMMON)
local tg=Duel.SelectMatchingCard(tp,aux.RitualUltimateFilter,tp,LOCATION_HAND,0,1,1,nil,cm.filter,e,tp,mg,nil,Card.GetLevel,"Greater")
local tc=tg:GetFirst()
if tc then
mg=mg:Filter(Card.IsCanBeRitualMaterial,tc,tc)
if tc.mat_filter then
mg=mg:Filter(tc.mat_filter,tc,tp)
else
mg:RemoveCard(tc)
end
Duel.Hint(HINT_SELECTMSG,tp,HINTMSG_RELEASE)
aux.GCheckAdditional=aux.RitualCheckAdditional(tc,tc:GetLevel(),"Greater")
local mat=mg:SelectSubGroup(tp,aux.RitualCheck,false,1,tc:GetLevel(),tp,tc,tc:GetLevel(),"Greater")
aux.GCheckAdditional=nil
if not mat or mat:GetCount()==0 then return end
tc:SetMaterial(mat)
Duel.ReleaseRitualMaterial(mat)
Duel.BreakEffect()
Duel.SpecialSummon(tc,SUMMON_TYPE_RITUAL,tp,tp,false,true,POS_FACEUP_ATTACK)
tc:CompleteProcedure()
local e1=Effect.CreateEffect(e:GetHandler())
e1:SetType(EFFECT_TYPE_SINGLE)
e1:SetCode(EFFECT_CANNOT_CHANGE_POSITION)
e1:SetReset(RESET_EVENT+RESETS_STANDARD)
tc:RegisterEffect(e1,true)
local e3=e1:Clone()
e3:SetCode(EFFECT_MUST_ATTACK)
tc:RegisterEffect(e3,true)
end
end
function cm.thcon(e,tp,eg,ep,ev,re,r,rp)
if eg:IsContains(e:GetHandler()) then return false end
local rc=eg:GetFirst()
return rc:IsRelateToBattle() and rc:IsStatus(STATUS_OPPO_BATTLE)
and rc:IsFaceup() and rc:IsRace(RACE_WARRIOR) and rc:IsType(TYPE_RITUAL) and rc:IsType(TYPE_MONSTER) and rc:IsControler(tp)
end
function cm.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 cm.thop(e,tp,eg,ep,ev,re,r,rp)
local c=e:GetHandler()
if c:IsRelateToEffect(e) then
Duel.SendtoHand(c,nil,REASON_EFFECT)
end
end
--放声高歌·椎名咪玉
local m=28315011
local cm=_G["c"..m]
Duel.LoadScript("c81000000.lua")
function cm.initial_effect(c)
--multi attack
local e1=Effect.CreateEffect(c)
e1:SetDescription(aux.Stringid(m,0))
e1:SetType(EFFECT_TYPE_QUICK_O)
e1:SetCode(EVENT_FREE_CHAIN)
e1:SetRange(LOCATION_HAND)
e1:SetProperty(EFFECT_FLAG_CARD_TARGET)
e1:SetCountLimit(1,m)
e1:SetCost(cm.seqcost)
e1:SetTarget(cm.seqtg)
e1:SetOperation(cm.seqop)
c:RegisterEffect(e1)
--change
local e3=Effect.CreateEffect(c)
e3:SetDescription(aux.Stringid(m,1))
e3:SetType(EFFECT_TYPE_QUICK_O)
e3:SetCode(EVENT_FREE_CHAIN)
e3:SetRange(LOCATION_HAND)
e3:SetCountLimit(1,m)
e3:SetCost(cm.seqcost)
e3:SetTarget(cm.chtg)
e3:SetOperation(cm.chop)
c:RegisterEffect(e3)
end
function cm.seqcost(e,tp,eg,ep,ev,re,r,rp,chk)
local c=e:GetHandler()
if chk==0 then return c:IsDiscardable() end
Duel.SendtoGrave(c,REASON_COST+REASON_DISCARD)
end
function cm.seqfilter(c)
local tp=c:GetControler()
return c:IsFaceup() and c:GetSequence()<5 and Duel.GetLocationCount(tp,LOCATION_MZONE,PLAYER_NONE,0)>0
end
function cm.seqtg(e,tp,eg,ep,ev,re,r,rp,chk,chkc)
local c=e:GetHandler()
if chkc then return chkc:IsLocation(LOCATION_MZONE) and cm.seqfilter(chkc) and chkc~=c end
if chk==0 then return Duel.IsExistingTarget(cm.seqfilter,tp,LOCATION_MZONE,LOCATION_MZONE,1,c) end
Duel.Hint(HINT_SELECTMSG,tp,aux.Stringid(m,2))
Duel.SelectTarget(tp,cm.seqfilter,tp,LOCATION_MZONE,LOCATION_MZONE,1,1,c)
end
function cm.seqop(e,tp,eg,ep,ev,re,r,rp)
local tc=Duel.GetFirstTarget()
local ttp=tc:GetControler()
if not tc:IsRelateToEffect(e) or tc:IsImmuneToEffect(e)
or Duel.GetLocationCount(ttp,LOCATION_MZONE,PLAYER_NONE,0)<=0 then return end
local p1,p2
if tc:IsControler(tp) then
p1=LOCATION_MZONE
p2=0
else
p1=0
p2=LOCATION_MZONE
end
Duel.Hint(HINT_SELECTMSG,tp,HINTMSG_TOZONE)
local seq=math.log(Duel.SelectDisableField(tp,1,p1,p2,0),2)
if tc:IsControler(1-tp) then seq=seq-16 end
Duel.MoveSequence(tc,seq)
end
function cm.chfilter1(c)
return c:IsType(TYPE_LINK) and c:GetSequence()<5
and Duel.IsExistingMatchingCard(cm.chfilter2,c:GetControler(),LOCATION_MZONE,0,1,c)
end
function cm.chfilter2(c)
return c:IsType(TYPE_MONSTER) and c:GetSequence()<5
end
function cm.chtg(e,tp,eg,ep,ev,re,r,rp,chk)
if chk==0 then return Duel.IsExistingMatchingCard(cm.chfilter1,tp,LOCATION_MZONE,LOCATION_MZONE,1,nil) end
end
function cm.chop(e,tp,eg,ep,ev,re,r,rp)
Duel.Hint(HINT_SELECTMSG,tp,HINTMSG_CONTROL)
local g1=Duel.SelectMatchingCard(tp,cm.chfilter1,tp,LOCATION_MZONE,LOCATION_MZONE,1,1,nil)
local tc1=g1:GetFirst()
if not tc1 then return end
Duel.HintSelection(g1)
Duel.Hint(HINT_SELECTMSG,tp,HINTMSG_CONTROL)
local g2=Duel.SelectMatchingCard(tp,cm.chfilter2,tc1:GetControler(),LOCATION_MZONE,0,1,1,tc1)
Duel.HintSelection(g2)
local tc2=g2:GetFirst()
Duel.SwapSequence(tc1,tc2)
end
--花满开·椎名咪玉
local m=28315013
local cm=_G["c"..m]
function cm.initial_effect(c)
--xyz summon
aux.AddXyzProcedure(c,nil,4,2)
c:EnableReviveLimit()
--sort decktop
local e1=Effect.CreateEffect(c)
e1:SetDescription(aux.Stringid(m,0))
e1:SetType(EFFECT_TYPE_QUICK_O)
e1:SetCode(EVENT_FREE_CHAIN)
e1:SetRange(LOCATION_MZONE)
e1:SetHintTiming(0,TIMING_END_PHASE)
e1:SetCost(cm.cost)
e1:SetTarget(cm.target)
e1:SetOperation(cm.operation)
c:RegisterEffect(e1)
--special summon
local e2=Effect.CreateEffect(c)
e2:SetDescription(aux.Stringid(m,1))
e2:SetCategory(CATEGORY_TOEXTRA+CATEGORY_SPECIAL_SUMMON)
e2:SetType(EFFECT_TYPE_IGNITION)
e2:SetRange(LOCATION_MZONE)
e2:SetCountLimit(1,m)
e2:SetCondition(cm.con)
e2:SetTarget(cm.tg)
e2:SetOperation(cm.op)
c:RegisterEffect(e2)
end
function cm.cost(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.target(e,tp,eg,ep,ev,re,r,rp,chk)
if chk==0 then return Duel.GetFieldGroupCount(tp,LOCATION_DECK,0)>=5 or Duel.GetFieldGroupCount(1-tp,LOCATION_DECK,0)>=5 end
end
function cm.operation(e,tp,eg,ep,ev,re,r,rp)
local b1=Duel.GetFieldGroupCount(tp,LOCATION_DECK,0)>=5
local b2=Duel.GetFieldGroupCount(1-tp,LOCATION_DECK,0)>=5
if not b1 and not b2 then return end
local op=nil
if b1 and b2 then
op=Duel.SelectOption(tp,aux.Stringid(m,2),aux.Stringid(m,3))
elseif b1 then
op=Duel.SelectOption(tp,aux.Stringid(m,2))
else
op=Duel.SelectOption(tp,aux.Stringid(m,3))+1
end
local p=op==0 and tp or 1-tp
Duel.SortDecktop(tp,p,5)
end
function cm.con(e,tp,eg,ep,ev,re,r,rp)
return e:GetHandler():GetOverlayCount()==0
end
function cm.filter(c)
return c:IsType(TYPE_XYZ) and c:IsRankBelow(6) and c:IsRace(RACE_SPELLCASTER) and c:IsAttribute(ATTRIBUTE_DARK) and c:IsAbleToExtra()
end
function cm.tg(e,tp,eg,ep,ev,re,r,rp,chk)
if chk==0 then return Duel.IsExistingMatchingCard(cm.filter,tp,LOCATION_GRAVE,0,1,nil) end
Duel.SetOperationInfo(0,CATEGORY_TOEXTRA,nil,1,tp,LOCATION_GRAVE)
end
function cm.op(e,tp,eg,ep,ev,re,r,rp)
Duel.Hint(HINT_SELECTMSG,tp,HINTMSG_TODECK)
local g=Duel.SelectMatchingCard(tp,cm.filter,tp,LOCATION_GRAVE,0,1,1,nil)
if #g==0 then return end
Duel.SendtoDeck(g,nil,2,REASON_EFFECT)
local c=e:GetHandler()
local sc=g:GetFirst()
if sc:IsLocation(LOCATION_EXTRA) and c:IsRelateToEffect(e) and c:IsFaceup() and c:IsControler(tp)
and c:IsCanBeXyzMaterial(sc) and sc:IsCanBeSpecialSummoned(e,SUMMON_TYPE_XYZ,tp,false,false)
and Duel.GetLocationCountFromEx(tp,tp,c,sc)>0
and Duel.SelectYesNo(tp,aux.Stringid(m,4)) then
Duel.BreakEffect()
local mg=c:GetOverlayGroup()
if mg:GetCount()~=0 then
Duel.Overlay(sc,mg)
end
sc:SetMaterial(Group.FromCards(c))
Duel.Overlay(sc,Group.FromCards(c))
Duel.SpecialSummon(sc,SUMMON_TYPE_XYZ,tp,tp,false,false,POS_FACEUP)
sc:CompleteProcedure()
end
end
--白雪琉璃
function c28316018.initial_effect(c)
--special summon
local e1=Effect.CreateEffect(c)
e1:SetCategory(CATEGORY_SPECIAL_SUMMON)
e1:SetType(EFFECT_TYPE_FIELD+EFFECT_TYPE_TRIGGER_O)
e1:SetProperty(EFFECT_FLAG_DAMAGE_STEP+EFFECT_FLAG_DELAY)
e1:SetCode(EVENT_DESTROYED)
e1:SetRange(LOCATION_GRAVE+LOCATION_HAND)
e1:SetCountLimit(1,28316018)
e1:SetCondition(c28316018.spcon)
e1:SetCost(c28316018.spcost)
e1:SetTarget(c28316018.sptg)
e1:SetOperation(c28316018.spop)
c:RegisterEffect(e1)
Duel.AddCustomActivityCounter(28316018,ACTIVITY_SPSUMMON,c28316018.counterfilter)
end
function c28316018.counterfilter(c)
return c:IsAttribute(ATTRIBUTE_WATER)
end
function c28316018.cfilter(c,tp,rp)
return c:IsReason(REASON_BATTLE+REASON_EFFECT) and c:IsAttribute(ATTRIBUTE_WATER) and c:IsType(TYPE_SYNCHRO)
and c:IsPreviousLocation(LOCATION_MZONE) and c:GetPreviousControler()==tp
and (c:IsReason(REASON_BATTLE) or c:IsReason(REASON_EFFECT))
end
function c28316018.spcon(e,tp,eg,ep,ev,re,r,rp)
return eg:IsExists(c28316018.cfilter,1,nil,tp,rp)
end
function c28316018.spcost(e,tp,eg,ep,ev,re,r,rp,chk)
if chk==0 then return Duel.GetCustomActivityCount(28316018,tp,ACTIVITY_SPSUMMON)==0 end
local e1=Effect.CreateEffect(e:GetHandler())
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(c28316018.splimit)
e1:SetReset(RESET_PHASE+PHASE_END)
Duel.RegisterEffect(e1,tp)
end
function c28316018.sptg(e,tp,eg,ep,ev,re,r,rp,chk)
if chk==0 then return Duel.GetLocationCount(tp,LOCATION_MZONE)>0
and e:GetHandler():IsCanBeSpecialSummoned(e,0,tp,false,false,POS_FACEUP) end
Duel.SetOperationInfo(0,CATEGORY_SPECIAL_SUMMON,e:GetHandler(),1,0,0)
end
function c28316018.spop(e,tp,eg,ep,ev,re,r,rp)
local c=e:GetHandler()
if c:IsRelateToEffect(e) then
Duel.SpecialSummon(c,0,tp,tp,false,false,POS_FACEUP)
end
end
function c28316018.splimit(e,c,sump,sumtype,sumpos,targetp)
return not c:IsAttribute(ATTRIBUTE_WATER)
end
--白雪琉璃·幻象
local m=28316019
local cm=_G["c"..m]
Duel.LoadScript("c81000000.lua")
function cm.initial_effect(c)
--battle
local e3=Effect.CreateEffect(c)
e3:SetCategory(CATEGORY_SPECIAL_SUMMON)
e3:SetType(EFFECT_TYPE_FIELD+EFFECT_TYPE_TRIGGER_O)
e3:SetCode(EVENT_PRE_DAMAGE_CALCULATE)
e3:SetRange(LOCATION_HAND+LOCATION_GRAVE)
e3:SetCountLimit(1,m)
e3:SetCondition(cm.drcon)
e3:SetTarget(cm.drtg)
e3:SetOperation(cm.drop)
c:RegisterEffect(e3)
end
function cm.drcon(e,tp,eg,ep,ev,re,r,rp)
local a=Duel.GetAttacker()
local d=Duel.GetAttackTarget()
return (a:IsControler(tp)) or (d and d:IsControler(tp))
end
function cm.drtg(e,tp,eg,ep,ev,re,r,rp,chk)
if chk==0 then return e:GetHandler():IsCanBeSpecialSummoned(e,0,tp,false,false) and Duel.GetMZoneCount(tp)>0 end
Duel.SetOperationInfo(0,CATEGORY_SPECIAL_SUMMON,e:GetHandler(),1,0,0)
end
function cm.drop(e,tp,eg,ep,ev,re,r,rp)
local c=e:GetHandler()
if not c:IsRelateToEffect(e) or Duel.GetMZoneCount(tp)<=0 then return end
Duel.SpecialSummon(c,0,tp,tp,false,false,POS_FACEUP)
local e1=Effect.CreateEffect(c)
e1:SetCode(EFFECT_EXTRA_ATTACK)
e1:SetType(EFFECT_TYPE_SINGLE)
e1:SetValue(1)
e1:SetReset(RESET_EVENT+RESETS_STANDARD+RESET_PHASE+PHASE_END)
c:RegisterEffect(e1,true)
local e2=Effect.CreateEffect(c)
e2:SetType(EFFECT_TYPE_SINGLE)
e2:SetCode(EFFECT_LEAVE_FIELD_REDIRECT)
e2:SetProperty(EFFECT_FLAG_CANNOT_DISABLE)
e2:SetReset(RESET_EVENT+RESETS_REDIRECT)
e2:SetValue(LOCATION_REMOVED)
c:RegisterEffect(e2,true)
end
--白雪琉璃·花开
function c28316020.initial_effect(c)
--spsummon
local e1=Effect.CreateEffect(c)
e1:SetCategory(CATEGORY_SPECIAL_SUMMON)
e1:SetType(EFFECT_TYPE_IGNITION)
e1:SetRange(LOCATION_HAND)
e1:SetCountLimit(1,28316020)
e1:SetTarget(c28316020.sptg)
e1:SetOperation(c28316020.spop)
c:RegisterEffect(e1)
end
function c28316020.sptg(e,tp,eg,ep,ev,re,r,rp,chk)
if chk==0 then return Duel.GetDecktopGroup(tp,1):GetCount()>0 and Duel.GetMZoneCount(tp)>0 and e:GetHandler():IsCanBeSpecialSummoned(e,0,tp,false,false) end
Duel.SetOperationInfo(0,CATEGORY_SPECIAL_SUMMON,e:GetHandler(),1,0,0)
end
function c28316020.spop(e,tp,eg,ep,ev,re,r,rp)
local g=Duel.GetDecktopGroup(tp,1)
Duel.ConfirmDecktop(tp,1)
if g:GetFirst():IsRace(RACE_MACHINE) and g:GetFirst():IsAttribute(ATTRIBUTE_LIGHT) and Duel.GetMZoneCount(tp)>0 and e:GetHandler():IsCanBeSpecialSummoned(e,0,tp,false,false) then
Duel.BreakEffect()
Duel.SpecialSummon(e:GetHandler(),0,tp,tp,false,false,POS_FACEUP)
Duel.Draw(tp,1,REASON_EFFECT)
local e1=Effect.CreateEffect(e:GetHandler())
e1:SetType(EFFECT_TYPE_SINGLE)
e1:SetCode(EFFECT_LEAVE_FIELD_REDIRECT)
e1:SetProperty(EFFECT_FLAG_CANNOT_DISABLE)
e1:SetReset(RESET_EVENT+RESETS_REDIRECT)
e1:SetValue(LOCATION_REMOVED)
e:GetHandler():RegisterEffect(e1,true)
end
end
--鸣野凪子
local m=28325000
local cm=_G["c"..m]
Duel.LoadScript("c26800000.lua")
function cm.initial_effect(c)
--fusion material
c:EnableReviveLimit()
aux.AddFusionProcFunRep(c,cm.ffilter,2,true)
--direct attack
local e1=Effect.CreateEffect(c)
e1:SetType(EFFECT_TYPE_SINGLE)
e1:SetCode(EFFECT_DIRECT_ATTACK)
e1:SetCondition(cm.dicon)
c:RegisterEffect(e1)
--destroy
local e2=Effect.CreateEffect(c)
e2:SetCategory(CATEGORY_DESTROY)
e2:SetType(EFFECT_TYPE_SINGLE+EFFECT_TYPE_TRIGGER_O)
e2:SetCode(EVENT_BATTLE_START)
e2:SetTarget(cm.destg)
e2:SetOperation(cm.desop)
c:RegisterEffect(e2)
--negate
local e3=Effect.CreateEffect(c)
e3:SetCategory(CATEGORY_NEGATE)
e3:SetType(EFFECT_TYPE_QUICK_F)
e3:SetCode(EVENT_CHAINING)
e3:SetProperty(EFFECT_FLAG_DAMAGE_STEP+EFFECT_FLAG_DAMAGE_CAL)
e3:SetRange(LOCATION_MZONE)
e3:SetCountLimit(1)
e3:SetCondition(cm.discon)
e3:SetCost(cm.discost)
e3:SetTarget(cm.distg)
e3:SetOperation(cm.disop)
c:RegisterEffect(e3)
end
function cm.ffilter(c)
return c:GetSequence()>4 and c:IsLocation(LOCATION_MZONE)
end
function cm.dicon(e)
return e:GetHandler():GetSequence()>4
end
function cm.destg(e,tp,eg,ep,ev,re,r,rp,chk)
local c=e:GetHandler()
local bc=c:GetBattleTarget()
if chk==0 then return bc and bc:GetSequence()>4 end
Duel.SetOperationInfo(0,CATEGORY_DESTROY,bc,1,0,0)
end
function cm.desop(e,tp,eg,ep,ev,re,r,rp)
local c=e:GetHandler()
local bc=c:GetBattleTarget()
if bc:IsRelateToBattle() then
Duel.Destroy(bc,REASON_EFFECT)
end
end
function cm.discon(e,tp,eg,ep,ev,re,r,rp)
return (re:IsHasType(EFFECT_TYPE_ACTIVATE) or re:IsActiveType(TYPE_MONSTER))
and re:GetHandler()~=e:GetHandler()
end
function cm.discost(e,tp,eg,ep,ev,re,r,rp,chk)
if chk==0 then return Duel.CheckReleaseGroup(tp,nil,1,nil) end
local g=Duel.SelectReleaseGroup(tp,nil,1,1,nil)
Duel.Release(g,REASON_COST)
end
function cm.distg(e,tp,eg,ep,ev,re,r,rp,chk)
if chk==0 then return true end
Duel.SetOperationInfo(0,CATEGORY_NEGATE,eg,1,0,0)
end
function cm.disop(e,tp,eg,ep,ev,re,r,rp)
if Duel.NegateActivation(ev) and re:IsHasType(EFFECT_TYPE_ACTIVATE) and re:GetHandler():IsRelateToEffect(re) then
Duel.SendtoGrave(eg,REASON_EFFECT)
end
end
--真白之心·鸣野凪子
local m=28325001
local cm=_G["c"..m]
Duel.LoadScript("c81000000.lua")
function cm.initial_effect(c)
--synchro summon
aux.AddSynchroProcedure(c,nil,aux.NonTuner(nil),1)
c:EnableReviveLimit()
--destroy
local e1=Effect.CreateEffect(c)
e1:SetProperty(EFFECT_FLAG_CARD_TARGET)
e1:SetType(EFFECT_TYPE_QUICK_O)
e1:SetCode(EVENT_FREE_CHAIN)
e1:SetRange(LOCATION_MZONE)
e1:SetCountLimit(1,m)
e1:SetTarget(cm.destg)
e1:SetOperation(cm.desop)
c:RegisterEffect(e1)
end
function cm.destg(e,tp,eg,ep,ev,re,r,rp,chk,chkc)
if chkc then return chkc:IsLocation(LOCATION_MZONE) and chkc:IsControler(1-tp) and chkc:IsFaceup() end
if chk==0 then return Duel.IsExistingTarget(Card.IsFaceup,tp,0,LOCATION_MZONE,1,nil) end
Duel.Hint(HINT_SELECTMSG,tp,HINTMSG_TARGET)
local g=Duel.SelectTarget(tp,Card.IsFaceup,tp,0,LOCATION_MZONE,1,1,nil)
end
function cm.desop(e,tp,eg,ep,ev,re,r,rp)
local c=e:GetHandler()
local tc=Duel.GetFirstTarget()
local atk=tc:GetAttack()
if tc and tc:IsRelateToEffect(e) then
if Duel.SelectYesNo(1-tp,aux.Stringid(m,0)) then
if Duel.Destroy(tc,REASON_EFFECT)>0 then
local e4=Effect.CreateEffect(c)
e4:SetType(EFFECT_TYPE_SINGLE)
e4:SetCode(EFFECT_UPDATE_ATTACK)
e4:SetValue(atk)
e4:SetReset(RESET_EVENT+RESETS_STANDARD+RESET_DISABLE)
c:RegisterEffect(e4)
end
else
local e1=Effect.CreateEffect(c)
e1:SetType(EFFECT_TYPE_SINGLE)
e1:SetCode(EFFECT_SET_ATTACK_FINAL)
e1:SetProperty(EFFECT_FLAG_CANNOT_DISABLE)
e1:SetValue(0)
e1:SetReset(RESET_EVENT+RESETS_STANDARD)
tc:RegisterEffect(e1)
local e2=Effect.CreateEffect(c)
e2:SetType(EFFECT_TYPE_SINGLE)
e2:SetCode(EFFECT_DISABLE)
e2:SetProperty(EFFECT_FLAG_CANNOT_DISABLE)
e2:SetReset(RESET_EVENT+RESETS_STANDARD)
tc:RegisterEffect(e2)
local e3=Effect.CreateEffect(c)
e3:SetType(EFFECT_TYPE_SINGLE)
e3:SetCode(EFFECT_DISABLE_EFFECT)
e3:SetProperty(EFFECT_FLAG_CANNOT_DISABLE)
e3:SetValue(RESET_TURN_SET)
e3:SetReset(RESET_EVENT+RESETS_STANDARD)
tc:RegisterEffect(e3)
end
end
end
--铃铛声·鸣野凪子
local m=28325002
local cm=_G["c"..m]
Duel.LoadScript("c81000000.lua")
function cm.initial_effect(c)
--xyz summon
aux.AddXyzProcedure(c,nil,4,2)
c:EnableReviveLimit()
--addown
local e1=Effect.CreateEffect(c)
e1:SetProperty(EFFECT_FLAG_CARD_TARGET)
e1:SetType(EFFECT_TYPE_IGNITION)
e1:SetRange(LOCATION_MZONE)
e1:SetCountLimit(1)
e1:SetCost(cm.cost)
e1:SetTarget(cm.target)
e1:SetOperation(cm.operation)
c:RegisterEffect(e1)
end
function cm.cost(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.filter(c)
return c:IsFaceup() and c:IsCanBeXyzMaterial()
end
function cm.target(e,tp,eg,ep,ev,re,r,rp,chk,chkc)
if chkc then return chkc:IsControler(1-tp) and chkc:IsLocation(LOCATION_MZONE) and cm.filter(chkc) end
if chk==0 then return Duel.IsExistingTarget(cm.filter,tp,0,LOCATION_MZONE,1,nil) end
Duel.Hint(HINT_SELECTMSG,tp,HINTMSG_FACEUP)
Duel.SelectTarget(tp,cm.filter,tp,0,LOCATION_MZONE,1,1,nil)
end
function cm.operation(e,tp,eg,ep,ev,re,r,rp)
local tc=Duel.GetFirstTarget()
if tc and tc:IsRelateToEffect(e) then
local e1=Effect.CreateEffect(e:GetHandler())
e1:SetType(EFFECT_TYPE_SINGLE)
e1:SetCode(EFFECT_XYZ_MATERIAL)
e1:SetReset(RESET_EVENT+RESETS_STANDARD+RESET_PHASE+PHASE_END)
tc:RegisterEffect(e1)
end
end
--女仆长·鸣野凪子
local m=28325003
local cm=_G["c"..m]
Duel.LoadScript("c81000000.lua")
function cm.initial_effect(c)
c:EnableReviveLimit()
--xyzlimit
local e0=Effect.CreateEffect(c)
e0:SetType(EFFECT_TYPE_SINGLE)
e0:SetProperty(EFFECT_FLAG_CANNOT_DISABLE+EFFECT_FLAG_UNCOPYABLE)
e0:SetCode(EFFECT_CANNOT_BE_XYZ_MATERIAL)
e0:SetValue(1)
c:RegisterEffect(e0)
--
local e1=Effect.CreateEffect(c)
e1:SetDescription(1165)
e1:SetType(EFFECT_TYPE_FIELD)
e1:SetCode(EFFECT_SPSUMMON_PROC)
e1:SetProperty(EFFECT_FLAG_CANNOT_DISABLE+EFFECT_FLAG_UNCOPYABLE)
e1:SetRange(LOCATION_EXTRA)
e1:SetCondition(cm.sprcon)
e1:SetTarget(cm.sprtg)
e1:SetOperation(cm.sprop)
e1:SetValue(SUMMON_TYPE_XYZ)
c:RegisterEffect(e1)
--atk & def
local e4=Effect.CreateEffect(c)
e4:SetType(EFFECT_TYPE_SINGLE)
e4:SetCode(EFFECT_UPDATE_ATTACK)
e4:SetProperty(EFFECT_FLAG_SINGLE_RANGE)
e4:SetRange(LOCATION_MZONE)
e4:SetValue(cm.atkval)
c:RegisterEffect(e4)
local e5=e4:Clone()
e5:SetCode(EFFECT_UPDATE_DEFENSE)
c:RegisterEffect(e5)
end
function cm.spfilter(c,xyzc)
if c:IsHasEffect(EFFECT_CANNOT_BE_XYZ_MATERIAL) then
return c:IsFaceup() and c:IsCanBeXyzMaterial(xyzc)
else
return c:IsFaceup() and c:IsCanOverlay()
end
end
function cm.sprgoal(sg,tp,spc)
return Duel.GetLocationCountFromEx(tp,tp,sg,spc)>0 and #sg>=2 and #sg<=Duel.GetTurnCount()
end
function cm.sprcon(e,c)
if c==nil then return true end
local tp=c:GetControler()
local mg=Duel.GetMatchingGroup(cm.spfilter,tp,LOCATION_ONFIELD,0,nil,c)
local sg=Auxiliary.GetMustMaterialGroup(tp,EFFECT_MUST_BE_XMATERIAL)
if sg:IsExists(Auxiliary.MustMaterialCounterFilter,1,nil,mg) then return false end
Duel.SetSelectedCard(sg)
Auxiliary.GCheckAdditional=Auxiliary.TuneMagicianCheckAdditionalX(EFFECT_TUNE_MAGICIAN_X)
local res=mg:CheckSubGroup(cm.sprgoal,1,nil,tp,c)
Auxiliary.GCheckAdditional=nil
return res
end
function cm.sprtg(e,tp,eg,ep,ev,re,r,rp,chk,c,og)
local mg=nil
if og then
mg=og:Filter(cm.spfilter,nil,c)
else
mg=Duel.GetMatchingGroup(cm.spfilter,tp,LOCATION_ONFIELD,0,nil,c)
end
local cancel=Duel.IsSummonCancelable()
local msg=Auxiliary.GetMustMaterialGroup(tp,EFFECT_MUST_BE_XMATERIAL)
if msg:IsExists(Auxiliary.MustMaterialCounterFilter,1,nil,mg) then return false end
Duel.SetSelectedCard(msg)
Duel.Hint(HINT_SELECTMSG,tp,HINTMSG_XMATERIAL)
Auxiliary.GCheckAdditional=Auxiliary.TuneMagicianCheckAdditionalX(EFFECT_TUNE_MAGICIAN_X)
local sg=mg:SelectSubGroup(tp,cm.sprgoal,cancel,2,Duel.GetTurnCount(),tp,c)
Auxiliary.GCheckAdditional=nil
if sg then
sg:KeepAlive()
e:SetLabelObject(sg)
return true
else return false end
end
function cm.sprop(e,tp,eg,ep,ev,re,r,rp,c)
local sg=e:GetLabelObject()
local xg=Group.CreateGroup()
for tc in aux.Next(sg) do
if tc:IsType(TYPE_XYZ) then
local xyg=tc:GetOverlayGroup()
if xyg:GetCount()>0 then
xg:Merge(xyg)
end
end
end
if xg:GetCount()>0 then Duel.SendtoGrave(xg,REASON_RULE) end
c:SetMaterial(sg)
Duel.Overlay(c,sg)
xg:DeleteGroup()
end
function cm.atkval(e,c)
return c:GetOverlayCount()*1000
end
--杀人事件·鸣野凪子
local m=28325004
local cm=_G["c"..m]
Duel.LoadScript("c81000000.lua")
function cm.initial_effect(c)
--synchro summon
c:EnableReviveLimit()
aux.AddSynchroMixProcedure(c,cm.matfilter1,nil,nil,aux.NonTuner(cm.matfilter2),1,99)
--spsummon
local e1=Effect.CreateEffect(c)
e1:SetCategory(CATEGORY_SPECIAL_SUMMON)
e1:SetType(EFFECT_TYPE_QUICK_O)
e1:SetCode(EVENT_CHAINING)
e1:SetRange(LOCATION_MZONE)
e1:SetCountLimit(1,m)
e1:SetCondition(cm.tkcon)
e1:SetTarget(cm.tktg)
e1:SetOperation(cm.tkop)
c:RegisterEffect(e1)
end
function cm.matfilter1(c)
return (c:IsSynchroType(TYPE_TUNER) or c:IsSynchroType(TYPE_NORMAL)) and c:IsAttribute(ATTRIBUTE_WIND)
end
function cm.matfilter2(c)
return c:IsAttribute(ATTRIBUTE_WIND)
end
function cm.tkcon(e,tp,eg,ep,ev,re,r,rp)
return rp==1-tp
end
function cm.tktg(e,tp,eg,ep,ev,re,r,rp,chk,chkc)
if chk==0 then return Duel.GetLocationCount(tp,LOCATION_MZONE)>0
and Duel.IsPlayerCanSpecialSummonMonster(tp,m+1,0,TYPES_TOKEN_MONSTER,100,100,11,RACE_SPELLCASTER,ATTRIBUTE_WIND) end
Duel.SetOperationInfo(0,CATEGORY_TOKEN,nil,1,0,0)
Duel.SetOperationInfo(0,CATEGORY_SPECIAL_SUMMON,nil,1,0,0)
end
function cm.tkop(e,tp,eg,ep,ev,re,r,rp)
if Duel.GetLocationCount(tp,LOCATION_MZONE)<=0 then return end
if Duel.IsPlayerCanSpecialSummonMonster(tp,m+1,0,TYPES_TOKEN_MONSTER,100,100,11,RACE_SPELLCASTER,ATTRIBUTE_WIND) then
local token=Duel.CreateToken(tp,m+1)
Duel.SpecialSummon(token,0,tp,tp,false,false,POS_FACEUP)
end
end
--宫水静香·万圣节
local m=28326006
local cm=_G["c"..m]
function cm.initial_effect(c)
--pendulum summon
aux.EnablePendulumAttribute(c)
end
......@@ -46,7 +46,7 @@ function c33400453.con(e,tp,eg,ep,ev,re,r,rp)
local tc=e:GetHandler():GetEquipTarget()
local tc1=tc:GetBattleTarget()
e:SetLabelObject(tc1)
return tc and tc:IsFaceup()
return tc1 and tc1:IsFaceup()
end
function c33400453.tg(e,tp,eg,ep,ev,re,r,rp,chk)
if chk==0 then return true end
......
......@@ -41,7 +41,7 @@ function cm.sefilter(c)
return c:IsSetCard(0x3a91) and c:IsFaceup()
end
function cm.adval(e,c)
local g=Duel.GetMatchingGroup(cm.sefilter,e:GetHandlerPlayer(),LOCATION_ONFIELD,LOCATION_ONFIELD,e:GetHandler())
local g=Duel.GetMatchingGroup(cm.sefilter,e:GetHandlerPlayer(),LOCATION_MZONE,0,e:GetHandler())
local ct=g:GetClassCount(Card.GetCode)
return ct*500
end
......@@ -72,10 +72,11 @@ function cm.negop(e,tp,eg,ep,ev,re,r,rp)
local b1=Duel.IsExistingMatchingCard(cm.mvfilter1,tp,LOCATION_MZONE,0,1,nil)
and Duel.GetLocationCount(tp,LOCATION_MZONE,PLAYER_NONE,0)>0
local b2=Duel.IsExistingMatchingCard(cm.mvfilter2,tp,LOCATION_MZONE,0,1,nil,tp)
if not (b1 or b2) then return end
local op=0
if b1 and b2 then op=Duel.SelectOption(tp,aux.Stringid(m,1),aux.Stringid(m,2))
elseif b1 then op=Duel.SelectOption(tp,aux.Stringid(m,1))
else op=Duel.SelectOption(tp,aux.Stringid(m,2))+1 end
elseif b2 then op=Duel.SelectOption(tp,aux.Stringid(m,2))+1
else return end
if op==0 then
if Duel.GetLocationCount(tp,LOCATION_MZONE,PLAYER_NONE,0)<=0 then return end
Duel.Hint(HINT_SELECTMSG,tp,aux.Stringid(m,3))
......
......@@ -75,6 +75,7 @@ end
function cm.actg(e,tp,eg,ep,ev,re,r,rp,chk)
local b1=Duel.IsExistingMatchingCard(cm.acfilter,tp,LOCATION_DECK,0,1,nil,tp)
local b2=Duel.IsExistingMatchingCard(cm.thfilter,tp,LOCATION_DECK,0,1,nil,tp)
local op=0
if chk==0 then return b1 or b2 end
if b1 and b2 then op=Duel.SelectOption(tp,aux.Stringid(m,1),aux.Stringid(m,2))
elseif b1 then op=Duel.SelectOption(tp,aux.Stringid(m,1))
......
......@@ -72,7 +72,7 @@ function cm.seqop(e,tp,eg,ep,ev,re,r,rp)
local seq1=math.log(flag,2)
Duel.MoveSequence(c,seq1)
if c:GetSequence()==seq1 then
if tc:IsFaceup() then
if tc:IsOnField() then
Duel.BreakEffect()
Duel.Destroy(tc,REASON_EFFECT)
end
......
--幻 海 袭 噬 魔
function c53705001.initial_effect(c)
--cannot special summon
local e1=Effect.CreateEffect(c)
e1:SetProperty(EFFECT_FLAG_CANNOT_DISABLE+EFFECT_FLAG_UNCOPYABLE)
e1:SetType(EFFECT_TYPE_SINGLE)
e1:SetCode(EFFECT_SPSUMMON_CONDITION)
e1:SetValue(aux.FALSE)
c:RegisterEffect(e1)
--search
local m=53705001
local cm=_G["c"..m]
cm.name="幻海袭 噬魔"
if not pcall(function() require("expansions/script/c53702500") end) then require("script/c53702500") end
function cm.initial_effect(c)
SNNM.SeadowRover(c)
local e3=Effect.CreateEffect(c)
e3:SetDescription(aux.Stringid(53705001,1))
e3:SetDescription(aux.Stringid(m,1))
e3:SetCategory(CATEGORY_TOHAND+CATEGORY_SEARCH)
e3:SetType(EFFECT_TYPE_IGNITION)
e3:SetRange(LOCATION_HAND)
e3:SetTarget(c53705001.thtg)
e3:SetOperation(c53705001.thop)
e3:SetTarget(cm.thtg)
e3:SetOperation(cm.thop)
c:RegisterEffect(e3)
end
function c53705001.pubfilter(c)
function cm.pubfilter(c)
return not c:IsPublic()
end
function c53705001.thfilter(c)
return c:IsSetCard(0x534) and c:IsType(TYPE_TUNER) and c:IsAbleToHand()
function cm.thfilter(c)
return c:IsSetCard(0x3534) and c:IsType(TYPE_TUNER) and c:IsAbleToHand()
end
function c53705001.tdfilter(c)
return c:IsPublic() and c:IsAbleToDeck()
function cm.gselect(g,e)
return g:IsExists(Card.IsSetCard,1,nil,0x3534) and not g:IsContains(e:GetHandler())
end
function c53705001.gselect(g,e)
return g:IsExists(Card.IsSetCard,1,nil,0x534) and not g:IsContains(e:GetHandler())
end
function c53705001.thtg(e,tp,eg,ep,ev,re,r,rp,chk)
function cm.thtg(e,tp,eg,ep,ev,re,r,rp,chk)
local c=e:GetHandler()
local g=Duel.GetMatchingGroup(c53705001.pubfilter,tp,LOCATION_HAND,0,nil)
if chk==0 then return Duel.IsExistingMatchingCard(c53705001.thfilter,tp,LOCATION_DECK,0,1,nil)
local g=Duel.GetMatchingGroup(cm.pubfilter,tp,LOCATION_HAND,0,nil)
if chk==0 then return Duel.IsExistingMatchingCard(cm.thfilter,tp,LOCATION_DECK,0,1,nil)
and not c:IsPublic()
and #g>1 and g:IsExists(Card.IsSetCard,1,c,0x534) end
and #g>1 and g:IsExists(Card.IsSetCard,1,c,0x3534) end
Duel.SetOperationInfo(0,CATEGORY_TOHAND,nil,1,tp,LOCATION_DECK)
Duel.Hint(HINT_SELECTMSG,tp,HINTMSG_CONFIRM)
local hg=g:SelectSubGroup(tp,c53705001.gselect,false,1,2,e)
local tc=hg:GetFirst()
local hg=g:SelectSubGroup(tp,cm.gselect,false,1,2,e)
Duel.ConfirmCards(1-tp,hg)
local e1=Effect.CreateEffect(c)
e1:SetType(EFFECT_TYPE_SINGLE)
e1:SetCode(EFFECT_PUBLIC)
e1:SetReset(RESET_EVENT+RESETS_STANDARD+RESET_PHASE+PHASE_END,2)
c:RegisterEffect(e1)
c:RegisterFlagEffect(0,RESET_EVENT+RESETS_STANDARD+RESET_PHASE+PHASE_END,EFFECT_FLAG_CLIENT_HINT,2,0,aux.Stringid(53705001,0))
while tc do
local e2=Effect.CreateEffect(c)
e2:SetType(EFFECT_TYPE_SINGLE)
e2:SetCode(EFFECT_PUBLIC)
e2:SetReset(RESET_EVENT+RESETS_STANDARD+RESET_PHASE+PHASE_END,2)
tc:RegisterEffect(e2)
tc:RegisterFlagEffect(0,RESET_EVENT+RESETS_STANDARD+RESET_PHASE+PHASE_END,EFFECT_FLAG_CLIENT_HINT,2,0,aux.Stringid(53705001,0))
tc=hg:GetNext()
end
SNNM.SetPublic(c,4,RESET_EVENT+RESETS_STANDARD+RESET_PHASE+PHASE_END,2)
for tc in aux.Next(hg) do SNNM.SetPublic(tc,4,RESET_EVENT+RESETS_STANDARD+RESET_PHASE+PHASE_END,2) end
end
function c53705001.thop(e,tp,eg,ep,ev,re,r,rp)
function cm.thop(e,tp,eg,ep,ev,re,r,rp)
Duel.Hint(HINT_SELECTMSG,tp,HINTMSG_ATOHAND)
local g1=Duel.SelectMatchingCard(tp,c53705001.thfilter,tp,LOCATION_DECK,0,1,1,nil)
local g2=Duel.GetMatchingGroup(c53705001.tdfilter,tp,LOCATION_HAND,0,nil)
if g1:GetCount()>0 and g2:GetCount()>0 and Duel.SendtoHand(g1,nil,REASON_EFFECT)>0 then
local g1=Duel.SelectMatchingCard(tp,cm.thfilter,tp,LOCATION_DECK,0,1,1,nil)
local g2=Duel.GetMatchingGroup(function(c)return c:IsPublic() and c:IsAbleToDeck()end,tp,LOCATION_HAND,0,nil)
if g1:GetCount()>0 and Duel.SendtoHand(g1,nil,REASON_EFFECT)>0 and g2:GetCount()>0 then
Duel.ConfirmCards(1-tp,g1)
Duel.ShuffleHand(tp)
Duel.BreakEffect()
......
--幻 海 袭 宝 藏
function c53705002.initial_effect(c)
--cannot special summon
local e1=Effect.CreateEffect(c)
e1:SetProperty(EFFECT_FLAG_CANNOT_DISABLE+EFFECT_FLAG_UNCOPYABLE)
e1:SetType(EFFECT_TYPE_SINGLE)
e1:SetCode(EFFECT_SPSUMMON_CONDITION)
e1:SetValue(aux.FALSE)
c:RegisterEffect(e1)
--
local e2=Effect.CreateEffect(c)
e2:SetType(EFFECT_TYPE_SINGLE+EFFECT_TYPE_CONTINUOUS)
e2:SetCode(EVENT_TO_DECK)
e2:SetCondition(c53705002.dpcon)
e2:SetOperation(c53705002.dpop)
c:RegisterEffect(e2)
--draw
local m=53705002
local cm=_G["c"..m]
cm.name="幻海袭 宝藏"
if not pcall(function() require("expansions/script/c53702500") end) then require("script/c53702500") end
function cm.initial_effect(c)
SNNM.SeadowRover(c)
local e3=Effect.CreateEffect(c)
e3:SetDescription(aux.Stringid(53705002,1))
e3:SetDescription(aux.Stringid(m,1))
e3:SetType(EFFECT_TYPE_IGNITION)
e3:SetCategory(CATEGORY_DRAW)
e3:SetRange(LOCATION_HAND)
e3:SetTarget(c53705002.drtg)
e3:SetOperation(c53705002.drop)
e3:SetTarget(cm.drtg)
e3:SetOperation(cm.drop)
c:RegisterEffect(e3)
end
function c53705002.pubfilter(c)
return c:IsSetCard(0x534) and c:IsPublic()
function cm.pubfilter(c)
return c:IsSetCard(0x3534) and c:IsPublic()
end
function c53705002.drtg(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_DRAW,nil,0,PLAYER_ALL,1)
end
function c53705002.drop(e,tp,eg,ep,ev,re,r,rp)
local c=e:GetHandler()
local e1=Effect.CreateEffect(c)
e1:SetType(EFFECT_TYPE_SINGLE)
e1:SetCode(EFFECT_PUBLIC)
e1:SetReset(RESET_EVENT+RESETS_STANDARD+RESET_PHASE+PHASE_END,2)
c:RegisterEffect(e1)
c:RegisterFlagEffect(0,RESET_EVENT+RESETS_STANDARD+RESET_PHASE+PHASE_END,EFFECT_FLAG_CLIENT_HINT,2,0,aux.Stringid(53705002,0))
if Duel.IsExistingMatchingCard(c53705002.pubfilter,tp,LOCATION_HAND,0,1,c) and Duel.IsPlayerCanDraw(tp,1) and Duel.IsPlayerCanDraw(1-tp,1) then
Duel.BreakEffect()
Duel.Draw(tp,1,REASON_EFFECT)
Duel.Draw(1-tp,1,REASON_EFFECT)
end
end
function c53705002.dpcon(e,tp,eg,ep,ev,re,r,rp)
local c=e:GetHandler()
return c:IsPreviousLocation(LOCATION_HAND) and c:IsPreviousPosition(POS_FACEUP)
function cm.drtg(e,tp,eg,ep,ev,re,r,rp,chk)
if chk==0 then return not e:GetHandler():IsPublic() end
end
function c53705002.dpop(e,tp,eg,ep,ev,re,r,rp)
local ct=Duel.GetDrawCount(tp)
if ct>3 then return end
Duel.Hint(HINT_CARD,0,53705002)
function cm.drop(e,tp,eg,ep,ev,re,r,rp)
local c=e:GetHandler()
local e2_1=Effect.CreateEffect(c)
e2_1:SetProperty(EFFECT_FLAG_PLAYER_TARGET)
e2_1:SetType(EFFECT_TYPE_FIELD)
e2_1:SetCode(EFFECT_DRAW_COUNT)
e2_1:SetTargetRange(1,0)
e2_1:SetValue(ct+1)
e2_1:SetReset(RESET_PHASE+PHASE_DRAW+RESET_SELF_TURN)
Duel.RegisterEffect(e2_1,tp)
if not c:IsRelateToEffect(e) or c:IsPublic() then return end
if Duel.IsExistingMatchingCard(cm.pubfilter,tp,LOCATION_HAND,0,1,c) then
SNNM.SetPublic(c,3,RESET_EVENT+RESETS_STANDARD+RESET_PHASE+PHASE_END,2)
if Duel.IsPlayerCanDraw(tp,1) and Duel.IsPlayerCanDraw(1-tp,1) then
Duel.BreakEffect()
Duel.Draw(tp,1,REASON_EFFECT)
Duel.Draw(1-tp,1,REASON_EFFECT)
end
else SNNM.SetPublic(c,4,RESET_EVENT+RESETS_STANDARD+RESET_PHASE+PHASE_END,2) end
end
......@@ -42,7 +42,7 @@ function c53705004.condition1(e,tp,eg,ep,ev,re,r,rp)
return e:GetHandler():IsPublic()
end
function c53705004.filter(c)
return c:IsSetCard(0x534) and c:IsType(TYPE_MONSTER) and c:IsAbleToHand()
return c:IsSetCard(0x3534) and c:IsType(TYPE_MONSTER) and c:IsAbleToHand()
end
function c53705004.target(e,tp,eg,ep,ev,re,r,rp,chk)
if chk==0 then return Duel.IsExistingMatchingCard(c53705004.filter,tp,LOCATION_DECK,0,1,nil) end
......@@ -64,12 +64,6 @@ function c53705004.activate2(e,tp,eg,ep,ev,re,r,rp)
local g=Duel.SelectMatchingCard(tp,c53705004.filter,tp,LOCATION_DECK,0,1,1,nil)
if g:GetCount()>0 then
Duel.SendtoHand(g,nil,REASON_EFFECT)
local tc=g:GetFirst()
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,2)
tc:RegisterEffect(e1)
tc:RegisterFlagEffect(0,RESET_EVENT+RESETS_STANDARD+RESET_PHASE+PHASE_END,EFFECT_FLAG_CLIENT_HINT,2,0,aux.Stringid(53705004,0))
SNNM.SetPublic(g:GetFirst(),4,RESET_EVENT+RESETS_STANDARD+RESET_PHASE+PHASE_END,2)
end
end
......@@ -65,7 +65,7 @@ function cm.condition2(e,tp,eg,ep,ev,re,r,rp)
return not e:GetHandler():IsPublic()
end
function cm.filter(c)
return c:IsSetCard(0x534) and c:IsType(TYPE_SPELL+TYPE_TRAP) and c:IsAbleToHand() and not c:IsCode(m)
return c:IsSetCard(0x3534) and c:IsType(TYPE_SPELL+TYPE_TRAP) and c:IsAbleToHand() and not c:IsCode(m)
end
function cm.target2(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
......
--幻 海 袭 模 型
function c53705010.initial_effect(c)
--cannot special summon
local e1=Effect.CreateEffect(c)
e1:SetProperty(EFFECT_FLAG_CANNOT_DISABLE+EFFECT_FLAG_UNCOPYABLE)
e1:SetType(EFFECT_TYPE_SINGLE)
e1:SetCode(EFFECT_SPSUMMON_CONDITION)
e1:SetValue(aux.FALSE)
c:RegisterEffect(e1)
--
local e2=Effect.CreateEffect(c)
e2:SetType(EFFECT_TYPE_SINGLE+EFFECT_TYPE_CONTINUOUS)
e2:SetCode(EVENT_TO_DECK)
e2:SetCondition(c53705010.dpcon)
e2:SetOperation(c53705010.dpop)
c:RegisterEffect(e2)
--draw
local m=53705010
local cm=_G["c"..m]
cm.name="幻海袭 模型"
if not pcall(function() require("expansions/script/c53702500") end) then require("script/c53702500") end
function cm.initial_effect(c)
SNNM.SeadowRover(c)
local e3=Effect.CreateEffect(c)
e3:SetDescription(aux.Stringid(53705010,1))
e3:SetDescription(aux.Stringid(m,1))
e3:SetCategory(CATEGORY_TOGRAVE+CATEGORY_SEARCH+CATEGORY_TOHAND)
e3:SetType(EFFECT_TYPE_IGNITION)
e3:SetRange(LOCATION_HAND)
e3:SetTarget(c53705010.thtg)
e3:SetOperation(c53705010.thop)
e3:SetTarget(cm.thtg)
e3:SetOperation(cm.thop)
c:RegisterEffect(e3)
end
function c53705010.pubfilter(c)
return c:IsSetCard(0x534) and c:IsPublic()
function cm.pubfilter(c)
return c:IsSetCard(0x3534) and c:IsPublic()
end
function c53705010.rmfilter(c)
function cm.rmfilter(c)
return c:IsPublic() and c:IsAbleToGrave()
end
function c53705010.thfilter(c)
return c:IsSetCard(0x534) and c:IsLevel(6) and c:IsAbleToHand()
function cm.thfilter(c)
return c:IsSetCard(0x3534) and c:IsLevel(6) and c:IsAbleToHand()
end
function c53705010.thtg(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_TOHAND,nil,1,tp,LOCATION_DECK)
function cm.thtg(e,tp,eg,ep,ev,re,r,rp,chk)
if chk==0 then return not e:GetHandler():IsPublic() end
end
function c53705010.thop(e,tp,eg,ep,ev,re,r,rp)
function cm.thop(e,tp,eg,ep,ev,re,r,rp)
local c=e:GetHandler()
local e1=Effect.CreateEffect(c)
e1:SetType(EFFECT_TYPE_SINGLE)
e1:SetCode(EFFECT_PUBLIC)
e1:SetReset(RESET_EVENT+RESETS_STANDARD+RESET_PHASE+PHASE_END,2)
c:RegisterEffect(e1)
c:RegisterFlagEffect(0,RESET_EVENT+RESETS_STANDARD+RESET_PHASE+PHASE_END,EFFECT_FLAG_CLIENT_HINT,2,0,aux.Stringid(53705010,0))
if Duel.IsExistingMatchingCard(c53705010.thfilter,tp,LOCATION_DECK,0,1,nil) and Duel.IsExistingMatchingCard(c53705010.rmfilter,tp,LOCATION_HAND,0,1,c) and Duel.IsExistingMatchingCard(c53705010.pubfilter,tp,LOCATION_HAND,0,1,c) then
Duel.BreakEffect()
Duel.Hint(HINT_SELECTMSG,tp,HINTMSG_TOGRAVE)
local g=Duel.SelectMatchingCard(tp,c53705010.rmfilter,tp,LOCATION_HAND,0,1,1,c)
local ct=Duel.SendtoGrave(g,REASON_EFFECT)
if ct==0 then return end
Duel.Hint(HINT_SELECTMSG,tp,HINTMSG_ATOHAND)
local g2=Duel.SelectMatchingCard(tp,c53705010.thfilter,tp,LOCATION_DECK,0,1,1,nil)
if g2:GetCount()>0 then
Duel.SendtoHand(g2,nil,REASON_EFFECT)
Duel.ConfirmCards(1-tp,g2)
if not c:IsRelateToEffect(e) or c:IsPublic() then return end
if Duel.IsExistingMatchingCard(cm.pubfilter,tp,LOCATION_HAND,0,1,c) then
SNNM.SetPublic(c,3,RESET_EVENT+RESETS_STANDARD+RESET_PHASE+PHASE_END,2)
if Duel.IsExistingMatchingCard(cm.thfilter,tp,LOCATION_DECK,0,1,nil) and Duel.IsExistingMatchingCard(cm.rmfilter,tp,LOCATION_HAND,0,1,c) then
Duel.BreakEffect()
Duel.Hint(HINT_SELECTMSG,tp,HINTMSG_TOGRAVE)
local g=Duel.SelectMatchingCard(tp,cm.rmfilter,tp,LOCATION_HAND,0,1,1,c)
local ct=Duel.SendtoGrave(g,REASON_EFFECT)
if ct==0 then return end
Duel.Hint(HINT_SELECTMSG,tp,HINTMSG_ATOHAND)
local g2=Duel.SelectMatchingCard(tp,cm.thfilter,tp,LOCATION_DECK,0,1,1,nil)
if g2:GetCount()>0 then
Duel.SendtoHand(g2,nil,REASON_EFFECT)
Duel.ConfirmCards(1-tp,g2)
end
end
end
end
function c53705010.dpcon(e,tp,eg,ep,ev,re,r,rp)
local c=e:GetHandler()
return c:IsPreviousLocation(LOCATION_HAND) and c:IsPreviousPosition(POS_FACEUP)
end
function c53705010.dpop(e,tp,eg,ep,ev,re,r,rp)
local ct=Duel.GetDrawCount(tp)
if ct>3 then return end
Duel.Hint(HINT_CARD,0,53705010)
local c=e:GetHandler()
local e2_1=Effect.CreateEffect(c)
e2_1:SetProperty(EFFECT_FLAG_PLAYER_TARGET)
e2_1:SetType(EFFECT_TYPE_FIELD)
e2_1:SetCode(EFFECT_DRAW_COUNT)
e2_1:SetTargetRange(1,0)
e2_1:SetValue(ct+1)
e2_1:SetReset(RESET_PHASE+PHASE_DRAW+RESET_SELF_TURN)
Duel.RegisterEffect(e2_1,tp)
else SNNM.SetPublic(c,4,RESET_EVENT+RESETS_STANDARD+RESET_PHASE+PHASE_END,2) end
end
......@@ -50,7 +50,7 @@ function c53705012.target1(e,tp,eg,ep,ev,re,r,rp,chk)
end
function c53705012.activate1(e,tp,eg,ep,ev,re,r,rp)
local g=Duel.GetMatchingGroup(aux.TRUE,tp,LOCATION_MZONE,0,nil)
if Duel.Destroy(g,REASON_EFFECT)>0 and g:IsExists(Card.IsSetCard,1,nil,0x534) then
if Duel.Destroy(g,REASON_EFFECT)>0 and g:IsExists(Card.IsSetCard,1,nil,0x3534) then
if Duel.Draw(tp,2,REASON_EFFECT)==0 then return end
local rg=Duel.SelectMatchingCard(tp,Card.IsAbleToDeck,tp,LOCATION_HAND,0,1,1,nil)
if #rg>0 then
......@@ -63,7 +63,7 @@ function c53705012.condition2(e,tp,eg,ep,ev,re,r,rp)
return not e:GetHandler():IsPublic()
end
function c53705012.spfilter(c,e,tp)
return c:IsSetCard(0x534) and c:IsCanBeSpecialSummoned(e,0,tp,false,false)
return c:IsSetCard(0x3534) and c:IsCanBeSpecialSummoned(e,0,tp,false,false)
end
function c53705012.target2(e,tp,eg,ep,ev,re,r,rp,chk)
if chk==0 then return Duel.GetLocationCount(tp,LOCATION_MZONE)>0
......
--幻 海 袭 游 侠
function c53705013.initial_effect(c)
--cannot special summon
local e1=Effect.CreateEffect(c)
e1:SetProperty(EFFECT_FLAG_CANNOT_DISABLE+EFFECT_FLAG_UNCOPYABLE)
e1:SetType(EFFECT_TYPE_SINGLE)
e1:SetCode(EFFECT_SPSUMMON_CONDITION)
e1:SetValue(aux.FALSE)
c:RegisterEffect(e1)
--search
local m=53705013
local cm=_G["c"..m]
cm.name="幻海袭 游侠"
if not pcall(function() require("expansions/script/c53702500") end) then require("script/c53702500") end
function cm.initial_effect(c)
SNNM.SeadowRover(c)
local e3=Effect.CreateEffect(c)
e3:SetDescription(aux.Stringid(53705013,1))
e3:SetDescription(aux.Stringid(m,1))
e3:SetCategory(CATEGORY_TOHAND+CATEGORY_SEARCH)
e3:SetType(EFFECT_TYPE_IGNITION)
e3:SetRange(LOCATION_HAND)
e3:SetTarget(c53705013.thtg)
e3:SetOperation(c53705013.thop)
e3:SetTarget(cm.thtg)
e3:SetOperation(cm.thop)
c:RegisterEffect(e3)
end
function c53705013.pubfilter(c)
function cm.pubfilter(c)
return not c:IsPublic()
end
function c53705013.thfilter(c)
return c:IsSetCard(0x534) and c:IsType(TYPE_SPELL+TYPE_TRAP) and c:IsAbleToHand()
function cm.thfilter(c)
return c:IsSetCard(0x3534) and c:IsType(TYPE_SPELL+TYPE_TRAP) and c:IsAbleToHand()
end
function c53705013.tdfilter(c)
return c:IsPublic() and c:IsAbleToDeck()
function cm.gselect(g,e)
return g:IsExists(Card.IsSetCard,1,nil,0x3534) and not g:IsContains(e:GetHandler())
end
function c53705013.gselect(g,e)
return g:IsExists(Card.IsSetCard,1,nil,0x534) and not g:IsContains(e:GetHandler())
end
function c53705013.thtg(e,tp,eg,ep,ev,re,r,rp,chk)
function cm.thtg(e,tp,eg,ep,ev,re,r,rp,chk)
local c=e:GetHandler()
local g=Duel.GetMatchingGroup(c53705013.pubfilter,tp,LOCATION_HAND,0,nil)
if chk==0 then return Duel.IsExistingMatchingCard(c53705013.thfilter,tp,LOCATION_DECK,0,1,nil)
local g=Duel.GetMatchingGroup(cm.pubfilter,tp,LOCATION_HAND,0,nil)
if chk==0 then return Duel.IsExistingMatchingCard(cm.thfilter,tp,LOCATION_DECK,0,1,nil)
and not c:IsPublic()
and #g>1 and g:IsExists(Card.IsSetCard,1,c,0x534) end
and #g>1 and g:IsExists(Card.IsSetCard,1,c,0x3534) end
Duel.SetOperationInfo(0,CATEGORY_TOHAND,nil,1,tp,LOCATION_DECK)
Duel.Hint(HINT_SELECTMSG,tp,HINTMSG_CONFIRM)
local hg=g:SelectSubGroup(tp,c53705013.gselect,false,1,2,e)
local tc=hg:GetFirst()
local hg=g:SelectSubGroup(tp,cm.gselect,false,1,2,e)
Duel.ConfirmCards(1-tp,hg)
local e1=Effect.CreateEffect(c)
e1:SetType(EFFECT_TYPE_SINGLE)
e1:SetCode(EFFECT_PUBLIC)
e1:SetReset(RESET_EVENT+RESETS_STANDARD+RESET_PHASE+PHASE_END,2)
c:RegisterEffect(e1)
c:RegisterFlagEffect(0,RESET_EVENT+RESETS_STANDARD+RESET_PHASE+PHASE_END,EFFECT_FLAG_CLIENT_HINT,2,0,aux.Stringid(53705013,0))
while tc do
local e2=Effect.CreateEffect(c)
e2:SetType(EFFECT_TYPE_SINGLE)
e2:SetCode(EFFECT_PUBLIC)
e2:SetReset(RESET_EVENT+RESETS_STANDARD+RESET_PHASE+PHASE_END,2)
tc:RegisterEffect(e2)
tc:RegisterFlagEffect(0,RESET_EVENT+RESETS_STANDARD+RESET_PHASE+PHASE_END,EFFECT_FLAG_CLIENT_HINT,2,0,aux.Stringid(53705013,0))
tc=hg:GetNext()
end
SNNM.SetPublic(c,4,RESET_EVENT+RESETS_STANDARD+RESET_PHASE+PHASE_END,2)
for tc in aux.Next(hg) do SNNM.SetPublic(tc,4,RESET_EVENT+RESETS_STANDARD+RESET_PHASE+PHASE_END,2) end
end
function c53705013.thop(e,tp,eg,ep,ev,re,r,rp)
function cm.thop(e,tp,eg,ep,ev,re,r,rp)
Duel.Hint(HINT_SELECTMSG,tp,HINTMSG_ATOHAND)
local g1=Duel.SelectMatchingCard(tp,c53705013.thfilter,tp,LOCATION_DECK,0,1,1,nil)
local g2=Duel.GetMatchingGroup(c53705013.tdfilter,tp,LOCATION_HAND,0,nil)
if g1:GetCount()>0 and g2:GetCount()>0 and Duel.SendtoHand(g1,nil,REASON_EFFECT)>0 then
local g1=Duel.SelectMatchingCard(tp,cm.thfilter,tp,LOCATION_DECK,0,1,1,nil)
local g2=Duel.GetMatchingGroup(function(c)return c:IsPublic() and c:IsAbleToDeck()end,tp,LOCATION_HAND,0,nil)
if g1:GetCount()>0 and Duel.SendtoHand(g1,nil,REASON_EFFECT)>0 and g2:GetCount()>0 then
Duel.ConfirmCards(1-tp,g1)
Duel.ShuffleHand(tp)
Duel.BreakEffect()
......
--超 极 幻 海 袭 丰 之 黄 金
function c53705018.initial_effect(c)
local m=53705018
local cm=_G["c"..m]
cm.name="超幻海袭 古机"
if not pcall(function() require("expansions/script/c53702500") end) then require("script/c53702500") end
function cm.initial_effect(c)
c:EnableReviveLimit()
--xyz summon
local e0=Effect.CreateEffect(c)
e0:SetProperty(EFFECT_FLAG_UNCOPYABLE)
e0:SetType(EFFECT_TYPE_FIELD)
e0:SetCode(EFFECT_SPSUMMON_PROC)
e0:SetRange(LOCATION_EXTRA)
e0:SetCondition(c53705018.spcon)
e0:SetTarget(c53705018.target)
e0:SetOperation(c53705018.activate)
e0:SetCondition(cm.spcon)
e0:SetTarget(cm.target)
e0:SetOperation(cm.activate)
e0:SetValue(SUMMON_TYPE_XYZ)
c:RegisterEffect(e0)
--atkdef
local e1=Effect.CreateEffect(c)
e1:SetType(EFFECT_TYPE_SINGLE)
e1:SetProperty(EFFECT_FLAG_SINGLE_RANGE)
e1:SetRange(LOCATION_MZONE)
e1:SetCode(EFFECT_UPDATE_ATTACK)
e1:SetCondition(c53705018.effcon)
e1:SetValue(c53705018.value)
e1:SetCondition(cm.effcon)
e1:SetValue(cm.value)
e1:SetLabel(1)
c:RegisterEffect(e1)
local e8=e1:Clone()
e8:SetCode(EFFECT_UPDATE_DEFENSE)
c:RegisterEffect(e8)
--draw
local e2=Effect.CreateEffect(c)
e2:SetDescription(aux.Stringid(53705018,1))
e2:SetDescription(aux.Stringid(m,1))
e2:SetCategory(CATEGORY_TOGRAVE)
e2:SetType(EFFECT_TYPE_SINGLE+EFFECT_TYPE_TRIGGER_O)
e2:SetCode(EVENT_SPSUMMON_SUCCESS)
e2:SetCondition(c53705018.effcon)
e2:SetCondition(cm.effcon)
e2:SetLabel(2)
e2:SetTarget(c53705018.tgtg)
e2:SetOperation(c53705018.tgop)
e2:SetTarget(cm.tgtg)
e2:SetOperation(cm.tgop)
c:RegisterEffect(e2)
--immune
local e3=Effect.CreateEffect(c)
e3:SetDescription(aux.Stringid(53705018,2))
e3:SetDescription(aux.Stringid(m,2))
e3:SetType(EFFECT_TYPE_IGNITION)
e3:SetCategory(CATEGORY_DAMAGE)
e3:SetRange(LOCATION_MZONE)
e3:SetLabel(3)
e3:SetCondition(c53705018.effcon)
e3:SetCost(c53705018.pubcost)
e3:SetTarget(c53705018.pubtg)
e3:SetOperation(c53705018.pubop)
e3:SetCondition(cm.effcon)
e3:SetCost(cm.pubcost)
e3:SetTarget(cm.pubtg)
e3:SetOperation(cm.pubop)
c:RegisterEffect(e3)
--
local e4=Effect.CreateEffect(c)
e4:SetType(EFFECT_TYPE_SINGLE)
e4:SetProperty(EFFECT_FLAG_SINGLE_RANGE)
e4:SetRange(LOCATION_MZONE)
e4:SetCode(EFFECT_INDESTRUCTABLE_BATTLE)
e4:SetCondition(c53705018.indcon)
e4:SetCondition(cm.indcon)
e4:SetValue(1)
c:RegisterEffect(e4)
local e5=e4:Clone()
......@@ -66,12 +64,23 @@ function c53705018.initial_effect(c)
local e7=e4:Clone()
e7:SetCode(EFFECT_UNRELEASABLE_NONSUM)
c:RegisterEffect(e7)
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_DESTROYED)
ge1:SetOperation(cm.regop)
Duel.RegisterEffect(ge1,0)
end
end
function cm.regop(e,tp,eg,ep,ev,re,r,rp)
for tc in aux.Next(eg) do if rp~=e:GetHandler():GetControler() and tc:IsReason(REASON_DESTROY) then tc:RegisterFlagEffect(m,RESET_EVENT+RESETS_STANDARD,0,1) end end
end
function c53705018.xyzfilter(c)
function cm.xyzfilter(c)
return (c:IsFaceup() or not c:IsLocation(LOCATION_MZONE))
and ((c:IsSetCard(0x534) and c:IsType(TYPE_SYNCHRO) and c:GetFlagEffect(53705018)~=0) or not c:IsLocation(LOCATION_GRAVE))
and ((c:IsSetCard(0x3534) and c:IsType(TYPE_SYNCHRO) and c:GetFlagEffect(m)~=0) or not c:IsLocation(LOCATION_GRAVE))
end
function c53705018.spcon(e,c,og,min,max)
function cm.spcon(e,c,og,min,max)
if c==nil then return true end
local tp=c:GetControler()
local zone=Duel.GetFieldGroup(tp,LOCATION_MZONE+LOCATION_GRAVE,0)
......@@ -82,9 +91,9 @@ function c53705018.spcon(e,c,og,min,max)
if max<maxc then maxc=max end
if minc>maxc then return false end
end
return Duel.CheckXyzMaterial(c,c53705018.xyzfilter,9,minc,maxc,zone)
return Duel.CheckXyzMaterial(c,cm.xyzfilter,9,minc,maxc,zone)
end
function c53705018.target(e,tp,eg,ep,ev,re,r,rp,chk,c,og,min,max)
function cm.target(e,tp,eg,ep,ev,re,r,rp,chk,c,og,min,max)
if og and not min then
return true
end
......@@ -95,14 +104,14 @@ function c53705018.target(e,tp,eg,ep,ev,re,r,rp,chk,c,og,min,max)
if min>minc then minc=min end
if max<maxc then maxc=max end
end
local g=Duel.SelectXyzMaterial(tp,c,c53705018.xyzfilter,9,minc,maxc,zone)
local g=Duel.SelectXyzMaterial(tp,c,cm.xyzfilter,9,minc,maxc,zone)
if g then
g:KeepAlive()
e:SetLabelObject(g)
return true
else return false end
end
function c53705018.activate(e,tp,eg,ep,ev,re,r,rp,c,og,min,max)
function cm.activate(e,tp,eg,ep,ev,re,r,rp,c,og,min,max)
if og and not min then
local sg=Group.CreateGroup()
local tc=og:GetFirst()
......@@ -129,20 +138,20 @@ function c53705018.activate(e,tp,eg,ep,ev,re,r,rp,c,og,min,max)
mg:DeleteGroup()
end
end
function c53705018.effcon(e,tp,eg,ep,ev,re,r,rp)
function cm.effcon(e,tp,eg,ep,ev,re,r,rp)
local og=e:GetHandler():GetOverlayGroup()
local ng=og:Filter(Card.IsSetCard,nil,0x534)
local ng=og:Filter(Card.IsSetCard,nil,0x3534)
return ng:GetCount()>=e:GetLabel()
end
function c53705018.value(e,c)
function cm.value(e,c)
return Duel.GetMatchingGroupCount(Card.IsPublic,0,LOCATION_HAND,LOCATION_HAND,nil)*300
end
function c53705018.tgtg(e,tp,eg,ep,ev,re,r,rp,chk)
function cm.tgtg(e,tp,eg,ep,ev,re,r,rp,chk)
local g=e:GetHandler():GetOverlayGroup():Filter(Card.IsType,nil,TYPE_SYNCHRO)
if chk==0 then return #g>0 and Duel.GetFieldGroupCount(tp,0,LOCATION_ONFIELD)>0 end
Duel.SetOperationInfo(0,CATEGORY_TOGRAVE,g,g:GetCount(),0,0)
end
function c53705018.tgop(e,tp,eg,ep,ev,re,r,rp)
function cm.tgop(e,tp,eg,ep,ev,re,r,rp)
local dg=Duel.GetMatchingGroup(aux.TRUE,tp,0,LOCATION_ONFIELD,nil)
local g=e:GetHandler():GetOverlayGroup():Filter(Card.IsType,nil,TYPE_SYNCHRO)
if #g>0 and #dg>0 then
......@@ -152,34 +161,25 @@ function c53705018.tgop(e,tp,eg,ep,ev,re,r,rp)
Duel.SendtoGrave(sdg,REASON_EFFECT)
end
end
function c53705018.pubcost(e,tp,eg,ep,ev,re,r,rp,chk)
function cm.pubcost(e,tp,eg,ep,ev,re,r,rp,chk)
if chk==0 then return e:GetHandler():CheckRemoveOverlayCard(tp,2,REASON_COST) end
e:GetHandler():RemoveOverlayCard(tp,2,2,REASON_COST)
end
function c53705018.pubfilter(c)
function cm.pubfilter(c)
return not c:IsPublic()
end
function c53705018.pubtg(e,tp,eg,ep,ev,re,r,rp,chk)
function cm.pubtg(e,tp,eg,ep,ev,re,r,rp,chk)
local ct=Duel.GetFieldGroupCount(tp,LOCATION_HAND,LOCATION_HAND)
if chk==0 then return Duel.IsExistingMatchingCard(c53705018.pubfilter,tp,LOCATION_HAND,LOCATION_HAND,1,nil) end
if chk==0 then return Duel.IsExistingMatchingCard(cm.pubfilter,tp,LOCATION_HAND,LOCATION_HAND,1,nil) end
Duel.SetOperationInfo(0,CATEGORY_DAMAGE,nil,0,1-tp,ct*400)
end
function c53705018.pubop(e,tp,eg,ep,ev,re,r,rp)
local g=Duel.GetMatchingGroup(c53705018.pubfilter,tp,LOCATION_HAND,LOCATION_HAND,nil)
function cm.pubop(e,tp,eg,ep,ev,re,r,rp)
local g=Duel.GetMatchingGroup(cm.pubfilter,tp,LOCATION_HAND,LOCATION_HAND,nil)
if #g==0 then return end
local tc=g:GetFirst()
while tc do
local e2=Effect.CreateEffect(e:GetHandler())
e2:SetType(EFFECT_TYPE_SINGLE)
e2:SetCode(EFFECT_PUBLIC)
e2:SetReset(RESET_EVENT+RESETS_STANDARD)
tc:RegisterEffect(e2)
tc:RegisterFlagEffect(0,RESET_EVENT+RESETS_STANDARD,EFFECT_FLAG_CLIENT_HINT,0,0,aux.Stringid(53705018,0))
tc=g:GetNext()
end
for tc in aux.Next(g) do SNNM.SetPublic(tc,4,RESET_EVENT+RESETS_STANDARD,1) end
local ct=Duel.GetFieldGroupCount(tp,LOCATION_HAND,LOCATION_HAND)
if ct>0 then Duel.Damage(1-tp,ct*400,REASON_EFFECT) end
end
function c53705018.indcon(e)
function cm.indcon(e)
return e:GetHandler():GetOverlayGroup():IsExists(Card.IsType,1,nil,TYPE_SYNCHRO)
end
--幻 海 袭 幽 魂
function c53705020.initial_effect(c)
--cannot special summon
local e1=Effect.CreateEffect(c)
e1:SetProperty(EFFECT_FLAG_CANNOT_DISABLE+EFFECT_FLAG_UNCOPYABLE)
e1:SetType(EFFECT_TYPE_SINGLE)
e1:SetCode(EFFECT_SPSUMMON_CONDITION)
e1:SetValue(aux.FALSE)
c:RegisterEffect(e1)
--tohand
local m=53705020
local cm=_G["c"..m]
cm.name="幻海袭 幽魂"
if not pcall(function() require("expansions/script/c53702500") end) then require("script/c53702500") end
function cm.initial_effect(c)
SNNM.SeadowRover(c)
local e3=Effect.CreateEffect(c)
e3:SetDescription(aux.Stringid(53705020,1))
e3:SetDescription(aux.Stringid(m,1))
e3:SetCategory(CATEGORY_TOHAND)
e3:SetType(EFFECT_TYPE_IGNITION)
e3:SetRange(LOCATION_HAND)
e3:SetTarget(c53705020.thtg)
e3:SetOperation(c53705020.thop)
e3:SetTarget(cm.thtg)
e3:SetOperation(cm.thop)
c:RegisterEffect(e3)
end
function c53705020.pubfilter(c)
function cm.pubfilter(c)
return not c:IsPublic()
end
function c53705020.thfilter(c,tp)
function cm.thfilter(c,tp)
return c:IsAbleToHand() and (c:IsControler(1-tp) and c:IsOnField() and c:IsType(TYPE_SPELL+TYPE_TRAP)
or c:IsLocation(LOCATION_GRAVE) and c:IsSetCard(0x534))
or c:IsLocation(LOCATION_GRAVE) and c:IsSetCard(0x3534))
end
function c53705020.tdfilter(c)
return c:IsPublic() and c:IsAbleToDeck()
function cm.gselect(g,e)
return g:IsExists(Card.IsSetCard,1,nil,0x3534) and not g:IsContains(e:GetHandler())
end
function c53705020.gselect(g,e)
return g:IsExists(Card.IsSetCard,1,nil,0x534) and not g:IsContains(e:GetHandler())
end
function c53705020.thtg(e,tp,eg,ep,ev,re,r,rp,chk)
function cm.thtg(e,tp,eg,ep,ev,re,r,rp,chk)
local c=e:GetHandler()
local g=Duel.GetMatchingGroup(c53705020.pubfilter,tp,LOCATION_HAND,0,nil)
if chk==0 then return Duel.IsExistingMatchingCard(c53705020.thfilter,tp,LOCATION_GRAVE,LOCATION_ONFIELD,1,nil,tp)
local g=Duel.GetMatchingGroup(cm.pubfilter,tp,LOCATION_HAND,0,nil)
if chk==0 then return Duel.IsExistingMatchingCard(cm.thfilter,tp,LOCATION_GRAVE,LOCATION_ONFIELD,1,nil,tp)
and not c:IsPublic()
and #g>1 and g:IsExists(Card.IsSetCard,1,c,0x534) end
and #g>1 and g:IsExists(Card.IsSetCard,1,c,0x3534) end
Duel.SetOperationInfo(0,CATEGORY_TOHAND,nil,1,0,0)
Duel.Hint(HINT_SELECTMSG,tp,HINTMSG_CONFIRM)
local hg=g:SelectSubGroup(tp,c53705020.gselect,false,1,2,e)
local tc=hg:GetFirst()
local hg=g:SelectSubGroup(tp,cm.gselect,false,1,2,e)
Duel.ConfirmCards(1-tp,hg)
local e1=Effect.CreateEffect(c)
e1:SetType(EFFECT_TYPE_SINGLE)
e1:SetCode(EFFECT_PUBLIC)
e1:SetReset(RESET_EVENT+RESETS_STANDARD+RESET_PHASE+PHASE_END,2)
c:RegisterEffect(e1)
c:RegisterFlagEffect(0,RESET_EVENT+RESETS_STANDARD+RESET_PHASE+PHASE_END,EFFECT_FLAG_CLIENT_HINT,2,0,aux.Stringid(53705020,0))
while tc do
local e2=Effect.CreateEffect(c)
e2:SetType(EFFECT_TYPE_SINGLE)
e2:SetCode(EFFECT_PUBLIC)
e2:SetReset(RESET_EVENT+RESETS_STANDARD+RESET_PHASE+PHASE_END,2)
tc:RegisterEffect(e2)
tc:RegisterFlagEffect(0,RESET_EVENT+RESETS_STANDARD+RESET_PHASE+PHASE_END,EFFECT_FLAG_CLIENT_HINT,2,0,aux.Stringid(53705020,0))
tc=hg:GetNext()
end
SNNM.SetPublic(c,4,RESET_EVENT+RESETS_STANDARD+RESET_PHASE+PHASE_END,2)
for tc in aux.Next(hg) do SNNM.SetPublic(tc,4,RESET_EVENT+RESETS_STANDARD+RESET_PHASE+PHASE_END,2) end
end
function c53705020.thop(e,tp,eg,ep,ev,re,r,rp)
function cm.thop(e,tp,eg,ep,ev,re,r,rp)
local c=e:GetHandler()
Duel.Hint(HINT_SELECTMSG,tp,HINTMSG_RTOHAND)
local g1=Duel.SelectMatchingCard(tp,c53705020.thfilter,tp,LOCATION_GRAVE,LOCATION_ONFIELD,1,1,nil,tp)
local g2=Duel.GetMatchingGroup(c53705020.tdfilter,tp,LOCATION_HAND,0,nil)
if g1:GetCount()>0 and g2:GetCount()>0 and Duel.SendtoHand(g1,nil,REASON_EFFECT)>0 then
local g1=Duel.SelectMatchingCard(tp,cm.thfilter,tp,LOCATION_GRAVE,LOCATION_ONFIELD,1,1,nil,tp)
local g2=Duel.GetMatchingGroup(function(c)return c:IsPublic() and c:IsAbleToDeck()end,tp,LOCATION_HAND,0,nil)
if g1:GetCount()>0 and Duel.SendtoHand(g1,nil,REASON_EFFECT)>0 and g2:GetCount()>0 then
Duel.BreakEffect()
local sg=g2:Select(tp,1,1,nil)
Duel.SendtoDeck(sg,nil,2,REASON_EFFECT)
......
......@@ -34,7 +34,7 @@ function cm.initial_effect(c)
c:RegisterEffect(e4)
end
function cm.cfilter1(c)
return c:IsSetCard(0x534) and c:IsType(TYPE_MONSTER) and c:IsPublic() and c:IsAbleToDeckAsCost()
return c:IsSetCard(0x3534) and c:IsType(TYPE_MONSTER) and c:IsPublic() and c:IsAbleToDeckAsCost()
end
function cm.spcon(e,c)
if c==nil then return true end
......@@ -65,7 +65,7 @@ function cm.cfcon(e)
return Duel.GetTurnPlayer()~=e:GetLabel()
end
function cm.drfilter(c)
return c:IsFaceup() and c:IsSetCard(0x534)
return c:IsFaceup() and c:IsSetCard(0x3534)
end
function cm.cfop(e)
local tp,c=e:GetLabel(),e:GetHandler()
......@@ -76,12 +76,7 @@ function cm.cfop(e)
local fid=c:GetFieldID()
for tc in aux.Next(g) do
tc:RegisterFlagEffect(m,RESET_EVENT+RESETS_STANDARD,0,1,fid)
local e1=Effect.CreateEffect(c)
e1:SetType(EFFECT_TYPE_SINGLE)
e1:SetCode(EFFECT_PUBLIC)
e1:SetReset(RESET_EVENT+RESETS_STANDARD)
tc:RegisterEffect(e1)
tc:RegisterFlagEffect(0,RESET_EVENT+RESETS_STANDARD,EFFECT_FLAG_CLIENT_HINT,0,0,aux.Stringid(m,3))
SNNM.SetPublic(tc,4,RESET_EVENT+RESETS_STANDARD,1)
end
local e2=Effect.CreateEffect(c)
e2:SetType(EFFECT_TYPE_FIELD+EFFECT_TYPE_CONTINUOUS)
......
local m=53711001
local cm=_G["c"..m]
cm.name="魔理沙役 RK"
if not pcall(function() require("expansions/script/c53702500") end) then require("script/c53702500") end
function cm.initial_effect(c)
local e1=Effect.CreateEffect(c)
e1:SetDescription(aux.Stringid(m,0))
e1:SetCategory(CATEGORY_SPECIAL_SUMMON)
e1:SetType(EFFECT_TYPE_IGNITION)
e1:SetRange(LOCATION_HAND)
e1:SetCost(cm.spcost)
e1:SetTarget(cm.sptg)
e1:SetOperation(cm.spop)
c:RegisterEffect(e1)
SNNM.MRSYakuSP(c,1,TYPE_SPELL)
local e2=Effect.CreateEffect(c)
e2:SetDescription(aux.Stringid(m,1))
e2:SetCategory(CATEGORY_DESTROY)
......@@ -41,109 +34,6 @@ function cm.initial_effect(c)
e4:SetTarget(cm.tg)
e4:SetOperation(cm.op)
c:RegisterEffect(e4)
local e5=Effect.CreateEffect(c)
e5:SetDescription(aux.Stringid(m,0))
e5:SetCategory(CATEGORY_SPECIAL_SUMMON)
e5:SetType(EFFECT_TYPE_SINGLE+EFFECT_TYPE_TRIGGER_F)
e5:SetCode(EVENT_CUSTOM+53711005)
e5:SetRange(LOCATION_HAND)
e5:SetCost(cm.spcost)
e5:SetTarget(cm.sptg)
e5:SetOperation(cm.spop)
c:RegisterEffect(e5)
end
function cm.spfilter1(c,e,tp)
if c:IsLocation(LOCATION_HAND) then
return c:IsType(TYPE_SPELL) and c:IsDiscardable()
else
return e:GetHandler():IsSetCard(0x538) and e:GetHandler():IsLevel(4) and c:IsAbleToRemove() and c:IsHasEffect(53711009,tp)
end
end
function cm.spfilter2(c,e,tp)
return c:IsSetCard(0x538) and c:IsType(TYPE_SPELL)
end
function cm.timefilter(c,tp)
return c:IsHasEffect(53711065,tp) and c:GetFlagEffect(53711015)<2
end
function cm.fselect(g,ct)
local g2=g:Filter(Card.IsLocation,nil,LOCATION_DECK)
return aux.dncheck(g2) and #g2<=ct
end
function cm.spcost(e,tp,eg,ep,ev,re,r,rp,chk)
local c=e:GetHandler()
local ltime=0
local timeg=Duel.GetMatchingGroup(cm.timefilter,tp,LOCATION_MZONE,0,c,tp)
if #timeg>0 then
local ttct=0
for timec in aux.Next(timeg) do
local timect=timec:GetFlagEffect(53711015)
ttct=ttct+timect
end
ltime=2*#timeg-ttct
end
local g=Duel.GetMatchingGroup(cm.spfilter1,tp,LOCATION_HAND+LOCATION_GRAVE,0,c,e,tp)
local gdg=Duel.GetMatchingGroup(cm.spfilter2,tp,LOCATION_DECK,0,c,e,tp)
local ct=gdg:GetClassCount(Card.GetCode)
if ct>ltime then ct=ltime end
if chk==0 then return #g+ct>0 end
g:Merge(gdg)
if ltime>0 then
Duel.Hint(HINT_SELECTMSG,tp,aux.Stringid(m,3))
local sg=g:SelectSubGroup(tp,cm.fselect,false,1,1,ct)
local dg=sg:Filter(Card.IsLocation,nil,LOCATION_DECK)
if #dg>0 then
if #timeg>1 then
for i=1,#dg do
Duel.Hint(HINT_SELECTMSG,tp,aux.Stringid(m,5))
local usedg=timeg:FilterSelect(tp,cm.timefilter,1,1,nil)
Duel.HintSelection(usedg)
local usedc=usedg:GetFirst()
local trg=usedc:GetFlagEffect(53711015)
usedc:RegisterFlagEffect(53711015,RESET_EVENT+RESETS_STANDARD+RESET_PHASE+PHASE_END,EFFECT_FLAG_CLIENT_HINT,1,0,aux.Stringid(53711015,trg+3))
end
else
for i=1,#dg do
local trg=timeg:GetFirst():GetFlagEffect(53711015)
timeg:GetFirst():RegisterFlagEffect(53711015,RESET_EVENT+RESETS_STANDARD+RESET_PHASE+PHASE_END,EFFECT_FLAG_CLIENT_HINT,1,0,aux.Stringid(53711015,trg+3))
end
end
end
local tc=sg:GetFirst()
while tc do
local te=tc:IsHasEffect(53711009,tp)
if te then
Duel.Remove(tc,POS_FACEUP,REASON_EFFECT+REASON_REPLACE)
else
Duel.SendtoGrave(tc,REASON_COST+REASON_DISCARD)
end
tc=sg:GetNext()
end
else
Duel.Hint(HINT_SELECTMSG,tp,HINTMSG_DISCARD)
local sg=Duel.SelectMatchingCard(tp,cm.spfilter,tp,LOCATION_HAND+LOCATION_GRAVE,0,1,1,c,e,tp)
local tc=sg:GetFirst()
while tc do
local te=tc:IsHasEffect(53711009,tp)
if te then
Duel.Remove(tc,POS_FACEUP,REASON_EFFECT+REASON_REPLACE)
else
Duel.SendtoGrave(tc,REASON_COST+REASON_DISCARD)
end
tc=sg:GetNext()
end
end
end
function cm.sptg(e,tp,eg,ep,ev,re,r,rp,chk)
local c=e:GetHandler()
if chk==0 then return Duel.GetLocationCount(tp,LOCATION_MZONE)>0
and c:IsCanBeSpecialSummoned(e,0,tp,false,false) end
Duel.SetOperationInfo(0,CATEGORY_SPECIAL_SUMMON,c,1,0,0)
end
function cm.spop(e,tp,eg,ep,ev,re,r,rp)
local c=e:GetHandler()
if c:IsRelateToEffect(e) then
Duel.SpecialSummon(c,SUMMON_VALUE_SELF,tp,tp,false,false,POS_FACEUP)
end
end
function cm.scon(e,tp,eg,ep,ev,re,r,rp)
return e:GetHandler():GetSummonType()==SUMMON_TYPE_SPECIAL+SUMMON_VALUE_SELF
......
local m=53711002
local cm=_G["c"..m]
cm.name="魔理沙役 KHK"
if not pcall(function() require("expansions/script/c53702500") end) then require("script/c53702500") end
function cm.initial_effect(c)
local e1=Effect.CreateEffect(c)
e1:SetDescription(aux.Stringid(m,0))
e1:SetCategory(CATEGORY_SPECIAL_SUMMON)
e1:SetType(EFFECT_TYPE_IGNITION)
e1:SetRange(LOCATION_HAND)
e1:SetCost(cm.spcost)
e1:SetTarget(cm.sptg)
e1:SetOperation(cm.spop)
c:RegisterEffect(e1)
SNNM.MRSYakuSP(c,2,TYPE_SPELL)
local e2=Effect.CreateEffect(c)
e2:SetDescription(aux.Stringid(m,1))
e2:SetCategory(CATEGORY_TODECK)
......@@ -33,109 +26,6 @@ function cm.initial_effect(c)
e3:SetTarget(cm.tg)
e3:SetOperation(cm.op)
c:RegisterEffect(e3)
local e5=Effect.CreateEffect(c)
e5:SetDescription(aux.Stringid(m,0))
e5:SetCategory(CATEGORY_SPECIAL_SUMMON)
e5:SetType(EFFECT_TYPE_SINGLE+EFFECT_TYPE_TRIGGER_F)
e5:SetCode(EVENT_CUSTOM+53711005)
e5:SetRange(LOCATION_HAND)
e5:SetCost(cm.spcost)
e5:SetTarget(cm.sptg)
e5:SetOperation(cm.spop)
c:RegisterEffect(e5)
end
function cm.spfilter1(c,e,tp)
if c:IsLocation(LOCATION_HAND) then
return c:IsType(TYPE_SPELL) and c:IsDiscardable()
else
return e:GetHandler():IsSetCard(0x538) and e:GetHandler():IsLevel(4) and c:IsAbleToRemove() and c:IsHasEffect(53711009,tp)
end
end
function cm.spfilter2(c,e,tp)
return c:IsSetCard(0x538) and c:IsType(TYPE_SPELL)
end
function cm.timefilter(c,tp)
return c:IsHasEffect(53711065,tp) and c:GetFlagEffect(53711015)<2
end
function cm.fselect(g,ct)
local g2=g:Filter(Card.IsLocation,nil,LOCATION_DECK)
return aux.dncheck(g2) and #g2<=ct
end
function cm.spcost(e,tp,eg,ep,ev,re,r,rp,chk)
local c=e:GetHandler()
local ltime=0
local timeg=Duel.GetMatchingGroup(cm.timefilter,tp,LOCATION_MZONE,0,c,tp)
if #timeg>0 then
local ttct=0
for timec in aux.Next(timeg) do
local timect=timec:GetFlagEffect(53711015)
ttct=ttct+timect
end
ltime=2*#timeg-ttct
end
local g=Duel.GetMatchingGroup(cm.spfilter1,tp,LOCATION_HAND+LOCATION_GRAVE,0,c,e,tp)
local gdg=Duel.GetMatchingGroup(cm.spfilter2,tp,LOCATION_DECK,0,c,e,tp)
local ct=gdg:GetClassCount(Card.GetCode)
if ct>ltime then ct=ltime end
if chk==0 then return #g+ct>1 end
g:Merge(gdg)
if ltime>0 then
Duel.Hint(HINT_SELECTMSG,tp,aux.Stringid(m,3))
local sg=g:SelectSubGroup(tp,cm.fselect,false,2,2,ct)
local dg=sg:Filter(Card.IsLocation,nil,LOCATION_DECK)
if #dg>0 then
if #timeg>1 then
for i=1,#dg do
Duel.Hint(HINT_SELECTMSG,tp,aux.Stringid(m,5))
local usedg=timeg:FilterSelect(tp,cm.timefilter,1,1,nil)
Duel.HintSelection(usedg)
local usedc=usedg:GetFirst()
local trg=usedc:GetFlagEffect(53711015)
usedc:RegisterFlagEffect(53711015,RESET_EVENT+RESETS_STANDARD+RESET_DISABLE+RESET_PHASE+PHASE_END,EFFECT_FLAG_CLIENT_HINT,1,0,aux.Stringid(53711015,trg+3))
end
else
for i=1,#dg do
local trg=timeg:GetFirst():GetFlagEffect(53711015)
timeg:GetFirst():RegisterFlagEffect(53711015,RESET_EVENT+RESETS_STANDARD+RESET_DISABLE+RESET_PHASE+PHASE_END,EFFECT_FLAG_CLIENT_HINT,1,0,aux.Stringid(53711015,trg+3))
end
end
end
local tc=sg:GetFirst()
while tc do
local te=tc:IsHasEffect(53711009,tp)
if te then
Duel.Remove(tc,POS_FACEUP,REASON_EFFECT+REASON_REPLACE)
else
Duel.SendtoGrave(tc,REASON_COST+REASON_DISCARD)
end
tc=sg:GetNext()
end
else
Duel.Hint(HINT_SELECTMSG,tp,HINTMSG_DISCARD)
local sg=Duel.SelectMatchingCard(tp,cm.spfilter,tp,LOCATION_HAND+LOCATION_GRAVE,0,2,2,c,e,tp)
local tc=sg:GetFirst()
while tc do
local te=tc:IsHasEffect(53711009,tp)
if te then
Duel.Remove(tc,POS_FACEUP,REASON_EFFECT+REASON_REPLACE)
else
Duel.SendtoGrave(tc,REASON_COST+REASON_DISCARD)
end
tc=sg:GetNext()
end
end
end
function cm.sptg(e,tp,eg,ep,ev,re,r,rp,chk)
local c=e:GetHandler()
if chk==0 then return Duel.GetLocationCount(tp,LOCATION_MZONE)>0
and c:IsCanBeSpecialSummoned(e,0,tp,false,false) end
Duel.SetOperationInfo(0,CATEGORY_SPECIAL_SUMMON,c,1,0,0)
end
function cm.spop(e,tp,eg,ep,ev,re,r,rp)
local c=e:GetHandler()
if c:IsRelateToEffect(e) then
Duel.SpecialSummon(c,SUMMON_VALUE_SELF,tp,tp,false,false,POS_FACEUP)
end
end
function cm.scon(e,tp,eg,ep,ev,re,r,rp)
return e:GetHandler():GetSummonType()==SUMMON_TYPE_SPECIAL+SUMMON_VALUE_SELF
......
local m=53711003
local cm=_G["c"..m]
cm.name="魔理沙役 AKN"
if not pcall(function() require("expansions/script/c53702500") end) then require("script/c53702500") end
function cm.initial_effect(c)
local e1=Effect.CreateEffect(c)
e1:SetDescription(aux.Stringid(m,0))
e1:SetCategory(CATEGORY_SPECIAL_SUMMON)
e1:SetType(EFFECT_TYPE_IGNITION)
e1:SetRange(LOCATION_HAND)
e1:SetCost(cm.spcost)
e1:SetTarget(cm.sptg)
e1:SetOperation(cm.spop)
c:RegisterEffect(e1)
SNNM.MRSYakuSP(c,3,TYPE_SPELL+TYPE_TRAP)
local e2=Effect.CreateEffect(c)
e2:SetDescription(aux.Stringid(m,1))
e2:SetCategory(CATEGORY_TOHAND)
......@@ -31,109 +24,6 @@ function cm.initial_effect(c)
e3:SetTarget(cm.tg)
e3:SetOperation(cm.op)
c:RegisterEffect(e3)
local e5=Effect.CreateEffect(c)
e5:SetDescription(aux.Stringid(m,0))
e5:SetCategory(CATEGORY_SPECIAL_SUMMON)
e5:SetType(EFFECT_TYPE_SINGLE+EFFECT_TYPE_TRIGGER_F)
e5:SetCode(EVENT_CUSTOM+53711005)
e5:SetRange(LOCATION_HAND)
e5:SetCost(cm.spcost)
e5:SetTarget(cm.sptg)
e5:SetOperation(cm.spop)
c:RegisterEffect(e5)
end
function cm.spfilter1(c,e,tp)
if c:IsLocation(LOCATION_HAND) then
return c:IsType(TYPE_SPELL+TYPE_TRAP) and c:IsDiscardable()
else
return e:GetHandler():IsSetCard(0x538) and e:GetHandler():IsLevel(4) and c:IsAbleToRemove() and c:IsHasEffect(53711009,tp)
end
end
function cm.spfilter2(c,e,tp)
return c:IsSetCard(0x538) and c:IsType(TYPE_SPELL)
end
function cm.timefilter(c,tp)
return c:IsHasEffect(53711065,tp) and c:GetFlagEffect(53711015)<2
end
function cm.fselect(g,ct)
local g2=g:Filter(Card.IsLocation,nil,LOCATION_DECK)
return aux.dncheck(g2) and #g2<=ct
end
function cm.spcost(e,tp,eg,ep,ev,re,r,rp,chk)
local c=e:GetHandler()
local ltime=0
local timeg=Duel.GetMatchingGroup(cm.timefilter,tp,LOCATION_MZONE,0,c,tp)
if #timeg>0 then
local ttct=0
for timec in aux.Next(timeg) do
local timect=timec:GetFlagEffect(53711015)
ttct=ttct+timect
end
ltime=2*#timeg-ttct
end
local g=Duel.GetMatchingGroup(cm.spfilter1,tp,LOCATION_HAND+LOCATION_GRAVE,0,c,e,tp)
local gdg=Duel.GetMatchingGroup(cm.spfilter2,tp,LOCATION_DECK,0,c,e,tp)
local ct=gdg:GetClassCount(Card.GetCode)
if ct>ltime then ct=ltime end
if chk==0 then return #g+ct>2 end
g:Merge(gdg)
if ltime>0 then
Duel.Hint(HINT_SELECTMSG,tp,aux.Stringid(m,3))
local sg=g:SelectSubGroup(tp,cm.fselect,false,3,3,ct)
local dg=sg:Filter(Card.IsLocation,nil,LOCATION_DECK)
if #dg>0 then
if #timeg>1 then
for i=1,#dg do
Duel.Hint(HINT_SELECTMSG,tp,aux.Stringid(m,5))
local usedg=timeg:FilterSelect(tp,cm.timefilter,1,1,nil)
Duel.HintSelection(usedg)
local usedc=usedg:GetFirst()
local trg=usedc:GetFlagEffect(53711015)
usedc:RegisterFlagEffect(53711015,RESET_EVENT+RESETS_STANDARD+RESET_PHASE+PHASE_END,EFFECT_FLAG_CLIENT_HINT,1,0,aux.Stringid(53711015,trg+3))
end
else
for i=1,#dg do
local trg=timeg:GetFirst():GetFlagEffect(53711015)
timeg:GetFirst():RegisterFlagEffect(53711015,RESET_EVENT+RESETS_STANDARD+RESET_PHASE+PHASE_END,EFFECT_FLAG_CLIENT_HINT,1,0,aux.Stringid(53711015,trg+3))
end
end
end
local tc=sg:GetFirst()
while tc do
local te=tc:IsHasEffect(53711009,tp)
if te then
Duel.Remove(tc,POS_FACEUP,REASON_EFFECT+REASON_REPLACE)
else
Duel.SendtoGrave(tc,REASON_COST+REASON_DISCARD)
end
tc=sg:GetNext()
end
else
Duel.Hint(HINT_SELECTMSG,tp,HINTMSG_DISCARD)
local sg=Duel.SelectMatchingCard(tp,cm.spfilter,tp,LOCATION_HAND+LOCATION_GRAVE,0,3,3,c,e,tp)
local tc=sg:GetFirst()
while tc do
local te=tc:IsHasEffect(53711009,tp)
if te then
Duel.Remove(tc,POS_FACEUP,REASON_EFFECT+REASON_REPLACE)
else
Duel.SendtoGrave(tc,REASON_COST+REASON_DISCARD)
end
tc=sg:GetNext()
end
end
end
function cm.sptg(e,tp,eg,ep,ev,re,r,rp,chk)
local c=e:GetHandler()
if chk==0 then return Duel.GetLocationCount(tp,LOCATION_MZONE)>0
and c:IsCanBeSpecialSummoned(e,0,tp,false,false) end
Duel.SetOperationInfo(0,CATEGORY_SPECIAL_SUMMON,c,1,0,0)
end
function cm.spop(e,tp,eg,ep,ev,re,r,rp)
local c=e:GetHandler()
if c:IsRelateToEffect(e) then
Duel.SpecialSummon(c,SUMMON_VALUE_SELF,tp,tp,false,false,POS_FACEUP)
end
end
function cm.scon(e,tp,eg,ep,ev,re,r,rp)
return e:GetHandler():GetSummonType()==SUMMON_TYPE_SPECIAL+SUMMON_VALUE_SELF
......
local m=53711004
local cm=_G["c"..m]
cm.name="魔理沙役 YUH"
if not pcall(function() require("expansions/script/c53702500") end) then require("script/c53702500") end
function cm.initial_effect(c)
local e1=Effect.CreateEffect(c)
e1:SetDescription(aux.Stringid(m,0))
e1:SetCategory(CATEGORY_SPECIAL_SUMMON)
e1:SetType(EFFECT_TYPE_IGNITION)
e1:SetRange(LOCATION_HAND)
e1:SetCost(cm.spcost)
e1:SetTarget(cm.sptg)
e1:SetOperation(cm.spop)
c:RegisterEffect(e1)
SNNM.MRSYakuSP(c,4,TYPE_MONSTER+TYPE_SPELL+TYPE_TRAP)
local e2=Effect.CreateEffect(c)
e2:SetDescription(aux.Stringid(m,1))
e2:SetCategory(CATEGORY_SPECIAL_SUMMON)
......@@ -33,115 +26,12 @@ function cm.initial_effect(c)
e3:SetTarget(cm.distg)
e3:SetOperation(cm.disop)
c:RegisterEffect(e3)
local e5=Effect.CreateEffect(c)
e5:SetDescription(aux.Stringid(m,0))
e5:SetCategory(CATEGORY_SPECIAL_SUMMON)
e5:SetType(EFFECT_TYPE_SINGLE+EFFECT_TYPE_TRIGGER_F)
e5:SetCode(EVENT_CUSTOM+53711005)
e5:SetRange(LOCATION_HAND)
e5:SetCost(cm.spcost)
e5:SetTarget(cm.sptg)
e5:SetOperation(cm.spop)
c:RegisterEffect(e5)
end
function cm.spfilter1(c,e,tp)
if c:IsLocation(LOCATION_HAND) then
return c:IsDiscardable()
else
return e:GetHandler():IsSetCard(0x538) and e:GetHandler():IsLevel(4) and c:IsAbleToRemove() and c:IsHasEffect(53711009,tp)
end
end
function cm.spfilter2(c,e,tp)
return c:IsSetCard(0x538) and c:IsType(TYPE_SPELL)
end
function cm.timefilter(c,tp)
return c:IsHasEffect(53711065,tp) and c:GetFlagEffect(53711015)<2
end
function cm.fselect(g,ct)
local g2=g:Filter(Card.IsLocation,nil,LOCATION_DECK)
return aux.dncheck(g2) and #g2<=ct
end
function cm.spcost(e,tp,eg,ep,ev,re,r,rp,chk)
local c=e:GetHandler()
local ltime=0
local timeg=Duel.GetMatchingGroup(cm.timefilter,tp,LOCATION_MZONE,0,c,tp)
if #timeg>0 then
local ttct=0
for timec in aux.Next(timeg) do
local timect=timec:GetFlagEffect(53711015)
ttct=ttct+timect
end
ltime=2*#timeg-ttct
end
local g=Duel.GetMatchingGroup(cm.spfilter1,tp,LOCATION_HAND+LOCATION_GRAVE,0,c,e,tp)
local gdg=Duel.GetMatchingGroup(cm.spfilter2,tp,LOCATION_DECK,0,c,e,tp)
local ct=gdg:GetClassCount(Card.GetCode)
if ct>ltime then ct=ltime end
if chk==0 then return #g+ct>3 end
g:Merge(gdg)
if ltime>0 then
Duel.Hint(HINT_SELECTMSG,tp,aux.Stringid(m,3))
local sg=g:SelectSubGroup(tp,cm.fselect,false,4,4,ct)
local dg=sg:Filter(Card.IsLocation,nil,LOCATION_DECK)
if #dg>0 then
if #timeg>1 then
for i=1,#dg do
Duel.Hint(HINT_SELECTMSG,tp,aux.Stringid(m,5))
local usedg=timeg:FilterSelect(tp,cm.timefilter,1,1,nil)
Duel.HintSelection(usedg)
local usedc=usedg:GetFirst()
local trg=usedc:GetFlagEffect(53711015)
usedc:RegisterFlagEffect(53711015,RESET_EVENT+RESETS_STANDARD+RESET_DISABLE+RESET_PHASE+PHASE_END,EFFECT_FLAG_CLIENT_HINT,1,0,aux.Stringid(53711015,trg+3))
end
else
for i=1,#dg do
local trg=timeg:GetFirst():GetFlagEffect(53711015)
timeg:GetFirst():RegisterFlagEffect(53711015,RESET_EVENT+RESETS_STANDARD+RESET_DISABLE+RESET_PHASE+PHASE_END,EFFECT_FLAG_CLIENT_HINT,1,0,aux.Stringid(53711015,trg+3))
end
end
end
local tc=sg:GetFirst()
while tc do
local te=tc:IsHasEffect(53711009,tp)
if te then
Duel.Remove(tc,POS_FACEUP,REASON_EFFECT+REASON_REPLACE)
else
Duel.SendtoGrave(tc,REASON_COST+REASON_DISCARD)
end
tc=sg:GetNext()
end
else
Duel.Hint(HINT_SELECTMSG,tp,HINTMSG_DISCARD)
local sg=Duel.SelectMatchingCard(tp,cm.spfilter,tp,LOCATION_HAND+LOCATION_GRAVE,0,4,4,c,e,tp)
local tc=sg:GetFirst()
while tc do
local te=tc:IsHasEffect(53711009,tp)
if te then
Duel.Remove(tc,POS_FACEUP,REASON_EFFECT+REASON_REPLACE)
else
Duel.SendtoGrave(tc,REASON_COST+REASON_DISCARD)
end
tc=sg:GetNext()
end
end
end
function cm.sptg(e,tp,eg,ep,ev,re,r,rp,chk)
local c=e:GetHandler()
if chk==0 then return Duel.GetLocationCount(tp,LOCATION_MZONE)>0
and c:IsCanBeSpecialSummoned(e,0,tp,false,false) end
Duel.SetOperationInfo(0,CATEGORY_SPECIAL_SUMMON,c,1,0,0)
end
function cm.spop(e,tp,eg,ep,ev,re,r,rp)
local c=e:GetHandler()
if c:IsRelateToEffect(e) then
Duel.SpecialSummon(c,SUMMON_VALUE_SELF,tp,tp,false,false,POS_FACEUP)
end
end
function cm.scon(e,tp,eg,ep,ev,re,r,rp)
return e:GetHandler():GetSummonType()==SUMMON_TYPE_SPECIAL+SUMMON_VALUE_SELF
end
function cm.sfilter(c,e,tp)
return c:IsSetCard(0x538) and c:IsCanBeSpecialSummoned(e,SUMMON_VALUE_SELF,tp,false,false) and not c:IsCode(m)
return c:IsSetCard(0x3538) and c:IsCanBeSpecialSummoned(e,SUMMON_VALUE_SELF,tp,false,false) and not c:IsCode(m)
end
function cm.stg(e,tp,eg,ep,ev,re,r,rp,chk,chkc)
if chk==0 then return Duel.GetLocationCount(tp,LOCATION_MZONE)>0
......
......@@ -29,7 +29,7 @@ function cm.initial_effect(c)
c:RegisterEffect(e2)
end
function cm.recfilter(c)
return c:IsSetCard(0x538) and c:IsType(TYPE_SPELL) and c:IsAbleToGraveAsCost()
return c:IsSetCard(0x3538) and c:IsType(TYPE_SPELL) and c:IsAbleToGraveAsCost()
end
function cm.reccost(e,tp,eg,ep,ev,re,r,rp,chk)
if chk==0 then return e:GetHandler():CheckRemoveOverlayCard(tp,1,REASON_COST) and Duel.IsExistingMatchingCard(cm.recfilter,tp,LOCATION_DECK,0,1,nil) end
......@@ -51,7 +51,7 @@ function cm.recop(e,tp,eg,ep,ev,re,r,rp)
Duel.Recover(p,val,REASON_EFFECT)
end
function cm.filter(c,e,tp)
return c:IsSetCard(0x538) and c:IsCanBeSpecialSummoned(e,0,tp,false,false)
return c:IsSetCard(0x3538) and c:IsCanBeSpecialSummoned(e,0,tp,false,false)
end
function cm.con(e,tp,eg,ep,ev,re,r,rp)
return Duel.GetTurnPlayer()~=tp
......@@ -76,7 +76,7 @@ function cm.spfilter(c,e,tp,cd)
elseif c:IsLocation(LOCATION_GRAVE) then
return c:IsAbleToRemove() and c:IsHasEffect(53711009,tp)
else
return c:IsSetCard(0x538) and c:IsType(TYPE_SPELL) and #timeg>0
return c:IsSetCard(0x3538) and c:IsType(TYPE_SPELL) and #timeg>0
end
end
function cm.operation(e,tp,eg,ep,ev,re,r,rp)
......
......@@ -29,7 +29,7 @@ function cm.initial_effect(c)
c:RegisterEffect(e2)
end
function cm.hdfilter(c)
return c:IsSetCard(0x538) and c:IsType(TYPE_SPELL) and c:IsDiscardable()
return c:IsSetCard(0x3538) and c:IsType(TYPE_SPELL) and c:IsDiscardable()
end
function cm.hdcost(e,tp,eg,ep,ev,re,r,rp,chk)
if chk==0 then return e:GetHandler():CheckRemoveOverlayCard(tp,1,REASON_COST) and Duel.IsExistingMatchingCard(cm.hdfilter,tp,LOCATION_HAND,0,1,e:GetHandler()) end
......@@ -46,7 +46,7 @@ function cm.hdop(e,tp,eg,ep,ev,re,r,rp)
Duel.SendtoGrave(sg,REASON_DISCARD+REASON_EFFECT)
end
function cm.filter(c,e,tp)
return c:IsSetCard(0x538) and c:IsCanBeSpecialSummoned(e,0,tp,false,false)
return c:IsSetCard(0x3538) and c:IsCanBeSpecialSummoned(e,0,tp,false,false)
end
function cm.con(e,tp,eg,ep,ev,re,r,rp)
return Duel.GetTurnPlayer()~=tp
......@@ -71,7 +71,7 @@ function cm.spfilter(c,e,tp,cd)
elseif c:IsLocation(LOCATION_GRAVE) then
return c:IsAbleToRemove() and c:IsHasEffect(53711009,tp)
else
return c:IsSetCard(0x538) and c:IsType(TYPE_SPELL) and #timeg>0
return c:IsSetCard(0x3538) and c:IsType(TYPE_SPELL) and #timeg>0
end
end
function cm.operation(e,tp,eg,ep,ev,re,r,rp)
......
......@@ -51,7 +51,7 @@ function cm.hdop(e,tp,eg,ep,ev,re,r,rp)
Duel.Recover(p,val,REASON_EFFECT)
end
function cm.filter(c,e,tp)
return c:IsSetCard(0x538) and c:IsCanBeSpecialSummoned(e,0,tp,false,false)
return c:IsSetCard(0x3538) and c:IsCanBeSpecialSummoned(e,0,tp,false,false)
end
function cm.con(e,tp,eg,ep,ev,re,r,rp)
return Duel.GetTurnPlayer()~=tp
......@@ -76,7 +76,7 @@ function cm.spfilter(c,e,tp,cd)
elseif c:IsLocation(LOCATION_GRAVE) then
return c:IsAbleToRemove() and c:IsHasEffect(53711009,tp)
else
return c:IsSetCard(0x538) and c:IsType(TYPE_SPELL) and #timeg>0
return c:IsSetCard(0x3538) and c:IsType(TYPE_SPELL) and #timeg>0
end
end
function cm.operation(e,tp,eg,ep,ev,re,r,rp)
......
......@@ -26,7 +26,7 @@ function cm.spcost(e,tp,eg,ep,ev,re,r,rp,chk)
end
function cm.spfilter(c,e,tp)
local cd=c:GetOriginalCode()-53711000
return c:IsLevel(4) and c:IsSetCard(0x538) and c:IsAbleToHand() and c:IsCanBeSpecialSummoned(e,0,tp,false,false) and Duel.IsExistingMatchingCard(cm.filter,tp,LOCATION_HAND+LOCATION_GRAVE+LOCATION_DECK,0,cd,nil,e,tp,cd)
return c:IsLevel(4) and c:IsSetCard(0x3538) and c:IsAbleToHand() and c:IsCanBeSpecialSummoned(e,0,tp,false,false) and Duel.IsExistingMatchingCard(cm.filter,tp,LOCATION_HAND+LOCATION_GRAVE+LOCATION_DECK,0,cd,nil,e,tp,cd)
end
function cm.timefilter(c,tp)
return c:IsHasEffect(53711065,tp) and c:GetFlagEffect(53711015)<2
......@@ -40,7 +40,7 @@ function cm.filter(c,e,tp,cd)
elseif c:IsLocation(LOCATION_GRAVE) then
return c:IsAbleToRemove() and c:IsHasEffect(53711009,tp)
else
return c:IsSetCard(0x538) and c:IsType(TYPE_SPELL) and #timeg>0
return c:IsSetCard(0x3538) and c:IsType(TYPE_SPELL) and #timeg>0
end
end
function cm.sptg(e,tp,eg,ep,ev,re,r,rp,chk)
......
......@@ -32,7 +32,7 @@ function cm.cost(e,tp,eg,ep,ev,re,r,rp,chk)
Duel.PayLPCost(tp,1200)
end
function cm.thfilter(c)
return c:IsSetCard(0x538) and c:IsType(TYPE_SPELL) and not c:IsCode(53711010) and c:IsAbleToHand()
return c:IsSetCard(0x3538) and c:IsType(TYPE_SPELL) and not c:IsCode(53711010) and c:IsAbleToHand()
end
function cm.tg(e,tp,eg,ep,ev,re,r,rp,chk,chkc)
if chkc then return chkc:IsLocation(LOCATION_GRAVE) and chkc:IsControler(tp) and cm.thfilter(chkc) end
......
......@@ -43,7 +43,7 @@ function cm.cost(e,tp,eg,ep,ev,re,r,rp,chk)
Duel.PayLPCost(tp,800)
end
function cm.thfilter(c)
return c:IsSetCard(0x538) and c:IsType(TYPE_MONSTER)
return c:IsSetCard(0x3538) and c:IsType(TYPE_MONSTER)
end
function cm.thfilter2(c)
return cm.thfilter(c) and c:IsAbleToHand()
......@@ -58,7 +58,7 @@ function cm.tg(e,tp,eg,ep,ev,re,r,rp,chk,chkc)
if chk==0 then return Duel.IsExistingMatchingCard(cm.thfilter,tp,LOCATION_DECK,0,1,nil) end
end
function cm.xyzfilter(c)
return c:IsFaceup() and c:IsSetCard(0x538) and c:IsType(TYPE_XYZ)
return c:IsFaceup() and c:IsSetCard(0x3538) and c:IsType(TYPE_XYZ)
end
function cm.thop(e,tp,eg,ep,ev,re,r,rp)
local g=Duel.GetMatchingGroup(cm.thfilter,tp,LOCATION_DECK,0,nil)
......
......@@ -32,7 +32,7 @@ function cm.cost(e,tp,eg,ep,ev,re,r,rp,chk)
Duel.PayLPCost(tp,1000)
end
function cm.thfilter(c)
return c:IsSetCard(0x538) and c:IsType(TYPE_SPELL)
return c:IsSetCard(0x3538) and c:IsType(TYPE_SPELL)
end
function cm.tg(e,tp,eg,ep,ev,re,r,rp,chk,chkc)
if chk==0 then return Duel.IsExistingMatchingCard(cm.thfilter,tp,LOCATION_DECK,0,1,nil) end
......
......@@ -32,7 +32,7 @@ function cm.cost(e,tp,eg,ep,ev,re,r,rp,chk)
Duel.PayLPCost(tp,600)
end
function cm.tdfilter(c)
return c:IsFaceup() and c:IsSetCard(0x538) and c:IsAbleToDeck()
return c:IsFaceup() and c:IsSetCard(0x3538) and c:IsAbleToDeck()
end
function cm.tg(e,tp,eg,ep,ev,re,r,rp,chk,chkc)
if chkc then return chkc:IsLocation(LOCATION_REMOVED) and chkc:IsControler(tp) and cm.tdfilter(chkc) end
......@@ -43,8 +43,13 @@ function cm.tg(e,tp,eg,ep,ev,re,r,rp,chk,chkc)
Duel.SetOperationInfo(0,CATEGORY_TODECK,g,g:GetCount(),0,0)
end
function cm.op(e,tp,eg,ep,ev,re,r,rp)
local g=Duel.GetChainInfo(0,CHAININFO_TARGET_CARDS):Filter(Card.IsRelateToEffect,nil,e)
if g:GetCount()>0 and Duel.SendtoDeck(g,nil,2,REASON_EFFECT)==4 then
local tg=Duel.GetChainInfo(0,CHAININFO_TARGET_CARDS):Filter(Card.IsRelateToEffect,nil,e)
if tg:GetCount()==0 then return end
Duel.SendtoDeck(tg,nil,2,REASON_EFFECT)
local g=Duel.GetOperatedGroup()
if g:IsExists(Card.IsLocation,1,nil,LOCATION_DECK) then Duel.ShuffleDeck(tp) end
local ct=g:FilterCount(Card.IsLocation,nil,LOCATION_DECK)
if ct==4 then
Duel.BreakEffect()
Duel.Draw(tp,1,REASON_EFFECT)
end
......
......@@ -38,7 +38,7 @@ function cm.regop(e,tp,eg,ep,ev,re,r,rp)
e:GetHandler():RegisterEffect(e3)
end
function cm.cfilter(c,tp)
return c:IsFaceup() and c:GetSummonPlayer()==tp and c:IsSetCard(0x538) and c:IsType(TYPE_XYZ) and c:IsSummonType(SUMMON_TYPE_XYZ)
return c:IsFaceup() and c:GetSummonPlayer()==tp and c:IsSetCard(0x3538) and c:IsType(TYPE_XYZ) and c:IsSummonType(SUMMON_TYPE_XYZ)
end
function cm.thcon(e,tp,eg,ep,ev,re,r,rp)
return eg:IsExists(cm.cfilter,1,nil,tp)
......
......@@ -19,7 +19,7 @@ function cm.initial_effect(c)
local e2=Effect.CreateEffect(c)
e2:SetType(EFFECT_TYPE_SINGLE)
e2:SetProperty(EFFECT_FLAG_SINGLE_RANGE)
e2:SetCode(53711065)
e2:SetCode(53711099)
e2:SetRange(LOCATION_MZONE)
c:RegisterEffect(e2)
end
......@@ -33,16 +33,16 @@ function cm.schfilter(c,e,tp)
if #timeg>0 then
local ttct=0
for timec in aux.Next(timeg) do
local timect=timec:GetFlagEffect(53711015)
local timect=timec:GetFlagEffect(53711065)
ttct=ttct+timect
end
ltime=2*#timeg-ttct
end
local g=Duel.GetMatchingGroup(cm.spfilter,tp,LOCATION_HAND+LOCATION_GRAVE+LOCATION_DECK,0,c,e,tp,cd,ltime)
return c:IsSetCard(0x538) and c:IsType(TYPE_MONSTER) and c:IsAbleToHand() and c:IsCanBeSpecialSummoned(e,0,tp,false,false) and g:CheckSubGroup(cm.fselect,cd,cd,ltime)
return c:IsSetCard(0x3538) and c:IsType(TYPE_MONSTER) and c:IsAbleToHand() and c:IsCanBeSpecialSummoned(e,0,tp,false,false) and g:CheckSubGroup(cm.fselect,cd,cd,ltime)
end
function cm.timefilter(c,tp)
return c:IsHasEffect(53711065,tp) and c:GetFlagEffect(53711015)<2
return c:IsHasEffect(53711099,tp) and c:GetFlagEffect(53711065)<2
end
function cm.spfilter(c,e,tp,cd,ct)
if c:IsLocation(LOCATION_HAND) then
......@@ -52,7 +52,7 @@ function cm.spfilter(c,e,tp,cd,ct)
elseif c:IsLocation(LOCATION_GRAVE) then
return c:IsAbleToRemove() and c:IsHasEffect(53711009,tp)
else
return c:IsSetCard(0x538) and c:IsType(TYPE_SPELL) and ct>0
return c:IsSetCard(0x3538) and c:IsType(TYPE_SPELL) and ct>0
end
end
function cm.fselect(g,ct)
......
local m=53715001
local cm=_G["c"..m]
cm.name="欢乐树友 哑剧"
if not pcall(function() require("expansions/script/c53702500") end) then require("script/c53702500") end
function cm.initial_effect(c)
aux.EnablePendulumAttribute(c,false)
c:EnableReviveLimit()
local e0=Effect.CreateEffect(c)
e0:SetDescription(1164)
e0:SetType(EFFECT_TYPE_FIELD)
e0:SetCode(EFFECT_SPSUMMON_PROC)
e0:SetProperty(EFFECT_FLAG_UNCOPYABLE+EFFECT_FLAG_IGNORE_IMMUNE)
e0:SetRange(LOCATION_EXTRA)
e0:SetCondition(cm.syncon)
e0:SetTarget(cm.syntg)
e0:SetOperation(cm.synop)
e0:SetValue(SUMMON_TYPE_SYNCHRO)
c:RegisterEffect(e0)
SNNM.HTFSynchoro(c,0,m)
local e2=Effect.CreateEffect(c)
e2:SetDescription(aux.Stringid(m,0))
e2:SetCategory(CATEGORY_DESTROY)
......@@ -27,169 +16,6 @@ function cm.initial_effect(c)
e2:SetTarget(cm.destg)
e2:SetOperation(cm.desop)
c:RegisterEffect(e2)
--double tuner check
local e9=Effect.CreateEffect(c)
e9:SetType(EFFECT_TYPE_SINGLE)
e9:SetCode(EFFECT_MATERIAL_CHECK)
e9:SetValue(cm.valcheck)
c:RegisterEffect(e9)
end
function cm.valcheck(e,c)
local g=c:GetMaterial()
if g:IsExists(Card.IsType,2,nil,TYPE_TUNER) then
local e1=Effect.CreateEffect(c)
e1:SetType(EFFECT_TYPE_SINGLE)
e1:SetProperty(EFFECT_FLAG_CANNOT_DISABLE+EFFECT_FLAG_UNCOPYABLE)
e1:SetCode(21142671)
e1:SetReset(RESET_EVENT+RESETS_STANDARD-RESET_TOFIELD+RESET_PHASE+PHASE_END)
c:RegisterEffect(e1)
end
end
function cm.CheckGroupRecursive(c,sg,g,f,min,max,ext_params)
sg:AddCard(c)
local ct=sg:GetCount()
local res=(ct>=min and f(sg,table.unpack(ext_params)))
or (ct<max and g:IsExists(cm.CheckGroupRecursive,1,sg,sg,g,f,min,max,ext_params))
sg:RemoveCard(c)
return res
end
function cm.CheckGroup(g,f,cg,min,max,...)
local min=min or 1
local max=max or g:GetCount()
if min>max then return false end
local ext_params={...}
local sg=Group.CreateGroup()
if cg then sg:Merge(cg) end
local ct=sg:GetCount()
if ct>=min and ct<max and f(sg,...) then return true end
return g:IsExists(cm.CheckGroupRecursive,1,sg,sg,g,f,min,max,ext_params)
end
function cm.val(c,syncard)
local slv=c:GetSynchroLevel(syncard)
return slv
end
function cm.SelectGroup(tp,desc,g,f,cg,min,max,...)
local min=min or 1
local max=max or g:GetCount()
local ext_params={...}
local sg=Group.CreateGroup()
if cg then sg:Merge(cg) end
local ct=sg:GetCount()
while ct<max and not (ct>=min and f(sg,...) and not (g:IsExists(cm.CheckGroupRecursive,1,sg,sg,g,f,min,max,ext_params) and Duel.SelectYesNo(tp,210))) do
Duel.Hint(HINT_SELECTMSG,tp,desc)
local tg=g:FilterSelect(tp,cm.CheckGroupRecursive,1,1,sg,sg,g,f,min,max,ext_params)
if tg:GetCount()==0 then error("Incorrect Group Filter",2) end
sg:Merge(tg)
ct=sg:GetCount()
end
return sg
end
function cm.matfilter1(c,syncard,tp)
if c:IsFacedown() then return false end
if not c:IsType(TYPE_EFFECT) and c:IsSynchroType(TYPE_PENDULUM) and c:IsControler(tp) and c:IsLocation(LOCATION_EXTRA) and c:IsFaceup() and c:IsType(TYPE_TUNER) then return true end
return c:IsSynchroType(TYPE_TUNER) and c:IsCanBeSynchroMaterial(syncard) and (c:IsFaceup() or not c:IsLocation(LOCATION_MZONE))
and (not c:IsType(TYPE_EFFECT) or not (c:IsLocation(LOCATION_EXTRA) and c:IsFaceup()))
end
function cm.matfilter2(c,syncard)
if not c:IsType(TYPE_EFFECT) and c:IsSynchroType(TYPE_PENDULUM) and c:IsControler(tp) and c:IsLocation(LOCATION_EXTRA) and c:IsFaceup() then return true end
return c:IsSynchroType(TYPE_PENDULUM) and (c:IsLocation(LOCATION_HAND) or c:IsFaceup()) and c:IsCanBeSynchroMaterial(syncard)
and (c:IsFaceup() or not c:IsLocation(LOCATION_MZONE)) and (not c:IsType(TYPE_EFFECT) or not (c:IsLocation(LOCATION_EXTRA) and c:IsFaceup()))
end
function cm.synfilter(c,syncard,lv,g2,g3,minc,maxc,tp)
local tsg=c:IsHasEffect(EFFECT_HAND_SYNCHRO) and g3 or g2
local f=c.tuner_filter
if c.tuner_filter then tsg=tsg:Filter(f,nil) end
return cm.CheckGroup(tsg,cm.goal,Group.FromCards(c),minc,maxc,tp,lv,syncard,c)
end
function cm.goal(g,tp,lv,syncard,tuc)
if Duel.GetLocationCountFromEx(tp,tp,g,syncard)<=0 then return false end
if tuc:IsHasEffect(EFFECT_HAND_SYNCHRO) and g:IsExists(Card.IsLocation,2,tuc,LOCATION_HAND) then return false end
local ct=g:GetCount()
return g:CheckWithSumEqual(cm.val,lv,ct,ct,syncard)
end
function cm.syncon(e,c,tuner,mg)
if c==nil then return true end
if c:IsType(TYPE_PENDULUM) and c:IsFaceup() then return false end
local tp=c:GetControler()
local minc=2
local maxc=c:GetLevel()
local g1=nil
local g2=nil
local g3=nil
if mg then
g1=mg:Filter(cm.matfilter1,nil,c,tp)
g2=mg:Filter(cm.matfilter2,nil,c)
g3=g2:Clone()
else
if Duel.GetFlagEffect(tp,m)==0 then
g1=Duel.GetMatchingGroup(cm.matfilter1,tp,LOCATION_MZONE+LOCATION_EXTRA,LOCATION_MZONE,nil,c,tp)
g2=Duel.GetMatchingGroup(cm.matfilter2,tp,LOCATION_MZONE+LOCATION_EXTRA,LOCATION_MZONE,nil,c)
else
g1=Duel.GetMatchingGroup(cm.matfilter1,tp,LOCATION_MZONE,LOCATION_MZONE,nil,c,tp)
g2=Duel.GetMatchingGroup(cm.matfilter2,tp,LOCATION_MZONE,LOCATION_MZONE,nil,c)
end
g3=Duel.GetMatchingGroup(cm.matfilter2,tp,LOCATION_MZONE+LOCATION_HAND,LOCATION_MZONE,nil,c)
end
local lv=c:GetLevel()
local sg=nil
if tuner then
return cm.matfilter1(c,tp) and cm.synfilter(tuner,c,lv,g2,g3,minc,maxc,tp)
else
return g1:IsExists(cm.synfilter,1,nil,c,lv,g2,g3,minc,maxc,tp)
end
end
function cm.syntg(e,tp,eg,ep,ev,re,r,rp,chk,c,tuner,mg)
local minc=2
local maxc=c:GetLevel()
local g1=nil
local g2=nil
local g3=nil
if mg then
g1=mg:Filter(cm.matfilter1,nil,c,tp)
g2=mg:Filter(cm.matfilter2,nil,c)
g3=g2:Clone()
else
if Duel.GetFlagEffect(tp,m)==0 then
g1=Duel.GetMatchingGroup(cm.matfilter1,tp,LOCATION_MZONE+LOCATION_EXTRA,LOCATION_MZONE,nil,c,tp)
g2=Duel.GetMatchingGroup(cm.matfilter2,tp,LOCATION_MZONE+LOCATION_EXTRA,LOCATION_MZONE,nil,c)
else
g1=Duel.GetMatchingGroup(cm.matfilter1,tp,LOCATION_MZONE,LOCATION_MZONE,nil,c,tp)
g2=Duel.GetMatchingGroup(cm.matfilter2,tp,LOCATION_MZONE,LOCATION_MZONE,nil,c)
end
g3=Duel.GetMatchingGroup(cm.matfilter2,tp,LOCATION_MZONE+LOCATION_HAND,LOCATION_MZONE,nil,c)
end
local pe=Duel.IsPlayerAffectedByEffect(tp,EFFECT_MUST_BE_SMATERIAL)
local lv=c:GetLevel()
local tuc=nil
if tuner then
tuner=tuc
else
Duel.Hint(HINT_SELECTMSG,tp,HINTMSG_SMATERIAL)
if not pe then
local t1=g1:FilterSelect(tp,cm.synfilter,1,1,nil,c,lv,g2,g3,minc,maxc,tp)
tuc=t1:GetFirst()
else
tuc=pe:GetOwner()
Group.FromCards(tuc):Select(tp,1,1,nil)
end
end
tuc:RegisterFlagEffect(m,RESET_EVENT+0x1fe0000,0,1)
local tsg=tuc:IsHasEffect(EFFECT_HAND_SYNCHRO) and g3 or g2
local f=tuc.tuner_filter
if tuc.tuner_filter then tsg=tsg:Filter(f,nil) end
local g=cm.SelectGroup(tp,HINTMSG_SMATERIAL,tsg,cm.goal,Group.FromCards(tuc),minc,maxc,tp,lv,c,tuc)
if g then
g:KeepAlive()
e:SetLabelObject(g)
return true
else return false end
end
function cm.synop(e,tp,eg,ep,ev,re,r,rp,c,tuner,mg)
local g=e:GetLabelObject()
c:SetMaterial(g)
if g:IsExists(Card.IsLocation,1,nil,LOCATION_EXTRA) then Duel.RegisterFlagEffect(tp,m,RESET_PHASE+PHASE_END,0,1) end
Duel.SendtoGrave(g,REASON_MATERIAL+REASON_SYNCHRO)
g:DeleteGroup()
end
function cm.cfilter(c,tp)
return c:GetPreviousControler()==tp and c:IsPreviousLocation(LOCATION_ONFIELD) and c:IsReason(REASON_EFFECT)
......@@ -230,27 +56,5 @@ function cm.desop(e,tp,eg,ep,ev,re,r,rp)
end
end
end
local e1=Effect.CreateEffect(c)
e1:SetType(EFFECT_TYPE_FIELD+EFFECT_TYPE_CONTINUOUS)
e1:SetCode(EVENT_FREE_CHAIN)
e1:SetCountLimit(1)
e1:SetCondition(cm.con)
e1:SetOperation(cm.op)
e1:SetReset(RESET_PHASE+PHASE_END)
Duel.RegisterEffect(e1,tp)
end
function cm.filter2(c)
return c:IsType(TYPE_PENDULUM) and c:IsLevelBelow(4) and not c:IsType(TYPE_EFFECT) and not c:IsForbidden()
end
function cm.con(e,tp,eg,ep,ev,re,r,rp)
return Duel.IsExistingMatchingCard(cm.filter2,tp,LOCATION_GRAVE,0,1,nil)
end
function cm.op(e,tp,eg,ep,ev,re,r,rp)
Duel.Hint(HINT_CARD,0,m)
Duel.Hint(HINT_SELECTMSG,tp,HINTMSG_TOFIELD)
local g=Duel.SelectMatchingCard(tp,cm.filter2,tp,LOCATION_GRAVE,0,1,1,nil)
local tc=g:GetFirst()
if tc then
Duel.MoveToField(tc,tp,tp,LOCATION_PZONE,POS_FACEUP,true)
end
SNNM.HTFPlacePZone(c,4,LOCATION_GRAVE,0,EVENT_FREE_CHAIN,m)
end
local m=53715002
local cm=_G["c"..m]
cm.name="欢乐树友 拖鞋"
if not pcall(function() require("expansions/script/c53702500") end) then require("script/c53702500") end
function cm.initial_effect(c)
aux.EnablePendulumAttribute(c)
local e1=Effect.CreateEffect(c)
......@@ -41,27 +42,5 @@ function cm.desop(e,tp,eg,ep,ev,re,r,rp)
Duel.SpecialSummon(sg,0,tp,tp,false,false,POS_FACEUP)
end
end
local e1=Effect.CreateEffect(c)
e1:SetType(EFFECT_TYPE_FIELD+EFFECT_TYPE_CONTINUOUS)
e1:SetCode(EVENT_FREE_CHAIN)
e1:SetCountLimit(1)
e1:SetCondition(cm.con)
e1:SetOperation(cm.op)
e1:SetReset(RESET_PHASE+PHASE_END)
Duel.RegisterEffect(e1,tp)
end
function cm.filter2(c)
return c:IsType(TYPE_PENDULUM) and c:IsLevelBelow(2) and not c:IsType(TYPE_EFFECT) and not c:IsForbidden()
end
function cm.con(e,tp,eg,ep,ev,re,r,rp)
return Duel.IsExistingMatchingCard(cm.filter2,tp,LOCATION_GRAVE,0,1,nil) and (Duel.CheckLocation(tp,LOCATION_PZONE,0) or Duel.CheckLocation(tp,LOCATION_PZONE,1))
end
function cm.op(e,tp,eg,ep,ev,re,r,rp)
Duel.Hint(HINT_CARD,0,m)
Duel.Hint(HINT_SELECTMSG,tp,HINTMSG_TOFIELD)
local g=Duel.SelectMatchingCard(tp,cm.filter2,tp,LOCATION_GRAVE,0,1,1,nil)
local tc=g:GetFirst()
if tc then
Duel.MoveToField(tc,tp,tp,LOCATION_PZONE,POS_FACEUP,true)
end
SNNM.HTFPlacePZone(c,2,LOCATION_GRAVE,0,EVENT_FREE_CHAIN,m)
end
local m=53715003
local cm=_G["c"..m]
cm.name="欢乐树友 板牙"
if not pcall(function() require("expansions/script/c53702500") end) then require("script/c53702500") end
function cm.initial_effect(c)
aux.EnablePendulumAttribute(c)
local e1=Effect.CreateEffect(c)
......@@ -41,27 +42,5 @@ function cm.desop(e,tp,eg,ep,ev,re,r,rp)
Duel.MoveToField(sg:GetFirst(),tp,tp,LOCATION_PZONE,POS_FACEUP,true)
end
end
local e1=Effect.CreateEffect(c)
e1:SetType(EFFECT_TYPE_FIELD+EFFECT_TYPE_CONTINUOUS)
e1:SetCode(EVENT_FREE_CHAIN)
e1:SetCountLimit(1)
e1:SetCondition(cm.con)
e1:SetOperation(cm.op)
e1:SetReset(RESET_PHASE+PHASE_END)
Duel.RegisterEffect(e1,tp)
end
function cm.filter2(c)
return c:IsType(TYPE_PENDULUM) and c:IsLevelBelow(2) and not c:IsType(TYPE_EFFECT) and not c:IsForbidden()
end
function cm.con(e,tp,eg,ep,ev,re,r,rp)
return Duel.IsExistingMatchingCard(cm.filter2,tp,LOCATION_GRAVE,0,1,nil) and (Duel.CheckLocation(tp,LOCATION_PZONE,0) or Duel.CheckLocation(tp,LOCATION_PZONE,1))
end
function cm.op(e,tp,eg,ep,ev,re,r,rp)
Duel.Hint(HINT_CARD,0,m)
Duel.Hint(HINT_SELECTMSG,tp,HINTMSG_TOFIELD)
local g=Duel.SelectMatchingCard(tp,cm.filter2,tp,LOCATION_GRAVE,0,1,1,nil)
local tc=g:GetFirst()
if tc then
Duel.MoveToField(tc,tp,tp,LOCATION_PZONE,POS_FACEUP,true)
end
SNNM.HTFPlacePZone(c,2,LOCATION_GRAVE,0,EVENT_FREE_CHAIN,m)
end
local m=53715004
local cm=_G["c"..m]
cm.name="欢乐树友 微笑"
if not pcall(function() require("expansions/script/c53702500") end) then require("script/c53702500") end
function cm.initial_effect(c)
aux.EnablePendulumAttribute(c)
local e1=Effect.CreateEffect(c)
......@@ -33,27 +34,5 @@ function cm.desop(e,tp,eg,ep,ev,re,r,rp)
Duel.SpecialSummon(sg,0,tp,tp,false,false,POS_FACEUP)
end
end
local e1=Effect.CreateEffect(c)
e1:SetType(EFFECT_TYPE_FIELD+EFFECT_TYPE_CONTINUOUS)
e1:SetCode(EVENT_FREE_CHAIN)
e1:SetCountLimit(1)
e1:SetCondition(cm.con)
e1:SetOperation(cm.op)
e1:SetReset(RESET_PHASE+PHASE_END)
Duel.RegisterEffect(e1,tp)
end
function cm.filter2(c)
return c:IsType(TYPE_PENDULUM) and c:IsLevelBelow(2) and not c:IsType(TYPE_EFFECT) and not c:IsForbidden()
end
function cm.con(e,tp,eg,ep,ev,re,r,rp)
return Duel.IsExistingMatchingCard(cm.filter2,tp,LOCATION_GRAVE,0,1,nil) and (Duel.CheckLocation(tp,LOCATION_PZONE,0) or Duel.CheckLocation(tp,LOCATION_PZONE,1))
end
function cm.op(e,tp,eg,ep,ev,re,r,rp)
Duel.Hint(HINT_CARD,0,m)
Duel.Hint(HINT_SELECTMSG,tp,HINTMSG_TOFIELD)
local g=Duel.SelectMatchingCard(tp,cm.filter2,tp,LOCATION_GRAVE,0,1,1,nil)
local tc=g:GetFirst()
if tc then
Duel.MoveToField(tc,tp,tp,LOCATION_PZONE,POS_FACEUP,true)
end
SNNM.HTFPlacePZone(c,2,LOCATION_GRAVE,0,EVENT_FREE_CHAIN,m)
end
local m=53715005
local cm=_G["c"..m]
cm.name="欢乐树友 洁癖"
if not pcall(function() require("expansions/script/c53702500") end) then require("script/c53702500") end
function cm.initial_effect(c)
aux.EnablePendulumAttribute(c)
local e1=Effect.CreateEffect(c)
......@@ -39,27 +40,5 @@ function cm.desop(e,tp,eg,ep,ev,re,r,rp)
Duel.SendtoExtraP(sg,tp,REASON_EFFECT)
end
end
local e1=Effect.CreateEffect(c)
e1:SetType(EFFECT_TYPE_FIELD+EFFECT_TYPE_CONTINUOUS)
e1:SetCode(EVENT_FREE_CHAIN)
e1:SetCountLimit(1)
e1:SetCondition(cm.con)
e1:SetOperation(cm.op)
e1:SetReset(RESET_PHASE+PHASE_END)
Duel.RegisterEffect(e1,tp)
end
function cm.filter2(c)
return c:IsType(TYPE_PENDULUM) and c:IsLevelBelow(2) and not c:IsType(TYPE_EFFECT) and not c:IsForbidden()
end
function cm.con(e,tp,eg,ep,ev,re,r,rp)
return Duel.IsExistingMatchingCard(cm.filter2,tp,LOCATION_GRAVE,0,1,nil) and (Duel.CheckLocation(tp,LOCATION_PZONE,0) or Duel.CheckLocation(tp,LOCATION_PZONE,1))
end
function cm.op(e,tp,eg,ep,ev,re,r,rp)
Duel.Hint(HINT_CARD,0,m)
Duel.Hint(HINT_SELECTMSG,tp,HINTMSG_TOFIELD)
local g=Duel.SelectMatchingCard(tp,cm.filter2,tp,LOCATION_GRAVE,0,1,1,nil)
local tc=g:GetFirst()
if tc then
Duel.MoveToField(tc,tp,tp,LOCATION_PZONE,POS_FACEUP,true)
end
SNNM.HTFPlacePZone(c,2,LOCATION_GRAVE,0,EVENT_FREE_CHAIN,m)
end
local m=53715006
local cm=_G["c"..m]
cm.name="欢乐树友 大工"
if not pcall(function() require("expansions/script/c53702500") end) then require("script/c53702500") end
function cm.initial_effect(c)
aux.EnablePendulumAttribute(c)
local e1=Effect.CreateEffect(c)
......@@ -34,27 +35,5 @@ function cm.desop(e,tp,eg,ep,ev,re,r,rp)
Duel.ConfirmCards(1-tp,sg)
end
end
local e1=Effect.CreateEffect(c)
e1:SetType(EFFECT_TYPE_FIELD+EFFECT_TYPE_CONTINUOUS)
e1:SetCode(EVENT_FREE_CHAIN)
e1:SetCountLimit(1)
e1:SetCondition(cm.con)
e1:SetOperation(cm.op)
e1:SetReset(RESET_PHASE+PHASE_END)
Duel.RegisterEffect(e1,tp)
end
function cm.filter2(c)
return c:IsType(TYPE_PENDULUM) and c:IsLevelBelow(2) and not c:IsType(TYPE_EFFECT) and not c:IsForbidden()
end
function cm.con(e,tp,eg,ep,ev,re,r,rp)
return Duel.IsExistingMatchingCard(cm.filter2,tp,LOCATION_GRAVE,0,1,nil) and (Duel.CheckLocation(tp,LOCATION_PZONE,0) or Duel.CheckLocation(tp,LOCATION_PZONE,1))
end
function cm.op(e,tp,eg,ep,ev,re,r,rp)
Duel.Hint(HINT_CARD,0,m)
Duel.Hint(HINT_SELECTMSG,tp,HINTMSG_TOFIELD)
local g=Duel.SelectMatchingCard(tp,cm.filter2,tp,LOCATION_GRAVE,0,1,1,nil)
local tc=g:GetFirst()
if tc then
Duel.MoveToField(tc,tp,tp,LOCATION_PZONE,POS_FACEUP,true)
end
SNNM.HTFPlacePZone(c,2,LOCATION_GRAVE,0,EVENT_FREE_CHAIN,m)
end
local m=53715008
local cm=_G["c"..m]
cm.name="欢乐树友 刺刺"
if not pcall(function() require("expansions/script/c53702500") end) then require("script/c53702500") end
function cm.initial_effect(c)
aux.EnablePendulumAttribute(c,false)
c:EnableReviveLimit()
local e0=Effect.CreateEffect(c)
e0:SetDescription(1164)
e0:SetType(EFFECT_TYPE_FIELD)
e0:SetCode(EFFECT_SPSUMMON_PROC)
e0:SetProperty(EFFECT_FLAG_UNCOPYABLE+EFFECT_FLAG_IGNORE_IMMUNE)
e0:SetRange(LOCATION_EXTRA)
e0:SetCondition(cm.syncon)
e0:SetTarget(cm.syntg)
e0:SetOperation(cm.synop)
e0:SetValue(SUMMON_TYPE_SYNCHRO)
c:RegisterEffect(e0)
SNNM.HTFSynchoro(c,0,m)
local e1=Effect.CreateEffect(c)
e1:SetDescription(aux.Stringid(m,0))
e1:SetCategory(CATEGORY_DESTROY)
......@@ -24,169 +13,6 @@ function cm.initial_effect(c)
e1:SetTarget(cm.destg)
e1:SetOperation(cm.desop)
c:RegisterEffect(e1)
--double tuner check
local e9=Effect.CreateEffect(c)
e9:SetType(EFFECT_TYPE_SINGLE)
e9:SetCode(EFFECT_MATERIAL_CHECK)
e9:SetValue(cm.valcheck)
c:RegisterEffect(e9)
end
function cm.valcheck(e,c)
local g=c:GetMaterial()
if g:IsExists(Card.IsType,2,nil,TYPE_TUNER) then
local e1=Effect.CreateEffect(c)
e1:SetType(EFFECT_TYPE_SINGLE)
e1:SetProperty(EFFECT_FLAG_CANNOT_DISABLE+EFFECT_FLAG_UNCOPYABLE)
e1:SetCode(21142671)
e1:SetReset(RESET_EVENT+RESETS_STANDARD-RESET_TOFIELD+RESET_PHASE+PHASE_END)
c:RegisterEffect(e1)
end
end
function cm.CheckGroupRecursive(c,sg,g,f,min,max,ext_params)
sg:AddCard(c)
local ct=sg:GetCount()
local res=(ct>=min and f(sg,table.unpack(ext_params)))
or (ct<max and g:IsExists(cm.CheckGroupRecursive,1,sg,sg,g,f,min,max,ext_params))
sg:RemoveCard(c)
return res
end
function cm.CheckGroup(g,f,cg,min,max,...)
local min=min or 1
local max=max or g:GetCount()
if min>max then return false end
local ext_params={...}
local sg=Group.CreateGroup()
if cg then sg:Merge(cg) end
local ct=sg:GetCount()
if ct>=min and ct<max and f(sg,...) then return true end
return g:IsExists(cm.CheckGroupRecursive,1,sg,sg,g,f,min,max,ext_params)
end
function cm.val(c,syncard)
local slv=c:GetSynchroLevel(syncard)
return slv
end
function cm.SelectGroup(tp,desc,g,f,cg,min,max,...)
local min=min or 1
local max=max or g:GetCount()
local ext_params={...}
local sg=Group.CreateGroup()
if cg then sg:Merge(cg) end
local ct=sg:GetCount()
while ct<max and not (ct>=min and f(sg,...) and not (g:IsExists(cm.CheckGroupRecursive,1,sg,sg,g,f,min,max,ext_params) and Duel.SelectYesNo(tp,210))) do
Duel.Hint(HINT_SELECTMSG,tp,desc)
local tg=g:FilterSelect(tp,cm.CheckGroupRecursive,1,1,sg,sg,g,f,min,max,ext_params)
if tg:GetCount()==0 then error("Incorrect Group Filter",2) end
sg:Merge(tg)
ct=sg:GetCount()
end
return sg
end
function cm.matfilter1(c,syncard,tp)
if c:IsFacedown() then return false end
if not c:IsType(TYPE_EFFECT) and c:IsSynchroType(TYPE_PENDULUM) and c:IsControler(tp) and c:IsLocation(LOCATION_EXTRA) and c:IsFaceup() and c:IsType(TYPE_TUNER) then return true end
return c:IsSynchroType(TYPE_TUNER) and c:IsCanBeSynchroMaterial(syncard) and (c:IsFaceup() or not c:IsLocation(LOCATION_MZONE))
and (not c:IsType(TYPE_EFFECT) or not (c:IsLocation(LOCATION_EXTRA) and c:IsFaceup()))
end
function cm.matfilter2(c,syncard)
if not c:IsType(TYPE_EFFECT) and c:IsSynchroType(TYPE_PENDULUM) and c:IsControler(tp) and c:IsLocation(LOCATION_EXTRA) and c:IsFaceup() then return true end
return c:IsSynchroType(TYPE_PENDULUM) and (c:IsLocation(LOCATION_HAND) or c:IsFaceup()) and c:IsCanBeSynchroMaterial(syncard)
and (c:IsFaceup() or not c:IsLocation(LOCATION_MZONE)) and (not c:IsType(TYPE_EFFECT) or not (c:IsLocation(LOCATION_EXTRA) and c:IsFaceup()))
end
function cm.synfilter(c,syncard,lv,g2,g3,minc,maxc,tp)
local tsg=c:IsHasEffect(EFFECT_HAND_SYNCHRO) and g3 or g2
local f=c.tuner_filter
if c.tuner_filter then tsg=tsg:Filter(f,nil) end
return cm.CheckGroup(tsg,cm.goal,Group.FromCards(c),minc,maxc,tp,lv,syncard,c)
end
function cm.goal(g,tp,lv,syncard,tuc)
if Duel.GetLocationCountFromEx(tp,tp,g,syncard)<=0 then return false end
if tuc:IsHasEffect(EFFECT_HAND_SYNCHRO) and g:IsExists(Card.IsLocation,2,tuc,LOCATION_HAND) then return false end
local ct=g:GetCount()
return g:CheckWithSumEqual(cm.val,lv,ct,ct,syncard)
end
function cm.syncon(e,c,tuner,mg)
if c==nil then return true end
if c:IsType(TYPE_PENDULUM) and c:IsFaceup() then return false end
local tp=c:GetControler()
local minc=2
local maxc=c:GetLevel()
local g1=nil
local g2=nil
local g3=nil
if mg then
g1=mg:Filter(cm.matfilter1,nil,c,tp)
g2=mg:Filter(cm.matfilter2,nil,c)
g3=g2:Clone()
else
if Duel.GetFlagEffect(tp,m)==0 then
g1=Duel.GetMatchingGroup(cm.matfilter1,tp,LOCATION_MZONE+LOCATION_EXTRA,LOCATION_MZONE,nil,c,tp)
g2=Duel.GetMatchingGroup(cm.matfilter2,tp,LOCATION_MZONE+LOCATION_EXTRA,LOCATION_MZONE,nil,c)
else
g1=Duel.GetMatchingGroup(cm.matfilter1,tp,LOCATION_MZONE,LOCATION_MZONE,nil,c,tp)
g2=Duel.GetMatchingGroup(cm.matfilter2,tp,LOCATION_MZONE,LOCATION_MZONE,nil,c)
end
g3=Duel.GetMatchingGroup(cm.matfilter2,tp,LOCATION_MZONE+LOCATION_HAND,LOCATION_MZONE,nil,c)
end
local lv=c:GetLevel()
local sg=nil
if tuner then
return cm.matfilter1(c,tp) and cm.synfilter(tuner,c,lv,g2,g3,minc,maxc,tp)
else
return g1:IsExists(cm.synfilter,1,nil,c,lv,g2,g3,minc,maxc,tp)
end
end
function cm.syntg(e,tp,eg,ep,ev,re,r,rp,chk,c,tuner,mg)
local minc=2
local maxc=c:GetLevel()
local g1=nil
local g2=nil
local g3=nil
if mg then
g1=mg:Filter(cm.matfilter1,nil,c,tp)
g2=mg:Filter(cm.matfilter2,nil,c)
g3=g2:Clone()
else
if Duel.GetFlagEffect(tp,m)==0 then
g1=Duel.GetMatchingGroup(cm.matfilter1,tp,LOCATION_MZONE+LOCATION_EXTRA,LOCATION_MZONE,nil,c,tp)
g2=Duel.GetMatchingGroup(cm.matfilter2,tp,LOCATION_MZONE+LOCATION_EXTRA,LOCATION_MZONE,nil,c)
else
g1=Duel.GetMatchingGroup(cm.matfilter1,tp,LOCATION_MZONE,LOCATION_MZONE,nil,c,tp)
g2=Duel.GetMatchingGroup(cm.matfilter2,tp,LOCATION_MZONE,LOCATION_MZONE,nil,c)
end
g3=Duel.GetMatchingGroup(cm.matfilter2,tp,LOCATION_MZONE+LOCATION_HAND,LOCATION_MZONE,nil,c)
end
local pe=Duel.IsPlayerAffectedByEffect(tp,EFFECT_MUST_BE_SMATERIAL)
local lv=c:GetLevel()
local tuc=nil
if tuner then
tuner=tuc
else
Duel.Hint(HINT_SELECTMSG,tp,HINTMSG_SMATERIAL)
if not pe then
local t1=g1:FilterSelect(tp,cm.synfilter,1,1,nil,c,lv,g2,g3,minc,maxc,tp)
tuc=t1:GetFirst()
else
tuc=pe:GetOwner()
Group.FromCards(tuc):Select(tp,1,1,nil)
end
end
tuc:RegisterFlagEffect(m,RESET_EVENT+0x1fe0000,0,1)
local tsg=tuc:IsHasEffect(EFFECT_HAND_SYNCHRO) and g3 or g2
local f=tuc.tuner_filter
if tuc.tuner_filter then tsg=tsg:Filter(f,nil) end
local g=cm.SelectGroup(tp,HINTMSG_SMATERIAL,tsg,cm.goal,Group.FromCards(tuc),minc,maxc,tp,lv,c,tuc)
if g then
g:KeepAlive()
e:SetLabelObject(g)
return true
else return false end
end
function cm.synop(e,tp,eg,ep,ev,re,r,rp,c,tuner,mg)
local g=e:GetLabelObject()
c:SetMaterial(g)
if g:IsExists(Card.IsLocation,1,nil,LOCATION_EXTRA) then Duel.RegisterFlagEffect(tp,m,RESET_PHASE+PHASE_END,0,1) end
Duel.SendtoGrave(g,REASON_MATERIAL+REASON_SYNCHRO)
g:DeleteGroup()
end
function cm.destg(e,tp,eg,ep,ev,re,r,rp,chk,chkc)
local c=e:GetHandler()
......@@ -207,27 +33,5 @@ function cm.desop(e,tp,eg,ep,ev,re,r,rp)
Duel.SendtoExtraP(sg,tp,REASON_EFFECT)
end
end
local e1=Effect.CreateEffect(c)
e1:SetType(EFFECT_TYPE_FIELD+EFFECT_TYPE_CONTINUOUS)
e1:SetCode(EVENT_FREE_CHAIN)
e1:SetCountLimit(1)
e1:SetCondition(cm.con)
e1:SetOperation(cm.op)
e1:SetReset(RESET_PHASE+PHASE_END)
Duel.RegisterEffect(e1,tp)
end
function cm.filter2(c)
return c:IsType(TYPE_PENDULUM) and c:IsLevelBelow(4) and not c:IsType(TYPE_EFFECT) and not c:IsForbidden()
end
function cm.con(e,tp,eg,ep,ev,re,r,rp)
return Duel.IsExistingMatchingCard(cm.filter2,tp,LOCATION_GRAVE,0,1,nil) and (Duel.CheckLocation(tp,LOCATION_PZONE,0) or Duel.CheckLocation(tp,LOCATION_PZONE,1))
end
function cm.op(e,tp,eg,ep,ev,re,r,rp)
Duel.Hint(HINT_CARD,0,m)
Duel.Hint(HINT_SELECTMSG,tp,HINTMSG_TOFIELD)
local g=Duel.SelectMatchingCard(tp,cm.filter2,tp,LOCATION_GRAVE,0,1,1,nil)
local tc=g:GetFirst()
if tc then
Duel.MoveToField(tc,tp,tp,LOCATION_PZONE,POS_FACEUP,true)
end
SNNM.HTFPlacePZone(c,4,LOCATION_GRAVE,0,EVENT_FREE_CHAIN,m)
end
local m=53715011
local cm=_G["c"..m]
cm.name="欢乐树友 甘党"
if not pcall(function() require("expansions/script/c53702500") end) then require("script/c53702500") end
function cm.initial_effect(c)
aux.EnablePendulumAttribute(c,false)
c:EnableReviveLimit()
local e0=Effect.CreateEffect(c)
e0:SetDescription(1164)
e0:SetType(EFFECT_TYPE_FIELD)
e0:SetCode(EFFECT_SPSUMMON_PROC)
e0:SetProperty(EFFECT_FLAG_UNCOPYABLE+EFFECT_FLAG_IGNORE_IMMUNE)
e0:SetRange(LOCATION_EXTRA)
e0:SetCondition(cm.syncon)
e0:SetTarget(cm.syntg)
e0:SetOperation(cm.synop)
e0:SetValue(SUMMON_TYPE_SYNCHRO)
c:RegisterEffect(e0)
SNNM.HTFSynchoro(c,0,m)
local e1=Effect.CreateEffect(c)
e1:SetDescription(aux.Stringid(m,0))
e1:SetCategory(CATEGORY_DESTROY+CATEGORY_SEARCH+CATEGORY_TOHAND)
......@@ -25,169 +14,6 @@ function cm.initial_effect(c)
e1:SetTarget(cm.destg)
e1:SetOperation(cm.desop)
c:RegisterEffect(e1)
--double tuner check
local e9=Effect.CreateEffect(c)
e9:SetType(EFFECT_TYPE_SINGLE)
e9:SetCode(EFFECT_MATERIAL_CHECK)
e9:SetValue(cm.valcheck)
c:RegisterEffect(e9)
end
function cm.valcheck(e,c)
local g=c:GetMaterial()
if g:IsExists(Card.IsType,2,nil,TYPE_TUNER) then
local e1=Effect.CreateEffect(c)
e1:SetType(EFFECT_TYPE_SINGLE)
e1:SetProperty(EFFECT_FLAG_CANNOT_DISABLE+EFFECT_FLAG_UNCOPYABLE)
e1:SetCode(21142671)
e1:SetReset(RESET_EVENT+RESETS_STANDARD-RESET_TOFIELD+RESET_PHASE+PHASE_END)
c:RegisterEffect(e1)
end
end
function cm.CheckGroupRecursive(c,sg,g,f,min,max,ext_params)
sg:AddCard(c)
local ct=sg:GetCount()
local res=(ct>=min and f(sg,table.unpack(ext_params)))
or (ct<max and g:IsExists(cm.CheckGroupRecursive,1,sg,sg,g,f,min,max,ext_params))
sg:RemoveCard(c)
return res
end
function cm.CheckGroup(g,f,cg,min,max,...)
local min=min or 1
local max=max or g:GetCount()
if min>max then return false end
local ext_params={...}
local sg=Group.CreateGroup()
if cg then sg:Merge(cg) end
local ct=sg:GetCount()
if ct>=min and ct<max and f(sg,...) then return true end
return g:IsExists(cm.CheckGroupRecursive,1,sg,sg,g,f,min,max,ext_params)
end
function cm.val(c,syncard)
local slv=c:GetSynchroLevel(syncard)
return slv
end
function cm.SelectGroup(tp,desc,g,f,cg,min,max,...)
local min=min or 1
local max=max or g:GetCount()
local ext_params={...}
local sg=Group.CreateGroup()
if cg then sg:Merge(cg) end
local ct=sg:GetCount()
while ct<max and not (ct>=min and f(sg,...) and not (g:IsExists(cm.CheckGroupRecursive,1,sg,sg,g,f,min,max,ext_params) and Duel.SelectYesNo(tp,210))) do
Duel.Hint(HINT_SELECTMSG,tp,desc)
local tg=g:FilterSelect(tp,cm.CheckGroupRecursive,1,1,sg,sg,g,f,min,max,ext_params)
if tg:GetCount()==0 then error("Incorrect Group Filter",2) end
sg:Merge(tg)
ct=sg:GetCount()
end
return sg
end
function cm.matfilter1(c,syncard,tp)
if c:IsFacedown() then return false end
if not c:IsType(TYPE_EFFECT) and c:IsSynchroType(TYPE_PENDULUM) and c:IsControler(tp) and c:IsLocation(LOCATION_EXTRA) and c:IsFaceup() and c:IsType(TYPE_TUNER) then return true end
return c:IsSynchroType(TYPE_TUNER) and c:IsCanBeSynchroMaterial(syncard) and (c:IsFaceup() or not c:IsLocation(LOCATION_MZONE))
and (not c:IsType(TYPE_EFFECT) or not (c:IsLocation(LOCATION_EXTRA) and c:IsFaceup()))
end
function cm.matfilter2(c,syncard,tp)
if not c:IsType(TYPE_EFFECT) and c:IsSynchroType(TYPE_PENDULUM) and c:IsControler(tp) and c:IsLocation(LOCATION_EXTRA) and c:IsFaceup() then return true end
return c:IsSynchroType(TYPE_PENDULUM) and (c:IsLocation(LOCATION_HAND) or c:IsFaceup()) and c:IsCanBeSynchroMaterial(syncard)
and (c:IsFaceup() or not c:IsLocation(LOCATION_MZONE)) and (not c:IsType(TYPE_EFFECT) or not (c:IsLocation(LOCATION_EXTRA) and c:IsFaceup()))
end
function cm.synfilter(c,syncard,lv,g2,g3,minc,maxc,tp)
local tsg=c:IsHasEffect(EFFECT_HAND_SYNCHRO) and g3 or g2
local f=c.tuner_filter
if c.tuner_filter then tsg=tsg:Filter(f,nil) end
return cm.CheckGroup(tsg,cm.goal,Group.FromCards(c),minc,maxc,tp,lv,syncard,c)
end
function cm.goal(g,tp,lv,syncard,tuc)
if Duel.GetLocationCountFromEx(tp,tp,g,syncard)<=0 then return false end
if tuc:IsHasEffect(EFFECT_HAND_SYNCHRO) and g:IsExists(Card.IsLocation,2,tuc,LOCATION_HAND) then return false end
local ct=g:GetCount()
return g:CheckWithSumEqual(cm.val,lv,ct,ct,syncard)
end
function cm.syncon(e,c,tuner,mg)
if c==nil then return true end
if c:IsType(TYPE_PENDULUM) and c:IsFaceup() then return false end
local tp=c:GetControler()
local minc=2
local maxc=c:GetLevel()
local g1=nil
local g2=nil
local g3=nil
if mg then
g1=mg:Filter(cm.matfilter1,nil,c,tp)
g2=mg:Filter(cm.matfilter2,nil,c)
g3=g2:Clone()
else
if Duel.GetFlagEffect(tp,m)==0 then
g1=Duel.GetMatchingGroup(cm.matfilter1,tp,LOCATION_MZONE+LOCATION_EXTRA,LOCATION_MZONE,nil,c,tp)
g2=Duel.GetMatchingGroup(cm.matfilter2,tp,LOCATION_MZONE+LOCATION_EXTRA,LOCATION_MZONE,nil,c)
else
g1=Duel.GetMatchingGroup(cm.matfilter1,tp,LOCATION_MZONE,LOCATION_MZONE,nil,c,tp)
g2=Duel.GetMatchingGroup(cm.matfilter2,tp,LOCATION_MZONE,LOCATION_MZONE,nil,c)
end
g3=Duel.GetMatchingGroup(cm.matfilter2,tp,LOCATION_MZONE+LOCATION_HAND,LOCATION_MZONE,nil,c)
end
local lv=c:GetLevel()
local sg=nil
if tuner then
return cm.matfilter1(c,tp) and cm.synfilter(tuner,c,lv,g2,g3,minc,maxc,tp)
else
return g1:IsExists(cm.synfilter,1,nil,c,lv,g2,g3,minc,maxc,tp)
end
end
function cm.syntg(e,tp,eg,ep,ev,re,r,rp,chk,c,tuner,mg)
local minc=2
local maxc=c:GetLevel()
local g1=nil
local g2=nil
local g3=nil
if mg then
g1=mg:Filter(cm.matfilter1,nil,c,tp)
g2=mg:Filter(cm.matfilter2,nil,c)
g3=g2:Clone()
else
if Duel.GetFlagEffect(tp,m)==0 then
g1=Duel.GetMatchingGroup(cm.matfilter1,tp,LOCATION_MZONE+LOCATION_EXTRA,LOCATION_MZONE,nil,c,tp)
g2=Duel.GetMatchingGroup(cm.matfilter2,tp,LOCATION_MZONE+LOCATION_EXTRA,LOCATION_MZONE,nil,c)
else
g1=Duel.GetMatchingGroup(cm.matfilter1,tp,LOCATION_MZONE,LOCATION_MZONE,nil,c,tp)
g2=Duel.GetMatchingGroup(cm.matfilter2,tp,LOCATION_MZONE,LOCATION_MZONE,nil,c)
end
g3=Duel.GetMatchingGroup(cm.matfilter2,tp,LOCATION_MZONE+LOCATION_HAND,LOCATION_MZONE,nil,c)
end
local pe=Duel.IsPlayerAffectedByEffect(tp,EFFECT_MUST_BE_SMATERIAL)
local lv=c:GetLevel()
local tuc=nil
if tuner then
tuner=tuc
else
Duel.Hint(HINT_SELECTMSG,tp,HINTMSG_SMATERIAL)
if not pe then
local t1=g1:FilterSelect(tp,cm.synfilter,1,1,nil,c,lv,g2,g3,minc,maxc,tp)
tuc=t1:GetFirst()
else
tuc=pe:GetOwner()
Group.FromCards(tuc):Select(tp,1,1,nil)
end
end
tuc:RegisterFlagEffect(m,RESET_EVENT+0x1fe0000,0,1)
local tsg=tuc:IsHasEffect(EFFECT_HAND_SYNCHRO) and g3 or g2
local f=tuc.tuner_filter
if tuc.tuner_filter then tsg=tsg:Filter(f,nil) end
local g=cm.SelectGroup(tp,HINTMSG_SMATERIAL,tsg,cm.goal,Group.FromCards(tuc),minc,maxc,tp,lv,c,tuc)
if g then
g:KeepAlive()
e:SetLabelObject(g)
return true
else return false end
end
function cm.synop(e,tp,eg,ep,ev,re,r,rp,c,tuner,mg)
local g=e:GetLabelObject()
c:SetMaterial(g)
if g:IsExists(Card.IsLocation,1,nil,LOCATION_EXTRA) then Duel.RegisterFlagEffect(tp,m,RESET_PHASE+PHASE_END,0,1) end
Duel.SendtoGrave(g,REASON_MATERIAL+REASON_SYNCHRO)
g:DeleteGroup()
end
function cm.cfilter(c)
return c:IsFaceup() and c:IsType(TYPE_PENDULUM) and c:IsAbleToGraveAsCost()
......@@ -222,27 +48,5 @@ function cm.desop(e,tp,eg,ep,ev,re,r,rp)
Duel.ConfirmCards(1-tp,sg)
end
end
local e1=Effect.CreateEffect(c)
e1:SetType(EFFECT_TYPE_FIELD+EFFECT_TYPE_CONTINUOUS)
e1:SetCode(EVENT_FREE_CHAIN)
e1:SetCountLimit(1)
e1:SetCondition(cm.con)
e1:SetOperation(cm.op)
e1:SetReset(RESET_PHASE+PHASE_END)
Duel.RegisterEffect(e1,tp)
end
function cm.filter2(c)
return c:IsType(TYPE_PENDULUM) and c:IsLevelBelow(4) and not c:IsType(TYPE_EFFECT) and not c:IsForbidden()
end
function cm.con(e,tp,eg,ep,ev,re,r,rp)
return Duel.IsExistingMatchingCard(cm.filter2,tp,LOCATION_GRAVE,0,1,nil) and (Duel.CheckLocation(tp,LOCATION_PZONE,0) or Duel.CheckLocation(tp,LOCATION_PZONE,1))
end
function cm.op(e,tp,eg,ep,ev,re,r,rp)
Duel.Hint(HINT_CARD,0,m)
Duel.Hint(HINT_SELECTMSG,tp,HINTMSG_TOFIELD)
local g=Duel.SelectMatchingCard(tp,cm.filter2,tp,LOCATION_GRAVE,0,1,1,nil)
local tc=g:GetFirst()
if tc then
Duel.MoveToField(tc,tp,tp,LOCATION_PZONE,POS_FACEUP,true)
end
SNNM.HTFPlacePZone(c,4,LOCATION_GRAVE,0,EVENT_FREE_CHAIN,m)
end
local m=53715012
local cm=_G["c"..m]
cm.name="欢乐树友 父子"
if not pcall(function() require("expansions/script/c53702500") end) then require("script/c53702500") end
function cm.initial_effect(c)
aux.EnablePendulumAttribute(c)
local e1=Effect.CreateEffect(c)
......@@ -47,27 +48,5 @@ function cm.desop(e,tp,eg,ep,ev,re,r,rp)
Duel.SendtoExtraP(pg1,tp,REASON_EFFECT)
end
end
local e1=Effect.CreateEffect(c)
e1:SetType(EFFECT_TYPE_FIELD+EFFECT_TYPE_CONTINUOUS)
e1:SetCode(EVENT_FREE_CHAIN)
e1:SetCountLimit(1)
e1:SetCondition(cm.con)
e1:SetOperation(cm.op)
e1:SetReset(RESET_PHASE+PHASE_END)
Duel.RegisterEffect(e1,tp)
end
function cm.filter2(c)
return c:IsType(TYPE_PENDULUM) and c:IsLevelBelow(2) and not c:IsType(TYPE_EFFECT) and not c:IsForbidden()
end
function cm.con(e,tp,eg,ep,ev,re,r,rp)
return Duel.IsExistingMatchingCard(cm.filter2,tp,LOCATION_GRAVE,0,1,nil) and (Duel.CheckLocation(tp,LOCATION_PZONE,0) or Duel.CheckLocation(tp,LOCATION_PZONE,1))
end
function cm.op(e,tp,eg,ep,ev,re,r,rp)
Duel.Hint(HINT_CARD,0,m)
Duel.Hint(HINT_SELECTMSG,tp,HINTMSG_TOFIELD)
local g=Duel.SelectMatchingCard(tp,cm.filter2,tp,LOCATION_GRAVE,0,1,1,nil)
local tc=g:GetFirst()
if tc then
Duel.MoveToField(tc,tp,tp,LOCATION_PZONE,POS_FACEUP,true)
end
SNNM.HTFPlacePZone(c,2,LOCATION_GRAVE,0,EVENT_FREE_CHAIN,m)
end
local m=53715013
local cm=_G["c"..m]
cm.name="欢乐树友 科学"
if not pcall(function() require("expansions/script/c53702500") end) then require("script/c53702500") end
function cm.initial_effect(c)
aux.EnablePendulumAttribute(c)
local e1=Effect.CreateEffect(c)
......@@ -30,27 +31,5 @@ function cm.desop(e,tp,eg,ep,ev,re,r,rp)
Duel.SendtoGrave(sg,REASON_EFFECT)
end
end
local e1=Effect.CreateEffect(c)
e1:SetType(EFFECT_TYPE_FIELD+EFFECT_TYPE_CONTINUOUS)
e1:SetCode(EVENT_FREE_CHAIN)
e1:SetCountLimit(1)
e1:SetCondition(cm.con)
e1:SetOperation(cm.op)
e1:SetReset(RESET_PHASE+PHASE_END)
Duel.RegisterEffect(e1,tp)
end
function cm.filter2(c)
return c:IsType(TYPE_PENDULUM) and c:IsLevelBelow(2) and not c:IsType(TYPE_EFFECT) and not c:IsForbidden()
end
function cm.con(e,tp,eg,ep,ev,re,r,rp)
return Duel.IsExistingMatchingCard(cm.filter2,tp,LOCATION_GRAVE,0,1,nil) and (Duel.CheckLocation(tp,LOCATION_PZONE,0) or Duel.CheckLocation(tp,LOCATION_PZONE,1))
end
function cm.op(e,tp,eg,ep,ev,re,r,rp)
Duel.Hint(HINT_CARD,0,m)
Duel.Hint(HINT_SELECTMSG,tp,HINTMSG_TOFIELD)
local g=Duel.SelectMatchingCard(tp,cm.filter2,tp,LOCATION_GRAVE,0,1,1,nil)
local tc=g:GetFirst()
if tc then
Duel.MoveToField(tc,tp,tp,LOCATION_PZONE,POS_FACEUP,true)
end
SNNM.HTFPlacePZone(c,2,LOCATION_GRAVE,0,EVENT_FREE_CHAIN,m)
end
local m=53715014
local cm=_G["c"..m]
cm.name="欢乐树友? 盲人"
if not pcall(function() require("expansions/script/c53702500") end) then require("script/c53702500") end
function cm.initial_effect(c)
c:EnableReviveLimit()
local e0=Effect.CreateEffect(c)
e0:SetDescription(1164)
e0:SetType(EFFECT_TYPE_FIELD)
e0:SetCode(EFFECT_SPSUMMON_PROC)
e0:SetProperty(EFFECT_FLAG_UNCOPYABLE+EFFECT_FLAG_IGNORE_IMMUNE)
e0:SetRange(LOCATION_EXTRA)
e0:SetCondition(cm.syncon)
e0:SetTarget(cm.syntg)
e0:SetOperation(cm.synop)
e0:SetValue(SUMMON_TYPE_SYNCHRO)
c:RegisterEffect(e0)
local e2=Effect.CreateEffect(c)
e2:SetDescription(aux.Stringid(m,2))
e2:SetCategory(CATEGORY_TODECK)
e2:SetType(EFFECT_TYPE_IGNITION)
e2:SetRange(LOCATION_GRAVE)
e2:SetProperty(EFFECT_FLAG_CARD_TARGET)
e2:SetCondition(aux.exccon)
e2:SetTarget(cm.tdtg)
e2:SetOperation(cm.tdop)
c:RegisterEffect(e2)
local e3=Effect.CreateEffect(c)
e3:SetType(EFFECT_TYPE_SINGLE+EFFECT_TYPE_CONTINUOUS)
e3:SetProperty(EFFECT_FLAG_CANNOT_DISABLE)
e3:SetCode(EVENT_SPSUMMON_SUCCESS)
e3:SetCondition(cm.matcon)
e3:SetOperation(cm.matop)
c:RegisterEffect(e3)
local e4=Effect.CreateEffect(c)
e4:SetType(EFFECT_TYPE_SINGLE)
e4:SetCode(EFFECT_MATERIAL_CHECK)
e4:SetValue(cm.valcheck)
e4:SetLabelObject(e3)
c:RegisterEffect(e4)
SNNM.HTFSynchoro(c,5,m)
local e5=Effect.CreateEffect(c)
e5:SetDescription(aux.Stringid(m,1))
e5:SetCategory(CATEGORY_TOHAND)
......@@ -49,182 +16,6 @@ function cm.initial_effect(c)
e5:SetTarget(cm.thtg)
e5:SetOperation(cm.thop)
c:RegisterEffect(e5)
--double tuner check
local e9=Effect.CreateEffect(c)
e9:SetType(EFFECT_TYPE_SINGLE)
e9:SetCode(EFFECT_MATERIAL_CHECK)
e9:SetValue(cm.valcheck)
c:RegisterEffect(e9)
end
function cm.valcheck(e,c)
local g=c:GetMaterial()
if g:IsExists(Card.IsType,2,nil,TYPE_TUNER) then
local e1=Effect.CreateEffect(c)
e1:SetType(EFFECT_TYPE_SINGLE)
e1:SetProperty(EFFECT_FLAG_CANNOT_DISABLE+EFFECT_FLAG_UNCOPYABLE)
e1:SetCode(21142671)
e1:SetReset(RESET_EVENT+RESETS_STANDARD-RESET_TOFIELD+RESET_PHASE+PHASE_END)
c:RegisterEffect(e1)
end
end
function cm.CheckGroupRecursive(c,sg,g,f,min,max,ext_params)
sg:AddCard(c)
local ct=sg:GetCount()
local res=(ct>=min and f(sg,table.unpack(ext_params)))
or (ct<max and g:IsExists(cm.CheckGroupRecursive,1,sg,sg,g,f,min,max,ext_params))
sg:RemoveCard(c)
return res
end
function cm.CheckGroup(g,f,cg,min,max,...)
local min=min or 1
local max=max or g:GetCount()
if min>max then return false end
local ext_params={...}
local sg=Group.CreateGroup()
if cg then sg:Merge(cg) end
local ct=sg:GetCount()
if ct>=min and ct<max and f(sg,...) then return true end
return g:IsExists(cm.CheckGroupRecursive,1,sg,sg,g,f,min,max,ext_params)
end
function cm.val(c,syncard)
local slv=c:GetSynchroLevel(syncard)
if c:IsSynchroType(TYPE_PENDULUM) and c:IsFaceup() and c:IsLocation(LOCATION_EXTRA) and not c:IsType(TYPE_EFFECT) then
slv=1
end
return slv
end
function cm.SelectGroup(tp,desc,g,f,cg,min,max,...)
local min=min or 1
local max=max or g:GetCount()
local ext_params={...}
local sg=Group.CreateGroup()
if cg then sg:Merge(cg) end
local ct=sg:GetCount()
while ct<max and not (ct>=min and f(sg,...) and not (g:IsExists(cm.CheckGroupRecursive,1,sg,sg,g,f,min,max,ext_params) and Duel.SelectYesNo(tp,210))) do
Duel.Hint(HINT_SELECTMSG,tp,desc)
local tg=g:FilterSelect(tp,cm.CheckGroupRecursive,1,1,sg,sg,g,f,min,max,ext_params)
if tg:GetCount()==0 then error("Incorrect Group Filter",2) end
sg:Merge(tg)
ct=sg:GetCount()
end
return sg
end
function cm.matfilter1(c,syncard,tp)
if c:IsFacedown() or not c:IsSynchroType(TYPE_SYNCHRO) then return false end
if not c:IsType(TYPE_EFFECT) and c:IsSynchroType(TYPE_PENDULUM) and c:IsControler(tp) and c:IsLocation(LOCATION_EXTRA) and c:IsFaceup() and c:IsType(TYPE_TUNER) then return true end
return c:IsSynchroType(TYPE_TUNER) and c:IsCanBeSynchroMaterial(syncard) and (c:IsFaceup() or not c:IsLocation(LOCATION_MZONE))
and (not c:IsType(TYPE_EFFECT) or not (c:IsLocation(LOCATION_EXTRA) and c:IsFaceup()))
end
function cm.matfilter2(c,syncard)
if not c:IsType(TYPE_EFFECT) and c:IsSynchroType(TYPE_PENDULUM) and c:IsControler(tp) and c:IsLocation(LOCATION_EXTRA) and c:IsFaceup() then return true end
return c:IsSynchroType(TYPE_PENDULUM) and (c:IsLocation(LOCATION_HAND) or c:IsFaceup()) and c:IsCanBeSynchroMaterial(syncard)
and (c:IsFaceup() or not c:IsLocation(LOCATION_MZONE)) and (not c:IsType(TYPE_EFFECT) or not (c:IsLocation(LOCATION_EXTRA) and c:IsFaceup()))
end
function cm.synfilter(c,syncard,lv,g2,g3,minc,maxc,tp)
local tsg=c:IsHasEffect(EFFECT_HAND_SYNCHRO) and g3 or g2
local f=c.tuner_filter
if c.tuner_filter then tsg=tsg:Filter(f,nil) end
return cm.CheckGroup(tsg,cm.goal,Group.FromCards(c),minc,maxc,tp,lv,syncard,c)
end
function cm.goal(g,tp,lv,syncard,tuc)
if Duel.GetLocationCountFromEx(tp,tp,g,syncard)<=0 then return false end
if tuc:IsHasEffect(EFFECT_HAND_SYNCHRO) and g:IsExists(Card.IsLocation,2,tuc,LOCATION_HAND) then return false end
local ct=g:GetCount()
return g:CheckWithSumEqual(cm.val,lv,ct,ct,syncard)
end
function cm.syncon(e,c,tuner,mg)
if c==nil then return true end
if c:IsType(TYPE_PENDULUM) and c:IsFaceup() then return false end
local tp=c:GetControler()
local minc=2
local maxc=c:GetLevel()
local g1=nil
local g2=nil
local g3=nil
if mg then
g1=mg:Filter(cm.matfilter1,nil,c,tp)
g2=mg:Filter(cm.matfilter2,nil,c)
g3=g2:Clone()
else
if Duel.GetFlagEffect(tp,m)==0 then
g1=Duel.GetMatchingGroup(cm.matfilter1,tp,LOCATION_MZONE+LOCATION_EXTRA,LOCATION_MZONE,nil,c,tp)
g2=Duel.GetMatchingGroup(cm.matfilter2,tp,LOCATION_MZONE+LOCATION_EXTRA,LOCATION_MZONE,nil,c)
else
g1=Duel.GetMatchingGroup(cm.matfilter1,tp,LOCATION_MZONE,LOCATION_MZONE,nil,c,tp)
g2=Duel.GetMatchingGroup(cm.matfilter2,tp,LOCATION_MZONE,LOCATION_MZONE,nil,c)
end
g3=Duel.GetMatchingGroup(cm.matfilter2,tp,LOCATION_MZONE+LOCATION_HAND,LOCATION_MZONE,nil,c)
end
local lv=c:GetLevel()
local sg=nil
if tuner then
return cm.matfilter1(c,tp) and cm.synfilter(tuner,c,lv,g2,g3,minc,maxc,tp)
else
return g1:IsExists(cm.synfilter,1,nil,c,lv,g2,g3,minc,maxc,tp)
end
end
function cm.syntg(e,tp,eg,ep,ev,re,r,rp,chk,c,tuner,mg)
local minc=2
local maxc=c:GetLevel()
local g1=nil
local g2=nil
local g3=nil
if mg then
g1=mg:Filter(cm.matfilter1,nil,c,tp)
g2=mg:Filter(cm.matfilter2,nil,c)
g3=g2:Clone()
else
if Duel.GetFlagEffect(tp,m)==0 then
g1=Duel.GetMatchingGroup(cm.matfilter1,tp,LOCATION_MZONE+LOCATION_EXTRA,LOCATION_MZONE,nil,c,tp)
g2=Duel.GetMatchingGroup(cm.matfilter2,tp,LOCATION_MZONE+LOCATION_EXTRA,LOCATION_MZONE,nil,c)
else
g1=Duel.GetMatchingGroup(cm.matfilter1,tp,LOCATION_MZONE,LOCATION_MZONE,nil,c,tp)
g2=Duel.GetMatchingGroup(cm.matfilter2,tp,LOCATION_MZONE,LOCATION_MZONE,nil,c)
end
g3=Duel.GetMatchingGroup(cm.matfilter2,tp,LOCATION_MZONE+LOCATION_HAND,LOCATION_MZONE,nil,c)
end
local pe=Duel.IsPlayerAffectedByEffect(tp,EFFECT_MUST_BE_SMATERIAL)
local lv=c:GetLevel()
local tuc=nil
if tuner then
tuner=tuc
else
Duel.Hint(HINT_SELECTMSG,tp,HINTMSG_SMATERIAL)
if not pe then
local t1=g1:FilterSelect(tp,cm.synfilter,1,1,nil,c,lv,g2,g3,minc,maxc,tp)
tuc=t1:GetFirst()
else
tuc=pe:GetOwner()
Group.FromCards(tuc):Select(tp,1,1,nil)
end
end
tuc:RegisterFlagEffect(m,RESET_EVENT+0x1fe0000,0,1)
local tsg=tuc:IsHasEffect(EFFECT_HAND_SYNCHRO) and g3 or g2
local f=tuc.tuner_filter
if tuc.tuner_filter then tsg=tsg:Filter(f,nil) end
local g=cm.SelectGroup(tp,HINTMSG_SMATERIAL,tsg,cm.goal,Group.FromCards(tuc),minc,maxc,tp,lv,c,tuc)
if g then
g:KeepAlive()
e:SetLabelObject(g)
return true
else return false end
end
function cm.synop(e,tp,eg,ep,ev,re,r,rp,c,tuner,mg)
local g=e:GetLabelObject()
c:SetMaterial(g)
if g:IsExists(Card.IsLocation,1,nil,LOCATION_EXTRA) then Duel.RegisterFlagEffect(tp,m,RESET_PHASE+PHASE_END,0,1) end
Duel.SendtoGrave(g,REASON_MATERIAL+REASON_SYNCHRO)
g:DeleteGroup()
end
function cm.matcon(e,tp,eg,ep,ev,re,r,rp)
return e:GetHandler():IsSummonType(SUMMON_TYPE_SYNCHRO) and e:GetLabel()==1
end
function cm.matop(e,tp,eg,ep,ev,re,r,rp)
e:GetHandler():RegisterFlagEffect(m,RESET_EVENT+RESETS_STANDARD,EFFECT_FLAG_CLIENT_HINT,1,0,aux.Stringid(m,0))
end
function cm.valcheck(e,c)
if c:GetMaterialCount()==5 then e:GetLabelObject():SetLabel(1)
else e:GetLabelObject():SetLabel(0) end
end
function cm.thfilter(c)
return c:IsFaceup() and c:IsAbleToHand()
......@@ -242,23 +33,3 @@ function cm.thop(e,tp,eg,ep,ev,re,r,rp)
Duel.SendtoHand(tc,nil,REASON_EFFECT)
end
end
function cm.tdfilter(c)
return c:IsType(TYPE_MONSTER) and not c:IsType(TYPE_EFFECT) and c:IsAbleToDeck()
end
function cm.tdtg(e,tp,eg,ep,ev,re,r,rp,chk,chkc)
if chkc then return chkc:IsLocation(LOCATION_GRAVE) and chkc:IsControler(tp) and cm.filter(chkc) end
if chk==0 then return e:GetHandler():IsAbleToExtra()
and Duel.IsExistingTarget(cm.tdfilter,tp,LOCATION_GRAVE,0,1,e:GetHandler()) end
Duel.Hint(HINT_SELECTMSG,tp,HINTMSG_TODECK)
local g=Duel.SelectTarget(tp,cm.tdfilter,tp,LOCATION_GRAVE,0,1,5,e:GetHandler())
g:AddCard(e:GetHandler())
Duel.SetOperationInfo(0,CATEGORY_TODECK,g,g:GetCount(),0,0)
end
function cm.tdop(e,tp,eg,ep,ev,re,r,rp)
local c=e:GetHandler()
local g=Duel.GetChainInfo(0,CHAININFO_TARGET_CARDS):Filter(Card.IsRelateToEffect,nil,e)
if c:IsRelateToEffect(e) and #g>0 then
g:AddCard(c)
Duel.SendtoDeck(g,nil,2,REASON_EFFECT)
end
end
local m=53715015
local cm=_G["c"..m]
cm.name="欢乐树友? 军人"
if not pcall(function() require("expansions/script/c53702500") end) then require("script/c53702500") end
function cm.initial_effect(c)
c:EnableReviveLimit()
local e0=Effect.CreateEffect(c)
e0:SetDescription(1164)
e0:SetType(EFFECT_TYPE_FIELD)
e0:SetCode(EFFECT_SPSUMMON_PROC)
e0:SetProperty(EFFECT_FLAG_UNCOPYABLE+EFFECT_FLAG_IGNORE_IMMUNE)
e0:SetRange(LOCATION_EXTRA)
e0:SetCondition(cm.syncon)
e0:SetTarget(cm.syntg)
e0:SetOperation(cm.synop)
e0:SetValue(SUMMON_TYPE_SYNCHRO)
c:RegisterEffect(e0)
local e2=Effect.CreateEffect(c)
e2:SetDescription(aux.Stringid(m,2))
e2:SetCategory(CATEGORY_TODECK)
e2:SetType(EFFECT_TYPE_IGNITION)
e2:SetRange(LOCATION_GRAVE)
e2:SetProperty(EFFECT_FLAG_CARD_TARGET)
e2:SetCondition(aux.exccon)
e2:SetTarget(cm.tdtg)
e2:SetOperation(cm.tdop)
c:RegisterEffect(e2)
local e3=Effect.CreateEffect(c)
e3:SetType(EFFECT_TYPE_SINGLE+EFFECT_TYPE_CONTINUOUS)
e3:SetProperty(EFFECT_FLAG_CANNOT_DISABLE)
e3:SetCode(EVENT_SPSUMMON_SUCCESS)
e3:SetCondition(cm.matcon)
e3:SetOperation(cm.matop)
c:RegisterEffect(e3)
local e4=Effect.CreateEffect(c)
e4:SetType(EFFECT_TYPE_SINGLE)
e4:SetCode(EFFECT_MATERIAL_CHECK)
e4:SetValue(cm.valcheck)
e4:SetLabelObject(e3)
c:RegisterEffect(e4)
SNNM.HTFSynchoro(c,6,m)
local e7=Effect.CreateEffect(c)
e7:SetType(EFFECT_TYPE_FIELD+EFFECT_TYPE_CONTINUOUS)
e7:SetCode(EVENT_BE_BATTLE_TARGET)
......@@ -44,202 +11,6 @@ function cm.initial_effect(c)
e7:SetCondition(cm.con)
e7:SetOperation(cm.op)
c:RegisterEffect(e7)
--double tuner check
local e9=Effect.CreateEffect(c)
e9:SetType(EFFECT_TYPE_SINGLE)
e9:SetCode(EFFECT_MATERIAL_CHECK)
e9:SetValue(cm.valcheck)
c:RegisterEffect(e9)
end
function cm.valcheck(e,c)
local g=c:GetMaterial()
if g:IsExists(Card.IsType,2,nil,TYPE_TUNER) then
local e1=Effect.CreateEffect(c)
e1:SetType(EFFECT_TYPE_SINGLE)
e1:SetProperty(EFFECT_FLAG_CANNOT_DISABLE+EFFECT_FLAG_UNCOPYABLE)
e1:SetCode(21142671)
e1:SetReset(RESET_EVENT+RESETS_STANDARD-RESET_TOFIELD+RESET_PHASE+PHASE_END)
c:RegisterEffect(e1)
end
end
function cm.CheckGroupRecursive(c,sg,g,f,min,max,ext_params)
sg:AddCard(c)
local ct=sg:GetCount()
local res=(ct>=min and f(sg,table.unpack(ext_params)))
or (ct<max and g:IsExists(cm.CheckGroupRecursive,1,sg,sg,g,f,min,max,ext_params))
sg:RemoveCard(c)
return res
end
function cm.CheckGroup(g,f,cg,min,max,...)
local min=min or 1
local max=max or g:GetCount()
if min>max then return false end
local ext_params={...}
local sg=Group.CreateGroup()
if cg then sg:Merge(cg) end
local ct=sg:GetCount()
if ct>=min and ct<max and f(sg,...) then return true end
return g:IsExists(cm.CheckGroupRecursive,1,sg,sg,g,f,min,max,ext_params)
end
function cm.val(c,syncard)
local slv=c:GetSynchroLevel(syncard)
if c:IsSynchroType(TYPE_PENDULUM) and c:IsFaceup() and c:IsLocation(LOCATION_EXTRA) and not c:IsType(TYPE_EFFECT) then
slv=1
end
return slv
end
function cm.SelectGroup(tp,desc,g,f,cg,min,max,...)
local min=min or 1
local max=max or g:GetCount()
local ext_params={...}
local sg=Group.CreateGroup()
if cg then sg:Merge(cg) end
local ct=sg:GetCount()
while ct<max and not (ct>=min and f(sg,...) and not (g:IsExists(cm.CheckGroupRecursive,1,sg,sg,g,f,min,max,ext_params) and Duel.SelectYesNo(tp,210))) do
Duel.Hint(HINT_SELECTMSG,tp,desc)
local tg=g:FilterSelect(tp,cm.CheckGroupRecursive,1,1,sg,sg,g,f,min,max,ext_params)
if tg:GetCount()==0 then error("Incorrect Group Filter",2) end
sg:Merge(tg)
ct=sg:GetCount()
end
return sg
end
function cm.matfilter1(c,syncard,tp)
if c:IsFacedown() or not c:IsSynchroType(TYPE_SYNCHRO) then return false end
if not c:IsType(TYPE_EFFECT) and c:IsSynchroType(TYPE_PENDULUM) and c:IsControler(tp) and c:IsLocation(LOCATION_EXTRA) and c:IsFaceup() and c:IsType(TYPE_TUNER) then return true end
return c:IsSynchroType(TYPE_TUNER) and c:IsCanBeSynchroMaterial(syncard) and (c:IsFaceup() or not c:IsLocation(LOCATION_MZONE))
and (not c:IsType(TYPE_EFFECT) or not (c:IsLocation(LOCATION_EXTRA) and c:IsFaceup()))
end
function cm.matfilter2(c,syncard)
if not c:IsType(TYPE_EFFECT) and c:IsSynchroType(TYPE_PENDULUM) and c:IsControler(tp) and c:IsLocation(LOCATION_EXTRA) and c:IsFaceup() then return true end
return c:IsSynchroType(TYPE_PENDULUM) and (c:IsLocation(LOCATION_HAND) or c:IsFaceup()) and c:IsCanBeSynchroMaterial(syncard)
and (c:IsFaceup() or not c:IsLocation(LOCATION_MZONE)) and (not c:IsType(TYPE_EFFECT) or not (c:IsLocation(LOCATION_EXTRA) and c:IsFaceup()))
end
function cm.synfilter(c,syncard,lv,g2,g3,minc,maxc,tp)
local tsg=c:IsHasEffect(EFFECT_HAND_SYNCHRO) and g3 or g2
local f=c.tuner_filter
if c.tuner_filter then tsg=tsg:Filter(f,nil) end
return cm.CheckGroup(tsg,cm.goal,Group.FromCards(c),minc,maxc,tp,lv,syncard,c)
end
function cm.goal(g,tp,lv,syncard,tuc)
if Duel.GetLocationCountFromEx(tp,tp,g,syncard)<=0 then return false end
if tuc:IsHasEffect(EFFECT_HAND_SYNCHRO) and g:IsExists(Card.IsLocation,2,tuc,LOCATION_HAND) then return false end
local ct=g:GetCount()
return g:CheckWithSumEqual(cm.val,lv,ct,ct,syncard)
end
function cm.syncon(e,c,tuner,mg)
if c==nil then return true end
if c:IsType(TYPE_PENDULUM) and c:IsFaceup() then return false end
local tp=c:GetControler()
local minc=2
local maxc=c:GetLevel()
local g1=nil
local g2=nil
local g3=nil
if mg then
g1=mg:Filter(cm.matfilter1,nil,c,tp)
g2=mg:Filter(cm.matfilter2,nil,c)
g3=g2:Clone()
else
if Duel.GetFlagEffect(tp,m)==0 then
g1=Duel.GetMatchingGroup(cm.matfilter1,tp,LOCATION_MZONE+LOCATION_EXTRA,LOCATION_MZONE,nil,c,tp)
g2=Duel.GetMatchingGroup(cm.matfilter2,tp,LOCATION_MZONE+LOCATION_EXTRA,LOCATION_MZONE,nil,c)
else
g1=Duel.GetMatchingGroup(cm.matfilter1,tp,LOCATION_MZONE,LOCATION_MZONE,nil,c,tp)
g2=Duel.GetMatchingGroup(cm.matfilter2,tp,LOCATION_MZONE,LOCATION_MZONE,nil,c)
end
g3=Duel.GetMatchingGroup(cm.matfilter2,tp,LOCATION_MZONE+LOCATION_HAND,LOCATION_MZONE,nil,c)
end
local lv=c:GetLevel()
local sg=nil
if tuner then
return cm.matfilter1(c,tp) and cm.synfilter(tuner,c,lv,g2,g3,minc,maxc,tp)
else
return g1:IsExists(cm.synfilter,1,nil,c,lv,g2,g3,minc,maxc,tp)
end
end
function cm.syntg(e,tp,eg,ep,ev,re,r,rp,chk,c,tuner,mg)
local minc=2
local maxc=c:GetLevel()
local g1=nil
local g2=nil
local g3=nil
if mg then
g1=mg:Filter(cm.matfilter1,nil,c,tp)
g2=mg:Filter(cm.matfilter2,nil,c)
g3=g2:Clone()
else
if Duel.GetFlagEffect(tp,m)==0 then
g1=Duel.GetMatchingGroup(cm.matfilter1,tp,LOCATION_MZONE+LOCATION_EXTRA,LOCATION_MZONE,nil,c,tp)
g2=Duel.GetMatchingGroup(cm.matfilter2,tp,LOCATION_MZONE+LOCATION_EXTRA,LOCATION_MZONE,nil,c)
else
g1=Duel.GetMatchingGroup(cm.matfilter1,tp,LOCATION_MZONE,LOCATION_MZONE,nil,c,tp)
g2=Duel.GetMatchingGroup(cm.matfilter2,tp,LOCATION_MZONE,LOCATION_MZONE,nil,c)
end
g3=Duel.GetMatchingGroup(cm.matfilter2,tp,LOCATION_MZONE+LOCATION_HAND,LOCATION_MZONE,nil,c)
end
local pe=Duel.IsPlayerAffectedByEffect(tp,EFFECT_MUST_BE_SMATERIAL)
local lv=c:GetLevel()
local tuc=nil
if tuner then
tuner=tuc
else
Duel.Hint(HINT_SELECTMSG,tp,HINTMSG_SMATERIAL)
if not pe then
local t1=g1:FilterSelect(tp,cm.synfilter,1,1,nil,c,lv,g2,g3,minc,maxc,tp)
tuc=t1:GetFirst()
else
tuc=pe:GetOwner()
Group.FromCards(tuc):Select(tp,1,1,nil)
end
end
tuc:RegisterFlagEffect(m,RESET_EVENT+0x1fe0000,0,1)
local tsg=tuc:IsHasEffect(EFFECT_HAND_SYNCHRO) and g3 or g2
local f=tuc.tuner_filter
if tuc.tuner_filter then tsg=tsg:Filter(f,nil) end
local g=cm.SelectGroup(tp,HINTMSG_SMATERIAL,tsg,cm.goal,Group.FromCards(tuc),minc,maxc,tp,lv,c,tuc)
if g then
g:KeepAlive()
e:SetLabelObject(g)
return true
else return false end
end
function cm.synop(e,tp,eg,ep,ev,re,r,rp,c,tuner,mg)
local g=e:GetLabelObject()
c:SetMaterial(g)
if g:IsExists(Card.IsLocation,1,nil,LOCATION_EXTRA) then Duel.RegisterFlagEffect(tp,m,RESET_PHASE+PHASE_END,0,1) end
Duel.SendtoGrave(g,REASON_MATERIAL+REASON_SYNCHRO)
g:DeleteGroup()
end
function cm.matcon(e,tp,eg,ep,ev,re,r,rp)
return e:GetHandler():IsSummonType(SUMMON_TYPE_SYNCHRO) and e:GetLabel()==1
end
function cm.matop(e,tp,eg,ep,ev,re,r,rp)
e:GetHandler():RegisterFlagEffect(m,RESET_EVENT+RESETS_STANDARD,EFFECT_FLAG_CLIENT_HINT,1,0,aux.Stringid(m,0))
end
function cm.valcheck(e,c)
if c:GetMaterialCount()==6 then e:GetLabelObject():SetLabel(1)
else e:GetLabelObject():SetLabel(0) end
end
function cm.tdfilter(c)
return c:IsType(TYPE_MONSTER) and not c:IsType(TYPE_EFFECT) and c:IsAbleToDeck()
end
function cm.tdtg(e,tp,eg,ep,ev,re,r,rp,chk,chkc)
if chkc then return chkc:IsLocation(LOCATION_GRAVE) and chkc:IsControler(tp) and cm.filter(chkc) end
if chk==0 then return e:GetHandler():IsAbleToExtra()
and Duel.IsExistingTarget(cm.tdfilter,tp,LOCATION_GRAVE,0,1,e:GetHandler()) end
Duel.Hint(HINT_SELECTMSG,tp,HINTMSG_TODECK)
local g=Duel.SelectTarget(tp,cm.tdfilter,tp,LOCATION_GRAVE,0,1,6,e:GetHandler())
g:AddCard(e:GetHandler())
Duel.SetOperationInfo(0,CATEGORY_TODECK,g,g:GetCount(),0,0)
end
function cm.tdop(e,tp,eg,ep,ev,re,r,rp)
local c=e:GetHandler()
local g=Duel.GetChainInfo(0,CHAININFO_TARGET_CARDS):Filter(Card.IsRelateToEffect,nil,e)
if c:IsRelateToEffect(e) and #g>0 then
g:AddCard(c)
Duel.SendtoDeck(g,nil,2,REASON_EFFECT)
end
end
function cm.con(e)
return (Duel.GetAttacker()==e:GetHandler() or Duel.GetAttackTarget()==e:GetHandler()) and e:GetHandler():GetBattleTarget()
......
local m=53715016
local cm=_G["c"..m]
cm.name="欢乐树友? 蓝英"
if not pcall(function() require("expansions/script/c53702500") end) then require("script/c53702500") end
function cm.initial_effect(c)
c:EnableReviveLimit()
local e0=Effect.CreateEffect(c)
e0:SetDescription(1164)
e0:SetType(EFFECT_TYPE_FIELD)
e0:SetCode(EFFECT_SPSUMMON_PROC)
e0:SetProperty(EFFECT_FLAG_UNCOPYABLE+EFFECT_FLAG_IGNORE_IMMUNE)
e0:SetRange(LOCATION_EXTRA)
e0:SetCondition(cm.syncon)
e0:SetTarget(cm.syntg)
e0:SetOperation(cm.synop)
e0:SetValue(SUMMON_TYPE_SYNCHRO)
c:RegisterEffect(e0)
local e2=Effect.CreateEffect(c)
e2:SetDescription(aux.Stringid(m,2))
e2:SetCategory(CATEGORY_TODECK)
e2:SetType(EFFECT_TYPE_IGNITION)
e2:SetRange(LOCATION_GRAVE)
e2:SetProperty(EFFECT_FLAG_CARD_TARGET)
e2:SetCondition(aux.exccon)
e2:SetTarget(cm.tdtg)
e2:SetOperation(cm.tdop)
c:RegisterEffect(e2)
local e3=Effect.CreateEffect(c)
e3:SetType(EFFECT_TYPE_SINGLE+EFFECT_TYPE_CONTINUOUS)
e3:SetProperty(EFFECT_FLAG_CANNOT_DISABLE)
e3:SetCode(EVENT_SPSUMMON_SUCCESS)
e3:SetCondition(cm.matcon)
e3:SetOperation(cm.matop)
c:RegisterEffect(e3)
local e4=Effect.CreateEffect(c)
e4:SetType(EFFECT_TYPE_SINGLE)
e4:SetCode(EFFECT_MATERIAL_CHECK)
e4:SetValue(cm.valcheck)
e4:SetLabelObject(e3)
c:RegisterEffect(e4)
SNNM.HTFSynchoro(c,7,m)
local e5=Effect.CreateEffect(c)
e5:SetDescription(aux.Stringid(m,1))
e5:SetCategory(CATEGORY_TODECK+CATEGORY_TOHAND)
......@@ -49,182 +16,6 @@ function cm.initial_effect(c)
e5:SetTarget(cm.thtg)
e5:SetOperation(cm.thop)
c:RegisterEffect(e5)
--double tuner check
local e9=Effect.CreateEffect(c)
e9:SetType(EFFECT_TYPE_SINGLE)
e9:SetCode(EFFECT_MATERIAL_CHECK)
e9:SetValue(cm.valcheck)
c:RegisterEffect(e9)
end
function cm.valcheck(e,c)
local g=c:GetMaterial()
if g:IsExists(Card.IsType,2,nil,TYPE_TUNER) then
local e1=Effect.CreateEffect(c)
e1:SetType(EFFECT_TYPE_SINGLE)
e1:SetProperty(EFFECT_FLAG_CANNOT_DISABLE+EFFECT_FLAG_UNCOPYABLE)
e1:SetCode(21142671)
e1:SetReset(RESET_EVENT+RESETS_STANDARD-RESET_TOFIELD+RESET_PHASE+PHASE_END)
c:RegisterEffect(e1)
end
end
function cm.CheckGroupRecursive(c,sg,g,f,min,max,ext_params)
sg:AddCard(c)
local ct=sg:GetCount()
local res=(ct>=min and f(sg,table.unpack(ext_params)))
or (ct<max and g:IsExists(cm.CheckGroupRecursive,1,sg,sg,g,f,min,max,ext_params))
sg:RemoveCard(c)
return res
end
function cm.CheckGroup(g,f,cg,min,max,...)
local min=min or 1
local max=max or g:GetCount()
if min>max then return false end
local ext_params={...}
local sg=Group.CreateGroup()
if cg then sg:Merge(cg) end
local ct=sg:GetCount()
if ct>=min and ct<max and f(sg,...) then return true end
return g:IsExists(cm.CheckGroupRecursive,1,sg,sg,g,f,min,max,ext_params)
end
function cm.val(c,syncard)
local slv=c:GetSynchroLevel(syncard)
if c:IsSynchroType(TYPE_PENDULUM) and c:IsFaceup() and c:IsLocation(LOCATION_EXTRA) and not c:IsType(TYPE_EFFECT) then
slv=1
end
return slv
end
function cm.SelectGroup(tp,desc,g,f,cg,min,max,...)
local min=min or 1
local max=max or g:GetCount()
local ext_params={...}
local sg=Group.CreateGroup()
if cg then sg:Merge(cg) end
local ct=sg:GetCount()
while ct<max and not (ct>=min and f(sg,...) and not (g:IsExists(cm.CheckGroupRecursive,1,sg,sg,g,f,min,max,ext_params) and Duel.SelectYesNo(tp,210))) do
Duel.Hint(HINT_SELECTMSG,tp,desc)
local tg=g:FilterSelect(tp,cm.CheckGroupRecursive,1,1,sg,sg,g,f,min,max,ext_params)
if tg:GetCount()==0 then error("Incorrect Group Filter",2) end
sg:Merge(tg)
ct=sg:GetCount()
end
return sg
end
function cm.matfilter1(c,syncard,tp)
if c:IsFacedown() or not c:IsSynchroType(TYPE_SYNCHRO) then return false end
if not c:IsType(TYPE_EFFECT) and c:IsSynchroType(TYPE_PENDULUM) and c:IsControler(tp) and c:IsLocation(LOCATION_EXTRA) and c:IsFaceup() and c:IsType(TYPE_TUNER) then return true end
return c:IsSynchroType(TYPE_TUNER) and c:IsCanBeSynchroMaterial(syncard) and (c:IsFaceup() or not c:IsLocation(LOCATION_MZONE))
and (not c:IsType(TYPE_EFFECT) or not (c:IsLocation(LOCATION_EXTRA) and c:IsFaceup()))
end
function cm.matfilter2(c,syncard)
if not c:IsType(TYPE_EFFECT) and c:IsSynchroType(TYPE_PENDULUM) and c:IsControler(tp) and c:IsLocation(LOCATION_EXTRA) and c:IsFaceup() then return true end
return c:IsSynchroType(TYPE_PENDULUM) and (c:IsLocation(LOCATION_HAND) or c:IsFaceup()) and c:IsCanBeSynchroMaterial(syncard)
and (c:IsFaceup() or not c:IsLocation(LOCATION_MZONE)) and (not c:IsType(TYPE_EFFECT) or not (c:IsLocation(LOCATION_EXTRA) and c:IsFaceup()))
end
function cm.synfilter(c,syncard,lv,g2,g3,minc,maxc,tp)
local tsg=c:IsHasEffect(EFFECT_HAND_SYNCHRO) and g3 or g2
local f=c.tuner_filter
if c.tuner_filter then tsg=tsg:Filter(f,nil) end
return cm.CheckGroup(tsg,cm.goal,Group.FromCards(c),minc,maxc,tp,lv,syncard,c)
end
function cm.goal(g,tp,lv,syncard,tuc)
if Duel.GetLocationCountFromEx(tp,tp,g,syncard)<=0 then return false end
if tuc:IsHasEffect(EFFECT_HAND_SYNCHRO) and g:IsExists(Card.IsLocation,2,tuc,LOCATION_HAND) then return false end
local ct=g:GetCount()
return g:CheckWithSumEqual(cm.val,lv,ct,ct,syncard)
end
function cm.syncon(e,c,tuner,mg)
if c==nil then return true end
if c:IsType(TYPE_PENDULUM) and c:IsFaceup() then return false end
local tp=c:GetControler()
local minc=2
local maxc=c:GetLevel()
local g1=nil
local g2=nil
local g3=nil
if mg then
g1=mg:Filter(cm.matfilter1,nil,c,tp)
g2=mg:Filter(cm.matfilter2,nil,c)
g3=g2:Clone()
else
if Duel.GetFlagEffect(tp,m)==0 then
g1=Duel.GetMatchingGroup(cm.matfilter1,tp,LOCATION_MZONE+LOCATION_EXTRA,LOCATION_MZONE,nil,c,tp)
g2=Duel.GetMatchingGroup(cm.matfilter2,tp,LOCATION_MZONE+LOCATION_EXTRA,LOCATION_MZONE,nil,c)
else
g1=Duel.GetMatchingGroup(cm.matfilter1,tp,LOCATION_MZONE,LOCATION_MZONE,nil,c,tp)
g2=Duel.GetMatchingGroup(cm.matfilter2,tp,LOCATION_MZONE,LOCATION_MZONE,nil,c)
end
g3=Duel.GetMatchingGroup(cm.matfilter2,tp,LOCATION_MZONE+LOCATION_HAND,LOCATION_MZONE,nil,c)
end
local lv=c:GetLevel()
local sg=nil
if tuner then
return cm.matfilter1(c,tp) and cm.synfilter(tuner,c,lv,g2,g3,minc,maxc,tp)
else
return g1:IsExists(cm.synfilter,1,nil,c,lv,g2,g3,minc,maxc,tp)
end
end
function cm.syntg(e,tp,eg,ep,ev,re,r,rp,chk,c,tuner,mg)
local minc=2
local maxc=c:GetLevel()
local g1=nil
local g2=nil
local g3=nil
if mg then
g1=mg:Filter(cm.matfilter1,nil,c,tp)
g2=mg:Filter(cm.matfilter2,nil,c)
g3=g2:Clone()
else
if Duel.GetFlagEffect(tp,m)==0 then
g1=Duel.GetMatchingGroup(cm.matfilter1,tp,LOCATION_MZONE+LOCATION_EXTRA,LOCATION_MZONE,nil,c,tp)
g2=Duel.GetMatchingGroup(cm.matfilter2,tp,LOCATION_MZONE+LOCATION_EXTRA,LOCATION_MZONE,nil,c)
else
g1=Duel.GetMatchingGroup(cm.matfilter1,tp,LOCATION_MZONE,LOCATION_MZONE,nil,c,tp)
g2=Duel.GetMatchingGroup(cm.matfilter2,tp,LOCATION_MZONE,LOCATION_MZONE,nil,c)
end
g3=Duel.GetMatchingGroup(cm.matfilter2,tp,LOCATION_MZONE+LOCATION_HAND,LOCATION_MZONE,nil,c)
end
local pe=Duel.IsPlayerAffectedByEffect(tp,EFFECT_MUST_BE_SMATERIAL)
local lv=c:GetLevel()
local tuc=nil
if tuner then
tuner=tuc
else
Duel.Hint(HINT_SELECTMSG,tp,HINTMSG_SMATERIAL)
if not pe then
local t1=g1:FilterSelect(tp,cm.synfilter,1,1,nil,c,lv,g2,g3,minc,maxc,tp)
tuc=t1:GetFirst()
else
tuc=pe:GetOwner()
Group.FromCards(tuc):Select(tp,1,1,nil)
end
end
tuc:RegisterFlagEffect(m,RESET_EVENT+0x1fe0000,0,1)
local tsg=tuc:IsHasEffect(EFFECT_HAND_SYNCHRO) and g3 or g2
local f=tuc.tuner_filter
if tuc.tuner_filter then tsg=tsg:Filter(f,nil) end
local g=cm.SelectGroup(tp,HINTMSG_SMATERIAL,tsg,cm.goal,Group.FromCards(tuc),minc,maxc,tp,lv,c,tuc)
if g then
g:KeepAlive()
e:SetLabelObject(g)
return true
else return false end
end
function cm.synop(e,tp,eg,ep,ev,re,r,rp,c,tuner,mg)
local g=e:GetLabelObject()
c:SetMaterial(g)
if g:IsExists(Card.IsLocation,1,nil,LOCATION_EXTRA) then Duel.RegisterFlagEffect(tp,m,RESET_PHASE+PHASE_END,0,1) end
Duel.SendtoGrave(g,REASON_MATERIAL+REASON_SYNCHRO)
g:DeleteGroup()
end
function cm.matcon(e,tp,eg,ep,ev,re,r,rp)
return e:GetHandler():IsSummonType(SUMMON_TYPE_SYNCHRO) and e:GetLabel()==1
end
function cm.matop(e,tp,eg,ep,ev,re,r,rp)
e:GetHandler():RegisterFlagEffect(m,RESET_EVENT+RESETS_STANDARD,EFFECT_FLAG_CLIENT_HINT,1,0,aux.Stringid(m,0))
end
function cm.valcheck(e,c)
if c:GetMaterialCount()==7 then e:GetLabelObject():SetLabel(1)
else e:GetLabelObject():SetLabel(0) end
end
function cm.thtg(e,tp,eg,ep,ev,re,r,rp,chk,chkc)
if chkc then return false end
......@@ -248,23 +39,3 @@ function cm.thop(e,tp,eg,ep,ev,re,r,rp)
Duel.ConfirmCards(1-tp,hg)
end
end
function cm.tdfilter(c)
return c:IsType(TYPE_MONSTER) and not c:IsType(TYPE_EFFECT) and c:IsAbleToDeck()
end
function cm.tdtg(e,tp,eg,ep,ev,re,r,rp,chk,chkc)
if chkc then return chkc:IsLocation(LOCATION_GRAVE) and chkc:IsControler(tp) and cm.filter(chkc) end
if chk==0 then return e:GetHandler():IsAbleToExtra()
and Duel.IsExistingTarget(cm.tdfilter,tp,LOCATION_GRAVE,0,1,e:GetHandler()) end
Duel.Hint(HINT_SELECTMSG,tp,HINTMSG_TODECK)
local g=Duel.SelectTarget(tp,cm.tdfilter,tp,LOCATION_GRAVE,0,1,7,e:GetHandler())
g:AddCard(e:GetHandler())
Duel.SetOperationInfo(0,CATEGORY_TODECK,g,g:GetCount(),0,0)
end
function cm.tdop(e,tp,eg,ep,ev,re,r,rp)
local c=e:GetHandler()
local g=Duel.GetChainInfo(0,CHAININFO_TARGET_CARDS):Filter(Card.IsRelateToEffect,nil,e)
if c:IsRelateToEffect(e) and #g>0 then
g:AddCard(c)
Duel.SendtoDeck(g,nil,2,REASON_EFFECT)
end
end
......@@ -31,7 +31,7 @@ function cm.lcheck(g)
return g:IsExists(cm.lfilter,1,nil)
end
function cm.tefilter(c)
return c:IsType(TYPE_PENDULUM) and c:IsSetCard(0x53a)
return c:IsType(TYPE_PENDULUM) and c:IsSetCard(0x353a)
end
function cm.tetg(e,tp,eg,ep,ev,re,r,rp,chk)
local g=Duel.GetMatchingGroup(cm.tefilter,tp,LOCATION_DECK+LOCATION_GRAVE,0,nil)
......
......@@ -24,7 +24,7 @@ function cm.initial_effect(c)
c:RegisterEffect(e2)
end
function cm.filter(c,e,tp)
return (c:IsType(TYPE_NORMAL) and c:IsRace(RACE_INSECT)) or (c:IsSetCard(0x53d) and c:IsType(TYPE_TUNER)) and c:IsCanBeSpecialSummoned(e,0,tp,false,false,POS_FACEUP_DEFENSE)
return (c:IsType(TYPE_NORMAL) and c:IsRace(RACE_INSECT)) or (c:IsSetCard(0x353d) and c:IsType(TYPE_TUNER)) and c:IsCanBeSpecialSummoned(e,0,tp,false,false,POS_FACEUP_DEFENSE)
end
function cm.tg(e,tp,eg,ep,ev,re,r,rp,chk)
if chk==0 then return Duel.GetLocationCount(tp,LOCATION_MZONE)>0
......
......@@ -62,7 +62,7 @@ function cm.spcost(e,tp,eg,ep,ev,re,r,rp,chk)
Duel.Release(e:GetHandler(),REASON_COST)
end
function cm.spfilter(c,e,tp)
return c:IsSetCard(0x53d) and c:IsLevelAbove(1) and c:IsCanBeSpecialSummoned(e,0,tp,false,false,POS_FACEUP_ATTACK)
return c:IsSetCard(0x353d) and c:IsLevelAbove(1) and c:IsCanBeSpecialSummoned(e,0,tp,false,false,POS_FACEUP_ATTACK)
end
function cm.sptg(e,tp,eg,ep,ev,re,r,rp,chk)
if chk==0 then return Duel.GetMZoneCount(tp,e:GetHandler())>0
......
......@@ -45,7 +45,7 @@ function cm.tgop(e,tp,eg,ep,ev,re,r,rp)
Duel.Hint(HINT_SELECTMSG,tp,HINTMSG_TOGRAVE)
local tc=Duel.SelectMatchingCard(tp,cm.filter,tp,LOCATION_DECK,0,1,1,nil):GetFirst()
if tc and Duel.SendtoGrave(tc,REASON_EFFECT)~=0 and tc:IsLocation(LOCATION_GRAVE) and tc:IsType(TYPE_NORMAL) then
local g=Duel.GetMatchingGroup(function(c)return c:IsSetCard(0x53d) and c:IsAbleToHand()end,tp,LOCATION_DECK,0,nil)
local g=Duel.GetMatchingGroup(function(c)return c:IsSetCard(0x353d) and c:IsAbleToHand()end,tp,LOCATION_DECK,0,nil)
if g:GetCount()>0 and Duel.SelectYesNo(tp,aux.Stringid(m,1)) then
Duel.BreakEffect()
Duel.Hint(HINT_SELECTMSG,tp,HINTMSG_ATOHAND)
......
......@@ -49,7 +49,7 @@ function cm.spcost(e,tp,eg,ep,ev,re,r,rp,chk)
Duel.Release(e:GetHandler(),REASON_COST)
end
function cm.spfilter(c,e,tp)
return c:IsSetCard(0x53d) and c:IsLevelAbove(1) and c:IsCanBeSpecialSummoned(e,0,tp,false,false,POS_FACEUP_ATTACK)
return c:IsSetCard(0x353d) and c:IsLevelAbove(1) and c:IsCanBeSpecialSummoned(e,0,tp,false,false,POS_FACEUP_ATTACK)
end
function cm.sptg(e,tp,eg,ep,ev,re,r,rp,chk)
if chk==0 then return Duel.GetMZoneCount(tp,e:GetHandler())>0
......
......@@ -95,6 +95,7 @@ function cm.operation(e,tp,eg,ep,ev,re,r,rp)
e3:SetReset(RESET_EVENT+RESETS_STANDARD)
tc:RegisterEffect(e3)
end
Duel.AdjustInstantly()
if not tc:IsImmuneToEffect(e) then Duel.Destroy(tc,REASON_EFFECT) end
end
end
......@@ -108,7 +109,7 @@ function cm.spcost(e,tp,eg,ep,ev,re,r,rp,chk)
Duel.Release(e:GetHandler(),REASON_COST)
end
function cm.spfilter(c,e,tp)
return c:IsSetCard(0x53d) and c:IsLevelAbove(1) and c:IsCanBeSpecialSummoned(e,0,tp,false,false,POS_FACEUP_ATTACK)
return c:IsSetCard(0x353d) and c:IsLevelAbove(1) and c:IsCanBeSpecialSummoned(e,0,tp,false,false,POS_FACEUP_ATTACK)
end
function cm.sptg(e,tp,eg,ep,ev,re,r,rp,chk)
if chk==0 then return Duel.GetMZoneCount(tp,e:GetHandler())>0
......
--云 之 裘 沙
function c53799004.initial_effect(c)
--immune
local m=53799004
local cm=_G["c"..m]
cm.name="云之裘沙"
function cm.initial_effect(c)
c:SetUniqueOnField(1,0,m)
local e3=Effect.CreateEffect(c)
e3:SetCategory(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(c53799004.imucon)
e3:SetOperation(c53799004.imuop)
e3:SetCondition(cm.imucon)
e3:SetOperation(cm.imuop)
c:RegisterEffect(e3)
end
function c53799004.imucon(e,tp,eg,ep,ev,re,r,rp)
function cm.imucon(e,tp,eg,ep,ev,re,r,rp)
return not e:GetHandler():IsStatus(STATUS_BATTLE_DESTROYED) and re:GetHandler()~=e:GetHandler()
end
function c53799004.imuop(e,tp,eg,ep,ev,re,r,rp)
function cm.imutg(e,tp,eg,ep,ev,re,r,rp,chk)
if chk==0 then
if Duel.GetFlagEffect(tp,m)==0 then Duel.RegisterFlagEffect(tp,m,RESET_CHAIN,0,1) end
local flag=Duel.GetFlagEffectLabel(tp,m)
return bit.band(flag,0x1)==0 or bit.band(flag,0x2)==0 or bit.band(flag,0x4)==0
end
end
function cm.imuop(e,tp,eg,ep,ev,re,r,rp)
local c=e:GetHandler()
if not c:IsRelateToEffect(e) then return end
if Duel.GetFlagEffect(tp,m)==0 then Duel.RegisterFlagEffect(tp,m,RESET_CHAIN,0,1) end
local flag=Duel.GetFlagEffectLabel(tp,m)
local off=1
local ops={}
local opval={}
if e:GetHandler():IsLocation(LOCATION_MZONE) and Duel.GetFlagEffect(tp,537990041)==0 then
ops[off]=aux.Stringid(53799004,0)
if bit.band(flag,0x1)==0 then
ops[off]=aux.Stringid(m,0)
opval[off-1]=1
off=off+1
end
if e:GetHandler():IsLocation(LOCATION_MZONE) and Duel.GetFlagEffect(tp,537990042)==0 then
ops[off]=aux.Stringid(53799004,1)
if bit.band(flag,0x2)==0 then
ops[off]=aux.Stringid(m,1)
opval[off-1]=2
off=off+1
end
if e:GetHandler():IsDestructable() and e:GetHandler():IsLocation(LOCATION_MZONE) and Duel.GetFlagEffect(tp,537990043)==0 then
ops[off]=aux.Stringid(53799004,2)
if bit.band(flag,0x4)==0 then
ops[off]=aux.Stringid(m,2)
opval[off-1]=3
off=off+1
end
if off==1 then return end
local op=Duel.SelectOption(tp,table.unpack(ops))
if opval[op]==1 then
Duel.RegisterFlagEffect(tp,537990041,RESET_CHAIN,0,1)
local e1=Effect.CreateEffect(e:GetHandler())
Duel.SetFlagEffectLabel(tp,m,flag|0x1)
local e1=Effect.CreateEffect(c)
e1:SetType(EFFECT_TYPE_SINGLE)
e1:SetProperty(EFFECT_FLAG_SINGLE_RANGE)
e1:SetRange(LOCATION_MZONE)
e1:SetCode(EFFECT_IMMUNE_EFFECT)
e1:SetValue(c53799004.imfilter)
e1:SetValue(cm.imfilter)
e1:SetReset(RESET_CHAIN)
e:GetHandler():RegisterEffect(e1)
c:RegisterEffect(e1)
elseif opval[op]==2 then
Duel.RegisterFlagEffect(tp,537990042,RESET_CHAIN,0,1)
local e2=Effect.CreateEffect(e:GetHandler())
Duel.SetFlagEffectLabel(tp,m,flag|0x2)
local e2=Effect.CreateEffect(c)
e2:SetType(EFFECT_TYPE_SINGLE)
e2:SetProperty(EFFECT_FLAG_SINGLE_RANGE)
e2:SetRange(LOCATION_MZONE)
e2:SetCode(EFFECT_IMMUNE_EFFECT)
e2:SetValue(c53799004.efilter)
e2:SetValue(cm.efilter)
e2:SetReset(RESET_CHAIN)
e:GetHandler():RegisterEffect(e2)
c:RegisterEffect(e2)
elseif opval[op]==3 then
Duel.RegisterFlagEffect(tp,537990043,RESET_CHAIN,0,1)
Duel.Destroy(e:GetHandler(),REASON_EFFECT)
local g1=Duel.GetMatchingGroup(nil,tp,LOCATION_MZONE,0,nil)
if g1:GetCount()>0 then
local nc=g1:GetFirst()
while nc do
local e3=Effect.CreateEffect(e:GetHandler())
e3:SetType(EFFECT_TYPE_SINGLE)
e3:SetProperty(EFFECT_FLAG_SINGLE_RANGE)
e3:SetRange(LOCATION_MZONE)
e3:SetCode(EFFECT_IMMUNE_EFFECT)
e3:SetReset(RESET_CHAIN)
e3:SetValue(c53799004.efilter2)
e3:SetOwnerPlayer(tp)
nc:RegisterEffect(e3)
nc=g1:GetNext()
end
Duel.SetFlagEffectLabel(tp,m,flag|0x4)
if Duel.Destroy(c,REASON_EFFECT)~=0 then
local e3=Effect.CreateEffect(c)
e3:SetType(EFFECT_TYPE_FIELD)
e3:SetCode(EFFECT_IMMUNE_EFFECT)
e3:SetTargetRange(LOCATION_MZONE,0)
e3:SetReset(RESET_CHAIN)
e3:SetValue(cm.efilter2)
Duel.RegisterEffect(e3,tp)
end
end
end
function c53799004.imfilter(e,re,rp)
if not re:IsHasProperty(EFFECT_FLAG_CARD_TARGET) then return true end
local g=Duel.GetChainInfo(0,CHAININFO_TARGET_CARDS)
return not g:IsContains(e:GetHandler())
end
function c53799004.imfilter(e,re,rp)
function cm.imfilter(e,re,rp)
if not re:IsHasProperty(EFFECT_FLAG_CARD_TARGET) then return true end
local g=Duel.GetChainInfo(0,CHAININFO_TARGET_CARDS)
return not g:IsContains(e:GetHandler())
end
function c53799004.efilter(e,te)
function cm.efilter(e,te)
local c=e:GetHandler()
local ec=te:GetHandler()
if ec:IsHasCardTarget(c) then return true end
return te:IsHasType(EFFECT_TYPE_ACTIONS) and te:IsHasProperty(EFFECT_FLAG_CARD_TARGET) and c:IsRelateToEffect(te)
end
function c53799004.efilter2(e,re)
return e:GetOwnerPlayer()~=re:GetOwnerPlayer()
function cm.efilter2(e,te)
return te:GetOwnerPlayer()~=e:GetHandlerPlayer()
end
--不 朽 秘 法
function c53799005.initial_effect(c)
--activate
local m=53799005
local cm=_G["c"..m]
cm.name="不朽秘法"
function cm.initial_effect(c)
local e1=Effect.CreateEffect(c)
e1:SetCategory(CATEGORY_SPECIAL_SUMMON)
e1:SetType(EFFECT_TYPE_ACTIVATE)
e1:SetCode(EVENT_TO_GRAVE)
e1:SetProperty(EFFECT_FLAG_CARD_TARGET+EFFECT_FLAG_CANNOT_DISABLE)
e1:SetCost(c53799005.cost)
e1:SetTarget(c53799005.target)
e1:SetOperation(c53799005.activate)
e1:SetProperty(EFFECT_FLAG_CARD_TARGET)
e1:SetCost(cm.cost)
e1:SetTarget(cm.target)
e1:SetOperation(cm.activate)
c:RegisterEffect(e1)
--act in hand
local e2=Effect.CreateEffect(c)
e2:SetType(EFFECT_TYPE_SINGLE)
e2:SetCode(EFFECT_TRAP_ACT_IN_HAND)
c:RegisterEffect(e2)
--damage
local e3=Effect.CreateEffect(c)
e3:SetDescription(aux.Stringid(53799005,0))
e3:SetDescription(aux.Stringid(m,0))
e3:SetCategory(CATEGORY_DAMAGE)
e3:SetType(EFFECT_TYPE_FIELD+EFFECT_TYPE_TRIGGER_F)
e3:SetProperty(EFFECT_FLAG_PLAYER_TARGET+EFFECT_FLAG_DELAY)
e3:SetCode(EVENT_TO_GRAVE)
e3:SetRange(LOCATION_SZONE)
e3:SetCondition(c53799005.damcon)
e3:SetTarget(c53799005.damtg)
e3:SetOperation(c53799005.damop)
e3:SetCondition(cm.damcon)
e3:SetTarget(cm.damtg)
e3:SetOperation(cm.damop)
c:RegisterEffect(e3)
--Destroy
local e5=Effect.CreateEffect(c)
e5:SetType(EFFECT_TYPE_CONTINUOUS+EFFECT_TYPE_FIELD)
e5:SetRange(LOCATION_SZONE)
e5:SetCode(EVENT_LEAVE_FIELD)
e5:SetCondition(c53799005.descon)
e5:SetOperation(c53799005.desop)
e5:SetCondition(cm.descon)
e5:SetOperation(cm.desop)
c:RegisterEffect(e5)
end
function c53799005.cost(e,tp,eg,ep,ev,re,r,rp,chk)
function cm.cost(e,tp,eg,ep,ev,re,r,rp,chk)
if chk==0 then return true end
if e:GetHandler():IsStatus(STATUS_ACT_FROM_HAND) then
Duel.PayLPCost(tp,math.floor(Duel.GetLP(tp)/2))
end
end
function c53799005.filter(c,e,tp,g)
return c:IsCanBeSpecialSummoned(e,0,tp,false,false,POS_FACEUP,1-tp) and c:IsReason(REASON_EFFECT) and (not g or g:IsContains(c))
function cm.filter(c,e,tp)
return c:IsCanBeSpecialSummoned(e,0,tp,false,false,POS_FACEUP,1-tp) and c:IsReason(REASON_EFFECT)
end
function c53799005.target(e,tp,eg,ep,ev,re,r,rp,chk,chkc)
if chkc then return chkc:IsLocation(LOCATION_GRAVE) and chkc:IsControler(1-tp) and c53799005.filter(chkc,e,tp) end
function cm.target(e,tp,eg,ep,ev,re,r,rp,chk,chkc)
if chkc then return chkc:IsLocation(LOCATION_GRAVE) and chkc:IsControler(1-tp) and cm.filter(chkc,e,tp) end
if chk==0 then return Duel.GetLocationCount(1-tp,LOCATION_MZONE,tp)>0
and Duel.IsExistingTarget(c53799005.filter,tp,0,LOCATION_GRAVE,1,nil,e,tp,eg) end
and Duel.IsExistingTarget(cm.filter,tp,0,LOCATION_GRAVE,1,nil,e,tp) end
Duel.Hint(HINT_SELECTMSG,tp,HINTMSG_SPSUMMON)
local g=Duel.SelectTarget(tp,c53799005.filter,tp,0,LOCATION_GRAVE,1,1,nil,e,tp,eg)
local g=Duel.SelectTarget(tp,cm.filter,tp,0,LOCATION_GRAVE,1,1,nil,e,tp)
Duel.SetOperationInfo(0,CATEGORY_SPECIAL_SUMMON,g,1,0,0)
end
function c53799005.activate(e,tp,eg,ep,ev,re,r,rp)
function cm.activate(e,tp,eg,ep,ev,re,r,rp)
local c=e:GetHandler()
local tc=Duel.GetFirstTarget()
if tc:IsRelateToEffect(e) then
if Duel.SpecialSummonStep(tc,0,tp,1-tp,false,false,POS_FACEUP) then
local e1=Effect.CreateEffect(c)
e1:SetType(EFFECT_TYPE_SINGLE)
e1:SetCode(EFFECT_DISABLE)
e1:SetReset(RESET_EVENT+RESETS_STANDARD)
tc:RegisterEffect(e1,true)
local e2=Effect.CreateEffect(c)
e2:SetType(EFFECT_TYPE_SINGLE)
e2:SetCode(EFFECT_DISABLE_EFFECT)
e2:SetReset(RESET_EVENT+RESETS_STANDARD)
tc:RegisterEffect(e2,true)
local e3=Effect.CreateEffect(c)
e3:SetType(EFFECT_TYPE_SINGLE)
e3:SetCode(EFFECT_SET_ATTACK_FINAL)
e3:SetValue(0)
e3:SetReset(RESET_EVENT+RESETS_STANDARD)
tc:RegisterEffect(e3,true)
local e4=e3:Clone()
e4:SetCode(EFFECT_SET_DEFENSE_FINAL)
tc:RegisterEffect(e4,true)
local e5=e3:Clone()
e5:SetCode(EFFECT_CANNOT_BE_SYNCHRO_MATERIAL)
e5:SetValue(1)
tc:RegisterEffect(e5,true)
local e6=e5:Clone()
e6:SetCode(EFFECT_CANNOT_BE_XYZ_MATERIAL)
tc:RegisterEffect(e6,true)
local e7=e5:Clone()
e7:SetCode(EFFECT_CANNOT_BE_FUSION_MATERIAL)
tc:RegisterEffect(e7,true)
local e8=e5:Clone()
e8:SetCode(EFFECT_CANNOT_BE_LINK_MATERIAL)
tc:RegisterEffect(e8,true)
local e9=e5:Clone()
e9:SetCode(EFFECT_UNRELEASABLE_SUM)
tc:RegisterEffect(e9,true)
local e10=e5:Clone()
e10:SetCode(EFFECT_UNRELEASABLE_NONSUM)
tc:RegisterEffect(e10,true)
end
if tc:IsRelateToEffect(e) and Duel.SpecialSummonStep(tc,0,tp,1-tp,false,false,POS_FACEUP) then
local e1=Effect.CreateEffect(c)
e1:SetType(EFFECT_TYPE_SINGLE)
e1:SetCode(EFFECT_DISABLE)
e1:SetReset(RESET_EVENT+RESETS_STANDARD)
tc:RegisterEffect(e1,true)
local e2=e1:Clone()
e2:SetCode(EFFECT_DISABLE_EFFECT)
tc:RegisterEffect(e2,true)
local e3=Effect.CreateEffect(c)
e3:SetType(EFFECT_TYPE_SINGLE)
e3:SetCode(EFFECT_SET_ATTACK_FINAL)
e3:SetValue(0)
e3:SetReset(RESET_EVENT+RESETS_STANDARD)
tc:RegisterEffect(e3,true)
local e4=e3:Clone()
e4:SetCode(EFFECT_SET_DEFENSE_FINAL)
tc:RegisterEffect(e4,true)
local e5=e3:Clone()
e5:SetCode(EFFECT_CANNOT_BE_SYNCHRO_MATERIAL)
e5:SetValue(1)
tc:RegisterEffect(e5,true)
local e6=e5:Clone()
e6:SetCode(EFFECT_CANNOT_BE_XYZ_MATERIAL)
tc:RegisterEffect(e6,true)
local e7=e5:Clone()
e7:SetCode(EFFECT_CANNOT_BE_FUSION_MATERIAL)
tc:RegisterEffect(e7,true)
local e8=e5:Clone()
e8:SetCode(EFFECT_CANNOT_BE_LINK_MATERIAL)
tc:RegisterEffect(e8,true)
local e9=e5:Clone()
e9:SetCode(EFFECT_UNRELEASABLE_SUM)
tc:RegisterEffect(e9,true)
local e10=e5:Clone()
e10:SetCode(EFFECT_UNRELEASABLE_NONSUM)
tc:RegisterEffect(e10,true)
Duel.SpecialSummonComplete()
c:SetCardTarget(tc)
end
end
function c53799005.descon(e,tp,eg,ep,ev,re,r,rp)
function cm.descon(e,tp,eg,ep,ev,re,r,rp)
local c=e:GetHandler()
if c:IsStatus(STATUS_DESTROY_CONFIRMED) then return false end
local tc=c:GetFirstCardTarget()
return tc and eg:IsContains(tc)
end
function c53799005.desop(e,tp,eg,ep,ev,re,r,rp)
function cm.desop(e,tp,eg,ep,ev,re,r,rp)
Duel.Destroy(e:GetHandler(),REASON_EFFECT)
end
function c53799005.damcfilter(c,tp)
return c:IsType(TYPE_MONSTER) and c:IsReason(REASON_EFFECT)
function cm.damcon(e,tp,eg,ep,ev,re,r,rp)
return eg:IsExists(function(c)return c:IsType(TYPE_MONSTER) and c:IsReason(REASON_EFFECT)end,1,nil) and e:GetHandler():GetFirstCardTarget() and rp==1-tp
end
function c53799005.damcon(e,tp,eg,ep,ev,re,r,rp)
return eg:IsExists(c53799005.damcfilter,1,nil) and e:GetHandler():GetFirstCardTarget() and rp==1-tp
end
function c53799005.damtg(e,tp,eg,ep,ev,re,r,rp,chk)
function cm.damtg(e,tp,eg,ep,ev,re,r,rp,chk)
if chk==0 then return e:GetHandler():GetFirstCardTarget() end
local dam=e:GetHandler():GetFirstCardTarget():GetBaseAttack()
Duel.SetTargetPlayer(1-tp)
Duel.SetTargetParam(dam)
Duel.SetOperationInfo(0,CATEGORY_DAMAGE,nil,0,1-tp,dam)
end
function c53799005.damop(e,tp,eg,ep,ev,re,r,rp)
function cm.damop(e,tp,eg,ep,ev,re,r,rp)
if not e:GetHandler():IsRelateToEffect(e) then return end
local tc=e:GetHandler():GetFirstCardTarget()
local atk=tc:GetBaseAttack()
if atk<0 then atk=0 end
Duel.Damage(1-tp,atk,REASON_EFFECT)
end
\ No newline at end of file
local p,d=Duel.GetChainInfo(0,CHAININFO_TARGET_PLAYER,CHAININFO_TARGET_PARAM)
Duel.Damage(p,d,REASON_EFFECT)
end
--八宫一月·青
local m=81001011
local cm=_G["c"..m]
Duel.LoadScript("c81000000.lua")
function cm.initial_effect(c)
--synchro summon
aux.AddSynchroProcedure(c,aux.FilterBoolFunction(Card.IsSetCard,0x81e),aux.NonTuner(nil),1)
c:EnableReviveLimit()
--destroy all
local e1=Effect.CreateEffect(c)
e1:SetCategory(CATEGORY_DESTROY)
e1:SetType(EFFECT_TYPE_SINGLE+EFFECT_TYPE_TRIGGER_O)
e1:SetCode(EVENT_SPSUMMON_SUCCESS)
e1:SetProperty(EFFECT_FLAG_DELAY)
e1:SetCountLimit(1,m)
e1:SetCondition(cm.descon)
e1:SetTarget(cm.destg)
e1:SetOperation(cm.desop)
c:RegisterEffect(e1)
--spsummon
local e2=Effect.CreateEffect(c)
e2:SetCategory(CATEGORY_TOHAND+CATEGORY_SEARCH)
e2:SetType(EFFECT_TYPE_SINGLE+EFFECT_TYPE_TRIGGER_O)
e2:SetCode(EVENT_TO_GRAVE)
e2:SetProperty(EFFECT_FLAG_DELAY)
e2:SetCountLimit(1,m+900)
e2:SetCondition(cm.thcon)
e2:SetCost(cm.thcost)
e2:SetTarget(cm.thtg)
e2:SetOperation(cm.thop)
c:RegisterEffect(e2)
Duel.AddCustomActivityCounter(m,ACTIVITY_SPSUMMON,cm.counterfilter)
end
function cm.counterfilter(c)
return c:IsRace(RACE_FAIRY)
end
function cm.descon(e,tp,eg,ep,ev,re,r,rp)
return e:GetHandler():IsSummonType(SUMMON_TYPE_SYNCHRO)
end
function cm.destg(e,tp,eg,ep,ev,re,r,rp,chk)
local g=Duel.GetMatchingGroup(nil,tp,0,LOCATION_MZONE,nil)
if chk==0 then return g:GetCount()>0 end
Duel.SetOperationInfo(0,CATEGORY_DESTROY,g,g:GetCount(),0,0)
end
function cm.desop(e,tp,eg,ep,ev,re,r,rp)
local g=Duel.GetMatchingGroup(nil,tp,0,LOCATION_MZONE,nil)
if g:GetCount()>0 then
Duel.Destroy(g,REASON_EFFECT)
end
end
function cm.thcon(e,tp,eg,ep,ev,re,r,rp)
local c=e:GetHandler()
return c:IsPreviousLocation(LOCATION_ONFIELD)
end
function cm.thcost(e,tp,eg,ep,ev,re,r,rp,chk)
if chk==0 then return Duel.GetCustomActivityCount(m,tp,ACTIVITY_SPSUMMON)==0 end
local e1=Effect.CreateEffect(e:GetHandler())
e1:SetType(EFFECT_TYPE_FIELD)
e1:SetProperty(EFFECT_FLAG_PLAYER_TARGET+EFFECT_FLAG_OATH)
e1:SetCode(EFFECT_CANNOT_SPECIAL_SUMMON)
e1:SetReset(RESET_PHASE+PHASE_END)
e1:SetTargetRange(1,0)
e1:SetLabelObject(e)
e1:SetTarget(cm.splimit)
Duel.RegisterEffect(e1,tp)
end
function cm.splimit(e,c,sump,sumtype,sumpos,targetp,se)
return not c:IsRace(RACE_FAIRY)
end
function cm.thfilter(c)
return c:IsRace(RACE_FAIRY) and c:IsType(TYPE_MONSTER) 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 m=81001012
local cm=_G["c"..m]
Duel.LoadScript("c81000000.lua")
function cm.initial_effect(c)
--synchro summon
aux.AddSynchroProcedure(c,aux.FilterBoolFunction(Card.IsSetCard,0x81e),aux.NonTuner(cm.sfilter),1)
c:EnableReviveLimit()
--remove
local e1=Effect.CreateEffect(c)
e1:SetCategory(CATEGORY_REMOVE)
e1:SetType(EFFECT_TYPE_SINGLE+EFFECT_TYPE_TRIGGER_O)
e1:SetProperty(EFFECT_FLAG_DELAY)
e1:SetCode(EVENT_SPSUMMON_SUCCESS)
e1:SetCountLimit(1,m)
e1:SetCondition(cm.rmcon)
e1:SetTarget(cm.rmtg)
e1:SetOperation(cm.rmop)
c:RegisterEffect(e1)
--disable special summon
local e2=Effect.CreateEffect(c)
e2:SetCategory(CATEGORY_DISABLE_SUMMON+CATEGORY_DESTROY)
e2:SetType(EFFECT_TYPE_QUICK_O)
e2:SetCode(EVENT_SPSUMMON)
e2:SetRange(LOCATION_MZONE)
e2:SetCountLimit(1,m+900)
e2:SetCondition(cm.discon)
e2:SetCost(cm.discost)
e2:SetTarget(cm.distg)
e2:SetOperation(cm.disop)
c:RegisterEffect(e2)
--synchro summon
local e3=Effect.CreateEffect(c)
e3:SetCategory(CATEGORY_TOGRAVE)
e3:SetType(EFFECT_TYPE_SINGLE+EFFECT_TYPE_TRIGGER_O)
e3:SetCode(EVENT_LEAVE_FIELD)
e3:SetProperty(EFFECT_FLAG_DAMAGE_STEP+EFFECT_FLAG_DAMAGE_CAL+EFFECT_FLAG_DELAY)
e3:SetCondition(cm.sccon)
e3:SetTarget(cm.sctg)
e3:SetOperation(cm.scop)
c:RegisterEffect(e3)
end
cm.material_type=TYPE_SYNCHRO
function cm.sfilter(c)
return c:IsType(TYPE_SYNCHRO) and c:IsRace(RACE_FAIRY)
end
function cm.rmcon(e,tp,eg,ep,ev,re,r,rp)
return e:GetHandler():IsSummonType(SUMMON_TYPE_SYNCHRO)
end
function cm.rmfilter(c)
return c:IsSummonLocation(LOCATION_EXTRA+LOCATION_GRAVE) 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,0,LOCATION_MZONE,1,nil) end
local g=Duel.GetMatchingGroup(cm.rmfilter,tp,0,LOCATION_MZONE,nil)
Duel.SetOperationInfo(0,CATEGORY_REMOVE,g,g:GetCount(),0,0)
end
function cm.rmop(e,tp,eg,ep,ev,re,r,rp)
local g=Duel.GetMatchingGroup(cm.rmfilter,tp,0,LOCATION_MZONE,nil)
if g:GetCount()>0 then
Duel.Remove(g,POS_FACEUP,REASON_EFFECT)
end
end
function cm.discon(e,tp,eg,ep,ev,re,r,rp)
return tp~=ep and Duel.GetCurrentChain()==0
end
function cm.costfilter(c)
return c:IsRace(RACE_FAIRY) and c:IsType(TYPE_MONSTER) and c:IsAbleToRemoveAsCost()
end
function cm.discost(e,tp,eg,ep,ev,re,r,rp,chk)
if chk==0 then return Duel.IsExistingMatchingCard(cm.costfilter,tp,LOCATION_GRAVE,0,1,nil) end
Duel.Hint(HINT_SELECTMSG,tp,HINTMSG_REMOVE)
local g=Duel.SelectMatchingCard(tp,cm.costfilter,tp,LOCATION_GRAVE,0,1,1,nil)
Duel.Remove(g,POS_FACEUP,REASON_COST)
end
function cm.distg(e,tp,eg,ep,ev,re,r,rp,chk)
if chk==0 then return true end
Duel.SetOperationInfo(0,CATEGORY_DISABLE_SUMMON,eg,eg:GetCount(),0,0)
Duel.SetOperationInfo(0,CATEGORY_DESTROY,eg,eg:GetCount(),0,0)
end
function cm.disop(e,tp,eg,ep,ev,re,r,rp)
Duel.NegateSummon(eg)
Duel.Destroy(eg,REASON_EFFECT)
end
function cm.sccon(e,tp,eg,ep,ev,re,r,rp)
local c=e:GetHandler()
return (c:IsReason(REASON_BATTLE) or (c:GetReasonPlayer()==1-tp and c:IsReason(REASON_EFFECT)))
and c:IsPreviousPosition(POS_FACEUP)
end
function cm.scfilter(c)
return c:IsFaceup() and c:IsRace(RACE_FAIRY) and c:IsType(TYPE_MONSTER)
end
function cm.sctg(e,tp,eg,ep,ev,re,r,rp,chk)
if chk==0 then return Duel.IsExistingMatchingCard(cm.scfilter,tp,LOCATION_REMOVED,0,1,nil) end
local g=Duel.GetMatchingGroup(cm.scfilter,tp,LOCATION_REMOVED,0,nil)
Duel.SetOperationInfo(0,CATEGORY_TOGRAVE,g,g:GetCount(),0,0)
end
function cm.scop(e,tp,eg,ep,ev,re,r,rp)
local g=Duel.GetMatchingGroup(cm.scfilter,tp,LOCATION_REMOVED,0,nil)
if g:GetCount()>0 then
Duel.SendtoGrave(g,REASON_EFFECT+REASON_RETURN)
end
end
--橘花音·厮守之音
function c81011117.initial_effect(c)
--synchro summon
aux.AddSynchroMixProcedure(c,c81011117.matfilter,nil,nil,aux.NonTuner(nil),1,1)
c:EnableReviveLimit()
--tograve
local e2=Effect.CreateEffect(c)
e2:SetCategory(CATEGORY_TOGRAVE)
e2:SetType(EFFECT_TYPE_IGNITION)
e2:SetRange(LOCATION_MZONE)
e2:SetCountLimit(1,81011117)
e2:SetTarget(c81011117.tgtg)
e2:SetOperation(c81011117.tgop)
c:RegisterEffect(e2)
--search
local e3=Effect.CreateEffect(c)
e3:SetType(EFFECT_TYPE_SINGLE+EFFECT_TYPE_CONTINUOUS)
e3:SetProperty(EFFECT_FLAG_CANNOT_DISABLE)
e3:SetCode(EVENT_TO_GRAVE)
e3:SetOperation(c81011117.regop)
c:RegisterEffect(e3)
local e4=Effect.CreateEffect(c)
e4:SetCategory(CATEGORY_TOHAND+CATEGORY_SEARCH)
e4:SetType(EFFECT_TYPE_FIELD+EFFECT_TYPE_TRIGGER_O)
e4:SetCode(EVENT_PHASE+PHASE_STANDBY)
e4:SetRange(LOCATION_GRAVE)
e4:SetCountLimit(1,81011117)
e4:SetCondition(c81011117.thcon)
e4:SetTarget(c81011117.thtg)
e4:SetOperation(c81011117.thop)
c:RegisterEffect(e4)
end
function c81011117.matfilter(c)
return c:IsSynchroType(TYPE_TUNER) or (c:IsAttack(1550) and c:IsDefense(1050))
end
function c81011117.filter(c)
return c:IsType(TYPE_PENDULUM) and c:IsType(TYPE_RITUAL) and c:IsAbleToGrave()
end
function c81011117.tgtg(e,tp,eg,ep,ev,re,r,rp,chk)
if chk==0 then return Duel.IsExistingMatchingCard(c81011117.filter,tp,LOCATION_DECK,0,1,nil) end
Duel.SetOperationInfo(0,CATEGORY_TOGRAVE,nil,1,tp,LOCATION_DECK)
end
function c81011117.tgop(e,tp,eg,ep,ev,re,r,rp)
local c=e:GetHandler()
Duel.Hint(HINT_SELECTMSG,tp,HINTMSG_TOGRAVE)
local g=Duel.SelectMatchingCard(tp,c81011117.filter,tp,LOCATION_DECK,0,1,1,nil)
local tc=g:GetFirst()
if tc and Duel.SendtoGrave(tc,REASON_EFFECT)~=0 and tc:IsLocation(LOCATION_GRAVE) then
local lv=tc:GetLevel()
local e1=Effect.CreateEffect(c)
e1:SetType(EFFECT_TYPE_SINGLE)
e1:SetCode(EFFECT_CHANGE_LEVEL)
e1:SetValue(lv)
e1:SetReset(RESET_EVENT+RESETS_STANDARD+RESET_DISABLE+RESET_PHASE+PHASE_END)
c:RegisterEffect(e1)
end
local e2=Effect.CreateEffect(e:GetHandler())
e2:SetType(EFFECT_TYPE_FIELD)
e2:SetProperty(EFFECT_FLAG_PLAYER_TARGET)
e2:SetCode(EFFECT_CANNOT_SPECIAL_SUMMON)
e2:SetTargetRange(1,0)
e2:SetTarget(c81011117.splimit)
e2:SetReset(RESET_PHASE+PHASE_END)
Duel.RegisterEffect(e2,tp)
end
function c81011117.splimit(e,c)
return not ((c:IsAttack(1550) and c:IsDefense(1050)) or (c:IsType(TYPE_RITUAL) and c:IsType(TYPE_PENDULUM)))
end
function c81011117.regop(e,tp,eg,ep,ev,re,r,rp)
if Duel.GetCurrentPhase()==PHASE_STANDBY then
e:GetHandler():RegisterFlagEffect(81011117,RESET_EVENT+RESETS_STANDARD+RESET_PHASE+PHASE_STANDBY,0,2,Duel.GetTurnCount())
else
e:GetHandler():RegisterFlagEffect(81011117,RESET_EVENT+RESETS_STANDARD+RESET_PHASE+PHASE_STANDBY,0,1,0)
end
end
function c81011117.thcon(e,tp,eg,ep,ev,re,r,rp)
local tid=e:GetHandler():GetFlagEffectLabel(81011117)
return tid and tid~=Duel.GetTurnCount()
end
function c81011117.thfilter(c)
return c:IsAttack(1550) and c:IsDefense(1050) and c:IsAbleToHand()
end
function c81011117.thtg(e,tp,eg,ep,ev,re,r,rp,chk)
if chk==0 then return Duel.IsExistingMatchingCard(c81011117.thfilter,tp,LOCATION_DECK,0,1,nil) end
Duel.SetOperationInfo(0,CATEGORY_TOHAND,nil,1,tp,LOCATION_DECK)
end
function c81011117.thop(e,tp,eg,ep,ev,re,r,rp)
Duel.Hint(HINT_SELECTMSG,tp,HINTMSG_ATOHAND)
local g=Duel.SelectMatchingCard(tp,c81011117.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 m=81022004
local cm=_G["c"..m]
function cm.initial_effect(c)
--pendulum summon
aux.EnablePendulumAttribute(c)
--spsummon
local e1=Effect.CreateEffect(c)
e1:SetCategory(CATEGORY_SPECIAL_SUMMON)
e1:SetType(EFFECT_TYPE_IGNITION)
e1:SetRange(LOCATION_PZONE)
e1:SetCountLimit(1,m)
e1:SetCost(cm.spcost)
e1:SetTarget(cm.sptg)
e1:SetOperation(cm.spop)
c:RegisterEffect(e1)
--cannot select battle target
local e2=Effect.CreateEffect(c)
e2:SetType(EFFECT_TYPE_FIELD)
e2:SetRange(LOCATION_MZONE)
e2:SetTargetRange(0,LOCATION_MZONE)
e2:SetCode(EFFECT_CANNOT_SELECT_BATTLE_TARGET)
e2:SetValue(cm.atlimit)
c:RegisterEffect(e2)
--spsummon
local e3=aux.AddRitualProcGreater2(c,cm.filter,nil,nil,cm.mfilter)
e3:SetType(EFFECT_TYPE_IGNITION)
e3:SetCode(0)
e3:SetCountLimit(1,m+900)
e3:SetRange(LOCATION_MZONE)
end
function cm.fselect(g)
return g:IsExists(Card.IsRace,1,nil,RACE_PYRO)
end
function cm.spcost(e,tp,eg,ep,ev,re,r,rp,chk)
local g=Duel.GetMatchingGroup(Card.IsAbleToRemoveAsCost,tp,LOCATION_GRAVE+LOCATION_HAND,0,nil)
if chk==0 then return g:CheckSubGroup(cm.fselect,2,2) end
local rg=g:SelectSubGroup(tp,cm.fselect,false,2,2)
Duel.Remove(rg,POS_FACEUP,REASON_COST)
end
function cm.sptg(e,tp,eg,ep,ev,re,r,rp,chk)
if chk==0 then return Duel.GetLocationCount(tp,LOCATION_MZONE)>0
and e:GetHandler():IsCanBeSpecialSummoned(e,0,tp,false,false) end
Duel.SetOperationInfo(0,CATEGORY_SPECIAL_SUMMON,e:GetHandler(),1,0,0)
end
function cm.spop(e,tp,eg,ep,ev,re,r,rp)
local c=e:GetHandler()
if not c:IsRelateToEffect(e) then return end
Duel.SpecialSummon(c,0,tp,tp,false,false,POS_FACEUP)
end
function cm.filter(c)
return c:IsType(TYPE_RITUAL) and c:IsType(TYPE_PENDULUM)
end
function cm.mfilter(c,e,tp)
return c:IsRace(RACE_PYRO)
end
function cm.atlimit(e,c)
return c~=e:GetHandler() and c:IsFaceup() and c:IsRace(RACE_PYRO)
end
--小憩时分·拉蒂
local m=81022008
local cm=_G["c"..m]
function cm.initial_effect(c)
--pendulum summon
aux.EnablePendulumAttribute(c)
--disable
local e2=Effect.CreateEffect(c)
e2:SetType(EFFECT_TYPE_FIELD+EFFECT_TYPE_CONTINUOUS)
e2:SetRange(LOCATION_PZONE)
e2:SetCode(EVENT_CHAIN_SOLVING)
e2:SetCondition(cm.discon)
e2:SetOperation(cm.disop)
c:RegisterEffect(e2)
--spsummon
local e4=Effect.CreateEffect(c)
e4:SetCategory(CATEGORY_SPECIAL_SUMMON)
e4:SetType(EFFECT_TYPE_IGNITION)
e4:SetRange(LOCATION_MZONE)
e4:SetCountLimit(1,m)
e4:SetCost(cm.spcost)
e4:SetTarget(cm.sptg)
e4:SetOperation(cm.spop)
c:RegisterEffect(e4)
end
function cm.discon(e,tp,eg,ep,ev,re,r,rp)
local loc=Duel.GetChainInfo(ev,CHAININFO_TRIGGERING_LOCATION)
return Duel.IsChainDisablable(ev) and re:IsHasCategory(CATEGORY_SPECIAL_SUMMON) and re:IsActiveType(TYPE_MONSTER) and (loc==LOCATION_HAND or loc==LOCATION_GRAVE) and e:GetHandler():GetFlagEffect(m)==0
end
function cm.disop(e,tp,eg,ep,ev,re,r,rp)
if not Duel.SelectEffectYesNo(tp,e:GetHandler()) then return end
e:GetHandler():RegisterFlagEffect(m,RESET_EVENT+RESETS_STANDARD,0,1)
if not Duel.NegateEffect(ev) then return end
Duel.BreakEffect()
Duel.Destroy(e:GetHandler(),REASON_EFFECT)
end
function cm.spcost(e,tp,eg,ep,ev,re,r,rp,chk)
local ft=Duel.GetLocationCount(tp,LOCATION_MZONE)
if chk==0 then return ft>-1 and Duel.CheckReleaseGroup(tp,cm.spcfilter,1,nil,ft,tp) end
local sg=Duel.SelectReleaseGroup(tp,cm.spcfilter,1,1,e:GetHandler(),ft,tp)
Duel.Release(sg,REASON_COST)
end
function cm.spfilter(c,e,tp)
return c:IsRace(RACE_PYRO) and c:IsType(TYPE_PENDULUM) and not c:IsCode(m) 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.IsExistingMatchingCard(cm.spfilter,tp,LOCATION_DECK,0,1,nil,e,tp) end
Duel.SetOperationInfo(0,CATEGORY_SPECIAL_SUMMON,nil,1,tp,LOCATION_DECK)
end
function cm.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.spfilter,tp,LOCATION_DECK,0,1,1,nil,e,tp)
if g:GetCount()>0 then
Duel.SpecialSummon(g,0,tp,tp,false,false,POS_FACEUP)
end
end
--夜晚的思念·拉蒂
local m=81022009
local cm=_G["c"..m]
function cm.initial_effect(c)
--pendulum summon
aux.EnablePendulumAttribute(c)
--spsummon
local e1=Effect.CreateEffect(c)
e1:SetCategory(CATEGORY_SPECIAL_SUMMON)
e1:SetType(EFFECT_TYPE_FIELD+EFFECT_TYPE_TRIGGER_O)
e1:SetCode(EVENT_DESTROYED)
e1:SetProperty(EFFECT_FLAG_DAMAGE_STEP+EFFECT_FLAG_DAMAGE_CAL)
e1:SetRange(LOCATION_PZONE)
e1:SetCountLimit(1,m)
e1:SetCondition(cm.spcon)
e1:SetTarget(cm.sptg)
e1:SetOperation(cm.spop)
c:RegisterEffect(e1)
--direct attack
local e2=Effect.CreateEffect(c)
e2:SetType(EFFECT_TYPE_FIELD)
e2:SetCode(EFFECT_DIRECT_ATTACK)
e2:SetRange(LOCATION_MZONE)
e2:SetTargetRange(LOCATION_MZONE,0)
e2:SetTarget(cm.datg)
c:RegisterEffect(e2)
--Destroy
local e3=Effect.CreateEffect(c)
e3:SetCategory(CATEGORY_REMOVE)
e3:SetType(EFFECT_TYPE_FIELD+EFFECT_TYPE_TRIGGER_O)
e3:SetCode(EVENT_BATTLE_DAMAGE)
e3:SetRange(LOCATION_MZONE)
e3:SetProperty(EFFECT_FLAG_CARD_TARGET)
e3:SetCountLimit(1,m+900)
e3:SetCondition(cm.descon)
e3:SetTarget(cm.destg)
e3:SetOperation(cm.desop)
c:RegisterEffect(e3)
end
function cm.spfilter(c,tp,rp)
return (c:IsReason(REASON_BATTLE) or (c:IsReason(REASON_EFFECT) and rp==1-tp)) and c:IsPreviousLocation(LOCATION_MZONE)
and c:GetPreviousControler()==tp and c:GetSummonLocation()==LOCATION_EXTRA
and bit.band(c:GetPreviousTypeOnField(),TYPE_RITUAL)~=0 and bit.band(c:GetPreviousTypeOnField(),TYPE_PENDULUM)~=0
end
function cm.spcon(e,tp,eg,ep,ev,re,r,rp)
return eg:GetCount()==1 and eg:IsExists(cm.spfilter,1,nil,tp,rp)
end
function cm.spfilter2(c,e,tp)
if c:IsLocation(LOCATION_HAND+LOCATION_DECK) or (not c:IsLocation(LOCATION_GRAVE) and c:IsFacedown())
or not c:IsCanBeSpecialSummoned(e,0,tp,false,false) or c:IsControler(1-tp) then return false end
if c:IsLocation(LOCATION_EXTRA) then
return Duel.GetLocationCountFromEx(tp,tp,nil,c)>0
else
return Duel.GetMZoneCount(tp)>0
end
end
function cm.sptg(e,tp,eg,ep,ev,re,r,rp,chk)
local ec=eg:GetFirst()
if chk==0 then return cm.spfilter2(ec,e,tp) end
Duel.SetTargetCard(ec)
Duel.SetOperationInfo(0,CATEGORY_SPECIAL_SUMMON,ec,1,0,0)
end
function cm.spop(e,tp,eg,ep,ev,re,r,rp)
local c=e:GetHandler()
local ec=Duel.GetFirstTarget()
if ec:IsRelateToEffect(e) and c:IsRelateToEffect(e) then
Duel.SpecialSummon(ec,0,tp,tp,false,false,POS_FACEUP)
end
end
function cm.datg(e,c)
return c:IsType(TYPE_RITUAL) and c:IsType(TYPE_PENDULUM) and c:IsRace(RACE_PYRO)
end
function cm.descon(e,tp,eg,ep,ev,re,r,rp)
local tc=eg:GetFirst()
return ep~=tp and tc:IsControler(tp) and tc:IsRace(RACE_PYRO)
end
function cm.destg(e,tp,eg,ep,ev,re,r,rp,chk,chkc)
if chkc then return chkc:IsLocation(LOCATION_GRAVE) and chkc:IsControler(1-tp) and chkc:IsAbleToRemove() end
if chk==0 then return Duel.IsExistingTarget(Card.IsAbleToRemove,tp,0,LOCATION_GRAVE,1,nil) end
Duel.Hint(HINT_SELECTMSG,tp,HINTMSG_REMOVE)
local g=Duel.SelectTarget(tp,Card.IsAbleToRemove,tp,0,LOCATION_GRAVE,1,1,nil)
Duel.SetOperationInfo(0,CATEGORY_REMOVE,g,1,1-tp,LOCATION_GRAVE)
end
function cm.desop(e,tp,eg,ep,ev,re,r,rp)
local tc=Duel.GetFirstTarget()
if tc:IsRelateToEffect(e) then
Duel.Remove(tc,POS_FACEUP,REASON_EFFECT)
end
end
--Memory-Go-Round
local m=81042005
local cm=_G["c"..m]
xpcall(function() require("expansions/script/c37564765") end,function() require("script/c37564765") end)
cm.Senya_desc_with_nanahira=true
function cm.initial_effect(c)
--Activate
local e1=Effect.CreateEffect(c)
e1:SetCategory(CATEGORY_TODECK)
e1:SetType(EFFECT_TYPE_ACTIVATE)
e1:SetProperty(EFFECT_FLAG_CARD_TARGET)
e1:SetCode(EVENT_FREE_CHAIN)
e1:SetCountLimit(1,m)
e1:SetCondition(cm.condition)
e1:SetTarget(cm.target)
e1:SetOperation(cm.activate)
c:RegisterEffect(e1)
Senya.NanahiraTrap(c,e1)
--set
local e2=Effect.CreateEffect(c)
e2:SetType(EFFECT_TYPE_FIELD+EFFECT_TYPE_TRIGGER_O)
e2:SetProperty(EFFECT_FLAG_DELAY)
e2:SetCode(EVENT_SPSUMMON_SUCCESS)
e2:SetRange(LOCATION_GRAVE)
e2:SetCountLimit(1,m+900)
e2:SetCondition(cm.setcon)
e2:SetTarget(cm.settg)
e2:SetOperation(cm.setop)
c:RegisterEffect(e2)
end
function cm.cfilter(c)
return c:IsFaceup() and c:IsCode(37564765)
end
function cm.condition(e,tp,eg,ep,ev,re,r,rp)
return Duel.IsExistingMatchingCard(cm.cfilter,tp,LOCATION_ONFIELD,0,1,nil)
end
function cm.filter(c)
return (c:IsFaceup() or c:IsLocation(LOCATION_GRAVE)) and c.Senya_desc_with_nanahira and c:IsAbleToDeck()
end
function cm.target(e,tp,eg,ep,ev,re,r,rp,chk,chkc)
if chkc then return chkc:IsLocation(LOCATION_REMOVED+LOCATION_GRAVE) and chkc:IsControler(tp) and cm.filter(chkc) end
if chk==0 then return Duel.IsExistingTarget(cm.filter,tp,LOCATION_REMOVED+LOCATION_GRAVE,0,1,nil) end
Duel.Hint(HINT_SELECTMSG,tp,HINTMSG_TODECK)
local g=Duel.SelectTarget(tp,cm.filter,tp,LOCATION_REMOVED+LOCATION_GRAVE,0,1,5,nil)
Duel.SetOperationInfo(0,CATEGORY_TODECK,g,g:GetCount(),0,0)
end
function cm.activate(e,tp,eg,ep,ev,re,r,rp)
local g=Duel.GetChainInfo(0,CHAININFO_TARGET_CARDS):Filter(Card.IsRelateToEffect,nil,e)
Duel.SendtoDeck(g,nil,2,REASON_EFFECT)
end
function cm.setfilter(c,tp)
return c:IsFaceup() and c:IsCode(37564765) and c:IsControler(tp)
end
function cm.setcon(e,tp,eg,ep,ev,re,r,rp)
return eg:IsExists(cm.setfilter,1,nil,tp)
end
function cm.settg(e,tp,eg,ep,ev,re,r,rp,chk)
if chk==0 then return e:GetHandler():IsSSetable() end
Duel.SetOperationInfo(0,CATEGORY_LEAVE_GRAVE,e:GetHandler(),1,0,0)
end
function cm.setop(e,tp,eg,ep,ev,re,r,rp)
local c=e:GetHandler()
if c:IsRelateToEffect(e) and Duel.SSet(tp,c)~=0 then
local e1=Effect.CreateEffect(c)
e1:SetType(EFFECT_TYPE_SINGLE)
e1:SetCode(EFFECT_LEAVE_FIELD_REDIRECT)
e1:SetProperty(EFFECT_FLAG_CANNOT_DISABLE)
e1:SetReset(RESET_EVENT+RESETS_REDIRECT)
e1:SetValue(LOCATION_REMOVED)
c:RegisterEffect(e1)
end
end
--华光之夏雨 月读千音
local m=81044002
local cm=_G["c"..m]
Duel.LoadScript("c81000000.lua")
function cm.initial_effect(c)
--link summon
aux.AddLinkProcedure(c,aux.FilterBoolFunction(Card.IsLinkType,TYPE_LINK),3)
c:EnableReviveLimit()
--negate
local e1=Effect.CreateEffect(c)
e1:SetCategory(CATEGORY_NEGATE)
e1:SetType(EFFECT_TYPE_QUICK_O)
e1:SetCode(EVENT_CHAINING)
e1:SetProperty(EFFECT_FLAG_DAMAGE_STEP+EFFECT_FLAG_DAMAGE_CAL+EFFECT_FLAG_CANNOT_INACTIVATE+EFFECT_FLAG_CANNOT_DISABLE+EFFECT_FLAG_CANNOT_NEGATE)
e1:SetRange(LOCATION_MZONE)
e1:SetCountLimit(1,m)
e1:SetCondition(cm.discon)
e1:SetCost(cm.discost)
e1:SetTarget(cm.distg)
e1:SetOperation(cm.disop)
c:RegisterEffect(e1)
--spsummon
local e2=Effect.CreateEffect(c)
e2:SetCategory(CATEGORY_SPECIAL_SUMMON)
e2:SetType(EFFECT_TYPE_SINGLE+EFFECT_TYPE_TRIGGER_O)
e2:SetProperty(EFFECT_FLAG_CARD_TARGET+EFFECT_FLAG_DELAY+EFFECT_FLAG_CANNOT_INACTIVATE+EFFECT_FLAG_CANNOT_DISABLE+EFFECT_FLAG_CANNOT_NEGATE)
e2:SetCode(EVENT_DESTROYED)
e2:SetCountLimit(1,m+900)
e2:SetCondition(cm.spcon)
e2:SetTarget(cm.sptg)
e2:SetOperation(cm.spop)
c:RegisterEffect(e2)
end
function cm.discon(e,tp,eg,ep,ev,re,r,rp)
return rp==1-tp and not e:GetHandler():IsStatus(STATUS_BATTLE_DESTROYED) and Duel.IsChainNegatable(ev)
end
function cm.costfilter(c)
return c:IsFaceup() and c:IsType(TYPE_LINK) and not c:IsStatus(STATUS_BATTLE_DESTROYED) and not c:IsCode(m)
end
function cm.discost(e,tp,eg,ep,ev,re,r,rp,chk)
if chk==0 then return Duel.CheckReleaseGroup(tp,cm.costfilter,1,nil) end
local sg=Duel.SelectReleaseGroup(tp,cm.costfilter,1,1,nil)
Duel.Release(sg,REASON_COST)
end
function cm.distg(e,tp,eg,ep,ev,re,r,rp,chk)
if chk==0 then return true end
Duel.SetOperationInfo(0,CATEGORY_NEGATE,eg,1,0,0)
end
function cm.disop(e,tp,eg,ep,ev,re,r,rp)
Duel.NegateActivation(ev)
end
function cm.spcon(e,tp,eg,ep,ev,re,r,rp)
local c=e:GetHandler()
return (c:IsReason(REASON_BATTLE) or (c:IsReason(REASON_EFFECT) and c:GetReasonPlayer()==1-tp)) and c:IsPreviousLocation(LOCATION_MZONE) and c:IsSummonType(SUMMON_TYPE_LINK)
end
function cm.spfilter(c,e,tp)
return c:IsType(TYPE_LINK) and not c:IsCode(m) and c:IsCanBeSpecialSummoned(e,0,tp,false,false)
end
function cm.sptg(e,tp,eg,ep,ev,re,r,rp,chk,chkc)
if chkc then return chkc:IsLocation(LOCATION_GRAVE) and chkc:IsControler(tp) and cm.spfilter(chkc,e,tp) end
if chk==0 then return Duel.GetLocationCount(tp,LOCATION_MZONE)>0
and Duel.IsExistingTarget(cm.spfilter,tp,LOCATION_GRAVE,0,1,nil,e,tp) end
Duel.Hint(HINT_SELECTMSG,tp,HINTMSG_SPSUMMON)
local g=Duel.SelectTarget(tp,cm.spfilter,tp,LOCATION_GRAVE,0,1,1,nil,e,tp)
Duel.SetOperationInfo(0,CATEGORY_SPECIAL_SUMMON,g,1,0,0)
end
function cm.spop(e,tp,eg,ep,ev,re,r,rp)
local tc=Duel.GetFirstTarget()
if tc and tc:IsRelateToEffect(e) and Duel.SpecialSummonStep(tc,0,tp,tp,false,false,POS_FACEUP) then
local e1=Effect.CreateEffect(e:GetHandler())
e1:SetType(EFFECT_TYPE_SINGLE)
e1:SetCode(EFFECT_LEAVE_FIELD_REDIRECT)
e1:SetProperty(EFFECT_FLAG_CANNOT_DISABLE)
e1:SetReset(RESET_EVENT+RESETS_REDIRECT)
e1:SetValue(LOCATION_REMOVED)
tc:RegisterEffect(e1,true)
end
Duel.SpecialSummonComplete()
end
--水晶艾蕾娜·雨夜
local m=81057004
local cm=_G["c"..m]
function cm.initial_effect(c)
--tohand
local e0=Effect.CreateEffect(c)
e0:SetCategory(CATEGORY_TOGRAVE)
e0:SetType(EFFECT_TYPE_IGNITION)
e0:SetRange(LOCATION_HAND)
e0:SetCountLimit(1,m)
e0:SetCost(cm.thcost)
e0:SetTarget(cm.thtg)
e0:SetOperation(cm.thop)
c:RegisterEffect(e0)
--spsummon
local e1=Effect.CreateEffect(c)
e1:SetCategory(CATEGORY_SPECIAL_SUMMON+CATEGORY_FUSION_SUMMON)
e1:SetType(EFFECT_TYPE_IGNITION)
e1:SetRange(LOCATION_GRAVE)
e1:SetCountLimit(1,m+900)
e1:SetTarget(cm.target)
e1:SetOperation(cm.operation)
c:RegisterEffect(e1)
end
function cm.thcost(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.thfilter(c)
return c:IsCode(m) and c:IsAbleToGrave()
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_TOGRAVE,nil,1,tp,LOCATION_DECK)
end
function cm.thop(e,tp,eg,ep,ev,re,r,rp)
Duel.Hint(HINT_SELECTMSG,tp,HINTMSG_TOGRAVE)
local g=Duel.SelectMatchingCard(tp,cm.thfilter,tp,LOCATION_DECK,0,1,2,nil)
if g:GetCount()>0 then
Duel.SendtoGrave(g,REASON_EFFECT)
end
end
function cm.filter0(c)
return c:IsType(TYPE_MONSTER) and c:IsCanBeFusionMaterial() and c:IsAbleToRemove()
end
function cm.filter1(c,e)
return c:IsType(TYPE_MONSTER) and c:IsCanBeFusionMaterial() and c:IsAbleToRemove() and not c:IsImmuneToEffect(e)
end
function cm.filter2(c,e,tp,m,f,gc,chkf)
return c:IsType(TYPE_FUSION) and (not f or f(c))
and c:IsCanBeSpecialSummoned(e,SUMMON_TYPE_FUSION,tp,false,false) and c:CheckFusionMaterial(m,gc,chkf)
and Duel.GetLocationCountFromEx(tp,tp,nil,c)>0
end
function cm.target(e,tp,eg,ep,ev,re,r,rp,chk)
local c=e:GetHandler()
if chk==0 then
local chkf=tp
local mg1=Duel.GetMatchingGroup(cm.filter0,tp,LOCATION_GRAVE,0,nil)
local res=Duel.IsExistingMatchingCard(cm.filter2,tp,LOCATION_EXTRA,0,1,nil,e,tp,mg1,nil,c,chkf)
if not res then
local ce=Duel.GetChainMaterial(tp)
if ce~=nil then
local fgroup=ce:GetTarget()
local mg2=fgroup(ce,e,tp)
local mf=ce:GetValue()
res=Duel.IsExistingMatchingCard(cm.filter2,tp,LOCATION_EXTRA,0,1,nil,e,tp,mg2,mf,c,chkf)
end
end
return res
end
Duel.SetOperationInfo(0,CATEGORY_SPECIAL_SUMMON,nil,1,tp,LOCATION_EXTRA)
Duel.SetOperationInfo(0,CATEGORY_REMOVE,c,1,tp,LOCATION_GRAVE)
end
function cm.operation(e,tp,eg,ep,ev,re,r,rp)
local c=e:GetHandler()
local chkf=tp
if not c:IsRelateToEffect(e) or c:IsImmuneToEffect(e) then return end
local mg1=Duel.GetMatchingGroup(cm.filter1,tp,LOCATION_GRAVE,0,nil,e)
local sg1=Duel.GetMatchingGroup(cm.filter2,tp,LOCATION_EXTRA,0,nil,e,tp,mg1,nil,c,chkf)
local mg2=nil
local sg2=nil
local ce=Duel.GetChainMaterial(tp)
if ce~=nil then
local fgroup=ce:GetTarget()
mg2=fgroup(ce,e,tp)
local mf=ce:GetValue()
sg2=Duel.GetMatchingGroup(cm.filter2,tp,LOCATION_EXTRA,0,nil,e,tp,mg2,mf,c,chkf)
end
if sg1:GetCount()>0 or (sg2~=nil and sg2:GetCount()>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,c,chkf)
tc:SetMaterial(mat1)
Duel.Remove(mat1,POS_FACEUP,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,mg2,c,chkf)
local fop=ce:GetOperation()
fop(ce,e,tp,tc,mat2)
end
tc:CompleteProcedure()
end
end
--璃池樱空·初遇
Duel.LoadScript("c81000000.lua")
function c81059007.initial_effect(c)
--
c:EnableReviveLimit()
aux.AddLinkProcedure(c,c81059007.matfilter,1)
Tenka.PyroLink(c)
--atkup
local e1=Effect.CreateEffect(c)
e1:SetType(EFFECT_TYPE_SINGLE)
e1:SetCode(EFFECT_MATERIAL_CHECK)
e1:SetValue(c81059007.matcheck)
c:RegisterEffect(e1)
--search
local e1=Effect.CreateEffect(c)
e1:SetDescription(aux.Stringid(81059007,0))
e1:SetCategory(CATEGORY_TOHAND+CATEGORY_SEARCH)
e1:SetType(EFFECT_TYPE_SINGLE+EFFECT_TYPE_TRIGGER_O)
e1:SetProperty(EFFECT_FLAG_DELAY)
e1:SetCode(EVENT_BE_MATERIAL)
e1:SetCondition(c81059007.condition)
e1:SetTarget(c81059007.target)
e1:SetOperation(c81059007.operation)
c:RegisterEffect(e1)
end
function c81059007.matfilter(c)
return c:GetBaseAttack()~=0
end
function c81059007.matcheck(e,c)
local g=c:GetMaterial():Filter(c81059007.matfilter,nil)
local atk=g:GetSum(Card.GetCode)
local e1=Effect.CreateEffect(c)
e1:SetType(EFFECT_TYPE_SINGLE)
e1:SetCode(EFFECT_CHANGE_CODE)
e1:SetValue(atk)
e1:SetReset(RESET_EVENT+0xff0000)
c:RegisterEffect(e1)
end
--search
function c81059007.condition(e,tp,eg,ep,ev,re,r,rp)
return e:GetHandler():IsLocation(LOCATION_GRAVE)
and r==REASON_FUSION
end
function c81059007.filter(c)
return c:IsType(TYPE_SPELL) and c:IsSetCard(0x46)
and c:IsAbleToHand()
end
function c81059007.target(e,tp,eg,ep,ev,re,r,rp,chk)
if chk==0 then return Duel.IsExistingMatchingCard(c81059007.filter,tp,LOCATION_DECK,0,1,nil) end
Duel.SetOperationInfo(0,CATEGORY_TOHAND,nil,1,tp,LOCATION_DECK)
end
function c81059007.operation(e,tp,eg,ep,ev,re,r,rp)
Duel.Hint(HINT_SELECTMSG,tp,HINTMSG_ATOHAND)
local g=Duel.SelectMatchingCard(tp,c81059007.filter,tp,LOCATION_DECK,0,1,1,nil)
if g:GetCount()>0 then
Duel.SendtoHand(g,nil,REASON_EFFECT)
Duel.ConfirmCards(1-tp,g)
local tc=g:GetFirst()
if tc:IsLocation(LOCATION_HAND) 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(1,0)
e1:SetValue(c81059007.aclimit)
e1:SetLabel(tc:GetCode())
e1:SetReset(RESET_PHASE+PHASE_END)
Duel.RegisterEffect(e1,tp)
end
end
end
function c81059007.aclimit(e,re,tp)
return re:GetHandler():IsCode(e:GetLabel())
end
--万类共生
function c9910871.initial_effect(c)
aux.AddCodeList(c,9910871)
--Activate
local e1=Effect.CreateEffect(c)
e1:SetCategory(CATEGORY_SPECIAL_SUMMON+CATEGORY_FUSION_SUMMON)
e1:SetType(EFFECT_TYPE_ACTIVATE)
e1:SetCode(EVENT_FREE_CHAIN)
e1:SetHintTiming(0,TIMINGS_CHECK_MONSTER+TIMING_END_PHASE)
e1:SetTarget(c9910871.target)
e1:SetOperation(c9910871.activate)
c:RegisterEffect(e1)
--to deck
local e2=Effect.CreateEffect(c)
e2:SetCategory(CATEGORY_TODECK)
e2:SetType(EFFECT_TYPE_IGNITION)
e2:SetRange(LOCATION_GRAVE)
e2:SetProperty(EFFECT_FLAG_CARD_TARGET)
e2:SetTarget(c9910871.tdtg)
e2:SetOperation(c9910871.tdop)
c:RegisterEffect(e2)
end
function c9910871.mfilter1(c,e)
return not c:IsImmuneToEffect(e)
end
function c9910871.mfilter2(c)
return c:IsType(TYPE_MONSTER) and c:IsCanBeFusionMaterial() and c:IsAbleToRemove()
end
function c9910871.mfilter3(c)
return c:IsType(TYPE_MONSTER) and c:IsCanBeFusionMaterial() and c:IsFaceup()
end
function c9910871.mfilter4(c,e)
return c9910871.mfilter3(c) and not c:IsImmuneToEffect(e)
end
function c9910871.mfilter5(c)
return c:IsType(TYPE_MONSTER) and c:IsCanBeFusionMaterial() and c:IsAbleToGrave()
end
function c9910871.spfilter1(c,e,tp,m,f,chkf)
return c:IsType(TYPE_FUSION) and (not f or f(c))
and c:IsCanBeSpecialSummoned(e,SUMMON_TYPE_FUSION,tp,false,false) and c:CheckFusionMaterial(m,nil,chkf)
end
function c9910871.spfilter2(c,e,tp,m,f,chkf,code)
return c:IsType(TYPE_FUSION) and c:IsCode(code) and (not f or f(c))
and c:IsCanBeSpecialSummoned(e,SUMMON_TYPE_FUSION,tp,false,false) and c:CheckFusionMaterial(m,nil,chkf)
end
function c9910871.fcheck(tp,sg,fc)
return aux.drccheck(sg)
end
function c9910871.fcheck2(tp,sg,fc)
return aux.drccheck(sg) and sg:FilterCount(Card.IsLocation,nil,LOCATION_GRAVE)<=1
end
function c9910871.gcheck2(sg)
return aux.drccheck(sg) and sg:FilterCount(Card.IsLocation,nil,LOCATION_GRAVE)<=1
end
function c9910871.fcheck3(tp,sg,fc)
return aux.drccheck(sg) and sg:FilterCount(Card.IsControler,nil,1-tp)<=1
end
function c9910871.gcheck3(tp)
return function(sg)
return aux.drccheck(sg) and sg:FilterCount(Card.IsControler,nil,1-tp)<=1
end
end
function c9910871.fcheck4(tp,sg,fc)
return aux.drccheck(sg) and sg:FilterCount(Card.IsLocation,nil,LOCATION_DECK)<=1
end
function c9910871.gcheck4(sg)
return aux.drccheck(sg) and sg:FilterCount(Card.IsLocation,nil,LOCATION_DECK)<=1
end
function c9910871.target(e,tp,eg,ep,ev,re,r,rp,chk)
if chk==0 then
local chkf=tp
local mg1=Duel.GetFusionMaterial(tp)
aux.FCheckAdditional=c9910871.fcheck
local res=Duel.IsExistingMatchingCard(c9910871.spfilter1,tp,LOCATION_EXTRA,0,1,nil,e,tp,mg1,nil,chkf)
if res then return true end
local mg2=Duel.GetMatchingGroup(c9910871.mfilter2,tp,LOCATION_GRAVE,LOCATION_GRAVE,nil)
mg2:Merge(mg1)
local mg3=Duel.GetMatchingGroup(c9910871.mfilter3,tp,0,LOCATION_MZONE,nil)
mg3:Merge(mg1)
local mg4=Duel.GetMatchingGroup(c9910871.mfilter5,tp,LOCATION_DECK,0,nil)
mg4:Merge(mg1)
aux.FCheckAdditional=c9910871.fcheck2
aux.GCheckAdditional=c9910871.gcheck2
res=Duel.IsExistingMatchingCard(c9910871.spfilter2,tp,LOCATION_EXTRA,0,1,nil,e,tp,mg2,nil,chkf,9910881)
if res then return true end
aux.FCheckAdditional=c9910871.fcheck3
aux.GCheckAdditional=c9910871.gcheck3(tp)
res=Duel.IsExistingMatchingCard(c9910871.spfilter2,tp,LOCATION_EXTRA,0,1,nil,e,tp,mg3,nil,chkf,9910885)
if res then return true end
aux.FCheckAdditional=c9910871.fcheck4
aux.GCheckAdditional=c9910871.gcheck4
res=Duel.IsExistingMatchingCard(c9910871.spfilter2,tp,LOCATION_EXTRA,0,1,nil,e,tp,mg4,nil,chkf,9910890)
if res then return true end
aux.FCheckAdditional=c9910871.fcheck
aux.GCheckAdditional=nil
if not res then
local ce=Duel.GetChainMaterial(tp)
if ce~=nil then
local fgroup=ce:GetTarget()
local mg0=fgroup(ce,e,tp)
local mf=ce:GetValue()
res=Duel.IsExistingMatchingCard(c9910871.spfilter1,tp,LOCATION_EXTRA,0,1,nil,e,tp,mg0,mf,chkf)
end
end
aux.FCheckAdditional=nil
return res
end
Duel.SetOperationInfo(0,CATEGORY_SPECIAL_SUMMON,nil,1,tp,LOCATION_EXTRA)
end
function c9910871.racefilter(c,rc)
return c:GetRace()>0
end
function c9910871.activate(e,tp,eg,ep,ev,re,r,rp)
local chkf=tp
local mg1=Duel.GetFusionMaterial(tp):Filter(c9910871.mfilter1,nil,e)
aux.FCheckAdditional=c9910871.fcheck
local sg1=Duel.GetMatchingGroup(c9910871.spfilter1,tp,LOCATION_EXTRA,0,nil,e,tp,mg1,nil,chkf)
local mg2=Duel.GetMatchingGroup(c9910871.mfilter2,tp,LOCATION_GRAVE,LOCATION_GRAVE,nil)
mg2:Merge(mg1)
local mg3=Duel.GetMatchingGroup(c9910871.mfilter4,tp,0,LOCATION_MZONE,nil,e)
mg3:Merge(mg1)
local mg4=Duel.GetMatchingGroup(c9910871.mfilter5,tp,LOCATION_DECK,0,nil)
mg4:Merge(mg1)
aux.FCheckAdditional=c9910871.fcheck2
aux.GCheckAdditional=c9910871.gcheck2
local sg2=Duel.GetMatchingGroup(c9910871.spfilter2,tp,LOCATION_EXTRA,0,nil,e,tp,mg2,nil,chkf,9910881)
sg1:Merge(sg2)
aux.FCheckAdditional=c9910871.fcheck3
aux.GCheckAdditional=c9910871.gcheck3(tp)
local sg3=Duel.GetMatchingGroup(c9910871.spfilter2,tp,LOCATION_EXTRA,0,nil,e,tp,mg3,nil,chkf,9910885)
sg1:Merge(sg3)
aux.FCheckAdditional=c9910871.fcheck4
aux.GCheckAdditional=c9910871.gcheck4
local sg4=Duel.GetMatchingGroup(c9910871.spfilter2,tp,LOCATION_EXTRA,0,nil,e,tp,mg4,nil,chkf,9910890)
sg1:Merge(sg4)
aux.FCheckAdditional=c9910871.fcheck
aux.GCheckAdditional=nil
local mg0=nil
local sg0=nil
local ce=Duel.GetChainMaterial(tp)
if ce~=nil then
local fgroup=ce:GetTarget()
mg0=fgroup(ce,e,tp)
local mf=ce:GetValue()
sg0=Duel.GetMatchingGroup(c9910871.spfilter1,tp,LOCATION_EXTRA,0,nil,e,tp,mg2,mf,chkf)
end
if sg1:GetCount()>0 or (sg0~=nil and sg0:GetCount()>0) then
local sg=sg1:Clone()
if sg0 then sg:Merge(sg0) 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 (sg0==nil or not sg0:IsContains(tc) or not Duel.SelectYesNo(tp,ce:GetDescription())) then
if tc:IsCode(9910881) then
aux.FCheckAdditional=c9910871.fcheck2
aux.GCheckAdditional=c9910871.gcheck2
local mat1=Duel.SelectFusionMaterial(tp,tc,mg2,nil,chkf)
aux.FCheckAdditional=c9910871.fcheck
aux.GCheckAdditional=nil
tc:SetMaterial(mat1)
local rg=mat1:Filter(Card.IsLocation,nil,LOCATION_GRAVE)
mat1:Sub(rg)
Duel.SendtoGrave(mat1,REASON_EFFECT+REASON_MATERIAL+REASON_FUSION)
Duel.Remove(rg,POS_FACEUP,REASON_EFFECT+REASON_MATERIAL+REASON_FUSION)
elseif tc:IsCode(9910885) then
aux.FCheckAdditional=c9910871.fcheck3
aux.GCheckAdditional=c9910871.gcheck3(tp)
local mat1=Duel.SelectFusionMaterial(tp,tc,mg3,nil,chkf)
aux.FCheckAdditional=c9910871.fcheck
aux.GCheckAdditional=nil
tc:SetMaterial(mat1)
Duel.SendtoGrave(mat1,REASON_EFFECT+REASON_MATERIAL+REASON_FUSION)
elseif tc:IsCode(9910890) then
aux.FCheckAdditional=c9910871.fcheck4
aux.GCheckAdditional=c9910871.gcheck4
local mat1=Duel.SelectFusionMaterial(tp,tc,mg4,nil,chkf)
aux.FCheckAdditional=c9910871.fcheck
aux.GCheckAdditional=nil
tc:SetMaterial(mat1)
Duel.SendtoGrave(mat1,REASON_EFFECT+REASON_MATERIAL+REASON_FUSION)
else
local mat2=Duel.SelectFusionMaterial(tp,tc,mg1,nil,chkf)
tc:SetMaterial(mat2)
Duel.SendtoGrave(mat2,REASON_EFFECT+REASON_MATERIAL+REASON_FUSION)
end
Duel.BreakEffect()
Duel.SpecialSummon(tc,SUMMON_TYPE_FUSION,tp,tp,false,false,POS_FACEUP)
else
local mat=Duel.SelectFusionMaterial(tp,tc,mg0,nil,chkf)
local fop=ce:GetOperation()
fop(ce,e,tp,tc,mat)
end
tc:RegisterFlagEffect(9910871,RESET_EVENT+RESET_TURN_SET+RESET_TOHAND+RESET_TODECK+RESET_TOFIELD,EFFECT_FLAG_CLIENT_HINT,1,0,aux.Stringid(9910871,0))
tc:CompleteProcedure()
local mg=tc:GetMaterial()
local wg=mg:Filter(c9910871.racefilter,nil)
local wbc=wg:GetFirst()
local att=0
for wbc in aux.Next(wg) do
att=att|wbc:GetRace()
end
if att>0 then
local e1=Effect.CreateEffect(e:GetHandler())
e1:SetType(EFFECT_TYPE_SINGLE)
e1:SetCode(EFFECT_ADD_RACE)
e1:SetProperty(EFFECT_FLAG_CANNOT_DISABLE)
e1:SetValue(att)
e1:SetReset(RESET_EVENT+RESETS_STANDARD)
tc:RegisterEffect(e1)
end
end
aux.FCheckAdditional=nil
end
function c9910871.tdfilter(c)
return aux.IsCodeListed(c,9910871) and c:IsType(TYPE_MONSTER) and c:IsAbleToDeck()
end
function c9910871.tdtg(e,tp,eg,ep,ev,re,r,rp,chk,chkc)
if chkc then return chkc:IsLocation(LOCATION_GRAVE) and c9910871.tdfilter(chkc) end
if chk==0 then return e:GetHandler():IsAbleToDeck()
and Duel.IsExistingTarget(c9910871.tdfilter,tp,LOCATION_GRAVE,0,1,nil) end
Duel.Hint(HINT_SELECTMSG,tp,HINTMSG_TODECK)
local g=Duel.SelectTarget(tp,c9910871.tdfilter,tp,LOCATION_GRAVE,0,1,1,nil)
g:AddCard(e:GetHandler())
Duel.SetOperationInfo(0,CATEGORY_TODECK,g,2,0,0)
end
function c9910871.tdop(e,tp,eg,ep,ev,re,r,rp)
local c=e:GetHandler()
local tc=Duel.GetFirstTarget()
if c:IsRelateToEffect(e) and tc:IsRelateToEffect(e) then
local g=Group.FromCards(c,tc)
Duel.SendtoDeck(g,nil,2,REASON_EFFECT)
end
end
--魔导学者 恩蒂米娅
function c9910872.initial_effect(c)
aux.AddCodeList(c,9910871)
c:EnableCounterPermit(0x1)
--add counter / to hand
local e1=Effect.CreateEffect(c)
e1:SetCategory(CATEGORY_COUNTER+CATEGORY_TOHAND+CATEGORY_SEARCH)
e1:SetType(EFFECT_TYPE_SINGLE+EFFECT_TYPE_TRIGGER_O)
e1:SetCode(EVENT_SPSUMMON_SUCCESS)
e1:SetProperty(EFFECT_FLAG_DAMAGE_STEP+EFFECT_FLAG_DELAY)
e1:SetTarget(c9910872.cttg)
e1:SetOperation(c9910872.ctop)
c:RegisterEffect(e1)
--disable
local e2=Effect.CreateEffect(c)
e2:SetCategory(CATEGORY_DISABLE)
e2:SetType(EFFECT_TYPE_IGNITION)
e2:SetProperty(EFFECT_FLAG_CARD_TARGET)
e2:SetRange(LOCATION_MZONE)
e2:SetCountLimit(1)
e2:SetCondition(c9910872.discon1)
e2:SetCost(c9910872.discost)
e2:SetTarget(c9910872.distg)
e2:SetOperation(c9910872.disop)
c:RegisterEffect(e2)
local e3=e2:Clone()
e3:SetType(EFFECT_TYPE_QUICK_O)
e3:SetCode(EVENT_FREE_CHAIN)
e3:SetHintTiming(0,TIMINGS_CHECK_MONSTER+TIMING_END_PHASE)
e3:SetCondition(c9910872.discon2)
c:RegisterEffect(e3)
end
function c9910872.thfilter(c)
return aux.IsCodeListed(c,9910871) and c:IsAbleToHand() and not c:IsCode(9910872)
end
function c9910872.cttg(e,tp,eg,ep,ev,re,r,rp,chk)
local c=e:GetHandler()
if chk==0 then return true end
local sel=0
if Duel.IsExistingMatchingCard(c9910872.thfilter,tp,LOCATION_DECK,0,1,nil) then
Duel.Hint(HINT_SELECTMSG,tp,aux.Stringid(9910872,0))
sel=Duel.SelectOption(tp,aux.Stringid(9910872,1),aux.Stringid(9910872,2))+1
else
Duel.SelectOption(tp,aux.Stringid(9910872,1))
sel=1
end
e:SetLabel(sel)
if sel==1 then
e:SetCategory(CATEGORY_COUNTER)
Duel.SetOperationInfo(0,CATEGORY_COUNTER,nil,2,0,0x1)
else
e:SetCategory(CATEGORY_TOHAND+CATEGORY_SEARCH)
Duel.SetOperationInfo(0,CATEGORY_TOHAND,nil,1,tp,LOCATION_DECK)
end
end
function c9910872.ctop(e,tp,eg,ep,ev,re,r,rp)
local c=e:GetHandler()
local sel=e:GetLabel()
if sel==1 then
if c:IsRelateToEffect(e) then c:AddCounter(0x1,2) end
else
Duel.Hint(HINT_SELECTMSG,tp,HINTMSG_ATOHAND)
local g=Duel.SelectMatchingCard(tp,c9910872.thfilter,tp,LOCATION_DECK,0,1,1,nil)
if g:GetCount()>0 then
Duel.SendtoHand(g,nil,REASON_EFFECT)
Duel.ConfirmCards(1-tp,g)
end
end
end
function c9910872.filter(c)
return c:IsFaceup() and c:IsType(TYPE_FUSION)
end
function c9910872.discon1(e,tp,eg,ep,ev,re,r,rp)
return not Duel.IsExistingMatchingCard(c9910872.filter,tp,LOCATION_MZONE,0,1,nil)
end
function c9910872.discon2(e,tp,eg,ep,ev,re,r,rp)
return Duel.IsExistingMatchingCard(c9910872.filter,tp,LOCATION_MZONE,0,1,nil)
end
function c9910872.discost(e,tp,eg,ep,ev,re,r,rp,chk)
if chk==0 then return e:GetHandler():IsCanRemoveCounter(tp,0x1,1,REASON_COST) end
e:GetHandler():RemoveCounter(tp,0x1,1,REASON_COST)
end
function c9910872.distg(e,tp,eg,ep,ev,re,r,rp,chk,chkc)
if chkc then return chkc:IsOnField() and chkc:IsControler(1-tp) and aux.NegateAnyFilter(chkc) end
if chk==0 then return Duel.IsExistingTarget(aux.NegateAnyFilter,tp,0,LOCATION_ONFIELD,1,nil) end
Duel.Hint(HINT_SELECTMSG,tp,HINTMSG_DISABLE)
local g=Duel.SelectTarget(tp,aux.NegateAnyFilter,tp,0,LOCATION_ONFIELD,1,1,nil)
Duel.SetOperationInfo(0,CATEGORY_DISABLE,g,1,0,0)
end
function c9910872.disfilter(c,e)
return c:IsRelateToEffect(e) and aux.NegateAnyFilter(c)
end
function c9910872.disop(e,tp,eg,ep,ev,re,r,rp)
local c=e:GetHandler()
local g=Duel.GetChainInfo(0,CHAININFO_TARGET_CARDS):Filter(c9910872.disfilter,nil,e)
local tc=g:GetFirst()
while tc do
Duel.NegateRelatedChain(tc,RESET_TURN_SET)
local e1=Effect.CreateEffect(c)
e1:SetType(EFFECT_TYPE_SINGLE)
e1:SetCode(EFFECT_DISABLE)
e1:SetProperty(EFFECT_FLAG_CANNOT_DISABLE)
e1:SetReset(RESET_EVENT+RESETS_STANDARD+RESET_PHASE+PHASE_END+RESET_OPPO_TURN)
tc:RegisterEffect(e1)
local e2=Effect.CreateEffect(c)
e2:SetType(EFFECT_TYPE_SINGLE)
e2:SetCode(EFFECT_DISABLE_EFFECT)
e2:SetProperty(EFFECT_FLAG_CANNOT_DISABLE)
e2:SetValue(RESET_TURN_SET)
e2:SetReset(RESET_EVENT+RESETS_STANDARD+RESET_PHASE+PHASE_END+RESET_OPPO_TURN)
tc:RegisterEffect(e2)
if tc:IsType(TYPE_TRAPMONSTER) then
local e3=Effect.CreateEffect(c)
e3:SetType(EFFECT_TYPE_SINGLE)
e3:SetProperty(EFFECT_FLAG_CANNOT_DISABLE)
e3:SetCode(EFFECT_DISABLE_TRAPMONSTER)
e3:SetReset(RESET_EVENT+RESETS_STANDARD+RESET_PHASE+PHASE_END+RESET_OPPO_TURN)
tc:RegisterEffect(e3)
end
tc=g:GetNext()
end
end
--缠毒的赛德瑞娅
function c9910873.initial_effect(c)
aux.AddCodeList(c,9910871)
--spsummon
local e1=Effect.CreateEffect(c)
e1:SetCategory(CATEGORY_SPECIAL_SUMMON+CATEGORY_GRAVE_SPSUMMON)
e1:SetType(EFFECT_TYPE_IGNITION)
e1:SetRange(LOCATION_HAND)
e1:SetCountLimit(1,9910873)
e1:SetCondition(c9910873.spcon)
e1:SetTarget(c9910873.sptg)
e1:SetOperation(c9910873.spop)
c:RegisterEffect(e1)
--destroy
local e2=Effect.CreateEffect(c)
e2:SetCategory(CATEGORY_DESTROY)
e2:SetType(EFFECT_TYPE_QUICK_O)
e2:SetCode(EVENT_FREE_CHAIN)
e2:SetRange(LOCATION_GRAVE)
e2:SetCountLimit(1,9910874)
e2:SetHintTiming(0,TIMINGS_CHECK_MONSTER+TIMING_MAIN_END)
e2:SetCondition(c9910873.descon)
e2:SetCost(aux.bfgcost)
e2:SetTarget(c9910873.destg)
e2:SetOperation(c9910873.desop)
c:RegisterEffect(e2)
end
function c9910873.spcon(e,tp,eg,ep,ev,re,r,rp)
local g=Duel.GetFieldGroup(tp,LOCATION_MZONE,LOCATION_MZONE)
local sg=g:Filter(Card.IsFaceup,nil)
return sg and sg:GetClassCount(Card.GetRace)>=2
end
function c9910873.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 c9910873.cfilter(c)
return c:IsSummonType(SUMMON_TYPE_SPECIAL) and not c:IsStatus(STATUS_SPSUMMON_TURN)
end
function c9910873.spfilter(c,e,tp)
return aux.IsCodeListed(c,9910871) and c:IsCanBeSpecialSummoned(e,0,tp,false,false,POS_FACEUP_DEFENSE)
end
function c9910873.spop(e,tp,eg,ep,ev,re,r,rp)
local c=e:GetHandler()
if not c:IsRelateToEffect(e) or Duel.SpecialSummon(c,0,tp,tp,false,false,POS_FACEUP)==0 then return end
local g=Duel.GetMatchingGroup(aux.NecroValleyFilter(c9910873.spfilter),tp,LOCATION_GRAVE,0,nil,e,tp)
if Duel.IsExistingMatchingCard(c9910873.cfilter,tp,LOCATION_MZONE,LOCATION_MZONE,1,nil)
and Duel.GetLocationCount(tp,LOCATION_MZONE)>0 and g:GetCount()>0
and Duel.SelectYesNo(tp,aux.Stringid(9910873,0)) then
Duel.BreakEffect()
Duel.Hint(HINT_SELECTMSG,tp,HINTMSG_SPSUMMON)
local sg=g:Select(tp,1,1,nil)
Duel.SpecialSummon(sg,0,tp,tp,false,false,POS_FACEUP_DEFENSE)
end
end
function c9910873.cfilter2(c)
return c:IsSummonLocation(LOCATION_EXTRA) and c:IsFaceup() and c:IsRace(RACE_AQUA)
end
function c9910873.descon(e,tp,eg,ep,ev,re,r,rp)
return (Duel.GetCurrentPhase()==PHASE_MAIN1 or Duel.GetCurrentPhase()==PHASE_MAIN2)
and Duel.IsExistingMatchingCard(c9910873.cfilter2,tp,LOCATION_MZONE,LOCATION_MZONE,1,nil)
end
function c9910873.destg(e,tp,eg,ep,ev,re,r,rp,chk)
if chk==0 then return Duel.IsExistingMatchingCard(Card.IsFaceup,tp,0,LOCATION_MZONE,1,nil) end
local g=Duel.GetMatchingGroup(Card.IsFaceup,tp,0,LOCATION_MZONE,nil)
Duel.SetOperationInfo(0,CATEGORY_DESTROY,g,1,0,0)
end
function c9910873.desop(e,tp,eg,ep,ev,re,r,rp)
Duel.Hint(HINT_SELECTMSG,tp,HINTMSG_DESTROY)
local g=Duel.SelectMatchingCard(tp,Card.IsFaceup,tp,0,LOCATION_MZONE,1,1,nil)
if #g>0 then
Duel.HintSelection(g)
Duel.Destroy(g,REASON_EFFECT)
end
end
--幽视的斯特利吉芙
function c9910875.initial_effect(c)
aux.AddCodeList(c,9910871)
--spsummon
local e1=Effect.CreateEffect(c)
e1:SetCategory(CATEGORY_SPECIAL_SUMMON+CATEGORY_HANDES+CATEGORY_DRAW)
e1:SetType(EFFECT_TYPE_IGNITION)
e1:SetRange(LOCATION_HAND)
e1:SetCountLimit(1,9910875)
e1:SetCondition(c9910875.spcon)
e1:SetTarget(c9910875.sptg)
e1:SetOperation(c9910875.spop)
c:RegisterEffect(e1)
--turn set
local e2=Effect.CreateEffect(c)
e2:SetCategory(CATEGORY_POSITION)
e2:SetType(EFFECT_TYPE_QUICK_O)
e2:SetCode(EVENT_FREE_CHAIN)
e2:SetRange(LOCATION_GRAVE)
e2:SetCountLimit(1,9910876)
e2:SetHintTiming(0,TIMINGS_CHECK_MONSTER+TIMING_END_PHASE)
e2:SetCondition(c9910875.poscon)
e2:SetCost(aux.bfgcost)
e2:SetTarget(c9910875.postg)
e2:SetOperation(c9910875.posop)
c:RegisterEffect(e2)
end
function c9910875.spcon(e,tp,eg,ep,ev,re,r,rp)
local g=Duel.GetFieldGroup(tp,LOCATION_MZONE,LOCATION_MZONE)
local sg=g:Filter(Card.IsFaceup,nil)
return sg and sg:GetClassCount(Card.GetRace)>=2
end
function c9910875.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 c9910875.filter(c)
return aux.IsCodeListed(c,9910871) and c:IsDiscardable(REASON_EFFECT)
end
function c9910875.spop(e,tp,eg,ep,ev,re,r,rp)
local c=e:GetHandler()
if not c:IsRelateToEffect(e) or Duel.SpecialSummon(c,0,tp,tp,false,false,POS_FACEUP)==0 then return end
if Duel.IsExistingMatchingCard(Card.IsFacedown,tp,LOCATION_MZONE,LOCATION_MZONE,1,nil)
and Duel.IsExistingMatchingCard(c9910875.filter,tp,LOCATION_HAND,0,1,nil)
and Duel.IsPlayerCanDraw(tp,1) and Duel.SelectYesNo(tp,aux.Stringid(9910875,0)) then
Duel.BreakEffect()
if Duel.DiscardHand(tp,c9910875.filter,1,1,REASON_EFFECT+REASON_DISCARD,nil)~=0 then
Duel.Draw(tp,1,REASON_EFFECT)
end
end
end
function c9910875.cfilter2(c)
return c:IsSummonLocation(LOCATION_EXTRA) and c:IsFaceup() and c:IsRace(RACE_WINDBEAST)
end
function c9910875.poscon(e,tp,eg,ep,ev,re,r,rp)
return Duel.GetTurnPlayer()==1-tp
and Duel.IsExistingMatchingCard(c9910875.cfilter2,tp,LOCATION_MZONE,LOCATION_MZONE,1,nil)
end
function c9910875.posfilter(c)
return c:IsSummonType(SUMMON_TYPE_SPECIAL) and c:IsFaceup() and c:IsCanTurnSet()
end
function c9910875.postg(e,tp,eg,ep,ev,re,r,rp,chk)
if chk==0 then return Duel.IsExistingMatchingCard(Card.IsDiscardable,tp,LOCATION_HAND,0,1,nil,REASON_EFFECT)
and Duel.IsExistingMatchingCard(c9910875.posfilter,tp,0,LOCATION_MZONE,1,nil) end
local g=Duel.GetMatchingGroup(c9910875.posfilter,tp,0,LOCATION_MZONE,nil)
Duel.SetOperationInfo(0,CATEGORY_HANDES,nil,0,tp,1)
Duel.SetOperationInfo(0,CATEGORY_POSITION,g,g:GetCount(),0,0)
end
function c9910875.posop(e,tp,eg,ep,ev,re,r,rp)
if Duel.DiscardHand(tp,Card.IsDiscardable,1,1,REASON_EFFECT+REASON_DISCARD,nil,REASON_EFFECT)==0 then return end
local g=Duel.GetMatchingGroup(c9910875.posfilter,tp,0,LOCATION_MZONE,nil)
if g:GetCount()>0 then
Duel.ChangePosition(g,POS_FACEDOWN_DEFENSE)
end
end
--舞丝的阿瑞妮达
function c9910877.initial_effect(c)
aux.AddCodeList(c,9910871)
--spsummon
local e1=Effect.CreateEffect(c)
e1:SetCategory(CATEGORY_SPECIAL_SUMMON+CATEGORY_TOHAND)
e1:SetType(EFFECT_TYPE_IGNITION)
e1:SetRange(LOCATION_HAND)
e1:SetCountLimit(1,9910877)
e1:SetCondition(c9910877.spcon)
e1:SetTarget(c9910877.sptg)
e1:SetOperation(c9910877.spop)
c:RegisterEffect(e1)
--remove
local e2=Effect.CreateEffect(c)
e2:SetCategory(CATEGORY_REMOVE)
e2:SetType(EFFECT_TYPE_IGNITION)
e2:SetProperty(EFFECT_FLAG_CARD_TARGET)
e2:SetRange(LOCATION_GRAVE)
e2:SetCountLimit(1,9910878)
e2:SetCondition(c9910877.rmcon)
e2:SetCost(aux.bfgcost)
e2:SetTarget(c9910877.rmtg)
e2:SetOperation(c9910877.rmop)
c:RegisterEffect(e2)
end
function c9910877.spcon(e,tp,eg,ep,ev,re,r,rp)
local g=Duel.GetFieldGroup(tp,LOCATION_MZONE,LOCATION_MZONE)
local sg=g:Filter(Card.IsFaceup,nil)
return sg and sg:GetClassCount(Card.GetRace)>=2
end
function c9910877.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 c9910877.thfilter(c,e,tp)
return (c:IsLocation(LOCATION_GRAVE) or c:IsFaceup()) and aux.IsCodeListed(c,9910871)
and c:IsType(TYPE_MONSTER) and c:IsAbleToHand()
end
function c9910877.spop(e,tp,eg,ep,ev,re,r,rp)
local c=e:GetHandler()
if not c:IsRelateToEffect(e) or Duel.SpecialSummon(c,0,tp,tp,false,false,POS_FACEUP)==0 then return end
local g=Duel.GetMatchingGroup(aux.NecroValleyFilter(c9910877.thfilter),tp,LOCATION_GRAVE+LOCATION_REMOVED,0,nil)
if Duel.IsExistingMatchingCard(Card.IsSummonType,tp,LOCATION_MZONE,LOCATION_MZONE,1,nil,SUMMON_TYPE_NORMAL) and g:GetCount()>0 and Duel.SelectYesNo(tp,aux.Stringid(9910877,0)) then
Duel.BreakEffect()
Duel.Hint(HINT_SELECTMSG,tp,HINTMSG_ATOHAND)
local sg=g:Select(tp,1,1,nil)
Duel.SendtoHand(sg,nil,REASON_EFFECT)
Duel.ConfirmCards(1-tp,sg)
end
end
function c9910877.cfilter2(c)
return c:IsSummonLocation(LOCATION_EXTRA) and c:IsFaceup() and c:IsRace(RACE_INSECT)
end
function c9910877.rmcon(e,tp,eg,ep,ev,re,r,rp)
return Duel.IsExistingMatchingCard(c9910877.cfilter2,tp,LOCATION_MZONE,LOCATION_MZONE,1,nil)
end
function c9910877.rmtg(e,tp,eg,ep,ev,re,r,rp,chk,chkc)
if chkc then return chkc:IsOnField() and chkc:IsControler(1-tp) and chkc:IsAbleToRemove() end
if chk==0 then return Duel.IsExistingTarget(Card.IsAbleToRemove,tp,0,LOCATION_ONFIELD,1,nil) end
Duel.Hint(HINT_SELECTMSG,tp,HINTMSG_REMOVE)
local g=Duel.SelectTarget(tp,Card.IsAbleToRemove,tp,0,LOCATION_ONFIELD,1,1,nil)
Duel.SetOperationInfo(0,CATEGORY_REMOVE,g,1,0,0)
end
function c9910877.rmop(e,tp,eg,ep,ev,re,r,rp)
local tc=Duel.GetFirstTarget()
if tc:IsRelateToEffect(e) then
Duel.Remove(tc,POS_FACEUP,REASON_EFFECT)
end
end
--铁躯的奥托姆特
function c9910879.initial_effect(c)
aux.AddCodeList(c,9910871)
--spsummon
local e1=Effect.CreateEffect(c)
e1:SetCategory(CATEGORY_SPECIAL_SUMMON+CATEGORY_ATKCHANGE)
e1:SetType(EFFECT_TYPE_IGNITION)
e1:SetRange(LOCATION_HAND)
e1:SetCountLimit(1,9910879)
e1:SetCondition(c9910879.spcon)
e1:SetTarget(c9910879.sptg)
e1:SetOperation(c9910879.spop)
c:RegisterEffect(e1)
--destroy
local e2=Effect.CreateEffect(c)
e2:SetCategory(CATEGORY_DESTROY+CATEGORY_NEGATE)
e2:SetType(EFFECT_TYPE_QUICK_O)
e2:SetCode(EVENT_CHAINING)
e2:SetRange(LOCATION_GRAVE)
e2:SetProperty(EFFECT_FLAG_DAMAGE_STEP+EFFECT_FLAG_DAMAGE_CAL)
e2:SetCountLimit(1,9910880)
e2:SetCondition(c9910879.descon)
e2:SetCost(aux.bfgcost)
e2:SetTarget(c9910879.destg)
e2:SetOperation(c9910879.desop)
c:RegisterEffect(e2)
end
function c9910879.spcon(e,tp,eg,ep,ev,re,r,rp)
local g=Duel.GetFieldGroup(tp,LOCATION_MZONE,LOCATION_MZONE)
local sg=g:Filter(Card.IsFaceup,nil)
return sg and sg:GetClassCount(Card.GetRace)>=2
end
function c9910879.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 c9910879.cfilter(c)
return c:IsFaceup() and c:IsAttackAbove(2000)
end
function c9910879.atkfilter(c,e,tp)
return c:IsFaceup() and aux.IsCodeListed(c,9910871)
end
function c9910879.spop(e,tp,eg,ep,ev,re,r,rp)
local c=e:GetHandler()
if not c:IsRelateToEffect(e) or Duel.SpecialSummon(c,0,tp,tp,false,false,POS_FACEUP)==0 then return end
local g=Duel.GetMatchingGroup(c9910879.atkfilter,tp,LOCATION_MZONE,0,nil)
if Duel.IsExistingMatchingCard(c9910879.cfilter,tp,LOCATION_MZONE,LOCATION_MZONE,1,nil)
and g:GetCount()>0 and Duel.SelectYesNo(tp,aux.Stringid(9910879,0)) then
Duel.BreakEffect()
Duel.Hint(HINT_SELECTMSG,tp,HINTMSG_FACEUP)
local sg=g:Select(tp,1,1,nil)
local tc=sg:GetFirst()
if tc then
Duel.HintSelection(sg)
local e1=Effect.CreateEffect(c)
e1:SetType(EFFECT_TYPE_SINGLE)
e1:SetCode(EFFECT_UPDATE_ATTACK)
e1:SetReset(RESET_EVENT+RESETS_STANDARD)
e1:SetValue(1000)
tc:RegisterEffect(e1)
end
end
end
function c9910879.cfilter2(c)
return c:IsSummonLocation(LOCATION_EXTRA) and c:IsFaceup() and c:IsRace(RACE_MACHINE)
end
function c9910879.descon(e,tp,eg,ep,ev,re,r,rp)
return rp==1-tp and re:IsActiveType(TYPE_MONSTER)
and Duel.IsExistingMatchingCard(c9910879.cfilter2,tp,LOCATION_MZONE,LOCATION_MZONE,1,nil)
end
function c9910879.destg(e,tp,eg,ep,ev,re,r,rp,chk)
local rc=re:GetHandler()
if chk==0 then return rc:IsRelateToEffect(re) and rc:IsDestructable() end
Duel.SetOperationInfo(0,CATEGORY_DESTROY,rc,1,0,0)
Duel.SetOperationInfo(0,CATEGORY_NEGATE,eg,1,0,0)
end
function c9910879.desop(e,tp,eg,ep,ev,re,r,rp)
local rc=re:GetHandler()
if rc:IsRelateToEffect(re) and Duel.Destroy(rc,REASON_EFFECT)~=0 then
Duel.NegateActivation(ev)
end
end
--共生试验体 不息狼魂
function c9910881.initial_effect(c)
aux.AddCodeList(c,9910871)
--fusion material
c:EnableReviveLimit()
aux.AddFusionProcFunRep(c,c9910881.ffilter,2,true)
--spsummon condition
local e0=Effect.CreateEffect(c)
e0:SetType(EFFECT_TYPE_SINGLE)
e0:SetProperty(EFFECT_FLAG_CANNOT_DISABLE+EFFECT_FLAG_UNCOPYABLE)
e0:SetCode(EFFECT_SPSUMMON_CONDITION)
e0:SetValue(c9910881.splimit)
c:RegisterEffect(e0)
--atk & def
local e1=Effect.CreateEffect(c)
e1:SetType(EFFECT_TYPE_SINGLE)
e1:SetProperty(EFFECT_FLAG_SINGLE_RANGE)
e1:SetCode(EFFECT_UPDATE_ATTACK)
e1:SetRange(LOCATION_MZONE)
e1:SetValue(c9910881.atkval)
c:RegisterEffect(e1)
local e2=e1:Clone()
e2:SetCode(EFFECT_UPDATE_DEFENSE)
c:RegisterEffect(e2)
--spsummon
local e3=Effect.CreateEffect(c)
e3:SetCategory(CATEGORY_SPECIAL_SUMMON)
e3:SetType(EFFECT_TYPE_QUICK_O)
e3:SetCode(EVENT_CHAINING)
e3:SetProperty(EFFECT_FLAG_NO_TURN_RESET)
e3:SetRange(LOCATION_MZONE)
e3:SetCountLimit(1)
e3:SetCondition(c9910881.spcon)
e3:SetTarget(c9910881.sptg)
e3:SetOperation(c9910881.spop)
c:RegisterEffect(e3)
end
function c9910881.ffilter(c,fc,sub,mg,sg)
return not sg or sg:FilterCount(aux.TRUE,c)==0 or not sg:IsExists(Card.IsRace,1,c,c:GetRace())
end
function c9910881.splimit(e,se,sp,st)
local sc=se:GetHandler()
return st&SUMMON_TYPE_FUSION~=SUMMON_TYPE_FUSION or not sc:IsType(TYPE_SPELL) or sc:IsCode(9910871)
end
function c9910881.atkfilter(c)
return c:IsFaceup() and c:GetRace()~=0
end
function c9910881.atkval(e,c)
local g=Duel.GetMatchingGroup(c9910881.atkfilter,c:GetControler(),LOCATION_MZONE,LOCATION_MZONE,nil)
local ct=g:GetClassCount(Card.GetRace)
return ct*100
end
function c9910881.spcon(e,tp,eg,ep,ev,re,r,rp)
return rp==1-tp
end
function c9910881.spfilter(c,e,tp)
return aux.IsCodeListed(c,9910871) and c:IsCanBeSpecialSummoned(e,0,tp,false,false)
end
function c9910881.sptg(e,tp,eg,ep,ev,re,r,rp,chk)
if chk==0 then return Duel.GetLocationCount(tp,LOCATION_MZONE)>0
and Duel.IsExistingMatchingCard(c9910881.spfilter,tp,LOCATION_DECK,0,1,nil,e,tp) end
Duel.SetOperationInfo(0,CATEGORY_SPECIAL_SUMMON,nil,1,tp,LOCATION_DECK)
e:GetHandler():RegisterFlagEffect(0,RESET_EVENT+RESETS_STANDARD,EFFECT_FLAG_CLIENT_HINT,1,0,aux.Stringid(9910881,0))
end
function c9910881.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,c9910881.spfilter,tp,LOCATION_DECK,0,1,1,nil,e,tp)
if g:GetCount()>0 then
Duel.SpecialSummon(g,0,tp,tp,false,false,POS_FACEUP)
end
end
--狡伏的柯妮沃拉
function c9910882.initial_effect(c)
aux.AddCodeList(c,9910871)
--spsummon
local e1=Effect.CreateEffect(c)
e1:SetCategory(CATEGORY_SPECIAL_SUMMON+CATEGORY_TOHAND)
e1:SetType(EFFECT_TYPE_IGNITION)
e1:SetRange(LOCATION_HAND)
e1:SetCountLimit(1,9910882)
e1:SetCondition(c9910882.spcon)
e1:SetTarget(c9910882.sptg)
e1:SetOperation(c9910882.spop)
c:RegisterEffect(e1)
--negate
local e2=Effect.CreateEffect(c)
e2:SetCategory(CATEGORY_NEGATE+CATEGORY_REMOVE)
e2:SetType(EFFECT_TYPE_QUICK_O)
e2:SetCode(EVENT_CHAINING)
e2:SetRange(LOCATION_GRAVE)
e2:SetProperty(EFFECT_FLAG_DAMAGE_STEP+EFFECT_FLAG_DAMAGE_CAL)
e2:SetCountLimit(1,9910883)
e2:SetCondition(c9910882.negcon)
e2:SetCost(c9910882.negcost)
e2:SetTarget(c9910882.negtg)
e2:SetOperation(c9910882.negop)
c:RegisterEffect(e2)
end
function c9910882.spcon(e,tp,eg,ep,ev,re,r,rp)
local g=Duel.GetFieldGroup(tp,LOCATION_MZONE,LOCATION_MZONE)
local sg=g:Filter(Card.IsFaceup,nil)
return sg and sg:GetClassCount(Card.GetRace)>=2
end
function c9910882.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 c9910882.cfilter(c)
return c:GetColumnGroupCount()>1
end
function c9910882.thfilter(c,e,tp)
return aux.IsCodeListed(c,9910871) and c:IsType(TYPE_SPELL+TYPE_TRAP) and c:IsAbleToHand()
end
function c9910882.spop(e,tp,eg,ep,ev,re,r,rp)
local c=e:GetHandler()
if not c:IsRelateToEffect(e) or Duel.SpecialSummon(c,0,tp,tp,false,false,POS_FACEUP)==0 then return end
local g=Duel.GetMatchingGroup(c9910882.thfilter,tp,LOCATION_DECK,0,nil)
if Duel.IsExistingMatchingCard(c9910882.cfilter,tp,LOCATION_ONFIELD,LOCATION_ONFIELD,1,nil)
and g:GetCount()>0 and Duel.SelectYesNo(tp,aux.Stringid(9910882,0)) then
Duel.BreakEffect()
Duel.Hint(HINT_SELECTMSG,tp,HINTMSG_ATOHAND)
local sg=g:Select(tp,1,1,nil)
Duel.SendtoHand(sg,nil,REASON_EFFECT)
Duel.ConfirmCards(1-tp,sg)
end
end
function c9910882.cfilter2(c)
return c:IsSummonLocation(LOCATION_EXTRA) and c:IsFaceup() and c:IsRace(RACE_BEAST)
end
function c9910882.negcon(e,tp,eg,ep,ev,re,r,rp)
return rp==1-tp and re:IsHasType(EFFECT_TYPE_ACTIVATE) and Duel.IsChainNegatable(ev)
and Duel.IsExistingMatchingCard(c9910882.cfilter2,tp,LOCATION_MZONE,LOCATION_MZONE,1,nil)
end
function c9910882.negcost(e,tp,eg,ep,ev,re,r,rp,chk)
local c=e:GetHandler()
if chk==0 then return c:IsAbleToRemoveAsCost()
and Duel.IsExistingMatchingCard(Card.IsAbleToRemoveAsCost,tp,LOCATION_HAND,0,1,nil) end
Duel.Hint(HINT_SELECTMSG,tp,HINTMSG_REMOVE)
local g=Duel.SelectMatchingCard(tp,Card.IsAbleToRemoveAsCost,tp,LOCATION_HAND,0,1,1,nil)
g:AddCard(c)
if Duel.Remove(g,POS_FACEUP,REASON_EFFECT+REASON_TEMPORARY)~=0 then
local fid=c:GetFieldID()
local og=Duel.GetOperatedGroup()
local oc=og:GetFirst()
while oc do
oc:RegisterFlagEffect(9910882,RESET_EVENT+RESETS_STANDARD+RESET_PHASE+PHASE_STANDBY+RESET_SELF_TURN,0,1,fid)
oc=og:GetNext()
end
og:KeepAlive()
local e1=Effect.CreateEffect(c)
e1:SetType(EFFECT_TYPE_FIELD+EFFECT_TYPE_CONTINUOUS)
e1:SetProperty(EFFECT_FLAG_IGNORE_IMMUNE)
e1:SetCode(EVENT_PHASE+PHASE_STANDBY)
e1:SetCountLimit(1)
e1:SetLabel(fid)
e1:SetLabelObject(og)
e1:SetCondition(c9910882.retcon)
e1:SetOperation(c9910882.retop)
e1:SetReset(RESET_PHASE+PHASE_STANDBY+RESET_SELF_TURN)
Duel.RegisterEffect(e1,tp)
end
end
function c9910882.retfilter(c,fid)
return c:GetFlagEffectLabel(9910882)==fid
end
function c9910882.retcon(e,tp,eg,ep,ev,re,r,rp)
if Duel.GetTurnPlayer()~=tp then return false end
local g=e:GetLabelObject()
if not g:IsExists(c9910882.retfilter,1,nil,e:GetLabel()) then
g:DeleteGroup()
e:Reset()
return false
else return true end
end
function c9910882.retop(e,tp,eg,ep,ev,re,r,rp)
local g=e:GetLabelObject()
local sg=g:Filter(c9910882.retfilter,nil,e:GetLabel())
g:DeleteGroup()
local tc=sg:GetFirst()
while tc do
if tc==e:GetHandler() then
Duel.SendtoGrave(tc,REASON_EFFECT+REASON_RETURN)
else
Duel.SendtoHand(tc,tp,REASON_EFFECT)
end
tc=sg:GetNext()
end
end
function c9910882.negtg(e,tp,eg,ep,ev,re,r,rp,chk)
if chk==0 then return aux.nbcon(tp,re) end
Duel.SetOperationInfo(0,CATEGORY_NEGATE,eg,1,0,0)
if re:GetHandler():IsRelateToEffect(re) then
Duel.SetOperationInfo(0,CATEGORY_REMOVE,eg,1,0,0)
end
end
function c9910882.negop(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 c9910884.initial_effect(c)
aux.AddCodeList(c,9910871)
--activate
local e1=Effect.CreateEffect(c)
e1:SetType(EFFECT_TYPE_ACTIVATE)
e1:SetCode(EVENT_FREE_CHAIN)
c:RegisterEffect(e1)
--race
local e2=Effect.CreateEffect(c)
e2:SetDescription(aux.Stringid(9910884,0))
e2:SetType(EFFECT_TYPE_QUICK_O)
e2:SetCode(EVENT_FREE_CHAIN)
e2:SetRange(LOCATION_SZONE)
e2:SetHintTiming(0,TIMINGS_CHECK_MONSTER+TIMING_END_PHASE)
e2:SetCountLimit(1,9910884)
e2:SetCost(c9910884.racost)
e2:SetTarget(c9910884.ratg)
e2:SetOperation(c9910884.raop)
c:RegisterEffect(e2)
--to hand/spsummon
local e3=Effect.CreateEffect(c)
e3:SetDescription(aux.Stringid(9910884,1))
e3:SetCategory(CATEGORY_TOHAND+CATEGORY_SPECIAL_SUMMON)
e3:SetType(EFFECT_TYPE_FIELD+EFFECT_TYPE_TRIGGER_O)
e3:SetCode(EVENT_TO_GRAVE)
e3:SetProperty(EFFECT_FLAG_CARD_TARGET+EFFECT_FLAG_DELAY+EFFECT_FLAG_DAMAGE_STEP)
e3:SetRange(LOCATION_SZONE)
e3:SetCountLimit(1,9910884)
e3:SetTarget(c9910884.thtg)
e3:SetOperation(c9910884.thop)
c:RegisterEffect(e3)
end
function c9910884.racost(e,tp,eg,ep,ev,re,r,rp,chk)
e:SetLabel(100)
return true
end
function c9910884.rafilter(c,race)
return c:IsFaceup() and c:GetRace()~=race
end
function c9910884.costfilter(c)
return aux.IsCodeListed(c,9910871) and c:GetRace()>0 and c:IsAbleToGraveAsCost()
and Duel.IsExistingTarget(c9910884.rafilter,tp,LOCATION_MZONE,LOCATION_MZONE,1,nil,c:GetRace())
end
function c9910884.ratg(e,tp,eg,ep,ev,re,r,rp,chk)
if chk==0 then
if e:GetLabel()~=100 then return false end
e:SetLabel(0)
return Duel.IsExistingMatchingCard(c9910884.costfilter,tp,LOCATION_DECK,0,1,nil,tp)
end
e:SetLabel(0)
Duel.Hint(HINT_SELECTMSG,tp,HINTMSG_TOGRAVE)
local g=Duel.SelectMatchingCard(tp,c9910884.costfilter,tp,LOCATION_DECK,0,1,1,nil,tp)
Duel.SendtoGrave(g,REASON_COST)
e:SetLabel(g:GetFirst():GetRace())
end
function c9910884.raop(e,tp,eg,ep,ev,re,r,rp)
if not e:GetHandler():IsRelateToEffect(e) then return end
local g=Duel.GetMatchingGroup(Card.IsFaceup,tp,LOCATION_MZONE,LOCATION_MZONE,nil)
local tc=g:GetFirst()
while tc do
local e1=Effect.CreateEffect(e:GetHandler())
e1:SetType(EFFECT_TYPE_SINGLE)
e1:SetCode(EFFECT_CHANGE_RACE)
e1:SetValue(e:GetLabel())
e1:SetReset(RESET_EVENT+RESETS_STANDARD+RESET_PHASE+PHASE_END)
tc:RegisterEffect(e1)
tc=g:GetNext()
end
end
function c9910884.cfilter(c,tp)
return c:GetFlagEffect(9910871)>0 and c:GetReasonPlayer()==1-tp and c:IsPreviousControler(tp)
and c:IsPreviousLocation(LOCATION_MZONE) and c:IsPreviousPosition(POS_FACEUP)
end
function c9910884.thfilter(c,e,tp,fusc)
local res=c:IsControler(tp) and c:IsLocation(LOCATION_GRAVE) and c:IsType(TYPE_MONSTER)
and c:GetReason()&(REASON_FUSION+REASON_MATERIAL)==(REASON_FUSION+REASON_MATERIAL)
and c:GetReasonCard()==fusc
if not res then return false end
local ft=Duel.GetLocationCount(tp,LOCATION_MZONE)
return c:IsAbleToHand() or (ft>0 and c:IsCanBeSpecialSummoned(e,0,tp,false,false))
end
function c9910884.thtg(e,tp,eg,ep,ev,re,r,rp,chk)
local g=eg:Filter(c9910884.cfilter,nil,tp)
local mg=Group.CreateGroup()
for sc in aux.Next(g) do
mg:Merge(sc:GetMaterial():Filter(c9910884.thfilter,nil,e,tp,sc))
end
if chk==0 then return mg:GetCount()>0 end
Duel.SetOperationInfo(0,CATEGORY_SPECIAL_SUMMON,nil,1,tp,LOCATION_GRAVE)
Duel.SetOperationInfo(0,CATEGORY_TOHAND,nil,1,tp,LOCATION_GRAVE)
end
function c9910884.thop(e,tp,eg,ep,ev,re,r,rp)
if not e:GetHandler():IsRelateToEffect(e) then return end
local g=eg:Filter(c9910884.cfilter,nil,tp)
local mg=Group.CreateGroup()
for sc in aux.Next(g) do
mg:Merge(sc:GetMaterial():Filter(aux.NecroValleyFilter(c9910884.thfilter),nil,e,tp,sc))
end
if mg:GetCount()==0 then return end
Duel.Hint(HINT_SELECTMSG,tp,HINTMSG_OPERATECARD)
local ft=Duel.GetLocationCount(tp,LOCATION_MZONE)
local tc=mg:Select(tp,1,1,nil):GetFirst()
if tc then
if tc:IsAbleToHand() and (not tc:IsCanBeSpecialSummoned(e,0,tp,false,false) or ft<=0 or Duel.SelectOption(tp,1190,1152)==0) then
Duel.SendtoHand(tc,nil,REASON_EFFECT)
Duel.ConfirmCards(1-tp,tc)
else
Duel.SpecialSummon(tc,0,tp,tp,false,false,POS_FACEUP)
end
end
end
--共生试验体 狰狞鬼豪
function c9910885.initial_effect(c)
aux.AddCodeList(c,9910871)
--fusion material
c:EnableReviveLimit()
aux.AddFusionProcFunRep(c,c9910885.ffilter,3,true)
--spsummon condition
local e0=Effect.CreateEffect(c)
e0:SetType(EFFECT_TYPE_SINGLE)
e0:SetProperty(EFFECT_FLAG_CANNOT_DISABLE+EFFECT_FLAG_UNCOPYABLE)
e0:SetCode(EFFECT_SPSUMMON_CONDITION)
e0:SetValue(c9910885.splimit)
c:RegisterEffect(e0)
--atk & def
local e1=Effect.CreateEffect(c)
e1:SetType(EFFECT_TYPE_SINGLE)
e1:SetProperty(EFFECT_FLAG_SINGLE_RANGE)
e1:SetCode(EFFECT_UPDATE_ATTACK)
e1:SetRange(LOCATION_MZONE)
e1:SetValue(c9910885.atkval)
c:RegisterEffect(e1)
local e2=e1:Clone()
e2:SetCode(EFFECT_UPDATE_DEFENSE)
c:RegisterEffect(e2)
--set
local e3=Effect.CreateEffect(c)
e3:SetType(EFFECT_TYPE_QUICK_O)
e3:SetCode(EVENT_CHAINING)
e3:SetProperty(EFFECT_FLAG_NO_TURN_RESET)
e3:SetRange(LOCATION_MZONE)
e3:SetCountLimit(1)
e3:SetCondition(c9910885.setcon)
e3:SetTarget(c9910885.settg)
e3:SetOperation(c9910885.setop)
c:RegisterEffect(e3)
end
function c9910885.ffilter(c,fc,sub,mg,sg)
return not sg or sg:FilterCount(aux.TRUE,c)==0 or not sg:IsExists(Card.IsRace,1,c,c:GetRace())
end
function c9910885.splimit(e,se,sp,st)
local sc=se:GetHandler()
return st&SUMMON_TYPE_FUSION~=SUMMON_TYPE_FUSION or not sc:IsType(TYPE_SPELL) or sc:IsCode(9910871)
end
function c9910885.atkfilter(c)
return c:IsFaceup() and c:GetRace()~=0
end
function c9910885.atkval(e,c)
local g=Duel.GetMatchingGroup(c9910885.atkfilter,c:GetControler(),LOCATION_MZONE,LOCATION_MZONE,nil)
local ct=g:GetClassCount(Card.GetRace)
return ct*200
end
function c9910885.setcon(e,tp,eg,ep,ev,re,r,rp)
return rp==1-tp
end
function c9910885.setfilter(c)
return aux.IsCodeListed(c,9910871) and c:IsType(TYPE_SPELL+TYPE_TRAP) and c:IsSSetable()
end
function c9910885.settg(e,tp,eg,ep,ev,re,r,rp,chk)
if chk==0 then return Duel.IsExistingMatchingCard(c9910885.setfilter,tp,LOCATION_DECK,0,1,nil) end
e:GetHandler():RegisterFlagEffect(0,RESET_EVENT+RESETS_STANDARD,EFFECT_FLAG_CLIENT_HINT,1,0,aux.Stringid(9910881,0))
end
function c9910885.setop(e,tp,eg,ep,ev,re,r,rp)
Duel.Hint(HINT_SELECTMSG,tp,HINTMSG_SET)
local g=Duel.SelectMatchingCard(tp,c9910885.setfilter,tp,LOCATION_DECK,0,1,1,nil)
if #g>0 then
Duel.SSet(tp,g)
end
end
--继魄的战士 艾莉雅安
function c9910886.initial_effect(c)
aux.AddCodeList(c,9910871)
--to hand
local e1=Effect.CreateEffect(c)
e1:SetCategory(CATEGORY_TOHAND+CATEGORY_CONTROL)
e1:SetType(EFFECT_TYPE_SINGLE+EFFECT_TYPE_TRIGGER_O)
e1:SetProperty(EFFECT_FLAG_DELAY+EFFECT_FLAG_CARD_TARGET)
e1:SetCode(EVENT_SUMMON_SUCCESS)
e1:SetTarget(c9910886.thtg)
e1:SetOperation(c9910886.thop)
c:RegisterEffect(e1)
local e2=e1:Clone()
e2:SetCode(EVENT_FLIP)
c:RegisterEffect(e2)
--draw
local e3=Effect.CreateEffect(c)
e3:SetCategory(CATEGORY_DRAW)
e3:SetType(EFFECT_TYPE_SINGLE+EFFECT_TYPE_TRIGGER_O)
e3:SetCode(EVENT_BE_MATERIAL)
e3:SetProperty(EFFECT_FLAG_DELAY+EFFECT_FLAG_PLAYER_TARGET)
e3:SetCondition(c9910886.drcon)
e3:SetCost(c9910886.drcost)
e3:SetTarget(c9910886.drtg)
e3:SetOperation(c9910886.drop)
c:RegisterEffect(e3)
end
function c9910886.thfilter(c)
return aux.IsCodeListed(c,9910871) and c:IsAbleToHand()
end
function c9910886.thtg(e,tp,eg,ep,ev,re,r,rp,chk,chkc)
if chkc then return chkc:IsLocation(LOCATION_GRAVE) and chkc:IsControler(tp) and c9910886.thfilter(chkc) end
if chk==0 then return Duel.IsExistingTarget(c9910886.thfilter,tp,LOCATION_GRAVE,0,1,nil) end
Duel.Hint(HINT_SELECTMSG,tp,HINTMSG_ATOHAND)
local g=Duel.SelectTarget(tp,c9910886.thfilter,tp,LOCATION_GRAVE,0,1,1,nil)
Duel.SetOperationInfo(0,CATEGORY_TOHAND,g,1,0,0)
end
function c9910886.ctfilter(c)
return c:IsSummonLocation(LOCATION_EXTRA) and c:IsControlerCanBeChanged()
end
function c9910886.thop(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 tc:IsCode(9910871) and Duel.IsExistingMatchingCard(c9910886.ctfilter,tp,0,LOCATION_MZONE,1,nil)
and Duel.SelectYesNo(tp,aux.Stringid(9910886,0)) then
Duel.BreakEffect()
Duel.Hint(HINT_SELECTMSG,tp,HINTMSG_CONTROL)
local g=Duel.SelectMatchingCard(tp,c9910886.ctfilter,tp,0,LOCATION_MZONE,1,1,nil)
Duel.HintSelection(g)
local sc=g:GetFirst()
if Duel.GetControl(sc,tp,PHASE_END,1)~=0 then
local e1=Effect.CreateEffect(e:GetHandler())
e1:SetType(EFFECT_TYPE_SINGLE)
e1:SetProperty(EFFECT_FLAG_CANNOT_DISABLE)
e1:SetCode(EFFECT_CANNOT_ATTACK_ANNOUNCE)
e1:SetReset(RESET_EVENT+RESETS_STANDARD+RESET_PHASE+PHASE_END)
sc:RegisterEffect(e1)
local e2=e1:Clone()
e2:SetCode(EFFECT_CANNOT_TRIGGER)
sc:RegisterEffect(e2)
end
end
end
function c9910886.drcon(e,tp,eg,ep,ev,re,r,rp)
return r==REASON_FUSION
end
function c9910886.drcost(e,tp,eg,ep,ev,re,r,rp,chk)
if chk==0 then return Duel.CheckLPCost(tp,1000) end
Duel.PayLPCost(tp,1000)
end
function c9910886.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 c9910886.drop(e,tp,eg,ep,ev,re,r,rp)
local p,d=Duel.GetChainInfo(0,CHAININFO_TARGET_PLAYER,CHAININFO_TARGET_PARAM)
Duel.Draw(p,d,REASON_EFFECT)
end
--生灵探秘
function c9910887.initial_effect(c)
aux.AddCodeList(c,9910871)
--search
local e1=Effect.CreateEffect(c)
e1:SetCategory(CATEGORY_TOHAND+CATEGORY_SEARCH+CATEGORY_TODECK)
e1:SetType(EFFECT_TYPE_ACTIVATE)
e1:SetCode(EVENT_FREE_CHAIN)
e1:SetCountLimit(1,9910887+EFFECT_COUNT_CODE_OATH)
e1:SetTarget(c9910887.target)
e1:SetOperation(c9910887.activate)
c:RegisterEffect(e1)
end
function c9910887.filter1(c)
return c:IsCode(9910871) and c:IsAbleToHand()
end
function c9910887.filter2(c)
return aux.IsCodeListed(c,9910871) and c:IsLevel(4) and c:IsAbleToHand()
end
function c9910887.tdfilter(c)
return not c:IsPublic() and c:IsAbleToDeck()
end
function c9910887.target(e,tp,eg,ep,ev,re,r,rp,chk)
if chk==0 then return Duel.IsExistingMatchingCard(c9910887.filter1,tp,LOCATION_DECK,0,1,nil)
and Duel.IsExistingMatchingCard(c9910887.filter2,tp,LOCATION_DECK,0,1,nil)
and Duel.IsExistingMatchingCard(c9910887.tdfilter,tp,LOCATION_HAND,0,1,e:GetHandler()) end
Duel.SetOperationInfo(0,CATEGORY_TOHAND,nil,2,tp,LOCATION_DECK)
end
function c9910887.activate(e,tp,eg,ep,ev,re,r,rp)
Duel.Hint(HINT_SELECTMSG,tp,HINTMSG_CONFIRM)
local g=Duel.SelectMatchingCard(tp,c9910887.tdfilter,tp,LOCATION_HAND,0,1,1,nil)
if g:GetCount()==0 then return end
Duel.ConfirmCards(1-tp,g)
local g1=Duel.GetMatchingGroup(c9910887.filter1,tp,LOCATION_DECK,0,nil)
local g2=Duel.GetMatchingGroup(c9910887.filter2,tp,LOCATION_DECK,0,nil)
if g1:GetCount()>0 and g2:GetCount()>0 then
Duel.Hint(HINT_SELECTMSG,tp,HINTMSG_ATOHAND)
local sg1=g1:Select(tp,1,1,nil)
Duel.Hint(HINT_SELECTMSG,tp,HINTMSG_ATOHAND)
local sg2=g2:Select(tp,1,1,nil)
sg1:Merge(sg2)
Duel.SendtoHand(sg1,nil,REASON_EFFECT)
Duel.ConfirmCards(1-tp,sg1)
Duel.BreakEffect()
Duel.SendtoDeck(g,nil,2,REASON_EFFECT)
else
Duel.ShuffleHand(tp)
end
end
--异律的雅克安琪
function c9910888.initial_effect(c)
aux.AddCodeList(c,9910871)
--spsummon
local e1=Effect.CreateEffect(c)
e1:SetCategory(CATEGORY_SPECIAL_SUMMON+CATEGORY_GRAVE_SPSUMMON)
e1:SetType(EFFECT_TYPE_IGNITION)
e1:SetRange(LOCATION_HAND)
e1:SetCountLimit(1,9910888)
e1:SetCondition(c9910888.spcon)
e1:SetTarget(c9910888.sptg)
e1:SetOperation(c9910888.spop)
c:RegisterEffect(e1)
--remove
local e2=Effect.CreateEffect(c)
e2:SetType(EFFECT_TYPE_QUICK_O)
e2:SetCode(EVENT_FREE_CHAIN)
e2:SetProperty(EFFECT_FLAG_CARD_TARGET)
e2:SetRange(LOCATION_GRAVE)
e2:SetCountLimit(1,9910889)
e2:SetHintTiming(0,TIMINGS_CHECK_MONSTER+TIMING_END_PHASE)
e2:SetCondition(c9910888.rmcon)
e2:SetCost(aux.bfgcost)
e2:SetTarget(c9910888.rmtg)
e2:SetOperation(c9910888.rmop)
c:RegisterEffect(e2)
end
function c9910888.spcon(e,tp,eg,ep,ev,re,r,rp)
local g=Duel.GetFieldGroup(tp,LOCATION_MZONE,LOCATION_MZONE)
local sg=g:Filter(Card.IsFaceup,nil)
return sg and sg:GetClassCount(Card.GetRace)>=2
end
function c9910888.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 c9910888.spfilter(c,e,tp)
return aux.IsCodeListed(c,9910871) and c:IsCanBeSpecialSummoned(e,0,tp,false,false)
end
function c9910888.spop(e,tp,eg,ep,ev,re,r,rp)
local c=e:GetHandler()
if not c:IsRelateToEffect(e) or Duel.SpecialSummon(c,0,tp,tp,false,false,POS_FACEUP)==0 then return end
local g0=Duel.GetFieldGroup(tp,LOCATION_MZONE,LOCATION_MZONE):Filter(Card.IsFaceup,nil)
local g=Duel.GetMatchingGroup(c9910888.spfilter,tp,LOCATION_HAND,0,nil,e,tp)
if g0 and g0:GetClassCount(Card.GetRace)>=3 and Duel.GetLocationCount(tp,LOCATION_MZONE)>0
and g:GetCount()>0 and Duel.SelectYesNo(tp,aux.Stringid(9910888,0)) then
Duel.BreakEffect()
Duel.Hint(HINT_SELECTMSG,tp,HINTMSG_SPSUMMON)
local sg=g:Select(tp,1,1,nil)
Duel.SpecialSummon(sg,0,tp,tp,false,false,POS_FACEUP)
end
end
function c9910888.cfilter2(c)
return c:IsSummonLocation(LOCATION_EXTRA) and c:IsFaceup() and c:IsRace(RACE_FAIRY)
end
function c9910888.rmcon(e,tp,eg,ep,ev,re,r,rp)
return Duel.IsExistingMatchingCard(c9910888.cfilter2,tp,LOCATION_MZONE,LOCATION_MZONE,1,nil)
end
function c9910888.rmtg(e,tp,eg,ep,ev,re,r,rp,chk,chkc)
if chkc then return chkc:IsOnField() and chkc:IsAbleToRemove() end
if chk==0 then return Duel.IsExistingTarget(Card.IsAbleToRemove,tp,0,LOCATION_ONFIELD,1,nil) end
Duel.Hint(HINT_SELECTMSG,tp,HINTMSG_OPERATECARD)
local g=Duel.SelectTarget(tp,Card.IsAbleToRemove,tp,LOCATION_ONFIELD,LOCATION_ONFIELD,1,3,nil)
Duel.SetOperationInfo(0,CATEGORY_REMOVE,g,1,0,0)
end
function c9910888.rmop(e,tp,eg,ep,ev,re,r,rp)
local g=Duel.GetChainInfo(0,CHAININFO_TARGET_CARDS):Filter(Card.IsRelateToEffect,nil,e)
for tc in aux.Next(g) do
local e1=Effect.CreateEffect(e:GetHandler())
e1:SetType(EFFECT_TYPE_SINGLE)
e1:SetCode(EFFECT_LEAVE_FIELD_REDIRECT)
e1:SetReset(RESET_EVENT+RESETS_REDIRECT)
e1:SetValue(LOCATION_REMOVED)
tc:RegisterEffect(e1,true)
end
end
--共生试验体 辉煌战姬
function c9910890.initial_effect(c)
aux.AddCodeList(c,9910871)
--fusion material
c:EnableReviveLimit()
aux.AddFusionProcFunRep(c,c9910890.ffilter,4,true)
--spsummon condition
local e0=Effect.CreateEffect(c)
e0:SetType(EFFECT_TYPE_SINGLE)
e0:SetProperty(EFFECT_FLAG_CANNOT_DISABLE+EFFECT_FLAG_UNCOPYABLE)
e0:SetCode(EFFECT_SPSUMMON_CONDITION)
e0:SetValue(c9910890.splimit)
c:RegisterEffect(e0)
--atk & def
local e1=Effect.CreateEffect(c)
e1:SetType(EFFECT_TYPE_SINGLE)
e1:SetProperty(EFFECT_FLAG_SINGLE_RANGE)
e1:SetCode(EFFECT_UPDATE_ATTACK)
e1:SetRange(LOCATION_MZONE)
e1:SetValue(c9910890.atkval)
c:RegisterEffect(e1)
local e2=e1:Clone()
e2:SetCode(EFFECT_UPDATE_DEFENSE)
c:RegisterEffect(e2)
--recycle
local e3=Effect.CreateEffect(c)
e3:SetCategory(CATEGORY_TOHAND)
e3:SetType(EFFECT_TYPE_QUICK_O)
e3:SetCode(EVENT_CHAINING)
e3:SetProperty(EFFECT_FLAG_NO_TURN_RESET)
e3:SetRange(LOCATION_MZONE)
e3:SetCountLimit(1)
e3:SetCondition(c9910890.thcon)
e3:SetTarget(c9910890.thtg)
e3:SetOperation(c9910890.thop)
c:RegisterEffect(e3)
end
function c9910890.ffilter(c,fc,sub,mg,sg)
return not sg or sg:FilterCount(aux.TRUE,c)==0 or not sg:IsExists(Card.IsRace,1,c,c:GetRace())
end
function c9910890.splimit(e,se,sp,st)
local sc=se:GetHandler()
return st&SUMMON_TYPE_FUSION~=SUMMON_TYPE_FUSION or not sc:IsType(TYPE_SPELL) or sc:IsCode(9910871)
end
function c9910890.atkfilter(c)
return c:IsFaceup() and c:GetRace()~=0
end
function c9910890.atkval(e,c)
local g=Duel.GetMatchingGroup(c9910890.atkfilter,c:GetControler(),LOCATION_MZONE,LOCATION_MZONE,nil)
local ct=g:GetClassCount(Card.GetRace)
return ct*300
end
function c9910890.thcon(e,tp,eg,ep,ev,re,r,rp)
return rp==1-tp
end
function c9910890.thfilter(c)
return c:IsFaceup() and aux.IsCodeListed(c,9910871) and c:IsAbleToHand()
end
function c9910890.thtg(e,tp,eg,ep,ev,re,r,rp,chk,chkc)
if chk==0 then return Duel.IsExistingMatchingCard(c9910890.thfilter,tp,LOCATION_REMOVED,0,1,nil) end
Duel.SetOperationInfo(0,CATEGORY_TOHAND,nil,1,tp,LOCATION_REMOVED)
e:GetHandler():RegisterFlagEffect(0,RESET_EVENT+RESETS_STANDARD,EFFECT_FLAG_CLIENT_HINT,1,0,aux.Stringid(9910890,0))
end
function c9910890.thop(e,tp,eg,ep,ev,re,r,rp,chk)
Duel.Hint(HINT_SELECTMSG,tp,HINTMSG_ATOHAND)
local g=Duel.SelectMatchingCard(tp,c9910890.thfilter,tp,LOCATION_REMOVED,0,1,2,nil)
if g:GetCount()>0 then
Duel.SendtoHand(g,nil,REASON_EFFECT)
Duel.ConfirmCards(1-tp,g)
end
end
--惑蔓的亚基斯普姆
function c9910891.initial_effect(c)
aux.AddCodeList(c,9910871)
--spsummon
local e1=Effect.CreateEffect(c)
e1:SetCategory(CATEGORY_SPECIAL_SUMMON+CATEGORY_RELEASE)
e1:SetType(EFFECT_TYPE_IGNITION)
e1:SetRange(LOCATION_HAND)
e1:SetCountLimit(1,9910891)
e1:SetCondition(c9910891.spcon)
e1:SetTarget(c9910891.sptg)
e1:SetOperation(c9910891.spop)
c:RegisterEffect(e1)
--disable spsummon
local e2=Effect.CreateEffect(c)
e2:SetCategory(CATEGORY_DISABLE_SUMMON+CATEGORY_DESTROY)
e2:SetType(EFFECT_TYPE_QUICK_O)
e2:SetCode(EVENT_SPSUMMON)
e2:SetRange(LOCATION_GRAVE)
e2:SetCountLimit(1,9910892)
e2:SetCondition(c9910891.discon)
e2:SetCost(aux.bfgcost)
e2:SetTarget(c9910891.distg)
e2:SetOperation(c9910891.disop)
c:RegisterEffect(e2)
end
function c9910891.spcon(e,tp,eg,ep,ev,re,r,rp)
local g=Duel.GetFieldGroup(tp,LOCATION_MZONE,LOCATION_MZONE)
local sg=g:Filter(Card.IsFaceup,nil)
return sg and sg:GetClassCount(Card.GetRace)>=2
end
function c9910891.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 c9910891.rfilter1(c)
return aux.IsCodeListed(c,9910871) and c:IsType(TYPE_MONSTER) and c:IsReleasableByEffect()
end
function c9910891.rfilter2(c)
return c:IsSummonLocation(LOCATION_EXTRA) and c:IsReleasableByEffect()
end
function c9910891.spop(e,tp,eg,ep,ev,re,r,rp)
local c=e:GetHandler()
if not c:IsRelateToEffect(e) or Duel.SpecialSummon(c,0,tp,tp,false,false,POS_FACEUP)==0 then return end
local g1=Duel.GetMatchingGroup(c9910891.rfilter1,tp,LOCATION_HAND,0,nil)
local g2=Duel.GetMatchingGroup(c9910891.rfilter2,tp,LOCATION_MZONE,LOCATION_MZONE,nil)
if g1:GetCount()>0 and g2:GetCount()>0 and Duel.SelectYesNo(tp,aux.Stringid(9910891,0)) then
Duel.BreakEffect()
Duel.Hint(HINT_SELECTMSG,tp,HINTMSG_RELEASE)
local sg1=g1:Select(tp,1,1,nil)
local sg2=g2:Select(tp,1,1,nil)
sg1:Merge(sg2)
if sg1:GetCount()~=2 then return end
Duel.HintSelection(sg1)
Duel.Release(sg1,REASON_EFFECT)
end
end
function c9910891.cfilter2(c)
return c:IsSummonLocation(LOCATION_EXTRA) and c:IsFaceup() and c:IsRace(RACE_PLANT)
end
function c9910891.cfilter1(c,tp)
return c:IsSummonPlayer(tp) and c:IsPreviousLocation(LOCATION_EXTRA)
end
function c9910891.discon(e,tp,eg,ep,ev,re,r,rp)
return tp~=ep and eg:IsExists(c9910891.cfilter1,1,nil,1-tp) and Duel.GetCurrentChain()==0
and Duel.IsExistingMatchingCard(c9910891.cfilter2,tp,LOCATION_MZONE,LOCATION_MZONE,1,nil)
end
function c9910891.distg(e,tp,eg,ep,ev,re,r,rp,chk)
if chk==0 then return true end
Duel.SetOperationInfo(0,CATEGORY_DISABLE_SUMMON,eg,eg:GetCount(),0,0)
Duel.SetOperationInfo(0,CATEGORY_DESTROY,eg,eg:GetCount(),0,0)
end
function c9910891.disop(e,tp,eg,ep,ev,re,r,rp,chk)
Duel.NegateSummon(eg)
Duel.Destroy(eg,REASON_EFFECT)
end
--最后的解救
function c9910893.initial_effect(c)
aux.AddCodeList(c,9910871)
--Activate
local e1=Effect.CreateEffect(c)
e1:SetCategory(CATEGORY_COIN)
e1:SetType(EFFECT_TYPE_ACTIVATE)
e1:SetProperty(EFFECT_FLAG_CARD_TARGET)
e1:SetCode(EVENT_FREE_CHAIN)
e1:SetHintTiming(0,TIMINGS_CHECK_MONSTER+TIMING_END_PHASE)
e1:SetCountLimit(1,9910893)
e1:SetTarget(c9910893.target)
e1:SetOperation(c9910893.activate)
c:RegisterEffect(e1)
--destroy replace
local e2=Effect.CreateEffect(c)
e2:SetType(EFFECT_TYPE_FIELD+EFFECT_TYPE_CONTINUOUS)
e2:SetCode(EFFECT_DESTROY_REPLACE)
e2:SetRange(LOCATION_GRAVE)
e2:SetCountLimit(1,9910893)
e2:SetTarget(c9910893.reptg)
e2:SetValue(c9910893.repval)
e2:SetOperation(c9910893.repop)
c:RegisterEffect(e2)
end
c9910893.toss_coin=true
function c9910893.target(e,tp,eg,ep,ev,re,r,rp,chk,chkc)
if chkc then return chkc:IsLocation(LOCATION_MZONE) and chkc:IsFaceup() end
if chk==0 then return Duel.IsExistingTarget(Card.IsFaceup,tp,LOCATION_MZONE,LOCATION_MZONE,1,nil) end
Duel.Hint(HINT_SELECTMSG,tp,HINTMSG_FACEUP)
Duel.SelectTarget(tp,Card.IsFaceup,tp,LOCATION_MZONE,LOCATION_MZONE,1,1,nil)
Duel.SetOperationInfo(0,CATEGORY_COIN,nil,0,tp,1)
end
function c9910893.activate(e,tp,eg,ep,ev,re,r,rp)
local c=e:GetHandler()
local tc=Duel.GetFirstTarget()
if not tc:IsRelateToEffect(e) or not tc:IsType(TYPE_MONSTER) then return end
Duel.Hint(HINT_SELECTMSG,tp,HINTMSG_COIN)
local opt=Duel.AnnounceCoin(tp)
local coin=Duel.TossCoin(tp,1)
local reset=RESET_EVENT+RESETS_STANDARD+RESET_PHASE+PHASE_END
if opt~=coin then
tc:RegisterFlagEffect(9910892,reset,EFFECT_FLAG_CLIENT_HINT,1,0,aux.Stringid(9910893,2))
local e1=Effect.CreateEffect(c)
e1:SetType(EFFECT_TYPE_SINGLE)
e1:SetProperty(EFFECT_FLAG_SINGLE_RANGE)
e1:SetCode(EFFECT_UNRELEASABLE_SUM)
e1:SetRange(LOCATION_MZONE)
e1:SetReset(reset)
e1:SetValue(1)
tc:RegisterEffect(e1)
local e2=e1:Clone()
e2:SetCode(EFFECT_UNRELEASABLE_NONSUM)
tc:RegisterEffect(e2)
local e3=e1:Clone()
e3:SetCode(EFFECT_CANNOT_BE_FUSION_MATERIAL)
e3:SetValue(c9910893.fuslimit)
tc:RegisterEffect(e3)
local e4=e1:Clone()
e4:SetCode(EFFECT_CANNOT_BE_SYNCHRO_MATERIAL)
tc:RegisterEffect(e4)
local e5=e1:Clone()
e5:SetCode(EFFECT_CANNOT_BE_XYZ_MATERIAL)
tc:RegisterEffect(e5)
local e6=e1:Clone()
e6:SetCode(EFFECT_CANNOT_BE_LINK_MATERIAL)
tc:RegisterEffect(e6)
else
tc:RegisterFlagEffect(9910893,reset,EFFECT_FLAG_CLIENT_HINT,1,0,aux.Stringid(9910893,3))
local e1=Effect.CreateEffect(c)
e1:SetType(EFFECT_TYPE_FIELD+EFFECT_TYPE_CONTINUOUS)
e1:SetCode(EVENT_CHAIN_SOLVING)
e1:SetReset(RESET_PHASE+PHASE_END)
e1:SetLabelObject(tc)
e1:SetCondition(c9910893.chcon)
e1:SetOperation(c9910893.chop)
Duel.RegisterEffect(e1,tp)
end
end
function c9910893.fuslimit(e,c,sumtype)
return sumtype==SUMMON_TYPE_FUSION
end
function c9910893.chcon(e,tp,eg,ep,ev,re,r,rp)
local tc=e:GetLabelObject()
return re:GetHandler()==tc and tc:GetFlagEffect(9910893)~=0 and tc:GetFlagEffectLabel(9910893)<2
end
function c9910893.chop(e,tp,eg,ep,ev,re,r,rp)
Duel.Hint(HINT_CARD,0,9910893)
local tc=e:GetLabelObject()
if tc then tc:SetFlagEffectLabel(9910893,tc:GetFlagEffectLabel(9910893)+1) end
Duel.ChangeChainOperation(ev,c9910893.thop)
end
function c9910893.thfilter(c)
return c:IsCode(9910871) and c:IsAbleToHand()
end
function c9910893.thop(e,tp,eg,ep,ev,re,r,rp)
local g=Duel.GetMatchingGroup(c9910893.thfilter,tp,LOCATION_DECK,0,nil)
if g:GetCount()>0 and Duel.SelectOption(tp,1190,aux.Stringid(9910893,0))==0 then
Duel.Hint(HINT_SELECTMSG,tp,HINTMSG_ATOHAND)
local sg=g:Select(tp,1,1,nil)
Duel.SendtoHand(sg,nil,REASON_EFFECT)
Duel.ConfirmCards(1-tp,sg)
else
Duel.Draw(tp,1,REASON_EFFECT)
end
end
function c9910893.repfilter(c,tp)
return c:IsFaceup() and aux.IsCodeListed(c,9910871) and c:IsLocation(LOCATION_MZONE)
and c:IsControler(tp) and c:IsReason(REASON_EFFECT+REASON_BATTLE) and not c:IsReason(REASON_REPLACE)
end
function c9910893.reptg(e,tp,eg,ep,ev,re,r,rp,chk)
if chk==0 then return e:GetHandler():IsAbleToRemove() and eg:IsExists(c9910893.repfilter,1,nil,tp) end
return Duel.SelectEffectYesNo(tp,e:GetHandler(),96)
end
function c9910893.repval(e,c)
return c9910893.repfilter(c,e:GetHandlerPlayer())
end
function c9910893.repop(e,tp,eg,ep,ev,re,r,rp)
Duel.Remove(e:GetHandler(),POS_FACEUP,REASON_EFFECT)
local g=Duel.GetMatchingGroup(Card.IsAbleToHand,tp,LOCATION_MZONE,LOCATION_MZONE,nil)
if g:GetCount()>0 and Duel.SelectYesNo(tp,aux.Stringid(9910893,1)) then
Duel.BreakEffect()
Duel.Hint(HINT_SELECTMSG,tp,HINTMSG_RTOHAND)
local sg=g:Select(tp,1,1,nil)
Duel.HintSelection(sg)
Duel.SendtoHand(sg,nil,REASON_EFFECT)
end
end
--冰之妖精 幻羽星使
function c9910894.initial_effect(c)
aux.AddCodeList(c,9910871)
--pendulum summon
aux.EnablePendulumAttribute(c)
c:EnableCounterPermit(0x1)
--pendulum set
local e1=Effect.CreateEffect(c)
e1:SetCategory(CATEGORY_DESTROY+CATEGORY_COUNTER)
e1:SetType(EFFECT_TYPE_IGNITION)
e1:SetRange(LOCATION_PZONE)
e1:SetCountLimit(1,9910894)
e1:SetCost(c9910894.pccost)
e1:SetTarget(c9910894.pctg)
e1:SetOperation(c9910894.pcop)
c:RegisterEffect(e1)
--Special Summon
local e2=Effect.CreateEffect(c)
e2:SetType(EFFECT_TYPE_FIELD)
e2:SetCode(EFFECT_SPSUMMON_PROC)
e2:SetProperty(EFFECT_FLAG_UNCOPYABLE)
e2:SetRange(LOCATION_HAND)
e2:SetCondition(c9910894.spcon)
c:RegisterEffect(e2)
--indes
local e3=Effect.CreateEffect(c)
e3:SetType(EFFECT_TYPE_SINGLE)
e3:SetProperty(EFFECT_FLAG_SINGLE_RANGE)
e3:SetRange(LOCATION_MZONE)
e3:SetCode(EFFECT_INDESTRUCTABLE_BATTLE)
e3:SetCondition(c9910894.incon)
e3:SetValue(1)
c:RegisterEffect(e3)
local e4=e3:Clone()
e4:SetCode(EFFECT_INDESTRUCTABLE_EFFECT)
e4:SetValue(aux.indoval)
c:RegisterEffect(e4)
--destroy
local e5=Effect.CreateEffect(c)
e5:SetCategory(CATEGORY_DESTROY+CATEGORY_REMOVE)
e5:SetType(EFFECT_TYPE_IGNITION)
e5:SetProperty(EFFECT_FLAG_CARD_TARGET)
e5:SetRange(LOCATION_MZONE)
e5:SetCountLimit(1)
e5:SetTarget(c9910894.target)
e5:SetOperation(c9910894.operation)
c:RegisterEffect(e5)
local e6=e5:Clone()
e6:SetType(EFFECT_TYPE_QUICK_O)
e6:SetCode(EVENT_FREE_CHAIN)
e6:SetHintTiming(0,TIMINGS_CHECK_MONSTER+TIMING_MAIN_END)
e6:SetCondition(c9910894.condition)
e6:SetCost(c9910894.cost)
c:RegisterEffect(e6)
end
function c9910894.pccost(e,tp,eg,ep,ev,re,r,rp,chk)
if chk==0 then return Duel.CheckLPCost(tp,1000) end
Duel.PayLPCost(tp,1000)
end
function c9910894.pcfilter(c)
return c:IsCanHaveCounter(0x1) and c:IsType(TYPE_PENDULUM) and not c:IsForbidden()
end
function c9910894.pctg(e,tp,eg,ep,ev,re,r,rp,chk)
local g=Duel.GetFieldGroup(tp,LOCATION_PZONE,LOCATION_PZONE)
if chk==0 then return #g>0 and Duel.IsExistingMatchingCard(c9910894.pcfilter,tp,LOCATION_DECK,0,1,nil) end
Duel.SetOperationInfo(0,CATEGORY_DESTROY,g,g:GetCount(),0,0)
end
function c9910894.pcop(e,tp,eg,ep,ev,re,r,rp)
local c=e:GetHandler()
if not c:IsRelateToEffect(e) then return end
local g=Duel.GetFieldGroup(tp,LOCATION_PZONE,LOCATION_PZONE)
local ct=Duel.Destroy(g,REASON_EFFECT)
if ct==0 or (not Duel.CheckLocation(tp,LOCATION_PZONE,0) and not Duel.CheckLocation(tp,LOCATION_PZONE,1)) then return end
Duel.Hint(HINT_SELECTMSG,tp,HINTMSG_TOFIELD)
local g=Duel.SelectMatchingCard(tp,c9910894.pcfilter,tp,LOCATION_DECK,0,1,1,nil)
local tc=g:GetFirst()
if tc and Duel.MoveToField(tc,tp,tp,LOCATION_PZONE,POS_FACEUP,true) then
tc:AddCounter(0x1,ct)
local fid=c:GetFieldID()
tc:RegisterFlagEffect(9910894,RESET_EVENT+RESETS_STANDARD,EFFECT_FLAG_CLIENT_HINT,1,fid,aux.Stringid(9910894,0))
local e1=Effect.CreateEffect(c)
e1:SetType(EFFECT_TYPE_FIELD+EFFECT_TYPE_CONTINUOUS)
e1:SetCode(EVENT_SPSUMMON_SUCCESS)
e1:SetProperty(EFFECT_FLAG_IGNORE_IMMUNE)
e1:SetLabel(fid)
e1:SetLabelObject(tc)
e1:SetCondition(c9910894.descon)
e1:SetOperation(c9910894.desop)
Duel.RegisterEffect(e1,tp)
end
end
function c9910894.descon(e,tp,eg,ep,ev,re,r,rp)
local tc=e:GetLabelObject()
if tc and tc:GetFlagEffectLabel(9910894)==e:GetLabel() then
return eg:IsExists(Card.IsSummonType,1,nil,SUMMON_TYPE_PENDULUM)
else
e:Reset()
return false
end
end
function c9910894.desop(e,tp,eg,ep,ev,re,r,rp)
Duel.Hint(HINT_CARD,0,9910894)
local tc=e:GetLabelObject()
Duel.Destroy(tc,REASON_EFFECT)
tc:ResetFlagEffect(9910894)
e:Reset()
end
function c9910894.cfilter(c)
return c:IsFaceup() and c:IsType(TYPE_SPELL+TYPE_TRAP)
end
function c9910894.spcon(e,c)
if c==nil then return true end
return Duel.IsExistingMatchingCard(c9910894.cfilter,c:GetControler(),0,LOCATION_ONFIELD,1,nil)
end
function c9910894.incon(e)
return e:GetHandler():GetCounter(0x1)>0
end
function c9910894.condition(e,tp,eg,ep,ev,re,r,rp)
return Duel.GetTurnPlayer()~=tp
and (Duel.GetCurrentPhase()==PHASE_MAIN1 or Duel.GetCurrentPhase()==PHASE_MAIN2)
end
function c9910894.costfilter(c)
return aux.IsCodeListed(c,9910871) and c:IsAbleToRemoveAsCost()
end
function c9910894.cost(e,tp,eg,ep,ev,re,r,rp,chk)
local b1=Duel.IsCanRemoveCounter(tp,1,0,0x1,3,REASON_COST)
local b2=Duel.IsExistingMatchingCard(c9910894.costfilter,tp,LOCATION_GRAVE,0,1,nil)
if chk==0 then return b1 or b2 end
if b1 and (not b2 or Duel.SelectOption(tp,aux.Stringid(9910894,1),aux.Stringid(9910894,2))==0) then
Duel.RemoveCounter(tp,1,0,0x1,3,REASON_COST)
else
Duel.Hint(HINT_SELECTMSG,tp,HINTMSG_REMOVE)
local g=Duel.SelectMatchingCard(tp,c9910894.costfilter,tp,LOCATION_GRAVE,0,1,1,nil)
Duel.Remove(g,POS_FACEUP,REASON_COST)
end
end
function c9910894.target(e,tp,eg,ep,ev,re,r,rp,chk,chkc)
if chkc then return chkc:IsOnField() and chkc:IsControler(1-tp) and chkc:IsAbleToRemove() end
if chk==0 then return Duel.IsExistingTarget(Card.IsAbleToRemove,tp,0,LOCATION_ONFIELD,1,nil) end
Duel.Hint(HINT_SELECTMSG,tp,HINTMSG_DESTROY)
local g=Duel.SelectTarget(tp,Card.IsAbleToRemove,tp,0,LOCATION_ONFIELD,1,1,nil)
Duel.SetOperationInfo(0,CATEGORY_DESTROY,g,1,0,0)
Duel.SetOperationInfo(0,CATEGORY_REMOVE,g,1,0,0)
end
function c9910894.operation(e,tp,eg,ep,ev,re,r,rp)
local c=e:GetHandler()
local tc=Duel.GetFirstTarget()
if tc:IsRelateToEffect(e) and Duel.Destroy(tc,REASON_EFFECT,LOCATION_REMOVED)~=0 and c:IsRelateToEffect(e) then
Duel.BreakEffect()
c:AddCounter(0x1,1)
end
end
......@@ -129,7 +129,6 @@
!setname 0x955 天空漫步者
!setname 0x956 神树勇者
!setname 0x957 星幽
#AddCodeList(9910871) 万类共生记述
#AddCodeList(9910376) 丛雨记述
!counter 0x1950 韶光指示物
!counter 0x953 复仇指示物
......@@ -665,7 +664,6 @@
#kors k - 283 0xdd0-0xddf
!setname 0xddb 吓个半死
!setname 0xddd 基板
!counter 0xddd 浴霸指示物
#沃亚森斯奥克斯 2201771890 300 0x930-0x93f
......
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