"...Irrlicht/svn:/svn.code.sf.net/p/irrlicht/code/trunk@2987" did not exist on "6ffcba6836e56a5437b8baac5cc2e8acb3d348e6"
Commit b1dcf091 authored by Nemo Ma's avatar Nemo Ma

1130 wd

parent bfd143af
......@@ -41,6 +41,29 @@
130002004 0
130002005 0
#WILD, I say WILD, WAHAHA
17338780 0
17338790 0
17338800 0
17338810 0
17338820 0
17338830 0
17338840 0
17338850 0
17338860 0
17338870 0
17338880 0
17338890 0
17338900 0
17338930 0
17338940 0
17338950 0
17338960 0
17338970 0
17338980 0
17338990 0
17339000 0
17339010 0
17339040 0
16300000 0
16300005 0
16310005 0
......
No preview for this file type
expansions/pics/17337180.jpg

54 KB | W: | H:

expansions/pics/17337180.jpg

114 KB | W: | H:

expansions/pics/17337180.jpg
expansions/pics/17337180.jpg
expansions/pics/17337180.jpg
expansions/pics/17337180.jpg
  • 2-up
  • Swipe
  • Onion skin
expansions/pics/17337190.jpg

46 KB | W: | H:

expansions/pics/17337190.jpg

113 KB | W: | H:

expansions/pics/17337190.jpg
expansions/pics/17337190.jpg
expansions/pics/17337190.jpg
expansions/pics/17337190.jpg
  • 2-up
  • Swipe
  • Onion skin
expansions/pics/17337200.jpg

46.9 KB | W: | H:

expansions/pics/17337200.jpg

110 KB | W: | H:

expansions/pics/17337200.jpg
expansions/pics/17337200.jpg
expansions/pics/17337200.jpg
expansions/pics/17337200.jpg
  • 2-up
  • Swipe
  • Onion skin
expansions/pics/17337210.jpg

55.8 KB | W: | H:

expansions/pics/17337210.jpg

58.6 KB | W: | H:

expansions/pics/17337210.jpg
expansions/pics/17337210.jpg
expansions/pics/17337210.jpg
expansions/pics/17337210.jpg
  • 2-up
  • Swipe
  • Onion skin
expansions/pics/17337220.jpg

48.5 KB | W: | H:

expansions/pics/17337220.jpg

47.7 KB | W: | H:

expansions/pics/17337220.jpg
expansions/pics/17337220.jpg
expansions/pics/17337220.jpg
expansions/pics/17337220.jpg
  • 2-up
  • Swipe
  • Onion skin
expansions/pics/17337230.jpg

44.6 KB | W: | H:

expansions/pics/17337230.jpg

115 KB | W: | H:

expansions/pics/17337230.jpg
expansions/pics/17337230.jpg
expansions/pics/17337230.jpg
expansions/pics/17337230.jpg
  • 2-up
  • Swipe
  • Onion skin
expansions/pics/17337240.jpg

48.2 KB | W: | H:

expansions/pics/17337240.jpg

117 KB | W: | H:

expansions/pics/17337240.jpg
expansions/pics/17337240.jpg
expansions/pics/17337240.jpg
expansions/pics/17337240.jpg
  • 2-up
  • Swipe
  • Onion skin
expansions/pics/17337250.jpg

45.7 KB | W: | H:

expansions/pics/17337250.jpg

117 KB | W: | H:

expansions/pics/17337250.jpg
expansions/pics/17337250.jpg
expansions/pics/17337250.jpg
expansions/pics/17337250.jpg
  • 2-up
  • Swipe
  • Onion skin
expansions/pics/17337260.jpg

39.8 KB | W: | H:

expansions/pics/17337260.jpg

107 KB | W: | H:

expansions/pics/17337260.jpg
expansions/pics/17337260.jpg
expansions/pics/17337260.jpg
expansions/pics/17337260.jpg
  • 2-up
  • Swipe
  • Onion skin
expansions/pics/17337270.jpg

43.3 KB | W: | H:

expansions/pics/17337270.jpg

96.2 KB | W: | H:

expansions/pics/17337270.jpg
expansions/pics/17337270.jpg
expansions/pics/17337270.jpg
expansions/pics/17337270.jpg
  • 2-up
  • Swipe
  • Onion skin
expansions/pics/17337280.jpg

47.3 KB | W: | H:

expansions/pics/17337280.jpg

110 KB | W: | H:

expansions/pics/17337280.jpg
expansions/pics/17337280.jpg
expansions/pics/17337280.jpg
expansions/pics/17337280.jpg
  • 2-up
  • Swipe
  • Onion skin
expansions/pics/17337290.jpg

45.2 KB | W: | H:

expansions/pics/17337290.jpg

110 KB | W: | H:

expansions/pics/17337290.jpg
expansions/pics/17337290.jpg
expansions/pics/17337290.jpg
expansions/pics/17337290.jpg
  • 2-up
  • Swipe
  • Onion skin
expansions/pics/17337300.jpg

48.3 KB | W: | H:

expansions/pics/17337300.jpg

108 KB | W: | H:

expansions/pics/17337300.jpg
expansions/pics/17337300.jpg
expansions/pics/17337300.jpg
expansions/pics/17337300.jpg
  • 2-up
  • Swipe
  • Onion skin
expansions/pics/17337310.jpg

47.3 KB | W: | H:

expansions/pics/17337310.jpg

107 KB | W: | H:

expansions/pics/17337310.jpg
expansions/pics/17337310.jpg
expansions/pics/17337310.jpg
expansions/pics/17337310.jpg
  • 2-up
  • Swipe
  • Onion skin
expansions/pics/17337320.jpg

45.9 KB | W: | H:

expansions/pics/17337320.jpg

116 KB | W: | H:

expansions/pics/17337320.jpg
expansions/pics/17337320.jpg
expansions/pics/17337320.jpg
expansions/pics/17337320.jpg
  • 2-up
  • Swipe
  • Onion skin
expansions/pics/17337330.jpg

38.9 KB | W: | H:

expansions/pics/17337330.jpg

93.4 KB | W: | H:

expansions/pics/17337330.jpg
expansions/pics/17337330.jpg
expansions/pics/17337330.jpg
expansions/pics/17337330.jpg
  • 2-up
  • Swipe
  • Onion skin
expansions/pics/17337340.jpg

51.7 KB | W: | H:

expansions/pics/17337340.jpg

103 KB | W: | H:

expansions/pics/17337340.jpg
expansions/pics/17337340.jpg
expansions/pics/17337340.jpg
expansions/pics/17337340.jpg
  • 2-up
  • Swipe
  • Onion skin
expansions/pics/17337350.jpg

36.9 KB | W: | H:

expansions/pics/17337350.jpg

96 KB | W: | H:

expansions/pics/17337350.jpg
expansions/pics/17337350.jpg
expansions/pics/17337350.jpg
expansions/pics/17337350.jpg
  • 2-up
  • Swipe
  • Onion skin
expansions/pics/17337400.jpg

43 KB | W: | H:

expansions/pics/17337400.jpg

113 KB | W: | H:

expansions/pics/17337400.jpg
expansions/pics/17337400.jpg
expansions/pics/17337400.jpg
expansions/pics/17337400.jpg
  • 2-up
  • Swipe
  • Onion skin
expansions/pics/17337410.jpg

47.5 KB | W: | H:

expansions/pics/17337410.jpg

37.4 KB | W: | H:

expansions/pics/17337410.jpg
expansions/pics/17337410.jpg
expansions/pics/17337410.jpg
expansions/pics/17337410.jpg
  • 2-up
  • Swipe
  • Onion skin
expansions/pics/17337420.jpg

49.9 KB | W: | H:

expansions/pics/17337420.jpg

38.9 KB | W: | H:

expansions/pics/17337420.jpg
expansions/pics/17337420.jpg
expansions/pics/17337420.jpg
expansions/pics/17337420.jpg
  • 2-up
  • Swipe
  • Onion skin
expansions/pics/17337430.jpg

52.6 KB | W: | H:

expansions/pics/17337430.jpg

40.3 KB | W: | H:

expansions/pics/17337430.jpg
expansions/pics/17337430.jpg
expansions/pics/17337430.jpg
expansions/pics/17337430.jpg
  • 2-up
  • Swipe
  • Onion skin
expansions/pics/17337440.jpg

52.8 KB | W: | H:

expansions/pics/17337440.jpg

39.9 KB | W: | H:

expansions/pics/17337440.jpg
expansions/pics/17337440.jpg
expansions/pics/17337440.jpg
expansions/pics/17337440.jpg
  • 2-up
  • Swipe
  • Onion skin
expansions/pics/17337450.jpg

49.2 KB | W: | H:

expansions/pics/17337450.jpg

39 KB | W: | H:

expansions/pics/17337450.jpg
expansions/pics/17337450.jpg
expansions/pics/17337450.jpg
expansions/pics/17337450.jpg
  • 2-up
  • Swipe
  • Onion skin
expansions/pics/17337460.jpg

49.9 KB | W: | H:

expansions/pics/17337460.jpg

40.6 KB | W: | H:

expansions/pics/17337460.jpg
expansions/pics/17337460.jpg
expansions/pics/17337460.jpg
expansions/pics/17337460.jpg
  • 2-up
  • Swipe
  • Onion skin
expansions/pics/17337470.jpg

53.9 KB | W: | H:

expansions/pics/17337470.jpg

42.9 KB | W: | H:

expansions/pics/17337470.jpg
expansions/pics/17337470.jpg
expansions/pics/17337470.jpg
expansions/pics/17337470.jpg
  • 2-up
  • Swipe
  • Onion skin
expansions/pics/17337480.jpg

40.5 KB | W: | H:

expansions/pics/17337480.jpg

105 KB | W: | H:

expansions/pics/17337480.jpg
expansions/pics/17337480.jpg
expansions/pics/17337480.jpg
expansions/pics/17337480.jpg
  • 2-up
  • Swipe
  • Onion skin
expansions/pics/17337490.jpg

50.5 KB | W: | H:

expansions/pics/17337490.jpg

40.3 KB | W: | H:

expansions/pics/17337490.jpg
expansions/pics/17337490.jpg
expansions/pics/17337490.jpg
expansions/pics/17337490.jpg
  • 2-up
  • Swipe
  • Onion skin
expansions/pics/17337500.jpg

43.8 KB | W: | H:

expansions/pics/17337500.jpg

113 KB | W: | H:

expansions/pics/17337500.jpg
expansions/pics/17337500.jpg
expansions/pics/17337500.jpg
expansions/pics/17337500.jpg
  • 2-up
  • Swipe
  • Onion skin
expansions/pics/17337510.jpg

53.5 KB | W: | H:

expansions/pics/17337510.jpg

42.8 KB | W: | H:

expansions/pics/17337510.jpg
expansions/pics/17337510.jpg
expansions/pics/17337510.jpg
expansions/pics/17337510.jpg
  • 2-up
  • Swipe
  • Onion skin
expansions/pics/17337520.jpg

47 KB | W: | H:

expansions/pics/17337520.jpg

39.1 KB | W: | H:

expansions/pics/17337520.jpg
expansions/pics/17337520.jpg
expansions/pics/17337520.jpg
expansions/pics/17337520.jpg
  • 2-up
  • Swipe
  • Onion skin
expansions/pics/17337530.jpg

54.8 KB | W: | H:

expansions/pics/17337530.jpg

42.7 KB | W: | H:

expansions/pics/17337530.jpg
expansions/pics/17337530.jpg
expansions/pics/17337530.jpg
expansions/pics/17337530.jpg
  • 2-up
  • Swipe
  • Onion skin
expansions/pics/17337540.jpg

51.3 KB | W: | H:

expansions/pics/17337540.jpg

41 KB | W: | H:

expansions/pics/17337540.jpg
expansions/pics/17337540.jpg
expansions/pics/17337540.jpg
expansions/pics/17337540.jpg
  • 2-up
  • Swipe
  • Onion skin
expansions/pics/17337550.jpg

44.4 KB | W: | H:

expansions/pics/17337550.jpg

35.4 KB | W: | H:

expansions/pics/17337550.jpg
expansions/pics/17337550.jpg
expansions/pics/17337550.jpg
expansions/pics/17337550.jpg
  • 2-up
  • Swipe
  • Onion skin
expansions/pics/17337560.jpg

53.7 KB | W: | H:

expansions/pics/17337560.jpg

42.9 KB | W: | H:

expansions/pics/17337560.jpg
expansions/pics/17337560.jpg
expansions/pics/17337560.jpg
expansions/pics/17337560.jpg
  • 2-up
  • Swipe
  • Onion skin
expansions/pics/17337570.jpg

51.4 KB | W: | H:

expansions/pics/17337570.jpg

41.4 KB | W: | H:

expansions/pics/17337570.jpg
expansions/pics/17337570.jpg
expansions/pics/17337570.jpg
expansions/pics/17337570.jpg
  • 2-up
  • Swipe
  • Onion skin
expansions/pics/17337580.jpg

48.3 KB | W: | H:

expansions/pics/17337580.jpg

37.2 KB | W: | H:

expansions/pics/17337580.jpg
expansions/pics/17337580.jpg
expansions/pics/17337580.jpg
expansions/pics/17337580.jpg
  • 2-up
  • Swipe
  • Onion skin
expansions/pics/17337590.jpg

52.5 KB | W: | H:

expansions/pics/17337590.jpg

44.4 KB | W: | H:

expansions/pics/17337590.jpg
expansions/pics/17337590.jpg
expansions/pics/17337590.jpg
expansions/pics/17337590.jpg
  • 2-up
  • Swipe
  • Onion skin
expansions/pics/17337600.jpg

47.9 KB | W: | H:

expansions/pics/17337600.jpg

37.1 KB | W: | H:

expansions/pics/17337600.jpg
expansions/pics/17337600.jpg
expansions/pics/17337600.jpg
expansions/pics/17337600.jpg
  • 2-up
  • Swipe
  • Onion skin
expansions/pics/17337610.jpg

45.5 KB | W: | H:

expansions/pics/17337610.jpg

35.1 KB | W: | H:

expansions/pics/17337610.jpg
expansions/pics/17337610.jpg
expansions/pics/17337610.jpg
expansions/pics/17337610.jpg
  • 2-up
  • Swipe
  • Onion skin
expansions/pics/17337620.jpg

43.7 KB | W: | H:

expansions/pics/17337620.jpg

114 KB | W: | H:

expansions/pics/17337620.jpg
expansions/pics/17337620.jpg
expansions/pics/17337620.jpg
expansions/pics/17337620.jpg
  • 2-up
  • Swipe
  • Onion skin
expansions/pics/17337630.jpg

46.3 KB | W: | H:

expansions/pics/17337630.jpg

36.2 KB | W: | H:

expansions/pics/17337630.jpg
expansions/pics/17337630.jpg
expansions/pics/17337630.jpg
expansions/pics/17337630.jpg
  • 2-up
  • Swipe
  • Onion skin
expansions/pics/17337640.jpg

52.2 KB | W: | H:

expansions/pics/17337640.jpg

40.6 KB | W: | H:

expansions/pics/17337640.jpg
expansions/pics/17337640.jpg
expansions/pics/17337640.jpg
expansions/pics/17337640.jpg
  • 2-up
  • Swipe
  • Onion skin
expansions/pics/17337650.jpg

51.8 KB | W: | H:

expansions/pics/17337650.jpg

40.8 KB | W: | H:

expansions/pics/17337650.jpg
expansions/pics/17337650.jpg
expansions/pics/17337650.jpg
expansions/pics/17337650.jpg
  • 2-up
  • Swipe
  • Onion skin
expansions/pics/17337660.jpg

54.1 KB | W: | H:

expansions/pics/17337660.jpg

41 KB | W: | H:

expansions/pics/17337660.jpg
expansions/pics/17337660.jpg
expansions/pics/17337660.jpg
expansions/pics/17337660.jpg
  • 2-up
  • Swipe
  • Onion skin
expansions/pics/17337670.jpg

49.7 KB | W: | H:

expansions/pics/17337670.jpg

38.4 KB | W: | H:

expansions/pics/17337670.jpg
expansions/pics/17337670.jpg
expansions/pics/17337670.jpg
expansions/pics/17337670.jpg
  • 2-up
  • Swipe
  • Onion skin
expansions/pics/17337680.jpg

52.3 KB | W: | H:

expansions/pics/17337680.jpg

41.8 KB | W: | H:

expansions/pics/17337680.jpg
expansions/pics/17337680.jpg
expansions/pics/17337680.jpg
expansions/pics/17337680.jpg
  • 2-up
  • Swipe
  • Onion skin
expansions/pics/17337690.jpg

50.9 KB | W: | H:

expansions/pics/17337690.jpg

40.7 KB | W: | H:

expansions/pics/17337690.jpg
expansions/pics/17337690.jpg
expansions/pics/17337690.jpg
expansions/pics/17337690.jpg
  • 2-up
  • Swipe
  • Onion skin
expansions/pics/17337700.jpg

41.2 KB | W: | H:

expansions/pics/17337700.jpg

37.4 KB | W: | H:

expansions/pics/17337700.jpg
expansions/pics/17337700.jpg
expansions/pics/17337700.jpg
expansions/pics/17337700.jpg
  • 2-up
  • Swipe
  • Onion skin
expansions/pics/17337710.jpg

52.6 KB | W: | H:

expansions/pics/17337710.jpg

40.5 KB | W: | H:

expansions/pics/17337710.jpg
expansions/pics/17337710.jpg
expansions/pics/17337710.jpg
expansions/pics/17337710.jpg
  • 2-up
  • Swipe
  • Onion skin
expansions/pics/17337720.jpg

40.7 KB | W: | H:

expansions/pics/17337720.jpg

107 KB | W: | H:

expansions/pics/17337720.jpg
expansions/pics/17337720.jpg
expansions/pics/17337720.jpg
expansions/pics/17337720.jpg
  • 2-up
  • Swipe
  • Onion skin
expansions/pics/17337730.jpg

52.9 KB | W: | H:

expansions/pics/17337730.jpg

41.9 KB | W: | H:

expansions/pics/17337730.jpg
expansions/pics/17337730.jpg
expansions/pics/17337730.jpg
expansions/pics/17337730.jpg
  • 2-up
  • Swipe
  • Onion skin
expansions/pics/17337740.jpg

47.6 KB | W: | H:

expansions/pics/17337740.jpg

37.4 KB | W: | H:

expansions/pics/17337740.jpg
expansions/pics/17337740.jpg
expansions/pics/17337740.jpg
expansions/pics/17337740.jpg
  • 2-up
  • Swipe
  • Onion skin
expansions/pics/17337750.jpg

50.9 KB | W: | H:

expansions/pics/17337750.jpg

39.8 KB | W: | H:

expansions/pics/17337750.jpg
expansions/pics/17337750.jpg
expansions/pics/17337750.jpg
expansions/pics/17337750.jpg
  • 2-up
  • Swipe
  • Onion skin
expansions/pics/17337760.jpg

46.8 KB | W: | H:

expansions/pics/17337760.jpg

37.4 KB | W: | H:

expansions/pics/17337760.jpg
expansions/pics/17337760.jpg
expansions/pics/17337760.jpg
expansions/pics/17337760.jpg
  • 2-up
  • Swipe
  • Onion skin
expansions/pics/17337770.jpg

47.3 KB | W: | H:

expansions/pics/17337770.jpg

37.7 KB | W: | H:

expansions/pics/17337770.jpg
expansions/pics/17337770.jpg
expansions/pics/17337770.jpg
expansions/pics/17337770.jpg
  • 2-up
  • Swipe
  • Onion skin
expansions/pics/17337780.jpg

50.7 KB | W: | H:

expansions/pics/17337780.jpg

41 KB | W: | H:

expansions/pics/17337780.jpg
expansions/pics/17337780.jpg
expansions/pics/17337780.jpg
expansions/pics/17337780.jpg
  • 2-up
  • Swipe
  • Onion skin
expansions/pics/17337790.jpg

42.6 KB | W: | H:

expansions/pics/17337790.jpg

110 KB | W: | H:

expansions/pics/17337790.jpg
expansions/pics/17337790.jpg
expansions/pics/17337790.jpg
expansions/pics/17337790.jpg
  • 2-up
  • Swipe
  • Onion skin
expansions/pics/17337800.jpg

37.3 KB | W: | H:

expansions/pics/17337800.jpg

119 KB | W: | H:

expansions/pics/17337800.jpg
expansions/pics/17337800.jpg
expansions/pics/17337800.jpg
expansions/pics/17337800.jpg
  • 2-up
  • Swipe
  • Onion skin
expansions/pics/17337810.jpg

35.2 KB | W: | H:

expansions/pics/17337810.jpg

116 KB | W: | H:

expansions/pics/17337810.jpg
expansions/pics/17337810.jpg
expansions/pics/17337810.jpg
expansions/pics/17337810.jpg
  • 2-up
  • Swipe
  • Onion skin
expansions/pics/17337820.jpg

38.6 KB | W: | H:

expansions/pics/17337820.jpg

104 KB | W: | H:

expansions/pics/17337820.jpg
expansions/pics/17337820.jpg
expansions/pics/17337820.jpg
expansions/pics/17337820.jpg
  • 2-up
  • Swipe
  • Onion skin
expansions/pics/17337830.jpg

45.3 KB | W: | H:

expansions/pics/17337830.jpg

36.8 KB | W: | H:

expansions/pics/17337830.jpg
expansions/pics/17337830.jpg
expansions/pics/17337830.jpg
expansions/pics/17337830.jpg
  • 2-up
  • Swipe
  • Onion skin
expansions/pics/17337840.jpg

43.1 KB | W: | H:

expansions/pics/17337840.jpg

117 KB | W: | H:

expansions/pics/17337840.jpg
expansions/pics/17337840.jpg
expansions/pics/17337840.jpg
expansions/pics/17337840.jpg
  • 2-up
  • Swipe
  • Onion skin
expansions/pics/17337850.jpg

38.9 KB | W: | H:

expansions/pics/17337850.jpg

103 KB | W: | H:

expansions/pics/17337850.jpg
expansions/pics/17337850.jpg
expansions/pics/17337850.jpg
expansions/pics/17337850.jpg
  • 2-up
  • Swipe
  • Onion skin
expansions/pics/17337860.jpg

34.9 KB | W: | H:

expansions/pics/17337860.jpg

111 KB | W: | H:

expansions/pics/17337860.jpg
expansions/pics/17337860.jpg
expansions/pics/17337860.jpg
expansions/pics/17337860.jpg
  • 2-up
  • Swipe
  • Onion skin
expansions/pics/17337870.jpg

48.4 KB | W: | H:

expansions/pics/17337870.jpg

38.2 KB | W: | H:

expansions/pics/17337870.jpg
expansions/pics/17337870.jpg
expansions/pics/17337870.jpg
expansions/pics/17337870.jpg
  • 2-up
  • Swipe
  • Onion skin
expansions/pics/17337880.jpg

43.5 KB | W: | H:

expansions/pics/17337880.jpg

34.9 KB | W: | H:

expansions/pics/17337880.jpg
expansions/pics/17337880.jpg
expansions/pics/17337880.jpg
expansions/pics/17337880.jpg
  • 2-up
  • Swipe
  • Onion skin
expansions/pics/17337890.jpg

49.9 KB | W: | H:

expansions/pics/17337890.jpg

37.5 KB | W: | H:

expansions/pics/17337890.jpg
expansions/pics/17337890.jpg
expansions/pics/17337890.jpg
expansions/pics/17337890.jpg
  • 2-up
  • Swipe
  • Onion skin
expansions/pics/17337900.jpg

39 KB | W: | H:

expansions/pics/17337900.jpg

120 KB | W: | H:

expansions/pics/17337900.jpg
expansions/pics/17337900.jpg
expansions/pics/17337900.jpg
expansions/pics/17337900.jpg
  • 2-up
  • Swipe
  • Onion skin
expansions/pics/17337910.jpg

36.3 KB | W: | H:

expansions/pics/17337910.jpg

114 KB | W: | H:

expansions/pics/17337910.jpg
expansions/pics/17337910.jpg
expansions/pics/17337910.jpg
expansions/pics/17337910.jpg
  • 2-up
  • Swipe
  • Onion skin
expansions/pics/17337930.jpg

58.4 KB | W: | H:

expansions/pics/17337930.jpg

45.2 KB | W: | H:

expansions/pics/17337930.jpg
expansions/pics/17337930.jpg
expansions/pics/17337930.jpg
expansions/pics/17337930.jpg
  • 2-up
  • Swipe
  • Onion skin
expansions/pics/17337940.jpg

60.9 KB | W: | H:

expansions/pics/17337940.jpg

46 KB | W: | H:

expansions/pics/17337940.jpg
expansions/pics/17337940.jpg
expansions/pics/17337940.jpg
expansions/pics/17337940.jpg
  • 2-up
  • Swipe
  • Onion skin
expansions/pics/17337950.jpg

55.6 KB | W: | H:

expansions/pics/17337950.jpg

43.1 KB | W: | H:

expansions/pics/17337950.jpg
expansions/pics/17337950.jpg
expansions/pics/17337950.jpg
expansions/pics/17337950.jpg
  • 2-up
  • Swipe
  • Onion skin
expansions/pics/17337990.jpg

60.5 KB | W: | H:

expansions/pics/17337990.jpg

47.3 KB | W: | H:

expansions/pics/17337990.jpg
expansions/pics/17337990.jpg
expansions/pics/17337990.jpg
expansions/pics/17337990.jpg
  • 2-up
  • Swipe
  • Onion skin
expansions/pics/17338000.jpg

48.7 KB | W: | H:

expansions/pics/17338000.jpg

38.6 KB | W: | H:

expansions/pics/17338000.jpg
expansions/pics/17338000.jpg
expansions/pics/17338000.jpg
expansions/pics/17338000.jpg
  • 2-up
  • Swipe
  • Onion skin
expansions/pics/17338100.jpg

49.9 KB | W: | H:

expansions/pics/17338100.jpg

38.8 KB | W: | H:

expansions/pics/17338100.jpg
expansions/pics/17338100.jpg
expansions/pics/17338100.jpg
expansions/pics/17338100.jpg
  • 2-up
  • Swipe
  • Onion skin
expansions/pics/17338130.jpg

50.8 KB | W: | H:

expansions/pics/17338130.jpg

38.9 KB | W: | H:

expansions/pics/17338130.jpg
expansions/pics/17338130.jpg
expansions/pics/17338130.jpg
expansions/pics/17338130.jpg
  • 2-up
  • Swipe
  • Onion skin
expansions/pics/17338140.jpg

57.3 KB | W: | H:

expansions/pics/17338140.jpg

44.1 KB | W: | H:

expansions/pics/17338140.jpg
expansions/pics/17338140.jpg
expansions/pics/17338140.jpg
expansions/pics/17338140.jpg
  • 2-up
  • Swipe
  • Onion skin
expansions/pics/17338150.jpg

45.2 KB | W: | H:

expansions/pics/17338150.jpg

35.7 KB | W: | H:

expansions/pics/17338150.jpg
expansions/pics/17338150.jpg
expansions/pics/17338150.jpg
expansions/pics/17338150.jpg
  • 2-up
  • Swipe
  • Onion skin
expansions/pics/17338160.jpg

58.7 KB | W: | H:

expansions/pics/17338160.jpg

45.4 KB | W: | H:

expansions/pics/17338160.jpg
expansions/pics/17338160.jpg
expansions/pics/17338160.jpg
expansions/pics/17338160.jpg
  • 2-up
  • Swipe
  • Onion skin
expansions/pics/17338170.jpg

45.3 KB | W: | H:

expansions/pics/17338170.jpg

119 KB | W: | H:

expansions/pics/17338170.jpg
expansions/pics/17338170.jpg
expansions/pics/17338170.jpg
expansions/pics/17338170.jpg
  • 2-up
  • Swipe
  • Onion skin
expansions/pics/17338180.jpg

46 KB | W: | H:

expansions/pics/17338180.jpg

35 KB | W: | H:

expansions/pics/17338180.jpg
expansions/pics/17338180.jpg
expansions/pics/17338180.jpg
expansions/pics/17338180.jpg
  • 2-up
  • Swipe
  • Onion skin
expansions/pics/17338190.jpg

56.1 KB | W: | H:

expansions/pics/17338190.jpg

43.6 KB | W: | H:

expansions/pics/17338190.jpg
expansions/pics/17338190.jpg
expansions/pics/17338190.jpg
expansions/pics/17338190.jpg
  • 2-up
  • Swipe
  • Onion skin
