mirror of
https://github.com/Melledy/LunarCore.git
synced 2025-12-12 21:34:35 +01:00
Handle a few rogue talents
This commit is contained in:
@@ -27,13 +27,9 @@ public class RogueBuffSelectMenu {
|
||||
public RogueBuffSelectMenu(RogueInstance rogue) {
|
||||
this.rogue = rogue;
|
||||
this.maxBuffs = 3;
|
||||
this.maxRerolls = rogue.getBaseRerolls();
|
||||
this.buffs = new ArrayList<>();
|
||||
|
||||
// Reset blessings talent
|
||||
if (rogue.getPlayer().getRogueManager().hasTalent(11)) {
|
||||
this.maxRerolls = 1;
|
||||
}
|
||||
|
||||
this.generateRandomBuffs();
|
||||
}
|
||||
|
||||
|
||||
@@ -50,6 +50,7 @@ public class RogueInstance {
|
||||
private int pendingMiracleSelects;
|
||||
private RogueMiracleSelectMenu miracleSelect;
|
||||
|
||||
private int baseRerolls;
|
||||
private int aeonId;
|
||||
private int aeonBuffType;
|
||||
private boolean isWin;
|
||||
@@ -72,6 +73,7 @@ public class RogueInstance {
|
||||
}
|
||||
|
||||
this.initRooms();
|
||||
this.initTalents();
|
||||
}
|
||||
|
||||
public RogueStatus getStatus() {
|
||||
@@ -93,6 +95,17 @@ public class RogueInstance {
|
||||
}
|
||||
}
|
||||
|
||||
private void initTalents() {
|
||||
// Reset blessings
|
||||
if (player.getRogueManager().hasTalent(11)) {
|
||||
this.baseRerolls = 1;
|
||||
}
|
||||
// Extra blessings
|
||||
if (player.getRogueManager().hasTalent(21)) {
|
||||
this.pendingBuffSelects += 1;
|
||||
}
|
||||
}
|
||||
|
||||
private RogueRoomData getRoomBySiteId(int siteId) {
|
||||
return this.rooms.get(siteId);
|
||||
}
|
||||
|
||||
@@ -99,10 +99,13 @@ public class RogueManager extends BasePlayerManager {
|
||||
RogueInstance instance = new RogueInstance(getPlayer(), rogueAreaExcel, aeonExcel);
|
||||
getPlayer().setRogueInstance(instance);
|
||||
|
||||
// Set starting SP
|
||||
boolean extraSP = this.hasTalent(32);
|
||||
|
||||
// Reset hp/sp
|
||||
lineup.forEachAvatar(avatar -> {
|
||||
avatar.setCurrentHp(lineup, 10000);
|
||||
avatar.setCurrentSp(lineup, avatar.getMaxSp());
|
||||
avatar.setCurrentSp(lineup, extraSP ? avatar.getMaxSp() : avatar.getMaxSp() / 2);
|
||||
|
||||
instance.getBaseAvatarIds().add(avatar.getAvatarId());
|
||||
});
|
||||
@@ -181,23 +184,29 @@ public class RogueManager extends BasePlayerManager {
|
||||
var data = RogueInfoData.newInstance()
|
||||
.setRogueScoreInfo(score)
|
||||
.setRogueSeasonInfo(season);
|
||||
|
||||
var aeonInfo = RogueAeonInfo.newInstance()
|
||||
.setUnlockAeonNum(GameData.getRogueAeonExcelMap().size());
|
||||
|
||||
for (var aeonExcel : GameData.getRogueAeonExcelMap().values()) {
|
||||
aeonInfo.addAeonIdList(aeonExcel.getAeonID());
|
||||
}
|
||||
|
||||
var proto = RogueInfo.newInstance()
|
||||
.setRogueScoreInfo(score)
|
||||
.setRogueAeonInfo(aeonInfo)
|
||||
.setRogueData(data)
|
||||
.setRogueVirtualItemInfo(getPlayer().toRogueVirtualItemsProto())
|
||||
.setSeasonId(seasonId)
|
||||
.setBeginTime(beginTime)
|
||||
.setEndTime(endTime);
|
||||
|
||||
// Path resonance
|
||||
var aeonInfo = RogueAeonInfo.newInstance();
|
||||
|
||||
if (this.hasTalent(1)) {
|
||||
aeonInfo = RogueAeonInfo.newInstance()
|
||||
.setUnlockAeonNum(GameData.getRogueAeonExcelMap().size());
|
||||
|
||||
for (var aeonExcel : GameData.getRogueAeonExcelMap().values()) {
|
||||
aeonInfo.addAeonIdList(aeonExcel.getAeonID());
|
||||
}
|
||||
|
||||
proto.setRogueAeonInfo(aeonInfo);
|
||||
}
|
||||
|
||||
// Rogue data
|
||||
RogueInstance instance = this.getPlayer().getRogueInstance();
|
||||
if (instance != null) {
|
||||
|
||||
Reference in New Issue
Block a user