shurikens.lua 11 KB

123456789101112131415161718192021222324252627282930313233343536373839404142434445464748495051525354555657585960616263646566676869707172737475767778798081828384858687888990919293949596979899100101102103104105106107108109110111112113114115116117118119120121122123124125126127128129130131132133134135136137138139140141142143144145146147148149150151152153154155156157158159160161162163164165166167168169170171172173174175176177178179180181182183184185186187188189190191192193194195196197198199200201202203204205206207208209210211212213214215216217218219220221222223224225226227228229230231232233234235236237238239240241242243244245246247248249250251252253254255256257258259260261262263264265266267268269
  1. minetest.register_craftitem("rangedweapons:wooden_shuriken", {
  2. description = "" ..core.colorize("#35cdff","Wooden shuriken\n") ..core.colorize("#FFFFFF", "Ranged damage: 2\n") ..core.colorize("#FFFFFF", "Accuracy: 80%\n") ..core.colorize("#FFFFFF", "knockback: 5\n") ..core.colorize("#FFFFFF", "Critical chance: 6%\n") ..core.colorize("#FFFFFF", "Critical efficiency: 2x\n") ..core.colorize("#FFFFFF", "Shuriken survival rate: 10%\n") ..core.colorize("#FFFFFF", "Projectile gravity: 10\n") ..core.colorize("#FFFFFF", "Throwing cooldown: 0.35\n") ..core.colorize("#FFFFFF", "Projectile velocity: 25"),
  3. range = 0,
  4. stack_max= 100,
  5. wield_scale = {x=0.6,y=0.6,z=0.5},
  6. inventory_image = "rangedweapons_wooden_shuriken.png",
  7. RW_throw_capabilities = {
  8. throw_damage = {fleshy=2,knockback=5},
  9. throw_crit = 6,
  10. throw_critEffc = 2.0,
  11. throw_skill = {"throw_skill",35},
  12. throw_velocity = 25,
  13. throw_accuracy = 80,
  14. throw_cooldown = 0.35,
  15. throw_projectiles = 1,
  16. throw_gravity = 10,
  17. throw_sound = "rangedweapons_throw",
  18. throw_dps = 0,
  19. throw_mob_penetration = 0,
  20. throw_node_penetration = 0,
  21. throw_entity = "rangedweapons:shot_bullet",
  22. throw_visual = "wielditem",
  23. throw_texture = "rangedweapons:wooden_shuriken",
  24. throw_projectile_size = 0.15,
  25. throw_glass_breaking = 0,
  26. has_sparks = 0,
  27. ignites_explosives = 0,
  28. throw_door_breaking = 0,
  29. OnCollision = function(player,bullet,target)
  30. if math.random(1, 100) <= 10 then
  31. minetest.add_item(bullet.object:get_pos(), "rangedweapons:wooden_shuriken") end end,
  32. },
  33. on_use = function(itemstack, user, pointed_thing)
  34. rangedweapons_yeet(itemstack, user)
  35. return itemstack
  36. end,
  37. })
  38. minetest.register_craftitem("rangedweapons:stone_shuriken", {
  39. description = "" ..core.colorize("#35cdff","Stone shuriken\n") ..core.colorize("#FFFFFF", "Ranged damage: 4\n") ..core.colorize("#FFFFFF", "Accuracy: 75%\n") ..core.colorize("#FFFFFF", "knockback: 8\n") ..core.colorize("#FFFFFF", "Critical chance: 7%\n") ..core.colorize("#FFFFFF", "Critical efficiency: 2.1x\n") ..core.colorize("#FFFFFF", "Shuriken survival rate: 15%\n") ..core.colorize("#FFFFFF", "Projectile gravity: 15\n") ..core.colorize("#FFFFFF", "Throwing cooldown: 0.35\n") ..core.colorize("#FFFFFF", "Projectile velocity: 20"),
  40. range = 0,
  41. stack_max= 125,
  42. wield_scale = {x=0.6,y=0.6,z=0.5},
  43. inventory_image = "rangedweapons_stone_shuriken.png",
  44. RW_throw_capabilities = {
  45. throw_damage = {fleshy=4,knockback=8},
  46. throw_crit = 7,
  47. throw_critEffc = 2.1,
  48. throw_skill = {"throw_skill",30},
  49. throw_velocity = 20,
  50. throw_accuracy = 75,
  51. throw_cooldown = 0.5,
  52. throw_projectiles = 1,
  53. throw_gravity = 15,
  54. throw_sound = "rangedweapons_throw",
  55. throw_dps = 0,
  56. throw_mob_penetration = 0,
  57. throw_node_penetration = 0,
  58. throw_entity = "rangedweapons:shot_bullet",
  59. throw_visual = "wielditem",
  60. throw_texture = "rangedweapons:stone_shuriken",
  61. throw_projectile_size = 0.15,
  62. throw_glass_breaking = 1,
  63. has_sparks = 0,
  64. ignites_explosives = 0,
  65. throw_door_breaking = 0,
  66. OnCollision = function(player,bullet,target)
  67. if math.random(1, 100) <= 15 then
  68. minetest.add_item(bullet.object:get_pos(), "rangedweapons:stone_shuriken") end end,
  69. },
  70. on_use = function(itemstack, user, pointed_thing)
  71. rangedweapons_yeet(itemstack, user)
  72. return itemstack
  73. end,
  74. })
  75. minetest.register_craftitem("rangedweapons:steel_shuriken", {
  76. description = "" ..core.colorize("#35cdff","Steel shuriken\n") ..core.colorize("#FFFFFF", "Ranged damage: 6\n") ..core.colorize("#FFFFFF", "Accuracy: 85%\n") ..core.colorize("#FFFFFF", "knockback: 3\n") ..core.colorize("#FFFFFF", "Critical chance: 8%\n") ..core.colorize("#FFFFFF", "Critical efficiency: 2.2x\n") ..core.colorize("#FFFFFF", "Shuriken survival rate: 35%\n") ..core.colorize("#FFFFFF", "Projectile gravity: 8\n") ..core.colorize("#FFFFFF", "Throwing cooldown: 0.25\n") ..core.colorize("#FFFFFF", "Projectile velocity: 30"),
  77. range = 0,
  78. stack_max= 150,
  79. wield_scale = {x=0.6,y=0.6,z=0.5},
  80. inventory_image = "rangedweapons_steel_shuriken.png",
  81. RW_throw_capabilities = {
  82. throw_damage = {fleshy=6,knockback=3},
  83. throw_crit = 8,
  84. throw_critEffc = 2.2,
  85. throw_skill = {"throw_skill",40},
  86. throw_velocity = 30,
  87. throw_accuracy = 85,
  88. throw_cooldown = 0.25,
  89. throw_projectiles = 1,
  90. throw_gravity = 8,
  91. throw_sound = "rangedweapons_throw",
  92. throw_dps = 0,
  93. throw_mob_penetration = 0,
  94. throw_node_penetration = 0,
  95. throw_entity = "rangedweapons:shot_bullet",
  96. throw_visual = "wielditem",
  97. throw_texture = "rangedweapons:steel_shuriken",
  98. throw_projectile_size = 0.15,
  99. throw_glass_breaking = 0,
  100. has_sparks = 1,
  101. ignites_explosives = 0,
  102. throw_door_breaking = 0,
  103. OnCollision = function(player,bullet,target)
  104. if math.random(1, 100) <= 35 then
  105. minetest.add_item(bullet.object:get_pos(), "rangedweapons:steel_shuriken") end end,
  106. },
  107. on_use = function(itemstack, user, pointed_thing)
  108. rangedweapons_yeet(itemstack, user)
  109. return itemstack
  110. end,
  111. })
  112. minetest.register_craftitem("rangedweapons:bronze_shuriken", {
  113. description = "" ..core.colorize("#35cdff","Bronze shuriken\n") ..core.colorize("#FFFFFF", "Ranged damage: 6\n") ..core.colorize("#FFFFFF", "Accuracy: 85%\n") ..core.colorize("#FFFFFF", "knockback: 3\n") ..core.colorize("#FFFFFF", "Critical chance: 8%\n") ..core.colorize("#FFFFFF", "Critical efficiency: 2.2x\n") ..core.colorize("#FFFFFF", "Shuriken survival rate: 30%\n") ..core.colorize("#FFFFFF", "Projectile gravity: 8\n") ..core.colorize("#FFFFFF", "Throwing cooldown: 0.25\n") ..core.colorize("#FFFFFF", "Projectile velocity: 30"),
  114. range = 0,
  115. stack_max= 150,
  116. wield_scale = {x=0.6,y=0.6,z=0.5},
  117. inventory_image = "rangedweapons_bronze_shuriken.png",
  118. RW_throw_capabilities = {
  119. throw_damage = {fleshy=6,knockback=3},
  120. throw_crit = 8,
  121. throw_critEffc = 2.2,
  122. throw_skill = {"throw_skill",40},
  123. throw_velocity = 30,
  124. throw_accuracy = 85,
  125. throw_cooldown = 0.25,
  126. throw_projectiles = 1,
  127. throw_gravity = 8,
  128. throw_sound = "rangedweapons_throw",
  129. throw_dps = 0,
  130. throw_mob_penetration = 0,
  131. throw_node_penetration = 0,
  132. throw_entity = "rangedweapons:shot_bullet",
  133. throw_visual = "wielditem",
  134. throw_texture = "rangedweapons:bronze_shuriken",
  135. throw_projectile_size = 0.15,
  136. throw_glass_breaking = 0,
  137. has_sparks = 1,
  138. ignites_explosives = 0,
  139. throw_door_breaking = 0,
  140. OnCollision = function(player,bullet,target)
  141. if math.random(1, 100) <= 30 then
  142. minetest.add_item(bullet.object:get_pos(), "rangedweapons:bronze_shuriken") end end,
  143. },
  144. on_use = function(itemstack, user, pointed_thing)
  145. rangedweapons_yeet(itemstack, user)
  146. return itemstack
  147. end,
  148. })
  149. minetest.register_craftitem("rangedweapons:golden_shuriken", {
  150. description = "" ..core.colorize("#35cdff","Golden shuriken\n") ..core.colorize("#FFFFFF", "Ranged damage: 8\n") ..core.colorize("#FFFFFF", "Accuracy: 75%\n") ..core.colorize("#FFFFFF", "knockback: 10\n") ..core.colorize("#FFFFFF", "Critical chance: 12%\n") ..core.colorize("#FFFFFF", "Critical efficiency: 2.5x\n") ..core.colorize("#FFFFFF", "Shuriken survival rate: 25%\n") ..core.colorize("#FFFFFF", "Projectile gravity: 15\n") ..core.colorize("#FFFFFF", "Throwing cooldown: 0.4\n") ..core.colorize("#FFFFFF", "Projectile velocity: 25"),
  151. range = 0,
  152. stack_max= 175,
  153. wield_scale = {x=0.6,y=0.6,z=0.5},
  154. inventory_image = "rangedweapons_golden_shuriken.png",
  155. RW_throw_capabilities = {
  156. throw_damage = {fleshy=8,knockback=10},
  157. throw_crit = 12,
  158. throw_critEffc = 2.5,
  159. throw_skill = {"throw_skill",35},
  160. throw_velocity = 25,
  161. throw_accuracy = 75,
  162. throw_cooldown = 0.4,
  163. throw_projectiles = 1,
  164. throw_gravity = 15,
  165. throw_sound = "rangedweapons_throw",
  166. throw_dps = 0,
  167. throw_mob_penetration = 0,
  168. throw_node_penetration = 0,
  169. throw_entity = "rangedweapons:shot_bullet",
  170. throw_visual = "wielditem",
  171. throw_texture = "rangedweapons:golden_shuriken",
  172. throw_projectile_size = 0.15,
  173. throw_glass_breaking = 1,
  174. has_sparks = 1,
  175. ignites_explosives = 0,
  176. throw_door_breaking = 0,
  177. OnCollision = function(player,bullet,target)
  178. if math.random(1, 100) <= 25 then
  179. minetest.add_item(bullet.object:get_pos(), "rangedweapons:golden_shuriken") end end,
  180. },
  181. on_use = function(itemstack, user, pointed_thing)
  182. rangedweapons_yeet(itemstack, user)
  183. return itemstack
  184. end,
  185. })
  186. minetest.register_craftitem("rangedweapons:mese_shuriken", {
  187. description = "" ..core.colorize("#35cdff","MESE shuriken\n") ..core.colorize("#FFFFFF", "Ranged damage: 7\n") ..core.colorize("#FFFFFF", "Accuracy: 90%\n") ..core.colorize("#FFFFFF", "knockback: 2\n") ..core.colorize("#FFFFFF", "Critical chance: 9%\n") ..core.colorize("#FFFFFF", "Critical efficiency: 2.3x\n") ..core.colorize("#FFFFFF", "Shuriken survival rate: 50%\n") ..core.colorize("#FFFFFF", "Projectile gravity: 5\n") ..core.colorize("#FFFFFF", "Throwing cooldown: 0.2\n") ..core.colorize("#FFFFFF", "Enemy penetration: 25%\n") ..core.colorize("#FFFFFF", "Projectile velocity: 35"),
  188. range = 0,
  189. stack_max= 175,
  190. wield_scale = {x=0.6,y=0.6,z=0.5},
  191. inventory_image = "rangedweapons_mese_shuriken.png",
  192. RW_throw_capabilities = {
  193. throw_damage = {fleshy=7,knockback=2},
  194. throw_crit = 9,
  195. throw_critEffc = 2.3,
  196. throw_skill = {"throw_skill",45},
  197. throw_velocity = 35,
  198. throw_accuracy = 90,
  199. throw_cooldown = 0.2,
  200. throw_projectiles = 1,
  201. throw_gravity = 5,
  202. throw_sound = "rangedweapons_throw",
  203. throw_dps = 0,
  204. throw_mob_penetration = 25,
  205. throw_node_penetration = 0,
  206. throw_entity = "rangedweapons:shot_bullet",
  207. throw_visual = "wielditem",
  208. throw_texture = "rangedweapons:mese_shuriken",
  209. throw_projectile_size = 0.15,
  210. throw_glass_breaking = 1,
  211. has_sparks = 1,
  212. ignites_explosives = 0,
  213. throw_door_breaking = 0,
  214. OnCollision = function(player,bullet,target)
  215. if math.random(1, 100) <= 50 then
  216. minetest.add_item(bullet.object:get_pos(), "rangedweapons:mese_shuriken") end end,
  217. },
  218. on_use = function(itemstack, user, pointed_thing)
  219. rangedweapons_yeet(itemstack, user)
  220. return itemstack
  221. end,
  222. })
  223. minetest.register_craftitem("rangedweapons:diamond_shuriken", {
  224. description = "" ..core.colorize("#35cdff","Diamond shuriken\n") ..core.colorize("#FFFFFF", "Ranged damage: 8\n") ..core.colorize("#FFFFFF", "Accuracy: 95%\n") ..core.colorize("#FFFFFF", "knockback: 2\n") ..core.colorize("#FFFFFF", "Critical chance: 10%\n") ..core.colorize("#FFFFFF", "Critical efficiency: 2.4x\n") ..core.colorize("#FFFFFF", "Shuriken survival rate: 60%\n") ..core.colorize("#FFFFFF", "Projectile gravity: 5\n") ..core.colorize("#FFFFFF", "Throwing cooldown: 0.15\n") ..core.colorize("#FFFFFF", "Enemy penetration: 33%\n") ..core.colorize("#FFFFFF", "Projectile velocity: 40"),
  225. range = 0,
  226. stack_max= 200,
  227. wield_scale = {x=0.6,y=0.6,z=0.5},
  228. inventory_image = "rangedweapons_diamond_shuriken.png",
  229. RW_throw_capabilities = {
  230. throw_damage = {fleshy=8,knockback=2},
  231. throw_crit = 10,
  232. throw_critEffc = 2.4,
  233. throw_skill = {"throw_skill",50},
  234. throw_velocity = 40,
  235. throw_accuracy = 95,
  236. throw_cooldown = 0.15,
  237. throw_projectiles = 1,
  238. throw_gravity = 5,
  239. throw_sound = "rangedweapons_throw",
  240. throw_dps = 0,
  241. throw_mob_penetration = 33,
  242. throw_node_penetration = 0,
  243. throw_entity = "rangedweapons:shot_bullet",
  244. throw_visual = "wielditem",
  245. throw_texture = "rangedweapons:diamond_shuriken",
  246. throw_projectile_size = 0.15,
  247. throw_glass_breaking = 1,
  248. has_sparks = 1,
  249. ignites_explosives = 0,
  250. throw_door_breaking = 0,
  251. OnCollision = function(player,bullet,target)
  252. if math.random(1, 100) <= 60 then
  253. minetest.add_item(bullet.object:get_pos(), "rangedweapons:diamond_shuriken") end end,
  254. },
  255. on_use = function(itemstack, user, pointed_thing)
  256. rangedweapons_yeet(itemstack, user)
  257. return itemstack
  258. end,
  259. })