Compare commits

...

No commits in common. "master" and "master-2016-to-2018-npxcoot-development2" have entirely different histories.

230 changed files with 1003241 additions and 454165 deletions

28
HOWTOSURVIVE.txt Normal file
View File

@ -0,0 +1,28 @@
Brief guide to survive in nssm:
1. Rapidly realize in which biome you are
2. Gather some wood (10)
3. Craft a wooden pickaxe
4. Build a shelter in the side of the mountain and close the door
Some biomes are better than others in order to survive at the beginning... Hills, forest are the best at a low altitude beacuse of presence of weak ducks: source of food and weapons
It is nearly impossible to survive at the beginning in the savannah and in the deserts, pine forest is quite hard too, frozen biomes are great but they lack wood.
5. You are in a safe place! Find some coal mining your shelter or rapidly running near your cave
6. Leave the shelter only in order to gather wood
7. Mine in your house and find the iron, craft an armor and a sword
8. You can't dig under -30, Blocos live under -30 but above nobody should attack you underground
9. Start farming in front of your shelter
10. Kill some weak mobs and run from the stronger, do not challenge any boss! It is possible to fight strong enemies from your shelter, while they can't enter or hit you
11. Craft a wand in order to recover life even whitout food.
12. Always carry with you a sword and a steel pickaxe
13. Start exploring other biomes, run from savannah and deserts from now, and gather other goods from dead mobs in order to make better equipment
14. You can keep going down in the earth and mine more and more challenging underground mobs
15. With a better equipment you should start defeating bosses! Night Master is the most common and the weakest
16. Craft powerful weapons from bosses drops, but keep in mind that defeating the Mese Dragon is your goal!
17. Defeat all the bosses and gather their special drop
18. Craft the Mese Dragon Egg and find an appropriate place to summon it than defeat it.
With nssb:
1. Your adventure doesn't stop! Explore all the buildings and gather more and more experience!
2. Find a portal to Morlendor naturally spawned OR craft a bomb able to summon it from Slothful Soul Fragments: a rare drop of Signosignos.
3. Go to Morlendor throught the portal and bring a chest and flint and steel, place the chest near the portal in Morlendor and place some extra items.
4. Fight Morlendor mobs carefully, they can steal food, your armor, teleport themself, steal your life, explode, summoning bats...
5.

View File

@ -1,456 +0,0 @@
GNU LESSER GENERAL PUBLIC LICENSE
Version 2.1, February 1999
Copyright (C) 1991, 1999 Free Software Foundation, Inc.
51 Franklin Street, Fifth Floor, Boston, MA 02110-1301 USA
Everyone is permitted to copy and distribute verbatim copies
of this license document, but changing it is not allowed.
[This is the first released version of the Lesser GPL. It also counts
as the successor of the GNU Library Public License, version 2, hence
the version number 2.1.]
Preamble
The licenses for most software are designed to take away your
freedom to share and change it. By contrast, the GNU General Public
Licenses are intended to guarantee your freedom to share and change
free software--to make sure the software is free for all its users.
This license, the Lesser General Public License, applies to some
specially designated software packages--typically libraries--of the
Free Software Foundation and other authors who decide to use it. You
can use it too, but we suggest you first think carefully about whether
this license or the ordinary General Public License is the better
strategy to use in any particular case, based on the explanations below.
When we speak of free software, we are referring to freedom of use,
not price. Our General Public Licenses are designed to make sure that
you have the freedom to distribute copies of free software (and charge
for this service if you wish); that you receive source code or can get
it if you want it; that you can change the software and use pieces of
it in new free programs; and that you are informed that you can do
these things.
To protect your rights, we need to make restrictions that forbid
distributors to deny you these rights or to ask you to surrender these
rights. These restrictions translate to certain responsibilities for
you if you distribute copies of the library or if you modify it.
For example, if you distribute copies of the library, whether gratis
or for a fee, you must give the recipients all the rights that we gave
you. You must make sure that they, too, receive or can get the source
code. If you link other code with the library, you must provide
complete object files to the recipients, so that they can relink them
with the library after making changes to the library and recompiling
it. And you must show them these terms so they know their rights.
We protect your rights with a two-step method: (1) we copyright the
library, and (2) we offer you this license, which gives you legal
permission to copy, distribute and/or modify the library.
To protect each distributor, we want to make it very clear that
there is no warranty for the free library. Also, if the library is
modified by someone else and passed on, the recipients should know
that what they have is not the original version, so that the original
author's reputation will not be affected by problems that might be
introduced by others.
Finally, software patents pose a constant threat to the existence of
any free program. We wish to make sure that a company cannot
effectively restrict the users of a free program by obtaining a
restrictive license from a patent holder. Therefore, we insist that
any patent license obtained for a version of the library must be
consistent with the full freedom of use specified in this license.
Most GNU software, including some libraries, is covered by the
ordinary GNU General Public License. This license, the GNU Lesser
General Public License, applies to certain designated libraries, and
is quite different from the ordinary General Public License. We use
this license for certain libraries in order to permit linking those
libraries into non-free programs.
When a program is linked with a library, whether statically or using
a shared library, the combination of the two is legally speaking a
combined work, a derivative of the original library. The ordinary
General Public License therefore permits such linking only if the
entire combination fits its criteria of freedom. The Lesser General
Public License permits more lax criteria for linking other code with
the library.
We call this license the "Lesser" General Public License because it
does Less to protect the user's freedom than the ordinary General
Public License. It also provides other free software developers Less
of an advantage over competing non-free programs. These disadvantages
are the reason we use the ordinary General Public License for many
libraries. However, the Lesser license provides advantages in certain
special circumstances.
For example, on rare occasions, there may be a special need to
encourage the widest possible use of a certain library, so that it becomes
a de-facto standard. To achieve this, non-free programs must be
allowed to use the library. A more frequent case is that a free
library does the same job as widely used non-free libraries. In this
case, there is little to gain by limiting the free library to free
software only, so we use the Lesser General Public License.
In other cases, permission to use a particular library in non-free
programs enables a greater number of people to use a large body of
free software. For example, permission to use the GNU C Library in
non-free programs enables many more people to use the whole GNU
operating system, as well as its variant, the GNU/Linux operating
system.
Although the Lesser General Public License is Less protective of the
users' freedom, it does ensure that the user of a program that is
linked with the Library has the freedom and the wherewithal to run
that program using a modified version of the Library.
The precise terms and conditions for copying, distribution and
modification follow. Pay close attention to the difference between a
"work based on the library" and a "work that uses the library". The
former contains code derived from the library, whereas the latter must
be combined with the library in order to run.
GNU LESSER GENERAL PUBLIC LICENSE
TERMS AND CONDITIONS FOR COPYING, DISTRIBUTION AND MODIFICATION
0. This License Agreement applies to any software library or other
program which contains a notice placed by the copyright holder or
other authorized party saying it may be distributed under the terms of
this Lesser General Public License (also called "this License").
Each licensee is addressed as "you".
A "library" means a collection of software functions and/or data
prepared so as to be conveniently linked with application programs
(which use some of those functions and data) to form executables.
The "Library", below, refers to any such software library or work
which has been distributed under these terms. A "work based on the
Library" means either the Library or any derivative work under
copyright law: that is to say, a work containing the Library or a
portion of it, either verbatim or with modifications and/or translated
straightforwardly into another language. (Hereinafter, translation is
included without limitation in the term "modification".)
"Source code" for a work means the preferred form of the work for
making modifications to it. For a library, complete source code means
all the source code for all modules it contains, plus any associated
interface definition files, plus the scripts used to control compilation
and installation of the library.
Activities other than copying, distribution and modification are not
covered by this License; they are outside its scope. The act of
running a program using the Library is not restricted, and output from
such a program is covered only if its contents constitute a work based
on the Library (independent of the use of the Library in a tool for
writing it). Whether that is true depends on what the Library does
and what the program that uses the Library does.
1. You may copy and distribute verbatim copies of the Library's
complete source code as you receive it, in any medium, provided that
you conspicuously and appropriately publish on each copy an
appropriate copyright notice and disclaimer of warranty; keep intact
all the notices that refer to this License and to the absence of any
warranty; and distribute a copy of this License along with the
Library.
You may charge a fee for the physical act of transferring a copy,
and you may at your option offer warranty protection in exchange for a
fee.
2. You may modify your copy or copies of the Library or any portion
of it, thus forming a work based on the Library, and copy and
distribute such modifications or work under the terms of Section 1
above, provided that you also meet all of these conditions:
a) The modified work must itself be a software library.
b) You must cause the files modified to carry prominent notices
stating that you changed the files and the date of any change.
c) You must cause the whole of the work to be licensed at no
charge to all third parties under the terms of this License.
d) If a facility in the modified Library refers to a function or a
table of data to be supplied by an application program that uses
the facility, other than as an argument passed when the facility
is invoked, then you must make a good faith effort to ensure that,
in the event an application does not supply such function or
table, the facility still operates, and performs whatever part of
its purpose remains meaningful.
(For example, a function in a library to compute square roots has
a purpose that is entirely well-defined independent of the
application. Therefore, Subsection 2d requires that any
application-supplied function or table used by this function must
be optional: if the application does not supply it, the square
root function must still compute square roots.)
These requirements apply to the modified work as a whole. If
identifiable sections of that work are not derived from the Library,
and can be reasonably considered independent and separate works in
themselves, then this License, and its terms, do not apply to those
sections when you distribute them as separate works. But when you
distribute the same sections as part of a whole which is a work based
on the Library, the distribution of the whole must be on the terms of
this License, whose permissions for other licensees extend to the
entire whole, and thus to each and every part regardless of who wrote
it.
Thus, it is not the intent of this section to claim rights or contest
your rights to work written entirely by you; rather, the intent is to
exercise the right to control the distribution of derivative or
collective works based on the Library.
In addition, mere aggregation of another work not based on the Library
with the Library (or with a work based on the Library) on a volume of
a storage or distribution medium does not bring the other work under
the scope of this License.
3. You may opt to apply the terms of the ordinary GNU General Public
License instead of this License to a given copy of the Library. To do
this, you must alter all the notices that refer to this License, so
that they refer to the ordinary GNU General Public License, version 2,
instead of to this License. (If a newer version than version 2 of the
ordinary GNU General Public License has appeared, then you can specify
that version instead if you wish.) Do not make any other change in
these notices.
Once this change is made in a given copy, it is irreversible for
that copy, so the ordinary GNU General Public License applies to all
subsequent copies and derivative works made from that copy.
This option is useful when you wish to copy part of the code of
the Library into a program that is not a library.
4. You may copy and distribute the Library (or a portion or
derivative of it, under Section 2) in object code or executable form
under the terms of Sections 1 and 2 above provided that you accompany
it with the complete corresponding machine-readable source code, which
must be distributed under the terms of Sections 1 and 2 above on a
medium customarily used for software interchange.
If distribution of object code is made by offering access to copy
from a designated place, then offering equivalent access to copy the
source code from the same place satisfies the requirement to
distribute the source code, even though third parties are not
compelled to copy the source along with the object code.
5. A program that contains no derivative of any portion of the
Library, but is designed to work with the Library by being compiled or
linked with it, is called a "work that uses the Library". Such a
work, in isolation, is not a derivative work of the Library, and
therefore falls outside the scope of this License.
However, linking a "work that uses the Library" with the Library
creates an executable that is a derivative of the Library (because it
contains portions of the Library), rather than a "work that uses the
library". The executable is therefore covered by this License.
Section 6 states terms for distribution of such executables.
When a "work that uses the Library" uses material from a header file
that is part of the Library, the object code for the work may be a
derivative work of the Library even though the source code is not.
Whether this is true is especially significant if the work can be
linked without the Library, or if the work is itself a library. The
threshold for this to be true is not precisely defined by law.
If such an object file uses only numerical parameters, data
structure layouts and accessors, and small macros and small inline
functions (ten lines or less in length), then the use of the object
file is unrestricted, regardless of whether it is legally a derivative
work. (Executables containing this object code plus portions of the
Library will still fall under Section 6.)
Otherwise, if the work is a derivative of the Library, you may
distribute the object code for the work under the terms of Section 6.
Any executables containing that work also fall under Section 6,
whether or not they are linked directly with the Library itself.
6. As an exception to the Sections above, you may also combine or
link a "work that uses the Library" with the Library to produce a
work containing portions of the Library, and distribute that work
under terms of your choice, provided that the terms permit
modification of the work for the customer's own use and reverse
engineering for debugging such modifications.
You must give prominent notice with each copy of the work that the
Library is used in it and that the Library and its use are covered by
this License. You must supply a copy of this License. If the work
during execution displays copyright notices, you must include the
copyright notice for the Library among them, as well as a reference
directing the user to the copy of this License. Also, you must do one
of these things:
a) Accompany the work with the complete corresponding
machine-readable source code for the Library including whatever
changes were used in the work (which must be distributed under
Sections 1 and 2 above); and, if the work is an executable linked
with the Library, with the complete machine-readable "work that
uses the Library", as object code and/or source code, so that the
user can modify the Library and then relink to produce a modified
executable containing the modified Library. (It is understood
that the user who changes the contents of definitions files in the
Library will not necessarily be able to recompile the application
to use the modified definitions.)
b) Use a suitable shared library mechanism for linking with the
Library. A suitable mechanism is one that (1) uses at run time a
copy of the library already present on the user's computer system,
rather than copying library functions into the executable, and (2)
will operate properly with a modified version of the library, if
the user installs one, as long as the modified version is
interface-compatible with the version that the work was made with.
c) Accompany the work with a written offer, valid for at
least three years, to give the same user the materials
specified in Subsection 6a, above, for a charge no more
than the cost of performing this distribution.
d) If distribution of the work is made by offering access to copy
from a designated place, offer equivalent access to copy the above
specified materials from the same place.
e) Verify that the user has already received a copy of these
materials or that you have already sent this user a copy.
For an executable, the required form of the "work that uses the
Library" must include any data and utility programs needed for
reproducing the executable from it. However, as a special exception,
the materials to be distributed need not include anything that is
normally distributed (in either source or binary form) with the major
components (compiler, kernel, and so on) of the operating system on
which the executable runs, unless that component itself accompanies
the executable.
It may happen that this requirement contradicts the license
restrictions of other proprietary libraries that do not normally
accompany the operating system. Such a contradiction means you cannot
use both them and the Library together in an executable that you
distribute.
7. You may place library facilities that are a work based on the
Library side-by-side in a single library together with other library
facilities not covered by this License, and distribute such a combined
library, provided that the separate distribution of the work based on
the Library and of the other library facilities is otherwise
permitted, and provided that you do these two things:
a) Accompany the combined library with a copy of the same work
based on the Library, uncombined with any other library
facilities. This must be distributed under the terms of the
Sections above.
b) Give prominent notice with the combined library of the fact
that part of it is a work based on the Library, and explaining
where to find the accompanying uncombined form of the same work.
8. You may not copy, modify, sublicense, link with, or distribute
the Library except as expressly provided under this License. Any
attempt otherwise to copy, modify, sublicense, link with, or
distribute the Library is void, and will automatically terminate your
rights under this License. However, parties who have received copies,
or rights, from you under this License will not have their licenses
terminated so long as such parties remain in full compliance.
9. You are not required to accept this License, since you have not
signed it. However, nothing else grants you permission to modify or
distribute the Library or its derivative works. These actions are
prohibited by law if you do not accept this License. Therefore, by
modifying or distributing the Library (or any work based on the
Library), you indicate your acceptance of this License to do so, and
all its terms and conditions for copying, distributing or modifying
the Library or works based on it.
10. Each time you redistribute the Library (or any work based on the
Library), the recipient automatically receives a license from the
original licensor to copy, distribute, link with or modify the Library
subject to these terms and conditions. You may not impose any further
restrictions on the recipients' exercise of the rights granted herein.
You are not responsible for enforcing compliance by third parties with
this License.
11. If, as a consequence of a court judgment or allegation of patent
infringement or for any other reason (not limited to patent issues),
conditions are imposed on you (whether by court order, agreement or
otherwise) that contradict the conditions of this License, they do not
excuse you from the conditions of this License. If you cannot
distribute so as to satisfy simultaneously your obligations under this
License and any other pertinent obligations, then as a consequence you
may not distribute the Library at all. For example, if a patent
license would not permit royalty-free redistribution of the Library by
all those who receive copies directly or indirectly through you, then
the only way you could satisfy both it and this License would be to
refrain entirely from distribution of the Library.
If any portion of this section is held invalid or unenforceable under any
particular circumstance, the balance of the section is intended to apply,
and the section as a whole is intended to apply in other circumstances.
It is not the purpose of this section to induce you to infringe any
patents or other property right claims or to contest validity of any
such claims; this section has the sole purpose of protecting the
integrity of the free software distribution system which is
implemented by public license practices. Many people have made
generous contributions to the wide range of software distributed
through that system in reliance on consistent application of that
system; it is up to the author/donor to decide if he or she is willing
to distribute software through any other system and a licensee cannot
impose that choice.
This section is intended to make thoroughly clear what is believed to
be a consequence of the rest of this License.
12. If the distribution and/or use of the Library is restricted in
certain countries either by patents or by copyrighted interfaces, the
original copyright holder who places the Library under this License may add
an explicit geographical distribution limitation excluding those countries,
so that distribution is permitted only in or among countries not thus
excluded. In such case, this License incorporates the limitation as if
written in the body of this License.
13. The Free Software Foundation may publish revised and/or new
versions of the Lesser General Public License from time to time.
Such new versions will be similar in spirit to the present version,
but may differ in detail to address new problems or concerns.
Each version is given a distinguishing version number. If the Library
specifies a version number of this License which applies to it and
"any later version", you have the option of following the terms and
conditions either of that version or of any later version published by
the Free Software Foundation. If the Library does not specify a
license version number, you may choose any version ever published by
the Free Software Foundation.
14. If you wish to incorporate parts of the Library into other free
programs whose distribution conditions are incompatible with these,
write to the author to ask for permission. For software which is
copyrighted by the Free Software Foundation, write to the Free
Software Foundation; we sometimes make exceptions for this. Our
decision will be guided by the two goals of preserving the free status
of all derivatives of our free software and of promoting the sharing
and reuse of software generally.
NO WARRANTY
15. BECAUSE THE LIBRARY IS LICENSED FREE OF CHARGE, THERE IS NO
WARRANTY FOR THE LIBRARY, TO THE EXTENT PERMITTED BY APPLICABLE LAW.
EXCEPT WHEN OTHERWISE STATED IN WRITING THE COPYRIGHT HOLDERS AND/OR
OTHER PARTIES PROVIDE THE LIBRARY "AS IS" WITHOUT WARRANTY OF ANY
KIND, EITHER EXPRESSED OR IMPLIED, INCLUDING, BUT NOT LIMITED TO, THE
IMPLIED WARRANTIES OF MERCHANTABILITY AND FITNESS FOR A PARTICULAR
PURPOSE. THE ENTIRE RISK AS TO THE QUALITY AND PERFORMANCE OF THE
LIBRARY IS WITH YOU. SHOULD THE LIBRARY PROVE DEFECTIVE, YOU ASSUME
THE COST OF ALL NECESSARY SERVICING, REPAIR OR CORRECTION.
16. IN NO EVENT UNLESS REQUIRED BY APPLICABLE LAW OR AGREED TO IN
WRITING WILL ANY COPYRIGHT HOLDER, OR ANY OTHER PARTY WHO MAY MODIFY
AND/OR REDISTRIBUTE THE LIBRARY AS PERMITTED ABOVE, BE LIABLE TO YOU
FOR DAMAGES, INCLUDING ANY GENERAL, SPECIAL, INCIDENTAL OR
CONSEQUENTIAL DAMAGES ARISING OUT OF THE USE OR INABILITY TO USE THE
LIBRARY (INCLUDING BUT NOT LIMITED TO LOSS OF DATA OR DATA BEING
RENDERED INACCURATE OR LOSSES SUSTAINED BY YOU OR THIRD PARTIES OR A
FAILURE OF THE LIBRARY TO OPERATE WITH ANY OTHER SOFTWARE), EVEN IF
SUCH HOLDER OR OTHER PARTY HAS BEEN ADVISED OF THE POSSIBILITY OF SUCH
DAMAGES.

View File

