Game mechanics allow certain hero classes to have forbidden actions. Some classes cannot perform specific actions in the game.
CommonActions.AC_READ (Scroll_ACRead) - Reading scrollsBag.AC_OPEN (Bag_ACOpen) - Opening bagsCommonActions.AC_DRINK (Potion_ACDrink) - Drinking potionsDewVial (CommonActions.AC_DRINK) - Drinking from dew vialCommonActions.AC_EQUIP (EquipableItem_ACEquip) - Equipping itemsCommonActions.AC_UNEQUIP (EquipableItem_ACUnequip) - Unequipping itemsItem.AC_DROP (Item_ACDrop) - Dropping itemsItem.AC_THROW (Item_ACThrow) - Throwing itemsTomeOfMastery.AC_READ (TomeOfMastery_ACRead) - Reading tome of masteryTorch.AC_LIGHT (Torch_ACLight) - Lighting torchesWeightstone.AC_APPLY (Weightstone_ACApply) - Applying weightstonesAmulet.AC_END (Amulet_ACEnd) - Ending game with Amulet of YendorArmorKit.AC_APPLY (ArmorKit_ACAplly) - Applying armor kit (note: typo in code: ACAplly)Pickaxe.AC_MINE (Pickaxe_ACMine) - Mining with pickaxePlant.AC_PLANT - Planting seeds (Seed action)Potion.AC_MOISTEN (Potion_ACMoisten) - Moisten items with potionsShortSword.AC_REFORGE (ShortSword_ACReforge) - Reforging with shortswordWand.AC_ZAP (Wand_ACZap) - Zapping wandsWandOfMagicMissile.AC_DISENCHANT (WandOfMagicMissile_ACDisenchant) - Disenchanting with wand of magic missileStylus.AC_INSCRIBE (Stylus_ACInscribe) - Inscribing with arcane stylus
These actions can be restricted in the initHeroes.json configuration file for specific hero classes using the forbiddenActions array.
The Gnoll class forbids reading scrolls, reading tome of mastery, and inscribing with arcane stylus:
"forbiddenActions": [ "Scroll_ACRead", "TomeOfMastery_ACRead", "Stylus_ACInscribe" ]
The HeroClass.forbidden(String action) method in HeroClass.java checks if an action is in the class's forbiddenActions set. The action constants are defined in various item classes and CommonActions.java.
RemixedDungeon/src/main/assets/hero/initHeroes.jsonHeroClass.forbidden() method in HeroClass.javaCommonActions.java