deagle.lua 4.9 KB

123456789101112131415161718192021222324252627282930313233343536373839404142434445464748495051525354555657585960616263646566676869707172737475767778798081828384858687888990919293949596979899100101102103104105106107108109110111112113114115116117118119120121
  1. minetest.register_tool("rangedweapons:deagle_rld", {
  2. stack_max= 1,
  3. wield_scale = {x=1.25,y=1.25,z=1.5},
  4. description = "",
  5. range = 0,
  6. loaded_gun = "rangedweapons:deagle",
  7. groups = {not_in_creative_inventory = 1},
  8. inventory_image = "rangedweapons_deagle_rld.png",
  9. })
  10. minetest.register_tool("rangedweapons:deagle_r", {
  11. stack_max= 1,
  12. wield_scale = {x=1.25,y=1.25,z=1.5},
  13. description = "",
  14. range = 0,
  15. rw_next_reload = "rangedweapons:deagle",
  16. load_sound = "rangedweapons_handgun_mag_in",
  17. groups = {not_in_creative_inventory = 1},
  18. inventory_image = "rangedweapons_deagle_rld.png",
  19. })
  20. minetest.register_tool("rangedweapons:deagle", {
  21. description = "" ..core.colorize("#35cdff","Desert Eagle\n")..core.colorize("#FFFFFF", "Ranged damage: 11\n") ..core.colorize("#FFFFFF", "Accuracy: 85%\n") ..core.colorize("#FFFFFF", "knockback: 6\n") ..core.colorize("#FFFFFF", "Critical chance: 20%\n") ..core.colorize("#FFFFFF", "Critical efficiency: 3x\n")..core.colorize("#FFFFFF", "Reload delay: 0.6\n")..core.colorize("#FFFFFF", "Clip size: 9/8/7\n") ..core.colorize("#FFFFFF", "Ammunition: .357 Magnum rounds/.44 magnum rounds/.50AE catridges\n") ..core.colorize("#FFFFFF", "Rate of fire: 0.7\n") ..core.colorize("#FFFFFF", "Gun type: Magnum\n") ..core.colorize("#FFFFFF", "Block penetration: 5%\n")
  22. ..core.colorize("#FFFFFF", "penetration: 15%\n")..core.colorize("#FFFFFF", "Bullet velocity: 50"),
  23. wield_scale = {x=1.25,y=1.25,z=1.5},
  24. range = 0,
  25. inventory_image = "rangedweapons_deagle.png",
  26. RW_gun_capabilities = {
  27. gun_damage = {fleshy=11,knockback=6},
  28. gun_crit = 20,
  29. gun_critEffc = 2.2,
  30. suitable_ammo = {{"rangedweapons:357",9},{"rangedweapons:44",8},{"rangedweapons:50ae",7}},
  31. gun_skill = {"revolver_skill",40},
  32. gun_magazine = "rangedweapons:handgun_mag_white",
  33. gun_icon = "rangedweapons_deagle_icon.png",
  34. gun_unloaded = "rangedweapons:deagle_r",
  35. gun_cooling = "rangedweapons:deagle_rld",
  36. gun_velocity = 50,
  37. gun_accuracy = 85,
  38. gun_cooldown = 0.7,
  39. gun_reload = 0.6/1,
  40. gun_projectiles = 1,
  41. has_shell = 1,
  42. gun_durability = 900,
  43. gun_smokeSize = 7,
  44. gun_mob_penetration = 15,
  45. gun_node_penetration = 5,
  46. gun_unload_sound = "rangedweapons_handgun_mag_out",
  47. gun_sound = "rangedweapons_deagle",
  48. },
  49. on_secondary_use = function(itemstack, user, pointed_thing)
  50. rangedweapons_reload_gun(itemstack, user)
  51. return itemstack
  52. end,
  53. on_use = function(itemstack, user, pointed_thing)
  54. rangedweapons_shoot_gun(itemstack, user)
  55. return itemstack
  56. end,
  57. })
  58. minetest.register_tool("rangedweapons:golden_deagle_rld", {
  59. stack_max= 1,
  60. wield_scale = {x=1.25,y=1.25,z=1.5},
  61. description = "",
  62. range = 0,
  63. loaded_gun = "rangedweapons:golden_deagle",
  64. groups = {not_in_creative_inventory = 1},
  65. inventory_image = "rangedweapons_golden_deagle_rld.png",
  66. })
  67. minetest.register_tool("rangedweapons:golden_deagle_r", {
  68. stack_max= 1,
  69. wield_scale = {x=1.25,y=1.25,z=1.5},
  70. description = "",
  71. range = 0,
  72. rw_next_reload = "rangedweapons:golden_deagle",
  73. load_sound = "rangedweapons_handgun_mag_in",
  74. groups = {not_in_creative_inventory = 1},
  75. inventory_image = "rangedweapons_golden_deagle_rld.png",
  76. })
  77. minetest.register_tool("rangedweapons:golden_deagle", {
  78. description = "" ..core.colorize("#35cdff","Golden Desert Eagle\n")..core.colorize("#FFFFFF", "Ranged damage: 14\n") ..core.colorize("#FFFFFF", "Accuracy: 90%\n") ..core.colorize("#FFFFFF", "knockback: 6\n") ..core.colorize("#FFFFFF", "Critical chance: 23%\n") ..core.colorize("#FFFFFF", "Critical efficiency: 3x\n")..core.colorize("#FFFFFF", "Reload delay: 0.6\n")..core.colorize("#FFFFFF", "Clip size: 9/8/7\n") ..core.colorize("#FFFFFF", "Ammunition: .357 Magnum rounds/.44 magnum rounds/.50AE catridges\n") ..core.colorize("#FFFFFF", "Rate of fire: 0.75\n") ..core.colorize("#FFFFFF", "Gun type: Magnum\n") ..core.colorize("#FFFFFF", "Block penetration: 5%\n")
  79. ..core.colorize("#FFFFFF", "penetration: 15%\n")..core.colorize("#FFFFFF", "Bullet velocity: 50"),
  80. wield_scale = {x=1.25,y=1.25,z=1.5},
  81. range = 0,
  82. inventory_image = "rangedweapons_golden_deagle.png",
  83. RW_gun_capabilities = {
  84. gun_damage = {fleshy=14,knockback=6},
  85. gun_crit = 23,
  86. gun_critEffc = 2.2,
  87. suitable_ammo = {{"rangedweapons:357",9},{"rangedweapons:44",8},{"rangedweapons:50ae",7}},
  88. gun_skill = {"revolver_skill",38},
  89. gun_magazine = "rangedweapons:handgun_mag_white",
  90. gun_icon = "rangedweapons_golden_deagle_icon.png",
  91. gun_unloaded = "rangedweapons:golden_deagle_r",
  92. gun_cooling = "rangedweapons:golden_deagle_rld",
  93. gun_velocity = 50,
  94. gun_accuracy = 90,
  95. gun_cooldown = 0.75,
  96. gun_reload = 0.6/1,
  97. gun_projectiles = 1,
  98. has_shell = 1,
  99. gun_durability = 1000,
  100. gun_smokeSize = 7,
  101. gun_mob_penetration = 15,
  102. gun_node_penetration = 5,
  103. gun_unload_sound = "rangedweapons_handgun_mag_out",
  104. gun_sound = "rangedweapons_deagle",
  105. },
  106. on_secondary_use = function(itemstack, user, pointed_thing)
  107. rangedweapons_reload_gun(itemstack, user)
  108. return itemstack
  109. end,
  110. on_use = function(itemstack, user, pointed_thing)
  111. rangedweapons_shoot_gun(itemstack, user)
  112. return itemstack
  113. end,
  114. })