From 8f45080d93a92101eb1ad34a63753aa65f9640e8 Mon Sep 17 00:00:00 2001 From: Evan Debenham Date: Wed, 13 Nov 2024 16:03:10 -0500 Subject: [PATCH] v3.0.0: buffed tome charge rate and shield of light spell --- .../src/main/assets/messages/actors/actors.properties | 2 +- .../shatteredpixeldungeon/actors/Char.java | 1 + .../actors/hero/spells/ShieldOfLight.java | 6 +++--- .../items/artifacts/HolyTome.java | 11 ++++++++--- 4 files changed, 13 insertions(+), 7 deletions(-) diff --git a/core/src/main/assets/messages/actors/actors.properties b/core/src/main/assets/messages/actors/actors.properties index 31971b81f..47717245f 100644 --- a/core/src/main/assets/messages/actors/actors.properties +++ b/core/src/main/assets/messages/actors/actors.properties @@ -1026,7 +1026,7 @@ actors.hero.talent.detect_curse.desc=_+1:_ The Cleric can cast _Detect Curse,_ a actors.hero.talent.searing_light.title=searing light actors.hero.talent.searing_light.desc=_+1:_ Physical attacks on enemies illuminated by _Guiding Light_ deal _+3 damage._\n\n_+2:_ Physical attacks on enemies illuminated by _Guiding Light_ deal _+5 damage._ actors.hero.talent.shield_of_light.title=shield of light -actors.hero.talent.shield_of_light.desc=_+1:_ The Cleric can cast _Shield of Light,_ a spell that is cast instantly and grants them 2-4 armor against a target for _3 turns_ at the cost of 1 charge.\n\n_+2:_ The Cleric can cast _Shield of Light,_ a spell that is cast instantly and grants them 2-4 armor against a target for _5 turns_ at the cost of 1 charge. +actors.hero.talent.shield_of_light.desc=_+1:_ The Cleric can cast _Shield of Light,_ a spell that is cast instantly and grants them 2-4 armor against a target for _4 turns_ at the cost of 1 charge.\n\n_+2:_ The Cleric can cast _Shield of Light,_ a spell that is cast instantly and grants them 2-4 armor against a target for _6 turns_ at the cost of 1 charge. actors.hero.talent.enlightening_meal.title=Enlightening Meal actors.hero.talent.enlightening_meal.desc=_+1:_ Eating food takes the Cleric 1 turn and grants them _1 charge_ on their holy tome.\n\n_+2:_ Eating food takes the Cleric 1 turn and grants them _1.5 charges_ on their holy tome. 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 24c9104cc..8b117b876 100644 --- a/core/src/main/java/com/shatteredpixel/shatteredpixeldungeon/actors/Char.java +++ b/core/src/main/java/com/shatteredpixel/shatteredpixeldungeon/actors/Char.java @@ -656,6 +656,7 @@ public abstract class Char extends Actor { ShieldOfLight.ShieldOfLightTracker shield = buff( ShieldOfLight.ShieldOfLightTracker.class); if (shield != null && shield.object == enemy.id()){ damage -= Random.NormalIntRange(2, 4); + damage = Math.max(damage, 0); } return damage; 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 35afe6b71..ebabb5426 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 @@ -63,7 +63,7 @@ public class ShieldOfLight extends TargetedClericSpell { hero.sprite.operate(hero.pos); //1 turn less as the casting is instant - Buff.affect( hero, ShieldOfLightTracker.class, 2f*hero.pointsInTalent(Talent.SHIELD_OF_LIGHT)).object = ch.id(); + Buff.affect( hero, ShieldOfLightTracker.class, 1f + 2f*hero.pointsInTalent(Talent.SHIELD_OF_LIGHT)).object = ch.id(); hero.busy(); hero.sprite.operate(hero.pos); @@ -74,7 +74,7 @@ public class ShieldOfLight extends TargetedClericSpell { @Override public String desc() { - return Messages.get(this, "desc", 1+2*Dungeon.hero.pointsInTalent(Talent.SHIELD_OF_LIGHT)) + "\n\n" + Messages.get(this, "charge_cost", (int)chargeUse(Dungeon.hero)); + return Messages.get(this, "desc", 2+2*Dungeon.hero.pointsInTalent(Talent.SHIELD_OF_LIGHT)) + "\n\n" + Messages.get(this, "charge_cost", (int)chargeUse(Dungeon.hero)); } public static class ShieldOfLightTracker extends FlavourBuff { @@ -92,7 +92,7 @@ public class ShieldOfLight extends TargetedClericSpell { @Override public float iconFadePercent() { - float duration = 1f + 2f* Dungeon.hero.pointsInTalent(Talent.SHIELD_OF_LIGHT); + float duration = 2f + 2f* Dungeon.hero.pointsInTalent(Talent.SHIELD_OF_LIGHT); return Math.max(0, (duration - visualcooldown()) / duration); } diff --git a/core/src/main/java/com/shatteredpixel/shatteredpixeldungeon/items/artifacts/HolyTome.java b/core/src/main/java/com/shatteredpixel/shatteredpixeldungeon/items/artifacts/HolyTome.java index 73a5f7048..f8c885193 100644 --- a/core/src/main/java/com/shatteredpixel/shatteredpixeldungeon/items/artifacts/HolyTome.java +++ b/core/src/main/java/com/shatteredpixel/shatteredpixeldungeon/items/artifacts/HolyTome.java @@ -173,12 +173,17 @@ public class HolyTome extends Artifact { if (charge < chargeCap) { - //gains 2.5 charges per hero level, plus 10% per missing charge, plus another 10% for every level after 7 - float chargeGain = (2.5f * levelPortion) * (1f+(chargeCap - charge)/10f); - if (level() > 7) chargeGain *= 1f + (level()-7)/10f; + //gains 5 charges per hero level, plus 0.25 per missing charge, plus another 0.25 for every level after 7 + float chargeGain = (5f * levelPortion) * (1f+(chargeCap - charge)/20f); + if (level() > 7) chargeGain *= 1f + (level()-7)/20f; chargeGain *= RingOfEnergy.artifactChargeMultiplier(target); + //floor 1 is very short with pre-spawned weak enemies, so nerf recharge speed here specifically + if (Dungeon.depth == 1){ + chargeGain *= 0.67f; + } + partialCharge += chargeGain; //charge is in increments of 1/5 max hunger value.