添加新角色;修复一些BUG

This commit is contained in:
milimoe 2026-01-09 01:05:08 +08:00
parent 1acabf28ee
commit ac0a926ad0
Signed by: milimoe
GPG Key ID: 9554D37E4B8991D0
30 changed files with 808 additions and 122 deletions

View File

@ -16,9 +16,9 @@ namespace Oshima.FunGame.OshimaModules.Characters
InitialHP = 100;
InitialMP = 45;
InitialSTR = 11;
STRGrowth = 1.3;
STRGrowth = 0.8;
InitialAGI = 15;
AGIGrowth = 1.4;
AGIGrowth = 1.9;
InitialINT = 4;
INTGrowth = 0.3;
InitialSPD = 300;

View File

@ -266,6 +266,9 @@
= 4126,
= 4127,
= 4128,
= 4129
= 4129,
= 4130,
= 4131,
= 4132
}
}

View File

@ -0,0 +1,98 @@
using Milimoe.FunGame.Core.Entity;
using Milimoe.FunGame.Core.Library.Constant;
using Oshima.FunGame.OshimaModules.Effects.OpenEffects;
namespace Oshima.FunGame.OshimaModules.Effects.PassiveEffects
{
public class : Effect
{
public override long Id => (long)PassiveEffectID.;
public override string Name => "持续回复";
public override string Description => $"此角色处于持续回复状态,每{GameplayEquilibriumConstant.InGameTime}回复 {(_isPercentage ? $"{_durationHealPercent * 100:0.##}% [ {Heal:0.##} ]" : Heal.ToString("0.##"))} 点当前生命值。来自:[ {Source} ] 的 [ {Skill.Name} ]";
public override EffectType EffectType => EffectType.HealOverTime;
public override bool IsDebuff => false;
public override Character Source => _sourceCharacter;
public override bool Durative => _durative;
public override double Duration => _duration;
public override int DurationTurn => _durationTurn;
private readonly Character _targetCharacter;
private readonly Character _sourceCharacter;
private readonly bool _durative;
private readonly double _duration;
private readonly int _durationTurn;
private readonly bool _isPercentage;
private readonly double _durationHeal;
private readonly double _durationHealPercent;
private double Heal => _isPercentage ? _targetCharacter.HP * _durationHealPercent : _durationHeal;
public (Skill skill, Character targetCharacter, Character sourceCharacter, bool durative = false, double duration = 0, int durationTurn = 1,
bool isPercentage = true, double durationHeal = 100, double durationHealPercent = 0.02) : base(skill)
{
GamingQueue = skill.GamingQueue;
_targetCharacter = targetCharacter;
_sourceCharacter = sourceCharacter;
_durative = durative;
_duration = duration;
_durationTurn = durationTurn;
_isPercentage = isPercentage;
_durationHeal = durationHeal;
_durationHealPercent = durationHealPercent;
}
private double GetHeal(double hp, double elapsed)
{
if (hp <= 0)
{
return 0;
}
double heal = _isPercentage ? hp * _durationHealPercent : _durationHeal;
return heal * elapsed;
}
public override void OnTimeElapsed(Character character, double elapsed)
{
if (character == _targetCharacter && character.HP > 0)
{
double hp = character.HP;
double heal = GetHeal(hp, elapsed);
if (elapsed > 1)
{
heal = 0;
int loop = 0;
int elapsedSecond = (int)elapsed;
for (; loop < elapsedSecond; loop++)
{
double current = GetHeal(hp, 1);
heal += current;
hp -= current;
elapsed--;
}
if (elapsed > 0)
{
heal += GetHeal(hp, elapsed);
}
}
HealToTarget(Source, character, heal, triggerEffects: false);
}
}
public override void OnEffectGained(Character character)
{
if (_durative && RemainDuration == 0)
{
RemainDuration = Duration;
}
else if (RemainDurationTurn == 0)
{
RemainDurationTurn = DurationTurn;
}
AddEffectTypeToCharacter(character, [EffectType.HealOverTime]);
}
public override void OnEffectLost(Character character)
{
RemoveEffectTypesFromCharacter(character);
}
}
}

View File

@ -0,0 +1,27 @@
using Milimoe.FunGame.Core.Entity;
using Milimoe.FunGame.Core.Library.Constant;
using Oshima.FunGame.OshimaModules.Effects.OpenEffects;
namespace Oshima.FunGame.OshimaModules.Effects.PassiveEffects
{
public class : Effect
{
public override long Id => (long)PassiveEffectID.;
public override string Name => $"{_name}标记";
public override string Description => $"此角色持有{Name}。{OtherDescription}来自:[ {Source} ]";
public override EffectType EffectType => EffectType.Mark;
public override bool IsDebuff => true;
public override Character Source => _sourceCharacter;
public string OtherDescription { get; set; } = "";
private readonly string _name;
private readonly Character _sourceCharacter;
public (Skill skill, string name, Character sourceCharacter) : base(skill)
{
GamingQueue = skill.GamingQueue;
_name = name;
_sourceCharacter = sourceCharacter;
}
}
}

View File

@ -0,0 +1,25 @@
using Milimoe.FunGame.Core.Entity;
using Milimoe.FunGame.Core.Library.Constant;
using Oshima.FunGame.OshimaModules.Effects.OpenEffects;
namespace Oshima.FunGame.OshimaModules.Effects.PassiveEffects
{
public class : Effect
{
public override long Id => (long)PassiveEffectID.;
public override string Name => "海王星的野望标记";
public override string Description => $"此角色持有海王星的野望标记。来自:[ {Source} ]";
public override EffectType EffectType => EffectType.Mark;
public override bool IsDebuff => true;
public override Character Source => _sourceCharacter;
public override DispelledType DispelledType => DispelledType.CannotBeDispelled;
private readonly Character _sourceCharacter;
public (Skill skill, Character sourceCharacter) : base(skill)
{
GamingQueue = skill.GamingQueue;
_sourceCharacter = sourceCharacter;
}
}
}

View File

@ -0,0 +1,49 @@
using Milimoe.FunGame.Core.Entity;
using Milimoe.FunGame.Core.Library.Constant;
using Oshima.FunGame.OshimaModules.Effects.OpenEffects;
namespace Oshima.FunGame.OshimaModules.Effects.PassiveEffects
{
public class : Effect
{
public override long Id => (long)PassiveEffectID.;
public override string Name => "禁止治疗";
public override string Description => $"此角色已被禁止治疗。来自:[ {Source} ] 的 [ {Skill.Name} ]";
public override EffectType EffectType => EffectType.GrievousWound;
public override Character Source => _sourceCharacter;
public override bool Durative => _durative;
public override double Duration => _duration;
public override int DurationTurn => _durationTurn;
private readonly Character _sourceCharacter;
private readonly bool _durative;
private readonly double _duration;
private readonly int _durationTurn;
public (Skill skill, Character sourceCharacter, bool durative = false, double duration = 0, int durationTurn = 1) : base(skill)
{
GamingQueue = skill.GamingQueue;
_sourceCharacter = sourceCharacter;
_durative = durative;
_duration = duration;
_durationTurn = durationTurn;
}
public override bool BeforeApplyRecoveryAtTimeLapsing(Character character, ref double hr, ref double mr)
{
return true;
}
public override void OnEffectGained(Character character)
{
if (_durative && RemainDuration == 0)
{
RemainDuration = Duration;
}
else if (RemainDurationTurn == 0)
{
RemainDurationTurn = DurationTurn;
}
}
}
}

View File

@ -1,4 +1,5 @@
using Milimoe.FunGame.Core.Entity;
using Milimoe.FunGame.Core.Interface.Entity;
using Milimoe.FunGame.Core.Library.Constant;
using Oshima.FunGame.OshimaModules.Effects.OpenEffects;
@ -54,7 +55,6 @@ namespace Oshima.FunGame.OshimaModules.Effects.PassiveEffects
{
RemainDurationTurn = DurationTurn;
}
GamingQueue?.ChangeCharacterHardnessTime(character, _hardnessReductionPercent, true, false);
AddEffectTypeToCharacter(character, [EffectType.Slow]);
}
@ -62,5 +62,10 @@ namespace Oshima.FunGame.OshimaModules.Effects.PassiveEffects
{
RemoveEffectTypesFromCharacter(character);
}
public void ApplyChange(Character character)
{
GamingQueue?.ChangeCharacterHardnessTime(character, _hardnessReductionPercent, true, false);
}
}
}

