技能更新

This commit is contained in:
milimoe 2024-11-08 01:45:46 +08:00
parent c3fbad2b7b
commit 37b43d31c7
Signed by: milimoe
GPG Key ID: 05D280912DA6C69E
21 changed files with 226 additions and 44 deletions

View File

@ -60,6 +60,7 @@ namespace Oshima.Core.Controllers
builder.AppendLine($"总计冠军数:{stats.Wins}"); builder.AppendLine($"总计冠军数:{stats.Wins}");
builder.AppendLine($"总计前三数:{stats.Top3s}"); builder.AppendLine($"总计前三数:{stats.Top3s}");
builder.AppendLine($"总计败场数:{stats.Loses}"); builder.AppendLine($"总计败场数:{stats.Loses}");
builder.AppendLine($"MVP次数{stats.MVPs}");
List<string> names = [.. FunGameSimulation.CharacterStatistics.OrderByDescending(kv => kv.Value.Winrates).Select(kv => kv.Key.GetName())]; List<string> names = [.. FunGameSimulation.CharacterStatistics.OrderByDescending(kv => kv.Value.Winrates).Select(kv => kv.Key.GetName())];
builder.AppendLine($"胜率:{stats.Winrates * 100:0.##}%#{names.IndexOf(character.GetName()) + 1}"); 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.Plays}");
builder.AppendLine($"总计冠军数:{stats.Wins}"); builder.AppendLine($"总计冠军数:{stats.Wins}");
builder.AppendLine($"总计败场数:{stats.Loses}"); builder.AppendLine($"总计败场数:{stats.Loses}");
builder.AppendLine($"MVP次数{stats.MVPs}");
List<string> names = [.. FunGameSimulation.TeamCharacterStatistics.OrderByDescending(kv => kv.Value.Winrates).Select(kv => kv.Key.GetName())]; List<string> names = [.. FunGameSimulation.TeamCharacterStatistics.OrderByDescending(kv => kv.Value.Winrates).Select(kv => kv.Key.GetName())];
builder.AppendLine($"胜率:{stats.Winrates * 100:0.##}%#{names.IndexOf(character.GetName()) + 1}"); 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.Wins}");
builder.AppendLine($"胜率:{stats.Winrates * 100:0.##}%"); builder.AppendLine($"胜率:{stats.Winrates * 100:0.##}%");
builder.AppendLine($"技术得分:{stats.Rating:0.0#}"); builder.AppendLine($"技术得分:{stats.Rating:0.0#}");
builder.AppendLine($"MVP次数{stats.MVPs}");
strings.Add(builder.ToString()); strings.Add(builder.ToString());
} }
return NetworkUtility.JsonSerialize(strings); return NetworkUtility.JsonSerialize(strings);
@ -159,6 +162,7 @@ namespace Oshima.Core.Controllers
builder.AppendLine($"前三率:{stats.Top3rates * 100:0.##}%"); builder.AppendLine($"前三率:{stats.Top3rates * 100:0.##}%");
builder.AppendLine($"技术得分:{stats.Rating:0.0#}"); builder.AppendLine($"技术得分:{stats.Rating:0.0#}");
builder.AppendLine($"上次排名:{stats.LastRank} / 场均名次:{stats.AvgRank:0.##}"); builder.AppendLine($"上次排名:{stats.LastRank} / 场均名次:{stats.AvgRank:0.##}");
builder.AppendLine($"MVP次数{stats.MVPs}");
strings.Add(builder.ToString()); strings.Add(builder.ToString());
} }
return NetworkUtility.JsonSerialize(strings); return NetworkUtility.JsonSerialize(strings);
@ -182,6 +186,7 @@ namespace Oshima.Core.Controllers
builder.AppendLine($"总计冠军数:{stats.Wins}"); builder.AppendLine($"总计冠军数:{stats.Wins}");
builder.AppendLine($"胜率:{stats.Winrates * 100:0.##}%"); builder.AppendLine($"胜率:{stats.Winrates * 100:0.##}%");
builder.AppendLine($"技术得分:{stats.Rating:0.0#}"); builder.AppendLine($"技术得分:{stats.Rating:0.0#}");
builder.AppendLine($"MVP次数{stats.MVPs}");
strings.Add(builder.ToString()); strings.Add(builder.ToString());
} }
return NetworkUtility.JsonSerialize(strings); return NetworkUtility.JsonSerialize(strings);
@ -201,6 +206,7 @@ namespace Oshima.Core.Controllers
builder.AppendLine($"前三率:{stats.Top3rates * 100:0.##}%"); builder.AppendLine($"前三率:{stats.Top3rates * 100:0.##}%");
builder.AppendLine($"技术得分:{stats.Rating:0.0#}"); builder.AppendLine($"技术得分:{stats.Rating:0.0#}");
builder.AppendLine($"上次排名:{stats.LastRank} / 场均名次:{stats.AvgRank:0.##}"); builder.AppendLine($"上次排名:{stats.LastRank} / 场均名次:{stats.AvgRank:0.##}");
builder.AppendLine($"MVP次数{stats.MVPs}");
strings.Add(builder.ToString()); strings.Add(builder.ToString());
} }
return NetworkUtility.JsonSerialize(strings); return NetworkUtility.JsonSerialize(strings);
@ -401,6 +407,49 @@ namespace Oshima.Core.Controllers
return NetworkUtility.JsonSerialize(""); return NetworkUtility.JsonSerialize("");
} }
[HttpGet("cjn")]
public string GetSkillInfo([FromQuery] long? id = null)
{
IEnumerable<Skill> skills = FunGameSimulation.Skills.Union(FunGameSimulation.Magics);
if (id != null && FunGameSimulation.Characters.Count > 1)
{
List<string> 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<Item> items = FunGameSimulation.Items;
if (id != null)
{
List<string> 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")] [HttpPost("post")]
public string PostName([FromBody] string name) public string PostName([FromBody] string name)
{ {

View File

@ -4,6 +4,7 @@ using Milimoe.FunGame.Core.Entity;
using Milimoe.FunGame.Core.Model; using Milimoe.FunGame.Core.Model;
using Oshima.FunGame.OshimaModules; using Oshima.FunGame.OshimaModules;
using Oshima.FunGame.OshimaModules.Characters; using Oshima.FunGame.OshimaModules.Characters;
using Oshima.FunGame.OshimaModules.Effects.OpenEffects;
using Oshima.FunGame.OshimaModules.Items; using Oshima.FunGame.OshimaModules.Items;
using Oshima.FunGame.OshimaModules.Skills; using Oshima.FunGame.OshimaModules.Skills;
@ -369,6 +370,10 @@ namespace Oshima.Core.Utils
// 总回合数 // 总回合数
int maxRound = isTeam ? 9999 : 999; int maxRound = isTeam ? 9999 : 999;
// 随机回合奖励
Dictionary<int, List<Skill>> roundRewards = GenerateRoundRewards(maxRound);
int i = 1; int i = 1;
while (i < maxRound) while (i < maxRound)
{ {
@ -408,10 +413,54 @@ namespace Oshima.Core.Utils
// 处理回合 // 处理回合
if (characterToAct != null) if (characterToAct != null)
{ {
// 获取回合奖励
List<Skill> skillRewards = [];
if (roundRewards.TryGetValue(i, out List<Skill>? effectList) && effectList != null)
{
skillRewards = new(effectList);
}
WriteLine($"=== Round {i++} ==="); WriteLine($"=== Round {i++} ===");
WriteLine("现在是 [ " + characterToAct + (isTeam ? "" + (actionQueue.GetTeam(characterToAct)?.Name ?? "") + "" : "") + " ] 的回合!"); WriteLine("现在是 [ " + characterToAct + (isTeam ? "" + (actionQueue.GetTeam(characterToAct)?.Name ?? "") + "" : "") + " ] 的回合!");
// 实际的回合奖励
List<Skill> realSkillRewards = [];
if (skillRewards.Count > 0)
{
foreach (Skill skill in skillRewards)
{
Dictionary<string, object> args = new()
{
{ "skill", skill },
{ "values", skill.Values }
};
skill.GamingQueue = actionQueue;
skill.Effects.Add(Factory.OpenFactory.GetInstance<Effect>(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); 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) if (isGameEnd)
{ {
result.Add(Msg); result.Add(Msg);
@ -500,6 +549,7 @@ namespace Oshima.Core.Utils
if (character != null) if (character != null)
{ {
CharacterStatistics stats = actionQueue.CharacterStatistics[character]; CharacterStatistics stats = actionQueue.CharacterStatistics[character];
stats.MVPs++;
StringBuilder builder = new(); StringBuilder builder = new();
builder.AppendLine($"{(isWeb ? count + "." : (isTeam ? "[ " + actionQueue.GetTeamFromEliminated(character)?.Name + " ]" ?? "" : ""))} [ {character.ToStringWithLevel()} ]"); 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 : "")}"); 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 ()]); Magics.AddRange([new (), new (), new (), new (), new (), new (), new (), new (), new (), new ()]);
} }
public static Dictionary<int, List<Skill>> GenerateRoundRewards(int maxRound)
{
Dictionary<int, List<Skill>> roundRewards = [];
// 设定产生的回合奖励
Dictionary<EffectID, Dictionary<string, object>> 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<Skill> skills = [];
// 添加回合奖励特效
EffectID effectID = rewards.Keys.ToArray()[Random.Shared.Next(rewards.Count)];
skills.Add(Factory.OpenFactory.GetInstance<Skill>((long)effectID, "", rewards[effectID]));
roundRewards[currentRound] = skills;
}
}
return roundRewards;
}
public static void UpdateStatistics(CharacterStatistics totalStats, CharacterStatistics stats) public static void UpdateStatistics(CharacterStatistics totalStats, CharacterStatistics stats)
{ {
// 统计此角色的所有数据 // 统计此角色的所有数据
@ -786,6 +893,7 @@ namespace Oshima.Core.Utils
totalStats.Wins += stats.Wins; totalStats.Wins += stats.Wins;
totalStats.Top3s += stats.Top3s; totalStats.Top3s += stats.Top3s;
totalStats.Loses += stats.Loses; totalStats.Loses += stats.Loses;
totalStats.MVPs += stats.MVPs;
if (totalStats.Plays != 0) if (totalStats.Plays != 0)
{ {
totalStats.AvgDamage = Calculation.Round2Digits(totalStats.TotalDamage / totalStats.Plays); totalStats.AvgDamage = Calculation.Round2Digits(totalStats.TotalDamage / totalStats.Plays);

View File

@ -1,7 +1,7 @@
using Milimoe.FunGame.Core.Entity; using Milimoe.FunGame.Core.Entity;
using Milimoe.FunGame.Core.Library.Constant; using Milimoe.FunGame.Core.Library.Constant;
namespace Oshima.FunGame.OshimaModules.Effects.SkillEffects namespace Oshima.FunGame.OshimaModules.Effects.PassiveEffects
{ {
public class : Effect public class : Effect
{ {

View File

@ -1,7 +1,7 @@
using Milimoe.FunGame.Core.Entity; using Milimoe.FunGame.Core.Entity;
using Milimoe.FunGame.Core.Library.Constant; using Milimoe.FunGame.Core.Library.Constant;
namespace Oshima.FunGame.OshimaModules.Effects.SkillEffects namespace Oshima.FunGame.OshimaModules.Effects.PassiveEffects
{ {
public class : Effect public class : Effect
{ {

View File

@ -9,7 +9,6 @@ namespace Oshima.FunGame.OshimaModules.Effects.SkillEffects
public override string Name => Skill.Name; 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 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 bool TargetSelf => false;
public override int TargetCount { get; set; } = 1;
private double BaseDamage => Skill.Level > 0 ? + * (Skill.Level - 1) : ; private double BaseDamage => Skill.Level > 0 ? + * (Skill.Level - 1) : ;
private double AttributeCoefficient => Skill.Level > 0 ? + * (Skill.Level - 1) : ; private double AttributeCoefficient => Skill.Level > 0 ? + * (Skill.Level - 1) : ;
private double Damage private double Damage
@ -37,7 +36,7 @@ namespace Oshima.FunGame.OshimaModules.Effects.SkillEffects
private double { get; set; } = 0.4; private double { get; set; } = 0.4;
private bool IsMagic { get; set; } = true; 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; GamingQueue = skill.GamingQueue;
this. = ; this. = ;
@ -47,7 +46,6 @@ namespace Oshima.FunGame.OshimaModules.Effects.SkillEffects
this. = ; this. = ;
IsMagic = isMagic; IsMagic = isMagic;
MagicType = magicType; MagicType = magicType;
TargetCount = targetCount;
} }
public override void OnSkillCasted(Character caster, List<Character> targets, Dictionary<string, object> others) public override void OnSkillCasted(Character caster, List<Character> targets, Dictionary<string, object> others)

View File

@ -9,7 +9,6 @@ namespace Oshima.FunGame.OshimaModules.Effects.SkillEffects
public override string Name => Skill.Name; 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 string Description => $"对目标{(TargetCount > 1 ? $" {TargetCount} " : "")}敌人造成 {BaseDamage:0.##} + {ATKCoefficient * 100:0.##}% 攻击力 [ {Damage:0.##} ] 点{(IsMagic ? CharacterSet.GetMagicDamageName(MagicType) : "")}。";
public override bool TargetSelf => false; public override bool TargetSelf => false;
public override int TargetCount { get; set; } = 1;
private double BaseDamage => Skill.Level > 0 ? + * (Skill.Level - 1) : ; private double BaseDamage => Skill.Level > 0 ? + * (Skill.Level - 1) : ;
private double ATKCoefficient => Skill.Level > 0 ? + * (Skill.Level - 1) : ; private double ATKCoefficient => Skill.Level > 0 ? + * (Skill.Level - 1) : ;
private double Damage => BaseDamage + (ATKCoefficient * Skill.Character?.ATK ?? 0); 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 double { get; set; } = 0.2;
private bool IsMagic { get; set; } = true; 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; GamingQueue = skill.GamingQueue;
this. = ; this. = ;
@ -29,7 +28,6 @@ namespace Oshima.FunGame.OshimaModules.Effects.SkillEffects
this. = ; this. = ;
IsMagic = isMagic; IsMagic = isMagic;
MagicType = magicType; MagicType = magicType;
TargetCount = targetCount;
} }
public override void OnSkillCasted(Character caster, List<Character> targets, Dictionary<string, object> others) public override void OnSkillCasted(Character caster, List<Character> targets, Dictionary<string, object> others)

View File

@ -9,7 +9,6 @@ namespace Oshima.FunGame.OshimaModules.Effects.SkillEffects
public override string Name => Skill.Name; public override string Name => Skill.Name;
public override string Description => $"对目标{(TargetCount > 1 ? $" {TargetCount} " : "")}敌人造成 {ATKCoefficient * 100:0.##}% 攻击力 [ {Damage:0.##} ] 点{(IsMagic ? CharacterSet.GetMagicDamageName(MagicType) : "")}。"; public override string Description => $"对目标{(TargetCount > 1 ? $" {TargetCount} " : "")}敌人造成 {ATKCoefficient * 100:0.##}% 攻击力 [ {Damage:0.##} ] 点{(IsMagic ? CharacterSet.GetMagicDamageName(MagicType) : "")}。";
public override bool TargetSelf => false; public override bool TargetSelf => false;
public override int TargetCount { get; set; } = 1;
private double ATKCoefficient => Skill.Level > 0 ? + * (Skill.Level - 1) : ; private double ATKCoefficient => Skill.Level > 0 ? + * (Skill.Level - 1) : ;
private double Damage => ATKCoefficient * Skill.Character?.ATK ?? 0; 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 double { get; set; } = 0.25;
private bool IsMagic { get; set; } = true; 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; GamingQueue = skill.GamingQueue;
this. = ; this. = ;
this. = ; this. = ;
IsMagic = isMagic; IsMagic = isMagic;
MagicType = magicType; MagicType = magicType;
TargetCount = targetCount;
} }
public override void OnSkillCasted(Character caster, List<Character> targets, Dictionary<string, object> others) public override void OnSkillCasted(Character caster, List<Character> targets, Dictionary<string, object> others)

View File

@ -9,7 +9,6 @@ namespace Oshima.FunGame.OshimaModules.Effects.SkillEffects
public override string Name => Skill.Name; 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 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 bool TargetSelf => false;
public override int TargetCount { get; set; } = 1;
private double BaseDamage => Skill.Level > 0 ? + * (Skill.Level - 1) : ; private double BaseDamage => Skill.Level > 0 ? + * (Skill.Level - 1) : ;
private double AttributeCoefficient => Skill.Level > 0 ? + * (Skill.Level - 1) : ; private double AttributeCoefficient => Skill.Level > 0 ? + * (Skill.Level - 1) : ;
private double Damage => BaseDamage + (AttributeCoefficient * Skill.Character?.PrimaryAttributeValue ?? 0); 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 double { get; set; } = 0.4;
private bool IsMagic { get; set; } = true; 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; GamingQueue = skill.GamingQueue;
this. = ; this. = ;
@ -29,7 +28,6 @@ namespace Oshima.FunGame.OshimaModules.Effects.SkillEffects
this. = ; this. = ;
IsMagic = isMagic; IsMagic = isMagic;
MagicType = magicType; MagicType = magicType;
TargetCount = targetCount;
} }
public override void OnSkillCasted(Character caster, List<Character> targets, Dictionary<string, object> others) public override void OnSkillCasted(Character caster, List<Character> targets, Dictionary<string, object> others)

View File

@ -6,22 +6,19 @@ namespace Oshima.FunGame.OshimaModules.Effects.SkillEffects
{ {
public override long Id => Skill.Id; public override long Id => Skill.Id;
public override string Name => Skill.Name; 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 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 { get; set; } = 0.03; private double { get; set; } = 0.03;
private double => Skill.Level > 0 ? + * (Skill.Level - 1) : ; private double => Skill.Level > 0 ? + * (Skill.Level - 1) : ;
private bool CanRespawn { get; set; } = false; 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; GamingQueue = skill.GamingQueue;
this. = ; this. = ;
this. = ; this. = ;
TargetCount = targetCount;
CanRespawn = canRespawn; CanRespawn = canRespawn;
} }
@ -29,7 +26,8 @@ namespace Oshima.FunGame.OshimaModules.Effects.SkillEffects
{ {
foreach (Character target in targets) foreach (Character target in targets)
{ {
HealToTarget(caster, target, Heal, CanRespawn); double heal = * target.MaxHP;
HealToTarget(caster, target, heal, CanRespawn);
} }
} }
} }

View File

@ -9,21 +9,19 @@ namespace Oshima.FunGame.OshimaModules.Effects.SkillEffects
public override string Name => Skill.Name; public override string Name => Skill.Name;
public override string Description => $"对目标{(TargetCount > 1 ? $" {TargetCount} " : "")}敌人造成 {Damage:0.##} 点{(IsMagic ? CharacterSet.GetMagicDamageName(MagicType) : "")}。"; public override string Description => $"对目标{(TargetCount > 1 ? $" {TargetCount} " : "")}敌人造成 {Damage:0.##} 点{(IsMagic ? CharacterSet.GetMagicDamageName(MagicType) : "")}。";
public override bool TargetSelf => false; public override bool TargetSelf => false;
public override int TargetCount { get; set; } = 1;
private double Damage => Skill.Level > 0 ? + * (Skill.Level - 1) : ; private double Damage => Skill.Level > 0 ? + * (Skill.Level - 1) : ;
private double { get; set; } = 200; private double { get; set; } = 200;
private double { get; set; } = 100; private double { get; set; } = 100;
private bool IsMagic { get; set; } = true; 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; GamingQueue = skill.GamingQueue;
this. = ; this. = ;
this. = ; this. = ;
IsMagic = isMagic; IsMagic = isMagic;
MagicType = magicType; MagicType = magicType;
TargetCount = targetCount;
} }
public override void OnSkillCasted(Character caster, List<Character> targets, Dictionary<string, object> others) public override void OnSkillCasted(Character caster, List<Character> targets, Dictionary<string, object> others)

View File

@ -8,19 +8,17 @@ namespace Oshima.FunGame.OshimaModules.Effects.SkillEffects
public override string Name => Skill.Name; public override string Name => Skill.Name;
public override string Description => $"为{(TargetCount > 1 ? $" {TargetCount} " : "")}目标回复 {Heal:0.##} 点生命值。"; public override string Description => $"为{(TargetCount > 1 ? $" {TargetCount} " : "")}目标回复 {Heal:0.##} 点生命值。";
public override bool TargetSelf => true; public override bool TargetSelf => true;
public override int TargetCount { get; set; } = 1;
private double Heal => Skill.Level > 0 ? + * (Skill.Level - 1) : ; private double Heal => Skill.Level > 0 ? + * (Skill.Level - 1) : ;
private double { get; set; } = 100; private double { get; set; } = 100;
private double { get; set; } = 30; private double { get; set; } = 30;
private bool CanRespawn { get; set; } = false; 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; GamingQueue = skill.GamingQueue;
this. = ; this. = ;
this. = ; this. = ;
TargetCount = targetCount;
CanRespawn = canRespawn; CanRespawn = canRespawn;
} }

View File

@ -0,0 +1,38 @@
using 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<Character> targets, Dictionary<string, object> 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);
}
}
}
}

View File

@ -1,6 +1,6 @@
using Milimoe.FunGame.Core.Entity; using Milimoe.FunGame.Core.Entity;
using Milimoe.FunGame.Core.Library.Constant; using Milimoe.FunGame.Core.Library.Constant;
using Oshima.FunGame.OshimaModules.Effects.SkillEffects; using Oshima.FunGame.OshimaModules.Effects.PassiveEffects;
namespace Oshima.FunGame.OshimaModules.Skills namespace Oshima.FunGame.OshimaModules.Skills
{ {

View File

@ -1,6 +1,6 @@
using Milimoe.FunGame.Core.Entity; using Milimoe.FunGame.Core.Entity;
using Milimoe.FunGame.Core.Library.Constant; using Milimoe.FunGame.Core.Library.Constant;
using Oshima.FunGame.OshimaModules.Effects.SkillEffects; using Oshima.FunGame.OshimaModules.Effects.PassiveEffects;
namespace Oshima.FunGame.OshimaModules.Skills namespace Oshima.FunGame.OshimaModules.Skills
{ {

View File

@ -22,15 +22,15 @@ namespace Oshima.FunGame.OshimaModules.Skills
{ {
public override long Id => Skill.Id; public override long Id => Skill.Id;
public override string Name => Skill.Name; 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 TargetSelf => true;
public override bool Durative => true; public override bool Durative => true;
public override double Duration => 40; public override double Duration => 40;
private double => 1.4 + 0.4 * (Level - 1); private double => 1.4 + 0.4 * (Level - 1);
private double => * Skill.Character?.INT ?? 0; private double => * Skill.Character?.INT ?? 0;
private double => 0.35; private double => 0.25;
private double => 0.35; private double => 0.25;
private double = 0; private double = 0;
private double = 0; private double = 0;

View File

@ -11,7 +11,7 @@ namespace Oshima.FunGame.OshimaModules.Skills
public override double EPCost => 100; public override double EPCost => 100;
public override double CD => 55 - 3 * (Level - 1); public override double CD => 55 - 3 * (Level - 1);
public override double HardnessTime { get; set; } = 25; public override double HardnessTime { get; set; } = 25;
public override string Slogan => ""; public override string Slogan => "从深渊引爆力量,世界将为之颤抖";
public (Character? character = null) : base(SkillType.SuperSkill, character) public (Character? character = null) : base(SkillType.SuperSkill, character)
{ {

View File

@ -1,6 +1,6 @@
using Milimoe.FunGame.Core.Entity; using Milimoe.FunGame.Core.Entity;
using Milimoe.FunGame.Core.Library.Constant; using Milimoe.FunGame.Core.Library.Constant;
using Oshima.FunGame.OshimaModules.Effects.SkillEffects; using Oshima.FunGame.OshimaModules.Effects.PassiveEffects;
namespace Oshima.FunGame.OshimaModules.Skills namespace Oshima.FunGame.OshimaModules.Skills
{ {

View File

@ -9,8 +9,8 @@ namespace Oshima.FunGame.OshimaModules.Skills
public override long Id => (long)MagicID.; public override long Id => (long)MagicID.;
public override string Name => "回复术"; public override string Name => "回复术";
public override string Description => Effects.Count > 0 ? Effects.First().Description : ""; public override string Description => Effects.Count > 0 ? Effects.First().Description : "";
public override double MPCost => Level > 0 ? 40 + (60 * (Level - 1)) : 40; public override double MPCost => Level > 0 ? 80 + (90 * (Level - 1)) : 80;
public override double CD => 35; public override double CD => 65;
public override double CastTime => 3; public override double CastTime => 3;
public override double HardnessTime { get; set; } = 5; public override double HardnessTime { get; set; } = 5;
public override bool CanSelectSelf => true; public override bool CanSelectSelf => true;

View File

@ -9,14 +9,14 @@ namespace Oshima.FunGame.OshimaModules.Skills
public override long Id => (long)MagicID.; public override long Id => (long)MagicID.;
public override string Name => "暗物质"; public override string Name => "暗物质";
public override string Description => Effects.Count > 0 ? Effects.First().Description : ""; public override string Description => Effects.Count > 0 ? Effects.First().Description : "";
public override double MPCost => Level > 0 ? 65 + (80 * (Level - 1)) : 65; public override double MPCost => Level > 0 ? 70 + (80 * (Level - 1)) : 70;
public override double CD => 35; public override double CD => 55;
public override double CastTime => 10; public override double CastTime => 10;
public override double HardnessTime { get; set; } = 4; public override double HardnessTime { get; set; } = 4;
public (Character? character = null) : base(SkillType.Magic, character) 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));
} }
} }
} }

View File

@ -8,14 +8,15 @@ namespace Oshima.FunGame.OshimaModules.Skills
{ {
public override long Id => (long)MagicID.; public override long Id => (long)MagicID.;
public override string Name => "次元上升"; public override string Name => "次元上升";
public override string Description => Effects.Count > 0 ? Effects.First().Description : ""; public override string Description => Effects.Count > 0 ? string.Join("\r\n", Effects.Select(e => e.Description)) : "";
public override double MPCost => Level > 0 ? 60 + (45 * (Level - 1)) : 60; public override double MPCost => Level > 0 ? 70 + (75 * (Level - 1)) : 70;
public override double CD => 30; public override double CD => 100;
public override double CastTime => 10; public override double CastTime => 12;
public override double HardnessTime { get; set; } = 5; public override double HardnessTime { get; set; } = 5;
public (Character? character = null) : base(SkillType.Magic, character) 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)); Effects.Add(new _带基础伤害(this, 90, 110, 0.5, 0.3));
} }
} }

View File

@ -9,8 +9,8 @@ namespace Oshima.FunGame.OshimaModules.Skills
public override long Id => (long)MagicID.; public override long Id => (long)MagicID.;
public override string Name => "治愈术"; public override string Name => "治愈术";
public override string Description => Effects.Count > 0 ? Effects.First().Description : ""; public override string Description => Effects.Count > 0 ? Effects.First().Description : "";
public override double MPCost => Level > 0 ? 60 + (65 * (Level - 1)) : 60; public override double MPCost => Level > 0 ? 90 + (95 * (Level - 1)) : 90;
public override double CD => 40; public override double CD => 80;
public override double CastTime => 5; public override double CastTime => 5;
public override double HardnessTime { get; set; } = 7; public override double HardnessTime { get; set; } = 7;
public override bool CanSelectSelf => true; public override bool CanSelectSelf => true;