mirror of
https://codeberg.org/tenplus1/mobs_redo.git
synced 2025-05-18 09:10:36 +02:00
tweak general_attack
This commit is contained in:
parent
f5817061ce
commit
c0c4c3ea48
5
api.lua
5
api.lua
@ -18,7 +18,7 @@ end
|
||||
-- global table
|
||||
|
||||
mobs = {
|
||||
mod = "redo", version = "20250511",
|
||||
mod = "redo", version = "20250515",
|
||||
spawning_mobs = {}, translate = S,
|
||||
node_snow = has(core.registered_aliases["mapgen_snow"])
|
||||
or has("mcl_core:snow") or has("default:snow") or "air",
|
||||
@ -1692,7 +1692,8 @@ function mob_class:general_attack()
|
||||
|
||||
-- remove from list if invisible or unable to attack
|
||||
if not damage_enabled or self.attack_players == false
|
||||
or (self.owner and self.type ~= "monster")
|
||||
or self.owner == objs[n]:get_player_name()
|
||||
-- or (self.owner and self.type ~= "monster")
|
||||
or is_invisible(self, objs[n]:get_player_name())
|
||||
or (self.specific_attack and not check_for("player", self.specific_attack)) then
|
||||
objs[n] = nil
|
||||
|
3
api.txt
3
api.txt
@ -102,7 +102,8 @@ functions needed for the mob to work properly which contains the following:
|
||||
'docile_by_day' when true has mobs wandering around during daylight
|
||||
hours and only attacking player at night or when
|
||||
provoked.
|
||||
'attack_chance' 0 to 100 chance the mob will attack (default is 5).
|
||||
'attack_chance' 0 to 100 chance the mob will attack (default is 5),
|
||||
set to 100 so that mob needs to be provoked to attack.
|
||||
'attack_patience' Time in seconds before mob gives up attacking if
|
||||
player isn't seen (Defaults to 11).
|
||||
'attack_monsters' when true mob will attack monsters.
|
||||
|
Loading…
x
Reference in New Issue
Block a user