From ed861763628fd31ec08107eac65e06d3b45c7c40 Mon Sep 17 00:00:00 2001 From: Evan Debenham Date: Wed, 10 Sep 2014 17:20:33 -0400 Subject: [PATCH] V0.2.0: Added classes for 6 (yes 6!) new rings, tied into item handler/generator. Still need implementation. --- .../items/Generator.java | 28 ++++++++--------- .../items/rings/Ring.java | 23 +++++++------- .../items/rings/RingOfForce.java | 30 +++++++++++++++++++ .../items/rings/RingOfFuror.java | 29 ++++++++++++++++++ .../items/rings/RingOfMight.java | 29 ++++++++++++++++++ .../items/rings/RingOfSharpshooting.java | 28 +++++++++++++++++ .../items/rings/RingOfTenacity.java | 29 ++++++++++++++++++ .../items/rings/RingOfWealth.java | 28 +++++++++++++++++ 8 files changed, 197 insertions(+), 27 deletions(-) create mode 100644 src/com/shatteredpixel/shatteredpixeldungeon/items/rings/RingOfForce.java create mode 100644 src/com/shatteredpixel/shatteredpixeldungeon/items/rings/RingOfFuror.java create mode 100644 src/com/shatteredpixel/shatteredpixeldungeon/items/rings/RingOfMight.java create mode 100644 src/com/shatteredpixel/shatteredpixeldungeon/items/rings/RingOfSharpshooting.java create mode 100644 src/com/shatteredpixel/shatteredpixeldungeon/items/rings/RingOfTenacity.java create mode 100644 src/com/shatteredpixel/shatteredpixeldungeon/items/rings/RingOfWealth.java diff --git a/src/com/shatteredpixel/shatteredpixeldungeon/items/Generator.java b/src/com/shatteredpixel/shatteredpixeldungeon/items/Generator.java index 46c85aaf3..2a39279ce 100644 --- a/src/com/shatteredpixel/shatteredpixeldungeon/items/Generator.java +++ b/src/com/shatteredpixel/shatteredpixeldungeon/items/Generator.java @@ -161,21 +161,19 @@ public class Generator { MysteryMeat.class }; Category.FOOD.probs = new float[]{ 4, 1, 0 }; - Category.RING.classes = new Class[]{ - //RingOfMending.class, - //RingOfDetection.class, - //RingOfShadows.class, - RingOfMagic.class, - //RingOfHerbalism.class, - RingOfAccuracy.class, - RingOfEvasion.class, - //RingOfSatiety.class, - RingOfHaste.class, - RingOfElements.class - //RingOfHaggler.class, - //RingOfThorns.class - }; - Category.RING.probs = new float[]{ 1, 1, 1, 1, 1 }; + Category.RING.classes = new Class[]{ + RingOfAccuracy.class, + RingOfEvasion.class, + RingOfElements.class, + RingOfForce.class, + RingOfFuror.class, + RingOfHaste.class, + RingOfMagic.class, + RingOfMight.class, + RingOfSharpshooting.class, + RingOfTenacity.class, + RingOfWealth.class}; + Category.RING.probs = new float[]{ 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1 }; Category.SEED.classes = new Class[]{ Firebloom.Seed.class, diff --git a/src/com/shatteredpixel/shatteredpixeldungeon/items/rings/Ring.java b/src/com/shatteredpixel/shatteredpixeldungeon/items/rings/Ring.java index f45bc11d7..8c69ac44f 100644 --- a/src/com/shatteredpixel/shatteredpixeldungeon/items/rings/Ring.java +++ b/src/com/shatteredpixel/shatteredpixeldungeon/items/rings/Ring.java @@ -42,19 +42,18 @@ public class Ring extends KindofMisc { protected Buff buff; - private static final Class[] rings = { - //RingOfMending.class, - //RingOfDetection.class, - //RingOfShadows.class, + private static final Class[] rings = { + RingOfAccuracy.class, + RingOfEvasion.class, + RingOfElements.class, + RingOfForce.class, + RingOfFuror.class, + RingOfHaste.class, RingOfMagic.class, - //RingOfHerbalism.class, - RingOfAccuracy.class, - RingOfEvasion.class, - //RingOfSatiety.class, - RingOfHaste.class, - //RingOfHaggler.class, - RingOfElements.class, - //RingOfThorns.class + RingOfMight.class, + RingOfSharpshooting.class, + RingOfTenacity.class, + RingOfWealth.class, }; private static final String[] gems = {"diamond", "opal", "garnet", "ruby", "amethyst", "topaz", "onyx", "tourmaline", "emerald", "sapphire", "quartz", "agate"}; diff --git a/src/com/shatteredpixel/shatteredpixeldungeon/items/rings/RingOfForce.java b/src/com/shatteredpixel/shatteredpixeldungeon/items/rings/RingOfForce.java new file mode 100644 index 000000000..4001766ed --- /dev/null +++ b/src/com/shatteredpixel/shatteredpixeldungeon/items/rings/RingOfForce.java @@ -0,0 +1,30 @@ +package com.shatteredpixel.shatteredpixeldungeon.items.rings; + +/** + * Created by debenhame on 10/09/2014. + */ +public class RingOfForce extends Ring { + //TODO: tie this into game logic + { + name = "Ring of Force"; + } + + @Override + protected RingBuff buff( ) { + return new Force(); + } + + @Override + public String desc() { + return isKnown() ? + "This ring enhances the force of the wearer's blows. " + + "This extra power is largely wasted when wielding weapons, " + + "but an unarmed attack will be made much stronger. " + + "A cursed ring will instead weaken the wearer's blows." : + super.desc(); + } + + public class Force extends RingBuff { + } +} + diff --git a/src/com/shatteredpixel/shatteredpixeldungeon/items/rings/RingOfFuror.java b/src/com/shatteredpixel/shatteredpixeldungeon/items/rings/RingOfFuror.java new file mode 100644 index 000000000..09162590f --- /dev/null +++ b/src/com/shatteredpixel/shatteredpixeldungeon/items/rings/RingOfFuror.java @@ -0,0 +1,29 @@ +package com.shatteredpixel.shatteredpixeldungeon.items.rings; + +/** + * Created by debenhame on 10/09/2014. + */ +public class RingOfFuror extends Ring { + //TODO: tie this into game logic + { + name = "Ring of Furor"; + } + + @Override + protected RingBuff buff( ) { + return new Furor(); + } + + @Override + public String desc() { + return isKnown() ? + "This ring grants the wearer a sort of rising inner fury. " + + "Every successful attack will increase the wearers attacking speed " + + "until they stop fighting or miss too frequently. " + + "A cursed ring will instead slow the wearer's speed of attack." : + super.desc(); + } + + public class Furor extends RingBuff { + } +} diff --git a/src/com/shatteredpixel/shatteredpixeldungeon/items/rings/RingOfMight.java b/src/com/shatteredpixel/shatteredpixeldungeon/items/rings/RingOfMight.java new file mode 100644 index 000000000..d125544c6 --- /dev/null +++ b/src/com/shatteredpixel/shatteredpixeldungeon/items/rings/RingOfMight.java @@ -0,0 +1,29 @@ +package com.shatteredpixel.shatteredpixeldungeon.items.rings; + +/** + * Created by debenhame on 10/09/2014. + */ +public class RingOfMight extends Ring { + //TODO: tie this into game logic + { + name = "Ring of Might"; + } + + @Override + protected RingBuff buff( ) { + return new Might(); + } + + @Override + public String desc() { + return isKnown() ? + "This ring enhances the physical traits of the wearer, " + + "granting them greater physical strength and constitution. " + + "A cursed ring will weaken the wearer." : + super.desc(); + } + + public class Might extends RingBuff { + } +} + diff --git a/src/com/shatteredpixel/shatteredpixeldungeon/items/rings/RingOfSharpshooting.java b/src/com/shatteredpixel/shatteredpixeldungeon/items/rings/RingOfSharpshooting.java new file mode 100644 index 000000000..464916c22 --- /dev/null +++ b/src/com/shatteredpixel/shatteredpixeldungeon/items/rings/RingOfSharpshooting.java @@ -0,0 +1,28 @@ +package com.shatteredpixel.shatteredpixeldungeon.items.rings; + +/** + * Created by debenhame on 10/09/2014. + */ +public class RingOfSharpshooting extends Ring { + //TODO: tie this into game logic + { + name = "Ring of Sharpshooting"; + } + + @Override + protected RingBuff buff( ) { + return new Aim(); + } + + @Override + public String desc() { + return isKnown() ? + "This ring enhances the wearer's precision and aim, which will " + + "make all projectile weapons hit harder and last longer. " + + "A cursed ring will have the opposite effect.": + super.desc(); + } + + public class Aim extends RingBuff { + } +} diff --git a/src/com/shatteredpixel/shatteredpixeldungeon/items/rings/RingOfTenacity.java b/src/com/shatteredpixel/shatteredpixeldungeon/items/rings/RingOfTenacity.java new file mode 100644 index 000000000..193cc79c5 --- /dev/null +++ b/src/com/shatteredpixel/shatteredpixeldungeon/items/rings/RingOfTenacity.java @@ -0,0 +1,29 @@ +package com.shatteredpixel.shatteredpixeldungeon.items.rings; + +/** + * Created by debenhame on 10/09/2014. + */ +public class RingOfTenacity extends Ring { + //TODO: tie this into game logic + { + name = "Ring of Tenacity"; + } + + @Override + protected RingBuff buff( ) { + return new Tenacity(); + } + + @Override + public String desc() { + return isKnown() ? + "When worn, this ring will allow the wearer to resist normally mortal strikes. " + + "The weaker the user becomes, the more resistant they will be to physical damage. " + + "A cursed ring will instead make it easier for the wearer to be executed." : + super.desc(); + } + + public class Tenacity extends RingBuff { + } +} + diff --git a/src/com/shatteredpixel/shatteredpixeldungeon/items/rings/RingOfWealth.java b/src/com/shatteredpixel/shatteredpixeldungeon/items/rings/RingOfWealth.java new file mode 100644 index 000000000..707c5d279 --- /dev/null +++ b/src/com/shatteredpixel/shatteredpixeldungeon/items/rings/RingOfWealth.java @@ -0,0 +1,28 @@ +package com.shatteredpixel.shatteredpixeldungeon.items.rings; + +/** + * Created by debenhame on 10/09/2014. + */ +public class RingOfWealth extends Ring { + //TODO: tie this into game logic + { + name = "Ring of Wealth"; + } + + @Override + protected RingBuff buff( ) { + return new Wealth(); + } + + @Override + public String desc() { + return isKnown() ? + "It's not clear what this ring does exactly, good luck may influence " + + "the life an an adventurer in many subtle ways. " + + "Naturally a cursed ring would give bad luck." : + super.desc(); + } + + public class Wealth extends RingBuff { + } +}