@ -1,56 +0,0 @@
# Not So Simple Mobs
(C) 2016 NPX Team and Contributors , GPLv3
NSSM adds a wide variety of very hostile mobs, as well as new weapons, armours and foods.
This mod is a continuation of NPX Team's Not So Simple Mobs. Notes from the original README are available below.
## License
* License for the code: `GPLv3 or later`
* see [LICENSE.txt](LICENSE.txt) and [license_notes.md](license_notes.md) for info on the license update
* Copyright NPX Team and contributors
* License for non-code assets: see `LICENSE_MEDIA.txt`
## Version Dependencies
This mod relies heavily on the features in TenPlus1's [`mobs_redo`](https://notabug.org/tenplus1/mobs_redo), which is developed independently.
This version of NSSM was adjusted to run against commit `487e037cc9` (from 2018-12-20). If you are having problems with mod compatibility, please ensure you are using a version of `mobs_redo` close to that commit.
For some NSSB mobs, there is a dependency on the `3d_armor` API itself. This mod has been adjusted to work with version at tag `version-0.4.12` (June 2018) ; most later versions should work too.
## Settings
This mod provides some extra settings for fine tuning the experience:
* `nssm.classic_rainbow_staff` - Rainbow Staff is a powerful tool instead of a block placer
* `nssm.spiders_litter_web` - Allows spiders to place webs all over
## The original notes from NPX Team ! --¬
We suggest that you play nssm with:
* [`NSSB`](https://github.com/taikedz-mt/nssb) (Not So Simple Buildings, NPX Team's second mod that adds many blocks and Morlendor, the new dimension!)
* `3d_armors` (with which you can use nssm armors):
* `unified_inventory` (useful to discover all the new recipes and to use the armors):
* a throwing mod (a mod that add bows) if compatible with the Tenplus1's `damage_system`
We would like to thank:
* PilzAdam, for his wonderful simple-mobs mod;
* Tenplus1, for his hard work in making `mobs_redo`;
* Echoes91, for Spears: simple but amazing;
* and obviously Celeron-55 and all the people who contributed to Minetest and its community (and Paramat in particular);
* Denise and `Ponzi_Duro` for the revision of the guide;
* `Double_P`, `Ponzi_Duro`, `Andrey01` and `Taikedz` for the beta testing;
The mod makes the game really hard, please read the wiki before playing: <http://wiki.minetest.net/Mods/Not_So_Simple_Mobs> (which will be updated as soon as possible) or the old guide for the 2.4 version.
Here are the trailers of the mod:
* nssm 2.1: <https://www.youtube.com/watch?v=ccLUt58mo0k>
* nssm 3.0: <https://www.youtube.com/watch?v=ZBuAi1sQJxQ>
NPX Team ~

27
README.txt Normal file
View File

@ -0,0 +1,27 @@
Not So Simple Mobs by NPX team
Starting from version 3.0 the mod depends on mobs_redo api: https://github.com/tenplus1/mobs_redo
We suggest that you play nssm with:
- nssb (Not So Simple Buildings, our second mod that adds many blocks and Morlendor, the new dimension):
- 3d_armors (with which you can use nssm armors):
- unified_inventory (useful to discover all the new recipes and to use the armors):
- a throwing mod (a mod that add bows) if compatible with the Tenplus1's damage_system
We would like to thank:
- PilzAdam, for his wonderful simple-mobs mod;
- Tenplus1, for his hard work in making mobs_redo;
- Echoes91, for Spears: simple but amazing;
- and obviously Celeron-55 and all the people who contributed to Minetest and its community (and Paramat in particular);
- Denise and Ponzi_Duro for the revision of the guide;
- Double_P, Ponzi_Duro, Andrey01 and Taikedz for the beta testing;
- Taikedz for his support and for hosting a server dedicated to nssm (Not So Simple Server: https://forum.minetest.net/viewtopic.php?f=10&t=15435&hilit=nsss);
License for the code: LGPL
License for all the models, textures and sound: CC BY-SA 4.0
The mod makes the game really hard, please read the wiki before playing: http://wiki.minetest.net/Mods/Not_So_Simple_Mobs (which will be updated as soon as possible) or the old guide for the 2.4 version.
Here are the trailers of the mod:
- nssm 2.1: https://www.youtube.com/watch?v=ccLUt58mo0k
- nssm 3.0: https://www.youtube.com/watch?v=ZBuAi1sQJxQ

View File

@ -1,13 +1,3 @@
v3.02 (26th Jul 2020):
- Tweaked and tidied code
- Fixed bugs and used latest mobs redo api functions
- Changed spawning to use new minetest 5.x dirt types
v3.01 (8th Aug 2018):
- Fixed missing functions so that nssm uses mobs redo's global functions;
- Fixed performance issue thanks to Ihofhansl
- Updated to use Minetest 0.4.16 and above functions
v3.0 (22-11-16):
- rewritten to add the dependency from mobs_redo. The mobs now directly use the mobs api;
- added the mobs Morlu, Morvy, Morgut, Mode, Mordain, Morwa, Morgre and Morvalar for the "Morlendor" dimension (that you can find playing with nssb);

582
darts.lua
View File

@ -1,137 +1,105 @@
local function duck_explosion(pos)
if minetest.is_protected(pos, "") then
return
end
pos.y = pos.y + 1
minetest.add_particlespawner({
amount = 10,
time = 0.2,
minpos = {x = pos.x - 1, y = pos.y - 1, z = pos.z - 1},
maxpos = {x = pos.x + 1, y = pos.y + 4, z = pos.z + 1},
minvel = {x = 0, y = 0, z = 0},
maxvel = {x = 1, y = 1, z = 1},
minacc = {x = -0.5, y = 5, z = -0.5},
maxacc = {x = 0.5, y = 5, z = 0.5},
minexptime = 1,
maxexptime = 3,
minsize = 4,
maxsize = 6,
collisiondetection = false,
vertical = false,
texture = "duck_egg_fragments.png"
})
minetest.after(0.4, function()
for dx = -1, 1 do
pos = {x = pos.x + dx, y = pos.y, z = pos.z + dx}
minetest.add_particlespawner({
amount = 100,
time = 0.2,
minpos = {x = pos.x - 1, y = pos.y - 1, z = pos.z - 1},
maxpos = {x = pos.x + 1, y = pos.y + 4, z = pos.z + 1},
minvel = {x = 0, y = 0, z = 0},
maxvel = {x = 1, y = 5, z = 1},
minacc = {x = -0.5, y = 5, z = -0.5},
maxacc = {x = 0.5, y = 5, z = 0.5},
minexptime = 1,
maxexptime = 3,
minsize = 2,
maxsize = 4,
collisiondetection = false,
vertical = false,
texture = "tnt_smoke.png"
})
minetest.add_entity(pos, "nssm:duck")
end
end)
end
-- arrow (duck_arrow)
mobs:register_arrow("nssm:duck_father", {
visual = "sprite",
visual_size = {x = 1, y = 1},
textures = {"duck_egg.png"},
velocity = 8,
-- direct hit
hit_player = function(self, player)
local pos = self.object:get_pos()
local pos = self.object:getpos()
duck_explosion(pos)
end,
hit_mob = function(self, player)
local pos = self.object:get_pos()
local pos = self.object:getpos()
duck_explosion(pos)
end,
hit_node = function(self, pos, node)
duck_explosion(pos)
end
end,
})
local function ice_explosion(pos)
for i = pos.x - math.random(0, 1), pos.x + math.random(0, 1), 1 do
for j = pos.y - 1, pos.y + 4, 1 do
for k = pos.z - math.random(0, 1), pos.z + math.random(0, 1), 1 do
local p = {x = i, y = j, z = k}
local n = minetest.get_node(p).name
if minetest.get_item_group(n, "unbreakable") == 1
or minetest.is_protected(p, "")
or (n == "bones:bones" and not nssm:affectbones(self)) then
else
minetest.set_node({x = i, y = j, z = k}, {name = "default:ice"})
end
end
function duck_explosion(pos)
pos.y = pos.y+1;
minetest.add_particlespawner({
amount = 10,
time = 0.2,
minpos = {x=pos.x-1, y=pos.y-1, z=pos.z-1},
maxpos = {x=pos.x+1, y=pos.y+4, z=pos.z+1},
minvel = {x=0, y=0, z=0},
maxvel = {x=1, y=1, z=1},
minacc = {x=-0.5,y=5,z=-0.5},
maxacc = {x=0.5,y=5,z=0.5},
minexptime = 1,
maxexptime = 3,
minsize = 4,
maxsize = 6,
collisiondetection = false,
vertical = false,
texture = "duck_egg_fragments.png",
})
core.after(0.4, function()
for dx = -1,1 do
pos = {x = pos.x+dx, y=pos.y; z=pos.z+dx}
minetest.add_particlespawner({
amount = 100,
time = 0.2,
minpos = {x=pos.x-1, y=pos.y-1, z=pos.z-1},
maxpos = {x=pos.x+1, y=pos.y+4, z=pos.z+1},
minvel = {x=0, y=0, z=0},
maxvel = {x=1, y=5, z=1},
minacc = {x=-0.5,y=5,z=-0.5},
maxacc = {x=0.5,y=5,z=0.5},
minexptime = 1,
maxexptime = 3,
minsize = 2,
maxsize = 4,
collisiondetection = false,
vertical = false,
texture = "tnt_smoke.png",
})
minetest.add_entity(pos, "nssm:duck")
end
end
end)
end
-- snow_arrow
mobs:register_arrow("nssm:snow_arrow", {
visual = "sprite",
visual_size = {x = 1, y = 1},
textures = {"transparent.png"},
velocity = 20,
velocity =20,
-- direct hit
hit_player = function(self, player)
local pos = self.object:get_pos()
local pos = self.object:getpos()
ice_explosion(pos)
end,
hit_mob = function(self, player)
local pos = self.object:get_pos()
local pos = self.object:getpos()
ice_explosion(pos)
end,
hit_node = function(self, pos, node)
ice_explosion(pos)
end
end,
})
function ice_explosion(pos)
for i=pos.x-math.random(0, 1), pos.x+math.random(0, 1), 1 do
for j=pos.y-1, pos.y+4, 1 do
for k=pos.z-math.random(0, 1), pos.z+math.random(0, 1), 1 do
local p = {x=i, y=j, z=k}
local n = minetest.env:get_node(p).name
if minetest.get_item_group(n, "unbreakable") == 1 or minetest.is_protected(p, "") or (n == "bones:bones" and not nssm:affectbones(self)) then
else
minetest.set_node({x=i, y=j, z=k}, {name="nssm:coldest_ice"})
end
end
end
end
end
-- arrow manticore
mobs:register_arrow("nssm:spine", {
@ -139,107 +107,85 @@ mobs:register_arrow("nssm:spine", {
visual_size = {x = 1, y = 1},
textures = {"manticore_spine_flying.png"},
velocity = 10,
-- direct hit
hit_player = function(self, player)
player:punch(self.object, 1.0, {
full_punch_interval = 1.0,
damage_groups = {fleshy = 2}
damage_groups = {fleshy = 2},
}, nil)
end,
hit_mob = function(self, player)
player:punch(self.object, 1.0, {
full_punch_interval = 1.0,
damage_groups = {fleshy = 2}
damage_groups = {fleshy = 2},
}, nil)
end,
hit_node = function(self, pos, node)
end
})
-- morbat arrow
--morbat arrow
mobs:register_arrow("nssm:morarrow", {
visual = "sprite",
visual_size = {x = 0.5, y = 0.5},
visual_size = {x=0.5, y=0.5},
textures = {"morarrow.png"},
velocity= 13,
hit_player = function(self, player)
player:punch(self.object, 1.0, {
full_punch_interval = 1.0,
damage_groups = {fleshy = 3}
damage_groups = {fleshy = 3},
}, nil)
end,
hit_node = function(self, pos, node)
end
})
local function explosion_web(pos, webnode)
pos.y = round(pos.y)
if minetest.is_protected(pos, "") then
return
end
for i = pos.x - 1, pos.x + 1, 1 do
for j = pos.y - 3, pos.y, 1 do
for k = pos.z - 1, pos.z + 1, 1 do
local p = {x = i, y = j, z = k}
local k = {x = i, y = j + 1, z = k}
local current = minetest.get_node(p).name
local ontop = minetest.get_node(k).name
if current ~= "air"
and current ~= webnode
and ontop == "air"
and not minetest.is_protected(p, "")
and not minetest.is_protected(k, "") then
minetest.set_node(k, {name = webnode})
end
end
end
end
end
-- web arrow
mobs:register_arrow("nssm:webball", {
visual = "sprite",
visual_size = {x = 1, y = 1},
textures = {"web_ball.png"},
velocity = 8,
-- direct hit
hit_player = function(self, player)
local p = player:get_pos()
explosion_web(p, "nssm:web")
local p = player:getpos()
explosion_web(p)
end,
hit_mob = function(self, player)
player:punch(self.object, 1.0, {
full_punch_interval = 1.0,
damage_groups = {fleshy = 1}
damage_groups = {fleshy = 1},
}, nil)
end,
hit_node = function(self, pos, node)
explosion_web(pos, "nssm:web")
explosion_web(pos)
end
})
function explosion_web(pos)
if minetest.is_protected(pos, "") then
return
end
pos.y = round(pos.y)
for i=pos.x-1, pos.x+1, 1 do
for j=pos.y-3, pos.y, 1 do
for k=pos.z-1, pos.z+1, 1 do
local p = {x=i,y=j,z=k}
local k = {x=i,y=j+1,z=k}
local current = minetest.env:get_node(p).name
local ontop = minetest.env:get_node(k).name
if (current ~= "air") and
(current ~= "nssm:web") and
(ontop == "air") and not
minetest.is_protected(p,"") and not
minetest.is_protected(k,"") then
minetest.set_node(k, {name="nssm:web"})
end
end
end
end
end
-- thick_web arrow
mobs:register_arrow("nssm:thickwebball", {
@ -247,116 +193,99 @@ mobs:register_arrow("nssm:thickwebball", {
visual_size = {x = 2, y = 2},
textures = {"thick_web_ball.png"},
velocity = 8,
-- direct hit
hit_player = function(self, player)
local p = player:get_pos()
explosion_web(p, "nssm:thick_web")
local p = player:getpos()
explosion_thickweb(p)
end,
hit_mob = function(self, player)
player:punch(self.object, 1.0, {
full_punch_interval = 1.0,
damage_groups = {fleshy = 6}
damage_groups = {fleshy = 6},
}, nil)
end,
hit_node = function(self, pos, node)
explosion_web(pos, "nssm:thick_web")
explosion_thickweb(pos)
end
})
-- arrow=>phoenix arrow
mobs:register_arrow("nssm:phoenix_arrow", {
visual = "sprite",
visual_size = {x = 1, y = 1},
textures = {"transparent.png"},
velocity = 8,
-- direct hit
hit_player = function(self, player)
end,
on_step = function(self, dtime)
local pos = self.object:get_pos()
if minetest.is_protected(pos, "") then
return
end
local n = minetest.get_node(pos).name
if self.timer == 0 then
self.timer = os.time()
end
if os.time() - self.timer > 5 or minetest.is_protected(pos, "")
or ((n ~= "air") and (n ~= "nssm:phoenix_fire")) then
self.object:remove()
end
if math.random(2) == 2 then
minetest.set_node(pos, {name = "nssm:phoenix_fire"})
end
if math.random(6) == 1 then
local p = {
x = pos.x + math.random(-1, 1),
y = pos.y + math.random(-1, 1),
z = pos.z + math.random(-1, 1)
}
local n = minetest.get_node(p).name
if n == "air" then
minetest.set_node(p, {name = "nssm:phoenix_fire"})
end
end
end
})
local function gas_explosion(pos)
function explosion_thickweb(pos)
if minetest.is_protected(pos, "") then
return
end
for dx = -2, 2 do
for dy = -1, 4 do
for dz = -2, 2 do
local p = {x = pos.x + dx, y = pos.y + dy, z = pos.z + dz}
if minetest.is_protected(p, "") then
return
end
local n = minetest.get_node(p).name
if n == "air" then
minetest.set_node(p, {name = "nssm:venomous_gas"})
pos.y = round(pos.y)
for i=pos.x+0, pos.x+0, 1 do
for j=pos.y-2, pos.y, 1 do
for k=pos.z+0, pos.z+0, 1 do
local p = {x=i,y=j,z=k}
local k = {x=i,y=j+1,z=k}
local current = minetest.env:get_node(p).name
local ontop = minetest.env:get_node(k).name
if (current ~= "air") and
(current ~= "nssm:thick_web") and
(ontop == "air") and not
minetest.is_protected(p,"") and not
minetest.is_protected(k,"") then
minetest.set_node(k, {name="nssm:thick_web"})
end
end
end
end
end
-- arrow=>phoenix arrow
--[[
mobs:register_arrow("nssm:phoenix_arrow", {
visual = "sprite",
visual_size = {x = 1, y = 1},
textures = {"transparent.png"},
velocity = 8,
-- direct hit
hit_player = function(self, player)
end,
on_step = function(self, dtime)
local pos = self.object:getpos()
local n = minetest.env:get_node(pos).name
if self.timer == 0 then
self.timer = os.time()
end
if os.time() - self.timer > 5 or minetest.is_protected(pos, "") or ((n~="air") and (n~="nssm:phoenix_fire")) then
self.object:remove()
end
if math.random(1,2)==2 then
minetest.env:set_node(pos, {name="nssm:phoenix_fire"})
end
if math.random(1,6)==1 then
dx = math.random(-1,1)
dy = math.random(-1,1)
dz = math.random(-1,1)
local p = {x=pos.x+dx, y=pos.y+dy, z=pos.z+dz}
local n = minetest.env:get_node(p).name
if n=="air" then
minetest.env:set_node(p, {name="nssm:phoenix_fire"})
end
end
end,
})
]]
mobs:register_arrow("nssm:super_gas", {
visual = "sprite",
visual_size = {x = 1, y = 1},
textures = {"tnt_smoke.png^[colorize:green:170"},
textures = {"transparent.png"},
velocity = 8,
-- direct hit
hit_player = function(self, player)
local p = player:get_pos()
local p = player:getpos()
gas_explosion(p)
end,
@ -366,6 +295,112 @@ mobs:register_arrow("nssm:super_gas", {
})
function gas_explosion(pos)
if minetest.is_protected(pos, "") then
return
end
for dx=-2,2 do
for dy=-1,4 do
for dz=-2,2 do
local p = {x=pos.x+dx, y=pos.y+dy, z=pos.z+dz}
if minetest.is_protected(p, "") then
return
end
local n = minetest.env:get_node(p).name
if n== "air" then
minetest.set_node(p, {name="nssm:venomous_gas"})
end
end
end
end
end
--crystalgas arrow
mobs:register_arrow("nssm:crystal_gas_arrow", {
visual = "sprite",
visual_size = {x = 1, y = 1},
textures = {"crystal_arrow.png"},
velocity = 8,
-- direct hit
hit_player = function(self, player)
local p = player:getpos()
crystal_gas_explosion(p)
end,
hit_node = function(self, pos, node)
crystal_gas_explosion(pos)
end
})
function crystal_gas_explosion(pos)
if minetest.is_protected(pos, "") then
return
end
for dx= 0,0 do
for dy=-1,2 do
for dz= 0,0 do
local p = {x=pos.x+dx, y=pos.y+dy, z=pos.z+dz}
if minetest.is_protected(p, "") then
return
end
local n = minetest.env:get_node(p).name
if n== "air" then
minetest.set_node(p, {name="nssm:crystal_gas"})
end
end
end
end
end
--Pumpkid bomb
mobs:register_arrow("nssm:pumpkid_bomb", {
visual = "cube",
visual_size = {x = 1, y = 1},
textures = {"pumpbomb_top.png","pumpbomb_bottom.png", "pumpbomb_side.png", "pumpbomb_side.png", "pumpbomb_side.png", "pumpbomb_front.png"},
velocity = 8,
-- direct hit
hit_player = function(self, player)
local p = player:getpos()
--local pos1 = {x = pos.x, y=pos.y, z=pos.z}
if not minetest.is_protected(p, "") or not minetest.get_item_group(minetest.get_node(p).name, "unbreakable") == 1 then
tnt.boom(p, {damage_radius=3,radius=2,ignore_protection=false})
end
end,
hit_node = function(self, pos, node)
--local pos1 = {x = pos.x, y=pos.y, z=pos.z}
if not minetest.is_protected(pos, "") or not minetest.get_item_group(minetest.get_node(pos).name, "unbreakable") == 1 then
tnt.boom(pos, {damage_radius=3,radius=2,ignore_protection=false})
end
end
})
--Lava_block bomb
mobs:register_arrow("nssm:lava_block_bomb", {
visual = "cube",
visual_size = {x = 1, y = 1},
textures = {"default_lava.png","default_lava.png", "default_lava.png", "default_lava.png", "default_lava.png", "default_lava.png"},
velocity = 8,
-- direct hit
hit_player = function(self, player)
local p = player:getpos()
if not minetest.is_protected(p, "") or not minetest.get_item_group(minetest.get_node(p).name, "unbreakable") == 1 then
minetest.set_node(p, {name="default:lava_source"})
end
end,
hit_node = function(self, pos, node)
if not minetest.is_protected(pos, "") or not minetest.get_item_group(minetest.get_node(pos).name, "unbreakable") == 1 then
minetest.set_node(pos, {name="default:lava_source"})
end
end
})
--[[
mobs:register_arrow("nssm:roar_of_the_dragon", {
visual = "sprite",
visual_size = {x = 1, y = 1},
@ -374,8 +409,9 @@ mobs:register_arrow("nssm:roar_of_the_dragon", {
on_step = function(self, dtime)
local pos = self.object:get_pos()
local n = minetest.get_node(pos).name
local pos = self.object:getpos()
local n = minetest.env:get_node(pos).name
if self.timer == 0 then
self.timer = os.time()
@ -385,44 +421,29 @@ mobs:register_arrow("nssm:roar_of_the_dragon", {
self.object:remove()
end
local objects = minetest.get_objects_inside_radius(pos, 1)
for _,obj in ipairs(objects) do
local ent = obj and obj:get_luaentity()
local name = ent and ent.name
if name and name ~= "nssm:roar_of_the_dragon"
and name ~= "nssm:mese_dragon" then
obj:set_hp(obj:get_hp() - 0.05)
if obj:get_hp() <= 0 then
if (not obj:is_player())
and name ~= self.object:get_luaentity().name then
obj:remove()
end
end
local objects = minetest.env:get_objects_inside_radius(pos, 1)
for _,obj in ipairs(objects) do
local name = obj:get_entity_name()
if name~="nssm:roar_of_the_dragon" and name ~= "nssm:mese_dragon" then
obj:set_hp(obj:get_hp()-0.05)
if (obj:get_hp() <= 0) then
if (not obj:is_player()) and name ~= self.object:get_luaentity().name then
obj:remove()
end
end
end
end
end
minetest.set_node(pos, {name = "air"})
if math.random(2) == 1 then
local p = {
x = pos.x + math.random(-1, 1),
y = pos.y + math.random(-1, 1),
z = pos.z + math.random(-1, 1)
}
if not minetest.is_protected(p, "") then
minetest.set_node(p, {name = "air"})
end
minetest.env:set_node(pos, {name="air"})
if math.random(1,2)==1 then
dx = math.random(-1,1)
dy = math.random(-1,1)
dz = math.random(-1,1)
local p = {x=pos.x+dx, y=pos.y+dy, z=pos.z+dz}
minetest.env:set_node(p, {name="air"})
end
end
})
})]]
mobs:register_arrow("nssm:lava_arrow", {
@ -430,32 +451,19 @@ mobs:register_arrow("nssm:lava_arrow", {
visual_size = {x = 1, y = 1},
textures = {"transparent.png"},
velocity = 10,
-- direct hit
hit_player = function(self, player)
local pos = self.object:get_pos()
if minetest.is_protected(pos, "") then
return
end
for dy = -1, 6, 1 do
for dx = -1, 1, 2 do
for dz = -1, 1, 2 do
local p = {x = pos.x + dx, y = pos.y + dy, z = pos.z + dz}
local n = minetest.get_node(p).name
if n ~= "default:lava_flowing"
and not minetest.is_protected(p, "") then
minetest.set_node(p, {name = "default:lava_flowing"})
local pos = self.object:getpos()
for dy=-1, 6, 1 do
for dx=-1, 1, 2 do
for dz=-1, 1, 2 do
local p = {x=pos.x+dx, y=pos.y+dy, z=pos.z+dz}
local n = minetest.env:get_node(p).name
if n~="default:lava_flowing" and not minetest.is_protected(p, "") then
minetest.set_node(p, {name="default:lava_flowing"})
end
end
end
end
end,
hit_node = function(self, pos, node)
end
})

View File

@ -1,7 +1,8 @@
default
mobs
farming?
bows?
nssbombs?
3d_armor?
fire
tnt
shields?

178
init.lua
View File

@ -1,100 +1,90 @@
local path = minetest.get_modpath("nssm")
nssm = {}
-- translation
local S
if minetest.get_translator ~= nil then
S = minetest.get_translator("nssm") -- 5.x translation function
else -- boilerplate function
S = function(str, ...)
local args = {...}
return str:gsub("@%d+", function(match)
return args[tonumber(match:sub(2))]
end)
end
end
nssm.mymapgenis = tonumber(minetest.setting_get('mymapgenis')) or 7
nssm.multimobs = tonumber(minetest.setting_get('multimobs')) or 1000
nssm = {
mymapgenis = tonumber(minetest.settings:get("nssm.mymapgenis")) or 7,
multimobs = tonumber(minetest.settings:get("nssm.multimobs")) or 1000,
spiders_litter_web = minetest.settings:get_bool("nssm.spiders_litter_web", true),
classic_rainbow_staff = minetest.settings:get_bool("nssm.classic_rainbow_staff", false),
S = S
}
dofile(path.."/spawn.lua")
--Mobs
dofile(path.."/mobs/albino_spider.lua")
dofile(path.."/mobs/ant_queen.lua")
dofile(path.."/mobs/ant_soldier.lua")
dofile(path.."/mobs/ant_worker.lua")
dofile(path.."/mobs/berinhog.lua")
dofile(path.."/mobs/black_scorpion.lua")
dofile(path.."/mobs/black_widow.lua")
dofile(path.."/mobs/bloco.lua")
dofile(path.."/mobs/chog.lua")
dofile(path.."/mobs/crab.lua")
dofile(path.."/mobs/crystal_slug.lua")
dofile(path.."/mobs/daddy_long_legs.lua")
--dofile(path.."/mobs/dolidrosaurus.lua")
dofile(path.."/mobs/duck.lua")
dofile(path.."/mobs/duckking.lua")
dofile(path.."/mobs/echidna.lua")
dofile(path.."/mobs/enderduck.lua")
dofile(path.."/mobs/felucco.lua")
dofile(path.."/mobs/flust.lua")
dofile(path.."/mobs/flying_duck.lua")
dofile(path.."/mobs/giant_sandworm.lua")
dofile(path.."/mobs/icelamander.lua")
dofile(path.."/mobs/icelizard.lua")
dofile(path.."/mobs/icesnake.lua")
dofile(path.."/mobs/kele.lua")
dofile(path.."/mobs/kraken.lua")
dofile(path.."/mobs/larva.lua")
dofile(path.."/mobs/lava_titan.lua")
dofile(path.."/mobs/manticore.lua")
dofile(path.."/mobs/mantis.lua")
dofile(path.."/mobs/masticone.lua")
dofile(path.."/mobs/moonheron.lua")
dofile(path.."/mobs/mordain.lua")
dofile(path.."/mobs/morgre.lua")
dofile(path.."/mobs/morde.lua")
dofile(path.."/mobs/morgut.lua")
dofile(path.."/mobs/morlu.lua")
dofile(path.."/mobs/morvalar.lua")
dofile(path.."/mobs/morvy.lua")
dofile(path.."/mobs/morwa.lua")
dofile(path.."/mobs/night_master.lua")
dofile(path.."/mobs/octopus.lua")
dofile(path.."/mobs/pelagia.lua")
dofile(path.."/mobs/phoenix.lua")
dofile(path.."/mobs/pumpboom.lua")
dofile(path.."/mobs/pumpking.lua")
dofile(path.."/mobs/pumpkid.lua")
dofile(path.."/mobs/river_lord.lua")
dofile(path.."/mobs/salamander.lua")
dofile(path.."/mobs/sand_bloco.lua")
dofile(path.."/mobs/sandworm.lua")
dofile(path.."/mobs/scrausics.lua")
dofile(path.."/mobs/signosigno.lua")
dofile(path.."/mobs/silversand_dragon.lua")
dofile(path.."/mobs/silver_sandonisc.lua")
dofile(path.."/mobs/snow_biter.lua")
dofile(path.."/mobs/spiderduck.lua")
dofile(path.."/mobs/stone_eater.lua")
dofile(path.."/mobs/swimming_duck.lua")
dofile(path.."/mobs/tarantula.lua")
dofile(path.."/mobs/tartacacia.lua")
dofile(path.."/mobs/uloboros.lua")
--dofile(path.."/mobs/werewolf.lua")
--dofile(path.."/mobs/white_werewolf.lua")
-- Mobs
dofile(path .. "/mobs/ant_queen.lua")
dofile(path .. "/mobs/ant_soldier.lua")
dofile(path .. "/mobs/ant_worker.lua")
dofile(path .. "/mobs/black_widow.lua")
dofile(path .. "/mobs/bloco.lua")
dofile(path .. "/mobs/crab.lua")
dofile(path .. "/mobs/crocodile.lua")
dofile(path .. "/mobs/daddy_long_legs.lua")
dofile(path .. "/mobs/dolidrosaurus.lua")
dofile(path .. "/mobs/duck.lua")
dofile(path .. "/mobs/duckking.lua")
dofile(path .. "/mobs/echidna.lua")
dofile(path .. "/mobs/enderduck.lua")
dofile(path .. "/mobs/flying_duck.lua")
dofile(path .. "/mobs/felucco.lua")
dofile(path .. "/mobs/giant_sandworm.lua")
dofile(path .. "/mobs/icelamander.lua")
dofile(path .. "/mobs/icesnake.lua")
dofile(path .. "/mobs/kraken.lua")
dofile(path .. "/mobs/larva.lua")
dofile(path .. "/mobs/lava_titan.lua")
dofile(path .. "/mobs/manticore.lua")
dofile(path .. "/mobs/mantis_beast.lua")
dofile(path .. "/mobs/mantis.lua")
dofile(path .. "/mobs/masticone.lua")
dofile(path .. "/mobs/moonheron.lua")
dofile(path .. "/mobs/mordain.lua")
dofile(path .. "/mobs/morgre.lua")
dofile(path .. "/mobs/morde.lua")
dofile(path .. "/mobs/morgut.lua")
dofile(path .. "/mobs/morlu.lua")
dofile(path .. "/mobs/morvalar.lua")
dofile(path .. "/mobs/morvy.lua")
dofile(path .. "/mobs/morwa.lua")
dofile(path .. "/mobs/night_master.lua")
dofile(path .. "/mobs/octopus.lua")
dofile(path .. "/mobs/phoenix.lua")
dofile(path .. "/mobs/pumpboom.lua")
dofile(path .. "/mobs/pumpking.lua")
dofile(path .. "/mobs/sandworm.lua")
dofile(path .. "/mobs/scrausics.lua")
dofile(path .. "/mobs/sand_bloco.lua")
dofile(path .. "/mobs/signosigno.lua")
dofile(path .. "/mobs/snow_biter.lua")
dofile(path .. "/mobs/spiderduck.lua")
dofile(path .. "/mobs/stone_eater.lua")
dofile(path .. "/mobs/swimming_duck.lua")
dofile(path .. "/mobs/tarantula.lua")
dofile(path .. "/mobs/uloboros.lua")
dofile(path .. "/mobs/werewolf.lua")
dofile(path .. "/mobs/white_werewolf.lua")
--Final Boss
dofile(path.."/mobs/mese_dragon.lua")
-- Final Boss
dofile(path .. "/mobs/mese_dragon.lua")
-- Others
dofile(path .. "/darts.lua")
dofile(path .. "/nssm_materials.lua")
dofile(path .. "/nssm_spears.lua")
dofile(path .. "/nssm_api.lua")
dofile(path .. "/nssm_weapons.lua")
if minetest.registered_nodes["nyancat:nyancat_rainbow"] then
dofile(path .. "/rainbow_staff.lua") ; print ("NYAN!!!!!")
end
if minetest.get_modpath("3d_armor") then
dofile(path .. "/nssm_armor.lua")
end
-- Spawn settings
dofile(path .. "/spawn.lua")
print("[MOD] NSSM loaded")
--Others
dofile(path.."/rainbow_staff.lua")
dofile(path.."/darts.lua")
dofile(path.."/nssm_materials.lua")
dofile(path.."/nssm_tools.lua")
--dofile(path.."/nssm_bows.lua")
dofile(path.."/nssm_recipes.lua")
dofile(path.."/nssm_spears.lua")
dofile(path.."/nssm_api.lua")
dofile(path.."/nssm_weapons.lua")
dofile(path.."/nssm_bombs.lua")
dofile(path.."/nssm_armor.lua")

View File

@ -1,20 +0,0 @@
# About the license
This fork was made after NPX silently left the community circa 2016-2017.
NPX originally licensed their code under "GPLv3" , then later switched it to "LGPL" without specifying a version.
## Choice of new license
[The Free Software Foundation's license compatibility matrix][1] indicates:
* software licensed under any LGPL version can be redistributed under the GPLv3
* any `LGPLv2.1 or later` or `LGPLv3` can be redistributed under LGPLv3
Since we cannot have formal clarity on what verion of the LGPL was intended by NPX, this software fork is now being licensed under the terms of the GNU General Public License version 3.0.
## Intermediate commits
Intermediate commits of the code since abandonment indicated use of the LGPLv2.1-or-later license; this was inappropriate. Please avoid using copies of the code distributed prior to this new, clean relicensing.
[1]: https://www.gnu.org/licenses/gpl-faq.en.html#AllCompatibility

View File

@ -1,282 +0,0 @@
# textdomain: nssm
No stats for @1=
Kill stats for @1:=
See your kill stats, or that of other players=
Ant Queen=
Ant Worker=
Ice Teeth=
Black Duck=
Sky=
@1 Helmet=
@1 Chestplate=
@1 Leggings=
@1 Boots=
Pumpking Head=
Masticone Head=
Duck King Crown=
Masticone Crowned Head=
Snake Scute Chestplate=
@1 Shield=
Bloco=
Crocodile=
Duck=
Masticone=
Morlu=
Sand Bloco=
White Werewolf=
Sandworm=
Werewolf=
Rope=
Sun Sword=
Ant Sword=
Mantis Sword=
Masticone Fang Sword=
Night Sword=
Mantis Battleaxe=
Mantis Axe=
Duck Beak Pickaxe=
Ant Pickaxe=
Mantis Pickaxe=
Stoneater Pickaxe=
Little Ice Tooth Knife=
Manticore Spine Knife=
Felucco Knife=
Ant Shovel=
Duck Beak Shovel=
Ant Billhook=
Tarantula Warhammer=
Light Crab Mace=
Heavy Crab Mace=
@1 Sickle=
Felucco=
Ant=
@1 Bomb=
Duck Evocation=
Bloco Evocation=
Enderduck Evocation=
Flying Duck Evocation=
Swimming Duck Evocation=
Duckking Evocation=
Spiderduck Evocation=
Cobweb Bomb=
Ice Bomb=
Mantis Clay Bomb=
Lava Bomb=
Water Bomb=
Fire Bomb=
Mornar Bomb=
Hole Bomb=
Food Bomb=
Phoenix Fire Bomb=
Explosive Bomb=
Teleport Bomb=
Boom Bomb=
Smoke Bomb=
Thick Web Bomb=
Poison Bomb=
Cobblestone Bomb=
Fire Ring Bomb=
Cage Bomb=
Water Column Bomb=
Crab=
Sky Feather=
Snake Scute=
Eyed Tentacle=
Ant Queen's Abdomen=
Masticone Skull Fragments=
Kraken Tentacle=
Lava Titan Eye=
Digested Sand=
Black Ice Tooth=
Tarantula Fangs=
Crab Claw=
Cursed Pumpkin Seed=
Mantis Claw=
Manticore Fur=
Ant Husk=
Bloco Hide=
Crab Shell Fragment=
Crocodile Hide=
Manticore Spine=
Night Feather=
Sun Feather=
Duck Feather=
Black Duck Feather=
Masticone Fang=
White Wolf Fur=
Stoneater Mandible=
Ant Mandible=
Wolf Fur=
Felucco Fur=
Mantis Husk=
Sand Bloco Hide=
Sandworm Hide=
Sky Iron=
Black Powder=
Soarkly Dark Stone Dust=
Empty Summoning Bomb=
Greedy Soul Fragment=
Lustful Soul Fragment=
Wrathful Soul Fragment=
Proud Soul Fragment=
Slothful Soul Fragment=
Envious Soul Fragment=
Gluttonous Soul Fragment=
Gluttonous Moranga=
Envious Moranga=
Proud Moranga=
Slothful Moranga=
Lustful Moranga=
Wrathful Moranga=
Greedy Moranga=
Werewolf Leg=
Felucco Steak=
Roasted Felucco Steak=
Moonheron Leg=
Chichibio's Moonheron Leg=
Crocodile Tail=
Roasted Crocodile Tail=
Roasted_Werewolf Leg=
Duck Legs=
Roasted Duck Leg=
Ant Leg=
Roasted Ant Leg=
Spider Leg=
Roasted Spider Leg=
Brain=
Roasted Brain=
Tentacle=
Roasted Tentacle=
Worm Meat=
Roasted Worm=
Amphibian Heart=
Roasted Amphibian Heart=
Raw Scrausics Wing=
Spicy Scrausics Wing=
Phoenix Nuggets=
Phoenix Tear=
Frosted Amphibian Heart=
Surimi=
Amphibian Ribs=
Roasted Amphibian Ribs=
Dolidrosaurus Fin=
Roasted Dolidrosaurus Fin=
Larva Meat=
Larva Juice=
Larva Soup=
Mantis Meat=
Roasted Mantis=
Spider Meat=
Roasted Spider=
Silk Gland=
Roasted Silk Gland=
Super Silk Gland=
Roasted Super Silk Gland=
Cobweb String=
Dense Cobweb String=
Duck Beak=
Ice Tooth=
Little Ice Tooth=
Felucco Horn=
Dolidrosaurus=
Duck King=
Enderduck=
You have @1s of boost=
Life Energy=
Energy Globe=
Great Energy Globe=
Awesome Energy Globe=
Light Energy=
Giant Sandworm=
Ice Snake=
Mantis Larva=
Lava Titan=
Ant Dirt=
Dead leaves=
Invisible light source=
Venomous Gas=
Modders Block=
Web=
Thick Web=
Ink=
Mese Meteor=
Mese Dragon's Touch=
Phoenix Fire=
@1 Egg=
Stoneater=
Signosigno=
Duckking=
Spiderduck=
Icesnake=
Larva=
Moonheron=
Xgaloctopus=
Pumpking=
Large Pumpboom=
Small Pumpboom=
Medium Pumpboom=
Morvalar=
Mese Egg=
Morwa Statue=
Ant Soldier=
Black Widow=
Daddy Long Legs=
Echidna=
Flying Duck=
Icelamander=
Kraken=
Mantis Beast=
Mordain=
Morgut=
Morvy=
Night Master=
Tarantula=
Mese Dragon=
Moon Heron=
You do not have enough @1=
Axe of Pride=
energy sphere=
Gratuitousness Battleaxe=
energy globe=
Sword of Eagerness=
Falchion of Eagerness=
life energy=
You cannot go to that protected space!=
Sword of Envy=
Sword of Gluttony=
Death Scythe=
Morde=
Morgre=
Summon me ... when you are ready to fight ...=
Mor Valar=
Morbat I=
Morbat II=
Morbat III=
Morwa=
Mini Octopus=
Octopus=
Phoenix=
Pumpboom (@1)=
small=
medium=
large=
PumpKing=
Rainbow Staff=
Rainbow Tool=
Scrausics=
Signo-Signo=
Snow Biter=
Set spear stats modifier - default 1 (somewhat fast)=
Spear stat modifier set to @1=
@1 Spear=
Serenity=
Manticore=
Mantis=
Spider-duck=
Stone Eater=
Swimming Duck=
Uloboros=
Gret Wave Energy Release=
Destructo Disc=
Winding Energy Bullet=
Demon Air Beseiging Bullet (press Q to activate)=

69
mobs/albino_spider.lua Normal file
View File

@ -0,0 +1,69 @@
mobs:register_mob("nssm:albino_spider", {
type = "monster",
hp_max = 23,
hp_min = 17,
collisionbox = {-0.35, 0.00, -0.35, 0.35, 0.6, 0.35},
visual = "mesh",
mesh = "albino_spider.x",
textures = {{"albino_spider.png"}},
visual_size = {x=4, y=4},
makes_footstep_sound = false,
view_range = 22,
walk_velocity = 0.6,
fear_height = 3,
run_velocity = 3,
--[[sounds = {
random = "albino_spider",
},]]
damage = 3,
reach = 2,
jump = true,
drops = {
{name = "nssm:life_energy",
chance = 1,
min = 1,
max = 4,},
{name = "nssm:spider_leg",
chance = 2,
min = 1,
max = 8,},
{name = "nssm:silk_gland",
chance = 4,
min = 1,
max = 3,},
{name = "nssm:spider_meat",
chance = 4,
min = 1,
max = 2,},
},
armor = 70,
drawtype = "front",
water_damage = 2,
lava_damage = 14,
light_damage = 0,
group_attack=true,
attack_animals=true,
suffocation = 0,
knock_back=1,
blood_texture="nssm_blood_blue.png",
stepheight=1.1,
on_rightclick = nil,
attack_type = "dogfight",
animation = {
speed_normal = 20,
speed_run = 25,
stand_start = 1,
stand_end = 80,
walk_start = 120,
walk_end = 160,
run_start = 210,
run_end = 222,
punch_start = 80,
punch_end = 110,
die_start = 170,
die_end = 190,
},
--[[ do_custom = function(self)
webber_ability(self, "nssm:web", 2)
end,]]
})

View File

@ -2,42 +2,54 @@ mobs:register_mob("nssm:ant_queen", {
type = "monster",
hp_max = 220,
hp_min = 220,
collisionbox = {-0.6, 0.00, -0.6, 0.6, 1, 0.6},
collisionbox = {-0.4, 0.00, -0.4, 0.4, 0.6, 0.4},
visual = "mesh",
mesh = "ant_queen.x",
textures = {{"ant_queen.png"}},
visual_size = {x = 6, y = 6},
visual_size = {x=4, y=4},
makes_footstep_sound = true,
view_range = 30,
fear_height = 5,
walk_velocity = 1.5,
run_velocity = 2,
lifetimer = 300,
rotate = 270,
sounds = {
rotate = 270,
sounds = {
random = "ant",
attack = "ant"
attack = "ant",
},
damage = 4,
jump = true,
drops = {
{name = "nssm:life_energy", chance = 1, min = 5, max = 7},
{name = "nssm:ant_queen_abdomen", chance = 1, min = 1, max = 1},
{name = "nssm:ant_leg", chance = 2, min = 1, max = 6},
{name = "nssm:ant_mandible", chance = 3, min = 1, max = 2},
{name = "nssm:life_energy",
chance = 1,
min = 50,
max = 70,},
{name = "nssm:ant_queen_abdomen",
chance = 1,
min = 1,
max = 1,},
{name = "nssm:ant_leg",
chance = 2,
min = 1,
max = 6,},
{name = "nssm:ant_mandible",
chance = 3,
min = 1,
max = 2,},
},
reach = 8,
armor = 40,
drawtype = "front",
water_damage = 2,
lava_damage = 7,
fire_damage = 7,
lava_damage = 5,
light_damage = 0,
blood_texture = "nssm_blood_blue.png",
blood_amount = 50,
stepheight = 2.1,
knock_back = 0,
jump_height = 12,
blood_texture="nssm_blood_blue.png",
blood_amount=50,
stepheight=2.1,
knock_back=0,
jump_height=12,
on_rightclick = nil,
attack_type = "dogfight",
animation = {
speed_normal = 20,
@ -49,56 +61,49 @@ mobs:register_mob("nssm:ant_queen", {
run_start = 120,
run_end = 160,
punch_start = 170,
punch_end = 190
punch_end = 190,
die_start = 200,
die_end = 220,
},
custom_attack = function(self)
self.ant_queen_counter = (self.ant_queen_counter or 0) + 1
--attacks every 4 seconds
if self.ant_queen_counter == 4 then
self.ant_queen_counter = 0
local counter = 0
local s = self.object:get_pos()
local p = self.attack:get_pos()
local s = self.object:getpos()
local p = self.attack:getpos()
p.y = p.y + 1.5
s.y = s.y + 1.5
if mobs:line_of_sight(self, p, s) == true then
if line_of_sight_water(self, p, s) == true then
-- play attack sound
if self.sounds.attack then
minetest.sound_play(self.sounds.attack, {
object = self.object,
max_hear_distance = self.sounds.distance
}, true)
object = self.object,
max_hear_distance = self.sounds.distance
})
end
local pos1 = {
x = s.x + math.random(-3, 3),
y = s.y - 1,
z = s.z + math.random(-3, 3)
}
--determine where to add the mob
local pos1 = vector.subtract(p, s)
pos1 = vector.normalize(pos1)
pos1 = vector.add(s,vector.multiply(pos1,2))
local objects = minetest.get_objects_inside_radius(s, 10)
for _,obj in ipairs(objects) do
if (obj:get_luaentity()
and obj:get_luaentity().name == "nssm:ant_soldier") then
counter = counter + 1
local objects = minetest.env:get_objects_inside_radius(s, 10)
for _,obj in ipairs(objects) do
if (obj:get_luaentity() and obj:get_luaentity().name == "nssm:ant_soldier") then
counter = counter + 1
end
end
if pos1.x ~= s.x and pos1.z ~= s.z
and minetest.get_node(pos1).name == "air"
and counter < 4 then
nssm:explosion_particles(pos1, 1)
end
if ((pos1.x~=s.x) and (pos1.z~=s.z))
and (minetest.env:get_node(pos1).name == "air")
and (counter < 4)
then
explosion_particles(pos1, 1)
minetest.add_entity(pos1, "nssm:ant_soldier")
end
end

View File

@ -6,36 +6,48 @@ mobs:register_mob("nssm:ant_soldier", {
visual = "mesh",
mesh = "ant_soldier.x",
textures = {{"ant_soldier.png"}},
visual_size = {x = 3, y = 3},
visual_size = {x=3, y=3},
makes_footstep_sound = true,
view_range = 20,
view_range = 30,
fear_height = 4,
walk_velocity = 0.5,
run_velocity = 3,
rotate = 270,
sounds = {
random = "ant"
rotate = 270,
sounds = {
random = "ant",
},
damage = 6,
damage = 5,
jump = true,
drops = {
{name = "nssm:life_energy", chance = 1, min = 1, max = 2},
{name = "nssm:ant_leg", chance = 2, min = 1, max = 6},
{name = "nssm:ant_mandible", chance = 3, min = 1, max = 2},
{name = "nssm:ant_hard_skin", chance = 3, min = 1, max = 2}
{name = "nssm:life_energy",
chance = 1,
min = 1,
max = 2,},
{name = "nssm:ant_leg",
chance = 2,
min = 1,
max = 6,},
{name = "nssm:ant_mandible",
chance = 3,
min = 1,
max = 2,},
{name = "nssm:ant_hard_skin",
chance = 3,
min = 1,
max = 3,},
},
reach = 2,
armor = 70,
drawtype = "front",
water_damage = 2,
lava_damage = 7,
fire_damage = 7,
lava_damage = 10,
light_damage = 0,
group_attack = true,
attack_animals = false,
knock_back = 2,
blood_texture = "nssm_blood_blue.png",
stepheight = 1.1,
on_rightclick = nil,
group_attack=true,
attack_animals=false,
knock_back=1,
blood_texture="nssm_blood_blue.png",
stepheight=1.1,
attack_type = "dogfight",
animation = {
speed_normal = 20,
@ -47,6 +59,8 @@ mobs:register_mob("nssm:ant_soldier", {
run_start = 90,
run_end = 130,
punch_start = 60,
punch_end = 80
punch_end = 80,
die_start = 140,
die_end = 160,
}
})

View File

@ -1,41 +1,53 @@
mobs:register_mob("nssm:ant_worker", {
type = "monster",
passive = true,
hp_max = 24,
hp_min = 18,
hp_max = 15,
hp_min = 13,
collisionbox = {-0.4, 0.00, -0.4, 0.4, 0.5, 0.4},
visual = "mesh",
mesh = "ant_worker.x",
textures = {{"ant_worker.png"}},
visual_size = {x = 2, y = 2},
visual_size = {x=2, y=2},
makes_footstep_sound = true,
view_range = 20,
view_range = 15,
fear_height = 4,
walk_velocity = 0.5,
run_velocity = 2,
rotate = 270,
rotate = 270,
sounds = {
random = "ant"
random = "ant",
},
damage = 2,
reach = 2,
jump = true,
drops = {
{name = "nssm:life_energy", chance = 2, min = 1, max = 1},
{name = "nssm:ant_leg", chance = 2, min = 1, max = 6},
{name = "nssm:ant_mandible", chance = 3, min = 1, max = 2},
{name = "nssm:ant_hard_skin", chance = 3, min = 1, max = 2}
{name = "nssm:life_energy",
chance = 2,
min = 1,
max = 1,},
{name = "nssm:ant_leg",
chance = 2,
min = 1,
max = 6,},
{name = "nssm:ant_mandible",
chance = 3,
min = 1,
max = 2,},
{name = "nssm:ant_hard_skin",
chance = 3,
min = 1,
max = 2,},
},
armor = 70,
drawtype = "front",
water_damage = 2,
lava_damage = 7,
fire_damage = 7,
light_damage = 0,
group_attack = true,
knock_back = 4,
attack_animals = false,
blood_texture = "nssm_blood_blue.png",
on_rightclick = nil,
group_attack=true,
knock_back=4,
attack_animals=false,
blood_texture="nssm_blood_blue.png",
attack_type = "dogfight",
animation = {
speed_normal = 20,
@ -47,6 +59,8 @@ mobs:register_mob("nssm:ant_worker", {
run_start = 120,
run_end = 160,
punch_start = 50,
punch_end = 70
punch_end = 70,
die_start = 80,
die_end = 100,
}
})

83
mobs/berinhog.lua Normal file
View File

@ -0,0 +1,83 @@
mobs:register_mob("nssm:berinhog", {
type = "monster",
hp_max = 36,
hp_min = 27,
collisionbox = {-0.5, 0, -0.5, 0.5, 2.2, 0.5},
visual = "mesh",
mesh = "berinhog.x",
textures = {{"berinhog.png"}},
visual_size = {x=5, y=5},
makes_footstep_sound = true,
view_range = 18,
rotate=270,
walk_velocity = 1,
fear_height = 4,
run_velocity = 3.6,
sounds = {
random = "berinhog",
},
damage = 6,
jump = true,
drops = {
{name = "nssm:life_energy",
chance = 1,
min = 5,
max = 7},
--[[ {name = "nssm:berinhog_steak",
chance = 2,
min = 1,
max = 2},
{name = "nssm:berinhog_fur",
chance = 2,
min = 1,
max = 1},
{name = "nssm:berinhog_horn",
chance = 3,
min = 1,
max = 2},]]
},
armor = 70,
drawtype = "front",
water_damage = 0,
lava_damage = 15,
suffocation = 4,
reach=3,
light_damage = 0,
group_attack=true,
attack_animals=true,
knock_back=0,
blood_texture="nssm_blood.png",
stepheight=1.1,
on_rightclick = nil,
attack_type = "dogfight",
animation = {
speed_normal = 20,
speed_run = 20,
stand_start = 0,
stand_end = 40,
walk_start = 210,
walk_end = 250,
run_start = 140,
run_end = 160,
punch_start = 170,
punch_end = 200,
--speed_die = 10,
die_start = 110,
die_end = 130,
},
do_custom = function (self)
self.berinhog_timer = (self.berinhog_timer) or os.time()
if os.time() - self.berinhog_timer > 1 then
self.berinhog_timer = os.time()
local all_objects = minetest.get_objects_inside_radius(self.object:getpos(), 1)
local _,obj
for _,obj in ipairs(all_objects) do
if obj:is_player() then
obj:set_hp(obj:get_hp()-1)
elseif obj:get_luaentity() and obj:get_luaentity().health and obj:get_luaentity().name ~= self.object:get_luaentity().name then
obj:get_luaentity().health = obj:get_luaentity().health - 1
end
end
end
end
})

154
mobs/black_scorpion.lua Normal file
View File

@ -0,0 +1,154 @@
mobs:register_mob("nssm:black_scorpion", {
type = "monster",
hp_max = 45,
hp_min = 40,
docile_by_day = true,
collisionbox = {-0.3, 0.00, -0.3, 0.3, 0.6, 0.3},
visual = "mesh",
mesh = "scorpion.x",
textures = {{"scorpion.png"}},
visual_size = {x=7, y=7},
makes_footstep_sound = true,
view_range = 22,
walk_velocity = 1,
fear_height = 4,
run_velocity = 2.5,
--[[ sounds = {
random = "black_scorpion",
},]]
damage = 6,
reach = 4,
jump = true,
drops = {
{name = "nssm:life_energy",
chance = 1,
min = 1,
max = 8,},
},
armor = 50,
drawtype = "front",
follow = {"farming:wheat"},
water_damage = 2,
suffocation = 4,
lava_damage = 10,
light_damage = 0,
group_attack=false,
attack_animals=true,
blood_texture="nssm_blood_blue.png",
stepheight=1.1,
on_rightclick = nil,
-- double_melee_attack = true,
attack_type = "dogfight",
animation = {
speed_normal = 20,
speed_run = 30,
stand_start = 10,
stand_end = 60,
walk_start = 70,
walk_end = 110,
run_start = 70,
run_end = 110,
punch_start = 160,
punch_end = 180,
punch2_start = 120,
punch2_end = 150,
die_start = 190,
die_end = 210,
},
custom_attack = function (self)
if math.random(1,30) == 1 then
set_animation(self, "punch2")
self.attack:punch(self.object, 1.0, {
full_punch_interval = 1.0,
damage_groups = {fleshy = self.damage*10}
}, nil)
else
set_animation(self, "punch")
self.attack:punch(self.object, 1.0, {
full_punch_interval = 1.0,
damage_groups = {fleshy = self.damage}
}, nil)
end
end,
do_custom = function(self, dtime)
-- set needed values if not already present
if not self.v2 then
self.v2 = 0
self.max_speed_forward = 5
self.max_speed_reverse = 2
self.accel = 6
self.terrain_type = 3
self.driver_attach_at = {x = 0, y = 1.65, z = 0}
self.driver_eye_offset = {x = 0, y = -2, z = 0}
self.driver_scale = {x = 0.09, y = 0.09}
end
-- if driver present allow control of horse
if self.driver then
mobs.drive(self, "run", "stand", false, dtime)
return false -- skip rest of mob functions
end
return true
end,
on_die = function(self, pos)
-- drop saddle when horse is killed while riding
-- also detach from horse properly
if self.driver then
minetest.add_item(pos, "mobs:saddle")
mobs.detach(self.driver, {x = 1, y = 0, z = 1})
end
end,
on_rightclick = function(self, clicker)
-- make sure player is clicking
if not clicker or not clicker:is_player() then
return
end
-- feed, tame or heal horse
if mobs:feed_tame(self, clicker, 10, true, true) then
return
end
-- make sure tamed horse is being clicked by owner only
if self.tamed and self.owner == clicker:get_player_name() then
local inv = clicker:get_inventory()
-- detatch player already riding horse
if self.driver and clicker == self.driver then
mobs.detach(clicker, {x = 1, y = 0, z = 1})
-- add saddle back to inventory
if inv:room_for_item("main", "mobs:saddle") then
inv:add_item("main", "mobs:saddle")
else
minetest.add_item(clicker.getpos(), "mobs:saddle")
end
-- attach player to horse
elseif not self.driver
and clicker:get_wielded_item():get_name() == "mobs:saddle" then
self.object:set_properties({stepheight = 1.1})
mobs.attach(self, clicker)
-- take saddle from inventory
inv:remove_item("main", "mobs:saddle")
end
end
-- used to capture horse with magic lasso
mobs:capture_mob(self, clicker, 0, 0, 80, false, nil)
end
})

View File

@ -6,36 +6,49 @@ mobs:register_mob("nssm:black_widow", {
visual = "mesh",
mesh = "black_widow.x",
textures = {{"black_widow.png"}},
visual_size = {x = 2, y = 2},
visual_size = {x=2, y=2},
makes_footstep_sound = true,
view_range = 15,
fear_height = 4,
walk_velocity = 0.8,
run_velocity = 2.5,
rotate = 270,
sounds = {
random = "black_widow"
rotate = 270,
sounds = {
random = "black_widow",
},
damage = 4,
damage = 3,
reach = 2,
jump = true,
drops = {
{name = "nssm:life_energy", chance = 1, min = 1, max = 2},
{name = "nssm:spider_leg", chance = 3, min = 1, max = 8},
{name = "nssm:silk_gland", chance = 4, min = 1, max = 3},
{name = "nssm:spider_meat", chance = 4, min = 1, max = 2}
{name = "nssm:life_energy",
chance = 1,
min = 1,
max = 2,},
{name = "nssm:spider_leg",
chance = 3,
min = 1,
max = 8,},
{name = "nssm:silk_gland",
chance = 4,
min = 1,
max = 3,},
{name = "nssm:spider_meat",
chance = 4,
min = 1,
max = 2,},
},
armor = 70,
armor = 80,
drawtype = "front",
water_damage = 1,
lava_damage = 7,
fire_damage = 7,
group_attack = true,
attack_animals = true,
knock_back = 2,
blood_texture = "nssm_blood_blue.png",
stepheight = 1.1,
water_damage = 2,
lava_damage = 12,
suffocation = 4,
group_attack=true,
attack_animals=true,
knock_back=3,
blood_texture="nssm_blood_blue.png",
stepheight=1.1,
light_damage = 0,
on_rightclick = nil,
attack_type = "dogfight",
animation = {
speed_normal = 20,
@ -47,13 +60,11 @@ mobs:register_mob("nssm:black_widow", {
run_start = 120,
run_end = 140,
punch_start = 150,
punch_end = 160
punch_end = 160,
die_start = 170,
die_end = 190,
},
do_custom = function(self)
if nssm.spiders_litter_web then
nssm:webber_ability(self, "nssm:web", 2)
end
end
webber_ability(self, "nssm:web", 2)
end,
})

View File

@ -1,48 +1,51 @@
mobs:register_mob("nssm:bloco", {
type = "monster",
hp_max = 24,
hp_max = 16,
hp_min = 14,
collisionbox = {-0.56, -0.2, -0.56, 0.56, 1.2, 0.56},
collisionbox = {-0.5, 0, -0.5, 0.5, 1.2, 0.5},
visual = "mesh",
mesh = "bloco.x",
textures = {{"bloco.png"}},
visual_size = {x = 4, y = 4},
visual_size = {x=4, y=4},
makes_footstep_sound = true,
view_range = 8,
fear_height = 4,
walk_velocity = 0.6,
walk_velocity = 0.4,
run_velocity = 2.5,
rotate = 270,
sounds = {
random = "bloco"
rotate = 270,
sounds = {
random = "bloco",
},
damage = 4,
damage = 3,
reach = 2,
jump = true,
drops = {
{name = "nssm:life_energy", chance = 1, min = 1, max = 1},
{name = "default:stone", chance = 1, min = 2, max = 3},
{name = "nssm:bloco_skin", chance = 3, min = 1, max = 2}
{name = "nssm:life_energy",
chance = 1,
min = 1,
max = 2,},
{name = "default:stone",
chance = 1,
min = 2,
max = 3,},
{name = "nssm:bloco_skin",
chance = 3,
min = 1,
max = 2,},
},
armor = 40,
armor = 50,
drawtype = "front",
water_damage = 3,
water_damage = 5,
lava_damage = 1,
light_damage = 0,
fire_damage = 0,
group_attack = true,
attack_animals = true,
knock_back = 0,
blood_texture = "stone_blood.png",
immune_to = {
{"default:sword_stone", -2},
{"default:stone", -2},
{"default:cobble", -2},
{"default:axe_stone", -2},
{"default:shovel_stone", -2},
{"default:pick_stone", -2}
},
stepheight = 1.1,
group_attack=true,
attack_animals=true,
knock_back=0,
blood_texture="stone_blood.png",
--Bloco is immune to stone weapons
immune_to={{'default:sword_stone', -2},{'default:stone', -2}, {'default:cobble', -2}, {'default:axe_stone', -2}, {'default:shovel_stone', -2}, {'default:pick_stone', -2}},
stepheight=1.1,
on_rightclick = nil,
attack_type = "dogfight",
animation = {
speed_normal = 20,
@ -54,6 +57,8 @@ mobs:register_mob("nssm:bloco", {
run_start = 120,
run_end = 160,
punch_start = 170,
punch_end = 190
punch_end = 190,
die_start = 200,
die_end = 220,
}
})

57
mobs/chog.lua Normal file
View File

@ -0,0 +1,57 @@
mobs:register_mob("nssm:chog", {
type = "monster",
hp_max = 25,
hp_min = 21,
collisionbox = {-0.4, 0, -0.4, 0.4, 1.4, 0.4},
visual = "mesh",
mesh = "chog.x",
textures = {{"chog.png"}},
visual_size = {x=4, y=4},
makes_footstep_sound = true,
view_range = 13,
walk_velocity = 1,
rotate = 270,
fear_height = 4,
run_velocity = 3.5,
--[[sounds = {
random = "chog",
},]]
damage = 4,
jump = true,
drops = {
{name = "nssm:life_energy",
chance = 1,
min = 3,
max = 4},
},
armor = 100,
drawtype = "front",
water_damage = 0,
lava_damage = 15,
light_damage = 0,
suffocation = 6,
--group_attack=true,
--attack_animals=true,
knock_back=2,
blood_texture="nssm_blood.png",
stepheight=1.1,
on_rightclick = nil,
attack_type = "dogfight",
animation = {
speed_normal = 20,
speed_run = 20,
stand_start = 0,
stand_end = 50,
walk_start = 60,
walk_end = 100,
run_start = 110,
run_end = 130,
punch_start = 220,
punch_end = 240,
shoot_start =170,
shoot_end=210,
speed_die = 10,
die_start = 140,
die_end = 160,
},
})

View File

@ -1,18 +1,15 @@
mobs:register_mob("nssm:crab", {
type = "monster",
hp_max = 32,
hp_min = 19,
hp_max = 15,
hp_min = 13,
collisionbox = {-0.5, 0, -0.5, 0.5, 0.55, 0.5},
visual = "mesh",
mesh = "crab.x",
textures = {
{"crab1.png"},
{"crab2.png"}
textures = {{"crab1.png"},{"crab2.png"}},
sounds = {
random = "crab",
},
sounds = {
random = "crab"
},
visual_size = {x = 3, y = 3},
visual_size = {x=3, y=3},
makes_footstep_sound = true,
view_range = 7,
rotate = 270,
@ -24,22 +21,35 @@ mobs:register_mob("nssm:crab", {
floats = 0,
jump = true,
drops = {
{name = "nssm:life_energy", chance = 1, min = 1, max = 2},
{name = "nssm:surimi", chance = 1, min = 1, max = 2},
{name = "nssm:crab_chela", chance = 4, min = 1, max = 2},
{name = "nssm:crab_carapace_fragment", chance = 4, min = 1, max = 1}
{name = "nssm:life_energy",
chance = 1,
min = 1,
max = 2,},
{name = "nssm:surimi",
chance = 1,
min = 1,
max = 2,},
{name = "nssm:crab_chela",
chance = 5,
min = 1,
max = 2,},
{name = "nssm:crab_carapace_fragment",
chance = 4,
min = 1,
max = 1,},
},
armor = 40,
drawtype = "front",
water_damage = 0,
lava_damage = 10,
fire_damage = 10,
lava_damage = 15,
light_damage = 0,
group_attack = true,
attack_animals = true,
knock_back = 1,
blood_texture = "nssm_blood_blue.png",
stepheight = 1.1,
suffocation = 2,
group_attack=true,
attack_animals=false,
knock_back=1,
blood_texture="nssm_blood_blue.png",
stepheight=1.1,
on_rightclick = nil,
attack_type = "dogfight",
animation = {
speed_normal = 25,
@ -51,6 +61,8 @@ mobs:register_mob("nssm:crab", {
run_start = 120,
run_end = 140,
punch_start = 90,
punch_end = 110
punch_end = 110,
die_start = 150,
die_end = 170,
}
})

View File

@ -1,54 +0,0 @@
mobs:register_mob("nssm:crocodile", {
type = "monster",
hp_max = 30,
hp_min = 15,
collisionbox = {-0.45, -0.30, -0.45, 0.45, 0.3, 0.45},
visual = "mesh",
mesh = "crocodile.x",
textures = {
{"croco.png"}
},
sounds = {
random = "crocod",
},
visual_size = {x = 4, y = 4},
makes_footstep_sound = true,
view_range = 15,
walk_velocity = 1,
run_velocity = 1,
damage = 5,
floats = 1,
jump = true,
drops = {
{name = "nssm:life_energy", chance = 1, min = 1, max = 2},
{name = "nssm:crocodile_tail", chance = 2, min = 1, max = 1},
{name = "nssm:crocodile_skin", chance = 3, min = 1, max = 1}
},
armor = 60,
drawtype = "front",
reach = 2,
water_damage = 0,
lava_damage = 10,
fire_damage = 10,
light_damage = 0,
group_attack = true,
attack_animals = true,
knock_back = 3,
blood_texture = "nssm_blood.png",
stepheight = 1.1,
attack_type = "dogfight",
animation = {
speed_normal = 25,
speed_run = 25,
stand_start = 1,
stand_end = 80,
walk_start = 230,
walk_end = 270,
run_start = 230,
run_end = 270,
punch_start = 205,
punch_end = 220,
--swim_start = 100,
--swim_end = 140,
}
})

61
mobs/crystal_slug.lua Normal file
View File

@ -0,0 +1,61 @@
mobs:register_mob("nssm:crystal_slug", {
type = "monster",
hp_max = 13,
hp_min = 11,
collisionbox = {-0.3, 0, -0.3, 0.3, 0.4, 0.3},
visual = "mesh",
mesh = "crystal_slug.x",
textures = {{"crystal_slug.png"}},
visual_size = {x=4, y=4},
view_range = 30,
floats = 1,
rotate = 270,
group_attack=true,
attack_animals=false,
walk_velocity = 0.4,
run_velocity = 0.4,
-- fall_speed = 0,
stepheight = 1.1,
--[[ sounds = {
random = "crystal_slug",
distance = 45,
},]]
damage = 2,
jump = false,
drops = {
{name = "nssm:life_energy",
chance = 1,
min = 1,
max = 3,},
},
armor = 70,
drawtype = "front",
water_damage = 5,
lava_damage = 10,
light_damage = 0,
blood_texture="nssm_blood_blue.png",
blood_amount=10,
on_rightclick = nil,
attack_type = "shoot",
shoot_offset = 1,
arrow = "nssm:crystal_gas_arrow",
reach = 1,
shoot_interval = 4,
animation = {
speed_normal = 20,
speed_run = 20,
stand_start = 1,
stand_end = 60,
walk_start = 160,
walk_end = 190,
run_start = 160,
run_end = 190,
punch_start = 100,
punch_end = 150,
shoot_start = 100,
shoot_end = 150,
speed_die = 10,
die_start = 70,
die_end = 90,
}
})

View File

@ -1,41 +1,49 @@
mobs:register_mob("nssm:daddy_long_legs", {
type = "monster",
hp_max = 22,
hp_min = 16,
hp_max = 14,
hp_min = 12,
collisionbox = {-0.4, 0.00, -0.4, 0.4, 0.6, 0.4},
visual = "mesh",
mesh = "daddy_long_legs.x",
textures = {
{"daddy_long_legs.png"}
},
visual_size = {x = 8, y = 8},
textures = {{"daddy_long_legs.png"}},
visual_size = {x=8, y=8},
makes_footstep_sound = true,
view_range = 12,
walk_velocity = 0.7,
fear_height = 4,
run_velocity = 3.3,
rotate = 90,
sounds = {
random = "daddy"
rotate = 90,
sounds = {
random = "daddy",
},
damage = 3,
damage = 2,
jump = true,
drops = {
{name = "nssm:life_energy", chance = 1, min = 1, max = 2},
{name = "nssm:spider_leg", chance = 3, min = 1, max = 8},
{name = "nssm:spider_meat", chance = 4, min = 1, max = 2}
{name = "nssm:life_energy",
chance = 1,
min = 1,
max = 2,},
{name = "nssm:spider_leg",
chance = 3,
min = 1,
max = 8,},
{name = "nssm:spider_meat",
chance = 4,
min = 1,
max = 2,},
},
armor = 70,
drawtype = "front",
water_damage = 1,
lava_damage = 7,
fire_damage = 7,
water_damage = 3,
suffocation = 4,
lava_damage = 17,
light_damage = 0,
group_attack = true,
attack_animals = true,
knock_back = 2,
blood_texture = "nssm_blood_blue.png",
stepheight = 1.1,
group_attack=true,
attack_animals=false,
knock_back= 3,
blood_texture="nssm_blood_blue.png",
stepheight=1.1,
on_rightclick = nil,
attack_type = "dogfight",
animation = {
speed_normal = 20,
@ -47,6 +55,6 @@ mobs:register_mob("nssm:daddy_long_legs", {
run_start = 80,
run_end = 120,
punch_start = 140,
punch_end = 165
punch_end = 165,
}
})

View File

@ -1,3 +1,5 @@
--Remove?
mobs:register_mob("nssm:dolidrosaurus", {
type = "monster",
hp_max = 46,
@ -5,18 +7,12 @@ mobs:register_mob("nssm:dolidrosaurus", {
collisionbox = {-0.5, 0, -0.5, 0.5, 0.52, 0.5},
visual = "mesh",
mesh = "dolidrosaurus.x",
textures = {
{"dolidrosaurus1.png"},
{"dolidrosaurus2.png"},
{"dolidrosaurus3.png"},
{"dolidrosaurus4.png"},
{"dolidrosaurus5.png"}
},
visual_size = {x = 4, y = 4},
textures = {{"dolidrosaurus1.png"},{"dolidrosaurus2.png"},{"dolidrosaurus3.png"},{"dolidrosaurus4.png"},{"dolidrosaurus5.png"}},
visual_size = {x=4, y=4},
makes_footstep_sound = true,
view_range = 30,
fly = true,
fly_in = {"default:water_source", "default:water_flowing"},
fly_in = "default:water_source",
fall_speed = -20,
walk_velocity = 1.5,
run_velocity = 3.3,
@ -25,23 +21,28 @@ mobs:register_mob("nssm:dolidrosaurus", {
jump = false,
jump_chance = 0,
jump_height = 0,
sounds = {
random = "crocod"
sounds = {
random = "crocod",
},
drops = {
{name = "nssm:life_energy", chance = 1, min = 1, max = 3},
{name = "nssm:dolidrosaurus_fin", chance = 2, min = 1, max = 3}
{name = "nssm:life_energy",
chance = 1,
min = 1,
max = 3,},
{name = "nssm:dolidrosaurus_fin",
chance = 2,
min = 1,
max = 3,},
},
armor = 60,
drawtype = "front",
water_damage = 0,
lava_damage = 10,
fire_damage = 10,
light_damage = 0,
group_attack = true,
attack_animals = true,
knock_back = 3,
blood_texture = "nssm_blood.png",
group_attack=true,
attack_animals=true,
knock_back=3,
blood_texture="nssm_blood.png",
on_rightclick = nil,
attack_type = "dogfight",
animation = {
@ -54,6 +55,6 @@ mobs:register_mob("nssm:dolidrosaurus", {
run_start = 140,
run_end = 180,
punch_start = 190,
punch_end = 220
punch_end = 220,
}
})

View File

@ -1,42 +1,54 @@
mobs:register_mob("nssm:duck", {
type = "monster",
hp_max = 12,
hp_min = 7,
hp_max = 9,
hp_min = 8,
collisionbox = {-0.3, 0.00, -0.3, 0.3, 0.95, 0.3},
visual = "mesh",
mesh = "duck.x",
textures = {
{"duck.png"}
},
visual_size = {x = 2, y = 2},
textures = {{"duck.png"}},
visual_size = {x=2, y=2},
makes_footstep_sound = true,
view_range = 13,
walk_velocity = 1,
reach =1.5,
run_velocity = 2,
damage = 2,
damage = 1,
jump = true,
sounds = {
random = "duck"
jump_height = 4,
sounds = {
random = "duck",
},
drops = {
{name = "nssm:life_energy", chance = 1, min = 1, max = 1},
{name = "nssm:duck_legs", chance = 1, min = 1, max = 2},
{name = "nssm:duck_beak", chance = 5, min = 1, max = 1},
{name = "nssm:duck_feather", chance = 3, min = 2, max = 4}
{name = "nssm:life_energy",
chance = 1,
min = 1,
max = 1,},
{name = "nssm:duck_legs",
chance = 1,
min = 1,
max = 2,},
{name = "nssm:duck_beak",
chance = 5,
min = 1,
max = 1,},
{name = "nssm:duck_feather",
chance = 3,
min = 2,
max = 4,},
},
armor = 100,
drawtype = "front",
water_damage = 0,
fear_height = 5,
floats = 1,
lava_damage = 5,
fire_damage = 5,
lava_damage = 15,
light_damage = 0,
suffocation = 6,
group_attack = true,
attack_animals = true,
attack_animals = false,
knock_back = 5,
blood_texture = "nssm_blood.png",
blood_texture="nssm_blood.png",
on_rightclick = nil,
attack_type = "dogfight",
animation = {
speed_normal = 15,
@ -48,6 +60,7 @@ mobs:register_mob("nssm:duck", {
run_start = 20,
run_end = 40,
punch_start = 40,
punch_end = 60
}
punch_end = 60,
},
--pathfinding = 1,
})

View File

@ -1,17 +1,15 @@
mobs:register_mob("nssm:duckking", {
type = "monster",
hp_max = 180,
hp_min = 180,
collisionbox = {-1.2, -0.25, -1.2, 1.2, 4, 1.2},
hp_max = 200,
hp_min = 200,
collisionbox = {-0.6, -0.25, -0.6, 0.6, 2, 0.6},
visual = "mesh",
mesh = "king_duck.x",
textures = {
{"king_duck.png"}
},
visual_size = {x = 10, y = 10},
textures = {{"king_duck.png"}},
visual_size = {x=8, y=8},
lifetimer = 300,
makes_footstep_sound = true,
view_range = 30,
view_range = 35,
rotate = 270,
duck_father = true,
walk_velocity = 1,
@ -19,35 +17,50 @@ mobs:register_mob("nssm:duckking", {
run_velocity = 2,
damage = 8,
jump = true,
sounds = {
sounds = {
random = "duckking",
attack = "duckking"
attack = "duckking",
},
drops = {
{name = "nssm:life_energy", chance = 1, min = 7, max = 8},
{name = "nssm:duck_legs", chance = 1, min = 40, max = 50},
{name = "nssm:helmet_crown", chance = 1, min = 1, max = 1},
{name = "nssm:duck_beak", chance = 4, min = 10, max = 20},
{name = "nssm:duck_feather", chance = 3, min = 20, max = 40}
{name = "nssm:life_energy",
chance = 1,
min = 70,
max = 80,},
{name = "nssm:duck_legs",
chance = 1,
min = 40,
max = 50,},
{name = "nssm:helmet_crown",
chance = 1,
min = 1,
max = 1,},
{name = "nssm:duck_beak",
chance = 4,
min = 10,
max = 20,},
{name = "nssm:duck_feather",
chance = 3,
min = 20,
max = 40,},
},
armor = 50,
armor = 80,
drawtype = "front",
water_damage = 0,
floats = 1,
lava_damage = 5,
fire_damage = 5,
light_damage = 0,
on_rightclick = nil,
attack_type = "dogshoot",
dogshoot_switch = true,
dogshoot_count_max = 9,
dogshoot_count_max = 4,
blood_texture="nssm_blood.png",
blood_amount = 50,
stepheight = 2.1,
knock_back = 0,
jump_height = 12,
blood_amount=50,
stepheight=2.1,
knock_back=0,
jump_height=12,
arrow = "nssm:duck_father",
shoot_interval = 3,
shoot_offset = -1,
shoot_interval=3,
shoot_offset =-1,
animation = {
speed_normal = 15,
speed_run = 25,
@ -60,6 +73,6 @@ mobs:register_mob("nssm:duckking", {
punch_start = 190,
punch_end = 220,
shoot_start = 160,
shoot_end = 180
shoot_end = 180,
}
})

View File

@ -5,10 +5,8 @@ mobs:register_mob("nssm:echidna", {
collisionbox = {-0.6, 0.00, -0.6, 0.6, 2, 0.6},
visual = "mesh",
mesh = "echidna.x",
textures = {
{"echidnapes.png"}
},
visual_size = {x = 6, y = 6},
textures = {{"echidnapes.png"}},
visual_size = {x=6, y=6},
makes_footstep_sound = true,
view_range = 30,
rotate = 270,
@ -18,30 +16,37 @@ mobs:register_mob("nssm:echidna", {
run_velocity = 3.5,
damage = 12,
jump = true,
sounds = {
random = "echidna"
sounds = {
random = "echidna",
},
drops = {
{name = "nssm:life_energy", chance = 1, min = 6, max = 7},
{name = "nssm:snake_scute", chance = 1, min = 1, max = 1}
{name = "nssm:life_energy",
chance = 1,
min = 90,
max = 120,},
{name = "nssm:snake_scute",
chance = 1,
min = 1,
max = 1,},
},
armor = 40,
drawtype = "front",
water_damage = 0,
floats = 1,
lava_damage = 0,
fire_damage = 0,
suffocation = 0,
light_damage = 0,
blood_texture = "nssm_blood.png",
blood_amount = 10,
stepheight = 1.1,
knock_back = 0,
jump_height = 8,
blood_texture="nssm_blood.png",
blood_amount=10,
stepheight=1.1,
knock_back=0,
jump_height=8,
on_rightclick = nil,
attack_type = "dogshoot",
dogshoot_switch = true,
arrow = "nssm:super_gas",
arrow = "nssm:super_gas";
reach = 5,
shoot_interval = 3,
shoot_interval=3,
animation = {
speed_normal = 15,
speed_run = 25,
@ -54,6 +59,6 @@ mobs:register_mob("nssm:echidna", {
punch_start = 160,
punch_end = 190,
shoot_start = 200,
shoot_end = 240
shoot_end = 240,
}
})

View File

@ -1,45 +1,56 @@
mobs:register_mob("nssm:enderduck", {
type = "monster",
hp_max = 28,
hp_min = 18,
docile_by_day = true,
hp_max = 18,
hp_min = 16,
collisionbox = {-0.28, 0.00, -0.28, 0.28, 1.8, 0.28},
visual = "mesh",
mesh = "enderduck.x",
textures = {
{"enderduck.png"}
},
visual_size = {x = 2, y = 2},
textures = {{"enderduck.png"}},
visual_size = {x=2, y=2},
makes_footstep_sound = true,
view_range = 25,
view_range = 35,
walk_velocity = 3,
fear_height = 4,
run_velocity = 3.9,
rotate = 270,
sounds = {
random = "duck"
sounds = {
random = "duck",
},
damage = 5,
damage = 4,
reach = 2,
jump = true,
drops = {
{name = "nssm:life_energy", chance = 1, min = 1, max = 2},
{name = "nssm:duck_legs", chance = 1, min = 1, max = 2},
{name = "nssm:black_duck_feather", chance = 3, min = 1, max = 4},
{name = "nssm:duck_beak", chance = 5, min = 1, max = 1}
{name = "nssm:life_energy",
chance = 1,
min = 1,
max = 2},
{name = "nssm:duck_legs",
chance = 1,
min = 1,
max = 2},
{name = "nssm:black_duck_feather",
chance = 3,
min = 1,
max = 4,},
{name = "nssm:duck_beak",
chance = 5,
min = 1,
max = 1,},
},
armor = 80,
drawtype = "front",
water_damage = 1,
floats = 1,
floats=1,
lava_damage = 5,
light_damage = 0,
fire_damage = 4,
group_attack = true,
attack_animals = true,
knock_back = 4,
blood_texture = "nssm_blood.png",
jump_height = 12,
stepheight = 2.1,
group_attack=true,
attack_animals= false,
knock_back=3,
blood_texture="nssm_blood.png",
jump_height=12,
stepheight=2.1,
on_rightclick = nil,
attack_type = "dogfight",
animation = {
speed_normal = 15,
@ -50,7 +61,8 @@ mobs:register_mob("nssm:enderduck", {
walk_end = 130,
run_start = 100,
run_end = 130,
speed_punch = 25,
punch_start = 60,
punch_end = 90
punch_end = 90,
}
})

View File

@ -5,37 +5,50 @@ mobs:register_mob("nssm:felucco", {
collisionbox = {-0.5, 0, -0.5, 0.5, 1.2, 0.5},
visual = "mesh",
mesh = "felucco.x",
textures = {
{"felucco.png"}
},
visual_size = {x = 7, y = 7},
textures = {{"felucco.png"}},
visual_size = {x=7, y=7},
makes_footstep_sound = true,
view_range = 30,
walk_velocity = 1,
fear_height = 4,
run_velocity = 5,
rotate = 90,
run_velocity = 4,
specific_attack = {"player", "nssm:kele"},
sounds = {
random = "felucco"
random = "felucco",
},
damage = 5,
jump = true,
drops = {
{name = "nssm:life_energy", chance = 1, min = 3, max = 4},
{name = "nssm:felucco_steak", chance = 2, min = 1, max = 2},
{name = "nssm:felucco_fur", chance = 2, min = 1, max = 1},
{name = "nssm:felucco_horn", chance = 3, min = 1, max = 2}
},
armor = 70,
{name = "nssm:life_energy",
chance = 1,
min = 8,
max = 12},
{name = "nssm:felucco_steak",
chance = 2,
min = 1,
max = 2},
{name = "nssm:felucco_fur",
chance = 2,
min = 1,
max = 1},
{name = "nssm:felucco_horn",
chance = 3,
min = 1,
max = 2},
},
armor = 60,
drawtype = "front",
water_damage = 2,
lava_damage = 5,
fire_damage = 5,
water_damage = 0,
lava_damage = 15,
light_damage = 0,
group_attack = true,
attack_animals = true,
knock_back = 2,
blood_texture = "nssm_blood.png",
stepheight = 1.1,
suffocation = 4,
-- group_attack=true,
-- attack_animals=true,
knock_back=1,
blood_texture="nssm_blood.png",
stepheight=1.1,
on_rightclick = nil,
attack_type = "dogfight",
animation = {
speed_normal = 15,
@ -47,6 +60,8 @@ mobs:register_mob("nssm:felucco", {
run_start = 140,
run_end = 160,
punch_start = 200,
punch_end = 240
}
punch_end = 240,
die_start = 250,
die_end = 260,
}
})

56
mobs/flust.lua Normal file
View File

@ -0,0 +1,56 @@
mobs:register_mob("nssm:flust", {
type = "monster",
hp_max = 27,
hp_min = 23,
collisionbox = {-0.35, 0, -0.35, 0.35, 1, 0.35},
visual = "mesh",
mesh = "flust.x",
textures = {{"flust.png"}},
visual_size = {x=6, y=6},
makes_footstep_sound = true,
view_range = 16,
fear_height = 4,
walk_velocity = 0.8,
run_velocity = 2.4,
--[[sounds = {
random = "flust",
},]]
damage = 4,
reach = 4,
jump = true,
drops = {
{name = "nssm:life_energy",
chance = 1,
min = 1,
max = 1,},
},
armor = 50,
drawtype = "front",
water_damage = 8,
lava_damage = 8,
light_damage = 0,
suffocation = 4,
group_attack=true,
attack_animals= false,
knock_back=1,
blood_texture="nssm_blood_blue.png",
--Flust is immune to iron weapons
immune_to={{'default:sword_iron', -6},{'default:iron_lump', -8}, {'default:steel_block', -20}, {'default:axe_iron', -4}, {'default:shovel_iron', -4}, {'default:pick_iron', -6}},
stepheight=2.1,
on_rightclick = nil,
attack_type = "dogfight",
animation = {
speed_normal = 20,
speed_run = 40,
stand_start = 10,
stand_end = 60,
walk_start = 140,
walk_end = 180,
run_start = 140,
run_end = 180,
punch_start = 100,
punch_end = 130,
die_start = 70,
die_end = 90,
}
})

View File

@ -1,42 +1,53 @@
mobs:register_mob("nssm:flying_duck", {
type = "monster",
hp_max = 20,
hp_max = 13,
hp_min = 10,
collisionbox = {-0.3, -0.2, -0.3, 0.3, 0.2, 0.3},
visual = "mesh",
mesh = "flying_duck.x",
textures = {
{"flying_duck.png"}
},
visual_size = {x = 1, y = 1},
mesh = "nathan_petrelli.x",
textures = {{"nathan_petrelli.png"}},
visual_size = {x=1, y=1},
view_range = 30,
walk_velocity = 2,
run_velocity = 2.5,
fall_speed = 0,
stepheight = 3,
fall_speed = 0,
stepheight = 3,
sounds = {
random = "duck"
random = "duck",
},
damage = 3,
damage = 2,
reach = 2,
jump = true,
drops = {
{name = "nssm:life_energy", chance = 1, min = 1, max = 2},
{name = "nssm:duck_legs", chance = 2, min = 1, max = 2},
{name = "nssm:duck_beak", chance = 5, min = 1, max = 1},
{name = "nssm:duck_feather", chance = 2, min = 4, max = 8}
{name = "nssm:life_energy",
chance = 1,
min = 1,
max = 2,},
{name = "nssm:duck_legs",
chance = 2,
min = 1,
max = 2,},
{name = "nssm:duck_beak",
chance = 5,
min = 1,
max = 1,},
{name = "nssm:duck_feather",
chance = 2,
min = 4,
max = 8,},
},
armor = 80,
armor = 100,
drawtype = "front",
water_damage = 0,
lava_damage = 5,
fire_damage = 5,
lava_damage = 15,
light_damage = 0,
group_attack = true,
attack_animals = true,
knock_back = 5,
blood_texture = "nssm_blood.png",
fly = true,
suffocation = 4,
group_attack=true,
attack_animals=true,
knock_back=5,
blood_texture="nssm_blood.png",
on_rightclick = nil,
fly = true,
attack_type = "dogfight",
animation = {
speed_normal = 25,
@ -48,6 +59,6 @@ mobs:register_mob("nssm:flying_duck", {
run_start = 160,
run_end = 220,
punch_start = 110,
punch_end = 140
punch_end = 140,
}
})

View File

@ -5,10 +5,8 @@ mobs:register_mob("nssm:giant_sandworm", {
collisionbox = {-1.2, 0, -1.2, 1.2, 4.5, 1.2},
visual = "mesh",
mesh = "giant_sandworm.x",
textures = {
{"sandworm.png"}
},
visual_size = {x = 13, y = 13},
textures = {{"sandworm.png"}},
visual_size = {x=13, y=13},
makes_footstep_sound = false,
view_range = 9,
rotate = 270,
@ -18,32 +16,46 @@ mobs:register_mob("nssm:giant_sandworm", {
damage = 12,
jump = false,
drops = {
{name = "nssm:worm_flesh", chance = 1, min = 20, max = 30},
{name = "nssm:sandworm_skin", chance = 2, min = 3, max = 12},
{name = "nssm:life_energy", chance = 1, min = 7, max = 8},
{name = "nssm:digested_sand", chance = 1, min = 1, max = 1}
{name = "nssm:worm_flesh",
chance = 1,
min = 20,
max = 30,},
{name = "nssm:sandworm_skin",
chance = 1,
min = 12,
max = 46,},
{name = "nssm:life_energy",
chance = 1,
min = 70,
max = 80,},
{name = "nssm:digested_sand",
chance = 1,
min = 1,
max = 1,},
},
armor = 40,
drawtype = "front",
water_damage = 5,
lava_damage = 3,
light_damage = 0,
fire_damage = 0,
blood_texture = "nssm_blood_blue.png",
blood_amount = 50,
knock_back = 0,
jump_height = 0,
blood_texture="nssm_blood_blue.png",
blood_amount=50,
knock_back=0,
jump_height=0,
on_rightclick = nil,
attack_type = "dogfight",
animation = {
speed_normal = 25,
speed_run = 40,
stand_start = 1,
stand_end = 100,
walk_start = 110,
walk_end = 140,
run_start = 110,
run_end = 140,
walk_start = 100,
walk_end = 110,
run_start = 100,
run_end = 110,
punch_start = 150,
punch_end = 180
}
punch_end = 180,
die_start = 120,
die_end = 140,
},
})

View File

@ -1,50 +1,64 @@
mobs:register_mob("nssm:icelamander", {
type = "monster",
hp_max = 230,
hp_min = 230,
hp_max = 190,
hp_min = 190,
collisionbox = {-0.5, 0, -0.5, 0.5, 2.3, 0.5},
visual = "mesh",
mesh = "icelamander.x",
textures = {
{"icelamander.png"}
},
visual_size = {x = 4, y = 4},
textures = {{"snow_biter.png"}},
visual_size = {x=5, y=5},
makes_footstep_sound = true,
view_range = 35,
view_range = 25,
lifetimer = 500,
fear_height = 4,
walk_velocity = 2,
run_velocity = 4,
sounds = {
random = "icelamander"
walk_velocity = 0.8,
run_velocity = 3,
sounds = {
random = "icelamander",
},
damage = 12,
jump = true,
drops = {
{name = "nssm:life_energy", chance = 1, min = 6, max = 8},
{name = "nssm:frosted_amphibian_heart", chance = 1, min = 1, max = 1},
{name = "nssm:ice_tooth", chance = 1, min = 1, max = 1},
{name = "nssm:little_ice_tooth", chance = 1, min = 0, max = 20},
{name = "nssm:amphibian_ribs", chance = 2, min = 1, max = 1}
},
{name = "nssm:life_energy",
chance = 1,
min = 60,
max = 80},
{name = "nssm:frosted_amphibian_heart",
chance = 1,
min = 1,
max = 1},
{name = "nssm:ice_tooth",
chance = 1,
min = 1,
max = 1},
{name = "nssm:little_ice_tooth",
chance = 1,
min = 0,
max = 20},
{name = "nssm:amphibian_ribs",
chance = 2,
min = 1,
max = 1},
},
armor = 40,
drawtype = "front",
water_damage = 0,
lava_damage = 30,
fire_damage = 20,
light_damage = 0,
suffocation = 0,
on_rightclick = nil,
attack_type = "dogshoot",
dogshoot_switch = true,
blood_texture = "nssm_blood.png",
blood_amount = 20,
stepheight = 1.1,
knock_back = 0,
jump_height = 8,
blood_texture="nssm_blood.png",
blood_amount=20,
stepheight=1.1,
knock_back=0,
jump_height=8,
dogshoot_count_max = 7,
arrow = "nssm:snow_arrow",
shoot_interval = 2,
animation = {
speed_normal = 15,
speed_normal = 20,
speed_run = 25,
stand_start = 1,
stand_end = 40,
@ -55,10 +69,11 @@ mobs:register_mob("nssm:icelamander", {
punch_start = 160,
punch_end = 190,
shoot_start = 190,
shoot_end = 210
shoot_end = 210,
die_start = 220,
die_end = 240,
},
do_custom = function(self)
nssm:midas_ability(self, "default:ice", self.run_velocity, 1, 3)
end
midas_ability(self, "default:ice", self.run_velocity,1, 3)
end,
})

83
mobs/icelizard.lua Normal file
View File

@ -0,0 +1,83 @@
mobs:register_mob("nssm:icelizard", {
type = "monster",
hp_max = 15,
hp_min = 13,
collisionbox = {-0.5, 0, -0.5, 0.5, 0.60, 0.5},
visual = "mesh",
mesh = "icelizard.x",
textures = {{"snow_biter.png"}},
visual_size = {x=9, y=9},
makes_footstep_sound = true,
view_range = 30,
rotate = 270,
mele_number = 2,
fear_height = 4,
reach = 1.5,
walk_velocity = 0.8,
run_velocity = 3.5,
sounds = {
random = "snow_biter",
},
--pathfinding = true,
damage = 4,
jump = true,
drops = {
{name = "nssm:life_energy",
chance = 1,
min = 2,
max = 3},
{name = "nssm:frosted_amphibian_heart",
chance = 2,
min = 1,
max = 1},
{name = "nssm:amphibian_ribs",
chance = 2,
min = 1,
max = 1},
{name = "nssm:little_ice_tooth",
chance = 2,
min = 0,
max = 4},
},
armor = 80,
drawtype = "front",
water_damage = 0,
lava_damage = 30,
light_damage = 0,
suffocation = 4,
group_attack = true,
attack_animals = false,
knock_back = 2,
blood_texture="nssm_blood.png",
stepheight=1.1,
on_rightclick = nil,
attack_type = "dogfight",
die_anim = true,
animation = {
speed_normal = 20,
speed_run = 40,
speed_punch = 5,
stand_start = 0,
stand_end = 80,
walk_start = 110,
walk_end = 150,
run_start = 110,
run_end = 150,
die_start = 80,
die_end = 100,
punch_start = 160,
punch_end = 170,
},
custom_attack = function(self)
self.icelizard_timer = self.icelizard_timer or os.time()
set_animation(self, "punch")
if (os.time()-self.icelizard_timer) > 0.9 then
local pos = self.object:getpos()
tnt_boom_nssm(pos, {damage_radius=0,radius=2,ignore_protection=false},"nssm:coldest_ice", false)
self.object:remove()
end
end,
do_custom = function(self)
putting_ability(self, "default:ice", self.run_velocity)
end,
})

View File

@ -1,46 +1,57 @@
mobs:register_mob("nssm:icesnake", {
type = "monster",
hp_max = 27,
hp_max = 23,
hp_min = 17,
collisionbox = {-0.7, 0, -0.7, 0.7, 0.50, 0.7},
visual = "mesh",
mesh = "icesnake.x",
textures = {
{"icesnake.png"}
},
visual_size = {x = 7, y = 7},
textures = {{"snow_biter.png"}},
visual_size = {x=7, y=7},
makes_footstep_sound = false,
view_range = 10,
rotate = 270,
fear_height = 3,
walk_velocity = 1.2,
run_velocity = 3,
sounds = {
random = "icesnake"
sounds = {
random = "icesnake",
},
damage = 4,
reach = 2,
jump = true,
drops = {
{name = "nssm:life_energy", chance = 1, min = 1, max = 2},
{name = "nssm:frosted_amphibian_heart", chance = 2, min = 1, max = 1},
{name = "nssm:little_ice_tooth", chance = 2, min = 0, max = 4},
{name = "nssm:amphibian_ribs", chance = 2, min = 1, max = 3}
},
{name = "nssm:life_energy",
chance = 1,
min = 1,
max = 3},
{name = "nssm:frosted_amphibian_heart",
chance = 2,
min = 1,
max = 1},
{name = "nssm:little_ice_tooth",
chance = 2,
min = 0,
max = 4},
{name = "nssm:amphibian_ribs",
chance = 2,
min = 1,
max = 3},
},
armor = 70,
drawtype = "front",
water_damage = 0,
lava_damage = 20,
fire_damage = 15,
light_damage = 0,
group_attack = true,
attack_animals = true,
knock_back = 2,
blood_texture = "nssm_blood.png",
stepheight = 1.1,
suffocation = 4,
group_attack=true,
attack_animals=true,
knock_back=2,
blood_texture="nssm_blood.png",
stepheight=1.1,
on_rightclick = nil,
attack_type = "dogfight",
animation = {
speed_normal = 15,
speed_normal = 20,
speed_run = 25,
stand_start = 170,
stand_end = 220,
@ -49,10 +60,11 @@ mobs:register_mob("nssm:icesnake", {
run_start = 80,
run_end = 120,
punch_start = 130,
punch_end = 160
punch_end = 160,
die_start = 230,
die_end = 250,
},
do_custom = function(self)
nssm:putting_ability(self, "default:ice", self.run_velocity)
end
putting_ability(self, "default:ice", self.run_velocity)
end,
})

87
mobs/kele.lua Normal file
View File

@ -0,0 +1,87 @@
mobs:register_mob("nssm:kele", {
type = "monster",
hp_max = 36,
hp_min = 27,
collisionbox = {-0.4, 0, -0.4, 0.4, 2, 0.4},
visual = "mesh",
mesh = "kele.x",
textures = {{"kele.png"}},
visual_size = {x=5, y=5},
makes_footstep_sound = true,
view_range = 30,
walk_velocity = 1,
rotate = 270,
fear_height = 4,
run_velocity = 5,
--[[sounds = {
random = "kele",
},]]
damage = 4,
jump = true,
drops = {
{name = "nssm:life_energy",
chance = 1,
min = 3,
max = 4},
},
armor = 60,
drawtype = "front",
water_damage = 0,
lava_damage = 15,
light_damage = 0,
suffocation = 4,
--group_attack=true,
--attack_animals=true,
knock_back = 1,
blood_texture="nssm_blood.png",
stepheight=2.1,
on_rightclick = nil,
attack_type = "dogfight",
specific_attack = {"player", "nssm:felucco"},
animation = {
speed_normal = 20,
speed_run = 25,
stand_start = 200,
stand_end = 250,
walk_start = 40,
walk_end = 80,
run_start = 10,
run_end = 30,
punch_start = 130,
punch_end = 160,
punch2_start = 90,
punch2_end = 120,
die_start = 170,
die_end = 190,
},
custom_attack = function (self)
self.kele_timer = (self.kele_timer or os.time())
if (os.time() - self.kele_timer) > 1 then
self.kele_timer = os.time()
local s = self.object:getpos()
local p = self.attack:getpos()
if minetest.line_of_sight({x = p.x, y = p.y +1.5, z = p.z}, {x = s.x, y = s.y +1.5, z = s.z}) == true then
if self.health > 10 then
set_animation(self, "punch")
else
set_animation(self, "punch2")
self.health = self.health + (self.damage*2)
end
-- play attack sound
if self.sounds.attack then
minetest.sound_play(self.sounds.attack, {
object = self.object,
max_hear_distance = self.sounds.distance
})
end
-- punch player
self.attack:punch(self.object, 1.0, {
full_punch_interval=1.0,
damage_groups = {fleshy=self.damage}
}, nil)
end
end
end,
})

View File

@ -5,16 +5,13 @@ mobs:register_mob("nssm:kraken", {
collisionbox = {-2, 0, -2, 2, 4, 2},
visual = "mesh",
mesh = "kraken.x",
textures = {
{"kraken.png"},
{"kraken2.png"}
},
visual_size = {x = 15, y = 15},
textures = {{"kraken.png"}, {"kraken2.png"}},
visual_size = {x=15, y=15},
lifetimer=500,
inker = false,
view_range = 50,
fly = true,
fly_in = {"default:water_source", "default:water_flowing"},
fly_in = "default:water_source",
fall_speed = -1,
walk_velocity = 3.5,
run_velocity = 4.5,
@ -23,25 +20,34 @@ mobs:register_mob("nssm:kraken", {
jump = false,
jump_chance = 0,
jump_height = 0,
sounds = {
random = "kraken"
sounds = {
random = "kraken",
},
drops = {
{name = "nssm:life_energy", chance = 1, min = 6, max = 7},
{name = "nssm:tentacle", chance = 1, min = 30, max = 40},
{name = "nssm:tentacle_curly", chance = 1, min = 1, max = 1}
{name = "nssm:life_energy",
chance = 1,
min = 80,
max = 90,},
{name = "nssm:tentacle",
chance = 1,
min = 50,
max = 80,},
{name = "nssm:tentacle_curly",
chance = 1,
min = 1,
max = 1,},
},
armor = 50,
drawtype = "front",
water_damage = 0,
lava_damage = 10,
fire_damage = 10,
light_damage = 0,
blood_texture = "nssm_blood_blue.png",
blood_amount = 100,
knock_back = 0,
blood_texture="nssm_blood_blue.png",
blood_amount=100,
knock_back=0,
on_rightclick = nil,
attack_type = "dogfight",
reach = 8,
reach=8,
animation = {
speed_normal = 20,
speed_run = 30,
@ -52,6 +58,6 @@ mobs:register_mob("nssm:kraken", {
run_start = 60,
run_end = 100,
punch_start = 120,
punch_end = 150
punch_end = 150,
}
})

View File

@ -5,37 +5,42 @@ mobs:register_mob("nssm:larva", {
collisionbox = {-0.3, 0, -0.3, 0.3, 0.41, 0.3},
visual = "mesh",
mesh = "larva.x",
textures = {
{"larva.png"}
},
visual_size = {x = 3, y = 3},
textures = {{"larva.png"}},
visual_size = {x=3, y=3},
makes_footstep_sound = false,
view_range = 10,
rotate = 90,
jump = false,
fear_height = 4,
jump_height = 0,
jump_height =0,
walk_velocity = 0.4,
run_velocity = 0.4,
sounds = {
random = "sand"
sounds = {
random = "sand",
},
damage = 1,
reach = 1,
drops = {
{name = "nssm:life_energy", chance = 3, min = 1, max = 1},
{name = "nssm:larva_meat", chance = 2, min = 1, max = 2}
{name = "nssm:life_energy",
chance = 3,
min = 1,
max = 1,},
{name = "nssm:larva_meat",
chance = 2,
min = 1,
max = 2,},
},
armor = 80,
armor = 100,
drawtype = "front",
water_damage = 2,
lava_damage = 4,
fire_damage = 4,
lava_damage = 14,
light_damage = 0,
group_attack = true,
attack_animals = true,
knock_back = 2,
blood_texture = "nssm_blood_blue.png",
suffocation = 4,
group_attack=true,
attack_animals= false,
knock_back=2,
blood_texture="nssm_blood_blue.png",
on_rightclick = nil,
attack_type = "dogfight",
animation = {
speed_normal = 20,
@ -47,44 +52,35 @@ mobs:register_mob("nssm:larva", {
run_start = 100,
run_end = 160,
punch_start = 180,
punch_end = 230
punch_end = 230,
die_start = 240,
die_end = 260,
},
do_custom = function (self)
self.metatimer = self.metatimer or os.time()
if os.time() - self.metatimer > 20 then
minetest.log("action", "metatimer expired, metamorphosis!")
local pos = self.object:get_pos()
self.metatimer = (self.metatimer) or os.time()
if os.time() - self.metatimer >20 then
minetest.log("action",
"metatimer expired, metamorphosis! ")
local pos=self.object:getpos()
self.object:remove()
minetest.add_particlespawner(
200, --amount
0.1, --time
{x=pos.x-1, y=pos.y-1, z=pos.z-1}, --minpos
{x=pos.x+1, y=pos.y+1, z=pos.z+1}, --maxpos
{x=-0, y=-0, z=-0}, --minvel
{x=1, y=1, z=1}, --maxvel
{x=-0.5,y=5,z=-0.5}, --minacc
{x=0.5,y=5,z=0.5}, --maxacc
0.1, --minexptime
1, --maxexptime
3, --minsize
4, --maxsize
false, --collisiondetection
"tnt_smoke.png" --texture
)
minetest.add_particlespawner({
amount = 200,
time = 0.1,
minpos = {x = pos.x - 1, y = pos.y - 1, z = pos.z - 1},
maxpos = {x = pos.x + 1, y = pos.y + 1, z = pos.z + 1},
minvel = {x = -0, y = -0, z = -0},
maxvel = {x = 1, y = 1, z = 1},
minacc = {x = -0.5, y = 5, z = -0.5},
maxacc = {x = 0.5, y = 5, z = 0.5},
minexptime = 0.1,
maxexptime = 1,
minsize = 3,
maxsize = 4,
collisiondetection = false,
texture = "tnt_smoke.png"
})
if math.random(2) == 1 then
minetest.add_entity(pos, "nssm:mantis")
else
minetest.add_entity(pos, "nssm:mantis_beast")
end
minetest.add_entity(pos, "nssm:mantis")
return
end
end

View File

@ -5,44 +5,67 @@ mobs:register_mob("nssm:lava_titan", {
collisionbox = {-0.45, -0.05, -0.45, 0.45, 1.8, 0.45},
visual = "mesh",
mesh = "lava_titan.x",
textures = {
{"lava_titan.png"}
},
visual_size = {x = 2.7, y = 2.7},
textures = {{"lava_titan.png"}},
visual_size = {x=2.7, y=2.7},
makes_footstep_sound = true,
view_range = 20,
fear_height = 4,
lifetimer = 500,
walk_velocity = 0.5,
walk_velocity = 0.3,
run_velocity = 1.3,
floats = 1,
sounds = {
random = "lava_titan"
random = "lava_titan",
},
damage = 8,
jump = false,
jump_height = 0,
jump_height=0,
drops = {
{name = "nssm:life_energy", chance = 1, min = 7, max = 9},
{name = "nssm:lava_titan_eye", chance = 1, min = 1, max = 1},
{name = "bucket:bucket_lava", chance = 2, min = 1, max = 3}
{name = "nssm:life_energy",
chance = 1,
min = 90,
max = 100,},
{name = "nssm:lava_titan_eye",
chance = 1,
min = 1,
max = 1,},
{name = "bucket:bucket_lava",
chance = 2,
min = 1,
max = 3,},
},
armor = 20,
drawtype = "front",
water_damage = 25,
rotate = 270,
rotate = 270,
light_damage = 0,
lava_damage = 0,
fire_damage = 0,
on_rightclick = nil,
floats = 0,
blood_texture = "stone_blood.png",
blood_amount = 50,
knock_back = 0,
blood_texture="stone_blood.png",
blood_amount=50,
knock_back=0,
attack_type = "dogshoot",
dogshoot_switch = true,
arrow = "nssm:lava_arrow",
shoot_interval = 2,
shoot_offset = 0,
arrow = "nssm:lava_arrow",
shoot_interval = 2,
shoot_offset = 0,
--[[
on_dist_attack = function(self, player)
local pos = player:getpos()
for dy=-1, 6, 1 do
for dx=-1, 1, 2 do
for dz=-1, 1, 2 do
local p = {x=pos.x+dx, y=pos.y+dy, z=pos.z+dz}
local n = minetest.env:get_node(p).name
if n~="default:lava_flowing" and not minetest.is_protected(p, "") then
minetest.set_node(p, {name="default:lava_flowing"})
end
end
end
end
end,
]]
animation = {
speed_normal = 25,
speed_run = 45,
@ -54,11 +77,41 @@ mobs:register_mob("nssm:lava_titan", {
run_end = 110,
punch_start = 301,
punch_end = 340,
shoot_start = 340,
shoot_end = 400
shoot_start =340,
shoot_end=400,
},
do_custom = function (self)
nssm:digging_attack(self, nil, self.run_velocity, {x = 0, y = 4, z = 0})
end
digging_attack(self, nil, self.run_velocity, {x=0, y=4, z=0})
--digging_ability(self, nil, self.run_velocity, {x=0, y=5, z=0})
--putting_ability(self, "default:lava_source", self.run_velocity)
end,
--[[
custom_attack = function (self)
digging_attack
set_animation(self, "punch")
local p2 = p
local s2 = s
p2.y = p2.y + 1.5
s2.y = s2.y + 1.5
if line_of_sight_water(self, p2, s2) == true then
-- play attack sound
if self.sounds.attack then
minetest.sound_play(self.sounds.attack, {
object = self.object,
max_hear_distance = self.sounds.distance
})
end
-- punch player
self.attack:punch(self.object, 1.0, {
full_punch_interval = 1.0,
damage_groups = {fleshy = self.damage}
}, nil)
end
end,
]]--
})

View File

@ -1,46 +1,54 @@
mobs:register_mob("nssm:manticore", {
type = "monster",
hp_max = 55,
hp_min = 34,
hp_max = 42,
hp_min = 40,
collisionbox = {-0.8, -0.85, -0.8, 0.8, 1.9, 0.8},
visual = "mesh",
mesh = "manticore.x",
textures = {
{"manticore.png"}
},
visual_size = {x = 4, y = 4},
textures = {{"manticore.png"}},
visual_size = {x=4, y=4},
makes_footstep_sound = true,
view_range = 35,
fear_height = 4,
walk_velocity = 2,
run_velocity = 4,
sounds = {
random = "manticore"
random = "manticore",
},
damage = 6,
damage = 5,
jump = true,
drops = {
{name = "nssm:life_energy", chance = 1, min = 3, max = 4},
{name = "nssm:manticore_spine", chance = 3, min = 2, max = 5},
{name = "nssm:manticore_fur", chance = 3, min = 1, max = 2}
{name = "nssm:life_energy",
chance = 1,
min = 3,
max = 4,},
{name = "nssm:manticore_spine",
chance = 3,
min = 2,
max = 5,},
{name = "nssm:manticore_fur",
chance = 3,
min = 1,
max = 2,},
},
armor = 60,
drawtype = "front",
water_damage = 2,
rotate = 270,
lava_damage = 5,
fire_damage = 5,
lava_damage = 15,
suffocation = 4,
light_damage = 0,
on_rightclick = nil,
attack_type = "dogshoot",
dogshoot_switch = true,
arrow = "nssm:spine",
shoot_interval = 2,
group_attack = true,
attack_animals = true,
knock_back = 2,
blood_texture = "nssm_blood.png",
stepheight = 1.1,
shoot_offset = 1,
arrow = "nssm:spine",
shoot_interval = 2,
group_attack=true,
attack_animals=true,
knock_back=2,
blood_texture="nssm_blood.png",
stepheight=1.1,
shoot_offset = 1,
animation = {
speed_normal = 25,
speed_run = 25,
@ -52,7 +60,7 @@ mobs:register_mob("nssm:manticore", {
run_end = 108,
punch_start = 110,
punch_end = 143,
shoot_start = 180,
shoot_end = 230
shoot_start =180,
shoot_end=230,
}
})

View File

@ -1,56 +1,81 @@
mobs:register_mob("nssm:mantis", {
type = "monster",
hp_max = 31,
hp_max = 26,
hp_min = 24,
collisionbox = {-0.5, 0.00, -0.5, 0.5, 2.30, 0.5},
visual = "mesh",
mesh = "mantis.x",
textures = {
{"mantis.png"},
{"mantis2.png"}
},
visual_size = {x = 4, y = 4},
rotate=270,
textures = {{"mantis.png"}},
visual_size = {x=4, y=4},
makes_footstep_sound = true,
view_range = 20,
fear_height = 4,
walk_velocity = 2,
run_velocity = 2.5,
sounds = {
random = "manti"
walk_velocity = 0,
run_velocity = 3.5,
sounds = {
random = "manti",
},
damage = 4,
jump = true,
drops = {
{name = "nssm:mantis_claw", chance = 2, min = 1, max = 4},
{name = "nssm:life_energy", chance = 1, min = 1, max = 2},
{name = "nssm:mantis_skin", chance = 3, min = 1, max = 2},
{name = "nssm:mantis_meat", chance = 2, min = 1, max = 2}
{name = "nssm:mantis_claw",
chance = 2,
min = 1,
max = 4,},
{name = "nssm:life_energy",
chance = 1,
min = 1,
max = 2,},
{name = "nssm:mantis_skin",
chance = 3,
min = 1,
max = 2,},
{name = "nssm:mantis_meat",
chance = 2,
min = 1,
max = 2,},
},
armor = 70,
armor = 60,
drawtype = "front",
water_damage = 2,
lava_damage = 5,
fire_damage = 5,
lava_damage = 15,
light_damage = 0,
group_attack = true,
attack_animals = true,
knock_back = 2,
blood_texture = "nssm_blood_blue.png",
stepheight = 1.1,
suffocation = 4,
on_rightclick = nil,
group_attack=true,
attack_animals=true,
knock_back=2,
blood_texture="nssm_blood_blue.png",
stepheight=1.1,
double_melee_attack = true,
attack_type = "dogfight",
animation = {
speed_normal = 25,
speed_normal = 20,
speed_run = 25,
stand_start = 1,
stand_end = 20,
walk_start = 20,
walk_end = 60,
run_start = 60,
run_end = 80,
punch_start = 120,
punch_end = 140,
punch2_start = 145,
punch2_end = 165
}
stand_start = 40,
stand_end = 40,
walk_start = 40,
walk_end = 40,
run_start = 10,
run_end = 30,
punch_start = 40,
punch_end = 70,
speed_die = 10,
die_start = 110,
die_end = 130,
punch2_start = 80,
punch2_end = 110,
},
--[[ do_custom = function (self)
if self.state == "attack" then
self.textures = {"mantis.png"}
self.object:set_properties(self)
--self.object:set_properties({textures = {{"mantis.png"}}})
else
self.textures = {"mantis-alfa.png"}
self.object:set_properties(self)
-- self.object:set_properties({textures = {{"mantis-alfa.png"}},})
end
end,]]
})

View File

@ -1,54 +0,0 @@
mobs:register_mob("nssm:mantis_beast", {
type = "monster",
hp_max = 30,
hp_min = 27,
collisionbox = {-0.65, 0.00, -0.65, 0.65, 1.50, 0.65},
visual = "mesh",
mesh = "mantis_beast.x",
textures = {
{"mantis_beast.png"},
{"mantis_beast2.png"}
},
visual_size = {x = 6, y = 6},
makes_footstep_sound = true,
view_range = 25,
fear_height = 4,
walk_velocity = 2.5,
run_velocity = 3.5,
sounds = {
random = "manti"
},
damage = 5,
reach = 2,
jump = true,
drops = {
{name = "nssm:mantis_claw", chance = 2, min = 1, max = 6},
{name = "nssm:life_energy", chance = 1, min = 2, max = 3},
{name = "nssm:mantis_skin", chance = 3, min = 1, max = 2},
{name = "nssm:mantis_meat", chance = 2, min = 1, max = 2}
},
armor = 70,
drawtype = "front",
water_damage = 2,
lava_damage = 5,
fire_damage = 5,
light_damage = 0,
group_attack = true,
attack_animals = true,
knock_back = 2,
blood_texture = "nssm_blood_blue.png",
stepheight = 1.1,
attack_type = "dogfight",
animation = {
speed_normal = 15,
speed_run = 20,
stand_start = 0,
stand_end = 60,
walk_start = 70,
walk_end = 110,
run_start = 70,
run_end = 110,
punch_start = 140,
punch_end = 165
}
})

View File

@ -1,43 +1,50 @@
mobs:register_mob("nssm:masticone", {
type = "monster",
hp_max = 25,
hp_min = 24,
hp_max = 18,
hp_min = 17,
collisionbox = {-0.45, 0.00, -0.45, 0.45, 0.40, 0.45},
visual = "mesh",
mesh = "masticone.x",
textures = {
{"masticone.png"}
},
visual_size = {x = 4, y = 4},
textures = {{"masticone.png"}},
visual_size = {x=4, y=4},
makes_footstep_sound = true,
view_range = 15,
lifetimer = 500,
lifetimer = 200,
fear_height = 4,
rotate = 270,
walk_velocity = 1.5,
run_velocity = 2.5,
sounds = {
random = "masticone"
sounds = {
random = "masticone",
},
damage = 5,
damage = 7,
jump = true,
drops = {
{name = "nssm:life_energy", chance = 1, min = 7, max = 8},
{name = "nssm:masticone_fang", chance = 1, min = 1, max = 2},
{name = "nssm:masticone_skull_fragments", chance = 2, min = 1, max = 2}
{name = "nssm:life_energy",
chance = 1,
min = 12,
max = 20,},
{name = "nssm:masticone_fang",
chance = 1,
min = 1,
max = 2,},
{name = "nssm:masticone_skull_fragments",
chance = 2,
min = 1,
max = 2,},
},
armor = 60,
drawtype = "front",
water_damage = 0,
lava_damage = 10,
fire_damage = 10,
floats = 0,
lava_damage = 0,
floats=0,
light_damage = 0,
group_attack = true,
attack_animals = true,
knock_back = 4,
blood_texture = "nssm_blood_blue.png",
stepheight = 1.1,
group_attack=true,
attack_animals=true,
knock_back=4,
blood_texture="nssm_blood_blue.png",
stepheight=1.1,
on_rightclick = nil,
attack_type = "dogfight",
reach =1.5,
animation = {
@ -50,53 +57,65 @@ mobs:register_mob("nssm:masticone", {
run_start = 20,
run_end = 40,
punch_start = 150,
punch_end = 180
punch_end = 180,
},
on_die = function(self, pos)
self.object:remove()
core.after(2, function()
minetest.add_particlespawner({
amount = 200,
time = 0.1,
minpos = {x = pos.x - 1, y = pos.y - 1, z = pos.z - 1},
maxpos = {x = pos.x + 1, y = pos.y + 1, z = pos.z + 1},
minvel = {x = -0, y = -0, z = -0},
maxvel = {x = 1, y = 1, z = 1},
minacc = {x = -0.5, y = 5, z = -0.5},
maxacc = {x = 0.5, y = 5, z = 0.5},
minexptime = 0.1,
maxexptime = 1,
minsize = 3,
maxsize = 4,
collisiondetection = false,
texture = "tnt_smoke.png"
})
local respawn_count = 3
for i = 1, respawn_count do
local chance = math.random(1, math.ceil(respawn_count * 1.5))
if chance == 1 then
local pos = {
x = pos.x + math.random(-1, 1),
y = pos.y + 0.5,
z = pos.z + math.random(-1, 1)
}
local n = minetest.get_node(pos).name
if n == "air" then
minetest.add_entity(pos, "nssm:masticone")
end
minetest.add_particlespawner(
200, --amount
0.1, --time
{x=pos.x-1, y=pos.y-1, z=pos.z-1}, --minpos
{x=pos.x+1, y=pos.y+1, z=pos.z+1}, --maxpos
{x=-0, y=-0, z=-0}, --minvel
{x=1, y=1, z=1}, --maxvel
{x=-0.5,y=5,z=-0.5}, --minacc
{x=0.5,y=5,z=0.5}, --maxacc
0.1, --minexptime
1, --maxexptime
3, --minsize
4, --maxsize
false, --collisiondetection
"tnt_smoke.png" --texture
)
for i = 1,2 do
local pos = {x=pos.x+math.random(-1,1), y=pos.y+0.5, z=pos.z+math.random(-1,1)}
local n = minetest.env:get_node(pos).name
if n == "air" then
minetest.add_entity(pos, "nssm:masticone")
end
end
end)
end
end,
do_custom = function (self)
local pos = self.object:getpos()
local n = minetest.env:get_node(pos).name
if n == "default:lava_source" or n == "default:lava_flowing" then
self.object:set_hp(self.object:get_hp()-5)
if self.object:get_hp() <=0 then
for _,drop in pairs(self.drops) do
if math.random(1, drop.chance) == 1 then
obj = minetest.add_item(pos,
ItemStack(drop.name .. " "
.. math.random(drop.min, drop.max)))
if obj then
obj:setvelocity({
x = math.random(-1, 1),
y = 6,
z = math.random(-1, 1)
})
end
end
end
self.object:remove()
end
end
end,
})

View File

@ -2,48 +2,48 @@ mobs:register_mob("nssm:mese_dragon", {
type = "monster",
hp_max = 666,
hp_min = 666,
collisionbox = {-1, 0, -1, 1, 5, 1},
collisionbox = {-0.8, 0, -0.8, 0.8, 4, 0.8},
visual = "mesh",
mesh = "mese_dragon.x",
textures = {
{"mese_dragon.png"}
},
visual_size = {x = 12, y = 12},
textures = {{"mese_dragon.png"}},
visual_size = {x=8, y=8},
makes_footstep_sound = true,
view_range = 45,
rotate = 270,
fear_height = 5,
walk_velocity = 2,
run_velocity = 4,
sounds = {
sounds = {
shoot_attack = "mesed",
attack = "mese_dragon",
distance = 60
distance = 60,
},
damage = 18,
jump = true,
jump_height = 10,
drops = {
{name = "nssm:rainbow_staff", chance = 1, min = 1, max = 1},
{name = "nssm:energy_globe", chance = 1, min = 99, max = 99}
},
{name = "nssm:rainbow_staff",
chance = 1,
min = 1,
max = 1},
{name = "nssm:energy_globe",
chance = 1,
min = 99,
max = 99},
},
armor = 30,
drawtype = "front",
water_damage = 0,
lava_damage = 0,
fire_damage = 0,
light_damage = 0,
on_rightclick = nil,
attack_type = "dogshoot",
dogshoot_switch = true,
blood_texture = "mese_blood.png",
blood_amount = 30,
stepheight = 3.1,
knock_back = 0,
jump_height = 12,
dogshoot_count_max = 9,
arrow = "nssm:roar_of_the_dragon",
reach = 5,
attack_type = "dogfight",
blood_texture="mese_blood.png",
blood_amount=30,
stepheight=3.1,
knock_back=0,
jump_height=12,
reach = 25,
shoot_interval = 3,
shoot_offset = -1,
animation = {
@ -59,69 +59,145 @@ mobs:register_mob("nssm:mese_dragon", {
punch_end = 275,
punch2_start = 330,
punch2_end = 370,
dattack_start = 120,
dattack_end = 160
shoot_start = 120,
shoot_end = 160,
},
--[[
do_custom = function(self)
nssm:midas_ability(self, "default:mese_block", self.run_velocity, 2, 3)
--midas_ability(self, "default:mese_block", self.run_velocity,2, 3)
end,
custom_attack = function(self)
if self.timer > 1 then
self.timer = 0
self.attack_rip = self.attack_rip+1
self.attack_rip = (self.attack_rip or 0) + 1
local s = self.object:get_pos()
if minetest.is_protected(s, "") then
return
end
local p = self.attack:get_pos()
local s = self.object:getpos()
local p = self.attack:getpos()
p.y = p.y + 1.5
s.y = s.y + 1.5
if minetest.line_of_sight(p, s) == true then
-- play attack sound
if self.sounds.attack then
minetest.sound_play(self.sounds.attack, {
object = self.object,
max_hear_distance = self.sounds.distance
}, true)
})
end
-- punch player
self.attack:punch(self.object, 1.0, {
full_punch_interval = 1.0,
damage_groups = {fleshy = self.damage}
self.attack:punch(self.object, 1.0, {
full_punch_interval=1.0,
damage_groups = {fleshy=self.damage}
}, nil)
end
if self.attack_rip >= 8 then
self.attack_rip = 0
self:set_animation("punch1")
for dx = -17, 17 do
for dz = -17, 17 do
local k = {x = s.x + dx, y = s.y + 20, z = s.z + dz}
local n = minetest.get_node(k).name
if n == "air" and math.random(23) == 1 then
minetest.set_node(k, {name="nssm:mese_meteor"})
minetest.check_single_for_falling(k)
if self.attack_rip>=8 then
self.attack_rip =0
set_animation("punch1")
for dx = -17,17 do
for dz= -17,17 do
local k = {x = s.x+dx, y=s.y+20, z=s.z+dz}
local n = minetest.env:get_node(k).name
if n=="air" and math.random(1,23)==1 then
minetest.env:set_node(k, {name="nssm:mese_meteor"})
nodeupdate(k)
end
end
end
end
end
end
end,
]]
custom_attack = function(self)
local p = self.attack:getpos()
local s = self.object:getpos()
s.y = s.y + 5;
local vel = vector.subtract(p,s)
set_animation(self, "shoot")
minetest.add_particlespawner(
125, --amount
0.5, --time
s, --minpos
s, --maxpos
vector.multiply(vel, 0.5), --minvel
vector.multiply(vel, 1.4), --maxvel
{x=0,y=0,z=0}, --minacc
{x=0,y=0,z=0}, --maxacc
2, --minexptime
4, --maxexptime
1, --minsize
2, --maxsize
true, --collisiondetection
"phoenix_fire.png" --texture
)
local obj = minetest.add_entity(s, "nssm:mese_dart")
local ran = math.random(7,14)/10
local vec = vector.multiply(vel, ran)
obj:setvelocity(vec)
minetest.after(0.5, function()
if self.attack then
local p = self.attack:getpos()
local vel = vector.subtract(p,s)
local obj = minetest.add_entity(s, "nssm:mese_dart")
local ran = math.random(7,14)/10
local vec = vector.multiply(vel, ran)
obj:setvelocity(vec)
end
end)
end,
--[[
do_custom = function (self)
--minetest.chat_send_all(s.y.."-"..p.y.."="..(s.y-p.y))
if self.state == "attack" then
if self.attack then
local s = self.object:getpos()
local p = self.attack:getpos()
if (s.y - p.y ) < 10 then
local v = self.object:getvelocity()
v.y = 10
self.object:setvelocity(v)
end
end
end
end,]]
})
minetest.register_entity("nssm:mese_dart", {
textures = {"transparent.png"},
on_step = function(self, dtime)
self.timer = (self.timer) or os.time()
self.attack = (self.attack) or os.time()
if os.time() - self.timer > 4 then
self.object:remove()
end
local p = self.object:getpos()
local all_objects = minetest.get_objects_inside_radius(p, 1)
local players = {}
local _,obj
for _,obj in ipairs(all_objects) do
if obj:is_player() then
obj:punch(self.object, 1.0, {
full_punch_interval = 1.0,
damage_groups = {fleshy = 10}
}, nil)
self.object:remove()
end
end
local n = minetest.get_node(p).name
if n ~= "air" then
minetest.set_node(p, {name="default:mese_block"})
self.object:remove();
end
local node = minetest.get_node(p).name
if node ~= "air" then
self.object:remove()
end
end,
})

View File

@ -1,41 +1,47 @@
mobs:register_mob("nssm:moonheron", {
type = "monster",
hp_max = 33,
docile_by_day =true,
hp_max = 25,
hp_min = 22,
collisionbox = {-0.45, -0.3, -0.45, 0.45, 0.3, 0.45},
visual = "mesh",
mesh = "moonheron.x",
textures = {
{"moonheron.png"}
},
visual_size = {x = 10, y = 10},
textures = {{"moonheron.png"}},
visual_size = {x=10, y=10},
view_range = 35,
rotate = 270,
walk_velocity = 2,
run_velocity = 3,
fall_speed = 0,
stepheight = 3,
sounds = {
random = "moonheron",
distance = 40
distance =40,
},
damage = 5,
damage = 4,
jump = true,
drops = {
{name = "nssm:life_energy", chance = 1, min = 2, max = 3},
{name = "nssm:heron_leg", chance = 1, min = 1, max = 1}
{name = "nssm:life_energy",
chance = 1,
min = 2,
max = 3,},
{name = "nssm:heron_leg",
chance = 1,
min = 1,
max = 1,},
},
armor = 70,
floats = 1,
drawtype = "front",
water_damage = .1,
lava_damage = 5,
fire_damage = 5,
group_attack = true,
attack_animals = true,
knock_back = 4,
blood_texture = "nssm_blood.png",
fly = true,
water_damage = 0,
lava_damage = 15,
suffocation = 4,
follow = {"farming:wheat"},
group_attack=true,
attack_animals=false,
knock_back=4,
blood_texture="nssm_blood.png",
on_rightclick = nil,
fly = true,
attack_type = "dogfight",
animation = {
speed_normal = 25,
@ -47,6 +53,86 @@ mobs:register_mob("nssm:moonheron", {
run_start = 20,
run_end = 60,
punch_start = 80,
punch_end = 120
}
punch_end = 120,
},
do_custom = function(self, dtime)
-- set needed values if not already present
if not self.v2 then
self.v2 = 0
self.max_speed_forward = 10
self.max_speed_reverse = 2
self.accel = 6
self.terrain_type = 3
self.driver_attach_at = {x = 0, y = 1.1, z = -0.4}
self.driver_eye_offset = {x = 0, y = -2, z = 0}
self.driver_scale = {x = 0.09, y = 0.09}
end
-- if driver present allow control of horse
if self.driver then
mobs.drive(self, "run", "stand", true, dtime)
return false -- skip rest of mob functions
end
return true
end,
on_die = function(self, pos)
-- drop saddle when horse is killed while riding
-- also detach from horse properly
if self.driver then
minetest.add_item(pos, "mobs:saddle")
mobs.detach(self.driver, {x = 1, y = 0, z = 1})
end
end,
on_rightclick = function(self, clicker)
-- make sure player is clicking
if not clicker or not clicker:is_player() then
return
end
-- feed, tame or heal horse
if mobs:feed_tame(self, clicker, 10, true, true) then
return
end
-- make sure tamed horse is being clicked by owner only
if self.tamed and self.owner == clicker:get_player_name() then
local inv = clicker:get_inventory()
-- detatch player already riding horse
if self.driver and clicker == self.driver then
mobs.detach(clicker, {x = 1, y = 0, z = 1})
-- add saddle back to inventory
if inv:room_for_item("main", "mobs:saddle") then
inv:add_item("main", "mobs:saddle")
else
minetest.add_item(clicker.getpos(), "mobs:saddle")
end
-- attach player to horse
elseif not self.driver
and clicker:get_wielded_item():get_name() == "mobs:saddle" then
self.object:set_properties({stepheight = 1.1})
mobs.attach(self, clicker)
-- take saddle from inventory
inv:remove_item("main", "mobs:saddle")
end
end
-- used to capture horse with magic lasso
mobs:capture_mob(self, clicker, 0, 0, 80, false, nil)
end
})

View File

@ -5,36 +5,40 @@ mobs:register_mob("nssm:mordain", {
collisionbox = {-0.5, -0.3, -0.5, 0.5, 2.7, 0.5},
visual = "mesh",
mesh = "mordain.x",
textures = {
{"mordain.png"}
},
visual_size = {x = 3.5, y = 3.5},
textures = {{"mordain.png"}},
visual_size = {x=3.5, y=3.5},
makes_footstep_sound = false,
view_range = 30,
fear_height = 4,
walk_velocity = 1,
run_velocity = 3.5,
rotate = 270,
sounds = {
random = "mordain"
rotate = 270,
sounds = {
random = "mordain",
},
damage = 6,
jump = true,
drops = {
{name = "nssm:life_energy", chance = 1, min = 1, max = 1},
{name = "nssm:slothful_soul_fragment", chance = 3, min = 1, max = 1}
{name = "nssm:life_energy",
chance = 1,
min = 1,
max = 1,},
{name = "nssm:slothful_soul_fragment",
chance = 3,
min = 1,
max = 1,},
},
armor = 80,
drawtype = "front",
water_damage = 0,
lava_damage = 1,
fire_damage = 1,
-- light_damage = 2,
group_attack = true,
attack_animals = true,
knock_back = 1,
blood_texture = "morparticle.png",
stepheight = 1.1,
group_attack=true,
attack_animals=true,
knock_back=1,
blood_texture="morparticle.png",
stepheight=1.1,
--light_damage = 2,
on_rightclick = nil,
attack_type = "dogfight",
animation = {
speed_normal = 15,
@ -46,120 +50,73 @@ mobs:register_mob("nssm:mordain", {
run_start = 170,
run_end = 200,
punch_start = 210,
punch_end = 225
punch_end = 225,
},
--pathfinding = 1,
custom_attack = function(self)
self.mordain_timer = self.mordain_timer or os.time()
self.mordain_timer = (self.mordain_timer or os.time())
if (os.time() - self.mordain_timer) > 1 then
self.mordain_timer = os.time()
local s = self.object:getpos()
local p = self.attack:getpos()
local s = self.object:get_pos()
local p = self.attack:get_pos()
mobs:set_animation(self, "punch")
if minetest.line_of_sight(
{x = p.x, y = p.y + 1.5, z = p.z},
{x = s.x, y = s.y + 1.5, z = s.z}) == true then
set_animation(self, "punch")
if minetest.line_of_sight({x = p.x, y = p.y +1.5, z = p.z}, {x = s.x, y = s.y +1.5, z = s.z}) == true then
-- play attack sound
if self.sounds.attack then
minetest.sound_play(self.sounds.attack, {
object = self.object,
max_hear_distance = self.sounds.distance
}, true)
})
end
-- punch player
self.attack:punch(self.object, 1.0, {
full_punch_interval = 1.0,
damage_groups = {fleshy = self.damage}
self.attack:punch(self.object, 1.0, {
full_punch_interval=1.0,
damage_groups = {fleshy=self.damage}
}, nil)
end
minetest.after(1, function()
local ty = s.y
local flag = 0
local m = 3
local v = {
x = (p.x - s.x) * m,
y = ty,
z = (p.z - s.z) * m
}
local v = {x=(p.x-s.x)*m, y = ty, z = (p.z-s.z)*m}
local d = {x=s.x+v.x, y = ty, z = s.z+v.z}
local d = {
x = s.x + v.x,
y = ty,
z = s.z + v.z
}
d.y = ty
for j = -3,3 do
ty = d.y + j
local current = minetest.get_node({
x = d.x,
y = ty,
z = d.z}).name
local up = minetest.get_node({
x = d.x,
y = ty + 1,
z = d.z}).name
local current = minetest.env:get_node({x = d.x, y = ty, z = d.z}).name
local up = minetest.env:get_node({x = d.x, y = ty+1, z = d.z}).name
if up == "air" and current ~= "air" then
d.y = d.y + j + 1.5
d.y = d.y + j+1.5
flag = 1
break
end
end
while flag ~= 1 do
d.x = p.x + math.random(-m, m)
d.z = p.z + math.random(-m, m)
d.x = p.x + math.random(-m,m)
d.z = p.z + math.random(-m,m)
d.y = p.y
local dist = nssm:dist_pos(d, p)
if dist >= 2 then
for j = -3, 3 do
local dist = dist_pos(d, p)
if dist>=2 then
for j = -3,3 do
ty = d.y + j
local current = minetest.get_node({
x = d.x,
y = ty,
z = d.z}).name
local up = minetest.get_node({
x = d.x,
y = ty + 1,
z = d.z}).name
local current = minetest.env:get_node({x = d.x, y = ty, z = d.z}).name
local up = minetest.env:get_node({x = d.x, y = ty+1, z = d.z}).name
if up == "air" and current ~= "air" then
d.y = d.y + j + 1.5
d.y = d.y + j+1.5
flag = 1
break
end
end
end
end
self.object:set_pos(d)
self.object:setpos(d)
end)
end
end

View File

@ -6,10 +6,8 @@ mobs:register_mob("nssm:morde", {
visual = "mesh",
rotate= 270,
mesh = "morde.x",
textures = {
{"morde.png"}
},
visual_size = {x = 10, y = 10},
textures = {{"morde.png"}},
visual_size = {x=10, y=10},
makes_footstep_sound = true,
view_range = 20,
walk_velocity = 0.5,
@ -17,12 +15,18 @@ mobs:register_mob("nssm:morde", {
run_velocity = 3.5,
damage = 6,
jump = true,
sounds = {
random = "morde"
sounds = {
random = "morde",
},
drops = {
{name = "nssm:life_energy", chance = 1, min = 2, max = 4},
{name = "nssm:proud_soul_fragment", chance = 3, min = 1, max = 1}
{name = "nssm:life_energy",
chance = 1,
min = 2,
max = 4,},
{name = "nssm:proud_soul_fragment",
chance = 3,
min = 1,
max = 1,},
},
armor = 60,
drawtype = "front",
@ -30,13 +34,13 @@ mobs:register_mob("nssm:morde", {
fear_height = 4,
floats = 1,
lava_damage = 0,
fire_damage = 0,
light_damage = 0,
group_attack = true,
attack_animals = true,
knock_back = 1,
blood_texture = "morparticle.png",
stepheight = 1.1,
group_attack=true,
attack_animals=true,
knock_back=1,
blood_texture="morparticle.png",
stepheight=1.1,
on_rightclick = nil,
attack_type = "dogfight",
animation = {
speed_normal = 15,
@ -48,164 +52,119 @@ mobs:register_mob("nssm:morde", {
run_start = 100,
run_end = 120,
punch_start = 130,
punch_end = 160
punch_end = 160,
},
custom_attack = function (self)
self.morde_timer = self.morde_timer or os.time()
self.morde_timer = (self.morde_timer or os.time())
if (os.time() - self.morde_timer) > 1 then
self.morde_timer = os.time()
local s = self.object:get_pos()
local p = self.attack:get_pos()
local s = self.object:getpos()
local p = self.attack:getpos()
mobs:set_animation(self, "punch")
self.health = self.health + (self.damage * 2)
set_animation(self, "punch")
self.health = self.health + (self.damage*2)
local m = 3
if minetest.line_of_sight(
{x = p.x, y = p.y + 1.5, z = p.z},
{x = s.x, y = s.y + 1.5, z = s.z}) == true then
if minetest.line_of_sight({x = p.x, y = p.y +1.5, z = p.z}, {x = s.x, y = s.y +1.5, z = s.z}) == true then
-- play attack sound
if self.sounds.attack then
minetest.sound_play(self.sounds.attack, {
object = self.object,
max_hear_distance = self.sounds.distance
}, true)
})
end
-- punch player
self.attack:punch(self.object, 1.0, {
full_punch_interval = 1.0,
damage_groups = {fleshy = self.damage}
self.attack:punch(self.object, 1.0, {
full_punch_interval=1.0,
damage_groups = {fleshy=self.damage}
}, nil)
minetest.add_particlespawner({
amount = 6,
time = 1,
minpos = {x = p.x - 0.5, y = p.y - 0.5, z = p.z - 0.5},
maxpos = {x = p.x + 0.5, y = p.y + 0.5, z = p.z + 0.5},
minvel = {
x = (s.x - p.x) * m,
y = (s.y - p.y + 1) * m,
z = (s.z - p.z) * m
},
maxvel = {
x = (s.x - p.x) * m,
y = (s.y - p.y + 1) * m,
z = (s.z - p.z) * m
},
minacc = {x = s.x - p.x, y = s.y - p.y + 1, z = s.z - p.z},
maxacc = {x = s.x - p.x, y = s.y - p.y + 1, z = s.z - p.z},
minexptime = 0.2,
maxexptime = 0.3,
minsize = 2,
maxsize = 3,
collisiondetection = false,
texture = "morparticle.png"
})
minetest.add_particlespawner(
6, --amount
1, --time
{x=p.x-0.5, y=p.y-0.5, z=p.z-0.5}, --minpos
{x=p.x+0.5, y=p.y+0.5, z=p.z+0.5}, --maxpos
{x=(s.x-p.x)*m, y=(s.y-p.y+1)*m, z=(s.z-p.z)*m}, --minvel
{x=(s.x-p.x)*m, y=(s.y-p.y+1)*m, z=(s.z-p.z)*m}, --maxvel
{x=s.x-p.x, y=s.y-p.y+1, z=s.z-p.z}, --minacc
{x=s.x-p.x, y=s.y-p.y+1, z=s.z-p.z}, --maxacc
0.2, --minexptime
0.3, --maxexptime
2, --minsize
3, --maxsize
false, --collisiondetection
"morparticle.png" --texture
)
end
end
end,
on_die = function(self)
local pos = self.object:get_pos()
local pos = self.object:getpos()
self.object:remove()
minetest.add_entity(pos, "nssm:mortick")
end
end,
})
minetest.register_entity("nssm:mortick", {
textures = {"mortick.png"},
collisionbox = {-0.05, -0.05, -0.05, 0.05, 0.05, 0.05},
hp_min = 10000,
hp_max = 10000,
armor = 100,
visual = "mesh",
mesh = "mortick.x",
collisionbox = {-0.2, -0.2, -0.2, 0.2, 0.2, 0.2},
visual_size = {x = 3, y = 3},
visual_size = {x=3, y=3},
--lifetime = 10,
damage = 1,
on_step = function(self, dtime)
self.mortick_timer = self.mortick_timer or os.time()
self.timer = self.timer or 0
self.timer = self.timer + dtime
local s = self.object:get_pos()
local s1 = {x=s.x, y = s.y - 1, z = s.z}
self.timer = self.timer+dtime
local s = self.object:getpos()
local s1 = {x=s.x, y = s.y-1, z = s.z}
--[[
if (os.time()-self.mortick_timer > self.lifetime) then
self.object:remove()
end
]]
--The mortick dies when he finds himself in the fire
local name = minetest.get_node(s1).name
if name == "fire:basic_flame"
or name == "fire:permanent_flame"
or name == "nssm:phoenix_fire"
or name == "default:lava_source"
or name == "default:lava_flowing" then
local name = minetest.env:get_node(s1).name
if name == "fire:basic_flame" then
self.object:remove()
end
--Find player to attack:
self.attack = (self.attack or 0)
local objects = minetest.get_objects_inside_radius(s, 8)
local objects = minetest.env:get_objects_inside_radius(s, 8)
for _,obj in ipairs(objects) do
if obj:is_player() then
if (obj:is_player()) then
self.attack = obj
end
end
end
end
--If found a player follow him
if self.attack ~= 0 then
local p = self.attack:get_pos()
-- Just incase player teleports away or leaves game
if not p then
self.attack = nil
return
end
local yawp = self.attack:get_look_horizontal() + math.pi / 2
local p = self.attack:getpos()
local yawp = self.attack:get_look_yaw()
local pi = math.pi
p.y = p.y + 1
p.x = p.x - math.cos(yawp) / 2.5
p.z = p.z - math.sin(yawp) / 2.5
p.x = p.x-math.cos(yawp)/2.5
p.z = p.z-math.sin(yawp)/2.5
local m = 10
local v = {
x = -(s.x - p.x) * m,
y = -(s.y - p.y) * m,
z = -(s.z - p.z) * m
}
local yaws = yawp + pi
local v = {x=-(s.x-p.x)*m, y=-(s.y-p.y)*m, z=-(s.z-p.z)*m}
local yaws = yawp +pi
--stay attached to players back:
self.object:set_velocity(v)
self.object:set_yaw(yaws)
self.object:setvelocity(v)
self.object:setyaw(yaws)
--damage player every ten seconds:
if self.timer > 10 then
if (self.timer>10) then
self.timer = 0
self.attack:set_hp(self.attack:get_hp() - self.damage)
end

View File

@ -6,37 +6,41 @@ mobs:register_mob("nssm:morgre", {
visual = "mesh",
mesh = "morgre.x",
rotate = 270,
textures = {
{"morgre.png"}
},
visual_size = {x = 5, y = 5},
textures = {{"morgre.png"}},
visual_size = {x=5, y=5},
explosion_radius = 4,
makes_footstep_sound = true,
view_range = 25,
fear_height = 4,
walk_velocity = 0.5,
run_velocity = 3.5,
sounds = {
explode = "tnt_explode",
random = "morgre1"
sounds = {
explode = "tnt_explode",
random = "morgre1",
},
damage = 1,
jump = true,
drops = {
{name = "nssm:life_energy", chance = 1, min = 1, max = 2},
{name = "nssm:greedy_soul_fragment", chance = 5, min = 1, max = 1}
{name = "nssm:life_energy",
chance = 1,
min = 1,
max = 2,},
{name = "nssm:greedy_soul_fragment",
chance = 5,
min = 1,
max = 1,},
},
armor = 60,
drawtype = "front",
water_damage = 0,
lava_damage = 0,
fire_damage = 0,
light_damage = 0,
group_attack = true,
attack_animals = true,
knock_back = 1,
blood_texture = "morparticle.png",
stepheight = 1.1,
group_attack=true,
attack_animals=true,
knock_back=1,
blood_texture="morparticle.png",
stepheight=1.1,
on_rightclick = nil,
attack_type = "explode",
animation = {
speed_normal = 25,
@ -48,6 +52,6 @@ mobs:register_mob("nssm:morgre", {
run_start = 120,
run_end = 140,
punch_start = 100,
punch_end = 110
punch_end = 110,
}
})

View File

@ -6,10 +6,8 @@ mobs:register_mob("nssm:morgut", {
visual = "mesh",
rotate= 270,
mesh = "morgut.x",
textures = {
{"morgut.png"}
},
visual_size = {x = 5, y = 5},
textures = {{"morgut.png"}},
visual_size = {x=5, y=5},
makes_footstep_sound = true,
view_range = 26,
walk_velocity = 0.5,
@ -18,12 +16,18 @@ mobs:register_mob("nssm:morgut", {
damage = 4,
runaway = true,
jump = true,
sounds = {
random = "morgut"
sounds = {
random = "morgut",
},
drops = {
{name = "nssm:life_energy", chance = 1, min = 1, max = 3},
{name = "nssm:gluttonous_soul_fragment", chance = 3, min = 1, max = 1}
{name = "nssm:life_energy",
chance = 1,
min = 1,
max = 3,},
{name = "nssm:gluttonous_soul_fragment",
chance = 3,
min = 1,
max = 1,},
},
armor = 70,
drawtype = "front",
@ -31,13 +35,13 @@ mobs:register_mob("nssm:morgut", {
fear_height = 4,
floats = 1,
lava_damage = 0,
fire_damage = 0,
light_damage = 0,
group_attack = true,
attack_animals = true,
knock_back = 1,
blood_texture = "morparticle.png",
stepheight = 1.1,
group_attack=true,
attack_animals=true,
knock_back=1,
blood_texture="morparticle.png",
stepheight=1.1,
on_rightclick = nil,
attack_type = "dogfight",
animation = {
speed_normal = 15,
@ -49,33 +53,25 @@ mobs:register_mob("nssm:morgut", {
run_start = 100,
run_end = 120,
punch_start = 130,
punch_end = 160
punch_end = 160,
},
do_custom = function (self)
self.flag = (self.flag or 0)
if self.inv_flag ~= 1 then
self.inventory = {}
for i = 1, 32 do
self.inventory[i] = {name = "", num = 0}
for i=1,32 do
self.inventory[i]={name = '', num = 0}
end
end
self.inv_flag = (self.inv_flag or 1)
if self.flag == 1 then
self.state = ""
mobs:set_animation(self, "run")
self.object:set_yaw(self.dir)
self:set_velocity(4)
set_animation(self, "run")
self.object:setyaw(self.dir)
set_velocity(self, 4)
if os.time() - self.morgut_timer > 3 then
self.flag = 0
@ -84,143 +80,101 @@ mobs:register_mob("nssm:morgut", {
end
end,
custom_attack = function (self)
self.curr_attack = (self.curr_attack or self.attack)
self.morgut_timer = (self.morgut_timer or os.time())
self.dir = (self.dir or 0)
if (os.time() - self.morgut_timer) > 1 then
if self.attack then
local s = self.object:get_pos()
local p = self.attack:get_pos()
mobs:set_animation(self, "punch")
local s = self.object:getpos()
local p = self.attack:getpos()
set_animation(self, "punch")
local m = 2
minetest.add_particlespawner({
amount = 6,
time = 1,
minpos = {x = p.x - 0.5, y = p.y - 0.5, z = p.z - 0.5},
maxpos = {x = p.x + 0.5, y = p.y + 0.5, z = p.z + 0.5},
minvel = {
x = (s.x - p.x) * m,
y = (s.y - p.y) * m,
z = (s.z - p.z) * m
},
maxvel = {
x = (s.x - p.x) * m,
y = (s.y - p.y) * m,
z = (s.z - p.z) * m
},
minacc = {x = s.x - p.x, y = s.y - p.y, z = s.z - p.z},
maxacc = {x = s.x - p.x, y = s.y - p.y, z = s.z - p.z},
minexptime = 0.2,
maxexptime = 0.3,
minsize = 2,
maxsize = 3,
collisiondetection = false,
texture = "roasted_duck_legs.png"
})
minetest.add_particlespawner(
6, --amount
1, --time
{x=p.x-0.5, y=p.y-0.5, z=p.z-0.5}, --minpos
{x=p.x+0.5, y=p.y+0.5, z=p.z+0.5}, --maxpos
{x=(s.x-p.x)*m, y=(s.y-p.y)*m, z=(s.z-p.z)*m}, --minvel
{x=(s.x-p.x)*m, y=(s.y-p.y)*m, z=(s.z-p.z)*m}, --maxvel
{x=s.x-p.x, y=s.y-p.y, z=s.z-p.z}, --minacc
{x=s.x-p.x, y=s.y-p.y, z=s.z-p.z}, --maxacc
0.2, --minexptime
0.3, --maxexptime
2, --minsize
3, --maxsize
false, --collisiondetection
"roasted_duck_legs.png" --texture
)
minetest.after(1, function(self)
minetest.after(1, function (self)
if self then
if self.attack:is_player() then
local pname = self.attack:get_player_name()
local player_inv = minetest.get_inventory({type='player', name = pname})
if self and self.attack:is_player() then
local pname = self.attack:get_player_name()
local player_inv = minetest.get_inventory(
{type = "player", name = pname})
if not player_inv:is_empty("main") then
for i = 1, 32 do
local items = player_inv:get_stack("main", i)
local n = items:get_name()
if minetest.get_item_group(n, "eatable") == 1 then
local index
local found = 0
for j = 1, 32 do
if found == 0 then
if self.inventory[j].num == 0 then
-- found an empty place
found = 2
index = j
else
-- found a corrsponding itemstack
if self.inventory[j].name == n then
self.inventory[j].num = self.inventory[j].num + 1
found = 1
if player_inv:is_empty('main') then
--minetest.chat_send_all("Inventory empty")
else
for i = 1,32 do
--minetest.chat_send_all("Inventory is not empty")
local items = player_inv:get_stack('main', i)
local n = items:get_name()
if minetest.get_item_group(n, "eatable")==1 then
local index
local found = 0
for j = 1,32 do
if found == 0 then
if self.inventory[j].num == 0 then
--found an empty place
found = 2
index = j
else
--found a corrsponding itemstack
if self.inventory[j].name == n then
self.inventory[j].num = self.inventory[j].num +1
found = 1
end
end
end
end
if found == 2 then
self.inventory[index].name = n
self.inventory[index].num = 1
end
items:take_item()
player_inv:set_stack('main', i, items)
end
if found == 2 then
self.inventory[index].name = n
self.inventory[index].num = 1
end
items:take_item()
player_inv:set_stack("main", i, items)
end
end
end
mobs:set_animation(self, "run")
self.flag = 1
self.morgut_timer = os.time()
self.curr_attack = self.attack
self.state = ""
local pyaw = self.curr_attack: get_look_horizontal() + math.pi / 2
self.dir = pyaw
self.object:set_yaw(pyaw)
if self then
self:set_velocity(4)
set_animation(self, "run")
self.flag = 1
self.morgut_timer = os.time()
self.curr_attack = self.attack
self.state = ""
local pyaw = self.curr_attack: get_look_yaw()
self.dir = pyaw
self.object:setyaw(pyaw)
if self then
set_velocity(self, 4)
end
end
end
end, self)
end,self)
end
end
end,
on_die = function(self)
local pos = self.object:get_pos()
local pos = self.object:getpos()
if (self.inventory ~= nil) then
local elem
for i = 1, 32 do
if self.inventory[i].num ~= 0 then
local items = ItemStack(self.inventory[i].name
.. " " .. self.inventory[i].num)
for i = 1,32 do
if self.inventory[i].num~=0 then
local items = ItemStack(self.inventory[i].name.." "..self.inventory[i].num)
local obj = minetest.add_item(pos, items)
obj:set_velocity({
obj:setvelocity({
x = math.random(-1, 1),
y = 6,
z = math.random(-1, 1)
@ -228,7 +182,6 @@ mobs:register_mob("nssm:morgut", {
end
end
end
self.object:remove()
end
end,
})

View File

@ -6,10 +6,8 @@ mobs:register_mob("nssm:morlu", {
visual = "mesh",
rotate= 270,
mesh = "morlu.x",
textures = {
{"morlu.png"}
},
visual_size = {x = 7, y = 7},
textures = {{"morlu.png"}},
visual_size = {x=7, y=7},
makes_footstep_sound = true,
view_range = 28,
walk_velocity = 0.5,
@ -18,13 +16,19 @@ mobs:register_mob("nssm:morlu", {
damage = 4,
runaway = true,
jump = true,
sounds = {
sounds = {
random = "morlu1",
random = "morlu2"
},
drops = {
{name = "nssm:life_energy", chance = 1, min = 3, max = 4},
{name = "nssm:lustful_soul_fragment", chance = 3, min = 1, max = 1}
{name = "nssm:life_energy",
chance = 1,
min = 3,
max = 4,},
{name = "nssm:lustful_soul_fragment",
chance = 3,
min = 1,
max = 1,},
},
armor = 40,
drawtype = "front",
@ -32,13 +36,13 @@ mobs:register_mob("nssm:morlu", {
fear_height = 4,
floats = 1,
lava_damage = 0,
fire_damage = 0,
light_damage = 0,
group_attack = true,
attack_animals = true,
knock_back = 1,
blood_texture = "morparticle.png",
stepheight = 1.1,
group_attack=true,
attack_animals=true,
knock_back=1,
blood_texture="morparticle.png",
stepheight=1.1,
on_rightclick = nil,
attack_type = "dogfight",
animation = {
speed_normal = 15,
@ -50,34 +54,26 @@ mobs:register_mob("nssm:morlu", {
run_start = 50,
run_end = 90,
punch_start = 100,
punch_end = 130
punch_end = 130,
},
do_custom = function (self)
self.flag = (self.flag or 0)
if self.inv_flag ~= 1 then
self.inventory = {}
self.invnum = 0
for i = 1, 6 do
self.inventory[i] = {name = ""}
for i=1,6 do
self.inventory[i]={name = ''}
end
end
self.inv_flag = (self.inv_flag or 1)
if self.flag == 1 then
self.state = ""
mobs:set_animation(self, "run")
self:set_yaw(self.dir)
self:set_velocity(4)
set_animation(self, "run")
self.object:setyaw(self.dir)
set_velocity(self, 4)
if os.time() - self.morlu_timer > 3 then
self.flag = 0
@ -86,38 +82,24 @@ mobs:register_mob("nssm:morlu", {
end
end,
custom_attack = function (self)
self.curr_attack = (self.curr_attack or self.attack)
self.morlu_timer = (self.morlu_timer or os.time())
self.dir = (self.dir or 0)
if (os.time() - self.morlu_timer) > 1 then
local s = self.object:get_pos()
local p = self.attack:get_pos()
mobs:set_animation(self, "punch")
local s = self.object:getpos()
local p = self.attack:getpos()
set_animation(self, "punch")
local m = 1
if self.attack:is_player() then
if minetest.get_modpath("3d_armor") then
local pname, player_inv = armor:get_valid_player(
self.attack, "[set_player_armor]")
local pname, player_inv, armor_inv, ppos = armor:get_valid_player(self.attack, "[set_player_armor]")
local pname = self.attack:get_player_name()
local player_inv = minetest.get_inventory({
type = "player", name = pname})
local armor_inv = minetest.get_inventory({
type = 'detached', name = pname.."_armor"})
if armor_inv:is_empty("armor") then
local player_inv = minetest.get_inventory({type='player', name = pname})
if player_inv:is_empty('armor') then
-- punch player if he doesn't own an armor
self.attack:punch(self.object, 1.0, {
full_punch_interval = 1.0,
@ -128,165 +110,134 @@ mobs:register_mob("nssm:morlu", {
local armor_num = 0
local steal_pos
for i = 1, 6 do
local armor_stack = armor_inv:get_stack("armor", i)
for i=1,6 do
local armor_stack = player_inv:get_stack("armor", i)
local armor_item = armor_stack:get_name()
if armor_stack:get_count() > 0 then
armor_elements[armor_num] = {name=armor_item, pos=i}
armor_elements[armor_num]={name=armor_item, pos=i}
armor_num = armor_num + 1
end
end
if armor_num > 0 then
steal_pos = math.random(1,armor_num)
steal_pos = steal_pos-1
--[[for i=0,armor_num-1 do
minetest.chat_send_all("Posizione: "..armor_elements[i].pos.." Oggetto: "..armor_elements[i].name)
end
]]
steal_pos = math.random(armor_num)
steal_pos = steal_pos - 1
--minetest.chat_send_all("Selezionato: pos: "..armor_elements[steal_pos].pos.." nome: "..armor_elements[steal_pos].name)
local cpos = string.find(armor_elements[steal_pos].name, ":")
local target_armor = armor_elements[steal_pos].name
local mod_name = string.sub(target_armor, 0, cpos - 1)
local nname = string.sub(target_armor, cpos + 1)
--minetest.chat_send_all("Posizione dei due punti: "..cpos)
if target_armor:find("admin") then
nname = "greedy_soul_fragment.png"
elseif mod_name == "3d_armor" then
nname = "3d_armor_inv_" .. nname .. ".png"
local mod_name = string.sub(armor_elements[steal_pos].name, 0, cpos-1)
local nname = string.sub(armor_elements[steal_pos].name, cpos+1)
--minetest.chat_send_all("Armor Mod name: "..mod_name)
if mod_name == "3d_armor" then
nname = "3d_armor_inv_"..nname..".png"
elseif mod_name == "nssm" then
nname = "inv_" .. nname .. ".png"
nname = "inv_"..nname..".png"
else
nname = "3d_armor_inv_chestplate_diamond.png"
end
--minetest.chat_send_all("Nome della texture: "..nname)
minetest.add_particlespawner({
amount = 1,
time = 1,
minpos = {x = p.x, y = p.y + 1, z = p.z},
maxpos = {x = p.x, y = p.y + 1, z = p.z},
minvel = {
x = (s.x - p.x) * m,
y = (s.y - p.y) * m,
z = (s.z - p.z) * m
},
maxvel = {
x = (s.x - p.x) * m,
y = (s.y - p.y) * m,
z = (s.z - p.z) * m
},
minacc = {x = s.x - p.x, y = s.y - p.y - 1, z = s.z - p.z},
maxacc = {x = s.x - p.x, y = s.y - p.y - 1, z = s.z - p.z},
minexptime = 0.5,
maxexptime = 0.5,
minsize = 10,
maxsize = 10,
collisiondetection = false,
texture = nname
})
if target_armor:find("admin") then
return
end
minetest.add_particlespawner(
1, --amount
1, --time
{x=p.x, y=p.y+1, z=p.z}, --minpos
{x=p.x, y=p.y+1, z=p.z}, --maxpos
{x=(s.x-p.x)*m, y=(s.y-p.y)*m, z=(s.z-p.z)*m}, --minvel
{x=(s.x-p.x)*m, y=(s.y-p.y)*m, z=(s.z-p.z)*m}, --maxvel
{x=s.x-p.x, y=s.y-p.y-1, z=s.z-p.z}, --minacc
{x=s.x-p.x, y=s.y-p.y-1, z=s.z-p.z}, --maxacc
0.5, --minexptime
0.5, --maxexptime
10, --minsize
10, --maxsize
false, --collisiondetection
nname --texture
)
minetest.after(1, function (self)
if self then
local armor_stack = armor_inv:get_stack("armor",
armor_elements[steal_pos].pos)
armor_stack:take_item()
armor_inv:set_stack("armor",
armor_elements[steal_pos].pos, armor_stack)
armor_stack = armor_inv:get_stack("armor",
armor_elements[steal_pos].pos)
armor_stack:take_item()
armor_inv:set_stack("armor",
armor_elements[steal_pos].pos, armor_stack)
local armor_stack = player_inv:get_stack("armor", armor_elements[steal_pos].pos)
armor_stack:take_item()
player_inv:set_stack('armor', armor_elements[steal_pos].pos, armor_stack)
armor:set_player_armor(self.attack, self.attack)
--armor:update_armor(self.attack)
armor:update_inventory(self.attack)
--armor:update_player_visuals(self.attack)
armor_stack = armor_inv:get_stack("armor", armor_elements[steal_pos].pos)
armor_stack:take_item()
armor_inv:set_stack('armor', armor_elements[steal_pos].pos, armor_stack)
armor:set_player_armor(self.attack, self.attack)
--armor:update_armor(self.attack)
armor:update_inventory(self.attack)
--armor:update_player_visuals(self.attack)
--Update personal inventory of armors:
if self.invnum ~= nil and self.invnum <= 5 then
if (self.invnum ~= nil) and (self.invnum <= 5) then
--minetest.chat_send_all("Invnum: "..self.invnum)
--minetest.chat_send_all("Salvo: "..armor_elements[steal_pos].name)
self.invnum = self.invnum + 1
self.inventory[self.invnum].name =
armor_elements[steal_pos].name
self.inventory[self.invnum].name = armor_elements[steal_pos].name
end
mobs:set_animation(self, "run")
set_animation(self, "run")
self.flag = 1
self.morlu_timer = os.time()
self.curr_attack = self.attack
self.state = ""
local pyaw = self.curr_attack:get_look_horizontal() +
math.pi / 2
local pyaw = self.curr_attack: get_look_yaw()
self.dir = pyaw
self.object:set_yaw(pyaw)
self.object:setyaw(pyaw)
if self then
self:set_velocity(4)
set_velocity(self, 4)
end
end
end, self)
end,self)
end
end
else
local s = self.object:get_pos()
local p = self.attack:get_pos()
local s = self.object:getpos()
local p = self.attack:getpos()
mobs:set_animation(self, "punch")
if minetest.line_of_sight(
{x = p.x, y = p.y +1.5, z = p.z},
{x = s.x, y = s.y +1.5, z = s.z}) == true then
set_animation(self, "punch")
if minetest.line_of_sight({x = p.x, y = p.y +1.5, z = p.z}, {x = s.x, y = s.y +1.5, z = s.z}) == true then
-- play attack sound
if self.sounds.attack then
minetest.sound_play(self.sounds.attack, {
object = self.object,
max_hear_distance = self.sounds.distance
}, true)
})
end
-- punch player
self.attack:punch(self.object, 1.0, {
full_punch_interval = 1.0,
damage_groups = {fleshy = self.damage}
self.attack:punch(self.object, 1.0, {
full_punch_interval=1.0,
damage_groups = {fleshy=self.damage}
}, nil)
end
end
end
end
end,
on_die = function(self)
local pos = self.object:get_pos()
local pos = self.object:getpos()
if (self.inventory ~= nil) then
if self.invnum > 0 then
for i = 1, self.invnum do
local items = ItemStack(self.inventory[i].name .. " 1")
for i=1,self.invnum do
local items = ItemStack(self.inventory[i].name.." 1")
local obj = minetest.add_item(pos, items)
obj:set_velocity({
x = math.random(-1, 1),
y = 6,
z = math.random(-1, 1)
})
obj:setvelocity({
x = math.random(-1, 1),
y = 6,
z = math.random(-1, 1)
})
end
end
end
self.object:remove()
end
end,
})

File diff suppressed because it is too large Load Diff

View File

@ -5,24 +5,28 @@ mobs:register_mob("nssm:morvy", {
collisionbox = {-0.3, -0.1, -0.3, 0.3, 2.3, 0.3},
visual = "mesh",
mesh = "morvy.x",
textures = {
{"morvy.png"}
},
visual_size = {x = 6, y = 6},
textures = {{"morvy.png"}},
visual_size = {x=6, y=6},
makes_footstep_sound = true,
view_range = 35,
fear_height = 5,
walk_velocity = 0.7,
run_velocity = 2,
rotate = 270,
rotate = 270,
damage = 4,
sounds = {
random = "morvy"
random = "morvy",
},
jump = true,
drops = {
{name = "nssm:life_energy", chance = 1, min = 5, max = 7},
{name = "nssm:envious_soul_fragment", chance = 3, min = 1, max = 1}
{name = "nssm:life_energy",
chance = 1,
min = 5,
max = 7,},
{name = "nssm:envious_soul_fragment",
chance = 3,
min = 1,
max = 1,},
},
reach = 8,
armor = 60,
@ -30,12 +34,12 @@ mobs:register_mob("nssm:morvy", {
water_damage = 0,
lava_damage = 0,
light_damage = 0,
fire_damage = 0,
group_attack = true,
attack_animals = true,
knock_back = 1,
blood_texture = "morparticle.png",
stepheight = 1.1,
group_attack=true,
attack_animals=true,
knock_back=1,
blood_texture="morparticle.png",
stepheight=1.1,
on_rightclick = nil,
attack_type = "dogfight",
animation = {
speed_normal = 20,
@ -47,29 +51,23 @@ mobs:register_mob("nssm:morvy", {
run_start = 50,
run_end = 90,
punch_start = 100,
punch_end = 130
punch_end = 130,
},
custom_attack = function(self)
mobs:set_animation(self, "stand")
set_animation(self, "stand")
self.morvy_counter = (self.morvy_counter or 0) + 1
if self.morvy_counter == 4 then
mobs:set_animation(self, "punch")
set_animation(self, "punch")
self.morvy_counter = 0
local counter = 0
local s = self.object:get_pos()
local p = self.attack:get_pos()
local s = self.object:getpos()
local p = self.attack:getpos()
p.y = p.y + 1.5
s.y = s.y + 1.5
if mobs:line_of_sight(self, p, s) == true then
if line_of_sight_water(self, p, s) == true then
--[[play attack sound
if self.sounds.attack then
minetest.sound_play(self.sounds.attack, {
@ -77,31 +75,20 @@ mobs:register_mob("nssm:morvy", {
max_hear_distance = self.sounds.distance
})
end]]
local pos1 = {x=s.x+math.random(-0.5,0.5), y=s.y+0.2, z=s.z+math.random(-0.5,0.5)}
local pos1 = {
x = s.x + math.random(-0.5, 0.5),
y = s.y + 0.2,
z = s.z + math.random(-0.5, 0.5)
}
local objects = minetest.get_objects_inside_radius(s, 10)
for _,obj in ipairs(objects) do
if (obj:get_luaentity()
and ((obj:get_luaentity().name == "nssm:morbat1")
or (obj:get_luaentity().name == "nssm:morbat2")
or (obj:get_luaentity().name == "nssm:morbat3"))) then
counter = counter + 1
local objects = minetest.env:get_objects_inside_radius(s, 10)
for _,obj in ipairs(objects) do
if (obj:get_luaentity() and ((obj:get_luaentity().name == "nssm:morbat1") or (obj:get_luaentity().name == "nssm:morbat2") or (obj:get_luaentity().name == "nssm:morbat3"))) then
counter = counter + 1
end
end
if minetest.get_node(pos1).name == "air"
and counter < 5 then
end
if (minetest.env:get_node(pos1).name == "air")
and (counter < 5)
then
local bat
local which = math.random(1, 3)
local which = math.random(1,3)
if which == 1 then
bat = "nssm:morbat1"
elseif which == 2 then
@ -109,35 +96,33 @@ mobs:register_mob("nssm:morvy", {
elseif which == 3 then
bat = "nssm:morbat3"
end
if (bat=="nssm:morbat3") then
pos1.y = pos1.y + 1.5
pos1.y=pos1.y+1.5
end
minetest.add_entity(pos1, bat)
minetest.add_particlespawner({
amount = 20,
time = 0.1,
minpos = {x = pos1.x - 0.2, y = pos1.y - 0.2, z = pos1.z - 0.2},
maxpos = {x = pos1.x + 0.2, y = pos1.y + 0.2, z = pos1.z + 0.2},
minvel = {x = 0, y = 0, z = 0},
maxvel = {x = 0.1, y = 0.3, z = 0.1},
minacc = {x = -0.5, y = 1, z = -0.5},
maxacc = {x = 0.5, y = 1, z = 0.5},
minexptime = 0.1,
maxexptime = 4,
minsize = 2,
maxsize = 6,
collisiondetection = false,
texture = "morparticle.png"
})
minetest.add_particlespawner(
20, --amount
0.1, --time
{x=pos1.x-0.2, y=pos1.y-0.2, z=pos1.z-0.2}, --minpos
{x=pos1.x+0.2, y=pos1.y+0.2, z=pos1.z+0.2}, --maxpos
{x=0, y=0, z=0}, --minvel
{x=0.1, y=0.3, z=0.1}, --maxvel
{x=-0.5,y=1,z=-0.5}, --minacc
{x=0.5,y=1,z=0.5}, --maxacc
0.1, --minexptime
4, --maxexptime
2, --minsize
6, --maxsize
false, --collisiondetection
"morparticle.png" --texture
)
end
end
end
end
})
--Morbats
mobs:register_mob("nssm:morbat1", {
@ -147,15 +132,13 @@ mobs:register_mob("nssm:morbat1", {
collisionbox = {-0.1, 0.2, -0.1, 0.1, 0.4, 0.1},
visual = "mesh",
mesh = "morbat.x",
textures = {
{"morbat1.png"}
},
visual_size = {x = 2, y = 2},
textures = {{"morbat1.png"}},
visual_size = {x=2, y=2},
view_range = 40,
walk_velocity = 0.5,
run_velocity = 3,
fall_speed = 0,
stepheight = 3,
fall_speed = 0,
stepheight = 3,
--[[ sounds = {
random = "duck",
},]]
@ -164,16 +147,19 @@ mobs:register_mob("nssm:morbat1", {
jump = true,
rotate = 270,
drops = {
{name = "nssm:life_energy", chance = 1, min = 1, max = 2}
{name = "nssm:life_energy",
chance = 1,
min = 1,
max = 2,},
},
armor = 80,
drawtype = "front",
water_damage = 0,
lava_damage = 0,
fire_damage = 0,
light_damage = 0,
blood_texture="morparticle.png",
fly = true,
on_rightclick = nil,
fly = true,
attack_type = "dogfight",
animation = {
speed_normal = 25,
@ -185,7 +171,7 @@ mobs:register_mob("nssm:morbat1", {
run_start = 10,
run_end = 50,
punch_start = 100,
punch_end = 115
punch_end = 115,
}
})
@ -196,15 +182,13 @@ mobs:register_mob("nssm:morbat2", {
collisionbox = {-0.1, 0.2, -0.1, 0.1, 0.4, 0.1},
visual = "mesh",
mesh = "morbat.x",
textures = {
{"morbat2.png"}
},
visual_size = {x = 2, y = 2},
textures = {{"morbat2.png"}},
visual_size = {x=2, y=2},
view_range = 40,
walk_velocity = 0.5,
run_velocity = 3,
fall_speed = 0,
stepheight = 3,
fall_speed = 0,
stepheight = 3,
--[[ sounds = {
random = "duck",
},]]
@ -213,16 +197,19 @@ mobs:register_mob("nssm:morbat2", {
jump = true,
rotate = 270,
drops = {
{name = "nssm:life_energy", chance = 1, min = 1, max = 2}
{name = "nssm:life_energy",
chance = 1,
min = 1,
max = 2,},
},
armor = 100,
drawtype = "front",
water_damage = 0,
lava_damage = 0,
fire_damage = 0,
light_damage = 0,
blood_texture="morparticle.png",
fly = true,
on_rightclick = nil,
fly = true,
attack_type = "explode",
explosion_radius = 3,
animation = {
@ -235,7 +222,7 @@ mobs:register_mob("nssm:morbat2", {
run_start = 10,
run_end = 50,
punch_start = 100,
punch_end = 115
punch_end = 115,
}
})
@ -247,15 +234,13 @@ mobs:register_mob("nssm:morbat3", {
collisionbox = {-0.1, 0.2, -0.1, 0.1, 0.4, 0.1},
visual = "mesh",
mesh = "morbat.x",
textures = {
{"morbat3.png"}
},
visual_size = {x = 2, y = 2},
textures = {{"morbat3.png"}},
visual_size = {x=2, y=2},
view_range = 40,
walk_velocity = 0.5,
run_velocity = 3,
fall_speed = 0,
stepheight = 3,
fall_speed = 0,
stepheight = 3,
--[[ sounds = {
random = "duck",
},]]
@ -264,16 +249,19 @@ mobs:register_mob("nssm:morbat3", {
jump = true,
rotate = 270,
drops = {
{name = "nssm:life_energy", chance = 1, min = 1, max = 2}
{name = "nssm:life_energy",
chance = 1,
min = 1,
max = 2,},
},
armor = 100,
drawtype = "front",
water_damage = 0,
lava_damage = 0,
fire_damage = 0,
light_damage = 0,
blood_texture = "morparticle.png",
fly = true,
blood_texture="morparticle.png",
on_rightclick = nil,
fly = true,
attack_type = "shoot",
arrow = "nssm:morarrow",
shoot_interval = 3,
@ -287,6 +275,6 @@ mobs:register_mob("nssm:morbat3", {
run_start = 10,
run_end = 50,
punch_start = 100,
punch_end = 115
punch_end = 115,
}
})

View File

@ -5,42 +5,46 @@ mobs:register_mob("nssm:morwa", {
collisionbox = {-1, -0.1, -1, 1, 3, 1},
visual = "mesh",
mesh = "morwa.x",
textures = {
{"morwa.png"}
},
visual_size = {x = 10, y = 10},
textures = {{"morwa.png"}},
visual_size = {x=10, y=10},
makes_footstep_sound = true,
view_range = 25,
fear_height = 4,
walk_velocity = 0.5,
run_velocity = 4,
sounds = {
random = "morwa"
random = "morwa",
},
damage = 8,
jump = true,
drops = {
{name = "nssm:life_energy", chance = 1, min = 3, max = 4},
{name = "nssm:wrathful_soul_fragment", chance = 3, min = 1, max = 1}
{name = "nssm:life_energy",
chance = 1,
min = 3,
max = 4,},
{name = "nssm:wrathful_soul_fragment",
chance = 3,
min = 1,
max = 1,},
},
armor = 50,
drawtype = "front",
water_damage = 0,
reach = 4,
reach =4,
rotate = 270,
lava_damage = 0,
fire_damage = 0,
light_damage = 0,
group_attack = true,
attack_animals = true,
knock_back = 1,
blood_texture = "morparticle.png",
stepheight = 1.1,
group_attack=true,
attack_animals=true,
knock_back=1,
blood_texture="morparticle.png",
stepheight=1.1,
on_rightclick = nil,
attack_type = "dogshoot",
dogshoot_switch = true,
arrow = "nssm:morarrow",
shoot_interval = 2,
shoot_offset = 0,
arrow = "nssm:morarrow",
shoot_interval = 2,
shoot_offset = 0,
animation = {
speed_normal = 25,
speed_run = 25,
@ -52,19 +56,16 @@ mobs:register_mob("nssm:morwa", {
run_end = 120,
punch_start = 130,
punch_end = 160,
shoot_start =176,
shoot_end=226
shoot_start =176,
shoot_end=226,
},
do_custom = function (self)
local pos = self.object:get_pos()
local pos = self.object:getpos()
local light = minetest.get_node_light(pos)
--minetest.chat_send_all("Luce: "..light)
if light < 8 then
if (light < 8) then
self.object:remove()
minetest.set_node(pos, {name = "nssm:morwa_statue"})
minetest.env:set_node(pos, {name="nssm:morwa_statue"})
end
end
end,
})

View File

@ -5,10 +5,8 @@ mobs:register_mob("nssm:night_master", {
collisionbox = {-0.65, -0.4, -0.65, 0.65, 0.4, 0.65},
visual = "mesh",
mesh = "moonherontrio.x",
textures = {
{"moonherontrio.png"}
},
visual_size = {x = 18, y = 18},
textures = {{"moonherontrio.png"}},
visual_size = {x=18, y=18},
view_range = 40,
rotate = 270,
lifetimer = 500,
@ -19,7 +17,7 @@ mobs:register_mob("nssm:night_master", {
stepheight = 3,
sounds = {
random = "night_master",
distance = 45
distance = 45,
},
damage = 10,
jump = false,
@ -27,10 +25,10 @@ mobs:register_mob("nssm:night_master", {
drawtype = "front",
water_damage = 0,
lava_damage = 5,
fire_damage = 5,
light_damage = 0,
blood_texture = "nssm_blood.png",
blood_amount = 50,
blood_texture="nssm_blood.png",
blood_amount=50,
on_rightclick = nil,
fly = true,
attack_type = "dogfight",
animation = {
@ -43,116 +41,39 @@ mobs:register_mob("nssm:night_master", {
run_start = 20,
run_end = 50,
punch_start = 130,
punch_end = 160
punch_end = 160,
},
on_die = function(self, pos)
minetest.add_particlespawner({
amount = 200,
time = 0.1,
minpos = {x = pos.x - 1, y = pos.y - 1, z = pos.z - 1},
maxpos = {x = pos.x + 1, y = pos.y + 1, z = pos.z + 1},
minvel = {x = -0, y = -0, z = -0},
maxvel = {x = 1, y = 1, z = 1},
minacc = {x = -0.5, y = 5, z = -0.5},
maxacc = {x = 0.5, y = 5, z = 0.5},
minexptime = 0.1,
maxexptime = 1,
minsize = 3,
maxsize = 4,
collisiondetection = false,
texture = "tnt_smoke.png"
})
minetest.add_particlespawner(
200, --amount
0.1, --time
{x=pos.x-1, y=pos.y-1, z=pos.z-1}, --minpos
{x=pos.x+1, y=pos.y+1, z=pos.z+1}, --maxpos
{x=-0, y=-0, z=-0}, --minvel
{x=1, y=1, z=1}, --maxvel
{x=-0.5,y=5,z=-0.5}, --minacc
{x=0.5,y=5,z=0.5}, --maxacc
0.1, --minexptime
1, --maxexptime
3, --minsize
4, --maxsize
false, --collisiondetection
"tnt_smoke.png" --texture
)
self.object:remove()
minetest.add_entity(pos, "nssm:night_master_2")
end
end,
})
mobs:register_mob("nssm:night_master_2", {
type = "monster",
hp_max = 60,
hp_min = 60,
collisionbox = {-0.65, -0.4, -0.65, 0.65, 0.4, 0.65},
visual = "mesh",
mesh = "night_master_2.x",
textures = {
{"moonherontrio.png"}
},
visual_size = {x = 18, y = 18},
view_range = 40,
rotate = 270,
lifetimer = 500,
floats = 1,
walk_velocity = 3,
run_velocity = 4,
fall_speed = 0,
stepheight = 3,
sounds = {
random = "night_master",
distance = 45
},
damage = 10,
jump = false,
armor = 60,
drawtype = "front",
water_damage = 0,
lava_damage = 5,
fire_damage = 5,
light_damage = 0,
fly = true,
attack_type = "dogfight",
animation = {
speed_normal = 25,
speed_run = 35,
stand_start = 60,
stand_end = 120,
walk_start = 20,
walk_end = 50,
run_start = 20,
run_end = 50,
punch_start = 130,
punch_end = 160
},
on_die = function(self, pos)
minetest.add_particlespawner({
amount = 200,
time = 0.1,
minpos = {x = pos.x - 1, y = pos.y - 1, z = pos.z - 1},
maxpos = {x = pos.x + 1, y = pos.y + 1, z = pos.z + 1},
minvel = {x = -0, y = -0, z = -0},
maxvel = {x = 1, y = 1, z = 1},
minacc = {x = -0.5, y = 5, z = -0.5},
maxacc = {x = 0.5, y = 5, z = 0.5},
minexptime = 0.1,
maxexptime = 1,
minsize = 3,
maxsize = 4,
collisiondetection = false,
texture = "tnt_smoke.png"
})
self.object:remove()
minetest.add_entity(pos, "nssm:night_master_1")
end
})
mobs:register_mob("nssm:night_master_1", {
type = "monster",
hp_max = 70,
hp_min = 70,
collisionbox = {-0.65, -0.4, -0.65, 0.65, 0.4, 0.65},
visual = "mesh",
mesh = "night_master_1.x",
textures = {
{"moonherontrio.png"}
},
visual_size = {x = 18, y = 18},
mesh = "night_master_2.x",
textures = {{"moonherontrio.png"}},
visual_size = {x=18, y=18},
view_range = 40,
rotate = 270,
lifetimer = 500,
@ -163,21 +84,95 @@ mobs:register_mob("nssm:night_master_1", {
stepheight = 3,
sounds = {
random = "night_master",
distance = 45
distance = 45,
},
damage = 11,
jump = false,
armor = 60,
drawtype = "front",
water_damage = 0,
lava_damage = 5,
light_damage = 0,
on_rightclick = nil,
fly = true,
attack_type = "dogfight",
animation = {
speed_normal = 25,
speed_run = 35,
stand_start = 60,
stand_end = 120,
walk_start = 20,
walk_end = 50,
run_start = 20,
run_end = 50,
punch_start = 130,
punch_end = 160,
},
on_die = function(self, pos)
minetest.add_particlespawner(
200, --amount
0.1, --time
{x=pos.x-1, y=pos.y-1, z=pos.z-1}, --minpos
{x=pos.x+1, y=pos.y+1, z=pos.z+1}, --maxpos
{x=-0, y=-0, z=-0}, --minvel
{x=1, y=1, z=1}, --maxvel
{x=-0.5,y=5,z=-0.5}, --minacc
{x=0.5,y=5,z=0.5}, --maxacc
0.1, --minexptime
1, --maxexptime
3, --minsize
4, --maxsize
false, --collisiondetection
"tnt_smoke.png" --texture
)
self.object:remove()
minetest.add_entity(pos, "nssm:night_master_1")
end,
})
mobs:register_mob("nssm:night_master_1", {
type = "monster",
hp_max = 80,
hp_min = 80,
collisionbox = {-0.65, -0.4, -0.65, 0.65, 0.4, 0.65},
visual = "mesh",
mesh = "night_master_1.x",
textures = {{"moonherontrio.png"}},
visual_size = {x=18, y=18},
view_range = 40,
rotate = 270,
lifetimer = 500,
floats=1,
walk_velocity = 3,
run_velocity = 4,
fall_speed = 0,
stepheight = 3,
sounds = {
random = "night_master",
distance = 45,
},
damage = 12,
jump = false,
drops = {
{name = "nssm:life_energy", chance = 1, min = 6, max = 7},
{name = "nssm:heron_leg", chance = 1, min = 1, max = 1},
{name = "nssm:night_feather", chance = 1, min = 1, max = 1}
{name = "nssm:life_energy",
chance = 1,
min = 50,
max = 60,},
{name = "nssm:heron_leg",
chance = 1,
min = 1,
max = 1,},
{name = "nssm:night_feather",
chance = 1,
min = 1,
max = 1,},
},
armor = 50,
drawtype = "front",
water_damage = 0,
lava_damage = 5,
fire_damage = 5,
light_damage = 0,
on_rightclick = nil,
fly = true,
attack_type = "dogfight",
animation = {
@ -190,6 +185,6 @@ mobs:register_mob("nssm:night_master_1", {
run_start = 20,
run_end = 50,
punch_start = 130,
punch_end = 160
punch_end = 160,
}
})

View File

@ -1,17 +1,15 @@
mobs:register_mob("nssm:octopus", {
type = "monster",
hp_max = 32,
hp_min = 25,
hp_max = 24,
hp_min = 22,
collisionbox = {-0.9, -0.5, -0.9, 0.9, 0.92, 0.9},
visual = "mesh",
mesh = "octopus.x",
textures = {
{"octopus.png"}
},
visual_size = {x = 4, y = 4},
textures = {{"octopus.png"}},
visual_size = {x=4, y=4},
view_range = 25,
fly = true,
fly_in = {"default:water_source", "default:water_flowing"},
fly_in = "default:water_source",
fall_speed = -20,
walk_velocity = 1.5,
run_velocity = 3,
@ -21,23 +19,29 @@ mobs:register_mob("nssm:octopus", {
jump = false,
jump_chance = 0,
jump_height = 0,
sounds = {
sounds = {
random = "octopus",
},
drops = {
{name = "nssm:life_energy", chance = 1, min = 2, max = 3},
{name = "nssm:tentacle", chance = 1, min = 1, max = 8}
{name = "nssm:life_energy",
chance = 1,
min = 2,
max = 3,},
{name = "nssm:tentacle",
chance = 1,
min = 1,
max = 8,},
},
armor = 70,
drawtype = "front",
water_damage = 0,
lava_damage = 10,
fire_damage = 10,
light_damage = 0,
group_attack = true,
attack_animals = true,
knock_back = 2,
blood_texture = "nssm_blood_blue.png",
group_attack=true,
attack_animals=true,
knock_back=2,
blood_texture="nssm_blood_blue.png",
on_rightclick = nil,
attack_type = "dogfight",
animation = {
speed_normal = 25,
@ -49,7 +53,7 @@ mobs:register_mob("nssm:octopus", {
run_start = 60,
run_end = 100,
punch_start = 120,
punch_end = 160
punch_end = 160,
}
})
@ -60,13 +64,11 @@ mobs:register_mob("nssm:xgaloctopus", {
collisionbox = {-0.25, -0.25, -0.25, 0.25, 0.25, 0.25},
visual = "mesh",
mesh = "octopus.x",
textures = {
{"xgaloctopus.png"}
},
visual_size = {x = 1, y = 1},
textures = {{"xgaloctopus.png"}},
visual_size = {x=1, y=1},
view_range = 25,
fly = true,
fly_in = {"default:water_source", "default:water_flowing"},
fly_in = "default:water_source",
fall_speed = -20,
walk_velocity = 1.5,
run_velocity = 3,
@ -77,22 +79,28 @@ mobs:register_mob("nssm:xgaloctopus", {
jump_chance = 0,
jump_height = 0,
sounds = {
random = "octopus"
random = "octopus",
},
drops = {
{name = "nssm:life_energy", chance = 1, min = 2, max = 3},
{name = "nssm:tentacle", chance = 1, min = 1, max = 8}
{name = "nssm:life_energy",
chance = 1,
min = 2,
max = 3,},
{name = "nssm:tentacle",
chance = 1,
min = 1,
max = 8,},
},
armor = 60,
drawtype = "front",
water_damage = 0,
lava_damage = 10,
fire_damage = 10,
light_damage = 0,
group_attack = true,
attack_animals = true,
knock_back = 2,
blood_texture = "nssm_blood_blue.png",
on_rightclick = nil,
group_attack=true,
attack_animals=true,
knock_back=2,
blood_texture="nssm_blood_blue.png",
attack_type = "dogfight",
animation = {
speed_normal = 25,
@ -104,10 +112,10 @@ mobs:register_mob("nssm:xgaloctopus", {
run_start = 60,
run_end = 100,
punch_start = 120,
punch_end = 160
punch_end = 160,
},
replace_rate = 1,
replace_what = {"default:torch"},
replace_with = "default:water_source",
replace_offset = 0
replace_offset = 0,
})

51
mobs/pelagia.lua Normal file
View File

@ -0,0 +1,51 @@
mobs:register_mob("nssm:pelagia", {
type = "monster",
hp_max = 44,
hp_min = 42,
collisionbox = {-0.9, -0.5, -0.9, 0.9, 0.92, 0.9},
visual = "mesh",
mesh = "pelagia.x",
textures = {{"pelagia.png"}},
visual_size = {x=4, y=4},
view_range =5,
fly = true,
fly_in = "default:water_source",
fall_speed = -20,
walk_velocity = 0.2,
run_velocity = 1,
damage = 6,
reach = 1,
rotate = 270,
jump = false,
jump_chance = 0,
jump_height = 0,
drops = {
{name = "nssm:life_energy",
chance = 1,
min = 2,
max = 7,},
},
armor = 100,
drawtype = "front",
water_damage = 0,
lava_damage = 10,
light_damage = 0,
group_attack=true,
attack_animals=false,
knock_back=4,
blood_texture="nssm_blood_blue.png",
on_rightclick = nil,
attack_type = "dogfight",
animation = {
speed_normal = 25,
speed_run = 35,
stand_start = 1,
stand_end = 80,
walk_start = 1,
walk_end = 80,
run_start = 100,
run_end = 120,
punch_start = 140,
punch_end = 180,
}
})

View File

@ -5,13 +5,11 @@ mobs:register_mob("nssm:phoenix", {
collisionbox = {-0.65, -0.4, -0.65, 0.65, 0.4, 0.65},
visual = "mesh",
mesh = "phoenix.x",
textures = {
{"phoenix.png"}
},
visual_size = {x = 18, y = 18},
view_range = 40,
textures = {{"phoenix.png"}},
visual_size = {x=18, y=18},
view_range = 50,
lifetimer = 500,
floats = 1,
floats=1,
rotate = 270,
walk_velocity = 2,
run_velocity = 2.5,
@ -19,28 +17,39 @@ mobs:register_mob("nssm:phoenix", {
stepheight = 3,
sounds = {
random = "phoenix",
distance = 45
distance = 45,
},
damage = 2,
jump = false,
drops = {
{name = "nssm:life_energy", chance = 1, min = 7, max = 8},
{name = "nssm:sun_feather", chance = 1, min = 1, max = 1},
{name = "nssm:phoenix_tear", chance = 1, min = 5, max = 6},
{name = "nssm:phoenix_nuggets", chance = 6, min = 10, max = 20}
{name = "nssm:life_energy",
chance = 1,
min = 70,
max = 80,},
{name = "nssm:sun_feather",
chance = 1,
min = 1,
max = 1,},
{name = "nssm:phoenix_tear",
chance = 1,
min = 5,
max = 6,},
{name = "nssm:phoenix_nuggets",
chance = 6,
min = 20,
max = 30,},
},
armor = 40,
drawtype = "front",
water_damage = .1,
water_damage = 5,
lava_damage = 0,
fire_damage = 0,
light_damage = 0,
blood_texture = "nssm_blood.png",
blood_amount = 50,
blood_texture="nssm_blood.png",
blood_amount=50,
on_rightclick = nil,
fly = true,
attack_type = "shoot",
arrow = "nssm:phoenix_arrow",
reach = 1,
attack_type = "dogfight",
reach = 15,
shoot_interval = 4,
animation = {
speed_normal = 25,
@ -54,6 +63,89 @@ mobs:register_mob("nssm:phoenix", {
punch_start = 80,
punch_end = 110,
shoot_start = 80,
shoot_end = 110
}
shoot_end = 110,
},
custom_attack = function(self)
local p = self.attack:getpos()
local s = self.object:getpos()
local vel = vector.subtract(p,s)
set_animation(self, "shoot")
minetest.add_particlespawner(
125, --amount
0.5, --time
s, --minpos
s, --maxpos
vector.multiply(vel, 0.5), --minvel
vector.multiply(vel, 1.4), --maxvel
{x=0,y=0,z=0}, --minacc
{x=0,y=0,z=0}, --maxacc
2, --minexptime
4, --maxexptime
10, --minsize
20, --maxsize
true, --collisiondetection
"phoenix_fire.png" --texture
)
local obj = minetest.add_entity(s, "nssm:phoenix_dart")
local ran = math.random(7,14)/10
local vec = vector.multiply(vel, ran)
obj:setvelocity(vec)
minetest.after(0.5, function()
if self.attack then
local p = self.attack:getpos()
local vel = vector.subtract(p,s)
local obj = minetest.add_entity(s, "nssm:phoenix_dart")
local ran = math.random(7,14)/10
local vec = vector.multiply(vel, ran)
obj:setvelocity(vec)
end
end)
end,
do_custom = function (self)
--minetest.chat_send_all(s.y.."-"..p.y.."="..(s.y-p.y))
if self.state == "attack" then
if self.attack then
local s = self.object:getpos()
local p = self.attack:getpos()
if (s.y - p.y ) < 10 then
local v = self.object:getvelocity()
v.y = 10
self.object:setvelocity(v)
end
end
end
end,
})
minetest.register_entity("nssm:phoenix_dart", {
textures = {"transparent.png"},
on_step = function(self, dtime)
self.timer = (self.timer) or os.time()
self.attack = (self.attack) or os.time()
if os.time() - self.timer > 4 then
self.object:remove()
end
local p = self.object:getpos()
local all_objects = minetest.get_objects_inside_radius(p, 1)
local players = {}
local _,obj
for _,obj in ipairs(all_objects) do
if obj:is_player() then
obj:punch(self.object, 1.0, {
full_punch_interval = 1.0,
damage_groups = {fleshy = 7}
}, nil)
self.object:remove()
end
end
local node = minetest.get_node(p).name
if node ~= "air" then
self.object:remove()
end
end,
})

View File

@ -1,88 +1,180 @@
local function register_pumpboom(sizename, params)
mobs:register_mob("nssm:pumpboom_" .. sizename, {
type = "monster",
hp_min = params.hp_min,
hp_max = params.hp_max,
collisionbox = params.collisionbox,
visual = "mesh",
mesh = "pumpboom.x",
rotate = 270,
textures = {{"pumpboom.png"}},
visual_size = params.visual_size,
explosion_radius = params.boom_radius,
makes_footstep_sound = true,
view_range = params.view_range,
fear_height = 4,
walk_velocity = 2,
run_velocity = 2.5,
sounds = {
explode = "tnt_explode"
},
damage = 1.5,
jump = true,
drops = params.drops,
armor = 100,
drawtype = "front",
water_damage = 2,
lava_damage = 5,
light_damage = 0,
group_attack = true,
attack_animals = true,
knock_back=2,
blood_texture = "nssm_blood.png",
stepheight = 1.1,
attack_type = "explode",
animation = {
speed_normal = 25,
speed_run = 25,
stand_start = 1,
stand_end = 30,
walk_start = 81,
walk_end = 97,
run_start = 81,
run_end = 97,
punch_start = 70,
punch_end = 80
}
})
end
register_pumpboom("small",{
hp_min = 14,
hp_max = 15,
visual_size = {x = 3, y = 3},
collisionbox = {-0.45, -0.3, -0.45, 0.45, 0.45, 0.45},
boom_radius = 4,
mobs:register_mob("nssm:pumpboom_small", {
type = "monster",
hp_max = 10,
hp_min = 9,
collisionbox = {-0.30, -0.3, -0.30, 0.30, 0.30, 0.30},
visual = "mesh",
mesh = "pumpboom.x",
rotate = 270,
textures = {{"pump.png"}},
visual_size = {x=2, y=2},
explosion_radius = 2,
makes_footstep_sound = true,
view_range = 20,
fear_height = 4,
walk_velocity = 1,
run_velocity = 2.5,
sounds = {
explode = "tnt_explode",
random = "pumpboom",
},
damage = 1.5,
jump = true,
drops = {
{name = "nssm:life_energy", chance = 1, min = 1, max = 2},
{name = "nssm:black_powder", chance = 2, min = 1, max = 2}
{name = "nssm:life_energy",
chance = 1,
min = 1,
max = 2,},
{name = "nssm:black_powder",
chance = 3,
min = 1,
max = 1,},
},
armor = 100,
drawtype = "front",
water_damage = 2,
lava_damage = 15,
suffocation = 4,
light_damage = 0,
group_attack=true,
attack_animals=false,
knock_back=2,
blood_texture="nssm_blood.png",
stepheight=1.1,
on_rightclick = nil,
attack_type = "explode",
animation = {
speed_normal = 20,
speed_run = 20,
stand_start = 1,
stand_end = 30,
walk_start = 81,
walk_end = 97,
run_start = 81,
run_end = 97,
punch_start = 70,
punch_end = 80,
die_start = 40,
die_end = 60,
}
})
register_pumpboom("medium",{
hp_min = 17,
mobs:register_mob("nssm:pumpboom_medium", {
type = "monster",
hp_max = 18,
visual_size = {x = 5, y = 5},
collisionbox = {-0.7, -0.3, -0.7, 0.7, 0.7, 0.7},
boom_radius = 6,
hp_min = 17,
collisionbox = {-0.50, -0.3, -0.50, 0.50, 0.50, 0.50},
visual = "mesh",
mesh = "pumpboom.x",
rotate = 270,
textures = {{"pump.png"}},
visual_size = {x=4, y=4},
makes_footstep_sound = true,
view_range = 25,
walk_velocity = 1.5,
explosion_radius = 3,
run_velocity = 2.5,
sounds = {
explode = "tnt_explode",
random = "pumpboom",
},
damage = 1.5,
jump = true,
drops = {
{name = "nssm:life_energy", chance = 1, min = 2, max = 3},
{name = "nssm:black_powder", chance = 2, min = 1, max = 3}
{name = "nssm:life_energy",
chance = 1,
min = 2,
max = 3,},
{name = "nssm:black_powder",
chance = 2,
min = 1,
max = 3,},
},
armor = 100,
drawtype = "front",
water_damage = 4,
lava_damage = 15,
light_damage = 0,
suffocation = 4,
group_attack=true,
attack_animals=false,
knock_back=2,
blood_texture="nssm_blood.png",
stepheight=1.1,
on_rightclick = nil,
attack_type = "explode",
animation = {
speed_normal = 20,
speed_run = 20,
stand_start = 1,
stand_end = 30,
walk_start = 81,
walk_end = 97,
run_start = 81,
run_end = 97,
punch_start = 70,
punch_end = 80,
die_start = 40,
die_end = 60,
}
})
register_pumpboom("large",{
hp_min = 19,
mobs:register_mob("nssm:pumpboom_large", {
type = "monster",
hp_max = 20,
visual_size = {x = 8, y = 8},
collisionbox = {-1.2, -0.3, -1.2, 1.2, 1.2, 1.2},
boom_radius = 8,
hp_min = 19,
collisionbox = {-0.60, -0.3, -0.60, 0.60, 0.60, 0.60},
visual = "mesh",
mesh = "pumpboom.x",
rotate = 270,
explosion_radius = 5,
textures = {{"pump.png"}},
visual_size = {x=6, y=6},
makes_footstep_sound = true,
view_range = 30,
walk_velocity = 2,
run_velocity = 3,
sounds = {
explode = "tnt_explode",
random = "pumpboom",
},
damage = 1.5,
jump = true,
drops = {
{name = "nssm:life_energy", chance = 1, min = 3, max = 4},
{name = "nssm:black_powder", chance = 2, min = 2, max = 4}
{name = "nssm:life_energy",
chance = 1,
min = 3,
max = 4,},
{name = "nssm:black_powder",
chance = 2,
min = 2,
max = 5,},
},
armor = 100,
drawtype = "front",
water_damage = 4,
lava_damage = 15,
light_damage = 0,
suffocation = 4,
group_attack=true,
attack_animals=false,
knock_back=2,
blood_texture="nssm_blood.png",
stepheight=1.1,
on_rightclick = nil,
attack_type = "explode",
animation = {
speed_normal = 20,
speed_run = 20,
stand_start = 1,
stand_end = 30,
walk_start = 81,
walk_end = 97,
run_start = 81,
run_end = 97,
punch_start = 70,
punch_end = 80,
die_start = 40,
die_end = 60,
}
})

61
mobs/pumpkid.lua Normal file
View File

@ -0,0 +1,61 @@
mobs:register_mob("nssm:pumpkid", {
type = "monster",
hp_max = 13,
hp_min = 11,
collisionbox = {-0.4, 0, -0.4, 0.4, 1.5, 0.4},
visual = "mesh",
mesh = "pumpkid.x",
textures = {{"pump.png"}},
visual_size = {x=3, y=3},
view_range = 30,
floats=0,
rotate = 180,
group_attack=true,
attack_animals=false,
walk_velocity = 0.6,
run_velocity = 0.6,
-- fall_speed = 0,
stepheight = 1.1,
--[[ sounds = {
random = "pumpkid",
distance = 45,
},]]
damage = 2,
jump = true,
drops = {
{name = "nssm:life_energy",
chance = 1,
min = 1,
max = 3,},
},
armor = 50,
drawtype = "front",
water_damage = 5,
lava_damage = 13,
light_damage = 0,
suffocation = 4,
blood_texture="nssm_blood.png",
blood_amount=10,
on_rightclick = nil,
attack_type = "shoot",
shoot_offset = 1,
arrow = "nssm:pumpkid_bomb",
reach = 1,
shoot_interval = 4,
animation = {
speed_normal = 20,
speed_run = 20,
stand_start = 0,
stand_end = 40,
walk_start = 60,
walk_end = 100,
run_start = 60,
run_end = 100,
punch_start = 110,
punch_end = 210,
shoot_start = 110,
shoot_end = 210,
die_start = 220,
die_end = 240,
}
})

View File

@ -5,98 +5,84 @@ mobs:register_mob("nssm:pumpking", {
collisionbox = {-0.4, 0.00, -0.4, 0.4, 3.2, 0.4},
visual = "mesh",
mesh = "pumpking.x",
textures = {
{"pumpking.png"}
},
visual_size = {x = 2.5, y = 2.5},
textures = {{"pump.png"}},
visual_size = {x=2.5, y=2.5},
makes_footstep_sound = true,
lifetimer = 500,
rotate = 270,
lifetimer=500,
rotate=270,
fear_height = 4,
view_range = 35,
walk_velocity = 2,
run_velocity = 4,
sounds = {
walk_velocity = 1.3,
run_velocity = 3.4,
sounds = {
random = "king",
explode = "tnt_explode"
explode = "tnt_explode",
},
damage = 13,
jump = true,
drops = {
{name = "nssm:life_energy", chance = 1, min = 7, max = 9},
{name = "nssm:cursed_pumpkin_seed", chance = 1, min = 1, max = 1},
{name = "nssm:black_powder", chance = 1, min = 9, max = 12}
{name = "nssm:life_energy",
chance = 1,
min = 70,
max = 90,},
{name = "nssm:cursed_pumpkin_seed",
chance = 1,
min = 1,
max = 1,},
{name = "nssm:black_powder",
chance = 1,
min = 40,
max = 60,},
},
armor = 40,
armor =40,
drawtype = "front",
water_damage = 2,
lava_damage = 5,
fire_damage = 5,
water_damage = 0,
lava_damage = 0,
light_damage = 0,
blood_texture = "nssm_blood.png",
blood_amount = 25,
stepheight = 2.1,
knock_back = 0,
jump_height = 12,
blood_texture="nssm_blood.png",
blood_amount=25,
stepheight=2.1,
knock_back=0,
jump_height=12,
on_rightclick = nil,
attack_type = "dogfight",
animation = {
stand_start = 165,
stand_end = 210,
walk_start = 220,
walk_end = 260,
run_start = 220,
run_end = 260,
punch_start = 300,
punch_end = 330,
speed_normal = 15,
speed_run = 15
stand_start = 165, stand_end = 210,
walk_start = 220, walk_end = 260,
run_start = 220, run_end = 260,
punch_start = 0, punch_end = 30,
speed_normal = 20, speed_run = 30,
die_start = 130, die_end = 150,
},
on_die=function(self,pos)
self.object:remove()
minetest.after(0.2, function(pos)
tnt.boom(pos, {damage_radius = 5, radius = 4, ignore_protection = false})
tnt.boom(pos, {damage_radius=5,radius=4,ignore_protection=false})
end, pos)
end,
custom_attack = function(self)
self.pumpking_timer = self.pumpking_timer or os.time()
if (os.time() - self.pumpking_timer) > 3 then
mobs:set_animation(self, "punch")
self.pumpking_timer = (self.pumpking_timer or os.time())
if (os.time() - self.pumpking_timer) >3 then
set_animation(self, "punch")
self.pumpking_timer = os.time()
local s = self.object:get_pos()
local p = self.attack:get_pos()
local s = self.object:getpos()
local p = self.attack:getpos()
p.y = p.y + 1.5
s.y = s.y + 1.5
if minetest.line_of_sight(p, s) == true then
-- play attack sound
if self.sounds.attack then
minetest.sound_play(self.sounds.attack, {
object = self.object,
max_hear_distance = self.sounds.distance
}, true)
})
end
local pos1 = {
x = s.x + math.random(-1, 1),
y = s.y - 1.5,
z = s.z + math.random(-1, 1)
}
local pos1 = {x=s.x+math.random(-1,1), y=s.y-1.5, z=s.z+math.random(-1,1)}
minetest.after(1, function(pos1)
minetest.set_node(pos1, {name = "nssm:pumpbomb"})
minetest.set_node(pos1, {name="nssm:pumpbomb"})
minetest.get_node_timer(pos1):start(2)
end, pos1)
end,
pos1)
end
end
end

96
mobs/river_lord.lua Normal file
View File

@ -0,0 +1,96 @@
mobs:register_mob("nssm:river_lord", {
type = "monster",
hp_max = 210,
hp_min = 210,
collisionbox = {-0.6, 0, -0.6, 0.6, 3, 0.6},
visual = "mesh",
mesh = "river_lord.x",
textures = {{"river_lord.png"}},
visual_size = {x=4, y=4},
makes_footstep_sound = true,
view_range = 30,
walk_velocity = 0.6,
rotate = 270,
fear_height = 4,
run_velocity = 4,
--[[sounds = {
random = "river_lord",
},]]
damage = 10,
jump = true,
drops = {
{name = "nssm:life_energy",
chance = 1,
min = 70,
max = 90},
},
armor = 50,
drawtype = "front",
water_damage = 0,
lava_damage = 2,
reach = 8,
light_damage = 0,
--group_attack=true,
--attack_animals=true,
knock_back=0,
blood_texture="nssm_blood.png",
stepheight=2.1,
on_rightclick = nil,
attack_type = "dogfight",
animation = {
speed_normal = 20,
speed_run = 20,
stand_start = 20,
stand_end = 100,
walk_start = 110,
walk_end = 150,
run_start = 160,
run_end = 180,
punch_start = 260,
punch_end = 280,
punch2_start = 230, --charge_start
punch2_end = 250, --charge_end
die_start = 290,
die_end = 310,
speed_die = 10,
shoot_start = 190, --Arena di fango inizio: 190
shoot_end = 220, --Arena di fango fine: 220
speed_shoot = 20,
},
do_custom = function (self)
if self.other_state and self.other_state == "charge" then
do_charge(self)
end
end,
custom_attack = function (self)
if self.mud_timer then
if os.time() - self.mud_timer > 15 then
mud_attack(self)
else
local s = self.object:getpos()
local p = self.attack:getpos()
local l = vector.length(vector.subtract(p,s))
charge_attack(self)
end
else
mud_attack(self)
end
end,
})
function mud_attack (self) -- replace soil with mud
self.mud_timer = os.time()
local radius = 10
set_animation(self, "shoot")
local s = self.object:getpos()
local vec = {x=radius,y=1,z=radius}
minetest.after(0.5, function (self)
local poslist = minetest.find_nodes_in_area(vector.subtract(s, vec), vector.add(s,vec), "group:crumbly")
for _,v in pairs(poslist) do
local l = vector.length(vector.subtract(v,s))
if l <= radius and not minetest.is_protected(v, "") then
minetest.set_node(v, {name="nssm:mud"})
end
end
end, self)
end

185
mobs/salamander.lua Normal file
View File

@ -0,0 +1,185 @@
mobs:register_mob("nssm:salamander", {
type = "monster",
hp_max = 35,
hp_min = 24,
collisionbox = {-0.4, 0, -0.4, 0.4, 0.4, 0.4},
visual = "mesh",
mesh = "salamander.x",
textures = {{"salamander.png"}},
visual_size = {x=10, y=10},
fear_height = 4,
makes_footstep_sound = true,
view_range = 24,
walk_velocity = 1,
run_velocity = 2.2,
damage = 6,
jump = true,
drops = {
{name = "nssm:life_energy",
chance = 1,
min = 1,
max = 2,},
},
armor = 80,
drawtype = "front",
water_damage = 10,
lava_damage = 0,
light_damage = 0,
follow = {"farming:wheat"},
group_attack=true,
attack_animals=true,
knock_back=2,
blood_texture="nssm_blood.png",
stepheight=1.1,
on_rightclick = nil,
dogshoot_switch = true,
attack_type = "dogshoot",
arrow = "nssm:lava_block_bomb",
reach = 2,
shoot_interval = 2,
shoot_offset = 2,
animation = {
speed_normal = 25,
speed_run = 35,
stand_start = 0,
stand_end = 80,
walk_start = 110,
walk_end = 150,
run_start = 110,
run_end = 150,
punch_start = 160,
punch_end = 180,
shoot_start = 200,
shoot_end = 250,
die_start = 80,
die_end = 100,
--[[
swim_start = 260,
swim_end = 300,
]]
},
custom_attack = function(self)
local p = self.attack:getpos()
local s = self.object:getpos()
local ss = {x = s.x, y = s.y +0.5, z = s.z}
local pp = {x = p.x, y = p.y +1.5, z = p.z}
local vel = vector.subtract(pp,ss)
set_animation(self, "punch")
if minetest.line_of_sight({x = p.x, y = p.y +1.5, z = p.z}, {x = s.x, y = s.y +1.5, z = s.z}) == true then
-- play attack sound
if self.sounds.attack then
minetest.sound_play(self.sounds.attack, {
object = self.object,
max_hear_distance = self.sounds.distance
})
end
-- punch player
self.attack:punch(self.object, 1.0, {
full_punch_interval=1.0,
damage_groups = {fleshy=self.damage}
}, nil)
end
minetest.add_particlespawner(
25, --amount
0.5, --time
ss, --minpos
ss, --maxpos
vector.multiply(vel, 2), --minvel
vector.multiply(vel, 4), --maxvel
{x=0,y=0,z=0}, --minacc
{x=0,y=0,z=0}, --maxacc
1, --minexptime
1.5, --maxexptime
5, --minsize
10, --maxsize
true, --collisiondetection
"phoenix_fire.png" --texture
)
end,
do_custom = function(self, dtime)
-- set needed values if not already present
if not self.v2 then
self.v2 = 0
self.max_speed_forward = 5
self.max_speed_reverse = 2
self.accel = 6
self.terrain_type = 3
self.driver_attach_at = {x = 0, y = 1.4, z = -0.8}
self.driver_eye_offset = {x = 0, y = -2, z = 0}
self.driver_scale = {x = 0.09, y = 0.09}
end
-- if driver present allow control of horse
if self.driver then
--mobs.fly(self, dtime, 6, true, "nssm:lava_block_bomb", "run", "stand")
mobs.drive(self, "run", "stand", false, dtime)
return false -- skip rest of mob functions
end
return true
end,
on_die = function(self, pos)
-- drop saddle when horse is killed while riding
-- also detach from horse properly
if self.driver then
minetest.add_item(pos, "mobs:saddle")
mobs.detach(self.driver, {x = 1, y = 0, z = 1})
end
end,
on_rightclick = function(self, clicker)
-- make sure player is clicking
if not clicker or not clicker:is_player() then
return
end
-- feed, tame or heal horse
if mobs:feed_tame(self, clicker, 10, true, true) then
return
end
-- make sure tamed horse is being clicked by owner only
if self.tamed and self.owner == clicker:get_player_name() then
local inv = clicker:get_inventory()
-- detatch player already riding horse
if self.driver and clicker == self.driver then
mobs.detach(clicker, {x = 1, y = 0, z = 1})
-- add saddle back to inventory
if inv:room_for_item("main", "mobs:saddle") then
inv:add_item("main", "mobs:saddle")
else
minetest.add_item(clicker.getpos(), "mobs:saddle")
end
-- attach player to horse
elseif not self.driver
and clicker:get_wielded_item():get_name() == "mobs:saddle" then
self.object:set_properties({stepheight = 1.1})
mobs.attach(self, clicker)
-- take saddle from inventory
inv:remove_item("main", "mobs:saddle")
end
end
-- used to capture horse with magic lasso
mobs:capture_mob(self, clicker, 0, 0, 80, false, nil)
end
})

View File

@ -1,41 +1,49 @@
mobs:register_mob("nssm:sand_bloco", {
type = "monster",
hp_max = 24,
hp_max = 20,
hp_min = 17,
collisionbox = {-0.5, -0.2, -0.5, 0.5, 1.3, 0.5},
visual = "mesh",
mesh = "sand_bloco.x",
textures = {
{"sand_bloco.png"}
},
visual_size = {x = 4, y = 4},
textures = {{"sand_bloco.png"}},
visual_size = {x=4, y=4},
makes_footstep_sound = true,
view_range = 14,
fear_height = 4,
walk_velocity = 0.8,
run_velocity = 2,
rotate = 270,
sounds = {
random = "bloco"
rotate = 270,
sounds = {
random = "bloco",
},
damage = 4,
damage = 3,
reach = 1.5,
jump = true,
drops = {
{name = "nssm:life_energy", chance = 1, min = 1, max = 1},
{name = "default:sandstone", chance = 1, min = 2, max = 3},
{name = "nssm:sand_bloco_skin", chance = 2, min = 1, max = 3}
{name = "nssm:life_energy",
chance = 1,
min = 1,
max = 2,},
{name = "default:sandstone",
chance = 1,
min = 2,
max = 3,},
{name = "nssm:sand_bloco_skin",
chance = 2,
min = 1,
max = 3,},
},
armor = 40,
drawtype = "front",
water_damage = 10,
lava_damage = 1,
fire_damage = 1,
light_damage = 0,
group_attack = true,
attack_animals = true,
knock_back = 2,
blood_texture = "stone_blood.png",
suffocation = 2,
group_attack=true,
attack_animals=false,
knock_back=2,
blood_texture="stone_blood.png",
on_rightclick = nil,
attack_type = "dogfight",
animation = {
speed_normal = 20,
@ -47,6 +55,6 @@ mobs:register_mob("nssm:sand_bloco", {
run_start = 190,
run_end = 200,
punch_start = 100,
punch_end = 130
punch_end = 130,
}
})

View File

@ -5,39 +5,46 @@ mobs:register_mob("nssm:sandworm", {
collisionbox = {-0.4, -0.2, -0.4, 0.4, 1.90, 0.4},
visual = "mesh",
mesh = "sandworm.x",
textures = {
{"sandworm.png"}
},
visual_size = {x = 4, y = 4},
textures = {{"sandworm.png"}},
visual_size = {x=4, y=4},
makes_footstep_sound = false,
view_range = 17,
rotate = 270,
reach = 2,
reach = 4,
fear_height = 3,
walk_velocity = 2,
run_velocity = 2,
damage = 6,
sounds = {
random = "sandworm",
distance = 40
distance = 40,
},
jump = false,
drops = {
{name = "nssm:worm_flesh", chance = 2, min = 1, max = 3},
{name = "nssm:sandworm_skin", chance = 2, min = 1, max = 3},
{name = "nssm:life_energy", chance = 1, min = 2, max = 3}
{name = "nssm:worm_flesh",
chance = 2,
min = 1,
max = 3,},
{name = "nssm:sandworm_skin",
chance = 2,
min = 1,
max = 3,},
{name = "nssm:life_energy",
chance = 1,
min = 2,
max = 3,},
},
armor = 60,
drawtype = "front",
water_damage = 5,
lava_damage = 10,
fire_damage = 10,
water_damage = 12,
lava_damage = 15,
light_damage = 0,
group_attack = true,
attack_animals = true,
knock_back = 2,
blood_texture = "nssm_blood_blue.png",
stepheight = 1.1,
group_attack=true,
attack_animals=true,
knock_back=2,
blood_texture="nssm_blood_blue.png",
stepheight=1.1,
on_rightclick = nil,
attack_type = "dogfight",
animation = {
speed_normal = 25,
@ -49,10 +56,11 @@ mobs:register_mob("nssm:sandworm", {
run_start = 110,
run_end = 140,
punch_start = 150,
punch_end = 180
punch_end = 180,
die_start = 200,
die_end = 220,
},
do_custom = function(self)
nssm:digging_attack(self, "sand", self.run_velocity, {x = 0, y = 3, z = 0})
end
digging_attack(self, "sand", self.run_velocity, {x=0, y=3, z=0})
end,
})

View File

@ -1,16 +1,13 @@
mobs:register_mob("nssm:scrausics", {
type = "monster",
hp_max = 33,
hp_min = 22,
hp_max = 21,
hp_min = 20,
collisionbox = {-0.4, -0.3, -0.4, 0.4, 0.3, 0.4},
visual = "mesh",
mesh = "scrausics.x",
textures = {
{"scrausics.png"}
},
visual_size = {x = 10, y = 10},
view_range = 35,
rotate = 270,
textures = {{"scrausics.png"}},
visual_size = {x=10, y=10},
view_range = 30,
walk_velocity = 2,
run_velocity = 3,
fall_speed = 0,
@ -18,29 +15,36 @@ mobs:register_mob("nssm:scrausics", {
floats=1,
sounds = {
random = "scrausics",
distance = 40
distance = 40,
},
damage = 4,
damage = 3,
jump = true,
drops = {
{name = "nssm:life_energy", chance = 1, min = 3, max = 4},
{name = "nssm:raw_scrausics_wing", chance = 1, min = 1, max = 2}
{name = "nssm:life_energy",
chance = 1,
min = 3,
max = 4,},
{name = "nssm:raw_scrausics_wing",
chance = 1,
min = 1,
max = 2,},
},
armor = 80,
drawtype = "front",
water_damage = 5,
lava_damage = 5,
fire_damage = 5,
light_damage = 0,
group_attack = true,
attack_animals = true,
knock_back = 2,
blood_texture = "nssm_blood.png",
group_attack=true,
attack_animals = false,
knock_back=2,
blood_texture="nssm_blood.png",
on_rightclick = nil,
fly = true,
attack_type = "dogfight",
animation = {
speed_normal = 25,
speed_run = 25,
speed_die = 20,
stand_start = 220,
stand_end = 280,
walk_start = 140,
@ -48,6 +52,10 @@ mobs:register_mob("nssm:scrausics", {
run_start = 190,
run_end = 210,
punch_start = 20,
punch_end = 50
punch_end = 50,
die_start = 290,
die_end = 310,
punch2_start = 60,
punch2_end = 100,
}
})

View File

@ -1,38 +1,41 @@
mobs:register_mob("nssm:signosigno", {
type = "monster",
hp_max = 20,
hp_max = 12,
hp_min = 8,
collisionbox = {-0.2, 0.00, -0.2, 0.2, 1.6, 0.2},
visual = "mesh",
mesh = "signosigno.x",
textures = {
{"signosigno.png"},
{"signosigno2.png"}
},
visual_size = {x = 6, y = 6},
textures = {{"signosigno.png"}, {"signosigno2.png"}},
visual_size = {x=6, y=6},
makes_footstep_sound = false,
view_range = 15,
walk_velocity = 1.5,
fear_height = 4,
run_velocity = 2.5,
rotate = 270,
damage = 4,
damage = 3,
reach = 1.5,
jump = true,
drops = {
{name = "nssm:life_energy", chance = 1, min = 1, max = 2},
{name = "nssm:slothful_soul_fragment", chance = 20, min = 1, max = 1}
{name = "nssm:life_energy",
chance = 1,
min = 1,
max = 2,},
{name = "nssm:slothful_soul_fragment",
chance = 60,
min = 1,
max = 1,},
},
armor = 40,
drawtype = "front",
water_damage = 1,
lava_damage = 2,
fire_damage = 2,
light_damage = 1,
group_attack = true,
attack_animals = true,
knock_back = 4,
blood_texture = "morparticle.png",
group_attack=true,
attack_animals=false,
knock_back=4,
blood_texture="morparticle.png",
on_rightclick = nil,
attack_type = "dogfight",
animation = {
speed_normal = 20,
@ -44,6 +47,6 @@ mobs:register_mob("nssm:signosigno", {
run_start = 200,
run_end = 220,
punch_start = 160,
punch_end = 190
punch_end = 190,
}
})

66
mobs/silver_sandonisc.lua Normal file
View File

@ -0,0 +1,66 @@
mobs:register_mob("nssm:silver_sandonisc", {
type = "monster",
hp_max = 23,
hp_min = 21,
collisionbox = {-0.4, -0.2, -0.4, 0.4, 1, 0.4},
visual = "mesh",
mesh = "silver_sandonisc.x",
textures = {{"silver_sandonisc.png"}},
visual_size = {x=8, y=8},
makes_footstep_sound = false,
view_range = 24,
rotate = 270,
reach = 5,
fear_height = 3,
walk_velocity = 0.6,
run_velocity = 5,
damage = 5,
-- sounds = {
-- random = "silver_sandonisc",
--distance = 40,
--},
jump = false,
drops = {
{name = "nssm:life_energy",
chance = 1,
min = 2,
max = 3,},
},
armor = 30,
drawtype = "front",
water_damage = 5,
lava_damage = 15,
light_damage = 0,
group_attack=true,
attack_animals=false,
knock_back=1,
blood_texture="nssm_blood_blue.png",
stepheight=1.1,
on_rightclick = nil,
attack_type = "dogfight",
animation = {
speed_normal = 20,
speed_run = 30,
stand_start = 170,
stand_end = 230,
walk_start = 80,
walk_end = 120,
run_start = 40,
run_end = 70,
punch_start = 130,
punch_end = 160,
punch2_start = 40,
punch2_end = 70,
speed_punch2 = 40,
die_start = 235,
die_end = 255,
},
do_custom = function (self)
if self.other_state and self.other_state == "charge" then
do_charge(self)
end
end,
custom_attack = function (self)
charge_attack(self)
end,
})

101
mobs/silversand_dragon.lua Normal file
View File

@ -0,0 +1,101 @@
mobs:register_mob("nssm:silversand_dragon", {
type = "monster",
hp_max = 160,
hp_min = 160,
collisionbox = {-0.65, -0.4, -0.65, 0.65, 0.4, 0.65},
visual = "mesh",
mesh = "silversand_dragon.x",
textures = {{"silversand_dragon.png"}},
visual_size = {x=18, y=18},
view_range = 40,
lifetimer = 500,
rotate = 270,
walk_velocity = 1,
run_velocity = 3,
stepheight = 2.1,
--[[sounds = {
random = "silversand_dragon",
distance = 45,
},]]
damage = 1,
jump = false,
drops = {
{name = "nssm:life_energy",
chance = 1,
min = 70,
max = 80,},
{name = "nssm:sun_feather",
chance = 1,
min = 1,
max = 1,},
},
armor = 40,
drawtype = "front",
water_damage = 3,
lava_damage = 3,
light_damage = 0,
blood_texture="silversand_particle.png",
blood_amount=50,
on_rightclick = nil,
attack_type = "dogfight",
reach = 15,
shoot_interval = 4,
animation = {
speed_normal = 25,
speed_run = 50,
speed_die = 20,
stand_start = 0,
stand_end = 60,
walk_start = 70,
walk_end = 110,
run_start = 70,
run_end = 110,
punch_start = 80,
punch_end = 110,
shoot_start = 80,
shoot_end = 110,
die_start = 120,
die_end = 140,
},
custom_attack = function(self)
local p = self.attack:getpos()
local s = self.object:getpos()
local ss = {x = s.x, y = s.y +0.5, z = s.z}
local pp = {x = p.x, y = p.y +1.5, z = p.z}
local vel = vector.subtract(pp,ss)
set_animation(self, "punch")
if minetest.line_of_sight({x = p.x, y = p.y +1.5, z = p.z}, {x = s.x, y = s.y +1.5, z = s.z}) == true then
-- play attack sound
if self.sounds.attack then
minetest.sound_play(self.sounds.attack, {
object = self.object,
max_hear_distance = self.sounds.distance
})
end
-- punch player
self.attack:punch(self.object, 1.0, {
full_punch_interval=1.0,
damage_groups = {fleshy=self.damage}
}, nil)
end
minetest.add_particlespawner(
225, --amount
0.5, --time
ss, --minpos
ss, --maxpos
vector.multiply(vel, 2), --minvel
vector.multiply(vel, 4), --maxvel
{x=0,y=0,z=0}, --minacc
{x=0,y=0,z=0}, --maxacc
4, --minexptime
5, --maxexptime
5, --minsize
10, --maxsize
true, --collisiondetection
"silversand_particle.png" --texture
)
end
})

View File

@ -1,44 +1,56 @@
mobs:register_mob("nssm:snow_biter", {
type = "monster",
hp_max = 30,
hp_max = 18,
hp_min = 15,
collisionbox = {-0.5, 0, -0.5, 0.5, 0.60, 0.5},
visual = "mesh",
mesh = "snow_biter.x",
textures = {
{"snow_biter.png"}
},
visual_size = {x = 6, y = 6},
textures = {{"snow_biter.png"}},
visual_size = {x=6, y=6},
makes_footstep_sound = true,
view_range = 18,
view_range = 14,
rotate = 270,
mele_number = 2,
fear_height = 4,
reach = 1.5,
walk_velocity = 0.8,
run_velocity = 3,
sounds = {
random = "snow_biter"
sounds = {
random = "snow_biter",
},
--pathfinding = true,
damage = 4,
jump = true,
drops = {
{name = "nssm:life_energy", chance = 1, min = 2, max = 3},
{name = "nssm:frosted_amphibian_heart", chance = 2, min = 1, max = 1},
{name = "nssm:amphibian_ribs", chance = 2, min = 1, max = 1},
{name = "nssm:little_ice_tooth", chance = 2, min = 0, max = 4}
},
{name = "nssm:life_energy",
chance = 1,
min = 2,
max = 3},
{name = "nssm:frosted_amphibian_heart",
chance = 2,
min = 1,
max = 1},
{name = "nssm:amphibian_ribs",
chance = 2,
min = 1,
max = 1},
{name = "nssm:little_ice_tooth",
chance = 2,
min = 0,
max = 4},
},
armor = 80,
drawtype = "front",
water_damage = 0,
lava_damage = 30,
fire_damage = 20,
light_damage = 0,
group_attack = true,
attack_animals = true,
knock_back = 4,
blood_texture = "nssm_blood.png",
stepheight = 1.1,
suffocation = 4,
group_attack=true,
attack_animals=true,
knock_back=4,
blood_texture="nssm_blood.png",
stepheight=1.1,
on_rightclick = nil,
attack_type = "dogfight",
double_melee_attack = true,
animation = {
@ -53,10 +65,11 @@ mobs:register_mob("nssm:snow_biter", {
punch_start = 175,
punch_end = 190,
punch2_start = 200,
punch2_end = 215
punch2_end = 215,
die_start = 220,
die_end = 240,
},
do_custom = function(self)
nssm:putting_ability(self, "default:ice", self.run_velocity)
end
putting_ability(self, "default:ice", self.run_velocity)
end,
})

View File

@ -1,49 +1,63 @@
mobs:register_mob("nssm:spiderduck", {
type = "monster",
hp_max = 35,
docile_by_day = true,
hp_max = 27,
hp_min = 24,
collisionbox = {-0.6, -0.8, -0.6, 0.6, 0.4, 0.5},
visual = "mesh",
rotate = 270,
mesh = "spiderduck.x",
textures = {
{"spiderduck.png"}
},
visual_size = {x = 2, y = 2},
textures = {{"spiderduck.png"}},
visual_size = {x=2, y=2},
fear_height = 4,
makes_footstep_sound = true,
view_range = 24,
walk_velocity = 2,
run_velocity = 4,
sounds = {
random = "duck"
sounds = {
random = "duck",
},
damage = 6,
damage = 5,
jump = true,
drops = {
{name = "nssm:life_energy", chance = 1, min = 1, max = 2},
{name = "nssm:duck_legs", chance = 1, min = 1, max = 8},
{name = "nssm:silk_gland", chance = 2, min = 1, max = 2},
{name = "nssm:black_duck_feather", chance = 3, min = 1, max = 4},
{name = "nssm:duck_beak", chance = 5, min = 1, max = 1}
{name = "nssm:life_energy",
chance = 1,
min = 1,
max = 2,},
{name = "nssm:duck_legs",
chance = 1,
min = 1,
max = 8,},
{name = "nssm:silk_gland",
chance = 2,
min = 1,
max = 2,},
{name = "nssm:black_duck_feather",
chance = 3,
min = 1,
max = 4,},
{name = "nssm:duck_beak",
chance = 5,
min = 1,
max = 1,},
},
armor = 80,
drawtype = "front",
water_damage = 2,
lava_damage = 5,
fire_damage = 5,
lava_damage = 15,
light_damage = 0,
group_attack = true,
attack_animals = true,
knock_back = 2,
blood_texture = "nssm_blood.png",
stepheight = 1.5,
group_attack=true,
attack_animals=true,
knock_back=2,
blood_texture="nssm_blood.png",
stepheight=1.5,
on_rightclick = nil,
dogshoot_switch = true,
attack_type = "dogshoot",
arrow = "nssm:webball",
reach = 2,
shoot_interval = 5,
shoot_offset = 2,
arrow = "nssm:webball",
reach = 2,
shoot_interval = 2,
shoot_offset = 2,
animation = {
speed_normal = 25,
speed_run = 35,
@ -56,6 +70,6 @@ mobs:register_mob("nssm:spiderduck", {
punch_start = 20,
punch_end = 46,
shoot_start = 150,
shoot_end = 200
shoot_end = 200,
}
})

View File

@ -1,47 +1,47 @@
mobs:register_mob("nssm:stone_eater", {
type = "monster",
hp_max = 27,
hp_max = 24,
hp_min = 19,
collisionbox = {-0.3, -0.05, -0.3, 0.3, 0.65, 0.3},
visual = "mesh",
mesh = "stone_eater.x",
textures = {
{"stone_eater.png"}
},
visual_size = {x = 10, y = 10},
textures = {{"stone_eater.png"}},
visual_size = {x=10, y=10},
makes_footstep_sound = false,
view_range = 16,
rotate = 270,
fear_height = 4,
jump = false,
jump_height = 0,
jump_height =0,
walk_velocity = 1,
run_velocity = 1.5,
damage = 5,
damage = 4,
reach = 1.5,
drops = {
{name = "default:stone", chance = 2, min = 1, max = 3},
{name = "nssm:life_energy", chance = 1, min = 2, max = 3},
{name = "nssm:stoneater_mandible", chance = 2, min = 1, max = 4}
{name = "default:stone",
chance = 2,
min = 1,
max = 3,},
{name = "nssm:life_energy",
chance = 1,
min = 2,
max = 3,},
{name = "nssm:stoneater_mandible",
chance = 2,
min = 1,
max = 4,},
},
armor = 40,
drawtype = "front",
water_damage = 1,
water_damage = 7,
lava_damage = 1,
fire_damage = 1,
group_attack = true,
attack_animals = true,
knock_back = 0,
blood_texture = "stone_blood.png",
immune_to={
{"default:sword_stone", -2},
{"default:stone", -2},
{"default:cobble", -2},
{"default:axe_stone", -2},
{"default:shovel_stone", -2},
{"default:pick_stone", -2}
},
group_attack=true,
attack_animals=true,
knock_back=0,
blood_texture="stone_blood.png",
immune_to={{'default:sword_stone', -5},{'default:stone', -6}, {'default:cobble', -2}, {'default:axe_stone', -5}, {'default:shovel_stone', -2}, {'default:pick_stone', -2}},
light_damage = 0,
on_rightclick = nil,
attack_type = "dogfight",
animation = {
speed_normal = 20,
@ -53,10 +53,10 @@ mobs:register_mob("nssm:stone_eater", {
run_start = 130,
run_end = 150,
punch_start = 160,
punch_end = 185
punch_end = 185,
},
do_custom = function(self)
nssm:digging_attack(self, "stone", self.run_velocity, {x = 0, y = 1, z = 0})
end
--digging_ability(self, "stone", self.run_velocity, {x=0, y=2, z=0})
digging_attack(self, "stone", self.run_velocity, {x=0, y=1, z=0})
end,
})

View File

@ -5,12 +5,10 @@ mobs:register_mob("nssm:swimming_duck", {
collisionbox = {-0.35, -0.30, -0.35, 0.35, 0.7, 0.35},
visual = "mesh",
mesh = "swimming_duck.x",
textures = {
{"swimming_duck.png"}
},
visual_size = {x = 1.5, y = 1.5},
textures = {{"swimming_duck.png"}},
visual_size = {x=1.5, y=1.5},
view_range = 25,
floats = 1,
floats=1,
walk_velocity = 1,
run_velocity = 1,
damage = 3,
@ -18,25 +16,38 @@ mobs:register_mob("nssm:swimming_duck", {
jump = false,
jump_chance = 0,
jump_height = 0,
sounds = {
random = "duck"
sounds = {
random = "duck",
},
drops = {
{name = "nssm:life_energy", chance = 1, min = 1, max = 2},
{name = "nssm:duck_legs", chance = 1, min = 1, max = 2},
{name = "nssm:duck_beak", chance = 5, min = 1, max = 1},
{name = "nssm:duck_feather", chance = 6, min = 1, max = 2}
{name = "nssm:life_energy",
chance = 1,
min = 1,
max = 2,},
{name = "nssm:duck_legs",
chance = 1,
min = 1,
max = 2,},
{name = "nssm:duck_beak",
chance = 5,
min = 1,
max = 1,},
{name = "nssm:duck_feather",
chance = 6,
min = 1,
max = 2,},
},
armor = 80,
drawtype = "front",
water_damage = 0,
lava_damage = 10,
fire_damage = 10,
lava_damage = 15,
suffocation = 4,
light_damage = 0,
group_attack = true,
attack_animals = true,
knock_back = 4,
blood_texture = "nssm_blood.png",
group_attack=true,
attack_animals=true,
knock_back=4,
blood_texture="nssm_blood.png",
on_rightclick = nil,
attack_type = "dogfight",
animation = {
speed_normal = 25,
@ -48,6 +59,6 @@ mobs:register_mob("nssm:swimming_duck", {
run_start = 80,
run_end = 120,
punch_start = 140,
punch_end = 160
punch_end = 160,
}
})

View File

@ -1,44 +1,46 @@
mobs:register_mob("nssm:tarantula", {
type = "monster",
docile_by_day = true,
hp_max = 50,
hp_min = 50,
collisionbox = {-0.5, 0.00, -0.5, 0.5, 0.9, 0.5},
visual = "mesh",
mesh = "tarantula.x",
textures = {
{"tarantula.png"}
},
visual_size = {x = 8, y = 8},
textures = {{"tarantula.png"}},
visual_size = {x=8, y=8},
makes_footstep_sound = true,
view_range = 20,
lifetimer = 500,
walk_velocity = 0.7,
fear_height = 4,
run_velocity = 3,
rotate = 270,
sounds = {
random = "tarry"
rotate = 270,
sounds = {
random = "tarry",
},
damage = 8,
jump = true,
drops = {
{name = "nssm:super_silk_gland", chance = 1, min = 3, max = 5}
{name = "nssm:super_silk_gland",
chance = 1,
min = 3,
max = 5,},
},
armor = 60,
drawtype = "front",
water_damage = 1,
lava_damage = 7,
fire_damage = 7,
lava_damage = 4,
reach = 3,
knock_back = 0,
blood_texture = "nssm_blood_blue.png",
stepheight = 1.1,
knock_back=0,
blood_texture="nssm_blood_blue.png",
stepheight=1.1,
light_damage = 0,
on_rightclick = nil,
dogshoot_switch = true,
attack_type = "dogshoot",
arrow = "nssm:thickwebball",
shoot_interval = 2,
shoot_offset = 1,
arrow = "nssm:thickwebball",
shoot_interval = 2,
shoot_offset = 1,
animation = {
speed_normal = 20,
speed_run = 25,
@ -51,74 +53,83 @@ mobs:register_mob("nssm:tarantula", {
punch_start = 180,
punch_end = 200,
shoot_start = 180,
shoot_end = 200
shoot_end = 200,
},
on_die = function(self, pos)
self.object:remove()
minetest.add_particlespawner({
amount = 200,
time = 0.1,
minpos = {x = pos.x - 1, y = pos.y - 1, z = pos.z - 1},
maxpos = {x = pos.x + 1, y = pos.y + 1, z = pos.z + 1},
minvel = {x = -0, y = -0, z = -0},
maxvel = {x = 1, y = 1, z = 1},
minacc = {x = -0.5, y = 5, z = -0.5},
maxacc = {x = 0.5, y = 5, z = 0.5},
minexptime = 0.1,
maxexptime = 1,
minsize = 3,
maxsize = 4,
collisiondetection = false,
texture = "tnt_smoke.png"
})
minetest.add_particlespawner(
200, --amount
0.1, --time
{x=pos.x-1, y=pos.y-1, z=pos.z-1}, --minpos
{x=pos.x+1, y=pos.y+1, z=pos.z+1}, --maxpos
{x=-0, y=-0, z=-0}, --minvel
{x=1, y=1, z=1}, --maxvel
{x=-0.5,y=5,z=-0.5}, --minacc
{x=0.5,y=5,z=0.5}, --maxacc
0.1, --minexptime
1, --maxexptime
3, --minsize
4, --maxsize
false, --collisiondetection
"tnt_smoke.png" --texture
)
minetest.add_entity(pos, "nssm:tarantula_propower")
end
end,
})
mobs:register_mob("nssm:tarantula_propower", {
type = "monster",
hp_max = 90,
hp_min = 90,
hp_max = 120,
hp_min = 120,
collisionbox = {-0.5, 0.00, -0.5, 0.5, 1, 0.5},
visual = "mesh",
mesh = "tarantula_propower.x",
textures = {
{"tarantula.png"}
},
visual_size = {x = 10, y = 10},
textures = {{"tarantula.png"}},
visual_size = {x=10, y=10},
makes_footstep_sound = true,
view_range = 30,
lifetimer = 500,
walk_velocity = 1.5,
run_velocity = 3.3,
rotate = 270,
sounds = {
random = "tarry"
rotate = 270,
sounds = {
random = "tarry",
},
damage = 12,
jump = true,
drops = {
{name = "nssm:life_energy", chance = 1, min = 16, max = 18},
{name = "nssm:spider_leg", chance = 1, min = 1, max = 8},
{name = "nssm:tarantula_chelicerae", chance = 1, min = 1, max = 1},
{name = "nssm:silk_gland", chance = 2, min = 1, max = 3},
{name = "nssm:spider_meat", chance = 2, min = 1, max = 2}
{name = "nssm:life_energy",
chance = 1,
min = 80,
max = 110,},
{name = "nssm:spider_leg",
chance = 1,
min = 1,
max = 8,},
{name = "nssm:tarantula_chelicerae",
chance = 1,
min = 1,
max = 1,},
{name = "nssm:silk_gland",
chance = 2,
min = 1,
max = 3,},
{name = "nssm:spider_meat",
chance = 2,
min = 1,
max = 23,},
},
armor = 40,
drawtype = "front",
water_damage = 1,
lava_damage = 3,
fire_damage = 3,
water_damage = 0,
lava_damage = 0,
reach = 4,
knock_back = 0,
blood_texture = "nssm_blood_blue.png",
stepheight = 2.1,
knock_back=0,
blood_texture="nssm_blood_blue.png",
stepheight=2.1,
light_damage = 0,
on_rightclick = nil,
attack_type = "dogfight",
animation = {
speed_normal = 20,
@ -130,6 +141,8 @@ mobs:register_mob("nssm:tarantula_propower", {
run_start = 140,
run_end = 160,
punch_start = 180,
punch_end = 200
punch_end = 200,
die_start = 250,
die_end = 270,
}
})

91
mobs/tartacacia.lua Normal file
View File

@ -0,0 +1,91 @@
mobs:register_mob("nssm:tartacacia", {
type = "monster",
hp_max = 360,
hp_min = 360,
collisionbox = {-2, 0, -2, 2, 3, 2},
visual = "mesh",
mesh = "tartacacia.x",
textures = {{"tartacacia.png"}},
visual_size = {x=10, y=10},
makes_footstep_sound = true,
view_range = 15,
walk_velocity = 0.6,
rotate = 270,
reach=10,
fear_height = 4,
run_velocity = 1.2,
--[[sounds = {
random = "tartacacia",
},]]
damage = 1,
jump = true,
drops = {
{name = "nssm:life_energy",
chance = 1,
min = 33,
max = 43},
{name = "nssm:earth_sword",
chance = 1,
min = 1,
max = 1},
},
armor = 50,
drawtype = "front",
water_damage = 2,
lava_damage = 5,
light_damage = 0,
--group_attack=true,
--attack_animals=true,
knock_back=0,
blood_texture="nssm_blood.png",
stepheight=2.1,
on_rightclick = nil,
attack_type = "dogfight",
animation = {
speed_normal = 20,
speed_run = 40,
stand_start = 10,
stand_end = 60,
walk_start = 70,
walk_end = 150,
run_start = 70,
run_end = 150,
punch_start = 190,
punch_end = 220,
punch2_start = 230,
punch2_end = 250,
speed_die = 10,
die_start = 160,
die_end = 180,
},
custom_attack = function (self)
local s = self.object:getpos()
local p = self.attack:getpos()
local d = vector.subtract (p,s)
local l = vector.length(d)
minetest.chat_send_all("l="..l)
if math.random(1,5) == 1 then
if l <= 6 then
set_animation(self, "punch")
for y = 0,3 do
p.y = p.y - y
minetest.remove_node(p)
end
self.attack:punch(self.object, 1.0, {
full_punch_interval = 1.0,
damage_groups = {fleshy = self.damage}
}, nil)
end
else
set_animation(self, "punch2")
self.attack:punch(self.object, 1.0, {
full_punch_interval = 1.0,
damage_groups = {fleshy = self.damage}
}, nil)
if l < 4 then
self.attack:setpos(vector.subtract(p, {x=0, y=2, z=0}))
end
end
end,
})

View File

@ -1,43 +1,52 @@
mobs:register_mob("nssm:uloboros", {
type = "monster",
hp_max = 28,
hp_max = 23,
hp_min = 17,
collisionbox = {-0.5, 0.00, -0.5, 0.5, 0.8, 0.5},
visual = "mesh",
mesh = "uloboros.x",
textures = {
{"uloboros.png"}
},
visual_size = {x = 4, y = 4},
textures = {{"uloboros.png"}},
visual_size = {x=4, y=4},
makes_footstep_sound = true,
view_range = 22,
walk_velocity = 1.5,
walk_velocity = 1,
fear_height = 4,
run_velocity = 2.5,
rotate = 270,
sounds = {
random = "uloboros"
random = "uloboros",
},
damage = 5,
reach = 2,
jump = true,
drops = {
{name = "nssm:life_energy", chance = 1, min = 1, max = 4},
{name = "nssm:spider_leg", chance = 2, min = 1, max = 8},
{name = "nssm:silk_gland", chance = 4, min = 1, max = 3},
{name = "nssm:spider_meat", chance = 4, min = 1, max = 2}
{name = "nssm:life_energy",
chance = 1,
min = 1,
max = 4,},
{name = "nssm:spider_leg",
chance = 2,
min = 1,
max = 8,},
{name = "nssm:silk_gland",
chance = 4,
min = 1,
max = 3,},
{name = "nssm:spider_meat",
chance = 4,
min = 1,
max = 2,},
},
armor = 80,
drawtype = "front",
water_damage = 1,
lava_damage = 7,
fire_damage = 7,
water_damage = 2,
lava_damage = 17,
light_damage = 0,
group_attack = true,
attack_animals = true,
knock_back = 2,
blood_texture = "nssm_blood_blue.png",
stepheight = 1.1,
group_attack=true,
attack_animals=true,
knock_back=2,
blood_texture="nssm_blood_blue.png",
stepheight=1.1,
on_rightclick = nil,
attack_type = "dogfight",
animation = {
speed_normal = 20,
@ -49,13 +58,11 @@ mobs:register_mob("nssm:uloboros", {
run_start = 120,
run_end = 160,
punch_start = 80,
punch_end = 110
punch_end = 110,
die_start = 170,
die_end = 190,
},
do_custom = function(self)
if nssm.spiders_litter_web then
nssm:webber_ability(self, "nssm:web", 2)
end
end
webber_ability(self, "nssm:web", 2)
end,
})

View File

@ -5,36 +5,43 @@ mobs:register_mob("nssm:werewolf", {
collisionbox = {-0.85, -0.01, -0.85, 0.85, 3.50, 0.85},
visual = "mesh",
mesh = "werewolf.x",
textures = {
{"werewolf.png"}
},
visual_size = {x = 4, y = 4},
textures = {{"werewolf.png"}},
visual_size = {x=4, y=4},
makes_footstep_sound = true,
view_range = 30,
walk_velocity = 3,
fear_height = 4,
run_velocity = 5,
sounds = {
random = "werewolf"
sounds = {
random = "werewolf",
},
damage = 5,
jump = true,
drops = {
{name = "nssm:life_energy", chance = 1, min = 3, max = 4},
{name = "nssm:werewolf_leg", chance = 2, min = 1, max = 2},
{name = "nssm:wolf_fur", chance = 2, min = 1, max = 1}
},
{name = "nssm:life_energy",
chance = 1,
min = 3,
max = 4},
{name = "nssm:werewolf_leg",
chance = 2,
min = 1,
max = 2},
{name = "nssm:wolf_fur",
chance = 2,
min = 1,
max = 1},
},
armor = 80,
drawtype = "front",
water_damage = 2,
lava_damage = 5,
fire_damage = 5,
light_damage = 0,
group_attack = true,
attack_animals = true,
knock_back = 2,
blood_texture = "nssm_blood.png",
stepheight = 1.1,
group_attack=true,
attack_animals=true,
knock_back=2,
blood_texture="nssm_blood.png",
stepheight=1.1,
on_rightclick = nil,
attack_type = "dogfight",
animation = {
speed_normal = 15,
@ -46,6 +53,6 @@ mobs:register_mob("nssm:werewolf", {
run_start = 140,
run_end = 160,
punch_start = 170,
punch_end = 193
}
punch_end = 193,
}
})

View File

@ -5,36 +5,43 @@ mobs:register_mob("nssm:white_werewolf", {
collisionbox = {-0.85, -0.01, -0.85, 0.85, 3.50, 0.85},
visual = "mesh",
mesh = "white_werewolf.x",
textures = {
{"white_werewolf.png"}
},
visual_size = {x = 4, y = 4},
textures = {{"white_werewolf.png"}},
visual_size = {x=4, y=4},
makes_footstep_sound = true,
view_range = 30,
walk_velocity = 3,
fear_height = 4,
run_velocity = 5,
sounds = {
random = "werewolf"
sounds = {
random = "werewolf",
},
damage = 5,
jump = true,
drops = {
{name = "nssm:life_energy", chance = 1, min = 3, max = 4},
{name = "nssm:werewolf_leg", chance = 2, min = 1, max = 2},
{name = "nssm:white_wolf_fur", chance = 2, min = 1, max = 1}
},
{name = "nssm:life_energy",
chance = 1,
min = 3,
max = 4},
{name = "nssm:werewolf_leg",
chance = 2,
min = 1,
max = 2},
{name = "nssm:white_wolf_fur",
chance = 2,
min = 1,
max = 1},
},
armor = 80,
drawtype = "front",
water_damage = 2,
lava_damage = 5,
fire_damage = 5,
light_damage = 0,
group_attack = true,
attack_animals = true,
knock_back = 2,
blood_texture = "nssm_blood.png",
stepheight = 1.1,
group_attack=true,
attack_animals=true,
knock_back=2,
blood_texture="nssm_blood.png",
stepheight=1.1,
on_rightclick = nil,
attack_type = "dogfight",
animation = {
speed_normal = 15,
@ -46,6 +53,6 @@ mobs:register_mob("nssm:white_werewolf", {
run_start = 140,
run_end = 160,
punch_start = 170,
punch_end = 193
}
punch_end = 193,
}
})

View File

@ -1,4 +1 @@
name = nssm
depends = default, mobs, fire, tnt
optional_depends = farming, 3d_armor, shields
description = Adds a host of creatures into your world with new weapons too.

37575
models/albino_spider.x Normal file

File diff suppressed because it is too large Load Diff

13716
models/ant_queen.x Normal file → Executable file

File diff suppressed because it is too large Load Diff

23130
models/ant_soldier.x Normal file → Executable file

File diff suppressed because it is too large Load Diff

10078
models/ant_worker.x Normal file → Executable file

File diff suppressed because it is too large Load Diff

45246
models/berinhog.x Normal file

File diff suppressed because it is too large Load Diff

12030
models/black_widow.x Normal file → Executable file

File diff suppressed because it is too large Load Diff

18009
models/bloco.x Normal file → Executable file

File diff suppressed because it is too large Load Diff

31940
models/chog.x Normal file

File diff suppressed because it is too large Load Diff

41851
models/crab.x Normal file → Executable file

File diff suppressed because it is too large Load Diff

File diff suppressed because it is too large Load Diff

13270
models/crystal_slug.x Normal file

File diff suppressed because it is too large Load Diff

12114
models/daddy_long_legs.x Normal file → Executable file

File diff suppressed because it is too large Load Diff

File diff suppressed because it is too large Load Diff

106216
models/felucco.x Normal file → Executable file

File diff suppressed because it is too large Load Diff

23463
models/flust.x Normal file

File diff suppressed because it is too large Load Diff

35060
models/giant_sandworm.x Normal file → Executable file

File diff suppressed because it is too large Load Diff

63456
models/icelamander.x Normal file → Executable file

File diff suppressed because it is too large Load Diff

32574
models/icelizard.x Normal file

File diff suppressed because it is too large Load Diff

13867
models/icesnake.x Normal file → Executable file

File diff suppressed because it is too large Load Diff

34936
models/kele.x Normal file

File diff suppressed because it is too large Load Diff

4770
models/larva.x Normal file → Executable file

File diff suppressed because it is too large Load Diff

File diff suppressed because it is too large Load Diff

Some files were not shown because too many files have changed in this diff Show More