View File

@ -1,4 +1,5 @@
using Milimoe.FunGame.Core.Entity;
using Milimoe.FunGame.Core.Interface.Entity;
using Milimoe.FunGame.Core.Library.Common.Addon;
using Milimoe.FunGame.Core.Library.Constant;
using Oshima.FunGame.OshimaModules.Effects.PassiveEffects;
@ -154,6 +155,10 @@ namespace Oshima.FunGame.OshimaModules.Effects.SkillEffects
target.Effects.Add(e);
e.OnEffectGained(target);
GamingQueue?.LastRound.AddApplyEffects(target, e.EffectType);
if (e is cz)
{
cz.ApplyChange(target);
}
}
}
}

View File

@ -148,6 +148,7 @@ namespace Oshima.FunGame.OshimaModules.Items
public override bool CanSelectTeammate => _canSelectTeammate;
public override bool CanSelectEnemy => _canSelectEnemy;
public override int CanSelectTargetCount => _canSelectCount;
public override bool AllowSelectDead => true;
private readonly bool _canSelectAllTeammates;
private readonly bool _canSelectAllEnemies;

View File

@ -47,6 +47,9 @@ namespace Oshima.FunGame.OshimaModules
10 => new ColdBlue(),
11 => new dddovo(),
12 => new Quduoduo(),
14 => new XReouni(),
15 => new Neptune(),
17 => new Ryuko(),
_ => null,
};
};

View File

@ -128,6 +128,9 @@ namespace Oshima.FunGame.OshimaModules
(long)SuperSkillID. => new (),
(long)SuperSkillID. => new (),
(long)SuperSkillID. => new (),
(long)SuperSkillID. => new (),
(long)SuperSkillID. => new (),
(long)SuperSkillID. => new (),
(long)PassiveID.META马 => new META马(),
(long)PassiveID. => new (),
(long)PassiveID. => new (),
@ -140,6 +143,9 @@ namespace Oshima.FunGame.OshimaModules
(long)PassiveID. => new (),
(long)PassiveID. => new (),
(long)PassiveID. => new (),
(long)PassiveID. => new (),
(long)PassiveID. => new (),
(long)PassiveID. => new (),
(long)PassiveID. => new (),
(long)PassiveID. => new (),
(long)PassiveID. => new (),

View File

@ -36,7 +36,6 @@
<ItemGroup>
<Folder Include="Skills\ShiYu\" />
<Folder Include="Skills\TheGodK\" />
<Folder Include="Skills\Ryuko\" />
<Folder Include="Skills\CHAOS\" />
</ItemGroup>

View File

@ -0,0 +1,147 @@
using Milimoe.FunGame.Core.Entity;
using Milimoe.FunGame.Core.Library.Common.Addon;
using Milimoe.FunGame.Core.Library.Constant;
using Oshima.FunGame.OshimaModules.Effects.PassiveEffects;
namespace Oshima.FunGame.OshimaModules.Skills
{
public class : Skill
{
public override long Id => (long)SuperSkillID.;
public override string Name => "海王星的野望";
public override string Description => Effects.Count > 0 ? Effects.First().Description : "";
public override string DispelDescription => Effects.Count > 0 ? Effects.First().DispelDescription : "";
public override double EPCost => 100;
public override double CD => 60;
public override double HardnessTime { get; set; } = 10;
public override bool CanSelectSelf => false;
public override bool CanSelectEnemy => true;
public override bool CanSelectTeammate => false;
public override int CanSelectTargetCount => 2;
public override bool IsNonDirectional => true;
public override int CanSelectTargetRange => 3;
public (Character? character = null) : base(SkillType.SuperSkill, character)
{
Effects.Add(new (this));
}
}
public class (Skill skill) : Effect(skill)
{
public override long Id => Skill.Id;
public override string Name => Skill.Name;
public override string Description => $"标记{Skill.TargetDescription()},持续 {持续时间:0.##} {GameplayEquilibriumConstant.InGameTime}。立即对标记目标造成 {直接伤害:0.##} 点{CharacterSet.GetDamageTypeName(DamageType.Magical, MagicType)}。" +
$"在持续时间内{爆炸伤害描述}在此期间,你的力量提升 60% [ {力量提升:0.##} ],并且 [ {nameof(深海之戟)} ] 改变为相同机制。无视免疫。";
public override bool Durative => true;
public override double Duration => ;
public override DispelledType DispelledType => DispelledType.CannotBeDispelled;
public override MagicType MagicType => Skill.Character?.MagicType ?? MagicType.None;
public override ImmuneType IgnoreImmune => ImmuneType.All;
public string => $"对受到标记的目标造成伤害,有 {概率 * 100:0.##}% 概率产生爆炸,爆炸将产生 {分裂伤害系数 * 100:0.##}% 分裂伤害。分裂伤害为全图索敌,会优先分裂至两个在持续时间内对你造成伤害最多的敌人,若没有符合条件的敌人或敌人数量不足,则将分裂至至多两个随机的敌人。";
public double => 180 + 240 * (Skill.Level - 1);
public double => 25 + 2 * (Skill.Level - 1);
public double => 0.3 + 0.08 * (Skill.Level - 1);
public double => 0.4 + 0.07 * (Skill.Level - 1);
public double => 0.6 * (Skill.Character?.BaseSTR ?? 0);
public Dictionary<Character, double> { get; set; } = [];
private double = 0;
public override void OnEffectGained(Character character)
{
= ;
character.ExSTR += ;
if (character.Effects.Where(e => e is ).FirstOrDefault() is e)
{
e. = this;
}
}
public override void OnEffectLost(Character character)
{
character.ExSTR -= ;
if (character.Effects.Where(e => e is ).FirstOrDefault() is e)
{
e. = null;
}
}
public override void AfterDamageCalculation(Character character, Character enemy, double damage, double actualDamage, bool isNormalAttack, DamageType damageType, MagicType magicType, DamageResult damageResult)
{
if (enemy == Skill.Character)
{
if (!.TryAdd(character, actualDamage))
{
[character] += actualDamage;
}
}
if (character == Skill.Character && (damageResult == DamageResult.Normal || damageResult == DamageResult.Critical) && enemy.Effects.FirstOrDefault(e => e is ) is e)
{
if (Random.Shared.NextDouble() < )
{
(character, enemy, actualDamage, damageType, magicType);
}
}
}
public override void OnSkillCasted(Character caster, List<Character> targets, List<Grid> grids, Dictionary<string, object> others)
{
= 0;
RemainDuration = Duration;
if (!caster.Effects.Contains(this))
{
caster.Effects.Add(this);
OnEffectGained(caster);
}
foreach (Character target in targets)
{
DamageToEnemy(caster, target, DamageType.Magical, MagicType, );
}
// 造成伤害之后再一起上标记,否则会立即触发标记特效
foreach (Character target in targets)
{
Effect e = new (Skill, caster)
{
Durative = true,
Duration = ,
RemainDuration = Duration
};
target.Effects.Add(e);
e.OnEffectGained(target);
AddEffectTypeToCharacter(target, [e.EffectType]);
}
RecordCharacterApplyEffects(caster, EffectType.DamageBoost);
}
public void (Character character, Character enemy, double damage, DamageType damageType, MagicType magicType)
{
List<Character> targets = [];
targets.AddRange(.Where(w => w.Key != character && w.Key != enemy && w.Key.HP > 0).OrderByDescending(o => o.Value).Select(s => s.Key).Take(2));
if (targets.Count < 2)
{
int count = 2 - targets.Count;
// 获取所有敌人
List<Character> allEnemys = [];
if (GamingQueue != null)
{
allEnemys = [.. GamingQueue.GetEnemies(character).Where(c => c != character && c != enemy && !targets.Contains(c) && c.HP > 0)];
targets.AddRange(allEnemys.OrderBy(o => Random.Shared.Next()).Take(count));
}
}
damage *= ;
foreach (Character target in targets)
{
DamageToEnemy(character, target, damageType, magicType, damage, new()
{
CalculateCritical = false,
CalculateReduction = true,
TriggerEffects = false,
IgnoreImmune = true
});
}
}
}
}