expansions/pics/17338300.jpg

49.6 KB | W: | H:

expansions/pics/17338300.jpg

39.6 KB | W: | H:

expansions/pics/17338300.jpg
expansions/pics/17338300.jpg
expansions/pics/17338300.jpg
expansions/pics/17338300.jpg
  • 2-up
  • Swipe
  • Onion skin
expansions/pics/17338320.jpg

53 KB | W: | H:

expansions/pics/17338320.jpg

39.9 KB | W: | H:

expansions/pics/17338320.jpg
expansions/pics/17338320.jpg
expansions/pics/17338320.jpg
expansions/pics/17338320.jpg
  • 2-up
  • Swipe
  • Onion skin
expansions/pics/17338520.jpg

108 KB | W: | H:

expansions/pics/17338520.jpg

111 KB | W: | H:

expansions/pics/17338520.jpg
expansions/pics/17338520.jpg
expansions/pics/17338520.jpg
expansions/pics/17338520.jpg
  • 2-up
  • Swipe
  • Onion skin
......@@ -65,13 +65,13 @@ function s.activate(e,tp,eg,ep,ev,re,r,rp)
local e4=Effect.CreateEffect(c)
e4:SetType(EFFECT_TYPE_FIELD)
e4:SetCode(EFFECT_MUST_ATTACK)
e4:SetRange(LOCATION_SZONE)
e4:SetTargetRange(0,LOCATION_MZONE)
e4:SetReset(RESET_PHASE+PHASE_END)
e4:SetCondition(s.atkcon)
Duel.RegisterEffect(e4,tp)
local e5=e4:Clone()
e5:SetCode(EFFECT_MUST_ATTACK_MONSTER)
e5:SetValue(s.atklimit)
local e4=e3:Clone()
e4:SetCode(EFFECT_MUST_ATTACK_MONSTER)
e4:SetValue(s.atklimit)
Duel.RegisterEffect(e5,tp)
end
local e6=Effect.CreateEffect(e:GetHandler())
......@@ -85,18 +85,15 @@ end
function s.atkfilter(e,c)
return c:IsSetCard(0x6f52) and c:IsFaceup()
end
function s.atkfilter2(c)
return c:IsSetCard(0x6f52) and c:IsFaceup()
end
function s.atkval(e,c)
local ct=Duel.GetMatchingGroupCount(aux.TRUE,tp,LOCATION_GRAVE,LOCATION_GRAVE,nil)
return ct*100
return ct*300
end
function s.aclimit(e,re,tp)
return not re:GetHandler():IsSetCard(0x6f52)
end
function s.atkcon(e)
return Duel.IsExistingMatchingCard(s.atkfilter2,e:GetHandlerPlayer(),LOCATION_MZONE,0,1,nil)
return Duel.IsExistingMatchingCard(s.atkfilter,e:GetHandlerPlayer(),LOCATION_MZONE,0,1,nil)
end
function s.atklimit(e,c)
return c:IsFaceup() and c:IsSetCard(0x6f52)
......
......@@ -65,13 +65,13 @@ function s.activate(e,tp,eg,ep,ev,re,r,rp)
local e4=Effect.CreateEffect(c)
e4:SetType(EFFECT_TYPE_FIELD)
e4:SetCode(EFFECT_MUST_ATTACK)
e4:SetRange(LOCATION_SZONE)
e4:SetTargetRange(0,LOCATION_MZONE)
e4:SetReset(RESET_PHASE+PHASE_END)
e4:SetCondition(s.atkcon)
Duel.RegisterEffect(e4,tp)
local e5=e4:Clone()
e5:SetCode(EFFECT_MUST_ATTACK_MONSTER)
e5:SetValue(s.atklimit)
local e4=e3:Clone()
e4:SetCode(EFFECT_MUST_ATTACK_MONSTER)
e4:SetValue(s.atklimit)
Duel.RegisterEffect(e5,tp)
end
local e6=Effect.CreateEffect(e:GetHandler())
......@@ -85,18 +85,15 @@ end
function s.atkfilter(e,c)
return c:IsSetCard(0x6f52) and c:IsFaceup()
end
function s.atkfilter2(c)
return c:IsSetCard(0x6f52) and c:IsFaceup()
end
function s.atkval(e,c)
local ct=Duel.GetMatchingGroupCount(aux.TRUE,tp,LOCATION_REMOVED,LOCATION_REMOVED,nil)
return ct*200
return ct*300
end
function s.aclimit(e,re,tp)
return not re:GetHandler():IsSetCard(0x6f52)
end
function s.atkcon(e)
return Duel.IsExistingMatchingCard(s.atkfilter2,e:GetHandlerPlayer(),LOCATION_MZONE,0,1,nil)
return Duel.IsExistingMatchingCard(s.atkfilter,e:GetHandlerPlayer(),LOCATION_MZONE,0,1,nil)
end
function s.atklimit(e,c)
return c:IsFaceup() and c:IsSetCard(0x6f52)
......
......@@ -20,7 +20,7 @@ function s.initial_effect(c)
e3:SetType(EFFECT_TYPE_QUICK_O)
e3:SetCode(EVENT_BECOME_TARGET)
e3:SetRange(LOCATION_GRAVE+LOCATION_MZONE)
e3:SetCountLimit(1,id+1)
e3:SetCountLimit(1,id)
e3:SetCondition(s.indcon1)
e3:SetCost(s.indcost)
e3:SetTarget(s.indtg)
......
......@@ -67,26 +67,24 @@ function s.activate(e,tp,eg,ep,ev,re,r,rp)
Duel.Hint(HINT_SELECTMSG,tp,HINTMSG_SET)
local sg2=Duel.SelectMatchingCard(tp,s.setfilter,tp,LOCATION_HAND,0,1,ct2,nil)
Duel.SSet(tp,sg2)
if Duel.GetTurnPlayer()~=tp then
for tc in aux.Next(sg2) do
if tc:IsType(TYPE_QUICKPLAY) then
local e1=Effect.CreateEffect(c)
e1:SetDescription(aux.Stringid(id,2))
e1:SetType(EFFECT_TYPE_SINGLE)
e1:SetProperty(EFFECT_FLAG_SET_AVAILABLE)
e1:SetCode(EFFECT_QP_ACT_IN_SET_TURN)
e1:SetReset(RESET_EVENT+RESETS_STANDARD)
tc:RegisterEffect(e1)
end
if tc:IsType(TYPE_TRAP) then
local e1=Effect.CreateEffect(c)
e1:SetDescription(aux.Stringid(id,2))
e1:SetType(EFFECT_TYPE_SINGLE)
e1:SetCode(EFFECT_TRAP_ACT_IN_SET_TURN)
e1:SetProperty(EFFECT_FLAG_SET_AVAILABLE)
e1:SetReset(RESET_EVENT+RESETS_STANDARD)
tc:RegisterEffect(e1)
end
for tc in aux.Next(sg2) do
if tc:IsType(TYPE_QUICKPLAY) then
local e1=Effect.CreateEffect(c)
e1:SetDescription(aux.Stringid(id,2))
e1:SetType(EFFECT_TYPE_SINGLE)
e1:SetProperty(EFFECT_FLAG_SET_AVAILABLE)
e1:SetCode(EFFECT_QP_ACT_IN_SET_TURN)
e1:SetReset(RESET_EVENT+RESETS_STANDARD)
tc:RegisterEffect(e1)
end
if tc:IsType(TYPE_TRAP) then
local e1=Effect.CreateEffect(c)
e1:SetDescription(aux.Stringid(id,2))
e1:SetType(EFFECT_TYPE_SINGLE)
e1:SetCode(EFFECT_TRAP_ACT_IN_SET_TURN)
e1:SetProperty(EFFECT_FLAG_SET_AVAILABLE)
e1:SetReset(RESET_EVENT+RESETS_STANDARD)
tc:RegisterEffect(e1)
end
end
end
......
......@@ -5,7 +5,8 @@ function s.initial_effect(c)
local e1=Effect.CreateEffect(c)
e1:SetDescription(1104)
e1:SetCategory(CATEGORY_TOHAND)
e1:SetType(EFFECT_TYPE_IGNITION)
e1:SetType(EFFECT_TYPE_QUICK_O)
e1:SetCode(EVENT_FREE_CHAIN)
e1:SetRange(LOCATION_HAND)
e1:SetProperty(EFFECT_FLAG_CARD_TARGET)
e1:SetCountLimit(1,id)
......@@ -46,16 +47,11 @@ function s.indtg(e,c)
local tc=e:GetHandler()
return c==tc or c==tc:GetBattleTarget()
end
function s.filter1(c)
return c:IsSetCard(0x6f52) and c:IsType(TYPE_MONSTER)
end
function s.excon1(e,tp,eg,ep,ev,re,r,rp)
local g=Duel.GetMatchingGroup(s.filter1,tp,LOCATION_GRAVE,0,nil)
return Duel.GetFieldGroupCount(tp,LOCATION_EXTRA,0)==0 and #g>0
return Duel.GetFieldGroupCount(tp,LOCATION_EXTRA,0)==0 and Duel.IsExistingMatchingCard(function(c) return c:IsSetCard(0x6f52) and c:IsType(TYPE_MONSTER) end,tp,LOCATION_GRAVE,0,1,nil)
end
function s.excon2(e,tp,eg,ep,ev,re,r,rp)
local g=Duel.GetMatchingGroup(s.filter1,tp,LOCATION_GRAVE,0,nil)
return Duel.GetFieldGroupCount(tp,LOCATION_EXTRA,0)==0 and #g<=0
return Duel.GetFieldGroupCount(tp,LOCATION_EXTRA,0)==0 and not Duel.IsExistingMatchingCard(function(c) return c:IsSetCard(0x6f52) and c:IsType(TYPE_MONSTER) end,tp,LOCATION_GRAVE,0,1,nil)
end
function s.cost1(e,tp,eg,ep,ev,re,r,rp,chk)
if chk==0 then return e:GetHandler():IsAbleToGraveAsCost() end
......
......@@ -50,7 +50,9 @@ function s.activate(e,tp,eg,ep,ev,re,r,rp)
local rc=re:GetHandler()
if Duel.NegateEffect(ev) and e:GetLabel()==1 and rc:IsRelateToEffect(re) and rc:IsAbleToDeck() and Duel.SelectYesNo(tp,aux.Stringid(id,1)) then
Duel.BreakEffect()
Duel.SendtoDeck(rc,nil,2,REASON_EFFECT)
Duel.Hint(HINT_SELECTMSG,tp,HINTMSG_SPSUMMON)
local sg=Duel.SelectMatchingCard(tp,s.spfilter,tp,LOCATION_HAND+LOCATION_DECK,0,1,1,nil,e,tp)
Duel.SpecialSummon(sg,0,tp,tp,false,false,POS_FACEUP)
end
local e1=Effect.CreateEffect(e:GetHandler())
e1:SetType(EFFECT_TYPE_FIELD)
......
--菜月昴·帝国篇
local s,id=GetID()
function s.initial_effect(c)
--Add code
aux.AddCodeList(c,17337400)
--Special Summon from hand/field by tributing itself
local e1=Effect.CreateEffect(c)
e1:SetDescription(1108)
e1:SetCategory(CATEGORY_DRAW+CATEGORY_TODECK)
e1:SetType(EFFECT_TYPE_IGNITION)
e1:SetDescription(aux.Stringid(id,0))
e1:SetCategory(CATEGORY_SPECIAL_SUMMON)
e1:SetType(EFFECT_TYPE_QUICK_O)
e1:SetCode(EVENT_FREE_CHAIN)
e1:SetRange(LOCATION_HAND+LOCATION_MZONE)
e1:SetProperty(EFFECT_FLAG_PLAYER_TARGET)
e1:SetCountLimit(1,id)
e1:SetCost(s.drcost)
e1:SetTarget(s.drtg)
e1:SetOperation(s.drop)
e1:SetHintTiming(0,TIMINGS_CHECK_MONSTER+TIMING_END_PHASE)
e1:SetCost(s.spcost1)
e1:SetTarget(s.sptg1)
e1:SetOperation(s.spop1)
c:RegisterEffect(e1)
--Search and Special Summon self
local e2=Effect.CreateEffect(c)
e2:SetDescription(1190)
e2:SetCategory(CATEGORY_SEARCH+CATEGORY_TOHAND)
e2:SetDescription(aux.Stringid(id,1))
e2:SetCategory(CATEGORY_TOHAND+CATEGORY_SEARCH+CATEGORY_SPECIAL_SUMMON)
e2:SetType(EFFECT_TYPE_SINGLE+EFFECT_TYPE_TRIGGER_O)
e2:SetProperty(EFFECT_FLAG_DELAY)
e2:SetCode(EVENT_TO_GRAVE)
......@@ -26,41 +33,59 @@ function s.initial_effect(c)
e3:SetCode(EVENT_REMOVE)
c:RegisterEffect(e3)
end
function s.drcost(e,tp,eg,ep,ev,re,r,rp,chk)
if chk==0 then return e:GetHandler():IsAbleToGraveAsCost() end
Duel.SendtoGrave(e:GetHandler(),REASON_COST)
-- Cost for effect 1: Tribute this card
function s.spcost1(e,tp,eg,ep,ev,re,r,rp,chk)
local c=e:GetHandler()
if chk==0 then return c:IsReleasable() end
Duel.Release(c,REASON_COST)
end
function s.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_TODECK,nil,0,tp,1)
-- Filter for Subaru or cards that list Subaru
function s.spfilter(c,e,tp)
return (c:IsCode(17337400) or aux.IsCodeListed(c,17337400)) and c:IsCanBeSpecialSummoned(e,0,tp,false,false)
end
function s.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.Hint(HINT_SELECTMSG,tp,HINTMSG_TODECK)
local g=Duel.SelectMatchingCard(tp,Card.IsAbleToDeck,tp,LOCATION_HAND,0,1,1,nil)
if #g>0 then
Duel.SendtoDeck(g,nil,SEQ_DECKSHUFFLE,REASON_EFFECT)
end
-- Target for effect 1
function s.sptg1(e,tp,eg,ep,ev,re,r,rp,chk)
if chk==0 then return Duel.GetLocationCount(tp,LOCATION_MZONE)>0
and Duel.IsExistingMatchingCard(s.spfilter,tp,LOCATION_HAND+LOCATION_GRAVE+LOCATION_REMOVED,0,1,nil,e,tp) end
Duel.SetOperationInfo(0,CATEGORY_SPECIAL_SUMMON,nil,1,tp,LOCATION_HAND+LOCATION_GRAVE+LOCATION_REMOVED)
end
-- Operation for effect 1
function s.spop1(e,tp,eg,ep,ev,re,r,rp)
if Duel.GetLocationCount(tp,LOCATION_MZONE)<=0 then return end
Duel.Hint(HINT_SELECTMSG,tp,HINTMSG_SPSUMMON)
local g=Duel.SelectMatchingCard(tp,aux.NecroValleyFilter(s.spfilter),tp,LOCATION_HAND+LOCATION_GRAVE+LOCATION_REMOVED,0,1,1,nil,e,tp)
if #g>0 then
Duel.SpecialSummon(g,0,tp,tp,false,false,POS_FACEUP)
end
end
-- Filter for EMT阵营 monsters
function s.thfilter(c)
return c:IsSetCard(0x3f50) and c:IsAbleToHand() and c:IsType(TYPE_MONSTER)
end
-- Target for effect 2
function s.thtg(e,tp,eg,ep,ev,re,r,rp,chk)
if chk==0 then return Duel.IsExistingMatchingCard(s.thfilter,tp,LOCATION_DECK,0,1,nil) end
Duel.SetOperationInfo(0,CATEGORY_TOHAND,nil,1,tp,LOCATION_DECK)
Duel.SetOperationInfo(0,CATEGORY_SPECIAL_SUMMON,e:GetHandler(),1,0,0)
end
-- Operation for effect 2
function s.thop(e,tp,eg,ep,ev,re,r,rp)
Duel.Hint(HINT_SELECTMSG,tp,HINTMSG_ATOHAND)
local g=Duel.SelectMatchingCard(tp,s.thfilter,tp,LOCATION_DECK,0,1,1,nil)
if #g>0 then
Duel.SendtoHand(g,nil,REASON_EFFECT)
if #g>0 and Duel.SendtoHand(g,nil,REASON_EFFECT)~=0 then
Duel.ConfirmCards(1-tp,g)
-- Special Summon this card
local c=e:GetHandler()
if c:IsRelateToEffect(e) and Duel.GetLocationCount(tp,LOCATION_MZONE)>0 and c:IsCanBeSpecialSummoned(e,0,tp,false,false) then
Duel.BreakEffect()
Duel.SpecialSummon(c,0,tp,tp,false,false,POS_FACEUP)
end
end
end
\ No newline at end of file
......@@ -3,7 +3,6 @@ local s,id=GetID()
function s.initial_effect(c)
c:EnableReviveLimit()
aux.AddSynchroProcedure(c,aux.FilterBoolFunction(Card.IsCode,17337480),aux.NonTuner(Card.IsSetCard,0x3f50),1)
c:SetUniqueOnField(1,0,id)
local e1=Effect.CreateEffect(c)
e1:SetType(EFFECT_TYPE_FIELD)
e1:SetCode(EFFECT_CANNOT_ACTIVATE)
......
......@@ -2,7 +2,7 @@
local s,id=GetID()
function s.initial_effect(c)
c:EnableReviveLimit()
aux.AddXyzProcedure(c,nil,7,3,s.ovfilter,aux.Stringid(id,3),3,s.xyzop)
aux.AddXyzProcedure(c,aux.FilterBoolFunction(Card.IsSetCard,0x3f50),7,2,nil,nil,99)
--
--can not be xyz material
local e0=Effect.CreateEffect(c)
......
--雷姆
local s,id=GetID()
function s.initial_effect(c)
aux.AddCodeList(c,17337570)
aux.AddCodeList(c,17337570,17337400)
local e1=Effect.CreateEffect(c)
e1:SetType(EFFECT_TYPE_FIELD)
e1:SetCode(EFFECT_SPSUMMON_PROC)
......@@ -40,7 +40,7 @@ function s.thcost(e,tp,eg,ep,ev,re,r,rp,chk)
Duel.SendtoGrave(c,REASON_COST+REASON_DISCARD)
end
function s.thfilter(c)
return c:IsSetCard(0x5f50) and c:IsAbleToHand() and c:IsType(TYPE_MONSTER)
return (c:IsSetCard(0x5f50) or aux.IsCodeListed(c,17337400)) and c:IsAbleToHand() and c:IsType(TYPE_MONSTER)
end
function s.thtg(e,tp,eg,ep,ev,re,r,rp,chk)
if chk==0 then return Duel.IsExistingMatchingCard(s.thfilter,tp,LOCATION_DECK,0,1,nil) end
......
......@@ -24,7 +24,6 @@ function s.initial_effect(c)
e2:SetType(EFFECT_TYPE_QUICK_O)
e2:SetCode(EVENT_CHAINING)
e2:SetRange(LOCATION_MZONE)
e2:SetCountLimit(2)
e2:SetCondition(s.negcon)
e2:SetCost(s.negcost)
e2:SetTarget(s.negtg)
......
......@@ -9,8 +9,7 @@ function s.initial_effect(c)
e1:SetRange(LOCATION_HAND)
e1:SetHintTiming(0,TIMINGS_CHECK_MONSTER+TIMING_END_PHASE)
e1:SetProperty(EFFECT_FLAG_CARD_TARGET)
e1:SetCountLimit(1,id)
e1:SetCondition(function(e,tp) return Duel.GetTurnPlayer()~=tp end)
e1:SetCountLimit(1,id)
e1:SetCost(s.ctrcost)
e1:SetTarget(s.ctrtg)
e1:SetOperation(s.ctrop)
......
......@@ -100,7 +100,7 @@ function s.desop(e,tp,eg,ep,ev,re,r,rp)
end
end
function s.rhtg(e,tp,eg,ep,ev,re,r,rp,chk)
if chk==0 then return e:GetHandler():IsAbleToHand() and Duel.GetFieldGroupCount(tp,LOCATION_HAND,0)>0 and Duel.GetFieldGroupCount(1-tp,LOCATION_HAND,0)>0 end
if chk==0 then return e:GetHandler():IsAbleToHand() end
Duel.SetOperationInfo(0,CATEGORY_TOHAND,e:GetHandler(),1,0,0)
Duel.SetChainLimit(s.chainlm)
end
......@@ -108,18 +108,12 @@ function s.rhop(e,tp,eg,ep,ev,re,r,rp)
local c=e:GetHandler()
if not c:IsRelateToEffect(e) or Duel.SendtoHand(c,nil,REASON_EFFECT)==0 then return end
Duel.BreakEffect()
local g1=Duel.GetFieldGroup(tp,LOCATION_HAND,0)
local g2=Duel.GetFieldGroup(1-tp,LOCATION_HAND,0)
if #g1==0 or #g2==0 then return end
Duel.BreakEffect()
local sg=Group.CreateGroup()
Duel.Hint(HINT_SELECTMSG,tp,HINTMSG_DISCARD)
local sg1=g1:Select(tp,1,1,nil)
sg:Merge(sg1)
Duel.Hint(HINT_SELECTMSG,1-tp,HINTMSG_DISCARD)
local sg2=g2:Select(1-tp,1,1,nil)
sg:Merge(sg2)
if #sg>0 then
Duel.SendtoGrave(sg,REASON_EFFECT+REASON_DISCARD)
local g=Duel.GetFieldGroup(1-tp,LOCATION_HAND,0)
if #g>0 then
Duel.Hint(HINT_SELECTMSG,1-tp,HINTMSG_DISCARD)
local sg=g:Select(1-tp,2,2,nil)
if #sg>0 then
Duel.SendtoGrave(sg,REASON_EFFECT+REASON_DISCARD)
end
end
end
\ No newline at end of file
......@@ -35,7 +35,7 @@ function s.tgop(e,tp,eg,ep,ev,re,r,rp)
local g=Duel.GetMatchingGroup(aux.TRUE,tp,LOCATION_ONFIELD,LOCATION_ONFIELD,e:GetHandler())
if #g==0 then return end
Duel.Hint(HINT_SELECTMSG,tp,HINTMSG_TOGRAVE)
local sg=g:Select(tp,1,2,nil)
local sg=g:Select(tp,1,5,nil)
if #sg>0 then
Duel.HintSelection(sg)
Duel.SendtoGrave(sg,REASON_EFFECT)
......
......@@ -40,10 +40,10 @@ function s.drawcost(e,tp,eg,ep,ev,re,r,rp,chk)
Duel.Release(sg,REASON_COST)
end
function s.drawtg(e,tp,eg,ep,ev,re,r,rp,chk)
if chk==0 then return Duel.IsPlayerCanDraw(tp,1) end
if chk==0 then return Duel.IsPlayerCanDraw(tp,2) end
Duel.SetTargetPlayer(tp)
Duel.SetTargetParam(1)
Duel.SetOperationInfo(0,CATEGORY_DRAW,nil,0,tp,1)
Duel.SetTargetParam(2)
Duel.SetOperationInfo(0,CATEGORY_DRAW,nil,0,tp,2)
end
function s.drawop(e,tp,eg,ep,ev,re,r,rp)
local p,d=Duel.GetChainInfo(0,CHAININFO_TARGET_PLAYER,CHAININFO_TARGET_PARAM)
......
......@@ -57,7 +57,7 @@ function s.thop(e,tp,eg,ep,ev,re,r,rp)
end
end
function s.remmon(c)
return c:IsSetCard(0x3f51) and c:IsFaceup() and c:IsFaceup()
return c:IsCode(17337530) and c:IsFaceup() and c:IsFaceup()
end
function s.spcon(e,tp,eg,ep,ev,re,r,rp)
return Duel.IsExistingMatchingCard(s.remmon,tp,LOCATION_MZONE+LOCATION_GRAVE,0,1,nil)
......
......@@ -67,14 +67,14 @@ function s.spfilter(c,e,tp)
end
function s.sptg2(e,tp,eg,ep,ev,re,r,rp,chk)
if chk==0 then return Duel.GetLocationCount(tp,LOCATION_MZONE)>0
and Duel.IsExistingMatchingCard(s.spfilter,tp,LOCATION_HAND+LOCATION_DECK+LOCATION_GRAVE,0,1,nil,e,tp)
and Duel.IsExistingMatchingCard(s.spfilter,tp,LOCATION_HAND+LOCATION_DECK,0,1,nil,e,tp)
end
Duel.SetOperationInfo(0,CATEGORY_SPECIAL_SUMMON,nil,1,tp,LOCATION_HAND+LOCATION_DECK+LOCATION_GRAVE)
Duel.SetOperationInfo(0,CATEGORY_SPECIAL_SUMMON,nil,1,tp,LOCATION_HAND+LOCATION_DECK)
end
function s.spop2(e,tp,eg,ep,ev,re,r,rp)
if Duel.GetLocationCount(tp,LOCATION_MZONE)<=0 then return end
Duel.Hint(HINT_SELECTMSG,tp,HINTMSG_SPSUMMON)
local g=Duel.SelectMatchingCard(tp,aux.NecroValleyFilter(s.spfilter),tp,LOCATION_HAND+LOCATION_DECK+LOCATION_GRAVE,0,1,1,nil,e,tp)
local g=Duel.SelectMatchingCard(tp,aux.NecroValleyFilter(s.spfilter),tp,LOCATION_HAND+LOCATION_DECK,0,1,1,nil,e,tp)
local tc=g:GetFirst()
if tc then
Duel.SpecialSummon(tc,0,tp,tp,true,false,POS_FACEUP)
......
......@@ -87,7 +87,7 @@ end
function s.sptg(e,tp,eg,ep,ev,re,r,rp,chk)
if chk==0 then return Duel.GetLocationCount(tp,LOCATION_MZONE)>0
and Duel.IsExistingMatchingCard(s.spfilter,tp,LOCATION_HAND+LOCATION_DECK+LOCATION_GRAVE,0,1,nil,e,tp) end
Duel.SetOperationInfo(0,CATEGORY_SPECIAL_SUMMON,nil,1,tp,LOCATION_HAND+LOCATION_DECK+LOCATION_GRAVE)
Duel.SetOperationInfo(0,CATEGORY_SPECIAL_SUMMON,nil,1,tp,LOCATION_HAND+LOCATION_DECK)
end
function s.spop(e,tp,eg,ep,ev,re,r,rp)
if Duel.GetLocationCount(tp,LOCATION_MZONE)<=0 then return end
......
......@@ -76,26 +76,29 @@ function s.attrcost(e,tp,eg,ep,ev,re,r,rp,chk)
if chk==0 then return Duel.IsExistingMatchingCard(s.attrcostfilter,tp,LOCATION_HAND,0,2,nil) end
Duel.Hint(HINT_SELECTMSG,tp,HINTMSG_DISCARD)
local g=Duel.SelectMatchingCard(tp,s.attrcostfilter,tp,LOCATION_HAND,0,2,2,nil)
e:SetLabelObject(g)
g:KeepAlive()
if g:IsExists(Card.IsAttribute,1,nil,ATTRIBUTE_WIND) and g:IsExists(Card.IsAttribute,1,nil,ATTRIBUTE_WATER) then
e:SetLabel(1)
elseif g:IsExists(Card.IsAttribute,1,nil,ATTRIBUTE_EARTH) and g:IsExists(Card.IsAttribute,1,nil,ATTRIBUTE_WATER) then
e:SetLabel(2)
elseif g:IsExists(Card.IsAttribute,1,nil,ATTRIBUTE_FIRE) and g:IsExists(Card.IsAttribute,1,nil,ATTRIBUTE_WIND) then
e:SetLabel(3)
elseif g:IsExists(Card.IsAttribute,1,nil,ATTRIBUTE_EARTH) and g:IsExists(Card.IsAttribute,1,nil,ATTRIBUTE_LIGHT) then
e:SetLabel(4)
elseif g:IsExists(Card.IsAttribute,1,nil,ATTRIBUTE_FIRE) and g:IsExists(Card.IsAttribute,1,nil,ATTRIBUTE_LIGHT) then
e:SetLabel(5)
end
Duel.SendtoGrave(g,REASON_COST+REASON_DISCARD)
end
function s.filter(c)
return c:IsFaceup() and c:IsSetCard(0x3f50)
end
function s.attrop(e,tp,eg,ep,ev,re,r,rp)
local g=e:GetLabelObject()
local b1=g:IsExists(Card.IsAttribute,1,nil,ATTRIBUTE_WIND) and g:IsExists(Card.IsAttribute,1,nil,ATTRIBUTE_WATER)
and Duel.IsExistingMatchingCard(Card.IsAbleToHand,tp,0,LOCATION_ONFIELD,1,nil)
local b2=g:IsExists(Card.IsAttribute,1,nil,ATTRIBUTE_EARTH) and g:IsExists(Card.IsAttribute,1,nil,ATTRIBUTE_WATER)
and Duel.IsExistingMatchingCard(Card.IsAbleToGrave,tp,0,LOCATION_ONFIELD,1,nil)
local b3=g:IsExists(Card.IsAttribute,1,nil,ATTRIBUTE_FIRE) and g:IsExists(Card.IsAttribute,1,nil,ATTRIBUTE_WIND)
and Duel.IsExistingMatchingCard(Card.IsAbleToRemove,tp,0,LOCATION_ONFIELD,1,nil)
local b4=g:IsExists(Card.IsAttribute,1,nil,ATTRIBUTE_EARTH) and g:IsExists(Card.IsAttribute,1,nil,ATTRIBUTE_LIGHT)
and Duel.IsExistingMatchingCard(s.filter,tp,LOCATION_MZONE,0,1,nil)
local b5=g:IsExists(Card.IsAttribute,1,nil,ATTRIBUTE_FIRE) and g:IsExists(Card.IsAttribute,1,nil,ATTRIBUTE_LIGHT)
and Duel.IsExistingMatchingCard(s.filter,tp,LOCATION_MZONE,0,1,nil)
if g:IsExists(Card.IsAttribute,1,nil,ATTRIBUTE_DARK) and not (b1 or b2 or b3 or b4 or b5) then return false end
local et=e:GetLabel()
local b1= et==1 and Duel.IsExistingMatchingCard(Card.IsAbleToHand,tp,0,LOCATION_ONFIELD,1,nil)
local b2= et==2 and Duel.IsExistingMatchingCard(Card.IsAbleToGrave,tp,0,LOCATION_ONFIELD,1,nil)
local b3= et==3 and Duel.IsExistingMatchingCard(Card.IsAbleToRemove,tp,0,LOCATION_ONFIELD,1,nil)
local b4= et==4 and Duel.IsExistingMatchingCard(s.filter,tp,LOCATION_MZONE,0,1,nil)
local b5= et==5 and Duel.IsExistingMatchingCard(s.filter,tp,LOCATION_MZONE,0,1,nil)
if b1 then
local g1=Duel.GetMatchingGroup(Card.IsAbleToHand,tp,0,LOCATION_ONFIELD,nil)
Duel.SendtoHand(g1,nil,REASON_EFFECT)
......@@ -137,7 +140,6 @@ function s.attrop(e,tp,eg,ep,ev,re,r,rp)
tc:RegisterFlagEffect(id,RESET_EVENT+RESETS_STANDARD+RESET_PHASE+PHASE_END,EFFECT_FLAG_CLIENT_HINT,1,0,aux.Stringid(id,0))
end
end
g:DeleteGroup()
end
function s.efilter(e,re)
return e:GetOwnerPlayer()~=re:GetOwnerPlayer()
......
......@@ -99,6 +99,6 @@ function s.op(e,tp,eg,ep,ev,re,r,rp)
local g=Duel.SelectMatchingCard(tp,s.ctfilter,tp,LOCATION_MZONE,0,1,1,nil)
local tc=g:GetFirst()
if tc then
tc:AddCounter(0x9f50,1)
tc:AddCounter(0x9f50,3)
end
end
\ No newline at end of file
--终烬圣殿
local s,id=GetID()
function s.initial_effect(c)
--Activate
local e0=Effect.CreateEffect(c)
e0:SetType(EFFECT_TYPE_ACTIVATE)
e0:SetCode(EVENT_FREE_CHAIN)
e0:SetOperation(s.actop)
c:RegisterEffect(e0)
--search
local e1=Effect.CreateEffect(c)
e1:SetDescription(aux.Stringid(id,0))
e1:SetCategory(CATEGORY_TOHAND+CATEGORY_SEARCH)
e1:SetType(EFFECT_TYPE_IGNITION)
e1:SetRange(LOCATION_FZONE)
e1:SetCountLimit(1)
e1:SetTarget(s.thtg)
e1:SetOperation(s.thop)
c:RegisterEffect(e1)
--summon
local e2=Effect.CreateEffect(c)
e2:SetDescription(aux.Stringid(id,1))
e2:SetCategory(CATEGORY_SUMMON)
e2:SetType(EFFECT_TYPE_IGNITION)
e2:SetRange(LOCATION_FZONE)
e2:SetCountLimit(1)
e2:SetTarget(s.sumtg)
e2:SetOperation(s.sumop)
c:RegisterEffect(e2)
--place counter
local e3=Effect.CreateEffect(c)
e3:SetDescription(aux.Stringid(id,2))
e3:SetCategory(CATEGORY_COUNTER)
e3:SetType(EFFECT_TYPE_SINGLE+EFFECT_TYPE_TRIGGER_O)
e3:SetCode(EVENT_DESTROYED)
e3:SetProperty(EFFECT_FLAG_DELAY)
--e3:SetCondition(s.ctcon)
e3:SetTarget(s.cttg)
e3:SetOperation(s.ctop)
c:RegisterEffect(e3)
Duel.AddCustomActivityCounter(id,ACTIVITY_SUMMON,s.counterfilter)
Duel.AddCustomActivityCounter(id,ACTIVITY_SPSUMMON,s.counterfilter)
end
function s.actop(e,tp,eg,ep,ev,re,r,rp)
local c=e:GetHandler()
if Duel.GetLP(tp)~=1 then
Duel.SetLP(tp,1)
end
local e1=Effect.CreateEffect(c)
e1:SetType(EFFECT_TYPE_FIELD)
e1:SetProperty(EFFECT_FLAG_PLAYER_TARGET+EFFECT_FLAG_OATH)
e1:SetCode(EFFECT_CANNOT_SPECIAL_SUMMON)
e1:SetReset(RESET_PHASE+PHASE_END)
e1:SetTargetRange(1,0)
e1:SetTarget(s.splimit)
Duel.RegisterEffect(e1,tp)
local e2=e1:Clone()
e2:SetCode(EFFECT_CANNOT_SUMMON)
Duel.RegisterEffect(e2,tp)
end
function s.counterfilter(c)
return c:IsSetCard(0x5f51)
end
function s.splimit(e,c)
return not c:IsSetCard(0x5f51)
end
function s.thfilter(c,tp)
return c:IsSetCard(0x5f51) and c:IsAbleToHand()
and not Duel.IsExistingMatchingCard(function(sc) return sc:IsFaceup() and sc:IsCode(c:GetCode()) end,tp,LOCATION_ONFIELD,0,1,nil)
end
function s.thtg(e,tp,eg,ep,ev,re,r,rp,chk)
if chk==0 then return Duel.IsExistingMatchingCard(s.thfilter,tp,LOCATION_DECK,0,1,nil,tp) end
Duel.SetOperationInfo(0,CATEGORY_TOHAND,nil,1,tp,LOCATION_DECK)
end
function s.thop(e,tp,eg,ep,ev,re,r,rp)
Duel.Hint(HINT_SELECTMSG,tp,HINTMSG_ATOHAND)
local g=Duel.SelectMatchingCard(tp,s.thfilter,tp,LOCATION_DECK,0,1,1,nil,tp)
if #g>0 then
Duel.SendtoHand(g,nil,REASON_EFFECT)
Duel.ConfirmCards(1-tp,g)
end
end
function s.sumfilter(c)
return c:IsSetCard(0x5f51) and c:IsSummonable(true,nil)
end
function s.sumtg(e,tp,eg,ep,ev,re,r,rp,chk)
if chk==0 then return Duel.IsExistingMatchingCard(s.sumfilter,tp,LOCATION_HAND,0,1,nil) end
Duel.SetOperationInfo(0,CATEGORY_SUMMON,nil,1,0,0)
end
function s.sumop(e,tp,eg,ep,ev,re,r,rp)
Duel.Hint(HINT_SELECTMSG,tp,HINTMSG_SUMMON)
local g=Duel.SelectMatchingCard(tp,s.sumfilter,tp,LOCATION_HAND,0,1,1,nil)
local tc=g:GetFirst()
if tc then
Duel.Summon(tp,tc,true,nil)
end
end
function s.ctfilter(c)
return c:IsFaceup() and c:IsSetCard(0x5f51)
end
function s.cttg(e,tp,eg,ep,ev,re,r,rp,chk)
if chk==0 then return Duel.IsExistingMatchingCard(s.ctfilter,tp,LOCATION_MZONE,0,1,nil) end
end
function s.ctop(e,tp,eg,ep,ev,re,r,rp)
local g=Duel.GetMatchingGroup(s.ctfilter,tp,LOCATION_MZONE,0,nil)
if #g>0 then
Duel.Hint(HINT_SELECTMSG,tp,HINTMSG_FACEUP)
local tc=Duel.SelectMatchingCard(tp,s.ctfilter,tp,LOCATION_MZONE,0,1,1,nil):GetFirst()
if tc then
tc:AddCounter(0x1f51,1)
end
end
end
--终烬圣域
local s,id=GetID()
function s.initial_effect(c)
--Activate
local e0=Effect.CreateEffect(c)
e0:SetType(EFFECT_TYPE_ACTIVATE)
e0:SetCode(EVENT_FREE_CHAIN)
e0:SetOperation(s.actop)
c:RegisterEffect(e0)
--no damage
local e1=Effect.CreateEffect(c)
e1:SetType(EFFECT_TYPE_FIELD)
e1:SetCode(EFFECT_CHANGE_DAMAGE)
e1:SetProperty(EFFECT_FLAG_PLAYER_TARGET)
e1:SetRange(LOCATION_SZONE)
e1:SetTargetRange(1,0)
e1:SetValue(s.damval)
c:RegisterEffect(e1)
local e2=e1:Clone()
e2:SetCode(EFFECT_NO_EFFECT_DAMAGE)
c:RegisterEffect(e2)
--search
local e3=Effect.CreateEffect(c)
e3:SetDescription(aux.Stringid(id,0))
e3:SetCategory(CATEGORY_TOHAND+CATEGORY_SEARCH)
e3:SetType(EFFECT_TYPE_IGNITION)
e3:SetRange(LOCATION_SZONE)
e3:SetCountLimit(1)
e3:SetTarget(s.thtg)
e3:SetOperation(s.thop)
c:RegisterEffect(e3)
--place counter
local e4=Effect.CreateEffect(c)
e4:SetDescription(aux.Stringid(id,1))
e4:SetCategory(CATEGORY_COUNTER)
e4:SetType(EFFECT_TYPE_SINGLE+EFFECT_TYPE_TRIGGER_O)
e4:SetCode(EVENT_DESTROYED)
e4:SetProperty(EFFECT_FLAG_DELAY)
e4:SetCondition(s.ctcon)
e4:SetTarget(s.cttg)
e4:SetOperation(s.ctop)
c:RegisterEffect(e4)
Duel.AddCustomActivityCounter(id,ACTIVITY_SUMMON,s.counterfilter)
Duel.AddCustomActivityCounter(id,ACTIVITY_SPSUMMON,s.counterfilter)
end
function s.actop(e,tp,eg,ep,ev,re,r,rp)
local c=e:GetHandler()
if Duel.GetLP(tp)~=1 then
Duel.SetLP(tp,1)
end
local e1=Effect.CreateEffect(c)
e1:SetType(EFFECT_TYPE_FIELD)
e1:SetProperty(EFFECT_FLAG_PLAYER_TARGET+EFFECT_FLAG_OATH)
e1:SetCode(EFFECT_CANNOT_SPECIAL_SUMMON)
e1:SetReset(RESET_PHASE+PHASE_END)
e1:SetTargetRange(1,0)
e1:SetTarget(s.splimit)
Duel.RegisterEffect(e1,tp)
local e2=e1:Clone()
e2:SetCode(EFFECT_CANNOT_SUMMON)
Duel.RegisterEffect(e2,tp)
end
function s.counterfilter(c)
return c:IsSetCard(0x5f51)
end
function s.splimit(e,c)
return not c:IsSetCard(0x5f51)
end
function s.damfilter(c)
return c:IsSetCard(0x5f51) and not c:IsCode(id)
end
function s.damval(e,re,val,r,rp,rc)
if Duel.IsExistingMatchingCard(s.damfilter,e:GetHandlerPlayer(),LOCATION_ONFIELD,0,1,nil) then
return 0
else
return val
end
end
function s.thfilter(c)
return c:IsCode(17338780) and c:IsAbleToHand()
end
function s.thtg(e,tp,eg,ep,ev,re,r,rp,chk)
if chk==0 then return Duel.IsExistingMatchingCard(s.thfilter,tp,LOCATION_DECK+LOCATION_GRAVE,0,1,nil) end
Duel.SetOperationInfo(0,CATEGORY_TOHAND,nil,1,tp,LOCATION_DECK+LOCATION_GRAVE)
end
function s.thop(e,tp,eg,ep,ev,re,r,rp)
Duel.Hint(HINT_SELECTMSG,tp,HINTMSG_ATOHAND)
local g=Duel.SelectMatchingCard(tp,aux.NecroValleyFilter(s.thfilter),tp,LOCATION_DECK+LOCATION_GRAVE,0,1,1,nil)
if #g>0 then
Duel.SendtoHand(g,nil,REASON_EFFECT)
Duel.ConfirmCards(1-tp,g)
end
end
function s.ctcon(e,tp,eg,ep,ev,re,r,rp)
local c=e:GetHandler()
return c:IsReason(REASON_EFFECT) and c:IsPreviousLocation(LOCATION_SZONE)
end
function s.ctfilter(c)
return c:IsFaceup() and c:IsSetCard(0x5f51) and c:IsCanAddCounter(0x1f51,1)
end
function s.cttg(e,tp,eg,ep,ev,re,r,rp,chk)
if chk==0 then return Duel.IsExistingMatchingCard(s.ctfilter,tp,LOCATION_MZONE,0,1,nil) end
end
function s.ctop(e,tp,eg,ep,ev,re,r,rp)
local g=Duel.GetMatchingGroup(s.ctfilter,tp,LOCATION_MZONE,0,nil)
if #g>0 then
Duel.Hint(HINT_SELECTMSG,tp,HINTMSG_FACEUP)
local tc=Duel.SelectMatchingCard(tp,s.ctfilter,tp,LOCATION_MZONE,0,1,1,nil):GetFirst()
if tc then
tc:AddCounter(0x1f51,1)
end
end
end
\ No newline at end of file
--终烬圣典
local s,id=GetID()
function s.initial_effect(c)
--Activate
local e0=Effect.CreateEffect(c)
e0:SetCategory(CATEGORY_TOHAND+CATEGORY_SEARCH)
e0:SetType(EFFECT_TYPE_ACTIVATE)
e0:SetCode(EVENT_FREE_CHAIN)
e0:SetOperation(s.actop)
e0:SetTarget(s.target)
c:RegisterEffect(e0)
--to hand
local e2=Effect.CreateEffect(c)
e2:SetDescription(aux.Stringid(id,1))
e2:SetCategory(CATEGORY_TOHAND)
e2:SetType(EFFECT_TYPE_FIELD+EFFECT_TYPE_TRIGGER_O)
e2:SetCode(EVENT_PREDRAW)
e2:SetRange(LOCATION_GRAVE)
e2:SetCondition(s.thcon2)
e2:SetCost(s.thcost2)
e2:SetTarget(s.thtg2)
e2:SetOperation(s.thop2)
c:RegisterEffect(e2)
--place counter
local e3=Effect.CreateEffect(c)
e3:SetDescription(aux.Stringid(id,2))
e3:SetCategory(CATEGORY_COUNTER)
e3:SetType(EFFECT_TYPE_SINGLE+EFFECT_TYPE_TRIGGER_O)
e3:SetCode(EVENT_DESTROYED)
e3:SetProperty(EFFECT_FLAG_DELAY)
e3:SetCondition(s.ctcon)
e3:SetTarget(s.cttg)
e3:SetOperation(s.ctop)
c:RegisterEffect(e3)
Duel.AddCustomActivityCounter(id,ACTIVITY_SUMMON,s.counterfilter)
Duel.AddCustomActivityCounter(id,ACTIVITY_SPSUMMON,s.counterfilter)
end
function s.actop(e,tp,eg,ep,ev,re,r,rp)
local c=e:GetHandler()
-- 这张卡发动的场合,自己的基本分不是1的场合,自己的基本分变成1
if Duel.GetLP(tp)~=1 then
Duel.SetLP(tp,1)
end
-- 检索效果
local check=Duel.IsExistingMatchingCard(Card.IsSetCard,tp,LOCATION_MZONE,0,1,nil,0x5f51)
local b1=Duel.IsExistingMatchingCard(aux.NecroValleyFilter(s.thfilter1),tp,LOCATION_DECK+LOCATION_GRAVE,0,1,nil)
local b2=check and Duel.IsExistingMatchingCard(aux.NecroValleyFilter(s.thfilter2),tp,LOCATION_DECK+LOCATION_GRAVE,0,1,nil)
if not (b1 or b2) then return end
local op=0
if b1 and b2 then
op=Duel.SelectOption(tp,aux.Stringid(id,0),aux.Stringid(id,3))
elseif b1 then
op=0
else
op=1
end
if op==0 then
Duel.Hint(HINT_SELECTMSG,tp,HINTMSG_ATOHAND)
local g=Duel.SelectMatchingCard(tp,aux.NecroValleyFilter(s.thfilter1),tp,LOCATION_DECK+LOCATION_GRAVE,0,1,1,nil)
if #g>0 then
Duel.SendtoHand(g,nil,REASON_EFFECT)
Duel.ConfirmCards(1-tp,g)
end
else
Duel.Hint(HINT_SELECTMSG,tp,HINTMSG_ATOHAND)
local g=Duel.SelectMatchingCard(tp,aux.NecroValleyFilter(s.thfilter2),tp,LOCATION_DECK+LOCATION_GRAVE,0,1,1,nil)
if #g>0 then
Duel.SendtoHand(g,nil,REASON_EFFECT)
Duel.ConfirmCards(1-tp,g)
end
end
-- 这张卡的效果发动后,直到回合结束时自己不是「终烬」怪兽不能召唤·特殊召唤
local e1=Effect.CreateEffect(c)
e1:SetType(EFFECT_TYPE_FIELD)
e1:SetProperty(EFFECT_FLAG_PLAYER_TARGET+EFFECT_FLAG_OATH)
e1:SetCode(EFFECT_CANNOT_SPECIAL_SUMMON)
e1:SetReset(RESET_PHASE+PHASE_END)
e1:SetTargetRange(1,0)
e1:SetTarget(s.splimit)
Duel.RegisterEffect(e1,tp)
local e2=e1:Clone()
e2:SetCode(EFFECT_CANNOT_SUMMON)
Duel.RegisterEffect(e2,tp)
end
function s.counterfilter(c)
return c:IsSetCard(0x5f51)
end
function s.splimit(e,c)
return not c:IsSetCard(0x5f51)
end
function s.thfilter1(c)
return c:IsSetCard(0x5f51) and c:IsType(TYPE_MONSTER) and c:IsAbleToHand()
end
function s.thfilter2(c)
return c:IsSetCard(0x5f51) and (c:IsType(TYPE_SPELL) or c:IsType(TYPE_TRAP)) and c:IsAbleToHand()
end
function s.target(e,tp,eg,ep,ev,re,r,rp,chk)
if chk==0 then
local check=Duel.IsExistingMatchingCard(Card.IsSetCard,tp,LOCATION_MZONE,0,1,nil,0x5f51)
return Duel.IsExistingMatchingCard(s.thfilter1,tp,LOCATION_DECK+LOCATION_GRAVE,0,1,nil)
or (check and Duel.IsExistingMatchingCard(s.thfilter2,tp,LOCATION_DECK+LOCATION_GRAVE,0,1,nil))
end
Duel.SetOperationInfo(0,CATEGORY_TOHAND,nil,1,tp,LOCATION_DECK+LOCATION_GRAVE)
end
function s.thcon2(e,tp,eg,ep,ev,re,r,rp)
return tp==Duel.GetTurnPlayer() and Duel.GetFieldGroupCount(tp,LOCATION_DECK,0)>0
end
function s.thcost2(e,tp,eg,ep,ev,re,r,rp,chk)
if chk==0 then return aux.IsPlayerCanNormalDraw(tp) end
aux.GiveUpNormalDraw(e,tp)
end
function s.thtg2(e,tp,eg,ep,ev,re,r,rp,chk)
if chk==0 then return e:GetHandler():IsAbleToHand() end
Duel.SetOperationInfo(0,CATEGORY_TOHAND,e:GetHandler(),1,0,0)
end
function s.thop2(e,tp,eg,ep,ev,re,r,rp)
local c=e:GetHandler()
if c:IsRelateToEffect(e) then
Duel.SendtoHand(c,nil,REASON_EFFECT)
Duel.ConfirmCards(1-tp,c)
end
end
function s.ctcon(e,tp,eg,ep,ev,re,r,rp)
local c=e:GetHandler()
return c:IsReason(REASON_EFFECT) and c:IsPreviousLocation(LOCATION_SZONE)
end
function s.ctfilter(c)
return c:IsFaceup() and c:IsSetCard(0x5f51) and c:IsCanAddCounter(0x1f51,1)
end
function s.cttg(e,tp,eg,ep,ev,re,r,rp,chk)
if chk==0 then return Duel.IsExistingMatchingCard(s.ctfilter,tp,LOCATION_MZONE,0,1,nil) end
end
function s.ctop(e,tp,eg,ep,ev,re,r,rp)
local g=Duel.GetMatchingGroup(s.ctfilter,tp,LOCATION_MZONE,0,nil)
if #g>0 then
Duel.Hint(HINT_SELECTMSG,tp,HINTMSG_FACEUP)
local tc=Duel.SelectMatchingCard(tp,s.ctfilter,tp,LOCATION_MZONE,0,1,1,nil):GetFirst()
if tc then
tc:AddCounter(0x1f51,1)
end
end
end
\ No newline at end of file
--终烬使命
local s,id=GetID()
function s.initial_effect(c)
--Activate
local e1=Effect.CreateEffect(c)
e1:SetCategory(CATEGORY_TOHAND)
e1:SetType(EFFECT_TYPE_ACTIVATE)
e1:SetCode(EVENT_FREE_CHAIN)
e1:SetHintTiming(0,TIMINGS_CHECK_MONSTER+TIMING_END_PHASE)
e1:SetTarget(s.target)
e1:SetOperation(s.activate)
c:RegisterEffect(e1)
--Set
local e2=Effect.CreateEffect(c)
e2:SetDescription(aux.Stringid(id,1))
e2:SetCategory(CATEGORY_LEAVE_GRAVE)
e2:SetType(EFFECT_TYPE_FIELD+EFFECT_TYPE_TRIGGER_O)
e2:SetCode(EVENT_DESTROYED)
e2:SetProperty(EFFECT_FLAG_DAMAGE_STEP+EFFECT_FLAG_DELAY)
e2:SetRange(LOCATION_GRAVE)
e2:SetCondition(s.setcon)
e2:SetTarget(s.settg)
e2:SetOperation(s.setop)
c:RegisterEffect(e2)
--place counter
local e3=Effect.CreateEffect(c)
e3:SetDescription(aux.Stringid(id,2))
e3:SetCategory(CATEGORY_COUNTER)
e3:SetType(EFFECT_TYPE_SINGLE+EFFECT_TYPE_TRIGGER_O)
e3:SetCode(EVENT_DESTROYED)
e3:SetProperty(EFFECT_FLAG_DELAY)
e3:SetCondition(s.ctcon)
e3:SetTarget(s.cttg)
e3:SetOperation(s.ctop)
c:RegisterEffect(e3)
Duel.AddCustomActivityCounter(id,ACTIVITY_SUMMON,s.counterfilter)
Duel.AddCustomActivityCounter(id,ACTIVITY_SPSUMMON,s.counterfilter)
end
function s.counterfilter(c)
return c:IsSetCard(0x5f51)
end
function s.splimit(e,c)
return not c:IsSetCard(0x5f51)
end
function s.lpop(e,tp,eg,ep,ev,re,r,rp)
local c=e:GetHandler()
if Duel.GetLP(tp)~=1 then
Duel.SetLP(tp,1)
end
local e1=Effect.CreateEffect(c)
e1:SetType(EFFECT_TYPE_FIELD)
e1:SetProperty(EFFECT_FLAG_PLAYER_TARGET+EFFECT_FLAG_OATH)
e1:SetCode(EFFECT_CANNOT_SPECIAL_SUMMON)
e1:SetReset(RESET_PHASE+PHASE_END)
e1:SetTargetRange(1,0)
e1:SetTarget(s.splimit)
Duel.RegisterEffect(e1,tp)
local e2=e1:Clone()
e2:SetCode(EFFECT_CANNOT_SUMMON)
Duel.RegisterEffect(e2,tp)
end
function s.thfilter(c)
return c:IsSetCard(0x5f51) and c:IsAbleToHand()
end
function s.target(e,tp,eg,ep,ev,re,r,rp,chk)
if chk==0 then return Duel.IsExistingMatchingCard(s.thfilter,tp,LOCATION_GRAVE,0,1,nil) end
Duel.SetOperationInfo(0,CATEGORY_TOHAND,nil,1,tp,LOCATION_GRAVE)
end
function s.activate(e,tp,eg,ep,ev,re,r,rp)
Duel.Hint(HINT_SELECTMSG,tp,HINTMSG_ATOHAND)
local g=Duel.SelectMatchingCard(tp,aux.NecroValleyFilter(s.thfilter),tp,LOCATION_GRAVE,0,1,1,nil)
if #g>0 then
Duel.SendtoHand(g,nil,REASON_EFFECT)
Duel.ConfirmCards(1-tp,g)
end
s.lpop(e,tp,eg,ep,ev,re,r,rp)
end
function s.cfilter(c,tp)
return c:IsReason(REASON_BATTLE+REASON_EFFECT) and c:IsPreviousControler(tp) and c:IsPreviousLocation(LOCATION_ONFIELD)
end
function s.setcon(e,tp,eg,ep,ev,re,r,rp)
return eg:IsExists(Card.IsPreviousLocation,1,nil,LOCATION_ONFIELD)
and eg:IsExists(Card.IsPreviousControler,1,nil,tp)
and e:GetHandler():IsLocation(LOCATION_GRAVE)
end
function s.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 s.setop(e,tp,eg,ep,ev,re,r,rp)
local c=e:GetHandler()
if c:IsRelateToEffect(e) and c:IsSSetable() then
Duel.SSet(tp,c)
end
end
function s.ctcon(e,tp,eg,ep,ev,re,r,rp)
local c=e:GetHandler()
return c:IsReason(REASON_EFFECT) and c:IsPreviousLocation(LOCATION_SZONE)
end
function s.ctfilter(c)
return c:IsFaceup() and c:IsSetCard(0x5f51) and c:IsCanAddCounter(0x1f51,1)
end
function s.cttg(e,tp,eg,ep,ev,re,r,rp,chk)
if chk==0 then return Duel.IsExistingMatchingCard(s.ctfilter,tp,LOCATION_MZONE,0,1,nil) end
end
function s.ctop(e,tp,eg,ep,ev,re,r,rp)
local g=Duel.GetMatchingGroup(s.ctfilter,tp,LOCATION_MZONE,0,nil)
if #g>0 then
Duel.Hint(HINT_SELECTMSG,tp,HINTMSG_FACEUP)
local tc=Duel.SelectMatchingCard(tp,s.ctfilter,tp,LOCATION_MZONE,0,1,1,nil):GetFirst()
if tc then
tc:AddCounter(0x1f51,1)
end
end
end
\ No newline at end of file
--终烬焚灭
local s,id=GetID()
function s.initial_effect(c)
--Activate
local e1=Effect.CreateEffect(c)
e1:SetType(EFFECT_TYPE_ACTIVATE)
e1:SetCode(EVENT_FREE_CHAIN)
e1:SetOperation(s.actop)
c:RegisterEffect(e1)
--destroy
local e2=Effect.CreateEffect(c)
e2:SetDescription(aux.Stringid(id,0))
e2:SetCategory(CATEGORY_DESTROY)
e2:SetType(EFFECT_TYPE_QUICK_O)
e2:SetCode(EVENT_FREE_CHAIN)
e2:SetRange(LOCATION_SZONE)
e2:SetCountLimit(1)
e2:SetTarget(s.destg)
e2:SetOperation(s.desop)
c:RegisterEffect(e2)
--Set
local e3=Effect.CreateEffect(c)
e3:SetDescription(aux.Stringid(id,1))
e3:SetCategory(CATEGORY_LEAVE_GRAVE)
e3:SetType(EFFECT_TYPE_FIELD+EFFECT_TYPE_TRIGGER_O)
e3:SetCode(EVENT_DESTROYED)
e3:SetProperty(EFFECT_FLAG_DAMAGE_STEP+EFFECT_FLAG_DELAY)
e3:SetRange(LOCATION_GRAVE)
e3:SetCondition(s.setcon)
e3:SetTarget(s.settg)
e3:SetOperation(s.setop)
c:RegisterEffect(e3)
--place counter
local e4=Effect.CreateEffect(c)
e4:SetDescription(aux.Stringid(id,2))
e4:SetCategory(CATEGORY_COUNTER)
e4:SetType(EFFECT_TYPE_SINGLE+EFFECT_TYPE_TRIGGER_O)
e4:SetCode(EVENT_DESTROYED)
e4:SetProperty(EFFECT_FLAG_DELAY)
e4:SetCondition(s.ctcon)
e4:SetTarget(s.cttg)
e4:SetOperation(s.ctop)
c:RegisterEffect(e4)
Duel.AddCustomActivityCounter(id,ACTIVITY_SUMMON,s.counterfilter)
Duel.AddCustomActivityCounter(id,ACTIVITY_SPSUMMON,s.counterfilter)
end
function s.actop(e,tp,eg,ep,ev,re,r,rp)
local c=e:GetHandler()
if Duel.GetLP(tp)~=1 then
Duel.SetLP(tp,1)
end
local e1=Effect.CreateEffect(c)
e1:SetType(EFFECT_TYPE_FIELD)
e1:SetProperty(EFFECT_FLAG_PLAYER_TARGET+EFFECT_FLAG_OATH)
e1:SetCode(EFFECT_CANNOT_SPECIAL_SUMMON)
e1:SetReset(RESET_PHASE+PHASE_END)
e1:SetTargetRange(1,0)
e1:SetTarget(s.splimit)
Duel.RegisterEffect(e1,tp)
local e2=e1:Clone()
e2:SetCode(EFFECT_CANNOT_SUMMON)
Duel.RegisterEffect(e2,tp)
end
function s.counterfilter(c)
return c:IsSetCard(0x5f51)
end
function s.splimit(e,c)
return not c:IsSetCard(0x5f51)
end
function s.destg(e,tp,eg,ep,ev,re,r,rp,chk)
if chk==0 then return Duel.IsExistingMatchingCard(aux.TRUE,tp,LOCATION_ONFIELD,0,1,nil)
and Duel.IsExistingMatchingCard(aux.TRUE,tp,LOCATION_ONFIELD,LOCATION_ONFIELD,1,nil) end
Duel.SetOperationInfo(0,CATEGORY_DESTROY,nil,2,0,0)
end
function s.desop(e,tp,eg,ep,ev,re,r,rp)
if not e:GetHandler():IsRelateToEffect(e) then return end
Duel.Hint(HINT_SELECTMSG,tp,HINTMSG_DESTROY)
local g1=Duel.SelectMatchingCard(tp,aux.TRUE,tp,LOCATION_ONFIELD,0,1,1,nil)
Duel.Hint(HINT_SELECTMSG,tp,HINTMSG_DESTROY)
local g2=Duel.SelectMatchingCard(tp,aux.TRUE,tp,LOCATION_ONFIELD,LOCATION_ONFIELD,1,1,g1)
g1:Merge(g2)
if g1:GetCount()>0 then
Duel.HintSelection(g1)
Duel.Destroy(g1,REASON_EFFECT)
end
end
function s.cfilter(c,tp)
return c:IsReason(REASON_BATTLE+REASON_EFFECT) and c:IsPreviousControler(1-tp) and c:IsPreviousLocation(LOCATION_ONFIELD)
end
function s.setcon(e,tp,eg,ep,ev,re,r,rp)
return eg:IsExists(Card.IsPreviousLocation,1,nil,LOCATION_ONFIELD)
and eg:IsExists(Card.IsPreviousControler,1,nil,1-tp)
and e:GetHandler():IsLocation(LOCATION_GRAVE)
end
function s.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 s.setop(e,tp,eg,ep,ev,re,r,rp)
local c=e:GetHandler()
if c:IsRelateToEffect(e) and c:IsSSetable() then
Duel.SSet(tp,c)
end
end
function s.ctcon(e,tp,eg,ep,ev,re,r,rp)
local c=e:GetHandler()
return c:IsReason(REASON_EFFECT) and c:IsPreviousLocation(LOCATION_SZONE)
end
function s.ctfilter(c)
return c:IsFaceup() and c:IsSetCard(0x5f51) and c:IsCanAddCounter(0x1f51,1)
end
function s.cttg(e,tp,eg,ep,ev,re,r,rp,chk)
if chk==0 then return Duel.IsExistingMatchingCard(s.ctfilter,tp,LOCATION_MZONE,0,1,nil) end
end
function s.ctop(e,tp,eg,ep,ev,re,r,rp)
local g=Duel.GetMatchingGroup(s.ctfilter,tp,LOCATION_MZONE,0,nil)
if #g>0 then
Duel.Hint(HINT_SELECTMSG,tp,HINTMSG_FACEUP)
local tc=Duel.SelectMatchingCard(tp,s.ctfilter,tp,LOCATION_MZONE,0,1,1,nil):GetFirst()
if tc then
tc:AddCounter(0x1f51,1)
end
end
end
\ No newline at end of file
--终烬骑士
local s,id=GetID()
function s.initial_effect(c)
--Cannot Special Summon
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(aux.FALSE)
c:RegisterEffect(e0)
--Summon LP Change
local e1=Effect.CreateEffect(c)
e1:SetType(EFFECT_TYPE_SINGLE+EFFECT_TYPE_CONTINUOUS)
e1:SetCode(EVENT_SUMMON_SUCCESS)
e1:SetOperation(s.lpop)
c:RegisterEffect(e1)
--Summon without tribute
local e2=Effect.CreateEffect(c)
e2:SetDescription(aux.Stringid(id,2))
e2:SetType(EFFECT_TYPE_SINGLE)
e2:SetCode(EFFECT_SUMMON_PROC)
e2:SetCondition(s.ntcon)
c:RegisterEffect(e2)
--Search and destroy
local e3=Effect.CreateEffect(c)
e3:SetDescription(aux.Stringid(id,0))
e3:SetCategory(CATEGORY_TOHAND+CATEGORY_SEARCH+CATEGORY_DESTROY)
e3:SetType(EFFECT_TYPE_IGNITION)
e3:SetRange(LOCATION_MZONE)
e3:SetCountLimit(1)
e3:SetTarget(s.thtg)
e3:SetOperation(s.thop)
c:RegisterEffect(e3)
--Record counter on leave
local e4=Effect.CreateEffect(c)
e4:SetType(EFFECT_TYPE_SINGLE+EFFECT_TYPE_CONTINUOUS)
e4:SetCode(EVENT_LEAVE_FIELD_P)
e4:SetProperty(EFFECT_FLAG_CANNOT_DISABLE)
e4:SetOperation(s.regop)
c:RegisterEffect(e4)
--Place counters when destroyed
local e5=Effect.CreateEffect(c)
e5:SetDescription(aux.Stringid(id,1))
e5:SetCategory(CATEGORY_COUNTER)
e5:SetType(EFFECT_TYPE_SINGLE+EFFECT_TYPE_TRIGGER_O)
e5:SetCode(EVENT_DESTROYED)
e5:SetProperty(EFFECT_FLAG_DELAY)
e5:SetCondition(s.ctcon)
e5:SetTarget(s.cttg)
e5:SetOperation(s.ctop)
e5:SetLabelObject(e4)
c:RegisterEffect(e5)
Duel.AddCustomActivityCounter(id,ACTIVITY_SUMMON,s.counterfilter)
Duel.AddCustomActivityCounter(id,ACTIVITY_SPSUMMON,s.counterfilter)
end
function s.lpop(e,tp,eg,ep,ev,re,r,rp)
local c=e:GetHandler()
if Duel.GetLP(tp)~=1 then
Duel.SetLP(tp,1)
end
local e1=Effect.CreateEffect(c)
e1:SetType(EFFECT_TYPE_FIELD)
e1:SetProperty(EFFECT_FLAG_PLAYER_TARGET+EFFECT_FLAG_OATH)
e1:SetCode(EFFECT_CANNOT_SPECIAL_SUMMON)
e1:SetReset(RESET_PHASE+PHASE_END)
e1:SetTargetRange(1,0)
e1:SetTarget(s.splimit)
Duel.RegisterEffect(e1,tp)
local e2=e1:Clone()
e2:SetCode(EFFECT_CANNOT_SUMMON)
Duel.RegisterEffect(e2,tp)
end
function s.counterfilter(c)
return c:IsSetCard(0x5f51)
end
function s.splimit(e,c)
return not c:IsSetCard(0x5f51)
end
function s.ntcon(e,c,minc)
if c==nil then return true end
return minc==0 and Duel.GetLocationCount(c:GetControler(),LOCATION_MZONE)>0
and Duel.IsExistingMatchingCard(Card.IsSetCard,c:GetControler(),LOCATION_ONFIELD,0,1,nil,0x5f51)
end
function s.thfilter(c,tp)
return c:IsSetCard(0x5f51) and c:IsType(TYPE_MONSTER) and c:IsAbleToHand()
and not Duel.IsExistingMatchingCard(function(sc) return sc:IsFaceup() and sc:IsCode(c:GetCode()) end,tp,LOCATION_ONFIELD,0,1,nil)
end
function s.thtg(e,tp,eg,ep,ev,re,r,rp,chk)
if chk==0 then return Duel.IsExistingMatchingCard(s.thfilter,tp,LOCATION_DECK,0,1,nil,tp) end
Duel.SetOperationInfo(0,CATEGORY_TOHAND,nil,1,tp,LOCATION_DECK)
Duel.SetOperationInfo(0,CATEGORY_DESTROY,nil,1,0,LOCATION_ONFIELD)
end
function s.thop(e,tp,eg,ep,ev,re,r,rp)
Duel.Hint(HINT_SELECTMSG,tp,HINTMSG_ATOHAND)
local g=Duel.SelectMatchingCard(tp,s.thfilter,tp,LOCATION_DECK,0,1,1,nil,tp)
if #g>0 and Duel.SendtoHand(g,nil,REASON_EFFECT)>0 then
Duel.ConfirmCards(1-tp,g)
Duel.Hint(HINT_SELECTMSG,tp,HINTMSG_DESTROY)
local dg=Duel.SelectMatchingCard(tp,nil,tp,LOCATION_ONFIELD,LOCATION_ONFIELD,1,1,nil)
if #dg>0 then
Duel.HintSelection(dg)
Duel.Destroy(dg,REASON_EFFECT)
end
end
end
function s.regop(e,tp,eg,ep,ev,re,r,rp)
local c=e:GetHandler()
local ct=c:GetCounter(0x1f51)
e:SetLabel(ct)
end
function s.ctcon(e,tp,eg,ep,ev,re,r,rp)
local c=e:GetHandler()
local ct=e:GetLabelObject():GetLabel()
e:SetLabel(ct)
return (c:IsReason(REASON_EFFECT) or c:IsReason(REASON_BATTLE)) and c:IsPreviousLocation(LOCATION_MZONE)
end
function s.ctfilter(c)
return c:IsFaceup() and c:IsSetCard(0x5f51) and c:IsCanAddCounter(0x1f51,1)
end
function s.cttg(e,tp,eg,ep,ev,re,r,rp,chk)
if chk==0 then return Duel.IsExistingMatchingCard(s.ctfilter,tp,LOCATION_MZONE,0,1,nil) end
local ct=e:GetLabel()
Duel.SetOperationInfo(0,CATEGORY_COUNTER,nil,ct+1,0,0x1f51)
end
function s.ctop(e,tp,eg,ep,ev,re,r,rp)
local g=Duel.GetMatchingGroup(s.ctfilter,tp,LOCATION_MZONE,0,nil)
if #g>0 then
local ct=e:GetLabel()
local addct=ct+1
if addct>0 then
Duel.Hint(HINT_SELECTMSG,tp,HINTMSG_COUNTER)
local tc=Duel.SelectMatchingCard(tp,s.ctfilter,tp,LOCATION_MZONE,0,1,1,nil):GetFirst()
if tc then
tc:AddCounter(0x1f51,addct)
end
end
end
end
\ No newline at end of file
--终烬贤士
local s,id=GetID()
function s.initial_effect(c)
--Cannot Special Summon
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(aux.FALSE)
c:RegisterEffect(e0)
--Summon LP Change
local e1=Effect.CreateEffect(c)
e1:SetType(EFFECT_TYPE_SINGLE+EFFECT_TYPE_CONTINUOUS)
e1:SetCode(EVENT_SUMMON_SUCCESS)
e1:SetOperation(s.lpop)
c:RegisterEffect(e1)
--Summon without tribute
local e2=Effect.CreateEffect(c)
e2:SetDescription(aux.Stringid(id,2))
e2:SetType(EFFECT_TYPE_SINGLE)
e2:SetCode(EFFECT_SUMMON_PROC)
e2:SetCondition(s.ntcon)
c:RegisterEffect(e2)
--Search and destroy
local e3=Effect.CreateEffect(c)
e3:SetDescription(aux.Stringid(id,0))
e3:SetCategory(CATEGORY_TOHAND+CATEGORY_SEARCH+CATEGORY_DESTROY)
e3:SetType(EFFECT_TYPE_IGNITION)
e3:SetRange(LOCATION_MZONE)
e3:SetCountLimit(1)
e3:SetTarget(s.thtg)
e3:SetOperation(s.thop)
c:RegisterEffect(e3)
--Record counter on leave
local e4=Effect.CreateEffect(c)
e4:SetType(EFFECT_TYPE_SINGLE+EFFECT_TYPE_CONTINUOUS)
e4:SetCode(EVENT_LEAVE_FIELD_P)
e4:SetProperty(EFFECT_FLAG_CANNOT_DISABLE)
e4:SetOperation(s.regop)
c:RegisterEffect(e4)
--Place counters when destroyed
local e5=Effect.CreateEffect(c)
e5:SetDescription(aux.Stringid(id,1))
e5:SetCategory(CATEGORY_COUNTER)
e5:SetType(EFFECT_TYPE_SINGLE+EFFECT_TYPE_TRIGGER_O)
e5:SetCode(EVENT_DESTROYED)
e5:SetProperty(EFFECT_FLAG_DELAY)
e5:SetCondition(s.ctcon)
e5:SetTarget(s.cttg)
e5:SetOperation(s.ctop)
e5:SetLabelObject(e4)
c:RegisterEffect(e5)
Duel.AddCustomActivityCounter(id,ACTIVITY_SUMMON,s.counterfilter)
Duel.AddCustomActivityCounter(id,ACTIVITY_SPSUMMON,s.counterfilter)
end
function s.lpop(e,tp,eg,ep,ev,re,r,rp)
local c=e:GetHandler()
if Duel.GetLP(tp)~=1 then
Duel.SetLP(tp,1)
end
local e1=Effect.CreateEffect(c)
e1:SetType(EFFECT_TYPE_FIELD)
e1:SetProperty(EFFECT_FLAG_PLAYER_TARGET+EFFECT_FLAG_OATH)
e1:SetCode(EFFECT_CANNOT_SPECIAL_SUMMON)
e1:SetReset(RESET_PHASE+PHASE_END)
e1:SetTargetRange(1,0)
e1:SetTarget(s.splimit)
Duel.RegisterEffect(e1,tp)
local e2=e1:Clone()
e2:SetCode(EFFECT_CANNOT_SUMMON)
Duel.RegisterEffect(e2,tp)
end
function s.counterfilter(c)
return c:IsSetCard(0x5f51)
end
function s.splimit(e,c)
return not c:IsSetCard(0x5f51)
end
function s.ntcon(e,c,minc)
if c==nil then return true end
return minc==0 and Duel.GetLocationCount(c:GetControler(),LOCATION_MZONE)>0
and Duel.IsExistingMatchingCard(Card.IsSetCard,c:GetControler(),LOCATION_ONFIELD,0,1,nil,0x5f51)
end
function s.thfilter(c,tp)
return c:IsSetCard(0x5f51) and (c:IsType(TYPE_SPELL) or c:IsType(TYPE_TRAP)) and c:IsAbleToHand()
and not Duel.IsExistingMatchingCard(function(sc) return sc:IsFaceup() and sc:IsCode(c:GetCode()) end,tp,LOCATION_ONFIELD,0,1,nil)
end
function s.thtg(e,tp,eg,ep,ev,re,r,rp,chk)
if chk==0 then return Duel.IsExistingMatchingCard(s.thfilter,tp,LOCATION_DECK,0,1,nil,tp) end
Duel.SetOperationInfo(0,CATEGORY_TOHAND,nil,1,tp,LOCATION_DECK)
Duel.SetOperationInfo(0,CATEGORY_DESTROY,nil,1,0,LOCATION_ONFIELD)
end
function s.thop(e,tp,eg,ep,ev,re,r,rp)
Duel.Hint(HINT_SELECTMSG,tp,HINTMSG_ATOHAND)
local g=Duel.SelectMatchingCard(tp,s.thfilter,tp,LOCATION_DECK,0,1,1,nil,tp)
if #g>0 and Duel.SendtoHand(g,nil,REASON_EFFECT)>0 then
Duel.ConfirmCards(1-tp,g)
Duel.Hint(HINT_SELECTMSG,tp,HINTMSG_DESTROY)
local dg=Duel.SelectMatchingCard(tp,nil,tp,LOCATION_ONFIELD,LOCATION_ONFIELD,1,1,nil)
if #dg>0 then
Duel.HintSelection(dg)
Duel.Destroy(dg,REASON_EFFECT)
end
end
end
function s.regop(e,tp,eg,ep,ev,re,r,rp)
local c=e:GetHandler()
local ct=c:GetCounter(0x1f51)
e:SetLabel(ct)
end
function s.ctcon(e,tp,eg,ep,ev,re,r,rp)
local c=e:GetHandler()
local ct=e:GetLabelObject():GetLabel()
e:SetLabel(ct)
return (c:IsReason(REASON_EFFECT) or c:IsReason(REASON_BATTLE)) and c:IsPreviousLocation(LOCATION_MZONE)
end
function s.ctfilter(c)
return c:IsFaceup() and c:IsSetCard(0x5f51) and c:IsCanAddCounter(0x1f51,1)
end
function s.cttg(e,tp,eg,ep,ev,re,r,rp,chk)
if chk==0 then return Duel.IsExistingMatchingCard(s.ctfilter,tp,LOCATION_MZONE,0,1,nil) end
local ct=e:GetLabel()
Duel.SetOperationInfo(0,CATEGORY_COUNTER,nil,ct+1,0,0x1f51)
end
function s.ctop(e,tp,eg,ep,ev,re,r,rp)
local g=Duel.GetMatchingGroup(s.ctfilter,tp,LOCATION_MZONE,0,nil)
if #g>0 then
local ct=e:GetLabel()
local addct=ct+1
if addct>0 then
Duel.Hint(HINT_SELECTMSG,tp,HINTMSG_COUNTER)
local tc=Duel.SelectMatchingCard(tp,s.ctfilter,tp,LOCATION_MZONE,0,1,1,nil):GetFirst()
if tc then
tc:AddCounter(0x1f51,addct)
end
end
end
end
\ No newline at end of file
--终烬使徒
local s,id=GetID()
function s.initial_effect(c)
--Cannot Special Summon
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(aux.FALSE)
c:RegisterEffect(e0)
--Summon LP Change
local e1=Effect.CreateEffect(c)
e1:SetType(EFFECT_TYPE_SINGLE+EFFECT_TYPE_CONTINUOUS)
e1:SetCode(EVENT_SUMMON_SUCCESS)
e1:SetOperation(s.lpop)
c:RegisterEffect(e1)
--Summon from hand
local e2=Effect.CreateEffect(c)
e2:SetDescription(aux.Stringid(id,0))
e2:SetCategory(CATEGORY_SUMMON)
e2:SetType(EFFECT_TYPE_IGNITION)
e2:SetRange(LOCATION_HAND)
e2:SetCondition(s.sumcon)
e2:SetTarget(s.sumtg)
e2:SetOperation(s.sumop)
c:RegisterEffect(e2)
--Cannot be target
local e3=Effect.CreateEffect(c)
e3:SetType(EFFECT_TYPE_SINGLE)
e3:SetProperty(EFFECT_FLAG_SINGLE_RANGE)
e3:SetCode(EFFECT_CANNOT_BE_BATTLE_TARGET)
e3:SetRange(LOCATION_MZONE)
e3:SetCondition(s.atkcon)
e3:SetValue(aux.imval1)
c:RegisterEffect(e3)
local e4=e3:Clone()
e4:SetCode(EFFECT_CANNOT_BE_EFFECT_TARGET)
e4:SetValue(aux.tgoval)
c:RegisterEffect(e4)
--Place counters
local e5=Effect.CreateEffect(c)
e5:SetDescription(aux.Stringid(id,1))
e5:SetCategory(CATEGORY_COUNTER)
e5:SetType(EFFECT_TYPE_IGNITION)
e5:SetRange(LOCATION_MZONE)
e5:SetCountLimit(1)
e5:SetTarget(s.cttg)
e5:SetOperation(s.ctop)
c:RegisterEffect(e5)
Duel.AddCustomActivityCounter(id,ACTIVITY_SUMMON,s.counterfilter)
Duel.AddCustomActivityCounter(id,ACTIVITY_SPSUMMON,s.counterfilter)
end
function s.lpop(e,tp,eg,ep,ev,re,r,rp)
local c=e:GetHandler()
if Duel.GetLP(tp)~=1 then
Duel.SetLP(tp,1)
end
local e1=Effect.CreateEffect(c)
e1:SetType(EFFECT_TYPE_FIELD)
e1:SetProperty(EFFECT_FLAG_PLAYER_TARGET+EFFECT_FLAG_OATH)
e1:SetCode(EFFECT_CANNOT_SPECIAL_SUMMON)
e1:SetReset(RESET_PHASE+PHASE_END)
e1:SetTargetRange(1,0)
e1:SetTarget(s.splimit)
Duel.RegisterEffect(e1,tp)
local e2=e1:Clone()
e2:SetCode(EFFECT_CANNOT_SUMMON)
Duel.RegisterEffect(e2,tp)
end
function s.counterfilter(c)
return c:IsSetCard(0x5f51)
end
function s.splimit(e,c)
return not c:IsSetCard(0x5f51)
end
function s.cfilter(c)
return c:IsSetCard(0x5f51) and c:IsFaceup()
end
function s.sumcon(e,tp,eg,ep,ev,re,r,rp)
return Duel.IsExistingMatchingCard(s.cfilter,tp,LOCATION_ONFIELD,0,1,nil)
end
function s.sumtg(e,tp,eg,ep,ev,re,r,rp,chk)
local c=e:GetHandler()
if chk==0 then return c:IsSummonable(true,nil) end
Duel.SetOperationInfo(0,CATEGORY_SUMMON,c,1,0,0)
end
function s.sumop(e,tp,eg,ep,ev,re,r,rp)
local c=e:GetHandler()
if c:IsRelateToEffect(e) and c:IsLocation(LOCATION_HAND) then
Duel.Summon(tp,c,true,nil)
end
end
function s.atkfilter(c)
return c:IsSetCard(0x5f51) and not c:IsCode(id)
end
function s.atkcon(e)
return Duel.IsExistingMatchingCard(s.atkfilter,e:GetHandlerPlayer(),LOCATION_ONFIELD,0,1,nil)
end
function s.cttg(e,tp,eg,ep,ev,re,r,rp,chk)
local c=e:GetHandler()
if chk==0 then return c:IsCanAddCounter(0x1f51,1) end
local ct=math.min(Duel.GetTurnCount(),10) -- 限制最大数量为10,避免过大
Duel.SetOperationInfo(0,CATEGORY_COUNTER,nil,ct,0,0x1f51)
end
function s.ctop(e,tp,eg,ep,ev,re,r,rp)
local c=e:GetHandler()
if c:IsRelateToEffect(e) and c:IsFaceup() then
local ct=math.min(Duel.GetTurnCount(),10) -- 限制最大数量为10
c:AddCounter(0x1f51,ct)
end
end
\ No newline at end of file
--终烬神
local s,id=GetID()
function s.initial_effect(c)
--Cannot Special Summon
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(aux.FALSE)
c:RegisterEffect(e0)
--Normal summon with 1 "终烬" tribute
local e1=Effect.CreateEffect(c)
e1:SetDescription(aux.Stringid(id,0))
e1:SetType(EFFECT_TYPE_SINGLE)
e1:SetProperty(EFFECT_FLAG_CANNOT_DISABLE+EFFECT_FLAG_UNCOPYABLE)
e1:SetCode(EFFECT_SUMMON_PROC)
e1:SetCondition(s.otcon)
e1:SetOperation(s.otop)
e1:SetValue(SUMMON_TYPE_ADVANCE)
c:RegisterEffect(e1)
--Additional summon (does not use normal summon)
local e2=Effect.CreateEffect(c)
e2:SetDescription(aux.Stringid(id,1))
e2:SetCategory(CATEGORY_SUMMON)
e2:SetType(EFFECT_TYPE_IGNITION)
e2:SetRange(LOCATION_HAND)
e2:SetCondition(s.sumcon)
e2:SetTarget(s.sumtg)
e2:SetOperation(s.sumop)
c:RegisterEffect(e2)
--Summon LP Change and restrictions
local e3=Effect.CreateEffect(c)
e3:SetType(EFFECT_TYPE_SINGLE+EFFECT_TYPE_CONTINUOUS)
e3:SetCode(EVENT_SUMMON_SUCCESS)
e3:SetOperation(s.lpop)
c:RegisterEffect(e3)
--Cannot be targeted or destroyed
local e4=Effect.CreateEffect(c)
e4:SetType(EFFECT_TYPE_SINGLE)
e4:SetCode(EFFECT_CANNOT_BE_EFFECT_TARGET)
e4:SetProperty(EFFECT_FLAG_SINGLE_RANGE)
e4:SetRange(LOCATION_MZONE)
e4:SetValue(1)
c:RegisterEffect(e4)
local e5=Effect.CreateEffect(c)
e5:SetType(EFFECT_TYPE_SINGLE)
e5:SetCode(EFFECT_INDESTRUCTABLE_EFFECT)
e5:SetProperty(EFFECT_FLAG_SINGLE_RANGE)
e5:SetRange(LOCATION_MZONE)
e5:SetValue(1)
c:RegisterEffect(e5)
local e6=Effect.CreateEffect(c)
e6:SetType(EFFECT_TYPE_SINGLE)
e6:SetCode(EFFECT_INDESTRUCTABLE_BATTLE)
e6:SetProperty(EFFECT_FLAG_SINGLE_RANGE)
e6:SetRange(LOCATION_MZONE)
e6:SetValue(1)
c:RegisterEffect(e6)
--Main effect
local e7=Effect.CreateEffect(c)
e7:SetDescription(aux.Stringid(id,2))
e7:SetCategory(CATEGORY_DECKDES+CATEGORY_SPECIAL_SUMMON+CATEGORY_DISABLE)
e7:SetType(EFFECT_TYPE_QUICK_O)
e7:SetCode(EVENT_FREE_CHAIN)
e7:SetRange(LOCATION_MZONE)
e7:SetCountLimit(1)
e7:SetTarget(s.efftg)
e7:SetOperation(s.effop)
c:RegisterEffect(e7)
Duel.AddCustomActivityCounter(id,ACTIVITY_SUMMON,s.counterfilter)
Duel.AddCustomActivityCounter(id,ACTIVITY_SPSUMMON,s.counterfilter)
end
function s.otcon(e,c,minc)
if c==nil then return true end
local tp=c:GetControler()
local mg=Duel.GetMatchingGroup(s.otfilter,tp,LOCATION_MZONE,LOCATION_MZONE,nil,tp)
return c:IsLevelAbove(7) and minc<=1 and mg:GetCount()>=1
end
function s.otop(e,tp,eg,ep,ev,re,r,rp,c)
local mg=Duel.GetMatchingGroup(s.otfilter,tp,LOCATION_MZONE,LOCATION_MZONE,nil,tp)
Duel.Hint(HINT_SELECTMSG,tp,HINTMSG_RELEASE)
local sg=mg:Select(tp,1,1,nil)
c:SetMaterial(sg)
Duel.Release(sg,REASON_SUMMON+REASON_MATERIAL)
end
function s.otfilter(c,tp)
return c:IsSetCard(0x5f51) and c:IsReleasable() and (c:IsControler(tp) or c:IsFaceup())
end
function s.sumcon(e,tp,eg,ep,ev,re,r,rp)
return Duel.IsExistingMatchingCard(s.otfilter,tp,LOCATION_MZONE,0,1,nil)
end
function s.sumtg(e,tp,eg,ep,ev,re,r,rp,chk)
local c=e:GetHandler()
if chk==0 then return c:IsSummonable(true,nil) end
Duel.SetOperationInfo(0,CATEGORY_SUMMON,c,1,0,0)
end
function s.sumop(e,tp,eg,ep,ev,re,r,rp)
local c=e:GetHandler()
if c:IsRelateToEffect(e) then
Duel.Summon(tp,c,true,nil)
end
end
function s.lpop(e,tp,eg,ep,ev,re,r,rp)
local c=e:GetHandler()
if Duel.GetLP(tp)~=1 then
Duel.SetLP(tp,1)
end
local e1=Effect.CreateEffect(c)
e1:SetType(EFFECT_TYPE_FIELD)
e1:SetProperty(EFFECT_FLAG_PLAYER_TARGET+EFFECT_FLAG_OATH)
e1:SetCode(EFFECT_CANNOT_SPECIAL_SUMMON)
e1:SetReset(RESET_PHASE+PHASE_END)
e1:SetTargetRange(1,0)
e1:SetTarget(s.splimit)
Duel.RegisterEffect(e1,tp)
local e2=e1:Clone()
e2:SetCode(EFFECT_CANNOT_SUMMON)
Duel.RegisterEffect(e2,tp)
end
function s.counterfilter(c)
return c:IsSetCard(0x5f51)
end
function s.splimit(e,c)
return not c:IsSetCard(0x5f51)
end
function s.efftg(e,tp,eg,ep,ev,re,r,rp,chk)
local ct=Duel.GetCounter(tp,1,0,0x1f51)
local flag=false
local numbers={}
for i=1,ct do
if Duel.IsCanRemoveCounter(tp,1,0,0x1f51,i,REASON_COST) and Duel.GetFieldGroupCount(1-tp,LOCATION_DECK,0)>=i then
table.insert(numbers,i)
flag=true
end
end
if chk==0 then
return flag
end
if #numbers>0 then
if #numbers>1 then
ct=Duel.AnnounceNumber(tp,table.unpack(numbers))
else
ct=numbers[1]
end
Duel.RemoveCounter(tp,1,0,0x1f51,ct,REASON_COST)
e:SetLabel(ct)
Duel.SetOperationInfo(0,CATEGORY_DECKDES,nil,0,1-tp,ct)
Duel.SetOperationInfo(0,CATEGORY_SPECIAL_SUMMON,nil,0,tp,LOCATION_HAND+LOCATION_DECK+LOCATION_GRAVE)
end
end
function s.spfilter(c,e,tp)
return c:IsSetCard(0x5f51) and not c:IsCode(17338860) and c:IsType(TYPE_MONSTER) and c:IsCanBeSpecialSummoned(e,0,tp,true,false)
end
function s.effop(e,tp,eg,ep,ev,re,r,rp)
local ct=e:GetLabel()
if ct<=0 then return end
--Destroy cards from top of opponent's deck
local g=Duel.GetDecktopGroup(1-tp,ct)
if #g>0 then
Duel.DisableShuffleCheck()
Duel.Destroy(g,REASON_EFFECT)
--Register the destroyed cards for negation
local tc=g:GetFirst()
while tc do
local code=tc:GetOriginalCodeRule()
local e1=Effect.CreateEffect(e:GetHandler())
e1:SetType(EFFECT_TYPE_FIELD)
e1:SetCode(EFFECT_DISABLE)
e1:SetTargetRange(LOCATION_ONFIELD+LOCATION_GRAVE+LOCATION_REMOVED,LOCATION_ONFIELD+LOCATION_GRAVE+LOCATION_REMOVED)
e1:SetTarget(s.distg)
e1:SetLabel(code)
e1:SetReset(RESET_PHASE+PHASE_END,2)
Duel.RegisterEffect(e1,tp)
local e2=Effect.CreateEffect(e:GetHandler())
e2:SetType(EFFECT_TYPE_FIELD+EFFECT_TYPE_CONTINUOUS)
e2:SetCode(EVENT_CHAIN_SOLVING)
e2:SetCondition(s.discon)
e2:SetOperation(s.disop)
e2:SetLabel(code)
e2:SetReset(RESET_PHASE+PHASE_END,2)
Duel.RegisterEffect(e2,tp)
tc=g:GetNext()
end
--Special summon
if Duel.GetLocationCount(tp,LOCATION_MZONE)>0
and Duel.IsExistingMatchingCard(aux.NecroValleyFilter(s.spfilter),tp,LOCATION_HAND+LOCATION_DECK+LOCATION_GRAVE,0,1,nil,e,tp)
and Duel.SelectYesNo(tp,aux.Stringid(id,3)) then
Duel.Hint(HINT_SELECTMSG,tp,HINTMSG_SPSUMMON)
local sg=Duel.SelectMatchingCard(tp,aux.NecroValleyFilter(s.spfilter),tp,LOCATION_HAND+LOCATION_DECK+LOCATION_GRAVE,0,1,1,nil,e,tp)
if #sg>0 then
Duel.SpecialSummon(sg,0,tp,tp,true,false,POS_FACEUP)
end
end
end
end
function s.distg(e,c)
return c:IsOriginalCodeRule(e:GetLabel())
end
function s.discon(e,tp,eg,ep,ev,re,r,rp)
return re:GetHandler():IsOriginalCodeRule(e:GetLabel())
end
function s.disop(e,tp,eg,ep,ev,re,r,rp)
Duel.NegateEffect(ev)
end
\ No newline at end of file
--终烬祭司
local s,id=GetID()
function s.initial_effect(c)
--Cannot Special Summon
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(aux.FALSE)
c:RegisterEffect(e0)
--Summon LP Change
local e1=Effect.CreateEffect(c)
e1:SetType(EFFECT_TYPE_SINGLE+EFFECT_TYPE_CONTINUOUS)
e1:SetCode(EVENT_SUMMON_SUCCESS)
e1:SetOperation(s.lpop)
c:RegisterEffect(e1)
--Summon without tribute
local e2=Effect.CreateEffect(c)
e2:SetDescription(aux.Stringid(id,2))
e2:SetType(EFFECT_TYPE_SINGLE)
e2:SetCode(EFFECT_SUMMON_PROC)
e2:SetCondition(s.ntcon)
c:RegisterEffect(e2)
--Search and destroy
local e3=Effect.CreateEffect(c)
e3:SetDescription(aux.Stringid(id,0))
e3:SetCategory(CATEGORY_TOHAND+CATEGORY_SEARCH+CATEGORY_DESTROY)
e3:SetType(EFFECT_TYPE_IGNITION)
e3:SetRange(LOCATION_MZONE)
e3:SetCountLimit(1)
e3:SetTarget(s.thtg)
e3:SetOperation(s.thop)
c:RegisterEffect(e3)
--Record counter on leave
local e4=Effect.CreateEffect(c)
e4:SetType(EFFECT_TYPE_SINGLE+EFFECT_TYPE_CONTINUOUS)
e4:SetCode(EVENT_LEAVE_FIELD_P)
e4:SetProperty(EFFECT_FLAG_CANNOT_DISABLE)
e4:SetOperation(s.regop)
c:RegisterEffect(e4)
--Place counters when destroyed
local e5=Effect.CreateEffect(c)
e5:SetDescription(aux.Stringid(id,1))
e5:SetCategory(CATEGORY_COUNTER)
e5:SetType(EFFECT_TYPE_SINGLE+EFFECT_TYPE_TRIGGER_O)
e5:SetCode(EVENT_DESTROYED)
e5:SetProperty(EFFECT_FLAG_DELAY)
e5:SetCondition(s.ctcon)
e5:SetTarget(s.cttg)
e5:SetOperation(s.ctop)
e5:SetLabelObject(e4)
c:RegisterEffect(e5)
Duel.AddCustomActivityCounter(id,ACTIVITY_SUMMON,s.counterfilter)
Duel.AddCustomActivityCounter(id,ACTIVITY_SPSUMMON,s.counterfilter)
end
function s.lpop(e,tp,eg,ep,ev,re,r,rp)
local c=e:GetHandler()
if Duel.GetLP(tp)~=1 then
Duel.SetLP(tp,1)
end
local e1=Effect.CreateEffect(c)
e1:SetType(EFFECT_TYPE_FIELD)
e1:SetProperty(EFFECT_FLAG_PLAYER_TARGET+EFFECT_FLAG_OATH)
e1:SetCode(EFFECT_CANNOT_SPECIAL_SUMMON)
e1:SetReset(RESET_PHASE+PHASE_END)
e1:SetTargetRange(1,0)
e1:SetTarget(s.splimit)
Duel.RegisterEffect(e1,tp)
local e2=e1:Clone()
e2:SetCode(EFFECT_CANNOT_SUMMON)
Duel.RegisterEffect(e2,tp)
end
function s.counterfilter(c)
return c:IsSetCard(0x5f51)
end
function s.splimit(e,c)
return not c:IsSetCard(0x5f51)
end
function s.ntfilter(c)
return c:IsFaceup() and c:IsSetCard(0x5f51)
end
function s.ntcon(e,c,minc)
if c==nil then return true end
return minc==0 and Duel.GetLocationCount(c:GetControler(),LOCATION_MZONE)>0
and not Duel.IsExistingMatchingCard(aux.NOT(s.ntfilter),c:GetControler(),LOCATION_MZONE,0,1,nil)
end
function s.thfilter(c,tp)
return c:IsSetCard(0x5f51) and c:IsAbleToHand()
and not Duel.IsExistingMatchingCard(function(sc) return sc:IsFaceup() and sc:IsCode(c:GetCode()) end,tp,LOCATION_ONFIELD,0,1,nil)
end
function s.thtg(e,tp,eg,ep,ev,re,r,rp,chk)
if chk==0 then return Duel.IsExistingMatchingCard(s.thfilter,tp,LOCATION_DECK,0,1,nil,tp) end
Duel.SetOperationInfo(0,CATEGORY_TOHAND,nil,1,tp,LOCATION_DECK)
Duel.SetOperationInfo(0,CATEGORY_DESTROY,nil,1,tp,LOCATION_ONFIELD)
end
function s.thop(e,tp,eg,ep,ev,re,r,rp)
Duel.Hint(HINT_SELECTMSG,tp,HINTMSG_ATOHAND)
local g=Duel.SelectMatchingCard(tp,s.thfilter,tp,LOCATION_DECK,0,1,1,nil,tp)
if #g>0 and Duel.SendtoHand(g,nil,REASON_EFFECT)>0 then
Duel.ConfirmCards(1-tp,g)
Duel.Hint(HINT_SELECTMSG,tp,HINTMSG_DESTROY)
local dg=Duel.SelectMatchingCard(tp,nil,tp,LOCATION_ONFIELD,0,1,1,nil)
if #dg>0 then
Duel.HintSelection(dg)
Duel.Destroy(dg,REASON_EFFECT)
end
end
end
function s.regop(e,tp,eg,ep,ev,re,r,rp)
local c=e:GetHandler()
local ct=c:GetCounter(0x1f51)
e:SetLabel(ct)
end
function s.ctcon(e,tp,eg,ep,ev,re,r,rp)
local c=e:GetHandler()
local ct=e:GetLabelObject():GetLabel()
e:SetLabel(ct)
return (c:IsReason(REASON_EFFECT) or c:IsReason(REASON_BATTLE)) and c:IsPreviousLocation(LOCATION_MZONE)
end
function s.ctfilter(c)
return c:IsFaceup() and c:IsSetCard(0x5f51) and c:IsCanAddCounter(0x1f51,1)
end
function s.cttg(e,tp,eg,ep,ev,re,r,rp,chk)
if chk==0 then return Duel.IsExistingMatchingCard(s.ctfilter,tp,LOCATION_MZONE,0,1,nil) end
local ct=e:GetLabel()
Duel.SetOperationInfo(0,CATEGORY_COUNTER,nil,ct+1,0,0x1f51)
end
function s.ctop(e,tp,eg,ep,ev,re,r,rp)
local g=Duel.GetMatchingGroup(s.ctfilter,tp,LOCATION_MZONE,0,nil)
if #g>0 then
local ct=e:GetLabel()
local addct=ct+1
if addct>0 then
Duel.Hint(HINT_SELECTMSG,tp,HINTMSG_COUNTER)
local tc=Duel.SelectMatchingCard(tp,s.ctfilter,tp,LOCATION_MZONE,0,1,1,nil):GetFirst()
if tc then
tc:AddCounter(0x1f51,addct)
end
end
end
end
\ No newline at end of file
--终烬帝王
local s,id=GetID()
function s.initial_effect(c)
--Cannot Special Summon
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(aux.FALSE)
c:RegisterEffect(e0)
--Summon LP Change
local e1=Effect.CreateEffect(c)
e1:SetType(EFFECT_TYPE_SINGLE+EFFECT_TYPE_CONTINUOUS)
e1:SetCode(EVENT_SUMMON_SUCCESS)
e1:SetOperation(s.lpop)
c:RegisterEffect(e1)
--Summon without tribute
local e2=Effect.CreateEffect(c)
e2:SetDescription(aux.Stringid(id,2))
e2:SetType(EFFECT_TYPE_SINGLE)
e2:SetCode(EFFECT_SUMMON_PROC)
e2:SetCondition(s.ntcon)
c:RegisterEffect(e2)
--Special summon from grave and destroy
local e3=Effect.CreateEffect(c)
e3:SetDescription(aux.Stringid(id,0))
e3:SetCategory(CATEGORY_SPECIAL_SUMMON+CATEGORY_DESTROY)
e3:SetType(EFFECT_TYPE_IGNITION)
e3:SetRange(LOCATION_MZONE)
e3:SetCountLimit(1)
e3:SetTarget(s.sptg)
e3:SetOperation(s.spop)
c:RegisterEffect(e3)
--Record counter on leave
local e4=Effect.CreateEffect(c)
e4:SetType(EFFECT_TYPE_SINGLE+EFFECT_TYPE_CONTINUOUS)
e4:SetCode(EVENT_LEAVE_FIELD_P)
e4:SetProperty(EFFECT_FLAG_CANNOT_DISABLE)
e4:SetOperation(s.regop)
c:RegisterEffect(e4)
--Place counters when destroyed
local e5=Effect.CreateEffect(c)
e5:SetDescription(aux.Stringid(id,1))
e5:SetCategory(CATEGORY_COUNTER)
e5:SetType(EFFECT_TYPE_SINGLE+EFFECT_TYPE_TRIGGER_O)
e5:SetCode(EVENT_DESTROYED)
e5:SetProperty(EFFECT_FLAG_DELAY)
e5:SetCondition(s.ctcon)
e5:SetTarget(s.cttg)
e5:SetOperation(s.ctop)
e5:SetLabelObject(e4)
c:RegisterEffect(e5)
Duel.AddCustomActivityCounter(id,ACTIVITY_SUMMON,s.counterfilter)
Duel.AddCustomActivityCounter(id,ACTIVITY_SPSUMMON,s.counterfilter)
end
function s.lpop(e,tp,eg,ep,ev,re,r,rp)
local c=e:GetHandler()
if Duel.GetLP(tp)~=1 then
Duel.SetLP(tp,1)
end
local e1=Effect.CreateEffect(c)
e1:SetType(EFFECT_TYPE_FIELD)
e1:SetProperty(EFFECT_FLAG_PLAYER_TARGET+EFFECT_FLAG_OATH)
e1:SetCode(EFFECT_CANNOT_SPECIAL_SUMMON)
e1:SetReset(RESET_PHASE+PHASE_END)
e1:SetTargetRange(1,0)
e1:SetTarget(s.splimit)
Duel.RegisterEffect(e1,tp)
local e2=e1:Clone()
e2:SetCode(EFFECT_CANNOT_SUMMON)
Duel.RegisterEffect(e2,tp)
end
function s.counterfilter(c)
return c:IsSetCard(0x5f51)
end
function s.splimit(e,c)
return not c:IsSetCard(0x5f51)
end
function s.ntfilter(c)
return c:IsFaceup() and c:IsSetCard(0x5f51)
end
function s.ntcon(e,c,minc)
if c==nil then return true end
return minc==0 and Duel.GetLocationCount(c:GetControler(),LOCATION_MZONE)>0
and not Duel.IsExistingMatchingCard(aux.NOT(s.ntfilter),c:GetControler(),LOCATION_MZONE,0,1,nil)
end
function s.spfilter(c,e,tp)
return c:IsSetCard(0x5f51) and not c:IsCode(17338880) and c:IsType(TYPE_MONSTER) and c:IsCanBeSpecialSummoned(e,0,tp,true,false)
end
function s.sptg(e,tp,eg,ep,ev,re,r,rp,chk)
if chk==0 then return Duel.GetLocationCount(tp,LOCATION_MZONE)>0
and Duel.IsExistingMatchingCard(s.spfilter,tp,LOCATION_GRAVE,0,1,nil,e,tp) end
Duel.SetOperationInfo(0,CATEGORY_SPECIAL_SUMMON,nil,1,tp,LOCATION_GRAVE)
Duel.SetOperationInfo(0,CATEGORY_DESTROY,nil,1,tp,LOCATION_ONFIELD)
end
function s.spop(e,tp,eg,ep,ev,re,r,rp)
if Duel.GetLocationCount(tp,LOCATION_MZONE)<=0 then return end
Duel.Hint(HINT_SELECTMSG,tp,HINTMSG_SPSUMMON)
local g=Duel.SelectMatchingCard(tp,aux.NecroValleyFilter(s.spfilter),tp,LOCATION_GRAVE,0,1,1,nil,e,tp)
if #g>0 and Duel.SpecialSummon(g,0,tp,tp,true,false,POS_FACEUP)>0 then
Duel.Hint(HINT_SELECTMSG,tp,HINTMSG_DESTROY)
local dg=Duel.SelectMatchingCard(tp,nil,tp,LOCATION_ONFIELD,0,1,1,nil)
if #dg>0 then
Duel.HintSelection(dg)
Duel.Destroy(dg,REASON_EFFECT)
end
end
end
function s.regop(e,tp,eg,ep,ev,re,r,rp)
local c=e:GetHandler()
local ct=c:GetCounter(0x1f51)
e:SetLabel(ct)
end
function s.ctcon(e,tp,eg,ep,ev,re,r,rp)
local c=e:GetHandler()
local ct=e:GetLabelObject():GetLabel()
e:SetLabel(ct)
return (c:IsReason(REASON_EFFECT) or c:IsReason(REASON_BATTLE)) and c:IsPreviousLocation(LOCATION_MZONE)
end
function s.ctfilter(c)
return c:IsFaceup() and c:IsSetCard(0x5f51) and c:IsCanAddCounter(0x1f51,1)
end
function s.cttg(e,tp,eg,ep,ev,re,r,rp,chk)
if chk==0 then return Duel.IsExistingMatchingCard(s.ctfilter,tp,LOCATION_MZONE,0,1,nil) end
local ct=e:GetLabel()
Duel.SetOperationInfo(0,CATEGORY_COUNTER,nil,ct+1,0,0x1f51)
end
function s.ctop(e,tp,eg,ep,ev,re,r,rp)
local g=Duel.GetMatchingGroup(s.ctfilter,tp,LOCATION_MZONE,0,nil)
if #g>0 then
local ct=e:GetLabel()
local addct=ct+1
if addct>0 then
Duel.Hint(HINT_SELECTMSG,tp,HINTMSG_COUNTER)
local tc=Duel.SelectMatchingCard(tp,s.ctfilter,tp,LOCATION_MZONE,0,1,1,nil):GetFirst()
if tc then
tc:AddCounter(0x1f51,addct)
end
end
end
end
\ No newline at end of file
--终烬统御
local s,id=GetID()
function s.initial_effect(c)
--Activate
local e1=Effect.CreateEffect(c)
e1:SetCategory(CATEGORY_DESTROY+CATEGORY_DISABLE)
e1:SetType(EFFECT_TYPE_ACTIVATE)
e1:SetCode(EVENT_CHAINING)
e1:SetCondition(s.condition)
e1:SetCost(s.cost)
e1:SetTarget(s.target)
e1:SetOperation(s.activate)
c:RegisterEffect(e1)
local e2=Effect.CreateEffect(c)
e2:SetDescription(aux.Stringid(id,1))
e2:SetCategory(CATEGORY_LEAVE_GRAVE)
e2:SetType(EFFECT_TYPE_FIELD+EFFECT_TYPE_TRIGGER_O)
e2:SetCode(EVENT_DESTROY)
e2:SetProperty(EFFECT_FLAG_DAMAGE_STEP+EFFECT_FLAG_DELAY)
e2:SetRange(LOCATION_GRAVE)
e2:SetCondition(s.setcon)
e2:SetTarget(s.settg)
e2:SetOperation(s.setop)
c:RegisterEffect(e2)
local e3=Effect.CreateEffect(c)
e3:SetDescription(aux.Stringid(id,2))
e3:SetCategory(CATEGORY_COUNTER)
e3:SetType(EFFECT_TYPE_SINGLE+EFFECT_TYPE_TRIGGER_O)
e3:SetCode(EVENT_DESTROYED)
e3:SetProperty(EFFECT_FLAG_DELAY)
e3:SetCondition(s.ctcon)
e3:SetTarget(s.cttg)
e3:SetOperation(s.ctop)
c:RegisterEffect(e3)
Duel.AddCustomActivityCounter(id,ACTIVITY_SUMMON,s.counterfilter)
Duel.AddCustomActivityCounter(id,ACTIVITY_SPSUMMON,s.counterfilter)
end
function s.lpop(e,tp,eg,ep,ev,re,r,rp)
local c=e:GetHandler()
if Duel.GetLP(tp)~=1 then
Duel.SetLP(tp,1)
end
local e1=Effect.CreateEffect(c)
e1:SetType(EFFECT_TYPE_FIELD)
e1:SetProperty(EFFECT_FLAG_PLAYER_TARGET+EFFECT_FLAG_OATH)
e1:SetCode(EFFECT_CANNOT_SPECIAL_SUMMON)
e1:SetReset(RESET_PHASE+PHASE_END)
e1:SetTargetRange(1,0)
e1:SetTarget(s.splimit)
Duel.RegisterEffect(e1,tp)
local e2=e1:Clone()
e2:SetCode(EFFECT_CANNOT_SUMMON)
Duel.RegisterEffect(e2,tp)
end
function s.counterfilter(c)
return c:IsSetCard(0x5f51)
end
function s.splimit(e,c)
return not c:IsSetCard(0x5f51)
end
function s.condition(e,tp,eg,ep,ev,re,r,rp)
return Duel.IsChainNegatable(ev)
end
function s.cost(e,tp,eg,ep,ev,re,r,rp,chk)
if chk==0 then return true end
s.lpop(e,tp,eg,ep,ev,re,r,rp)
end
function s.godfilter(c)
return c:IsFaceup() and c:IsCode(17338860)
end
function s.target(e,tp,eg,ep,ev,re,r,rp,chk,chkc)
if chkc then return chkc:IsOnField() end
if chk==0 then return Duel.IsExistingTarget(nil,tp,LOCATION_ONFIELD,LOCATION_ONFIELD,1,nil)
and Duel.IsExistingMatchingCard(s.godfilter,tp,LOCATION_MZONE,0,1,nil) end
Duel.Hint(HINT_SELECTMSG,tp,HINTMSG_DESTROY)
local g=Duel.SelectTarget(tp,nil,tp,LOCATION_ONFIELD,LOCATION_ONFIELD,1,1,nil)
Duel.SetOperationInfo(0,CATEGORY_DESTROY,g,1,0,0)
end
function s.activate(e,tp,eg,ep,ev,re,r,rp)
local tc=Duel.GetFirstTarget()
if tc and tc:IsRelateToEffect(e) then
local code=tc:GetOriginalCodeRule()
if Duel.Destroy(tc,REASON_EFFECT)~=0 then
-- 注册无效化效果
local e1=Effect.CreateEffect(e:GetHandler())
e1:SetType(EFFECT_TYPE_FIELD)
e1:SetCode(EFFECT_DISABLE)
e1:SetTargetRange(LOCATION_ONFIELD+LOCATION_GRAVE+LOCATION_REMOVED,LOCATION_ONFIELD+LOCATION_GRAVE+LOCATION_REMOVED)
e1:SetTarget(s.distg)
e1:SetLabel(code)
e1:SetReset(RESET_PHASE+PHASE_END,2)
Duel.RegisterEffect(e1,tp)
local e2=Effect.CreateEffect(e:GetHandler())
e2:SetType(EFFECT_TYPE_FIELD+EFFECT_TYPE_CONTINUOUS)
e2:SetCode(EVENT_CHAIN_SOLVING)
e2:SetCondition(s.discon)
e2:SetOperation(s.disop)
e2:SetLabel(code)
e2:SetReset(RESET_PHASE+PHASE_END,2)
Duel.RegisterEffect(e2,tp)
end
end
end
function s.distg(e,c)
return c:IsOriginalCodeRule(e:GetLabel())
end
function s.discon(e,tp,eg,ep,ev,re,r,rp)
return re:GetHandler():IsOriginalCodeRule(e:GetLabel())
end
function s.disop(e,tp,eg,ep,ev,re,r,rp)
Duel.NegateEffect(ev)
end
function s.setcon(e,tp,eg,ep,ev,re,r,rp)
return eg:IsExists(Card.IsLocation,1,nil,LOCATION_DECK)
and eg:IsExists(Card.IsControler,1,nil,1-tp)
and e:GetHandler():IsLocation(LOCATION_GRAVE)
end
function s.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 s.setop(e,tp,eg,ep,ev,re,r,rp)
local c=e:GetHandler()
if c:IsRelateToEffect(e) and c:IsSSetable() then
Duel.SSet(tp,c)
end
end
function s.ctcon(e,tp,eg,ep,ev,re,r,rp)
local c=e:GetHandler()
return c:IsReason(REASON_EFFECT) and c:IsPreviousLocation(LOCATION_SZONE) and c:IsPreviousPosition(POS_FACEDOWN)
end
function s.ctfilter(c)
return c:IsFaceup() and c:IsSetCard(0x5f51) and c:IsCanAddCounter(0x1f51,1)
end
function s.cttg(e,tp,eg,ep,ev,re,r,rp,chk)
if chk==0 then return Duel.IsExistingMatchingCard(s.ctfilter,tp,LOCATION_MZONE,0,1,nil) end
end
function s.ctop(e,tp,eg,ep,ev,re,r,rp)
local g=Duel.GetMatchingGroup(s.ctfilter,tp,LOCATION_MZONE,0,nil)
if #g>0 then
Duel.Hint(HINT_SELECTMSG,tp,HINTMSG_FACEUP)
local tc=Duel.SelectMatchingCard(tp,s.ctfilter,tp,LOCATION_MZONE,0,1,1,nil):GetFirst()
if tc then
tc:AddCounter(0x1f51,1)
end
end
end
\ No newline at end of file
--终烬神
local s,id=GetID()
function s.initial_effect(c)
--Cannot Special Summon
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(aux.FALSE)
c:RegisterEffect(e0)
--Normal summon with 1 "终烬" tribute
local e1=Effect.CreateEffect(c)
e1:SetDescription(aux.Stringid(id,0))
e1:SetType(EFFECT_TYPE_SINGLE)
e1:SetProperty(EFFECT_FLAG_CANNOT_DISABLE+EFFECT_FLAG_UNCOPYABLE)
e1:SetCode(EFFECT_SUMMON_PROC)
e1:SetCondition(s.otcon)
e1:SetOperation(s.otop)
e1:SetValue(SUMMON_TYPE_ADVANCE)
c:RegisterEffect(e1)
--Additional summon (does not use normal summon)
local e2=Effect.CreateEffect(c)
e2:SetDescription(aux.Stringid(id,1))
e2:SetCategory(CATEGORY_SUMMON)
e2:SetType(EFFECT_TYPE_IGNITION)
e2:SetRange(LOCATION_HAND)
e2:SetCondition(s.sumcon)
e2:SetTarget(s.sumtg)
e2:SetOperation(s.sumop)
c:RegisterEffect(e2)
--Summon LP Change and restrictions
local e3=Effect.CreateEffect(c)
e3:SetType(EFFECT_TYPE_SINGLE+EFFECT_TYPE_CONTINUOUS)
e3:SetCode(EVENT_SUMMON_SUCCESS)
e3:SetOperation(s.lpop)
c:RegisterEffect(e3)
--Cannot be targeted or destroyed
local e4=Effect.CreateEffect(c)
e4:SetType(EFFECT_TYPE_SINGLE)
e4:SetCode(EFFECT_CANNOT_BE_EFFECT_TARGET)
e4:SetProperty(EFFECT_FLAG_SINGLE_RANGE)
e4:SetRange(LOCATION_MZONE)
e4:SetValue(1)
c:RegisterEffect(e4)
local e5=Effect.CreateEffect(c)
e5:SetType(EFFECT_TYPE_SINGLE)
e5:SetCode(EFFECT_INDESTRUCTABLE_EFFECT)
e5:SetProperty(EFFECT_FLAG_SINGLE_RANGE)
e5:SetRange(LOCATION_MZONE)
e5:SetValue(1)
c:RegisterEffect(e5)
local e6=Effect.CreateEffect(c)
e6:SetType(EFFECT_TYPE_SINGLE)
e6:SetCode(EFFECT_INDESTRUCTABLE_BATTLE)
e6:SetProperty(EFFECT_FLAG_SINGLE_RANGE)
e6:SetRange(LOCATION_MZONE)
e6:SetValue(1)
c:RegisterEffect(e6)
--Main effect
local e7=Effect.CreateEffect(c)
e7:SetDescription(aux.Stringid(id,2))
e7:SetCategory(CATEGORY_DECKDES+CATEGORY_SPECIAL_SUMMON+CATEGORY_DISABLE)
e7:SetType(EFFECT_TYPE_QUICK_O)
e7:SetCode(EVENT_FREE_CHAIN)
e7:SetRange(LOCATION_MZONE)
e7:SetCountLimit(1)
e7:SetTarget(s.efftg)
e7:SetOperation(s.effop)
c:RegisterEffect(e7)
Duel.AddCustomActivityCounter(id,ACTIVITY_SUMMON,s.counterfilter)
Duel.AddCustomActivityCounter(id,ACTIVITY_SPSUMMON,s.counterfilter)
end
function s.otcon(e,c,minc)
if c==nil then return true end
local tp=c:GetControler()
local mg=Duel.GetMatchingGroup(s.otfilter,tp,LOCATION_MZONE,LOCATION_MZONE,nil,tp)
return c:IsLevelAbove(7) and minc<=1 and mg:GetCount()>=1
end
function s.otop(e,tp,eg,ep,ev,re,r,rp,c)
local mg=Duel.GetMatchingGroup(s.otfilter,tp,LOCATION_MZONE,LOCATION_MZONE,nil,tp)
Duel.Hint(HINT_SELECTMSG,tp,HINTMSG_RELEASE)
local sg=mg:Select(tp,1,1,nil)
c:SetMaterial(sg)
Duel.Release(sg,REASON_SUMMON+REASON_MATERIAL)
end
function s.otfilter(c,tp)
return c:IsSetCard(0x5f51) and c:IsReleasable() and (c:IsControler(tp) or c:IsFaceup())
end
function s.sumcon(e,tp,eg,ep,ev,re,r,rp)
return Duel.IsExistingMatchingCard(s.otfilter,tp,LOCATION_MZONE,0,1,nil)
end
function s.sumtg(e,tp,eg,ep,ev,re,r,rp,chk)
local c=e:GetHandler()
if chk==0 then return c:IsSummonable(true,nil) end
Duel.SetOperationInfo(0,CATEGORY_SUMMON,c,1,0,0)
end
function s.sumop(e,tp,eg,ep,ev,re,r,rp)
local c=e:GetHandler()
if c:IsRelateToEffect(e) then
Duel.Summon(tp,c,true,nil)
end
end
function s.lpop(e,tp,eg,ep,ev,re,r,rp)
local c=e:GetHandler()
if Duel.GetLP(tp)~=1 then
Duel.SetLP(tp,1)
end
local e1=Effect.CreateEffect(c)
e1:SetType(EFFECT_TYPE_FIELD)
e1:SetProperty(EFFECT_FLAG_PLAYER_TARGET+EFFECT_FLAG_OATH)
e1:SetCode(EFFECT_CANNOT_SPECIAL_SUMMON)
e1:SetReset(RESET_PHASE+PHASE_END)
e1:SetTargetRange(1,0)
e1:SetTarget(s.splimit)
Duel.RegisterEffect(e1,tp)
local e2=e1:Clone()
e2:SetCode(EFFECT_CANNOT_SUMMON)
Duel.RegisterEffect(e2,tp)
end
function s.counterfilter(c)
return c:IsSetCard(0x5f51)
end
function s.splimit(e,c)
return not c:IsSetCard(0x5f51)
end
function s.efftg(e,tp,eg,ep,ev,re,r,rp,chk)
local ct=Duel.GetCounter(tp,1,0,0x1f51)
local flag=false
local numbers={}
for i=1,ct do
if Duel.IsCanRemoveCounter(tp,1,0,0x1f51,i,REASON_COST) and Duel.GetFieldGroupCount(1-tp,LOCATION_DECK,0)>=i then
table.insert(numbers,i)
flag=true
end
end
if chk==0 then
return flag
end
if #numbers>0 then
if #numbers>1 then
ct=Duel.AnnounceNumber(tp,table.unpack(numbers))
else
ct=numbers[1]
end
Duel.RemoveCounter(tp,1,0,0x1f51,ct,REASON_COST)
e:SetLabel(ct)
Duel.SetOperationInfo(0,CATEGORY_DECKDES,nil,0,1-tp,ct)
Duel.SetOperationInfo(0,CATEGORY_SPECIAL_SUMMON,nil,0,tp,LOCATION_HAND+LOCATION_DECK+LOCATION_GRAVE)
end
end
function s.spfilter(c,e,tp)
return c:IsSetCard(0x5f51) and not c:IsCode(17338860) and c:IsType(TYPE_MONSTER) and c:IsCanBeSpecialSummoned(e,0,tp,true,false)
end
function s.effop(e,tp,eg,ep,ev,re,r,rp)
local ct=e:GetLabel()
if ct<=0 then return end
--Destroy cards from top of opponent's deck
local g=Duel.GetDecktopGroup(1-tp,ct)
if #g>0 then
Duel.DisableShuffleCheck()
Duel.Destroy(g,REASON_EFFECT)
--Register the destroyed cards for negation
local tc=g:GetFirst()
while tc do
local code=tc:GetOriginalCodeRule()
local e1=Effect.CreateEffect(e:GetHandler())
e1:SetType(EFFECT_TYPE_FIELD)
e1:SetCode(EFFECT_DISABLE)
e1:SetTargetRange(LOCATION_ONFIELD+LOCATION_GRAVE+LOCATION_REMOVED,LOCATION_ONFIELD+LOCATION_GRAVE+LOCATION_REMOVED)
e1:SetTarget(s.distg)
e1:SetLabel(code)
e1:SetReset(RESET_PHASE+PHASE_END,2)
Duel.RegisterEffect(e1,tp)
local e2=Effect.CreateEffect(e:GetHandler())
e2:SetType(EFFECT_TYPE_FIELD+EFFECT_TYPE_CONTINUOUS)
e2:SetCode(EVENT_CHAIN_SOLVING)
e2:SetCondition(s.discon)
e2:SetOperation(s.disop)
e2:SetLabel(code)
e2:SetReset(RESET_PHASE+PHASE_END,2)
Duel.RegisterEffect(e2,tp)
tc=g:GetNext()
end
--Special summon
if Duel.GetLocationCount(tp,LOCATION_MZONE)>0
and Duel.IsExistingMatchingCard(aux.NecroValleyFilter(s.spfilter),tp,LOCATION_HAND+LOCATION_DECK+LOCATION_GRAVE,0,1,nil,e,tp)
and Duel.SelectYesNo(tp,aux.Stringid(id,3)) then
Duel.Hint(HINT_SELECTMSG,tp,HINTMSG_SPSUMMON)
local sg=Duel.SelectMatchingCard(tp,aux.NecroValleyFilter(s.spfilter),tp,LOCATION_HAND+LOCATION_DECK+LOCATION_GRAVE,0,1,1,nil,e,tp)
if #sg>0 then
Duel.SpecialSummon(sg,0,tp,tp,true,false,POS_FACEUP)
end
end
end
end
function s.distg(e,c)
return c:IsOriginalCodeRule(e:GetLabel())
end
function s.discon(e,tp,eg,ep,ev,re,r,rp)
return re:GetHandler():IsOriginalCodeRule(e:GetLabel())
end
function s.disop(e,tp,eg,ep,ev,re,r,rp)
Duel.NegateEffect(ev)
end
\ No newline at end of file
--终烬超验 岸彼斐子
local s,id=GetID()
function s.initial_effect(c)
--xyz summon
c:EnableReviveLimit()
aux.AddXyzProcedureLevelFree(c,s.mfilter,s.xyzcheck,3,3,s.ovfilter,aux.Stringid(id,0))
c:SetSPSummonOnce(id)
--LP change and restrictions on special summon
local e0=Effect.CreateEffect(c)
e0:SetType(EFFECT_TYPE_SINGLE+EFFECT_TYPE_CONTINUOUS)
e0:SetCode(EVENT_SPSUMMON_SUCCESS)
e0:SetOperation(s.lpop)
c:RegisterEffect(e0)
--immune
local e1=Effect.CreateEffect(c)
e1:SetType(EFFECT_TYPE_FIELD)
e1:SetCode(EFFECT_CANNOT_SELECT_BATTLE_TARGET)
e1:SetRange(LOCATION_MZONE)
e1:SetTargetRange(LOCATION_MZONE,LOCATION_MZONE)
e1:SetCondition(s.imcon)
e1:SetValue(s.imval)
c:RegisterEffect(e1)
local e2=Effect.CreateEffect(c)
e2:SetType(EFFECT_TYPE_FIELD)
e2:SetCode(EFFECT_CANNOT_BE_EFFECT_TARGET)
e2:SetProperty(EFFECT_FLAG_IGNORE_IMMUNE)
e2:SetRange(LOCATION_MZONE)
e2:SetTargetRange(LOCATION_MZONE,LOCATION_MZONE)
e2:SetCondition(s.imcon)
e2:SetTarget(s.imtg)
e2:SetValue(1)
c:RegisterEffect(e2)
--atk/def up
local e3=Effect.CreateEffect(c)
e3:SetType(EFFECT_TYPE_SINGLE)
e3:SetCode(EFFECT_UPDATE_ATTACK)
e3:SetProperty(EFFECT_FLAG_SINGLE_RANGE)
e3:SetRange(LOCATION_MZONE)
e3:SetValue(s.atkval)
c:RegisterEffect(e3)
local e4=e3:Clone()
e4:SetCode(EFFECT_UPDATE_DEFENSE)
c:RegisterEffect(e4)
--destroy and negate (ignition when no counters)
local e5=Effect.CreateEffect(c)
e5:SetDescription(aux.Stringid(id,1))
e5:SetCategory(CATEGORY_DESTROY+CATEGORY_DISABLE)
e5:SetType(EFFECT_TYPE_IGNITION)
e5:SetRange(LOCATION_MZONE)
e5:SetCountLimit(1)
e5:SetCondition(s.descon1)
e5:SetCost(s.descost)
e5:SetTarget(s.destg)
e5:SetOperation(s.desop)
c:RegisterEffect(e5)
--destroy and negate (quick effect when has counters)
local e6=Effect.CreateEffect(c)
e6:SetDescription(aux.Stringid(id,1))
e6:SetCategory(CATEGORY_DESTROY+CATEGORY_DISABLE)
e6:SetType(EFFECT_TYPE_QUICK_O)
e6:SetCode(EVENT_FREE_CHAIN)
e6:SetRange(LOCATION_MZONE)
e6:SetCountLimit(1)
e6:SetCondition(s.descon2)
e6:SetCost(s.descost)
e6:SetTarget(s.destg)
e6:SetOperation(s.desop)
c:RegisterEffect(e6)
--return to extra and special summon
local e7=Effect.CreateEffect(c)
e7:SetDescription(aux.Stringid(id,2))
e7:SetCategory(CATEGORY_TOEXTRA+CATEGORY_SPECIAL_SUMMON+CATEGORY_COUNTER)
e7:SetType(EFFECT_TYPE_FIELD+EFFECT_TYPE_TRIGGER_F)
e7:SetCode(EVENT_PHASE+PHASE_END)
e7:SetRange(LOCATION_MZONE)
e7:SetCountLimit(1)
e7:SetCondition(s.retcon)
e7:SetTarget(s.rettg)
e7:SetOperation(s.retop)
c:RegisterEffect(e7)
Duel.AddCustomActivityCounter(id,ACTIVITY_SUMMON,s.counterfilter)
Duel.AddCustomActivityCounter(id,ACTIVITY_SPSUMMON,s.counterfilter)
end
function s.mfilter(c)
return c:IsSetCard(0x5f51) and c:IsLevelAbove(1)
end
function s.xyzcheck(g,xyzc)
return g:GetClassCount(Card.GetLevel)==1
end
function s.ovfilter(c)
return c:IsFaceup() and c:IsCode(17338860) and c:GetCounter(0x1f51)>=3
end
function s.lpop(e,tp,eg,ep,ev,re,r,rp)
local c=e:GetHandler()
if Duel.GetLP(tp)~=1 then
Duel.SetLP(tp,1)
end
local e1=Effect.CreateEffect(c)
e1:SetType(EFFECT_TYPE_FIELD)
e1:SetProperty(EFFECT_FLAG_PLAYER_TARGET+EFFECT_FLAG_OATH)
e1:SetCode(EFFECT_CANNOT_SPECIAL_SUMMON)
e1:SetReset(RESET_PHASE+PHASE_END)
e1:SetTargetRange(1,0)
e1:SetTarget(s.splimit)
Duel.RegisterEffect(e1,tp)
local e2=e1:Clone()
e2:SetCode(EFFECT_CANNOT_SUMMON)
Duel.RegisterEffect(e2,tp)
end
function s.counterfilter(c)
return c:IsSetCard(0x5f51)
end
function s.splimit(e,c)
return not c:IsSetCard(0x5f51)
end
function s.imcon(e)
return e:GetHandler():GetSequence()>4
end
function s.imval(e,c)
return c:IsSetCard(0x5f51)
end
function s.imtg(e,c)
return c:IsSetCard(0x5f51)
end
function s.atkval(e,c)
local g=c:GetOverlayGroup()
return g:GetSum(Card.GetLevel)*500
end
function s.descon1(e,tp,eg,ep,ev,re,r,rp)
return e:GetHandler():GetCounter(0x1f51)==0
end
function s.descon2(e,tp,eg,ep,ev,re,r,rp)
return e:GetHandler():GetCounter(0x1f51)>0
end
function s.descost(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 s.destg(e,tp,eg,ep,ev,re,r,rp,chk)
if chk==0 then return Duel.IsExistingMatchingCard(aux.TRUE,tp,LOCATION_ONFIELD,LOCATION_ONFIELD,1,nil) end
local g=Duel.GetMatchingGroup(aux.TRUE,tp,LOCATION_ONFIELD,LOCATION_ONFIELD,nil)
Duel.SetOperationInfo(0,CATEGORY_DESTROY,g,1,0,0)
end
function s.desop(e,tp,eg,ep,ev,re,r,rp)
Duel.Hint(HINT_SELECTMSG,tp,HINTMSG_DESTROY)
local g=Duel.SelectMatchingCard(tp,aux.TRUE,tp,LOCATION_ONFIELD,LOCATION_ONFIELD,1,1,nil)
if #g>0 then
local tc=g:GetFirst()
Duel.HintSelection(g)
if Duel.Destroy(tc,REASON_EFFECT)>0 then
local code=tc:GetOriginalCodeRule()
local e1=Effect.CreateEffect(e:GetHandler())
e1:SetType(EFFECT_TYPE_FIELD)
e1:SetCode(EFFECT_DISABLE)
e1:SetTargetRange(LOCATION_ONFIELD+LOCATION_GRAVE+LOCATION_REMOVED,LOCATION_ONFIELD+LOCATION_GRAVE+LOCATION_REMOVED)
e1:SetTarget(s.distg)
e1:SetLabel(code)
e1:SetReset(RESET_PHASE+PHASE_END,2)
Duel.RegisterEffect(e1,tp)
local e2=Effect.CreateEffect(e:GetHandler())
e2:SetType(EFFECT_TYPE_FIELD+EFFECT_TYPE_CONTINUOUS)
e2:SetCode(EVENT_CHAIN_SOLVING)
e2:SetCondition(s.discon)
e2:SetOperation(s.disop)
e2:SetLabel(code)
e2:SetReset(RESET_PHASE+PHASE_END,2)
Duel.RegisterEffect(e2,tp)
end
end
end
function s.distg(e,c)
return c:IsOriginalCodeRule(e:GetLabel())
end
function s.discon(e,tp,eg,ep,ev,re,r,rp)
return re:GetHandler():IsOriginalCodeRule(e:GetLabel())
end
function s.disop(e,tp,eg,ep,ev,re,r,rp)
Duel.NegateEffect(ev)
end
function s.retcon(e,tp,eg,ep,ev,re,r,rp)
return Duel.GetTurnPlayer()==1-tp
end
function s.spfilter(c,e,tp)
return c:IsSetCard(0x5f51) and c:IsType(TYPE_MONSTER) and c:IsCanBeSpecialSummoned(e,0,tp,true,false)
end
function s.ctfilter(c)
return c:IsFaceup() and c:IsSetCard(0x5f51) and c:IsCanAddCounter(0x1f51,1)
end
function s.rettg(e,tp,eg,ep,ev,re,r,rp,chk)
if chk==0 then return true end
Duel.SetOperationInfo(0,CATEGORY_TOEXTRA,e:GetHandler(),1,0,0)
Duel.SetOperationInfo(0,CATEGORY_SPECIAL_SUMMON,nil,1,tp,LOCATION_HAND+LOCATION_DECK+LOCATION_GRAVE)
end
function s.retop(e,tp,eg,ep,ev,re,r,rp)
local c=e:GetHandler()
if c:IsRelateToEffect(e) and Duel.SendtoDeck(c,nil,SEQ_DECKTOP,REASON_EFFECT)~=0 then
if Duel.GetLocationCount(tp,LOCATION_MZONE)<=0 then return end
Duel.Hint(HINT_SELECTMSG,tp,HINTMSG_SPSUMMON)
local g=Duel.SelectMatchingCard(tp,aux.NecroValleyFilter(s.spfilter),tp,LOCATION_HAND+LOCATION_DECK+LOCATION_GRAVE,0,1,1,nil,e,tp)
if #g>0 then
Duel.SpecialSummon(g,0,tp,tp,true,false,POS_FACEUP)
local ctg=Duel.GetMatchingGroup(s.ctfilter,tp,LOCATION_MZONE,0,nil)
local tc=ctg:GetFirst()
while tc do
tc:AddCounter(0x1f51,1)
tc=ctg:GetNext()
end
end
end
end
\ No newline at end of file
--终烬本源 赫拉克利特
local s,id=GetID()
function s.initial_effect(c)
c:EnableReviveLimit()
--link summon
aux.AddLinkProcedure(c,c17338940.matfilter,1,1)
--cannot be link material
local e0=Effect.CreateEffect(c)
e0:SetType(EFFECT_TYPE_SINGLE)
e0:SetProperty(EFFECT_FLAG_CANNOT_DISABLE+EFFECT_FLAG_UNCOPYABLE)
e0:SetCode(EFFECT_CANNOT_BE_LINK_MATERIAL)
e0:SetValue(1)
c:RegisterEffect(e0)
--LP change and restrictions on special summon
local e1=Effect.CreateEffect(c)
e1:SetType(EFFECT_TYPE_SINGLE+EFFECT_TYPE_CONTINUOUS)
e1:SetCode(EVENT_SPSUMMON_SUCCESS)
e1:SetOperation(s.lpop)
c:RegisterEffect(e1)
--set spell/trap
local e2=Effect.CreateEffect(c)
e2:SetDescription(aux.Stringid(id,0))
e2:SetCategory(CATEGORY_LEAVE_GRAVE+CATEGORY_DESTROY)
e2:SetType(EFFECT_TYPE_SINGLE+EFFECT_TYPE_TRIGGER_O)
e2:SetCode(EVENT_SPSUMMON_SUCCESS)
e2:SetProperty(EFFECT_FLAG_DELAY)
e2:SetCondition(s.setcon)
e2:SetTarget(s.settg)
e2:SetOperation(s.setop)
c:RegisterEffect(e2)
--no damage
local e3=Effect.CreateEffect(c)
e3:SetType(EFFECT_TYPE_FIELD)
e3:SetCode(EFFECT_CHANGE_DAMAGE)
e3:SetProperty(EFFECT_FLAG_PLAYER_TARGET)
e3:SetRange(LOCATION_MZONE)
e3:SetTargetRange(1,0)
e3:SetValue(s.damval)
c:RegisterEffect(e3)
local e4=e3:Clone()
e4:SetCode(EFFECT_NO_EFFECT_DAMAGE)
c:RegisterEffect(e4)
--Record counter on leave
local e5=Effect.CreateEffect(c)
e5:SetType(EFFECT_TYPE_SINGLE+EFFECT_TYPE_CONTINUOUS)
e5:SetCode(EVENT_LEAVE_FIELD_P)
e5:SetProperty(EFFECT_FLAG_CANNOT_DISABLE)
e5:SetOperation(s.regop)
c:RegisterEffect(e5)
--Place counters when destroyed
local e6=Effect.CreateEffect(c)
e6:SetDescription(aux.Stringid(id,1))
e6:SetCategory(CATEGORY_COUNTER)
e6:SetType(EFFECT_TYPE_SINGLE+EFFECT_TYPE_TRIGGER_O)
e6:SetCode(EVENT_DESTROYED)
e6:SetProperty(EFFECT_FLAG_DELAY)
e6:SetCondition(s.ctcon)
e6:SetTarget(s.cttg)
e6:SetOperation(s.ctop)
e6:SetLabelObject(e5)
c:RegisterEffect(e6)
Duel.AddCustomActivityCounter(id,ACTIVITY_SUMMON,s.counterfilter)
Duel.AddCustomActivityCounter(id,ACTIVITY_SPSUMMON,s.counterfilter)
end
function c17338940.matfilter(c)
return c:IsSummonType(SUMMON_TYPE_NORMAL) and c:IsSetCard(0x5f51)
end
function s.lpop(e,tp,eg,ep,ev,re,r,rp)
local c=e:GetHandler()
if Duel.GetLP(tp)~=1 then
Duel.SetLP(tp,1)
end
local e1=Effect.CreateEffect(c)
e1:SetType(EFFECT_TYPE_FIELD)
e1:SetProperty(EFFECT_FLAG_PLAYER_TARGET+EFFECT_FLAG_OATH)
e1:SetCode(EFFECT_CANNOT_SPECIAL_SUMMON)
e1:SetReset(RESET_PHASE+PHASE_END)
e1:SetTargetRange(1,0)
e1:SetTarget(s.splimit)
Duel.RegisterEffect(e1,tp)
local e2=e1:Clone()
e2:SetCode(EFFECT_CANNOT_SUMMON)
Duel.RegisterEffect(e2,tp)
end
function s.counterfilter(c)
return c:IsSetCard(0x5f51)
end
function s.splimit(e,c)
return not c:IsSetCard(0x5f51)
end
function s.setcon(e,tp,eg,ep,ev,re,r,rp)
return e:GetHandler():IsSummonType(SUMMON_TYPE_LINK)
end
function s.setfilter(c)
return c:IsSetCard(0x5f51) and c:IsType(TYPE_SPELL+TYPE_TRAP) and c:IsSSetable()
end
function s.settg(e,tp,eg,ep,ev,re,r,rp,chk)
if chk==0 then return Duel.IsExistingMatchingCard(s.setfilter,tp,LOCATION_DECK+LOCATION_GRAVE,0,1,nil) end
Duel.SetOperationInfo(0,CATEGORY_LEAVE_GRAVE,nil,1,tp,LOCATION_DECK+LOCATION_GRAVE)
Duel.SetOperationInfo(0,CATEGORY_DESTROY,nil,1,tp,LOCATION_ONFIELD)
end
function s.setop(e,tp,eg,ep,ev,re,r,rp)
Duel.Hint(HINT_SELECTMSG,tp,HINTMSG_SET)
local g=Duel.SelectMatchingCard(tp,aux.NecroValleyFilter(s.setfilter),tp,LOCATION_DECK+LOCATION_GRAVE,0,1,1,nil)
if #g>0 and Duel.SSet(tp,g:GetFirst())>0 then
Duel.Hint(HINT_SELECTMSG,tp,HINTMSG_DESTROY)
local dg=Duel.SelectMatchingCard(tp,nil,tp,LOCATION_ONFIELD,0,1,1,nil)
if #dg>0 then
Duel.HintSelection(dg)
Duel.Destroy(dg,REASON_EFFECT)
end
end
end
function s.damfilter(c)
return c:IsSetCard(0x5f51) and not c:IsCode(id)
end
function s.damval(e,re,val,r,rp,rc)
if Duel.IsExistingMatchingCard(s.damfilter,e:GetHandlerPlayer(),LOCATION_ONFIELD,0,1,nil) then
return 0
else
return val
end
end
function s.regop(e,tp,eg,ep,ev,re,r,rp)
local c=e:GetHandler()
local ct=c:GetCounter(0x1f51)
e:SetLabel(ct)
end
function s.ctcon(e,tp,eg,ep,ev,re,r,rp)
local c=e:GetHandler()
local ct=e:GetLabelObject():GetLabel()
e:SetLabel(ct)
return (c:IsReason(REASON_EFFECT) or c:IsReason(REASON_BATTLE)) and c:IsPreviousLocation(LOCATION_MZONE)
end
function s.ctfilter(c)
return c:IsFaceup() and c:IsSetCard(0x5f51) and c:IsCanAddCounter(0x1f51,1)
end
function s.cttg(e,tp,eg,ep,ev,re,r,rp,chk)
if chk==0 then return Duel.IsExistingMatchingCard(s.ctfilter,tp,LOCATION_MZONE,0,1,nil) end
local ct=e:GetLabel()
Duel.SetOperationInfo(0,CATEGORY_COUNTER,nil,ct+1,0,0x1f51)
end
function s.ctop(e,tp,eg,ep,ev,re,r,rp)
local g=Duel.GetMatchingGroup(s.ctfilter,tp,LOCATION_MZONE,0,nil)
if #g>0 then
local ct=e:GetLabel()
local addct=ct+1
if addct>0 then
Duel.Hint(HINT_SELECTMSG,tp,HINTMSG_COUNTER)
local tc=Duel.SelectMatchingCard(tp,s.ctfilter,tp,LOCATION_MZONE,0,1,1,nil):GetFirst()
if tc then
tc:AddCounter(0x1f51,addct)
end
end
end
end
\ No newline at end of file
--思绪 宿翼伏枥
local s,id,o=GetID()
function s.initial_effect(c)
c:EnableReviveLimit()
aux.AddFusionProcFunRep(c,s.matfilter,5,true)
local e1=Effect.CreateEffect(c)
e1:SetType(EFFECT_TYPE_FIELD+EFFECT_TYPE_CONTINUOUS)
e1:SetRange(LOCATION_EXTRA)
e1:SetCode(EVENT_ADJUST)
e1:SetCondition(s.condition)
e1:SetCost(s.cost)
e1:SetOperation(s.operation)
c:RegisterEffect(e1)
local e2=Effect.CreateEffect(c)
e2:SetType(EFFECT_TYPE_SINGLE+EFFECT_TYPE_CONTINUOUS)
e2:SetCode(EVENT_SPSUMMON_SUCCESS)
e2:SetOperation(s.actlimitop)
c:RegisterEffect(e2)
--remove
local e3=Effect.CreateEffect(c)
e3:SetDescription(aux.Stringid(id,0))
e3:SetCategory(CATEGORY_TODECK+CATEGORY_DRAW)
e3:SetType(EFFECT_TYPE_FIELD+EFFECT_TYPE_TRIGGER_F)
e3:SetCode(EVENT_CHAINING)
e3:SetRange(LOCATION_MZONE)
e3:SetCondition(s.drcon)
e3:SetTarget(s.drtg)
e3:SetOperation(s.drop)
c:RegisterEffect(e3)
--indes
local e4=Effect.CreateEffect(c)
e4:SetType(EFFECT_TYPE_FIELD)
e4:SetCode(EFFECT_INDESTRUCTABLE_BATTLE)
e4:SetRange(LOCATION_MZONE)
e4:SetTargetRange(LOCATION_MZONE,LOCATION_MZONE)
e4:SetTarget(s.indtg)
e4:SetValue(1)
c:RegisterEffect(e4)
end
function s.matfilter(c)
return not c:IsOnField() and c:IsFusionSetCard(0x6f52)
end
function s.opfilter(c)
return c:IsSetCard(0x6f52) and (c:IsAbleToHand() or c:IsAbleToGrave())
end
function s.condition(e,tp,eg,ep,ev,re,r,rp)
return Duel.GetTurnCount()==1 and e:GetHandler():GetFlagEffect(id)==0 and not Duel.CheckPhaseActivity()
end
function s.cost(e,tp,eg,ep,ev,re,r,rp,chk)
if chk==0 then return not e:GetHandler():IsPublic() end
end
function s.operation(e,tp,eg,ep,ev,re,r,rp)
local c=e:GetHandler()
Duel.ConfirmCards(1-tp,c)
-- 特殊召唤部分
if Duel.GetLocationCountFromEx(tp,tp,nil,c)>0 and c:IsCanBeSpecialSummoned(e,0,tp,false,false) then
Duel.SpecialSummon(c,0,tp,tp,false,false,POS_FACEUP)
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,true)
Duel.RegisterFlagEffect(tp,id,RESET_EVENT+RESETS_STANDARD+RESET_PHASE+PHASE_END,0,1)
end
-- 检索部分(修改为1张卡)
local g=Duel.GetMatchingGroup(s.opfilter,tp,LOCATION_DECK,0,nil)
if #g>0 then
Duel.Hint(HINT_SELECTMSG,tp,HINTMSG_OPERATECARD)
local tg=g:Select(tp,1,1,nil)
if #tg>0 then
local tc=tg:GetFirst()
local flag1=tc:IsAbleToHand()
local flag2=tc:IsAbleToGrave()
if flag1 and flag2 then
local op=Duel.SelectOption(tp,aux.Stringid(id,1),aux.Stringid(id,2))
if op==0 then
Duel.SendtoHand(tc,nil,REASON_EFFECT)
Duel.ConfirmCards(1-tp,tc)
else
Duel.SendtoGrave(tc,REASON_EFFECT)
end
elseif flag1 then
Duel.SendtoHand(tc,nil,REASON_EFFECT)
Duel.ConfirmCards(1-tp,tc)
elseif flag2 then
Duel.SendtoGrave(tc,REASON_EFFECT)
end
end
end
end
function s.actlimitop(e,tp,eg,ep,ev,re,r,rp)
local c=e:GetHandler()
local e1=Effect.CreateEffect(c)
e1:SetType(EFFECT_TYPE_FIELD)
e1:SetProperty(EFFECT_FLAG_PLAYER_TARGET)
e1:SetCode(EFFECT_CANNOT_ACTIVATE)
e1:SetTargetRange(1,0)
e1:SetValue(s.aclimit)
Duel.RegisterEffect(e1,tp)
end
function s.aclimit(e,re,tp)
return not re:GetHandler():IsSetCard(0x6f52)
end
function s.drcon(e,tp,eg,ep,ev,re,r,rp)
return rp==tp and re:IsActiveType(TYPE_SPELL) and re:IsActiveType(TYPE_QUICKPLAY) and re:IsHasType(EFFECT_TYPE_ACTIVATE)
and re:GetHandler():IsSetCard(0x6f52)
end
function s.drtg(e,tp,eg,ep,ev,re,r,rp,chk)
if chk==0 then return true end
Duel.SetOperationInfo(0,CATEGORY_TODECK,nil,1,tp,LOCATION_HAND)
Duel.SetOperationInfo(0,CATEGORY_DRAW,nil,0,tp,1)
end
function s.drop(e,tp,eg,ep,ev,re,r,rp)
Duel.Draw(tp,1,REASON_EFFECT)
Duel.BreakEffect()
local hg=Duel.GetMatchingGroup(Card.IsAbleToDeck,tp,LOCATION_HAND,0,nil)
local sg=Group.CreateGroup()
if #hg<=3 then
sg=hg
else
Duel.Hint(HINT_SELECTMSG,tp,HINTMSG_TODECK)
sg=hg:Select(tp,1,1,nil)
end
Duel.SendtoDeck(sg,nil,2,REASON_EFFECT)
end
function s.indtg(e,c)
local tc=e:GetHandler()
return c==tc or c==tc:GetBattleTarget()
end
\ No newline at end of file
--新卡16:权能解放 阿尔迪巴兰
local s,id,o=GetID()
function s.initial_effect(c)
c:SetUniqueOnField(1,1,id)
--special summon when sent to GY or banished (effect outside of text - no chain)
local e0=Effect.CreateEffect(c)
e0:SetType(EFFECT_TYPE_SINGLE+EFFECT_TYPE_CONTINUOUS)
e0:SetCode(EVENT_TO_GRAVE)
e0:SetOperation(s.spreg)
c:RegisterEffect(e0)
local e0b=e0:Clone()
e0b:SetCode(EVENT_REMOVE)
c:RegisterEffect(e0b)
--effect activation limit
local e1=Effect.CreateEffect(c)
e1:SetType(EFFECT_TYPE_FIELD)
e1:SetCode(EFFECT_CANNOT_ACTIVATE)
e1:SetProperty(EFFECT_FLAG_PLAYER_TARGET)
e1:SetRange(LOCATION_MZONE)
e1:SetTargetRange(1,0)
e1:SetValue(s.aclimit)
c:RegisterEffect(e1)
--banish and damage
local e2=Effect.CreateEffect(c)
e2:SetDescription(aux.Stringid(id,0))
e2:SetCategory(CATEGORY_REMOVE+CATEGORY_DAMAGE)
e2:SetType(EFFECT_TYPE_QUICK_O)
e2:SetCode(EVENT_FREE_CHAIN)
e2:SetRange(LOCATION_HAND+LOCATION_MZONE)
e2:SetCountLimit(1,id)
e2:SetCost(s.rmcost)
e2:SetTarget(s.rmtg)
e2:SetOperation(s.rmop)
c:RegisterEffect(e2)
--battle damage to 0
local e3=Effect.CreateEffect(c)
e3:SetType(EFFECT_TYPE_SINGLE)
e3:SetCode(EFFECT_AVOID_BATTLE_DAMAGE)
e3:SetValue(1)
c:RegisterEffect(e3)
--banish card
local e4=Effect.CreateEffect(c)
e4:SetDescription(aux.Stringid(id,1))
e4:SetCategory(CATEGORY_REMOVE)
e4:SetType(EFFECT_TYPE_QUICK_O)
e4:SetProperty(EFFECT_FLAG_CARD_TARGET+EFFECT_FLAG_DAMAGE_STEP+EFFECT_FLAG_CANNOT_INACTIVATE+EFFECT_FLAG_CANNOT_DISABLE+EFFECT_FLAG_CAN_FORBIDDEN)
e4:SetCode(EVENT_FREE_CHAIN)
e4:SetRange(LOCATION_MZONE)
e4:SetHintTiming(0,TIMINGS_CHECK_MONSTER+TIMING_END_PHASE)
e4:SetCountLimit(1,id+o)
e4:SetCost(s.bancost)
e4:SetTarget(s.bantg)
e4:SetOperation(s.banop)
c:RegisterEffect(e4)
end
function s.spreg(e,tp,eg,ep,ev,re,r,rp)
local c=e:GetHandler()
if c:IsPreviousLocation(LOCATION_ONFIELD+LOCATION_HAND+LOCATION_DECK)
and Duel.GetLocationCount(tp,LOCATION_MZONE)>0
and c:IsCanBeSpecialSummoned(e,0,tp,false,false) then
Duel.SpecialSummon(c,0,tp,tp,false,false,POS_FACEUP)
end
end
function s.aclimit(e,re,tp)
local rc=re:GetHandler()
return not rc:IsSetCard(0x5f52) -- 世界意志字段
end
function s.cfilter(c,tp)
return c:IsSetCard(0x5f52) and c:IsAbleToRemoveAsCost()
end
function s.rmcost(e,tp,eg,ep,ev,re,r,rp,chk)
local c=e:GetHandler()
if chk==0 then
-- 必须包含这张卡
if not c:IsAbleToRemoveAsCost() then return false end
local loc=LOCATION_HAND+LOCATION_DECK+LOCATION_MZONE+LOCATION_GRAVE
local g=Duel.GetMatchingGroup(s.cfilter,tp,loc,0,nil)
return g:GetCount()>0 and g:IsContains(c)
end
local loc=LOCATION_HAND+LOCATION_DECK+LOCATION_MZONE+LOCATION_GRAVE
local g=Duel.GetMatchingGroup(s.cfilter,tp,loc,0,nil)
-- 确保包含这张卡
if not g:IsContains(c) then return false end
Duel.Hint(HINT_SELECTMSG,tp,HINTMSG_REMOVE)
local sg=g:SelectSubGroup(tp,aux.dncheck,false,1,5)
-- 再次确保包含这张卡
if not sg:IsContains(c) then
-- 如果不包含,强制添加
sg:AddCard(c)
end
e:SetLabel(sg:GetCount())
Duel.Remove(sg,POS_FACEUP,REASON_COST)
end
function s.rmtg(e,tp,eg,ep,ev,re,r,rp,chk)
if chk==0 then return true end
Duel.SetOperationInfo(0,CATEGORY_DAMAGE,nil,0,1-tp,1000)
Duel.SetOperationInfo(0,CATEGORY_REMOVE,nil,0,1-tp,LOCATION_EXTRA)
end
function s.rmop(e,tp,eg,ep,ev,re,r,rp)
local ct=e:GetLabel()
if Duel.Damage(1-tp,1000,REASON_EFFECT)>0 and ct>0 then
-- 添加"那之后,可以"的选择
if Duel.SelectYesNo(tp,aux.Stringid(id,2)) then
local g=Duel.GetFieldGroup(tp,0,LOCATION_EXTRA)
if #g>0 then
Duel.ConfirmCards(tp,g)
Duel.Hint(HINT_SELECTMSG,tp,HINTMSG_REMOVE)
local sg=g:FilterSelect(tp,Card.IsAbleToRemove,1,ct,nil,tp,POS_FACEDOWN)
if #sg>0 then
Duel.Remove(sg,POS_FACEDOWN,REASON_EFFECT)
end
Duel.ShuffleExtra(1-tp)
end
end
end
end
function s.bancost(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 s.bantg(e,tp,eg,ep,ev,re,r,rp,chk,chkc)
if chkc then return chkc:IsOnField() and chkc:IsAbleToRemove(tp,POS_FACEDOWN) end
if chk==0 then return Duel.IsExistingTarget(Card.IsAbleToRemove,tp,LOCATION_ONFIELD,LOCATION_ONFIELD,1,nil,tp,POS_FACEDOWN) end
Duel.Hint(HINT_SELECTMSG,tp,HINTMSG_REMOVE)
local g=Duel.SelectTarget(tp,Card.IsAbleToRemove,tp,LOCATION_ONFIELD,LOCATION_ONFIELD,1,1,nil,tp,POS_FACEDOWN)
Duel.SetOperationInfo(0,CATEGORY_REMOVE,g,1,0,0)
end
function s.banop(e,tp,eg,ep,ev,re,r,rp)
local tc=Duel.GetFirstTarget()
if tc and tc:IsRelateToEffect(e) then
Duel.Remove(tc,POS_FACEDOWN,REASON_EFFECT)
end
end
\ No newline at end of file
--终烬圣界
local s,id=GetID()
function s.initial_effect(c)
--Activate
local e0=Effect.CreateEffect(c)
e0:SetType(EFFECT_TYPE_ACTIVATE)
e0:SetCode(EVENT_FREE_CHAIN)
e0:SetOperation(s.actop)
c:RegisterEffect(e0)
--Main effect - choose 1 of 4 effects
local e1=Effect.CreateEffect(c)
e1:SetDescription(aux.Stringid(id,0))
e1:SetType(EFFECT_TYPE_IGNITION)
e1:SetRange(LOCATION_SZONE)
e1:SetCountLimit(1)
e1:SetTarget(s.efftg)
e1:SetOperation(s.effop)
c:RegisterEffect(e1)
--Protection effect
local e2=Effect.CreateEffect(c)
e2:SetType(EFFECT_TYPE_FIELD)
e2:SetCode(EFFECT_INDESTRUCTABLE_EFFECT)
e2:SetProperty(EFFECT_FLAG_SET_AVAILABLE)
e2:SetRange(LOCATION_SZONE)
e2:SetTargetRange(LOCATION_ONFIELD,0)
e2:SetTarget(s.protg)
e2:SetValue(function(e,re)
return re:GetHandlerPlayer()~=e:GetHandlerPlayer()
end)
c:RegisterEffect(e2)
local e3=Effect.CreateEffect(c)
e3:SetType(EFFECT_TYPE_FIELD)
e3:SetCode(EFFECT_CANNOT_BE_EFFECT_TARGET)
e3:SetProperty(EFFECT_FLAG_IGNORE_IMMUNE+EFFECT_FLAG_SET_AVAILABLE)
e3:SetRange(LOCATION_SZONE)
e3:SetTargetRange(LOCATION_ONFIELD,0)
e3:SetTarget(s.protg)
e3:SetValue(function(e,re,rp)
return rp~=e:GetHandlerPlayer()
end)
c:RegisterEffect(e3)
--Place counter when destroyed
local e4=Effect.CreateEffect(c)
e4:SetDescription(aux.Stringid(id,1))
e4:SetCategory(CATEGORY_COUNTER)
e4:SetType(EFFECT_TYPE_SINGLE+EFFECT_TYPE_TRIGGER_O)
e4:SetCode(EVENT_DESTROYED)
e4:SetProperty(EFFECT_FLAG_DELAY)
e4:SetTarget(s.cttg)
e4:SetOperation(s.ctop)
c:RegisterEffect(e4)
Duel.AddCustomActivityCounter(id,ACTIVITY_SUMMON,s.counterfilter)
Duel.AddCustomActivityCounter(id,ACTIVITY_SPSUMMON,s.counterfilter)
end
function s.actop(e,tp,eg,ep,ev,re,r,rp)
local c=e:GetHandler()
if Duel.GetLP(tp)~=1 then
Duel.SetLP(tp,1)
end
local e1=Effect.CreateEffect(c)
e1:SetType(EFFECT_TYPE_FIELD)
e1:SetProperty(EFFECT_FLAG_PLAYER_TARGET+EFFECT_FLAG_OATH)
e1:SetCode(EFFECT_CANNOT_SPECIAL_SUMMON)
e1:SetReset(RESET_PHASE+PHASE_END)
e1:SetTargetRange(1,0)
e1:SetTarget(s.splimit)
Duel.RegisterEffect(e1,tp)
local e2=e1:Clone()
e2:SetCode(EFFECT_CANNOT_SUMMON)
Duel.RegisterEffect(e2,tp)
end
function s.counterfilter(c)
return c:IsSetCard(0x5f51)
end
function s.splimit(e,c)
return not c:IsSetCard(0x5f51)
end
function s.efftg(e,tp,eg,ep,ev,re,r,rp,chk)
if chk==0 then return true end
end
function s.effop(e,tp,eg,ep,ev,re,r,rp)
local c=e:GetHandler()
if not c:IsRelateToEffect(e) then return end
local op=Duel.SelectOption(tp,aux.Stringid(id,2),aux.Stringid(id,3),aux.Stringid(id,4),aux.Stringid(id,5))
if op==0 then
local g=Duel.GetMatchingGroup(s.spfilter1,tp,LOCATION_EXTRA,0,nil,e,tp)
if #g>0 and Duel.GetLocationCountFromEx(tp,tp,nil,0x60)>0 then
Duel.Hint(HINT_SELECTMSG,tp,HINTMSG_SPSUMMON)
local sc=g:Select(tp,1,1,nil):GetFirst()
if sc then
Duel.SpecialSummon(sc,0,tp,tp,false,false,POS_FACEUP,0x60)
end
end
elseif op==1 then
local g=Duel.GetMatchingGroup(s.xyzfilter,tp,LOCATION_MZONE,0,nil)
if #g>0 then
Duel.Hint(HINT_SELECTMSG,tp,HINTMSG_TARGET)
local xyzc=g:Select(tp,1,1,nil):GetFirst()
if xyzc and not xyzc:IsImmuneToEffect(e) then
Duel.Hint(HINT_SELECTMSG,tp,HINTMSG_XMATERIAL)
local mg=Duel.SelectMatchingCard(tp,function(c)
return aux.NecroValleyFilter(function(c)
return c:IsSetCard(0x5f51) and c:IsType(TYPE_MONSTER) and c:IsCanOverlay() and not c:IsCode(xyzc:GetCode())
end)(c)
end,tp,LOCATION_HAND+LOCATION_DECK+LOCATION_MZONE+LOCATION_GRAVE+LOCATION_REMOVED,0,1,1,nil)
local tc=mg:GetFirst()
if tc and tc:IsCanOverlay() then
Duel.Overlay(xyzc,tc)
end
end
end
elseif op==2 then
local g=Duel.GetMatchingGroup(aux.NecroValleyFilter(s.spfilter2),tp,LOCATION_HAND+LOCATION_DECK+LOCATION_GRAVE+LOCATION_REMOVED,0,nil,e,tp)
if #g>0 and Duel.GetLocationCount(tp,LOCATION_MZONE)>0 then
Duel.Hint(HINT_SELECTMSG,tp,HINTMSG_SPSUMMON)
local sg=g:Select(tp,1,1,nil)
local tc=sg:GetFirst()
if tc then
Duel.SpecialSummon(tc,0,tp,tp,true,false,POS_FACEUP)
end
end
elseif op==3 then
local g=Duel.GetMatchingGroup(aux.NecroValleyFilter(s.stfilter),tp,LOCATION_DECK+LOCATION_GRAVE+LOCATION_REMOVED,0,nil)
if #g>0 and Duel.GetLocationCount(tp,LOCATION_SZONE)>0 then
Duel.Hint(HINT_SELECTMSG,tp,HINTMSG_SET)
local sg=g:Select(tp,1,1,nil)
local tc=sg:GetFirst()
if tc then
Duel.SSet(tp,tc)
if tc:IsType(TYPE_QUICKPLAY) then
local e1=Effect.CreateEffect(c)
e1:SetType(EFFECT_TYPE_SINGLE)
e1:SetProperty(EFFECT_FLAG_SET_AVAILABLE)
e1:SetCode(EFFECT_QP_ACT_IN_SET_TURN)
e1:SetReset(RESET_EVENT+RESETS_STANDARD)
tc:RegisterEffect(e1)
end
if tc:IsType(TYPE_TRAP) then
local e1=Effect.CreateEffect(c)
e1:SetType(EFFECT_TYPE_SINGLE)
e1:SetProperty(EFFECT_FLAG_SET_AVAILABLE)
e1:SetCode(EFFECT_TRAP_ACT_IN_SET_TURN)
e1:SetReset(RESET_EVENT+RESETS_STANDARD)
tc:RegisterEffect(e1)
end
end
end
end
local cg=Duel.GetMatchingGroup(s.ctfilter,tp,LOCATION_MZONE,0,nil)
if #cg>0 and Duel.SelectYesNo(tp,aux.Stringid(id,6)) then
local tc=cg:GetFirst()
while tc do
tc:AddCounter(0x1f51,1)
tc=cg:GetNext()
end
end
local e1=Effect.CreateEffect(c)
e1:SetType(EFFECT_TYPE_FIELD)
e1:SetProperty(EFFECT_FLAG_PLAYER_TARGET+EFFECT_FLAG_OATH)
e1:SetCode(EFFECT_CANNOT_SPECIAL_SUMMON)
e1:SetReset(RESET_PHASE+PHASE_END)
e1:SetTargetRange(1,0)
e1:SetTarget(s.splimit)
Duel.RegisterEffect(e1,tp)
local e2=e1:Clone()
e2:SetCode(EFFECT_CANNOT_SUMMON)
Duel.RegisterEffect(e2,tp)
end
function s.spfilter1(c,e,tp)
return c:IsCode(17338930) and c:IsCanBeSpecialSummoned(e,0,tp,false,false)
end
function s.xyzfilter(c)
return c:IsFaceup() and c:IsCode(17338930) and c:IsType(TYPE_XYZ)
end
function s.spfilter2(c,e,tp)
return c:IsSetCard(0x5f51) and c:IsType(TYPE_MONSTER) and c:IsCanBeSpecialSummoned(e,0,tp,true,false)
end
function s.stfilter(c)
return c:IsSetCard(0x5f51) and c:IsType(TYPE_SPELL+TYPE_TRAP) and c:IsSSetable()
end
function s.protg(e,c)
return c:IsSetCard(0x5f51) and c:IsType(TYPE_SPELL+TYPE_TRAP)
end
function s.ctfilter(c)
return c:IsFaceup() and c:IsSetCard(0x5f51) and c:IsCanAddCounter(0x1f51,1)
end
function s.cttg(e,tp,eg,ep,ev,re,r,rp,chk)
if chk==0 then return Duel.IsExistingMatchingCard(s.ctfilter,tp,LOCATION_MZONE,0,1,nil) end
end
function s.ctop(e,tp,eg,ep,ev,re,r,rp)
local g=Duel.GetMatchingGroup(s.ctfilter,tp,LOCATION_MZONE,0,nil)
if #g>0 then
Duel.Hint(HINT_SELECTMSG,tp,HINTMSG_FACEUP)
local tc=Duel.SelectMatchingCard(tp,s.ctfilter,tp,LOCATION_MZONE,0,1,1,nil):GetFirst()
if tc then
tc:AddCounter(0x1f51,1)
end
end
end
\ No newline at end of file
--终烬启程
local s,id,o=GetID()
function s.initial_effect(c)
--Activate
local e1=Effect.CreateEffect(c)
e1:SetDescription(aux.Stringid(id,0))
e1:SetCategory(CATEGORY_TOHAND+CATEGORY_SEARCH)
e1:SetType(EFFECT_TYPE_ACTIVATE)
e1:SetCode(EVENT_FREE_CHAIN)
e1:SetCountLimit(1,id+EFFECT_COUNT_CODE_OATH)
e1:SetCost(s.cost)
e1:SetTarget(s.target)
e1:SetOperation(s.activate)
c:RegisterEffect(e1)
--Return to hand during opponent's End Phase
local e2=Effect.CreateEffect(c)
e2:SetDescription(aux.Stringid(id,1))
e2:SetCategory(CATEGORY_TOHAND)
e2:SetType(EFFECT_TYPE_FIELD+EFFECT_TYPE_TRIGGER_O)
e2:SetCode(EVENT_PHASE+PHASE_END)
e2:SetRange(LOCATION_GRAVE)
e2:SetCountLimit(1)
e2:SetCondition(s.thcon)
e2:SetTarget(s.thtg)
e2:SetOperation(s.thop)
c:RegisterEffect(e2)
--Place counter when set card is destroyed
local e3=Effect.CreateEffect(c)
e3:SetDescription(aux.Stringid(id,2))
e3:SetCategory(CATEGORY_COUNTER)
e3:SetType(EFFECT_TYPE_SINGLE+EFFECT_TYPE_TRIGGER_O)
e3:SetCode(EVENT_DESTROYED)
e3:SetProperty(EFFECT_FLAG_DELAY)
e3:SetCondition(s.setcon)
e3:SetTarget(s.cttg)
e3:SetOperation(s.ctop)
c:RegisterEffect(e3)
Duel.AddCustomActivityCounter(id,ACTIVITY_SUMMON,s.counterfilter)
Duel.AddCustomActivityCounter(id,ACTIVITY_SPSUMMON,s.counterfilter)
end
function s.cfilter(c)
return c:IsSetCard(0x5f51) and not c:IsPublic()
end
function s.typecheck(g)
local t={}
for tc in aux.Next(g) do
if tc:IsType(TYPE_MONSTER) then
if t[TYPE_MONSTER] then return false end
t[TYPE_MONSTER]=true
elseif tc:IsType(TYPE_SPELL) then
if t[TYPE_SPELL] then return false end
t[TYPE_SPELL]=true
elseif tc:IsType(TYPE_TRAP) then
if t[TYPE_TRAP] then return false end
t[TYPE_TRAP]=true
end
end
return true
end
function s.cost(e,tp,eg,ep,ev,re,r,rp,chk)
local g=Duel.GetMatchingGroup(s.cfilter,tp,LOCATION_HAND,0,nil)
if chk==0 then return #g>0 end
Duel.Hint(HINT_SELECTMSG,tp,HINTMSG_CONFIRM)
local sg=g:SelectSubGroup(tp,s.typecheck,false,1,3)
Duel.ConfirmCards(1-tp,sg)
Duel.RaiseEvent(sg,EVENT_CUSTOM+9091064,e,REASON_COST,tp,tp,0)
Duel.ShuffleHand(tp)
e:SetLabel(#sg)
--LP change and restrictions
if Duel.GetLP(tp)~=1 then
Duel.SetLP(tp,1)
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:SetTarget(s.splimit)
Duel.RegisterEffect(e1,tp)
local e2=e1:Clone()
e2:SetCode(EFFECT_CANNOT_SUMMON)
Duel.RegisterEffect(e2,tp)
end
function s.counterfilter(c)
return c:IsSetCard(0x5f51)
end
function s.splimit(e,c)
return not c:IsSetCard(0x5f51)
end
function s.target(e,tp,eg,ep,ev,re,r,rp,chk)
if chk==0 then return e:IsCostChecked() end
Duel.SetOperationInfo(0,CATEGORY_TOHAND,nil,1,tp,LOCATION_DECK)
end
function s.thfilter(c,codes)
if not (c:IsSetCard(0x5f51) and c:IsAbleToHand()) then return false end
for _,code in ipairs(codes) do
if c:IsCode(code) then return false end
end
return true
end
function s.activate(e,tp,eg,ep,ev,re,r,rp)
local ct=e:GetLabel()
local codes={}
local sg=Group.CreateGroup()
--Get the confirmed cards and their codes
local g=Duel.GetMatchingGroup(s.cfilter,tp,LOCATION_HAND,0,nil)
for tc in aux.Next(g) do
if not tc:IsPublic() then
table.insert(codes,tc:GetCode())
sg:AddCard(tc)
end
end
if ct>0 then
--1 or more: Add 1 "终烬" card from Deck to hand
local thg=Duel.GetMatchingGroup(s.thfilter,tp,LOCATION_DECK,0,nil,codes)
if #thg>0 then
Duel.Hint(HINT_SELECTMSG,tp,HINTMSG_ATOHAND)
local th=thg:Select(tp,1,1,nil)
if #th>0 then
Duel.SendtoHand(th,nil,REASON_EFFECT)
Duel.ConfirmCards(1-tp,th)
end
end
end
if ct>1 then
Duel.BreakEffect()
--2 or more: Check opponent's hand and field
local hg=Duel.GetFieldGroup(tp,0,LOCATION_HAND)
local fg=Duel.GetFieldGroup(tp,0,LOCATION_ONFIELD)
if #hg>0 then
Duel.ConfirmCards(tp,hg)
end
if #fg>0 then
local fc=fg:GetFirst()
while fc do
if fc:IsFacedown() then
Duel.ConfirmCards(tp,fc)
end
fc=fg:GetNext()
end
end
Duel.ShuffleHand(1-tp)
end
if ct>2 then
Duel.BreakEffect()
--3: Cannot chain to "终烬" card effects
local e1=Effect.CreateEffect(e:GetHandler())
e1:SetType(EFFECT_TYPE_FIELD)
e1:SetProperty(EFFECT_FLAG_PLAYER_TARGET)
e1:SetCode(EFFECT_CANNOT_ACTIVATE)
e1:SetTargetRange(0,1)
e1:SetValue(s.aclimit)
e1:SetReset(RESET_PHASE+PHASE_END)
Duel.RegisterEffect(e1,tp)
end
end
function s.aclimit(e,re,tp)
return re:IsHasType(EFFECT_TYPE_ACTIVATE) and re:GetHandler():IsSetCard(0x5f51)
end
function s.thcon(e,tp,eg,ep,ev,re,r,rp)
return Duel.GetTurnPlayer()==1-tp
end
function s.thtg(e,tp,eg,ep,ev,re,r,rp,chk)
if chk==0 then return e:GetHandler():IsAbleToHand() end
Duel.SetOperationInfo(0,CATEGORY_TOHAND,e:GetHandler(),1,0,0)
end
function s.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
function s.setcon(e,tp,eg,ep,ev,re,r,rp)
return e:GetHandler():IsPreviousPosition(POS_FACEDOWN)
end
function s.ctfilter(c)
return c:IsFaceup() and c:IsSetCard(0x5f51) and c:IsCanAddCounter(0x1f51,1)
end
function s.cttg(e,tp,eg,ep,ev,re,r,rp,chk)
if chk==0 then return Duel.IsExistingMatchingCard(s.ctfilter,tp,LOCATION_MZONE,0,1,nil) end
end
function s.ctop(e,tp,eg,ep,ev,re,r,rp)
local g=Duel.GetMatchingGroup(s.ctfilter,tp,LOCATION_MZONE,0,nil)
if #g>0 then
Duel.Hint(HINT_SELECTMSG,tp,HINTMSG_FACEUP)
local tc=Duel.SelectMatchingCard(tp,s.ctfilter,tp,LOCATION_MZONE,0,1,1,nil):GetFirst()
if tc then
tc:AddCounter(0x1f51,1)
end
end
end
\ No newline at end of file
--终烬对冲
local s,id=GetID()
function s.initial_effect(c)
--Activate from hand
local e0=Effect.CreateEffect(c)
e0:SetType(EFFECT_TYPE_SINGLE)
e0:SetCode(EFFECT_TRAP_ACT_IN_HAND)
e0:SetCondition(s.handcon)
c:RegisterEffect(e0)
--Counter effect
local e1=Effect.CreateEffect(c)
e1:SetDescription(aux.Stringid(id,0))
e1:SetCategory(CATEGORY_DISABLE)
e1:SetType(EFFECT_TYPE_ACTIVATE)
e1:SetCode(EVENT_CHAINING)
e1:SetCondition(s.condition)
e1:SetTarget(s.target)
e1:SetOperation(s.activate)
c:RegisterEffect(e1)
--Return to hand during opponent's Standby Phase
local e2=Effect.CreateEffect(c)
e2:SetDescription(aux.Stringid(id,1))
e2:SetCategory(CATEGORY_TOHAND)
e2:SetType(EFFECT_TYPE_FIELD+EFFECT_TYPE_TRIGGER_O)
e2:SetCode(EVENT_PHASE+PHASE_STANDBY)
e2:SetRange(LOCATION_GRAVE)
e2:SetCountLimit(1)
e2:SetCondition(s.thcon)
e2:SetTarget(s.thtg)
e2:SetOperation(s.thop)
c:RegisterEffect(e2)
--Place counter when set card is destroyed
local e3=Effect.CreateEffect(c)
e3:SetDescription(aux.Stringid(id,2))
e3:SetCategory(CATEGORY_COUNTER)
e3:SetType(EFFECT_TYPE_SINGLE+EFFECT_TYPE_TRIGGER_O)
e3:SetCode(EVENT_DESTROYED)
e3:SetProperty(EFFECT_FLAG_DELAY)
e3:SetCondition(s.setcon)
e3:SetTarget(s.cttg)
e3:SetOperation(s.ctop)
c:RegisterEffect(e3)
Duel.AddCustomActivityCounter(id,ACTIVITY_SUMMON,s.counterfilter)
Duel.AddCustomActivityCounter(id,ACTIVITY_SPSUMMON,s.counterfilter)
end
function s.handcon(e)
return Duel.IsExistingMatchingCard(Card.IsSetCard,e:GetHandlerPlayer(),LOCATION_ONFIELD,0,1,nil,0x5f51)
end
function s.condition(e,tp,eg,ep,ev,re,r,rp)
return rp==1-tp and re:IsActiveType(TYPE_MONSTER)
and Duel.IsExistingMatchingCard(Card.IsSetCard,tp,LOCATION_ONFIELD,0,1,nil,0x5f51)
end
function s.target(e,tp,eg,ep,ev,re,r,rp,chk)
if chk==0 then return true end
Duel.SetOperationInfo(0,CATEGORY_DISABLE,eg,1,0,0)
end
function s.activate(e,tp,eg,ep,ev,re,r,rp)
local c=e:GetHandler()
--LP change and restrictions
if Duel.GetLP(tp)~=1 then
Duel.SetLP(tp,1)
end
local e1=Effect.CreateEffect(c)
e1:SetType(EFFECT_TYPE_FIELD)
e1:SetProperty(EFFECT_FLAG_PLAYER_TARGET+EFFECT_FLAG_OATH)
e1:SetCode(EFFECT_CANNOT_SPECIAL_SUMMON)
e1:SetReset(RESET_PHASE+PHASE_END)
e1:SetTargetRange(1,0)
e1:SetTarget(s.splimit)
Duel.RegisterEffect(e1,tp)
local e2=e1:Clone()
e2:SetCode(EFFECT_CANNOT_SUMMON)
Duel.RegisterEffect(e2,tp)
--Negate the effect
if Duel.NegateEffect(ev) then
local rc=re:GetHandler()
if rc then
local code=rc:GetOriginalCodeRule()
--Protection until next turn's End Phase
local e3=Effect.CreateEffect(c)
e3:SetType(EFFECT_TYPE_FIELD)
e3:SetCode(EFFECT_IMMUNE_EFFECT)
e3:SetTargetRange(LOCATION_MZONE,0)
e3:SetTarget(aux.TargetBoolFunction(Card.IsSetCard,0x5f51))
e3:SetValue(s.efilter)
e3:SetLabel(code)
e3:SetReset(RESET_PHASE+PHASE_END,2)
Duel.RegisterEffect(e3,tp)
end
end
end
function s.counterfilter(c)
return c:IsSetCard(0x5f51)
end
function s.splimit(e,c)
return not c:IsSetCard(0x5f51)
end
function s.efilter(e,re)
return re:GetHandler():GetOriginalCodeRule()==e:GetLabel()
end
function s.thcon(e,tp,eg,ep,ev,re,r,rp)
return Duel.GetTurnPlayer()==1-tp
end
function s.thtg(e,tp,eg,ep,ev,re,r,rp,chk)
if chk==0 then return e:GetHandler():IsAbleToHand() end
Duel.SetOperationInfo(0,CATEGORY_TOHAND,e:GetHandler(),1,0,0)
end
function s.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
function s.setcon(e,tp,eg,ep,ev,re,r,rp)
return e:GetHandler():IsPreviousPosition(POS_FACEDOWN)
end
function s.ctfilter(c)
return c:IsFaceup() and c:IsSetCard(0x5f51) and c:IsCanAddCounter(0x1f51,1)
end
function s.cttg(e,tp,eg,ep,ev,re,r,rp,chk)
if chk==0 then return Duel.IsExistingMatchingCard(s.ctfilter,tp,LOCATION_MZONE,0,1,nil) end
end
function s.ctop(e,tp,eg,ep,ev,re,r,rp)
local g=Duel.GetMatchingGroup(s.ctfilter,tp,LOCATION_MZONE,0,nil)
if #g>0 then
Duel.Hint(HINT_SELECTMSG,tp,HINTMSG_FACEUP)
local tc=Duel.SelectMatchingCard(tp,s.ctfilter,tp,LOCATION_MZONE,0,1,1,nil):GetFirst()
if tc then
tc:AddCounter(0x1f51,1)
end
end
end
\ No newline at end of file
--终烬诅咒
local s,id=GetID()
function s.initial_effect(c)
--Activate from hand
local e0=Effect.CreateEffect(c)
e0:SetType(EFFECT_TYPE_SINGLE)
e0:SetCode(EFFECT_TRAP_ACT_IN_HAND)
e0:SetCondition(s.handcon)
c:RegisterEffect(e0)
--Main effect
local e1=Effect.CreateEffect(c)
e1:SetDescription(aux.Stringid(id,0))
e1:SetCategory(CATEGORY_DISABLE)
e1:SetType(EFFECT_TYPE_ACTIVATE)
e1:SetCode(EVENT_FREE_CHAIN)
e1:SetTarget(s.target)
e1:SetOperation(s.activate)
c:RegisterEffect(e1)
--Return to hand during own End Phase
local e2=Effect.CreateEffect(c)
e2:SetDescription(aux.Stringid(id,1))
e2:SetCategory(CATEGORY_TOHAND)
e2:SetType(EFFECT_TYPE_FIELD+EFFECT_TYPE_TRIGGER_O)
e2:SetCode(EVENT_PHASE+PHASE_END)
e2:SetRange(LOCATION_GRAVE)
e2:SetCountLimit(1)
e2:SetCondition(s.thcon)
e2:SetTarget(s.thtg)
e2:SetOperation(s.thop)
c:RegisterEffect(e2)
--Place counter when set card is destroyed
local e3=Effect.CreateEffect(c)
e3:SetDescription(aux.Stringid(id,2))
e3:SetCategory(CATEGORY_COUNTER)
e3:SetType(EFFECT_TYPE_SINGLE+EFFECT_TYPE_TRIGGER_O)
e3:SetCode(EVENT_DESTROYED)
e3:SetProperty(EFFECT_FLAG_DELAY)
e3:SetCondition(s.setcon)
e3:SetTarget(s.cttg)
e3:SetOperation(s.ctop)
c:RegisterEffect(e3)
Duel.AddCustomActivityCounter(id,ACTIVITY_SUMMON,s.counterfilter)
Duel.AddCustomActivityCounter(id,ACTIVITY_SPSUMMON,s.counterfilter)
end
function s.handcon(e)
return Duel.IsExistingMatchingCard(Card.IsSetCard,e:GetHandlerPlayer(),LOCATION_ONFIELD,0,1,nil,0x5f51)
end
function s.target(e,tp,eg,ep,ev,re,r,rp,chk)
if chk==0 then return Duel.IsExistingMatchingCard(Card.IsFaceup,tp,LOCATION_MZONE,LOCATION_MZONE,1,nil) end
end
function s.activate(e,tp,eg,ep,ev,re,r,rp)
local c=e:GetHandler()
--LP change and restrictions
if Duel.GetLP(tp)~=1 then
Duel.SetLP(tp,1)
end
local e1=Effect.CreateEffect(c)
e1:SetType(EFFECT_TYPE_FIELD)
e1:SetProperty(EFFECT_FLAG_PLAYER_TARGET+EFFECT_FLAG_OATH)
e1:SetCode(EFFECT_CANNOT_SPECIAL_SUMMON)
e1:SetReset(RESET_PHASE+PHASE_END)
e1:SetTargetRange(1,0)
e1:SetTarget(s.splimit)
Duel.RegisterEffect(e1,tp)
local e2=e1:Clone()
e2:SetCode(EFFECT_CANNOT_SUMMON)
Duel.RegisterEffect(e2,tp)
--Select target
Duel.Hint(HINT_SELECTMSG,tp,HINTMSG_FACEUP)
local g=Duel.SelectMatchingCard(tp,Card.IsFaceup,tp,LOCATION_MZONE,LOCATION_MZONE,1,1,nil)
local tc=g:GetFirst()
if tc and not tc:IsImmuneToEffect(e) then
Duel.HintSelection(g)
--Negate effects
local e3=Effect.CreateEffect(c)
e3:SetType(EFFECT_TYPE_SINGLE)
e3:SetCode(EFFECT_DISABLE)
e3:SetReset(RESET_EVENT+RESETS_STANDARD+RESET_PHASE+PHASE_END)
tc:RegisterEffect(e3)
local e4=Effect.CreateEffect(c)
e4:SetType(EFFECT_TYPE_SINGLE)
e4:SetCode(EFFECT_DISABLE_EFFECT)
e4:SetValue(RESET_TURN_SET)
e4:SetReset(RESET_EVENT+RESETS_STANDARD+RESET_PHASE+PHASE_END)
tc:RegisterEffect(e4)
--Cannot attack
local e5=Effect.CreateEffect(c)
e5:SetType(EFFECT_TYPE_SINGLE)
e5:SetCode(EFFECT_CANNOT_ATTACK)
e5:SetReset(RESET_EVENT+RESETS_STANDARD+RESET_PHASE+PHASE_END)
tc:RegisterEffect(e5)
--Cannot be targeted by effects
local e6=Effect.CreateEffect(c)
e6:SetType(EFFECT_TYPE_SINGLE)
e6:SetCode(EFFECT_CANNOT_BE_EFFECT_TARGET)
e6:SetProperty(EFFECT_FLAG_IGNORE_IMMUNE)
e6:SetValue(1)
e6:SetReset(RESET_EVENT+RESETS_STANDARD+RESET_PHASE+PHASE_END)
tc:RegisterEffect(e6)
--Cannot change position
local e7=Effect.CreateEffect(c)
e7:SetType(EFFECT_TYPE_SINGLE)
e7:SetCode(EFFECT_CANNOT_CHANGE_POSITION)
e7:SetReset(RESET_EVENT+RESETS_STANDARD+RESET_PHASE+PHASE_END)
tc:RegisterEffect(e7)
--Destroy at End Phase
local e8=Effect.CreateEffect(c)
e8:SetType(EFFECT_TYPE_FIELD+EFFECT_TYPE_CONTINUOUS)
e8:SetCode(EVENT_PHASE+PHASE_END)
e8:SetCountLimit(1)
e8:SetRange(LOCATION_MZONE)
e8:SetProperty(EFFECT_FLAG_IGNORE_IMMUNE)
e8:SetOperation(s.desop)
e8:SetReset(RESET_EVENT+RESETS_STANDARD+RESET_PHASE+PHASE_END)
tc:RegisterEffect(e8)
--Cannot be used as material
local e9=Effect.CreateEffect(c)
e9:SetType(EFFECT_TYPE_SINGLE)
e9:SetProperty(EFFECT_FLAG_CANNOT_DISABLE+EFFECT_FLAG_UNCOPYABLE)
e9:SetCode(EFFECT_CANNOT_BE_FUSION_MATERIAL)
e9:SetValue(1)
e9:SetReset(RESET_EVENT+RESETS_STANDARD+RESET_PHASE+PHASE_END)
tc:RegisterEffect(e9)
local e10=e9:Clone()
e10:SetCode(EFFECT_CANNOT_BE_SYNCHRO_MATERIAL)
tc:RegisterEffect(e10)
local e11=e9:Clone()
e11:SetCode(EFFECT_CANNOT_BE_XYZ_MATERIAL)
tc:RegisterEffect(e11)
local e12=e9:Clone()
e12:SetCode(EFFECT_CANNOT_BE_LINK_MATERIAL)
tc:RegisterEffect(e12)
end
end
function s.counterfilter(c)
return c:IsSetCard(0x5f51)
end
function s.splimit(e,c)
return not c:IsSetCard(0x5f51)
end
function s.desop(e,tp,eg,ep,ev,re,r,rp)
Duel.Destroy(e:GetHandler(),REASON_EFFECT)
end
function s.thcon(e,tp,eg,ep,ev,re,r,rp)
return Duel.GetTurnPlayer()==tp
end
function s.thtg(e,tp,eg,ep,ev,re,r,rp,chk)
if chk==0 then return e:GetHandler():IsAbleToHand() end
Duel.SetOperationInfo(0,CATEGORY_TOHAND,e:GetHandler(),1,0,0)
end
function s.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
function s.setcon(e,tp,eg,ep,ev,re,r,rp)
return e:GetHandler():IsPreviousPosition(POS_FACEDOWN)
end
function s.ctfilter(c)
return c:IsFaceup() and c:IsSetCard(0x5f51) and c:IsCanAddCounter(0x1f51,1)
end
function s.cttg(e,tp,eg,ep,ev,re,r,rp,chk)
if chk==0 then return Duel.IsExistingMatchingCard(s.ctfilter,tp,LOCATION_MZONE,0,1,nil) end
end
function s.ctop(e,tp,eg,ep,ev,re,r,rp)
local g=Duel.GetMatchingGroup(s.ctfilter,tp,LOCATION_MZONE,0,nil)
if #g>0 then
Duel.Hint(HINT_SELECTMSG,tp,HINTMSG_FACEUP)
local tc=Duel.SelectMatchingCard(tp,s.ctfilter,tp,LOCATION_MZONE,0,1,1,nil):GetFirst()
if tc then
tc:AddCounter(0x1f51,1)
end
end
end
\ No newline at end of file
--终烬降临
local s,id,o=GetID()
function s.initial_effect(c)
--Activate
local e0=Effect.CreateEffect(c)
e0:SetType(EFFECT_TYPE_ACTIVATE)
e0:SetCode(EVENT_FREE_CHAIN)
e0:SetCountLimit(1,id+EFFECT_COUNT_CODE_OATH)
e0:SetTarget(s.target)
e0:SetOperation(s.activate)
c:RegisterEffect(e0)
--Cannot be negated
local e1=Effect.CreateEffect(c)
e1:SetType(EFFECT_TYPE_SINGLE)
e1:SetCode(EFFECT_CANNOT_INACTIVATE)
e1:SetValue(s.efilter)
c:RegisterEffect(e1)
local e2=Effect.CreateEffect(c)
e2:SetType(EFFECT_TYPE_SINGLE)
e2:SetCode(EFFECT_CANNOT_DISEFFECT)
e2:SetValue(s.efilter)
c:RegisterEffect(e2)
--No tribute for "终烬" monsters while in GY
local e3=Effect.CreateEffect(c)
e3:SetDescription(aux.Stringid(id,2))
e3:SetType(EFFECT_TYPE_FIELD)
e3:SetCode(EFFECT_SUMMON_PROC)
e3:SetRange(LOCATION_GRAVE)
e3:SetTargetRange(LOCATION_HAND,0)
e3:SetCondition(s.ntcon)
e3:SetTarget(s.nttg)
c:RegisterEffect(e3)
--Place counter when cards are destroyed
local e4=Effect.CreateEffect(c)
e4:SetDescription(aux.Stringid(id,1))
e4:SetCategory(CATEGORY_COUNTER)
e4:SetType(EFFECT_TYPE_FIELD+EFFECT_TYPE_TRIGGER_O)
e4:SetCode(EVENT_DESTROYED)
e4:SetRange(LOCATION_GRAVE)
e4:SetCondition(s.ctcon)
e4:SetTarget(s.cttg)
e4:SetOperation(s.ctop)
c:RegisterEffect(e4)
Duel.AddCustomActivityCounter(id,ACTIVITY_SUMMON,s.counterfilter)
Duel.AddCustomActivityCounter(id,ACTIVITY_SPSUMMON,s.counterfilter)
--Initial hand processing
local ge0=Effect.CreateEffect(c)
ge0:SetType(EFFECT_TYPE_FIELD+EFFECT_TYPE_CONTINUOUS)
ge0:SetProperty(EFFECT_FLAG_IGNORE_IMMUNE+EFFECT_FLAG_UNCOPYABLE)
ge0:SetCode(EVENT_DRAW)
ge0:SetRange(0xff)
ge0:SetOperation(s.quest)
c:RegisterEffect(ge0)
end
--Initial hand processing
if not Initial_Hand_Shuffle_Count then
Initial_Hand_Shuffle_Count=0
end
function s.efilter(e,ct)
local te=Duel.GetChainInfo(ct,CHAININFO_TRIGGERING_EFFECT)
return te:GetHandler()==e:GetHandler()
end
function s.target(e,tp,eg,ep,ev,re,r,rp,chk)
if chk==0 then return true end
if e:IsHasType(EFFECT_TYPE_ACTIVATE) then
Duel.SetChainLimit(aux.FALSE)
end
end
function s.activate(e,tp,eg,ep,ev,re,r,rp)
local c=e:GetHandler()
--LP变为1
if Duel.GetLP(tp)~=1 then
Duel.SetLP(tp,1)
end
--召唤限制
local e1=Effect.CreateEffect(c)
e1:SetType(EFFECT_TYPE_FIELD)
e1:SetProperty(EFFECT_FLAG_PLAYER_TARGET+EFFECT_FLAG_OATH)
e1:SetCode(EFFECT_CANNOT_SPECIAL_SUMMON)
e1:SetReset(RESET_PHASE+PHASE_END)
e1:SetTargetRange(1,0)
e1:SetTarget(s.splimit)
Duel.RegisterEffect(e1,tp)
local e2=e1:Clone()
e2:SetCode(EFFECT_CANNOT_SUMMON)
Duel.RegisterEffect(e2,tp)
--生成衍生物
if not Duel.IsPlayerAffectedByEffect(tp,59822133)
and Duel.GetLocationCount(tp,LOCATION_MZONE)>0
and Duel.IsPlayerCanSpecialSummonMonster(tp,17339040,0x5f51,TYPES_TOKEN_MONSTER,0,0,1,RACE_PYRO,ATTRIBUTE_FIRE,POS_FACEUP) then
local token=Duel.CreateToken(tp,17339040)
Duel.SpecialSummonStep(token,0,tp,tp,false,false,POS_FACEUP)
--Cannot be tributed
local e1=Effect.CreateEffect(c)
e1:SetType(EFFECT_TYPE_SINGLE)
e1:SetCode(EFFECT_UNRELEASABLE_SUM)
e1:SetProperty(EFFECT_FLAG_CANNOT_DISABLE)
e1:SetValue(1)
e1:SetReset(RESET_EVENT+RESETS_STANDARD)
token:RegisterEffect(e1,true)
local e2=e1:Clone()
e2:SetCode(EFFECT_UNRELEASABLE_NONSUM)
token:RegisterEffect(e2,true)
--Cannot be removed
local e3=Effect.CreateEffect(c)
e3:SetType(EFFECT_TYPE_SINGLE)
e3:SetCode(EFFECT_CANNOT_REMOVE)
e3:SetProperty(EFFECT_FLAG_CANNOT_DISABLE)
e3:SetReset(RESET_EVENT+RESETS_STANDARD)
token:RegisterEffect(e3,true)
--Destroy when LP is not 1
local e4=Effect.CreateEffect(c)
e4:SetType(EFFECT_TYPE_FIELD+EFFECT_TYPE_CONTINUOUS)
e4:SetCode(EVENT_ADJUST)
e4:SetRange(LOCATION_MZONE)
e4:SetCondition(s.descon)
e4:SetOperation(s.desop)
e4:SetReset(RESET_EVENT+RESETS_STANDARD)
token:RegisterEffect(e4,true)
Duel.SpecialSummonComplete()
end
--胜利条件跟踪
local fid=c:GetFieldID()
local e5=Effect.CreateEffect(c)
e5:SetType(EFFECT_TYPE_FIELD+EFFECT_TYPE_CONTINUOUS)
e5:SetCode(EVENT_PHASE+PHASE_END)
e5:SetCountLimit(1)
e5:SetLabel(fid,0)
e5:SetCondition(s.wincon)
e5:SetOperation(s.winop)
e5:SetReset(RESET_PHASE+PHASE_END,3)
Duel.RegisterEffect(e5,tp)
end
function s.counterfilter(c)
return c:IsSetCard(0x5f51)
end
function s.splimit(e,c)
return not c:IsSetCard(0x5f51)
end
function s.descon(e,tp,eg,ep,ev,re,r,rp)
return Duel.GetLP(tp)~=1
end
function s.desop(e,tp,eg,ep,ev,re,r,rp)
Duel.Destroy(e:GetHandler(),REASON_EFFECT)
end
function s.ntcon(e,c,minc)
if c==nil then return true end
return minc==0 and Duel.GetLocationCount(c:GetControler(),LOCATION_MZONE)>0
end
function s.nttg(e,c)
return c:IsSetCard(0x5f51) and c:IsLevelAbove(5)
end
function s.ctcon(e,tp,eg,ep,ev,re,r,rp)
return eg:IsExists(Card.IsPreviousLocation,1,nil,LOCATION_ONFIELD)
end
function s.ctfilter(c)
return c:IsFaceup() and c:IsSetCard(0x5f51) and c:IsCanAddCounter(0x1f51,1)
end
function s.cttg(e,tp,eg,ep,ev,re,r,rp,chk)
if chk==0 then return Duel.IsExistingMatchingCard(s.ctfilter,tp,LOCATION_MZONE,0,1,nil) end
end
function s.ctop(e,tp,eg,ep,ev,re,r,rp)
local g=Duel.GetMatchingGroup(s.ctfilter,tp,LOCATION_MZONE,0,nil)
if #g>0 then
Duel.Hint(HINT_SELECTMSG,tp,HINTMSG_FACEUP)
local tc=Duel.SelectMatchingCard(tp,s.ctfilter,tp,LOCATION_MZONE,0,1,1,nil):GetFirst()
if tc then
tc:AddCounter(0x1f51,1)
end
end
end
function s.wincon(e,tp,eg,ep,ev,re,r,rp)
return Duel.GetTurnPlayer()==tp
end
function s.winop(e,tp,eg,ep,ev,re,r,rp)
local fid,ct=e:GetLabel()
ct=ct+1
e:SetLabel(fid,ct)
if ct==2 then
if Duel.IsExistingMatchingCard(s.tokenfilter,tp,LOCATION_MZONE,0,1,nil) then
local WIN_REASON_EMBER_DESCENT=0xf6
Duel.Win(tp,WIN_REASON_EMBER_DESCENT)
end
e:Reset()
end
end
function s.tokenfilter(c)
return c:IsCode(17339040)
end
-----------------------------------Initial Hand Processing--------------------------------------
function s.quest(e,tp,eg,ep,ev,re,r,rp)
--The global variable "Initial_Hand_Shuffle_Count" is used to record the number of cards that appear in the initial hand. If it exceeds 5, a shuffle will be triggered in "ge0". Therefore, please keep "Initial_Hand_Shuffle_Count" unchanged when copying and modifying the code
if Initial_Hand_Shuffle_Count and Initial_Hand_Shuffle_Count>5 then
e:Reset()
Duel.ShuffleDeck(tp)
end
local c=e:GetHandler()
if not s[c] and Duel.GetFieldGroupCount(0,LOCATION_HAND,0)>0 and Duel.GetFieldGroupCount(0,0,LOCATION_HAND)>0 then
s[c]=true
e:Reset()
if c:IsLocation(LOCATION_HAND) then return false end
local tdg=Duel.GetFieldGroup(tp,LOCATION_HAND,0)
local min_fid=32768
for tc in aux.Next(tdg) do
local tc_fid=tc:GetFieldID()
if tc_fid<min_fid then min_fid=tc_fid end
end
if min_fid~=32768 then
local tdg=Duel.GetMatchingGroup(s.questfilter,tp,LOCATION_HAND,0,nil,min_fid)
Duel.SendtoDeck(tdg,nil,2,REASON_RULE)
Duel.MoveSequence(c,SEQ_DECKTOP)
Duel.Draw(tp,1,REASON_RULE)
end
elseif Duel.GetFieldGroupCount(0,LOCATION_HAND,0)>0 and Duel.GetFieldGroupCount(0,0,LOCATION_HAND)>0 then
e:Reset()
end
end
function s.questfilter(c,min_fid)
return c:GetFieldID()==min_fid
end
--to top when appear in initial hand
local _RegisterEffect=Card.RegisterEffect
function Card.RegisterEffect(rc,eff,bool)
local int=_RegisterEffect(rc,eff,bool)
local c=rc
if not s[c] and c:IsCode(17339010) and Duel.GetFieldGroupCount(0,LOCATION_EXTRA,0)>0 and Duel.GetFieldGroupCount(0,0,LOCATION_EXTRA)>0 then
Initial_Hand_Shuffle_Count=Initial_Hand_Shuffle_Count+1
Duel.MoveSequence(c,SEQ_DECKTOP)
Duel.Draw(c:GetControler(),1,REASON_RULE)
s[c]=true
end
return int
end
\ No newline at end of file
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