From 47389c9cb7dc9ca387a351230f60694ae44d1203 Mon Sep 17 00:00:00 2001 From: Evan Debenham Date: Fri, 3 Jun 2016 22:07:08 -0400 Subject: [PATCH] v0.4.0: renamed glyph of bounce --- .../shatteredpixeldungeon/ShatteredPixelDungeon.java | 3 +++ .../shatteredpixeldungeon/items/armor/Armor.java | 10 ++++------ .../items/armor/glyphs/{Bounce.java => Repulsion.java} | 9 ++++++++- .../messages/items/items.properties | 4 ++-- 4 files changed, 17 insertions(+), 9 deletions(-) rename src/com/shatteredpixel/shatteredpixeldungeon/items/armor/glyphs/{Bounce.java => Repulsion.java} (90%) diff --git a/src/com/shatteredpixel/shatteredpixeldungeon/ShatteredPixelDungeon.java b/src/com/shatteredpixel/shatteredpixeldungeon/ShatteredPixelDungeon.java index 34bcc00a9..d8e72f433 100644 --- a/src/com/shatteredpixel/shatteredpixeldungeon/ShatteredPixelDungeon.java +++ b/src/com/shatteredpixel/shatteredpixeldungeon/ShatteredPixelDungeon.java @@ -142,6 +142,9 @@ public class ShatteredPixelDungeon extends Game { com.watabou.utils.Bundle.addAlias( com.shatteredpixel.shatteredpixeldungeon.items.weapon.enchantments.Chilling.class, "com.shatteredpixel.shatteredpixeldungeon.items.weapon.enchantments.Slow" ); + com.watabou.utils.Bundle.addAlias( + com.shatteredpixel.shatteredpixeldungeon.items.armor.glyphs.Repulsion.class, + "com.shatteredpixel.shatteredpixeldungeon.items.armor.glyphs.Bounce" ); } diff --git a/src/com/shatteredpixel/shatteredpixeldungeon/items/armor/Armor.java b/src/com/shatteredpixel/shatteredpixeldungeon/items/armor/Armor.java index 10e5d77f4..d2124f4b5 100644 --- a/src/com/shatteredpixel/shatteredpixeldungeon/items/armor/Armor.java +++ b/src/com/shatteredpixel/shatteredpixeldungeon/items/armor/Armor.java @@ -31,12 +31,12 @@ import com.shatteredpixel.shatteredpixeldungeon.items.EquipableItem; import com.shatteredpixel.shatteredpixeldungeon.items.Item; import com.shatteredpixel.shatteredpixeldungeon.items.armor.glyphs.Affection; import com.shatteredpixel.shatteredpixeldungeon.items.armor.glyphs.AntiEntropy; -import com.shatteredpixel.shatteredpixeldungeon.items.armor.glyphs.Bounce; import com.shatteredpixel.shatteredpixeldungeon.items.armor.glyphs.Displacement; import com.shatteredpixel.shatteredpixeldungeon.items.armor.glyphs.Entanglement; import com.shatteredpixel.shatteredpixeldungeon.items.armor.glyphs.Metabolism; import com.shatteredpixel.shatteredpixeldungeon.items.armor.glyphs.Multiplicity; import com.shatteredpixel.shatteredpixeldungeon.items.armor.glyphs.Potential; +import com.shatteredpixel.shatteredpixeldungeon.items.armor.glyphs.Repulsion; import com.shatteredpixel.shatteredpixeldungeon.items.armor.glyphs.Stench; import com.shatteredpixel.shatteredpixeldungeon.items.armor.glyphs.Viscosity; import com.shatteredpixel.shatteredpixeldungeon.messages.Messages; @@ -391,7 +391,7 @@ public class Armor extends EquipableItem { public static abstract class Glyph implements Bundlable { private static final Class[] glyphs = new Class[]{ - Bounce.class, Affection.class, AntiEntropy.class, Multiplicity.class, + Repulsion.class, Affection.class, AntiEntropy.class, Multiplicity.class, Potential.class, Metabolism.class, Stench.class, Viscosity.class, Displacement.class, Entanglement.class }; @@ -415,10 +415,8 @@ public class Armor extends EquipableItem { public void storeInBundle( Bundle bundle ) { } - public ItemSprite.Glowing glowing() { - return ItemSprite.Glowing.WHITE; - } - + public abstract ItemSprite.Glowing glowing(); + public boolean checkOwner( Char owner ) { if (!owner.isAlive() && owner instanceof Hero) { diff --git a/src/com/shatteredpixel/shatteredpixeldungeon/items/armor/glyphs/Bounce.java b/src/com/shatteredpixel/shatteredpixeldungeon/items/armor/glyphs/Repulsion.java similarity index 90% rename from src/com/shatteredpixel/shatteredpixeldungeon/items/armor/glyphs/Bounce.java rename to src/com/shatteredpixel/shatteredpixeldungeon/items/armor/glyphs/Repulsion.java index 1ac781eef..b72f8377c 100644 --- a/src/com/shatteredpixel/shatteredpixeldungeon/items/armor/glyphs/Bounce.java +++ b/src/com/shatteredpixel/shatteredpixeldungeon/items/armor/glyphs/Repulsion.java @@ -28,9 +28,12 @@ import com.shatteredpixel.shatteredpixeldungeon.effects.Pushing; import com.shatteredpixel.shatteredpixeldungeon.items.armor.Armor; import com.shatteredpixel.shatteredpixeldungeon.items.armor.Armor.Glyph; import com.shatteredpixel.shatteredpixeldungeon.levels.Level; +import com.shatteredpixel.shatteredpixeldungeon.sprites.ItemSprite; import com.watabou.utils.Random; -public class Bounce extends Glyph { +public class Repulsion extends Glyph { + + private static ItemSprite.Glowing WHITE = new ItemSprite.Glowing( 0xFFFFFF ); @Override public int proc( Armor armor, Char attacker, Char defender, int damage) { @@ -67,4 +70,8 @@ public class Bounce extends Glyph { return damage; } + @Override + public ItemSprite.Glowing glowing() { + return WHITE; + } } diff --git a/src/com/shatteredpixel/shatteredpixeldungeon/messages/items/items.properties b/src/com/shatteredpixel/shatteredpixeldungeon/messages/items/items.properties index 9d6986e98..e0a33ec92 100644 --- a/src/com/shatteredpixel/shatteredpixeldungeon/messages/items/items.properties +++ b/src/com/shatteredpixel/shatteredpixeldungeon/messages/items/items.properties @@ -3,8 +3,6 @@ items.armor.glyphs.affection.name=%s of affection items.armor.glyphs.antientropy.name=%s of anti-entropy -items.armor.glyphs.bounce.name=%s of bounce - items.armor.glyphs.displacement.name=%s of displacement items.armor.glyphs.entanglement.name=%s of entanglement @@ -17,6 +15,8 @@ items.armor.glyphs.multiplicity.rankings_desc=Killed by: glyph of multiplicity items.armor.glyphs.potential.name=%s of potential items.armor.glyphs.potential.rankings_desc=Killed by: glyph of potential +items.armor.glyphs.repulsion.name=%s of repulsion + items.armor.glyphs.stench.name=%s of stench items.armor.glyphs.viscosity.name=%s of viscosity