Table of Contents
Scout Armor Item - Code References
Entity Kind: `ScoutArmor`
Entity Type: Item (Armor)
Description: Scout Armor is a subclass-specific armor item for the Scout subclass (Elf class mastery path). It extends ElfArmor and can only be equipped by heroes with the Scout subclass.
Java Classes
- ScoutArmor.java - Main armor class implementation
- ElfArmor.java - Parent armor class
- HeroSubClass.java - Subclass definition (SCOUT enum references “ScoutArmor”)
Key Implementation Details:
public class ScoutArmor extends ElfArmor { public ScoutArmor() { name = StringsManager.getVar(R.string.ElfArmor_Name); image = 18; hasHelmet = false; } @Override public boolean doEquip(@NotNull Char hero) { if (hero.getSubClass() == HeroSubClass.SCOUT) { return super.doEquip(hero); } else { GLog.w(StringsManager.getVar(R.string.ElfArmor_NotElf)); return false; } } }
JSON Configuration
This armor is not defined in JSON configuration. It is a hardcoded Java item class that is automatically registered through the ItemFactory system.
Registration in ItemFactory:
// From ItemFactory.java import com.watabou.pixeldungeon.items.armor.ScoutArmor; registerItemClass(ScoutArmor.class);
String Resources
ScoutArmor uses the parent class (ElfArmor) string resources:
English (`values/strings_all.xml`):
<string name="ElfArmor_Name">Elven mantle</string> <string name="ElfArmor_NotElf">Only elves can use this armor!</string>
Russian (`values-ru/strings_all.xml`):
<string name="ElfArmor_Name">эльфийская мантия</string> <string name="ElfArmor_NotElf">Только эльфы могут использовать эту броню!</string>
Note: The ScoutArmor item shares string resources with ElfArmor. The in-game name is “Elven mantle” in English and “эльфийская мантия” in Russian, not “Scout Armor” as the class name might suggest.
Lua Scripts
This entity is implemented entirely in Java, no Lua script exists.
Related mr Entities
- Elf Armor Item - Parent armor class
- Scout Subclass - Required subclass to equip
- Hero Subclass System - Subclass mechanics
- Armor Item Base - Base armor item class
