init.lua 39 KB

1234567891011121314151617181920212223242526272829303132333435363738394041424344454647484950515253545556575859606162636465666768697071727374757677787980818283848586878889909192939495969798991001011021031041051061071081091101111121131141151161171181191201211221231241251261271281291301311321331341351361371381391401411421431441451461471481491501511521531541551561571581591601611621631641651661671681691701711721731741751761771781791801811821831841851861871881891901911921931941951961971981992002012022032042052062072082092102112122132142152162172182192202212222232242252262272282292302312322332342352362372382392402412422432442452462472482492502512522532542552562572582592602612622632642652662672682692702712722732742752762772782792802812822832842852862872882892902912922932942952962972982993003013023033043053063073083093103113123133143153163173183193203213223233243253263273283293303313323333343353363373383393403413423433443453463473483493503513523533543553563573583593603613623633643653663673683693703713723733743753763773783793803813823833843853863873883893903913923933943953963973983994004014024034044054064074084094104114124134144154164174184194204214224234244254264274284294304314324334344354364374384394404414424434444454464474484494504514524534544554564574584594604614624634644654664674684694704714724734744754764774784794804814824834844854864874884894904914924934944954964974984995005015025035045055065075085095105115125135145155165175185195205215225235245255265275285295305315325335345355365375385395405415425435445455465475485495505515525535545555565575585595605615625635645655665675685695705715725735745755765775785795805815825835845855865875885895905915925935945955965975985996006016026036046056066076086096106116126136146156166176186196206216226236246256266276286296306316326336346356366376386396406416426436446456466476486496506516526536546556566576586596606616626636646656666676686696706716726736746756766776786796806816826836846856866876886896906916926936946956966976986997007017027037047057067077087097107117127137147157167177187197207217227237247257267277287297307317327337347357367377387397407417427437447457467477487497507517527537547557567577587597607617627637647657667677687697707717727737747757767777787797807817827837847857867877887897907917927937947957967977987998008018028038048058068078088098108118128138148158168178188198208218228238248258268278288298308318328338348358368378388398408418428438448458468478488498508518528538548558568578588598608618628638648658668678688698708718728738748758768778788798808818828838848858868878888898908918928938948958968978988999009019029039049059069079089099109119129139149159169179189199209219229239249259269279289299309319329339349359369379389399409419429439449459469479489499509519529539549559569579589599609619629639649659669679689699709719729739749759769779789799809819829839849859869879889899909919929939949959969979989991000100110021003100410051006100710081009101010111012101310141015101610171018101910201021102210231024102510261027102810291030103110321033103410351036103710381039104010411042104310441045104610471048104910501051105210531054105510561057105810591060106110621063106410651066106710681069107010711072107310741075107610771078107910801081108210831084108510861087108810891090109110921093109410951096109710981099110011011102110311041105110611071108110911101111111211131114111511161117111811191120112111221123112411251126112711281129113011311132113311341135113611371138113911401141114211431144114511461147114811491150115111521153115411551156115711581159116011611162116311641165116611671168116911701171117211731174117511761177117811791180118111821183118411851186118711881189119011911192119311941195119611971198119912001201120212031204120512061207120812091210121112121213121412151216121712181219122012211222122312241225122612271228122912301231123212331234123512361237123812391240124112421243124412451246124712481249125012511252125312541255125612571258125912601261126212631264126512661267126812691270127112721273127412751276127712781279128012811282128312841285128612871288128912901291129212931294129512961297129812991300130113021303130413051306130713081309131013111312131313141315131613171318131913201321132213231324132513261327132813291330133113321333133413351336133713381339134013411342134313441345134613471348134913501351135213531354135513561357135813591360136113621363136413651366136713681369137013711372137313741375137613771378137913801381138213831384138513861387138813891390139113921393139413951396139713981399140014011402140314041405140614071408140914101411141214131414141514161417141814191420142114221423142414251426142714281429143014311432143314341435143614371438143914401441144214431444144514461447144814491450145114521453145414551456145714581459146014611462146314641465146614671468146914701471147214731474147514761477147814791480148114821483148414851486148714881489149014911492149314941495149614971498149915001501150215031504150515061507150815091510151115121513151415151516151715181519152015211522152315241525152615271528152915301531153215331534153515361537153815391540154115421543154415451546154715481549155015511552155315541555155615571558155915601561156215631564156515661567156815691570157115721573157415751576157715781579158015811582158315841585158615871588158915901591159215931594159515961597159815991600
  1. lottmobs = {}
  2. lottmobs.connected_player_names = {}
  3. lottmobs.player_guards = {}
  4. local file = io.open(minetest.get_worldpath().."/"..SAVEDIR.."/guard_hunger.txt", "r")
  5. if file then
  6. lottmobs.player_guards = minetest.deserialize(file:read("*all"))
  7. file:close()
  8. end
  9. minetest.register_on_joinplayer(function(player)
  10. lottmobs.connected_player_names[player:get_player_name()] = true
  11. end)
  12. minetest.register_on_leaveplayer(function(player)
  13. lottmobs.connected_player_names[player:get_player_name()] = nil
  14. end)
  15. minetest.register_globalstep(function(dtime)
  16. lottmobs.do_guard_hunger(dtime)
  17. end)
  18. minetest.register_on_shutdown(function()
  19. lottmobs.save_guard_hunger()
  20. end)
  21. dofile(minetest.get_modpath("lottmobs").."/functions.lua")
  22. dofile(minetest.get_modpath("lottmobs").."/craftitems.lua")
  23. dofile(minetest.get_modpath("lottmobs").."/elves.lua")
  24. dofile(minetest.get_modpath("lottmobs").."/dwarves.lua")
  25. dofile(minetest.get_modpath("lottmobs").."/hobbits.lua")
  26. dofile(minetest.get_modpath("lottmobs").."/horse.lua")
  27. dofile(minetest.get_modpath("lottmobs").."/warg.lua")
  28. dofile(minetest.get_modpath("lottmobs").."/trader_goods.lua")
  29. dofile(minetest.get_modpath("lottmobs").."/trader.lua")
  30. dofile(minetest.get_modpath("lottmobs").."/special_mobs.lua")
  31. dofile(minetest.get_modpath("lottmobs").."/animals.lua")
  32. -- Mobs
  33. mobs:register_mob("lottmobs:ent", {
  34. type = "npc",
  35. race = "ents",
  36. hp_min = 50,
  37. hp_max = 70,
  38. collisionbox = {-0.5, 0, -0.5, 0.5, 5, 0.5},
  39. textures = {
  40. {"lottmobs_ent.png"},
  41. },
  42. visual_size = {x=3.5,y=3.5},
  43. visual = "mesh",
  44. mesh = "ent_model.x",
  45. view_range = 20,
  46. makes_footstep_sound = true,
  47. walk_velocity = 1,
  48. run_velocity = 1.5,
  49. armor = 100,
  50. damage = 5,
  51. drops = {
  52. {name = "default:sapling",
  53. chance = 5,
  54. min = 1,
  55. max = 3,},
  56. {name = "lottplants:aldersapling",
  57. chance = 5,
  58. min = 1,
  59. max = 3,},
  60. {name = "lottplants:applesapling",
  61. chance = 5,
  62. min = 1,
  63. max = 3,},
  64. {name = "lottplants:birchsapling",
  65. chance = 5,
  66. min = 1,
  67. max = 3,},
  68. {name = "lottplants:beechsapling",
  69. chance = 5,
  70. min = 1,
  71. max = 3,},
  72. {name = "lottplants:culumaldasapling",
  73. chance = 5,
  74. min = 1,
  75. max = 3,},
  76. {name = "lottplants:elmsapling",
  77. chance = 5,
  78. min = 1,
  79. max = 3,},
  80. {name = "lottplants:lebethronsapling",
  81. chance = 5,
  82. min = 1,
  83. max = 3,},
  84. {name = "lottplants:plumsapling",
  85. chance = 5,
  86. min = 1,
  87. max = 3,},
  88. {name = "lottplants:rowansapling",
  89. chance = 5,
  90. min = 1,
  91. max = 3,},
  92. {name = "lottplants:yavannamiresapling",
  93. chance = 250,
  94. min = 1,
  95. max = 1,},
  96. },
  97. light_resistant = true,
  98. drawtype = "front",
  99. water_damage = 0,
  100. lava_damage = 60,
  101. light_damage = 0,
  102. attack_type = "dogfight",
  103. animation = {
  104. speed_normal = 15,
  105. speed_run = 15,
  106. stand_start = 17,
  107. stand_end = 17,
  108. walk_start = 10,
  109. walk_end = 80,
  110. run_start = 10,
  111. run_end = 80,
  112. punch_start = 1,
  113. punch_end = 1,
  114. },
  115. jump = true,
  116. sounds = {
  117. war_cry = "mobs_die_yell",
  118. death = "mobs_yeti_death",
  119. attack = "default_punch2",
  120. },
  121. attacks_monsters = true,
  122. peaceful = true,
  123. group_attack = true,
  124. step = 1,
  125. on_die = lottmobs.guard_die,
  126. })
  127. mobs:register_spawn("lottmobs:ent", {"lottmapgen:fangorn_grass"}, 20, -1, 6000, 3, 31000)
  128. mobs:register_mob("lottmobs:spider", {
  129. type = "monster",
  130. hp_min = 20,
  131. hp_max = 40,
  132. collisionbox = {-0.9, -0.01, -0.7, 0.7, 0.6, 0.7},
  133. textures = {
  134. {"lottmobs_spider.png"},
  135. {"lottmobs_spider_1.png"},
  136. {"lottmobs_spider_2.png"},
  137. },
  138. visual_size = {x=7,y=7},
  139. visual = "mesh",
  140. mesh = "spider_model.x",
  141. makes_footstep_sound = true,
  142. view_range = 15,
  143. walk_velocity = 1,
  144. run_velocity = 3,
  145. armor = 200,
  146. damage = 3,
  147. drops = {
  148. {name = "farming:string",
  149. chance = 3,
  150. min = 1,
  151. max = 6,},
  152. {name = "wool:white",
  153. chance = 10,
  154. min = 1,
  155. max = 3,},
  156. {name = "lottmobs:meat_raw",
  157. chance = 5,
  158. min = 1,
  159. max = 2,},
  160. },
  161. light_resistant = true,
  162. drawtype = "front",
  163. water_damage = 5,
  164. lava_damage = 5,
  165. light_damage = 0,
  166. on_rightclick = nil,
  167. attack_type = "dogfight",
  168. animation = {
  169. speed_normal = 15,
  170. speed_run = 15,
  171. stand_start = 1,
  172. stand_end = 1,
  173. walk_start = 20,
  174. walk_end = 40,
  175. run_start = 20,
  176. run_end = 40,
  177. punch_start = 50,
  178. punch_end = 90,
  179. },
  180. on_rightclick = function(self, clicker)
  181. local player_inv = clicker:get_inventory()
  182. local item = clicker:get_wielded_item()
  183. if item:get_name() == "vessels:glass_bottle" then
  184. if player_inv:room_for_item("main", 1) then
  185. item:take_item(1)
  186. player_inv:add_item("main", "lottmobs:spiderpoison")
  187. end
  188. clicker:set_wielded_item(item)
  189. end
  190. end,
  191. jump = true,
  192. sounds = {
  193. war_cry = "mobs_spider",
  194. death = "mobs_howl",
  195. attack = "mobs_oerkki_attack",
  196. },
  197. step = 1,
  198. on_die = lottmobs.guard_die,
  199. })
  200. mobs:register_spawn("lottmobs:spider", {"lottmapgen:mirkwood_grass"}, 20, -10, 6000, 3, 31000)
  201. mobs:register_mob("lottmobs:rohan_guard", {
  202. type = "npc",
  203. race = "GAMEman",
  204. hp_min = 20,
  205. hp_max = 30,
  206. collisionbox = {-0.3,-1.0,-0.3, 0.3,0.8,0.3},
  207. textures = {
  208. {"lottmobs_rohan_guard.png", "lottarmor_trans.png", "lottarmor_trans.png", "lottarmor_trans.png", "lottarmor_trans.png"},
  209. {"lottmobs_rohan_guard_1.png", "lottarmor_trans.png", "lottarmor_trans.png", "lottarmor_trans.png", "lottarmor_trans.png"},
  210. {"lottmobs_rohan_guard_2.png", "lottarmor_trans.png", "lottarmor_trans.png", "lottarmor_trans.png", "lottarmor_trans.png"},
  211. {"lottmobs_rohan_guard_3.png", "lottarmor_trans.png", "lottarmor_trans.png", "lottarmor_trans.png", "lottarmor_trans.png"},
  212. },
  213. visual = "mesh",
  214. mesh = "lottarmor_character.b3d",
  215. makes_footstep_sound = true,
  216. view_range = 12,
  217. walk_velocity = 2,
  218. run_velocity = 3.5,
  219. armor = 100,
  220. damage = 5,
  221. drops = {
  222. {name = "lottmobs:horseh1",
  223. chance = 15,
  224. min = 1,
  225. max = 1,},
  226. {name = "default:bronze_ingot",
  227. chance = 7,
  228. min = 1,
  229. max = 5,},
  230. {name = "lottmobs:horsepeg1",
  231. chance = 15,
  232. min = 1,
  233. max = 1,},
  234. {name = "lottmobs:horsearah1",
  235. chance = 15,
  236. min = 1,
  237. max = 1,},
  238. {name = "default:steel_sword",
  239. chance = 10,
  240. min = 1,
  241. max = 1,},
  242. {name = "lottores:galvornsword",
  243. chance = 35,
  244. min = 1,
  245. max = 1,},
  246. {name = "lottweapons:steel_spear",
  247. chance = 10,
  248. min = 1,
  249. max = 1,},
  250. {name = "lottarmor:helmet_bronze",
  251. chance = 30,
  252. min = 1,
  253. max = 1,},
  254. {name = "lottarmor:chestplate_steel",
  255. chance = 27,
  256. min = 1,
  257. max = 1,},
  258. {name = "lottarmor:leggings_tin",
  259. chance = 25,
  260. min = 1,
  261. max = 1,},
  262. {name = "lottarmor:boots_bronze",
  263. chance = 30,
  264. min = 1,
  265. max = 1,},
  266. },
  267. light_resistant = true,
  268. drawtype = "front",
  269. water_damage = 1,
  270. lava_damage = 10,
  271. light_damage = 0,
  272. attack_type = "dogfight",
  273. follow = "lottother:narya",
  274. animation = {
  275. speed_normal = 15,
  276. speed_run = 15,
  277. stand_start = 0,
  278. stand_end = 79,
  279. walk_start = 168,
  280. walk_end = 187,
  281. run_start = 168,
  282. run_end = 187,
  283. punch_start = 189,
  284. punch_end = 198,
  285. },
  286. jump = true,
  287. sounds = {
  288. war_cry = "mobs_die_yell",
  289. death = "default_death",
  290. attack = "default_punch2",
  291. },
  292. on_rightclick = function(self, clicker)
  293. lottmobs.guard(self, clicker, "default:gold_ingot", "Rohan Guard", "human")
  294. end,
  295. do_custom = lottmobs.do_custom_guard,
  296. attacks_monsters = true,
  297. peaceful = true,
  298. group_attack = true,
  299. step = 1,
  300. on_die = lottmobs.guard_die,
  301. })
  302. mobs:register_spawn("lottmobs:rohan_guard", {"lottmapgen:rohan_grass"}, 20, -1, 6000, 3, 31000)
  303. lottmobs.register_guard_craftitem("lottmobs:rohan_guard", "Rohan Guard", "lottmobs_rohan_guard_inv.png")
  304. mobs:register_mob("lottmobs:gondor_guard", {
  305. type = "npc",
  306. race = "GAMEman",
  307. hp_min = 20,
  308. hp_max = 30,
  309. collisionbox = {-0.3,-1.0,-0.3, 0.3,0.8,0.3},
  310. textures = {
  311. {"lottmobs_gondor_guard.png", "lottarmor_trans.png", "lottarmor_trans.png", "lottarmor_trans.png", "lottarmor_trans.png"},
  312. {"lottmobs_gondor_guard_1.png", "lottarmor_trans.png", "lottarmor_trans.png", "lottarmor_trans.png", "lottarmor_trans.png"},
  313. {"lottmobs_gondor_guard_2.png", "lottarmor_trans.png", "lottarmor_trans.png", "lottarmor_trans.png", "lottarmor_trans.png"},
  314. {"lottmobs_gondor_guard_3.png", "lottarmor_trans.png", "lottarmor_trans.png", "lottarmor_trans.png", "lottarmor_trans.png"},
  315. },
  316. visual = "mesh",
  317. mesh = "lottarmor_character.b3d",
  318. makes_footstep_sound = true,
  319. view_range = 12,
  320. walk_velocity = 2,
  321. run_velocity = 3.5,
  322. armor = 100,
  323. damage = 5,
  324. drops = {
  325. {name = "lottweapons:galvorn_warhammer",
  326. chance = 35,
  327. min = 1,
  328. max = 1,},
  329. {name = "default:steel_ingot",
  330. chance = 10,
  331. min = 2,
  332. max = 5,},
  333. {name = "lottweapons:galvorn_battleaxe",
  334. chance = 35,
  335. min = 1,
  336. max = 1,},
  337. {name = "default:steel_sword",
  338. chance = 10,
  339. min = 1,
  340. max = 1,},
  341. {name = "lottplants:whitesapling",
  342. chance = 250,
  343. min = 1,
  344. max = 1,},
  345. {name = "lottweapons:steel_battleaxe",
  346. chance = 10,
  347. min = 1,
  348. max = 1,},
  349. {name = "lottweapons:steel_warhammer",
  350. chance = 10,
  351. min = 1,
  352. max = 1,},
  353. {name = "lottarmor:helmet_steel",
  354. chance = 20,
  355. min = 1,
  356. max = 1,},
  357. {name = "lottarmor:chestplate_steel",
  358. chance = 20,
  359. min = 1,
  360. max = 1,},
  361. {name = "lottarmor:leggings_steel",
  362. chance = 20,
  363. min = 1,
  364. max = 1,},
  365. {name = "lottarmor:boots_steel",
  366. chance = 20,
  367. min = 1,
  368. max = 1,},
  369. {name = "lottarmor:helmet_galvorn",
  370. chance = 50,
  371. min = 1,
  372. max = 1,},
  373. {name = "lottarmor:chestplate_galvorn",
  374. chance = 50,
  375. min = 1,
  376. max = 1,},
  377. {name = "lottarmor:leggings_galvorn",
  378. chance = 50,
  379. min = 1,
  380. max = 1,},
  381. {name = "lottarmor:boots_galvorn",
  382. chance = 50,
  383. min = 1,
  384. max = 1,},
  385. },
  386. light_resistant = true,
  387. drawtype = "front",
  388. water_damage = 1,
  389. lava_damage = 5,
  390. light_damage = 0,
  391. attack_type = "dogfight",
  392. follow = "lottother:narya",
  393. animation = {
  394. speed_normal = 15,
  395. speed_run = 15,
  396. stand_start = 0,
  397. stand_end = 79,
  398. walk_start = 168,
  399. walk_end = 187,
  400. run_start = 168,
  401. run_end = 187,
  402. punch_start = 189,
  403. punch_end = 198,
  404. },
  405. jump = true,
  406. sounds = {
  407. war_cry = "mobs_die_yell",
  408. death = "default_death",
  409. attack = "default_punch2",
  410. },
  411. on_rightclick = function(self, clicker)
  412. lottmobs.guard(self, clicker, "default:gold_ingot", "Gondor Guard", "human")
  413. end,
  414. do_custom = lottmobs.do_custom_guard,
  415. attacks_monsters = true,
  416. peaceful = true,
  417. group_attack = true,
  418. step = 1,
  419. on_die = lottmobs.guard_die,
  420. })
  421. mobs:register_spawn("lottmobs:gondor_guard", {"lottmapgen:gondor_grass"}, 20, -1, 6000, 3, 31000)
  422. lottmobs.register_guard_craftitem("lottmobs:gondor_guard", "Gondor Guard", "lottmobs_gondor_guard_inv.png")
  423. mobs:register_mob("lottmobs:ithilien_ranger", {
  424. type = "npc",
  425. race = "GAMEman",
  426. hp_min = 25,
  427. hp_max = 40,
  428. collisionbox = {-0.3,-1.0,-0.3, 0.3,0.8,0.3},
  429. textures = {
  430. {"lottmobs_ithilien_ranger.png", "lottarmor_trans.png", "lottarmor_trans.png", "lottarmor_trans.png"},
  431. {"lottmobs_ithilien_ranger.png", "lottarmor_trans.png", "lottarmor_trans.png", "lottclothes_cloak_ranger.png"},
  432. {"lottmobs_ithilien_ranger_1.png", "lottarmor_trans.png", "lottarmor_trans.png", "lottarmor_trans.png"},
  433. {"lottmobs_ithilien_ranger_1.png", "lottarmor_trans.png", "lottarmor_trans.png", "lottclothes_cloak_ranger.png"},
  434. },
  435. visual = "mesh",
  436. mesh = "lottarmor_character.b3d",
  437. makes_footstep_sound = true,
  438. view_range = 16,
  439. walk_velocity = 2.5,
  440. run_velocity = 4,
  441. armor = 100,
  442. damage = 6,
  443. drops = {
  444. {name = "default:steel_ingot",
  445. chance = 10,
  446. min = 2,
  447. max = 5,},
  448. {name = "lottweapons:galvorn_battleaxe",
  449. chance = 50,
  450. min = 1,
  451. max = 1,},
  452. {name = "default:steel_sword",
  453. chance = 10,
  454. min = 1,
  455. max = 1,},
  456. {name = "lottweapons:steel_spear",
  457. chance = 10,
  458. min = 1,
  459. max = 1,},
  460. {name = "lottweapons:steel_dagger",
  461. chance = 10,
  462. min = 1,
  463. max = 1,},
  464. {name = "lottclothes:cloak_ranger",
  465. chance = 15,
  466. min = 1,
  467. max = 1,},
  468. {name = "lottclothes:cap_chetwood",
  469. chance = 20,
  470. min = 1,
  471. max = 1,},
  472. {name = "lottclothes:jacket_chetwood",
  473. chance = 20,
  474. min = 1,
  475. max = 1,},
  476. {name = "lottclothes:pants_chetwood",
  477. chance = 20,
  478. min = 1,
  479. max = 1,},
  480. {name = "lottclothes:boots_chetwood",
  481. chance = 20,
  482. min = 1,
  483. max = 1,},
  484. },
  485. light_resistant = true,
  486. drawtype = "front",
  487. water_damage = 1,
  488. lava_damage = 5,
  489. light_damage = 0,
  490. attack_type = "dogfight",
  491. follow = "lottother:narya",
  492. animation = {
  493. speed_normal = 15,
  494. speed_run = 15,
  495. stand_start = 0,
  496. stand_end = 79,
  497. walk_start = 168,
  498. walk_end = 187,
  499. run_start = 168,
  500. run_end = 187,
  501. punch_start = 189,
  502. punch_end = 198,
  503. },
  504. jump = true,
  505. sounds = {
  506. war_cry = "mobs_die_yell",
  507. death = "default_death",
  508. attack = "default_punch2",
  509. },
  510. on_rightclick = function(self, clicker)
  511. lottmobs.guard(self, clicker, "default:gold_ingot", "Ithilien Ranger", "human")
  512. end,
  513. do_custom = lottmobs.do_custom_guard,
  514. attacks_monsters = true,
  515. peaceful = true,
  516. group_attack = true,
  517. step = 1,
  518. on_die = lottmobs.guard_die,
  519. })
  520. mobs:register_spawn("lottmobs:ithilien_ranger", {"lottmapgen:ithilien_grass"}, 20, -1, 6000, 3, 31000)
  521. lottmobs.register_guard_craftitem("lottmobs:ithilien_ranger", "Ithilien Ranger", "lottmobs_ithilien_ranger_inv.png")
  522. mobs:register_mob("lottmobs:dunlending", {
  523. type = "npc",
  524. race = "GAMEorc",
  525. hp_min = 17,
  526. hp_max = 27,
  527. collisionbox = {-0.3,-1.0,-0.3, 0.3,0.8,0.3},
  528. visual = "mesh",
  529. mesh = "lottarmor_character.b3d",
  530. textures = {
  531. {"lottmobs_dunlending.png", "lottarmor_trans.png", "lottarmor_trans.png", "lottarmor_trans.png", "lottarmor_trans.png"},
  532. {"lottmobs_dunlending_1.png", "lottarmor_trans.png", "lottarmor_trans.png", "lottarmor_trans.png", "lottarmor_trans.png"},
  533. {"lottmobs_dunlending_2.png", "lottarmor_trans.png", "lottarmor_trans.png", "lottarmor_trans.png", "lottarmor_trans.png"},
  534. {"lottmobs_dunlending_3.png", "lottarmor_trans.png", "lottarmor_trans.png", "lottarmor_trans.png", "lottarmor_trans.png"},
  535. },
  536. makes_footstep_sound = true,
  537. view_range = 15,
  538. walk_velocity = 1,
  539. armor = 200,
  540. run_velocity = 3,
  541. damage = 3,
  542. drops = {
  543. {name = "lottores:tinpick",
  544. chance = 10,
  545. min = 1,
  546. max = 1,},
  547. {name = "lottores:tinaxe",
  548. chance = 10,
  549. min = 1,
  550. max = 1,},
  551. {name = "lottores:tinshovel",
  552. chance = 10,
  553. min = 1,
  554. max = 1,},
  555. {name = "lottores:tinspear",
  556. chance = 10,
  557. min = 1,
  558. max = 1,},
  559. {name = "lottweapons:tin_battleaxe",
  560. chance = 15,
  561. min = 1,
  562. max = 1,},
  563. {name = "lottweapons:tin_spear",
  564. chance = 15,
  565. min = 1,
  566. max = 1,},
  567. {name = "lottweapons:tin_warhammer",
  568. chance = 15,
  569. min = 1,
  570. max = 1,},
  571. {name = "lottweapons:tin_dagger",
  572. chance = 15,
  573. min = 1,
  574. max = 1,},
  575. {name = "lottarmor:helmet_tin",
  576. chance = 20,
  577. min = 1,
  578. max = 1,},
  579. {name = "lottarmor:chestplate_tin",
  580. chance = 20,
  581. min = 1,
  582. max = 1,},
  583. {name = "lottarmor:leggings_tin",
  584. chance = 20,
  585. min = 1,
  586. max = 1,},
  587. {name = "lottarmor:boots_tin",
  588. chance = 20,
  589. min = 1,
  590. max = 1,},
  591. {name = "lottmobs:dirty_trousers",
  592. chance = 10,
  593. min = 1,
  594. max = 1,},
  595. {name = "lottmobs:dirty_shirt",
  596. chance = 10,
  597. min = 1,
  598. max = 1,},
  599. },
  600. light_resistant = true,
  601. drawtype = "front",
  602. water_damage = 5,
  603. lava_damage = 5,
  604. light_damage = 0,
  605. on_rightclick = function(self, clicker)
  606. lottmobs.guard(self, clicker, "default:gold_ingot", "Dunlending", "human")
  607. end,
  608. do_custom = lottmobs.do_custom_guard,
  609. attack_type = "dogfight",
  610. animation = {
  611. speed_normal = 15,
  612. speed_run = 15,
  613. stand_start = 0,
  614. stand_end = 79,
  615. walk_start = 168,
  616. walk_end = 187,
  617. run_start = 168,
  618. run_end = 187,
  619. punch_start = 189,
  620. punch_end = 198,
  621. },
  622. jump = true,
  623. sounds = {
  624. war_cry = "mobs_barbarian_yell2",
  625. death = "mobs_barbarian_death",
  626. attack = "default_punch2",
  627. },
  628. step = 1,
  629. on_die = lottmobs.guard_die,
  630. })
  631. mobs:register_spawn("lottmobs:dunlending", {"lottmapgen:dunland_grass"}, 20, -1, 6000, 3, 31000)
  632. lottmobs.register_guard_craftitem("lottmobs:dunlending", "Dunlending", "lottmobs_dunlending_inv.png")
  633. local orc_armor = "lottarmor_chestplate_steel.png^lottarmor_leggings_steel.png^lottarmor_helmet_steel.png^lottarmor_boots_steel.png^lottarmor_shield_steel.png^[colorize:#00000055"
  634. mobs:register_mob("lottmobs:orc", {
  635. type = "npc",
  636. race = "GAMEorc",
  637. hp_min = 15,
  638. hp_max = 35,
  639. collisionbox = {-0.3,-1.0,-0.3, 0.3,0.8,0.3},
  640. visual = "mesh",
  641. mesh = "lottarmor_character.b3d",
  642. textures = {
  643. {"lottmobs_orc.png", "lottarmor_trans.png", "lottarmor_trans.png", "lottarmor_trans.png"},
  644. {"lottmobs_orc.png", orc_armor, "lottweapons_orc_sword.png", "lottarmor_trans.png"},
  645. {"lottmobs_orc.png", orc_armor, "lottweapons_orc_sword.png", "lottclothes_cloak_mordor.png"},
  646. {"lottmobs_orc_1.png", "lottarmor_trans.png", "lottarmor_trans.png", "lottarmor_trans.png"},
  647. {"lottmobs_orc_1.png", orc_armor, "lottweapons_orc_sword.png", "lottarmor_trans.png"},
  648. {"lottmobs_orc_1.png", orc_armor, "lottweapons_orc_sword.png", "lottclothes_cloak_mordor.png"},
  649. {"lottmobs_orc_2.png", "lottarmor_trans.png", "lottarmor_trans.png", "lottarmor_trans.png"},
  650. {"lottmobs_orc_2.png", orc_armor, "lottweapons_orc_sword.png", "lottarmor_trans.png"},
  651. {"lottmobs_orc_2.png", orc_armor, "lottweapons_orc_sword.png", "lottclothes_cloak_mordor.png"},
  652. },
  653. makes_footstep_sound = true,
  654. view_range = 15,
  655. walk_velocity = 1.5,
  656. armor = 200,
  657. run_velocity = 3,
  658. damage = 2,
  659. drops = {
  660. {name = "bones:bone",
  661. chance = 5,
  662. min = 1,
  663. max = 2,},
  664. {name = "lottmobs:meat_raw",
  665. chance = 7,
  666. min = 1,
  667. max = 3,},
  668. {name = "lottfarming:orc_food",
  669. chance = 17,
  670. min = 1,
  671. max = 3,},
  672. {name = "lottfarming:orc_medicine",
  673. chance = 17,
  674. min = 1,
  675. max = 3,},
  676. {name = "lottfarming:potato",
  677. chance = 14,
  678. min = 1,
  679. max = 2,},
  680. {name = "lottfarming:turnip",
  681. chance = 14,
  682. min = 1,
  683. max = 2,},
  684. {name = "lottfarming:red_mushroom",
  685. chance = 10,
  686. min = 1,
  687. max = 8,},
  688. {name = "lottclothes:cloak_mordor",
  689. chance = 17,
  690. min = 1,
  691. max = 1,},
  692. {name = "lottpotion:wine",
  693. chance = 26,
  694. min = 1,
  695. max = 2,},
  696. },
  697. light_resistant = true,
  698. drawtype = "front",
  699. water_damage = 5,
  700. lava_damage = 10,
  701. light_damage = 0,
  702. attack_type = "dogfight",
  703. animation = {
  704. speed_normal = 15,
  705. speed_run = 15,
  706. stand_start = 0,
  707. stand_end = 79,
  708. walk_start = 168,
  709. walk_end = 187,
  710. run_start = 168,
  711. run_end = 187,
  712. punch_start = 189,
  713. punch_end = 198,
  714. },
  715. jump = true,
  716. sounds = {
  717. war_cry = "mobs_barbarian_yell1",
  718. death = "mobs_death1",
  719. attack = "default_punch2",
  720. },
  721. on_rightclick = function(self, clicker)
  722. lottmobs.guard(self, clicker, "default:gold_ingot", "Orc", "orc")
  723. end,
  724. do_custom = lottmobs.do_custom_guard,
  725. attacks_monsters = true,
  726. peaceful = true,
  727. group_attack = true,
  728. step = 1,
  729. on_die = lottmobs.guard_die,
  730. })
  731. mobs:register_spawn("lottmobs:orc", {"lottmapgen:mordor_stone"}, 20, -1, 500, 3, 31000)
  732. mobs:register_spawn("lottmobs:orc", {"default:snowblock"}, 15, -1, 8000, 3, 31000)
  733. mobs:register_spawn("lottmobs:orc", {"default:dirt_with_snow"}, 15, -1, 8000, 3, 31000)
  734. mobs:register_spawn("lottmobs:orc", {"lottmapgen:angsnowblock"}, 20, -1, 6000, 5, 31000)
  735. lottmobs.register_guard_craftitem("lottmobs:orc", "Orc Guard", "lottmobs_orc_guard_inv.png")
  736. mobs:register_mob("lottmobs:raiding_orc", {
  737. type = "npc",
  738. race = "GAMEorc",
  739. hp_min = 15,
  740. hp_max = 35,
  741. collisionbox = {-0.3,-1.0,-0.3, 0.3,0.8,0.3},
  742. visual = "mesh",
  743. mesh = "lottarmor_character.b3d",
  744. textures = {
  745. {"lottmobs_orc.png", orc_armor, "lottweapons_orc_sword.png", "lottarmor_trans.png"},
  746. {"lottmobs_orc_1.png", orc_armor, "lottweapons_orc_sword.png", "lottarmor_trans.png"},
  747. {"lottmobs_orc_2.png", orc_armor, "lottweapons_orc_sword.png", "lottarmor_trans.png"},
  748. },
  749. makes_footstep_sound = true,
  750. view_range = 15,
  751. walk_velocity = 1,
  752. armor = 200,
  753. run_velocity = 3,
  754. damage = 3,
  755. drops = {
  756. {name = "lottweapons:orc_sword",
  757. chance = 10,
  758. min = 1,
  759. max = 1,},
  760. {name = "lottarmor:helmet_steel",
  761. chance = 17,
  762. min = 1,
  763. max = 1,},
  764. {name = "lottarmor:chestplate_steel",
  765. chance = 17,
  766. min = 1,
  767. max = 1,},
  768. {name = "lottarmor:leggings_steel",
  769. chance = 17,
  770. min = 1,
  771. max = 1,},
  772. {name = "lottarmor:boots_steel",
  773. chance = 17,
  774. min = 1,
  775. max = 1,},
  776. {name = "lottarmor:shield_steel",
  777. chance = 17,
  778. min = 1,
  779. max = 1,},
  780. {name = "lottmobs:meat_raw",
  781. chance = 10,
  782. min = 1,
  783. max = 3,},
  784. {name = "lottfarming:orc_food",
  785. chance = 20,
  786. min = 1,
  787. max = 3,},
  788. {name = "farming:bread",
  789. chance = 10,
  790. min = 1,
  791. max = 3,},
  792. {name = "lottpotion:wine",
  793. chance = 25,
  794. min = 1,
  795. max = 5,},
  796. {name = "lottfarming:potato",
  797. chance = 10,
  798. min = 1,
  799. max = 5,},
  800. },
  801. light_resistant = true,
  802. drawtype = "front",
  803. water_damage = 5,
  804. lava_damage = 10,
  805. light_damage = 2,
  806. attack_type = "dogfight",
  807. animation = {
  808. speed_normal = 15,
  809. speed_run = 15,
  810. stand_start = 0,
  811. stand_end = 79,
  812. walk_start = 168,
  813. walk_end = 187,
  814. run_start = 168,
  815. run_end = 187,
  816. punch_start = 189,
  817. punch_end = 198,
  818. },
  819. jump = true,
  820. sounds = {
  821. war_cry = "mobs_barbarian_yell1",
  822. death = "mobs_death1",
  823. attack = "default_punch2",
  824. },
  825. on_rightclick = function(self, clicker)
  826. lottmobs.guard(self, clicker, "default:gold_ingot", "Raiding Orc", "orc", "lottmobs:orc")
  827. end,
  828. do_custom = lottmobs.do_custom_guard,
  829. attacks_monsters = true,
  830. peaceful = true,
  831. group_attack = true,
  832. step = 1,
  833. on_die = lottmobs.guard_die,
  834. })
  835. mobs:register_spawn("lottmobs:raiding_orc", {"lottmapgen:ithilien_grass"}, 2, -1, 4000, 5, 31000)
  836. mobs:register_spawn("lottmobs:raiding_orc", {"lottmapgen:rohan_grass"}, 2, -1, 4000, 5, 31000)
  837. mobs:register_spawn("lottmobs:raiding_orc", {"lottmapgen:gondor_grass"}, 2, -1, 4000, 5, 31000)
  838. mobs:register_mob("lottmobs:uruk_hai", {
  839. type = "npc",
  840. race = "GAMEorc",
  841. hp_min = 25,
  842. hp_max = 40,
  843. collisionbox = {-0.3,-1.0,-0.3, 0.3,0.8,0.3},
  844. visual = "mesh",
  845. mesh = "lottarmor_character.b3d",
  846. textures = {
  847. {"lottmobs_uruk_hai.png", "lottarmor_trans.png", "lottarmor_trans.png", "lottarmor_trans.png", "lottarmor_trans.png"},
  848. {"lottmobs_uruk_hai_1.png", "lottarmor_trans.png", "lottarmor_trans.png", "lottarmor_trans.png", "lottarmor_trans.png"},
  849. {"lottmobs_uruk_hai_2.png", "lottarmor_trans.png", "lottarmor_trans.png", "lottarmor_trans.png", "lottarmor_trans.png"},
  850. {"lottmobs_uruk_hai_3.png", "lottarmor_trans.png", "lottarmor_trans.png", "lottarmor_trans.png", "lottarmor_trans.png"},
  851. },
  852. makes_footstep_sound = true,
  853. view_range = 15,
  854. walk_velocity = 1,
  855. armor = 100,
  856. run_velocity = 3,
  857. damage = 4,
  858. drops = {
  859. {name = "default:bronze_sword",
  860. chance = 10,
  861. min = 1,
  862. max = 1,},
  863. {name = "lottarmor:helmet_bronze",
  864. chance = 20,
  865. min = 1,
  866. max = 1,},
  867. {name = "lottarmor:chestplate_bronze",
  868. chance = 20,
  869. min = 1,
  870. max = 1,},
  871. {name = "lottarmor:leggings_bronze",
  872. chance = 20,
  873. min = 1,
  874. max = 1,},
  875. {name = "lottarmor:boots_bronze",
  876. chance = 10,
  877. min = 1,
  878. max = 1,},
  879. {name = "lottweapons:bronze_warhammer",
  880. chance = 15,
  881. min = 1,
  882. max = 1,},
  883. {name = "lottweapons:bronze_battleaxe",
  884. chance = 15,
  885. min = 1,
  886. max = 1,},
  887. {name = "lottweapons:bronze_spear",
  888. chance = 15,
  889. min = 1,
  890. max = 1,},
  891. {name = "lottfarming:potato",
  892. chance = 5,
  893. min = 1,
  894. max = 5,},
  895. {name = "lottmobs:meat_raw",
  896. chance = 5,
  897. min = 1,
  898. max = 3,},
  899. },
  900. light_resistant = true,
  901. drawtype = "front",
  902. water_damage = 1,
  903. lava_damage = 5,
  904. light_damage = 0,
  905. attack_type = "dogfight",
  906. animation = {
  907. speed_normal = 15,
  908. speed_run = 15,
  909. stand_start = 0,
  910. stand_end = 79,
  911. walk_start = 168,
  912. walk_end = 187,
  913. run_start = 168,
  914. run_end = 187,
  915. punch_start = 189,
  916. punch_end = 198,
  917. },
  918. jump = true,
  919. sounds = {
  920. war_cry = "mobs_barbarian_yell2",
  921. death = "mobs_death2",
  922. attack = "mobs_slash_attack",
  923. },
  924. on_rightclick = function(self, clicker)
  925. lottmobs.guard(self, clicker, "default:gold_ingot", "Uruk Hai", "orc")
  926. end,
  927. do_custom = lottmobs.do_custom_guard,
  928. attacks_monsters = true,
  929. peaceful = true,
  930. group_attack = true,
  931. step = 1,
  932. on_die = lottmobs.guard_die,
  933. })
  934. mobs:register_spawn("lottmobs:uruk_hai", {"lottmapgen:mordor_stone"}, 15, -1, 2000, 3, 31000)
  935. mobs:register_spawn("lottmobs:uruk_hai", {"lottmapgen:fangorn_grass"}, 2, -1, 2000, 3, 31000)
  936. lottmobs.register_guard_craftitem("lottmobs:uruk_hai", "Uruk Hai Guard", "lottmobs_uruk_hai_guard_inv.png")
  937. mobs:register_mob("lottmobs:battle_troll", {
  938. type = "npc",
  939. race = "GAMEorc",
  940. hp_min = 45,
  941. hp_max = 60,
  942. collisionbox = {-0.7, -0.01, -0.7, 0.7, 2.6, 0.7},
  943. visual = "mesh",
  944. mesh = "troll_model.x",
  945. textures = {
  946. {"lottmobs_battle_troll.png"},
  947. },
  948. visual_size = {x=8, y=8},
  949. makes_footstep_sound = true,
  950. view_range = 15,
  951. walk_velocity = 1,
  952. run_velocity = 1,
  953. damage = 6,
  954. drops = {
  955. {name = "bones:bone",
  956. chance = 5,
  957. min = 1,
  958. max = 5,},
  959. {name = "lottmobs:meat_raw",
  960. chance = 5,
  961. min = 1,
  962. max = 5,},
  963. {name = "lottweapons:steel_warhammer",
  964. chance = 10,
  965. min = 1,
  966. max = 1,},
  967. {name = "lottweapons:bronze_warhammer",
  968. chance = 10,
  969. min = 1,
  970. max = 5,},
  971. {name = "lottweapons:silver_warhammer",
  972. chance = 10,
  973. min = 1,
  974. max = 5,},
  975. {name = "lottweapons:tin_warhammer",
  976. chance = 10,
  977. min = 1,
  978. max = 5,},
  979. {name = "lottweapons:copper_warhammer",
  980. chance = 10,
  981. min = 1,
  982. max = 5,},
  983. },
  984. light_resistant = true,
  985. armor = 100,
  986. drawtype = "front",
  987. water_damage = 5,
  988. lava_damage = 1,
  989. light_damage = 0,
  990. on_rightclick = nil,
  991. do_custom = lottmobs.do_custom_guard,
  992. attack_type = "dogfight",
  993. animation = {
  994. stand_start = 0,
  995. stand_end = 19,
  996. walk_start = 20,
  997. walk_end = 35,
  998. punch_start = 36,
  999. punch_end = 48,
  1000. speed_normal = 15,
  1001. speed_run = 15,
  1002. },
  1003. jump = true,
  1004. sounds = {
  1005. war_cry = "mobs_barbarian_yell1",
  1006. death = "mobs_howl",
  1007. attack = "mobs_stone_death",
  1008. },
  1009. attacks_monsters = true,
  1010. peaceful = true,
  1011. group_attack = true,
  1012. step = 1,
  1013. })
  1014. mobs:register_spawn("lottmobs:battle_troll", {"lottmapgen:mordor_stone"}, 10, -1, 10000, 5, 31000)
  1015. mobs:register_mob("lottmobs:half_troll", {
  1016. type = "npc",
  1017. race = "GAMEorc",
  1018. hp_min = 20,
  1019. hp_max = 30,
  1020. collisionbox = {-0.3,-1.0,-0.3, 0.3,0.8,0.3},
  1021. visual = "mesh",
  1022. mesh = "lottarmor_character.b3d",
  1023. textures = {
  1024. {"lottmobs_half_troll.png", "lottarmor_trans.png", "lottarmor_trans.png", "lottarmor_trans.png", "lottarmor_trans.png"},
  1025. },
  1026. makes_footstep_sound = true,
  1027. view_range = 15,
  1028. walk_velocity = 1,
  1029. run_velocity = 3,
  1030. damage = 4,
  1031. armor = 100,
  1032. drops = {
  1033. {name = "default:sword_steel",
  1034. chance = 10,
  1035. min = 1,
  1036. max = 1,},
  1037. {name = "default:sword_bronze",
  1038. chance = 10,
  1039. min = 1,
  1040. max = 1,},
  1041. {name = "lottores:coppersword",
  1042. chance = 10,
  1043. min = 1,
  1044. max = 5,},
  1045. {name = "lottores:tinsword",
  1046. chance = 10,
  1047. min = 1,
  1048. max = 5,},
  1049. {name = "lottores:goldsword",
  1050. chance = 10,
  1051. min = 1,
  1052. max = 1,},
  1053. {name = "lottfarming:potato",
  1054. chance = 10,
  1055. min = 1,
  1056. max = 2,},
  1057. {name = "lottfarming:turnip",
  1058. chance = 10,
  1059. min = 1,
  1060. max = 2,},
  1061. {name = "lottfarming:red_mushroom",
  1062. chance = 7,
  1063. min = 1,
  1064. max = 8,},
  1065. {name = "lottpotion:wine",
  1066. chance = 20,
  1067. min = 1,
  1068. max = 2,},
  1069. },
  1070. light_resistant = true,
  1071. drawtype = "front",
  1072. water_damage = 0,
  1073. lava_damage = 10,
  1074. light_damage = 0,
  1075. on_rightclick = nil,
  1076. do_custom = lottmobs.do_custom_guard,
  1077. attack_type = "dogfight",
  1078. animation = {
  1079. speed_normal = 15,
  1080. speed_run = 15,
  1081. stand_start = 0,
  1082. stand_end = 79,
  1083. walk_start = 168,
  1084. walk_end = 187,
  1085. run_start = 168,
  1086. run_end = 187,
  1087. punch_start = 189,
  1088. punch_end = 198,
  1089. },
  1090. jump = true,
  1091. sounds = {
  1092. war_cry = "mobs_die_yell",
  1093. death = "default_death",
  1094. attack = "default_punch2",
  1095. },
  1096. attacks_monsters = true,
  1097. peaceful = true,
  1098. group_attack = true,
  1099. step = 1,
  1100. })
  1101. mobs:register_spawn("lottmobs:half_troll", {"default:snow"}, 15, -1, 8000, 3, 31000)
  1102. mobs:register_spawn("lottmobs:half_troll", {"default:snowblock"}, 15, -1, 8000, 3, 31000)
  1103. mobs:register_spawn("lottmobs:half_troll", {"default:dirt_with_snow"}, 15, -1, 8000, 3, 31000)
  1104. mobs:register_spawn("lottmobs:half_troll", {"lottmapgen:angsnowblock"}, 20, -1, 6000, 5, 31000)
  1105. mobs:register_mob("lottmobs:nazgul", {
  1106. type = "monster",
  1107. hp_min = 90,
  1108. hp_max = 110,
  1109. collisionbox = {-0.3,-1.0,-0.3, 0.3,0.8,0.3},
  1110. visual = "mesh",
  1111. mesh = "ringwraith_model.x",
  1112. textures = {
  1113. {"lottmobs_nazgul.png"},
  1114. },
  1115. visual_size = {x=2, y=2},
  1116. makes_footstep_sound = true,
  1117. view_range = 15,
  1118. walk_velocity = 1,
  1119. run_velocity = 3,
  1120. damage = 10,
  1121. drops = {
  1122. {name = "lottores:mithril_ingot",
  1123. chance = 5,
  1124. min = 1,
  1125. max = 5,},
  1126. {name = "lottarmor:chestplate_gold",
  1127. chance = 3,
  1128. min = 1,
  1129. max = 11,},
  1130. {name = "lottarmor:leggings_gold",
  1131. chance = 3,
  1132. min = 1,
  1133. max = 1,},
  1134. {name = "lottarmor:helmet_gold",
  1135. chance = 3,
  1136. min = 1,
  1137. max = 1,},
  1138. {name = "lottarmor:boots_gold",
  1139. chance = 3,
  1140. min = 1,
  1141. max = 1,},
  1142. {name = "lottweapons:gold_spear",
  1143. chance = 3,
  1144. min = 1,
  1145. max = 1,},
  1146. {name = "lottores:goldsword",
  1147. chance = 3,
  1148. min = 1,
  1149. max = 1,},
  1150. },
  1151. drawtype = "front",
  1152. armor = 100,
  1153. water_damage = 10,
  1154. lava_damage = 0,
  1155. light_damage = 0,
  1156. on_rightclick = nil,
  1157. attack_type = "shoot",
  1158. arrow = "lottmobs:darkball",
  1159. shoot_interval = 4,
  1160. sounds = {
  1161. attack = "lottmobs:darkball",
  1162. },
  1163. animation = {
  1164. speed_normal = 15,
  1165. speed_run = 15,
  1166. stand_start = 1,
  1167. stand_end = 1,
  1168. walk_start = 20,
  1169. walk_end = 60,
  1170. punch_start = 70,
  1171. punch_end = 110,
  1172. },
  1173. jump = true,
  1174. sounds = {
  1175. war_cry = "mobs_die_yell",
  1176. death = "default_death",
  1177. attack = "default_punch2",
  1178. },
  1179. attacks_monsters = true,
  1180. peaceful = true,
  1181. group_attack = true,
  1182. step = 1,
  1183. })
  1184. mobs:register_spawn("lottmobs:nazgul", {"default:stone"}, 2, -1, 20000, 3, -50)
  1185. mobs:register_mob("lottmobs:witch_king", {
  1186. type = "monster",
  1187. hp_min = 250,
  1188. hp_max = 350,
  1189. collisionbox = {-0.3,-1.0,-0.3, 0.3,0.8,0.3},
  1190. visual = "mesh",
  1191. mesh = "lottarmor_character.b3d",
  1192. textures = {
  1193. {"lottmobs_witch_king.png", "lottarmor_trans.png", "lottarmor_trans.png", "lottarmor_trans.png", "lottarmor_trans.png"},
  1194. },
  1195. makes_footstep_sound = true,
  1196. view_range = 15,
  1197. walk_velocity = 1,
  1198. armor = 100,
  1199. run_velocity = 3,
  1200. damage = 12,
  1201. drops = {
  1202. {name = "lottores:mithril_ingot",
  1203. chance = 7,
  1204. min = 1,
  1205. max = 10,},
  1206. {name = "lottarmor:chestplate_mithril",
  1207. chance = 6,
  1208. min = 1,
  1209. max = 1,},
  1210. {name = "lottarmor:leggings_mithril",
  1211. chance = 6,
  1212. min = 1,
  1213. max = 1,},
  1214. {name = "lottarmor:helmet_mithril",
  1215. chance = 6,
  1216. min = 1,
  1217. max = 1,},
  1218. {name = "lottarmor:boots_mithril",
  1219. chance = 6,
  1220. min = 1,
  1221. max = 1,},
  1222. {name = "lottweapons:mithril_spear",
  1223. chance = 6,
  1224. min = 1,
  1225. max = 1,},
  1226. {name = "lottores:mithrilsword",
  1227. chance = 6,
  1228. min = 1,
  1229. max = 1,},
  1230. },
  1231. drawtype = "front",
  1232. water_damage = 1,
  1233. lava_damage = 0,
  1234. light_damage = 0,
  1235. on_rightclick = nil,
  1236. attack_type = "shoot",
  1237. arrow = "lottmobs:darkball",
  1238. shoot_interval = 2,
  1239. sounds = {
  1240. attack = "lottmobs:darkball",
  1241. },
  1242. animation = {
  1243. speed_normal = 15,
  1244. speed_run = 15,
  1245. stand_start = 0,
  1246. stand_end = 79,
  1247. walk_start = 168,
  1248. walk_end = 187,
  1249. punch_start = 189,
  1250. punch_end = 198,
  1251. },
  1252. jump = true,
  1253. sounds = {
  1254. war_cry = "mobs_die_yell",
  1255. death = "default_death",
  1256. attack = "default_punch2",
  1257. },
  1258. attacks_monsters = true,
  1259. peaceful = true,
  1260. group_attack = true,
  1261. step = 1,
  1262. on_die = lottmobs.guard_die,
  1263. })
  1264. mobs:register_spawn("lottmobs:witch_king", {"default:stone"}, 2, -1, 40000, 10, -1000)
  1265. mobs:register_mob("lottmobs:balrog", {
  1266. type = "monster",
  1267. rotate = 180,
  1268. hp_min = 1000,
  1269. hp_max = 1250,
  1270. collisionbox = {-0.8, -2.1, -0.8, 0.8, 2.6, 0.8},
  1271. visual_size = {x=2, y=2},
  1272. visual = "mesh",
  1273. mesh = "balrog_model.b3d",
  1274. textures = {
  1275. {"lottmobs_balrog.png"},
  1276. },
  1277. makes_footstep_sound = true,
  1278. view_range = 15,
  1279. armor = 100,
  1280. walk_velocity = 1,
  1281. run_velocity = 3,
  1282. damage = 30,
  1283. drops = {
  1284. {name = "lottweapons:balrog_whip",
  1285. chance = 10,
  1286. min = 1,
  1287. max = 1,},
  1288. {name = "lottores:mithril_ingot",
  1289. chance = 10,
  1290. min = 1,
  1291. max = 25,},
  1292. {name = "lottores:mithrilsword",
  1293. chance = 10,
  1294. min = 1,
  1295. max = 1,},
  1296. {name = "lottores:mithrilpickaxe",
  1297. chance = 10,
  1298. min = 1,
  1299. max = 1,},
  1300. {name = "lottweapons:mithril_battleaxe",
  1301. chance = 10,
  1302. min = 1,
  1303. max = 1,},
  1304. {name = "lottweapons:mithril_spear",
  1305. chance = 10,
  1306. min = 1,
  1307. max = 1,},
  1308. {name = "lottweapons:mithril_battleaxe",
  1309. chance = 10,
  1310. min = 1,
  1311. max = 1,},
  1312. {name = "lottweapons:mithril_warhammer",
  1313. chance = 10,
  1314. min = 1,
  1315. max = 1,},
  1316. {name = "lottweapons:mithril_dagger",
  1317. chance = 10,
  1318. min = 1,
  1319. max = 1,},
  1320. {name = "lottthrowing:crossbow_mithril",
  1321. chance = 10,
  1322. min = 1,
  1323. max = 1,},
  1324. {name = "lottthrowing:bolt_mithril",
  1325. chance = 10,
  1326. min = 10,
  1327. max = 50,},
  1328. {name = "lottarmor:helmet_mithril",
  1329. chance = 10,
  1330. min = 1,
  1331. max = 1,},
  1332. {name = "lottarmor:chestplate_mithril",
  1333. chance = 10,
  1334. min = 1,
  1335. max = 1,},
  1336. {name = "lottarmor:leggings_mithril",
  1337. chance = 10,
  1338. min = 1,
  1339. max = 1,},
  1340. {name = "lottarmor:boots_mithril",
  1341. chance = 10,
  1342. min = 1,
  1343. max = 1,},
  1344. {name = "lottarmor:shield_mithril",
  1345. chance = 10,
  1346. min = 1,
  1347. max = 1,},
  1348. },
  1349. drawtype = "front",
  1350. water_damage = 0,
  1351. lava_damage = 0,
  1352. light_damage = 0,
  1353. on_rightclick = nil,
  1354. attack_type = "dogfight",
  1355. animation = {
  1356. stand_start = 0,
  1357. stand_end = 240,
  1358. walk_start = 240,
  1359. walk_end = 300,
  1360. punch_start = 300,
  1361. punch_end = 380,
  1362. speed_normal = 15,
  1363. speed_run = 15,
  1364. },
  1365. jump = true,
  1366. sounds = {
  1367. war_cry = "mobs_howl",
  1368. death = "mobs_howl",
  1369. attack = "mobs_stone_death",
  1370. },
  1371. attacks_monsters = true,
  1372. peaceful = true,
  1373. group_attack = true,
  1374. step = 1,
  1375. on_die = lottmobs.guard_die,
  1376. })
  1377. mobs:register_spawn("lottmobs:balrog", {"default:stone"}, 2, -1, 100000, 10, -10000)
  1378. mobs:register_mob("lottmobs:dead_men", {
  1379. type = "monster",
  1380. hp_min = 1,
  1381. hp_max = 1,
  1382. collisionbox = {-0.3,-1.0,-0.3, 0.3,0.8,0.3},
  1383. visual = "mesh",
  1384. mesh = "lottarmor_character.b3d",
  1385. textures = {
  1386. {"lottmobs_dead_men.png", "lottarmor_trans.png", "lottarmor_trans.png", "lottarmor_trans.png", "lottarmor_trans.png"},
  1387. },
  1388. makes_footstep_sound = true,
  1389. view_range = 10,
  1390. walk_velocity = 1,
  1391. run_velocity = 1,
  1392. damage = 2,
  1393. armor = 1,
  1394. water_damage = 0,
  1395. lava_damage = 0,
  1396. light_damage = 1,
  1397. drawtype = "front",
  1398. on_rightclick = nil,
  1399. attack_type = "dogfight",
  1400. animation = {
  1401. speed_normal = 15,
  1402. speed_run = 15,
  1403. stand_start = 0,
  1404. stand_end = 79,
  1405. walk_start = 168,
  1406. walk_end = 187,
  1407. run_start = 168,
  1408. run_end = 187,
  1409. punch_start = 189,
  1410. punch_end = 198,
  1411. },
  1412. jump = true,
  1413. sounds = {
  1414. war_cry = "mobs_die_yell",
  1415. death = "default_death",
  1416. attack = "default_punch2",
  1417. },
  1418. attacks_monsters = true,
  1419. peaceful = true,
  1420. group_attack = true,
  1421. step = 1,
  1422. glow = 5,
  1423. })
  1424. mobs:register_spawn("lottmobs:dead_men", {"default:mossycobble"}, 2, -1, 6000, 10, -100)
  1425. mobs:register_mob("lottmobs:troll", {
  1426. type = "npc",
  1427. race = "GAMEorc",
  1428. hp_min = 50,
  1429. hp_max = 65,
  1430. collisionbox = {-0.7, -0.01, -0.7, 0.7, 2.6, 0.7},
  1431. visual = "mesh",
  1432. mesh = "troll_model.x",
  1433. textures = {
  1434. {"lottmobs_troll.png"},
  1435. {"lottmobs_troll_1.png"},
  1436. {"lottmobs_troll_2.png"},
  1437. {"lottmobs_troll_3.png"},
  1438. },
  1439. visual_size = {x=8, y=8},
  1440. makes_footstep_sound = true,
  1441. view_range = 15,
  1442. walk_velocity = 1,
  1443. run_velocity = 1,
  1444. damage = 10,
  1445. armor = 100,
  1446. drops = {
  1447. {name = "default:stone",
  1448. chance = 5,
  1449. min = 1,
  1450. max = 7,},
  1451. {name = "lottweapons:steel_battleaxe",
  1452. chance = 10,
  1453. min = 1,
  1454. max = 1,},
  1455. {name = "lottweapons:steel_warhammer",
  1456. chance = 10,
  1457. min = 1,
  1458. max = 1,},
  1459. {name = "lottweapons:bronze_battleaxe",
  1460. chance = 10,
  1461. min = 1,
  1462. max = 1,},
  1463. {name = "lottweapons:bronze_warhammer",
  1464. chance = 10,
  1465. min = 1,
  1466. max = 1,},
  1467. {name = "lottweapons:tin_battleaxe",
  1468. chance = 10,
  1469. min = 1,
  1470. max = 1,},
  1471. {name = "lottweapons:tin_warhammer",
  1472. chance = 10,
  1473. min = 1,
  1474. max = 1,},
  1475. {name = "lottweapons:copper_battleaxe",
  1476. chance = 10,
  1477. min = 1,
  1478. max = 1,},
  1479. {name = "lottweapons:copper_warhammer",
  1480. chance = 10,
  1481. min = 1,
  1482. max = 1,},
  1483. {name = "lottweapons:silver_battleaxe",
  1484. chance = 10,
  1485. min = 1,
  1486. max = 1,},
  1487. {name = "lottweapons:silver_warhammer",
  1488. chance = 10,
  1489. min = 1,
  1490. max = 1,},
  1491. },
  1492. drawtype = "front",
  1493. water_damage = 0,
  1494. lava_damage = 0,
  1495. light_damage = 60,
  1496. on_rightclick = nil,
  1497. do_custom = lottmobs.do_custom_guard,
  1498. attack_type = "dogfight",
  1499. animation = {
  1500. stand_start = 0,
  1501. stand_end = 19,
  1502. walk_start = 20,
  1503. walk_end = 35,
  1504. punch_start = 36,
  1505. punch_end = 48,
  1506. speed_normal = 15,
  1507. speed_run = 15,
  1508. },
  1509. jump = true,
  1510. sounds = {
  1511. war_cry = "mobs_barbarian_yell1",
  1512. death = "mobs_barbarian_yell1",
  1513. attack = "mobs_stone_death",
  1514. },
  1515. attacks_monsters = true,
  1516. peaceful = true,
  1517. group_attack = true,
  1518. step = 1,
  1519. })
  1520. mobs:register_spawn("lottmobs:troll", {"default:stone"}, 2, -1, 8000, 5, -10)
  1521. mobs:register_spawn("lottmobs:troll", {"default:snow"}, 2, -1, 6000, 5, 31000)
  1522. mobs:register_spawn("lottmobs:troll", {"default:snowblock"}, 2, -1, 6000, 5, 31000)
  1523. mobs:register_spawn("lottmobs:troll", {"lottmapgen:angsnowblock"}, 2, -1, 6000, 5, 31000)
  1524. -- Arrows
  1525. mobs:register_arrow("lottmobs:darkball", {
  1526. visual = "sprite",
  1527. visual_size = {x=1, y=1},
  1528. textures = {"lottmobs_darkball.png"},
  1529. velocity = 5,
  1530. hit_player = function(self, player)
  1531. local s = self.object:getpos()
  1532. local p = player:getpos()
  1533. local vec = {x=s.x-p.x, y=s.y-p.y, z=s.z-p.z}
  1534. player:punch(self.object, 1.0, {
  1535. full_punch_interval=1.0,
  1536. damage_groups = {fleshy=4},
  1537. }, vec)
  1538. local pos = self.object:getpos()
  1539. local node1def = minetest.get_node(pos)
  1540. local n = node1def.name
  1541. for dx=-1,1 do
  1542. for dy=-1,1 do
  1543. for dz=-1,1 do
  1544. local p = {x=pos.x+dx, y=pos.y+dy, z=pos.z+dz}
  1545. local node2def = minetest.get_node(p)
  1546. local n2 = node2def.name
  1547. if minetest.registered_nodes[n].groups.flammable or n2 == "air" then
  1548. minetest.set_node(p, {name="fire:basic_flame"})
  1549. end
  1550. end
  1551. end
  1552. end
  1553. end,
  1554. hit_node = function(self, pos, node)
  1555. local node1def = minetest.get_node(pos)
  1556. local n = node1def.name
  1557. for dx=-1,1 do
  1558. for dy=-1,1 do
  1559. for dz=-1,1 do
  1560. local p = {x=pos.x+dx, y=pos.y+dy, z=pos.z+dz}
  1561. local node2def = minetest.get_node(p)
  1562. local n2 = node2def.name
  1563. if minetest.registered_nodes[n].groups.flammable or n2 == "air" then
  1564. minetest.set_node(p, {name="fire:basic_flame"})
  1565. end
  1566. end
  1567. end
  1568. end
  1569. end
  1570. })