From 27df05d6c2ed41b132cb1043ad8249604dcd264f Mon Sep 17 00:00:00 2001 From: milimoe Date: Fri, 25 Oct 2024 19:40:19 +0800 Subject: [PATCH] =?UTF-8?q?=E6=B7=BB=E5=8A=A0=E5=8A=A8=E6=80=81=E7=A9=BA?= =?UTF-8?q?=E6=8A=95?= MIME-Version: 1.0 Content-Type: text/plain; charset=UTF-8 Content-Transfer-Encoding: 8bit --- OshimaCore/Utils/FunGameUtil.cs | 42 ++++++++++++++------ OshimaModules/Skills/MagicalGirl/绝对领域.cs | 2 +- 2 files changed, 30 insertions(+), 14 deletions(-) diff --git a/OshimaCore/Utils/FunGameUtil.cs b/OshimaCore/Utils/FunGameUtil.cs index 97d1550..68a6798 100644 --- a/OshimaCore/Utils/FunGameUtil.cs +++ b/OshimaCore/Utils/FunGameUtil.cs @@ -1,8 +1,8 @@ using System.Text; using Milimoe.FunGame.Core.Api.Utility; using Milimoe.FunGame.Core.Entity; -using Milimoe.FunGame.Core.Library.Constant; using Milimoe.FunGame.Core.Model; +using Oshima.FunGame.OshimaModules; using Oshima.FunGame.OshimaModules.Characters; using Oshima.FunGame.OshimaModules.Items; using Oshima.FunGame.OshimaModules.Skills; @@ -29,6 +29,7 @@ namespace Oshima.Core.Utils } public static List Characters { get; } = []; + public static List Items { get; } = []; public static Dictionary CharacterStatistics { get; } = []; public static PluginConfig StatsConfig { get; } = new(nameof(FunGameSimulation), nameof(CharacterStatistics)); public static bool IsRuning { get; set; } = false; @@ -306,8 +307,9 @@ namespace Oshima.Core.Utils // 开始空投 Msg = ""; - 空投(actionQueue, totalTime); + 空投(actionQueue); if (isWeb) result.Add("=== 空投 ===\r\n" + Msg); + double 下一次空投 = 80; // 总回合数 int i = 1; @@ -356,7 +358,18 @@ namespace Oshima.Core.Utils } // 模拟时间流逝 - totalTime += actionQueue.TimeLapse(); + double timeLapse = actionQueue.TimeLapse(); + totalTime += timeLapse; + 下一次空投 -= timeLapse; + + if (下一次空投 <= 0) + { + // 空投 + Msg = ""; + 空投(actionQueue); + if (isWeb) result.Add("=== 空投 ===\r\n" + Msg); + 下一次空投 = 100; + } if (actionQueue.Eliminated.Count > deaths) { @@ -493,21 +506,20 @@ namespace Oshima.Core.Utils if (PrintOut) Console.WriteLine(str); } - public static void 空投(ActionQueue queue, double totalTime) + public static void 空投(ActionQueue queue) { - Item[] 这次发放的空投; - if (totalTime == 0) + Item a = Items[Random.Shared.Next(Items.Count)]; + a.SetGamingQueue(queue); + Item[] 这次发放的空投 = [a]; + WriteLine($"社区送温暖了,现在向所有人发放 [ {a.Name} ]!!"); + foreach (Character character in queue.Queue) { - WriteLine("社区送温暖了,现在向所有人发放 [ 攻击之爪 +50 ]!!"); - foreach (Character character in queue.Queue) + foreach (Item item in 这次发放的空投) { - 这次发放的空投 = [new 攻击之爪50()]; - foreach (Item item in 这次发放的空投) - { - queue.Equip(character, EquipItemToSlot.Accessory1, item); - } + queue.Equip(character, item.Copy(1)); } } + WriteLine(""); } public static void InitCharacter() @@ -538,6 +550,10 @@ namespace Oshima.Core.Utils CharacterStatistics[character] = StatsConfig.Get(character.ToStringWithOutUser()) ?? CharacterStatistics[character]; } } + + Dictionary exItems = Factory.GetGameModuleInstances(OshimaGameModuleConstant.General, OshimaGameModuleConstant.Item); + Items.AddRange(exItems.Values); + Items.AddRange([new 攻击之爪10(), new 攻击之爪30(), new 攻击之爪50()]); } } } diff --git a/OshimaModules/Skills/MagicalGirl/绝对领域.cs b/OshimaModules/Skills/MagicalGirl/绝对领域.cs index f14423e..71d6f0e 100644 --- a/OshimaModules/Skills/MagicalGirl/绝对领域.cs +++ b/OshimaModules/Skills/MagicalGirl/绝对领域.cs @@ -27,7 +27,7 @@ namespace Oshima.FunGame.OshimaModules.Skills public override bool Durative => true; public override double Duration => 16 + 释放时的能量值 * 0.03; - private double 系数 => 0.3 + 0.03 * (Level - 1); + private double 系数 => 0.2 + 0.015 * (Level - 1); private double 敏捷提升 => 系数 * Skill.Character?.BaseAGI ?? 0; private double 实际敏捷提升 = 0; private double 释放时的能量值 = 0;