Damage - Atherys/AtherysRPG GitHub Wiki
All damage to players or other entities goes through AtherysRPG. This includes player attacks and skills, monsters, and even environmental damage like falling or fire.
Damage Types
The plugin includes three broad types of damage mitigation: physical, magical, and pure. Physical and magical mitigation can be configured in the main configuration, but pure damage ignores all mitigation. The expressions for mitigation are configurable, and the INCOMING
variable is provided for use in them. Whatever value is returned is exactly how much damage the target player will receive.
magical-damage-mitigation-calculation="INCOMING - (1.33 * TARGET_INT)"
physical-damage-mitigation-calculation="INCOMING - (1.33 * TARGET_CON)"
Further, you can define custom damage production types which refer to specific item types.
damage-production-calculations {
"atherys:blunt"="SOURCE_STR * 1.5"
"atherys:stab"="SOURCE_DEX*1.25 + SOURCE_STR*1.25"
"atherys:unarmed"="SOURCE_STR * 1.25"
"atherys:ranged"="SOURCE_DEX * 0.25 * SPEED"
}
Here, we define three different damage types as well as how each of them are calculated. For more information on how these expressions work, see Expressions. Then, we define which item types correspond to which damage types.
item-damage-types {
"minecraft:air"="atherys:unarmed"
"minecraft:diamond_axe"="atherys:slash"
"minecraft:diamond_hoe"="atherys:blunt"
"minecraft:diamond_pickaxe"="atherys:stab"
"minecraft:diamond_shovel"="atherys:blunt"
}
Whenever a player attacks something using one of these items, the corresponding damage production calculation is calculated to determine how much damage that attack deals. The same can be done for projectiles. If the damage type will only be used for projectiles, you are able to use the SPEED
variable in its damage expression.
projectile-damage-types {
"minecraft:arrow"="atherys:ranged"
}
Lastly, a default damage type for ranged and melee attacks must be defined.
default-melee-damage-type="atherys:unarmed"
default-ranged-damage-type="atherys:ranged"
Environmental Damage
Damage expressions for various environmental hazards like falling, lava, and drowning can also be configured. In the expression for falling, the variable DISTANCE
is provided for how far the fall is.
environmental-damage-calculations {
"minecraft:fall"="(20*(DISTANCE-3))*(1-SOURCE_DEX*0.004)"
"minecraft:drown"="50"
"minecraft:suffocate"="25"
"minecraft:fire"="25*(100/(100+SOURCE_MAGICRES))"
}
TODO: Document all environmental damage id's.