v0.9.3: added visible buffs for talent cooldowns

This commit is contained in:
Evan Debenham 2021-05-19 15:37:07 -04:00
parent 77b023d5f6
commit ff80adeb30
7 changed files with 77 additions and 38 deletions

Binary file not shown.

Before

Width:  |  Height:  |  Size: 1.3 KiB

After

Width:  |  Height:  |  Size: 1.3 KiB

Binary file not shown.

Before

Width:  |  Height:  |  Size: 2.6 KiB

After

Width:  |  Height:  |  Size: 2.6 KiB

View File

@ -445,6 +445,12 @@ actors.hero.herosubclass.warden_short_desc=The _Warden_ can see through tall gra
actors.hero.herosubclass.warden_desc=The Warden has a strong connection to nature which grants her a variety of bonus effects relating to grass and plants. She is able to see through tall and furrowed grass as if it were empty space.\n\nThe warden causes grass to sprout up around any seed she throws or plants, and gains special effects when trampling plants. These special effects replace the regular plant effects, meaning that no plant is harmful for her to step on.
##talents
actors.hero.talent$improvisedprojectilecooldown.name=improvised projectiles cooldown
actors.hero.talent$improvisedprojectilecooldown.desc=You have recently used this talent, and must wait before using it again.\n\nTurns left: %s.
actors.hero.talent$rejuvenatingstepscooldown.name=rejuvenating steps cooldown
actors.hero.talent$rejuvenatingstepscooldown.desc=You have recently used this talent, and must wait before using it again.\n\nTurns left: %s.
actors.hero.talent$seershotcooldown.name=seer shot cooldown
actors.hero.talent$seershotcooldown.desc=You have recently used this talent, and must wait before using it again.\n\nTurns left: %s.
#warrior
actors.hero.talent.hearty_meal.title=hearty meal

View File

@ -23,6 +23,7 @@ package com.shatteredpixel.shatteredpixeldungeon.actors.buffs;
import com.shatteredpixel.shatteredpixeldungeon.messages.Messages;
import com.shatteredpixel.shatteredpixeldungeon.ui.BuffIndicator;
import com.watabou.noosa.Image;
public class Slow extends FlavourBuff {
@ -35,7 +36,12 @@ public class Slow extends FlavourBuff {
@Override
public int icon() {
return BuffIndicator.SLOW;
return BuffIndicator.TIME;
}
@Override
public void tintIcon(Image icon) {
icon.hardlight(1f, 0.33f, 0.2f);
}
@Override

View File

@ -32,6 +32,7 @@ import com.shatteredpixel.shatteredpixeldungeon.actors.buffs.EnhancedRings;
import com.shatteredpixel.shatteredpixeldungeon.actors.buffs.FlavourBuff;
import com.shatteredpixel.shatteredpixeldungeon.actors.buffs.Haste;
import com.shatteredpixel.shatteredpixeldungeon.actors.buffs.Recharging;
import com.shatteredpixel.shatteredpixeldungeon.actors.buffs.RevealedArea;
import com.shatteredpixel.shatteredpixeldungeon.actors.buffs.Roots;
import com.shatteredpixel.shatteredpixeldungeon.actors.buffs.WandEmpower;
import com.shatteredpixel.shatteredpixeldungeon.actors.hero.abilities.ArmorAbility;
@ -56,6 +57,8 @@ import com.shatteredpixel.shatteredpixeldungeon.levels.Level;
import com.shatteredpixel.shatteredpixeldungeon.levels.Terrain;
import com.shatteredpixel.shatteredpixeldungeon.messages.Messages;
import com.shatteredpixel.shatteredpixeldungeon.scenes.GameScene;
import com.shatteredpixel.shatteredpixeldungeon.ui.BuffIndicator;
import com.watabou.noosa.Image;
import com.watabou.noosa.audio.Sample;
import com.watabou.noosa.particles.Emitter;
import com.watabou.utils.Bundle;
@ -141,14 +144,32 @@ public enum Talent {
//Ratmogrify T4
RATSISTANCE(125, 4), RATLOMACY(126, 4), RATFORCEMENTS(127, 4);
public static class ImprovisedProjectileCooldown extends FlavourBuff{};
public static class ImprovisedProjectileCooldown extends FlavourBuff{
public int icon() { return BuffIndicator.TIME; }
public void tintIcon(Image icon) { icon.hardlight(0.15f, 0.2f, 0.5f); }
public float iconFadePercent() { return Math.max(0, visualcooldown() / 50); }
public String toString() { return Messages.get(this, "name"); }
public String desc() { return Messages.get(this, "desc", dispTurns(visualcooldown())); }
};
public static class LethalMomentumTracker extends FlavourBuff{};
public static class WandPreservationCounter extends CounterBuff{};
public static class EmpoweredStrikeTracker extends FlavourBuff{};
public static class BountyHunterTracker extends FlavourBuff{};
public static class RejuvenatingStepsCooldown extends FlavourBuff{};
public static class RejuvenatingStepsCooldown extends FlavourBuff{
public int icon() { return BuffIndicator.TIME; }
public void tintIcon(Image icon) { icon.hardlight(0f, 0.35f, 0.15f); }
public float iconFadePercent() { return Math.max(0, visualcooldown() / (15 - 5*Dungeon.hero.pointsInTalent(REJUVENATING_STEPS))); }
public String toString() { return Messages.get(this, "name"); }
public String desc() { return Messages.get(this, "desc", dispTurns(visualcooldown())); }
};
public static class RejuvenatingStepsFurrow extends CounterBuff{};
public static class SeerShotCooldown extends FlavourBuff{};
public static class SeerShotCooldown extends FlavourBuff{
public int icon() { return target.buff(RevealedArea.class) != null ? BuffIndicator.NONE : BuffIndicator.TIME; }
public void tintIcon(Image icon) { icon.hardlight(0.7f, 0.4f, 0.7f); }
public float iconFadePercent() { return Math.max(0, visualcooldown() / 20); }
public String toString() { return Messages.get(this, "name"); }
public String desc() { return Messages.get(this, "desc", dispTurns(visualcooldown())); }
};
public static class SpiritBladesTracker extends FlavourBuff{};
int icon;

View File

@ -31,6 +31,7 @@ import com.shatteredpixel.shatteredpixeldungeon.messages.Messages;
import com.shatteredpixel.shatteredpixeldungeon.sprites.CharSprite;
import com.shatteredpixel.shatteredpixeldungeon.sprites.ItemSpriteSheet;
import com.shatteredpixel.shatteredpixeldungeon.ui.BuffIndicator;
import com.watabou.noosa.Image;
import com.watabou.noosa.particles.Emitter;
import com.watabou.utils.Bundle;
@ -75,7 +76,12 @@ public class Swiftthistle extends Plant {
@Override
public int icon() {
return BuffIndicator.SLOW;
return BuffIndicator.TIME;
}
@Override
public void tintIcon(Image icon) {
icon.hardlight(1f, 1f, 0);
}
@Override

View File

@ -52,7 +52,7 @@ public class BuffIndicator extends Component {
public static final int PARALYSIS = 4;
public static final int HUNGER = 5;
public static final int STARVATION = 6;
public static final int SLOW = 7;
public static final int TIME = 7;
public static final int OOZE = 8;
public static final int AMOK = 9;
public static final int TERROR = 10;