View File

@ -1,7 +1,7 @@
using System;
using Milimoe.FunGame.Core.Entity;
using Milimoe.FunGame.Core.Entity;
using Milimoe.FunGame.Core.Library.Common.Addon;
using Milimoe.FunGame.Core.Library.Constant;
using Oshima.FunGame.OshimaModules.Effects.PassiveEffects;
namespace Oshima.FunGame.OshimaModules.Skills
{
@ -11,7 +11,7 @@ namespace Oshima.FunGame.OshimaModules.Skills
public override string Name => "深海之戟";
public override string Description => Effects.Count > 0 ? Effects.First().Description : "";
public override string ExemptionDescription => Effects.Count > 0 ? Effects.First().ExemptionDescription : "";
public override int CanSelectTargetRange => 3;
public override int CanSelectTargetRange => 5;
public (Character? character = null) : base(SkillType.Passive, character)
{
@ -33,7 +33,11 @@ namespace Oshima.FunGame.OshimaModules.Skills
get
{
string str = $"分裂伤害:{分裂百分比 * 100:0.##}%。无视免疫。";
if (GamingQueue?.Map != null)
if ( != null)
{
return $"技能机制受 [ {nameof(海王星的野望)} ] 影响而改变:{野望.爆炸伤害描述}{str}";
}
else if (GamingQueue?.Map != null)
{
return $"普通攻击暴击时会自动产生分裂伤害至其附近半径为 {Skill.CanSelectTargetRange} 格的菱形区域内的敌人,但最多只会对两个敌人造成分裂伤害。{str}";
}
@ -45,13 +49,18 @@ namespace Oshima.FunGame.OshimaModules.Skills
}
public override ImmuneType IgnoreImmune => ImmuneType.All;
public double => 0.3 + (Skill.Character?.Level ?? 0) / 100;
public double => Math.Min(0.75, 0.3 + (Skill.Character?.Level ?? 0 + 0.00) / 100);
public ? { get; set; } = null;
public override void AfterDamageCalculation(Character character, Character enemy, double damage, double actualDamage, bool isNormalAttack, DamageType damageType, MagicType magicType, DamageResult damageResult)
{
if (character == Skill.Character && isNormalAttack && damageResult == DamageResult.Critical && GamingQueue != null)
if ( != null && enemy.Effects.FirstOrDefault(e => e is ) is e)
{
List<Character> allEnemys = [.. GamingQueue.AllCharacters.Where(c => c != character && c != enemy && c.HP > 0 && !GamingQueue.IsTeammate(character, c))];
.(character, enemy, actualDamage, damageType, magicType);
}
else if (character == Skill.Character && isNormalAttack && damageResult == DamageResult.Critical && GamingQueue != null)
{
List<Character> allEnemys = [.. GamingQueue.GetEnemies(character).Where(c => c != character && c != enemy && c.HP > 0)];
List<Character> targets = [];
if (GamingQueue?.Map is GameMap map)
{
@ -71,7 +80,13 @@ namespace Oshima.FunGame.OshimaModules.Skills
double = actualDamage * ;
foreach (Character target in targets)
{
DamageToEnemy(character, target, damageType, magicType, , false, true);
DamageToEnemy(character, target, damageType, magicType, , new()
{
CalculateCritical = false,
CalculateReduction = true,
TriggerEffects = false,
IgnoreImmune = true
});
}
}
}

View File

@ -0,0 +1,41 @@
using Milimoe.FunGame.Core.Entity;
using Milimoe.FunGame.Core.Library.Constant;
namespace Oshima.FunGame.OshimaModules.Skills
{
public class : Skill
{
public override long Id => (long)PassiveID.;
public override string Name => "能量复苏";
public override string Description => Effects.Count > 0 ? Effects.First().Description : "";
public (Character? character = null) : base(SkillType.Passive, character)
{
Effects.Add(new (this));
}
public override IEnumerable<Effect> AddPassiveEffectToCharacter()
{
return Effects;
}
}
public class (Skill skill) : Effect(skill)
{
public override long Id => Skill.Id;
public override string Name => Skill.Name;
public override string Description => $"处于正常态和吟唱态时,每秒回复 {回复系数 * 100:0.##}% 最大生命值 [ {Skill.Character?.MaxHP * 回复系数:0.##} ] 并获得 {能量获取:0.##} 点能量。";
public double { get; set; } = 0.02;
public double { get; set; } = 1;
public override void OnTimeElapsed(Character character, double elapsed)
{
if (character.CharacterState == CharacterState.Actionable || character.CharacterState == CharacterState.Casting || character.CharacterState == CharacterState.PreCastSuperSkill)
{
character.HP += (Skill.Character?.MaxHP ?? 0) * * elapsed;
character.EP += * elapsed;
}
}
}
}

View File

@ -0,0 +1,203 @@
using Milimoe.FunGame.Core.Entity;
using Milimoe.FunGame.Core.Interface.Entity;
using Milimoe.FunGame.Core.Library.Common.Addon;
using Milimoe.FunGame.Core.Library.Constant;
using Oshima.FunGame.OshimaModules.Effects.PassiveEffects;
namespace Oshima.FunGame.OshimaModules.Skills
{
public class : Skill
{
public override long Id => (long)SuperSkillID.;
public override string Name => "自我抉择";
public override string Description => Effects.Count > 0 ? (()Effects.First()). : "";
public override string DispelDescription => Effects.Count > 0 ? Effects.First().DispelDescription : "";
public override string ExemptionDescription => Effects.Count > 0 ? Effects.First().ExemptionDescription : "";
public override double EPCost => 100;
public override double CD => 60;
public override double HardnessTime { get; set; } = 2;
public override bool CanSelectSelf => true;
public override bool CanSelectEnemy => false;
public (Character? character = null) : base(SkillType.SuperSkill, character)
{
Effects.Add(new (this));
}
}
public class : Effect
{
public override long Id => Skill.Id;
public override string Name => Skill.Name;
public override string Description { get; set; } = "";
public override bool Durative => true;
public override DispelledType DispelledType => DispelledType.CannotBeDispelled;
public override string DispelDescription => $"被驱散性:所有回复/禁止回复不可驱散,攻击力加成不可驱散,嘲讽需强驱散";
public override PrimaryAttribute ExemptionType => PrimaryAttribute.AGI;
public override bool ExemptDuration => false;
public string => $"你可以选择获得哪一种力量:\r\n{熵核描述}\r\n{守护描述}";
private string => $"【熵核】加速生命回复,每{GameplayEquilibriumConstant.InGameTime}额外回复 {熵核额外回复 * 100:0.##}% 当前生命值 [ {Skill.Character?.HP * 熵核额外回复:0.##} ],攻击力提升 {熵核攻击力提升 * 100:0.##}% [ {Skill.Character?.BaseATK * 熵核攻击力提升:0.##} ],但是受到的伤害提升 {熵核受到伤害提升 * 100:0.##}%。" +
$"对敌人造成伤害会使其在 {熵核影响敌人时间:0.##} {GameplayEquilibriumConstant.InGameTime}内无法获得自然的生命和魔法回复,施加此状态时,只有目标的敏捷高于你的角色才能进行豁免检定。持续 {熵核持续时间:0.##} {GameplayEquilibriumConstant.InGameTime}。";
private static double => 0.04;
private double => 0.2 + 0.1 * (Skill.Level - 1);
private double => 0.15 + 0.05 * (Skill.Level - 1);
private static double => 10;
private double => 15 + 2 * (Skill.Level - 1);
private string => $"【守护】极致地加速生命回复,每{GameplayEquilibriumConstant.InGameTime}额外回复 {守护额外回复 * 100:0.##}% 当前生命值 [ {Skill.Character?.HP * 守护额外回复:0.##} ],为全体友方角色提供每{GameplayEquilibriumConstant.InGameTime}额外 {守护友方回复 * 100:0.##}% 当前生命值的生命回复,并嘲讽全体敌方角色,被嘲讽的角色仅能将你作为攻击目标。" +
$"施加嘲讽状态时,只有目标的敏捷高于你的角色才能进行豁免检定。持续 {守护持续时间:0.##} {GameplayEquilibriumConstant.InGameTime}。";
private double => 0.08 + 0.006 * (Skill.Level - 1);
private double => 0.01 + 0.01 * (Skill.Level - 1);
private double => 15 + 1 * (Skill.Level - 1);
private bool { get; set; } = false;
private double = 0;
private bool = false;
public (Skill skill) : base(skill)
{
Description = ;
}
public override void OnEffectGained(Character character)
{
if ()
{
= ;
character.ExATKPercentage += ;
WriteLine($"[ {character} ] 的攻击力提升了 {实际攻击力提升 * 100:0.##}% [ {character.BaseATK * 实际攻击力提升:0.##} ] ");
}
}
public override void OnEffectLost(Character character)
{
if ()
{
character.ExATKPercentage -= ;
}
}
public override double AlterActualDamageAfterCalculation(Character character, Character enemy, double damage, bool isNormalAttack, DamageType damageType, MagicType magicType, DamageResult damageResult, ref bool isEvaded, Dictionary<Effect, double> totalDamageBonus)
{
if ( && enemy == Skill.Character && (damageResult == DamageResult.Normal || damageResult == DamageResult.Critical))
{
double bouns = -(damage * );
WriteLine($"[ {enemy} ] 触发了自我抉择,额外受到 {Math.Abs(bouns):0.##} 伤害!");
return bouns;
}
return 0;
}
public override void AfterDamageCalculation(Character character, Character enemy, double damage, double actualDamage, bool isNormalAttack, DamageType damageType, MagicType magicType, DamageResult damageResult)
{
if ( && character == Skill.Character && (damageResult == DamageResult.Normal || damageResult == DamageResult.Critical) && !CheckSkilledImmune(character, enemy, Skill))
{
Effect e = new (Skill, character, true, , 0)
{
ExemptionType = PrimaryAttribute.AGI,
ExemptDuration = false,
DispelledType = DispelledType
};
if (enemy.AGI <= character.AGI || (enemy.AGI > character.AGI && !CheckExemption(character, enemy, e)))
{
WriteLine($"[ {character} ] 对 [ {enemy} ] 施加了禁止治疗!!持续时间:{熵核影响敌人时间:0.##} {GameplayEquilibriumConstant.InGameTime}");
enemy.Effects.Add(e);
e.OnEffectGained(enemy);
GamingQueue?.LastRound.AddApplyEffects(enemy, e.EffectType);
}
}
}
public override void OnCharacterInquiry(Character character, string topic, Dictionary<string, object> args, Dictionary<string, object> response)
{
if (topic == nameof())
{
if (response.TryGetValue("result", out object? value) && value is bool choose)
{
= choose;
}
else
{
= Random.Shared.Next() % 2 == 0;
}
}
}
public override void OnSkillCasted(Character caster, List<Character> targets, List<Grid> grids, Dictionary<string, object> others)
{
if (caster.Effects.Contains(this))
{
OnEffectLost(caster);
caster.Effects.Remove(this);
}
caster.Effects.Add(this);
= 0;
Dictionary<string, object> response = Inquiry(caster, nameof(), new()
{
{ "熵核", },
{ "守护", },
});
= ;
Duration = ? : ;
RemainDuration = Duration;
OnEffectGained(caster);
if ()
{
Description = $"作出抉择:{熵核描述}";
Effect effect = new (Skill, caster, caster, true, Duration, 0, true, 0, )
{
DispelledType = DispelledType
};
WriteLine($"[ {caster} ] 获得了持续生命回复!持续时间:{Duration:0.##} {GameplayEquilibriumConstant.InGameTime}");
caster.Effects.Add(effect);
effect.OnEffectGained(caster);
GamingQueue?.LastRound.AddApplyEffects(caster, effect.EffectType);
}
else
{
Description = $"作出抉择:{守护描述}";
Effect effect = new (Skill, caster, caster, true, Duration, 0, true, 0, )
{
DispelledType = DispelledType
};
WriteLine($"[ {caster} ] 获得了持续生命回复!持续时间:{Duration:0.##} {GameplayEquilibriumConstant.InGameTime}");
caster.Effects.Add(effect);
effect.OnEffectGained(caster);
GamingQueue?.LastRound.AddApplyEffects(caster, effect.EffectType);
List<Character> allEnemys = [];
List<Character> allTeammates = [];
if (GamingQueue != null)
{
allEnemys = [.. GamingQueue.GetEnemies(caster).Where(c => c != caster && c.HP > 0)];
allTeammates = [.. GamingQueue.GetTeammates(caster).Where(c => c != caster && c.HP > 0)];
}
foreach (Character enemy in allEnemys)
{
Effect e = new (Skill, caster, caster, true, Duration, 0)
{
DispelledType = DispelledType.CannotBeDispelled
};
if (enemy.AGI <= caster.AGI || (enemy.AGI > caster.AGI && !CheckExemption(caster, enemy, e)))
{
WriteLine($"[ {caster} ] 嘲讽了 [ {enemy} ][ {enemy} ] 愤怒了!!持续时间:{Duration:0.##} {GameplayEquilibriumConstant.InGameTime}");
enemy.Effects.Add(e);
e.OnEffectGained(enemy);
GamingQueue?.LastRound.AddApplyEffects(enemy, e.EffectType);
}
}
foreach (Character teammate in allTeammates)
{
Effect e = new (Skill, caster, caster, true, Duration, 0, true, 0, )
{
DispelledType = DispelledType
};
WriteLine($"[ {caster} ] 对 [ {teammate} ] 施加了持续生命回复!持续时间:{Duration:0.##} {GameplayEquilibriumConstant.InGameTime}");
teammate.Effects.Add(e);
e.OnEffectGained(teammate);
GamingQueue?.LastRound.AddApplyEffects(teammate, e.EffectType);
}
}
GamingQueue?.LastRound.AddApplyEffects(caster, EffectType.Focusing, EffectType.HealOverTime);
}
}
}

View File

@ -1,5 +1,4 @@
using System.Text;
using Milimoe.FunGame.Core.Entity;
using Milimoe.FunGame.Core.Entity;
using Milimoe.FunGame.Core.Library.Constant;
namespace Oshima.FunGame.OshimaModules.Skills
@ -8,7 +7,7 @@ namespace Oshima.FunGame.OshimaModules.Skills
{
public static string TargetDescription(this Skill skill)
{
if (skill.IsNonDirectional)
if (skill.IsNonDirectional && skill.GamingQueue?.Map != null)
{
return skill.RangeTargetDescription();
}
@ -40,7 +39,7 @@ namespace Oshima.FunGame.OshimaModules.Skills
str = $"{(skill.CanSelectTargetCount > 1 ? $" {skill.CanSelectTargetCount} " : "")}目标";
}
if (skill.CanSelectTargetRange > 0)
if (skill.CanSelectTargetRange > 0 && skill.GamingQueue?.Map != null)
{
str += $"以及以{(skill.CanSelectTargetCount > 1 ? "" : "")}目标为中心,半径为 {skill.CanSelectTargetRange} 格的菱形区域中的等同阵营角色";
}

View File

@ -24,7 +24,7 @@ namespace Oshima.FunGame.OshimaModules.Skills
{
public override long Id => Skill.Id;
public override string Name => Skill.Name;
public override string Description => $"每次造成伤害或受到伤害时,投掷 1d10,结果为偶数时,造成的伤害提升 {伤害提升 * 100:0.##}%,受到伤害减少 {伤害减少 * 100:0.##}%;反之不产生任何效果。";
public override string Description => $"每次造成伤害或受到伤害时,进行投掷检定,结果为偶数时,造成的伤害提升 {伤害提升 * 100:0.##}%,受到伤害减少 {伤害减少 * 100:0.##}%;反之不产生任何效果。";
public bool { get; set; } = false;
public double { get; set; } = 1;
@ -33,19 +33,23 @@ namespace Oshima.FunGame.OshimaModules.Skills
public override double AlterActualDamageAfterCalculation(Character character, Character enemy, double damage, bool isNormalAttack, DamageType damageType, MagicType magicType, DamageResult damageResult, ref bool isEvaded, Dictionary<Effect, double> totalDamageBonus)
{
double bouns = 0;
if (damage > 0 && ( || (! && Random.Shared.Next(10) % 2 == 0)))
if (character == Skill.Character)
{
bool result = || (! && Random.Shared.Next(10) % 2 == 0);
WriteLine($"[ {character} ] 的八卦阵投掷结果为:{(result ? "" : "")}。");
if (damage > 0 && result)
{
Character c = character;
if (character == Skill.Character)
{
bouns = damage * ;
WriteLine($"[ {character} ] 发动了八卦阵!伤害提升了 {bouns:0.##} 点!");
WriteLine($"[ {character} ] 发动了八卦阵!伤害提升了 {Math.Abs(bouns):0.##} 点!");
}
else if (enemy == Skill.Character)
{
c = enemy;
bouns = -(damage * );
WriteLine($"[ {character} ] 发动了八卦阵!伤害减少了 {bouns:0.##} 点!");
WriteLine($"[ {character} ] 发动了八卦阵!伤害减少了 {Math.Abs(bouns):0.##} 点!");
}
if ()
{
@ -64,6 +68,7 @@ namespace Oshima.FunGame.OshimaModules.Skills
}
}
}
}
return bouns;
}
}

View File

@ -1,7 +1,6 @@
using Milimoe.FunGame.Core.Entity;
using Milimoe.FunGame.Core.Library.Common.Addon;
using Milimoe.FunGame.Core.Library.Constant;
using Milimoe.FunGame.Core.Model;
namespace Oshima.FunGame.OshimaModules.Skills
{
@ -13,7 +12,7 @@ namespace Oshima.FunGame.OshimaModules.Skills
public override string DispelDescription => Effects.Count > 0 ? Effects.First().DispelDescription : "";
public override double EPCost => 100;
public override double CD => 60;
public override double HardnessTime { get; set; } = 10;
public override double HardnessTime { get; set; } = 8;
public override bool CanSelectSelf => true;
public override bool CanSelectEnemy => false;

View File

@ -47,7 +47,7 @@ namespace Oshima.FunGame.OshimaModules.Skills
WriteLine($"[ {character} ] 发动了心灵之火!额外进行一次普通攻击!");
= ;
= true;
character.NormalAttack.Attack(GamingQueue, character, true, enemy);
character.NormalAttack.Attack(GamingQueue, character, null, enemy);
}
if (character == Skill.Character && )

View File

@ -46,10 +46,10 @@ namespace Oshima.FunGame.OshimaModules.Skills
checkQuota = dp.CheckActionTypeQuota(CharacterActionType.NormalAttack);
dp.AddActionType(CharacterActionType.NormalAttack, false);
}
caster.NormalAttack.Attack(GamingQueue, caster, true, targets);
caster.NormalAttack.Attack(GamingQueue, caster, null, targets);
if (checkQuota)
{
caster.NormalAttack.Attack(GamingQueue, caster, true, targets);
caster.NormalAttack.Attack(GamingQueue, caster, null, targets);
}
}
}

