This commit is contained in:
Hamlet 2019-10-31 13:46:26 +01:00
parent a5c753716c
commit ac9c013e47
No known key found for this signature in database
GPG Key ID: 30CDB9FA94B0D255
4 changed files with 73 additions and 41 deletions

View File

@ -4,13 +4,16 @@
**NOTE:** This is Blockmen's [CME Ghost][8] mob ported to Mobs Redo, and tweaked. **NOTE:** This is Blockmen's [CME Ghost][8] mob ported to Mobs Redo, and tweaked.
**Version:** 0.6.0 **Version:** 0.7.0
**Source code's license:** [EUPL v1.2][1] or later. **Source code's license:** [EUPL v1.2][1] or later.
**Media (Textures, Models, Sounds) license:** [CC-BY-SA 4.0 International][2]. **Media (Textures, Models, Sounds) license:** [CC-BY-SA 4.0 International][2].
**Dependencies:** default, bones (found in [Minetest Game][3]), mobs ([Mobs Redo][4]) **Dependencies:** default, bones (found in [Minetest Game][3]), mobs ([Mobs Redo][4])
**Supported:** [mobs_humans][5], [mobs_others][6], [moreores][7] **Supported:** [mobs_humans][5], [mobs_others][6], [moreores][7]
__Advanced options:__
Settings -> All Settings -> Mods -> mobs_ghost_redo
### Installation ### Installation

View File

