From a2c4e2474b93d94fdae594d5f14891da0a0a27a7 Mon Sep 17 00:00:00 2001 From: Evan Debenham Date: Thu, 21 May 2015 01:02:23 -0400 Subject: [PATCH] v0.3.0: buff descriptions round 4 (almost done) --- .../shatteredpixeldungeon/actors/buffs/Bless.java | 12 ++++++++++++ .../shatteredpixeldungeon/actors/buffs/Buff.java | 5 ++++- .../shatteredpixeldungeon/actors/buffs/Drowsy.java | 9 +++++++++ .../shatteredpixeldungeon/actors/buffs/Frost.java | 12 +++++++++++- .../shatteredpixeldungeon/actors/buffs/Roots.java | 9 +++++++++ .../shatteredpixeldungeon/actors/buffs/Terror.java | 12 +++++++++++- .../items/artifacts/CapeOfThorns.java | 10 ++++++++++ .../items/artifacts/TalismanOfForesight.java | 5 +++++ 8 files changed, 71 insertions(+), 3 deletions(-) diff --git a/src/com/shatteredpixel/shatteredpixeldungeon/actors/buffs/Bless.java b/src/com/shatteredpixel/shatteredpixeldungeon/actors/buffs/Bless.java index 44cd8e6ed..e3d6c338f 100644 --- a/src/com/shatteredpixel/shatteredpixeldungeon/actors/buffs/Bless.java +++ b/src/com/shatteredpixel/shatteredpixeldungeon/actors/buffs/Bless.java @@ -8,6 +8,10 @@ import com.shatteredpixel.shatteredpixeldungeon.ui.BuffIndicator; */ public class Bless extends FlavourBuff { + { + type = buffType.POSITIVE; + } + @Override public int icon() { //TODO: add icon @@ -19,4 +23,12 @@ public class Bless extends FlavourBuff { return "Blessed"; } + @Override + public String desc() { + return "A great burst of focus, some say it is inspired by the gods.\n" + + "\n" + + "Blessing significantly increases accuracy and evasion, making the blessed much more effective in combat.\n" + + "\n" + + "This blessing will last for " + dispTurns() + "."; + } } diff --git a/src/com/shatteredpixel/shatteredpixeldungeon/actors/buffs/Buff.java b/src/com/shatteredpixel/shatteredpixeldungeon/actors/buffs/Buff.java index 574d5ef98..71dc20085 100644 --- a/src/com/shatteredpixel/shatteredpixeldungeon/actors/buffs/Buff.java +++ b/src/com/shatteredpixel/shatteredpixeldungeon/actors/buffs/Buff.java @@ -85,6 +85,7 @@ public class Buff extends Actor { return input == 1 ? "1 more turn" : new DecimalFormat("#.##").format(input) + " more turns"; } + //creates a fresh instance of the buff and attaches that, this allows duplication. public static T append( Char target, Class buffClass ) { try { T buff = buffClass.newInstance(); @@ -101,6 +102,7 @@ public class Buff extends Actor { return buff; } + //same as append, but prevents duplication. public static T affect( Char target, Class buffClass ) { T buff = target.buff( buffClass ); if (buff != null) { @@ -115,7 +117,8 @@ public class Buff extends Actor { buff.spend( duration ); return buff; } - + + //postpones an already active buff, or creates & attaches a new buff and delays that. public static T prolong( Char target, Class buffClass, float duration ) { T buff = affect( target, buffClass ); buff.postpone( duration ); diff --git a/src/com/shatteredpixel/shatteredpixeldungeon/actors/buffs/Drowsy.java b/src/com/shatteredpixel/shatteredpixeldungeon/actors/buffs/Drowsy.java index 218753889..69a5eca3f 100644 --- a/src/com/shatteredpixel/shatteredpixeldungeon/actors/buffs/Drowsy.java +++ b/src/com/shatteredpixel/shatteredpixeldungeon/actors/buffs/Drowsy.java @@ -53,4 +53,13 @@ public class Drowsy extends Buff { public String toString() { return "Drowsy"; } + + @Override + public String desc() { + return "A magical force is making it difficult to stay awake.\n" + + "\n" + + "The hero can resist drowsiness by taking damage or by being at full health.\n" + + "\n" + + "After " + dispTurns(cooldown()+1) + ", the target will fall into a deep magical sleep."; + } } diff --git a/src/com/shatteredpixel/shatteredpixeldungeon/actors/buffs/Frost.java b/src/com/shatteredpixel/shatteredpixeldungeon/actors/buffs/Frost.java index 37b6ac3cd..4db651b97 100644 --- a/src/com/shatteredpixel/shatteredpixeldungeon/actors/buffs/Frost.java +++ b/src/com/shatteredpixel/shatteredpixeldungeon/actors/buffs/Frost.java @@ -107,7 +107,17 @@ public class Frost extends FlavourBuff { public String toString() { return "Frozen"; } - + + @Override + public String desc() { + return "Not to be confused with freezing solid, this more benign freezing simply encases the target in ice.\n" + + "\n" + + "Freezing acts similarly to paralysis, making it impossible for the target to act. " + + "Unlike paralysis, freezing is immediately cancelled if the target takes damage, as the ice will shatter.\n" + + "\n" + + "The freeze will last for " + dispTurns() + ", or until the target takes damage.\n"; + } + public static float duration( Char ch ) { Resistance r = ch.buff( Resistance.class ); return r != null ? r.durationFactor() * DURATION : DURATION; diff --git a/src/com/shatteredpixel/shatteredpixeldungeon/actors/buffs/Roots.java b/src/com/shatteredpixel/shatteredpixeldungeon/actors/buffs/Roots.java index a79e3f536..a7ce9bb91 100644 --- a/src/com/shatteredpixel/shatteredpixeldungeon/actors/buffs/Roots.java +++ b/src/com/shatteredpixel/shatteredpixeldungeon/actors/buffs/Roots.java @@ -51,4 +51,13 @@ public class Roots extends FlavourBuff { public String toString() { return "Rooted"; } + + @Override + public String desc() { + return "Roots(magical or natural) grab at the feet, forcing them down to the ground.\n" + + "\n" + + "Roots lock a target in place, making it impossible for them to move, but other actions are not affected.\n" + + "\n" + + "The roots will last for " + dispTurns() + "."; + } } diff --git a/src/com/shatteredpixel/shatteredpixeldungeon/actors/buffs/Terror.java b/src/com/shatteredpixel/shatteredpixeldungeon/actors/buffs/Terror.java index 1e8f797f8..797920d5e 100644 --- a/src/com/shatteredpixel/shatteredpixeldungeon/actors/buffs/Terror.java +++ b/src/com/shatteredpixel/shatteredpixeldungeon/actors/buffs/Terror.java @@ -54,7 +54,17 @@ public class Terror extends FlavourBuff { public String toString() { return "Terrified"; } - + + @Override + public String desc() { + return "Terror is manipulative magic which forces its target into an uncontrollable panic.\n" + + "\n" + + "Terrified characters are forced to run away from their opponent, trying to put as many doors and " + + "walls between them as possible. The shock of pain is enough to break this effect, however.\n" + + "\n" + + "This terror will last for " + dispTurns() + ", or until the target takes damage."; + } + public static void recover( Char target ) { Terror terror = target.buff( Terror.class ); if (terror != null && terror.cooldown() < DURATION) { diff --git a/src/com/shatteredpixel/shatteredpixeldungeon/items/artifacts/CapeOfThorns.java b/src/com/shatteredpixel/shatteredpixeldungeon/items/artifacts/CapeOfThorns.java index 91e614363..583004efd 100644 --- a/src/com/shatteredpixel/shatteredpixeldungeon/items/artifacts/CapeOfThorns.java +++ b/src/com/shatteredpixel/shatteredpixeldungeon/items/artifacts/CapeOfThorns.java @@ -103,6 +103,16 @@ public class CapeOfThorns extends Artifact { return "Thorns"; } + @Override + public String desc() { + return "Your cape is radiating energy, surrounding you in a field of deflective force!\n" + + "\n" + + "All damage you receive is reduced while the thorns effect is active. Additionally, " + + "if the attacker is next to you, the reduced amount is deflected back at the attacker.\n" + + "\n" + + "Your cape will continue radiating energy for " + dispTurns(cooldown) + "."; + } + @Override public int icon() { if (cooldown == 0) diff --git a/src/com/shatteredpixel/shatteredpixeldungeon/items/artifacts/TalismanOfForesight.java b/src/com/shatteredpixel/shatteredpixeldungeon/items/artifacts/TalismanOfForesight.java index 7e73b6a1c..6b78e3b4c 100644 --- a/src/com/shatteredpixel/shatteredpixeldungeon/items/artifacts/TalismanOfForesight.java +++ b/src/com/shatteredpixel/shatteredpixeldungeon/items/artifacts/TalismanOfForesight.java @@ -185,6 +185,11 @@ public class TalismanOfForesight extends Artifact { return "Foresight"; } + @Override + public String desc() { + return "You feel very nervous, as if there is nearby unseen danger."; + } + @Override public int icon() { if (warn == 0)