====== Stone Walking Buff - Code References ======
{{ rpd:images:stone_walking_buff.png|Stone Walking Buff }}
The **Stone Walking** buff is an artifact buff applied by the [[en:rpd:ring_of_stone_blood_item|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:**
* [[https://github.com/NYRDS/remixed-dungeon/blob/master/RemixedDungeon/src/main/java/com/watabou/pixeldungeon/items/rings/RingOfStoneWalking.java|RingOfStoneWalking.java]] - Ring and buff implementation
* Inner class: `RingOfStoneWalking.StoneWalking` extends `ArtifactBuff` implements `Doom`
* Buff factory registration: [[https://github.com/NYRDS/remixed-dungeon/blob/master/RemixedDungeon/src/main/java/com/nyrds/pixeldungeon/mechanics/buffs/BuffFactory.java|BuffFactory.java]] (line 166)
- Constant: `RING_OF_STONE_WALKING`
- 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):**
Stone blood
The blood turns stone which merges with the walls nearby and makes traversing them much easier, but at what cost.
You have been immured in stone. Forever.
Ring of Stone Blood
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?
**Russian (values-ru/strings_all.xml):**
Каменная Кровь
Кровь превращается в камень, вязкость которой подстраивается под близлежащие стены и значительно облегчает прохождение через них, но какой ценой.
Замурован в камне. Навсегда.
Кольцо Каменной Крови
Это кольцо, сделанное из крепкого камня, выглядело бы обычным. Если бы не капля жидкой крови, пульсирующая вместо камня. Внутри стрелка, указывающая на что-то вроде стены и на разбитое сердце... Что бы это могло значить?
===== Lua Scripts =====
This entity is implemented entirely in Java, no Lua script exists.
===== Related Entities =====
**Item:**
* [[en:rpd:ring_of_stone_blood_item|Ring of Stone Blood]] - The artifact ring that applies this buff
**Buffs:**
* [[mr:artifact_buff|Artifact Buff]] - Base class for artifact buffs (see [[https://github.com/NYRDS/remixed-dungeon/blob/master/RemixedDungeon/src/main/java/com/watabou/pixeldungeon/actors/buffs/ArtifactBuff.java|ArtifactBuff.java]])
* [[mr:doom_interface|Doom Interface]] - Interface for doom-type buffs that affect death (see [[https://github.com/NYRDS/remixed-dungeon/blob/master/RemixedDungeon/src/main/java/com/watabou/pixeldungeon/actors/hero/Doom.java|Doom.java]])
**Badges:**
* `Badges.validateDeathInStone()` - Unlocks badge when dying while affected by this buff
===== Code References =====
* Java: [[https://github.com/NYRDS/remixed-dungeon/blob/master/RemixedDungeon/src/main/java/com/watabou/pixeldungeon/items/rings/RingOfStoneWalking.java|RingOfStoneWalking.java]]
* Java: [[https://github.com/NYRDS/remixed-dungeon/blob/master/RemixedDungeon/src/main/java/com/nyrds/pixeldungeon/mechanics/buffs/BuffFactory.java|BuffFactory.java]]