@ -10,6 +10,20 @@ and this project adheres to [Semantic Versioning](https://semver.org/).
- no other features planned - no other features planned
## [0.7.0] - 2019-10-31
### Added
- Option to choose if ghosts can be hurt only by metal or crystal swords
(false by default).
- Drop gold lump, min 1, max 5, chance 1 on 100.
### Modified
- Default hit points range from 10 to 20, in harder mode from 20 to 30.
- By default no longer immune to anything but swords, save in harder mode.
## [0.6.0] - 2019-10-17 ## [0.6.0] - 2019-10-17
### Added ### Added

View File

@ -1,6 +1,6 @@
--[[ --[[
Mobs Ghost Redo - Adds ghosts. Mobs Ghost Redo - Adds ghosts.
Copyright © 2018-2019 Hamlet <hamlatmesehub@riseup.net> Copyright © 2018, 2019 Hamlet <hamlatmesehub@riseup.net> and contributors.
Licensed under the EUPL, Version 1.2 or as soon they will be Licensed under the EUPL, Version 1.2 or as soon they will be
approved by the European Commission subsequent versions of the approved by the European Commission subsequent versions of the
@ -33,6 +33,7 @@ local S = minetest.get_translator("mobs_ghost_redo")
local ghost_daytime_check = minetest.settings:get_bool("mobs_ghost_redo_daytime_check") local ghost_daytime_check = minetest.settings:get_bool("mobs_ghost_redo_daytime_check")
local ghost_bones_only = minetest.settings:get_bool("mobs_ghost_redo_bones_only") local ghost_bones_only = minetest.settings:get_bool("mobs_ghost_redo_bones_only")
local ghost_difficulty = minetest.settings:get_bool("mobs_ghost_redo_difficulty")
if (ghost_daytime_check == nil) then if (ghost_daytime_check == nil) then
ghost_daytime_check = false ghost_daytime_check = false
@ -42,6 +43,9 @@ if (ghost_bones_only == nil) then
ghost_bones_only = false ghost_bones_only = false
end end
if (ghost_difficulty == nil) then
ghost_difficulty = false
end
local SPAWNING_NODES = {} local SPAWNING_NODES = {}
local SPAWNING_CHANCE = 0 local SPAWNING_CHANCE = 0
@ -106,8 +110,8 @@ end
mobs:register_mob("mobs_ghost_redo:ghost", { mobs:register_mob("mobs_ghost_redo:ghost", {
type = "monster", type = "monster",
hp_min = 20, hp_min = 10,
hp_max = 30, hp_max = 20,
armor = 100, armor = 100,
walk_velocity = 1, walk_velocity = 1,
run_velocity = 4, run_velocity = 4,
@ -124,16 +128,6 @@ mobs:register_mob("mobs_ghost_redo:ghost", {
group_attack = true, group_attack = true,
attack_type = "dogfight", attack_type = "dogfight",
blood_amount = 0, blood_amount = 0,
immune_to = {
{"all"},
{"default:sword_steel", 6},
{"default:sword_bronze", 6},
{"default:sword_mese", 7},
{"mobs_others:sword_obsidian", 7},
{"default:sword_diamond", 8},
{"moreores:sword_silver", 12},
{"moreores:sword_mithril", 9}
},
makes_footstep_sound = false, makes_footstep_sound = false,
sounds = { sounds = {
random = "mobs_ghost_redo_ghost_1", random = "mobs_ghost_redo_ghost_1",
@ -142,6 +136,9 @@ mobs:register_mob("mobs_ghost_redo:ghost", {
damage = "mobs_ghost_redo_ghost_hit", damage = "mobs_ghost_redo_ghost_hit",
death = "mobs_ghost_redo_ghost_death", death = "mobs_ghost_redo_ghost_death",
}, },
drops = {
{name = "default:gold_lump", chance = 100, min = 1, max = 5}
},
visual = "mesh", visual = "mesh",
visual_size = {x = 1, y = 1}, visual_size = {x = 1, y = 1},
collisionbox = {-0.3, -0.5, -0.3, 0.3, 1.5, 0.3}, collisionbox = {-0.3, -0.5, -0.3, 0.3, 1.5, 0.3},
@ -151,29 +148,46 @@ mobs:register_mob("mobs_ghost_redo:ghost", {
stand_start = 0, stand_start = 0,
stand_end = 80, stand_end = 80,
stand_speed = 15, stand_speed = 15,
walk_start = 102, walk_start = 102,
walk_end = 122, walk_end = 122,
walk_speed = 12, walk_speed = 12,
run_start = 102, run_start = 102,
run_end = 122, run_end = 122,
run_speed = 10, run_speed = 10,
fly_start = 102, fly_start = 102,
fly_end = 122, fly_end = 122,
fly_speed = 12, fly_speed = 12,
punch_start = 102, punch_start = 102,
punch_end = 122, punch_end = 122,
punch_speed = 25, punch_speed = 25,
die_start = 81, die_start = 81,
die_end = 101, die_end = 101,
die_speed = 28, die_speed = 28,
die_loop = false, die_loop = false,
}, },
on_spawn = function(self, pos) on_spawn = function(self, pos)
if (ghost_difficulty == true) then
self.health = math.random(20, 30)
self.immune_to = {
{"all"},
{"default:sword_steel", 6},
{"default:sword_bronze", 6},
{"default:sword_mese", 7},
{"mobs_others:sword_obsidian", 7},
{"default:sword_diamond", 8},
{"moreores:sword_silver", 12},
{"moreores:sword_mithril", 9}
}
end
self.spawned = true self.spawned = true
self.mesh = random_mesh() self.mesh = random_mesh()
self.counter = 0 self.counter = 0
self.object:set_properties({ self.object:set_properties({
health = self.health,
immune_to = self.immune_to,
spawned = self.spawned, spawned = self.spawned,
mesh = self.mesh, mesh = self.mesh,
counter = self.counter, counter = self.counter,
@ -278,10 +292,6 @@ mobs:register_egg("mobs_ghost_redo:ghost", S("Ghost Spawner"),
mobs:alias_mob("mobs:ghost", "mobs_ghost_redo:ghost") mobs:alias_mob("mobs:ghost", "mobs_ghost_redo:ghost")
--
-- Minetest engine debug logging
--
-- --
-- Minetest engine debug logging -- Minetest engine debug logging
-- --
@ -291,5 +301,5 @@ or (minetest.settings:get("debug_log_level") == "action")
or (minetest.settings:get("debug_log_level") == "info") or (minetest.settings:get("debug_log_level") == "info")
or (minetest.settings:get("debug_log_level") == "verbose") or (minetest.settings:get("debug_log_level") == "verbose")
then then
minetest.log("action", "[Mod] Mobs Ghost Redo [v0.6.0] loaded.") minetest.log("action", "[Mod] Mobs Ghost Redo [v0.7.0] loaded.")
end end

View File

@ -1,12 +1,17 @@
# Use the daytime check instead of light damage # ENG: Use the daytime check instead of light damage
# to despawn ghosts? (runs every 15secs) # to despawn ghosts? (runs every 15secs)
# #
# Usare il controllo del giorno invece del # ITA: Usare il controllo del giorno invece del
# ferimento da luce per fare scomparire i fantasmi? # ferimento da luce per fare scomparire i fantasmi?
# (eseguito ogni 15sec) # (eseguito ogni 15sec)
mobs_ghost_redo_daytime_check (Ghosts' Daytime Check) bool false mobs_ghost_redo_daytime_check (Ghosts' Daytime Check) bool false
# Whether if ghosts must be spawned from bones only. # ENG: Whether if ghosts must be spawned from bones only.
# #
# Se i fantasmi devono comparire solo dalle ossa. # ITA: Se i fantasmi devono comparire solo dalle ossa.
mobs_ghost_redo_bones_only (Ghosts from bones only) bool false mobs_ghost_redo_bones_only (Ghosts from bones only) bool false
# ENG: Whether if ghosts can be hurt only by swords (metal or crystal)
#
# ITA: Se i fantasmi possono essere feriti solo da spade (metallo o cristallo)
mobs_ghost_redo_difficulty (Only swords hurt ghosts) bool false