====== Body Armor Spell - Code References ======
This page contains raw code references and configuration excerpts for the Body Armor spell entity.
==== Entity Kind ====
* **getEntityKind() value:** BodyArmor
==== Java Implementation ====
* **Implementation:** Spell entity referenced in hero configuration, no dedicated Java class found
* **Usage:** Referenced in [[https://github.com/NYRDS/remixed-dungeon/blob/master/RemixedDungeon/src/main/assets/hero/initHeroes.json|initHeroes.json]] as starting spell for hero classes
==== JSON Configuration ====
**Hero initialization:** [[https://github.com/NYRDS/remixed-dungeon/blob/master/RemixedDungeon/src/main/assets/hero/initHeroes.json|hero/initHeroes.json]]
{
"spell": "BodyArmor"
}
**Note:** No dedicated spell configuration file found in spellsDesc/ directory
==== Lua Implementation ====
* **Spell script:** [[https://github.com/NYRDS/remixed-dungeon/blob/master/RemixedDungeon/src/main/assets/scripts/spells/BodyArmor.lua|BodyArmor.lua]]
- Defines spell properties: magicAffinity = "Combat", targetingType = "self", level = 1, spellCost = 5, cooldown = 20, castTime = 0.5
- Cast function applies BodyArmor buff for duration: 15+10*caster:skillLevel()
- Sets buff level to caster's skill level
- Triggers "body_armor" top effect and sound
* **Buff script:** [[https://github.com/NYRDS/remixed-dungeon/blob/master/RemixedDungeon/src/main/assets/scripts/buffs/BodyArmor.lua|BodyArmor.lua (buff)]]
- drBonus function: armor bonus = (buff.target:effectiveSTR()-10) * (1 + buff:level())
- speedMultiplier function: returns 0.85 (15% speed reduction)
- Buff detaches on act (single-use trigger)
==== String Resources ====
* **English:** [[https://github.com/NYRDS/remixed-dungeon/blob/master/RemixedDungeon/src/main/res/values/strings_all.xml|strings_all.xml]]
Body Armor
Activates the reserved muscle power, making them temporarily stronger, thus greatly increasing your armor but at cost of movement speed.
Body Armor
Armor is increased at the cost of movement speed.
* **Russian:** [[https://github.com/NYRDS/remixed-dungeon/blob/master/RemixedDungeon/src/main/res/values-ru/strings_all.xml|strings_all.xml (ru)]]
Тело-щит
Активирует скрытые резервы мышц, делая их крепче и повышая защиту ценой скорости передвижения.
Тело-щит
Броня улучшена за счет скорости ходьбы.
==== Related Entities ====
* **Buff:** BodyArmorBuff - The buff applied when spell is cast
* **Implementation Note:** Spell and buff share the same entity kind name