v0.9.2: design changes to T3 talents and more talent UI adjustments

This commit is contained in:
Evan Debenham 2021-01-20 21:25:46 -05:00
parent 09977a42c2
commit 7b2fab9730
6 changed files with 43 additions and 23 deletions

Binary file not shown.

Before

Width:  |  Height:  |  Size: 2.5 KiB

After

Width:  |  Height:  |  Size: 2.5 KiB

View File

@ -71,44 +71,44 @@ public enum Talent {
//Warrior T2 //Warrior T2
IRON_STOMACH(4), RESTORED_WILLPOWER(5), RUNIC_TRANSFERENCE(6), LETHAL_MOMENTUM(7), IMPROVISED_PROJECTILES(8), IRON_STOMACH(4), RESTORED_WILLPOWER(5), RUNIC_TRANSFERENCE(6), LETHAL_MOMENTUM(7), IMPROVISED_PROJECTILES(8),
//Warrior T3 //Warrior T3
WARRIOR_T3_1(9), WARRIOR_T3_2(10), WARRIOR_T3_3(11), WARRIOR_T3_1(9, 3), WARRIOR_T3_2(10, 3),
//Berserker T3 //Berserker T3
BERSERKER_T3_1(12), BERSERKER_T3_2(13), BERSERKER_T3_3(14), BERSERKER_T3_1(11, 3), BERSERKER_T3_2(12, 3), BERSERKER_T3_3(13, 3),
//Gladiator T3 //Gladiator T3
GLADIATOR_T3_1(15), GLADIATOR_T3_2(16), GLADIATOR_T3_3(17), GLADIATOR_T3_1(14, 3), GLADIATOR_T3_2(15, 3), GLADIATOR_T3_3(16, 3),
//Mage T1 //Mage T1
EMPOWERING_MEAL(32), SCHOLARS_INTUITION(33), TESTED_HYPOTHESIS(34), BACKUP_BARRIER(35), EMPOWERING_MEAL(32), SCHOLARS_INTUITION(33), TESTED_HYPOTHESIS(34), BACKUP_BARRIER(35),
//Mage T2 //Mage T2
ENERGIZING_MEAL(36), ENERGIZING_UPGRADE(37), WAND_PRESERVATION(38), ARCANE_VISION(39), SHIELD_BATTERY(40), ENERGIZING_MEAL(36), ENERGIZING_UPGRADE(37), WAND_PRESERVATION(38), ARCANE_VISION(39), SHIELD_BATTERY(40),
//Mage T3 //Mage T3
MAGE_T3_1(41), MAGE_T3_2(42), MAGE_T3_3(43), MAGE_T3_1(41), MAGE_T3_2(42),
//Battlemage T3 //Battlemage T3
BATTLEMAGE_T3_1(44), BATTLEMAGE_T3_2(45), BATTLEMAGE_T3_3(46), BATTLEMAGE_T3_1(43, 3), BATTLEMAGE_T3_2(44, 3), BATTLEMAGE_T3_3(45, 3),
//Warlock T3 //Warlock T3
WARLOCK_T3_1(47), WARLOCK_T3_2(48), WARLOCK_T3_3(49), WARLOCK_T3_1(46, 3), WARLOCK_T3_2(47, 3), WARLOCK_T3_3(48, 3),
//Rogue T1 //Rogue T1
CACHED_RATIONS(64), THIEFS_INTUITION(65), SUCKER_PUNCH(66), PROTECTIVE_SHADOWS(67), CACHED_RATIONS(64), THIEFS_INTUITION(65), SUCKER_PUNCH(66), PROTECTIVE_SHADOWS(67),
//Rogue T2 //Rogue T2
MYSTICAL_MEAL(68), MYSTICAL_UPGRADE(69), WIDE_SEARCH(70), SILENT_STEPS(71), ROGUES_FORESIGHT(72), MYSTICAL_MEAL(68), MYSTICAL_UPGRADE(69), WIDE_SEARCH(70), SILENT_STEPS(71), ROGUES_FORESIGHT(72),
//Rogue T3 //Rogue T3
ROGUE_T3_1(73), ROGUE_T3_2(74), ROGUE_T3_3(75), ROGUE_T3_1(73), ROGUE_T3_2(74),
//Assassin T3 //Assassin T3
ASSASSIN_T3_1(76), ASSASSIN_T3_2(77), ASSASSIN_T3_3(78), ASSASSIN_T3_1(75, 3), ASSASSIN_T3_2(76, 3), ASSASSIN_T3_3(77, 3),
//Freerunner T3 //Freerunner T3
FREERUNNER_T3_1(79), FREERUNNER_T3_2(80), FREERUNNER_T3_3(81), FREERUNNER_T3_1(78, 3), FREERUNNER_T3_2(79, 3), FREERUNNER_T3_3(80, 3),
//Huntress T1 //Huntress T1
NATURES_BOUNTY(96), SURVIVALISTS_INTUITION(97), FOLLOWUP_STRIKE(98), NATURES_AID(99), NATURES_BOUNTY(96), SURVIVALISTS_INTUITION(97), FOLLOWUP_STRIKE(98), NATURES_AID(99),
//Huntress T2 //Huntress T2
INVIGORATING_MEAL(100), RESTORED_NATURE(101), REJUVENATING_STEPS(102), HEIGHTENED_SENSES(103), DURABLE_PROJECTILES(104), INVIGORATING_MEAL(100), RESTORED_NATURE(101), REJUVENATING_STEPS(102), HEIGHTENED_SENSES(103), DURABLE_PROJECTILES(104),
//Huntress T3 //Huntress T3
HUNTRESS_T3_1(105), HUNTRESS_T3_2(106), HUNTRESS_T3_3(107), HUNTRESS_T3_1(105, 3), HUNTRESS_T3_2(106, 3),
//Sniper T3 //Sniper T3
SNIPER_T3_1(108), SNIPER_T3_2(109), SNIPER_T3_3(110), SNIPER_T3_1(107, 3), SNIPER_T3_2(108, 3), SNIPER_T3_3(109, 3),
//Warden T3 //Warden T3
WARDEN_T3_1(111), WARDEN_T3_2(112), WARDEN_T3_3(113); WARDEN_T3_1(110, 3), WARDEN_T3_2(111, 3), WARDEN_T3_3(112, 3);
public static class ImprovisedProjectileCooldown extends FlavourBuff{}; public static class ImprovisedProjectileCooldown extends FlavourBuff{};
public static class LethalMomentumTracker extends FlavourBuff{}; public static class LethalMomentumTracker extends FlavourBuff{};
@ -116,12 +116,18 @@ public enum Talent {
public static class RejuvenatingStepsCooldown extends FlavourBuff{}; public static class RejuvenatingStepsCooldown extends FlavourBuff{};
int icon; int icon;
int maxPoints;
// tiers 1/2/3/4 start at levels 2/7/13/21 // tiers 1/2/3/4 start at levels 2/7/13/21
public static int[] tierLevelThresholds = new int[]{0, 2, 7, 13, 21, 31}; public static int[] tierLevelThresholds = new int[]{0, 2, 7, 13, 21, 31};
Talent( int icon ){ Talent( int icon ){
this(icon, 2);
}
Talent( int icon, int maxPoints ){
this.icon = icon; this.icon = icon;
this.maxPoints = maxPoints;
} }
public int icon(){ public int icon(){
@ -129,7 +135,7 @@ public enum Talent {
} }
public int maxPoints(){ public int maxPoints(){
return 2; return maxPoints;
} }
public String title(){ public String title(){
@ -409,16 +415,16 @@ public enum Talent {
//tier 3 //tier 3
switch (cls){ switch (cls){
case WARRIOR: default: case WARRIOR: default:
Collections.addAll(tierTalents, WARRIOR_T3_1, WARRIOR_T3_2, WARRIOR_T3_3); Collections.addAll(tierTalents, WARRIOR_T3_1, WARRIOR_T3_2);
break; break;
case MAGE: case MAGE:
Collections.addAll(tierTalents, MAGE_T3_1, MAGE_T3_2, MAGE_T3_3); Collections.addAll(tierTalents, MAGE_T3_1, MAGE_T3_2);
break; break;
case ROGUE: case ROGUE:
Collections.addAll(tierTalents, ROGUE_T3_1, ROGUE_T3_2, ROGUE_T3_3); Collections.addAll(tierTalents, ROGUE_T3_1, ROGUE_T3_2);
break; break;
case HUNTRESS: case HUNTRESS:
Collections.addAll(tierTalents, HUNTRESS_T3_1, HUNTRESS_T3_2, HUNTRESS_T3_3); Collections.addAll(tierTalents, HUNTRESS_T3_1, HUNTRESS_T3_2);
break; break;
} }
for (Talent talent : tierTalents){ for (Talent talent : tierTalents){

View File

@ -337,7 +337,7 @@ public class HeroSelectScene extends PixelScene {
private RedButton firstSub; private RedButton firstSub;
private RedButton secondSub; private RedButton secondSub;
private int WIDTH = 130; private int WIDTH = 120;
private int HEIGHT = 120; private int HEIGHT = 120;
private int MARGIN = 2; private int MARGIN = 2;
private int INFO_WIDTH = WIDTH - MARGIN*2; private int INFO_WIDTH = WIDTH - MARGIN*2;
@ -494,7 +494,7 @@ public class HeroSelectScene extends PixelScene {
firstSub.setPos((title.left() - firstSub.width())/2, 0); firstSub.setPos((title.left() - firstSub.width())/2, 0);
secondSub.setPos(title.right() + (WIDTH - title.right() - secondSub.width())/2, 0); secondSub.setPos(title.right() + (WIDTH - title.right() - secondSub.width())/2, 0);
talents.setRect(0, info.bottom()+2*MARGIN, WIDTH, HEIGHT - (info.bottom()+2*MARGIN)); talents.setRect(0, info.bottom()+MARGIN, WIDTH, HEIGHT - (info.bottom()+MARGIN));
resize(WIDTH, Math.max(HEIGHT, (int)info.bottom())); resize(WIDTH, Math.max(HEIGHT, (int)info.bottom()));

View File

@ -64,7 +64,11 @@ public class TalentsPane extends ScrollPane {
} }
} }
tiersAvailable = Math.min(tiersAvailable, talents.size());
for (int i = 0; i < Math.min(tiersAvailable, talents.size()); i++){ for (int i = 0; i < Math.min(tiersAvailable, talents.size()); i++){
if (talents.get(i).isEmpty()) continue;
TalentTierPane pane = new TalentTierPane(talents.get(i), i+1, canUpgrade); TalentTierPane pane = new TalentTierPane(talents.get(i), i+1, canUpgrade);
panes.add(pane); panes.add(pane);
content.add(pane); content.add(pane);

View File

@ -48,7 +48,7 @@ import java.util.Locale;
public class WndHero extends WndTabbed { public class WndHero extends WndTabbed {
private static final int WIDTH = 130; private static final int WIDTH = 120;
private static final int HEIGHT = 120; private static final int HEIGHT = 120;
private StatsTab stats; private StatsTab stats;

View File

@ -27,6 +27,7 @@ import com.shatteredpixel.shatteredpixeldungeon.Dungeon;
import com.shatteredpixel.shatteredpixeldungeon.Rankings; import com.shatteredpixel.shatteredpixeldungeon.Rankings;
import com.shatteredpixel.shatteredpixeldungeon.Statistics; import com.shatteredpixel.shatteredpixeldungeon.Statistics;
import com.shatteredpixel.shatteredpixeldungeon.actors.hero.Belongings; import com.shatteredpixel.shatteredpixeldungeon.actors.hero.Belongings;
import com.shatteredpixel.shatteredpixeldungeon.actors.hero.HeroSubClass;
import com.shatteredpixel.shatteredpixeldungeon.items.Item; import com.shatteredpixel.shatteredpixeldungeon.items.Item;
import com.shatteredpixel.shatteredpixeldungeon.messages.Messages; import com.shatteredpixel.shatteredpixeldungeon.messages.Messages;
import com.shatteredpixel.shatteredpixeldungeon.scenes.PixelScene; import com.shatteredpixel.shatteredpixeldungeon.scenes.PixelScene;
@ -176,12 +177,21 @@ public class WndRanking extends WndTabbed {
RedButton btnTalents = new RedButton( Messages.get(this, "talents") ){ RedButton btnTalents = new RedButton( Messages.get(this, "talents") ){
@Override @Override
protected void onClick() { protected void onClick() {
//removes talents from upper tiers
int tiers = 1;
if (Dungeon.hero.lvl >= 6) tiers++;
if (Dungeon.hero.lvl >= 12 && Dungeon.hero.subClass != HeroSubClass.NONE) tiers++;
while (Dungeon.hero.talents.size() > tiers){
Dungeon.hero.talents.remove(Dungeon.hero.talents.size()-1);
}
Game.scene().addToFront( new Window(){ Game.scene().addToFront( new Window(){
{ {
resize(120, 144);
TalentsPane p = new TalentsPane(false); TalentsPane p = new TalentsPane(false);
add(p); add(p);
p.setRect(0, 0, width, height); p.setPos(0, 0);
p.setSize(120, p.content().height());
resize((int)p.width(), (int)p.height());
p.setPos(0, 0);
} }
}); });
} }