更新查物品、列表、技能

This commit is contained in:
milimoe 2024-11-12 00:52:51 +08:00
parent 7a7218f062
commit 1813dca1fa
Signed by: milimoe
GPG Key ID: 05D280912DA6C69E
5 changed files with 19 additions and 32 deletions

View File

@ -437,7 +437,7 @@ namespace Oshima.Core.Controllers
[HttpGet("cwp")]
public string GetItemInfo([FromQuery] long? id = null)
{
IEnumerable<Item> items = FunGameSimulation.Items;
IEnumerable<Item> items = FunGameSimulation.Equipment;
if (id != null)
{
List<string> msg = [];
@ -445,7 +445,7 @@ namespace Oshima.Core.Controllers
if (i != null)
{
i.SetLevel(1);
msg.Add(i.ToString());
msg.Add(i.ToString(false, true));
}
return NetworkUtility.JsonSerialize(string.Join("\r\n\r\n", msg));

View File

@ -15,6 +15,7 @@ namespace Oshima.Core.Utils
public static List<Character> Characters { get; } = [];
public static List<Skill> Skills { get; } = [];
public static List<Skill> Magics { get; } = [];
public static List<Item> Equipment { get; } = [];
public static List<Item> Items { get; } = [];
public static Dictionary<Character, CharacterStatistics> CharacterStatistics { get; } = [];
public static Dictionary<Character, CharacterStatistics> TeamCharacterStatistics { get; } = [];
@ -502,7 +503,7 @@ namespace Oshima.Core.Utils
if (roundMsg != "")
{
if (isWeb)
if ((isTeam && deathMatchRoundDetail || !isTeam) && isWeb)
{
roundMsg += "\r\n" + Msg;
}
@ -727,10 +728,10 @@ namespace Oshima.Core.Utils
WriteLine($"社区送温暖了,现在随机发放空投!!");
foreach (Character character in queue.Queue)
{
Item[] = Items.Where(i => i.Id.ToString().StartsWith("11") && (int)i.QualityType == wQuality).ToArray();
Item[] = Items.Where(i => i.Id.ToString().StartsWith("12") && (int)i.QualityType == aQuality).ToArray();
Item[] = Items.Where(i => i.Id.ToString().StartsWith("13") && (int)i.QualityType == sQuality).ToArray();
Item[] = Items.Where(i => i.Id.ToString().StartsWith("14") && (int)i.QualityType == acQuality).ToArray();
Item[] = Equipment.Where(i => i.Id.ToString().StartsWith("11") && (int)i.QualityType == wQuality).ToArray();
Item[] = Equipment.Where(i => i.Id.ToString().StartsWith("12") && (int)i.QualityType == aQuality).ToArray();
Item[] = Equipment.Where(i => i.Id.ToString().StartsWith("13") && (int)i.QualityType == sQuality).ToArray();
Item[] = Equipment.Where(i => i.Id.ToString().StartsWith("14") && (int)i.QualityType == acQuality).ToArray();
Item? a = null, b = null, c = null, d = null;
if (.Length > 0)
{
@ -808,8 +809,10 @@ namespace Oshima.Core.Utils
}
Dictionary<string, Item> exItems = Factory.GetGameModuleInstances<Item>(OshimaGameModuleConstant.General, OshimaGameModuleConstant.Item);
Items.AddRange(exItems.Values);
Items.AddRange([new 10(), new 30(), new 50()]);
Equipment.AddRange(exItems.Values.Where(i => (int)i.ItemType >= 0 && (int)i.ItemType < 5));
Equipment.AddRange([new 10(), new 30(), new 50()]);
Items.AddRange(exItems.Values.Where(i => (int)i.ItemType > 4));
Skills.AddRange([new ()]);
@ -821,7 +824,7 @@ namespace Oshima.Core.Utils
Characters.Clear();
CharacterStatistics.Clear();
TeamCharacterStatistics.Clear();
Items.Clear();
Equipment.Clear();
Skills.Clear();
Magics.Clear();

View File

@ -43,7 +43,7 @@ namespace Oshima.FunGame.OshimaModules.Effects.OpenEffects
break;
case MagicType.None:
default:
character.MDF.SetAllValue(, false);
character.MDF.AddAllValue();
break;
}
}
@ -78,7 +78,7 @@ namespace Oshima.FunGame.OshimaModules.Effects.OpenEffects
break;
case MagicType.None:
default:
character.MDF.SetAllValue(-, false);
character.MDF.AddAllValue(-);
break;
}
}

View File

@ -52,29 +52,13 @@ namespace Oshima.FunGame.OshimaModules.Skills
{
= true;
character.ExEvadeRate += ;
character.MDF.None += ;
character.MDF.Particle += ;
character.MDF.Fleabane += ;
character.MDF.Element += ;
character.MDF.Shadow += ;
character.MDF.Bright += ;
character.MDF.PurityContemporary += ;
character.MDF.PurityNatural += ;
character.MDF.Starmark += ;
character.MDF.AddAllValue();
}
else
{
= false;
character.ExEvadeRate -= ;
character.MDF.None -= ;
character.MDF.Particle -= ;
character.MDF.Fleabane -= ;
character.MDF.Element -= ;
character.MDF.Shadow -= ;
character.MDF.Bright -= ;
character.MDF.PurityContemporary -= ;
character.MDF.PurityNatural -= ;
character.MDF.Starmark -= ;
character.MDF.AddAllValue(-);
}
}

View File

@ -41,7 +41,7 @@ namespace Oshima.FunGame.OshimaModules.Skills
= ;
= ;
character.ExPDR += ;
character.MDF.SetAllValue(, false);
character.MDF.AddAllValue();
WriteLine($"[ {character} ] 提升了 {实际物理伤害减免 * 100:0.##}% 物理伤害减免,{实际魔法抗性 * 100:0.##}% 魔法抗性!!");
}
@ -49,7 +49,7 @@ namespace Oshima.FunGame.OshimaModules.Skills
{
character.NormalAttack.SetMagicType(false, character.MagicType);
character.ExPDR -= ;
character.MDF.SetAllValue(-, false);
character.MDF.AddAllValue(-);
= 0;
= 0;
}