diff --git a/OshimaCore/Controllers/FunGameController.cs b/OshimaCore/Controllers/FunGameController.cs index 200fe04..114a15d 100644 --- a/OshimaCore/Controllers/FunGameController.cs +++ b/OshimaCore/Controllers/FunGameController.cs @@ -60,6 +60,7 @@ namespace Oshima.Core.Controllers builder.AppendLine($"总计冠军数:{stats.Wins}"); builder.AppendLine($"总计前三数:{stats.Top3s}"); builder.AppendLine($"总计败场数:{stats.Loses}"); + builder.AppendLine($"MVP次数:{stats.MVPs}"); List names = [.. FunGameSimulation.CharacterStatistics.OrderByDescending(kv => kv.Value.Winrates).Select(kv => kv.Key.GetName())]; builder.AppendLine($"胜率:{stats.Winrates * 100:0.##}%(#{names.IndexOf(character.GetName()) + 1})"); @@ -111,6 +112,7 @@ namespace Oshima.Core.Controllers builder.AppendLine($"总计参赛数:{stats.Plays}"); builder.AppendLine($"总计冠军数:{stats.Wins}"); builder.AppendLine($"总计败场数:{stats.Loses}"); + builder.AppendLine($"MVP次数:{stats.MVPs}"); List names = [.. FunGameSimulation.TeamCharacterStatistics.OrderByDescending(kv => kv.Value.Winrates).Select(kv => kv.Key.GetName())]; builder.AppendLine($"胜率:{stats.Winrates * 100:0.##}%(#{names.IndexOf(character.GetName()) + 1})"); @@ -140,6 +142,7 @@ namespace Oshima.Core.Controllers builder.AppendLine($"总计冠军数:{stats.Wins}"); builder.AppendLine($"胜率:{stats.Winrates * 100:0.##}%"); builder.AppendLine($"技术得分:{stats.Rating:0.0#}"); + builder.AppendLine($"MVP次数:{stats.MVPs}"); strings.Add(builder.ToString()); } return NetworkUtility.JsonSerialize(strings); @@ -159,6 +162,7 @@ namespace Oshima.Core.Controllers builder.AppendLine($"前三率:{stats.Top3rates * 100:0.##}%"); builder.AppendLine($"技术得分:{stats.Rating:0.0#}"); builder.AppendLine($"上次排名:{stats.LastRank} / 场均名次:{stats.AvgRank:0.##}"); + builder.AppendLine($"MVP次数:{stats.MVPs}"); strings.Add(builder.ToString()); } return NetworkUtility.JsonSerialize(strings); @@ -182,6 +186,7 @@ namespace Oshima.Core.Controllers builder.AppendLine($"总计冠军数:{stats.Wins}"); builder.AppendLine($"胜率:{stats.Winrates * 100:0.##}%"); builder.AppendLine($"技术得分:{stats.Rating:0.0#}"); + builder.AppendLine($"MVP次数:{stats.MVPs}"); strings.Add(builder.ToString()); } return NetworkUtility.JsonSerialize(strings); @@ -201,6 +206,7 @@ namespace Oshima.Core.Controllers builder.AppendLine($"前三率:{stats.Top3rates * 100:0.##}%"); builder.AppendLine($"技术得分:{stats.Rating:0.0#}"); builder.AppendLine($"上次排名:{stats.LastRank} / 场均名次:{stats.AvgRank:0.##}"); + builder.AppendLine($"MVP次数:{stats.MVPs}"); strings.Add(builder.ToString()); } return NetworkUtility.JsonSerialize(strings); @@ -401,6 +407,49 @@ namespace Oshima.Core.Controllers return NetworkUtility.JsonSerialize(""); } + [HttpGet("cjn")] + public string GetSkillInfo([FromQuery] long? id = null) + { + IEnumerable skills = FunGameSimulation.Skills.Union(FunGameSimulation.Magics); + if (id != null && FunGameSimulation.Characters.Count > 1) + { + List msg = []; + Character c = FunGameSimulation.Characters[1].Copy(); + Skill? s = skills.Where(s => s.Id == id).FirstOrDefault()?.Copy(); + if (s != null) + { + s.Character = c; + msg.Add($"技能展示的属性基于演示角色:[ {c} ]"); + msg.Add(s.Description); + s.Level++; ; + msg.Add(s.Description); + s.Level = s.IsMagic ? General.GameplayEquilibriumConstant.MaxMagicLevel : General.GameplayEquilibriumConstant.MaxSkillLevel; + msg.Add(s.Description); + } + + return NetworkUtility.JsonSerialize(string.Join("\r\n\r\n", msg)); + } + return NetworkUtility.JsonSerialize(""); + } + + [HttpGet("cwp")] + public string GetItemInfo([FromQuery] long? id = null) + { + IEnumerable items = FunGameSimulation.Items; + if (id != null) + { + List msg = []; + Item? i = items.Where(i => i.Id == id).FirstOrDefault()?.Copy(); + if (i != null) + { + msg.Add(i.Description); + } + + return NetworkUtility.JsonSerialize(string.Join("\r\n\r\n", msg)); + } + return NetworkUtility.JsonSerialize(""); + } + [HttpPost("post")] public string PostName([FromBody] string name) { diff --git a/OshimaCore/Utils/FunGameUtil.cs b/OshimaCore/Utils/FunGameUtil.cs index d2a0abc..7d5467b 100644 --- a/OshimaCore/Utils/FunGameUtil.cs +++ b/OshimaCore/Utils/FunGameUtil.cs @@ -4,6 +4,7 @@ using Milimoe.FunGame.Core.Entity; using Milimoe.FunGame.Core.Model; using Oshima.FunGame.OshimaModules; using Oshima.FunGame.OshimaModules.Characters; +using Oshima.FunGame.OshimaModules.Effects.OpenEffects; using Oshima.FunGame.OshimaModules.Items; using Oshima.FunGame.OshimaModules.Skills; @@ -369,6 +370,10 @@ namespace Oshima.Core.Utils // 鎬诲洖鍚堟暟 int maxRound = isTeam ? 9999 : 999; + + // 闅忔満鍥炲悎濂栧姳 + Dictionary> roundRewards = GenerateRoundRewards(maxRound); + int i = 1; while (i < maxRound) { @@ -408,10 +413,54 @@ namespace Oshima.Core.Utils // 澶勭悊鍥炲悎 if (characterToAct != null) { + // 鑾峰彇鍥炲悎濂栧姳 + List skillRewards = []; + if (roundRewards.TryGetValue(i, out List? effectList) && effectList != null) + { + skillRewards = new(effectList); + } + WriteLine($"=== Round {i++} ==="); WriteLine("鐜板湪鏄 [ " + characterToAct + (isTeam ? "锛" + (actionQueue.GetTeam(characterToAct)?.Name ?? "") + "锛" : "") + " ] 鐨勫洖鍚堬紒"); + // 瀹為檯鐨勫洖鍚堝鍔 + List realSkillRewards = []; + if (skillRewards.Count > 0) + { + foreach (Skill skill in skillRewards) + { + Dictionary args = new() + { + { "skill", skill }, + { "values", skill.Values } + }; + skill.GamingQueue = actionQueue; + skill.Effects.Add(Factory.OpenFactory.GetInstance(skill.Id, "鍥炲悎濂栧姳", args)); + skill.Character = characterToAct; + skill.Level = 1; + characterToAct.Skills.Add(skill); + realSkillRewards.Add(skill); + } + string msg = $"[ {characterToAct} ] 鑾峰緱浜嗗洖鍚堝鍔憋紒{string.Join(" / ", realSkillRewards.Select(s => s.Description))}"; + WriteLine(msg.Trim()); + } + bool isGameEnd = actionQueue.ProcessTurn(characterToAct); + + if (realSkillRewards.Count > 0) + { + foreach (Skill skill in realSkillRewards) + { + foreach (Effect e in skill.Effects) + { + e.OnEffectLost(characterToAct); + characterToAct.Effects.Remove(e); + } + characterToAct.Skills.Remove(skill); + skill.Character = null; + } + } + if (isGameEnd) { result.Add(Msg); @@ -500,6 +549,7 @@ namespace Oshima.Core.Utils if (character != null) { CharacterStatistics stats = actionQueue.CharacterStatistics[character]; + stats.MVPs++; StringBuilder builder = new(); builder.AppendLine($"{(isWeb ? count + "." : (isTeam ? "[ " + actionQueue.GetTeamFromEliminated(character)?.Name + " ]" ?? "" : ""))} [ {character.ToStringWithLevel()} ]"); builder.AppendLine($"鎶鏈緱鍒嗭細{stats.Rating:0.##} / 鍑绘潃鏁帮細{stats.Kills} / 鍔╂敾鏁帮細{stats.Assists}{(actionQueue.MaxRespawnTimes != 0 ? " / 姝讳骸鏁帮細" + stats.Deaths : "")}"); @@ -755,6 +805,63 @@ namespace Oshima.Core.Utils Magics.AddRange([new 鍐伴湝鏀诲嚮(), new 鐏箣鐭(), new 姘翠箣鐭(), new 椋庝箣杞(), new 鐭充箣閿(), new 蹇冪伒涔嬮湠(), new 娆″厓涓婂崌(), new 鏆楃墿璐(), new 鍥炲鏈(), new 娌绘剤鏈()]); } + public static Dictionary> GenerateRoundRewards(int maxRound) + { + Dictionary> roundRewards = []; + + // 璁惧畾浜х敓鐨勫洖鍚堝鍔 + Dictionary> rewards = new() + { + { + EffectID.ExATK, + new() + { + { "exatk", "60" } + } + }, + { + EffectID.ExCritRate, + new() + { + { "excr", "0.5" } + } + }, + { + EffectID.ExCritDMG, + new() + { + { "excrd", "1" } + } + }, + { + EffectID.ExATK2, + new() + { + { "exatk", "0.3" } + } + } + }; + + int currentRound = 1; + while (currentRound <= maxRound) + { + currentRound += Random.Shared.Next(1, 9); + + if (currentRound <= maxRound) + { + List skills = []; + + // 娣诲姞鍥炲悎濂栧姳鐗规晥 + EffectID effectID = rewards.Keys.ToArray()[Random.Shared.Next(rewards.Count)]; + skills.Add(Factory.OpenFactory.GetInstance((long)effectID, "", rewards[effectID])); + + roundRewards[currentRound] = skills; + } + } + + return roundRewards; + } + public static void UpdateStatistics(CharacterStatistics totalStats, CharacterStatistics stats) { // 缁熻姝よ鑹茬殑鎵鏈夋暟鎹 @@ -786,6 +893,7 @@ namespace Oshima.Core.Utils totalStats.Wins += stats.Wins; totalStats.Top3s += stats.Top3s; totalStats.Loses += stats.Loses; + totalStats.MVPs += stats.MVPs; if (totalStats.Plays != 0) { totalStats.AvgDamage = Calculation.Round2Digits(totalStats.TotalDamage / totalStats.Plays); diff --git a/OshimaModules/Effects/SkillEffects/鐪╂檿.cs b/OshimaModules/Effects/PassiveEffects/鐪╂檿.cs similarity index 96% rename from OshimaModules/Effects/SkillEffects/鐪╂檿.cs rename to OshimaModules/Effects/PassiveEffects/鐪╂檿.cs index 093dce5..f7c82af 100644 --- a/OshimaModules/Effects/SkillEffects/鐪╂檿.cs +++ b/OshimaModules/Effects/PassiveEffects/鐪╂檿.cs @@ -1,7 +1,7 @@ 锘縰sing Milimoe.FunGame.Core.Entity; using Milimoe.FunGame.Core.Library.Constant; -namespace Oshima.FunGame.OshimaModules.Effects.SkillEffects +namespace Oshima.FunGame.OshimaModules.Effects.PassiveEffects { public class 鐪╂檿 : Effect { diff --git a/OshimaModules/Effects/SkillEffects/绱Н涔嬪帇鏍囪.cs b/OshimaModules/Effects/PassiveEffects/绱Н涔嬪帇鏍囪.cs similarity index 93% rename from OshimaModules/Effects/SkillEffects/绱Н涔嬪帇鏍囪.cs rename to OshimaModules/Effects/PassiveEffects/绱Н涔嬪帇鏍囪.cs index 93e9f69..2cd1005 100644 --- a/OshimaModules/Effects/SkillEffects/绱Н涔嬪帇鏍囪.cs +++ b/OshimaModules/Effects/PassiveEffects/绱Н涔嬪帇鏍囪.cs @@ -1,7 +1,7 @@ 锘縰sing Milimoe.FunGame.Core.Entity; using Milimoe.FunGame.Core.Library.Constant; -namespace Oshima.FunGame.OshimaModules.Effects.SkillEffects +namespace Oshima.FunGame.OshimaModules.Effects.PassiveEffects { public class 绱Н涔嬪帇鏍囪 : Effect { diff --git a/OshimaModules/Effects/SkillEffects/鍩轰簬灞炴х殑浼ゅ.cs b/OshimaModules/Effects/SkillEffects/鍩轰簬灞炴х殑浼ゅ.cs index a6befdb..4d82239 100644 --- a/OshimaModules/Effects/SkillEffects/鍩轰簬灞炴х殑浼ゅ.cs +++ b/OshimaModules/Effects/SkillEffects/鍩轰簬灞炴х殑浼ゅ.cs @@ -9,7 +9,6 @@ namespace Oshima.FunGame.OshimaModules.Effects.SkillEffects public override string Name => Skill.Name; public override string Description => $"瀵圭洰鏍噞(TargetCount > 1 ? $"鑷冲 {TargetCount} 涓" : "")}鏁屼汉閫犳垚 {BaseDamage:0.##} + {AttributeCoefficient * 100:0.##}% {CharacterSet.GetPrimaryAttributeName(鍩轰簬灞炴)} [ {Damage:0.##} ] 鐐箋(IsMagic ? CharacterSet.GetMagicDamageName(MagicType) : "鐗╃悊浼ゅ")}銆"; public override bool TargetSelf => false; - public override int TargetCount { get; set; } = 1; private double BaseDamage => Skill.Level > 0 ? 鍩虹鏁板间激瀹 + 鍩虹浼ゅ绛夌骇鎴愰暱 * (Skill.Level - 1) : 鍩虹鏁板间激瀹; private double AttributeCoefficient => Skill.Level > 0 ? 鍩虹灞炴х郴鏁 + 鍩虹绯绘暟绛夌骇鎴愰暱 * (Skill.Level - 1) : 鍩虹灞炴х郴鏁; private double Damage @@ -37,7 +36,7 @@ namespace Oshima.FunGame.OshimaModules.Effects.SkillEffects private double 鍩虹绯绘暟绛夌骇鎴愰暱 { get; set; } = 0.4; private bool IsMagic { get; set; } = true; - public 鍩轰簬灞炴х殑浼ゅ(Skill skill, PrimaryAttribute 鍩轰簬灞炴, double 鍩虹鏁板间激瀹, double 鍩虹浼ゅ绛夌骇鎴愰暱, double 鍩虹灞炴х郴鏁, double 鍩虹绯绘暟绛夌骇鎴愰暱, bool isMagic = true, MagicType magicType = MagicType.None, int targetCount = 1) : base(skill) + public 鍩轰簬灞炴х殑浼ゅ(Skill skill, PrimaryAttribute 鍩轰簬灞炴, double 鍩虹鏁板间激瀹, double 鍩虹浼ゅ绛夌骇鎴愰暱, double 鍩虹灞炴х郴鏁, double 鍩虹绯绘暟绛夌骇鎴愰暱, bool isMagic = true, MagicType magicType = MagicType.None) : base(skill) { GamingQueue = skill.GamingQueue; this.鍩轰簬灞炴 = 鍩轰簬灞炴; @@ -47,7 +46,6 @@ namespace Oshima.FunGame.OshimaModules.Effects.SkillEffects this.鍩虹绯绘暟绛夌骇鎴愰暱 = 鍩虹绯绘暟绛夌骇鎴愰暱; IsMagic = isMagic; MagicType = magicType; - TargetCount = targetCount; } public override void OnSkillCasted(Character caster, List targets, Dictionary others) diff --git a/OshimaModules/Effects/SkillEffects/鍩轰簬鏀诲嚮鍔涚殑浼ゅ_甯﹀熀纭浼ゅ.cs b/OshimaModules/Effects/SkillEffects/鍩轰簬鏀诲嚮鍔涚殑浼ゅ_甯﹀熀纭浼ゅ.cs index f4abbfd..d71a216 100644 --- a/OshimaModules/Effects/SkillEffects/鍩轰簬鏀诲嚮鍔涚殑浼ゅ_甯﹀熀纭浼ゅ.cs +++ b/OshimaModules/Effects/SkillEffects/鍩轰簬鏀诲嚮鍔涚殑浼ゅ_甯﹀熀纭浼ゅ.cs @@ -9,7 +9,6 @@ namespace Oshima.FunGame.OshimaModules.Effects.SkillEffects public override string Name => Skill.Name; public override string Description => $"瀵圭洰鏍噞(TargetCount > 1 ? $"鑷冲 {TargetCount} 涓" : "")}鏁屼汉閫犳垚 {BaseDamage:0.##} + {ATKCoefficient * 100:0.##}% 鏀诲嚮鍔 [ {Damage:0.##} ] 鐐箋(IsMagic ? CharacterSet.GetMagicDamageName(MagicType) : "鐗╃悊浼ゅ")}銆"; public override bool TargetSelf => false; - public override int TargetCount { get; set; } = 1; private double BaseDamage => Skill.Level > 0 ? 鍩虹鏁板间激瀹 + 鍩虹浼ゅ绛夌骇鎴愰暱 * (Skill.Level - 1) : 鍩虹鏁板间激瀹; private double ATKCoefficient => Skill.Level > 0 ? 鍩虹鏀诲嚮鍔涚郴鏁 + 鍩虹绯绘暟绛夌骇鎴愰暱 * (Skill.Level - 1) : 鍩虹鏀诲嚮鍔涚郴鏁; private double Damage => BaseDamage + (ATKCoefficient * Skill.Character?.ATK ?? 0); @@ -20,7 +19,7 @@ namespace Oshima.FunGame.OshimaModules.Effects.SkillEffects private double 鍩虹绯绘暟绛夌骇鎴愰暱 { get; set; } = 0.2; private bool IsMagic { get; set; } = true; - public 鍩轰簬鏀诲嚮鍔涚殑浼ゅ_甯﹀熀纭浼ゅ(Skill skill, double 鍩虹鏁板间激瀹, double 鍩虹浼ゅ绛夌骇鎴愰暱, double 鍩虹鏀诲嚮鍔涚郴鏁, double 鍩虹绯绘暟绛夌骇鎴愰暱, bool isMagic = true, MagicType magicType = MagicType.None, int targetCount = 1) : base(skill) + public 鍩轰簬鏀诲嚮鍔涚殑浼ゅ_甯﹀熀纭浼ゅ(Skill skill, double 鍩虹鏁板间激瀹, double 鍩虹浼ゅ绛夌骇鎴愰暱, double 鍩虹鏀诲嚮鍔涚郴鏁, double 鍩虹绯绘暟绛夌骇鎴愰暱, bool isMagic = true, MagicType magicType = MagicType.None) : base(skill) { GamingQueue = skill.GamingQueue; this.鍩虹鏁板间激瀹 = 鍩虹鏁板间激瀹; @@ -29,7 +28,6 @@ namespace Oshima.FunGame.OshimaModules.Effects.SkillEffects this.鍩虹绯绘暟绛夌骇鎴愰暱 = 鍩虹绯绘暟绛夌骇鎴愰暱; IsMagic = isMagic; MagicType = magicType; - TargetCount = targetCount; } public override void OnSkillCasted(Character caster, List targets, Dictionary others) diff --git a/OshimaModules/Effects/SkillEffects/鍩轰簬鏀诲嚮鍔涚殑浼ゅ_鏃犲熀纭浼ゅ.cs b/OshimaModules/Effects/SkillEffects/鍩轰簬鏀诲嚮鍔涚殑浼ゅ_鏃犲熀纭浼ゅ.cs index f16d6d3..780ca1e 100644 --- a/OshimaModules/Effects/SkillEffects/鍩轰簬鏀诲嚮鍔涚殑浼ゅ_鏃犲熀纭浼ゅ.cs +++ b/OshimaModules/Effects/SkillEffects/鍩轰簬鏀诲嚮鍔涚殑浼ゅ_鏃犲熀纭浼ゅ.cs @@ -9,7 +9,6 @@ namespace Oshima.FunGame.OshimaModules.Effects.SkillEffects public override string Name => Skill.Name; public override string Description => $"瀵圭洰鏍噞(TargetCount > 1 ? $"鑷冲 {TargetCount} 涓" : "")}鏁屼汉閫犳垚 {ATKCoefficient * 100:0.##}% 鏀诲嚮鍔 [ {Damage:0.##} ] 鐐箋(IsMagic ? CharacterSet.GetMagicDamageName(MagicType) : "鐗╃悊浼ゅ")}銆"; public override bool TargetSelf => false; - public override int TargetCount { get; set; } = 1; private double ATKCoefficient => Skill.Level > 0 ? 鍩虹鏀诲嚮鍔涚郴鏁 + 鍩虹绯绘暟绛夌骇鎴愰暱 * (Skill.Level - 1) : 鍩虹鏀诲嚮鍔涚郴鏁; private double Damage => ATKCoefficient * Skill.Character?.ATK ?? 0; @@ -17,14 +16,13 @@ namespace Oshima.FunGame.OshimaModules.Effects.SkillEffects private double 鍩虹绯绘暟绛夌骇鎴愰暱 { get; set; } = 0.25; private bool IsMagic { get; set; } = true; - public 鍩轰簬鏀诲嚮鍔涚殑浼ゅ_鏃犲熀纭浼ゅ(Skill skill, double 鍩虹鏀诲嚮鍔涚郴鏁, double 鍩虹绯绘暟绛夌骇鎴愰暱, bool isMagic = true, MagicType magicType = MagicType.None, int targetCount = 1) : base(skill) + public 鍩轰簬鏀诲嚮鍔涚殑浼ゅ_鏃犲熀纭浼ゅ(Skill skill, double 鍩虹鏀诲嚮鍔涚郴鏁, double 鍩虹绯绘暟绛夌骇鎴愰暱, bool isMagic = true, MagicType magicType = MagicType.None) : base(skill) { GamingQueue = skill.GamingQueue; this.鍩虹鏀诲嚮鍔涚郴鏁 = 鍩虹鏀诲嚮鍔涚郴鏁; this.鍩虹绯绘暟绛夌骇鎴愰暱 = 鍩虹绯绘暟绛夌骇鎴愰暱; IsMagic = isMagic; MagicType = magicType; - TargetCount = targetCount; } public override void OnSkillCasted(Character caster, List targets, Dictionary others) diff --git a/OshimaModules/Effects/SkillEffects/鍩轰簬鏍稿績灞炴х殑浼ゅ.cs b/OshimaModules/Effects/SkillEffects/鍩轰簬鏍稿績灞炴х殑浼ゅ.cs index aeab2e2..fa52e38 100644 --- a/OshimaModules/Effects/SkillEffects/鍩轰簬鏍稿績灞炴х殑浼ゅ.cs +++ b/OshimaModules/Effects/SkillEffects/鍩轰簬鏍稿績灞炴х殑浼ゅ.cs @@ -9,7 +9,6 @@ namespace Oshima.FunGame.OshimaModules.Effects.SkillEffects public override string Name => Skill.Name; public override string Description => $"瀵圭洰鏍噞(TargetCount > 1 ? $"鑷冲 {TargetCount} 涓" : "")}鏁屼汉閫犳垚 {BaseDamage:0.##} + {AttributeCoefficient * 100:0.##}% {CharacterSet.GetPrimaryAttributeName(Skill.Character?.PrimaryAttribute ?? PrimaryAttribute.INT)} [ {Damage:0.##} ] 鐐箋(IsMagic ? CharacterSet.GetMagicDamageName(MagicType) : "鐗╃悊浼ゅ")}銆"; public override bool TargetSelf => false; - public override int TargetCount { get; set; } = 1; private double BaseDamage => Skill.Level > 0 ? 鍩虹鏁板间激瀹 + 鍩虹浼ゅ绛夌骇鎴愰暱 * (Skill.Level - 1) : 鍩虹鏁板间激瀹; private double AttributeCoefficient => Skill.Level > 0 ? 鍩虹灞炴х郴鏁 + 鍩虹绯绘暟绛夌骇鎴愰暱 * (Skill.Level - 1) : 鍩虹灞炴х郴鏁; private double Damage => BaseDamage + (AttributeCoefficient * Skill.Character?.PrimaryAttributeValue ?? 0); @@ -20,7 +19,7 @@ namespace Oshima.FunGame.OshimaModules.Effects.SkillEffects private double 鍩虹绯绘暟绛夌骇鎴愰暱 { get; set; } = 0.4; private bool IsMagic { get; set; } = true; - public 鍩轰簬鏍稿績灞炴х殑浼ゅ(Skill skill, double 鍩虹鏁板间激瀹, double 鍩虹浼ゅ绛夌骇鎴愰暱, double 鍩虹灞炴х郴鏁, double 鍩虹绯绘暟绛夌骇鎴愰暱, bool isMagic = true, MagicType magicType = MagicType.None, int targetCount = 1) : base(skill) + public 鍩轰簬鏍稿績灞炴х殑浼ゅ(Skill skill, double 鍩虹鏁板间激瀹, double 鍩虹浼ゅ绛夌骇鎴愰暱, double 鍩虹灞炴х郴鏁, double 鍩虹绯绘暟绛夌骇鎴愰暱, bool isMagic = true, MagicType magicType = MagicType.None) : base(skill) { GamingQueue = skill.GamingQueue; this.鍩虹鏁板间激瀹 = 鍩虹鏁板间激瀹; @@ -29,7 +28,6 @@ namespace Oshima.FunGame.OshimaModules.Effects.SkillEffects this.鍩虹绯绘暟绛夌骇鎴愰暱 = 鍩虹绯绘暟绛夌骇鎴愰暱; IsMagic = isMagic; MagicType = magicType; - TargetCount = targetCount; } public override void OnSkillCasted(Character caster, List targets, Dictionary others) diff --git a/OshimaModules/Effects/SkillEffects/鐧惧垎姣斿洖澶嶇敓鍛藉.cs b/OshimaModules/Effects/SkillEffects/鐧惧垎姣斿洖澶嶇敓鍛藉.cs index 7330866..8bb6c39 100644 --- a/OshimaModules/Effects/SkillEffects/鐧惧垎姣斿洖澶嶇敓鍛藉.cs +++ b/OshimaModules/Effects/SkillEffects/鐧惧垎姣斿洖澶嶇敓鍛藉.cs @@ -6,22 +6,19 @@ namespace Oshima.FunGame.OshimaModules.Effects.SkillEffects { public override long Id => Skill.Id; public override string Name => Skill.Name; - public override string Description => $"涓簕(TargetCount > 1 ? $"鑷冲 {TargetCount} 涓" : "")}鐩爣鍥炲鍏舵渶澶х敓鍛藉 {鐧惧垎姣 * 100:0.##}% [ {Heal:0.##} ] 鐐圭敓鍛藉笺"; + public override string Description => $"涓簕(TargetCount > 1 ? $"鑷冲 {TargetCount} 涓" : "")}鐩爣鍥炲鍏舵渶澶х敓鍛藉 {鐧惧垎姣 * 100:0.##}% 鐐圭敓鍛藉笺"; public override bool TargetSelf => true; - public override int TargetCount { get; set; } = 1; - private double Heal => Skill.Level > 0 ? 鐧惧垎姣 * (Skill.Character?.MaxHP ?? 0) : 0; private double 鍩虹鍥炲 { get; set; } = 0.03; private double 鍥炲鎴愰暱 { get; set; } = 0.03; private double 鐧惧垎姣 => Skill.Level > 0 ? 鍩虹鍥炲 + 鍥炲鎴愰暱 * (Skill.Level - 1) : 鍩虹鍥炲; private bool CanRespawn { get; set; } = false; - public 鐧惧垎姣斿洖澶嶇敓鍛藉(Skill skill, double 鍩虹鍥炲, double 鍥炲鎴愰暱, int targetCount = 1, bool canRespawn = false) : base(skill) + public 鐧惧垎姣斿洖澶嶇敓鍛藉(Skill skill, double 鍩虹鍥炲, double 鍥炲鎴愰暱, bool canRespawn = false) : base(skill) { GamingQueue = skill.GamingQueue; this.鍩虹鍥炲 = 鍩虹鍥炲; this.鍥炲鎴愰暱 = 鍥炲鎴愰暱; - TargetCount = targetCount; CanRespawn = canRespawn; } @@ -29,7 +26,8 @@ namespace Oshima.FunGame.OshimaModules.Effects.SkillEffects { foreach (Character target in targets) { - HealToTarget(caster, target, Heal, CanRespawn); + double heal = 鐧惧垎姣 * target.MaxHP; + HealToTarget(caster, target, heal, CanRespawn); } } } diff --git a/OshimaModules/Effects/SkillEffects/绾暟鍊间激瀹.cs b/OshimaModules/Effects/SkillEffects/绾暟鍊间激瀹.cs index 34d3525..246c336 100644 --- a/OshimaModules/Effects/SkillEffects/绾暟鍊间激瀹.cs +++ b/OshimaModules/Effects/SkillEffects/绾暟鍊间激瀹.cs @@ -9,21 +9,19 @@ namespace Oshima.FunGame.OshimaModules.Effects.SkillEffects public override string Name => Skill.Name; public override string Description => $"瀵圭洰鏍噞(TargetCount > 1 ? $"鑷冲 {TargetCount} 涓" : "")}鏁屼汉閫犳垚 {Damage:0.##} 鐐箋(IsMagic ? CharacterSet.GetMagicDamageName(MagicType) : "鐗╃悊浼ゅ")}銆"; public override bool TargetSelf => false; - public override int TargetCount { get; set; } = 1; private double Damage => Skill.Level > 0 ? 鍩虹鏁板间激瀹 + 鍩虹浼ゅ绛夌骇鎴愰暱 * (Skill.Level - 1) : 鍩虹鏁板间激瀹; private double 鍩虹鏁板间激瀹 { get; set; } = 200; private double 鍩虹浼ゅ绛夌骇鎴愰暱 { get; set; } = 100; private bool IsMagic { get; set; } = true; - public 绾暟鍊间激瀹(Skill skill, double 鍩虹鏁板间激瀹, double 鍩虹浼ゅ绛夌骇鎴愰暱, bool isMagic = true, MagicType magicType = MagicType.None, int targetCount = 1) : base(skill) + public 绾暟鍊间激瀹(Skill skill, double 鍩虹鏁板间激瀹, double 鍩虹浼ゅ绛夌骇鎴愰暱, bool isMagic = true, MagicType magicType = MagicType.None) : base(skill) { GamingQueue = skill.GamingQueue; this.鍩虹鏁板间激瀹 = 鍩虹鏁板间激瀹; this.鍩虹浼ゅ绛夌骇鎴愰暱 = 鍩虹浼ゅ绛夌骇鎴愰暱; IsMagic = isMagic; MagicType = magicType; - TargetCount = targetCount; } public override void OnSkillCasted(Character caster, List targets, Dictionary others) diff --git a/OshimaModules/Effects/SkillEffects/绾暟鍊煎洖澶嶇敓鍛藉.cs b/OshimaModules/Effects/SkillEffects/绾暟鍊煎洖澶嶇敓鍛藉.cs index 59841f6..731a720 100644 --- a/OshimaModules/Effects/SkillEffects/绾暟鍊煎洖澶嶇敓鍛藉.cs +++ b/OshimaModules/Effects/SkillEffects/绾暟鍊煎洖澶嶇敓鍛藉.cs @@ -8,19 +8,17 @@ namespace Oshima.FunGame.OshimaModules.Effects.SkillEffects public override string Name => Skill.Name; public override string Description => $"涓簕(TargetCount > 1 ? $"鑷冲 {TargetCount} 涓" : "")}鐩爣鍥炲 {Heal:0.##} 鐐圭敓鍛藉笺"; public override bool TargetSelf => true; - public override int TargetCount { get; set; } = 1; private double Heal => Skill.Level > 0 ? 鍩虹鍥炲 + 鍥炲鎴愰暱 * (Skill.Level - 1) : 鍩虹鍥炲; private double 鍩虹鍥炲 { get; set; } = 100; private double 鍥炲鎴愰暱 { get; set; } = 30; private bool CanRespawn { get; set; } = false; - public 绾暟鍊煎洖澶嶇敓鍛(Skill skill, double 鍩虹鍥炲, double 鍥炲鎴愰暱, int targetCount = 1, bool canRespawn = false) : base(skill) + public 绾暟鍊煎洖澶嶇敓鍛(Skill skill, double 鍩虹鍥炲, double 鍥炲鎴愰暱, bool canRespawn = false) : base(skill) { GamingQueue = skill.GamingQueue; this.鍩虹鍥炲 = 鍩虹鍥炲; this.鍥炲鎴愰暱 = 鍥炲鎴愰暱; - TargetCount = targetCount; CanRespawn = canRespawn; } diff --git a/OshimaModules/Effects/SkillEffects/閫犳垚鐪╂檿.cs b/OshimaModules/Effects/SkillEffects/閫犳垚鐪╂檿.cs new file mode 100644 index 0000000..24194e0 --- /dev/null +++ b/OshimaModules/Effects/SkillEffects/閫犳垚鐪╂檿.cs @@ -0,0 +1,38 @@ +锘縰sing Milimoe.FunGame.Core.Entity; +using Oshima.FunGame.OshimaModules.Effects.PassiveEffects; + +namespace Oshima.FunGame.OshimaModules.Effects.SkillEffects +{ + public class 閫犳垚鐪╂檿 : Effect + { + public override long Id => Skill.Id; + public override string Name => Skill.Name; + public override string Description => $"瀵圭洰鏍噞(TargetCount > 1 ? $"鑷冲 {TargetCount} 涓" : "")}鏁屼汉閫犳垚鐪╂檿 {鐪╂檿鏃堕棿}銆"; + public override bool TargetSelf => false; + + private string 鐪╂檿鏃堕棿 => _durative && _duration > 0 ? _duration + " 鏃堕棿" : (!_durative && _durationTurn > 0 ? _durationTurn + " 鍥炲悎" : "0 鏃堕棿"); + private readonly bool _durative; + private readonly double _duration; + private readonly int _durationTurn; + + public 閫犳垚鐪╂檿(Skill skill, bool durative = false, double duration = 0, int durationTurn = 1) : base(skill) + { + GamingQueue = skill.GamingQueue; + _durative = durative; + _duration = duration; + _durationTurn = durationTurn; + } + + public override void OnSkillCasted(Character caster, List targets, Dictionary others) + { + foreach (Character enemy in targets) + { + WriteLine($"[ {caster} ] 鐪╂檿浜 [ {enemy} ] 锛佹寔缁椂闂达細{鐪╂檿鏃堕棿}锛"); + 鐪╂檿 e = new(Skill, caster, false, 0, 1); + enemy.Effects.Add(e); + e.OnEffectGained(enemy); + GamingQueue?.LastRound.Effects.TryAdd(enemy, e.EffectType); + } + } + } +} diff --git a/OshimaModules/Skills/ColdBlue/鍡滆鏈兘.cs b/OshimaModules/Skills/ColdBlue/鍡滆鏈兘.cs index 54d9213..809fe62 100644 --- a/OshimaModules/Skills/ColdBlue/鍡滆鏈兘.cs +++ b/OshimaModules/Skills/ColdBlue/鍡滆鏈兘.cs @@ -1,6 +1,6 @@ 锘縰sing Milimoe.FunGame.Core.Entity; using Milimoe.FunGame.Core.Library.Constant; -using Oshima.FunGame.OshimaModules.Effects.SkillEffects; +using Oshima.FunGame.OshimaModules.Effects.PassiveEffects; namespace Oshima.FunGame.OshimaModules.Skills { diff --git a/OshimaModules/Skills/ColdBlue/绱Н涔嬪帇.cs b/OshimaModules/Skills/ColdBlue/绱Н涔嬪帇.cs index 923ced8..77ae4a5 100644 --- a/OshimaModules/Skills/ColdBlue/绱Н涔嬪帇.cs +++ b/OshimaModules/Skills/ColdBlue/绱Н涔嬪帇.cs @@ -1,6 +1,6 @@ 锘縰sing Milimoe.FunGame.Core.Entity; using Milimoe.FunGame.Core.Library.Constant; -using Oshima.FunGame.OshimaModules.Effects.SkillEffects; +using Oshima.FunGame.OshimaModules.Effects.PassiveEffects; namespace Oshima.FunGame.OshimaModules.Skills { diff --git a/OshimaModules/Skills/QWQAQW/杩呮嵎涔嬪娍.cs b/OshimaModules/Skills/QWQAQW/杩呮嵎涔嬪娍.cs index 9d5f045..efbafa7 100644 --- a/OshimaModules/Skills/QWQAQW/杩呮嵎涔嬪娍.cs +++ b/OshimaModules/Skills/QWQAQW/杩呮嵎涔嬪娍.cs @@ -22,15 +22,15 @@ namespace Oshima.FunGame.OshimaModules.Skills { public override long Id => Skill.Id; public override string Name => Skill.Name; - public override string Description => $"{Duration:0.##} 鏃堕棿鍐咃紝鎻愬崌鑷韩 35% 鐗╃悊浼ゅ鍑忓厤鍜岄瓟娉曟姉鎬э紝鏅氭敾鍑昏浆涓洪瓟娉曚激瀹筹紝涓旂‖鐩存椂闂村噺灏 30%锛屽苟鍩轰簬 {鏅哄姏绯绘暟 * 100:0.##}% 鏅哄姏 [ {鏅哄姏鍔犳垚:0.##} ] 寮哄寲鏅氭敾鍑讳激瀹炽"; + public override string Description => $"{Duration:0.##} 鏃堕棿鍐咃紝鎻愬崌鑷韩 25% 鐗╃悊浼ゅ鍑忓厤鍜岄瓟娉曟姉鎬э紝鏅氭敾鍑昏浆涓洪瓟娉曚激瀹筹紝涓旂‖鐩存椂闂村噺灏 30%锛屽苟鍩轰簬 {鏅哄姏绯绘暟 * 100:0.##}% 鏅哄姏 [ {鏅哄姏鍔犳垚:0.##} ] 寮哄寲鏅氭敾鍑讳激瀹炽"; public override bool TargetSelf => true; public override bool Durative => true; public override double Duration => 40; private double 鏅哄姏绯绘暟 => 1.4 + 0.4 * (Level - 1); private double 鏅哄姏鍔犳垚 => 鏅哄姏绯绘暟 * Skill.Character?.INT ?? 0; - private double 鐗╃悊浼ゅ鍑忓厤 => 0.35; - private double 榄旀硶鎶楁 => 0.35; + private double 鐗╃悊浼ゅ鍑忓厤 => 0.25; + private double 榄旀硶鎶楁 => 0.25; private double 瀹為檯鐗╃悊浼ゅ鍑忓厤 = 0; private double 瀹為檯榄旀硶鎶楁 = 0; diff --git a/OshimaModules/Skills/QingXiang/鑳介噺姣佺伃.cs b/OshimaModules/Skills/QingXiang/鑳介噺姣佺伃.cs index dfb471e..aaa750c 100644 --- a/OshimaModules/Skills/QingXiang/鑳介噺姣佺伃.cs +++ b/OshimaModules/Skills/QingXiang/鑳介噺姣佺伃.cs @@ -11,7 +11,7 @@ namespace Oshima.FunGame.OshimaModules.Skills public override double EPCost => 100; public override double CD => 55 - 3 * (Level - 1); public override double HardnessTime { get; set; } = 25; - public override string Slogan => "鐏紒锛侊紒锛"; + public override string Slogan => "浠庢繁娓婂紩鐖嗗姏閲忥紝涓栫晫灏嗕负涔嬮ⅳ鎶栵紒锛侊紒锛"; public 鑳介噺姣佺伃(Character? character = null) : base(SkillType.SuperSkill, character) { diff --git a/OshimaModules/Skills/Yang/榄旀硶闇囪崱.cs b/OshimaModules/Skills/Yang/榄旀硶闇囪崱.cs index d80a765..403990e 100644 --- a/OshimaModules/Skills/Yang/榄旀硶闇囪崱.cs +++ b/OshimaModules/Skills/Yang/榄旀硶闇囪崱.cs @@ -1,6 +1,6 @@ 锘縰sing Milimoe.FunGame.Core.Entity; using Milimoe.FunGame.Core.Library.Constant; -using Oshima.FunGame.OshimaModules.Effects.SkillEffects; +using Oshima.FunGame.OshimaModules.Effects.PassiveEffects; namespace Oshima.FunGame.OshimaModules.Skills { diff --git a/OshimaModules/Skills/榄旀硶/鍥炲鏈.cs b/OshimaModules/Skills/榄旀硶/鍥炲鏈.cs index 5473ba0..b7894bc 100644 --- a/OshimaModules/Skills/榄旀硶/鍥炲鏈.cs +++ b/OshimaModules/Skills/榄旀硶/鍥炲鏈.cs @@ -9,8 +9,8 @@ namespace Oshima.FunGame.OshimaModules.Skills public override long Id => (long)MagicID.鍥炲鏈; public override string Name => "鍥炲鏈"; public override string Description => Effects.Count > 0 ? Effects.First().Description : ""; - public override double MPCost => Level > 0 ? 40 + (60 * (Level - 1)) : 40; - public override double CD => 35; + public override double MPCost => Level > 0 ? 80 + (90 * (Level - 1)) : 80; + public override double CD => 65; public override double CastTime => 3; public override double HardnessTime { get; set; } = 5; public override bool CanSelectSelf => true; diff --git a/OshimaModules/Skills/榄旀硶/鏆楃墿璐.cs b/OshimaModules/Skills/榄旀硶/鏆楃墿璐.cs index bdc0e40..b71e37e 100644 --- a/OshimaModules/Skills/榄旀硶/鏆楃墿璐.cs +++ b/OshimaModules/Skills/榄旀硶/鏆楃墿璐.cs @@ -9,14 +9,14 @@ namespace Oshima.FunGame.OshimaModules.Skills public override long Id => (long)MagicID.鏆楃墿璐; public override string Name => "鏆楃墿璐"; public override string Description => Effects.Count > 0 ? Effects.First().Description : ""; - public override double MPCost => Level > 0 ? 65 + (80 * (Level - 1)) : 65; - public override double CD => 35; + public override double MPCost => Level > 0 ? 70 + (80 * (Level - 1)) : 70; + public override double CD => 55; public override double CastTime => 10; public override double HardnessTime { get; set; } = 4; public 鏆楃墿璐(Character? character = null) : base(SkillType.Magic, character) { - Effects.Add(new 鍩轰簬鏀诲嚮鍔涚殑浼ゅ_鏃犲熀纭浼ゅ(this, 1.5, 0.35, true)); + Effects.Add(new 鍩轰簬鏀诲嚮鍔涚殑浼ゅ_鏃犲熀纭浼ゅ(this, 1.4, 0.28, true)); } } } diff --git a/OshimaModules/Skills/榄旀硶/娆″厓涓婂崌.cs b/OshimaModules/Skills/榄旀硶/娆″厓涓婂崌.cs index 2d4904c..7e4323c 100644 --- a/OshimaModules/Skills/榄旀硶/娆″厓涓婂崌.cs +++ b/OshimaModules/Skills/榄旀硶/娆″厓涓婂崌.cs @@ -8,14 +8,15 @@ namespace Oshima.FunGame.OshimaModules.Skills { public override long Id => (long)MagicID.娆″厓涓婂崌; public override string Name => "娆″厓涓婂崌"; - public override string Description => Effects.Count > 0 ? Effects.First().Description : ""; - public override double MPCost => Level > 0 ? 60 + (45 * (Level - 1)) : 60; - public override double CD => 30; - public override double CastTime => 10; + public override string Description => Effects.Count > 0 ? string.Join("\r\n", Effects.Select(e => e.Description)) : ""; + public override double MPCost => Level > 0 ? 70 + (75 * (Level - 1)) : 70; + public override double CD => 100; + public override double CastTime => 12; public override double HardnessTime { get; set; } = 5; public 娆″厓涓婂崌(Character? character = null) : base(SkillType.Magic, character) { + Effects.Add(new 閫犳垚鐪╂檿(this, true, 15, 0)); Effects.Add(new 鍩轰簬鏀诲嚮鍔涚殑浼ゅ_甯﹀熀纭浼ゅ(this, 90, 110, 0.5, 0.3)); } } diff --git a/OshimaModules/Skills/榄旀硶/娌绘剤鏈.cs b/OshimaModules/Skills/榄旀硶/娌绘剤鏈.cs index 2eed978..4b6e253 100644 --- a/OshimaModules/Skills/榄旀硶/娌绘剤鏈.cs +++ b/OshimaModules/Skills/榄旀硶/娌绘剤鏈.cs @@ -9,8 +9,8 @@ namespace Oshima.FunGame.OshimaModules.Skills public override long Id => (long)MagicID.娌绘剤鏈; public override string Name => "娌绘剤鏈"; public override string Description => Effects.Count > 0 ? Effects.First().Description : ""; - public override double MPCost => Level > 0 ? 60 + (65 * (Level - 1)) : 60; - public override double CD => 40; + public override double MPCost => Level > 0 ? 90 + (95 * (Level - 1)) : 90; + public override double CD => 80; public override double CastTime => 5; public override double HardnessTime { get; set; } = 7; public override bool CanSelectSelf => true;