User Tools

Site Tools


mr:assasin_armor_item

Assasin Armor Item - Code References

Assasin Armor

Java Classes

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 \&quot;smoke bomb\&quot; (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.

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