mr:ooze_buff
Table of Contents
Ooze Buff - Code References
Lua Implementation
- Script: `scripts/buffs/Ooze.lua`
- File: `RemixedDungeon/src/main/assets/scripts/buffs/Ooze.lua`
- Note: Formerly implemented in Java (`com.watabou.pixeldungeon.actors.buffs.Ooze`), migrated to Lua
Full Lua Script Content
--- --- Ooze: buffLevel damage per tick, washed off in water (was actors/buffs/Ooze.java) --- local RPD = require "scripts/lib/commonClasses" local buff = require "scripts/lib/buff" return buff.init{ desc = function () return { icon = 8, -- BuffIndicator.OOZE name = "OozeBuff_Name", info = "OozeBuff_Info", } end, act = function(self, buff) local target = buff.target if target:isAlive() then target:damage(buff:level(), buff) if not target:isAlive() and target == RPD.Dungeon.hero then RPD.Dungeon:fail(RPD.JavaUtils:format( RPD.ResultDescriptions:getDescription(RPD.ResultReason.OOZE), { RPD.Dungeon.depth })) RPD.GLog:n(RPD.JavaUtils:format(RPD.textById("Ooze_Death"), { buff:name() }), {}) end buff:spend(1) -- Actor.TICK end if RPD.Dungeon.level.water[target:getPos() + 1] then local lvl = buff:level() if lvl <= 0 then buff:detach() end buff:level(lvl - 1) end end }
Effects from code:
- Damage per tick: Deals damage equal to `buff:level()` each tick
- Water interaction: When standing in water, buff level decreases by 1 per tick; detaches when level reaches 0
- Death message: Uses `RPD.ResultReason.OOZE` for death reporting
JSON Configuration
This entity is implemented in Lua, no JSON configuration exists
String Resources
<string name="OozeBuff_Name">Caustic Ooze</string> <string name="OozeBuff_Info">Caustic ooze is eating away at the flesh!</string> <string name="Ooze_Death">%s killed you...</string> <string name="Hero_StaOoze">Caustic ooze eats at your flesh. Wash it away!</string> <string name="ResultDescriptions_Ooze">Killed by a caustic ooze on level %d</string>
Java References
- Buff Factory Registration: BuffFactory.java - Buff kind constant `OOZE = “Ooze�`
- Common Classes: commonClasses.lua - Buff identifier mapping
Related mr Entities
- Goo Mob - Applies Ooze on hit
- Rotting Fist Mob - Applies Ooze on hit
- Deep Snail Mob - Applies Ooze on defence
mr/ooze_buff.txt · Last modified: by 127.0.0.1