View File

@ -48,7 +48,10 @@ namespace Oshima.FunGame.OshimaModules.Skills
= true;
= true;
WriteLine($"[ {character} ] 发动了征服者的满层效果!");
DamageToEnemy(character, enemy, DamageType.True, magicType, );
DamageToEnemy(character, enemy, DamageType.True, magicType, , new()
{
TriggerEffects = false
});
ClearExPrimaryAttribute(character);
= 0;
= false;
@ -79,7 +82,10 @@ namespace Oshima.FunGame.OshimaModules.Skills
{
= true;
WriteLine($"[ {character} ] 发动了征服者!");
DamageToEnemy(character, enemy, DamageType.True, magicType, * );
DamageToEnemy(character, enemy, DamageType.True, magicType, * , new()
{
TriggerEffects = false
});
}
}
}

View File

@ -18,6 +18,7 @@ namespace Oshima.FunGame.OshimaModules.Skills
public override bool CanSelectEnemy => false;
public override bool CanSelectTeammate => true;
public override bool SelectAllTeammates => true;
public override bool AllowSelectDead => true;
public (Character? character = null) : base(SkillType.Magic, character)
{

View File

@ -18,6 +18,7 @@ namespace Oshima.FunGame.OshimaModules.Skills
public override bool CanSelectEnemy => false;
public override bool CanSelectTeammate => true;
public override int CanSelectTargetCount => 1;
public override bool AllowSelectDead => true;
public (Character? character = null) : base(SkillType.Magic, character)
{

View File

@ -250,7 +250,7 @@ namespace Oshima.FunGame.OshimaServers
StringBuilder builder = new();
CharacterStatistics stats = actionQueue.CharacterStatistics[character];
builder.AppendLine($"{count++}. [ {character.ToStringWithLevel()} ] {stats.Kills} / {stats.Assists}");
builder.AppendLine($"存活时长:{stats.LiveTime} / 存活回合数:{stats.LiveRound} / 行动回合数:{stats.ActionTurn}");
builder.AppendLine($"存活时长:{stats.LiveTime} / 存活回合数:{stats.LiveRound} / 行动回合数:{stats.ActionTurn} / 总计决策数:{stats.TurnDecisions} / 总计决策点:{stats.UseDecisionPoints}");
builder.AppendLine($"总计伤害:{stats.TotalDamage} / 总计物理伤害:{stats.TotalPhysicalDamage} / 总计魔法伤害:{stats.TotalMagicDamage}");
builder.AppendLine($"总承受伤害:{stats.TotalTakenDamage} / 总承受物理伤害:{stats.TotalTakenPhysicalDamage} / 总承受魔法伤害:{stats.TotalTakenMagicDamage}");
builder.Append($"每秒伤害:{stats.DamagePerSecond} / 每回合伤害:{stats.DamagePerTurn}");

View File

@ -193,7 +193,7 @@ namespace Oshima.FunGame.OshimaServers.Model
CharacterStatistics stats = actionQueue.GamingQueue.CharacterStatistics[character];
builder.AppendLine($"{index + ". "}[ {character.ToStringWithLevel()} ]");
builder.AppendLine($"技术得分:{stats.Rating:0.0#} / 击杀数:{stats.Kills} / 助攻数:{stats.Assists} / 死亡数:{stats.Deaths}");
builder.AppendLine($"存活时长:{stats.LiveTime:0.##} / 存活回合数:{stats.LiveRound} / 行动回合数:{stats.ActionTurn}");
builder.AppendLine($"存活时长:{stats.LiveTime:0.##} / 存活回合数:{stats.LiveRound} / 行动回合数:{stats.ActionTurn} / 总计决策数:{stats.TurnDecisions} / 总计决策点:{stats.UseDecisionPoints}");
builder.AppendLine($"控制时长:{stats.ControlTime:0.##} / 总计治疗:{stats.TotalHeal:0.##} / 护盾抵消:{stats.TotalShield:0.##}");
builder.AppendLine($"总计伤害:{stats.TotalDamage:0.##} / 总计物理伤害:{stats.TotalPhysicalDamage:0.##} / 总计魔法伤害:{stats.TotalMagicDamage:0.##}");
builder.AppendLine($"总承受伤害:{stats.TotalTakenDamage:0.##} / 总承受物理伤害:{stats.TotalTakenPhysicalDamage:0.##} / 总承受魔法伤害:{stats.TotalTakenMagicDamage:0.##}");

View File

@ -173,7 +173,7 @@ namespace Oshima.FunGame.OshimaServers.Service
stats.MVPs++;
mvpBuilder.AppendLine($"[ {mvp.ToStringWithLevel()} ]");
mvpBuilder.AppendLine($"技术得分:{stats.Rating:0.0#} / 击杀数:{stats.Kills} / 助攻数:{stats.Assists}{(actionQueue.MaxRespawnTimes != 0 ? " / " + stats.Deaths : "")}");
mvpBuilder.AppendLine($"存活时长:{stats.LiveTime:0.##} / 存活回合数:{stats.LiveRound} / 行动回合数:{stats.ActionTurn}");
mvpBuilder.AppendLine($"存活时长:{stats.LiveTime:0.##} / 存活回合数:{stats.LiveRound} / 行动回合数:{stats.ActionTurn} / 总计决策数:{stats.TurnDecisions} / 总计决策点:{stats.UseDecisionPoints}");
mvpBuilder.AppendLine($"控制时长:{stats.ControlTime:0.##} / 总计治疗:{stats.TotalHeal:0.##} / 护盾抵消:{stats.TotalShield:0.##}");
mvpBuilder.AppendLine($"总计伤害:{stats.TotalDamage:0.##} / 总计物理伤害:{stats.TotalPhysicalDamage:0.##} / 总计魔法伤害:{stats.TotalMagicDamage:0.##}");
mvpBuilder.AppendLine($"总承受伤害:{stats.TotalTakenDamage:0.##} / 总承受物理伤害:{stats.TotalTakenPhysicalDamage:0.##} / 总承受魔法伤害:{stats.TotalTakenMagicDamage:0.##}");
@ -191,7 +191,7 @@ namespace Oshima.FunGame.OshimaServers.Service
CharacterStatistics stats = actionQueue.CharacterStatistics[character];
builder.AppendLine($"{count + ". "}[ {character.ToStringWithLevel()} ]");
builder.AppendLine($"技术得分:{stats.Rating:0.0#} / 击杀数:{stats.Kills} / 助攻数:{stats.Assists}{(actionQueue.MaxRespawnTimes != 0 ? " / " + stats.Deaths : "")}");
builder.AppendLine($"存活时长:{stats.LiveTime:0.##} / 存活回合数:{stats.LiveRound} / 行动回合数:{stats.ActionTurn}");
builder.AppendLine($"存活时长:{stats.LiveTime:0.##} / 存活回合数:{stats.LiveRound} / 行动回合数:{stats.ActionTurn} / 总计决策数:{stats.TurnDecisions} / 总计决策点:{stats.UseDecisionPoints}");
builder.AppendLine($"控制时长:{stats.ControlTime:0.##} / 总计治疗:{stats.TotalHeal:0.##} / 护盾抵消:{stats.TotalShield:0.##}");
builder.AppendLine($"总计伤害:{stats.TotalDamage:0.##} / 总计物理伤害:{stats.TotalPhysicalDamage:0.##} / 总计魔法伤害:{stats.TotalMagicDamage:0.##}");
builder.AppendLine($"总承受伤害:{stats.TotalTakenDamage:0.##} / 总承受物理伤害:{stats.TotalTakenPhysicalDamage:0.##} / 总承受魔法伤害:{stats.TotalTakenMagicDamage:0.##}");
@ -387,7 +387,7 @@ namespace Oshima.FunGame.OshimaServers.Service
mvpBuilder.AppendLine($"=== 本场比赛最佳角色 ===");
mvpBuilder.AppendLine($"{(team != null ? "[ " + team.Name + " ] " : "")}[ {mvp.ToStringWithLevel()} ]");
mvpBuilder.AppendLine($"技术得分:{stats.Rating:0.0#} / 击杀数:{stats.Kills} / 助攻数:{stats.Assists}{(actionQueue.MaxRespawnTimes != 0 ? " / " + stats.Deaths : "")}");
mvpBuilder.AppendLine($"存活时长:{stats.LiveTime:0.##} / 存活回合数:{stats.LiveRound} / 行动回合数:{stats.ActionTurn}");
mvpBuilder.AppendLine($"存活时长:{stats.LiveTime:0.##} / 存活回合数:{stats.LiveRound} / 行动回合数:{stats.ActionTurn} / 总计决策数:{stats.TurnDecisions} / 总计决策点:{stats.UseDecisionPoints}");
mvpBuilder.AppendLine($"控制时长:{stats.ControlTime:0.##} / 总计治疗:{stats.TotalHeal:0.##} / 护盾抵消:{stats.TotalShield:0.##}");
mvpBuilder.AppendLine($"总计伤害:{stats.TotalDamage:0.##} / 总计物理伤害:{stats.TotalPhysicalDamage:0.##} / 总计魔法伤害:{stats.TotalMagicDamage:0.##}");
mvpBuilder.AppendLine($"总承受伤害:{stats.TotalTakenDamage:0.##} / 总承受物理伤害:{stats.TotalTakenPhysicalDamage:0.##} / 总承受魔法伤害:{stats.TotalTakenMagicDamage:0.##}");

View File

@ -45,13 +45,18 @@ namespace Oshima.FunGame.OshimaServers.Service
FunGameConstant.Characters.Add(new ColdBlue());
FunGameConstant.Characters.Add(new dddovo());
FunGameConstant.Characters.Add(new Quduoduo());
FunGameConstant.Characters.Add(new XReouni());
FunGameConstant.Characters.Add(new Neptune());
FunGameConstant.Characters.Add(new Ryuko());
FunGameConstant.Skills.AddRange([new (), new (), new (), new (), new (), new (), new (), new (), new (), new (),
new (), new (), new (), new (), new (), new (), new ()]);
FunGameConstant.SuperSkills.AddRange([new (), new (), new (), new (), new (), new (), new (), new (), new (), new (), new (), new ()]);
FunGameConstant.SuperSkills.AddRange([new (), new (), new (), new (), new (), new (), new (), new (), new (),
new (), new (), new (), new (), new (), new ()]);
FunGameConstant.PassiveSkills.AddRange([new META马(), new (), new (), new (), new (), new (), new (), new (), new (), new (), new (), new ()]);
FunGameConstant.PassiveSkills.AddRange([new META马(), new (), new (), new (), new (), new (), new (), new (), new (),
new (), new (), new (), new (), new (), new ()]);
FunGameConstant.CommonPassiveSkills.AddRange([new (), new (), new (), new (), new ()]);
@ -1230,6 +1235,51 @@ namespace Oshima.FunGame.OshimaServers.Service
};
character.Skills.Add();
}
if (id == 14)
{
Skill = new (character)
{
Level = passiveLevel
};
character.Skills.Add();
Skill = new (character)
{
Level = superLevel
};
character.Skills.Add();
}
if (id == 15)
{
Skill = new (character)
{
Level = passiveLevel
};
character.Skills.Add();
Skill = new (character)
{
Level = superLevel
};
character.Skills.Add();
}
if (id == 17)
{
Skill = new (character)
{
Level = passiveLevel
};
character.Skills.Add();
Skill = new (character)
{
Level = superLevel
};
character.Skills.Add();
}
}
public static bool UseItem(Item item, int times, User user, IEnumerable<Character> targets, out string msg)
@ -1793,7 +1843,7 @@ namespace Oshima.FunGame.OshimaServers.Service
}
else
{
baseScore = baseScore * 0.7 + 0.4 * (stats.Kills / (stats.Kills + stats.Deaths + 0.01));
baseScore = baseScore * 0.9 + 0.6 * (stats.Kills / (stats.Kills + stats.Deaths + 0.01));
}
// 伤害贡献
@ -1819,16 +1869,12 @@ namespace Oshima.FunGame.OshimaServers.Service
{
if (stats.Assists > team.Score) stats.Assists = team.Score;
teamContribution = (stats.Kills + stats.Assists) / (team.Score + 0.01);
if (team.IsWinner)
{
teamContribution += 0.15;
}
}
// 权重设置
double k = stats.Deaths > 0 ? 0.2 : 0.075; // 伤害贡献权重
double l = stats.Deaths > 0 ? 0.2 : 0.05; // 存活时间权重
double t = stats.Deaths > 0 ? 0.2 : 0.075; // 参团率权重
double k = stats.Deaths == 0 ? 0.2 : 0.075; // 伤害贡献权重
double l = stats.Deaths == 0 ? 0.2 : 0.05; // 存活时间权重
double t = stats.Deaths == 0 ? 0.2 : 0.075; // 参团率权重
// 计算最终评分
double rating = baseScore + k * damageContribution + l * liveTimeContribution + t * teamContribution;

