From 1943a9f4ad6a6ccb29d49558ba894d55d90395f6 Mon Sep 17 00:00:00 2001 From: Evan Debenham Date: Mon, 9 Dec 2024 15:16:03 -0500 Subject: [PATCH] v3.0.0: fixed a few bugs: - holy intuition not being usable on wands - shield of light's duration stacking with itself - other chars not properly triggerin guiding light --- .../shatteredpixel/shatteredpixeldungeon/actors/Char.java | 8 ++++++++ .../shatteredpixeldungeon/actors/hero/Talent.java | 8 -------- .../actors/hero/spells/HolyIntuition.java | 3 ++- .../actors/hero/spells/ShieldOfLight.java | 2 +- 4 files changed, 11 insertions(+), 10 deletions(-) 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 8b117b876..cec5ab1db 100644 --- a/core/src/main/java/com/shatteredpixel/shatteredpixeldungeon/actors/Char.java +++ b/core/src/main/java/com/shatteredpixel/shatteredpixeldungeon/actors/Char.java @@ -80,6 +80,7 @@ import com.shatteredpixel.shatteredpixeldungeon.actors.hero.Talent; import com.shatteredpixel.shatteredpixeldungeon.actors.hero.abilities.duelist.Challenge; import com.shatteredpixel.shatteredpixeldungeon.actors.hero.abilities.rogue.DeathMark; import com.shatteredpixel.shatteredpixeldungeon.actors.hero.abilities.warrior.Endure; +import com.shatteredpixel.shatteredpixeldungeon.actors.hero.spells.GuidingLight; import com.shatteredpixel.shatteredpixeldungeon.actors.hero.spells.ShieldOfLight; import com.shatteredpixel.shatteredpixeldungeon.actors.mobs.Brute; import com.shatteredpixel.shatteredpixeldungeon.actors.mobs.CrystalSpire; @@ -400,6 +401,13 @@ public abstract class Char extends Actor { //flat damage bonus is affected by multipliers dmg += dmgBonus; + if (enemy.buff(GuidingLight.Illuminated.class) != null){ + enemy.buff(GuidingLight.Illuminated.class).detach(); + if (Dungeon.hero.hasTalent(Talent.SEARING_LIGHT)){ + dmg += 1 + 2*Dungeon.hero.pointsInTalent(Talent.SEARING_LIGHT); + } + } + Berserk berserk = buff(Berserk.class); if (berserk != null) dmg = berserk.damageFactor(dmg); diff --git a/core/src/main/java/com/shatteredpixel/shatteredpixeldungeon/actors/hero/Talent.java b/core/src/main/java/com/shatteredpixel/shatteredpixeldungeon/actors/hero/Talent.java index 8e810cd2b..2f78e811f 100644 --- a/core/src/main/java/com/shatteredpixel/shatteredpixeldungeon/actors/hero/Talent.java +++ b/core/src/main/java/com/shatteredpixel/shatteredpixeldungeon/actors/hero/Talent.java @@ -43,7 +43,6 @@ import com.shatteredpixel.shatteredpixeldungeon.actors.buffs.ScrollEmpower; import com.shatteredpixel.shatteredpixeldungeon.actors.buffs.WandEmpower; import com.shatteredpixel.shatteredpixeldungeon.actors.hero.abilities.ArmorAbility; import com.shatteredpixel.shatteredpixeldungeon.actors.hero.abilities.Ratmogrify; -import com.shatteredpixel.shatteredpixeldungeon.actors.hero.spells.GuidingLight; import com.shatteredpixel.shatteredpixeldungeon.actors.hero.spells.RecallInscription; import com.shatteredpixel.shatteredpixeldungeon.actors.mobs.Mob; import com.shatteredpixel.shatteredpixeldungeon.effects.CellEmitter; @@ -831,13 +830,6 @@ public enum Talent { } } - if (enemy.buff(GuidingLight.Illuminated.class) != null){ - enemy.buff(GuidingLight.Illuminated.class).detach(); - if (hero.hasTalent(Talent.SEARING_LIGHT)){ - dmg += 1 + 2*hero.pointsInTalent(Talent.SEARING_LIGHT); - } - } - return dmg; } diff --git a/core/src/main/java/com/shatteredpixel/shatteredpixeldungeon/actors/hero/spells/HolyIntuition.java b/core/src/main/java/com/shatteredpixel/shatteredpixeldungeon/actors/hero/spells/HolyIntuition.java index 05c241dec..a47e2e185 100644 --- a/core/src/main/java/com/shatteredpixel/shatteredpixeldungeon/actors/hero/spells/HolyIntuition.java +++ b/core/src/main/java/com/shatteredpixel/shatteredpixeldungeon/actors/hero/spells/HolyIntuition.java @@ -28,6 +28,7 @@ import com.shatteredpixel.shatteredpixeldungeon.effects.Identification; import com.shatteredpixel.shatteredpixeldungeon.items.EquipableItem; import com.shatteredpixel.shatteredpixeldungeon.items.Item; import com.shatteredpixel.shatteredpixeldungeon.items.artifacts.HolyTome; +import com.shatteredpixel.shatteredpixeldungeon.items.wands.Wand; import com.shatteredpixel.shatteredpixeldungeon.messages.Messages; import com.shatteredpixel.shatteredpixeldungeon.ui.HeroIcon; import com.shatteredpixel.shatteredpixeldungeon.utils.GLog; @@ -44,7 +45,7 @@ public class HolyIntuition extends InventoryClericSpell { @Override protected boolean usableOnItem(Item item) { - return item instanceof EquipableItem && !item.isIdentified() && !item.cursedKnown; + return (item instanceof EquipableItem || item instanceof Wand) && !item.isIdentified() && !item.cursedKnown; } @Override diff --git a/core/src/main/java/com/shatteredpixel/shatteredpixeldungeon/actors/hero/spells/ShieldOfLight.java b/core/src/main/java/com/shatteredpixel/shatteredpixeldungeon/actors/hero/spells/ShieldOfLight.java index c9c25a50e..064a44054 100644 --- a/core/src/main/java/com/shatteredpixel/shatteredpixeldungeon/actors/hero/spells/ShieldOfLight.java +++ b/core/src/main/java/com/shatteredpixel/shatteredpixeldungeon/actors/hero/spells/ShieldOfLight.java @@ -64,7 +64,7 @@ public class ShieldOfLight extends TargetedClericSpell { hero.sprite.operate(hero.pos); //1 turn less as the casting is instant - Buff.affect( hero, ShieldOfLightTracker.class, 1f + 2f*hero.pointsInTalent(Talent.SHIELD_OF_LIGHT)).object = ch.id(); + Buff.prolong( hero, ShieldOfLightTracker.class, 1f + 2f*hero.pointsInTalent(Talent.SHIELD_OF_LIGHT)).object = ch.id(); hero.busy(); hero.sprite.operate(hero.pos);