chore: initialize OshimaBot repository (rename from Enhancement)

This commit is contained in:
2026-11-09 19:38:28 +08:00
commit f9052358a9
414 changed files with 36653 additions and 0 deletions
@@ -0,0 +1,56 @@
using FunGame.Core.Api;
using FunGame.Core.Entity;
using FunGame.Core.Library.Constant;
namespace OshimaBot.Content.Units
{
public class RegionCharacter : Character
{
public HashSet<Func<Region, bool>> GenerationPredicates { get; } = [];
public RegionCharacter(long id, string name, params IEnumerable<Func<Region, bool>> predicates)
{
Id = id;
Name = name;
NickName = name;
PrimaryAttribute = (PrimaryAttribute)Random.Next(1, 4);
InitialATK = Random.Next(55, 101);
InitialHP = Random.Next(80, 201);
InitialMP = Random.Next(50, 131);
int value = 61;
int valueGrowth = 61;
for (int i = 0; i < 3; i++)
{
if (value == 0) break;
int attribute = i < 2 ? Random.Next(value) : (value - 1);
int growth = i < 2 ? Random.Next(0, valueGrowth) : (valueGrowth - 1);
switch (i)
{
case 1:
InitialAGI = attribute;
AGIGrowth = Calculation.Round(Convert.ToDouble(growth) / 10, 2);
break;
case 2:
InitialINT = attribute;
INTGrowth = Calculation.Round(Convert.ToDouble(growth) / 10, 2);
break;
case 0:
default:
InitialSTR = attribute;
STRGrowth = Calculation.Round(Convert.ToDouble(growth) / 10, 2);
break;
}
value -= attribute;
valueGrowth -= growth;
}
InitialSPD = Random.Next(220, 451);
InitialHR = Random.Next(3, 9);
InitialMR = Random.Next(3, 9);
foreach (Func<Region, bool> predicate in predicates)
{
GenerationPredicates.Add(predicate);
}
}
}
}
+26
View File
@@ -0,0 +1,26 @@
using FunGame.Core.Entity;
namespace OshimaBot.Content.Units
{
public class RegionUnit : Unit
{
public override bool IsUnit => false; // 不走单位判断
public HashSet<Func<Region, bool>> GenerationPredicates { get; } = [];
public RegionUnit(long id, string name, params IEnumerable<Func<Region, bool>> predicates)
{
Id = id;
Name = name;
InitialATK = Random.Next(25, 51);
InitialHP = Random.Next(35, 91);
InitialMP = Random.Next(20, 61);
InitialSPD = Random.Next(155, 320);
InitialHR = Random.Next(1, 6);
InitialMR = Random.Next(1, 6);
foreach (Func<Region, bool> predicate in predicates)
{
GenerationPredicates.Add(predicate);
}
}
}
}
+22
View File
@@ -0,0 +1,22 @@
using FunGame.Core.Entity;
namespace OshimaBot.Content
{
public class 雇佣兵 : Unit
{
public override string Name => "雇佣兵";
public override string ToString()
{
return NickName;
}
public 雇佣兵(Character master, string name) : base()
{
NickName = $"雇佣兵{name}({master})";
Master = master;
ExATR = master.ExATR - master.ATR;
ExMOV = master.ExMOV - master.MOV;
}
}
}