This entity is implemented in Java, no JSON configuration exists
<string name="Earthroot_ArmorBuff">Armor</string>
This entity is implemented in Java, no Lua script exists
extends Buff - Inherits from base Buff classlevel - Stores the damage absorption amount (set to character's HT when applied)pos - Stores the position where the buff was appliedabsorb(damage) - Method that reduces incoming damage and detaches when depleted
public static class Armor extends Buff { private static final float STEP = 1f; @Packable public int pos; @Packable public int level; @Override public boolean attachTo(@NotNull Char target) { pos = target.getPos(); return super.attachTo(target); } @Override public boolean act() { if (target.getPos() != pos) { detach(); } spend(STEP); return true; } public int absorb(int damage) { if (damage >= level) { detach(); return damage - level; } else { level -= damage; return 0; } } }