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 c93a0b53b..7c8902577 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 @@ -93,7 +93,7 @@ public enum Talent { //Rogue T2 MYSTICAL_MEAL(68), MYSTICAL_UPGRADE(69), WIDE_SEARCH(70), SILENT_STEPS(71), ROGUES_FORESIGHT(72), //Rogue T3 - ROGUE_T3_1(73, 3), LIGHT_CLOAK(74, 3), + ENHANCED_RINGS(73, 3), LIGHT_CLOAK(74, 3), //Assassin T3 ENHANCED_LETHALITY(75, 3), ASSASSINS_REACH(76, 3), BOUNTY_HUNTER(77, 3), //Freerunner T3 @@ -134,6 +134,7 @@ public enum Talent { } }; public static class EmpoweredStrikeTracker extends FlavourBuff{}; + public static class EnhancedRingsTracker extends FlavourBuff{}; public static class BountyHunterTracker extends FlavourBuff{}; public static class RejuvenatingStepsCooldown extends FlavourBuff{}; @@ -325,6 +326,12 @@ public enum Talent { } } + public static void onArtifactUsed( Hero hero ){ + if (hero.hasTalent(ENHANCED_RINGS)){ + Buff.affect(hero, EnhancedRingsTracker.class, 5f*hero.pointsInTalent(ENHANCED_RINGS)); + } + } + public static void onItemEquipped( Hero hero, Item item ){ if (hero.pointsInTalent(ARMSMASTERS_INTUITION) == 2 && (item instanceof Weapon || item instanceof Armor)){ item.identify(); @@ -447,7 +454,7 @@ public enum Talent { Collections.addAll(tierTalents, EMPOWERING_SCROLLS, MAGE_T3_2); break; case ROGUE: - Collections.addAll(tierTalents, ROGUE_T3_1, LIGHT_CLOAK); + Collections.addAll(tierTalents, ENHANCED_RINGS, LIGHT_CLOAK); break; case HUNTRESS: Collections.addAll(tierTalents, POINT_BLANK, HUNTRESS_T3_2); 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 330198e59..2f916a221 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 @@ -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.actors.hero.Talent; import com.shatteredpixel.shatteredpixeldungeon.items.Item; import com.shatteredpixel.shatteredpixeldungeon.items.Recipe; import com.shatteredpixel.shatteredpixeldungeon.items.rings.RingOfEnergy; @@ -208,6 +209,7 @@ public class AlchemistsToolkit extends Artifact { @Override public void spendEnergy(int reduction) { charge = Math.max(0, charge - reduction); + Talent.onArtifactUsed(Dungeon.hero); } } 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 045432696..7a6aa9b90 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 @@ -100,6 +100,7 @@ public class CloakOfShadows extends Artifact { } else { hero.sprite.alpha(0.4f); } + Talent.onArtifactUsed(Dungeon.hero); hero.sprite.operate(hero.pos); } } else { 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 6ff80bc29..1e9c0fd79 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 @@ -32,6 +32,7 @@ import com.shatteredpixel.shatteredpixeldungeon.actors.buffs.Burning; import com.shatteredpixel.shatteredpixeldungeon.actors.buffs.Corruption; import com.shatteredpixel.shatteredpixeldungeon.actors.buffs.LockedFloor; import com.shatteredpixel.shatteredpixeldungeon.actors.hero.Hero; +import com.shatteredpixel.shatteredpixeldungeon.actors.hero.Talent; import com.shatteredpixel.shatteredpixeldungeon.actors.mobs.Mob; import com.shatteredpixel.shatteredpixeldungeon.actors.mobs.Wraith; import com.shatteredpixel.shatteredpixeldungeon.actors.mobs.npcs.Ghost; @@ -169,7 +170,8 @@ public class DriedRose extends Artifact { ghost.sayAppeared(); } } - + + Talent.onArtifactUsed(hero); charge = 0; partialCharge = 0; updateQuickslot(); 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 e543549e2..ef7dc40ed 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 @@ -29,6 +29,7 @@ import com.shatteredpixel.shatteredpixeldungeon.actors.buffs.Buff; import com.shatteredpixel.shatteredpixeldungeon.actors.buffs.Cripple; import com.shatteredpixel.shatteredpixeldungeon.actors.buffs.LockedFloor; import com.shatteredpixel.shatteredpixeldungeon.actors.hero.Hero; +import com.shatteredpixel.shatteredpixeldungeon.actors.hero.Talent; import com.shatteredpixel.shatteredpixeldungeon.effects.Chains; import com.shatteredpixel.shatteredpixeldungeon.effects.Pushing; import com.shatteredpixel.shatteredpixeldungeon.items.rings.RingOfEnergy; @@ -169,6 +170,7 @@ public class EtherealChains extends Artifact { return; } else { charge -= chargeUse; + Talent.onArtifactUsed(hero); updateQuickslot(); } @@ -225,6 +227,7 @@ public class EtherealChains extends Artifact { return; } else { charge -= chargeUse; + Talent.onArtifactUsed(hero); updateQuickslot(); } 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 98a81ddd8..6e681ad67 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 @@ -101,6 +101,7 @@ public class HornOfPlenty extends Artifact { Statistics.foodEaten++; charge -= chargesToUse; + Talent.onArtifactUsed(hero); hero.sprite.operate(hero.pos); hero.busy(); 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 61f8fba7c..112ee61fe 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.actors.hero.Talent; import com.shatteredpixel.shatteredpixeldungeon.items.rings.RingOfEnergy; import com.shatteredpixel.shatteredpixeldungeon.messages.Messages; import com.shatteredpixel.shatteredpixeldungeon.sprites.ItemSpriteSheet; @@ -114,6 +115,7 @@ public class MasterThievesArmband extends Artifact { exp += value; } } + Talent.onArtifactUsed(Dungeon.hero); while(exp >= (250 + 50*level()) && level() < levelCap) { exp -= (250 + 50*level()); upgrade(); 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 049d46710..be4d757bf 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 @@ -26,6 +26,7 @@ import com.shatteredpixel.shatteredpixeldungeon.Dungeon; import com.shatteredpixel.shatteredpixeldungeon.actors.buffs.Buff; import com.shatteredpixel.shatteredpixeldungeon.actors.buffs.Roots; import com.shatteredpixel.shatteredpixeldungeon.actors.hero.Hero; +import com.shatteredpixel.shatteredpixeldungeon.actors.hero.Talent; import com.shatteredpixel.shatteredpixeldungeon.effects.CellEmitter; import com.shatteredpixel.shatteredpixeldungeon.effects.particles.EarthParticle; import com.shatteredpixel.shatteredpixeldungeon.items.Item; @@ -91,6 +92,7 @@ public class SandalsOfNature extends Artifact { CellEmitter.bottom(hero.pos).start(EarthParticle.FACTORY, 0.05f, 8); Camera.main.shake(1, 0.4f); charge = 0; + Talent.onArtifactUsed(Dungeon.hero); 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 862b1528b..d7b390df0 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 @@ -29,6 +29,7 @@ import com.shatteredpixel.shatteredpixeldungeon.actors.buffs.Buff; import com.shatteredpixel.shatteredpixeldungeon.actors.buffs.FlavourBuff; import com.shatteredpixel.shatteredpixeldungeon.actors.buffs.LockedFloor; import com.shatteredpixel.shatteredpixeldungeon.actors.hero.Hero; +import com.shatteredpixel.shatteredpixeldungeon.actors.hero.Talent; import com.shatteredpixel.shatteredpixeldungeon.effects.CheckedCell; import com.shatteredpixel.shatteredpixeldungeon.items.Heap; import com.shatteredpixel.shatteredpixeldungeon.items.rings.RingOfEnergy; @@ -205,6 +206,7 @@ public class TalismanOfForesight extends Artifact { partialCharge ++; charge --; } + Talent.onArtifactUsed(Dungeon.hero); updateQuickslot(); Dungeon.observe(); Dungeon.hero.checkVisibleMobs(); 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 755ecedc2..773945f00 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 @@ -28,6 +28,7 @@ import com.shatteredpixel.shatteredpixeldungeon.actors.buffs.Buff; import com.shatteredpixel.shatteredpixeldungeon.actors.buffs.Hunger; import com.shatteredpixel.shatteredpixeldungeon.actors.buffs.LockedFloor; import com.shatteredpixel.shatteredpixeldungeon.actors.hero.Hero; +import com.shatteredpixel.shatteredpixeldungeon.actors.hero.Talent; import com.shatteredpixel.shatteredpixeldungeon.actors.mobs.Mob; import com.shatteredpixel.shatteredpixeldungeon.items.Item; import com.shatteredpixel.shatteredpixeldungeon.items.rings.RingOfEnergy; @@ -100,6 +101,7 @@ public class TimekeepersHourglass extends Artifact { Sample.INSTANCE.play(Assets.Sounds.TELEPORT); activeBuff = new timeStasis(); + Talent.onArtifactUsed(Dungeon.hero); activeBuff.attachTo(Dungeon.hero); } else if (index == 1) { GLog.i( Messages.get(TimekeepersHourglass.class, "onfreeze") ); @@ -107,6 +109,7 @@ public class TimekeepersHourglass extends Artifact { Sample.INSTANCE.play(Assets.Sounds.TELEPORT); activeBuff = new timeFreeze(); + Talent.onArtifactUsed(Dungeon.hero); activeBuff.attachTo(Dungeon.hero); ((timeFreeze)activeBuff).processTime(0f); } 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 5d3059d63..dff6da662 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 @@ -27,6 +27,7 @@ import com.shatteredpixel.shatteredpixeldungeon.actors.buffs.Blindness; import com.shatteredpixel.shatteredpixeldungeon.actors.buffs.Buff; import com.shatteredpixel.shatteredpixeldungeon.actors.buffs.LockedFloor; import com.shatteredpixel.shatteredpixeldungeon.actors.hero.Hero; +import com.shatteredpixel.shatteredpixeldungeon.actors.hero.Talent; import com.shatteredpixel.shatteredpixeldungeon.effects.particles.ElmoParticle; import com.shatteredpixel.shatteredpixeldungeon.items.Generator; import com.shatteredpixel.shatteredpixeldungeon.items.Item; @@ -151,8 +152,10 @@ public class UnstableSpellbook extends Artifact { Scroll scroll = Reflection.newInstance(ExoticScroll.regToExo.get(fScroll.getClass())); charge--; scroll.doRead(); + Talent.onArtifactUsed(Dungeon.hero); } else { fScroll.doRead(); + Talent.onArtifactUsed(Dungeon.hero); } } @@ -163,6 +166,7 @@ public class UnstableSpellbook extends Artifact { }); } else { scroll.doRead(); + Talent.onArtifactUsed(Dungeon.hero); } updateQuickslot(); } diff --git a/core/src/main/java/com/shatteredpixel/shatteredpixeldungeon/items/rings/Ring.java b/core/src/main/java/com/shatteredpixel/shatteredpixeldungeon/items/rings/Ring.java index 23d3d4177..31a95116a 100644 --- a/core/src/main/java/com/shatteredpixel/shatteredpixeldungeon/items/rings/Ring.java +++ b/core/src/main/java/com/shatteredpixel/shatteredpixeldungeon/items/rings/Ring.java @@ -286,6 +286,15 @@ public class Ring extends KindofMisc { } } + @Override + public int buffedLvl() { + int lvl = super.buffedLvl(); + if (Dungeon.hero.buff(Talent.EnhancedRingsTracker.class) != null){ + lvl++; + } + return lvl; + } + public static int getBonus(Char target, Class type){ int bonus = 0; for (RingBuff buff : target.buffs(type)) {