From afd2cc5927f924e3804d560f631374764ab9fa67 Mon Sep 17 00:00:00 2001 From: Evan Debenham Date: Tue, 18 Jan 2022 19:42:37 -0500 Subject: [PATCH] v1.2.0: fixed mystical meal setting ignoreHornOfPlenty when it shouldn't --- .../shatteredpixeldungeon/actors/buffs/ArtifactRecharge.java | 4 ++++ .../shatteredpixeldungeon/actors/hero/Talent.java | 5 ++++- 2 files changed, 8 insertions(+), 1 deletion(-) diff --git a/core/src/main/java/com/shatteredpixel/shatteredpixeldungeon/actors/buffs/ArtifactRecharge.java b/core/src/main/java/com/shatteredpixel/shatteredpixeldungeon/actors/buffs/ArtifactRecharge.java index 326bda7fd..115c72b80 100644 --- a/core/src/main/java/com/shatteredpixel/shatteredpixeldungeon/actors/buffs/ArtifactRecharge.java +++ b/core/src/main/java/com/shatteredpixel/shatteredpixeldungeon/actors/buffs/ArtifactRecharge.java @@ -76,6 +76,10 @@ public class ArtifactRecharge extends Buff { left += amount; return this; } + + public float left(){ + return left; + } @Override public int icon() { 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 bb66f08d8..9d9c00c0f 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 @@ -302,7 +302,10 @@ public enum Talent { } if (hero.hasTalent(MYSTICAL_MEAL)){ //3/5 turns of recharging - Buff.affect( hero, ArtifactRecharge.class).set(1 + 2*(hero.pointsInTalent(MYSTICAL_MEAL))).ignoreHornOfPlenty = foodSource instanceof HornOfPlenty; + ArtifactRecharge buff = Buff.affect( hero, ArtifactRecharge.class); + if (buff.left() < 1 + 2*(hero.pointsInTalent(MYSTICAL_MEAL))){ + Buff.affect( hero, ArtifactRecharge.class).set(1 + 2*(hero.pointsInTalent(MYSTICAL_MEAL))).ignoreHornOfPlenty = foodSource instanceof HornOfPlenty; + } ScrollOfRecharging.charge( hero ); } if (hero.hasTalent(INVIGORATING_MEAL)){