mr:body_armor_spell
Table of Contents
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 initHeroes.json as starting spell for hero classes
JSON Configuration
Hero initialization: hero/initHeroes.json
{
"spell": "BodyArmor"
}
Note: No dedicated spell configuration file found in spellsDesc/ directory
Lua Implementation
- Spell script: 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: 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: strings_all.xml
<string name="BodyArmorSpell_Name">Body Armor</string> <string name="BodyArmorSpell_Info">Activates the reserved muscle power, making them temporarily stronger, thus greatly increasing your armor but at cost of movement speed.</string> <string name="BodyArmorBuff_Name">Body Armor</string> <string name="BodyArmorBuff_Info">Armor is increased at the cost of movement speed.</string>
- Russian: strings_all.xml (ru)
<string name="BodyArmorSpell_Name">Тело-щит</string> <string name="BodyArmorSpell_Info">Активирует скрытые резервы мышц, делая их крепче и повышая защиту ценой скорости передвижения.</string> <string name="BodyArmorBuff_Name">Тело-щит</string> <string name="BodyArmorBuff_Info">Броня улучшена за счет скорости ходьбы.</string>
Related Entities
- Buff: BodyArmorBuff - The buff applied when spell is cast
- Implementation Note: Spell and buff share the same entity kind name
mr/body_armor_spell.txt · Last modified: by 127.0.0.1
