diff --git a/core/src/main/assets/messages/items/items.properties b/core/src/main/assets/messages/items/items.properties index 08f0362a4..68ffd8707 100644 --- a/core/src/main/assets/messages/items/items.properties +++ b/core/src/main/assets/messages/items/items.properties @@ -815,9 +815,9 @@ items.rings.ringofelements.typical_stats=When worn, this ring will typically pro items.rings.ringofelements.desc=This ring provides resistance to most elemental and magical effects, decreasing damage and debuff duration. Naturally a cursed ring will instead worsen these effects. items.rings.ringofenergy.name=ring of energy -items.rings.ringofenergy.stats=When worn, this ring will increase wand charge speed by _%s%%._ -items.rings.ringofenergy.typical_stats=When worn, this ring will typically increase wand charge speed by _%s%%._ -items.rings.ringofenergy.desc=Your wands will recharge more quickly in the arcane field that radiates from this ring. A cursed ring will instead slow wand recharge. +items.rings.ringofenergy.stats=When worn, this ring will increase wand charge speed by _%s%%_ and artifact charge speed by _%s%%._ +items.rings.ringofenergy.typical_stats=When worn, this ring will typically increase wand charge speed by _%s%%_ and artifact charge speed by _%s%%._ +items.rings.ringofenergy.desc=Your wands and artifacts will recharge more quickly in the arcane field that radiates from this ring. A cursed ring will instead slow recharge. items.rings.ringofevasion.name=ring of evasion items.rings.ringofevasion.stats=When worn, this ring will increase your evasion by _%s%%._ diff --git a/core/src/main/java/com/shatteredpixel/shatteredpixeldungeon/actors/buffs/Regeneration.java b/core/src/main/java/com/shatteredpixel/shatteredpixeldungeon/actors/buffs/Regeneration.java index d2afe3d68..53d56a290 100644 --- a/core/src/main/java/com/shatteredpixel/shatteredpixeldungeon/actors/buffs/Regeneration.java +++ b/core/src/main/java/com/shatteredpixel/shatteredpixeldungeon/actors/buffs/Regeneration.java @@ -24,6 +24,7 @@ package com.shatteredpixel.shatteredpixeldungeon.actors.buffs; import com.shatteredpixel.shatteredpixeldungeon.Dungeon; import com.shatteredpixel.shatteredpixeldungeon.actors.hero.Hero; import com.shatteredpixel.shatteredpixeldungeon.items.artifacts.ChaliceOfBlood; +import com.shatteredpixel.shatteredpixeldungeon.items.rings.RingOfEnergy; public class Regeneration extends Buff { @@ -51,13 +52,16 @@ public class Regeneration extends Buff { ChaliceOfBlood.chaliceRegen regenBuff = Dungeon.hero.buff( ChaliceOfBlood.chaliceRegen.class); - if (regenBuff != null) - if (regenBuff.isCursed()) - spend( REGENERATION_DELAY * 1.5f ); - else - spend( REGENERATION_DELAY - regenBuff.itemLevel()*0.9f ); - else - spend( REGENERATION_DELAY ); + float delay = REGENERATION_DELAY; + if (regenBuff != null) { + if (regenBuff.isCursed()) { + delay *= 1.5f; + } else { + delay -= regenBuff.itemLevel()*0.9f; + delay /= RingOfEnergy.artifactChargeMultiplier(target); + } + } + spend( delay ); } else { diff --git a/core/src/main/java/com/shatteredpixel/shatteredpixeldungeon/items/artifacts/AlchemistsToolkit.java b/core/src/main/java/com/shatteredpixel/shatteredpixeldungeon/items/artifacts/AlchemistsToolkit.java index a20da0155..4de7fbc11 100644 --- a/core/src/main/java/com/shatteredpixel/shatteredpixeldungeon/items/artifacts/AlchemistsToolkit.java +++ b/core/src/main/java/com/shatteredpixel/shatteredpixeldungeon/items/artifacts/AlchemistsToolkit.java @@ -25,6 +25,7 @@ import com.shatteredpixel.shatteredpixeldungeon.Dungeon; import com.shatteredpixel.shatteredpixeldungeon.actors.hero.Hero; import com.shatteredpixel.shatteredpixeldungeon.items.Item; import com.shatteredpixel.shatteredpixeldungeon.items.Recipe; +import com.shatteredpixel.shatteredpixeldungeon.items.rings.RingOfEnergy; import com.shatteredpixel.shatteredpixeldungeon.messages.Messages; import com.shatteredpixel.shatteredpixeldungeon.scenes.AlchemyScene; import com.shatteredpixel.shatteredpixeldungeon.sprites.ItemSpriteSheet; @@ -179,7 +180,9 @@ public class AlchemistsToolkit extends Artifact { //This means that energy absorbed into the kit is recovered in 6.67 hero levels (as 33% of input energy is kept) //exp towards toolkit levels is included here float effectiveLevel = GameMath.gate(0, level() + exp/10f, 10); - partialCharge += (2 + (1f * effectiveLevel)) * levelPortion; + float chargeGain = (2 + (1f * effectiveLevel)) * levelPortion; + chargeGain *= RingOfEnergy.artifactChargeMultiplier(target); + partialCharge += chargeGain; //charge is in increments of 1/10 max hunger value. while (partialCharge >= 1) { diff --git a/core/src/main/java/com/shatteredpixel/shatteredpixeldungeon/items/artifacts/ChaliceOfBlood.java b/core/src/main/java/com/shatteredpixel/shatteredpixeldungeon/items/artifacts/ChaliceOfBlood.java index a07ba196c..35724abfc 100644 --- a/core/src/main/java/com/shatteredpixel/shatteredpixeldungeon/items/artifacts/ChaliceOfBlood.java +++ b/core/src/main/java/com/shatteredpixel/shatteredpixeldungeon/items/artifacts/ChaliceOfBlood.java @@ -167,7 +167,7 @@ public class ChaliceOfBlood extends Artifact { } public class chaliceRegen extends ArtifactBuff { - + //see Regeneration.class for effect } } 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 6423b2a0c..0b769af14 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 @@ -30,6 +30,7 @@ import com.shatteredpixel.shatteredpixeldungeon.actors.buffs.Preparation; import com.shatteredpixel.shatteredpixeldungeon.actors.hero.Hero; import com.shatteredpixel.shatteredpixeldungeon.actors.hero.HeroSubClass; import com.shatteredpixel.shatteredpixeldungeon.items.Item; +import com.shatteredpixel.shatteredpixeldungeon.items.rings.RingOfEnergy; import com.shatteredpixel.shatteredpixeldungeon.messages.Messages; import com.shatteredpixel.shatteredpixeldungeon.sprites.CharSprite; import com.shatteredpixel.shatteredpixeldungeon.sprites.ItemSpriteSheet; @@ -181,6 +182,7 @@ public class CloakOfShadows extends Artifact { float missing = (chargeCap - charge); if (level() > 7) missing += 5*(level() - 7)/3f; float turnsToCharge = (45 - missing); + turnsToCharge /= RingOfEnergy.artifactChargeMultiplier(target); partialCharge += (1f / turnsToCharge); } diff --git a/core/src/main/java/com/shatteredpixel/shatteredpixeldungeon/items/artifacts/DriedRose.java b/core/src/main/java/com/shatteredpixel/shatteredpixeldungeon/items/artifacts/DriedRose.java index c901229b4..6a8693750 100644 --- a/core/src/main/java/com/shatteredpixel/shatteredpixeldungeon/items/artifacts/DriedRose.java +++ b/core/src/main/java/com/shatteredpixel/shatteredpixeldungeon/items/artifacts/DriedRose.java @@ -43,6 +43,7 @@ import com.shatteredpixel.shatteredpixeldungeon.items.Item; import com.shatteredpixel.shatteredpixeldungeon.items.armor.Armor; import com.shatteredpixel.shatteredpixeldungeon.items.armor.glyphs.AntiMagic; import com.shatteredpixel.shatteredpixeldungeon.items.armor.glyphs.Brimstone; +import com.shatteredpixel.shatteredpixeldungeon.items.rings.RingOfEnergy; import com.shatteredpixel.shatteredpixeldungeon.items.scrolls.ScrollOfRetribution; import com.shatteredpixel.shatteredpixeldungeon.items.scrolls.exotic.ScrollOfPsionicBlast; import com.shatteredpixel.shatteredpixeldungeon.items.weapon.Weapon; @@ -61,8 +62,8 @@ import com.shatteredpixel.shatteredpixeldungeon.utils.GLog; import com.shatteredpixel.shatteredpixeldungeon.windows.IconTitle; import com.shatteredpixel.shatteredpixeldungeon.windows.WndBag; import com.shatteredpixel.shatteredpixeldungeon.windows.WndBlacksmith; -import com.shatteredpixel.shatteredpixeldungeon.windows.WndUseItem; import com.shatteredpixel.shatteredpixeldungeon.windows.WndQuest; +import com.shatteredpixel.shatteredpixeldungeon.windows.WndUseItem; import com.watabou.noosa.Game; import com.watabou.noosa.audio.Sample; import com.watabou.utils.Bundle; @@ -377,7 +378,8 @@ public class DriedRose extends Artifact { LockedFloor lock = target.buff(LockedFloor.class); if (charge < chargeCap && !cursed && (lock == null || lock.regenOn())) { - partialCharge += 1/5f; //500 turns to a full charge + //500 turns to a full charge + partialCharge += (1/5f * RingOfEnergy.artifactChargeMultiplier(target)); if (partialCharge > 1){ charge++; partialCharge--; diff --git a/core/src/main/java/com/shatteredpixel/shatteredpixeldungeon/items/artifacts/EtherealChains.java b/core/src/main/java/com/shatteredpixel/shatteredpixeldungeon/items/artifacts/EtherealChains.java index 49d516193..108c01bc1 100644 --- a/core/src/main/java/com/shatteredpixel/shatteredpixeldungeon/items/artifacts/EtherealChains.java +++ b/core/src/main/java/com/shatteredpixel/shatteredpixeldungeon/items/artifacts/EtherealChains.java @@ -31,6 +31,7 @@ import com.shatteredpixel.shatteredpixeldungeon.actors.buffs.LockedFloor; import com.shatteredpixel.shatteredpixeldungeon.actors.hero.Hero; import com.shatteredpixel.shatteredpixeldungeon.effects.Chains; import com.shatteredpixel.shatteredpixeldungeon.effects.Pushing; +import com.shatteredpixel.shatteredpixeldungeon.items.rings.RingOfEnergy; import com.shatteredpixel.shatteredpixeldungeon.mechanics.Ballistica; import com.shatteredpixel.shatteredpixeldungeon.messages.Messages; import com.shatteredpixel.shatteredpixeldungeon.scenes.CellSelector; @@ -271,7 +272,10 @@ public class EtherealChains extends Artifact { int chargeTarget = 5+(level()*2); LockedFloor lock = target.buff(LockedFloor.class); if (charge < chargeTarget && !cursed && (lock == null || lock.regenOn())) { - partialCharge += 1 / (40f - (chargeTarget - charge)*2f); + //gains a charge in 40 - 2*missingCharge turns + float chargeGain = (1 / (40f - (chargeTarget - charge)*2f)); + chargeGain *= RingOfEnergy.artifactChargeMultiplier(target); + partialCharge += chargeGain; } else if (cursed && Random.Int(100) == 0){ Buff.prolong( target, Cripple.class, 10f); } diff --git a/core/src/main/java/com/shatteredpixel/shatteredpixeldungeon/items/artifacts/HornOfPlenty.java b/core/src/main/java/com/shatteredpixel/shatteredpixeldungeon/items/artifacts/HornOfPlenty.java index 6e88f2d62..8c2c78727 100644 --- a/core/src/main/java/com/shatteredpixel/shatteredpixeldungeon/items/artifacts/HornOfPlenty.java +++ b/core/src/main/java/com/shatteredpixel/shatteredpixeldungeon/items/artifacts/HornOfPlenty.java @@ -32,6 +32,7 @@ import com.shatteredpixel.shatteredpixeldungeon.effects.SpellSprite; import com.shatteredpixel.shatteredpixeldungeon.items.Item; import com.shatteredpixel.shatteredpixeldungeon.items.food.Blandfruit; import com.shatteredpixel.shatteredpixeldungeon.items.food.Food; +import com.shatteredpixel.shatteredpixeldungeon.items.rings.RingOfEnergy; import com.shatteredpixel.shatteredpixeldungeon.messages.Messages; import com.shatteredpixel.shatteredpixeldungeon.scenes.GameScene; import com.shatteredpixel.shatteredpixeldungeon.sprites.ItemSpriteSheet; @@ -225,7 +226,9 @@ public class HornOfPlenty extends Artifact { //generates 0.25x max hunger value every hero level, +0.125x max value per horn level //to a max of 1.5x max hunger value per hero level //This means that a standard ration will be recovered in ~5.333 hero levels - partialCharge += Hunger.STARVING * levelPortion * (0.25f + (0.125f*level())); + float chargeGain = Hunger.STARVING * levelPortion * (0.25f + (0.125f*level())); + chargeGain *= RingOfEnergy.artifactChargeMultiplier(target); + partialCharge += chargeGain; //charge is in increments of 1/10 max hunger value. while (partialCharge >= Hunger.STARVING/10) { diff --git a/core/src/main/java/com/shatteredpixel/shatteredpixeldungeon/items/artifacts/MasterThievesArmband.java b/core/src/main/java/com/shatteredpixel/shatteredpixeldungeon/items/artifacts/MasterThievesArmband.java index 28489e22d..84f728f48 100644 --- a/core/src/main/java/com/shatteredpixel/shatteredpixeldungeon/items/artifacts/MasterThievesArmband.java +++ b/core/src/main/java/com/shatteredpixel/shatteredpixeldungeon/items/artifacts/MasterThievesArmband.java @@ -23,6 +23,7 @@ package com.shatteredpixel.shatteredpixeldungeon.items.artifacts; import com.shatteredpixel.shatteredpixeldungeon.Dungeon; import com.shatteredpixel.shatteredpixeldungeon.actors.hero.Hero; +import com.shatteredpixel.shatteredpixeldungeon.items.rings.RingOfEnergy; import com.shatteredpixel.shatteredpixeldungeon.messages.Messages; import com.shatteredpixel.shatteredpixeldungeon.sprites.ItemSpriteSheet; import com.watabou.utils.Random; @@ -71,7 +72,7 @@ public class MasterThievesArmband extends Artifact { public class Thievery extends ArtifactBuff{ public void collect(int gold){ if (!cursed) { - charge += gold/2; + charge += gold/2 * RingOfEnergy.artifactChargeMultiplier(target); } } diff --git a/core/src/main/java/com/shatteredpixel/shatteredpixeldungeon/items/artifacts/SandalsOfNature.java b/core/src/main/java/com/shatteredpixel/shatteredpixeldungeon/items/artifacts/SandalsOfNature.java index 2b7bbcbfe..cd373d1a6 100644 --- a/core/src/main/java/com/shatteredpixel/shatteredpixeldungeon/items/artifacts/SandalsOfNature.java +++ b/core/src/main/java/com/shatteredpixel/shatteredpixeldungeon/items/artifacts/SandalsOfNature.java @@ -29,6 +29,7 @@ import com.shatteredpixel.shatteredpixeldungeon.actors.hero.Hero; import com.shatteredpixel.shatteredpixeldungeon.effects.CellEmitter; import com.shatteredpixel.shatteredpixeldungeon.effects.particles.EarthParticle; import com.shatteredpixel.shatteredpixeldungeon.items.Item; +import com.shatteredpixel.shatteredpixeldungeon.items.rings.RingOfEnergy; import com.shatteredpixel.shatteredpixeldungeon.messages.Messages; import com.shatteredpixel.shatteredpixeldungeon.plants.Earthroot; import com.shatteredpixel.shatteredpixeldungeon.plants.Plant; @@ -170,7 +171,13 @@ public class SandalsOfNature extends Artifact { public void charge() { if (level() > 0 && charge < target.HT){ //gain 1+(1*level)% of the difference between current charge and max HP. - charge+= (Math.round( (target.HT-charge) * (.01+ level()*0.01) )); + float chargeGain = (target.HT-charge) * (.01f+ level()*0.01f); + chargeGain *= RingOfEnergy.artifactChargeMultiplier(target); + partialCharge += Math.max(0, chargeGain); + while (partialCharge > 1){ + charge++; + partialCharge--; + } updateQuickslot(); } } diff --git a/core/src/main/java/com/shatteredpixel/shatteredpixeldungeon/items/artifacts/TalismanOfForesight.java b/core/src/main/java/com/shatteredpixel/shatteredpixeldungeon/items/artifacts/TalismanOfForesight.java index 30eb82b42..4bd1cb364 100644 --- a/core/src/main/java/com/shatteredpixel/shatteredpixeldungeon/items/artifacts/TalismanOfForesight.java +++ b/core/src/main/java/com/shatteredpixel/shatteredpixeldungeon/items/artifacts/TalismanOfForesight.java @@ -31,6 +31,7 @@ import com.shatteredpixel.shatteredpixeldungeon.actors.buffs.LockedFloor; import com.shatteredpixel.shatteredpixeldungeon.actors.hero.Hero; import com.shatteredpixel.shatteredpixeldungeon.effects.CheckedCell; import com.shatteredpixel.shatteredpixeldungeon.items.Heap; +import com.shatteredpixel.shatteredpixeldungeon.items.rings.RingOfEnergy; import com.shatteredpixel.shatteredpixeldungeon.items.scrolls.ScrollOfMagicMapping; import com.shatteredpixel.shatteredpixeldungeon.levels.Terrain; import com.shatteredpixel.shatteredpixeldungeon.mechanics.Ballistica; @@ -294,10 +295,12 @@ public class TalismanOfForesight extends Artifact { warn = false; } - //fully charges in 2000 turns at lvl=0, scaling to 1000 turns at lvl = 10. LockedFloor lock = target.buff(LockedFloor.class); if (charge < chargeCap && !cursed && (lock == null || lock.regenOn())) { - partialCharge += 0.05f+(level()*0.005f); + //fully charges in 2000 turns at +0, scaling to 1000 turns at +10. + float chargeGain = (0.05f+(level()*0.005f)); + chargeGain *= RingOfEnergy.artifactChargeMultiplier(target); + partialCharge += chargeGain; if (partialCharge > 1 && charge < chargeCap) { partialCharge--; 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 5361638ab..dc61204fd 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 @@ -30,6 +30,7 @@ import com.shatteredpixel.shatteredpixeldungeon.actors.buffs.LockedFloor; import com.shatteredpixel.shatteredpixeldungeon.actors.hero.Hero; import com.shatteredpixel.shatteredpixeldungeon.actors.mobs.Mob; import com.shatteredpixel.shatteredpixeldungeon.items.Item; +import com.shatteredpixel.shatteredpixeldungeon.items.rings.RingOfEnergy; import com.shatteredpixel.shatteredpixeldungeon.messages.Messages; import com.shatteredpixel.shatteredpixeldungeon.scenes.GameScene; import com.shatteredpixel.shatteredpixeldungeon.sprites.CharSprite; @@ -213,7 +214,10 @@ public class TimekeepersHourglass extends Artifact { LockedFloor lock = target.buff(LockedFloor.class); if (charge < chargeCap && !cursed && (lock == null || lock.regenOn())) { - partialCharge += 1 / (90f - (chargeCap - charge)*3f); + //90 turns to charge at full, 60 turns to charge at 0/10 + float chargeGain = 1 / (90f - (chargeCap - charge)*3f); + chargeGain *= RingOfEnergy.artifactChargeMultiplier(target); + partialCharge += chargeGain; if (partialCharge >= 1) { partialCharge --; diff --git a/core/src/main/java/com/shatteredpixel/shatteredpixeldungeon/items/artifacts/UnstableSpellbook.java b/core/src/main/java/com/shatteredpixel/shatteredpixeldungeon/items/artifacts/UnstableSpellbook.java index 492f995cd..56d1bd1f4 100644 --- a/core/src/main/java/com/shatteredpixel/shatteredpixeldungeon/items/artifacts/UnstableSpellbook.java +++ b/core/src/main/java/com/shatteredpixel/shatteredpixeldungeon/items/artifacts/UnstableSpellbook.java @@ -30,6 +30,7 @@ import com.shatteredpixel.shatteredpixeldungeon.actors.hero.Hero; import com.shatteredpixel.shatteredpixeldungeon.effects.particles.ElmoParticle; import com.shatteredpixel.shatteredpixeldungeon.items.Generator; import com.shatteredpixel.shatteredpixeldungeon.items.Item; +import com.shatteredpixel.shatteredpixeldungeon.items.rings.RingOfEnergy; import com.shatteredpixel.shatteredpixeldungeon.items.scrolls.Scroll; import com.shatteredpixel.shatteredpixeldungeon.items.scrolls.ScrollOfIdentify; import com.shatteredpixel.shatteredpixeldungeon.items.scrolls.ScrollOfMagicMapping; @@ -277,7 +278,10 @@ public class UnstableSpellbook extends Artifact { public boolean act() { LockedFloor lock = target.buff(LockedFloor.class); if (charge < chargeCap && !cursed && (lock == null || lock.regenOn())) { - partialCharge += 1 / (120f - (chargeCap - charge)*5f); + //120 turns to charge at full, 80 turns to charge at 0/8 + float chargeGain = 1 / (120f - (chargeCap - charge)*5f); + chargeGain *= RingOfEnergy.artifactChargeMultiplier(target); + partialCharge += chargeGain; if (partialCharge >= 1) { partialCharge --; diff --git a/core/src/main/java/com/shatteredpixel/shatteredpixeldungeon/items/rings/RingOfEnergy.java b/core/src/main/java/com/shatteredpixel/shatteredpixeldungeon/items/rings/RingOfEnergy.java index ad852b1f3..6ab0a891b 100644 --- a/core/src/main/java/com/shatteredpixel/shatteredpixeldungeon/items/rings/RingOfEnergy.java +++ b/core/src/main/java/com/shatteredpixel/shatteredpixeldungeon/items/rings/RingOfEnergy.java @@ -35,9 +35,13 @@ public class RingOfEnergy extends Ring { public String statsInfo() { if (isIdentified()){ - return Messages.get(this, "stats", new DecimalFormat("#.##").format(100f * (Math.pow(1.30f, soloBuffedBonus()) - 1f))); + return Messages.get(this, "stats", + new DecimalFormat("#.##").format(100f * (Math.pow(1.20f, soloBuffedBonus()) - 1f)), + new DecimalFormat("#.##").format(100f * (Math.pow(1.10f, soloBuffedBonus()) - 1f))); } else { - return Messages.get(this, "typical_stats", new DecimalFormat("#.##").format(30f)); + return Messages.get(this, "typical_stats", + new DecimalFormat("#.##").format(20f), + new DecimalFormat("#.##").format(10f)); } } @@ -47,7 +51,11 @@ public class RingOfEnergy extends Ring { } public static float wandChargeMultiplier( Char target ){ - return (float)Math.pow(1.30, getBuffedBonus(target, Energy.class)); + return (float)Math.pow(1.20, getBuffedBonus(target, Energy.class)); + } + + public static float artifactChargeMultiplier( Char target ){ + return (float)Math.pow(1.10, getBuffedBonus(target, Energy.class)); } public class Energy extends RingBuff {