From 222031cb9796597600f9458e2f055a003fda2ef0 Mon Sep 17 00:00:00 2001 From: Evan Debenham Date: Thu, 12 Aug 2021 14:15:39 -0400 Subject: [PATCH] v0.9.4: added proper icons for abilities and subclasses --- .../src/main/assets/interfaces/hero_icons.png | Bin 0 -> 1224 bytes .../main/assets/interfaces/talent_icons.png | Bin 5143 -> 5156 bytes .../shatteredpixeldungeon/Assets.java | 2 + .../actors/hero/HeroSubClass.java | 65 ++++++------------ .../actors/hero/abilities/ArmorAbility.java | 5 ++ .../actors/hero/abilities/Ratmogrify.java | 6 ++ .../hero/abilities/huntress/NaturesPower.java | 6 ++ .../abilities/huntress/SpectralBlades.java | 6 ++ .../hero/abilities/huntress/SpiritHawk.java | 6 ++ .../hero/abilities/mage/ElementalBlast.java | 6 ++ .../hero/abilities/mage/WarpBeacon.java | 6 ++ .../actors/hero/abilities/mage/WildMagic.java | 6 ++ .../hero/abilities/rogue/DeathMark.java | 6 ++ .../hero/abilities/rogue/ShadowClone.java | 6 ++ .../hero/abilities/rogue/SmokeBomb.java | 6 ++ .../actors/hero/abilities/warrior/Endure.java | 6 ++ .../hero/abilities/warrior/HeroicLeap.java | 6 ++ .../hero/abilities/warrior/Shockwave.java | 6 ++ .../shatteredpixeldungeon/ui/HeroIcon.java | 59 ++++++++++++++++ .../windows/WndChooseSubclass.java | 3 +- .../windows/WndInfoArmorAbility.java | 3 +- .../windows/WndInfoSubclass.java | 3 +- 22 files changed, 170 insertions(+), 48 deletions(-) create mode 100644 core/src/main/assets/interfaces/hero_icons.png create mode 100644 core/src/main/java/com/shatteredpixel/shatteredpixeldungeon/ui/HeroIcon.java diff --git a/core/src/main/assets/interfaces/hero_icons.png b/core/src/main/assets/interfaces/hero_icons.png new file mode 100644 index 0000000000000000000000000000000000000000..38bd3faca813ebc2a5bba7d6e6883ddbd0e75a62 GIT binary patch literal 1224 zcmV;(1ULJMP)+yv%-rb7N0OrvCu{|D)@>asU7T z0d!JMQvg8b*k%9#1KmkPK~#7F#Fd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z=76ao(aUnFe2hvmo72v;yM*!P-RnD+pew~LbN5tW;Oh)D2}~tw2Q*t&(>{sKUFaA0 z#^f%k#w5w_gvc_$iv)Pu4}1gaP5G2Um8j*{zb0Jl+o1?6v0syduoT}2$j5RUXmok)FpVNn3jeest{^+r*&+bAg?}IXK!}68& z{&tFVWn|3nQ{U{(b*ze?xNde?8uy9Q>^q zg4@yf7%-A=q~5@oD^;+29V{c73KrUlNHV_c3MMpiC8>veXEa#AxUcAztr&{!w=No4 zQNce`P@qbV&C3B^D`&MYz`#RlSrGS?*!Ra?GBW!$nE(4tD-0Raw?p)v4Xym}AfPYK ztj9XMbcOXm3d(YzYk||nb5Zw1I|PZlOJ(zOHHlbrGR>2r0!oWqiYH|B#leAPhHveZ zfBYViql_u=sjPuy^}`IMY$55(M!OZ?s*lB9S1Ee8(9gDkaGc@S)$v(Z=8BZV3SX|R=Hh=wD_kz4S zV3j`?_ewIlo*+9UC}4lYu(c)5;$iA*AVGB|1AmNi+%28iGYB_R93Ku%C5&36; zUrjmfMPL>%(yXCWZG^OD42Ga)L`KHjKg6QSDd^ZE@Jx~MH(&;VtxmkhmYWH&wf%*r z-)O9WGT=l6(pHuk@{h_?J|(X`GpvbQk)2k`%eJF;QYhkjiMzxXriGfxTMUo>JZlyh zLS|yOn2RSS7q(L O1#AvF{8e~>7V|&$8A%}k diff --git a/core/src/main/java/com/shatteredpixel/shatteredpixeldungeon/Assets.java b/core/src/main/java/com/shatteredpixel/shatteredpixeldungeon/Assets.java index 7fb8b46bf..2923325c0 100644 --- a/core/src/main/java/com/shatteredpixel/shatteredpixeldungeon/Assets.java +++ b/core/src/main/java/com/shatteredpixel/shatteredpixeldungeon/Assets.java @@ -94,6 +94,8 @@ public class Assets { public static final String TALENT_ICONS = "interfaces/talent_icons.png"; public static final String TALENT_BUTTON = "interfaces/talent_button.png"; + + public static final String HERO_ICONS = "interfaces/hero_icons.png"; } //these points to resource bundles, not raw asset files diff --git a/core/src/main/java/com/shatteredpixel/shatteredpixeldungeon/actors/hero/HeroSubClass.java b/core/src/main/java/com/shatteredpixel/shatteredpixeldungeon/actors/hero/HeroSubClass.java index 79d29daf0..d13d6e336 100644 --- a/core/src/main/java/com/shatteredpixel/shatteredpixeldungeon/actors/hero/HeroSubClass.java +++ b/core/src/main/java/com/shatteredpixel/shatteredpixeldungeon/actors/hero/HeroSubClass.java @@ -21,33 +21,34 @@ package com.shatteredpixel.shatteredpixeldungeon.actors.hero; -import com.shatteredpixel.shatteredpixeldungeon.Assets; import com.shatteredpixel.shatteredpixeldungeon.Dungeon; -import com.shatteredpixel.shatteredpixeldungeon.actors.buffs.Combo; -import com.shatteredpixel.shatteredpixeldungeon.actors.buffs.Fury; import com.shatteredpixel.shatteredpixeldungeon.items.weapon.melee.MagesStaff; import com.shatteredpixel.shatteredpixeldungeon.messages.Messages; import com.shatteredpixel.shatteredpixeldungeon.scenes.GameScene; -import com.shatteredpixel.shatteredpixeldungeon.ui.BuffIcon; -import com.shatteredpixel.shatteredpixeldungeon.ui.BuffIndicator; +import com.shatteredpixel.shatteredpixeldungeon.ui.HeroIcon; import com.watabou.noosa.Game; -import com.watabou.noosa.Image; public enum HeroSubClass { - NONE, + NONE(HeroIcon.NONE), + + BERSERKER(HeroIcon.BERSERKER), + GLADIATOR(HeroIcon.GLADIATOR), + + BATTLEMAGE(HeroIcon.BATTLEMAGE), + WARLOCK(HeroIcon.WARLOCK), - GLADIATOR, - BERSERKER, + ASSASSIN(HeroIcon.ASSASSIN), + FREERUNNER(HeroIcon.FREERUNNER), - WARLOCK, - BATTLEMAGE, - - ASSASSIN, - FREERUNNER, - - SNIPER, - WARDEN; + SNIPER(HeroIcon.SNIPER), + WARDEN(HeroIcon.WARDEN); + + int icon; + + HeroSubClass(int icon){ + this.icon = icon; + } public String title() { return Messages.get(this, name()); @@ -74,34 +75,8 @@ public enum HeroSubClass { } } - public Image icon(){ - switch (this){ - case GLADIATOR: default: - return new BuffIcon(BuffIndicator.COMBO, true); - case BERSERKER: - return new BuffIcon(BuffIndicator.FURY, true); - - case WARLOCK: - return new BuffIcon(BuffIndicator.CORRUPT, true); - case BATTLEMAGE: - Image im = new BuffIcon(BuffIndicator.UPGRADE, true); - im.hardlight(1f, 1f, 0f); - return im; - - case ASSASSIN: - im = new BuffIcon(BuffIndicator.PREPARATION, true); - im.hardlight(1f, 0f, 0f); - return im; - case FREERUNNER: - im = new BuffIcon(BuffIndicator.MOMENTUM, true); - im.hardlight(1f, 1f, 0f); - return im; - - case SNIPER: - return new BuffIcon(BuffIndicator.MARK, true); - case WARDEN: - return new BuffIcon(BuffIndicator.BARKSKIN, true); - } + public int icon(){ + return icon; } } diff --git a/core/src/main/java/com/shatteredpixel/shatteredpixeldungeon/actors/hero/abilities/ArmorAbility.java b/core/src/main/java/com/shatteredpixel/shatteredpixeldungeon/actors/hero/abilities/ArmorAbility.java index 4c9452ff8..d5efd69a1 100644 --- a/core/src/main/java/com/shatteredpixel/shatteredpixeldungeon/actors/hero/abilities/ArmorAbility.java +++ b/core/src/main/java/com/shatteredpixel/shatteredpixeldungeon/actors/hero/abilities/ArmorAbility.java @@ -27,6 +27,7 @@ import com.shatteredpixel.shatteredpixeldungeon.items.armor.ClassArmor; import com.shatteredpixel.shatteredpixeldungeon.messages.Messages; import com.shatteredpixel.shatteredpixeldungeon.scenes.CellSelector; import com.shatteredpixel.shatteredpixeldungeon.scenes.GameScene; +import com.shatteredpixel.shatteredpixeldungeon.ui.HeroIcon; import com.watabou.utils.Bundlable; import com.watabou.utils.Bundle; @@ -84,6 +85,10 @@ public abstract class ArmorAbility implements Bundlable { return Messages.get(this, "desc") + "\n\n" + Messages.get(this, "cost", (int)baseChargeUse); } + public int icon(){ + return HeroIcon.NONE; + } + public abstract Talent[] talents(); @Override diff --git a/core/src/main/java/com/shatteredpixel/shatteredpixeldungeon/actors/hero/abilities/Ratmogrify.java b/core/src/main/java/com/shatteredpixel/shatteredpixeldungeon/actors/hero/abilities/Ratmogrify.java index 5f365835b..3d6a6d80f 100644 --- a/core/src/main/java/com/shatteredpixel/shatteredpixeldungeon/actors/hero/abilities/Ratmogrify.java +++ b/core/src/main/java/com/shatteredpixel/shatteredpixeldungeon/actors/hero/abilities/Ratmogrify.java @@ -19,6 +19,7 @@ import com.shatteredpixel.shatteredpixeldungeon.items.scrolls.ScrollOfTeleportat import com.shatteredpixel.shatteredpixeldungeon.messages.Messages; import com.shatteredpixel.shatteredpixeldungeon.scenes.GameScene; import com.shatteredpixel.shatteredpixeldungeon.sprites.RatSprite; +import com.shatteredpixel.shatteredpixeldungeon.ui.HeroIcon; import com.shatteredpixel.shatteredpixeldungeon.ui.TargetHealthIndicator; import com.shatteredpixel.shatteredpixeldungeon.utils.GLog; import com.watabou.noosa.audio.Sample; @@ -124,6 +125,11 @@ public class Ratmogrify extends ArmorAbility { } + @Override + public int icon() { + return HeroIcon.RATMOGRIFY; + } + @Override public Talent[] talents() { return new Talent[]{ Talent.RATSISTANCE, Talent.RATLOMACY, Talent.RATFORCEMENTS, Talent.HEROIC_ENERGY}; diff --git a/core/src/main/java/com/shatteredpixel/shatteredpixeldungeon/actors/hero/abilities/huntress/NaturesPower.java b/core/src/main/java/com/shatteredpixel/shatteredpixeldungeon/actors/hero/abilities/huntress/NaturesPower.java index 03abe0a70..58559586f 100644 --- a/core/src/main/java/com/shatteredpixel/shatteredpixeldungeon/actors/hero/abilities/huntress/NaturesPower.java +++ b/core/src/main/java/com/shatteredpixel/shatteredpixeldungeon/actors/hero/abilities/huntress/NaturesPower.java @@ -33,6 +33,7 @@ import com.shatteredpixel.shatteredpixeldungeon.effects.particles.LeafParticle; import com.shatteredpixel.shatteredpixeldungeon.items.armor.ClassArmor; import com.shatteredpixel.shatteredpixeldungeon.messages.Messages; import com.shatteredpixel.shatteredpixeldungeon.ui.BuffIndicator; +import com.shatteredpixel.shatteredpixeldungeon.ui.HeroIcon; import com.watabou.noosa.audio.Sample; public class NaturesPower extends ArmorAbility { @@ -57,6 +58,11 @@ public class NaturesPower extends ArmorAbility { } + @Override + public int icon() { + return HeroIcon.NATURES_POWER; + } + @Override public Talent[] talents() { return new Talent[]{Talent.GROWING_POWER, Talent.NATURES_WRATH, Talent.WILD_MOMENTUM, Talent.HEROIC_ENERGY}; diff --git a/core/src/main/java/com/shatteredpixel/shatteredpixeldungeon/actors/hero/abilities/huntress/SpectralBlades.java b/core/src/main/java/com/shatteredpixel/shatteredpixeldungeon/actors/hero/abilities/huntress/SpectralBlades.java index 6f09460e4..7f5d17e4a 100644 --- a/core/src/main/java/com/shatteredpixel/shatteredpixeldungeon/actors/hero/abilities/huntress/SpectralBlades.java +++ b/core/src/main/java/com/shatteredpixel/shatteredpixeldungeon/actors/hero/abilities/huntress/SpectralBlades.java @@ -36,6 +36,7 @@ import com.shatteredpixel.shatteredpixeldungeon.mechanics.Ballistica; import com.shatteredpixel.shatteredpixeldungeon.mechanics.ConeAOE; import com.shatteredpixel.shatteredpixeldungeon.messages.Messages; import com.shatteredpixel.shatteredpixeldungeon.sprites.MissileSprite; +import com.shatteredpixel.shatteredpixeldungeon.ui.HeroIcon; import com.shatteredpixel.shatteredpixeldungeon.utils.GLog; import com.watabou.utils.Callback; @@ -154,6 +155,11 @@ public class SpectralBlades extends ArmorAbility { return null; } + @Override + public int icon() { + return HeroIcon.SPECTRAL_BLADES; + } + @Override public Talent[] talents() { return new Talent[]{Talent.FAN_OF_BLADES, Talent.PROJECTING_BLADES, Talent.SPIRIT_BLADES, Talent.HEROIC_ENERGY}; diff --git a/core/src/main/java/com/shatteredpixel/shatteredpixeldungeon/actors/hero/abilities/huntress/SpiritHawk.java b/core/src/main/java/com/shatteredpixel/shatteredpixeldungeon/actors/hero/abilities/huntress/SpiritHawk.java index 2ba160c4e..35b6e40f7 100644 --- a/core/src/main/java/com/shatteredpixel/shatteredpixeldungeon/actors/hero/abilities/huntress/SpiritHawk.java +++ b/core/src/main/java/com/shatteredpixel/shatteredpixeldungeon/actors/hero/abilities/huntress/SpiritHawk.java @@ -46,6 +46,7 @@ import com.shatteredpixel.shatteredpixeldungeon.messages.Messages; import com.shatteredpixel.shatteredpixeldungeon.scenes.GameScene; import com.shatteredpixel.shatteredpixeldungeon.sprites.BatSprite; import com.shatteredpixel.shatteredpixeldungeon.sprites.MobSprite; +import com.shatteredpixel.shatteredpixeldungeon.ui.HeroIcon; import com.shatteredpixel.shatteredpixeldungeon.utils.GLog; import com.watabou.noosa.TextureFilm; import com.watabou.utils.Bundle; @@ -124,6 +125,11 @@ public class SpiritHawk extends ArmorAbility { } + @Override + public int icon() { + return HeroIcon.SPIRIT_HAWK; + } + @Override public Talent[] talents() { return new Talent[]{Talent.EAGLE_EYE, Talent.GO_FOR_THE_EYES, Talent.SWIFT_SPIRIT, Talent.HEROIC_ENERGY}; diff --git a/core/src/main/java/com/shatteredpixel/shatteredpixeldungeon/actors/hero/abilities/mage/ElementalBlast.java b/core/src/main/java/com/shatteredpixel/shatteredpixeldungeon/actors/hero/abilities/mage/ElementalBlast.java index e2751a5d0..5258c8b23 100644 --- a/core/src/main/java/com/shatteredpixel/shatteredpixeldungeon/actors/hero/abilities/mage/ElementalBlast.java +++ b/core/src/main/java/com/shatteredpixel/shatteredpixeldungeon/actors/hero/abilities/mage/ElementalBlast.java @@ -74,6 +74,7 @@ import com.shatteredpixel.shatteredpixeldungeon.mechanics.ConeAOE; import com.shatteredpixel.shatteredpixeldungeon.messages.Messages; import com.shatteredpixel.shatteredpixeldungeon.scenes.GameScene; import com.shatteredpixel.shatteredpixeldungeon.sprites.CharSprite; +import com.shatteredpixel.shatteredpixeldungeon.ui.HeroIcon; import com.watabou.noosa.Game; import com.watabou.noosa.audio.Sample; import com.watabou.utils.Callback; @@ -426,6 +427,11 @@ public class ElementalBlast extends ArmorAbility { return desc; } + @Override + public int icon() { + return HeroIcon.ELEMENTAL_BLAST; + } + @Override public Talent[] talents() { return new Talent[]{Talent.BLAST_RADIUS, Talent.ELEMENTAL_POWER, Talent.REACTIVE_BARRIER, Talent.HEROIC_ENERGY}; diff --git a/core/src/main/java/com/shatteredpixel/shatteredpixeldungeon/actors/hero/abilities/mage/WarpBeacon.java b/core/src/main/java/com/shatteredpixel/shatteredpixeldungeon/actors/hero/abilities/mage/WarpBeacon.java index 449e17594..bdc051628 100644 --- a/core/src/main/java/com/shatteredpixel/shatteredpixeldungeon/actors/hero/abilities/mage/WarpBeacon.java +++ b/core/src/main/java/com/shatteredpixel/shatteredpixeldungeon/actors/hero/abilities/mage/WarpBeacon.java @@ -41,6 +41,7 @@ import com.shatteredpixel.shatteredpixeldungeon.messages.Messages; import com.shatteredpixel.shatteredpixeldungeon.plants.Swiftthistle; import com.shatteredpixel.shatteredpixeldungeon.scenes.GameScene; import com.shatteredpixel.shatteredpixeldungeon.scenes.InterlevelScene; +import com.shatteredpixel.shatteredpixeldungeon.ui.HeroIcon; import com.shatteredpixel.shatteredpixeldungeon.utils.BArray; import com.shatteredpixel.shatteredpixeldungeon.utils.GLog; import com.shatteredpixel.shatteredpixeldungeon.windows.WndOptions; @@ -248,6 +249,11 @@ public class WarpBeacon extends ArmorAbility { } } + @Override + public int icon() { + return HeroIcon.WARP_BEACON; + } + @Override public Talent[] talents() { return new Talent[]{Talent.TELEFRAG, Talent.REMOTE_BEACON, Talent.LONGRANGE_WARP, Talent.HEROIC_ENERGY}; diff --git a/core/src/main/java/com/shatteredpixel/shatteredpixeldungeon/actors/hero/abilities/mage/WildMagic.java b/core/src/main/java/com/shatteredpixel/shatteredpixeldungeon/actors/hero/abilities/mage/WildMagic.java index 64f792176..4dc1b880a 100644 --- a/core/src/main/java/com/shatteredpixel/shatteredpixeldungeon/actors/hero/abilities/mage/WildMagic.java +++ b/core/src/main/java/com/shatteredpixel/shatteredpixeldungeon/actors/hero/abilities/mage/WildMagic.java @@ -35,6 +35,7 @@ import com.shatteredpixel.shatteredpixeldungeon.items.wands.CursedWand; import com.shatteredpixel.shatteredpixeldungeon.items.wands.Wand; import com.shatteredpixel.shatteredpixeldungeon.mechanics.Ballistica; import com.shatteredpixel.shatteredpixeldungeon.messages.Messages; +import com.shatteredpixel.shatteredpixeldungeon.ui.HeroIcon; import com.shatteredpixel.shatteredpixeldungeon.utils.GLog; import com.watabou.utils.Callback; import com.watabou.utils.Random; @@ -169,6 +170,11 @@ public class WildMagic extends ArmorAbility { } } + @Override + public int icon() { + return HeroIcon.WILD_MAGIC; + } + @Override public Talent[] talents() { return new Talent[]{Talent.WILD_POWER, Talent.FIRE_EVERYTHING, Talent.CONSERVED_MAGIC, Talent.HEROIC_ENERGY}; diff --git a/core/src/main/java/com/shatteredpixel/shatteredpixeldungeon/actors/hero/abilities/rogue/DeathMark.java b/core/src/main/java/com/shatteredpixel/shatteredpixeldungeon/actors/hero/abilities/rogue/DeathMark.java index 2a3192fc1..ab34762f9 100644 --- a/core/src/main/java/com/shatteredpixel/shatteredpixeldungeon/actors/hero/abilities/rogue/DeathMark.java +++ b/core/src/main/java/com/shatteredpixel/shatteredpixeldungeon/actors/hero/abilities/rogue/DeathMark.java @@ -36,6 +36,7 @@ import com.shatteredpixel.shatteredpixeldungeon.actors.hero.abilities.ArmorAbili import com.shatteredpixel.shatteredpixeldungeon.items.armor.ClassArmor; import com.shatteredpixel.shatteredpixeldungeon.messages.Messages; import com.shatteredpixel.shatteredpixeldungeon.ui.BuffIndicator; +import com.shatteredpixel.shatteredpixeldungeon.ui.HeroIcon; import com.shatteredpixel.shatteredpixeldungeon.utils.BArray; import com.shatteredpixel.shatteredpixeldungeon.utils.GLog; import com.watabou.noosa.audio.Sample; @@ -127,6 +128,11 @@ public class DeathMark extends ArmorAbility { public static class DoubleMarkTracker extends FlavourBuff{}; + @Override + public int icon() { + return HeroIcon.DEATH_MARK; + } + @Override public Talent[] talents() { return new Talent[]{Talent.FEAR_THE_REAPER, Talent.DEATHLY_DURABILITY, Talent.DOUBLE_MARK, Talent.HEROIC_ENERGY}; diff --git a/core/src/main/java/com/shatteredpixel/shatteredpixeldungeon/actors/hero/abilities/rogue/ShadowClone.java b/core/src/main/java/com/shatteredpixel/shatteredpixeldungeon/actors/hero/abilities/rogue/ShadowClone.java index a610d4b20..e69602459 100644 --- a/core/src/main/java/com/shatteredpixel/shatteredpixeldungeon/actors/hero/abilities/rogue/ShadowClone.java +++ b/core/src/main/java/com/shatteredpixel/shatteredpixeldungeon/actors/hero/abilities/rogue/ShadowClone.java @@ -42,6 +42,7 @@ import com.shatteredpixel.shatteredpixeldungeon.messages.Messages; import com.shatteredpixel.shatteredpixeldungeon.scenes.GameScene; import com.shatteredpixel.shatteredpixeldungeon.sprites.HeroSprite; import com.shatteredpixel.shatteredpixeldungeon.sprites.MobSprite; +import com.shatteredpixel.shatteredpixeldungeon.ui.HeroIcon; import com.shatteredpixel.shatteredpixeldungeon.utils.BArray; import com.shatteredpixel.shatteredpixeldungeon.utils.GLog; import com.watabou.noosa.TextureFilm; @@ -123,6 +124,11 @@ public class ShadowClone extends ArmorAbility { } + @Override + public int icon() { + return HeroIcon.SHADOW_CLONE; + } + @Override public Talent[] talents() { return new Talent[]{Talent.SHADOW_BLADE, Talent.CLONED_ARMOR, Talent.PERFECT_COPY, Talent.HEROIC_ENERGY}; diff --git a/core/src/main/java/com/shatteredpixel/shatteredpixeldungeon/actors/hero/abilities/rogue/SmokeBomb.java b/core/src/main/java/com/shatteredpixel/shatteredpixeldungeon/actors/hero/abilities/rogue/SmokeBomb.java index e553dd131..50aba17f3 100644 --- a/core/src/main/java/com/shatteredpixel/shatteredpixeldungeon/actors/hero/abilities/rogue/SmokeBomb.java +++ b/core/src/main/java/com/shatteredpixel/shatteredpixeldungeon/actors/hero/abilities/rogue/SmokeBomb.java @@ -42,6 +42,7 @@ import com.shatteredpixel.shatteredpixeldungeon.items.scrolls.ScrollOfTeleportat import com.shatteredpixel.shatteredpixeldungeon.messages.Messages; import com.shatteredpixel.shatteredpixeldungeon.scenes.GameScene; import com.shatteredpixel.shatteredpixeldungeon.sprites.MobSprite; +import com.shatteredpixel.shatteredpixeldungeon.ui.HeroIcon; import com.shatteredpixel.shatteredpixeldungeon.utils.BArray; import com.shatteredpixel.shatteredpixeldungeon.utils.GLog; import com.watabou.noosa.TextureFilm; @@ -128,6 +129,11 @@ public class SmokeBomb extends ArmorAbility { } } + @Override + public int icon() { + return HeroIcon.SMOKE_BOMB; + } + @Override public Talent[] talents() { return new Talent[]{Talent.HASTY_RETREAT, Talent.BODY_REPLACEMENT, Talent.SHADOW_STEP, Talent.HEROIC_ENERGY}; diff --git a/core/src/main/java/com/shatteredpixel/shatteredpixeldungeon/actors/hero/abilities/warrior/Endure.java b/core/src/main/java/com/shatteredpixel/shatteredpixeldungeon/actors/hero/abilities/warrior/Endure.java index 283b93357..87ad1dc0d 100644 --- a/core/src/main/java/com/shatteredpixel/shatteredpixeldungeon/actors/hero/abilities/warrior/Endure.java +++ b/core/src/main/java/com/shatteredpixel/shatteredpixeldungeon/actors/hero/abilities/warrior/Endure.java @@ -37,6 +37,7 @@ import com.shatteredpixel.shatteredpixeldungeon.effects.SpellSprite; import com.shatteredpixel.shatteredpixeldungeon.items.armor.ClassArmor; import com.shatteredpixel.shatteredpixeldungeon.messages.Messages; import com.shatteredpixel.shatteredpixeldungeon.ui.BuffIndicator; +import com.shatteredpixel.shatteredpixeldungeon.ui.HeroIcon; import com.watabou.noosa.audio.Sample; import com.watabou.utils.Bundle; @@ -181,6 +182,11 @@ public class Endure extends ArmorAbility { } }; + @Override + public int icon() { + return HeroIcon.ENDURE; + } + @Override public Talent[] talents() { return new Talent[]{Talent.SUSTAINED_RETRIBUTION, Talent.SHRUG_IT_OFF, Talent.EVEN_THE_ODDS, Talent.HEROIC_ENERGY}; diff --git a/core/src/main/java/com/shatteredpixel/shatteredpixeldungeon/actors/hero/abilities/warrior/HeroicLeap.java b/core/src/main/java/com/shatteredpixel/shatteredpixeldungeon/actors/hero/abilities/warrior/HeroicLeap.java index 07bb4c717..6ddd0982e 100644 --- a/core/src/main/java/com/shatteredpixel/shatteredpixeldungeon/actors/hero/abilities/warrior/HeroicLeap.java +++ b/core/src/main/java/com/shatteredpixel/shatteredpixeldungeon/actors/hero/abilities/warrior/HeroicLeap.java @@ -37,6 +37,7 @@ import com.shatteredpixel.shatteredpixeldungeon.items.wands.WandOfBlastWave; import com.shatteredpixel.shatteredpixeldungeon.mechanics.Ballistica; import com.shatteredpixel.shatteredpixeldungeon.messages.Messages; import com.shatteredpixel.shatteredpixeldungeon.scenes.GameScene; +import com.shatteredpixel.shatteredpixeldungeon.ui.HeroIcon; import com.watabou.noosa.Camera; import com.watabou.utils.Callback; import com.watabou.utils.PathFinder; @@ -129,6 +130,11 @@ public class HeroicLeap extends ArmorAbility { public static class DoubleJumpTracker extends FlavourBuff{}; + @Override + public int icon() { + return HeroIcon.HEROIC_LEAP; + } + @Override public Talent[] talents() { return new Talent[]{Talent.BODY_SLAM, Talent.IMPACT_WAVE, Talent.DOUBLE_JUMP, Talent.HEROIC_ENERGY}; diff --git a/core/src/main/java/com/shatteredpixel/shatteredpixeldungeon/actors/hero/abilities/warrior/Shockwave.java b/core/src/main/java/com/shatteredpixel/shatteredpixeldungeon/actors/hero/abilities/warrior/Shockwave.java index fa5e0f1a2..b93ac2250 100644 --- a/core/src/main/java/com/shatteredpixel/shatteredpixeldungeon/actors/hero/abilities/warrior/Shockwave.java +++ b/core/src/main/java/com/shatteredpixel/shatteredpixeldungeon/actors/hero/abilities/warrior/Shockwave.java @@ -39,6 +39,7 @@ import com.shatteredpixel.shatteredpixeldungeon.items.armor.ClassArmor; import com.shatteredpixel.shatteredpixeldungeon.mechanics.Ballistica; import com.shatteredpixel.shatteredpixeldungeon.mechanics.ConeAOE; import com.shatteredpixel.shatteredpixeldungeon.messages.Messages; +import com.shatteredpixel.shatteredpixeldungeon.ui.HeroIcon; import com.shatteredpixel.shatteredpixeldungeon.utils.GLog; import com.watabou.noosa.Camera; import com.watabou.noosa.audio.Sample; @@ -142,6 +143,11 @@ public class Shockwave extends ArmorAbility { }); } + @Override + public int icon() { + return HeroIcon.SHOCKWAVE; + } + @Override public Talent[] talents() { return new Talent[]{Talent.EXPANDING_WAVE, Talent.STRIKING_WAVE, Talent.SHOCK_FORCE, Talent.HEROIC_ENERGY}; diff --git a/core/src/main/java/com/shatteredpixel/shatteredpixeldungeon/ui/HeroIcon.java b/core/src/main/java/com/shatteredpixel/shatteredpixeldungeon/ui/HeroIcon.java new file mode 100644 index 000000000..86cb6bbf1 --- /dev/null +++ b/core/src/main/java/com/shatteredpixel/shatteredpixeldungeon/ui/HeroIcon.java @@ -0,0 +1,59 @@ +package com.shatteredpixel.shatteredpixeldungeon.ui; + +import com.shatteredpixel.shatteredpixeldungeon.Assets; +import com.shatteredpixel.shatteredpixeldungeon.actors.hero.HeroSubClass; +import com.shatteredpixel.shatteredpixeldungeon.actors.hero.abilities.ArmorAbility; +import com.watabou.noosa.Image; +import com.watabou.noosa.TextureFilm; + +//icons for hero subclasses and abilities atm, maybe add classes? +public class HeroIcon extends Image { + + private static TextureFilm film; + private static final int SIZE = 16; + + //transparent icon + public static final int NONE = 31; + + //subclasses + public static final int BERSERKER = 0; + public static final int GLADIATOR = 1; + public static final int BATTLEMAGE = 2; + public static final int WARLOCK = 3; + public static final int ASSASSIN = 4; + public static final int FREERUNNER = 5; + public static final int SNIPER = 6; + public static final int WARDEN = 7; + + //abilities + public static final int HEROIC_LEAP = 8; + public static final int SHOCKWAVE = 9; + public static final int ENDURE = 10; + public static final int ELEMENTAL_BLAST = 11; + public static final int WILD_MAGIC = 12; + public static final int WARP_BEACON = 13; + public static final int SMOKE_BOMB = 14; + public static final int DEATH_MARK = 15; + public static final int SHADOW_CLONE = 16; + public static final int SPECTRAL_BLADES = 17; + public static final int NATURES_POWER = 18; + public static final int SPIRIT_HAWK = 19; + public static final int RATMOGRIFY = 20; + + public HeroIcon(HeroSubClass subCls){ + super( Assets.Interfaces.HERO_ICONS ); + if (film == null){ + film = new TextureFilm(texture, SIZE, SIZE); + } + frame(film.get(subCls.icon())); + } + + public HeroIcon(ArmorAbility abil){ + super( Assets.Interfaces.HERO_ICONS ); + if (film == null){ + film = new TextureFilm(texture, SIZE, SIZE); + } + frame(film.get(abil.icon())); + } + +} diff --git a/core/src/main/java/com/shatteredpixel/shatteredpixeldungeon/windows/WndChooseSubclass.java b/core/src/main/java/com/shatteredpixel/shatteredpixeldungeon/windows/WndChooseSubclass.java index 872448bf6..22dcb6964 100644 --- a/core/src/main/java/com/shatteredpixel/shatteredpixeldungeon/windows/WndChooseSubclass.java +++ b/core/src/main/java/com/shatteredpixel/shatteredpixeldungeon/windows/WndChooseSubclass.java @@ -29,6 +29,7 @@ import com.shatteredpixel.shatteredpixeldungeon.messages.Messages; import com.shatteredpixel.shatteredpixeldungeon.scenes.GameScene; import com.shatteredpixel.shatteredpixeldungeon.scenes.PixelScene; import com.shatteredpixel.shatteredpixeldungeon.sprites.ItemSprite; +import com.shatteredpixel.shatteredpixeldungeon.ui.HeroIcon; import com.shatteredpixel.shatteredpixeldungeon.ui.IconButton; import com.shatteredpixel.shatteredpixeldungeon.ui.Icons; import com.shatteredpixel.shatteredpixeldungeon.ui.RedButton; @@ -61,7 +62,7 @@ public class WndChooseSubclass extends Window { RedButton btnCls = new RedButton( subCls.shortDesc(), 6 ) { @Override protected void onClick() { - GameScene.show(new WndOptions(subCls.icon(), + GameScene.show(new WndOptions(new HeroIcon(subCls), Messages.titleCase(subCls.title()), Messages.get(WndChooseSubclass.this, "are_you_sure"), Messages.get(WndChooseSubclass.this, "yes"), diff --git a/core/src/main/java/com/shatteredpixel/shatteredpixeldungeon/windows/WndInfoArmorAbility.java b/core/src/main/java/com/shatteredpixel/shatteredpixeldungeon/windows/WndInfoArmorAbility.java index 44202d280..3602f9575 100644 --- a/core/src/main/java/com/shatteredpixel/shatteredpixeldungeon/windows/WndInfoArmorAbility.java +++ b/core/src/main/java/com/shatteredpixel/shatteredpixeldungeon/windows/WndInfoArmorAbility.java @@ -6,6 +6,7 @@ import com.shatteredpixel.shatteredpixeldungeon.actors.hero.abilities.ArmorAbili import com.shatteredpixel.shatteredpixeldungeon.messages.Messages; import com.shatteredpixel.shatteredpixeldungeon.sprites.ItemSprite; import com.shatteredpixel.shatteredpixeldungeon.sprites.ItemSpriteSheet; +import com.shatteredpixel.shatteredpixeldungeon.ui.HeroIcon; import com.shatteredpixel.shatteredpixeldungeon.ui.TalentsPane; import com.watabou.noosa.Image; @@ -15,7 +16,7 @@ import java.util.LinkedHashMap; public class WndInfoArmorAbility extends WndTitledMessage { public WndInfoArmorAbility(HeroClass cls, ArmorAbility ability){ - super( new ItemSprite( ItemSpriteSheet.CROWN, null ), Messages.titleCase(ability.name()), ability.desc()); + super( new HeroIcon(ability), Messages.titleCase(ability.name()), ability.desc()); ArrayList> talentList = new ArrayList<>(); Talent.initArmorTalents(ability, talentList); diff --git a/core/src/main/java/com/shatteredpixel/shatteredpixeldungeon/windows/WndInfoSubclass.java b/core/src/main/java/com/shatteredpixel/shatteredpixeldungeon/windows/WndInfoSubclass.java index 603b1d226..434936c2d 100644 --- a/core/src/main/java/com/shatteredpixel/shatteredpixeldungeon/windows/WndInfoSubclass.java +++ b/core/src/main/java/com/shatteredpixel/shatteredpixeldungeon/windows/WndInfoSubclass.java @@ -4,6 +4,7 @@ import com.shatteredpixel.shatteredpixeldungeon.actors.hero.HeroClass; import com.shatteredpixel.shatteredpixeldungeon.actors.hero.HeroSubClass; import com.shatteredpixel.shatteredpixeldungeon.actors.hero.Talent; import com.shatteredpixel.shatteredpixeldungeon.messages.Messages; +import com.shatteredpixel.shatteredpixeldungeon.ui.HeroIcon; import com.shatteredpixel.shatteredpixeldungeon.ui.TalentsPane; import com.shatteredpixel.shatteredpixeldungeon.windows.WndHeroInfo; import com.shatteredpixel.shatteredpixeldungeon.windows.WndTitledMessage; @@ -14,7 +15,7 @@ import java.util.LinkedHashMap; public class WndInfoSubclass extends WndTitledMessage { public WndInfoSubclass(HeroClass cls, HeroSubClass subCls){ - super( subCls.icon(), Messages.titleCase(subCls.title()), subCls.desc()); + super( new HeroIcon(subCls), Messages.titleCase(subCls.title()), subCls.desc()); ArrayList> talentList = new ArrayList<>(); Talent.initClassTalents(cls, talentList);