更新游戏平衡常数

This commit is contained in:
milimoe 2024-12-13 01:47:18 +08:00
parent 4095c74d9e
commit cfc21eb960
Signed by: milimoe
GPG Key ID: 05D280912DA6C69E
2 changed files with 23 additions and 8 deletions

View File

@ -17,6 +17,8 @@ namespace Oshima.Core.Utils
public static List<Skill> Magics { get; } = []; public static List<Skill> Magics { get; } = [];
public static List<Item> Equipment { get; } = []; public static List<Item> Equipment { get; } = [];
public static List<Item> Items { get; } = []; public static List<Item> Items { get; } = [];
public static List<Skill> ItemSkills { get; } = [];
public static List<Item> AllItems { get; } = [];
public static Dictionary<long, string> UserIdAndUsername { get; } = []; public static Dictionary<long, string> UserIdAndUsername { get; } = [];
public static void InitFunGame() public static void InitFunGame()
@ -34,16 +36,29 @@ namespace Oshima.Core.Utils
Characters.Add(new dddovo()); Characters.Add(new dddovo());
Characters.Add(new Quduoduo()); Characters.Add(new Quduoduo());
Skills.AddRange([new ()]);
Magics.AddRange([new (), new (), new (), new (), new (), new (), new (), new (), new (), new (),
new (), new (), new (), new ()]);
Dictionary<string, Item> exItems = Factory.GetGameModuleInstances<Item>(OshimaGameModuleConstant.General, OshimaGameModuleConstant.Item); Dictionary<string, Item> exItems = Factory.GetGameModuleInstances<Item>(OshimaGameModuleConstant.General, OshimaGameModuleConstant.Item);
Equipment.AddRange(exItems.Values.Where(i => (int)i.ItemType >= 0 && (int)i.ItemType < 5)); Equipment.AddRange(exItems.Values.Where(i => (int)i.ItemType >= 0 && (int)i.ItemType < 5));
Equipment.AddRange([new 5(), new 15(), new 25(), new 35()]); Equipment.AddRange([new 5(), new 15(), new 25(), new 35()]);
Items.AddRange(exItems.Values.Where(i => (int)i.ItemType > 4)); Items.AddRange(exItems.Values.Where(i => (int)i.ItemType > 4));
Skills.AddRange([new ()]); AllItems.AddRange(Equipment);
AllItems.AddRange(Items);
Magics.AddRange([new (), new (), new (), new (), new (), new (), new (), new (), new (), new (), Skill?[] activeSkills = [.. Equipment.Select(i => i.Skills.Active), .. Items.Select(i => i.Skills.Active)];
new (), new (), new (), new ()]); foreach (Skill? skill in activeSkills)
{
if (skill != null)
{
ItemSkills.Add(skill);
}
}
ItemSkills.AddRange([.. Equipment.SelectMany(i => i.Skills.Passives), .. Items.SelectMany(i => i.Skills.Passives)]);
} }
public static List<Item> GenerateMagicCards(int count, QualityType? qualityType = null) public static List<Item> GenerateMagicCards(int count, QualityType? qualityType = null)
@ -57,7 +72,7 @@ namespace Oshima.Core.Utils
return items; return items;
} }
public static Item GenerateMagicCard(QualityType? qualityType = null) public static Item GenerateMagicCard(QualityType? qualityType = null)
{ {
Item item = Factory.GetItem(); Item item = Factory.GetItem();
@ -370,7 +385,7 @@ namespace Oshima.Core.Utils
return name.ToString(); return name.ToString();
} }
public static string GenerateRandomChineseUserName() public static string GenerateRandomChineseUserName()
{ {
string[] commonSurnames = [ string[] commonSurnames = [
@ -428,14 +443,14 @@ namespace Oshima.Core.Utils
foreach (Character inventoryCharacter in characters) foreach (Character inventoryCharacter in characters)
{ {
Character realCharacter = CharacterBuilder.Build(inventoryCharacter, false, Items, Skills); Character realCharacter = CharacterBuilder.Build(inventoryCharacter, false, [.. Equipment, .. Items], ItemSkills);
realCharacter.User = user; realCharacter.User = user;
user.Inventory.Characters.Add(realCharacter); user.Inventory.Characters.Add(realCharacter);
} }
foreach (Item inventoryItem in items) foreach (Item inventoryItem in items)
{ {
Item realItem = inventoryItem.Copy(true, true, true, Items, Skills); Item realItem = inventoryItem.Copy(true, true, true, [.. Equipment, .. Items], ItemSkills);
if (realItem.IsEquipment) if (realItem.IsEquipment)
{ {
IEnumerable<Character> has = user.Inventory.Characters.Where(character => IEnumerable<Character> has = user.Inventory.Characters.Where(character =>

View File

@ -16,8 +16,8 @@ namespace Oshima.FunGame.OshimaModules.Skills
public (Character? character = null) : base(SkillType.Magic, character) public (Character? character = null) : base(SkillType.Magic, character)
{ {
Effects.Add(new _带基础伤害(this, 40, 40, 0.3, 0.25));
Effects.Add(new (this, true, 15, 0)); Effects.Add(new (this, true, 15, 0));
Effects.Add(new _带基础伤害(this, 40, 40, 0.3, 0.25));
} }
} }
} }