mirror of
https://github.com/oshima-studios/OshimaGameModule.git
synced 2026-03-05 22:20:28 +00:00
修复问题和添加测试
This commit is contained in:
parent
3e2f753499
commit
d99bf28600
@ -56,7 +56,10 @@ namespace Oshima.FunGame.OshimaModules.Effects.PassiveEffects
|
||||
forceAction = true;
|
||||
if (_targetCharacter.HP > 0)
|
||||
{
|
||||
return CharacterActionType.NormalAttack;
|
||||
pNormalAttack = 1;
|
||||
canUseItem = false;
|
||||
canCastSkill = false;
|
||||
return CharacterActionType.None;
|
||||
}
|
||||
// 如果目标已死亡,则放弃本回合行动,并在回合结束后自动移除愤怒状态
|
||||
RemainDuration = 0;
|
||||
|
||||
@ -125,7 +125,8 @@ namespace Oshima.FunGame.OshimaModules.Skills
|
||||
{ "熵核", 熵核描述 },
|
||||
{ "守护", 守护描述 }
|
||||
},
|
||||
DefaultChoice = Random.Shared.Next() % 2 == 0 ? "熵核" : "守护"
|
||||
DefaultChoice = Random.Shared.Next() % 2 == 0 ? "熵核" : "守护",
|
||||
CanCancel = false
|
||||
});
|
||||
if (response.Choices.Count > 0)
|
||||
{
|
||||
|
||||
@ -1,3 +1,4 @@
|
||||
using System.Collections.Concurrent;
|
||||
using System.Text;
|
||||
using Milimoe.FunGame.Core.Api.Transmittal;
|
||||
using Milimoe.FunGame.Core.Api.Utility;
|
||||
@ -18,15 +19,15 @@ namespace Oshima.FunGame.OshimaServers.Service
|
||||
{
|
||||
public class FunGameService
|
||||
{
|
||||
public static Dictionary<long, List<string>> UserExploreCharacterCache { get; } = [];
|
||||
public static Dictionary<long, List<string>> UserExploreItemCache { get; } = [];
|
||||
public static Dictionary<long, List<string>> UserExploreEventCache { get; } = [];
|
||||
public static ConcurrentDictionary<long, List<string>> UserExploreCharacterCache { get; } = [];
|
||||
public static ConcurrentDictionary<long, List<string>> UserExploreItemCache { get; } = [];
|
||||
public static ConcurrentDictionary<long, List<string>> UserExploreEventCache { get; } = [];
|
||||
public static HashSet<Activity> Activities { get; } = [];
|
||||
public static List<string> ActivitiesCharacterCache { get; } = [];
|
||||
public static List<string> ActivitiesItemCache { get; } = [];
|
||||
public static List<string> ActivitiesEventCache { get; } = [];
|
||||
public static Dictionary<long, HashSet<string>> UserNotice { get; } = [];
|
||||
public static Dictionary<int, Character> Bosses { get; } = [];
|
||||
public static ConcurrentDictionary<long, HashSet<string>> UserNotice { get; } = [];
|
||||
public static ConcurrentDictionary<int, Character> Bosses { get; } = [];
|
||||
public static ServerPluginLoader? ServerPluginLoader { get; set; } = null;
|
||||
public static WebAPIPluginLoader? WebAPIPluginLoader { get; set; } = null;
|
||||
public static EntityModuleConfig<NoticeModel> Notices { get; } = new("notices", "notice");
|
||||
|
||||
@ -4131,7 +4131,7 @@ namespace Oshima.FunGame.WebAPI.Controllers
|
||||
|
||||
if (boss2.HP <= 0)
|
||||
{
|
||||
FunGameService.Bosses.Remove(bossIndex);
|
||||
FunGameService.Bosses.Remove(bossIndex, out _);
|
||||
double gained = boss.Level;
|
||||
user.Inventory.Materials += gained;
|
||||
msgs.Add($"恭喜你击败了 Boss,获得 {gained:0.##} {General.GameplayEquilibriumConstant.InGameMaterial}奖励!");
|
||||
@ -4401,7 +4401,7 @@ namespace Oshima.FunGame.WebAPI.Controllers
|
||||
|
||||
if (boss2.HP <= 0)
|
||||
{
|
||||
FunGameService.Bosses.Remove(bossIndex);
|
||||
FunGameService.Bosses.Remove(bossIndex, out _);
|
||||
double gained = boss.Level;
|
||||
user.Inventory.Materials += gained;
|
||||
msgs.Add($"恭喜你击败了 Boss,获得 {gained:0.##} {General.GameplayEquilibriumConstant.InGameMaterial}奖励!");
|
||||
|
||||
@ -47,7 +47,7 @@ namespace Oshima.FunGame.WebAPI.Services
|
||||
}
|
||||
if (msg.UseNotice && msg.FunGameUID > 0 && FunGameService.UserNotice.TryGetValue(msg.FunGameUID, out HashSet<string>? msgs) && msgs != null)
|
||||
{
|
||||
FunGameService.UserNotice.Remove(msg.FunGameUID);
|
||||
FunGameService.UserNotice.Remove(msg.FunGameUID, out _);
|
||||
await SendAsync(msg, "离线未读信箱", $"☆--- 离线未读信箱 ---☆\r\n{string.Join("\r\n", msgs)}", msgType, null, 5);
|
||||
}
|
||||
}
|
||||
|
||||
Loading…
x
Reference in New Issue
Block a user