mirror of
https://github.com/oshima-studios/OshimaGameModule.git
synced 2025-04-20 10:59:33 +08:00
更新角色、技能、物品;初始化UI
This commit is contained in:
parent
6932bf14a3
commit
5511c00917
@ -1,18 +0,0 @@
|
||||
using Milimoe.FunGame.Core.Entity;
|
||||
using Milimoe.FunGame.Core.Library.Constant;
|
||||
|
||||
namespace Milimoe.FunGame.GameMode.OfficialStandard.Characters
|
||||
{
|
||||
public class ColdBlue : Character
|
||||
{
|
||||
public ColdBlue() : base()
|
||||
{
|
||||
Name = "Cold Blue";
|
||||
FirstName = "冷蓝";
|
||||
FirstRoleType = RoleType.Guardian;
|
||||
STR = 9;
|
||||
AGI = 3;
|
||||
INT = 3;
|
||||
}
|
||||
}
|
||||
}
|
@ -1,18 +0,0 @@
|
||||
using Milimoe.FunGame.Core.Entity;
|
||||
using Milimoe.FunGame.Core.Library.Constant;
|
||||
|
||||
namespace Milimoe.FunGame.GameMode.OfficialStandard.Characters
|
||||
{
|
||||
public class DokyoMayor : Character
|
||||
{
|
||||
public DokyoMayor() : base()
|
||||
{
|
||||
Name = "Dokyo Mayor";
|
||||
FirstName = "铎京市长";
|
||||
FirstRoleType = RoleType.Core;
|
||||
STR = 4;
|
||||
AGI = 9;
|
||||
INT = 1;
|
||||
}
|
||||
}
|
||||
}
|
@ -1,18 +0,0 @@
|
||||
using Milimoe.FunGame.Core.Entity;
|
||||
using Milimoe.FunGame.Core.Library.Constant;
|
||||
|
||||
namespace Milimoe.FunGame.GameMode.OfficialStandard.Characters
|
||||
{
|
||||
public class Kirayinna : Character
|
||||
{
|
||||
public Kirayinna() : base()
|
||||
{
|
||||
Name = "Kirayinna";
|
||||
FirstName = "清香";
|
||||
FirstRoleType = RoleType.Assistant;
|
||||
STR = 3;
|
||||
AGI = 2;
|
||||
INT = 10;
|
||||
}
|
||||
}
|
||||
}
|
@ -1,18 +0,0 @@
|
||||
using Milimoe.FunGame.Core.Entity;
|
||||
using Milimoe.FunGame.Core.Library.Constant;
|
||||
|
||||
namespace Milimoe.FunGame.GameMode.OfficialStandard.Characters
|
||||
{
|
||||
public class MagicGirl : Character
|
||||
{
|
||||
public MagicGirl() : base()
|
||||
{
|
||||
Name = "Magic Girl";
|
||||
FirstName = "魔法少女";
|
||||
FirstRoleType = RoleType.Core;
|
||||
STR = 3;
|
||||
AGI = 8;
|
||||
INT = 4;
|
||||
}
|
||||
}
|
||||
}
|
@ -1,18 +0,0 @@
|
||||
using Milimoe.FunGame.Core.Entity;
|
||||
using Milimoe.FunGame.Core.Library.Constant;
|
||||
|
||||
namespace Milimoe.FunGame.GameMode.OfficialStandard.Characters
|
||||
{
|
||||
public class NanGanYu : Character
|
||||
{
|
||||
public NanGanYu() : base()
|
||||
{
|
||||
Name = "NanGanYu";
|
||||
FirstName = "男甘雨";
|
||||
FirstRoleType = RoleType.Logistics;
|
||||
STR = 4;
|
||||
AGI = 2;
|
||||
INT = 9;
|
||||
}
|
||||
}
|
||||
}
|
@ -1,18 +0,0 @@
|
||||
using Milimoe.FunGame.Core.Entity;
|
||||
using Milimoe.FunGame.Core.Library.Constant;
|
||||
|
||||
namespace Milimoe.FunGame.GameMode.OfficialStandard.Characters
|
||||
{
|
||||
public class NiuNan : Character
|
||||
{
|
||||
public NiuNan() : base()
|
||||
{
|
||||
Name = "NiuNan";
|
||||
FirstName = "牛腩";
|
||||
FirstRoleType = RoleType.Logistics;
|
||||
STR = 0;
|
||||
AGI = 0;
|
||||
INT = 15;
|
||||
}
|
||||
}
|
||||
}
|
@ -1,18 +0,0 @@
|
||||
using Milimoe.FunGame.Core.Entity;
|
||||
using Milimoe.FunGame.Core.Library.Constant;
|
||||
|
||||
namespace Milimoe.FunGame.GameMode.OfficialStandard.Characters
|
||||
{
|
||||
public class Oshima : Character
|
||||
{
|
||||
public Oshima() : base()
|
||||
{
|
||||
Name = "Oshima";
|
||||
FirstName = "大島シヤ";
|
||||
FirstRoleType = RoleType.Vanguard;
|
||||
STR = 15;
|
||||
AGI = 5;
|
||||
INT = 0;
|
||||
}
|
||||
}
|
||||
}
|
@ -1,18 +0,0 @@
|
||||
using Milimoe.FunGame.Core.Entity;
|
||||
using Milimoe.FunGame.Core.Library.Constant;
|
||||
|
||||
namespace Milimoe.FunGame.GameMode.OfficialStandard.Characters
|
||||
{
|
||||
public class QWQAQW : Character
|
||||
{
|
||||
public QWQAQW() : base()
|
||||
{
|
||||
Name = "QWQAQW";
|
||||
FirstName = "脑婆";
|
||||
FirstRoleType = RoleType.Core;
|
||||
STR = 3;
|
||||
AGI = 10;
|
||||
INT = 2;
|
||||
}
|
||||
}
|
||||
}
|
@ -1,18 +0,0 @@
|
||||
using Milimoe.FunGame.Core.Entity;
|
||||
using Milimoe.FunGame.Core.Library.Constant;
|
||||
|
||||
namespace Milimoe.FunGame.GameMode.OfficialStandard.Characters
|
||||
{
|
||||
public class ThomasYang : Character
|
||||
{
|
||||
public ThomasYang() : base()
|
||||
{
|
||||
Name = "Thomas Yang";
|
||||
FirstName = "吖养";
|
||||
FirstRoleType = RoleType.Guardian;
|
||||
STR = 8;
|
||||
AGI = 1;
|
||||
INT = 6;
|
||||
}
|
||||
}
|
||||
}
|
@ -1,18 +0,0 @@
|
||||
using Milimoe.FunGame.Core.Entity;
|
||||
using Milimoe.FunGame.Core.Library.Constant;
|
||||
|
||||
namespace Milimoe.FunGame.GameMode.OfficialStandard.Characters
|
||||
{
|
||||
public class ZzxToT : Character
|
||||
{
|
||||
public ZzxToT() : base()
|
||||
{
|
||||
Name = "ZzxToT";
|
||||
FirstName = "趣多多";
|
||||
FirstRoleType = RoleType.Core;
|
||||
STR = 7;
|
||||
AGI = 7;
|
||||
INT = 1;
|
||||
}
|
||||
}
|
||||
}
|
@ -1,18 +0,0 @@
|
||||
using Milimoe.FunGame.Core.Entity;
|
||||
using Milimoe.FunGame.Core.Library.Constant;
|
||||
|
||||
namespace Milimoe.FunGame.GameMode.OfficialStandard.Characters
|
||||
{
|
||||
public class dddovo : Character
|
||||
{
|
||||
public dddovo() : base()
|
||||
{
|
||||
Name = "dddovo";
|
||||
FirstName = "绿拱门";
|
||||
FirstRoleType = RoleType.Core;
|
||||
STR = 5;
|
||||
AGI = 10;
|
||||
INT = 0;
|
||||
}
|
||||
}
|
||||
}
|
@ -1,25 +0,0 @@
|
||||
|
||||
Microsoft Visual Studio Solution File, Format Version 12.00
|
||||
# Visual Studio Version 17
|
||||
VisualStudioVersion = 17.8.34330.188
|
||||
MinimumVisualStudioVersion = 10.0.40219.1
|
||||
Project("{FAE04EC0-301F-11D3-BF4B-00C04F79EFBC}") = "OshimaCustomizedMode", "OshimaCustomizedMode.csproj", "{497E99F9-7EA4-498C-90C5-B5751B47B2BE}"
|
||||
EndProject
|
||||
Global
|
||||
GlobalSection(SolutionConfigurationPlatforms) = preSolution
|
||||
Debug|Any CPU = Debug|Any CPU
|
||||
Release|Any CPU = Release|Any CPU
|
||||
EndGlobalSection
|
||||
GlobalSection(ProjectConfigurationPlatforms) = postSolution
|
||||
{497E99F9-7EA4-498C-90C5-B5751B47B2BE}.Debug|Any CPU.ActiveCfg = Debug|Any CPU
|
||||
{497E99F9-7EA4-498C-90C5-B5751B47B2BE}.Debug|Any CPU.Build.0 = Debug|Any CPU
|
||||
{497E99F9-7EA4-498C-90C5-B5751B47B2BE}.Release|Any CPU.ActiveCfg = Release|Any CPU
|
||||
{497E99F9-7EA4-498C-90C5-B5751B47B2BE}.Release|Any CPU.Build.0 = Release|Any CPU
|
||||
EndGlobalSection
|
||||
GlobalSection(SolutionProperties) = preSolution
|
||||
HideSolutionNode = FALSE
|
||||
EndGlobalSection
|
||||
GlobalSection(ExtensibilityGlobals) = postSolution
|
||||
SolutionGuid = {B3F190BD-B445-4D80-99D7-5D2B59D038CA}
|
||||
EndGlobalSection
|
||||
EndGlobal
|
43
OshimaGameModule.sln
Normal file
43
OshimaGameModule.sln
Normal file
@ -0,0 +1,43 @@
|
||||
|
||||
Microsoft Visual Studio Solution File, Format Version 12.00
|
||||
# Visual Studio Version 17
|
||||
VisualStudioVersion = 17.8.34330.188
|
||||
MinimumVisualStudioVersion = 10.0.40219.1
|
||||
Project("{9A19103F-16F7-4668-BE54-9A1E7A4F7556}") = "OshimaModules", "OshimaModules\OshimaModules.csproj", "{497E99F9-7EA4-498C-90C5-B5751B47B2BE}"
|
||||
EndProject
|
||||
Project("{9A19103F-16F7-4668-BE54-9A1E7A4F7556}") = "OshimaMaps", "OshimaMaps\OshimaMaps.csproj", "{27847422-7671-4DF8-95EC-975A2E2F5631}"
|
||||
EndProject
|
||||
Project("{FAE04EC0-301F-11D3-BF4B-00C04F79EFBC}") = "OshimaModes", "OshimaModes\OshimaModes.csproj", "{74922E11-458E-4A91-8D11-BEC9F7758EEB}"
|
||||
EndProject
|
||||
Project("{FAE04EC0-301F-11D3-BF4B-00C04F79EFBC}") = "OshimaServers", "OshimaServers\OshimaServers.csproj", "{E8C696E0-96E4-45C3-8CB4-A02145179590}"
|
||||
EndProject
|
||||
Global
|
||||
GlobalSection(SolutionConfigurationPlatforms) = preSolution
|
||||
Debug|Any CPU = Debug|Any CPU
|
||||
Release|Any CPU = Release|Any CPU
|
||||
EndGlobalSection
|
||||
GlobalSection(ProjectConfigurationPlatforms) = postSolution
|
||||
{497E99F9-7EA4-498C-90C5-B5751B47B2BE}.Debug|Any CPU.ActiveCfg = Debug|Any CPU
|
||||
{497E99F9-7EA4-498C-90C5-B5751B47B2BE}.Debug|Any CPU.Build.0 = Debug|Any CPU
|
||||
{497E99F9-7EA4-498C-90C5-B5751B47B2BE}.Release|Any CPU.ActiveCfg = Release|Any CPU
|
||||
{497E99F9-7EA4-498C-90C5-B5751B47B2BE}.Release|Any CPU.Build.0 = Release|Any CPU
|
||||
{27847422-7671-4DF8-95EC-975A2E2F5631}.Debug|Any CPU.ActiveCfg = Debug|Any CPU
|
||||
{27847422-7671-4DF8-95EC-975A2E2F5631}.Debug|Any CPU.Build.0 = Debug|Any CPU
|
||||
{27847422-7671-4DF8-95EC-975A2E2F5631}.Release|Any CPU.ActiveCfg = Release|Any CPU
|
||||
{27847422-7671-4DF8-95EC-975A2E2F5631}.Release|Any CPU.Build.0 = Release|Any CPU
|
||||
{74922E11-458E-4A91-8D11-BEC9F7758EEB}.Debug|Any CPU.ActiveCfg = Debug|Any CPU
|
||||
{74922E11-458E-4A91-8D11-BEC9F7758EEB}.Debug|Any CPU.Build.0 = Debug|Any CPU
|
||||
{74922E11-458E-4A91-8D11-BEC9F7758EEB}.Release|Any CPU.ActiveCfg = Release|Any CPU
|
||||
{74922E11-458E-4A91-8D11-BEC9F7758EEB}.Release|Any CPU.Build.0 = Release|Any CPU
|
||||
{E8C696E0-96E4-45C3-8CB4-A02145179590}.Debug|Any CPU.ActiveCfg = Debug|Any CPU
|
||||
{E8C696E0-96E4-45C3-8CB4-A02145179590}.Debug|Any CPU.Build.0 = Debug|Any CPU
|
||||
{E8C696E0-96E4-45C3-8CB4-A02145179590}.Release|Any CPU.ActiveCfg = Release|Any CPU
|
||||
{E8C696E0-96E4-45C3-8CB4-A02145179590}.Release|Any CPU.Build.0 = Release|Any CPU
|
||||
EndGlobalSection
|
||||
GlobalSection(SolutionProperties) = preSolution
|
||||
HideSolutionNode = FALSE
|
||||
EndGlobalSection
|
||||
GlobalSection(ExtensibilityGlobals) = postSolution
|
||||
SolutionGuid = {B3F190BD-B445-4D80-99D7-5D2B59D038CA}
|
||||
EndGlobalSection
|
||||
EndGlobal
|
24
OshimaMaps/FastAutoMap.cs
Normal file
24
OshimaMaps/FastAutoMap.cs
Normal file
@ -0,0 +1,24 @@
|
||||
using Milimoe.FunGame.Core.Library.Common.Addon;
|
||||
using Oshima.FunGame.OshimaModules;
|
||||
|
||||
namespace Oshima.FunGame.OshimaMaps
|
||||
{
|
||||
public class FastAutoMap : GameMap
|
||||
{
|
||||
public override string Name => OshimaGameModuleConstant.FastAutoMap;
|
||||
|
||||
public override string Description => OshimaGameModuleConstant.Description;
|
||||
|
||||
public override string Version => OshimaGameModuleConstant.Version;
|
||||
|
||||
public override string Author => OshimaGameModuleConstant.Author;
|
||||
|
||||
public override float Length => 6;
|
||||
|
||||
public override float Width => 6;
|
||||
|
||||
public override float Height => 3;
|
||||
|
||||
public override float Size => 6;
|
||||
}
|
||||
}
|
23
OshimaMaps/OshimaMaps.csproj
Normal file
23
OshimaMaps/OshimaMaps.csproj
Normal file
@ -0,0 +1,23 @@
|
||||
<Project Sdk="Microsoft.NET.Sdk">
|
||||
|
||||
<PropertyGroup>
|
||||
<TargetFramework>net8.0</TargetFramework>
|
||||
<ImplicitUsings>enable</ImplicitUsings>
|
||||
<Nullable>enable</Nullable>
|
||||
<Company>Oshima Studios</Company>
|
||||
<Authors>Oshima Studios</Authors>
|
||||
<BaseOutputPath>..\bin\</BaseOutputPath>
|
||||
<RootNamespace>Oshima.FunGame.$(MSBuildProjectName.Replace(" ", "_"))</RootNamespace>
|
||||
</PropertyGroup>
|
||||
|
||||
<ItemGroup>
|
||||
<ProjectReference Include="..\OshimaModules\OshimaModules.csproj" />
|
||||
</ItemGroup>
|
||||
|
||||
<ItemGroup>
|
||||
<Reference Include="FunGame.Core">
|
||||
<HintPath>..\..\FunGame.Core\bin\Debug\net8.0\FunGame.Core.dll</HintPath>
|
||||
</Reference>
|
||||
</ItemGroup>
|
||||
|
||||
</Project>
|
65
OshimaModes/FastAuto.cs
Normal file
65
OshimaModes/FastAuto.cs
Normal file
@ -0,0 +1,65 @@
|
||||
using Milimoe.FunGame.Core.Api.Transmittal;
|
||||
using Milimoe.FunGame.Core.Api.Utility;
|
||||
using Milimoe.FunGame.Core.Interface;
|
||||
using Milimoe.FunGame.Core.Library.Common.Addon;
|
||||
using Milimoe.FunGame.Core.Library.Common.Event;
|
||||
using Milimoe.FunGame.Core.Library.Constant;
|
||||
using Milimoe.FunGame.Core.Model;
|
||||
using Oshima.FunGame.OshimaModules;
|
||||
|
||||
namespace Oshima.FunGame.OshimaModes
|
||||
{
|
||||
public class FastAuto : GameModule, IGamingUpdateInfoEvent
|
||||
{
|
||||
public override string Name => OshimaGameModuleConstant.FastAuto;
|
||||
public override string Description => OshimaGameModuleConstant.Description;
|
||||
public override string Version => OshimaGameModuleConstant.Version;
|
||||
public override string Author => OshimaGameModuleConstant.Author;
|
||||
public override string DefaultMap => OshimaGameModuleConstant.FastAutoMap;
|
||||
public override GameModuleDepend GameModuleDepend => OshimaGameModuleConstant.GameModuleDepend;
|
||||
public override RoomType RoomType => RoomType.FastAuto;
|
||||
public override bool HideMain => false;
|
||||
|
||||
public override void StartGame(Gaming instance, params object[] args)
|
||||
{
|
||||
try
|
||||
{
|
||||
DataRequest request = Controller.NewDataRequest(GamingType.Connect);
|
||||
request.AddRequestData("un", Session.LoginUserName);
|
||||
request.SendRequest();
|
||||
}
|
||||
catch (Exception e)
|
||||
{
|
||||
TXTHelper.AppendErrorLog(e.ToString());
|
||||
}
|
||||
}
|
||||
|
||||
public override void StartUI(params object[] args)
|
||||
{
|
||||
if (Application.MessageLoop)
|
||||
{
|
||||
FastAutoUI f = new();
|
||||
f.Invoke(f.Show);
|
||||
}
|
||||
else
|
||||
{
|
||||
ApplicationConfiguration.Initialize();
|
||||
Application.Run(new FastAutoUI());
|
||||
}
|
||||
}
|
||||
|
||||
|
||||
public void GamingUpdateInfoEvent(object sender, GamingEventArgs e, Dictionary<string, object> data)
|
||||
{
|
||||
try
|
||||
{
|
||||
string msg = (DataRequest.GetDictionaryJsonObject<string>(data, "msg") ?? "").Trim();
|
||||
if (msg != "") Controller.WriteLine(msg);
|
||||
}
|
||||
catch (Exception ex)
|
||||
{
|
||||
TXTHelper.AppendErrorLog(ex.ToString());
|
||||
}
|
||||
}
|
||||
}
|
||||
}
|
187
OshimaModes/FastAutoUI.Designer.cs
generated
Normal file
187
OshimaModes/FastAutoUI.Designer.cs
generated
Normal file
@ -0,0 +1,187 @@
|
||||
using System.Windows.Forms;
|
||||
|
||||
namespace Oshima.FunGame.OshimaModes
|
||||
{
|
||||
partial class FastAutoUI
|
||||
{
|
||||
/// <summary>
|
||||
/// Required designer variable.
|
||||
/// </summary>
|
||||
private System.ComponentModel.IContainer components = null;
|
||||
|
||||
/// <summary>
|
||||
/// Clean up any resources being used.
|
||||
/// </summary>
|
||||
/// <param name="disposing">true if managed resources should be disposed; otherwise, false.</param>
|
||||
protected override void Dispose(bool disposing)
|
||||
{
|
||||
if (disposing && (components != null))
|
||||
{
|
||||
components.Dispose();
|
||||
}
|
||||
base.Dispose(disposing);
|
||||
}
|
||||
|
||||
#region Windows Form Designer generated code
|
||||
|
||||
/// <summary>
|
||||
/// Required method for Designer support - do not modify
|
||||
/// the contents of this method with the code editor.
|
||||
/// </summary>
|
||||
private void InitializeComponent()
|
||||
{
|
||||
mainTableLayoutPanel = new TableLayoutPanel();
|
||||
flowLayoutPanel6 = new FlowLayoutPanel();
|
||||
flowLayoutPanel4 = new FlowLayoutPanel();
|
||||
flowLayoutPanel3 = new FlowLayoutPanel();
|
||||
leftTableLayoutPanel = new TableLayoutPanel();
|
||||
rightTableLayoutPanel = new TableLayoutPanel();
|
||||
richTextBox = new RichTextBox();
|
||||
flowLayoutPanel1 = new FlowLayoutPanel();
|
||||
flowLayoutPanel2 = new FlowLayoutPanel();
|
||||
flowLayoutPanel5 = new FlowLayoutPanel();
|
||||
mainTableLayoutPanel.SuspendLayout();
|
||||
SuspendLayout();
|
||||
//
|
||||
// mainTableLayoutPanel
|
||||
//
|
||||
mainTableLayoutPanel.ColumnCount = 3;
|
||||
mainTableLayoutPanel.ColumnStyles.Add(new ColumnStyle(SizeType.Percent, 25F));
|
||||
mainTableLayoutPanel.ColumnStyles.Add(new ColumnStyle(SizeType.Percent, 50F));
|
||||
mainTableLayoutPanel.ColumnStyles.Add(new ColumnStyle(SizeType.Percent, 25F));
|
||||
mainTableLayoutPanel.Controls.Add(flowLayoutPanel6, 2, 2);
|
||||
mainTableLayoutPanel.Controls.Add(flowLayoutPanel4, 2, 0);
|
||||
mainTableLayoutPanel.Controls.Add(flowLayoutPanel3, 0, 0);
|
||||
mainTableLayoutPanel.Controls.Add(leftTableLayoutPanel, 0, 1);
|
||||
mainTableLayoutPanel.Controls.Add(rightTableLayoutPanel, 2, 1);
|
||||
mainTableLayoutPanel.Controls.Add(richTextBox, 1, 1);
|
||||
mainTableLayoutPanel.Controls.Add(flowLayoutPanel1, 1, 2);
|
||||
mainTableLayoutPanel.Controls.Add(flowLayoutPanel2, 1, 0);
|
||||
mainTableLayoutPanel.Controls.Add(flowLayoutPanel5, 0, 2);
|
||||
mainTableLayoutPanel.Dock = DockStyle.Fill;
|
||||
mainTableLayoutPanel.Location = new Point(0, 0);
|
||||
mainTableLayoutPanel.Name = "mainTableLayoutPanel";
|
||||
mainTableLayoutPanel.RowCount = 3;
|
||||
mainTableLayoutPanel.RowStyles.Add(new RowStyle(SizeType.Percent, 10F));
|
||||
mainTableLayoutPanel.RowStyles.Add(new RowStyle(SizeType.Percent, 70F));
|
||||
mainTableLayoutPanel.RowStyles.Add(new RowStyle(SizeType.Percent, 20F));
|
||||
mainTableLayoutPanel.Size = new Size(1688, 943);
|
||||
mainTableLayoutPanel.TabIndex = 0;
|
||||
//
|
||||
// flowLayoutPanel6
|
||||
//
|
||||
flowLayoutPanel6.Dock = DockStyle.Fill;
|
||||
flowLayoutPanel6.Location = new Point(1269, 757);
|
||||
flowLayoutPanel6.Name = "flowLayoutPanel6";
|
||||
flowLayoutPanel6.Size = new Size(416, 183);
|
||||
flowLayoutPanel6.TabIndex = 8;
|
||||
//
|
||||
// flowLayoutPanel4
|
||||
//
|
||||
flowLayoutPanel4.Dock = DockStyle.Fill;
|
||||
flowLayoutPanel4.Location = new Point(1269, 3);
|
||||
flowLayoutPanel4.Name = "flowLayoutPanel4";
|
||||
flowLayoutPanel4.Size = new Size(416, 88);
|
||||
flowLayoutPanel4.TabIndex = 6;
|
||||
//
|
||||
// flowLayoutPanel3
|
||||
//
|
||||
flowLayoutPanel3.Dock = DockStyle.Fill;
|
||||
flowLayoutPanel3.Location = new Point(3, 3);
|
||||
flowLayoutPanel3.Name = "flowLayoutPanel3";
|
||||
flowLayoutPanel3.Size = new Size(416, 88);
|
||||
flowLayoutPanel3.TabIndex = 5;
|
||||
//
|
||||
// leftTableLayoutPanel
|
||||
//
|
||||
leftTableLayoutPanel.Anchor = AnchorStyles.Top | AnchorStyles.Bottom | AnchorStyles.Left | AnchorStyles.Right;
|
||||
leftTableLayoutPanel.ColumnCount = 2;
|
||||
leftTableLayoutPanel.ColumnStyles.Add(new ColumnStyle(SizeType.Percent, 50F));
|
||||
leftTableLayoutPanel.ColumnStyles.Add(new ColumnStyle(SizeType.Percent, 50F));
|
||||
leftTableLayoutPanel.Location = new Point(3, 97);
|
||||
leftTableLayoutPanel.Name = "leftTableLayoutPanel";
|
||||
leftTableLayoutPanel.RowCount = 3;
|
||||
leftTableLayoutPanel.RowStyles.Add(new RowStyle(SizeType.Percent, 33.33F));
|
||||
leftTableLayoutPanel.RowStyles.Add(new RowStyle(SizeType.Percent, 33.33F));
|
||||
leftTableLayoutPanel.RowStyles.Add(new RowStyle(SizeType.Percent, 33.33F));
|
||||
leftTableLayoutPanel.Size = new Size(416, 654);
|
||||
leftTableLayoutPanel.TabIndex = 0;
|
||||
//
|
||||
// rightTableLayoutPanel
|
||||
//
|
||||
rightTableLayoutPanel.Anchor = AnchorStyles.Top | AnchorStyles.Bottom | AnchorStyles.Left | AnchorStyles.Right;
|
||||
rightTableLayoutPanel.ColumnCount = 2;
|
||||
rightTableLayoutPanel.ColumnStyles.Add(new ColumnStyle(SizeType.Percent, 50F));
|
||||
rightTableLayoutPanel.ColumnStyles.Add(new ColumnStyle(SizeType.Percent, 50F));
|
||||
rightTableLayoutPanel.Location = new Point(1269, 97);
|
||||
rightTableLayoutPanel.Name = "rightTableLayoutPanel";
|
||||
rightTableLayoutPanel.RowCount = 3;
|
||||
rightTableLayoutPanel.RowStyles.Add(new RowStyle(SizeType.Percent, 33.33F));
|
||||
rightTableLayoutPanel.RowStyles.Add(new RowStyle(SizeType.Percent, 33.33F));
|
||||
rightTableLayoutPanel.RowStyles.Add(new RowStyle(SizeType.Percent, 33.33F));
|
||||
rightTableLayoutPanel.Size = new Size(416, 654);
|
||||
rightTableLayoutPanel.TabIndex = 1;
|
||||
//
|
||||
// richTextBox
|
||||
//
|
||||
richTextBox.Dock = DockStyle.Fill;
|
||||
richTextBox.Location = new Point(425, 97);
|
||||
richTextBox.Name = "richTextBox";
|
||||
richTextBox.ReadOnly = true;
|
||||
richTextBox.Size = new Size(838, 654);
|
||||
richTextBox.TabIndex = 2;
|
||||
richTextBox.Text = "";
|
||||
//
|
||||
// flowLayoutPanel1
|
||||
//
|
||||
flowLayoutPanel1.Dock = DockStyle.Fill;
|
||||
flowLayoutPanel1.Location = new Point(425, 757);
|
||||
flowLayoutPanel1.Name = "flowLayoutPanel1";
|
||||
flowLayoutPanel1.Size = new Size(838, 183);
|
||||
flowLayoutPanel1.TabIndex = 3;
|
||||
//
|
||||
// flowLayoutPanel2
|
||||
//
|
||||
flowLayoutPanel2.Dock = DockStyle.Fill;
|
||||
flowLayoutPanel2.Location = new Point(425, 3);
|
||||
flowLayoutPanel2.Name = "flowLayoutPanel2";
|
||||
flowLayoutPanel2.Size = new Size(838, 88);
|
||||
flowLayoutPanel2.TabIndex = 4;
|
||||
//
|
||||
// flowLayoutPanel5
|
||||
//
|
||||
flowLayoutPanel5.Dock = DockStyle.Fill;
|
||||
flowLayoutPanel5.Location = new Point(3, 757);
|
||||
flowLayoutPanel5.Name = "flowLayoutPanel5";
|
||||
flowLayoutPanel5.Size = new Size(416, 183);
|
||||
flowLayoutPanel5.TabIndex = 7;
|
||||
//
|
||||
// FastAutoUI
|
||||
//
|
||||
AutoScaleDimensions = new SizeF(7F, 17F);
|
||||
AutoScaleMode = AutoScaleMode.Font;
|
||||
ClientSize = new Size(1688, 943);
|
||||
Controls.Add(mainTableLayoutPanel);
|
||||
FormBorderStyle = FormBorderStyle.FixedSingle;
|
||||
MaximizeBox = false;
|
||||
Name = "FastAutoUI";
|
||||
Text = "游戏界面";
|
||||
mainTableLayoutPanel.ResumeLayout(false);
|
||||
ResumeLayout(false);
|
||||
}
|
||||
|
||||
private System.Windows.Forms.TableLayoutPanel mainTableLayoutPanel;
|
||||
private System.Windows.Forms.TableLayoutPanel leftTableLayoutPanel;
|
||||
private System.Windows.Forms.TableLayoutPanel rightTableLayoutPanel;
|
||||
private System.Windows.Forms.RichTextBox richTextBox;
|
||||
|
||||
#endregion
|
||||
|
||||
private FlowLayoutPanel flowLayoutPanel4;
|
||||
private FlowLayoutPanel flowLayoutPanel3;
|
||||
private FlowLayoutPanel flowLayoutPanel1;
|
||||
private FlowLayoutPanel flowLayoutPanel2;
|
||||
private FlowLayoutPanel flowLayoutPanel6;
|
||||
private FlowLayoutPanel flowLayoutPanel5;
|
||||
}
|
||||
}
|
57
OshimaModes/FastAutoUI.cs
Normal file
57
OshimaModes/FastAutoUI.cs
Normal file
@ -0,0 +1,57 @@
|
||||
namespace Oshima.FunGame.OshimaModes
|
||||
{
|
||||
public partial class FastAutoUI : Form
|
||||
{
|
||||
public FastAutoUI()
|
||||
{
|
||||
InitializeComponent();
|
||||
|
||||
// 根据玩家数量,添加格子
|
||||
AddPlayers(7);
|
||||
}
|
||||
|
||||
// 动态添加玩家格子
|
||||
private void AddPlayers(int playerCount)
|
||||
{
|
||||
int leftIndex = 0; // 左侧的奇数玩家计数器
|
||||
int rightIndex = 0; // 右侧的偶数玩家计数器
|
||||
|
||||
for (int i = 1; i <= playerCount; i++)
|
||||
{
|
||||
// 每个格子用Button表示
|
||||
CharacterStatus playerSlot = new();
|
||||
|
||||
if (i % 2 == 1) // 奇数玩家,左侧
|
||||
{
|
||||
AddToLeftPanel(playerSlot, leftIndex);
|
||||
leftIndex++;
|
||||
}
|
||||
else // 偶数玩家,右侧
|
||||
{
|
||||
AddToRightPanel(playerSlot, rightIndex);
|
||||
rightIndex++;
|
||||
}
|
||||
}
|
||||
}
|
||||
|
||||
// 添加奇数玩家到左侧TableLayoutPanel
|
||||
private void AddToLeftPanel(Control control, int index)
|
||||
{
|
||||
int col = index / 3; // 每列容纳3个玩家
|
||||
int row = index % 3; // 行号从0到2
|
||||
leftTableLayoutPanel.Controls.Add(control, col, row);
|
||||
}
|
||||
|
||||
// 添加偶数玩家到右侧TableLayoutPanel
|
||||
private void AddToRightPanel(Control control, int index)
|
||||
{
|
||||
// 偶数玩家的排列规则:
|
||||
// - 第一列: Player 10, Player 11, Player 12 (根据index从3开始)
|
||||
// - 第二列: Player 2, Player 4, Player 6 (根据index从0开始)
|
||||
|
||||
int col = (index >= 3) ? 0 : 1; // 超过 3 位玩家的偶数编号应该在第一列,否则在第二列
|
||||
int row = index % 3; // 行号从0到2
|
||||
rightTableLayoutPanel.Controls.Add(control, col, row);
|
||||
}
|
||||
}
|
||||
}
|
120
OshimaModes/FastAutoUI.resx
Normal file
120
OshimaModes/FastAutoUI.resx
Normal file
@ -0,0 +1,120 @@
|
||||
<?xml version="1.0" encoding="utf-8"?>
|
||||
<root>
|
||||
<!--
|
||||
Microsoft ResX Schema
|
||||
|
||||
Version 2.0
|
||||
|
||||
The primary goals of this format is to allow a simple XML format
|
||||
that is mostly human readable. The generation and parsing of the
|
||||
various data types are done through the TypeConverter classes
|
||||
associated with the data types.
|
||||
|
||||
Example:
|
||||
|
||||
... ado.net/XML headers & schema ...
|
||||
<resheader name="resmimetype">text/microsoft-resx</resheader>
|
||||
<resheader name="version">2.0</resheader>
|
||||
<resheader name="reader">System.Resources.ResXResourceReader, System.Windows.Forms, ...</resheader>
|
||||
<resheader name="writer">System.Resources.ResXResourceWriter, System.Windows.Forms, ...</resheader>
|
||||
<data name="Name1"><value>this is my long string</value><comment>this is a comment</comment></data>
|
||||
<data name="Color1" type="System.Drawing.Color, System.Drawing">Blue</data>
|
||||
<data name="Bitmap1" mimetype="application/x-microsoft.net.object.binary.base64">
|
||||
<value>[base64 mime encoded serialized .NET Framework object]</value>
|
||||
</data>
|
||||
<data name="Icon1" type="System.Drawing.Icon, System.Drawing" mimetype="application/x-microsoft.net.object.bytearray.base64">
|
||||
<value>[base64 mime encoded string representing a byte array form of the .NET Framework object]</value>
|
||||
<comment>This is a comment</comment>
|
||||
</data>
|
||||
|
||||
There are any number of "resheader" rows that contain simple
|
||||
name/value pairs.
|
||||
|
||||
Each data row contains a name, and value. The row also contains a
|
||||
type or mimetype. Type corresponds to a .NET class that support
|
||||
text/value conversion through the TypeConverter architecture.
|
||||
Classes that don't support this are serialized and stored with the
|
||||
mimetype set.
|
||||
|
||||
The mimetype is used for serialized objects, and tells the
|
||||
ResXResourceReader how to depersist the object. This is currently not
|
||||
extensible. For a given mimetype the value must be set accordingly:
|
||||
|
||||
Note - application/x-microsoft.net.object.binary.base64 is the format
|
||||
that the ResXResourceWriter will generate, however the reader can
|
||||
read any of the formats listed below.
|
||||
|
||||
mimetype: application/x-microsoft.net.object.binary.base64
|
||||
value : The object must be serialized with
|
||||
: System.Runtime.Serialization.Formatters.Binary.BinaryFormatter
|
||||
: and then encoded with base64 encoding.
|
||||
|
||||
mimetype: application/x-microsoft.net.object.soap.base64
|
||||
value : The object must be serialized with
|
||||
: System.Runtime.Serialization.Formatters.Soap.SoapFormatter
|
||||
: and then encoded with base64 encoding.
|
||||
|
||||
mimetype: application/x-microsoft.net.object.bytearray.base64
|
||||
value : The object must be serialized into a byte array
|
||||
: using a System.ComponentModel.TypeConverter
|
||||
: and then encoded with base64 encoding.
|
||||
-->
|
||||
<xsd:schema id="root" xmlns="" xmlns:xsd="http://www.w3.org/2001/XMLSchema" xmlns:msdata="urn:schemas-microsoft-com:xml-msdata">
|
||||
<xsd:import namespace="http://www.w3.org/XML/1998/namespace" />
|
||||
<xsd:element name="root" msdata:IsDataSet="true">
|
||||
<xsd:complexType>
|
||||
<xsd:choice maxOccurs="unbounded">
|
||||
<xsd:element name="metadata">
|
||||
<xsd:complexType>
|
||||
<xsd:sequence>
|
||||
<xsd:element name="value" type="xsd:string" minOccurs="0" />
|
||||
</xsd:sequence>
|
||||
<xsd:attribute name="name" use="required" type="xsd:string" />
|
||||
<xsd:attribute name="type" type="xsd:string" />
|
||||
<xsd:attribute name="mimetype" type="xsd:string" />
|
||||
<xsd:attribute ref="xml:space" />
|
||||
</xsd:complexType>
|
||||
</xsd:element>
|
||||
<xsd:element name="assembly">
|
||||
<xsd:complexType>
|
||||
<xsd:attribute name="alias" type="xsd:string" />
|
||||
<xsd:attribute name="name" type="xsd:string" />
|
||||
</xsd:complexType>
|
||||
</xsd:element>
|
||||
<xsd:element name="data">
|
||||
<xsd:complexType>
|
||||
<xsd:sequence>
|
||||
<xsd:element name="value" type="xsd:string" minOccurs="0" msdata:Ordinal="1" />
|
||||
<xsd:element name="comment" type="xsd:string" minOccurs="0" msdata:Ordinal="2" />
|
||||
</xsd:sequence>
|
||||
<xsd:attribute name="name" type="xsd:string" use="required" msdata:Ordinal="1" />
|
||||
<xsd:attribute name="type" type="xsd:string" msdata:Ordinal="3" />
|
||||
<xsd:attribute name="mimetype" type="xsd:string" msdata:Ordinal="4" />
|
||||
<xsd:attribute ref="xml:space" />
|
||||
</xsd:complexType>
|
||||
</xsd:element>
|
||||
<xsd:element name="resheader">
|
||||
<xsd:complexType>
|
||||
<xsd:sequence>
|
||||
<xsd:element name="value" type="xsd:string" minOccurs="0" msdata:Ordinal="1" />
|
||||
</xsd:sequence>
|
||||
<xsd:attribute name="name" type="xsd:string" use="required" />
|
||||
</xsd:complexType>
|
||||
</xsd:element>
|
||||
</xsd:choice>
|
||||
</xsd:complexType>
|
||||
</xsd:element>
|
||||
</xsd:schema>
|
||||
<resheader name="resmimetype">
|
||||
<value>text/microsoft-resx</value>
|
||||
</resheader>
|
||||
<resheader name="version">
|
||||
<value>2.0</value>
|
||||
</resheader>
|
||||
<resheader name="reader">
|
||||
<value>System.Resources.ResXResourceReader, System.Windows.Forms, Version=4.0.0.0, Culture=neutral, PublicKeyToken=b77a5c561934e089</value>
|
||||
</resheader>
|
||||
<resheader name="writer">
|
||||
<value>System.Resources.ResXResourceWriter, System.Windows.Forms, Version=4.0.0.0, Culture=neutral, PublicKeyToken=b77a5c561934e089</value>
|
||||
</resheader>
|
||||
</root>
|
40
OshimaModes/OshimaModes.csproj
Normal file
40
OshimaModes/OshimaModes.csproj
Normal file
@ -0,0 +1,40 @@
|
||||
<Project Sdk="Microsoft.NET.Sdk">
|
||||
|
||||
<PropertyGroup>
|
||||
<OutputType>WinExe</OutputType>
|
||||
<TargetFramework>net8.0-windows</TargetFramework>
|
||||
<Nullable>enable</Nullable>
|
||||
<UseWindowsForms>true</UseWindowsForms>
|
||||
<ImplicitUsings>enable</ImplicitUsings>
|
||||
<BaseOutputPath>..\bin\</BaseOutputPath>
|
||||
<RootNamespace>Oshima.FunGame.$(MSBuildProjectName.Replace(" ", "_"))</RootNamespace>
|
||||
<Authors>Oshima Studios</Authors>
|
||||
</PropertyGroup>
|
||||
|
||||
<ItemGroup>
|
||||
<ProjectReference Include="..\OshimaMaps\OshimaMaps.csproj" />
|
||||
<ProjectReference Include="..\OshimaModules\OshimaModules.csproj" />
|
||||
</ItemGroup>
|
||||
|
||||
<ItemGroup>
|
||||
<Reference Include="FunGame.Core">
|
||||
<HintPath>..\..\FunGame.Core\bin\Debug\net8.0\FunGame.Core.dll</HintPath>
|
||||
</Reference>
|
||||
</ItemGroup>
|
||||
|
||||
<ItemGroup>
|
||||
<Compile Update="Properties\Resources.Designer.cs">
|
||||
<DesignTime>True</DesignTime>
|
||||
<AutoGen>True</AutoGen>
|
||||
<DependentUpon>Resources.resx</DependentUpon>
|
||||
</Compile>
|
||||
</ItemGroup>
|
||||
|
||||
<ItemGroup>
|
||||
<EmbeddedResource Update="Properties\Resources.resx">
|
||||
<Generator>ResXFileCodeGenerator</Generator>
|
||||
<LastGenOutput>Resources.Designer.cs</LastGenOutput>
|
||||
</EmbeddedResource>
|
||||
</ItemGroup>
|
||||
|
||||
</Project>
|
17
OshimaModes/Program.cs
Normal file
17
OshimaModes/Program.cs
Normal file
@ -0,0 +1,17 @@
|
||||
namespace Oshima.FunGame.OshimaModes
|
||||
{
|
||||
internal static class Program
|
||||
{
|
||||
/// <summary>
|
||||
/// The main entry point for the application.
|
||||
/// </summary>
|
||||
[STAThread]
|
||||
static void Main()
|
||||
{
|
||||
// To customize application configuration such as set high DPI settings or default font,
|
||||
// see https://aka.ms/applicationconfiguration.
|
||||
ApplicationConfiguration.Initialize();
|
||||
Application.Run(new FastAutoUI());
|
||||
}
|
||||
}
|
||||
}
|
63
OshimaModes/Properties/Resources.Designer.cs
generated
Normal file
63
OshimaModes/Properties/Resources.Designer.cs
generated
Normal file
@ -0,0 +1,63 @@
|
||||
//------------------------------------------------------------------------------
|
||||
// <auto-generated>
|
||||
// 此代码由工具生成。
|
||||
// 运行时版本:4.0.30319.42000
|
||||
//
|
||||
// 对此文件的更改可能会导致不正确的行为,并且如果
|
||||
// 重新生成代码,这些更改将会丢失。
|
||||
// </auto-generated>
|
||||
//------------------------------------------------------------------------------
|
||||
|
||||
namespace Oshima.FunGame.OshimaModes.Properties {
|
||||
using System;
|
||||
|
||||
|
||||
/// <summary>
|
||||
/// 一个强类型的资源类,用于查找本地化的字符串等。
|
||||
/// </summary>
|
||||
// 此类是由 StronglyTypedResourceBuilder
|
||||
// 类通过类似于 ResGen 或 Visual Studio 的工具自动生成的。
|
||||
// 若要添加或移除成员,请编辑 .ResX 文件,然后重新运行 ResGen
|
||||
// (以 /str 作为命令选项),或重新生成 VS 项目。
|
||||
[global::System.CodeDom.Compiler.GeneratedCodeAttribute("System.Resources.Tools.StronglyTypedResourceBuilder", "17.0.0.0")]
|
||||
[global::System.Diagnostics.DebuggerNonUserCodeAttribute()]
|
||||
[global::System.Runtime.CompilerServices.CompilerGeneratedAttribute()]
|
||||
internal class Resources {
|
||||
|
||||
private static global::System.Resources.ResourceManager resourceMan;
|
||||
|
||||
private static global::System.Globalization.CultureInfo resourceCulture;
|
||||
|
||||
[global::System.Diagnostics.CodeAnalysis.SuppressMessageAttribute("Microsoft.Performance", "CA1811:AvoidUncalledPrivateCode")]
|
||||
internal Resources() {
|
||||
}
|
||||
|
||||
/// <summary>
|
||||
/// 返回此类使用的缓存的 ResourceManager 实例。
|
||||
/// </summary>
|
||||
[global::System.ComponentModel.EditorBrowsableAttribute(global::System.ComponentModel.EditorBrowsableState.Advanced)]
|
||||
internal static global::System.Resources.ResourceManager ResourceManager {
|
||||
get {
|
||||
if (object.ReferenceEquals(resourceMan, null)) {
|
||||
global::System.Resources.ResourceManager temp = new global::System.Resources.ResourceManager("Oshima.FunGame.OshimaModes.Properties.Resources", typeof(Resources).Assembly);
|
||||
resourceMan = temp;
|
||||
}
|
||||
return resourceMan;
|
||||
}
|
||||
}
|
||||
|
||||
/// <summary>
|
||||
/// 重写当前线程的 CurrentUICulture 属性,对
|
||||
/// 使用此强类型资源类的所有资源查找执行重写。
|
||||
/// </summary>
|
||||
[global::System.ComponentModel.EditorBrowsableAttribute(global::System.ComponentModel.EditorBrowsableState.Advanced)]
|
||||
internal static global::System.Globalization.CultureInfo Culture {
|
||||
get {
|
||||
return resourceCulture;
|
||||
}
|
||||
set {
|
||||
resourceCulture = value;
|
||||
}
|
||||
}
|
||||
}
|
||||
}
|
120
OshimaModes/Properties/Resources.resx
Normal file
120
OshimaModes/Properties/Resources.resx
Normal file
@ -0,0 +1,120 @@
|
||||
<?xml version="1.0" encoding="utf-8"?>
|
||||
<root>
|
||||
<!--
|
||||
Microsoft ResX Schema
|
||||
|
||||
Version 2.0
|
||||
|
||||
The primary goals of this format is to allow a simple XML format
|
||||
that is mostly human readable. The generation and parsing of the
|
||||
various data types are done through the TypeConverter classes
|
||||
associated with the data types.
|
||||
|
||||
Example:
|
||||
|
||||
... ado.net/XML headers & schema ...
|
||||
<resheader name="resmimetype">text/microsoft-resx</resheader>
|
||||
<resheader name="version">2.0</resheader>
|
||||
<resheader name="reader">System.Resources.ResXResourceReader, System.Windows.Forms, ...</resheader>
|
||||
<resheader name="writer">System.Resources.ResXResourceWriter, System.Windows.Forms, ...</resheader>
|
||||
<data name="Name1"><value>this is my long string</value><comment>this is a comment</comment></data>
|
||||
<data name="Color1" type="System.Drawing.Color, System.Drawing">Blue</data>
|
||||
<data name="Bitmap1" mimetype="application/x-microsoft.net.object.binary.base64">
|
||||
<value>[base64 mime encoded serialized .NET Framework object]</value>
|
||||
</data>
|
||||
<data name="Icon1" type="System.Drawing.Icon, System.Drawing" mimetype="application/x-microsoft.net.object.bytearray.base64">
|
||||
<value>[base64 mime encoded string representing a byte array form of the .NET Framework object]</value>
|
||||
<comment>This is a comment</comment>
|
||||
</data>
|
||||
|
||||
There are any number of "resheader" rows that contain simple
|
||||
name/value pairs.
|
||||
|
||||
Each data row contains a name, and value. The row also contains a
|
||||
type or mimetype. Type corresponds to a .NET class that support
|
||||
text/value conversion through the TypeConverter architecture.
|
||||
Classes that don't support this are serialized and stored with the
|
||||
mimetype set.
|
||||
|
||||
The mimetype is used for serialized objects, and tells the
|
||||
ResXResourceReader how to depersist the object. This is currently not
|
||||
extensible. For a given mimetype the value must be set accordingly:
|
||||
|
||||
Note - application/x-microsoft.net.object.binary.base64 is the format
|
||||
that the ResXResourceWriter will generate, however the reader can
|
||||
read any of the formats listed below.
|
||||
|
||||
mimetype: application/x-microsoft.net.object.binary.base64
|
||||
value : The object must be serialized with
|
||||
: System.Runtime.Serialization.Formatters.Binary.BinaryFormatter
|
||||
: and then encoded with base64 encoding.
|
||||
|
||||
mimetype: application/x-microsoft.net.object.soap.base64
|
||||
value : The object must be serialized with
|
||||
: System.Runtime.Serialization.Formatters.Soap.SoapFormatter
|
||||
: and then encoded with base64 encoding.
|
||||
|
||||
mimetype: application/x-microsoft.net.object.bytearray.base64
|
||||
value : The object must be serialized into a byte array
|
||||
: using a System.ComponentModel.TypeConverter
|
||||
: and then encoded with base64 encoding.
|
||||
-->
|
||||
<xsd:schema id="root" xmlns="" xmlns:xsd="http://www.w3.org/2001/XMLSchema" xmlns:msdata="urn:schemas-microsoft-com:xml-msdata">
|
||||
<xsd:import namespace="http://www.w3.org/XML/1998/namespace" />
|
||||
<xsd:element name="root" msdata:IsDataSet="true">
|
||||
<xsd:complexType>
|
||||
<xsd:choice maxOccurs="unbounded">
|
||||
<xsd:element name="metadata">
|
||||
<xsd:complexType>
|
||||
<xsd:sequence>
|
||||
<xsd:element name="value" type="xsd:string" minOccurs="0" />
|
||||
</xsd:sequence>
|
||||
<xsd:attribute name="name" use="required" type="xsd:string" />
|
||||
<xsd:attribute name="type" type="xsd:string" />
|
||||
<xsd:attribute name="mimetype" type="xsd:string" />
|
||||
<xsd:attribute ref="xml:space" />
|
||||
</xsd:complexType>
|
||||
</xsd:element>
|
||||
<xsd:element name="assembly">
|
||||
<xsd:complexType>
|
||||
<xsd:attribute name="alias" type="xsd:string" />
|
||||
<xsd:attribute name="name" type="xsd:string" />
|
||||
</xsd:complexType>
|
||||
</xsd:element>
|
||||
<xsd:element name="data">
|
||||
<xsd:complexType>
|
||||
<xsd:sequence>
|
||||
<xsd:element name="value" type="xsd:string" minOccurs="0" msdata:Ordinal="1" />
|
||||
<xsd:element name="comment" type="xsd:string" minOccurs="0" msdata:Ordinal="2" />
|
||||
</xsd:sequence>
|
||||
<xsd:attribute name="name" type="xsd:string" use="required" msdata:Ordinal="1" />
|
||||
<xsd:attribute name="type" type="xsd:string" msdata:Ordinal="3" />
|
||||
<xsd:attribute name="mimetype" type="xsd:string" msdata:Ordinal="4" />
|
||||
<xsd:attribute ref="xml:space" />
|
||||
</xsd:complexType>
|
||||
</xsd:element>
|
||||
<xsd:element name="resheader">
|
||||
<xsd:complexType>
|
||||
<xsd:sequence>
|
||||
<xsd:element name="value" type="xsd:string" minOccurs="0" msdata:Ordinal="1" />
|
||||
</xsd:sequence>
|
||||
<xsd:attribute name="name" type="xsd:string" use="required" />
|
||||
</xsd:complexType>
|
||||
</xsd:element>
|
||||
</xsd:choice>
|
||||
</xsd:complexType>
|
||||
</xsd:element>
|
||||
</xsd:schema>
|
||||
<resheader name="resmimetype">
|
||||
<value>text/microsoft-resx</value>
|
||||
</resheader>
|
||||
<resheader name="version">
|
||||
<value>2.0</value>
|
||||
</resheader>
|
||||
<resheader name="reader">
|
||||
<value>System.Resources.ResXResourceReader, System.Windows.Forms, Version=4.0.0.0, Culture=neutral, PublicKeyToken=b77a5c561934e089</value>
|
||||
</resheader>
|
||||
<resheader name="writer">
|
||||
<value>System.Resources.ResXResourceWriter, System.Windows.Forms, Version=4.0.0.0, Culture=neutral, PublicKeyToken=b77a5c561934e089</value>
|
||||
</resheader>
|
||||
</root>
|
359
OshimaModes/UserControsl/CharacterStatus.Designer.cs
generated
Normal file
359
OshimaModes/UserControsl/CharacterStatus.Designer.cs
generated
Normal file
@ -0,0 +1,359 @@
|
||||
namespace Oshima.FunGame.OshimaModes
|
||||
{
|
||||
partial class CharacterStatus
|
||||
{
|
||||
/// <summary>
|
||||
/// 必需的设计器变量。
|
||||
/// </summary>
|
||||
private System.ComponentModel.IContainer components = null;
|
||||
|
||||
/// <summary>
|
||||
/// 清理所有正在使用的资源。
|
||||
/// </summary>
|
||||
/// <param name="disposing">如果应释放托管资源,为 true;否则为 false。</param>
|
||||
protected override void Dispose(bool disposing)
|
||||
{
|
||||
if (disposing && (components != null))
|
||||
{
|
||||
components.Dispose();
|
||||
}
|
||||
base.Dispose(disposing);
|
||||
}
|
||||
|
||||
#region 组件设计器生成的代码
|
||||
|
||||
/// <summary>
|
||||
/// 设计器支持所需的方法 - 不要修改
|
||||
/// 使用代码编辑器修改此方法的内容。
|
||||
/// </summary>
|
||||
private void InitializeComponent()
|
||||
{
|
||||
System.ComponentModel.ComponentResourceManager resources = new System.ComponentModel.ComponentResourceManager(typeof(CharacterStatus));
|
||||
CharacterName = new Label();
|
||||
HPBar = new CustomProgressBar();
|
||||
MPBar = new CustomProgressBar();
|
||||
CharacterAvatar = new PictureBox();
|
||||
EPBar = new CustomProgressBar();
|
||||
EquipSlots = new TableLayoutPanel();
|
||||
pictureBox2 = new PictureBox();
|
||||
pictureBox3 = new PictureBox();
|
||||
pictureBox4 = new PictureBox();
|
||||
pictureBox5 = new PictureBox();
|
||||
pictureBox6 = new PictureBox();
|
||||
pictureBox7 = new PictureBox();
|
||||
SkillSlots = new TableLayoutPanel();
|
||||
pictureBox8 = new PictureBox();
|
||||
pictureBox9 = new PictureBox();
|
||||
pictureBox10 = new PictureBox();
|
||||
pictureBox11 = new PictureBox();
|
||||
pictureBox1 = new PictureBox();
|
||||
pictureBox12 = new PictureBox();
|
||||
pictureBox13 = new PictureBox();
|
||||
pictureBox14 = new PictureBox();
|
||||
((System.ComponentModel.ISupportInitialize)CharacterAvatar).BeginInit();
|
||||
EquipSlots.SuspendLayout();
|
||||
((System.ComponentModel.ISupportInitialize)pictureBox2).BeginInit();
|
||||
((System.ComponentModel.ISupportInitialize)pictureBox3).BeginInit();
|
||||
((System.ComponentModel.ISupportInitialize)pictureBox4).BeginInit();
|
||||
((System.ComponentModel.ISupportInitialize)pictureBox5).BeginInit();
|
||||
((System.ComponentModel.ISupportInitialize)pictureBox6).BeginInit();
|
||||
((System.ComponentModel.ISupportInitialize)pictureBox7).BeginInit();
|
||||
SkillSlots.SuspendLayout();
|
||||
((System.ComponentModel.ISupportInitialize)pictureBox8).BeginInit();
|
||||
((System.ComponentModel.ISupportInitialize)pictureBox9).BeginInit();
|
||||
((System.ComponentModel.ISupportInitialize)pictureBox10).BeginInit();
|
||||
((System.ComponentModel.ISupportInitialize)pictureBox11).BeginInit();
|
||||
((System.ComponentModel.ISupportInitialize)pictureBox1).BeginInit();
|
||||
((System.ComponentModel.ISupportInitialize)pictureBox12).BeginInit();
|
||||
((System.ComponentModel.ISupportInitialize)pictureBox13).BeginInit();
|
||||
((System.ComponentModel.ISupportInitialize)pictureBox14).BeginInit();
|
||||
SuspendLayout();
|
||||
//
|
||||
// CharacterName
|
||||
//
|
||||
CharacterName.Dock = DockStyle.Top;
|
||||
CharacterName.Font = new Font("Microsoft YaHei UI", 18F, FontStyle.Regular, GraphicsUnit.Point, 134);
|
||||
CharacterName.Location = new Point(0, 0);
|
||||
CharacterName.Name = "CharacterName";
|
||||
CharacterName.Size = new Size(308, 34);
|
||||
CharacterName.TabIndex = 0;
|
||||
CharacterName.Text = "角色名称";
|
||||
CharacterName.TextAlign = ContentAlignment.MiddleCenter;
|
||||
//
|
||||
// HPBar
|
||||
//
|
||||
HPBar.BorderStyle = BorderStyle.FixedSingle;
|
||||
HPBar.Dock = DockStyle.Bottom;
|
||||
HPBar.Location = new Point(0, 276);
|
||||
HPBar.Maximum = 1000D;
|
||||
HPBar.Name = "HPBar";
|
||||
HPBar.ProgressColor = Color.PaleVioletRed;
|
||||
HPBar.Size = new Size(308, 20);
|
||||
HPBar.TabIndex = 1;
|
||||
HPBar.Value = 325D;
|
||||
//
|
||||
// MPBar
|
||||
//
|
||||
MPBar.BorderStyle = BorderStyle.FixedSingle;
|
||||
MPBar.Dock = DockStyle.Bottom;
|
||||
MPBar.Location = new Point(0, 296);
|
||||
MPBar.Maximum = 142D;
|
||||
MPBar.Name = "MPBar";
|
||||
MPBar.ProgressColor = Color.SteelBlue;
|
||||
MPBar.Size = new Size(308, 20);
|
||||
MPBar.TabIndex = 2;
|
||||
MPBar.Value = 24D;
|
||||
//
|
||||
// CharacterAvatar
|
||||
//
|
||||
CharacterAvatar.Dock = DockStyle.Left;
|
||||
CharacterAvatar.Image = (Image)resources.GetObject("CharacterAvatar.Image");
|
||||
CharacterAvatar.Location = new Point(0, 34);
|
||||
CharacterAvatar.Name = "CharacterAvatar";
|
||||
CharacterAvatar.Size = new Size(181, 182);
|
||||
CharacterAvatar.SizeMode = PictureBoxSizeMode.Zoom;
|
||||
CharacterAvatar.TabIndex = 3;
|
||||
CharacterAvatar.TabStop = false;
|
||||
//
|
||||
// EPBar
|
||||
//
|
||||
EPBar.BorderStyle = BorderStyle.FixedSingle;
|
||||
EPBar.Dock = DockStyle.Bottom;
|
||||
EPBar.Location = new Point(0, 316);
|
||||
EPBar.Maximum = 200D;
|
||||
EPBar.Name = "EPBar";
|
||||
EPBar.ProgressColor = Color.LightGoldenrodYellow;
|
||||
EPBar.Size = new Size(308, 21);
|
||||
EPBar.TabIndex = 4;
|
||||
EPBar.Value = 54D;
|
||||
//
|
||||
// EquipSlots
|
||||
//
|
||||
EquipSlots.ColumnCount = 2;
|
||||
EquipSlots.ColumnStyles.Add(new ColumnStyle(SizeType.Percent, 50F));
|
||||
EquipSlots.ColumnStyles.Add(new ColumnStyle(SizeType.Percent, 50F));
|
||||
EquipSlots.Controls.Add(pictureBox2, 0, 0);
|
||||
EquipSlots.Controls.Add(pictureBox3, 1, 0);
|
||||
EquipSlots.Controls.Add(pictureBox4, 0, 1);
|
||||
EquipSlots.Controls.Add(pictureBox5, 1, 1);
|
||||
EquipSlots.Controls.Add(pictureBox6, 0, 2);
|
||||
EquipSlots.Controls.Add(pictureBox7, 1, 2);
|
||||
EquipSlots.Dock = DockStyle.Right;
|
||||
EquipSlots.Location = new Point(180, 34);
|
||||
EquipSlots.Name = "EquipSlots";
|
||||
EquipSlots.RowCount = 3;
|
||||
EquipSlots.RowStyles.Add(new RowStyle(SizeType.Percent, 33.3333321F));
|
||||
EquipSlots.RowStyles.Add(new RowStyle(SizeType.Percent, 33.3333321F));
|
||||
EquipSlots.RowStyles.Add(new RowStyle(SizeType.Percent, 33.3333321F));
|
||||
EquipSlots.Size = new Size(128, 182);
|
||||
EquipSlots.TabIndex = 8;
|
||||
//
|
||||
// pictureBox2
|
||||
//
|
||||
pictureBox2.Image = (Image)resources.GetObject("pictureBox2.Image");
|
||||
pictureBox2.Location = new Point(3, 3);
|
||||
pictureBox2.Name = "pictureBox2";
|
||||
pictureBox2.Size = new Size(58, 50);
|
||||
pictureBox2.SizeMode = PictureBoxSizeMode.Zoom;
|
||||
pictureBox2.TabIndex = 0;
|
||||
pictureBox2.TabStop = false;
|
||||
//
|
||||
// pictureBox3
|
||||
//
|
||||
pictureBox3.Image = (Image)resources.GetObject("pictureBox3.Image");
|
||||
pictureBox3.Location = new Point(67, 3);
|
||||
pictureBox3.Name = "pictureBox3";
|
||||
pictureBox3.Size = new Size(58, 50);
|
||||
pictureBox3.SizeMode = PictureBoxSizeMode.Zoom;
|
||||
pictureBox3.TabIndex = 1;
|
||||
pictureBox3.TabStop = false;
|
||||
//
|
||||
// pictureBox4
|
||||
//
|
||||
pictureBox4.Image = (Image)resources.GetObject("pictureBox4.Image");
|
||||
pictureBox4.Location = new Point(3, 63);
|
||||
pictureBox4.Name = "pictureBox4";
|
||||
pictureBox4.Size = new Size(58, 50);
|
||||
pictureBox4.SizeMode = PictureBoxSizeMode.Zoom;
|
||||
pictureBox4.TabIndex = 2;
|
||||
pictureBox4.TabStop = false;
|
||||
//
|
||||
// pictureBox5
|
||||
//
|
||||
pictureBox5.Image = (Image)resources.GetObject("pictureBox5.Image");
|
||||
pictureBox5.Location = new Point(67, 63);
|
||||
pictureBox5.Name = "pictureBox5";
|
||||
pictureBox5.Size = new Size(58, 50);
|
||||
pictureBox5.SizeMode = PictureBoxSizeMode.Zoom;
|
||||
pictureBox5.TabIndex = 3;
|
||||
pictureBox5.TabStop = false;
|
||||
//
|
||||
// pictureBox6
|
||||
//
|
||||
pictureBox6.Image = (Image)resources.GetObject("pictureBox6.Image");
|
||||
pictureBox6.Location = new Point(3, 123);
|
||||
pictureBox6.Name = "pictureBox6";
|
||||
pictureBox6.Size = new Size(58, 50);
|
||||
pictureBox6.SizeMode = PictureBoxSizeMode.Zoom;
|
||||
pictureBox6.TabIndex = 4;
|
||||
pictureBox6.TabStop = false;
|
||||
//
|
||||
// pictureBox7
|
||||
//
|
||||
pictureBox7.Image = (Image)resources.GetObject("pictureBox7.Image");
|
||||
pictureBox7.Location = new Point(67, 123);
|
||||
pictureBox7.Name = "pictureBox7";
|
||||
pictureBox7.Size = new Size(58, 50);
|
||||
pictureBox7.SizeMode = PictureBoxSizeMode.Zoom;
|
||||
pictureBox7.TabIndex = 5;
|
||||
pictureBox7.TabStop = false;
|
||||
//
|
||||
// SkillSlots
|
||||
//
|
||||
SkillSlots.ColumnCount = 4;
|
||||
SkillSlots.ColumnStyles.Add(new ColumnStyle(SizeType.Percent, 25F));
|
||||
SkillSlots.ColumnStyles.Add(new ColumnStyle(SizeType.Percent, 25F));
|
||||
SkillSlots.ColumnStyles.Add(new ColumnStyle(SizeType.Percent, 25F));
|
||||
SkillSlots.ColumnStyles.Add(new ColumnStyle(SizeType.Percent, 25F));
|
||||
SkillSlots.Controls.Add(pictureBox1, 0, 0);
|
||||
SkillSlots.Controls.Add(pictureBox12, 1, 0);
|
||||
SkillSlots.Controls.Add(pictureBox13, 2, 0);
|
||||
SkillSlots.Controls.Add(pictureBox14, 3, 0);
|
||||
SkillSlots.Dock = DockStyle.Bottom;
|
||||
SkillSlots.Location = new Point(0, 216);
|
||||
SkillSlots.Name = "SkillSlots";
|
||||
SkillSlots.RowCount = 1;
|
||||
SkillSlots.RowStyles.Add(new RowStyle(SizeType.Percent, 100F));
|
||||
SkillSlots.Size = new Size(308, 60);
|
||||
SkillSlots.TabIndex = 9;
|
||||
//
|
||||
// pictureBox8
|
||||
//
|
||||
pictureBox8.Location = new Point(0, 0);
|
||||
pictureBox8.Name = "pictureBox8";
|
||||
pictureBox8.Size = new Size(100, 50);
|
||||
pictureBox8.TabIndex = 0;
|
||||
pictureBox8.TabStop = false;
|
||||
//
|
||||
// pictureBox9
|
||||
//
|
||||
pictureBox9.Location = new Point(0, 0);
|
||||
pictureBox9.Name = "pictureBox9";
|
||||
pictureBox9.Size = new Size(100, 50);
|
||||
pictureBox9.TabIndex = 0;
|
||||
pictureBox9.TabStop = false;
|
||||
//
|
||||
// pictureBox10
|
||||
//
|
||||
pictureBox10.Location = new Point(0, 0);
|
||||
pictureBox10.Name = "pictureBox10";
|
||||
pictureBox10.Size = new Size(100, 50);
|
||||
pictureBox10.TabIndex = 0;
|
||||
pictureBox10.TabStop = false;
|
||||
//
|
||||
// pictureBox11
|
||||
//
|
||||
pictureBox11.Location = new Point(0, 0);
|
||||
pictureBox11.Name = "pictureBox11";
|
||||
pictureBox11.Size = new Size(100, 50);
|
||||
pictureBox11.TabIndex = 0;
|
||||
pictureBox11.TabStop = false;
|
||||
//
|
||||
// pictureBox1
|
||||
//
|
||||
pictureBox1.Image = (Image)resources.GetObject("pictureBox1.Image");
|
||||
pictureBox1.Location = new Point(3, 3);
|
||||
pictureBox1.Name = "pictureBox1";
|
||||
pictureBox1.Size = new Size(71, 50);
|
||||
pictureBox1.SizeMode = PictureBoxSizeMode.Zoom;
|
||||
pictureBox1.TabIndex = 0;
|
||||
pictureBox1.TabStop = false;
|
||||
//
|
||||
// pictureBox12
|
||||
//
|
||||
pictureBox12.Image = (Image)resources.GetObject("pictureBox12.Image");
|
||||
pictureBox12.Location = new Point(80, 3);
|
||||
pictureBox12.Name = "pictureBox12";
|
||||
pictureBox12.Size = new Size(71, 50);
|
||||
pictureBox12.SizeMode = PictureBoxSizeMode.Zoom;
|
||||
pictureBox12.TabIndex = 1;
|
||||
pictureBox12.TabStop = false;
|
||||
//
|
||||
// pictureBox13
|
||||
//
|
||||
pictureBox13.Image = (Image)resources.GetObject("pictureBox13.Image");
|
||||
pictureBox13.Location = new Point(157, 3);
|
||||
pictureBox13.Name = "pictureBox13";
|
||||
pictureBox13.Size = new Size(71, 50);
|
||||
pictureBox13.SizeMode = PictureBoxSizeMode.Zoom;
|
||||
pictureBox13.TabIndex = 2;
|
||||
pictureBox13.TabStop = false;
|
||||
//
|
||||
// pictureBox14
|
||||
//
|
||||
pictureBox14.Image = (Image)resources.GetObject("pictureBox14.Image");
|
||||
pictureBox14.Location = new Point(234, 3);
|
||||
pictureBox14.Name = "pictureBox14";
|
||||
pictureBox14.Size = new Size(71, 50);
|
||||
pictureBox14.SizeMode = PictureBoxSizeMode.Zoom;
|
||||
pictureBox14.TabIndex = 3;
|
||||
pictureBox14.TabStop = false;
|
||||
//
|
||||
// CharacterStatus
|
||||
//
|
||||
AutoScaleDimensions = new SizeF(7F, 17F);
|
||||
AutoScaleMode = AutoScaleMode.Font;
|
||||
Controls.Add(CharacterAvatar);
|
||||
Controls.Add(EquipSlots);
|
||||
Controls.Add(SkillSlots);
|
||||
Controls.Add(CharacterName);
|
||||
Controls.Add(HPBar);
|
||||
Controls.Add(MPBar);
|
||||
Controls.Add(EPBar);
|
||||
Name = "CharacterStatus";
|
||||
Size = new Size(308, 337);
|
||||
((System.ComponentModel.ISupportInitialize)CharacterAvatar).EndInit();
|
||||
EquipSlots.ResumeLayout(false);
|
||||
((System.ComponentModel.ISupportInitialize)pictureBox2).EndInit();
|
||||
((System.ComponentModel.ISupportInitialize)pictureBox3).EndInit();
|
||||
((System.ComponentModel.ISupportInitialize)pictureBox4).EndInit();
|
||||
((System.ComponentModel.ISupportInitialize)pictureBox5).EndInit();
|
||||
((System.ComponentModel.ISupportInitialize)pictureBox6).EndInit();
|
||||
((System.ComponentModel.ISupportInitialize)pictureBox7).EndInit();
|
||||
SkillSlots.ResumeLayout(false);
|
||||
((System.ComponentModel.ISupportInitialize)pictureBox8).EndInit();
|
||||
((System.ComponentModel.ISupportInitialize)pictureBox9).EndInit();
|
||||
((System.ComponentModel.ISupportInitialize)pictureBox10).EndInit();
|
||||
((System.ComponentModel.ISupportInitialize)pictureBox11).EndInit();
|
||||
((System.ComponentModel.ISupportInitialize)pictureBox1).EndInit();
|
||||
((System.ComponentModel.ISupportInitialize)pictureBox12).EndInit();
|
||||
((System.ComponentModel.ISupportInitialize)pictureBox13).EndInit();
|
||||
((System.ComponentModel.ISupportInitialize)pictureBox14).EndInit();
|
||||
ResumeLayout(false);
|
||||
}
|
||||
|
||||
#endregion
|
||||
|
||||
private Label CharacterName;
|
||||
private CustomProgressBar HPBar;
|
||||
private CustomProgressBar MPBar;
|
||||
private PictureBox CharacterAvatar;
|
||||
private CustomProgressBar EPBar;
|
||||
private TableLayoutPanel EquipSlots;
|
||||
private PictureBox pictureBox2;
|
||||
private PictureBox pictureBox3;
|
||||
private PictureBox pictureBox4;
|
||||
private PictureBox pictureBox5;
|
||||
private PictureBox pictureBox6;
|
||||
private PictureBox pictureBox7;
|
||||
private TableLayoutPanel SkillSlots;
|
||||
private PictureBox pictureBox8;
|
||||
private PictureBox pictureBox9;
|
||||
private PictureBox pictureBox10;
|
||||
private PictureBox pictureBox11;
|
||||
private PictureBox pictureBox1;
|
||||
private PictureBox pictureBox12;
|
||||
private PictureBox pictureBox13;
|
||||
private PictureBox pictureBox14;
|
||||
}
|
||||
}
|
10
OshimaModes/UserControsl/CharacterStatus.cs
Normal file
10
OshimaModes/UserControsl/CharacterStatus.cs
Normal file
@ -0,0 +1,10 @@
|
||||
namespace Oshima.FunGame.OshimaModes
|
||||
{
|
||||
public partial class CharacterStatus : UserControl
|
||||
{
|
||||
public CharacterStatus()
|
||||
{
|
||||
InitializeComponent();
|
||||
}
|
||||
}
|
||||
}
|
1218
OshimaModes/UserControsl/CharacterStatus.resx
Normal file
1218
OshimaModes/UserControsl/CharacterStatus.resx
Normal file
File diff suppressed because it is too large
Load Diff
67
OshimaModes/UserControsl/CustomProgressBar.cs
Normal file
67
OshimaModes/UserControsl/CustomProgressBar.cs
Normal file
@ -0,0 +1,67 @@
|
||||
namespace Oshima.FunGame.OshimaModes
|
||||
{
|
||||
public class CustomProgressBar : UserControl
|
||||
{
|
||||
private double _value = 0;
|
||||
private double _maximum = 100;
|
||||
private Color _progressColor = Color.Red;
|
||||
|
||||
public double Value
|
||||
{
|
||||
get => _value;
|
||||
set
|
||||
{
|
||||
_value = Math.Max(0, Math.Min(value, _maximum)); // 限制值在范围内
|
||||
Invalidate(); // 触发重绘
|
||||
}
|
||||
}
|
||||
|
||||
public double Maximum
|
||||
{
|
||||
get => _maximum;
|
||||
set
|
||||
{
|
||||
_maximum = Math.Max(1, value); // 最大值不能小于1
|
||||
Invalidate(); // 触发重绘
|
||||
}
|
||||
}
|
||||
|
||||
public Color ProgressColor
|
||||
{
|
||||
get => _progressColor;
|
||||
set
|
||||
{
|
||||
_progressColor = value;
|
||||
Invalidate(); // 触发重绘
|
||||
}
|
||||
}
|
||||
|
||||
public CustomProgressBar()
|
||||
{
|
||||
this.SetStyle(ControlStyles.UserPaint | ControlStyles.AllPaintingInWmPaint |
|
||||
ControlStyles.OptimizedDoubleBuffer, true);
|
||||
this.Height = 20; // 设置控件的默认高度
|
||||
}
|
||||
|
||||
protected override void OnPaint(PaintEventArgs e)
|
||||
{
|
||||
base.OnPaint(e);
|
||||
|
||||
// 计算进度条填充宽度
|
||||
double percent = _value / _maximum;
|
||||
int fillWidth = (int)(this.Width * percent);
|
||||
|
||||
// 填充背景(灰色)
|
||||
e.Graphics.FillRectangle(Brushes.LightGray, 0, 0, this.Width, this.Height);
|
||||
|
||||
// 填充进度条(自定义颜色)
|
||||
e.Graphics.FillRectangle(new SolidBrush(_progressColor), 0, 0, fillWidth, this.Height);
|
||||
|
||||
// 可选:绘制进度百分比文字
|
||||
string text = $"{_value} / {_maximum}";
|
||||
SizeF textSize = e.Graphics.MeasureString(text, this.Font);
|
||||
e.Graphics.DrawString(text, this.Font, Brushes.Black,
|
||||
(this.Width - textSize.Width) / 2, (this.Height - textSize.Height) / 2);
|
||||
}
|
||||
}
|
||||
}
|
120
OshimaModes/UserControsl/CustomProgressBar.resx
Normal file
120
OshimaModes/UserControsl/CustomProgressBar.resx
Normal file
@ -0,0 +1,120 @@
|
||||
<?xml version="1.0" encoding="utf-8"?>
|
||||
<root>
|
||||
<!--
|
||||
Microsoft ResX Schema
|
||||
|
||||
Version 2.0
|
||||
|
||||
The primary goals of this format is to allow a simple XML format
|
||||
that is mostly human readable. The generation and parsing of the
|
||||
various data types are done through the TypeConverter classes
|
||||
associated with the data types.
|
||||
|
||||
Example:
|
||||
|
||||
... ado.net/XML headers & schema ...
|
||||
<resheader name="resmimetype">text/microsoft-resx</resheader>
|
||||
<resheader name="version">2.0</resheader>
|
||||
<resheader name="reader">System.Resources.ResXResourceReader, System.Windows.Forms, ...</resheader>
|
||||
<resheader name="writer">System.Resources.ResXResourceWriter, System.Windows.Forms, ...</resheader>
|
||||
<data name="Name1"><value>this is my long string</value><comment>this is a comment</comment></data>
|
||||
<data name="Color1" type="System.Drawing.Color, System.Drawing">Blue</data>
|
||||
<data name="Bitmap1" mimetype="application/x-microsoft.net.object.binary.base64">
|
||||
<value>[base64 mime encoded serialized .NET Framework object]</value>
|
||||
</data>
|
||||
<data name="Icon1" type="System.Drawing.Icon, System.Drawing" mimetype="application/x-microsoft.net.object.bytearray.base64">
|
||||
<value>[base64 mime encoded string representing a byte array form of the .NET Framework object]</value>
|
||||
<comment>This is a comment</comment>
|
||||
</data>
|
||||
|
||||
There are any number of "resheader" rows that contain simple
|
||||
name/value pairs.
|
||||
|
||||
Each data row contains a name, and value. The row also contains a
|
||||
type or mimetype. Type corresponds to a .NET class that support
|
||||
text/value conversion through the TypeConverter architecture.
|
||||
Classes that don't support this are serialized and stored with the
|
||||
mimetype set.
|
||||
|
||||
The mimetype is used for serialized objects, and tells the
|
||||
ResXResourceReader how to depersist the object. This is currently not
|
||||
extensible. For a given mimetype the value must be set accordingly:
|
||||
|
||||
Note - application/x-microsoft.net.object.binary.base64 is the format
|
||||
that the ResXResourceWriter will generate, however the reader can
|
||||
read any of the formats listed below.
|
||||
|
||||
mimetype: application/x-microsoft.net.object.binary.base64
|
||||
value : The object must be serialized with
|
||||
: System.Runtime.Serialization.Formatters.Binary.BinaryFormatter
|
||||
: and then encoded with base64 encoding.
|
||||
|
||||
mimetype: application/x-microsoft.net.object.soap.base64
|
||||
value : The object must be serialized with
|
||||
: System.Runtime.Serialization.Formatters.Soap.SoapFormatter
|
||||
: and then encoded with base64 encoding.
|
||||
|
||||
mimetype: application/x-microsoft.net.object.bytearray.base64
|
||||
value : The object must be serialized into a byte array
|
||||
: using a System.ComponentModel.TypeConverter
|
||||
: and then encoded with base64 encoding.
|
||||
-->
|
||||
<xsd:schema id="root" xmlns="" xmlns:xsd="http://www.w3.org/2001/XMLSchema" xmlns:msdata="urn:schemas-microsoft-com:xml-msdata">
|
||||
<xsd:import namespace="http://www.w3.org/XML/1998/namespace" />
|
||||
<xsd:element name="root" msdata:IsDataSet="true">
|
||||
<xsd:complexType>
|
||||
<xsd:choice maxOccurs="unbounded">
|
||||
<xsd:element name="metadata">
|
||||
<xsd:complexType>
|
||||
<xsd:sequence>
|
||||
<xsd:element name="value" type="xsd:string" minOccurs="0" />
|
||||
</xsd:sequence>
|
||||
<xsd:attribute name="name" use="required" type="xsd:string" />
|
||||
<xsd:attribute name="type" type="xsd:string" />
|
||||
<xsd:attribute name="mimetype" type="xsd:string" />
|
||||
<xsd:attribute ref="xml:space" />
|
||||
</xsd:complexType>
|
||||
</xsd:element>
|
||||
<xsd:element name="assembly">
|
||||
<xsd:complexType>
|
||||
<xsd:attribute name="alias" type="xsd:string" />
|
||||
<xsd:attribute name="name" type="xsd:string" />
|
||||
</xsd:complexType>
|
||||
</xsd:element>
|
||||
<xsd:element name="data">
|
||||
<xsd:complexType>
|
||||
<xsd:sequence>
|
||||
<xsd:element name="value" type="xsd:string" minOccurs="0" msdata:Ordinal="1" />
|
||||
<xsd:element name="comment" type="xsd:string" minOccurs="0" msdata:Ordinal="2" />
|
||||
</xsd:sequence>
|
||||
<xsd:attribute name="name" type="xsd:string" use="required" msdata:Ordinal="1" />
|
||||
<xsd:attribute name="type" type="xsd:string" msdata:Ordinal="3" />
|
||||
<xsd:attribute name="mimetype" type="xsd:string" msdata:Ordinal="4" />
|
||||
<xsd:attribute ref="xml:space" />
|
||||
</xsd:complexType>
|
||||
</xsd:element>
|
||||
<xsd:element name="resheader">
|
||||
<xsd:complexType>
|
||||
<xsd:sequence>
|
||||
<xsd:element name="value" type="xsd:string" minOccurs="0" msdata:Ordinal="1" />
|
||||
</xsd:sequence>
|
||||
<xsd:attribute name="name" type="xsd:string" use="required" />
|
||||
</xsd:complexType>
|
||||
</xsd:element>
|
||||
</xsd:choice>
|
||||
</xsd:complexType>
|
||||
</xsd:element>
|
||||
</xsd:schema>
|
||||
<resheader name="resmimetype">
|
||||
<value>text/microsoft-resx</value>
|
||||
</resheader>
|
||||
<resheader name="version">
|
||||
<value>2.0</value>
|
||||
</resheader>
|
||||
<resheader name="reader">
|
||||
<value>System.Resources.ResXResourceReader, System.Windows.Forms, Version=4.0.0.0, Culture=neutral, PublicKeyToken=b77a5c561934e089</value>
|
||||
</resheader>
|
||||
<resheader name="writer">
|
||||
<value>System.Resources.ResXResourceWriter, System.Windows.Forms, Version=4.0.0.0, Culture=neutral, PublicKeyToken=b77a5c561934e089</value>
|
||||
</resheader>
|
||||
</root>
|
59
OshimaModes/UserControsl/PlayerStatusControl.cs
Normal file
59
OshimaModes/UserControsl/PlayerStatusControl.cs
Normal file
@ -0,0 +1,59 @@
|
||||
namespace Oshima.FunGame.OshimaModes
|
||||
{
|
||||
public partial class PlayerStatusControl : UserControl
|
||||
{
|
||||
public Label PlayerNameLabel { get; }
|
||||
public PictureBox AvatarBox { get; }
|
||||
public CustomProgressBar HPBar { get; }
|
||||
public CustomProgressBar MPBar { get; }
|
||||
|
||||
public PlayerStatusControl(int index)
|
||||
{
|
||||
// 玩家名标签
|
||||
PlayerNameLabel = new()
|
||||
{
|
||||
Text = "Player " + index,
|
||||
TextAlign = ContentAlignment.MiddleCenter,
|
||||
ImageAlign = ContentAlignment.MiddleCenter,
|
||||
Dock = DockStyle.Top,
|
||||
AutoSize = true
|
||||
};
|
||||
|
||||
// 头像框
|
||||
AvatarBox = new()
|
||||
{
|
||||
BorderStyle = BorderStyle.FixedSingle,
|
||||
SizeMode = PictureBoxSizeMode.StretchImage,
|
||||
Height = 100,
|
||||
Width = 100,
|
||||
Dock = DockStyle.Top
|
||||
};
|
||||
|
||||
// HP条
|
||||
HPBar = new()
|
||||
{
|
||||
Maximum = 100,
|
||||
Value = 75.5, // 支持浮点数
|
||||
ProgressColor = Color.Red, // 自定义颜色
|
||||
Dock = DockStyle.Bottom,
|
||||
Height = 20
|
||||
};
|
||||
|
||||
// MP条
|
||||
MPBar = new()
|
||||
{
|
||||
Maximum = 100,
|
||||
Value = 50.7, // 支持浮点数
|
||||
ProgressColor = Color.Blue, // 自定义颜色
|
||||
Dock = DockStyle.Bottom,
|
||||
Height = 20
|
||||
};
|
||||
|
||||
// 添加控件到用户控件
|
||||
this.Controls.Add(MPBar);
|
||||
this.Controls.Add(HPBar);
|
||||
this.Controls.Add(AvatarBox);
|
||||
this.Controls.Add(PlayerNameLabel);
|
||||
}
|
||||
}
|
||||
}
|
120
OshimaModes/UserControsl/PlayerStatusControl.resx
Normal file
120
OshimaModes/UserControsl/PlayerStatusControl.resx
Normal file
@ -0,0 +1,120 @@
|
||||
<?xml version="1.0" encoding="utf-8"?>
|
||||
<root>
|
||||
<!--
|
||||
Microsoft ResX Schema
|
||||
|
||||
Version 2.0
|
||||
|
||||
The primary goals of this format is to allow a simple XML format
|
||||
that is mostly human readable. The generation and parsing of the
|
||||
various data types are done through the TypeConverter classes
|
||||
associated with the data types.
|
||||
|
||||
Example:
|
||||
|
||||
... ado.net/XML headers & schema ...
|
||||
<resheader name="resmimetype">text/microsoft-resx</resheader>
|
||||
<resheader name="version">2.0</resheader>
|
||||
<resheader name="reader">System.Resources.ResXResourceReader, System.Windows.Forms, ...</resheader>
|
||||
<resheader name="writer">System.Resources.ResXResourceWriter, System.Windows.Forms, ...</resheader>
|
||||
<data name="Name1"><value>this is my long string</value><comment>this is a comment</comment></data>
|
||||
<data name="Color1" type="System.Drawing.Color, System.Drawing">Blue</data>
|
||||
<data name="Bitmap1" mimetype="application/x-microsoft.net.object.binary.base64">
|
||||
<value>[base64 mime encoded serialized .NET Framework object]</value>
|
||||
</data>
|
||||
<data name="Icon1" type="System.Drawing.Icon, System.Drawing" mimetype="application/x-microsoft.net.object.bytearray.base64">
|
||||
<value>[base64 mime encoded string representing a byte array form of the .NET Framework object]</value>
|
||||
<comment>This is a comment</comment>
|
||||
</data>
|
||||
|
||||
There are any number of "resheader" rows that contain simple
|
||||
name/value pairs.
|
||||
|
||||
Each data row contains a name, and value. The row also contains a
|
||||
type or mimetype. Type corresponds to a .NET class that support
|
||||
text/value conversion through the TypeConverter architecture.
|
||||
Classes that don't support this are serialized and stored with the
|
||||
mimetype set.
|
||||
|
||||
The mimetype is used for serialized objects, and tells the
|
||||
ResXResourceReader how to depersist the object. This is currently not
|
||||
extensible. For a given mimetype the value must be set accordingly:
|
||||
|
||||
Note - application/x-microsoft.net.object.binary.base64 is the format
|
||||
that the ResXResourceWriter will generate, however the reader can
|
||||
read any of the formats listed below.
|
||||
|
||||
mimetype: application/x-microsoft.net.object.binary.base64
|
||||
value : The object must be serialized with
|
||||
: System.Runtime.Serialization.Formatters.Binary.BinaryFormatter
|
||||
: and then encoded with base64 encoding.
|
||||
|
||||
mimetype: application/x-microsoft.net.object.soap.base64
|
||||
value : The object must be serialized with
|
||||
: System.Runtime.Serialization.Formatters.Soap.SoapFormatter
|
||||
: and then encoded with base64 encoding.
|
||||
|
||||
mimetype: application/x-microsoft.net.object.bytearray.base64
|
||||
value : The object must be serialized into a byte array
|
||||
: using a System.ComponentModel.TypeConverter
|
||||
: and then encoded with base64 encoding.
|
||||
-->
|
||||
<xsd:schema id="root" xmlns="" xmlns:xsd="http://www.w3.org/2001/XMLSchema" xmlns:msdata="urn:schemas-microsoft-com:xml-msdata">
|
||||
<xsd:import namespace="http://www.w3.org/XML/1998/namespace" />
|
||||
<xsd:element name="root" msdata:IsDataSet="true">
|
||||
<xsd:complexType>
|
||||
<xsd:choice maxOccurs="unbounded">
|
||||
<xsd:element name="metadata">
|
||||
<xsd:complexType>
|
||||
<xsd:sequence>
|
||||
<xsd:element name="value" type="xsd:string" minOccurs="0" />
|
||||
</xsd:sequence>
|
||||
<xsd:attribute name="name" use="required" type="xsd:string" />
|
||||
<xsd:attribute name="type" type="xsd:string" />
|
||||
<xsd:attribute name="mimetype" type="xsd:string" />
|
||||
<xsd:attribute ref="xml:space" />
|
||||
</xsd:complexType>
|
||||
</xsd:element>
|
||||
<xsd:element name="assembly">
|
||||
<xsd:complexType>
|
||||
<xsd:attribute name="alias" type="xsd:string" />
|
||||
<xsd:attribute name="name" type="xsd:string" />
|
||||
</xsd:complexType>
|
||||
</xsd:element>
|
||||
<xsd:element name="data">
|
||||
<xsd:complexType>
|
||||
<xsd:sequence>
|
||||
<xsd:element name="value" type="xsd:string" minOccurs="0" msdata:Ordinal="1" />
|
||||
<xsd:element name="comment" type="xsd:string" minOccurs="0" msdata:Ordinal="2" />
|
||||
</xsd:sequence>
|
||||
<xsd:attribute name="name" type="xsd:string" use="required" msdata:Ordinal="1" />
|
||||
<xsd:attribute name="type" type="xsd:string" msdata:Ordinal="3" />
|
||||
<xsd:attribute name="mimetype" type="xsd:string" msdata:Ordinal="4" />
|
||||
<xsd:attribute ref="xml:space" />
|
||||
</xsd:complexType>
|
||||
</xsd:element>
|
||||
<xsd:element name="resheader">
|
||||
<xsd:complexType>
|
||||
<xsd:sequence>
|
||||
<xsd:element name="value" type="xsd:string" minOccurs="0" msdata:Ordinal="1" />
|
||||
</xsd:sequence>
|
||||
<xsd:attribute name="name" type="xsd:string" use="required" />
|
||||
</xsd:complexType>
|
||||
</xsd:element>
|
||||
</xsd:choice>
|
||||
</xsd:complexType>
|
||||
</xsd:element>
|
||||
</xsd:schema>
|
||||
<resheader name="resmimetype">
|
||||
<value>text/microsoft-resx</value>
|
||||
</resheader>
|
||||
<resheader name="version">
|
||||
<value>2.0</value>
|
||||
</resheader>
|
||||
<resheader name="reader">
|
||||
<value>System.Resources.ResXResourceReader, System.Windows.Forms, Version=4.0.0.0, Culture=neutral, PublicKeyToken=b77a5c561934e089</value>
|
||||
</resheader>
|
||||
<resheader name="writer">
|
||||
<value>System.Resources.ResXResourceWriter, System.Windows.Forms, Version=4.0.0.0, Culture=neutral, PublicKeyToken=b77a5c561934e089</value>
|
||||
</resheader>
|
||||
</root>
|
29
OshimaModules/Characters/ColdBlue.cs
Normal file
29
OshimaModules/Characters/ColdBlue.cs
Normal file
@ -0,0 +1,29 @@
|
||||
using Milimoe.FunGame.Core.Entity;
|
||||
using Milimoe.FunGame.Core.Library.Constant;
|
||||
|
||||
namespace Oshima.FunGame.OshimaModules.Characters
|
||||
{
|
||||
public class ColdBlue : Character
|
||||
{
|
||||
public ColdBlue() : base()
|
||||
{
|
||||
Id = 10;
|
||||
Name = "Cold";
|
||||
FirstName = "Blue";
|
||||
NickName = "冷蓝";
|
||||
PrimaryAttribute = PrimaryAttribute.STR;
|
||||
InitialATK = 28;
|
||||
InitialHP = 95;
|
||||
InitialMP = 25;
|
||||
InitialSTR = 22;
|
||||
STRGrowth = 1.9;
|
||||
InitialAGI = 4;
|
||||
AGIGrowth = 0.6;
|
||||
InitialINT = 4;
|
||||
INTGrowth = 0.6;
|
||||
InitialSPD = 300;
|
||||
InitialHR = 4;
|
||||
InitialMR = 2;
|
||||
}
|
||||
}
|
||||
}
|
29
OshimaModules/Characters/DokyoMayor.cs
Normal file
29
OshimaModules/Characters/DokyoMayor.cs
Normal file
@ -0,0 +1,29 @@
|
||||
using Milimoe.FunGame.Core.Entity;
|
||||
using Milimoe.FunGame.Core.Library.Constant;
|
||||
|
||||
namespace Oshima.FunGame.OshimaModules.Characters
|
||||
{
|
||||
public class DokyoMayor : Character
|
||||
{
|
||||
public DokyoMayor() : base()
|
||||
{
|
||||
Id = 6;
|
||||
Name = "Dokyo";
|
||||
FirstName = "Mayor";
|
||||
NickName = "铎京市长";
|
||||
PrimaryAttribute = PrimaryAttribute.AGI;
|
||||
InitialATK = 21;
|
||||
InitialHP = 120;
|
||||
InitialMP = 20;
|
||||
InitialSTR = 7;
|
||||
STRGrowth = 1;
|
||||
InitialAGI = 21;
|
||||
AGIGrowth = 1.8;
|
||||
InitialINT = 2;
|
||||
INTGrowth = 0.2;
|
||||
InitialSPD = 300;
|
||||
InitialHR = 4;
|
||||
InitialMR = 2;
|
||||
}
|
||||
}
|
||||
}
|
29
OshimaModules/Characters/MagicalGirl.cs
Normal file
29
OshimaModules/Characters/MagicalGirl.cs
Normal file
@ -0,0 +1,29 @@
|
||||
using Milimoe.FunGame.Core.Entity;
|
||||
using Milimoe.FunGame.Core.Library.Constant;
|
||||
|
||||
namespace Oshima.FunGame.OshimaModules.Characters
|
||||
{
|
||||
public class MagicalGirl : Character
|
||||
{
|
||||
public MagicalGirl() : base()
|
||||
{
|
||||
Id = 7;
|
||||
Name = "Magical";
|
||||
FirstName = "Girl";
|
||||
NickName = "魔法少女";
|
||||
PrimaryAttribute = PrimaryAttribute.AGI;
|
||||
InitialATK = 20;
|
||||
InitialHP = 95;
|
||||
InitialMP = 35;
|
||||
InitialSTR = 7;
|
||||
STRGrowth = 0.3;
|
||||
InitialAGI = 15;
|
||||
AGIGrowth = 2.3;
|
||||
InitialINT = 8;
|
||||
INTGrowth = 0.4;
|
||||
InitialSPD = 300;
|
||||
InitialHR = 4;
|
||||
InitialMR = 2;
|
||||
}
|
||||
}
|
||||
}
|
29
OshimaModules/Characters/NanGanYu.cs
Normal file
29
OshimaModules/Characters/NanGanYu.cs
Normal file
@ -0,0 +1,29 @@
|
||||
using Milimoe.FunGame.Core.Entity;
|
||||
using Milimoe.FunGame.Core.Library.Constant;
|
||||
|
||||
namespace Oshima.FunGame.OshimaModules.Characters
|
||||
{
|
||||
public class NanGanYu : Character
|
||||
{
|
||||
public NanGanYu() : base()
|
||||
{
|
||||
Id = 4;
|
||||
Name = "Nan";
|
||||
FirstName = "Ganyu";
|
||||
NickName = "男甘雨";
|
||||
PrimaryAttribute = PrimaryAttribute.INT;
|
||||
InitialATK = 17;
|
||||
InitialHP = 115;
|
||||
InitialMP = 80;
|
||||
InitialSTR = 6;
|
||||
STRGrowth = 0.6;
|
||||
InitialAGI = 7;
|
||||
AGIGrowth = 0.7;
|
||||
InitialINT = 17;
|
||||
INTGrowth = 1.7;
|
||||
InitialSPD = 300;
|
||||
InitialHR = 4;
|
||||
InitialMR = 2;
|
||||
}
|
||||
}
|
||||
}
|
29
OshimaModules/Characters/NiuNan.cs
Normal file
29
OshimaModules/Characters/NiuNan.cs
Normal file
@ -0,0 +1,29 @@
|
||||
using Milimoe.FunGame.Core.Entity;
|
||||
using Milimoe.FunGame.Core.Library.Constant;
|
||||
|
||||
namespace Oshima.FunGame.OshimaModules.Characters
|
||||
{
|
||||
public class NiuNan : Character
|
||||
{
|
||||
public NiuNan() : base()
|
||||
{
|
||||
Id = 5;
|
||||
Name = "Niu";
|
||||
FirstName = "Nan";
|
||||
NickName = "牛腩";
|
||||
PrimaryAttribute = PrimaryAttribute.INT;
|
||||
InitialATK = 16;
|
||||
InitialHP = 75;
|
||||
InitialMP = 90;
|
||||
InitialSTR = 0;
|
||||
STRGrowth = 0;
|
||||
InitialAGI = 0;
|
||||
AGIGrowth = 0;
|
||||
InitialINT = 30;
|
||||
INTGrowth = 3;
|
||||
InitialSPD = 300;
|
||||
InitialHR = 4;
|
||||
InitialMR = 2;
|
||||
}
|
||||
}
|
||||
}
|
29
OshimaModules/Characters/OshimaShiya.cs
Normal file
29
OshimaModules/Characters/OshimaShiya.cs
Normal file
@ -0,0 +1,29 @@
|
||||
using Milimoe.FunGame.Core.Entity;
|
||||
using Milimoe.FunGame.Core.Library.Constant;
|
||||
|
||||
namespace Oshima.FunGame.OshimaModules.Characters
|
||||
{
|
||||
public class OshimaShiya : Character
|
||||
{
|
||||
public OshimaShiya() : base()
|
||||
{
|
||||
Id = 1;
|
||||
Name = "Oshima";
|
||||
FirstName = "Shiya";
|
||||
NickName = "大島シヤ";
|
||||
PrimaryAttribute = PrimaryAttribute.STR;
|
||||
InitialATK = 25;
|
||||
InitialHP = 85;
|
||||
InitialMP = 10;
|
||||
InitialSTR = 35;
|
||||
STRGrowth = 3.5;
|
||||
InitialAGI = 0;
|
||||
AGIGrowth = 0;
|
||||
InitialINT = 0;
|
||||
INTGrowth = 0;
|
||||
InitialSPD = 300;
|
||||
InitialHR = 4;
|
||||
InitialMR = 2;
|
||||
}
|
||||
}
|
||||
}
|
29
OshimaModules/Characters/QWQAQW.cs
Normal file
29
OshimaModules/Characters/QWQAQW.cs
Normal file
@ -0,0 +1,29 @@
|
||||
using Milimoe.FunGame.Core.Entity;
|
||||
using Milimoe.FunGame.Core.Library.Constant;
|
||||
|
||||
namespace Oshima.FunGame.OshimaModules.Characters
|
||||
{
|
||||
public class QWQAQW : Character
|
||||
{
|
||||
public QWQAQW() : base()
|
||||
{
|
||||
Id = 9;
|
||||
Name = "QWQ";
|
||||
FirstName = "AQW";
|
||||
NickName = "LUOLI66";
|
||||
PrimaryAttribute = PrimaryAttribute.INT;
|
||||
InitialATK = 18;
|
||||
InitialHP = 125;
|
||||
InitialMP = 45;
|
||||
InitialSTR = 0;
|
||||
STRGrowth = 0;
|
||||
InitialAGI = 15;
|
||||
AGIGrowth = 1.5;
|
||||
InitialINT = 15;
|
||||
INTGrowth = 1.5;
|
||||
InitialSPD = 300;
|
||||
InitialHR = 4;
|
||||
InitialMR = 2;
|
||||
}
|
||||
}
|
||||
}
|
29
OshimaModules/Characters/QingXiang.cs
Normal file
29
OshimaModules/Characters/QingXiang.cs
Normal file
@ -0,0 +1,29 @@
|
||||
using Milimoe.FunGame.Core.Entity;
|
||||
using Milimoe.FunGame.Core.Library.Constant;
|
||||
|
||||
namespace Oshima.FunGame.OshimaModules.Characters
|
||||
{
|
||||
public class QingXiang : Character
|
||||
{
|
||||
public QingXiang() : base()
|
||||
{
|
||||
Id = 8;
|
||||
Name = "Qing";
|
||||
FirstName = "Xiang";
|
||||
NickName = "清香";
|
||||
PrimaryAttribute = PrimaryAttribute.INT;
|
||||
InitialATK = 26;
|
||||
InitialHP = 110;
|
||||
InitialMP = 80;
|
||||
InitialSTR = 6;
|
||||
STRGrowth = 0.5;
|
||||
InitialAGI = 4;
|
||||
AGIGrowth = 0.5;
|
||||
InitialINT = 20;
|
||||
INTGrowth = 2;
|
||||
InitialSPD = 300;
|
||||
InitialHR = 4;
|
||||
InitialMR = 2;
|
||||
}
|
||||
}
|
||||
}
|
29
OshimaModules/Characters/Quduoduo.cs
Normal file
29
OshimaModules/Characters/Quduoduo.cs
Normal file
@ -0,0 +1,29 @@
|
||||
using Milimoe.FunGame.Core.Entity;
|
||||
using Milimoe.FunGame.Core.Library.Constant;
|
||||
|
||||
namespace Oshima.FunGame.OshimaModules.Characters
|
||||
{
|
||||
public class Quduoduo : Character
|
||||
{
|
||||
public Quduoduo() : base()
|
||||
{
|
||||
Id = 12;
|
||||
Name = "Qu";
|
||||
FirstName = "Duoduo";
|
||||
NickName = "趣多多";
|
||||
PrimaryAttribute = PrimaryAttribute.STR;
|
||||
InitialATK = 19;
|
||||
InitialHP = 90;
|
||||
InitialMP = 40;
|
||||
InitialSTR = 13;
|
||||
STRGrowth = 1.5;
|
||||
InitialAGI = 13;
|
||||
AGIGrowth = 1.2;
|
||||
InitialINT = 4;
|
||||
INTGrowth = 0.3;
|
||||
InitialSPD = 300;
|
||||
InitialHR = 4;
|
||||
InitialMR = 2;
|
||||
}
|
||||
}
|
||||
}
|
30
OshimaModules/Characters/XinYin.cs
Normal file
30
OshimaModules/Characters/XinYin.cs
Normal file
@ -0,0 +1,30 @@
|
||||
using Milimoe.FunGame.Core.Entity;
|
||||
using Milimoe.FunGame.Core.Library.Constant;
|
||||
|
||||
namespace Oshima.FunGame.OshimaModules.Characters
|
||||
{
|
||||
public class XinYin : Character
|
||||
{
|
||||
public XinYin() : base()
|
||||
{
|
||||
Id = 2;
|
||||
Name = "Xiyue";
|
||||
FirstName = "XinYin";
|
||||
NickName = "心音";
|
||||
PrimaryAttribute = PrimaryAttribute.AGI;
|
||||
InitialATK = 22;
|
||||
InitialHP = 80;
|
||||
InitialMP = 60;
|
||||
InitialSTR = 8;
|
||||
STRGrowth = 0.9;
|
||||
InitialAGI = 19;
|
||||
AGIGrowth = 1.7;
|
||||
InitialINT = 3;
|
||||
INTGrowth = 0.4;
|
||||
InitialSPD = 300;
|
||||
InitialHR = 4;
|
||||
InitialMR = 2;
|
||||
|
||||
}
|
||||
}
|
||||
}
|
29
OshimaModules/Characters/Yang.cs
Normal file
29
OshimaModules/Characters/Yang.cs
Normal file
@ -0,0 +1,29 @@
|
||||
using Milimoe.FunGame.Core.Entity;
|
||||
using Milimoe.FunGame.Core.Library.Constant;
|
||||
|
||||
namespace Oshima.FunGame.OshimaModules.Characters
|
||||
{
|
||||
public class Yang : Character
|
||||
{
|
||||
public Yang() : base()
|
||||
{
|
||||
Id = 3;
|
||||
Name = "Ya";
|
||||
FirstName = "Yang";
|
||||
NickName = "吖养";
|
||||
PrimaryAttribute = PrimaryAttribute.STR;
|
||||
InitialATK = 23;
|
||||
InitialHP = 105;
|
||||
InitialMP = 55;
|
||||
InitialSTR = 11;
|
||||
STRGrowth = 1.8;
|
||||
InitialAGI = 9;
|
||||
AGIGrowth = 0.5;
|
||||
InitialINT = 10;
|
||||
INTGrowth = 0.7;
|
||||
InitialSPD = 300;
|
||||
InitialHR = 4;
|
||||
InitialMR = 2;
|
||||
}
|
||||
}
|
||||
}
|
29
OshimaModules/Characters/dddovo.cs
Normal file
29
OshimaModules/Characters/dddovo.cs
Normal file
@ -0,0 +1,29 @@
|
||||
using Milimoe.FunGame.Core.Entity;
|
||||
using Milimoe.FunGame.Core.Library.Constant;
|
||||
|
||||
namespace Oshima.FunGame.OshimaModules.Characters
|
||||
{
|
||||
public class dddovo : Character
|
||||
{
|
||||
public dddovo() : base()
|
||||
{
|
||||
Id = 11;
|
||||
Name = "ddd";
|
||||
FirstName = "ovo";
|
||||
NickName = "绿拱门";
|
||||
PrimaryAttribute = PrimaryAttribute.AGI;
|
||||
InitialATK = 22;
|
||||
InitialHP = 65;
|
||||
InitialMP = 22;
|
||||
InitialSTR = 10;
|
||||
STRGrowth = 1;
|
||||
InitialAGI = 20;
|
||||
AGIGrowth = 2;
|
||||
InitialINT = 0;
|
||||
INTGrowth = 0;
|
||||
InitialSPD = 300;
|
||||
InitialHR = 4;
|
||||
InitialMR = 2;
|
||||
}
|
||||
}
|
||||
}
|
7
OshimaModules/Controllers/Controller.cs
Normal file
7
OshimaModules/Controllers/Controller.cs
Normal file
@ -0,0 +1,7 @@
|
||||
namespace Oshima.FunGame.OshimaModules.Controllers
|
||||
{
|
||||
public class Controller
|
||||
{
|
||||
|
||||
}
|
||||
}
|
35
OshimaModules/Effects/ItemEffects/冷却缩减加成.cs
Normal file
35
OshimaModules/Effects/ItemEffects/冷却缩减加成.cs
Normal file
@ -0,0 +1,35 @@
|
||||
using Milimoe.FunGame.Core.Entity;
|
||||
using Milimoe.FunGame.Core.Library.Constant;
|
||||
|
||||
namespace Oshima.FunGame.OshimaModules.Effects
|
||||
{
|
||||
public class 冷却缩减加成 : Effect
|
||||
{
|
||||
public override long Id => Skill.Id;
|
||||
public override string Name => Skill.Name;
|
||||
public override string Description => $"增加角色 {实际冷却缩减加成 * 100:0.##}% 冷却缩减。" + (!TargetSelf ? $"来自:[ {Source} ]" + (Item != null ? $" 的 [ {Item.Name} ]" : "") : "");
|
||||
public override EffectType EffectType => EffectType.Item;
|
||||
public override bool TargetSelf => true;
|
||||
|
||||
public Item? Item { get; }
|
||||
private readonly double 实际冷却缩减加成 = 0;
|
||||
|
||||
public override void OnEffectGained(Character character)
|
||||
{
|
||||
character.ExCDR += 实际冷却缩减加成;
|
||||
}
|
||||
|
||||
public override void OnEffectLost(Character character)
|
||||
{
|
||||
character.ExCDR -= 实际冷却缩减加成;
|
||||
}
|
||||
|
||||
public 冷却缩减加成(Skill skill, Character? source, Item? item, double exCdr) : base(skill)
|
||||
{
|
||||
ActionQueue = skill.ActionQueue;
|
||||
Source = source;
|
||||
Item = item;
|
||||
实际冷却缩减加成 = exCdr;
|
||||
}
|
||||
}
|
||||
}
|
52
OshimaModules/Effects/ItemEffects/技能硬直时间减少.cs
Normal file
52
OshimaModules/Effects/ItemEffects/技能硬直时间减少.cs
Normal file
@ -0,0 +1,52 @@
|
||||
using Milimoe.FunGame.Core.Api.Utility;
|
||||
using Milimoe.FunGame.Core.Entity;
|
||||
using Milimoe.FunGame.Core.Library.Constant;
|
||||
|
||||
namespace Oshima.FunGame.OshimaModules.Effects
|
||||
{
|
||||
public class 技能硬直时间减少 : Effect
|
||||
{
|
||||
public override long Id => Skill.Id;
|
||||
public override string Name => Skill.Name;
|
||||
public override string Description => $"减少角色的所有主动技能 {实际硬直时间减少} 硬直时间。" + (!TargetSelf ? $"来自:[ {Source} ]" + (Item != null ? $" 的 [ {Item.Name} ]" : "") : "");
|
||||
public override EffectType EffectType => EffectType.Item;
|
||||
public override bool TargetSelf => true;
|
||||
|
||||
public Item? Item { get; }
|
||||
private readonly double 实际硬直时间减少 = 2;
|
||||
|
||||
public override void OnEffectGained(Character character)
|
||||
{
|
||||
foreach (Skill s in character.Skills)
|
||||
{
|
||||
s.HardnessTime = Calculation.Round2Digits(s.HardnessTime - 实际硬直时间减少);
|
||||
}
|
||||
foreach (Skill? s in character.Items.Select(i => i.Skills.Active))
|
||||
{
|
||||
if (s != null)
|
||||
s.HardnessTime = Calculation.Round2Digits(s.HardnessTime - 实际硬直时间减少);
|
||||
}
|
||||
}
|
||||
|
||||
public override void OnEffectLost(Character character)
|
||||
{
|
||||
foreach (Skill s in character.Skills)
|
||||
{
|
||||
s.HardnessTime = Calculation.Round2Digits(s.HardnessTime + 实际硬直时间减少);
|
||||
}
|
||||
foreach (Skill? s in character.Items.Select(i => i.Skills.Active))
|
||||
{
|
||||
if (s != null)
|
||||
s.HardnessTime = Calculation.Round2Digits(s.HardnessTime + 实际硬直时间减少);
|
||||
}
|
||||
}
|
||||
|
||||
public 技能硬直时间减少(Skill skill, Character? source, Item? item, double reduce) : base(skill)
|
||||
{
|
||||
ActionQueue = skill.ActionQueue;
|
||||
Source = source;
|
||||
Item = item;
|
||||
实际硬直时间减少 = reduce;
|
||||
}
|
||||
}
|
||||
}
|
35
OshimaModules/Effects/ItemEffects/攻击力加成.cs
Normal file
35
OshimaModules/Effects/ItemEffects/攻击力加成.cs
Normal file
@ -0,0 +1,35 @@
|
||||
using Milimoe.FunGame.Core.Entity;
|
||||
using Milimoe.FunGame.Core.Library.Constant;
|
||||
|
||||
namespace Oshima.FunGame.OshimaModules.Effects
|
||||
{
|
||||
public class 攻击力加成 : Effect
|
||||
{
|
||||
public override long Id => Skill.Id;
|
||||
public override string Name => Skill.Name;
|
||||
public override string Description => $"增加角色 {实际攻击力加成} 点攻击力。" + (!TargetSelf ? $"来自:[ {Source} ]" + (Item != null ? $" 的 [ {Item.Name} ]" : "") : "");
|
||||
public override EffectType EffectType => EffectType.Item;
|
||||
public override bool TargetSelf => true;
|
||||
|
||||
public Item? Item { get; }
|
||||
private readonly double 实际攻击力加成 = 0;
|
||||
|
||||
public override void OnEffectGained(Character character)
|
||||
{
|
||||
character.ExATK2 += 实际攻击力加成;
|
||||
}
|
||||
|
||||
public override void OnEffectLost(Character character)
|
||||
{
|
||||
character.ExATK2 -= 实际攻击力加成;
|
||||
}
|
||||
|
||||
public 攻击力加成(Skill skill, Character? source, Item? item, double exATK) : base(skill)
|
||||
{
|
||||
ActionQueue = skill.ActionQueue;
|
||||
Source = source;
|
||||
Item = item;
|
||||
实际攻击力加成 = exATK;
|
||||
}
|
||||
}
|
||||
}
|
36
OshimaModules/Effects/ItemEffects/普攻硬直时间减少.cs
Normal file
36
OshimaModules/Effects/ItemEffects/普攻硬直时间减少.cs
Normal file
@ -0,0 +1,36 @@
|
||||
using Milimoe.FunGame.Core.Api.Utility;
|
||||
using Milimoe.FunGame.Core.Entity;
|
||||
using Milimoe.FunGame.Core.Library.Constant;
|
||||
|
||||
namespace Oshima.FunGame.OshimaModules.Effects
|
||||
{
|
||||
public class 普攻硬直时间减少 : Effect
|
||||
{
|
||||
public override long Id => Skill.Id;
|
||||
public override string Name => Skill.Name;
|
||||
public override string Description => $"减少角色的普通攻击 {实际硬直时间减少} 硬直时间。" + (!TargetSelf ? $"来自:[ {Source} ]" + (Item != null ? $" 的 [ {Item.Name} ]" : "") : "");
|
||||
public override EffectType EffectType => EffectType.Item;
|
||||
public override bool TargetSelf => true;
|
||||
|
||||
public Item? Item { get; }
|
||||
private readonly double 实际硬直时间减少 = 2;
|
||||
|
||||
public override void OnEffectGained(Character character)
|
||||
{
|
||||
character.NormalAttack.HardnessTime = Calculation.Round2Digits(character.NormalAttack.HardnessTime - 实际硬直时间减少); ;
|
||||
}
|
||||
|
||||
public override void OnEffectLost(Character character)
|
||||
{
|
||||
character.NormalAttack.HardnessTime = Calculation.Round2Digits(character.NormalAttack.HardnessTime + 实际硬直时间减少); ;
|
||||
}
|
||||
|
||||
public 普攻硬直时间减少(Skill skill, Character? source, Item? item, double reduce) : base(skill)
|
||||
{
|
||||
ActionQueue = skill.ActionQueue;
|
||||
Source = source;
|
||||
Item = item;
|
||||
实际硬直时间减少 = reduce;
|
||||
}
|
||||
}
|
||||
}
|
35
OshimaModules/Effects/ItemEffects/物理护甲加成.cs
Normal file
35
OshimaModules/Effects/ItemEffects/物理护甲加成.cs
Normal file
@ -0,0 +1,35 @@
|
||||
using Milimoe.FunGame.Core.Entity;
|
||||
using Milimoe.FunGame.Core.Library.Constant;
|
||||
|
||||
namespace Oshima.FunGame.OshimaModules.Effects
|
||||
{
|
||||
public class 物理护甲加成 : Effect
|
||||
{
|
||||
public override long Id => Skill.Id;
|
||||
public override string Name => Skill.Name;
|
||||
public override string Description => $"增加角色 {实际物理护甲加成} 点物理护甲。" + (!TargetSelf ? $"来自:[ {Source} ]" + (Item != null ? $" 的 [ {Item.Name} ]" : "") : "");
|
||||
public override EffectType EffectType => EffectType.Item;
|
||||
public override bool TargetSelf => true;
|
||||
|
||||
public Item? Item { get; }
|
||||
private readonly double 实际物理护甲加成 = 0;
|
||||
|
||||
public override void OnEffectGained(Character character)
|
||||
{
|
||||
character.ExDEF2 += 实际物理护甲加成;
|
||||
}
|
||||
|
||||
public override void OnEffectLost(Character character)
|
||||
{
|
||||
character.ExDEF2 -= 实际物理护甲加成;
|
||||
}
|
||||
|
||||
public 物理护甲加成(Skill skill, Character? source, Item? item, double exDef) : base(skill)
|
||||
{
|
||||
ActionQueue = skill.ActionQueue;
|
||||
Source = source;
|
||||
Item = item;
|
||||
实际物理护甲加成 = exDef;
|
||||
}
|
||||
}
|
||||
}
|
47
OshimaModules/Effects/眩晕.cs
Normal file
47
OshimaModules/Effects/眩晕.cs
Normal file
@ -0,0 +1,47 @@
|
||||
using Milimoe.FunGame.Core.Entity;
|
||||
using Milimoe.FunGame.Core.Library.Constant;
|
||||
|
||||
namespace Oshima.FunGame.OshimaModules.Effects
|
||||
{
|
||||
public class 眩晕 : Effect
|
||||
{
|
||||
public override long Id => 4101;
|
||||
public override string Name => "眩晕";
|
||||
public override string Description => $"此角色被眩晕了,不能行动。来自:[ {Source} ] 的 [ {Skill.Name} ]";
|
||||
public override EffectType EffectType => EffectType.Stun;
|
||||
public override bool TargetSelf => true;
|
||||
public override Character Source => _sourceCharacter;
|
||||
public override bool Durative => _durative;
|
||||
public override double Duration => _duration;
|
||||
public override int DurationTurn => _durationTurn;
|
||||
|
||||
private readonly Character _sourceCharacter;
|
||||
private readonly bool _durative;
|
||||
private readonly double _duration;
|
||||
private readonly int _durationTurn;
|
||||
|
||||
public 眩晕(Skill skill, Character sourceCharacter, bool durative = false, double duration = 0, int durationTurn = 1) : base(skill)
|
||||
{
|
||||
ActionQueue = skill.ActionQueue;
|
||||
_sourceCharacter = sourceCharacter;
|
||||
_durative = durative;
|
||||
_duration = duration;
|
||||
_durationTurn = durationTurn;
|
||||
}
|
||||
|
||||
public override void OnEffectGained(Character character)
|
||||
{
|
||||
if (_durative) RemainDuration = Duration;
|
||||
else RemainDurationTurn = DurationTurn;
|
||||
character.CharacterEffectStates.Add(this, [CharacterState.NotActionable]);
|
||||
character.UpdateCharacterState();
|
||||
InterruptCasting(character, Source);
|
||||
}
|
||||
|
||||
public override void OnEffectLost(Character character)
|
||||
{
|
||||
character.CharacterEffectStates.Remove(this);
|
||||
character.UpdateCharacterState();
|
||||
}
|
||||
}
|
||||
}
|
24
OshimaModules/Effects/累积之压标记.cs
Normal file
24
OshimaModules/Effects/累积之压标记.cs
Normal file
@ -0,0 +1,24 @@
|
||||
using Milimoe.FunGame.Core.Entity;
|
||||
using Milimoe.FunGame.Core.Library.Constant;
|
||||
|
||||
namespace Oshima.FunGame.OshimaModules.Effects
|
||||
{
|
||||
public class 累积之压标记 : Effect
|
||||
{
|
||||
public override long Id => 4102;
|
||||
public override string Name => "累积之压标记";
|
||||
public override string Description => $"此角色持有累积之压标记,已累计 {MarkLevel} 层。来自:[ {Source} ]";
|
||||
public override EffectType EffectType => EffectType.Mark;
|
||||
public override bool TargetSelf => true;
|
||||
public override Character Source => _sourceCharacter;
|
||||
public int MarkLevel { get; set; } = 1;
|
||||
|
||||
private readonly Character _sourceCharacter;
|
||||
|
||||
public 累积之压标记(Skill skill, Character sourceCharacter) : base(skill)
|
||||
{
|
||||
ActionQueue = skill.ActionQueue;
|
||||
_sourceCharacter = sourceCharacter;
|
||||
}
|
||||
}
|
||||
}
|
62
OshimaModules/Items/Accessory/攻击之爪.cs
Normal file
62
OshimaModules/Items/Accessory/攻击之爪.cs
Normal file
@ -0,0 +1,62 @@
|
||||
using Milimoe.FunGame.Core.Entity;
|
||||
using Milimoe.FunGame.Core.Library.Constant;
|
||||
using Oshima.FunGame.OshimaModules.Effects;
|
||||
using Oshima.FunGame.OshimaModules.Skills;
|
||||
|
||||
namespace Oshima.FunGame.OshimaModules.Items
|
||||
{
|
||||
public class 攻击之爪10 : Item
|
||||
{
|
||||
public override long Id => (long)AccessoryID.攻击之爪10;
|
||||
public override string Name => "攻击之爪 +10";
|
||||
public override string Description => Skills.Passives.Count > 0 ? Skills.Passives.First().Description : "";
|
||||
|
||||
public 攻击之爪10(Character? character = null) : base(ItemType.Accessory, slot: EquipSlotType.Accessory)
|
||||
{
|
||||
Skills.Passives.Add(new 攻击之爪技能(character, this, 10));
|
||||
}
|
||||
}
|
||||
|
||||
public class 攻击之爪30 : Item
|
||||
{
|
||||
public override long Id => (long)AccessoryID.攻击之爪30;
|
||||
public override string Name => "攻击之爪 +30";
|
||||
public override string Description => Skills.Passives.Count > 0 ? Skills.Passives.First().Description : "";
|
||||
|
||||
public 攻击之爪30(Character? character = null) : base(ItemType.Accessory, slot: EquipSlotType.Accessory)
|
||||
{
|
||||
Skills.Passives.Add(new 攻击之爪技能(character, this, 30));
|
||||
}
|
||||
}
|
||||
|
||||
public class 攻击之爪50 : Item
|
||||
{
|
||||
public override long Id => (long)AccessoryID.攻击之爪50;
|
||||
public override string Name => "攻击之爪 +50";
|
||||
public override string Description => Skills.Passives.Count > 0 ? Skills.Passives.First().Description : "";
|
||||
|
||||
public 攻击之爪50(Character? character = null) : base(ItemType.Accessory, slot: EquipSlotType.Accessory)
|
||||
{
|
||||
Skills.Passives.Add(new 攻击之爪技能(character, this, 50));
|
||||
}
|
||||
}
|
||||
|
||||
public class 攻击之爪技能 : Skill
|
||||
{
|
||||
public override long Id => (long)ItemPassiveID.攻击之爪;
|
||||
public override string Name => "攻击之爪";
|
||||
public override string Description => Effects.Count > 0 ? Effects.First().Description : "";
|
||||
|
||||
public 攻击之爪技能(Character? character = null, Item? item = null, double exATK = 0) : base(SkillType.Passive, character)
|
||||
{
|
||||
Level = 1;
|
||||
Item = item;
|
||||
Effects.Add(new 攻击力加成(this, character, item, exATK));
|
||||
}
|
||||
|
||||
public override IEnumerable<Effect> AddInactiveEffectToCharacter()
|
||||
{
|
||||
return Effects;
|
||||
}
|
||||
}
|
||||
}
|
9
OshimaModules/Items/ItemID.cs
Normal file
9
OshimaModules/Items/ItemID.cs
Normal file
@ -0,0 +1,9 @@
|
||||
namespace Oshima.FunGame.OshimaModules.Items
|
||||
{
|
||||
public enum AccessoryID : long
|
||||
{
|
||||
攻击之爪10 = 14001,
|
||||
攻击之爪30 = 14002,
|
||||
攻击之爪50 = 14003,
|
||||
}
|
||||
}
|
43
OshimaModules/Items/Weapon/独奏弓.cs
Normal file
43
OshimaModules/Items/Weapon/独奏弓.cs
Normal file
@ -0,0 +1,43 @@
|
||||
using Milimoe.FunGame.Core.Entity;
|
||||
using Milimoe.FunGame.Core.Library.Constant;
|
||||
using Oshima.FunGame.OshimaModules.Effects;
|
||||
|
||||
namespace Oshima.FunGame.OshimaModules.Items
|
||||
{
|
||||
[Obsolete]
|
||||
public class 独奏弓 : Item
|
||||
{
|
||||
public override long Id => 11999;
|
||||
public override string Name => "独奏弓";
|
||||
public override string Description => Skills.Passives.Count > 0 ? Skills.Passives.First().Description : "";
|
||||
|
||||
public 独奏弓(Character? character = null) : base(ItemType.Weapon, slot: EquipSlotType.Weapon)
|
||||
{
|
||||
WeaponType = WeaponType.Bow;
|
||||
Skills.Passives.Add(new 独奏弓技能(character, this));
|
||||
}
|
||||
}
|
||||
|
||||
public class 独奏弓技能 : Skill
|
||||
{
|
||||
public override long Id => 5999;
|
||||
public override string Name => "独奏弓";
|
||||
public override string Description => $"增加角色 {攻击力加成} 点攻击力,减少普通攻击 {硬直时间减少} 硬直时间。";
|
||||
|
||||
private readonly double 攻击力加成 = 80;
|
||||
private readonly double 硬直时间减少 = 2;
|
||||
|
||||
public 独奏弓技能(Character? character, Item item) : base(SkillType.Passive, character)
|
||||
{
|
||||
Level = 1;
|
||||
Item = item;
|
||||
Effects.Add(new 攻击力加成(this, character, item, 攻击力加成));
|
||||
Effects.Add(new 普攻硬直时间减少(this, character, item, 硬直时间减少));
|
||||
}
|
||||
|
||||
public override IEnumerable<Effect> AddInactiveEffectToCharacter()
|
||||
{
|
||||
return Effects;
|
||||
}
|
||||
}
|
||||
}
|
23
OshimaModules/Modules/CharacterModule.cs
Normal file
23
OshimaModules/Modules/CharacterModule.cs
Normal file
@ -0,0 +1,23 @@
|
||||
using Milimoe.FunGame.Core.Api.Utility;
|
||||
using Milimoe.FunGame.Core.Entity;
|
||||
|
||||
namespace Oshima.FunGame.OshimaModules
|
||||
{
|
||||
public class CharacterModule : Milimoe.FunGame.Core.Library.Common.Addon.CharacterModule
|
||||
{
|
||||
public override string Name => OshimaGameModuleConstant.Character;
|
||||
public override string Description => OshimaGameModuleConstant.Description;
|
||||
public override string Version => OshimaGameModuleConstant.Version;
|
||||
public override string Author => OshimaGameModuleConstant.Author;
|
||||
|
||||
public override List<Character> Characters
|
||||
{
|
||||
get
|
||||
{
|
||||
EntityModuleConfig<Character> config = new(OshimaGameModuleConstant.General, OshimaGameModuleConstant.Character);
|
||||
config.LoadConfig();
|
||||
return [.. config.Values];
|
||||
}
|
||||
}
|
||||
}
|
||||
}
|
23
OshimaModules/Modules/Constant.cs
Normal file
23
OshimaModules/Modules/Constant.cs
Normal file
@ -0,0 +1,23 @@
|
||||
using Milimoe.FunGame.Core.Library.Common.Addon;
|
||||
|
||||
namespace Oshima.FunGame.OshimaModules
|
||||
{
|
||||
public class OshimaGameModuleConstant
|
||||
{
|
||||
public const string General = "oshima-studios";
|
||||
public const string FastAuto = "oshima.fungame.fastauto";
|
||||
public const string Character = "oshima.fungame.characters";
|
||||
public const string Skill = "oshima.fungame.skills";
|
||||
public const string Item = "oshima.fungame.items";
|
||||
public const string Description = "Oshima Studios Presents";
|
||||
public const string Version = "1.0.0";
|
||||
public const string Author = "Oshima Studios";
|
||||
public const string FastAutoMap = "oshima.fungame.fastauto.map";
|
||||
|
||||
private static readonly string[] Maps = [FastAutoMap];
|
||||
private static readonly string[] Characters = [Character];
|
||||
private static readonly string[] Skills = [Skill];
|
||||
private static readonly string[] Items = [Item];
|
||||
public static GameModuleDepend GameModuleDepend { get; } = new(Maps, Characters, Skills, Items);
|
||||
}
|
||||
}
|
58
OshimaModules/Modules/ItemModule.cs
Normal file
58
OshimaModules/Modules/ItemModule.cs
Normal file
@ -0,0 +1,58 @@
|
||||
using Milimoe.FunGame.Core.Api.Utility;
|
||||
using Milimoe.FunGame.Core.Entity;
|
||||
using Milimoe.FunGame.Core.Library.Constant;
|
||||
using Oshima.FunGame.OshimaModules.Items;
|
||||
|
||||
namespace Oshima.FunGame.OshimaModules
|
||||
{
|
||||
public class ItemModule : Milimoe.FunGame.Core.Library.Common.Addon.ItemModule
|
||||
{
|
||||
public override string Name => OshimaGameModuleConstant.Item;
|
||||
public override string Description => OshimaGameModuleConstant.Description;
|
||||
public override string Version => OshimaGameModuleConstant.Version;
|
||||
public override string Author => OshimaGameModuleConstant.Author;
|
||||
|
||||
public override List<Item> Items
|
||||
{
|
||||
get
|
||||
{
|
||||
EntityModuleConfig<Item> config = new(OshimaGameModuleConstant.General, OshimaGameModuleConstant.Item);
|
||||
config.LoadConfig();
|
||||
foreach (string key in config.Keys)
|
||||
{
|
||||
Item prev = config[key];
|
||||
Item? next = GetItem(prev.Id, prev.Name, prev.ItemType);
|
||||
if (next != null)
|
||||
{
|
||||
prev.SetPropertyToItemModuleNew(next);
|
||||
config[key] = next;
|
||||
}
|
||||
}
|
||||
return [.. config.Values];
|
||||
}
|
||||
}
|
||||
|
||||
public override Item? GetItem(long id, string name, ItemType type)
|
||||
{
|
||||
if (type == ItemType.MagicCardPack)
|
||||
{
|
||||
|
||||
}
|
||||
|
||||
if (type == ItemType.Accessory)
|
||||
{
|
||||
switch ((AccessoryID)id)
|
||||
{
|
||||
case AccessoryID.攻击之爪10:
|
||||
return new 攻击之爪10();
|
||||
case AccessoryID.攻击之爪30:
|
||||
return new 攻击之爪30();
|
||||
case AccessoryID.攻击之爪50:
|
||||
return new 攻击之爪50();
|
||||
}
|
||||
}
|
||||
|
||||
return null;
|
||||
}
|
||||
}
|
||||
}
|
125
OshimaModules/Modules/SkillModule.cs
Normal file
125
OshimaModules/Modules/SkillModule.cs
Normal file
@ -0,0 +1,125 @@
|
||||
using Milimoe.FunGame.Core.Api.Utility;
|
||||
using Milimoe.FunGame.Core.Entity;
|
||||
using Milimoe.FunGame.Core.Library.Constant;
|
||||
using Oshima.FunGame.OshimaModules.Items;
|
||||
using Oshima.FunGame.OshimaModules.Skills;
|
||||
|
||||
namespace Oshima.FunGame.OshimaModules
|
||||
{
|
||||
public class SkillModule : Milimoe.FunGame.Core.Library.Common.Addon.SkillModule
|
||||
{
|
||||
public override string Name => OshimaGameModuleConstant.Skill;
|
||||
public override string Description => OshimaGameModuleConstant.Description;
|
||||
public override string Version => OshimaGameModuleConstant.Version;
|
||||
public override string Author => OshimaGameModuleConstant.Author;
|
||||
|
||||
public override List<Skill> Skills
|
||||
{
|
||||
get
|
||||
{
|
||||
EntityModuleConfig<Skill> config = new(OshimaGameModuleConstant.General, OshimaGameModuleConstant.Skill);
|
||||
config.LoadConfig();
|
||||
foreach (string key in config.Keys)
|
||||
{
|
||||
Skill prev = config[key];
|
||||
Skill? next = GetSkill(prev.Id, prev.Name, prev.SkillType);
|
||||
if (next != null)
|
||||
{
|
||||
config[key] = next;
|
||||
}
|
||||
}
|
||||
return [.. config.Values];
|
||||
}
|
||||
}
|
||||
|
||||
public override Skill? GetSkill(long id, string name, SkillType type)
|
||||
{
|
||||
if (type == SkillType.Magic)
|
||||
{
|
||||
switch ((MagicID)id)
|
||||
{
|
||||
case MagicID.冰霜攻击:
|
||||
return new 冰霜攻击();
|
||||
}
|
||||
}
|
||||
|
||||
if (type == SkillType.Skill)
|
||||
{
|
||||
switch ((SkillID)id)
|
||||
{
|
||||
case SkillID.疾风步:
|
||||
return new 疾风步();
|
||||
}
|
||||
}
|
||||
|
||||
if (type == SkillType.SuperSkill)
|
||||
{
|
||||
switch ((SuperSkillID)id)
|
||||
{
|
||||
case SuperSkillID.力量爆发:
|
||||
return new 力量爆发();
|
||||
case SuperSkillID.天赐之力:
|
||||
return new 天赐之力();
|
||||
case SuperSkillID.魔法涌流:
|
||||
return new 魔法涌流();
|
||||
case SuperSkillID.三重叠加:
|
||||
return new 三重叠加();
|
||||
case SuperSkillID.变幻之心:
|
||||
return new 变幻之心();
|
||||
case SuperSkillID.精准打击:
|
||||
return new 精准打击();
|
||||
case SuperSkillID.绝对领域:
|
||||
return new 绝对领域();
|
||||
case SuperSkillID.能量毁灭:
|
||||
return new 能量毁灭();
|
||||
case SuperSkillID.迅捷之势:
|
||||
return new 迅捷之势();
|
||||
case SuperSkillID.嗜血本能:
|
||||
return new 嗜血本能();
|
||||
case SuperSkillID.平衡强化:
|
||||
return new 平衡强化();
|
||||
case SuperSkillID.血之狂欢:
|
||||
return new 血之狂欢();
|
||||
}
|
||||
}
|
||||
|
||||
if (type == SkillType.Passive)
|
||||
{
|
||||
switch ((PassiveID)id)
|
||||
{
|
||||
case PassiveID.META马:
|
||||
return new META马();
|
||||
case PassiveID.心灵之火:
|
||||
return new 心灵之火();
|
||||
case PassiveID.魔法震荡:
|
||||
return new 魔法震荡();
|
||||
case PassiveID.灵能反射:
|
||||
return new 灵能反射();
|
||||
case PassiveID.智慧与力量:
|
||||
return new 智慧与力量();
|
||||
case PassiveID.致命打击:
|
||||
return new 致命打击();
|
||||
case PassiveID.毁灭之势:
|
||||
return new 毁灭之势();
|
||||
case PassiveID.枯竭打击:
|
||||
return new 枯竭打击();
|
||||
case PassiveID.玻璃大炮:
|
||||
return new 玻璃大炮();
|
||||
case PassiveID.累积之压:
|
||||
return new 累积之压();
|
||||
case PassiveID.敏捷之刃:
|
||||
return new 敏捷之刃();
|
||||
case PassiveID.弱者猎手:
|
||||
return new 弱者猎手();
|
||||
}
|
||||
switch ((ItemPassiveID)id)
|
||||
{
|
||||
case ItemPassiveID.攻击之爪:
|
||||
return new 攻击之爪技能();
|
||||
}
|
||||
}
|
||||
|
||||
return null;
|
||||
}
|
||||
}
|
||||
}
|
@ -7,6 +7,9 @@
|
||||
<RootNamespace>Oshima.FunGame.$(MSBuildProjectName.Replace(" ", "_"))</RootNamespace>
|
||||
<Company>Oshima Studios</Company>
|
||||
<Authors>Oshima Studios</Authors>
|
||||
<OutputType>Library</OutputType>
|
||||
<UseWindowsForms>False</UseWindowsForms>
|
||||
<BaseOutputPath>..\bin\</BaseOutputPath>
|
||||
</PropertyGroup>
|
||||
|
||||
<PropertyGroup Condition="'$(Configuration)|$(Platform)'=='Debug|AnyCPU'">
|
||||
@ -19,16 +22,10 @@
|
||||
<NoWarn>1701;1702;CS8981;IDE1006</NoWarn>
|
||||
</PropertyGroup>
|
||||
|
||||
<ItemGroup>
|
||||
<Folder Include="Characters\" />
|
||||
<Folder Include="Items\" />
|
||||
<Folder Include="Skills\" />
|
||||
</ItemGroup>
|
||||
|
||||
<ItemGroup>
|
||||
<Reference Include="FunGame.Core">
|
||||
<HintPath>..\FunGame.Core\bin\Debug\net8.0\FunGame.Core.dll</HintPath>
|
||||
<HintPath>..\..\FunGame.Core\bin\Debug\net8.0\FunGame.Core.dll</HintPath>
|
||||
</Reference>
|
||||
</ItemGroup>
|
||||
|
||||
|
||||
</Project>
|
65
OshimaModules/Skills/ColdBlue/嗜血本能.cs
Normal file
65
OshimaModules/Skills/ColdBlue/嗜血本能.cs
Normal file
@ -0,0 +1,65 @@
|
||||
using Milimoe.FunGame.Core.Api.Utility;
|
||||
using Milimoe.FunGame.Core.Entity;
|
||||
using Milimoe.FunGame.Core.Library.Constant;
|
||||
using Oshima.FunGame.OshimaModules.Effects;
|
||||
|
||||
namespace Oshima.FunGame.OshimaModules.Skills
|
||||
{
|
||||
public class 嗜血本能 : Skill
|
||||
{
|
||||
public override long Id => (long)SuperSkillID.嗜血本能;
|
||||
public override string Name => "嗜血本能";
|
||||
public override string Description => Effects.Count > 0 ? Effects.First().Description : "";
|
||||
public override double EPCost => 100;
|
||||
public override double CD => 42 - 1 * (Level - 1);
|
||||
public override double HardnessTime { get; set; } = 12;
|
||||
|
||||
public 嗜血本能(Character? character = null) : base(SkillType.SuperSkill, character)
|
||||
{
|
||||
Effects.Add(new 嗜血本能特效(this));
|
||||
}
|
||||
}
|
||||
|
||||
public class 嗜血本能特效(Skill skill) : Effect(skill)
|
||||
{
|
||||
public override long Id => Skill.Id;
|
||||
public override string Name => Skill.Name;
|
||||
public override string Description => $"{Duration} 时间内,攻击拥有标记的角色将根据标记层数获得 {吸血 * 100:0.##}% 吸血每层。";
|
||||
public override bool TargetSelf => true;
|
||||
public override bool Durative => true;
|
||||
public override double Duration => 30;
|
||||
|
||||
public HashSet<Character> 角色有第四层 { get; } = [];
|
||||
private double 吸血 => Calculation.Round4Digits(0.03 * Level);
|
||||
|
||||
public override void AfterDamageCalculation(Character character, Character enemy, double damage, bool isNormalAttack, bool isMagicDamage, MagicType magicType, DamageResult damageResult)
|
||||
{
|
||||
if (character == Skill.Character && damageResult != DamageResult.Evaded && character.HP < character.MaxHP)
|
||||
{
|
||||
int 层数 = 0;
|
||||
if (enemy.Effects.Where(e => e is 累积之压标记).FirstOrDefault() is 累积之压标记 e)
|
||||
{
|
||||
层数 = e.MarkLevel;
|
||||
}
|
||||
else if (角色有第四层.Remove(enemy))
|
||||
{
|
||||
层数 = 4;
|
||||
}
|
||||
double 实际吸血 = Calculation.Round2Digits(吸血 * 层数 * damage);
|
||||
character.HP += 实际吸血;
|
||||
WriteLine($"[ {character} ] 回复了 {实际吸血} 点生命值!");
|
||||
}
|
||||
}
|
||||
|
||||
public override void OnSkillCasted(Character caster, List<Character> enemys, List<Character> teammates, Dictionary<string, object> others)
|
||||
{
|
||||
RemainDuration = Duration;
|
||||
if (!caster.Effects.Contains(this))
|
||||
{
|
||||
角色有第四层.Clear();
|
||||
caster.Effects.Add(this);
|
||||
OnEffectGained(caster);
|
||||
}
|
||||
}
|
||||
}
|
||||
}
|
90
OshimaModules/Skills/ColdBlue/累积之压.cs
Normal file
90
OshimaModules/Skills/ColdBlue/累积之压.cs
Normal file
@ -0,0 +1,90 @@
|
||||
using Milimoe.FunGame.Core.Api.Utility;
|
||||
using Milimoe.FunGame.Core.Entity;
|
||||
using Milimoe.FunGame.Core.Library.Constant;
|
||||
using Oshima.FunGame.OshimaModules.Effects;
|
||||
|
||||
namespace Oshima.FunGame.OshimaModules.Skills
|
||||
{
|
||||
public class 累积之压 : Skill
|
||||
{
|
||||
public override long Id => (long)PassiveID.累积之压;
|
||||
public override string Name => "累积之压";
|
||||
public override string Description => Effects.Count > 0 ? Effects.First().Description : "";
|
||||
|
||||
public 累积之压(Character? character = null) : base(SkillType.Passive, character)
|
||||
{
|
||||
Effects.Add(new 累积之压特效(this));
|
||||
}
|
||||
|
||||
public override IEnumerable<Effect> AddInactiveEffectToCharacter()
|
||||
{
|
||||
return Effects;
|
||||
}
|
||||
}
|
||||
|
||||
public class 累积之压特效(Skill skill) : Effect(skill)
|
||||
{
|
||||
public override long Id => Skill.Id;
|
||||
public override string Name => Skill.Name;
|
||||
public override string Description => $"每次造成伤害都可以叠一层标记,累计 4 层时回收该角色所有标记并造成眩晕 1 回合,额外对该角色造成 {系数 * 100:0.##}% 最大生命值的物理伤害。";
|
||||
public override bool TargetSelf => true;
|
||||
|
||||
private readonly double 系数 = 0.12;
|
||||
private bool 是否是嵌套伤害 = false;
|
||||
|
||||
public override void AfterDamageCalculation(Character character, Character enemy, double damage, bool isNormalAttack, bool isMagicDamage, MagicType magicType, DamageResult damageResult)
|
||||
{
|
||||
if (character == Skill.Character && damageResult != DamageResult.Evaded && !是否是嵌套伤害)
|
||||
{
|
||||
// 叠标记
|
||||
IEnumerable<Effect> effects = enemy.Effects.Where(e => e is 累积之压标记);
|
||||
if (effects.Any() && effects.First() is 累积之压标记 e)
|
||||
{
|
||||
e.MarkLevel++;
|
||||
IEnumerable<Effect> effects2 = character.Effects.Where(e => e is 嗜血本能特效);
|
||||
if (effects2.Any() && effects2.First() is 嗜血本能特效 e2)
|
||||
{
|
||||
if (e.MarkLevel >= 4)
|
||||
{
|
||||
e2.角色有第四层.Add(enemy);
|
||||
}
|
||||
else
|
||||
{
|
||||
e2.角色有第四层.Remove(enemy);
|
||||
}
|
||||
}
|
||||
if (e.MarkLevel >= 4)
|
||||
{
|
||||
// 移除标记
|
||||
enemy.Effects.Remove(e);
|
||||
double 额外伤害 = Calculation.Round2Digits(enemy.MaxHP * 系数);
|
||||
WriteLine($"[ {character} ] 发动了累积之压!将对 [ {enemy} ] 造成眩晕和额外伤害!");
|
||||
// 眩晕
|
||||
IEnumerable<Effect> effects3 = enemy.Effects.Where(e => e is 眩晕 && e.Skill == Skill);
|
||||
if (effects3.Any())
|
||||
{
|
||||
effects3.First().RemainDurationTurn++;
|
||||
}
|
||||
else
|
||||
{
|
||||
眩晕 e3 = new(Skill, character, false, 0, 1);
|
||||
enemy.Effects.Add(e3);
|
||||
e3.OnEffectGained(enemy);
|
||||
}
|
||||
是否是嵌套伤害 = true;
|
||||
DamageToEnemy(character, enemy, false, magicType, 额外伤害);
|
||||
}
|
||||
}
|
||||
else
|
||||
{
|
||||
enemy.Effects.Add(new 累积之压标记(Skill, character));
|
||||
}
|
||||
}
|
||||
|
||||
if (character == Skill.Character && 是否是嵌套伤害)
|
||||
{
|
||||
是否是嵌套伤害 = false;
|
||||
}
|
||||
}
|
||||
}
|
||||
}
|
59
OshimaModules/Skills/MagicalGirl/毁灭之势.cs
Normal file
59
OshimaModules/Skills/MagicalGirl/毁灭之势.cs
Normal file
@ -0,0 +1,59 @@
|
||||
using Milimoe.FunGame.Core.Api.Utility;
|
||||
using Milimoe.FunGame.Core.Entity;
|
||||
using Milimoe.FunGame.Core.Library.Constant;
|
||||
|
||||
namespace Oshima.FunGame.OshimaModules.Skills
|
||||
{
|
||||
public class 毁灭之势 : Skill
|
||||
{
|
||||
public override long Id => (long)PassiveID.毁灭之势;
|
||||
public override string Name => "毁灭之势";
|
||||
public override string Description => Effects.Count > 0 ? Effects.First().Description : "";
|
||||
|
||||
public 毁灭之势(Character? character = null) : base(SkillType.Passive, character)
|
||||
{
|
||||
Effects.Add(new 毁灭之势特效(this));
|
||||
}
|
||||
|
||||
public override IEnumerable<Effect> AddInactiveEffectToCharacter()
|
||||
{
|
||||
return Effects;
|
||||
}
|
||||
}
|
||||
|
||||
public class 毁灭之势特效(Skill skill) : Effect(skill)
|
||||
{
|
||||
public override long Id => Skill.Id;
|
||||
public override string Name => Skill.Name;
|
||||
public override string Description => $"每时间提升 5.5% 所有伤害,无上限,但受到伤害时效果清零。" + (累计伤害 > 0 ? $"(当前总提升:{累计伤害 * 100:0.##}%)" : "");
|
||||
public override bool TargetSelf => true;
|
||||
|
||||
private readonly double 伤害提升 = 0.055;
|
||||
private double 累计伤害 = 0;
|
||||
|
||||
public override bool AlterActualDamageAfterCalculation(Character character, Character enemy, ref double damage, bool isNormalAttack, bool isMagicDamage, MagicType magicType, DamageResult damageResult)
|
||||
{
|
||||
if (damageResult != DamageResult.Evaded)
|
||||
{
|
||||
if (enemy == Skill.Character && damage > 0 && !enemy.Effects.Where(e => e is 绝对领域特效).Any())
|
||||
{
|
||||
累计伤害 = 0;
|
||||
}
|
||||
|
||||
if (character == Skill.Character)
|
||||
{
|
||||
double 实际伤害提升 = Calculation.Round2Digits(damage * 累计伤害);
|
||||
damage = Calculation.Round2Digits(damage + 实际伤害提升);
|
||||
if (实际伤害提升 > 0) WriteLine($"[ {character} ] 的伤害提升了 {实际伤害提升} 点!");
|
||||
}
|
||||
}
|
||||
return false;
|
||||
}
|
||||
|
||||
public override void OnTimeElapsed(Character character, double eapsed)
|
||||
{
|
||||
累计伤害 = Calculation.Round4Digits(累计伤害 + 伤害提升 * eapsed);
|
||||
WriteLine($"[ {character} ] 的 [ {Name} ] 效果增加了,当前总提升:{累计伤害 * 100:0.##}%。");
|
||||
}
|
||||
}
|
||||
}
|
74
OshimaModules/Skills/MagicalGirl/绝对领域.cs
Normal file
74
OshimaModules/Skills/MagicalGirl/绝对领域.cs
Normal file
@ -0,0 +1,74 @@
|
||||
using Milimoe.FunGame.Core.Api.Utility;
|
||||
using Milimoe.FunGame.Core.Entity;
|
||||
using Milimoe.FunGame.Core.Library.Constant;
|
||||
|
||||
namespace Oshima.FunGame.OshimaModules.Skills
|
||||
{
|
||||
public class 绝对领域 : Skill
|
||||
{
|
||||
public override long Id => (long)SuperSkillID.绝对领域;
|
||||
public override string Name => "绝对领域";
|
||||
public override string Description => Effects.Count > 0 ? Effects.First().Description : "";
|
||||
public override double EPCost => Math.Max(100, Character?.EP ?? 100);
|
||||
public override double CD => 32 + (1 * (Level - 1));
|
||||
public override double HardnessTime { get; set; } = 12;
|
||||
|
||||
public 绝对领域(Character? character = null) : base(SkillType.SuperSkill, character)
|
||||
{
|
||||
Effects.Add(new 绝对领域特效(this));
|
||||
}
|
||||
}
|
||||
|
||||
public class 绝对领域特效(Skill skill) : Effect(skill)
|
||||
{
|
||||
public override long Id => Skill.Id;
|
||||
public override string Name => Skill.Name;
|
||||
public override string Description => $"{Duration} 时间内无法受到任何伤害,且敏捷提升 {系数 * 100:0.##}% [ {敏捷提升} ]。此技能会消耗至少 100 点能量。";
|
||||
public override bool TargetSelf => true;
|
||||
public override bool Durative => true;
|
||||
public override double Duration => Calculation.Round2Digits(16 + 释放时的能量值 * 0.03);
|
||||
|
||||
private double 系数 => Calculation.Round4Digits(0.3 + 0.03 * (Level - 1));
|
||||
private double 敏捷提升 => Calculation.Round2Digits(系数 * Skill.Character?.BaseAGI ?? 0);
|
||||
private double 实际敏捷提升 = 0;
|
||||
private double 释放时的能量值 = 0;
|
||||
|
||||
public override void OnEffectGained(Character character)
|
||||
{
|
||||
实际敏捷提升 = 敏捷提升;
|
||||
character.ExAGI += 实际敏捷提升;
|
||||
WriteLine($"[ {character} ] 的敏捷提升了 {系数 * 100:0.##}% [ {实际敏捷提升} ] !");
|
||||
}
|
||||
|
||||
public override void OnEffectLost(Character character)
|
||||
{
|
||||
character.ExAGI -= 实际敏捷提升;
|
||||
}
|
||||
|
||||
public override bool AlterActualDamageAfterCalculation(Character character, Character enemy, ref double damage, bool isNormalAttack, bool isMagicDamage, MagicType magicType, DamageResult damageResult)
|
||||
{
|
||||
if (enemy == Skill.Character && damageResult != DamageResult.Evaded)
|
||||
{
|
||||
WriteLine($"[ {enemy} ] 发动了绝对领域,巧妙的化解了此伤害!");
|
||||
return true;
|
||||
}
|
||||
return false;
|
||||
}
|
||||
|
||||
public override void OnSkillCasting(Character caster)
|
||||
{
|
||||
释放时的能量值 = caster.EP;
|
||||
}
|
||||
|
||||
public override void OnSkillCasted(Character caster, List<Character> enemys, List<Character> teammates, Dictionary<string, object> others)
|
||||
{
|
||||
RemainDuration = Duration;
|
||||
if (!caster.Effects.Contains(this))
|
||||
{
|
||||
实际敏捷提升 = 0;
|
||||
caster.Effects.Add(this);
|
||||
OnEffectGained(caster);
|
||||
}
|
||||
}
|
||||
}
|
||||
}
|
64
OshimaModules/Skills/Mayor/精准打击.cs
Normal file
64
OshimaModules/Skills/Mayor/精准打击.cs
Normal file
@ -0,0 +1,64 @@
|
||||
using Milimoe.FunGame.Core.Api.Utility;
|
||||
using Milimoe.FunGame.Core.Entity;
|
||||
using Milimoe.FunGame.Core.Library.Constant;
|
||||
|
||||
namespace Oshima.FunGame.OshimaModules.Skills
|
||||
{
|
||||
public class 精准打击 : Skill
|
||||
{
|
||||
public override long Id => (long)SuperSkillID.精准打击;
|
||||
public override string Name => "精准打击";
|
||||
public override string Description => Effects.Count > 0 ? Effects.First().Description : "";
|
||||
public override double EPCost => 100;
|
||||
public override double CD => 40 - 1 * (Level - 1);
|
||||
public override double HardnessTime { get; set; } = 8;
|
||||
|
||||
public 精准打击(Character? character = null) : base(SkillType.SuperSkill, character)
|
||||
{
|
||||
Effects.Add(new 精准打击特效(this));
|
||||
}
|
||||
}
|
||||
|
||||
public class 精准打击特效(Skill skill) : Effect(skill)
|
||||
{
|
||||
public override long Id => Skill.Id;
|
||||
public override string Name => Skill.Name;
|
||||
public override string Description => $"30 时间内暴击率提升 {暴击率提升 * 100:0.##}%,暴击伤害再提升 {暴击伤害提升 * 100:0.##}%。";
|
||||
public override bool TargetSelf => true;
|
||||
public override bool Durative => true;
|
||||
public override double Duration => 30;
|
||||
|
||||
private double 暴击率提升 => Calculation.Round4Digits(0.2 + 0.03 * (Level - 1));
|
||||
private double 暴击伤害提升 => Calculation.Round4Digits(0.8 + 0.04 * (Level - 1));
|
||||
private double 实际暴击率提升 = 0;
|
||||
private double 实际暴击伤害提升 = 0;
|
||||
|
||||
public override void OnEffectGained(Character character)
|
||||
{
|
||||
实际暴击率提升 = 暴击率提升;
|
||||
实际暴击伤害提升 = 暴击伤害提升;
|
||||
character.ExCritRate += 实际暴击率提升;
|
||||
WriteLine($"[ {character} ] 的暴击率提升了 [ {实际暴击率提升 * 100:0.##}% ] !");
|
||||
character.ExCritDMG += 实际暴击伤害提升;
|
||||
WriteLine($"[ {character} ] 的暴击伤害提升了 [ {实际暴击伤害提升 * 100:0.##}% ] !");
|
||||
}
|
||||
|
||||
public override void OnEffectLost(Character character)
|
||||
{
|
||||
character.ExCritRate -= 实际暴击率提升;
|
||||
character.ExCritDMG -= 实际暴击伤害提升;
|
||||
}
|
||||
|
||||
public override void OnSkillCasted(Character caster, List<Character> enemys, List<Character> teammates, Dictionary<string, object> others)
|
||||
{
|
||||
RemainDuration = Duration;
|
||||
if (!caster.Effects.Contains(this))
|
||||
{
|
||||
实际暴击率提升 = 0;
|
||||
实际暴击伤害提升 = 0;
|
||||
caster.Effects.Add(this);
|
||||
OnEffectGained(caster);
|
||||
}
|
||||
}
|
||||
}
|
||||
}
|
40
OshimaModules/Skills/Mayor/致命打击.cs
Normal file
40
OshimaModules/Skills/Mayor/致命打击.cs
Normal file
@ -0,0 +1,40 @@
|
||||
using Milimoe.FunGame.Core.Entity;
|
||||
using Milimoe.FunGame.Core.Library.Constant;
|
||||
|
||||
namespace Oshima.FunGame.OshimaModules.Skills
|
||||
{
|
||||
public class 致命打击 : Skill
|
||||
{
|
||||
public override long Id => (long)PassiveID.致命打击;
|
||||
public override string Name => "致命打击";
|
||||
public override string Description => Effects.Count > 0 ? Effects.First().Description : "";
|
||||
|
||||
public 致命打击(Character? character = null) : base(SkillType.Passive, character)
|
||||
{
|
||||
Effects.Add(new 致命打击特效(this));
|
||||
}
|
||||
|
||||
public override IEnumerable<Effect> AddInactiveEffectToCharacter()
|
||||
{
|
||||
return Effects;
|
||||
}
|
||||
}
|
||||
|
||||
public class 致命打击特效(Skill skill) : Effect(skill)
|
||||
{
|
||||
public override long Id => Skill.Id;
|
||||
public override string Name => Skill.Name;
|
||||
public override string Description => $"暴击伤害提升 70%。";
|
||||
public override bool TargetSelf => true;
|
||||
|
||||
public override void OnEffectGained(Character character)
|
||||
{
|
||||
character.ExCritDMG += 0.7;
|
||||
}
|
||||
|
||||
public override void OnEffectLost(Character character)
|
||||
{
|
||||
character.ExCritDMG -= 0.7;
|
||||
}
|
||||
}
|
||||
}
|
64
OshimaModules/Skills/NanGanyu/三重叠加.cs
Normal file
64
OshimaModules/Skills/NanGanyu/三重叠加.cs
Normal file
@ -0,0 +1,64 @@
|
||||
using Milimoe.FunGame.Core.Entity;
|
||||
using Milimoe.FunGame.Core.Library.Constant;
|
||||
|
||||
namespace Oshima.FunGame.OshimaModules.Skills
|
||||
{
|
||||
public class 三重叠加 : Skill
|
||||
{
|
||||
public override long Id => (long)SuperSkillID.三重叠加;
|
||||
public override string Name => "三重叠加";
|
||||
public override string Description => Effects.Count > 0 ? Effects.First().Description : "";
|
||||
public override double EPCost => 100;
|
||||
public override double CD => 35 - 2 * (Level - 1);
|
||||
public override double HardnessTime { get; set; } = 10;
|
||||
|
||||
public 三重叠加(Character? character = null) : base(SkillType.SuperSkill, character)
|
||||
{
|
||||
Effects.Add(new 三重叠加特效(this));
|
||||
}
|
||||
}
|
||||
|
||||
public class 三重叠加特效(Skill skill) : Effect(skill)
|
||||
{
|
||||
public override long Id => Skill.Id;
|
||||
public override string Name => "三重叠加";
|
||||
public override string Description => $"使 [ 灵能反射 ] 支持普通攻击,且当前释放魔法次数归零,最大硬直消除次数提高到 {灵能反射次数} 次;在魔法命中和普通攻击命中时能够回复所回复能量值的 10 倍魔法值,持续 {技能持续次数} 次(灵能反射每消除次数达到最大时算一次)。" +
|
||||
$"(剩余:{剩余持续次数} 次)";
|
||||
public override bool TargetSelf => true;
|
||||
|
||||
public int 剩余持续次数 { get; set; } = 0;
|
||||
private readonly int 灵能反射次数 = 3;
|
||||
private readonly int 技能持续次数 = 2;
|
||||
|
||||
public override void OnEffectGained(Character character)
|
||||
{
|
||||
IEnumerable<Effect> effects = character.Effects.Where(e => e is 灵能反射特效);
|
||||
if (effects.Any() && effects.First() is 灵能反射特效 e)
|
||||
{
|
||||
e.是否支持普攻 = true;
|
||||
e.触发硬直次数 = 3;
|
||||
e.释放次数 = 0;
|
||||
}
|
||||
}
|
||||
|
||||
public override void OnEffectLost(Character character)
|
||||
{
|
||||
IEnumerable<Effect> effects = character.Effects.Where(e => e is 灵能反射特效);
|
||||
if (effects.Any() && effects.First() is 灵能反射特效 e)
|
||||
{
|
||||
e.是否支持普攻 = false;
|
||||
e.触发硬直次数 = 2;
|
||||
}
|
||||
}
|
||||
|
||||
public override void OnSkillCasted(Character caster, List<Character> enemys, List<Character> teammates, Dictionary<string, object> others)
|
||||
{
|
||||
剩余持续次数 = 技能持续次数;
|
||||
if (!caster.Effects.Contains(this))
|
||||
{
|
||||
caster.Effects.Add(this);
|
||||
OnEffectGained(caster);
|
||||
}
|
||||
}
|
||||
}
|
||||
}
|
103
OshimaModules/Skills/NanGanyu/灵能反射.cs
Normal file
103
OshimaModules/Skills/NanGanyu/灵能反射.cs
Normal file
@ -0,0 +1,103 @@
|
||||
using Milimoe.FunGame.Core.Api.Utility;
|
||||
using Milimoe.FunGame.Core.Entity;
|
||||
using Milimoe.FunGame.Core.Library.Constant;
|
||||
|
||||
namespace Oshima.FunGame.OshimaModules.Skills
|
||||
{
|
||||
public class 灵能反射 : Skill
|
||||
{
|
||||
public override long Id => (long)PassiveID.灵能反射;
|
||||
public override string Name => "灵能反射";
|
||||
public override string Description => Effects.Count > 0 ? Effects.First().Description : "";
|
||||
|
||||
public 灵能反射(Character? character = null) : base(SkillType.Passive, character)
|
||||
{
|
||||
Effects.Add(new 灵能反射特效(this));
|
||||
}
|
||||
|
||||
public override IEnumerable<Effect> AddInactiveEffectToCharacter()
|
||||
{
|
||||
return Effects;
|
||||
}
|
||||
}
|
||||
|
||||
public class 灵能反射特效(Skill skill) : Effect(skill)
|
||||
{
|
||||
public override long Id => Skill.Id;
|
||||
public override string Name => Skill.Name;
|
||||
public override string Description => $"每释放 {触发硬直次数} 次魔法才会触发硬直时间,且魔法命中时基于 25% 智力 [ {获得额外能量值} ] 获得额外能量值。";
|
||||
public override bool TargetSelf => true;
|
||||
|
||||
public bool 是否支持普攻 { get; set; } = false;
|
||||
public int 触发硬直次数 { get; set; } = 2;
|
||||
public int 释放次数 { get; set; } = 0;
|
||||
public double 获得额外能量值
|
||||
{
|
||||
get
|
||||
{
|
||||
return Calculation.Round2Digits(0.25 * Skill.Character?.INT ?? 0);
|
||||
}
|
||||
}
|
||||
|
||||
public override void AfterDamageCalculation(Character character, Character enemy, double damage, bool isNormalAttack, bool isMagicDamage, MagicType magicType, DamageResult damageResult)
|
||||
{
|
||||
if (character == Skill.Character && (是否支持普攻 && isNormalAttack || isMagicDamage) && damageResult != DamageResult.Evaded && character.EP < 200)
|
||||
{
|
||||
double 实际获得能量值 = 获得额外能量值;
|
||||
character.EP += 实际获得能量值;
|
||||
WriteLine("[ " + character + " ] 发动了灵能反射!额外获得了 " + 实际获得能量值 + " 能量!");
|
||||
IEnumerable<Effect> effects = character.Effects.Where(e => e is 三重叠加特效);
|
||||
if (effects.Any() && effects.First() is 三重叠加特效 e)
|
||||
{
|
||||
double 获得的魔法值 = Calculation.Round2Digits(实际获得能量值 * 10);
|
||||
character.MP += 获得的魔法值;
|
||||
WriteLine("[ " + character + " ] 发动了三重叠加!回复了 " + 获得的魔法值 + " 魔法值!");
|
||||
}
|
||||
}
|
||||
}
|
||||
|
||||
public override void AlterHardnessTimeAfterNormalAttack(Character character, ref double baseHardnessTime, ref bool isCheckProtected)
|
||||
{
|
||||
if (是否支持普攻)
|
||||
{
|
||||
AlterHardnessTime(character, ref baseHardnessTime, ref isCheckProtected);
|
||||
}
|
||||
}
|
||||
|
||||
public override void AlterHardnessTimeAfterCastSkill(Character character, Skill skill, ref double baseHardnessTime, ref bool isCheckProtected)
|
||||
{
|
||||
if (skill.SkillType == SkillType.Magic)
|
||||
{
|
||||
AlterHardnessTime(character, ref baseHardnessTime, ref isCheckProtected);
|
||||
}
|
||||
}
|
||||
|
||||
public void AlterHardnessTime(Character character, ref double baseHardnessTime, ref bool isCheckProtected)
|
||||
{
|
||||
释放次数++;
|
||||
if (释放次数 < 触发硬直次数)
|
||||
{
|
||||
baseHardnessTime = 0;
|
||||
isCheckProtected = false;
|
||||
WriteLine($"[ {character} ] 发动了灵能反射,消除了硬直时间!!");
|
||||
}
|
||||
else
|
||||
{
|
||||
释放次数 = 0;
|
||||
IEnumerable<Effect> effects = character.Effects.Where(e => e is 三重叠加特效);
|
||||
if (effects.Any() && effects.First() is 三重叠加特效 e)
|
||||
{
|
||||
baseHardnessTime = 0;
|
||||
isCheckProtected = false;
|
||||
WriteLine($"[ {character} ] 发动了灵能反射,消除了硬直时间!!");
|
||||
e.剩余持续次数--;
|
||||
if (e.剩余持续次数 == 0)
|
||||
{
|
||||
character.Effects.Remove(e);
|
||||
e.OnEffectLost(character);
|
||||
}
|
||||
}
|
||||
}
|
||||
}
|
||||
}
|
||||
}
|
77
OshimaModules/Skills/NiuNan/变幻之心.cs
Normal file
77
OshimaModules/Skills/NiuNan/变幻之心.cs
Normal file
@ -0,0 +1,77 @@
|
||||
using Milimoe.FunGame.Core.Api.Utility;
|
||||
using Milimoe.FunGame.Core.Entity;
|
||||
using Milimoe.FunGame.Core.Library.Constant;
|
||||
|
||||
namespace Oshima.FunGame.OshimaModules.Skills
|
||||
{
|
||||
public class 变幻之心 : Skill
|
||||
{
|
||||
public override long Id => (long)SuperSkillID.变幻之心;
|
||||
public override string Name => "变幻之心";
|
||||
public override string Description => Effects.Count > 0 ? Effects.First().Description : "";
|
||||
public override double EPCost => 100;
|
||||
public override double CD => 30;
|
||||
public override double HardnessTime { get; set; } = 10;
|
||||
|
||||
public 变幻之心(Character? character = null) : base(SkillType.SuperSkill, character)
|
||||
{
|
||||
Effects.Add(new 变幻之心特效(this));
|
||||
}
|
||||
}
|
||||
|
||||
public class 变幻之心特效(Skill skill) : Effect(skill)
|
||||
{
|
||||
public override long Id => Skill.Id;
|
||||
public override string Name => "变幻之心";
|
||||
public override string Description => $"检查 [ 智慧与力量 ] 的模式。在力量模式下,立即回复 {生命值回复 * 100:0.##}% 生命值;智力模式下,下一次魔法伤害提升 {伤害提升 * 100:0.##}%。";
|
||||
public override bool TargetSelf => true;
|
||||
|
||||
private double 生命值回复 => Calculation.Round4Digits(0.25 + 0.03 * (Level - 1));
|
||||
private double 伤害提升 => Calculation.Round4Digits(0.55 + 0.25 * (Level - 1));
|
||||
|
||||
public override void OnEffectGained(Character character)
|
||||
{
|
||||
Skill.IsInEffect = true;
|
||||
}
|
||||
|
||||
public override void OnEffectLost(Character character)
|
||||
{
|
||||
Skill.IsInEffect = false;
|
||||
}
|
||||
|
||||
public override void AlterExpectedDamageBeforeCalculation(Character character, Character enemy, ref double damage, bool isNormalAttack, bool isMagicDamage, MagicType magicType)
|
||||
{
|
||||
if (character == Skill.Character && isMagicDamage)
|
||||
{
|
||||
double 实际伤害提升百分比 = 伤害提升;
|
||||
double 实际伤害提升 = Calculation.Round2Digits(damage * 实际伤害提升百分比);
|
||||
damage = Calculation.Round2Digits(damage + 实际伤害提升);
|
||||
WriteLine("[ " + character + " ] 发动了变幻之心!伤害提升了 " + 实际伤害提升 + " 点!");
|
||||
character.Effects.Remove(this);
|
||||
OnEffectLost(character);
|
||||
}
|
||||
}
|
||||
|
||||
public override void OnSkillCasted(Character caster, List<Character> enemys, List<Character> teammates, Dictionary<string, object> others)
|
||||
{
|
||||
IEnumerable<Effect> effects = caster.Effects.Where(e => e is 智慧与力量特效);
|
||||
if (effects.Any())
|
||||
{
|
||||
if (caster.PrimaryAttribute == PrimaryAttribute.STR)
|
||||
{
|
||||
double 回复的生命 = Calculation.Round2Digits(生命值回复 * caster.MaxHP);
|
||||
caster.HP += 回复的生命;
|
||||
WriteLine("[ " + caster + " ] 回复了 " + 回复的生命 + " 点生命值!");
|
||||
}
|
||||
else if (caster.PrimaryAttribute == PrimaryAttribute.INT)
|
||||
{
|
||||
if (!caster.Effects.Contains(this))
|
||||
{
|
||||
caster.Effects.Add(this);
|
||||
OnEffectGained(caster);
|
||||
}
|
||||
}
|
||||
}
|
||||
}
|
||||
}
|
||||
}
|
91
OshimaModules/Skills/NiuNan/智慧与力量.cs
Normal file
91
OshimaModules/Skills/NiuNan/智慧与力量.cs
Normal file
@ -0,0 +1,91 @@
|
||||
using Milimoe.FunGame.Core.Entity;
|
||||
using Milimoe.FunGame.Core.Library.Constant;
|
||||
|
||||
namespace Oshima.FunGame.OshimaModules.Skills
|
||||
{
|
||||
public class 智慧与力量 : Skill
|
||||
{
|
||||
public override long Id => (long)PassiveID.智慧与力量;
|
||||
public override string Name => "智慧与力量";
|
||||
public override string Description => Effects.Count > 0 ? Effects.First().Description : "";
|
||||
|
||||
public 智慧与力量(Character? character = null) : base(SkillType.Passive, character)
|
||||
{
|
||||
Effects.Add(new 智慧与力量特效(this));
|
||||
}
|
||||
|
||||
public override IEnumerable<Effect> AddInactiveEffectToCharacter()
|
||||
{
|
||||
return Effects;
|
||||
}
|
||||
}
|
||||
|
||||
public class 智慧与力量特效(Skill skill) : Effect(skill)
|
||||
{
|
||||
public override long Id => Skill.Id;
|
||||
public override string Name => Skill.Name;
|
||||
public override string Description => $"当生命值低于 30% 时,智力转化为力量;当生命值高于或等于 30% 时,力量转化为智力。" +
|
||||
(Skill.Character != null ? "(当前模式:" + CharacterSet.GetPrimaryAttributeName(Skill.Character.PrimaryAttribute) + ")" : "");
|
||||
public override bool TargetSelf => true;
|
||||
|
||||
private double 交换前的额外智力 = 0;
|
||||
private double 交换前的额外力量 = 0;
|
||||
|
||||
public override void OnAttributeChanged(Character character)
|
||||
{
|
||||
if (Skill.Character != null)
|
||||
{
|
||||
if (Skill.Character.PrimaryAttribute == PrimaryAttribute.INT)
|
||||
{
|
||||
double diff = character.ExSTR - 交换前的额外力量;
|
||||
character.ExINT = 交换前的额外力量 + character.BaseSTR + diff;
|
||||
}
|
||||
else if (Skill.Character.PrimaryAttribute == PrimaryAttribute.STR)
|
||||
{
|
||||
double diff = character.ExINT - 交换前的额外智力;
|
||||
character.ExSTR = 交换前的额外智力 + character.BaseINT + diff;
|
||||
}
|
||||
}
|
||||
}
|
||||
|
||||
public override void OnTimeElapsed(Character character, double elapsed)
|
||||
{
|
||||
if (Skill.Character != null)
|
||||
{
|
||||
Character c = Skill.Character;
|
||||
if (c.HP < c.MaxHP * 0.3)
|
||||
{
|
||||
if (c.PrimaryAttribute == PrimaryAttribute.INT)
|
||||
{
|
||||
double pastHP = c.HP;
|
||||
double pastMaxHP = c.MaxHP;
|
||||
double pastMP = c.MP;
|
||||
double pastMaxMP = c.MaxMP;
|
||||
c.PrimaryAttribute = PrimaryAttribute.STR;
|
||||
交换前的额外智力 = c.ExINT;
|
||||
交换前的额外力量 = c.ExSTR;
|
||||
c.ExINT = -c.BaseINT;
|
||||
c.ExSTR = 交换前的额外智力 + c.BaseINT + 交换前的额外力量;
|
||||
c.Recovery(pastHP, pastMP, pastMaxHP, pastMaxMP);
|
||||
}
|
||||
}
|
||||
else
|
||||
{
|
||||
if (c.PrimaryAttribute == PrimaryAttribute.STR)
|
||||
{
|
||||
double pastHP = c.HP;
|
||||
double pastMaxHP = c.MaxHP;
|
||||
double pastMP = c.MP;
|
||||
double pastMaxMP = c.MaxMP;
|
||||
c.PrimaryAttribute = PrimaryAttribute.INT;
|
||||
交换前的额外智力 = c.ExINT;
|
||||
交换前的额外力量 = c.ExSTR;
|
||||
c.ExINT = 交换前的额外力量 + c.BaseSTR + 交换前的额外智力;
|
||||
c.ExSTR = -c.BaseSTR;
|
||||
c.Recovery(pastHP, pastMP, pastMaxHP, pastMaxMP);
|
||||
}
|
||||
}
|
||||
}
|
||||
}
|
||||
}
|
||||
}
|
47
OshimaModules/Skills/Oshima/META马.cs
Normal file
47
OshimaModules/Skills/Oshima/META马.cs
Normal file
@ -0,0 +1,47 @@
|
||||
using Milimoe.FunGame.Core.Api.Utility;
|
||||
using Milimoe.FunGame.Core.Entity;
|
||||
using Milimoe.FunGame.Core.Library.Constant;
|
||||
|
||||
namespace Oshima.FunGame.OshimaModules.Skills
|
||||
{
|
||||
public class META马 : Skill
|
||||
{
|
||||
public override long Id => (long)PassiveID.META马;
|
||||
public override string Name => "META马";
|
||||
public override string Description => Effects.Count > 0 ? Effects.First().Description : "";
|
||||
|
||||
public META马(Character? character = null) : base(SkillType.Passive, character)
|
||||
{
|
||||
Effects.Add(new META马特效(this));
|
||||
}
|
||||
|
||||
public override IEnumerable<Effect> AddInactiveEffectToCharacter()
|
||||
{
|
||||
return Effects;
|
||||
}
|
||||
}
|
||||
|
||||
public class META马特效(Skill skill) : Effect(skill)
|
||||
{
|
||||
public override long Id => Skill.Id;
|
||||
public override string Name => Skill.Name;
|
||||
public override string Description => $"META马专属被动:力量+5,力量成长+0.5;在受到伤害时,获得的能量提升50%,每回合开始还能获得额外的 [ {EP} ] 能量值。";
|
||||
public override bool TargetSelf => true;
|
||||
public static double EP => 10;
|
||||
|
||||
public override void AlterEPAfterGetDamage(Character character, ref double baseEP)
|
||||
{
|
||||
baseEP = Calculation.Round2Digits(baseEP * 1.5);
|
||||
if (Skill.Character != null) WriteLine("[ " + Skill.Character + " ] 发动了META马专属被动!本次获得了 " + baseEP + " 能量!");
|
||||
}
|
||||
|
||||
public override void OnTurnStart(Character character)
|
||||
{
|
||||
if (character.EP < 200)
|
||||
{
|
||||
character.EP += EP;
|
||||
WriteLine("[ " + character + " ] 发动了META马专属被动!本次获得了 " + EP + " 能量!");
|
||||
}
|
||||
}
|
||||
}
|
||||
}
|
58
OshimaModules/Skills/Oshima/力量爆发.cs
Normal file
58
OshimaModules/Skills/Oshima/力量爆发.cs
Normal file
@ -0,0 +1,58 @@
|
||||
using Milimoe.FunGame.Core.Api.Utility;
|
||||
using Milimoe.FunGame.Core.Entity;
|
||||
using Milimoe.FunGame.Core.Library.Constant;
|
||||
|
||||
namespace Oshima.FunGame.OshimaModules.Skills
|
||||
{
|
||||
public class 力量爆发 : Skill
|
||||
{
|
||||
public override long Id => (long)SuperSkillID.力量爆发;
|
||||
public override string Name => "力量爆发";
|
||||
public override string Description => Effects.Count > 0 ? Effects.First().Description : "";
|
||||
public override double EPCost => 100;
|
||||
public override double CD => 55;
|
||||
public override double HardnessTime { get; set; } = 0;
|
||||
|
||||
public 力量爆发(Character? character = null) : base(SkillType.SuperSkill, character)
|
||||
{
|
||||
Effects.Add(new 力量爆发特效(this));
|
||||
}
|
||||
}
|
||||
|
||||
public class 力量爆发特效(Skill skill) : Effect(skill)
|
||||
{
|
||||
public override long Id => Skill.Id;
|
||||
public override string Name => "力量爆发";
|
||||
public override string Description => $"获得 150% 力量 [ {攻击力加成} ] 的攻击力加成,持续 {Duration} 时间。";
|
||||
public override bool TargetSelf => true;
|
||||
public override bool Durative => true;
|
||||
public override double Duration => 10 + 1 * (Level - 1);
|
||||
|
||||
private double 攻击力加成 => Calculation.Round2Digits(Skill.Character?.STR * 1.5 ?? 0);
|
||||
private double 实际攻击力加成 = 0;
|
||||
|
||||
public override void OnEffectGained(Character character)
|
||||
{
|
||||
实际攻击力加成 = 攻击力加成;
|
||||
character.ExATK2 += 实际攻击力加成;
|
||||
WriteLine($"[ {character} ] 的攻击力增加了 [ {实际攻击力加成} ] !");
|
||||
}
|
||||
|
||||
public override void OnEffectLost(Character character)
|
||||
{
|
||||
// 恢复到原始攻击力
|
||||
character.ExATK2 -= 实际攻击力加成;
|
||||
}
|
||||
|
||||
public override void OnSkillCasted(Character caster, List<Character> enemys, List<Character> teammates, Dictionary<string, object> others)
|
||||
{
|
||||
RemainDuration = Duration;
|
||||
if (!caster.Effects.Contains(this))
|
||||
{
|
||||
实际攻击力加成 = 0;
|
||||
caster.Effects.Add(this);
|
||||
OnEffectGained(caster);
|
||||
}
|
||||
}
|
||||
}
|
||||
}
|
101
OshimaModules/Skills/QWQAQW/玻璃大炮.cs
Normal file
101
OshimaModules/Skills/QWQAQW/玻璃大炮.cs
Normal file
@ -0,0 +1,101 @@
|
||||
using Milimoe.FunGame.Core.Api.Utility;
|
||||
using Milimoe.FunGame.Core.Entity;
|
||||
using Milimoe.FunGame.Core.Library.Constant;
|
||||
|
||||
namespace Oshima.FunGame.OshimaModules.Skills
|
||||
{
|
||||
public class 玻璃大炮 : Skill
|
||||
{
|
||||
public override long Id => (long)PassiveID.玻璃大炮;
|
||||
public override string Name => "玻璃大炮";
|
||||
public override string Description => Effects.Count > 0 ? Effects.First().Description : "";
|
||||
|
||||
public 玻璃大炮(Character? character = null) : base(SkillType.Passive, character)
|
||||
{
|
||||
Effects.Add(new 玻璃大炮特效(this));
|
||||
}
|
||||
|
||||
public override IEnumerable<Effect> AddInactiveEffectToCharacter()
|
||||
{
|
||||
return Effects;
|
||||
}
|
||||
}
|
||||
|
||||
public class 玻璃大炮特效(Skill skill) : Effect(skill)
|
||||
{
|
||||
public override long Id => Skill.Id;
|
||||
public override string Name => Skill.Name;
|
||||
public override string Description => $"生命值高于 30% 时,受到额外的 [ {高于30额外伤害下限}~{高于30额外伤害上限}% ] 伤害,但是获得 [ 累计所受伤害的 {高于30的加成下限}~{高于30的加成上限}% ] 伤害加成;生命值低于等于 30% 时,不会受到额外的伤害,仅能获得 [ 累计受到的伤害 {低于30的加成下限}~{低于30的加成上限}% ] 伤害加成。" +
|
||||
$"在没有受到任何伤害的时候,将获得 {常规伤害加成 * 100:0.##}% 伤害加成。" + (累计受到的伤害 > 0 ? $"(当前累计受到伤害:{累计受到的伤害})" : "");
|
||||
public override bool TargetSelf => true;
|
||||
|
||||
private double 累计受到的伤害 = 0;
|
||||
private double 这次的伤害加成 = 0;
|
||||
private double 受到伤害之前的HP = 0;
|
||||
private double 这次受到的额外伤害 = 0;
|
||||
private readonly double 常规伤害加成 = 0.35;
|
||||
private readonly int 高于30额外伤害上限 = 40;
|
||||
private readonly int 高于30额外伤害下限 = 20;
|
||||
private readonly int 高于30的加成上限 = 100;
|
||||
private readonly int 高于30的加成下限 = 80;
|
||||
private readonly int 低于30的加成上限 = 60;
|
||||
private readonly int 低于30的加成下限 = 40;
|
||||
|
||||
private double 伤害加成(double damage)
|
||||
{
|
||||
double 系数 = 常规伤害加成;
|
||||
Character? character = Skill.Character;
|
||||
if (character != null && 累计受到的伤害 != 0)
|
||||
{
|
||||
if (character.HP > character.MaxHP * 0.3)
|
||||
{
|
||||
系数 = Calculation.Round4Digits(1.0 + ((new Random().Next(高于30的加成下限, 高于30的加成上限) + 0.0) / 100));
|
||||
}
|
||||
else
|
||||
{
|
||||
系数 = Calculation.Round4Digits(1.0 + ((new Random().Next(低于30的加成下限, 低于30的加成上限) + 0.0) / 100));
|
||||
}
|
||||
return Calculation.Round2Digits(系数 * 累计受到的伤害);
|
||||
}
|
||||
return Calculation.Round2Digits(系数 * damage);
|
||||
}
|
||||
|
||||
public override void AlterExpectedDamageBeforeCalculation(Character character, Character enemy, ref double damage, bool isNormalAttack, bool isMagicDamage, MagicType magicType)
|
||||
{
|
||||
if (character == Skill.Character)
|
||||
{
|
||||
这次的伤害加成 = 伤害加成(damage);
|
||||
damage = Calculation.Round2Digits(damage + 这次的伤害加成);
|
||||
WriteLine($"[ {character} ] 发动了玻璃大炮,获得了 {这次的伤害加成} 点伤害加成!");
|
||||
累计受到的伤害 = 0;
|
||||
}
|
||||
|
||||
if (enemy == Skill.Character)
|
||||
{
|
||||
受到伤害之前的HP = enemy.HP;
|
||||
if (enemy.HP > enemy.MaxHP * 0.3)
|
||||
{
|
||||
// 额外受到伤害
|
||||
double 系数 = Calculation.Round4Digits((new Random().Next(高于30额外伤害下限, 高于30额外伤害上限) + 0.0) / 100);
|
||||
这次受到的额外伤害 = Calculation.Round2Digits(damage * 系数);
|
||||
damage = Calculation.Round2Digits(damage + 这次受到的额外伤害);
|
||||
WriteLine($"[ {enemy} ] 的玻璃大炮触发,将额外受到 {这次受到的额外伤害} 点伤害!");
|
||||
}
|
||||
else 这次受到的额外伤害 = 0;
|
||||
}
|
||||
}
|
||||
|
||||
public override void AfterDamageCalculation(Character character, Character enemy, double damage, bool isNormalAttack, bool isMagicDamage, MagicType magicType, DamageResult damageResult)
|
||||
{
|
||||
if (enemy == Skill.Character && damageResult != DamageResult.Evaded)
|
||||
{
|
||||
累计受到的伤害 = Calculation.Round2Digits(累计受到的伤害 + damage);
|
||||
if (enemy.HP < 0 && 受到伤害之前的HP - damage + 这次受到的额外伤害 > 0)
|
||||
{
|
||||
enemy.HP = 10;
|
||||
WriteLine($"[ {enemy} ] 的玻璃大炮触发,保护了自己不进入死亡!!");
|
||||
}
|
||||
}
|
||||
}
|
||||
}
|
||||
}
|
67
OshimaModules/Skills/QWQAQW/迅捷之势.cs
Normal file
67
OshimaModules/Skills/QWQAQW/迅捷之势.cs
Normal file
@ -0,0 +1,67 @@
|
||||
using Milimoe.FunGame.Core.Api.Utility;
|
||||
using Milimoe.FunGame.Core.Entity;
|
||||
using Milimoe.FunGame.Core.Library.Constant;
|
||||
|
||||
namespace Oshima.FunGame.OshimaModules.Skills
|
||||
{
|
||||
public class 迅捷之势 : Skill
|
||||
{
|
||||
public override long Id => (long)SuperSkillID.迅捷之势;
|
||||
public override string Name => "迅捷之势";
|
||||
public override string Description => Effects.Count > 0 ? Effects.First().Description : "";
|
||||
public override double EPCost => 100;
|
||||
public override double CD => 60 - 2 * (Level - 1);
|
||||
public override double HardnessTime { get; set; } = 15;
|
||||
|
||||
public 迅捷之势(Character? character = null) : base(SkillType.SuperSkill, character)
|
||||
{
|
||||
Effects.Add(new 迅捷之势特效(this));
|
||||
}
|
||||
}
|
||||
|
||||
public class 迅捷之势特效(Skill skill) : Effect(skill)
|
||||
{
|
||||
public override long Id => Skill.Id;
|
||||
public override string Name => Skill.Name;
|
||||
public override string Description => $"{Duration} 时间内,普通攻击转为魔法伤害,且硬直时间减少50%,并基于 {智力系数 * 100:0.##}% 智力 [{智力加成}] 强化普通攻击伤害。";
|
||||
public override bool TargetSelf => true;
|
||||
public override bool Durative => true;
|
||||
public override double Duration => 40;
|
||||
|
||||
private double 智力系数 => Calculation.Round4Digits(1.4 + 0.4 * (Level - 1));
|
||||
private double 智力加成 => Calculation.Round2Digits(智力系数 * Skill.Character?.INT ?? 0);
|
||||
|
||||
public override void OnEffectGained(Character character)
|
||||
{
|
||||
character.NormalAttack.SetMagicType(true, character.MagicType);
|
||||
}
|
||||
|
||||
public override void OnEffectLost(Character character)
|
||||
{
|
||||
character.NormalAttack.SetMagicType(false, character.MagicType);
|
||||
}
|
||||
|
||||
public override void AlterExpectedDamageBeforeCalculation(Character character, Character enemy, ref double damage, bool isNormalAttack, bool isMagicDamage, MagicType magicType)
|
||||
{
|
||||
if (character == Skill.Character && isNormalAttack)
|
||||
{
|
||||
damage = Calculation.Round2Digits(damage + 智力加成);
|
||||
}
|
||||
}
|
||||
|
||||
public override void AlterHardnessTimeAfterNormalAttack(Character character, ref double baseHardnessTime, ref bool isCheckProtected)
|
||||
{
|
||||
baseHardnessTime = Calculation.Round2Digits(baseHardnessTime * 0.5);
|
||||
}
|
||||
|
||||
public override void OnSkillCasted(Character caster, List<Character> enemys, List<Character> teammates, Dictionary<string, object> others)
|
||||
{
|
||||
RemainDuration = Duration;
|
||||
if (!caster.Effects.Contains(this))
|
||||
{
|
||||
caster.Effects.Add(this);
|
||||
OnEffectGained(caster);
|
||||
}
|
||||
}
|
||||
}
|
||||
}
|
57
OshimaModules/Skills/QingXiang/枯竭打击.cs
Normal file
57
OshimaModules/Skills/QingXiang/枯竭打击.cs
Normal file
@ -0,0 +1,57 @@
|
||||
using Milimoe.FunGame.Core.Api.Utility;
|
||||
using Milimoe.FunGame.Core.Entity;
|
||||
using Milimoe.FunGame.Core.Library.Constant;
|
||||
|
||||
namespace Oshima.FunGame.OshimaModules.Skills
|
||||
{
|
||||
public class 枯竭打击 : Skill
|
||||
{
|
||||
public override long Id => (long)PassiveID.枯竭打击;
|
||||
public override string Name => "枯竭打击";
|
||||
public override string Description => Effects.Count > 0 ? Effects.First().Description : "";
|
||||
|
||||
public 枯竭打击(Character? character = null) : base(SkillType.Passive, character)
|
||||
{
|
||||
Effects.Add(new 枯竭打击特效(this));
|
||||
}
|
||||
|
||||
public override IEnumerable<Effect> AddInactiveEffectToCharacter()
|
||||
{
|
||||
return Effects;
|
||||
}
|
||||
}
|
||||
|
||||
public class 枯竭打击特效(Skill skill) : Effect(skill)
|
||||
{
|
||||
public override long Id => Skill.Id;
|
||||
public override string Name => Skill.Name;
|
||||
public override string Description => $"每次造成伤害都会随机减少对方 [ 10~25 ] 点能量值,对能量值低于一半的角色额外造成 30% 伤害。对于枯竭打击而言,能量值大于100且小于150时,视为低于一半。";
|
||||
public override bool TargetSelf => true;
|
||||
|
||||
private bool 是否是嵌套伤害 = false;
|
||||
|
||||
public override void AfterDamageCalculation(Character character, Character enemy, double damage, bool isNormalAttack, bool isMagicDamage, MagicType magicType, DamageResult damageResult)
|
||||
{
|
||||
if (character == Skill.Character && damageResult != DamageResult.Evaded && !是否是嵌套伤害)
|
||||
{
|
||||
// 减少能量
|
||||
double EP = new Random().Next(10, 25);
|
||||
enemy.EP -= EP;
|
||||
WriteLine($"[ {character} ] 发动了枯竭打击![ {enemy} ] 的能量值被减少了 {EP} 点!现有能量:{enemy.EP}。");
|
||||
// 额外伤害
|
||||
if (enemy.EP >= 0 && enemy.EP < 50 || enemy.EP >= 100 && enemy.EP < 150)
|
||||
{
|
||||
double 额外伤害 = Calculation.Round2Digits(damage * 0.3);
|
||||
WriteLine($"[ {character} ] 发动了枯竭打击!将造成额外伤害!");
|
||||
是否是嵌套伤害 = true;
|
||||
DamageToEnemy(character, enemy, isMagicDamage, magicType, 额外伤害);
|
||||
}
|
||||
}
|
||||
|
||||
if (character == Skill.Character && 是否是嵌套伤害)
|
||||
{
|
||||
是否是嵌套伤害 = false;
|
||||
}
|
||||
}
|
||||
}
|
||||
}
|
45
OshimaModules/Skills/QingXiang/能量毁灭.cs
Normal file
45
OshimaModules/Skills/QingXiang/能量毁灭.cs
Normal file
@ -0,0 +1,45 @@
|
||||
using Milimoe.FunGame.Core.Api.Utility;
|
||||
using Milimoe.FunGame.Core.Entity;
|
||||
using Milimoe.FunGame.Core.Library.Constant;
|
||||
|
||||
namespace Oshima.FunGame.OshimaModules.Skills
|
||||
{
|
||||
public class 能量毁灭 : Skill
|
||||
{
|
||||
public override long Id => (long)SuperSkillID.能量毁灭;
|
||||
public override string Name => "能量毁灭";
|
||||
public override string Description => Effects.Count > 0 ? Effects.First().Description : "";
|
||||
public override double EPCost => 100;
|
||||
public override double CD => 55 - 3 * (Level - 1);
|
||||
public override double HardnessTime { get; set; } = 25;
|
||||
|
||||
public 能量毁灭(Character? character = null) : base(SkillType.SuperSkill, character)
|
||||
{
|
||||
Effects.Add(new 能量毁灭特效(this));
|
||||
}
|
||||
}
|
||||
|
||||
public class 能量毁灭特效(Skill skill) : Effect(skill)
|
||||
{
|
||||
public override long Id => Skill.Id;
|
||||
public override string Name => Skill.Name;
|
||||
public override string Description => $"对所有角色造成 " +
|
||||
$"{能量系数 * 100:0.##}% 其现有能量值 + {智力系数 * 100:0.##}% 智力 [ {智力伤害} ] 的魔法伤害。";
|
||||
public override bool TargetSelf => false;
|
||||
public override double TargetRange => 999;
|
||||
|
||||
private double 智力系数 => Calculation.Round4Digits(0.55 * Level);
|
||||
private double 智力伤害 => Calculation.Round2Digits(智力系数 * Skill.Character?.INT ?? 0);
|
||||
private double 能量系数 => Calculation.Round4Digits(0.75 * Level);
|
||||
|
||||
public override void OnSkillCasted(Character caster, List<Character> enemys, List<Character> teammates, Dictionary<string, object> others)
|
||||
{
|
||||
foreach (Character c in enemys)
|
||||
{
|
||||
WriteLine($"[ {caster} ] 正在毁灭 [ {c} ] 的能量!!");
|
||||
double ep = c.EP;
|
||||
DamageToEnemy(caster, c, true, MagicType, Calculation.Round2Digits(ep * 能量系数 + 智力伤害));
|
||||
}
|
||||
}
|
||||
}
|
||||
}
|
52
OshimaModules/Skills/QuDuoduo/弱者猎手.cs
Normal file
52
OshimaModules/Skills/QuDuoduo/弱者猎手.cs
Normal file
@ -0,0 +1,52 @@
|
||||
using Milimoe.FunGame.Core.Api.Utility;
|
||||
using Milimoe.FunGame.Core.Entity;
|
||||
using Milimoe.FunGame.Core.Library.Constant;
|
||||
|
||||
namespace Oshima.FunGame.OshimaModules.Skills
|
||||
{
|
||||
public class 弱者猎手 : Skill
|
||||
{
|
||||
public override long Id => (long)PassiveID.弱者猎手;
|
||||
public override string Name => "弱者猎手";
|
||||
public override string Description => Effects.Count > 0 ? Effects.First().Description : "";
|
||||
|
||||
public 弱者猎手(Character? character = null) : base(SkillType.Passive, character)
|
||||
{
|
||||
Effects.Add(new 弱者猎手特效(this));
|
||||
}
|
||||
|
||||
public override IEnumerable<Effect> AddInactiveEffectToCharacter()
|
||||
{
|
||||
return Effects;
|
||||
}
|
||||
}
|
||||
|
||||
public class 弱者猎手特效(Skill skill) : Effect(skill)
|
||||
{
|
||||
public override long Id => Skill.Id;
|
||||
public override string Name => Skill.Name;
|
||||
public override string Description => $"优先攻击血量更低的角色,对生命值百分比低于自己的角色造成 150% 伤害。";
|
||||
public override bool TargetSelf => true;
|
||||
|
||||
public override void AlterExpectedDamageBeforeCalculation(Character character, Character enemy, ref double damage, bool isNormalAttack, bool isMagicDamage, MagicType magicType)
|
||||
{
|
||||
if (character == Skill.Character && (enemy.HP / enemy.MaxHP) <= (character.HP / character.MaxHP))
|
||||
{
|
||||
double 额外伤害 = Calculation.Round2Digits(damage * 0.5);
|
||||
damage = Calculation.Round2Digits(damage + 额外伤害);
|
||||
}
|
||||
}
|
||||
|
||||
public override bool AlterEnemyListBeforeAction(Character character, List<Character> enemys, List<Character> teammates, List<Skill> skills, Dictionary<Character, int> continuousKilling, Dictionary<Character, int> earnedMoney)
|
||||
{
|
||||
IEnumerable<Character> list = [.. enemys.OrderBy(e => Calculation.Round4Digits(e.HP / e.MaxHP))];
|
||||
if (list.Any())
|
||||
{
|
||||
enemys.Clear();
|
||||
enemys.Add(list.First());
|
||||
WriteLine($"[ {character} ] 发动了弱者猎手![ {list.First()} ] 被盯上了!");
|
||||
}
|
||||
return true;
|
||||
}
|
||||
}
|
||||
}
|
51
OshimaModules/Skills/QuDuoduo/血之狂欢.cs
Normal file
51
OshimaModules/Skills/QuDuoduo/血之狂欢.cs
Normal file
@ -0,0 +1,51 @@
|
||||
using Milimoe.FunGame.Core.Api.Utility;
|
||||
using Milimoe.FunGame.Core.Entity;
|
||||
using Milimoe.FunGame.Core.Library.Constant;
|
||||
|
||||
namespace Oshima.FunGame.OshimaModules.Skills
|
||||
{
|
||||
public class 血之狂欢 : Skill
|
||||
{
|
||||
public override long Id => (long)SuperSkillID.血之狂欢;
|
||||
public override string Name => "血之狂欢";
|
||||
public override string Description => Effects.Count > 0 ? Effects.First().Description : "";
|
||||
public override double EPCost => 100;
|
||||
public override double CD => 45;
|
||||
public override double HardnessTime { get; set; } = 7;
|
||||
|
||||
public 血之狂欢(Character? character = null) : base(SkillType.SuperSkill, character)
|
||||
{
|
||||
Effects.Add(new 血之狂欢特效(this));
|
||||
}
|
||||
}
|
||||
|
||||
public class 血之狂欢特效(Skill skill) : Effect(skill)
|
||||
{
|
||||
public override long Id => Skill.Id;
|
||||
public override string Name => Skill.Name;
|
||||
public override string Description => $"获得 40% 吸血,持续 {Duration} 时间。";
|
||||
public override bool TargetSelf => true;
|
||||
public override bool Durative => true;
|
||||
public override double Duration => 30;
|
||||
|
||||
public override void AfterDamageCalculation(Character character, Character enemy, double damage, bool isNormalAttack, bool isMagicDamage, MagicType magicType, DamageResult damageResult)
|
||||
{
|
||||
if (character == Skill.Character && damageResult != DamageResult.Evaded && character.HP < character.MaxHP)
|
||||
{
|
||||
double 实际吸血 = Calculation.Round2Digits(0.4 * damage);
|
||||
character.HP += 实际吸血;
|
||||
WriteLine($"[ {character} ] 回复了 {实际吸血} 点生命值!");
|
||||
}
|
||||
}
|
||||
|
||||
public override void OnSkillCasted(Character caster, List<Character> enemys, List<Character> teammates, Dictionary<string, object> others)
|
||||
{
|
||||
RemainDuration = Duration;
|
||||
if (!caster.Effects.Contains(this))
|
||||
{
|
||||
caster.Effects.Add(this);
|
||||
OnEffectGained(caster);
|
||||
}
|
||||
}
|
||||
}
|
||||
}
|
54
OshimaModules/Skills/SkillID.cs
Normal file
54
OshimaModules/Skills/SkillID.cs
Normal file
@ -0,0 +1,54 @@
|
||||
namespace Oshima.FunGame.OshimaModules.Skills
|
||||
{
|
||||
public enum MagicID : long
|
||||
{
|
||||
冰霜攻击 = 1001,
|
||||
}
|
||||
|
||||
public enum SkillID : long
|
||||
{
|
||||
疾风步 = 2001,
|
||||
}
|
||||
|
||||
public enum SuperSkillID : long
|
||||
{
|
||||
力量爆发 = 3001,
|
||||
天赐之力 = 3002,
|
||||
魔法涌流 = 3003,
|
||||
三重叠加 = 3004,
|
||||
变幻之心 = 3005,
|
||||
精准打击 = 3006,
|
||||
绝对领域 = 3007,
|
||||
能量毁灭 = 3008,
|
||||
迅捷之势 = 3009,
|
||||
嗜血本能 = 3010,
|
||||
平衡强化 = 3011,
|
||||
血之狂欢 = 3012,
|
||||
}
|
||||
|
||||
public enum PassiveID : long
|
||||
{
|
||||
META马 = 4001,
|
||||
心灵之火 = 4002,
|
||||
魔法震荡 = 4003,
|
||||
灵能反射 = 4004,
|
||||
智慧与力量 = 4005,
|
||||
致命打击 = 4006,
|
||||
毁灭之势 = 4007,
|
||||
枯竭打击 = 4008,
|
||||
玻璃大炮 = 4009,
|
||||
累积之压 = 4010,
|
||||
敏捷之刃 = 4011,
|
||||
弱者猎手 = 4012,
|
||||
}
|
||||
|
||||
public enum ItemPassiveID : long
|
||||
{
|
||||
攻击之爪 = 5001,
|
||||
}
|
||||
|
||||
public enum ItemActiveID : long
|
||||
{
|
||||
|
||||
}
|
||||
}
|
90
OshimaModules/Skills/XinYin/天赐之力.cs
Normal file
90
OshimaModules/Skills/XinYin/天赐之力.cs
Normal file
@ -0,0 +1,90 @@
|
||||
using Milimoe.FunGame.Core.Api.Utility;
|
||||
using Milimoe.FunGame.Core.Entity;
|
||||
using Milimoe.FunGame.Core.Library.Constant;
|
||||
|
||||
namespace Oshima.FunGame.OshimaModules.Skills
|
||||
{
|
||||
public class 天赐之力 : Skill
|
||||
{
|
||||
public override long Id => (long)SuperSkillID.天赐之力;
|
||||
public override string Name => "天赐之力";
|
||||
public override string Description => Effects.Count > 0 ? Effects.First().Description : "";
|
||||
public override double EPCost => 100;
|
||||
public override double CD => 60;
|
||||
public override double HardnessTime { get; set; } = 15;
|
||||
|
||||
public 天赐之力(Character? character = null) : base(SkillType.SuperSkill, character)
|
||||
{
|
||||
Effects.Add(new 天赐之力特效(this));
|
||||
}
|
||||
}
|
||||
|
||||
public class 天赐之力特效(Skill skill) : Effect(skill)
|
||||
{
|
||||
public override long Id => Skill.Id;
|
||||
public override string Name => Skill.Name;
|
||||
public override string Description => $"{Duration} 时间内,增加 40% 攻击力 [ {攻击力提升} ]、30% 物理穿透和 25% 闪避率(不可叠加),普通攻击硬直时间额外减少 20%,基于 {系数 * 100:0.##}% 敏捷 [ {伤害加成} ] 强化普通攻击的伤害。在持续时间内,【心灵之火】的冷却时间降低至 3 时间。";
|
||||
public override bool TargetSelf => false;
|
||||
public override int TargetCount => 1;
|
||||
public override bool Durative => true;
|
||||
public override double Duration => 40;
|
||||
|
||||
private double 系数 => Calculation.Round4Digits(1.2 * (1 + 0.6 * (Skill.Level - 1)));
|
||||
private double 伤害加成 => Calculation.Round2Digits(系数 * Skill.Character?.AGI ?? 0);
|
||||
private double 攻击力提升 => Calculation.Round2Digits(0.4 * Skill.Character?.BaseATK ?? 0);
|
||||
private double 实际的攻击力提升 = 0;
|
||||
|
||||
public override void OnEffectGained(Character character)
|
||||
{
|
||||
实际的攻击力提升 = 攻击力提升;
|
||||
character.ExATK2 += 实际的攻击力提升;
|
||||
character.PhysicalPenetration += 0.3;
|
||||
character.ExEvadeRate += 0.25;
|
||||
if (character.Effects.Where(e => e is 心灵之火特效).FirstOrDefault() is 心灵之火特效 e)
|
||||
{
|
||||
e.基础冷却时间 = 3;
|
||||
if (e.冷却时间 > e.基础冷却时间) e.冷却时间 = e.基础冷却时间;
|
||||
}
|
||||
}
|
||||
|
||||
public override void OnEffectLost(Character character)
|
||||
{
|
||||
character.ExATK2 -= 实际的攻击力提升;
|
||||
character.PhysicalPenetration -= 0.3;
|
||||
character.ExEvadeRate -= 0.25;
|
||||
if (character.Effects.Where(e => e is 心灵之火特效).FirstOrDefault() is 心灵之火特效 e)
|
||||
{
|
||||
e.基础冷却时间 = 8;
|
||||
}
|
||||
}
|
||||
|
||||
public override CharacterActionType AlterActionTypeBeforeAction(Character character, CharacterState state, ref bool canUseItem, ref bool canCastSkill, ref double pUseItem, ref double pCastSkill, ref double pNormalAttack)
|
||||
{
|
||||
pNormalAttack += 0.1;
|
||||
return CharacterActionType.None;
|
||||
}
|
||||
|
||||
public override void AlterExpectedDamageBeforeCalculation(Character character, Character enemy, ref double damage, bool isNormalAttack, bool isMagicDamage, MagicType magicType)
|
||||
{
|
||||
if (character == Skill.Character && isNormalAttack)
|
||||
{
|
||||
damage = Calculation.Round2Digits(damage + 伤害加成);
|
||||
}
|
||||
}
|
||||
|
||||
public override void AlterHardnessTimeAfterNormalAttack(Character character, ref double baseHardnessTime, ref bool isCheckProtected)
|
||||
{
|
||||
baseHardnessTime = Calculation.Round2Digits(baseHardnessTime * 0.8);
|
||||
}
|
||||
|
||||
public override void OnSkillCasted(Character caster, List<Character> enemys, List<Character> teammates, Dictionary<string, object> others)
|
||||
{
|
||||
RemainDuration = Duration;
|
||||
if (!caster.Effects.Contains(this))
|
||||
{
|
||||
caster.Effects.Add(this);
|
||||
OnEffectGained(caster);
|
||||
}
|
||||
}
|
||||
}
|
||||
}
|
69
OshimaModules/Skills/XinYin/心灵之火.cs
Normal file
69
OshimaModules/Skills/XinYin/心灵之火.cs
Normal file
@ -0,0 +1,69 @@
|
||||
using Milimoe.FunGame.Core.Api.Utility;
|
||||
using Milimoe.FunGame.Core.Entity;
|
||||
using Milimoe.FunGame.Core.Library.Constant;
|
||||
|
||||
namespace Oshima.FunGame.OshimaModules.Skills
|
||||
{
|
||||
public class 心灵之火 : Skill
|
||||
{
|
||||
public override long Id => (long)PassiveID.心灵之火;
|
||||
public override string Name => "心灵之火";
|
||||
public override string Description => Effects.Count > 0 ? Effects.First().Description : "";
|
||||
|
||||
public 心灵之火(Character? character = null) : base(SkillType.Passive, character)
|
||||
{
|
||||
Effects.Add(new 心灵之火特效(this));
|
||||
}
|
||||
|
||||
public override IEnumerable<Effect> AddInactiveEffectToCharacter()
|
||||
{
|
||||
return Effects;
|
||||
}
|
||||
}
|
||||
|
||||
public class 心灵之火特效(Skill skill) : Effect(skill)
|
||||
{
|
||||
public override long Id => Skill.Id;
|
||||
public override string Name => Skill.Name;
|
||||
public override string Description => $"普通攻击硬直时间减少 20%。每次使用普通攻击时,额外再发动一次普通攻击,伤害特效可叠加,冷却 {基础冷却时间:0.##} 时间。" +
|
||||
(冷却时间 > 0 ? $"(正在冷却:剩余 {冷却时间:0.##} 时间)" : "");
|
||||
public override bool TargetSelf => true;
|
||||
|
||||
public double 冷却时间 { get; set; } = 0;
|
||||
public double 基础冷却时间 { get; set; } = 20;
|
||||
private bool 是否是嵌套普通攻击 = false;
|
||||
|
||||
public override void AfterDamageCalculation(Character character, Character enemy, double damage, bool isNormalAttack, bool isMagicDamage, MagicType magicType, DamageResult damageResult)
|
||||
{
|
||||
if (character == Skill.Character && isNormalAttack && 冷却时间 == 0 && !是否是嵌套普通攻击 && ActionQueue != null)
|
||||
{
|
||||
WriteLine($"[ {character} ] 发动了心灵之火!额外进行一次普通攻击!");
|
||||
冷却时间 = 基础冷却时间;
|
||||
是否是嵌套普通攻击 = true;
|
||||
character.NormalAttack.Attack(ActionQueue, character, enemy);
|
||||
}
|
||||
|
||||
if (character == Skill.Character && 是否是嵌套普通攻击)
|
||||
{
|
||||
是否是嵌套普通攻击 = false;
|
||||
}
|
||||
}
|
||||
|
||||
public override void OnTimeElapsed(Character character, double elapsed)
|
||||
{
|
||||
if (冷却时间 > 0)
|
||||
{
|
||||
冷却时间 = Calculation.Round2Digits(冷却时间 - elapsed);
|
||||
if (冷却时间 <= 0)
|
||||
{
|
||||
冷却时间 = 0;
|
||||
}
|
||||
}
|
||||
}
|
||||
|
||||
public override void AlterHardnessTimeAfterNormalAttack(Character character, ref double baseHardnessTime, ref bool isCheckProtected)
|
||||
{
|
||||
baseHardnessTime = Calculation.Round2Digits(baseHardnessTime * 0.8);
|
||||
}
|
||||
}
|
||||
}
|
65
OshimaModules/Skills/Yang/魔法涌流.cs
Normal file
65
OshimaModules/Skills/Yang/魔法涌流.cs
Normal file
@ -0,0 +1,65 @@
|
||||
using Milimoe.FunGame.Core.Api.Utility;
|
||||
using Milimoe.FunGame.Core.Entity;
|
||||
using Milimoe.FunGame.Core.Library.Constant;
|
||||
|
||||
namespace Oshima.FunGame.OshimaModules.Skills
|
||||
{
|
||||
public class 魔法涌流 : Skill
|
||||
{
|
||||
public override long Id => (long)SuperSkillID.魔法涌流;
|
||||
public override string Name => "魔法涌流";
|
||||
public override string Description => Effects.Count > 0 ? Effects.First().Description : "";
|
||||
public override double EPCost => 100;
|
||||
public override double CD => 35;
|
||||
public override double HardnessTime { get; set; } = 10;
|
||||
|
||||
public 魔法涌流(Character? character = null) : base(SkillType.SuperSkill, character)
|
||||
{
|
||||
Effects.Add(new 魔法涌流特效(this));
|
||||
}
|
||||
}
|
||||
|
||||
public class 魔法涌流特效(Skill skill) : Effect(skill)
|
||||
{
|
||||
public override long Id => Skill.Id;
|
||||
public override string Name => "魔法涌流";
|
||||
public override string Description => $"{Duration} 时间内,增加所有伤害的 {减伤比例 * 100:0.##}% 伤害减免,并将普通攻击转为魔法伤害,可叠加魔法震荡的效果。";
|
||||
public override bool TargetSelf => true;
|
||||
public override bool Durative => true;
|
||||
public override double Duration => 25;
|
||||
|
||||
private double 减伤比例 => Calculation.Round2Digits(0.1 + 0.02 * (Level - 1));
|
||||
private double 实际比例 = 0;
|
||||
|
||||
public override void OnEffectGained(Character character)
|
||||
{
|
||||
实际比例 = 减伤比例;
|
||||
character.NormalAttack.SetMagicType(true, character.MagicType);
|
||||
}
|
||||
|
||||
public override void OnEffectLost(Character character)
|
||||
{
|
||||
character.NormalAttack.SetMagicType(false, character.MagicType);
|
||||
}
|
||||
|
||||
public override bool AlterActualDamageAfterCalculation(Character character, Character enemy, ref double damage, bool isNormalAttack, bool isMagicDamage, MagicType magicType, DamageResult damageResult)
|
||||
{
|
||||
if (enemy == Skill.Character)
|
||||
{
|
||||
damage = Calculation.Round2Digits(damage * (1 - 实际比例));
|
||||
}
|
||||
return false;
|
||||
}
|
||||
|
||||
public override void OnSkillCasted(Character caster, List<Character> enemys, List<Character> teammates, Dictionary<string, object> others)
|
||||
{
|
||||
RemainDuration = Duration;
|
||||
if (!caster.Effects.Contains(this))
|
||||
{
|
||||
实际比例 = 0;
|
||||
caster.Effects.Add(this);
|
||||
OnEffectGained(caster);
|
||||
}
|
||||
}
|
||||
}
|
||||
}
|
50
OshimaModules/Skills/Yang/魔法震荡.cs
Normal file
50
OshimaModules/Skills/Yang/魔法震荡.cs
Normal file
@ -0,0 +1,50 @@
|
||||
using Milimoe.FunGame.Core.Entity;
|
||||
using Milimoe.FunGame.Core.Library.Constant;
|
||||
using Oshima.FunGame.OshimaModules.Effects;
|
||||
|
||||
namespace Oshima.FunGame.OshimaModules.Skills
|
||||
{
|
||||
public class 魔法震荡 : Skill
|
||||
{
|
||||
public override long Id => (long)PassiveID.魔法震荡;
|
||||
public override string Name => "魔法震荡";
|
||||
public override string Description => Effects.Count > 0 ? Effects.First().Description : "";
|
||||
|
||||
public 魔法震荡(Character? character = null) : base(SkillType.Passive, character)
|
||||
{
|
||||
Effects.Add(new 魔法震荡特效(this));
|
||||
}
|
||||
|
||||
public override IEnumerable<Effect> AddInactiveEffectToCharacter()
|
||||
{
|
||||
return Effects;
|
||||
}
|
||||
}
|
||||
|
||||
public class 魔法震荡特效(Skill skill) : Effect(skill)
|
||||
{
|
||||
public override long Id => Skill.Id;
|
||||
public override string Name => Skill.Name;
|
||||
public override string Description => $"造成魔法伤害时有 35% 几率使敌人眩晕 1 回合。";
|
||||
public override bool TargetSelf => true;
|
||||
|
||||
public override void AfterDamageCalculation(Character character, Character enemy, double damage, bool isNormalAttack, bool isMagicDamage, MagicType magicType, DamageResult damageResult)
|
||||
{
|
||||
if (character == Skill.Character && isMagicDamage && damageResult != DamageResult.Evaded && new Random().NextDouble() < 0.35)
|
||||
{
|
||||
IEnumerable<Effect> effects = enemy.Effects.Where(e => e is 眩晕 && e.Skill == Skill);
|
||||
if (effects.Any())
|
||||
{
|
||||
effects.First().RemainDurationTurn++;
|
||||
}
|
||||
else
|
||||
{
|
||||
眩晕 e = new(Skill, character, false, 0, 1);
|
||||
enemy.Effects.Add(e);
|
||||
e.OnEffectGained(enemy);
|
||||
}
|
||||
WriteLine($"[ {character} ] 的魔法伤害触发了魔法震荡,[ {enemy} ] 被眩晕了!");
|
||||
}
|
||||
}
|
||||
}
|
||||
}
|
70
OshimaModules/Skills/dddovo/平衡强化.cs
Normal file
70
OshimaModules/Skills/dddovo/平衡强化.cs
Normal file
@ -0,0 +1,70 @@
|
||||
using Milimoe.FunGame.Core.Entity;
|
||||
using Milimoe.FunGame.Core.Library.Constant;
|
||||
|
||||
namespace Oshima.FunGame.OshimaModules.Skills
|
||||
{
|
||||
public class 平衡强化 : Skill
|
||||
{
|
||||
public override long Id => (long)SuperSkillID.平衡强化;
|
||||
public override string Name => "平衡强化";
|
||||
public override string Description => Effects.Count > 0 ? Effects.First().Description : "";
|
||||
public override double EPCost => 100;
|
||||
public override double CD => 55 - (1 * (Level - 1));
|
||||
public override double HardnessTime { get; set; } = 12;
|
||||
|
||||
public 平衡强化(Character? character = null) : base(SkillType.SuperSkill, character)
|
||||
{
|
||||
Effects.Add(new 平衡强化特效(this));
|
||||
}
|
||||
}
|
||||
|
||||
public class 平衡强化特效(Skill skill) : Effect(skill)
|
||||
{
|
||||
public override long Id => Skill.Id;
|
||||
public override string Name => Skill.Name;
|
||||
public override string Description => $"敏捷提高 20%,然后将目前的力量补充到与敏捷持平,持续 {Duration} 时间。";
|
||||
public override bool TargetSelf => true;
|
||||
public override bool Durative => true;
|
||||
public override double Duration => 30;
|
||||
|
||||
private double 本次提升的敏捷 = 0;
|
||||
private double 本次提升的力量 = 0;
|
||||
|
||||
public override void OnEffectGained(Character character)
|
||||
{
|
||||
double pastHP = character.HP;
|
||||
double pastMaxHP = character.MaxHP;
|
||||
double pastMP = character.MP;
|
||||
double pastMaxMP = character.MaxMP;
|
||||
本次提升的敏捷 = character.BaseAGI * 0.2;
|
||||
character.ExAGI += 本次提升的敏捷;
|
||||
本次提升的力量 = character.AGI - character.STR;
|
||||
character.ExSTR += 本次提升的力量;
|
||||
character.Recovery(pastHP, pastMP, pastMaxHP, pastMaxMP);
|
||||
WriteLine($"[ {character} ] 敏捷提升了 {本次提升的敏捷:0.##},力量提升了 {本次提升的力量:0.##}!");
|
||||
}
|
||||
|
||||
public override void OnEffectLost(Character character)
|
||||
{
|
||||
double pastHP = character.HP;
|
||||
double pastMaxHP = character.MaxHP;
|
||||
double pastMP = character.MP;
|
||||
double pastMaxMP = character.MaxMP;
|
||||
character.ExAGI -= character.BaseAGI * 0.2;
|
||||
character.ExSTR -= 本次提升的力量;
|
||||
character.Recovery(pastHP, pastMP, pastMaxHP, pastMaxMP);
|
||||
}
|
||||
|
||||
public override void OnSkillCasted(Character caster, List<Character> enemys, List<Character> teammates, Dictionary<string, object> others)
|
||||
{
|
||||
RemainDuration = Duration;
|
||||
if (!caster.Effects.Contains(this))
|
||||
{
|
||||
本次提升的敏捷 = 0;
|
||||
本次提升的力量 = 0;
|
||||
caster.Effects.Add(this);
|
||||
OnEffectGained(caster);
|
||||
}
|
||||
}
|
||||
}
|
||||
}
|
50
OshimaModules/Skills/dddovo/敏捷之刃.cs
Normal file
50
OshimaModules/Skills/dddovo/敏捷之刃.cs
Normal file
@ -0,0 +1,50 @@
|
||||
using Milimoe.FunGame.Core.Api.Utility;
|
||||
using Milimoe.FunGame.Core.Entity;
|
||||
using Milimoe.FunGame.Core.Library.Constant;
|
||||
|
||||
namespace Oshima.FunGame.OshimaModules.Skills
|
||||
{
|
||||
public class 敏捷之刃 : Skill
|
||||
{
|
||||
public override long Id => (long)PassiveID.敏捷之刃;
|
||||
public override string Name => "敏捷之刃";
|
||||
public override string Description => Effects.Count > 0 ? Effects.First().Description : "";
|
||||
|
||||
public 敏捷之刃(Character? character = null) : base(SkillType.Passive, character)
|
||||
{
|
||||
Effects.Add(new 敏捷之刃特效(this));
|
||||
}
|
||||
|
||||
public override IEnumerable<Effect> AddInactiveEffectToCharacter()
|
||||
{
|
||||
return Effects;
|
||||
}
|
||||
}
|
||||
|
||||
public class 敏捷之刃特效(Skill skill) : Effect(skill)
|
||||
{
|
||||
public override long Id => Skill.Id;
|
||||
public override string Name => Skill.Name;
|
||||
public override string Description => $"每次普通攻击都将附带基于 {敏捷系数 * 100:0.##}% 敏捷 [ {敏捷伤害} ] 的魔法伤害。";
|
||||
public override bool TargetSelf => true;
|
||||
|
||||
private double 敏捷伤害 => Calculation.Round2Digits(敏捷系数 * Skill.Character?.AGI ?? 0);
|
||||
private readonly double 敏捷系数 = 2.5;
|
||||
private bool 是否是嵌套伤害 = false;
|
||||
|
||||
public override void AfterDamageCalculation(Character character, Character enemy, double damage, bool isNormalAttack, bool isMagicDamage, MagicType magicType, DamageResult damageResult)
|
||||
{
|
||||
if (character == Skill.Character && isNormalAttack && damageResult != DamageResult.Evaded && !是否是嵌套伤害)
|
||||
{
|
||||
WriteLine($"[ {character} ] 发动了敏捷之刃!将造成额外伤害!");
|
||||
是否是嵌套伤害 = true;
|
||||
DamageToEnemy(character, enemy, true, magicType, 敏捷伤害);
|
||||
}
|
||||
|
||||
if (character == Skill.Character && 是否是嵌套伤害)
|
||||
{
|
||||
是否是嵌套伤害 = false;
|
||||
}
|
||||
}
|
||||
}
|
||||
}
|
85
OshimaModules/Skills/战技/疾风步.cs
Normal file
85
OshimaModules/Skills/战技/疾风步.cs
Normal file
@ -0,0 +1,85 @@
|
||||
using Milimoe.FunGame.Core.Api.Utility;
|
||||
using Milimoe.FunGame.Core.Entity;
|
||||
using Milimoe.FunGame.Core.Library.Constant;
|
||||
|
||||
namespace Oshima.FunGame.OshimaModules.Skills
|
||||
{
|
||||
public class 疾风步 : Skill
|
||||
{
|
||||
public override long Id => (long)SkillID.疾风步;
|
||||
public override string Name => "疾风步";
|
||||
public override string Description => Effects.Count > 0 ? Effects.First().Description : "";
|
||||
public override double EPCost => 60;
|
||||
public override double CD => 35;
|
||||
public override double HardnessTime { get; set; } = 5;
|
||||
|
||||
public 疾风步(Character? character = null) : base(SkillType.Skill, character)
|
||||
{
|
||||
Effects.Add(new 疾风步特效(this));
|
||||
}
|
||||
}
|
||||
|
||||
public class 疾风步特效(Skill skill) : Effect(skill)
|
||||
{
|
||||
public override long Id => Skill.Id;
|
||||
public override string Name => Skill.Name;
|
||||
public override string Description => $"进入不可选中状态,获得 100 行动速度,提高 8% 暴击率,持续 {Duration} 时间。破隐一击:在持续时间内,首次造成伤害会附加 {系数 * 100:0.##}% 敏捷 [ {伤害加成} ] 的强化伤害,并解除不可选中状态。";
|
||||
public override bool TargetSelf => true;
|
||||
public override bool Durative => true;
|
||||
public override double Duration => 12 + (1 * (Level - 1));
|
||||
|
||||
private double 系数 => Calculation.Round4Digits(0.5 + 0.5 * (Skill.Level - 1));
|
||||
private double 伤害加成 => Calculation.Round2Digits(系数 * Skill.Character?.AGI ?? 0);
|
||||
private bool 首次伤害 { get; set; } = true;
|
||||
private bool 破隐一击 { get; set; } = false;
|
||||
|
||||
public override void OnEffectGained(Character character)
|
||||
{
|
||||
Skill.IsInEffect = true;
|
||||
character.CharacterEffectTypes.Add(this, [EffectType.Unselectable]);
|
||||
character.UpdateCharacterState();
|
||||
character.ExSPD += 100;
|
||||
character.ExCritRate += 0.08;
|
||||
}
|
||||
|
||||
public override void OnEffectLost(Character character)
|
||||
{
|
||||
Skill.IsInEffect = false;
|
||||
if (!破隐一击)
|
||||
{
|
||||
// 在没有打出破隐一击的情况下,恢复角色状态
|
||||
character.CharacterEffectTypes.Remove(this);
|
||||
character.UpdateCharacterState();
|
||||
}
|
||||
character.ExSPD -= 100;
|
||||
character.ExCritRate -= 0.08;
|
||||
}
|
||||
|
||||
public override bool AlterActualDamageAfterCalculation(Character character, Character enemy, ref double damage, bool isNormalAttack, bool isMagicDamage, MagicType magicType, DamageResult damageResult)
|
||||
{
|
||||
if (character == Skill.Character && 首次伤害)
|
||||
{
|
||||
首次伤害 = false;
|
||||
破隐一击 = true;
|
||||
character.CharacterEffectTypes.Remove(this);
|
||||
character.UpdateCharacterState();
|
||||
double d = 伤害加成;
|
||||
damage = Calculation.Round2Digits(damage + d);
|
||||
WriteLine($"[ {character} ] 触发了疾风步破隐一击,获得了 [ {d} ] 点伤害加成!");
|
||||
}
|
||||
return false;
|
||||
}
|
||||
|
||||
public override void OnSkillCasted(Character caster, List<Character> enemys, List<Character> teammates, Dictionary<string, object> others)
|
||||
{
|
||||
if (!caster.Effects.Contains(this))
|
||||
{
|
||||
首次伤害 = true;
|
||||
破隐一击 = false;
|
||||
RemainDuration = Duration;
|
||||
caster.Effects.Add(this);
|
||||
OnEffectGained(caster);
|
||||
}
|
||||
}
|
||||
}
|
||||
}
|
53
OshimaModules/Skills/魔法/冰霜攻击.cs
Normal file
53
OshimaModules/Skills/魔法/冰霜攻击.cs
Normal file
@ -0,0 +1,53 @@
|
||||
using Milimoe.FunGame.Core.Api.Utility;
|
||||
using Milimoe.FunGame.Core.Entity;
|
||||
using Milimoe.FunGame.Core.Library.Constant;
|
||||
|
||||
namespace Oshima.FunGame.OshimaModules.Skills
|
||||
{
|
||||
public class 冰霜攻击 : Skill
|
||||
{
|
||||
public override long Id => (long)MagicID.冰霜攻击;
|
||||
public override string Name => "冰霜攻击";
|
||||
public override string Description => Effects.Count > 0 ? Effects.First().Description : "";
|
||||
public override double MPCost => 30 + (50 * (Level - 1));
|
||||
public override double CD => 20;
|
||||
public override double CastTime => 6;
|
||||
public override double HardnessTime { get; set; } = 3;
|
||||
|
||||
public 冰霜攻击(Character? character = null) : base(SkillType.Magic, character)
|
||||
{
|
||||
Effects.Add(new 冰霜攻击特效(this));
|
||||
}
|
||||
}
|
||||
|
||||
public class 冰霜攻击特效(Skill skill) : Effect(skill)
|
||||
{
|
||||
public override long Id => Skill.Id;
|
||||
public override string Name => Skill.Name;
|
||||
public override string Description => $"对目标敌人造成 {Calculation.Round2Digits(90 + 60 * (Skill.Level - 1))} + {Calculation.Round2Digits((1.2 + 1.8 * (Skill.Level - 1)) * 100)}% 智力 [ {Damage} ] 点{CharacterSet.GetMagicDamageName(MagicType)}。";
|
||||
public override bool TargetSelf => false;
|
||||
public override int TargetCount => 1;
|
||||
|
||||
private double Damage
|
||||
{
|
||||
get
|
||||
{
|
||||
double d = 0;
|
||||
if (Skill.Character != null)
|
||||
{
|
||||
d = Calculation.Round2Digits(90 + 60 * (Skill.Level - 1) + (1.2 + 1.8 * (Skill.Level - 1)) * Skill.Character.INT);
|
||||
}
|
||||
return d;
|
||||
}
|
||||
}
|
||||
|
||||
public override void OnSkillCasted(Character caster, List<Character> enemys, List<Character> teammates, Dictionary<string, object> others)
|
||||
{
|
||||
if (enemys.Count > 0)
|
||||
{
|
||||
Character enemy = enemys[new Random().Next(enemys.Count)];
|
||||
DamageToEnemy(caster, enemy, true, MagicType, Damage);
|
||||
}
|
||||
}
|
||||
}
|
||||
}
|
594
OshimaServers/FastAutoServer.cs
Normal file
594
OshimaServers/FastAutoServer.cs
Normal file
@ -0,0 +1,594 @@
|
||||
using System.Text;
|
||||
using Milimoe.FunGame.Core.Api.Transmittal;
|
||||
using Milimoe.FunGame.Core.Api.Utility;
|
||||
using Milimoe.FunGame.Core.Entity;
|
||||
using Milimoe.FunGame.Core.Interface.Base;
|
||||
using Milimoe.FunGame.Core.Library.Common.Addon;
|
||||
using Milimoe.FunGame.Core.Library.Constant;
|
||||
using Oshima.FunGame.OshimaModules;
|
||||
using Oshima.FunGame.OshimaModules.Items;
|
||||
using Oshima.FunGame.OshimaModules.Skills;
|
||||
|
||||
namespace Oshima.FunGame.OshimaServers
|
||||
{
|
||||
public class FastAutoServer : GameModuleServer
|
||||
{
|
||||
public override string Name => OshimaGameModuleConstant.FastAuto;
|
||||
public override string Description => OshimaGameModuleConstant.Description;
|
||||
public override string Version => OshimaGameModuleConstant.Version;
|
||||
public override string Author => OshimaGameModuleConstant.Author;
|
||||
public override string DefaultMap => OshimaGameModuleConstant.FastAutoMap;
|
||||
public override GameModuleDepend GameModuleDepend => OshimaGameModuleConstant.GameModuleDepend;
|
||||
public static List<Character> Characters { get; } = [];
|
||||
public static Dictionary<Character, CharacterStatistics> CharacterStatistics { get; } = [];
|
||||
public static PluginConfig StatsConfig { get; } = new(OshimaGameModuleConstant.FastAuto, nameof(CharacterStatistics));
|
||||
public static GameModuleLoader? GameModuleLoader { get; set; } = null;
|
||||
public static List<User> ConnectedUsers { get; } = [];
|
||||
|
||||
public override Dictionary<string, object> GamingMessageHandler(string username, GamingType type, Dictionary<string, object> data)
|
||||
{
|
||||
Dictionary<string, object> result = [];
|
||||
|
||||
switch (type)
|
||||
{
|
||||
case GamingType.Connect:
|
||||
string un = (DataRequest.GetDictionaryJsonObject<string>(data, "un") ?? "").Trim();
|
||||
if (un != "" && !ConnectedUsers.Where(u => u.Username == un).Any())
|
||||
{
|
||||
ConnectedUsers.Add(Users.Where(u => u.Username == un).First());
|
||||
Controller.WriteLine(un + " 已连接至房间。");
|
||||
}
|
||||
break;
|
||||
case GamingType.Disconnect:
|
||||
break;
|
||||
case GamingType.Reconnect:
|
||||
break;
|
||||
case GamingType.BanCharacter:
|
||||
break;
|
||||
case GamingType.PickCharacter:
|
||||
break;
|
||||
case GamingType.Random:
|
||||
break;
|
||||
case GamingType.Round:
|
||||
break;
|
||||
case GamingType.LevelUp:
|
||||
break;
|
||||
case GamingType.Move:
|
||||
break;
|
||||
case GamingType.Attack:
|
||||
break;
|
||||
case GamingType.Skill:
|
||||
break;
|
||||
case GamingType.Item:
|
||||
break;
|
||||
case GamingType.Magic:
|
||||
break;
|
||||
case GamingType.Buy:
|
||||
break;
|
||||
case GamingType.SuperSkill:
|
||||
break;
|
||||
case GamingType.Pause:
|
||||
break;
|
||||
case GamingType.Unpause:
|
||||
break;
|
||||
case GamingType.Surrender:
|
||||
break;
|
||||
case GamingType.UpdateInfo:
|
||||
break;
|
||||
case GamingType.Punish:
|
||||
break;
|
||||
case GamingType.None:
|
||||
default:
|
||||
break;
|
||||
}
|
||||
|
||||
return result;
|
||||
}
|
||||
|
||||
public override bool StartServer(string GameModule, Room Room, List<User> Users, IServerModel RoomMasterServerModel, Dictionary<string, IServerModel> ServerModels, params object[] Args)
|
||||
{
|
||||
// 将参数转为本地属性
|
||||
this.Room = Room;
|
||||
this.Users = Users;
|
||||
RoomMaster = RoomMasterServerModel;
|
||||
All = ServerModels;
|
||||
TaskUtility.NewTask(StartGame).OnError(Controller.Error);
|
||||
return true;
|
||||
}
|
||||
|
||||
public async Task StartGame()
|
||||
{
|
||||
try
|
||||
{
|
||||
while (true)
|
||||
{
|
||||
if (ConnectedUsers.Count == Users.Count)
|
||||
{
|
||||
break;
|
||||
}
|
||||
await Task.Delay(500);
|
||||
}
|
||||
|
||||
Dictionary<User, Character> characters = [];
|
||||
List<Character> characterPickeds = [];
|
||||
Dictionary<string, object> data = [];
|
||||
|
||||
// 抽取角色
|
||||
foreach (User user in Users)
|
||||
{
|
||||
List<Character> list = [.. Characters.Where(c => !characterPickeds.Contains(c))];
|
||||
Character cr = list[Random.Shared.Next(list.Count - 1)];
|
||||
string msg = $"{user.Username} 抽到了 [ {cr} ]";
|
||||
characterPickeds.Add(cr);
|
||||
characters.Add(user, cr.Copy());
|
||||
Controller.WriteLine(msg);
|
||||
SendAllGamingMessage(data, msg);
|
||||
}
|
||||
|
||||
int clevel = 60;
|
||||
int slevel = 6;
|
||||
int mlevel = 8;
|
||||
|
||||
List<Character> inGameCharacters = [.. characters.Values];
|
||||
|
||||
// 升级和赋能
|
||||
foreach (Character c in inGameCharacters)
|
||||
{
|
||||
c.Level = clevel;
|
||||
c.NormalAttack.Level = mlevel;
|
||||
|
||||
Skill 冰霜攻击 = new 冰霜攻击(c)
|
||||
{
|
||||
Level = mlevel
|
||||
};
|
||||
c.Skills.Add(冰霜攻击);
|
||||
|
||||
Skill 疾风步 = new 疾风步(c)
|
||||
{
|
||||
Level = slevel
|
||||
};
|
||||
c.Skills.Add(疾风步);
|
||||
|
||||
if (c.Id == 1)
|
||||
{
|
||||
Skill META马 = new META马(c)
|
||||
{
|
||||
Level = 1
|
||||
};
|
||||
c.Skills.Add(META马);
|
||||
|
||||
Skill 力量爆发 = new 力量爆发(c)
|
||||
{
|
||||
Level = mlevel
|
||||
};
|
||||
c.Skills.Add(力量爆发);
|
||||
}
|
||||
|
||||
if (c.Id == 2)
|
||||
{
|
||||
Skill 心灵之火 = new 心灵之火(c)
|
||||
{
|
||||
Level = 1
|
||||
};
|
||||
c.Skills.Add(心灵之火);
|
||||
|
||||
Skill 天赐之力 = new 天赐之力(c)
|
||||
{
|
||||
Level = slevel
|
||||
};
|
||||
c.Skills.Add(天赐之力);
|
||||
}
|
||||
|
||||
if (c.Id == 3)
|
||||
{
|
||||
Skill 魔法震荡 = new 魔法震荡(c)
|
||||
{
|
||||
Level = 1
|
||||
};
|
||||
c.Skills.Add(魔法震荡);
|
||||
|
||||
Skill 魔法涌流 = new 魔法涌流(c)
|
||||
{
|
||||
Level = slevel
|
||||
};
|
||||
c.Skills.Add(魔法涌流);
|
||||
}
|
||||
|
||||
if (c.Id == 4)
|
||||
{
|
||||
Skill 灵能反射 = new 灵能反射(c)
|
||||
{
|
||||
Level = 1
|
||||
};
|
||||
c.Skills.Add(灵能反射);
|
||||
|
||||
Skill 三重叠加 = new 三重叠加(c)
|
||||
{
|
||||
Level = slevel
|
||||
};
|
||||
c.Skills.Add(三重叠加);
|
||||
}
|
||||
|
||||
if (c.Id == 5)
|
||||
{
|
||||
Skill 智慧与力量 = new 智慧与力量(c)
|
||||
{
|
||||
Level = 1
|
||||
};
|
||||
c.Skills.Add(智慧与力量);
|
||||
|
||||
Skill 变幻之心 = new 变幻之心(c)
|
||||
{
|
||||
Level = slevel
|
||||
};
|
||||
c.Skills.Add(变幻之心);
|
||||
}
|
||||
|
||||
if (c.Id == 6)
|
||||
{
|
||||
Skill 致命打击 = new 致命打击(c)
|
||||
{
|
||||
Level = 1
|
||||
};
|
||||
c.Skills.Add(致命打击);
|
||||
|
||||
Skill 精准打击 = new 精准打击(c)
|
||||
{
|
||||
Level = slevel
|
||||
};
|
||||
c.Skills.Add(精准打击);
|
||||
}
|
||||
|
||||
if (c.Id == 7)
|
||||
{
|
||||
Skill 毁灭之势 = new 毁灭之势(c)
|
||||
{
|
||||
Level = 1
|
||||
};
|
||||
c.Skills.Add(毁灭之势);
|
||||
|
||||
Skill 绝对领域 = new 绝对领域(c)
|
||||
{
|
||||
Level = slevel
|
||||
};
|
||||
c.Skills.Add(绝对领域);
|
||||
}
|
||||
|
||||
if (c.Id == 8)
|
||||
{
|
||||
Skill 枯竭打击 = new 枯竭打击(c)
|
||||
{
|
||||
Level = 1
|
||||
};
|
||||
c.Skills.Add(枯竭打击);
|
||||
|
||||
Skill 能量毁灭 = new 能量毁灭(c)
|
||||
{
|
||||
Level = slevel
|
||||
};
|
||||
c.Skills.Add(能量毁灭);
|
||||
}
|
||||
|
||||
if (c.Id == 9)
|
||||
{
|
||||
Skill 玻璃大炮 = new 玻璃大炮(c)
|
||||
{
|
||||
Level = 1
|
||||
};
|
||||
c.Skills.Add(玻璃大炮);
|
||||
|
||||
Skill 迅捷之势 = new 迅捷之势(c)
|
||||
{
|
||||
Level = slevel
|
||||
};
|
||||
c.Skills.Add(迅捷之势);
|
||||
}
|
||||
|
||||
if (c.Id == 10)
|
||||
{
|
||||
Skill 累积之压 = new 累积之压(c)
|
||||
{
|
||||
Level = 1
|
||||
};
|
||||
c.Skills.Add(累积之压);
|
||||
|
||||
Skill 嗜血本能 = new 嗜血本能(c)
|
||||
{
|
||||
Level = slevel
|
||||
};
|
||||
c.Skills.Add(嗜血本能);
|
||||
}
|
||||
|
||||
if (c.Id == 11)
|
||||
{
|
||||
Skill 敏捷之刃 = new 敏捷之刃(c)
|
||||
{
|
||||
Level = 1
|
||||
};
|
||||
c.Skills.Add(敏捷之刃);
|
||||
|
||||
Skill 平衡强化 = new 平衡强化(c)
|
||||
{
|
||||
Level = slevel
|
||||
};
|
||||
c.Skills.Add(平衡强化);
|
||||
}
|
||||
|
||||
if (c.Id == 12)
|
||||
{
|
||||
Skill 弱者猎手 = new 弱者猎手(c)
|
||||
{
|
||||
Level = 1
|
||||
};
|
||||
c.Skills.Add(弱者猎手);
|
||||
|
||||
Skill 血之狂欢 = new 血之狂欢(c)
|
||||
{
|
||||
Level = slevel
|
||||
};
|
||||
c.Skills.Add(血之狂欢);
|
||||
}
|
||||
|
||||
SendAllGamingMessage(data, c.GetInfo());
|
||||
}
|
||||
|
||||
ActionQueue actionQueue = new(inGameCharacters, (str) =>
|
||||
{
|
||||
SendAllGamingMessage(data, str);
|
||||
});
|
||||
|
||||
// 总游戏时长
|
||||
double totalTime = 0;
|
||||
// 总死亡数
|
||||
int deaths = 0;
|
||||
|
||||
// 开始空投
|
||||
空投(actionQueue, totalTime);
|
||||
|
||||
// 总回合数
|
||||
int i = 1;
|
||||
while (i < 999)
|
||||
{
|
||||
if (i == 998)
|
||||
{
|
||||
SendAllGamingMessage(data, $"=== 终局审判 ===");
|
||||
Dictionary<Character, double> 他们的血量百分比 = [];
|
||||
foreach (Character c in inGameCharacters)
|
||||
{
|
||||
他们的血量百分比.TryAdd(c, Calculation.Round4Digits(c.HP / c.MaxHP));
|
||||
}
|
||||
double max = 他们的血量百分比.Values.Max();
|
||||
Character winner = 他们的血量百分比.Keys.Where(c => 他们的血量百分比[c] == max).First();
|
||||
SendAllGamingMessage(data, "[ " + winner + " ] 成为了天选之人!!");
|
||||
foreach (Character c in inGameCharacters.Where(c => c != winner && c.HP > 0))
|
||||
{
|
||||
SendAllGamingMessage(data, "[ " + winner + " ] 对 [ " + c + " ] 造成了 99999999999 点真实伤害。");
|
||||
actionQueue.DeathCalculation(winner, c);
|
||||
}
|
||||
actionQueue.EndGameInfo(winner);
|
||||
break;
|
||||
}
|
||||
|
||||
// 检查是否有角色可以行动
|
||||
Character? characterToAct = actionQueue.NextCharacter();
|
||||
|
||||
// 处理回合
|
||||
if (characterToAct != null)
|
||||
{
|
||||
SendAllGamingMessage(data, $"=== Round {i++} ===");
|
||||
SendAllGamingMessage(data, "现在是 [ " + characterToAct + " ] 的回合!");
|
||||
|
||||
if (actionQueue.Queue.Count == 0)
|
||||
{
|
||||
break;
|
||||
}
|
||||
|
||||
bool isGameEnd = actionQueue.ProcessTurn(characterToAct);
|
||||
if (isGameEnd)
|
||||
{
|
||||
break;
|
||||
}
|
||||
|
||||
actionQueue.DisplayQueue();
|
||||
}
|
||||
|
||||
// 模拟时间流逝
|
||||
totalTime += actionQueue.TimeLapse();
|
||||
|
||||
if (actionQueue.Eliminated.Count > deaths)
|
||||
{
|
||||
deaths = actionQueue.Eliminated.Count;
|
||||
}
|
||||
}
|
||||
|
||||
SendAllGamingMessage(data, "--- End ---");
|
||||
SendAllGamingMessage(data, "总游戏时长:" + Calculation.Round2Digits(totalTime));
|
||||
|
||||
// 赛后统计
|
||||
SendAllGamingMessage(data, "=== 伤害排行榜 ===");
|
||||
int top = inGameCharacters.Count;
|
||||
int count = 1;
|
||||
foreach (Character character in actionQueue.CharacterStatistics.OrderByDescending(d => d.Value.TotalDamage).Select(d => d.Key))
|
||||
{
|
||||
StringBuilder builder = new();
|
||||
CharacterStatistics stats = actionQueue.CharacterStatistics[character];
|
||||
builder.AppendLine($"{count++}. [ {character.ToStringWithLevel()} ] ({stats.Kills} / {stats.Assists})");
|
||||
builder.AppendLine($"存活时长:{stats.LiveTime} / 存活回合数:{stats.LiveRound} / 行动回合数:{stats.ActionTurn}");
|
||||
builder.AppendLine($"总计伤害:{stats.TotalDamage} / 总计物理伤害:{stats.TotalPhysicalDamage} / 总计魔法伤害:{stats.TotalMagicDamage}");
|
||||
builder.AppendLine($"总承受伤害:{stats.TotalTakenDamage} / 总承受物理伤害:{stats.TotalTakenPhysicalDamage} / 总承受魔法伤害:{stats.TotalTakenMagicDamage}");
|
||||
builder.Append($"每秒伤害:{stats.DamagePerSecond} / 每回合伤害:{stats.DamagePerTurn}");
|
||||
|
||||
SendAllGamingMessage(data, builder.ToString());
|
||||
|
||||
CharacterStatistics? totalStats = CharacterStatistics.Where(kv => kv.Key.GetName() == character.GetName()).Select(kv => kv.Value).FirstOrDefault();
|
||||
if (totalStats != null)
|
||||
{
|
||||
// 统计此角色的所有数据
|
||||
totalStats.TotalDamage = Calculation.Round2Digits(totalStats.TotalDamage + stats.TotalDamage);
|
||||
totalStats.TotalPhysicalDamage = Calculation.Round2Digits(totalStats.TotalPhysicalDamage + stats.TotalPhysicalDamage);
|
||||
totalStats.TotalMagicDamage = Calculation.Round2Digits(totalStats.TotalMagicDamage + stats.TotalMagicDamage);
|
||||
totalStats.TotalRealDamage = Calculation.Round2Digits(totalStats.TotalRealDamage + stats.TotalRealDamage);
|
||||
totalStats.TotalTakenDamage = Calculation.Round2Digits(totalStats.TotalTakenDamage + stats.TotalTakenDamage);
|
||||
totalStats.TotalTakenPhysicalDamage = Calculation.Round2Digits(totalStats.TotalTakenPhysicalDamage + stats.TotalTakenPhysicalDamage);
|
||||
totalStats.TotalTakenMagicDamage = Calculation.Round2Digits(totalStats.TotalTakenMagicDamage + stats.TotalTakenMagicDamage);
|
||||
totalStats.TotalTakenRealDamage = Calculation.Round2Digits(totalStats.TotalTakenRealDamage + stats.TotalTakenRealDamage);
|
||||
totalStats.LiveRound += stats.LiveRound;
|
||||
totalStats.ActionTurn += stats.ActionTurn;
|
||||
totalStats.LiveTime = Calculation.Round2Digits(totalStats.LiveTime + stats.LiveTime);
|
||||
totalStats.TotalEarnedMoney += stats.TotalEarnedMoney;
|
||||
totalStats.Kills += stats.Kills;
|
||||
totalStats.Deaths += stats.Deaths;
|
||||
totalStats.Assists += stats.Assists;
|
||||
totalStats.LastRank = stats.LastRank;
|
||||
double totalRank = totalStats.AvgRank * totalStats.Plays + totalStats.LastRank;
|
||||
totalStats.Plays += stats.Plays;
|
||||
if (totalStats.Plays != 0) totalStats.AvgRank = Calculation.Round2Digits(totalRank / totalStats.Plays);
|
||||
totalStats.Wins += stats.Wins;
|
||||
totalStats.Top3s += stats.Top3s;
|
||||
totalStats.Loses += stats.Loses;
|
||||
if (totalStats.Plays != 0)
|
||||
{
|
||||
totalStats.AvgDamage = Calculation.Round2Digits(totalStats.TotalDamage / totalStats.Plays);
|
||||
totalStats.AvgPhysicalDamage = Calculation.Round2Digits(totalStats.TotalPhysicalDamage / totalStats.Plays);
|
||||
totalStats.AvgMagicDamage = Calculation.Round2Digits(totalStats.TotalMagicDamage / totalStats.Plays);
|
||||
totalStats.AvgRealDamage = Calculation.Round2Digits(totalStats.TotalRealDamage / totalStats.Plays);
|
||||
totalStats.AvgTakenDamage = Calculation.Round2Digits(totalStats.TotalTakenDamage / totalStats.Plays);
|
||||
totalStats.AvgTakenPhysicalDamage = Calculation.Round2Digits(totalStats.TotalTakenPhysicalDamage / totalStats.Plays);
|
||||
totalStats.AvgTakenMagicDamage = Calculation.Round2Digits(totalStats.TotalTakenMagicDamage / totalStats.Plays);
|
||||
totalStats.AvgTakenRealDamage = Calculation.Round2Digits(totalStats.TotalTakenRealDamage / totalStats.Plays);
|
||||
totalStats.AvgLiveRound = totalStats.LiveRound / totalStats.Plays;
|
||||
totalStats.AvgActionTurn = totalStats.ActionTurn / totalStats.Plays;
|
||||
totalStats.AvgLiveTime = Calculation.Round2Digits(totalStats.LiveTime / totalStats.Plays);
|
||||
totalStats.AvgEarnedMoney = totalStats.TotalEarnedMoney / totalStats.Plays;
|
||||
totalStats.Winrates = Calculation.Round4Digits(Convert.ToDouble(totalStats.Wins) / Convert.ToDouble(totalStats.Plays));
|
||||
totalStats.Top3rates = Calculation.Round4Digits(Convert.ToDouble(totalStats.Top3s) / Convert.ToDouble(totalStats.Plays));
|
||||
}
|
||||
if (totalStats.LiveRound != 0) totalStats.DamagePerRound = Calculation.Round2Digits(totalStats.TotalDamage / totalStats.LiveRound);
|
||||
if (totalStats.ActionTurn != 0) totalStats.DamagePerTurn = Calculation.Round2Digits(totalStats.TotalDamage / totalStats.ActionTurn);
|
||||
if (totalStats.LiveTime != 0) totalStats.DamagePerSecond = Calculation.Round2Digits(totalStats.TotalDamage / totalStats.LiveTime);
|
||||
}
|
||||
}
|
||||
|
||||
// 显示每个角色的信息
|
||||
for (i = actionQueue.Eliminated.Count - 1; i >= 0; i--)
|
||||
{
|
||||
Character character = actionQueue.Eliminated[i];
|
||||
SendAllGamingMessage(data, $"=== 角色 [ {character} ] ===\r\n{character.GetInfo()}");
|
||||
}
|
||||
|
||||
lock (StatsConfig)
|
||||
{
|
||||
foreach (Character c in CharacterStatistics.Keys)
|
||||
{
|
||||
StatsConfig.Add(c.ToStringWithOutUser(), CharacterStatistics[c]);
|
||||
}
|
||||
StatsConfig.SaveConfig();
|
||||
}
|
||||
|
||||
// 结束
|
||||
SendAll(SocketMessageType.EndGame, Room, Users);
|
||||
foreach (IServerModel model in All.Values)
|
||||
{
|
||||
model.NowGamingServer = null;
|
||||
}
|
||||
ConnectedUsers.Clear();
|
||||
}
|
||||
catch (Exception e)
|
||||
{
|
||||
TXTHelper.AppendErrorLog(e.ToString());
|
||||
}
|
||||
}
|
||||
|
||||
public static void 空投(ActionQueue queue, double totalTime)
|
||||
{
|
||||
Item[] 这次发放的空投;
|
||||
if (totalTime == 0)
|
||||
{
|
||||
foreach (Character character in queue.Queue)
|
||||
{
|
||||
这次发放的空投 = [new 攻击之爪50()];
|
||||
foreach (Item item in 这次发放的空投)
|
||||
{
|
||||
queue.Equip(character, EquipItemToSlot.Accessory1, item);
|
||||
}
|
||||
}
|
||||
}
|
||||
}
|
||||
|
||||
public void SendAllGamingMessage(Dictionary<string, object> data, string str, bool showmessage = false)
|
||||
{
|
||||
data.Clear();
|
||||
data.Add("msg", str);
|
||||
data.Add("showmessage", showmessage);
|
||||
SendAllGamingMessage(GamingType.UpdateInfo, data);
|
||||
}
|
||||
|
||||
public override void AfterLoad(params object[] args)
|
||||
{
|
||||
foreach (Character c in GameModuleDepend.Characters)
|
||||
{
|
||||
Character character = c.Copy();
|
||||
Characters.Add(character);
|
||||
CharacterStatistics.Add(character, new());
|
||||
}
|
||||
|
||||
StatsConfig.LoadConfig();
|
||||
foreach (Character character in CharacterStatistics.Keys)
|
||||
{
|
||||
if (StatsConfig.ContainsKey(character.ToStringWithOutUser()))
|
||||
{
|
||||
CharacterStatistics[character] = StatsConfig.Get<CharacterStatistics>(character.ToStringWithOutUser()) ?? CharacterStatistics[character];
|
||||
}
|
||||
}
|
||||
}
|
||||
|
||||
protected Room Room = General.HallInstance;
|
||||
protected List<User> Users = [];
|
||||
protected IServerModel? RoomMaster;
|
||||
protected Dictionary<string, IServerModel> All = [];
|
||||
|
||||
protected void SendAllGamingMessage(GamingType type, Dictionary<string, object> data)
|
||||
{
|
||||
// 循环服务线程,向所有玩家发送局内消息
|
||||
foreach (IServerModel s in All.Values)
|
||||
{
|
||||
if (s != null && s.Socket != null)
|
||||
{
|
||||
s.Send(s.Socket, SocketMessageType.Gaming, type, data);
|
||||
}
|
||||
}
|
||||
}
|
||||
|
||||
protected void SendGamingMessage(string username, GamingType type, Dictionary<string, object> data)
|
||||
{
|
||||
// 向指定玩家发送局内消息
|
||||
IServerModel s = All[username];
|
||||
if (s != null && s.Socket != null)
|
||||
{
|
||||
s.Send(s.Socket, SocketMessageType.Gaming, type, data);
|
||||
}
|
||||
}
|
||||
|
||||
protected void SendAll(SocketMessageType type, params object[] args)
|
||||
{
|
||||
// 循环服务线程,向所有玩家发送消息
|
||||
foreach (IServerModel s in All.Values)
|
||||
{
|
||||
if (s != null && s.Socket != null)
|
||||
{
|
||||
s.Send(s.Socket, type, args);
|
||||
}
|
||||
}
|
||||
}
|
||||
|
||||
protected void Send(string username, SocketMessageType type, params object[] args)
|
||||
{
|
||||
// 向指定玩家发送消息
|
||||
IServerModel s = All[username];
|
||||
if (s != null && s.Socket != null)
|
||||
{
|
||||
s.Send(s.Socket, type, args);
|
||||
}
|
||||
}
|
||||
}
|
||||
}
|
22
OshimaServers/OshimaServers.csproj
Normal file
22
OshimaServers/OshimaServers.csproj
Normal file
@ -0,0 +1,22 @@
|
||||
<Project Sdk="Microsoft.NET.Sdk">
|
||||
|
||||
<PropertyGroup>
|
||||
<TargetFramework>net8.0</TargetFramework>
|
||||
<ImplicitUsings>enable</ImplicitUsings>
|
||||
<Nullable>enable</Nullable>
|
||||
<BaseOutputPath>..\bin\</BaseOutputPath>
|
||||
<Authors>Oshima Studios</Authors>
|
||||
<RootNamespace>Oshima.FunGame.$(MSBuildProjectName.Replace(" ", "_"))</RootNamespace>
|
||||
</PropertyGroup>
|
||||
|
||||
<ItemGroup>
|
||||
<ProjectReference Include="..\OshimaModules\OshimaModules.csproj" />
|
||||
</ItemGroup>
|
||||
|
||||
<ItemGroup>
|
||||
<Reference Include="FunGame.Core">
|
||||
<HintPath>..\..\FunGame.Core\bin\Debug\net8.0\FunGame.Core.dll</HintPath>
|
||||
</Reference>
|
||||
</ItemGroup>
|
||||
|
||||
</Project>
|
@ -1 +1,7 @@
|
||||
# Oshima Studios定制的FunGame游戏模组
|
||||
# FunGame 定制模组
|
||||
|
||||
Oshima Studios 巨献
|
||||
|
||||
设定可参考:[Oshima Core 文档 | 喔 是吗?](https://docs.milimoe.com)
|
||||
|
||||
FunGame 原项目地址:[https://github.com/project-redbud/FunGame-Core](https://github.com/project-redbud/FunGame-Core)
|
||||
|
Loading…
x
Reference in New Issue
Block a user