From 76e698cb0a06aef74675823c0a915f55450a9bd2 Mon Sep 17 00:00:00 2001 From: Evan Debenham Date: Thu, 8 May 2025 13:51:34 -0400 Subject: [PATCH] v3.1.0: fixed no entry appearing in rankings for death by life link --- core/src/main/assets/messages/actors/actors.properties | 1 + .../shatteredpixel/shatteredpixeldungeon/actors/Char.java | 5 +++++ 2 files changed, 6 insertions(+) diff --git a/core/src/main/assets/messages/actors/actors.properties b/core/src/main/assets/messages/actors/actors.properties index 4fcd4f9f6..a4e09651e 100644 --- a/core/src/main/assets/messages/actors/actors.properties +++ b/core/src/main/assets/messages/actors/actors.properties @@ -280,6 +280,7 @@ actors.buffs.levitation.name=levitating actors.buffs.levitation.desc=A magical force is levitating you over the ground, making you feel weightless.\n\nLevitating characters move silently and ignore all ground-based effects. Traps won't trigger, water won't put out fire, plants won't be trampled, roots will miss, and pits will be hovered over. Be careful, as all these things can come into effect the second the levitation ends!\n\nTurns of levitation remaining: %s. actors.buffs.lifelink.name=life link +actors.buffs.lifelink.ondeath=The life linked damage killed you... actors.buffs.lifelink.desc=This character's life force is linked to another character nearby. Any damage taken is shared between them.\n\nWhenever this character takes damage, half of it will be dealt to the life link target instead.\n\nTurns of life link remaining: %s. actors.buffs.light.name=illuminated diff --git a/core/src/main/java/com/shatteredpixel/shatteredpixeldungeon/actors/Char.java b/core/src/main/java/com/shatteredpixel/shatteredpixeldungeon/actors/Char.java index ed16b186f..d522dbe56 100644 --- a/core/src/main/java/com/shatteredpixel/shatteredpixeldungeon/actors/Char.java +++ b/core/src/main/java/com/shatteredpixel/shatteredpixeldungeon/actors/Char.java @@ -825,6 +825,11 @@ public abstract class Char extends Actor { ch.damage(dmg, link); if (!ch.isAlive()) { link.detach(); + if (ch == Dungeon.hero){ + Badges.validateDeathFromFriendlyMagic(); + Dungeon.fail(src); + GLog.n( Messages.get(LifeLink.class, "ondeath") ); + } } } }