Download: https://github.com/minetest-mods/armor_ ... .3.0.0.zip (Compatible with 3d_armor 0.4.8 or later)
License: LGPL
Depends: player_monoids
Old Versions:
0.1.0.1 (Works with and depends on monoidal_effects)
0.2.0.0 (Compatible with 3d_armor 0.4.7, might work with earlier versions)
This provides a player_monoids monoid for handling armor groups, and also allows registering new player damage types. For example, you might want to add ice damage and handle it with different armor ratings.
Using the monoid
The values in the monoid are tables mapping armor group names to damage multipliers. For example, if I wanted to apply an effect granting arcane damage resistance but fleshy damage vulnerability, I could do
Code: Select all
local tab = {
arcane = 0.5,
fleshy = 1.5,
}
armor_monoid.monoid:add_change(player, tab, "mymod:arcane_boost")
To add a new damage type to players, use armor_monoid.register_armor_group. For example:
Code: Select all
armor_monoid.register_armor_group("arcane", 150)