mirror of
https://github.com/Melledy/LunarCore.git
synced 2025-12-14 06:14:45 +01:00
Implement proper monster levels in SU
This commit is contained in:
@@ -41,6 +41,7 @@ public class GameData {
|
|||||||
@Getter private static Int2ObjectMap<RogueAeonExcel> rogueAeonExcelMap = new Int2ObjectLinkedOpenHashMap<>();
|
@Getter private static Int2ObjectMap<RogueAeonExcel> rogueAeonExcelMap = new Int2ObjectLinkedOpenHashMap<>();
|
||||||
@Getter private static Int2ObjectMap<RogueAreaExcel> rogueAreaExcelMap = new Int2ObjectOpenHashMap<>();
|
@Getter private static Int2ObjectMap<RogueAreaExcel> rogueAreaExcelMap = new Int2ObjectOpenHashMap<>();
|
||||||
@Getter private static Int2ObjectMap<RogueRoomExcel> rogueRoomExcelMap = new Int2ObjectOpenHashMap<>();
|
@Getter private static Int2ObjectMap<RogueRoomExcel> rogueRoomExcelMap = new Int2ObjectOpenHashMap<>();
|
||||||
|
@Getter private static Int2ObjectMap<RogueMapExcel> rogueMapExcelMap = new Int2ObjectOpenHashMap<>();
|
||||||
@Getter private static Int2ObjectMap<RogueMonsterExcel> rogueMonsterExcelMap = new Int2ObjectOpenHashMap<>();
|
@Getter private static Int2ObjectMap<RogueMonsterExcel> rogueMonsterExcelMap = new Int2ObjectOpenHashMap<>();
|
||||||
|
|
||||||
private static Int2ObjectMap<AvatarPromotionExcel> avatarPromotionExcelMap = new Int2ObjectOpenHashMap<>();
|
private static Int2ObjectMap<AvatarPromotionExcel> avatarPromotionExcelMap = new Int2ObjectOpenHashMap<>();
|
||||||
@@ -142,4 +143,8 @@ public class GameData {
|
|||||||
public static ChallengeRewardExcel getChallengeRewardExcel(int groupId, int starCount) {
|
public static ChallengeRewardExcel getChallengeRewardExcel(int groupId, int starCount) {
|
||||||
return challengeRewardExcelMap.get((groupId << 16) + starCount);
|
return challengeRewardExcelMap.get((groupId << 16) + starCount);
|
||||||
}
|
}
|
||||||
|
|
||||||
|
public static RogueMapExcel getRogueMapExcel(int rogueMapId, int siteId) {
|
||||||
|
return rogueMapExcelMap.get((rogueMapId << 8) + siteId);
|
||||||
|
}
|
||||||
}
|
}
|
||||||
|
|||||||
@@ -13,6 +13,7 @@ public class RogueMapExcel extends GameResource {
|
|||||||
private int SiteID;
|
private int SiteID;
|
||||||
private boolean IsStart;
|
private boolean IsStart;
|
||||||
private int[] NextSiteIDList;
|
private int[] NextSiteIDList;
|
||||||
|
private int[] LevelList;
|
||||||
|
|
||||||
@Override
|
@Override
|
||||||
public int getId() {
|
public int getId() {
|
||||||
|
|||||||
@@ -6,6 +6,7 @@ import emu.lunarcore.data.GameData;
|
|||||||
import emu.lunarcore.data.config.AnchorInfo;
|
import emu.lunarcore.data.config.AnchorInfo;
|
||||||
import emu.lunarcore.data.excel.RogueAeonExcel;
|
import emu.lunarcore.data.excel.RogueAeonExcel;
|
||||||
import emu.lunarcore.data.excel.RogueAreaExcel;
|
import emu.lunarcore.data.excel.RogueAreaExcel;
|
||||||
|
import emu.lunarcore.data.excel.RogueMapExcel;
|
||||||
import emu.lunarcore.game.battle.Battle;
|
import emu.lunarcore.game.battle.Battle;
|
||||||
import emu.lunarcore.game.player.Player;
|
import emu.lunarcore.game.player.Player;
|
||||||
import emu.lunarcore.proto.BattleEndStatusOuterClass.BattleEndStatus;
|
import emu.lunarcore.proto.BattleEndStatusOuterClass.BattleEndStatus;
|
||||||
@@ -226,9 +227,15 @@ public class RogueInstance {
|
|||||||
// Battle
|
// Battle
|
||||||
|
|
||||||
public synchronized void onBattleStart(Battle battle) {
|
public synchronized void onBattleStart(Battle battle) {
|
||||||
|
// Add rogue blessings as battle buffs
|
||||||
for (var buff : this.getBuffs().values()) {
|
for (var buff : this.getBuffs().values()) {
|
||||||
battle.addBuff(buff.toMazeBuff());
|
battle.addBuff(buff.toMazeBuff());
|
||||||
}
|
}
|
||||||
|
// Set monster level for battle
|
||||||
|
RogueMapExcel mapExcel = GameData.getRogueMapExcel(this.getExcel().getMapId(), this.getCurrentSiteId());
|
||||||
|
if (mapExcel != null && mapExcel.getLevelList() != null && mapExcel.getLevelList().length >= 1) {
|
||||||
|
battle.setLevelOverride(mapExcel.getLevelList()[0]);
|
||||||
|
}
|
||||||
}
|
}
|
||||||
|
|
||||||
public synchronized void onBattleFinish(Battle battle, BattleEndStatus result, BattleStatistics stats) {
|
public synchronized void onBattleFinish(Battle battle, BattleEndStatus result, BattleStatistics stats) {
|
||||||
|
|||||||
Reference in New Issue
Block a user