User Tools

Site Tools


mr:deferred_damage_buff

Deferred Damage Buff - Code References

Deferred Damage Buff

Machine-readable reference page for the Deferred Damage buff entity.

Entity Kind

Viscosity.DeferedDamage

Java Classes

Class Details

  • Full Class Name: com.watabou.pixeldungeon.items.armor.glyphs.Viscosity.DeferedDamage
  • Parent Class: Buff
  • Package: com.watabou.pixeldungeon.items.armor.glyphs.Viscosity
  • Type: Nested static class (DeferedDamage - note spelling)
  • Icon: BuffIndicator.DEFERRED (ID 28)

Buff Properties

  • Buff Type: Negative buff (debuff)
  • Applied by: Glyph of Viscosity on armor
  • Effect: Delays received damage over time (1 damage per turn instead of all at once)
  • Damage Processing: Deals 1 damage per tick until all deferred damage is dealt
  • Death from Buff: If target dies from deferred damage, death is attributed to the glyph

Java Code Fragment

public static class DeferedDamage extends Buff {
 
    @Packable
    public int damage = 0;
 
    @Override
    public int icon() {
        return BuffIndicator.DEFERRED;
    }
 
    @Override
    public boolean act() {
        if (target.isAlive()) {
            target.damage( 1, this );
            if (target == Dungeon.hero && !target.isAlive()) {
                Glyph glyph = new Viscosity();
                Dungeon.fail( Utils.format( ResultDescriptions.getDescription(ResultDescriptions.Reason.GLYPH), glyph.name(), Dungeon.depth ) );
                GLog.n(StringsManager.getVar(R.string.DeferedDamage_Killed_Txt), glyph.name() );
                Badges.validateDeathFromGlyph();
            }
            spend( TICK );
            if (--damage <= 0) {
                detach();
            }
        } else {
            detach();
        }
        return true;
    }
}

String Resources

<!-- English (values/strings_all.xml) -->
<string name="DeferedDamageBuff_Name">Deferred Damage (%d)</string>
<string name="DeferedDamageBuff_Info">The pain has been turned into a slowing pain, lessening the damage taken at once.\nDamage left to receive %d</string>
<string name="DeferedDamage_Killed_Txt">%s killed you...</string>
 
<!-- Russian (values-ru/strings_all.xml) -->
<string name="DeferedDamageBuff_Name">Отложенный урон (%d)</string>
<string name="DeferedDamageBuff_Info">Боль заметно растянулась, что значительно уменьшило одновременно получаемый урон. \nУрона осталось получить %d</string>
<string name="DeferedDamage_Killed_Txt">%s убивает тебя...</string>

Lua Scripts

This entity is implemented entirely in Java. No Lua script exists for this buff.

JSON Configuration

This entity is implemented entirely in Java. No JSON configuration exists for this buff.

Notes

  • The class name uses the spelling “DeferedDamage” (single 'r'), not “DeferredDamage”
  • The buff deals exactly 1 damage per tick regardless of the total deferred amount
  • If the target dies from deferred damage, it counts as being killed by the Viscosity glyph
mr/deferred_damage_buff.txt · Last modified: by 127.0.0.1