====== Instability Enchantment - Code References ====== ===== Java Classes ===== * [[https://github.com/NYRDS/remixed-dungeon/blob/master/RemixedDungeon/src/main/java/com/watabou/pixeldungeon/items/weapon/enchantments/Instability.java|Instability.java]] * Entity Kind: ''getEntityKind()'' returns "Instability" (class simple name) * Inheritance: Extends ''Weapon.Enchantment'' (abstract class) * Implements: ''NamedEntityKind'', ''Bundlable'', ''Buff'' * Key Method: ''proc(Weapon, Char, Char, int)'' - selects a random enchantment and applies its proc effect * Special Logic: On boomerangs, avoids Piercing and Swing enchantments to prevent infinite loops * Registration: Registered in ''Weapon.Enchantment.enchants'' array (index 8) with 3% weight (see chances array) ===== JSON Configuration ===== No dedicated JSON configuration file. Enchantment data is defined in Java class. ===== String Resources ===== * English: [[https://github.com/NYRDS/remixed-dungeon/blob/master/RemixedDungeon/src/main/res/values/strings_all.xml#L1124-L1126|Instability_Name array]] - "Unstable %s" (3 gender variants) * String Array: [[https://github.com/NYRDS/remixed-dungeon/blob/master/RemixedDungeon/src/main/res/values/string_arrays.xml#L220-L223|Instability_Name array definition]] ===== Lua Scripts ===== This entity is implemented in Java, no Lua script exists. ===== Additional References ===== * Enchantment List: [[https://github.com/NYRDS/remixed-dungeon/blob/master/RemixedDungeon/src/main/java/com/watabou/pixeldungeon/items/weapon/Weapon.java#L242-L248|Weapon.java#L242-L248]] - Instability in enchants array with 3% chance * Enchantment Base Class: [[https://github.com/NYRDS/remixed-dungeon/blob/master/RemixedDungeon/src/main/java/com/watabou/pixeldungeon/items/weapon/Weapon.java#L240-L260|Weapon.Enchantment]] * Boomerang Check: [[https://github.com/NYRDS/remixed-dungeon/blob/master/RemixedDungeon/src/main/java/com/watabou/pixeldungeon/items/weapon/enchantments/Instability.java#L12-L15|Instability.java#L12-L15]] - Excludes Piercing and Swing on boomerangs ===== Related mr Entities ===== * [[mr:death_enchantment|Death Enchantment]] * [[mr:paralysis_enchantment|Paralysis Enchantment]] * [[mr:leech_enchantment|Leech Enchantment]] * [[mr:piercing_enchantment|Piercing Enchantment]]