mirror of
https://github.com/MikuLeaks/KianaBH3.git
synced 2026-02-04 06:25:05 +01:00
feat: add Abyss
This commit is contained in:
@@ -42,4 +42,8 @@ public static class GameData
|
||||
public static Dictionary<int, TutorialDataExcel> TutorialData { get; private set; } = [];
|
||||
public static Dictionary<int, CityEventPhotoExcel> CityEventPhotoData { get; private set; } = [];
|
||||
public static Dictionary<int, RandomPlotDataExcel> RandomPlotData { get; private set; } = [];
|
||||
public static Dictionary<int, UltraEndlessSiteExcel> UltraEndlessSiteData { get; private set; } = [];
|
||||
public static Dictionary<int, List<UltraEndlessFloorExcel>> UltraEndlessFloorData { get; private set; } = [];
|
||||
public static Dictionary<int, ExBossMonsterDataExcel> ExBossMonsterData { get; private set; } = [];
|
||||
|
||||
}
|
||||
@@ -1,4 +1,4 @@
|
||||
using System.Drawing;
|
||||
using KianaBH.Data;
|
||||
using KianaBH.Proto;
|
||||
using KianaBH.Util;
|
||||
using KianaBH.Util.Extensions;
|
||||
@@ -23,6 +23,8 @@ public class PlayerData : BaseDatabaseDataHelper
|
||||
public int BirthDay { get; set; } = 0;
|
||||
[SugarColumn(IsJson = true)] public WarshipAvatarData WarshipAvatar { get; set; } = new();
|
||||
[SugarColumn(IsNullable = true)] public long LastActiveTime { get; set; }
|
||||
[SugarColumn(IsJson = true)] public UltraEndless Abyss { get; set; } = new();
|
||||
public List<int> ExBossMonster { get; set; } = new List<int> { 51016, 4021, 36112 };
|
||||
public long RegisterTime { get; set; } = Extensions.GetUnixSec();
|
||||
|
||||
public static PlayerData? GetPlayerByUid(long uid)
|
||||
@@ -64,10 +66,61 @@ public class PlayerData : BaseDatabaseDataHelper
|
||||
TotalLoginDays = 1
|
||||
};
|
||||
}
|
||||
|
||||
public uint GetCupNum()
|
||||
{
|
||||
uint GroupLevel = (uint)Abyss.GroupLevel;
|
||||
if (GroupLevel > 6) return (GroupLevel - 6) * 367 + 900;
|
||||
else if (GroupLevel > 1) return (GroupLevel - 2) * 200 + 100;
|
||||
else return 0;
|
||||
}
|
||||
|
||||
public List<UltraEndlessSite> ToUltraEndlessSiteProto()
|
||||
{
|
||||
int currentSiteId = Abyss.SiteId;
|
||||
|
||||
var currentSiteData = GameData.UltraEndlessSiteData.Values
|
||||
.FirstOrDefault(x => x.SiteID == currentSiteId);
|
||||
|
||||
if (currentSiteData == null) return [];
|
||||
|
||||
if (currentSiteData.SiteNodeName.StartsWith("Area") &&
|
||||
int.TryParse(currentSiteData.SiteNodeName.Substring(4), out int areaNumber) &&
|
||||
areaNumber > 1) currentSiteId -= (areaNumber - 1);
|
||||
|
||||
var siteIds = Enumerable.Range(0, 4).Select(i => currentSiteId + i).ToHashSet();
|
||||
|
||||
var siteDatas = GameData.UltraEndlessSiteData.Values
|
||||
.Where(site => siteIds.Contains(site.SiteID));
|
||||
|
||||
return siteDatas.Select(site => new UltraEndlessSite
|
||||
{
|
||||
SiteId = (uint)site.SiteID,
|
||||
FloorList =
|
||||
{
|
||||
GameData.UltraEndlessFloorData.Values
|
||||
.SelectMany(floorList => floorList)
|
||||
.Where(floor => floor.StageID == site.StageID)
|
||||
.Select(floor => new UltraEndlessFloor
|
||||
{
|
||||
Floor = (uint)floor.FloorID,
|
||||
MaxScore = site.SiteNodeName == "Area3" ? 0 : (uint)floor.MaxScore
|
||||
})
|
||||
}
|
||||
}).ToList();
|
||||
}
|
||||
}
|
||||
|
||||
public class WarshipAvatarData
|
||||
{
|
||||
public int FirstAvatarId { get; set; } = 101;
|
||||
public int SecondAvatarId { get; set; } = 0;
|
||||
}
|
||||
|
||||
public class UltraEndless
|
||||
{
|
||||
public int SiteId { get; set; } = 6691;
|
||||
public int GroupLevel { get; set; } = 8;
|
||||
public int DynamicHard { get; set; } = 100;
|
||||
|
||||
}
|
||||
@@ -44,6 +44,9 @@ public class WordTextEN
|
||||
public string Activity => "Activity";
|
||||
public string Elf => "Elf";
|
||||
public string Dress => "Outfit";
|
||||
public string Bracket => "Bracket";
|
||||
public string Disturbance => "Disturbance";
|
||||
public string Site => "Site";
|
||||
|
||||
// server info
|
||||
public string Config => "Config File";
|
||||
@@ -80,7 +83,9 @@ public class CommandTextEN
|
||||
public HelpTextEN Help { get; } = new();
|
||||
public ValkTextEN Valk { get; } = new();
|
||||
public GiveAllTextEN GiveAll { get; } = new();
|
||||
public ElfTextEN Elf { get; } = new();
|
||||
public ElfTextEN Elf { get; } = new();
|
||||
public AbyssTextEN Abyss { get; } = new();
|
||||
public EndlessTextEN Endless { get; } = new();
|
||||
}
|
||||
|
||||
#endregion
|
||||
@@ -236,6 +241,37 @@ public class ElfTextEN
|
||||
public string ElfSetStar => "Set Elf {0}'s Resonance to {1}!";
|
||||
}
|
||||
|
||||
/// <summary>
|
||||
/// path: Game.Command.Abyss
|
||||
/// </summary>
|
||||
public class AbyssTextEN
|
||||
{
|
||||
public string Desc => "Set abyss disturbance,bracket,site \n";
|
||||
|
||||
public string Usage =>
|
||||
"Usage: /abyss bracket [1-9]\n\n" +
|
||||
"Usage: /abyss temp [value]\n\n" +
|
||||
"Usage: /abyss site [siteId]\n";
|
||||
|
||||
public string Success => "Success set {0}";
|
||||
public string AreaNotFound => "SiteId Not Found";
|
||||
}
|
||||
|
||||
/// <summary>
|
||||
/// path: Game.Command.Endless
|
||||
/// </summary>
|
||||
public class EndlessTextEN
|
||||
{
|
||||
public string Desc => "Set Memorial Arena boss \n";
|
||||
|
||||
public string Usage =>
|
||||
"Usage: /endless [bossid1] [bossid2] [bossid3]\n\n" +
|
||||
"/endless 1001 1002 1003";
|
||||
|
||||
public string Success => "Success set Memorial Arena Boss";
|
||||
public string NotFound => "BossId Not Found";
|
||||
}
|
||||
|
||||
#endregion
|
||||
|
||||
#endregion
|
||||
Reference in New Issue
Block a user