mr:assasin_armor_item
Table of Contents
Assasin Armor Item - Code References
Java Classes
- AssasinArmor.java - Main implementation class
- RogueArmor.java - Parent class (AssasinArmor extends RogueArmor)
- ClassArmor.java - Grandparent (RogueArmor extends ClassArmor)
- HeroSubClass.java - ASSASSIN subclass bound to “AssasinArmor� (line 47)
- ItemFactory.java - Item registration
Class Implementation Details
package com.watabou.pixeldungeon.items.armor; import com.nyrds.pixeldungeon.ml.R; import com.nyrds.platform.util.StringsManager; import com.watabou.pixeldungeon.actors.Char; import com.watabou.pixeldungeon.actors.hero.HeroSubClass; import com.watabou.pixeldungeon.utils.GLog; import org.jetbrains.annotations.NotNull; public class AssasinArmor extends RogueArmor { { name = StringsManager.getVar(R.string.RogueArmor_Name); image = 10; } @Override public boolean doEquip(@NotNull Char hero ) { if (hero.getSubClass() == HeroSubClass.ASSASSIN) { return super.doEquip( hero ); } else { GLog.w(StringsManager.getVar(R.string.RogueArmor_NotRogue)); return false; } } }
Key Properties
- Image ID: 10 (sprite index in armor atlas)
- Name Source: R.string.RogueArmor_Name (shared with parent RogueArmor)
- Warning Message: R.string.RogueArmor_NotRogue (shown when non-Assassin tries to equip)
- Equipment Check: doEquip() method validates HeroSubClass.ASSASSIN before equipping
- Restriction: Can only be equipped by heroes with ASSASSIN subclass
- Inherits From: RogueArmor → ClassArmor → Armor (gets smoke bomb special ability)
- Special Ability Source: Inherited “RogueArmor_ACSpecial� (SMOKE BOMB) action from RogueArmor
JSON Configuration
This entity is implemented in Java, no JSON configuration exists.
String Resources
<!-- From values/strings_all.xml - AssasinArmor reuses RogueArmor strings --> <string name="RogueArmor_Name">rogue garb</string> <string name="RogueArmor_NotRogue">Only rogues can use this armor!</string> <string name="RogueArmor_Desc">Wearing this dark garb, a rogue can perform a trick called \"smoke bomb\" (though no real explosives are used): he blinds enemies who can see him and jumps aside.</string> <string name="RogueArmor_ACSpecial">SMOKE BOMB</string> <!-- Related subclass strings --> <string name="HeroSubClass_NameAssa">assassin</string> <string name="HeroSubClass_DescAssa">When performing a surprise attack, the _Assassin_ inflicts additional damage to his target.</string>
Lua Scripts
This entity is implemented in Java, no Lua script exists.
Related Entities
- Assassin Subclass - Mastery path this armor belongs to
- Rogue Class - Base hero class for Assassin subclass
- Rogue Armor - Parent armor class
- Armor Kit Item - Used to create Assasin Armor from regular armor
Usage in Code
- Created via Armor Kit transformation on any armor piece (ClassArmor.upgrade)
- Equipment restriction enforced in doEquip() method
- Inherits smoke bomb special ability from RogueArmor
- Part of the Rogue class mastery system
- Only equippable by heroes with HeroSubClass.ASSASSIN
mr/assasin_armor_item.txt · Last modified: by 127.0.0.1

