From 8e6c677c1a0f747bc170f2401d6460e061294752 Mon Sep 17 00:00:00 2001 From: Evan Debenham Date: Tue, 7 May 2019 23:55:50 -0400 Subject: [PATCH] v0.7.3: various glyph balance changes --- .../items/armor/glyphs/Affection.java | 2 +- .../items/armor/glyphs/Entanglement.java | 70 +------------------ .../items/armor/glyphs/Potential.java | 10 ++- .../items/armor/glyphs/Thorns.java | 2 +- .../messages/items/items.properties | 8 +-- 5 files changed, 16 insertions(+), 76 deletions(-) diff --git a/core/src/main/java/com/shatteredpixel/shatteredpixeldungeon/items/armor/glyphs/Affection.java b/core/src/main/java/com/shatteredpixel/shatteredpixeldungeon/items/armor/glyphs/Affection.java index de2e1e917..d9281869a 100644 --- a/core/src/main/java/com/shatteredpixel/shatteredpixeldungeon/items/armor/glyphs/Affection.java +++ b/core/src/main/java/com/shatteredpixel/shatteredpixeldungeon/items/armor/glyphs/Affection.java @@ -42,7 +42,7 @@ public class Affection extends Glyph { if (Random.Int( level / 2 + 10 ) >= 9) { - int duration = Random.IntRange( 4, 12 ); + int duration = Random.IntRange( 6, 12 ); Buff.affect( attacker, Charm.class, duration ).object = defender.id(); attacker.sprite.centerEmitter().start( Speck.factory( Speck.HEART ), 0.2f, 5 ); diff --git a/core/src/main/java/com/shatteredpixel/shatteredpixeldungeon/items/armor/glyphs/Entanglement.java b/core/src/main/java/com/shatteredpixel/shatteredpixeldungeon/items/armor/glyphs/Entanglement.java index 20cb4cebb..0d1e72fb2 100644 --- a/core/src/main/java/com/shatteredpixel/shatteredpixeldungeon/items/armor/glyphs/Entanglement.java +++ b/core/src/main/java/com/shatteredpixel/shatteredpixeldungeon/items/armor/glyphs/Entanglement.java @@ -21,10 +21,8 @@ package com.shatteredpixel.shatteredpixeldungeon.items.armor.glyphs; -import com.shatteredpixel.shatteredpixeldungeon.actors.Actor; import com.shatteredpixel.shatteredpixeldungeon.actors.Char; import com.shatteredpixel.shatteredpixeldungeon.actors.buffs.Buff; -import com.shatteredpixel.shatteredpixeldungeon.actors.buffs.Roots; import com.shatteredpixel.shatteredpixeldungeon.effects.CellEmitter; import com.shatteredpixel.shatteredpixeldungeon.effects.particles.EarthParticle; import com.shatteredpixel.shatteredpixeldungeon.items.armor.Armor; @@ -33,7 +31,6 @@ import com.shatteredpixel.shatteredpixeldungeon.plants.Earthroot; import com.shatteredpixel.shatteredpixeldungeon.sprites.ItemSprite; import com.shatteredpixel.shatteredpixeldungeon.sprites.ItemSprite.Glowing; import com.watabou.noosa.Camera; -import com.watabou.utils.Bundle; import com.watabou.utils.Random; public class Entanglement extends Glyph { @@ -45,35 +42,11 @@ public class Entanglement extends Glyph { final int level = Math.max( 0, armor.level() ); - final int pos = defender.pos; - if (Random.Int( 4 ) == 0) { - Actor delay = new Actor() { - - { - actPriority = HERO_PRIO+1; - } - - @Override - protected boolean act() { - - Buff.affect( defender, Earthroot.Armor.class ).level( 4 * (level + 1) ); - CellEmitter.bottom( defender.pos ).start( EarthParticle.FACTORY, 0.05f, 8 ); - Camera.main.shake( 1, 0.4f ); - - if (defender.buff(Roots.class) != null){ - Buff.prolong(defender, Roots.class, 5); - } else { - DelayedRoot root = Buff.append(defender, DelayedRoot.class); - root.setup(pos); - } - - Actor.remove(this); - return true; - } - }; - Actor.addDelayed(delay, defender.cooldown()); + Buff.affect( defender, Earthroot.Armor.class ).level( 5 + 2 * level ); + CellEmitter.bottom( defender.pos ).start( EarthParticle.FACTORY, 0.05f, 8 ); + Camera.main.shake( 1, 0.4f ); } @@ -85,41 +58,4 @@ public class Entanglement extends Glyph { return BROWN; } - public static class DelayedRoot extends Buff{ - - { - actPriority = HERO_PRIO-1; - } - - private int pos; - - @Override - public boolean act() { - - if (target.pos == pos){ - Buff.prolong( target, Roots.class, 5 ); - } - - detach(); - return true; - } - - private void setup( int pos ){ - this.pos = pos; - } - - private static final String POS = "pos"; - - @Override - public void restoreFromBundle(Bundle bundle) { - super.restoreFromBundle(bundle); - pos = bundle.getInt(POS); - } - - @Override - public void storeInBundle(Bundle bundle) { - super.storeInBundle(bundle); - bundle.put(POS, pos); - } - } } diff --git a/core/src/main/java/com/shatteredpixel/shatteredpixeldungeon/items/armor/glyphs/Potential.java b/core/src/main/java/com/shatteredpixel/shatteredpixeldungeon/items/armor/glyphs/Potential.java index a9cecb34e..b6799e973 100644 --- a/core/src/main/java/com/shatteredpixel/shatteredpixeldungeon/items/armor/glyphs/Potential.java +++ b/core/src/main/java/com/shatteredpixel/shatteredpixeldungeon/items/armor/glyphs/Potential.java @@ -28,6 +28,7 @@ import com.shatteredpixel.shatteredpixeldungeon.items.armor.Armor; import com.shatteredpixel.shatteredpixeldungeon.items.armor.Armor.Glyph; import com.shatteredpixel.shatteredpixeldungeon.sprites.ItemSprite; import com.shatteredpixel.shatteredpixeldungeon.sprites.ItemSprite.Glowing; +import com.watabou.utils.Random; public class Potential extends Glyph { @@ -38,10 +39,13 @@ public class Potential extends Glyph { int level = Math.max( 0, armor.level() ); - if (defender instanceof Hero) { - int wands = ((Hero) defender).belongings.charge(0.12f + level*0.06f); + // lvl 0 - 16.7% + // lvl 1 - 28.6% + // lvl 2 - 37.5% + if (defender instanceof Hero && Random.Int( level + 6 ) >= 5 ) { + int wands = ((Hero) defender).belongings.charge( 1f ); if (wands > 0) { - defender.sprite.centerEmitter().burst(EnergyParticle.FACTORY, wands * (level + 2)); + defender.sprite.centerEmitter().burst(EnergyParticle.FACTORY, 10); } } diff --git a/core/src/main/java/com/shatteredpixel/shatteredpixeldungeon/items/armor/glyphs/Thorns.java b/core/src/main/java/com/shatteredpixel/shatteredpixeldungeon/items/armor/glyphs/Thorns.java index 63629a825..5477a46b3 100644 --- a/core/src/main/java/com/shatteredpixel/shatteredpixeldungeon/items/armor/glyphs/Thorns.java +++ b/core/src/main/java/com/shatteredpixel/shatteredpixeldungeon/items/armor/glyphs/Thorns.java @@ -39,7 +39,7 @@ public class Thorns extends Armor.Glyph { if ( Random.Int( level/2 + 5) >= 4) { - Buff.affect( attacker, Bleeding.class).set( Math.max( level/2, damage)); + Buff.affect( attacker, Bleeding.class).set( 4 + level*2 ); } diff --git a/core/src/main/resources/com/shatteredpixel/shatteredpixeldungeon/messages/items/items.properties b/core/src/main/resources/com/shatteredpixel/shatteredpixeldungeon/messages/items/items.properties index 9c9906c2e..6cc9dd036 100644 --- a/core/src/main/resources/com/shatteredpixel/shatteredpixeldungeon/messages/items/items.properties +++ b/core/src/main/resources/com/shatteredpixel/shatteredpixeldungeon/messages/items/items.properties @@ -29,7 +29,7 @@ items.armor.glyphs.affection.name=%s of affection items.armor.glyphs.affection.desc=This powerful glyph manipulates the mind of attackers, charming them temporarily. items.armor.glyphs.antimagic.name=%s of anti-magic -items.armor.glyphs.antimagic.desc=This powerful glyph allows armor to apply its defense to most magical attacks as well as physical ones. +items.armor.glyphs.antimagic.desc=This powerful glyph allows armor to defend its wearer against magical attacks as well as physical ones. This magical defence is not affected by the armor's tier. items.armor.glyphs.brimstone.name=%s of brimstone items.armor.glyphs.brimstone.desc=This glyph protects the wearer and their belongings from fire, with upgrades it even converts the heat into temporary shielding. @@ -38,7 +38,7 @@ items.armor.glyphs.camouflage.name=%s of camouflage items.armor.glyphs.camouflage.desc=This glyph allows the wearer to blend into tall grass, granting them temporary invisibility. items.armor.glyphs.entanglement.name=%s of entanglement -items.armor.glyphs.entanglement.desc=This glyph grows earthroot around the wearer to absorb damage, but roots them if allowed to take hold. +items.armor.glyphs.entanglement.desc=This glyph grows earthen armor around the wearer to absorb damage, but this armor will break if the wearer moves. items.armor.glyphs.flow.name=%s of flow items.armor.glyphs.flow.desc=This glyph manipulates the flow of water around the wearer, making them much faster when moving through it. @@ -48,7 +48,7 @@ items.armor.glyphs.obfuscation.desc=This glyph obscures the wearer, making them items.armor.glyphs.potential.name=%s of potential items.armor.glyphs.potential.rankings_desc=Killed by: glyph of potential -items.armor.glyphs.potential.desc=This glyph builds energy when struck, giving a small amount of charge to the wearer's wands. +items.armor.glyphs.potential.desc=This glyph builds energy when struck, granting charge to the wearer's wand when it activates. items.armor.glyphs.repulsion.name=%s of repulsion items.armor.glyphs.repulsion.desc=This glyph rebounds force against attackers, sending them flying back. @@ -60,7 +60,7 @@ items.armor.glyphs.swiftness.name=%s of swiftness items.armor.glyphs.swiftness.desc=This glyph enhances the speed of the wearer whenever they aren't next to an enemy. items.armor.glyphs.thorns.name=%s of thorns -items.armor.glyphs.thorns.desc=This powerful glyph harms attackers, causing them to slowly bleed based on the damage they deal. +items.armor.glyphs.thorns.desc=This powerful glyph harms attackers, causing them to slowly bleed when they attack the wearer. items.armor.glyphs.viscosity.name=%s of viscosity items.armor.glyphs.viscosity.deferred=deferred %d