diff --git a/core/src/main/assets/interfaces/buffs.png b/core/src/main/assets/interfaces/buffs.png index 7f9243f08..40802de80 100644 Binary files a/core/src/main/assets/interfaces/buffs.png and b/core/src/main/assets/interfaces/buffs.png differ diff --git a/core/src/main/assets/interfaces/large_buffs.png b/core/src/main/assets/interfaces/large_buffs.png index 88a1266ec..5bf96a473 100644 Binary files a/core/src/main/assets/interfaces/large_buffs.png and b/core/src/main/assets/interfaces/large_buffs.png differ diff --git a/core/src/main/assets/messages/actors/actors.properties b/core/src/main/assets/messages/actors/actors.properties index 154e4e51a..caf8f2140 100644 --- a/core/src/main/assets/messages/actors/actors.properties +++ b/core/src/main/assets/messages/actors/actors.properties @@ -52,7 +52,7 @@ actors.blobs.web.desc=A thick web is covering everything here. Anything that tou actors.buffs.adrenaline.name=Adrenaline actors.buffs.adrenaline.desc=A surge of physical power, adrenaline enhanced both attack and movement speed.\n\nAdrenaline allows its target to run at 2x speed, and attack at 1.5x speed.\n\nTurns remaining: %s. -actors.buffs.adrenalinesurge.name=Adrenaline Surge +actors.buffs.adrenalinesurge.name=Strength Boost actors.buffs.adrenalinesurge.desc=A surge of great might, but sadly not permanent.\n\nStrength boost: +%d.\nTurns until boost weakens: %s. actors.buffs.amok.name=Amok diff --git a/core/src/main/assets/messages/items/items.properties b/core/src/main/assets/messages/items/items.properties index 4fec044fd..95748122c 100644 --- a/core/src/main/assets/messages/items/items.properties +++ b/core/src/main/assets/messages/items/items.properties @@ -409,6 +409,8 @@ items.artifacts.timekeepershourglass.prompt=How would you like to use the hourgl items.artifacts.timekeepershourglass.desc=This large ornate hourglass looks fairly unassuming, but you feel a great power in its finely carved frame. As you rotate the hourglass and watch the sand pour you can feel its magic tugging at you, surely using this magic would give you some control over time. items.artifacts.timekeepershourglass.desc_hint=The hourglass seems to have lost some sand, if only you could find some... items.artifacts.timekeepershourglass.desc_cursed=The cursed hourglass is locked to your side, you can feel it trying to manipulate your flow of time. +items.artifacts.timekeepershourglass$timefreeze.name=Time Freeze +items.artifacts.timekeepershourglass$timefreeze.desc=Time is frozen around you, allowing you to perform actions instantly. The effect will last until it is cancelled or your hourglass runs out of charge. Attacking or using magic will break this effect as well. items.artifacts.timekeepershourglass$sandbag.name=bag of magic sand items.artifacts.timekeepershourglass$sandbag.levelup=You add the sand to your hourglass. items.artifacts.timekeepershourglass$sandbag.maxlevel=Your hourglass is filled with magical sand! @@ -1081,6 +1083,8 @@ items.spells.curseinfusion.desc=This spell infuses a piece of equipment with the items.spells.featherfall.name=feather fall items.spells.featherfall.light=You feel light as a feather! items.spells.featherfall.desc=This spell manipulates gravity's effect on the caster, allowing them to fall great distances without harm for a short time. Each use of the spell will only provide enough protection for one chasm. +items.spells.featherfall$featherbuff.name=Feather Fall +items.spells.featherfall$featherbuff.desc=You are under the effects of a feather fall spell, allowing you to fall into a chasm without taking damage! This effect will expire when it is used, or after a bit of time passes.\n\nTurns remaining: %s. items.spells.spell.ac_cast=CAST items.spells.spell.no_magic=You can't cast spells while magic immune. @@ -1140,6 +1144,7 @@ items.stones.runestone$placeholder.name=runestone items.stones.stoneofaggression.name=stone of aggression items.stones.stoneofaggression.desc=When this stone is thrown at an ally or enemy, all nearby enemies will be forced to attack that character for a short time.\n\nWhen used on enemies, the magic will only last for a few turns, but when used on yourself or allies it will last significantly longer. items.stones.stoneofaggression$aggression.name=Targeted +items.stones.stoneofaggression$aggression.desc=Manipulative magic is forcing all nearby enemies to attack this character.\n\nTurns remaining: %s. items.stones.stoneofaugmentation.name=stone of augmentation items.stones.stoneofaugmentation.inv_title=Augment an item diff --git a/core/src/main/java/com/shatteredpixel/shatteredpixeldungeon/actors/buffs/Adrenaline.java b/core/src/main/java/com/shatteredpixel/shatteredpixeldungeon/actors/buffs/Adrenaline.java index bd26a706d..2559f4bee 100644 --- a/core/src/main/java/com/shatteredpixel/shatteredpixeldungeon/actors/buffs/Adrenaline.java +++ b/core/src/main/java/com/shatteredpixel/shatteredpixeldungeon/actors/buffs/Adrenaline.java @@ -23,6 +23,7 @@ package com.shatteredpixel.shatteredpixeldungeon.actors.buffs; import com.shatteredpixel.shatteredpixeldungeon.messages.Messages; import com.shatteredpixel.shatteredpixeldungeon.ui.BuffIndicator; +import com.watabou.noosa.Image; public class Adrenaline extends FlavourBuff { @@ -36,7 +37,12 @@ public class Adrenaline extends FlavourBuff { @Override public int icon() { - return BuffIndicator.AMOK; + return BuffIndicator.UPGRADE; + } + + @Override + public void tintIcon(Image icon) { + icon.hardlight(1, 0, 0); } @Override diff --git a/core/src/main/java/com/shatteredpixel/shatteredpixeldungeon/actors/buffs/AdrenalineSurge.java b/core/src/main/java/com/shatteredpixel/shatteredpixeldungeon/actors/buffs/AdrenalineSurge.java index b2b68748d..dcd8cdc01 100644 --- a/core/src/main/java/com/shatteredpixel/shatteredpixeldungeon/actors/buffs/AdrenalineSurge.java +++ b/core/src/main/java/com/shatteredpixel/shatteredpixeldungeon/actors/buffs/AdrenalineSurge.java @@ -23,6 +23,7 @@ package com.shatteredpixel.shatteredpixeldungeon.actors.buffs; import com.shatteredpixel.shatteredpixeldungeon.messages.Messages; import com.shatteredpixel.shatteredpixeldungeon.ui.BuffIndicator; +import com.watabou.noosa.Image; import com.watabou.utils.Bundle; public class AdrenalineSurge extends Buff { @@ -59,7 +60,12 @@ public class AdrenalineSurge extends Buff { @Override public int icon() { - return BuffIndicator.FURY; + return BuffIndicator.UPGRADE; + } + + @Override + public void tintIcon(Image icon) { + icon.hardlight(1f, 0.5f, 0); } @Override diff --git a/core/src/main/java/com/shatteredpixel/shatteredpixeldungeon/actors/buffs/Berserk.java b/core/src/main/java/com/shatteredpixel/shatteredpixeldungeon/actors/buffs/Berserk.java index 9d45bc7e2..f9ca1cc7f 100644 --- a/core/src/main/java/com/shatteredpixel/shatteredpixeldungeon/actors/buffs/Berserk.java +++ b/core/src/main/java/com/shatteredpixel/shatteredpixeldungeon/actors/buffs/Berserk.java @@ -39,6 +39,10 @@ import java.text.DecimalFormat; public class Berserk extends Buff { + { + type = buffType.POSITIVE; + } + private enum State{ NORMAL, BERSERK, RECOVERING } diff --git a/core/src/main/java/com/shatteredpixel/shatteredpixeldungeon/actors/buffs/Combo.java b/core/src/main/java/com/shatteredpixel/shatteredpixeldungeon/actors/buffs/Combo.java index d35843d4e..551aff9e9 100644 --- a/core/src/main/java/com/shatteredpixel/shatteredpixeldungeon/actors/buffs/Combo.java +++ b/core/src/main/java/com/shatteredpixel/shatteredpixeldungeon/actors/buffs/Combo.java @@ -52,6 +52,10 @@ import com.watabou.utils.PathFinder; import com.watabou.utils.Random; public class Combo extends Buff implements ActionIndicator.Action { + + { + type = buffType.POSITIVE; + } private int count = 0; private float comboTime = 0f; diff --git a/core/src/main/java/com/shatteredpixel/shatteredpixeldungeon/actors/buffs/FireImbue.java b/core/src/main/java/com/shatteredpixel/shatteredpixeldungeon/actors/buffs/FireImbue.java index 3740668fc..0f91db133 100644 --- a/core/src/main/java/com/shatteredpixel/shatteredpixeldungeon/actors/buffs/FireImbue.java +++ b/core/src/main/java/com/shatteredpixel/shatteredpixeldungeon/actors/buffs/FireImbue.java @@ -28,6 +28,7 @@ import com.shatteredpixel.shatteredpixeldungeon.levels.Terrain; import com.shatteredpixel.shatteredpixeldungeon.messages.Messages; import com.shatteredpixel.shatteredpixeldungeon.scenes.GameScene; import com.shatteredpixel.shatteredpixeldungeon.ui.BuffIndicator; +import com.watabou.noosa.Image; import com.watabou.utils.Bundle; import com.watabou.utils.Random; @@ -86,7 +87,12 @@ public class FireImbue extends Buff { @Override public int icon() { - return BuffIndicator.FIRE; + return BuffIndicator.IMBUE; + } + + @Override + public void tintIcon(Image icon) { + icon.hardlight(2f, 0.75f, 0f); } @Override diff --git a/core/src/main/java/com/shatteredpixel/shatteredpixeldungeon/actors/buffs/FrostImbue.java b/core/src/main/java/com/shatteredpixel/shatteredpixeldungeon/actors/buffs/FrostImbue.java index 1c7f685cd..ec11d1c41 100644 --- a/core/src/main/java/com/shatteredpixel/shatteredpixeldungeon/actors/buffs/FrostImbue.java +++ b/core/src/main/java/com/shatteredpixel/shatteredpixeldungeon/actors/buffs/FrostImbue.java @@ -25,6 +25,7 @@ import com.shatteredpixel.shatteredpixeldungeon.actors.Char; import com.shatteredpixel.shatteredpixeldungeon.effects.particles.SnowParticle; import com.shatteredpixel.shatteredpixeldungeon.messages.Messages; import com.shatteredpixel.shatteredpixeldungeon.ui.BuffIndicator; +import com.watabou.noosa.Image; public class FrostImbue extends FlavourBuff { @@ -42,7 +43,12 @@ public class FrostImbue extends FlavourBuff { @Override public int icon() { - return BuffIndicator.FROST; + return BuffIndicator.IMBUE; + } + + @Override + public void tintIcon(Image icon) { + icon.hardlight(0, 2f, 3f); } @Override diff --git a/core/src/main/java/com/shatteredpixel/shatteredpixeldungeon/actors/buffs/Levitation.java b/core/src/main/java/com/shatteredpixel/shatteredpixeldungeon/actors/buffs/Levitation.java index 729c4846b..5f6cc6bbf 100644 --- a/core/src/main/java/com/shatteredpixel/shatteredpixeldungeon/actors/buffs/Levitation.java +++ b/core/src/main/java/com/shatteredpixel/shatteredpixeldungeon/actors/buffs/Levitation.java @@ -28,6 +28,7 @@ import com.shatteredpixel.shatteredpixeldungeon.messages.Messages; import com.shatteredpixel.shatteredpixeldungeon.scenes.GameScene; import com.shatteredpixel.shatteredpixeldungeon.sprites.CharSprite; import com.shatteredpixel.shatteredpixeldungeon.ui.BuffIndicator; +import com.watabou.noosa.Image; public class Levitation extends FlavourBuff { @@ -63,6 +64,11 @@ public class Levitation extends FlavourBuff { return BuffIndicator.LEVITATION; } + @Override + public void tintIcon(Image icon) { + icon.hardlight(1f, 2.1f, 2.5f); + } + @Override public float iconFadePercent() { return Math.max(0, (DURATION - visualcooldown()) / DURATION); diff --git a/core/src/main/java/com/shatteredpixel/shatteredpixeldungeon/actors/buffs/LifeLink.java b/core/src/main/java/com/shatteredpixel/shatteredpixeldungeon/actors/buffs/LifeLink.java index b4da6ee4a..8de69c755 100644 --- a/core/src/main/java/com/shatteredpixel/shatteredpixeldungeon/actors/buffs/LifeLink.java +++ b/core/src/main/java/com/shatteredpixel/shatteredpixeldungeon/actors/buffs/LifeLink.java @@ -25,6 +25,7 @@ import com.shatteredpixel.shatteredpixeldungeon.actors.Actor; import com.shatteredpixel.shatteredpixeldungeon.actors.Char; import com.shatteredpixel.shatteredpixeldungeon.messages.Messages; import com.shatteredpixel.shatteredpixeldungeon.ui.BuffIndicator; +import com.watabou.noosa.Image; import com.watabou.utils.Bundle; public class LifeLink extends FlavourBuff { @@ -65,7 +66,12 @@ public class LifeLink extends FlavourBuff { @Override public int icon() { - return BuffIndicator.HEART; + return BuffIndicator.HERB_HEALING; + } + + @Override + public void tintIcon(Image icon) { + icon.hardlight(1, 0, 1); } @Override diff --git a/core/src/main/java/com/shatteredpixel/shatteredpixeldungeon/actors/buffs/Preparation.java b/core/src/main/java/com/shatteredpixel/shatteredpixeldungeon/actors/buffs/Preparation.java index b091b1f5c..14e19fd5d 100644 --- a/core/src/main/java/com/shatteredpixel/shatteredpixeldungeon/actors/buffs/Preparation.java +++ b/core/src/main/java/com/shatteredpixel/shatteredpixeldungeon/actors/buffs/Preparation.java @@ -52,6 +52,7 @@ public class Preparation extends Buff implements ActionIndicator.Action { { //always acts after other buffs, so invisibility effects can process first actPriority = BUFF_PRIO - 1; + type = buffType.POSITIVE; } public enum AttackLevel{ diff --git a/core/src/main/java/com/shatteredpixel/shatteredpixeldungeon/actors/buffs/ScrollEmpower.java b/core/src/main/java/com/shatteredpixel/shatteredpixeldungeon/actors/buffs/ScrollEmpower.java index 119ff9af7..8eb9d327e 100644 --- a/core/src/main/java/com/shatteredpixel/shatteredpixeldungeon/actors/buffs/ScrollEmpower.java +++ b/core/src/main/java/com/shatteredpixel/shatteredpixeldungeon/actors/buffs/ScrollEmpower.java @@ -62,7 +62,7 @@ public class ScrollEmpower extends Buff { @Override public void tintIcon(Image icon) { - icon.hardlight(1, 1, 0); + icon.hardlight(0.84f, 0.79f, 0.65f); //scroll colors } @Override diff --git a/core/src/main/java/com/shatteredpixel/shatteredpixeldungeon/actors/buffs/Shadows.java b/core/src/main/java/com/shatteredpixel/shatteredpixeldungeon/actors/buffs/Shadows.java index 7c5813547..f31d45df7 100644 --- a/core/src/main/java/com/shatteredpixel/shatteredpixeldungeon/actors/buffs/Shadows.java +++ b/core/src/main/java/com/shatteredpixel/shatteredpixeldungeon/actors/buffs/Shadows.java @@ -38,6 +38,7 @@ public class Shadows extends Invisibility { { announced = false; + type = buffType.POSITIVE; } @Override diff --git a/core/src/main/java/com/shatteredpixel/shatteredpixeldungeon/actors/buffs/SoulMark.java b/core/src/main/java/com/shatteredpixel/shatteredpixeldungeon/actors/buffs/SoulMark.java index 90e599a7e..fc8919bfe 100644 --- a/core/src/main/java/com/shatteredpixel/shatteredpixeldungeon/actors/buffs/SoulMark.java +++ b/core/src/main/java/com/shatteredpixel/shatteredpixeldungeon/actors/buffs/SoulMark.java @@ -37,12 +37,12 @@ public class SoulMark extends FlavourBuff { @Override public int icon() { - return BuffIndicator.CORRUPT; + return BuffIndicator.INVERT_MARK; } @Override public void tintIcon(Image icon) { - icon.hardlight(0.5f, 0.5f, 0.5f); + icon.hardlight(0.5f, 0.2f, 1f); } @Override diff --git a/core/src/main/java/com/shatteredpixel/shatteredpixeldungeon/actors/buffs/ToxicImbue.java b/core/src/main/java/com/shatteredpixel/shatteredpixeldungeon/actors/buffs/ToxicImbue.java index f79b0457f..e1e39b160 100644 --- a/core/src/main/java/com/shatteredpixel/shatteredpixeldungeon/actors/buffs/ToxicImbue.java +++ b/core/src/main/java/com/shatteredpixel/shatteredpixeldungeon/actors/buffs/ToxicImbue.java @@ -26,6 +26,7 @@ import com.shatteredpixel.shatteredpixeldungeon.actors.blobs.ToxicGas; import com.shatteredpixel.shatteredpixeldungeon.messages.Messages; import com.shatteredpixel.shatteredpixeldungeon.scenes.GameScene; import com.shatteredpixel.shatteredpixeldungeon.ui.BuffIndicator; +import com.watabou.noosa.Image; import com.watabou.utils.Bundle; public class ToxicImbue extends Buff { @@ -73,7 +74,12 @@ public class ToxicImbue extends Buff { @Override public int icon() { - return BuffIndicator.IMMUNITY; + return BuffIndicator.IMBUE; + } + + @Override + public void tintIcon(Image icon) { + icon.hardlight(1f, 1.5f, 0f); } @Override diff --git a/core/src/main/java/com/shatteredpixel/shatteredpixeldungeon/actors/hero/abilities/huntress/NaturesPower.java b/core/src/main/java/com/shatteredpixel/shatteredpixeldungeon/actors/hero/abilities/huntress/NaturesPower.java index 5aa656caf..1fab82d51 100644 --- a/core/src/main/java/com/shatteredpixel/shatteredpixeldungeon/actors/hero/abilities/huntress/NaturesPower.java +++ b/core/src/main/java/com/shatteredpixel/shatteredpixeldungeon/actors/hero/abilities/huntress/NaturesPower.java @@ -70,6 +70,10 @@ public class NaturesPower extends ArmorAbility { public static class naturesPowerTracker extends FlavourBuff{ + { + type = buffType.POSITIVE; + } + public static final float DURATION = 8f; public int extensionsLeft = 2; @@ -83,7 +87,7 @@ public class NaturesPower extends ArmorAbility { @Override public int icon() { - return BuffIndicator.SHADOWS; + return BuffIndicator.NATURE_POWER; } @Override diff --git a/core/src/main/java/com/shatteredpixel/shatteredpixeldungeon/actors/hero/abilities/rogue/DeathMark.java b/core/src/main/java/com/shatteredpixel/shatteredpixeldungeon/actors/hero/abilities/rogue/DeathMark.java index ce75b75be..1d8ff1722 100644 --- a/core/src/main/java/com/shatteredpixel/shatteredpixeldungeon/actors/hero/abilities/rogue/DeathMark.java +++ b/core/src/main/java/com/shatteredpixel/shatteredpixeldungeon/actors/hero/abilities/rogue/DeathMark.java @@ -39,6 +39,7 @@ import com.shatteredpixel.shatteredpixeldungeon.ui.BuffIndicator; import com.shatteredpixel.shatteredpixeldungeon.ui.HeroIcon; import com.shatteredpixel.shatteredpixeldungeon.utils.BArray; 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; @@ -149,7 +150,12 @@ public class DeathMark extends ArmorAbility { @Override public int icon() { - return BuffIndicator.MARK; + return BuffIndicator.INVERT_MARK; + } + + @Override + public void tintIcon(Image icon) { + icon.hardlight(1f, 0.2f, 0.2f); } @Override diff --git a/core/src/main/java/com/shatteredpixel/shatteredpixeldungeon/actors/hero/abilities/warrior/Endure.java b/core/src/main/java/com/shatteredpixel/shatteredpixeldungeon/actors/hero/abilities/warrior/Endure.java index a32d8efee..4ce4cbb28 100644 --- a/core/src/main/java/com/shatteredpixel/shatteredpixeldungeon/actors/hero/abilities/warrior/Endure.java +++ b/core/src/main/java/com/shatteredpixel/shatteredpixeldungeon/actors/hero/abilities/warrior/Endure.java @@ -38,6 +38,7 @@ import com.shatteredpixel.shatteredpixeldungeon.items.armor.ClassArmor; import com.shatteredpixel.shatteredpixeldungeon.messages.Messages; import com.shatteredpixel.shatteredpixeldungeon.ui.BuffIndicator; import com.shatteredpixel.shatteredpixeldungeon.ui.HeroIcon; +import com.watabou.noosa.Image; import com.watabou.noosa.audio.Sample; import com.watabou.utils.Bundle; @@ -66,6 +67,10 @@ public class Endure extends ArmorAbility { public static class EndureTracker extends FlavourBuff { + { + type = buffType.POSITIVE; + } + public boolean enduring; public int damageBonus; @@ -74,7 +79,12 @@ public class Endure extends ArmorAbility { @Override public int icon() { - return enduring ? BuffIndicator.NONE : BuffIndicator.AMOK; + return enduring ? BuffIndicator.NONE : BuffIndicator.ARMOR; + } + + @Override + public void tintIcon(Image icon) { + super.tintIcon(icon); } @Override diff --git a/core/src/main/java/com/shatteredpixel/shatteredpixeldungeon/items/artifacts/CloakOfShadows.java b/core/src/main/java/com/shatteredpixel/shatteredpixeldungeon/items/artifacts/CloakOfShadows.java index 66ed15628..7aa822a0c 100644 --- a/core/src/main/java/com/shatteredpixel/shatteredpixeldungeon/items/artifacts/CloakOfShadows.java +++ b/core/src/main/java/com/shatteredpixel/shatteredpixeldungeon/items/artifacts/CloakOfShadows.java @@ -40,6 +40,7 @@ import com.shatteredpixel.shatteredpixeldungeon.sprites.CharSprite; import com.shatteredpixel.shatteredpixeldungeon.sprites.ItemSpriteSheet; 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; @@ -268,6 +269,11 @@ public class CloakOfShadows extends Artifact { return BuffIndicator.INVISIBLE; } + @Override + public void tintIcon(Image icon) { + icon.brightness(0.6f); + } + @Override public float iconFadePercent() { return (4f - turnsToCost) / 4f; diff --git a/core/src/main/java/com/shatteredpixel/shatteredpixeldungeon/items/artifacts/TimekeepersHourglass.java b/core/src/main/java/com/shatteredpixel/shatteredpixeldungeon/items/artifacts/TimekeepersHourglass.java index fd7486f41..b7f372018 100644 --- a/core/src/main/java/com/shatteredpixel/shatteredpixeldungeon/items/artifacts/TimekeepersHourglass.java +++ b/core/src/main/java/com/shatteredpixel/shatteredpixeldungeon/items/artifacts/TimekeepersHourglass.java @@ -39,8 +39,10 @@ import com.shatteredpixel.shatteredpixeldungeon.scenes.GameScene; import com.shatteredpixel.shatteredpixeldungeon.sprites.CharSprite; import com.shatteredpixel.shatteredpixeldungeon.sprites.ItemSprite; import com.shatteredpixel.shatteredpixeldungeon.sprites.ItemSpriteSheet; +import com.shatteredpixel.shatteredpixeldungeon.ui.BuffIndicator; import com.shatteredpixel.shatteredpixeldungeon.utils.GLog; import com.shatteredpixel.shatteredpixeldungeon.windows.WndOptions; +import com.watabou.noosa.Image; import com.watabou.noosa.audio.Sample; import com.watabou.noosa.particles.Emitter; import com.watabou.utils.Bundle; @@ -383,6 +385,36 @@ public class TimekeepersHourglass extends Artifact { } } + @Override + public int icon() { + return BuffIndicator.TIME; + } + + @Override + public void tintIcon(Image icon) { + icon.hardlight(1f, 0.5f, 0); + } + + @Override + public float iconFadePercent() { + return Math.max(0, (2f - (turnsToCost+1)) / 2f); + } + + @Override + public String iconTextDisplay() { + return Integer.toString((int)turnsToCost+1); + } + + @Override + public String toString() { + return Messages.get(this, "name"); + } + + @Override + public String desc() { + return Messages.get(this, "desc"); + } + private static final String PRESSES = "presses"; private static final String TURNSTOCOST = "turnsToCost"; diff --git a/core/src/main/java/com/shatteredpixel/shatteredpixeldungeon/items/potions/exotic/PotionOfCleansing.java b/core/src/main/java/com/shatteredpixel/shatteredpixeldungeon/items/potions/exotic/PotionOfCleansing.java index 419288404..9700a3ff2 100644 --- a/core/src/main/java/com/shatteredpixel/shatteredpixeldungeon/items/potions/exotic/PotionOfCleansing.java +++ b/core/src/main/java/com/shatteredpixel/shatteredpixeldungeon/items/potions/exotic/PotionOfCleansing.java @@ -87,6 +87,10 @@ public class PotionOfCleansing extends ExoticPotion { public static class Cleanse extends FlavourBuff { + { + type = buffType.POSITIVE; + } + public static final float DURATION = 5f; @Override diff --git a/core/src/main/java/com/shatteredpixel/shatteredpixeldungeon/items/spells/FeatherFall.java b/core/src/main/java/com/shatteredpixel/shatteredpixeldungeon/items/spells/FeatherFall.java index b1908dc37..22c10604f 100644 --- a/core/src/main/java/com/shatteredpixel/shatteredpixeldungeon/items/spells/FeatherFall.java +++ b/core/src/main/java/com/shatteredpixel/shatteredpixeldungeon/items/spells/FeatherFall.java @@ -29,7 +29,9 @@ import com.shatteredpixel.shatteredpixeldungeon.effects.Speck; import com.shatteredpixel.shatteredpixeldungeon.items.potions.PotionOfLevitation; import com.shatteredpixel.shatteredpixeldungeon.messages.Messages; import com.shatteredpixel.shatteredpixeldungeon.sprites.ItemSpriteSheet; +import com.shatteredpixel.shatteredpixeldungeon.ui.BuffIndicator; import com.shatteredpixel.shatteredpixeldungeon.utils.GLog; +import com.watabou.noosa.Image; import com.watabou.noosa.audio.Sample; public class FeatherFall extends Spell { @@ -40,7 +42,7 @@ public class FeatherFall extends Spell { @Override protected void onCast(Hero hero) { - Buff.append(hero, FeatherBuff.class, 30f); + Buff.append(hero, FeatherBuff.class, FeatherBuff.DURATION); hero.sprite.operate(hero.pos); Sample.INSTANCE.play(Assets.Sounds.READ ); hero.sprite.emitter().burst( Speck.factory( Speck.JET ), 20); @@ -54,6 +56,36 @@ public class FeatherFall extends Spell { public static class FeatherBuff extends FlavourBuff { //does nothing, just waits to be triggered by chasm falling + { + type = buffType.POSITIVE; + } + + public static final float DURATION = 30f; + + @Override + public int icon() { + return BuffIndicator.LEVITATION; + } + + @Override + public void tintIcon(Image icon) { + icon.hardlight(1f, 2f, 1.25f); + } + + @Override + public float iconFadePercent() { + return Math.max(0, (DURATION - visualcooldown()) / DURATION); + } + + @Override + public String toString() { + return Messages.get(this, "name"); + } + + @Override + public String desc() { + return Messages.get(this, "desc", dispTurns()); + } } @Override diff --git a/core/src/main/java/com/shatteredpixel/shatteredpixeldungeon/items/stones/StoneOfAggression.java b/core/src/main/java/com/shatteredpixel/shatteredpixeldungeon/items/stones/StoneOfAggression.java index 44e104be3..58e41f5b1 100644 --- a/core/src/main/java/com/shatteredpixel/shatteredpixeldungeon/items/stones/StoneOfAggression.java +++ b/core/src/main/java/com/shatteredpixel/shatteredpixeldungeon/items/stones/StoneOfAggression.java @@ -33,6 +33,7 @@ import com.shatteredpixel.shatteredpixeldungeon.effects.Speck; import com.shatteredpixel.shatteredpixeldungeon.items.Heap; import com.shatteredpixel.shatteredpixeldungeon.messages.Messages; import com.shatteredpixel.shatteredpixeldungeon.sprites.ItemSpriteSheet; +import com.shatteredpixel.shatteredpixeldungeon.ui.BuffIndicator; import com.watabou.noosa.audio.Sample; import com.watabou.utils.Bundle; @@ -73,17 +74,21 @@ public class StoneOfAggression extends Runestone { type = buffType.NEGATIVE; announced = true; } - + @Override - public void storeInBundle( Bundle bundle ) { - super.storeInBundle(bundle); + public int icon() { + return BuffIndicator.TARGETED; } - + @Override - public void restoreFromBundle( Bundle bundle ) { - super.restoreFromBundle( bundle ); + public float iconFadePercent() { + if (target.alignment == Char.Alignment.ENEMY){ + return Math.max(0, (DURATION/4f - visualcooldown()) / (DURATION/4f)); + } else { + return Math.max(0, (DURATION - visualcooldown()) / DURATION); + } } - + @Override public void detach() { //if our target is an enemy, reset the aggro of any enemies targeting it @@ -104,6 +109,11 @@ public class StoneOfAggression extends Runestone { public String toString() { return Messages.get(this, "name"); } + + @Override + public String desc() { + return Messages.get(this, "desc", dispTurns()); + } } diff --git a/core/src/main/java/com/shatteredpixel/shatteredpixeldungeon/items/wands/WandOfLivingEarth.java b/core/src/main/java/com/shatteredpixel/shatteredpixeldungeon/items/wands/WandOfLivingEarth.java index fe22e4933..12e084266 100644 --- a/core/src/main/java/com/shatteredpixel/shatteredpixeldungeon/items/wands/WandOfLivingEarth.java +++ b/core/src/main/java/com/shatteredpixel/shatteredpixeldungeon/items/wands/WandOfLivingEarth.java @@ -41,6 +41,7 @@ import com.shatteredpixel.shatteredpixeldungeon.scenes.GameScene; import com.shatteredpixel.shatteredpixeldungeon.sprites.EarthGuardianSprite; import com.shatteredpixel.shatteredpixeldungeon.sprites.ItemSpriteSheet; import com.shatteredpixel.shatteredpixeldungeon.ui.BuffIndicator; +import com.watabou.noosa.Image; import com.watabou.noosa.audio.Sample; import com.watabou.utils.Bundle; import com.watabou.utils.Callback; @@ -224,6 +225,10 @@ public class WandOfLivingEarth extends DamageWand { public static class RockArmor extends Buff { + { + type = buffType.POSITIVE; + } + private int wandLevel; private int armor; @@ -253,6 +258,11 @@ public class WandOfLivingEarth extends DamageWand { return BuffIndicator.ARMOR; } + @Override + public void tintIcon(Image icon) { + icon.brightness(0.6f); + } + @Override public float iconFadePercent() { return Math.max(0, (armorToGuardian() - armor) / (float)armorToGuardian()); diff --git a/core/src/main/java/com/shatteredpixel/shatteredpixeldungeon/items/weapon/enchantments/Blocking.java b/core/src/main/java/com/shatteredpixel/shatteredpixeldungeon/items/weapon/enchantments/Blocking.java index 5defe2829..aaec0af86 100644 --- a/core/src/main/java/com/shatteredpixel/shatteredpixeldungeon/items/weapon/enchantments/Blocking.java +++ b/core/src/main/java/com/shatteredpixel/shatteredpixeldungeon/items/weapon/enchantments/Blocking.java @@ -52,6 +52,10 @@ public class Blocking extends Weapon.Enchantment { } public static class BlockBuff extends FlavourBuff { + + { + type = buffType.POSITIVE; + } private int blocking = 0; diff --git a/core/src/main/java/com/shatteredpixel/shatteredpixeldungeon/items/weapon/enchantments/Kinetic.java b/core/src/main/java/com/shatteredpixel/shatteredpixeldungeon/items/weapon/enchantments/Kinetic.java index a28633467..a9e79502a 100644 --- a/core/src/main/java/com/shatteredpixel/shatteredpixeldungeon/items/weapon/enchantments/Kinetic.java +++ b/core/src/main/java/com/shatteredpixel/shatteredpixeldungeon/items/weapon/enchantments/Kinetic.java @@ -58,6 +58,10 @@ public class Kinetic extends Weapon.Enchantment { } public static class ConservedDamage extends Buff { + + { + type = buffType.POSITIVE; + } @Override public int icon() { diff --git a/core/src/main/java/com/shatteredpixel/shatteredpixeldungeon/ui/BuffIndicator.java b/core/src/main/java/com/shatteredpixel/shatteredpixeldungeon/ui/BuffIndicator.java index 526f80b32..c142249b5 100644 --- a/core/src/main/java/com/shatteredpixel/shatteredpixeldungeon/ui/BuffIndicator.java +++ b/core/src/main/java/com/shatteredpixel/shatteredpixeldungeon/ui/BuffIndicator.java @@ -104,6 +104,11 @@ public class BuffIndicator extends Component { public static final int MOMENTUM = 51; public static final int ANKH = 52; public static final int NOINV = 53; + public static final int TARGETED = 54; + public static final int IMBUE = 55; + public static final int ENDURE = 56; + public static final int INVERT_MARK = 57; + public static final int NATURE_POWER= 58; public static final int SIZE_SMALL = 7; public static final int SIZE_LARGE = 16; @@ -247,7 +252,7 @@ public class BuffIndicator extends Component { grey.visible = false; if (buff.type == Buff.buffType.POSITIVE) text.hardlight(CharSprite.POSITIVE); else if (buff.type == Buff.buffType.NEGATIVE) text.hardlight(CharSprite.NEGATIVE); - text.alpha(0.6f); + text.alpha(0.7f); text.text(buff.iconTextDisplay()); text.measure();