init.lua 15 KB

123456789101112131415161718192021222324252627282930313233343536373839404142434445464748495051525354555657585960616263646566676869707172737475767778798081828384858687888990919293949596979899100101102103104105106107108109110111112113114115116117118119120121122123124125126127128129130131132133134135136137138139140141142143144145146147148149150151152153154155156157158159160161162163164165166167168169170171172173174175176177178179180181182183184185186187188189190191192193194195196197198199200201202203204205206207208209210211212213214215216217218219220221222223224225226227228229230231232233234235236237238239240241242243244245246247248249250251252253254255256257258259260261262263264265266267268269270271272273274275276277278279280281282283284285286287288289290291292293294295296297298299300301302303304305306307308309310311312313314315316317318319320321322323324325326327328329330331332333334335336337338339340341342343344345346347348349350351352353354355356357358359360361362363364365366367368369370371372373374375376377378379380381382383384385386387388389390391392393394395396397398399400401402403404405406407408409410411412413414415416417418419420421422423424425426427428429430431432433434435436437438439440441442443444445446447448449450451452453454455456457458459460461462463464465466467468469470471472473474475476477478479480481482483484485486487488489490491492493494495496497498499500501502503504505506507508509510511512513514515516517518519520521522523524525526527528529530531532533534535536537538539540541542543544545546547548549550551552553554555556557558559560561562563564565566567568569570571572573574575576577578579580581582
  1. dofile(minetest.get_modpath("lottweapons") .. "/special.lua")
  2. dofile(minetest.get_modpath("lottweapons") .. "/crafting.lua")
  3. --Weapons!
  4. -- Battle axes:
  5. minetest.register_tool("lottweapons:wood_battleaxe", {
  6. description = "Training Battleaxe",
  7. inventory_image = "lottweapons_wood_battleaxe.png",
  8. tool_capabilities = {
  9. full_punch_interval = 2,
  10. max_drop_level=1,
  11. groupcaps={
  12. choppy={times={[1]=3.75, [2]=2.75, [3]=2.05}, uses=5, maxlevel=1},
  13. snappy={times={[1]=2.75, [2]=1.75, [3]=0.75}, uses=5, maxlevel=1},
  14. },
  15. damage_groups = {fleshy=.50},
  16. },
  17. })
  18. minetest.register_tool("lottweapons:stone_battleaxe", {
  19. description = "Stone Battleaxe",
  20. inventory_image = "lottweapons_stone_battleaxe.png",
  21. tool_capabilities = {
  22. full_punch_interval = 1.50,
  23. max_drop_level=1,
  24. groupcaps={
  25. choppy={times={[1]=3.35, [2]=2.10, [3]=1.85}, uses=5, maxlevel=1},
  26. snappy={times={[1]=2.75, [2]=1.75, [3]=0.75}, uses=5, maxlevel=1},
  27. },
  28. damage_groups = {fleshy=1.50},
  29. },
  30. })
  31. minetest.register_tool("lottweapons:copper_battleaxe", {
  32. description = "Copper Battleaxe",
  33. inventory_image = "lottweapons_copper_battleaxe.png",
  34. tool_capabilities = {
  35. full_punch_interval = 1.25,
  36. max_drop_level=1,
  37. groupcaps={
  38. choppy={times={[1]=3.25, [2]=2.00, [3]=1.75}, uses=5, maxlevel=1},
  39. snappy={times={[1]=2.75, [2]=1.45, [3]=0.60}, uses=10, maxlevel=1},
  40. },
  41. damage_groups = {fleshy=3},
  42. },
  43. })
  44. minetest.register_tool("lottweapons:tin_battleaxe", {
  45. description = "Tin Battleaxe",
  46. inventory_image = "lottweapons_tin_battleaxe.png",
  47. tool_capabilities = {
  48. full_punch_interval = 1.25,
  49. max_drop_level=1,
  50. groupcaps={
  51. choppy={times={[1]=3.25, [2]=2.00, [3]=1.75}, uses=5, maxlevel=1},
  52. snappy={times={[1]=2.75, [2]=1.45, [3]=0.60}, uses=10, maxlevel=1},
  53. },
  54. damage_groups = {fleshy=3},
  55. },
  56. })
  57. minetest.register_tool("lottweapons:steel_battleaxe", {
  58. description = "Steel Battleaxe",
  59. inventory_image = "lottweapons_steel_battleaxe.png",
  60. tool_capabilities = {
  61. full_punch_interval = 1.05,
  62. max_drop_level=1,
  63. groupcaps={
  64. choppy={times={[1]=3, [2]=1.90, [3]=1.50}, uses=15, maxlevel=2},
  65. snappy={times={[1]=2.75, [2]=1.45, [3]=0.60}, uses=25, maxlevel=2},
  66. },
  67. damage_groups = {fleshy=4.5},
  68. },
  69. })
  70. minetest.register_tool("lottweapons:bronze_battleaxe", {
  71. description = "Bronze Battleaxe",
  72. inventory_image = "lottweapons_bronze_battleaxe.png",
  73. tool_capabilities = {
  74. full_punch_interval = 0.90,
  75. max_drop_level=1,
  76. groupcaps={
  77. choppy={times={[1]=2.80, [2]=1.70, [3]=1.30}, uses=20, maxlevel=2},
  78. snappy={times={[1]=2.55, [2]=1.25, [3]=0.50}, uses=30, maxlevel=2},
  79. },
  80. damage_groups = {fleshy=5},
  81. },
  82. })
  83. minetest.register_tool("lottweapons:silver_battleaxe", {
  84. description = "Silver Battleaxe",
  85. inventory_image = "lottweapons_silver_battleaxe.png",
  86. tool_capabilities = {
  87. full_punch_interval = 1,
  88. max_drop_level=1,
  89. groupcaps={
  90. choppy={times={[1]=2.80, [2]=1.70, [3]=1.30}, uses=15, maxlevel=2},
  91. snappy={times={[1]=2.60, [2]=1.30, [3]=0.50}, uses=25, maxlevel=2},
  92. },
  93. damage_groups = {fleshy=5.5},
  94. },
  95. })
  96. minetest.register_tool("lottweapons:gold_battleaxe", {
  97. description = "Gold Battleaxe",
  98. inventory_image = "lottweapons_gold_battleaxe.png",
  99. tool_capabilities = {
  100. full_punch_interval = 0.75,
  101. max_drop_level=1,
  102. groupcaps={
  103. choppy={times={[1]=2.80, [2]=1.70, [3]=1.30}, uses=20, maxlevel=2},
  104. snappy={times={[1]=2.60, [2]=1.30, [3]=0.50}, uses=30, maxlevel=2},
  105. },
  106. damage_groups = {fleshy=5.5},
  107. },
  108. })
  109. minetest.register_tool("lottweapons:galvorn_battleaxe", {
  110. description = "Galvorn Battleaxe",
  111. inventory_image = "lottweapons_galvorn_battleaxe.png",
  112. groups = {forbidden=1},
  113. tool_capabilities = {
  114. full_punch_interval = 0.5,
  115. max_drop_level=1,
  116. groupcaps={
  117. choppy={times={[1]=2.50, [2]=1.50, [3]=.90}, uses=25, maxlevel=2},
  118. snappy={times={[1]=2.50, [2]=1.50, [3]=0.85}, uses=35, maxlevel=2},
  119. },
  120. damage_groups = {fleshy=6},
  121. },
  122. })
  123. minetest.register_tool("lottweapons:mithril_battleaxe", {
  124. description = "Mithril Battleaxe",
  125. inventory_image = "lottweapons_mithril_battleaxe.png",
  126. tool_capabilities = {
  127. full_punch_interval = .25,
  128. max_drop_level=1,
  129. groupcaps={
  130. choppy={times={[1]=2, [2]=1, [3]=.50}, uses=35, maxlevel=3},
  131. snappy={times={[1]=1, [2]=1.10, [3]=0.50}, uses=40, maxlevel=3},
  132. },
  133. damage_groups = {fleshy=7},
  134. },
  135. })
  136. --Warhammers:
  137. minetest.register_tool("lottweapons:wood_warhammer", {
  138. description = "Training Warhammer",
  139. inventory_image = "lottweapons_wood_warhammer.png",
  140. range = 2,
  141. tool_capabilities = {
  142. full_punch_interval = 2,
  143. max_drop_level=1,
  144. groupcaps={
  145. snappy={times={[1]=3.40, [2]=2.40, [3]=1.30}, uses=5, maxlevel=1},
  146. },
  147. damage_groups = {fleshy=.75},
  148. },
  149. })
  150. minetest.register_tool("lottweapons:stone_warhammer", {
  151. description = "Stone Warhammer",
  152. inventory_image = "lottweapons_stone_warhammer.png",
  153. range = 2,
  154. tool_capabilities = {
  155. full_punch_interval = 1.5,
  156. max_drop_level=1,
  157. groupcaps={
  158. snappy={times={[1]=2.85, [2]=1.85, [3]=1.10}, uses=5, maxlevel=1},
  159. },
  160. damage_groups = {fleshy=3},
  161. },
  162. })
  163. minetest.register_tool("lottweapons:copper_warhammer", {
  164. description = "Copper Warhammer",
  165. inventory_image = "lottweapons_copper_warhammer.png",
  166. range = 2,
  167. tool_capabilities = {
  168. full_punch_interval = 1.3,
  169. max_drop_level=1,
  170. groupcaps={
  171. snappy={times={[1]=3, [2]=1.80, [3]=1.00}, uses=5, maxlevel=1},
  172. },
  173. damage_groups = {fleshy=4.5},
  174. },
  175. })
  176. minetest.register_tool("lottweapons:tin_warhammer", {
  177. description = "Tin Warhammer",
  178. inventory_image = "lottweapons_tin_warhammer.png",
  179. range = 2,
  180. tool_capabilities = {
  181. full_punch_interval = 1.3,
  182. max_drop_level=1,
  183. groupcaps={
  184. snappy={times={[1]=3, [2]=1.80, [3]=1.00}, uses=5, maxlevel=1},
  185. },
  186. damage_groups = {fleshy=4.5},
  187. },
  188. })
  189. minetest.register_tool("lottweapons:steel_warhammer", {
  190. description = "Steel Warhammer",
  191. inventory_image = "lottweapons_steel_warhammer.png",
  192. range = 2,
  193. tool_capabilities = {
  194. full_punch_interval = 1.2,
  195. max_drop_level=1,
  196. groupcaps={
  197. snappy={times={[1]=2.75, [2]=1.45, [3]=0.60}, uses=25, maxlevel=2},
  198. },
  199. damage_groups = {fleshy=6},
  200. },
  201. })
  202. minetest.register_tool("lottweapons:bronze_warhammer", {
  203. description = "Bronze Warhammer",
  204. inventory_image = "lottweapons_bronze_warhammer.png",
  205. range = 2,
  206. tool_capabilities = {
  207. full_punch_interval = 1.1,
  208. max_drop_level=1,
  209. groupcaps={
  210. snappy={times={[1]=2.75, [2]=1.45, [3]=0.60}, uses=30, maxlevel=2},
  211. },
  212. damage_groups = {fleshy=6.5},
  213. },
  214. })
  215. minetest.register_tool("lottweapons:silver_warhammer", {
  216. description = "Silver Warhammer",
  217. inventory_image = "lottweapons_silver_warhammer.png",
  218. range = 2,
  219. tool_capabilities = {
  220. full_punch_interval = 1,
  221. max_drop_level=1,
  222. groupcaps={
  223. snappy={times={[1]=2.60, [2]=1.40, [3]=0.50}, uses=20, maxlevel=2},
  224. },
  225. damage_groups = {fleshy=7.5},
  226. },
  227. })
  228. minetest.register_tool("lottweapons:gold_warhammer", {
  229. description = "Gold Warhammer",
  230. inventory_image = "lottweapons_gold_warhammer.png",
  231. tool_capabilities = {
  232. full_punch_interval = 0.75,
  233. max_drop_level=1,
  234. groupcaps={
  235. snappy={times={[1]=2.60, [2]=1.40, [3]=0.50}, uses=30, maxlevel=2},
  236. },
  237. damage_groups = {fleshy=7.5},
  238. },
  239. })
  240. minetest.register_tool("lottweapons:galvorn_warhammer", {
  241. description = "Galvorn Warhammer",
  242. inventory_image = "lottweapons_galvorn_warhammer.png",
  243. range = 2,
  244. groups = {forbidden=1},
  245. tool_capabilities = {
  246. full_punch_interval = 0.50,
  247. max_drop_level=1,
  248. groupcaps={
  249. snappy={times={[1]=2.50, [2]=1.30, [3]=0.45}, uses=35, maxlevel=2},
  250. },
  251. damage_groups = {fleshy=8},
  252. },
  253. })
  254. minetest.register_tool("lottweapons:mithril_warhammer", {
  255. description = "Mithril Warhammer",
  256. inventory_image = "lottweapons_mithril_warhammer.png",
  257. range = 2,
  258. tool_capabilities = {
  259. full_punch_interval = 0.25,
  260. max_drop_level=1,
  261. groupcaps={
  262. snappy={times={[1]=2.60, [2]=1.40, [3]=0.50}, uses=40, maxlevel=3},
  263. },
  264. damage_groups = {fleshy=9},
  265. },
  266. })
  267. --Spears:
  268. minetest.register_tool("lottweapons:wood_spear", {
  269. description = "Training Spear",
  270. inventory_image = "lottweapons_wood_spear.png",
  271. wield_image = "lottweapons_wood_spear.png^[transformFX",
  272. range = 7,
  273. tool_capabilities = {
  274. full_punch_interval = 2,
  275. max_drop_level=1,
  276. groupcaps={
  277. snappy={times={[1]=3.70, [2]=2.70, [3]=1.70}, uses=3, maxlevel=1},
  278. },
  279. damage_groups = {fleshy=.75},
  280. }
  281. })
  282. minetest.register_tool("lottweapons:stone_spear", {
  283. description = "Stone Spear",
  284. inventory_image = "lottweapons_stone_spear.png",
  285. wield_image = "lottweapons_stone_spear.png^[transformFX",
  286. range = 7,
  287. tool_capabilities = {
  288. full_punch_interval = 1.50,
  289. max_drop_level=1,
  290. groupcaps={
  291. snappy={times={[1]=2.75, [2]=1.75, [3]=0.75}, uses=5, maxlevel=1},
  292. },
  293. damage_groups = {fleshy=2},
  294. }
  295. })
  296. minetest.register_tool("lottweapons:copper_spear", {
  297. description = "Copper Spear",
  298. inventory_image = "lottweapons_copper_spear.png",
  299. wield_image = "lottweapons_copper_spear.png^[transformFX",
  300. range = 7,
  301. tool_capabilities = {
  302. full_punch_interval = 1.30,
  303. max_drop_level=1,
  304. groupcaps={
  305. snappy={times={[1]=2.70, [2]=1.70, [3]=0.70}, uses=5, maxlevel=1},
  306. },
  307. damage_groups = {fleshy=4},
  308. }
  309. })
  310. minetest.register_tool("lottweapons:tin_spear", {
  311. description = "Tin Spear",
  312. inventory_image = "lottweapons_tin_spear.png",
  313. wield_image = "lottweapons_tin_spear.png^[transformFX",
  314. range = 7,
  315. tool_capabilities = {
  316. full_punch_interval = 1.30,
  317. max_drop_level=1,
  318. groupcaps={
  319. snappy={times={[1]=2.70, [2]=1.70, [3]=0.70}, uses=5, maxlevel=1},
  320. },
  321. damage_groups = {fleshy=4},
  322. }
  323. })
  324. minetest.register_tool("lottweapons:steel_spear", {
  325. description = "Steel Spear",
  326. inventory_image = "lottweapons_steel_spear.png",
  327. wield_image = "lottweapons_steel_spear.png^[transformFX",
  328. range = 7,
  329. tool_capabilities = {
  330. full_punch_interval = 1.20,
  331. max_drop_level=1,
  332. groupcaps={
  333. snappy={times={[1]=2.40, [2]=1.40, [3]=0.40}, uses=15, maxlevel=1},
  334. },
  335. damage_groups = {fleshy=5},
  336. }
  337. })
  338. minetest.register_tool("lottweapons:bronze_spear", {
  339. description = "Bronze Spear",
  340. inventory_image = "lottweapons_bronze_spear.png",
  341. wield_image = "lottweapons_bronze_spear.png^[transformFX",
  342. range = 7,
  343. tool_capabilities = {
  344. full_punch_interval = 1.10,
  345. max_drop_level=1,
  346. groupcaps={
  347. snappy={times={[1]=2.40, [2]=1.40, [3]=0.40}, uses=20, maxlevel=1},
  348. },
  349. damage_groups = {fleshy=5.5},
  350. }
  351. })
  352. minetest.register_tool("lottweapons:silver_spear", {
  353. description = "Silver Spear",
  354. inventory_image = "lottweapons_silver_spear.png",
  355. wield_image = "lottweapons_silver_spear.png^[transformFX",
  356. range = 7,
  357. tool_capabilities = {
  358. full_punch_interval = 1,
  359. max_drop_level=1,
  360. groupcaps={
  361. snappy={times={[1]=2.2, [2]=1.2, [3]=0.20}, uses=15, maxlevel=1},
  362. },
  363. damage_groups = {fleshy=6},
  364. }
  365. })
  366. minetest.register_tool("lottweapons:gold_spear", {
  367. description = "Gold Spear",
  368. inventory_image = "lottweapons_gold_spear.png",
  369. wield_image = "lottweapons_gold_spear.png^[transformFX",
  370. range = 7,
  371. tool_capabilities = {
  372. full_punch_interval = 0.75,
  373. max_drop_level=1,
  374. groupcaps={
  375. snappy={times={[1]=2.2, [2]=1.2, [3]=0.20}, uses=20, maxlevel=1},
  376. },
  377. damage_groups = {fleshy=6},
  378. }
  379. })
  380. minetest.register_tool("lottweapons:galvorn_spear", {
  381. description = "Galvorn Spear",
  382. inventory_image = "lottweapons_galvorn_spear.png",
  383. wield_image = "lottweapons_galvorn_spear.png^[transformFX",
  384. range = 7,
  385. groups = {forbidden=1},
  386. tool_capabilities = {
  387. full_punch_interval = 0.50,
  388. max_drop_level=1,
  389. groupcaps={
  390. snappy={times={[1]=2.3, [2]=1.3, [3]=0.30}, uses=25, maxlevel=1},
  391. },
  392. damage_groups = {fleshy=7},
  393. }
  394. })
  395. minetest.register_tool("lottweapons:mithril_spear", {
  396. description = "Mithril Spear",
  397. inventory_image = "lottweapons_mithril_spear.png",
  398. wield_image = "lottweapons_mithril_spear.png^[transformFX",
  399. range = 7,
  400. tool_capabilities = {
  401. full_punch_interval = 0.25,
  402. max_drop_level=1,
  403. groupcaps={
  404. snappy={times={[1]=2.00, [2]=1.00, [3]=0.20}, uses=30, maxlevel=2},
  405. },
  406. damage_groups = {fleshy=8},
  407. }
  408. })
  409. --Daggers:
  410. minetest.register_tool("lottweapons:wood_dagger", {
  411. description = "Training Dagger",
  412. inventory_image = "lottweapons_wood_dagger.png",
  413. range = 3,
  414. tool_capabilities = {
  415. full_punch_interval = 2,
  416. max_drop_level=0,
  417. groupcaps={
  418. snappy={times={[2]=2.25, [3]=1.75}, uses=2, maxlevel=1},
  419. },
  420. damage_groups = {fleshy=.10},
  421. }
  422. })
  423. minetest.register_tool("lottweapons:stone_dagger", {
  424. description = "Stone Dagger",
  425. inventory_image = "lottweapons_stone_dagger.png",
  426. range = 3,
  427. tool_capabilities = {
  428. full_punch_interval = 1.5,
  429. max_drop_level=0,
  430. groupcaps={
  431. snappy={times={[2]=1.35, [3]=0.85}, uses=5, maxlevel=1},
  432. },
  433. damage_groups = {fleshy=.90},
  434. }
  435. })
  436. minetest.register_tool("lottweapons:copper_dagger", {
  437. description = "Copper Dagger",
  438. inventory_image = "lottweapons_copper_dagger.png",
  439. range = 3,
  440. tool_capabilities = {
  441. full_punch_interval = 1.2,
  442. max_drop_level=0,
  443. groupcaps={
  444. snappy={times={[2]=1.25, [3]=0.75}, uses=5, maxlevel=1},
  445. },
  446. damage_groups = {fleshy=2.5},
  447. }
  448. })
  449. minetest.register_tool("lottweapons:tin_dagger", {
  450. description = "Tin Dagger",
  451. inventory_image = "lottweapons_tin_dagger.png",
  452. range = 3,
  453. tool_capabilities = {
  454. full_punch_interval = 1.2,
  455. max_drop_level=0,
  456. groupcaps={
  457. snappy={times={[2]=1.25, [3]=0.75}, uses=5, maxlevel=1},
  458. },
  459. damage_groups = {fleshy=2.5},
  460. }
  461. })
  462. minetest.register_tool("lottweapons:steel_dagger", {
  463. description = "Steel Dagger",
  464. inventory_image = "lottweapons_steel_dagger.png",
  465. range = 3,
  466. tool_capabilities = {
  467. full_punch_interval = 1.1,
  468. max_drop_level=0,
  469. groupcaps={
  470. snappy={times={[2]=1.00, [3]=0.50}, uses=10, maxlevel=1},
  471. },
  472. damage_groups = {fleshy=4},
  473. }
  474. })
  475. minetest.register_tool("lottweapons:bronze_dagger", {
  476. description = "Bronze Dagger",
  477. inventory_image = "lottweapons_bronze_dagger.png",
  478. range = 3,
  479. tool_capabilities = {
  480. full_punch_interval = 1.5,
  481. max_drop_level=0,
  482. groupcaps={
  483. snappy={times={[2]=1.00, [3]=0.50}, uses=15, maxlevel=1},
  484. },
  485. damage_groups = {fleshy=4.5},
  486. }
  487. })
  488. minetest.register_tool("lottweapons:silver_dagger", {
  489. description = "Silver Dagger",
  490. inventory_image = "lottweapons_silver_dagger.png",
  491. range = 3,
  492. tool_capabilities = {
  493. full_punch_interval = 1,
  494. max_drop_level=0,
  495. groupcaps={
  496. snappy={times={[2]=.80, [3]=0.40}, uses=10, maxlevel=1},
  497. },
  498. damage_groups = {fleshy=5},
  499. }
  500. })
  501. minetest.register_tool("lottweapons:gold_dagger", {
  502. description = "Gold Dagger",
  503. inventory_image = "lottweapons_gold_dagger.png",
  504. range = 3,
  505. tool_capabilities = {
  506. full_punch_interval = .6,
  507. max_drop_level=0,
  508. groupcaps={
  509. snappy={times={[2]=.80, [3]=0.40}, uses=15, maxlevel=1},
  510. },
  511. damage_groups = {fleshy=5},
  512. }
  513. })
  514. minetest.register_tool("lottweapons:galvorn_dagger", {
  515. description = "Galvorn Dagger",
  516. inventory_image = "lottweapons_galvorn_dagger.png",
  517. range = 3,
  518. groups = {forbidden=1},
  519. tool_capabilities = {
  520. full_punch_interval = .5,
  521. max_drop_level=0,
  522. groupcaps={
  523. snappy={times={[2]=.90, [3]=0.45}, uses=20, maxlevel=1},
  524. },
  525. damage_groups = {fleshy=5.5},
  526. }
  527. })
  528. minetest.register_tool("lottweapons:mithril_dagger", {
  529. description = "Mithril Dagger",
  530. inventory_image = "lottweapons_mithril_dagger.png",
  531. range = 3,
  532. tool_capabilities = {
  533. full_punch_interval = .25,
  534. max_drop_level=0,
  535. groupcaps={
  536. snappy={times={[2]=.75, [3]=0.35}, uses=25, maxlevel=2},
  537. },
  538. damage_groups = {fleshy=6.5},
  539. }
  540. })