From 5445ea141b8b1440446bf0bee59f2da7ee411968 Mon Sep 17 00:00:00 2001 From: milimoe <110188673+milimoe@users.noreply.github.com> Date: Tue, 3 Jun 2025 09:05:09 +0800 Subject: [PATCH] =?UTF-8?q?=E5=BC=80=E5=90=AF2.0-dev=EF=BC=9BItem=E5=92=8C?= =?UTF-8?q?Skill=E3=80=81Effect=E6=B7=BB=E5=8A=A0=E5=B1=80=E5=A4=96?= =?UTF-8?q?=E4=BD=BF=E7=94=A8=E7=89=A9=E5=93=81=E6=8A=80=E8=83=BD=E7=9A=84?= =?UTF-8?q?User=E5=8F=82=E6=95=B0=20(#139)?= MIME-Version: 1.0 Content-Type: text/plain; charset=UTF-8 Content-Transfer-Encoding: 8bit --- Entity/Item/Item.cs | 7 ++++--- Entity/Skill/Effect.cs | 3 ++- Entity/Skill/Skill.cs | 5 +++-- FunGame.Core.csproj | 7 ++++--- Library/Constant/FunGameInfo.cs | 4 ++-- 5 files changed, 15 insertions(+), 11 deletions(-) diff --git a/Entity/Item/Item.cs b/Entity/Item/Item.cs index 16e52b1..65d971d 100644 --- a/Entity/Item/Item.cs +++ b/Entity/Item/Item.cs @@ -332,11 +332,11 @@ namespace Milimoe.FunGame.Core.Entity /// 局外(库存)使用物品触发 /// /// - public bool UseItem(Dictionary args) + public bool UseItem(User user, Dictionary args) { if (User != null) { - bool result = OnItemUsed(args); + bool result = OnItemUsed(user, args); if (result) { EntityState = EntityState.Modified; @@ -378,9 +378,10 @@ namespace Milimoe.FunGame.Core.Entity /// /// 当物品被玩家使用时 /// + /// /// /// - protected virtual bool OnItemUsed(Dictionary args) + protected virtual bool OnItemUsed(User user, Dictionary args) { return false; } diff --git a/Entity/Skill/Effect.cs b/Entity/Skill/Effect.cs index 7e01802..4b01e7c 100644 --- a/Entity/Skill/Effect.cs +++ b/Entity/Skill/Effect.cs @@ -337,9 +337,10 @@ namespace Milimoe.FunGame.Core.Entity /// /// 对目标触发技能效果 /// + /// /// /// - public virtual void OnSkillCasted(List targets, Dictionary others) + public virtual void OnSkillCasted(User user, List targets, Dictionary others) { } diff --git a/Entity/Skill/Skill.cs b/Entity/Skill/Skill.cs index fa184b8..705822b 100644 --- a/Entity/Skill/Skill.cs +++ b/Entity/Skill/Skill.cs @@ -415,12 +415,13 @@ namespace Milimoe.FunGame.Core.Entity /// /// 对目标触发技能效果 /// + /// /// - public void OnSkillCasted(List targets) + public void OnSkillCasted(User user, List targets) { foreach (Effect e in Effects) { - e.OnSkillCasted(targets, Values); + e.OnSkillCasted(user, targets, Values); } } diff --git a/FunGame.Core.csproj b/FunGame.Core.csproj index 9b983df..86c2ff2 100644 --- a/FunGame.Core.csproj +++ b/FunGame.Core.csproj @@ -8,8 +8,8 @@ bin\ $(Author) Project Redbud - 1.0.0 - 1.0.0 + 2.0.0 + 2.0.0 bin FunGame Core Milimoe.$(MSBuildProjectName.Replace(" ", "_")) @@ -48,7 +48,8 @@ LGPL-3.0-or-later True README.md - 1.0.0 + 2.0.0-dev + $([System.DateTime]::Now.ToString("MMdd")) diff --git a/Library/Constant/FunGameInfo.cs b/Library/Constant/FunGameInfo.cs index 6eb9cd4..1b1bd95 100644 --- a/Library/Constant/FunGameInfo.cs +++ b/Library/Constant/FunGameInfo.cs @@ -38,9 +38,9 @@ public const string FunGame_Desktop = "FunGame Desktop"; public const string FunGame_Server = "FunGame Server Console"; - public const int FunGame_Version_Major = 1; + public const int FunGame_Version_Major = 2; public const int FunGame_Version_Minor = 0; - public const string FunGame_VersionPatch = "0"; + public const string FunGame_VersionPatch = "0-dev"; public const string FunGame_Version_Build = ""; public const string FunGameCoreTitle = @" _____ _ _ _ _ ____ _ __ __ _____ ____ ___ ____ _____