View File

@ -88,32 +88,15 @@ namespace Oshima.FunGame.OshimaServers.Service
// M = 5, W = 0, P1 = 0, P3 = 2
// M = 5, W = 1, P1 = 0, P3 = 0
List<Character> list = [.. FunGameConstant.Characters];
List<Character> list = [.. FunGameConstant.Characters.Select(c => c.Copy())];
if (list.Count > 11)
if (list.Count > 10)
{
if (PrintOut) Console.WriteLine();
if (PrintOut) Console.WriteLine("Start!!!");
if (PrintOut) Console.WriteLine();
Character character1 = list[0].Copy();
Character character2 = list[1].Copy();
Character character3 = list[2].Copy();
Character character4 = list[3].Copy();
Character character5 = list[4].Copy();
Character character6 = list[5].Copy();
Character character7 = list[6].Copy();
Character character8 = list[7].Copy();
Character character9 = list[8].Copy();
Character character10 = list[9].Copy();
Character character11 = list[10].Copy();
Character character12 = list[11].Copy();
List<Character> characters = [
character1, character2, character3, character4,
character5, character6, character7, character8,
character9, character10, character11, character12
];
List<Character> characters = [.. list.OrderBy(o => Random.Shared.Next()).Take(10)];
int clevel = 10;
int slevel = 2;
@ -410,7 +393,7 @@ namespace Oshima.FunGame.OshimaServers.Service
double timeLapse = actionQueue.TimeLapse();
totalTime = actionQueue.TotalTime;
nextDropTime -= timeLapse;
Thread.Sleep(1);
//Thread.Sleep(1);
if (roundMsg != "")
{
@ -483,7 +466,7 @@ namespace Oshima.FunGame.OshimaServers.Service
stats.MVPs++;
mvpBuilder.AppendLine($"{(tgq != null ? "[ " + tgq.GetTeamFromEliminated(mvp)?.Name + " ] " : "")}[ {mvp.ToStringWithLevel()} ]");
mvpBuilder.AppendLine($"技术得分:{stats.Rating:0.0#} / 击杀数:{stats.Kills} / 助攻数:{stats.Assists}{(actionQueue.MaxRespawnTimes != 0 ? " / " + stats.Deaths : "")}");
mvpBuilder.AppendLine($"存活时长:{stats.LiveTime:0.##} / 存活回合数:{stats.LiveRound} / 行动回合数:{stats.ActionTurn}");
mvpBuilder.AppendLine($"存活时长:{stats.LiveTime:0.##} / 存活回合数:{stats.LiveRound} / 行动回合数:{stats.ActionTurn} / 总计决策数:{stats.TurnDecisions} / 总计决策点:{stats.UseDecisionPoints}");
mvpBuilder.AppendLine($"控制时长:{stats.ControlTime:0.##} / 总计治疗:{stats.TotalHeal:0.##} / 护盾抵消:{stats.TotalShield:0.##}");
mvpBuilder.AppendLine($"总计伤害:{stats.TotalDamage:0.##} / 总计物理伤害:{stats.TotalPhysicalDamage:0.##} / 总计魔法伤害:{stats.TotalMagicDamage:0.##}");
mvpBuilder.AppendLine($"总承受伤害:{stats.TotalTakenDamage:0.##} / 总承受物理伤害:{stats.TotalTakenPhysicalDamage:0.##} / 总承受魔法伤害:{stats.TotalTakenMagicDamage:0.##}");
@ -546,7 +529,7 @@ namespace Oshima.FunGame.OshimaServers.Service
CharacterStatistics stats = tgq.CharacterStatistics[character];
builder.AppendLine($"{(isWeb ? count + "." : ("[ " + tgq.GetTeamFromEliminated(character)?.Name + " ]" ?? ""))} [ {character.ToStringWithLevel()} ]");
builder.AppendLine($"技术得分:{stats.Rating:0.0#} / 击杀数:{stats.Kills} / 助攻数:{stats.Assists}{(tgq.MaxRespawnTimes != 0 ? " / " + stats.Deaths : "")}");
builder.AppendLine($"存活时长:{stats.LiveTime:0.##} / 存活回合数:{stats.LiveRound} / 行动回合数:{stats.ActionTurn}");
builder.AppendLine($"存活时长:{stats.LiveTime:0.##} / 存活回合数:{stats.LiveRound} / 行动回合数:{stats.ActionTurn} / 总计决策数:{stats.TurnDecisions} / 总计决策点:{stats.UseDecisionPoints}");
builder.AppendLine($"控制时长:{stats.ControlTime:0.##} / 总计治疗:{stats.TotalHeal:0.##} / 护盾抵消:{stats.TotalShield:0.##}");
builder.AppendLine($"总计伤害:{stats.TotalDamage:0.##} / 总计物理伤害:{stats.TotalPhysicalDamage:0.##} / 总计魔法伤害:{stats.TotalMagicDamage:0.##}");
builder.AppendLine($"总承受伤害:{stats.TotalTakenDamage:0.##} / 总承受物理伤害:{stats.TotalTakenPhysicalDamage:0.##} / 总承受魔法伤害:{stats.TotalTakenMagicDamage:0.##}");
@ -579,7 +562,7 @@ namespace Oshima.FunGame.OshimaServers.Service
CharacterStatistics stats = actionQueue.CharacterStatistics[character];
builder.AppendLine($"{(isWeb ? count + ". " : "")}[ {character.ToStringWithLevel()} ]");
builder.AppendLine($"技术得分:{stats.Rating:0.0#} / 击杀数:{stats.Kills} / 助攻数:{stats.Assists}{(actionQueue.MaxRespawnTimes != 0 ? " / " + stats.Deaths : "")}");
builder.AppendLine($"存活时长:{stats.LiveTime:0.##} / 存活回合数:{stats.LiveRound} / 行动回合数:{stats.ActionTurn}");
builder.AppendLine($"存活时长:{stats.LiveTime:0.##} / 存活回合数:{stats.LiveRound} / 行动回合数:{stats.ActionTurn} / 总计决策数:{stats.TurnDecisions} / 总计决策点:{stats.UseDecisionPoints}");
builder.AppendLine($"控制时长:{stats.ControlTime:0.##} / 总计治疗:{stats.TotalHeal:0.##} / 护盾抵消:{stats.TotalShield:0.##}");
builder.AppendLine($"总计伤害:{stats.TotalDamage:0.##} / 总计物理伤害:{stats.TotalPhysicalDamage:0.##} / 总计魔法伤害:{stats.TotalMagicDamage:0.##}");
builder.AppendLine($"总承受伤害:{stats.TotalTakenDamage:0.##} / 总承受物理伤害:{stats.TotalTakenPhysicalDamage:0.##} / 总承受魔法伤害:{stats.TotalTakenMagicDamage:0.##}");
@ -1160,6 +1143,8 @@ namespace Oshima.FunGame.OshimaServers.Service
totalStats.Top3s += stats.Top3s;
totalStats.Loses += stats.Loses;
totalStats.MVPs += stats.MVPs;
totalStats.UseDecisionPoints += stats.UseDecisionPoints;
totalStats.TurnDecisions += stats.TurnDecisions;
if (totalStats.Plays != 0)
{
totalStats.AvgDamage = Calculation.Round2Digits(totalStats.TotalDamage / totalStats.Plays);
@ -1179,6 +1164,8 @@ namespace Oshima.FunGame.OshimaServers.Service
totalStats.AvgEarnedMoney = totalStats.TotalEarnedMoney / totalStats.Plays;
totalStats.Winrate = Calculation.Round4Digits(Convert.ToDouble(totalStats.Wins) / Convert.ToDouble(totalStats.Plays));
totalStats.Top3rate = Calculation.Round4Digits(Convert.ToDouble(totalStats.Top3s) / Convert.ToDouble(totalStats.Plays));
totalStats.AvgUseDecisionPoints = totalStats.UseDecisionPoints / totalStats.Plays;
totalStats.AvgTurnDecisions = totalStats.TurnDecisions / totalStats.Plays;
}
if (totalStats.LiveRound != 0) totalStats.DamagePerRound = Calculation.Round2Digits(totalStats.TotalDamage / totalStats.LiveRound);
if (totalStats.ActionTurn != 0) totalStats.DamagePerTurn = Calculation.Round2Digits(totalStats.TotalDamage / totalStats.ActionTurn);

View File

@ -78,6 +78,8 @@ namespace Oshima.FunGame.WebAPI.Controllers
builder.AppendLine($"每回合伤害:{stats.DamagePerRound:0.##}");
builder.AppendLine($"每行动回合伤害:{stats.DamagePerTurn:0.##}");
builder.AppendLine($"每秒伤害:{stats.DamagePerSecond:0.##}");
builder.AppendLine($"总计回合决策数:{stats.TurnDecisions:0.##} / 场均:{stats.AvgTurnDecisions:0.##}");
builder.AppendLine($"总计使用决策点:{stats.UseDecisionPoints:0.##} / 场均:{stats.AvgUseDecisionPoints:0.##}");
builder.AppendLine($"总计击杀数:{stats.Kills}" + (stats.Plays != 0 ? $" / 场均:{(double)stats.Kills / stats.Plays:0.##}" : ""));
builder.AppendLine($"总计死亡数:{stats.Deaths}" + (stats.Plays != 0 ? $" / 场均:{(double)stats.Deaths / stats.Plays:0.##}" : ""));
builder.AppendLine($"击杀死亡比:{(stats.Deaths == 0 ? stats.Kills : ((double)stats.Kills / stats.Deaths)):0.##}");
@ -137,6 +139,8 @@ namespace Oshima.FunGame.WebAPI.Controllers
builder.AppendLine($"每回合伤害:{stats.DamagePerRound:0.##}");
builder.AppendLine($"每行动回合伤害:{stats.DamagePerTurn:0.##}");
builder.AppendLine($"每秒伤害:{stats.DamagePerSecond:0.##}");
builder.AppendLine($"总计回合决策数:{stats.TurnDecisions:0.##} / 场均:{stats.AvgTurnDecisions:0.##}");
builder.AppendLine($"总计使用决策点:{stats.UseDecisionPoints:0.##} / 场均:{stats.AvgUseDecisionPoints:0.##}");
builder.AppendLine($"总计击杀数:{stats.Kills}" + (stats.Plays != 0 ? $" / 场均:{(double)stats.Kills / stats.Plays:0.##}" : ""));
builder.AppendLine($"总计死亡数:{stats.Deaths}" + (stats.Plays != 0 ? $" / 场均:{(double)stats.Deaths / stats.Plays:0.##}" : ""));
builder.AppendLine($"击杀死亡比:{(stats.Deaths == 0 ? stats.Kills : ((double)stats.Kills / stats.Deaths)):0.##}");
@ -4557,14 +4561,15 @@ namespace Oshima.FunGame.WebAPI.Controllers
}
[HttpPost("signin")]
public string SignIn([FromQuery] long? uid = null)
public string SignIn([FromQuery] long uid = 0)
{
long userid = uid ?? Convert.ToInt64("10" + Verification.CreateVerifyCode(VerifyCodeType.NumberVerifyCode, 11));
PluginConfig pc = FunGameService.GetUserConfig(userid, out _);
try
{
PluginConfig pc = FunGameService.GetUserConfig(uid, out _);
if (pc.Count > 0)
{
string msg = "";
User user = FunGameService.GetUser(pc);
bool sign = false;
int days = 0;
@ -4586,25 +4591,35 @@ namespace Oshima.FunGame.WebAPI.Controllers
if (sign)
{
FunGameService.ReleaseUserSemaphoreSlim(userid);
return $"你今天已经签过到了哦!" +
msg = $"你今天已经签过到了哦!" +
(lastTime != DateTime.MinValue ? $"\r\n你上一次签到时间{lastTime.ToString(General.GeneralDateTimeFormatChinese)},连续签到:{days} 天。" : "");
}
string msg = FunGameService.GetSignInResult(user, days);
pc.Add("user", user);
else
{
msg = FunGameService.GetSignInResult(user, days);
pc.Add("signed", true);
pc.Add("days", days + 1);
pc.Add("lastTime", newLastTime);
FunGameService.SetUserConfigAndReleaseSemaphoreSlim(userid, pc, user);
}
FunGameService.SetUserConfigButNotRelease(uid, pc, user);
return msg + "\r\n提示发送【帮助】来获取更多玩法指令";
}
else
{
FunGameService.ReleaseUserSemaphoreSlim(userid);
return noSaved;
}
}
catch (Exception e)
{
if (Logger.IsEnabled(Microsoft.Extensions.Logging.LogLevel.Error)) Logger.LogError(e, "Error: {e}", e);
return busy;
}
finally
{
FunGameService.ReleaseUserSemaphoreSlim(uid);
}
}
[HttpPost("clubjoin")]
public string ClubJoin([FromQuery] long? uid = null, [FromQuery] long? id = null)