====== Poison Buff - Code References ====== ===== Java Classes ===== * [[https://github.com/NYRDS/remixed-dungeon/blob/master/RemixedDungeon/src/main/java/com/watabou/pixeldungeon/actors/buffs/Poison.java|Poison.java]] - Main buff class implementing Doom interface * [[https://github.com/NYRDS/remixed-dungeon/blob/master/RemixedDungeon/src/main/java/com/watabou/pixeldungeon/items/weapon/enchantments/Poison.java|Poison enchantment]] - Weapon enchantment that applies poison * [[https://github.com/NYRDS/remixed-dungeon/blob/master/RemixedDungeon/src/main/java/com/watabou/pixeldungeon/levels/traps/PoisonTrap.java|PoisonTrap.java]] - Trap that applies poison * [[https://github.com/NYRDS/remixed-dungeon/blob/master/RemixedDungeon/src/main/java/com/watabou/pixeldungeon/effects/particles/PoisonParticle.java|PoisonParticle.java]] - Visual particle effects for poison * [[https://github.com/NYRDS/remixed-dungeon/blob/master/RemixedDungeon/src/main/java/com/watabou/pixeldungeon/items/weapon/missiles/PoisonArrow.java|PoisonArrow.java]] - Missile weapon that applies poison ===== Implementation Details ===== * **Class Hierarchy**: `Poison extends Buff implements Doom` * **Icon**: `BuffIndicator.POISON` (icon ID 4) * **Damage Formula**: `target.damage((int)(timeLeft / 3) + 1, this)` - deals damage based on remaining duration * **Duration Factor**: Modified by `RingOfElements.Resistance` buff * **Visual Effect**: `PoisonParticle.SPLASH` burst effect (5 particles) * **Status Display**: Shows `Char_StaPoisoned` status text on affected character * **Hero Death**: Triggers `Badges.validateDeathFromPoison()` and displays death message ===== JSON Configuration ===== This entity is implemented in Java, no JSON configuration exists ===== String Resources ===== Venomous %s Venomous %s Venomous %s You died from poison... poison arrow An arrowhead that contains a potent toxin. Damage dealt by this arrow is converted to poison damage. 0 Poisoned The poison is slowly eating away at your health.\n\nDamage dealt: %d Poisoned Отравленное %s Отравленный %s Отравленная %s Ты умер от яда... ядовитая стрела Наконечник стрелы содержит сильный токсин. Урон, нанесенный этой стрелой, преобразуется в отравляющий урон. 0 Отравление Яд постепенно истощает ваше здоровье.\n\nНанесённый урон: %d Отравлен ===== Lua Scripts ===== * [[https://github.com/NYRDS/remixed-dungeon/blob/master/RemixedDungeon/src/main/assets/scripts/items/RottenFish.lua]] - Rotten fish that applies poison * [[https://github.com/NYRDS/remixed-dungeon/blob/master/RemixedDungeon/src/main/assets/scripts/buffs/ChaosShieldLeft.lua]] - Chaos shield left that can curse enemies with poison * [[https://github.com/NYRDS/remixed-dungeon/blob/master/RemixedDungeon/src/main/assets/scripts/mobs/Stinger.lua]] - Stinger mob that can apply poison * [[https://github.com/NYRDS/remixed-dungeon/blob/master/RemixedDungeon/src/main/assets/scripts/spells/CorpseExplosion.lua]] - Corpse explosion spell that applies poison * [[https://github.com/NYRDS/remixed-dungeon/blob/master/RemixedDungeon/src/main/assets/scripts/lib/commonClasses.lua]] - Common classes library that binds the Poison class ===== Usage in Code ===== * Used in PoisonTrap.java to apply poison to characters * Used in PotionOfHealing.java to remove poison buff * Used in RingOfElements.java for elemental resistance * Used in various mobs (Scorpio, SpiderServant, SpiderQueen, Zombie, Worm) to apply poison on hit * Used in FrozenCarpaccio.java and MysteryMeat.java to remove poison * Used in BuffFactory.java to register the buff * Used in various enchantments and plant effects * Damage calculation: deals `(timeLeft / 3) + 1` damage per tick * Duration is affected by Ring of Elements resistance