Add hint message to blessing select menu when selecting path resonance

This commit is contained in:
Melledy
2023-11-30 06:16:04 -08:00
parent 57498a798a
commit e30095de10

View File

@@ -16,6 +16,7 @@ public class RogueBuffSelectMenu {
private int maxBuffs; private int maxBuffs;
private int rerolls; private int rerolls;
private int maxRerolls; private int maxRerolls;
private int hint;
private List<RogueBuffData> buffs; private List<RogueBuffData> buffs;
// Cache // Cache
@@ -66,7 +67,7 @@ public class RogueBuffSelectMenu {
// Calculate buff weights // Calculate buff weights
double weight = 10.0 / excel.getRogueBuffRarity(); double weight = 10.0 / excel.getRogueBuffRarity();
if (this.getRogue().getAeonBuffType() == excel.getRogueBuffType()) { if (getRogue().getAeonBuffType() == excel.getRogueBuffType()) {
weight *= 2; weight *= 2;
} }
@@ -88,15 +89,22 @@ public class RogueBuffSelectMenu {
var aeonBuffExcel = GameDepot.getRogueAeonBuffs().get(getRogue().getAeonId()); var aeonBuffExcel = GameDepot.getRogueAeonBuffs().get(getRogue().getAeonId());
if (aeonBuffExcel == null) return; if (aeonBuffExcel == null) return;
// Select buff menu hint
this.hint = (getRogue().getAeonId() * 100) + 1;
// Check for rogue aeon buffs // Check for rogue aeon buffs
if (!this.getRogue().getBuffs().containsKey(aeonBuffExcel.getMazeBuffID())) { if (!this.getRogue().getBuffs().containsKey(aeonBuffExcel.getMazeBuffID())) {
// We dont have the first aeon buff yet // We dont have the first aeon buff yet
this.getBuffs().add(new RogueBuffData(aeonBuffExcel.getMazeBuffID(), 1)); this.getBuffs().add(new RogueBuffData(aeonBuffExcel.getMazeBuffID(), 1));
} else { } else {
// Add hint
this.hint += 1;
// Add path resonances that we currently dont have // Add path resonances that we currently dont have
for (var aeonEnhanceExcel : GameDepot.getRogueAeonEnhanceBuffs().get(getRogue().getAeonId())) { for (var aeonEnhanceExcel : GameDepot.getRogueAeonEnhanceBuffs().get(getRogue().getAeonId())) {
if (!this.getRogue().getBuffs().containsKey(aeonEnhanceExcel.getMazeBuffID())) { if (!this.getRogue().getBuffs().containsKey(aeonEnhanceExcel.getMazeBuffID())) {
this.getBuffs().add(new RogueBuffData(aeonEnhanceExcel.getMazeBuffID(), 1)); this.getBuffs().add(new RogueBuffData(aeonEnhanceExcel.getMazeBuffID(), 1));
} else {
this.hint += 1;
} }
} }
} }
@@ -107,7 +115,8 @@ public class RogueBuffSelectMenu {
} }
public RogueBuffSelectInfo toProto() { public RogueBuffSelectInfo toProto() {
var proto = RogueBuffSelectInfo.newInstance(); var proto = RogueBuffSelectInfo.newInstance()
.setSelectBuffSourceHint(this.getHint());
if (this.getMaxRerolls() > 0) { if (this.getMaxRerolls() > 0) {
proto.setCanRoll(true); proto.setCanRoll(true);
@@ -119,6 +128,7 @@ public class RogueBuffSelectMenu {
proto.addMazeBuffList(buff.toProto()); proto.addMazeBuffList(buff.toProto());
} }
// Create item list for reroll cost
proto.getMutableRollBuffsCost(); proto.getMutableRollBuffsCost();
return proto; return proto;