From 69fff304aaae891605700abfb846e03482cfaa8e Mon Sep 17 00:00:00 2001 From: Evan Debenham Date: Fri, 17 Jan 2020 01:39:32 -0500 Subject: [PATCH] v0.8.0: Tweaks to debuffs: - wand of corruption can now inflict vulnerable and hex - potions of healing now cure additional debuffs - carpaccio and dreamfoil now cure the same debuffs as healing potions - remove curse now cleanses degraded instead of weakness --- .../items/food/FrozenCarpaccio.java | 16 ++-------------- .../items/potions/PotionOfHealing.java | 11 ++++++++++- .../items/scrolls/ScrollOfRemoveCurse.java | 4 ++-- .../items/wands/WandOfCorruption.java | 4 ++++ .../shatteredpixeldungeon/plants/Dreamfoil.java | 16 ++-------------- .../messages/actors/actors.properties | 2 +- 6 files changed, 21 insertions(+), 32 deletions(-) diff --git a/core/src/main/java/com/shatteredpixel/shatteredpixeldungeon/items/food/FrozenCarpaccio.java b/core/src/main/java/com/shatteredpixel/shatteredpixeldungeon/items/food/FrozenCarpaccio.java index 2a208c167..ea54cf98d 100644 --- a/core/src/main/java/com/shatteredpixel/shatteredpixeldungeon/items/food/FrozenCarpaccio.java +++ b/core/src/main/java/com/shatteredpixel/shatteredpixeldungeon/items/food/FrozenCarpaccio.java @@ -22,18 +22,12 @@ package com.shatteredpixel.shatteredpixeldungeon.items.food; import com.shatteredpixel.shatteredpixeldungeon.actors.buffs.Barkskin; -import com.shatteredpixel.shatteredpixeldungeon.actors.buffs.Bleeding; import com.shatteredpixel.shatteredpixeldungeon.actors.buffs.Buff; -import com.shatteredpixel.shatteredpixeldungeon.actors.buffs.Cripple; -import com.shatteredpixel.shatteredpixeldungeon.actors.buffs.Drowsy; import com.shatteredpixel.shatteredpixeldungeon.actors.buffs.Hunger; import com.shatteredpixel.shatteredpixeldungeon.actors.buffs.Invisibility; -import com.shatteredpixel.shatteredpixeldungeon.actors.buffs.Poison; -import com.shatteredpixel.shatteredpixeldungeon.actors.buffs.Slow; -import com.shatteredpixel.shatteredpixeldungeon.actors.buffs.Vertigo; -import com.shatteredpixel.shatteredpixeldungeon.actors.buffs.Weakness; import com.shatteredpixel.shatteredpixeldungeon.actors.hero.Hero; import com.shatteredpixel.shatteredpixeldungeon.effects.Speck; +import com.shatteredpixel.shatteredpixeldungeon.items.potions.PotionOfHealing; import com.shatteredpixel.shatteredpixeldungeon.messages.Messages; import com.shatteredpixel.shatteredpixeldungeon.sprites.ItemSpriteSheet; import com.shatteredpixel.shatteredpixeldungeon.utils.GLog; @@ -68,13 +62,7 @@ public class FrozenCarpaccio extends Food { break; case 2: GLog.i( Messages.get(FrozenCarpaccio.class, "refresh") ); - Buff.detach( hero, Poison.class ); - Buff.detach( hero, Cripple.class ); - Buff.detach( hero, Weakness.class ); - Buff.detach( hero, Bleeding.class ); - Buff.detach( hero, Drowsy.class ); - Buff.detach( hero, Slow.class ); - Buff.detach( hero, Vertigo.class); + PotionOfHealing.cure(hero); break; case 3: GLog.i( Messages.get(FrozenCarpaccio.class, "better") ); diff --git a/core/src/main/java/com/shatteredpixel/shatteredpixeldungeon/items/potions/PotionOfHealing.java b/core/src/main/java/com/shatteredpixel/shatteredpixeldungeon/items/potions/PotionOfHealing.java index 023be5a24..655cc83df 100644 --- a/core/src/main/java/com/shatteredpixel/shatteredpixeldungeon/items/potions/PotionOfHealing.java +++ b/core/src/main/java/com/shatteredpixel/shatteredpixeldungeon/items/potions/PotionOfHealing.java @@ -23,10 +23,15 @@ package com.shatteredpixel.shatteredpixeldungeon.items.potions; import com.shatteredpixel.shatteredpixeldungeon.actors.Char; import com.shatteredpixel.shatteredpixeldungeon.actors.buffs.Bleeding; +import com.shatteredpixel.shatteredpixeldungeon.actors.buffs.Blindness; import com.shatteredpixel.shatteredpixeldungeon.actors.buffs.Buff; import com.shatteredpixel.shatteredpixeldungeon.actors.buffs.Cripple; +import com.shatteredpixel.shatteredpixeldungeon.actors.buffs.Drowsy; import com.shatteredpixel.shatteredpixeldungeon.actors.buffs.Healing; import com.shatteredpixel.shatteredpixeldungeon.actors.buffs.Poison; +import com.shatteredpixel.shatteredpixeldungeon.actors.buffs.Slow; +import com.shatteredpixel.shatteredpixeldungeon.actors.buffs.Vertigo; +import com.shatteredpixel.shatteredpixeldungeon.actors.buffs.Vulnerable; import com.shatteredpixel.shatteredpixeldungeon.actors.buffs.Weakness; import com.shatteredpixel.shatteredpixeldungeon.actors.hero.Hero; import com.shatteredpixel.shatteredpixeldungeon.messages.Messages; @@ -53,8 +58,12 @@ public class PotionOfHealing extends Potion { Buff.detach( ch, Poison.class ); Buff.detach( ch, Cripple.class ); Buff.detach( ch, Weakness.class ); + Buff.detach( ch, Vulnerable.class ); Buff.detach( ch, Bleeding.class ); - + Buff.detach( ch, Blindness.class ); + Buff.detach( ch, Drowsy.class ); + Buff.detach( ch, Slow.class ); + Buff.detach( ch, Vertigo.class); } @Override diff --git a/core/src/main/java/com/shatteredpixel/shatteredpixeldungeon/items/scrolls/ScrollOfRemoveCurse.java b/core/src/main/java/com/shatteredpixel/shatteredpixeldungeon/items/scrolls/ScrollOfRemoveCurse.java index c74c1b9b7..db0d84b0f 100644 --- a/core/src/main/java/com/shatteredpixel/shatteredpixeldungeon/items/scrolls/ScrollOfRemoveCurse.java +++ b/core/src/main/java/com/shatteredpixel/shatteredpixeldungeon/items/scrolls/ScrollOfRemoveCurse.java @@ -22,8 +22,8 @@ package com.shatteredpixel.shatteredpixeldungeon.items.scrolls; import com.shatteredpixel.shatteredpixeldungeon.Assets; +import com.shatteredpixel.shatteredpixeldungeon.actors.buffs.Degrade; import com.shatteredpixel.shatteredpixeldungeon.actors.buffs.Invisibility; -import com.shatteredpixel.shatteredpixeldungeon.actors.buffs.Weakness; import com.shatteredpixel.shatteredpixeldungeon.actors.hero.Hero; import com.shatteredpixel.shatteredpixeldungeon.effects.Flare; import com.shatteredpixel.shatteredpixeldungeon.effects.particles.ShadowParticle; @@ -62,7 +62,7 @@ public class ScrollOfRemoveCurse extends InventoryScroll { boolean procced = uncurse( curUser, item ); - Weakness.detach( curUser, Weakness.class ); + Degrade.detach( curUser, Degrade.class ); if (procced) { GLog.p( Messages.get(this, "cleansed") ); diff --git a/core/src/main/java/com/shatteredpixel/shatteredpixeldungeon/items/wands/WandOfCorruption.java b/core/src/main/java/com/shatteredpixel/shatteredpixeldungeon/items/wands/WandOfCorruption.java index 7f79dd6c2..120d98cfa 100644 --- a/core/src/main/java/com/shatteredpixel/shatteredpixeldungeon/items/wands/WandOfCorruption.java +++ b/core/src/main/java/com/shatteredpixel/shatteredpixeldungeon/items/wands/WandOfCorruption.java @@ -41,6 +41,7 @@ import com.shatteredpixel.shatteredpixeldungeon.actors.buffs.Doom; import com.shatteredpixel.shatteredpixeldungeon.actors.buffs.Drowsy; import com.shatteredpixel.shatteredpixeldungeon.actors.buffs.FlavourBuff; import com.shatteredpixel.shatteredpixeldungeon.actors.buffs.Frost; +import com.shatteredpixel.shatteredpixeldungeon.actors.buffs.Hex; import com.shatteredpixel.shatteredpixeldungeon.actors.buffs.MagicalSleep; import com.shatteredpixel.shatteredpixeldungeon.actors.buffs.Ooze; import com.shatteredpixel.shatteredpixeldungeon.actors.buffs.Paralysis; @@ -51,6 +52,7 @@ import com.shatteredpixel.shatteredpixeldungeon.actors.buffs.Slow; import com.shatteredpixel.shatteredpixeldungeon.actors.buffs.SoulMark; import com.shatteredpixel.shatteredpixeldungeon.actors.buffs.Terror; import com.shatteredpixel.shatteredpixeldungeon.actors.buffs.Vertigo; +import com.shatteredpixel.shatteredpixeldungeon.actors.buffs.Vulnerable; import com.shatteredpixel.shatteredpixeldungeon.actors.buffs.Weakness; import com.shatteredpixel.shatteredpixeldungeon.actors.mobs.Bee; import com.shatteredpixel.shatteredpixeldungeon.actors.mobs.King; @@ -89,6 +91,7 @@ public class WandOfCorruption extends Wand { private static final HashMap, Float> MINOR_DEBUFFS = new HashMap<>(); static{ MINOR_DEBUFFS.put(Weakness.class, 2f); + MINOR_DEBUFFS.put(Vulnerable.class, 2f); MINOR_DEBUFFS.put(Cripple.class, 1f); MINOR_DEBUFFS.put(Blindness.class, 1f); MINOR_DEBUFFS.put(Terror.class, 1f); @@ -108,6 +111,7 @@ public class WandOfCorruption extends Wand { static{ MAJOR_DEBUFFS.put(Amok.class, 3f); MAJOR_DEBUFFS.put(Slow.class, 2f); + MAJOR_DEBUFFS.put(Hex.class, 2f); MAJOR_DEBUFFS.put(Paralysis.class, 1f); MAJOR_DEBUFFS.put(Charm.class, 0f); diff --git a/core/src/main/java/com/shatteredpixel/shatteredpixeldungeon/plants/Dreamfoil.java b/core/src/main/java/com/shatteredpixel/shatteredpixeldungeon/plants/Dreamfoil.java index 1e984e5ad..30833e2f0 100644 --- a/core/src/main/java/com/shatteredpixel/shatteredpixeldungeon/plants/Dreamfoil.java +++ b/core/src/main/java/com/shatteredpixel/shatteredpixeldungeon/plants/Dreamfoil.java @@ -22,19 +22,13 @@ package com.shatteredpixel.shatteredpixeldungeon.plants; import com.shatteredpixel.shatteredpixeldungeon.actors.Char; -import com.shatteredpixel.shatteredpixeldungeon.actors.buffs.Bleeding; import com.shatteredpixel.shatteredpixeldungeon.actors.buffs.BlobImmunity; import com.shatteredpixel.shatteredpixeldungeon.actors.buffs.Buff; -import com.shatteredpixel.shatteredpixeldungeon.actors.buffs.Cripple; -import com.shatteredpixel.shatteredpixeldungeon.actors.buffs.Drowsy; import com.shatteredpixel.shatteredpixeldungeon.actors.buffs.MagicalSleep; -import com.shatteredpixel.shatteredpixeldungeon.actors.buffs.Poison; -import com.shatteredpixel.shatteredpixeldungeon.actors.buffs.Slow; -import com.shatteredpixel.shatteredpixeldungeon.actors.buffs.Vertigo; -import com.shatteredpixel.shatteredpixeldungeon.actors.buffs.Weakness; import com.shatteredpixel.shatteredpixeldungeon.actors.hero.Hero; import com.shatteredpixel.shatteredpixeldungeon.actors.hero.HeroSubClass; import com.shatteredpixel.shatteredpixeldungeon.actors.mobs.Mob; +import com.shatteredpixel.shatteredpixeldungeon.items.potions.PotionOfHealing; import com.shatteredpixel.shatteredpixeldungeon.messages.Messages; import com.shatteredpixel.shatteredpixeldungeon.sprites.ItemSpriteSheet; import com.shatteredpixel.shatteredpixeldungeon.utils.GLog; @@ -53,13 +47,7 @@ public class Dreamfoil extends Plant { Buff.affect(ch, MagicalSleep.class); } else if (ch instanceof Hero){ GLog.i( Messages.get(this, "refreshed") ); - Buff.detach( ch, Poison.class ); - Buff.detach( ch, Cripple.class ); - Buff.detach( ch, Weakness.class ); - Buff.detach( ch, Bleeding.class ); - Buff.detach( ch, Drowsy.class ); - Buff.detach( ch, Slow.class ); - Buff.detach( ch, Vertigo.class); + PotionOfHealing.cure(ch); if (((Hero) ch).subClass == HeroSubClass.WARDEN){ Buff.affect(ch, BlobImmunity.class, 10f); diff --git a/core/src/main/resources/com/shatteredpixel/shatteredpixeldungeon/messages/actors/actors.properties b/core/src/main/resources/com/shatteredpixel/shatteredpixeldungeon/messages/actors/actors.properties index dd1330fb0..650d01611 100644 --- a/core/src/main/resources/com/shatteredpixel/shatteredpixeldungeon/messages/actors/actors.properties +++ b/core/src/main/resources/com/shatteredpixel/shatteredpixeldungeon/messages/actors/actors.properties @@ -128,7 +128,7 @@ actors.buffs.cripple.desc=You're pretty sure legs aren't meant to bend that way. actors.buffs.degrade.name=Degraded actors.buffs.degrade.heromsg=Your equipment feels weaker! -actors.buffs.degrade.desc=Powerful dark magic is sapping the strength that scrolls of upgrade have applied to your equipment!\n\nWhile degraded, upgraded gear will be treated as if it is a lower level than it actually is. _Every upgrade after +3 becomes exponentially weaker than the last one._ The descriptions of your items will change to reflect their reduced power level.\n\nDegradation does not affect strength requirements, wand charges, durability of thrown weapons, or artifacts.\n\nTurns of degradation remaining: %s. Using a scroll of upgrade will end degradation immediately. +actors.buffs.degrade.desc=Powerful dark magic is sapping the strength that scrolls of upgrade have applied to your equipment!\n\nWhile degraded, upgraded gear will be treated as if it is a lower level than it actually is. _Every upgrade after +3 becomes exponentially weaker than the last one._ The descriptions of your items will change to reflect their reduced power level.\n\nDegradation does not affect strength requirements, wand charges, durability of thrown weapons, or artifacts.\n\nTurns of degradation remaining: %s. Using a scroll of upgrade or remove curse will end degradation immediately. actors.buffs.doom.name=Doomed actors.buffs.doom.desc=It's hard to keep going when it seems like the universe wants you dead.\n\nDoomed characters will receive double damage from all sources.\n\nDoom is permanent, its effects only end in death.