From e2e05a41705db2316f781b625fa1747095b7ef8f Mon Sep 17 00:00:00 2001 From: Evan Debenham Date: Wed, 2 Apr 2025 17:20:54 -0400 Subject: [PATCH] v3.1.0: gravity chaos now has an icon, name, and desc --- .../assets/messages/actors/actors.properties | 5 ++++ .../actors/buffs/GravityChaosTracker.java | 26 +++++++++++++++++++ 2 files changed, 31 insertions(+) diff --git a/core/src/main/assets/messages/actors/actors.properties b/core/src/main/assets/messages/actors/actors.properties index a8d080923..c4872a778 100644 --- a/core/src/main/assets/messages/actors/actors.properties +++ b/core/src/main/assets/messages/actors/actors.properties @@ -235,6 +235,11 @@ actors.buffs.fury.desc=You are angry, enemies won't like you when you're angry.\ actors.buffs.blobimmunity.name=purification barrier actors.buffs.blobimmunity.desc=Some strange force is encasing you in a thin protective barrier, blocking out all harmful airborne effects.\n\nYou are immune to all area-bound effects while this barrier lasts.\n\nTurns of immunity remaining: %s. +actors.buffs.gravitychaostracker.name=gravity chaos +actors.buffs.gravitychaostracker.desc_intro=Every few turns all characters on the current dungeon floor will be thrown in a random direction. +actors.buffs.gravitychaostracker.desc_positive=You and your allies seem to be immune though. +actors.buffs.gravitychaostracker.desc_duration=It's not clear how long the effect will last for, but it can't last forever. + actors.buffs.greaterhaste.name=greater haste actors.buffs.greaterhaste.desc=An incredible boost of speed, for a moment it feels as if everything else is standing still.\n\nWhile under the effects of greater haste moving actions take no time at all, but other actions are still performed at normal speed. Each step of movement consumes a turn of greater haste.\n\nTurns of greater haste remaining: %d. diff --git a/core/src/main/java/com/shatteredpixel/shatteredpixeldungeon/actors/buffs/GravityChaosTracker.java b/core/src/main/java/com/shatteredpixel/shatteredpixeldungeon/actors/buffs/GravityChaosTracker.java index 6a143440c..890e543a0 100644 --- a/core/src/main/java/com/shatteredpixel/shatteredpixeldungeon/actors/buffs/GravityChaosTracker.java +++ b/core/src/main/java/com/shatteredpixel/shatteredpixeldungeon/actors/buffs/GravityChaosTracker.java @@ -30,7 +30,9 @@ import com.shatteredpixel.shatteredpixeldungeon.items.wands.CursedWand; import com.shatteredpixel.shatteredpixeldungeon.items.wands.WandOfBlastWave; import com.shatteredpixel.shatteredpixeldungeon.mechanics.Ballistica; import com.shatteredpixel.shatteredpixeldungeon.messages.Messages; +import com.shatteredpixel.shatteredpixeldungeon.ui.BuffIndicator; import com.shatteredpixel.shatteredpixeldungeon.utils.GLog; +import com.watabou.noosa.Image; import com.watabou.noosa.audio.Sample; import com.watabou.utils.Bundle; import com.watabou.utils.PathFinder; @@ -44,6 +46,20 @@ public class GravityChaosTracker extends Buff { actPriority = BUFF_PRIO-10; //acts after other buffs } + @Override + public int icon() { + return BuffIndicator.VERTIGO; + } + + @Override + public void tintIcon(Image icon) { + if (positiveOnly){ + icon.hardlight(0, 1, 0); + } else { + icon.hardlight(1, 0, 0); + } + } + //lasts an average of 100 turns, with high variance public int left = Random.NormalIntRange(30, 70); @@ -131,6 +147,16 @@ public class GravityChaosTracker extends Buff { } + @Override + public String desc() { + String desc = Messages.get(this, "desc_intro"); + if (positiveOnly){ + desc += " " + Messages.get(this, "desc_positive"); + } + desc += "\n\n" + Messages.get(this, "desc_duration"); + return desc; + } + private static final String LEFT = "left"; private static final String POSITIVE_ONLY = "positive_only";