Added 'dogshoot' attack type, self.reach and api tweaks

This commit is contained in:
TenPlus1 2015-09-24 18:36:23 +01:00
parent ec890d4a56
commit 784c00f6d1
13 changed files with 1121 additions and 1134 deletions

View File

@ -28,6 +28,7 @@ This mod contains the following additions:
Changelog: Changelog:
1.17- Added 'dogshoot' attack type, shoots when out of reach, melee attack when in reach, also api tweaks and self.reach added
1.16- Mobs follow multiple items now, Npc's can breed 1.16- Mobs follow multiple items now, Npc's can breed
1.15- Added Feeding/Taming/Breeding function, right-click to pick up any sheep with X mark on them and replace with new one to fix compatibility. 1.15- Added Feeding/Taming/Breeding function, right-click to pick up any sheep with X mark on them and replace with new one to fix compatibility.
1.14- All .self variables saved in staticdata, Fixed self.health bug 1.14- All .self variables saved in staticdata, Fixed self.health bug

2240
api.lua

File diff suppressed because it is too large Load Diff

View File

@ -4,6 +4,7 @@
mobs:register_mob("mobs:bunny", { mobs:register_mob("mobs:bunny", {
type = "animal", type = "animal",
passive = true, passive = true,
reach = 1,
hp_min = 1, hp_min = 1,
hp_max = 4, hp_max = 4,
armor = 200, armor = 200,
@ -55,7 +56,6 @@ mobs:register_mob("mobs:bunny", {
textures = {"mobs_bunny_evil.png"}, textures = {"mobs_bunny_evil.png"},
}) })
self.type = "monster" self.type = "monster"
self.state = "attack"
self.object:set_hp(20) self.object:set_hp(20)
return return
end end

View File

@ -5,6 +5,7 @@ mobs:register_mob("mobs:cow", {
type = "animal", type = "animal",
passive = false, passive = false,
attack_type = "dogfight", attack_type = "dogfight",
reach = 2,
damage = 4, damage = 4,
hp_min = 5, hp_min = 5,
hp_max = 20, hp_max = 20,

View File

@ -5,6 +5,7 @@ mobs:register_mob("mobs:dirt_monster", {
type = "monster", type = "monster",
passive = false, passive = false,
attack_type = "dogfight", attack_type = "dogfight",
reach = 2,
damage = 2, damage = 2,
hp_min = 3, hp_min = 3,
hp_max = 27, hp_max = 27,

View File

@ -5,7 +5,8 @@ mobs:register_mob("mobs:dungeon_master", {
type = "monster", type = "monster",
passive = false, passive = false,
damage = 4, damage = 4,
attack_type = "shoot", attack_type = "dogshoot",
reach = 3,
shoot_interval = 2.5, shoot_interval = 2.5,
arrow = "mobs:fireball", arrow = "mobs:fireball",
shoot_offset = 1, shoot_offset = 1,

View File

@ -5,6 +5,7 @@ mobs:register_mob("mobs:lava_flan", {
type = "monster", type = "monster",
passive = false, passive = false,
attack_type = "dogfight", attack_type = "dogfight",
reach = 2,
damage = 3, damage = 3,
hp_min = 10, hp_min = 10,
hp_max = 35, hp_max = 35,

View File

@ -5,6 +5,7 @@ mobs:register_mob("mobs:oerkki", {
type = "monster", type = "monster",
passive = false, passive = false,
attack_type = "dogfight", attack_type = "dogfight",
reach = 2,
damage = 4, damage = 4,
hp_min = 8, hp_min = 8,
hp_max = 34, hp_max = 34,

View File

@ -5,6 +5,7 @@ mobs:register_mob("mobs:sand_monster", {
type = "monster", type = "monster",
passive = false, passive = false,
attack_type = "dogfight", attack_type = "dogfight",
reach = 2,
damage = 1, damage = 1,
hp_min = 4, hp_min = 4,
hp_max = 20, hp_max = 20,

View File

@ -5,6 +5,7 @@ mobs:register_mob("mobs:spider", {
type = "monster", type = "monster",
passive = false, passive = false,
attack_type = "dogfight", attack_type = "dogfight",
reach = 2,
damage = 3, damage = 3,
hp_min = 20, hp_min = 20,
hp_max = 40, hp_max = 40,

View File

@ -5,6 +5,7 @@ mobs:register_mob("mobs:stone_monster", {
type = "monster", type = "monster",
passive = false, passive = false,
attack_type = "dogfight", attack_type = "dogfight",
reach = 2,
damage = 3, damage = 3,
hp_min = 12, hp_min = 12,
hp_max = 35, hp_max = 35,

View File

@ -5,6 +5,7 @@ mobs:register_mob("mobs:tree_monster", {
type = "monster", type = "monster",
passive = false, passive = false,
attack_type = "dogfight", attack_type = "dogfight",
reach = 2,
damage = 2, damage = 2,
hp_min = 7, hp_min = 7,
hp_max = 33, hp_max = 33,

View File

@ -5,6 +5,7 @@ mobs:register_mob("mobs:pumba", {
type = "animal", type = "animal",
passive = false, passive = false,
attack_type = "dogfight", attack_type = "dogfight",
reach = 2,
damage = 2, damage = 2,
hp_min = 5, hp_min = 5,
hp_max = 15, hp_max = 15,