User Tools

Site Tools


mr:stone_walking_buff

Stone Walking Buff - Code References

Stone Walking Buff

The Stone Walking buff is an artifact buff applied by the Ring of Stone Blood. It is a doom buff that triggers a special death condition when the hero dies while affected by it.

Java Classes

Buff Implementation:

  • RingOfStoneWalking.java - Ring and buff implementation
  • Inner class: `RingOfStoneWalking.StoneWalking` extends `ArtifactBuff` implements `Doom`
  • Buff factory registration: BuffFactory.java (line 166)
    1. Constant: `RING_OF_STONE_WALKING`
    2. Registered buff class: `RingOfStoneWalking.StoneWalking.class`

Key Methods:

// In RingOfStoneWalking.java
public static class StoneWalking extends ArtifactBuff implements Doom {
    @Override
    public int icon() {
        return BuffIndicator.STONEBLOOD;
    }
 
    @Override
    public String name() {
        return StringsManager.getVar(R.string.StoneBloodBuff_Name);
    }
 
    @Override
    public String desc() {
        return StringsManager.getVar(R.string.StoneBloodBuff_Info);
    }
 
    @Override
    public void onHeroDeath() {
        Badges.validateDeathInStone();
        Dungeon.fail(Utils.format(ResultDescriptions.getDescription(ResultDescriptions.Reason.IMMURED), Dungeon.depth));
        GLog.n(StringsManager.getVar(R.string.RingOfStoneWalking_ImmuredInStone));
    }
}

JSON Configuration

Item Configuration:

  • `RemixedDungeon/src/main/assets/spritesDesc/rings.json` - Ring sprite configuration
  • Item image: `ItemSpriteSheet.RING_OF_STONE_WALKING`

Buff Configuration:

  • No separate JSON config - buff is defined in Java code
  • Buff icon: `BuffIndicator.STONEBLOOD`

String Resources

English (values/strings_all.xml):

<string name="StoneBloodBuff_Name">Stone blood</string>
<string name="StoneBloodBuff_Info">The blood turns stone which merges with the walls nearby and makes traversing them much easier, but at what cost.</string>
<string name="RingOfStoneWalking_ImmuredInStone">You have been immured in stone. Forever.</string>
<string name="RingOfStoneWalking_Name">Ring of Stone Blood</string>
<string name="RingOfStoneWalking_Info">This strange ring is made of some sturdy stone. What you first thought was a ruby is actually liquid blood being held in place! Inside is an arrow pointing at what appears to be a wall, along with a broken heart... What might it do?</string>

Russian (values-ru/strings_all.xml):

<string name="StoneBloodBuff_Name">Каменная Кровь</string>
<string name="StoneBloodBuff_Info">Кровь превращается в камень, вязкость которой подстраивается под близлежащие стены и значительно облегчает прохождение через них, но какой ценой.</string>
<string name="RingOfStoneWalking_ImmuredInStone">Замурован в камне. Навсегда.</string>
<string name="RingOfStoneWalking_Name">Кольцо Каменной Крови</string>
<string name="RingOfStoneWalking_Info">Это кольцо, сделанное из крепкого камня, выглядело бы обычным. Если бы не капля жидкой крови, пульсирующая вместо камня. Внутри стрелка, указывающая на что-то вроде стены и на разбитое сердце... Что бы это могло значить?</string>

Lua Scripts

This entity is implemented entirely in Java, no Lua script exists.

Item:

Buffs:

Badges:

  • `Badges.validateDeathInStone()` - Unlocks badge when dying while affected by this buff

Code References

mr/stone_walking_buff.txt · Last modified: by 127.0.0.1