Browse Source

Turn enderman to monster, but reduce view range

Wuzzy 3 months ago
parent
commit
fa3fd68c8c
1 changed files with 12 additions and 3 deletions
  1. 12
    3
      mods/ENTITIES/mobs_mc/enderman.lua

+ 12
- 3
mods/ENTITIES/mobs_mc/enderman.lua View File

@@ -3,6 +3,13 @@
3 3
 --made for MC like Survival game
4 4
 --License for code WTFPL and otherwise stated in readmes
5 5
 
6
+-- ENDERMAN BEHAVIOUR:
7
+-- In this game, endermen attack the player on sight, like other monsters do.
8
+-- However, they have a reduced viewing range to make them less dangerous.
9
+-- This differs from MC, in which endermen only become hostile when provoked,
10
+-- and they are provoked by looking directly at them.
11
+-- TODO: Implement MC behaviour.
12
+
6 13
 -- intllib
7 14
 local MP = minetest.get_modpath(minetest.get_current_modname())
8 15
 local S, NS = dofile(MP.."/intllib.lua")
@@ -164,8 +171,8 @@ end
164 171
 local mobs_griefing = minetest.settings:get_bool("mobs_griefing") ~= false
165 172
 
166 173
 mobs:register_mob("mobs_mc:enderman", {
167
-	-- TODO: Make endermen attack when looked at
168
-	type = "animal",
174
+	-- TODO: Endermen should be classified as passive
175
+	type = "monster",
169 176
 	passive = false,
170 177
 	pathfinding = 1,
171 178
 	stepheight = 1.2,
@@ -320,7 +327,9 @@ mobs:register_mob("mobs_mc:enderman", {
320 327
 	water_damage = 8,
321 328
 	lava_damage = 4,
322 329
 	light_damage = 0,
323
-	view_range = 16,
330
+	-- TODO: Increase view range when it detects being seen
331
+	-- Low view range to emulate that behaviour somehow
332
+	view_range = 4,
324 333
 	fear_height = 4,
325 334
 	attack_type = "dogfight",
326 335
 	blood_amount = 0,

Loading…
Cancel
Save