forked from Oshima-Studios/OshimaGameModule
大量技能物品修改,补全高阶主装备
This commit is contained in:
parent
1a824a0295
commit
88af0b3ad0
@ -38,6 +38,7 @@ namespace Oshima.FunGame.OshimaModules.Effects.OpenEffects
|
||||
|
||||
private void Resolve(Character character, bool remove = false)
|
||||
{
|
||||
Descriptions.Clear();
|
||||
foreach (string key in Values.Keys)
|
||||
{
|
||||
string value = Values[key].ToString() ?? "";
|
||||
@ -146,7 +147,7 @@ namespace Oshima.FunGame.OshimaModules.Effects.OpenEffects
|
||||
}
|
||||
}
|
||||
RealDynamicsValues["shtr"] = shtr;
|
||||
Descriptions.Add($"减少角色的所有主动技能 {shtr:0.##} {GameplayEquilibriumConstant.InGameTime}硬直时间。");
|
||||
Descriptions.Add($"{(shtr < 0 ? "增加" : "减少")}角色的所有主动技能 {Math.Abs(shtr):0.##} {GameplayEquilibriumConstant.InGameTime}硬直时间。");
|
||||
}
|
||||
break;
|
||||
case "nahtr":
|
||||
@ -154,14 +155,14 @@ namespace Oshima.FunGame.OshimaModules.Effects.OpenEffects
|
||||
{
|
||||
if (!remove)
|
||||
{
|
||||
character.NormalAttack.HardnessTime -= nahtr;
|
||||
character.NormalAttack.ExHardnessTime -= nahtr;
|
||||
}
|
||||
else if (RealDynamicsValues.TryGetValue("nahtr", out double current))
|
||||
{
|
||||
character.NormalAttack.HardnessTime += current;
|
||||
character.NormalAttack.ExHardnessTime += current;
|
||||
}
|
||||
RealDynamicsValues["nahtr"] = nahtr;
|
||||
Descriptions.Add($"减少角色的普通攻击 {nahtr:0.##} {GameplayEquilibriumConstant.InGameTime}硬直时间。");
|
||||
Descriptions.Add($"{(nahtr < 0 ? "增加" : "减少")}角色的普通攻击 {Math.Abs(nahtr):0.##} {GameplayEquilibriumConstant.InGameTime}硬直时间。");
|
||||
}
|
||||
break;
|
||||
case "shtr2":
|
||||
@ -192,7 +193,7 @@ namespace Oshima.FunGame.OshimaModules.Effects.OpenEffects
|
||||
}
|
||||
}
|
||||
RealDynamicsValues["shtr2"] = shtr2;
|
||||
Descriptions.Add($"减少角色的所有主动技能 {shtr2 * 100:0.##}% {GameplayEquilibriumConstant.InGameTime}硬直时间。");
|
||||
Descriptions.Add($"{(shtr2 < 0 ? "增加" : "减少")}角色的所有主动技能 {Math.Abs(shtr2 * 100):0.##}% 硬直时间。");
|
||||
}
|
||||
break;
|
||||
case "nahtr2":
|
||||
@ -200,14 +201,14 @@ namespace Oshima.FunGame.OshimaModules.Effects.OpenEffects
|
||||
{
|
||||
if (!remove)
|
||||
{
|
||||
character.NormalAttack.HardnessTime -= character.NormalAttack.HardnessTime * nahtr2;
|
||||
character.NormalAttack.ExHardnessTime2 -= nahtr2;
|
||||
}
|
||||
else if (RealDynamicsValues.TryGetValue("nahtr2", out double current))
|
||||
{
|
||||
character.NormalAttack.HardnessTime += character.NormalAttack.HardnessTime * current;
|
||||
character.NormalAttack.ExHardnessTime2 += current;
|
||||
}
|
||||
RealDynamicsValues["nahtr2"] = nahtr2;
|
||||
Descriptions.Add($"减少角色的普通攻击 {nahtr2 * 100:0.##}% {GameplayEquilibriumConstant.InGameTime}硬直时间。");
|
||||
Descriptions.Add($"{(nahtr2 < 0 ? "增加" : "减少")}角色的普通攻击 {Math.Abs(nahtr2 * 100):0.##}% 硬直时间。");
|
||||
}
|
||||
break;
|
||||
case "exacc":
|
||||
@ -550,14 +551,7 @@ namespace Oshima.FunGame.OshimaModules.Effects.OpenEffects
|
||||
string mdfvalueKey = Values.Keys.FirstOrDefault(s => s.Equals("mdfvalue", StringComparison.CurrentCultureIgnoreCase)) ?? "";
|
||||
if (mdfvalueKey.Length > 0 && double.TryParse(Values[mdfvalueKey].ToString(), out mdfValue))
|
||||
{
|
||||
if (magicType == MagicType.None)
|
||||
{
|
||||
character.MDF.AddAllValue(mdfValue);
|
||||
}
|
||||
else
|
||||
{
|
||||
character.MDF[magicType] += mdfValue;
|
||||
}
|
||||
character.MDF[magicType] += mdfValue;
|
||||
}
|
||||
}
|
||||
else if (RealDynamicsValues.TryGetValue("mdftype", out double currentType))
|
||||
@ -565,14 +559,7 @@ namespace Oshima.FunGame.OshimaModules.Effects.OpenEffects
|
||||
magicType = (MagicType)(int)currentType;
|
||||
if (RealDynamicsValues.TryGetValue("mdfvalue", out mdfValue))
|
||||
{
|
||||
if (magicType == MagicType.None)
|
||||
{
|
||||
character.MDF.AddAllValue(-mdfValue);
|
||||
}
|
||||
else
|
||||
{
|
||||
character.MDF[magicType] -= mdfValue;
|
||||
}
|
||||
character.MDF[magicType] -= mdfValue;
|
||||
}
|
||||
}
|
||||
RealDynamicsValues["mdftype"] = mdftype;
|
||||
@ -580,6 +567,21 @@ namespace Oshima.FunGame.OshimaModules.Effects.OpenEffects
|
||||
Descriptions.Add($"{(mdfValue >= 0 ? "增加" : "减少")}角色 {Math.Abs(mdfValue) * 100:0.##}% {CharacterSet.GetMagicResistanceName(magicType)}。");
|
||||
}
|
||||
break;
|
||||
case "exls":
|
||||
if (double.TryParse(value, out double exls))
|
||||
{
|
||||
if (!remove)
|
||||
{
|
||||
character.Lifesteal += exls;
|
||||
}
|
||||
else if (RealDynamicsValues.TryGetValue("exls", out double current))
|
||||
{
|
||||
character.Lifesteal -= current;
|
||||
}
|
||||
RealDynamicsValues["exls"] = exls;
|
||||
Descriptions.Add($"{(exls >= 0 ? "增加" : "减少")}角色 {Math.Abs(exls) * 100:0.##}% 生命偷取。");
|
||||
}
|
||||
break;
|
||||
}
|
||||
}
|
||||
}
|
||||
|
||||
@ -23,44 +23,12 @@ namespace Oshima.FunGame.OshimaModules.Effects.OpenEffects
|
||||
{
|
||||
RemainDurationTurn = DurationTurn;
|
||||
}
|
||||
switch (魔法类型)
|
||||
{
|
||||
case MagicType.Starmark:
|
||||
case MagicType.PurityNatural:
|
||||
case MagicType.PurityContemporary:
|
||||
case MagicType.Bright:
|
||||
case MagicType.Shadow:
|
||||
case MagicType.Element:
|
||||
case MagicType.Aster:
|
||||
case MagicType.SpatioTemporal:
|
||||
character.MDF[魔法类型] += 实际加成;
|
||||
break;
|
||||
case MagicType.None:
|
||||
default:
|
||||
character.MDF.AddAllValue(实际加成);
|
||||
break;
|
||||
}
|
||||
character.MDF[魔法类型] += 实际加成;
|
||||
}
|
||||
|
||||
public override void OnEffectLost(Character character)
|
||||
{
|
||||
switch (魔法类型)
|
||||
{
|
||||
case MagicType.Starmark:
|
||||
case MagicType.PurityNatural:
|
||||
case MagicType.PurityContemporary:
|
||||
case MagicType.Bright:
|
||||
case MagicType.Shadow:
|
||||
case MagicType.Element:
|
||||
case MagicType.Aster:
|
||||
case MagicType.SpatioTemporal:
|
||||
character.MDF[魔法类型] -= 实际加成;
|
||||
break;
|
||||
case MagicType.None:
|
||||
default:
|
||||
character.MDF.AddAllValue(-实际加成);
|
||||
break;
|
||||
}
|
||||
character.MDF[魔法类型] -= 实际加成;
|
||||
}
|
||||
|
||||
public ExMDF(Skill skill, Dictionary<string, object> args, Character? source = null) : base(skill, args)
|
||||
|
||||
@ -7,7 +7,7 @@ namespace Oshima.FunGame.OshimaModules.Effects.OpenEffects
|
||||
{
|
||||
public override long Id => (long)EffectID.NormalAttackHardTimeReduce;
|
||||
public override string Name => Skill.Name;
|
||||
public override string Description => $"减少角色的普通攻击 {实际硬直时间减少:0.##} {GameplayEquilibriumConstant.InGameTime}硬直时间。" + (Source != null && (Skill.Character != Source || Skill is not OpenSkill) ? $"来自:[ {Source} ]" + (Skill.Item != null ? $" 的 [ {Skill.Item.Name} ]" : (Skill is OpenSkill ? "" : $" 的 [ {Skill.Name} ]")) : "");
|
||||
public override string Description => $"{(实际硬直时间减少 < 0 ? "增加" : "减少")}角色的普通攻击 {实际硬直时间减少:0.##} {GameplayEquilibriumConstant.InGameTime}硬直时间。" + (Source != null && (Skill.Character != Source || Skill is not OpenSkill) ? $"来自:[ {Source} ]" + (Skill.Item != null ? $" 的 [ {Skill.Item.Name} ]" : (Skill is OpenSkill ? "" : $" 的 [ {Skill.Name} ]")) : "");
|
||||
|
||||
private readonly double 实际硬直时间减少 = 0;
|
||||
|
||||
@ -21,12 +21,12 @@ namespace Oshima.FunGame.OshimaModules.Effects.OpenEffects
|
||||
{
|
||||
RemainDurationTurn = DurationTurn;
|
||||
}
|
||||
character.NormalAttack.HardnessTime -= 实际硬直时间减少;
|
||||
character.NormalAttack.ExHardnessTime -= 实际硬直时间减少;
|
||||
}
|
||||
|
||||
public override void OnEffectLost(Character character)
|
||||
{
|
||||
character.NormalAttack.HardnessTime += 实际硬直时间减少;
|
||||
character.NormalAttack.ExHardnessTime += 实际硬直时间减少;
|
||||
}
|
||||
|
||||
public NormalAttackHardTimeReduce(Skill skill, Dictionary<string, object> args, Character? source = null) : base(skill, args)
|
||||
|
||||
@ -7,7 +7,7 @@ namespace Oshima.FunGame.OshimaModules.Effects.OpenEffects
|
||||
{
|
||||
public override long Id => (long)EffectID.NormalAttackHardTimeReduce2;
|
||||
public override string Name => Skill.Name;
|
||||
public override string Description => $"减少角色的普通攻击 {减少比例 * 100:0.##}% 硬直时间。" + (Source != null && (Skill.Character != Source || Skill is not OpenSkill) ? $"来自:[ {Source} ]" + (Skill.Item != null ? $" 的 [ {Skill.Item.Name} ]" : (Skill is OpenSkill ? "" : $" 的 [ {Skill.Name} ]")) : "");
|
||||
public override string Description => $"{(减少比例 < 0 ? "增加" : "减少")}角色的普通攻击 {减少比例 * 100:0.##}% 硬直时间。" + (Source != null && (Skill.Character != Source || Skill is not OpenSkill) ? $"来自:[ {Source} ]" + (Skill.Item != null ? $" 的 [ {Skill.Item.Name} ]" : (Skill is OpenSkill ? "" : $" 的 [ {Skill.Name} ]")) : "");
|
||||
|
||||
private readonly double 减少比例 = 0;
|
||||
|
||||
@ -21,12 +21,12 @@ namespace Oshima.FunGame.OshimaModules.Effects.OpenEffects
|
||||
{
|
||||
RemainDurationTurn = DurationTurn;
|
||||
}
|
||||
character.NormalAttack.HardnessTime -= character.NormalAttack.HardnessTime * 减少比例;
|
||||
character.NormalAttack.ExHardnessTime2 -= 减少比例;
|
||||
}
|
||||
|
||||
public override void OnEffectLost(Character character)
|
||||
{
|
||||
character.NormalAttack.HardnessTime += character.NormalAttack.HardnessTime * 减少比例;
|
||||
character.NormalAttack.ExHardnessTime2 += 减少比例;
|
||||
}
|
||||
|
||||
public NormalAttackHardTimeReduce2(Skill skill, Dictionary<string, object> args, Character? source = null) : base(skill, args)
|
||||
|
||||
@ -71,14 +71,14 @@ namespace Oshima.FunGame.OshimaModules.Effects.PassiveEffects
|
||||
RemainDurationTurn = DurationTurn;
|
||||
}
|
||||
character.ExDEFPercentage -= _DEFReductionPercent;
|
||||
character.MDF.AddAllValue(-_MDFReductionPercent);
|
||||
character.MDF[character.MagicType] -= _MDFReductionPercent;
|
||||
AddEffectTypeToCharacter(character, [EffectType.Weaken, EffectType.GrievousWound]);
|
||||
}
|
||||
|
||||
public override void OnEffectLost(Character character)
|
||||
{
|
||||
character.ExDEFPercentage += _DEFReductionPercent;
|
||||
character.MDF.AddAllValue(_MDFReductionPercent);
|
||||
character.MDF[character.MagicType] += _MDFReductionPercent;
|
||||
RemoveEffectTypesFromCharacter(character);
|
||||
}
|
||||
}
|
||||
|
||||
@ -59,7 +59,7 @@ namespace Oshima.FunGame.OshimaModules.Effects.SkillEffects
|
||||
}
|
||||
else
|
||||
{
|
||||
e = new(Skill, caster, _durativeWithoutDuration, _durative, _duration, _durationTurn);
|
||||
e = new(Skill, caster, _durativeWithoutDuration, _durative, _duration + _levelGrowth * (Level - 1), Convert.ToInt32(_durationTurn + _levelGrowth * (Level - 1)));
|
||||
target.Effects.Add(e);
|
||||
e.OnEffectGained(target);
|
||||
e.IsDebuff = isDebuff;
|
||||
|
||||
@ -59,7 +59,7 @@ namespace Oshima.FunGame.OshimaModules.Effects.SkillEffects
|
||||
}
|
||||
else
|
||||
{
|
||||
e = new(Skill, caster, _durativeWithoutDuration, _durative, _duration, _durationTurn);
|
||||
e = new(Skill, caster, _durativeWithoutDuration, _durative, _duration + _levelGrowth * (Level - 1), Convert.ToInt32(_durationTurn + _levelGrowth * (Level - 1)));
|
||||
target.Effects.Add(e);
|
||||
e.OnEffectGained(target);
|
||||
e.IsDebuff = isDebuff;
|
||||
|
||||
@ -31,7 +31,7 @@ namespace Oshima.FunGame.OshimaModules.Effects.SkillEffects
|
||||
foreach (Character enemy in targets)
|
||||
{
|
||||
WriteLine($"[ {caster} ] 对 [ {enemy} ] 造成了封技和施法解除!持续时间:{封技时间}!");
|
||||
封技 e = new(Skill, caster, _durative, _duration, _durationTurn);
|
||||
封技 e = new(Skill, caster, _durative, _duration + _levelGrowth * (Level - 1), Convert.ToInt32(_durationTurn + _levelGrowth * (Level - 1)));
|
||||
enemy.Effects.Add(e);
|
||||
e.OnEffectGained(enemy);
|
||||
GamingQueue?.LastRound.ApplyEffects.TryAdd(enemy, [e.EffectType]);
|
||||
|
||||
@ -34,7 +34,7 @@ namespace Oshima.FunGame.OshimaModules.Effects.SkillEffects
|
||||
{
|
||||
if (enemy.HP <= 0) continue;
|
||||
WriteLine($"[ {caster} ] 眩晕了 [ {enemy} ] !持续时间:{眩晕时间}!");
|
||||
眩晕 e = new(Skill, caster, _durative, _duration, _durationTurn);
|
||||
眩晕 e = new(Skill, caster, _durative, _duration + _levelGrowth * (Level - 1), Convert.ToInt32(_durationTurn + _levelGrowth * (Level - 1)));
|
||||
enemy.Effects.Add(e);
|
||||
e.OnEffectGained(enemy);
|
||||
GamingQueue?.LastRound.ApplyEffects.TryAdd(enemy, [e.EffectType]);
|
||||
|
||||
@ -58,7 +58,7 @@ namespace Oshima.FunGame.OshimaModules.Effects.SkillEffects
|
||||
WriteLine($"[ {caster} ] 对 [ {enemy} ] 造成了虚弱!伤害降低 {ActualDamageReductionPercent * 100:0.##}%," +
|
||||
$"物理护甲降低 {ActualDEFReductionPercent * 100:0.##}%,魔法抗性降低 {ActualMDFReductionPercent * 100:0.##}%," +
|
||||
$"治疗效果降低 {ActualHealingReductionPercent * 100:0.##}%!持续时间:{虚弱时间}!");
|
||||
虚弱 e = new(Skill, enemy, caster, _durative, _duration, _durationTurn, ActualDamageReductionPercent, ActualDEFReductionPercent, ActualMDFReductionPercent, ActualHealingReductionPercent);
|
||||
虚弱 e = new(Skill, enemy, caster, _durative, _duration + _levelGrowth * (Level - 1), Convert.ToInt32(_durationTurn + _levelGrowth * (Level - 1)), ActualDamageReductionPercent, ActualDEFReductionPercent, ActualMDFReductionPercent, ActualHealingReductionPercent);
|
||||
enemy.Effects.Add(e);
|
||||
e.OnEffectGained(enemy);
|
||||
GamingQueue?.LastRound.ApplyEffects.TryAdd(enemy, [e.EffectType]);
|
||||
|
||||
@ -18,29 +18,16 @@ namespace Oshima.FunGame.OshimaModules.Items
|
||||
}
|
||||
}
|
||||
|
||||
public class 攻击之爪20 : Item
|
||||
public class 攻击之爪25 : Item
|
||||
{
|
||||
public override long Id => (long)AccessoryID.攻击之爪20;
|
||||
public override string Name => "攻击之爪 +20";
|
||||
public override long Id => (long)AccessoryID.攻击之爪25;
|
||||
public override string Name => "攻击之爪 +25";
|
||||
public override string Description => Skills.Passives.Count > 0 ? Skills.Passives.First().Description : "";
|
||||
public override QualityType QualityType => QualityType.Green;
|
||||
|
||||
public 攻击之爪20(Character? character = null) : base(ItemType.Accessory)
|
||||
public 攻击之爪25(Character? character = null) : base(ItemType.Accessory)
|
||||
{
|
||||
Skills.Passives.Add(new 攻击之爪技能(character, this, 20));
|
||||
}
|
||||
}
|
||||
|
||||
public class 攻击之爪30 : Item
|
||||
{
|
||||
public override long Id => (long)AccessoryID.攻击之爪30;
|
||||
public override string Name => "攻击之爪 +30";
|
||||
public override string Description => Skills.Passives.Count > 0 ? Skills.Passives.First().Description : "";
|
||||
public override QualityType QualityType => QualityType.Blue;
|
||||
|
||||
public 攻击之爪30(Character? character = null) : base(ItemType.Accessory)
|
||||
{
|
||||
Skills.Passives.Add(new 攻击之爪技能(character, this, 30));
|
||||
Skills.Passives.Add(new 攻击之爪技能(character, this, 25));
|
||||
}
|
||||
}
|
||||
|
||||
@ -49,7 +36,7 @@ namespace Oshima.FunGame.OshimaModules.Items
|
||||
public override long Id => (long)AccessoryID.攻击之爪40;
|
||||
public override string Name => "攻击之爪 +40";
|
||||
public override string Description => Skills.Passives.Count > 0 ? Skills.Passives.First().Description : "";
|
||||
public override QualityType QualityType => QualityType.Purple;
|
||||
public override QualityType QualityType => QualityType.Blue;
|
||||
|
||||
public 攻击之爪40(Character? character = null) : base(ItemType.Accessory)
|
||||
{
|
||||
@ -57,6 +44,58 @@ namespace Oshima.FunGame.OshimaModules.Items
|
||||
}
|
||||
}
|
||||
|
||||
public class 攻击之爪55 : Item
|
||||
{
|
||||
public override long Id => (long)AccessoryID.攻击之爪55;
|
||||
public override string Name => "攻击之爪 +55";
|
||||
public override string Description => Skills.Passives.Count > 0 ? Skills.Passives.First().Description : "";
|
||||
public override QualityType QualityType => QualityType.Purple;
|
||||
|
||||
public 攻击之爪55(Character? character = null) : base(ItemType.Accessory)
|
||||
{
|
||||
Skills.Passives.Add(new 攻击之爪技能(character, this, 55));
|
||||
}
|
||||
}
|
||||
|
||||
public class 攻击之爪70 : Item
|
||||
{
|
||||
public override long Id => (long)AccessoryID.攻击之爪70;
|
||||
public override string Name => "攻击之爪 +70";
|
||||
public override string Description => Skills.Passives.Count > 0 ? Skills.Passives.First().Description : "";
|
||||
public override QualityType QualityType => QualityType.Orange;
|
||||
|
||||
public 攻击之爪70(Character? character = null) : base(ItemType.Accessory)
|
||||
{
|
||||
Skills.Passives.Add(new 攻击之爪技能(character, this, 70));
|
||||
}
|
||||
}
|
||||
|
||||
public class 攻击之爪85 : Item
|
||||
{
|
||||
public override long Id => (long)AccessoryID.攻击之爪85;
|
||||
public override string Name => "攻击之爪 +85";
|
||||
public override string Description => Skills.Passives.Count > 0 ? Skills.Passives.First().Description : "";
|
||||
public override QualityType QualityType => QualityType.Red;
|
||||
|
||||
public 攻击之爪85(Character? character = null) : base(ItemType.Accessory)
|
||||
{
|
||||
Skills.Passives.Add(new 攻击之爪技能(character, this, 85));
|
||||
}
|
||||
}
|
||||
|
||||
public class 攻击之爪100 : Item
|
||||
{
|
||||
public override long Id => (long)AccessoryID.攻击之爪100;
|
||||
public override string Name => "攻击之爪 +100";
|
||||
public override string Description => Skills.Passives.Count > 0 ? Skills.Passives.First().Description : "";
|
||||
public override QualityType QualityType => QualityType.Gold;
|
||||
|
||||
public 攻击之爪100(Character? character = null) : base(ItemType.Accessory)
|
||||
{
|
||||
Skills.Passives.Add(new 攻击之爪技能(character, this, 100));
|
||||
}
|
||||
}
|
||||
|
||||
public class 攻击之爪技能 : Skill
|
||||
{
|
||||
public override long Id => (long)ItemPassiveID.攻击之爪;
|
||||
@ -71,7 +110,7 @@ namespace Oshima.FunGame.OshimaModules.Items
|
||||
{
|
||||
{ "exatk", exATK }
|
||||
};
|
||||
Effects.Add(new ExATK(this, values, character));
|
||||
Effects.Add(new ExATK(this, values));
|
||||
}
|
||||
|
||||
public override IEnumerable<Effect> AddPassiveEffectToCharacter()
|
||||
|
||||
@ -135,6 +135,10 @@ namespace Oshima.FunGame.OshimaModules.Items
|
||||
public override long Id => (long)ItemActiveID.经验书;
|
||||
public override string Name => "经验书";
|
||||
public override string Description => Effects.Count > 0 ? Effects.First().Description : "";
|
||||
public override bool CanSelectSelf => true;
|
||||
public override bool CanSelectTeammate => true;
|
||||
public override bool CanSelectEnemy => false;
|
||||
public override int CanSelectTargetCount => 1;
|
||||
|
||||
public 经验书技能(Item? item = null, double exp = 0) : base(SkillType.Item)
|
||||
{
|
||||
|
||||
@ -3,9 +3,12 @@
|
||||
public enum AccessoryID : long
|
||||
{
|
||||
攻击之爪10 = 14001,
|
||||
攻击之爪20 = 14002,
|
||||
攻击之爪30 = 14003,
|
||||
攻击之爪40 = 14004,
|
||||
攻击之爪25 = 14002,
|
||||
攻击之爪40 = 14003,
|
||||
攻击之爪55 = 14004,
|
||||
攻击之爪70 = 14005,
|
||||
攻击之爪85 = 14006,
|
||||
攻击之爪100 = 14007,
|
||||
}
|
||||
|
||||
public enum ConsumableID : long
|
||||
|
||||
@ -36,9 +36,9 @@ namespace Oshima.FunGame.OshimaModules
|
||||
return id switch
|
||||
{
|
||||
(long)AccessoryID.攻击之爪10 => new 攻击之爪10(),
|
||||
(long)AccessoryID.攻击之爪20 => new 攻击之爪20(),
|
||||
(long)AccessoryID.攻击之爪30 => new 攻击之爪30(),
|
||||
(long)AccessoryID.攻击之爪25 => new 攻击之爪25(),
|
||||
(long)AccessoryID.攻击之爪40 => new 攻击之爪40(),
|
||||
(long)AccessoryID.攻击之爪55 => new 攻击之爪55(),
|
||||
(long)ConsumableID.小经验书 => new 小经验书(),
|
||||
(long)ConsumableID.中经验书 => new 中经验书(),
|
||||
(long)ConsumableID.大经验书 => new 大经验书(),
|
||||
|
||||
@ -36,6 +36,7 @@ namespace Oshima.FunGame.OshimaModules
|
||||
protected override void AfterLoad()
|
||||
{
|
||||
General.GameplayEquilibriumConstant.InGameTime = "秒";
|
||||
General.GameplayEquilibriumConstant.UseMagicType = [MagicType.None];
|
||||
}
|
||||
|
||||
protected override Factory.EntityFactoryDelegate<Skill> SkillFactory()
|
||||
|
||||
@ -25,7 +25,7 @@ namespace Oshima.FunGame.OshimaModules.Skills
|
||||
{
|
||||
public override long Id => Skill.Id;
|
||||
public override string Name => Skill.Name;
|
||||
public override string Description => $"{Duration} {GameplayEquilibriumConstant.InGameTime}内,攻击拥有标记的角色将不会回收标记,增强 {最大生命值伤害 * 100:0.##}% 最大生命值伤害,并获得 {吸血 * 100:0.##}% 吸血。";
|
||||
public override string Description => $"{Duration} {GameplayEquilibriumConstant.InGameTime}内,攻击拥有标记的角色将不会回收标记,增强 [ 累积之压 ] 的最大生命值伤害 {最大生命值伤害 * 100:0.##}%,并获得 {吸血 * 100:0.##}% 吸血。";
|
||||
public override bool Durative => true;
|
||||
public override double Duration => 25;
|
||||
public override DispelledType DispelledType => DispelledType.CannotBeDispelled;
|
||||
|
||||
@ -50,17 +50,23 @@ namespace Oshima.FunGame.OshimaModules.Skills
|
||||
{
|
||||
if (isAdd)
|
||||
{
|
||||
已经加过 = true;
|
||||
character.ExEvadeRate += 实际增加闪避率;
|
||||
character.ExCritRate += 实际增加暴击率;
|
||||
character.MDF.AddAllValue(实际增加魔法抗性);
|
||||
if (!已经加过)
|
||||
{
|
||||
已经加过 = true;
|
||||
character.ExEvadeRate += 实际增加闪避率;
|
||||
character.ExCritRate += 实际增加暴击率;
|
||||
character.MDF[character.MagicType] += 实际增加魔法抗性;
|
||||
}
|
||||
}
|
||||
else
|
||||
{
|
||||
已经加过 = false;
|
||||
character.ExEvadeRate -= 实际增加闪避率;
|
||||
character.ExCritRate -= 实际增加暴击率;
|
||||
character.MDF.AddAllValue(-实际增加魔法抗性);
|
||||
if (已经加过)
|
||||
{
|
||||
已经加过 = false;
|
||||
character.ExEvadeRate -= 实际增加闪避率;
|
||||
character.ExCritRate -= 实际增加暴击率;
|
||||
character.MDF[character.MagicType] -= 实际增加魔法抗性;
|
||||
}
|
||||
}
|
||||
}
|
||||
|
||||
|
||||
@ -39,19 +39,19 @@ namespace Oshima.FunGame.OshimaModules.Skills
|
||||
|
||||
public override void OnEffectGained(Character character)
|
||||
{
|
||||
character.NormalAttack.SetMagicType(true, character.MagicType);
|
||||
character.NormalAttack.SetMagicType(new(this, true, MagicType.None, 999), GamingQueue);
|
||||
实际物理伤害减免 = 物理伤害减免;
|
||||
实际魔法抗性 = 魔法抗性;
|
||||
character.ExPDR += 实际物理伤害减免;
|
||||
character.MDF.AddAllValue(实际魔法抗性);
|
||||
character.MDF[character.MagicType] += 实际魔法抗性;
|
||||
WriteLine($"[ {character} ] 提升了 {实际物理伤害减免 * 100:0.##}% 物理伤害减免,{实际魔法抗性 * 100:0.##}% 魔法抗性!!");
|
||||
}
|
||||
|
||||
public override void OnEffectLost(Character character)
|
||||
{
|
||||
character.NormalAttack.SetMagicType(false, character.MagicType);
|
||||
character.NormalAttack.UnsetMagicType(this, GamingQueue);
|
||||
character.ExPDR -= 实际物理伤害减免;
|
||||
character.MDF.AddAllValue(-实际魔法抗性);
|
||||
character.MDF[character.MagicType] -= 实际魔法抗性;
|
||||
实际物理伤害减免 = 0;
|
||||
实际魔法抗性 = 0;
|
||||
}
|
||||
|
||||
@ -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 => $"每次造成伤害都会随机减少对方 [ 7~15 ] 点能量值,对能量值低于一半的角色额外造成 30% 伤害。对于枯竭打击而言,能量值大于100且小于150时,视为低于一半。";
|
||||
public override string Description => $"每次造成伤害都会随机减少对方 [ 7~15 ] 点能量值,对能量值低于一半的角色额外造成 30% 伤害。对于枯竭打击而言,能量值大于 100 且小于 150 时,视为低于一半。";
|
||||
|
||||
private bool 是否是嵌套伤害 = false;
|
||||
|
||||
|
||||
@ -16,7 +16,7 @@ namespace Oshima.FunGame.OshimaModules.Skills
|
||||
}
|
||||
if (skill.CanSelectTeammate && !skill.CanSelectEnemy)
|
||||
{
|
||||
return $"目标{(skill.CanSelectTargetCount > 1 ? $"至多 {skill.CanSelectTargetCount} 个" : "")}友方角色{(!skill.CanSelectSelf ? "(不包括自己)" : "")}";
|
||||
return $"目标{(skill.CanSelectTargetCount > 1 ? $"至多 {skill.CanSelectTargetCount} 个" : "")}友方角色{(!skill.CanSelectSelf ? "(不可选择自己)" : "")}";
|
||||
}
|
||||
else if (!skill.CanSelectTeammate && skill.CanSelectEnemy)
|
||||
{
|
||||
|
||||
@ -37,7 +37,7 @@ namespace Oshima.FunGame.OshimaModules.Skills
|
||||
{
|
||||
character.NormalAttack.CanSelectTargetCount += 2;
|
||||
实际比例 = 减伤比例;
|
||||
character.NormalAttack.SetMagicType(true, character.MagicType);
|
||||
character.NormalAttack.SetMagicType(new(this, true, MagicType.None, 999), GamingQueue);
|
||||
if (character.Effects.Where(e => e is 魔法震荡特效).FirstOrDefault() is 魔法震荡特效 e)
|
||||
{
|
||||
e.基础冷却时间 = 5;
|
||||
@ -49,7 +49,7 @@ namespace Oshima.FunGame.OshimaModules.Skills
|
||||
{
|
||||
实际比例 = 0;
|
||||
character.NormalAttack.CanSelectTargetCount -= 2;
|
||||
character.NormalAttack.SetMagicType(false, character.MagicType);
|
||||
character.NormalAttack.UnsetMagicType(this, GamingQueue);
|
||||
if (character.Effects.Where(e => e is 魔法震荡特效).FirstOrDefault() is 魔法震荡特效 e)
|
||||
{
|
||||
e.基础冷却时间 = 10;
|
||||
|
||||
File diff suppressed because it is too large
Load Diff
@ -339,7 +339,7 @@ namespace Oshima.FunGame.OshimaServers
|
||||
{
|
||||
foreach (Character character in queue.Queue)
|
||||
{
|
||||
这次发放的空投 = [new 攻击之爪20()];
|
||||
这次发放的空投 = [new 攻击之爪25()];
|
||||
foreach (Item item in 这次发放的空投)
|
||||
{
|
||||
queue.Equip(character, EquipSlotType.Accessory1, item, out _);
|
||||
|
||||
@ -44,7 +44,7 @@ namespace Oshima.FunGame.OshimaServers.Service
|
||||
|
||||
Dictionary<string, Item> exItems = Factory.GetGameModuleInstances<Item>(OshimaGameModuleConstant.General, OshimaGameModuleConstant.Item);
|
||||
FunGameConstant.Equipment.AddRange(exItems.Values.Where(i => (int)i.ItemType >= 0 && (int)i.ItemType < 5));
|
||||
FunGameConstant.Equipment.AddRange([new 攻击之爪10(), new 攻击之爪20(), new 攻击之爪30(), new 攻击之爪40()]);
|
||||
FunGameConstant.Equipment.AddRange([new 攻击之爪10(), new 攻击之爪25(), new 攻击之爪40(), new 攻击之爪55(), new 攻击之爪70(), new 攻击之爪85()]);
|
||||
|
||||
FunGameConstant.Items.AddRange(exItems.Values.Where(i => (int)i.ItemType > 4));
|
||||
FunGameConstant.Items.AddRange([new 小经验书(), new 中经验书(), new 大经验书(), new 升华之印(), new 流光之印(), new 永恒之印(), new 技能卷轴(), new 智慧之果(), new 奥术符文(), new 混沌之核(),
|
||||
@ -111,13 +111,15 @@ namespace Oshima.FunGame.OshimaServers.Service
|
||||
QualityType.Blue => Random.Shared.Next(13, 19),
|
||||
QualityType.Purple => Random.Shared.Next(19, 25),
|
||||
QualityType.Orange => Random.Shared.Next(25, 31),
|
||||
QualityType.Red => Random.Shared.Next(31, 37),
|
||||
QualityType.Gold => Random.Shared.Next(37, 43),
|
||||
_ => Random.Shared.Next(1, 7)
|
||||
};
|
||||
item.QualityType = (QualityType)qualityType;
|
||||
}
|
||||
else
|
||||
{
|
||||
total = Random.Shared.Next(1, 31);
|
||||
total = Random.Shared.Next(1, 43);
|
||||
if (total > 6 && total <= 12)
|
||||
{
|
||||
item.QualityType = QualityType.Green;
|
||||
@ -134,6 +136,14 @@ namespace Oshima.FunGame.OshimaServers.Service
|
||||
{
|
||||
item.QualityType = QualityType.Orange;
|
||||
}
|
||||
else if (total > 30 && total <= 36)
|
||||
{
|
||||
item.QualityType = QualityType.Red;
|
||||
}
|
||||
else if (total > 36 && total <= 42)
|
||||
{
|
||||
item.QualityType = QualityType.Gold;
|
||||
}
|
||||
}
|
||||
|
||||
GenerateAndAddSkillToMagicCard(item, total);
|
||||
@ -150,8 +160,8 @@ namespace Oshima.FunGame.OshimaServers.Service
|
||||
2 => 2,
|
||||
3 => 2,
|
||||
4 => 3,
|
||||
5 => 3,
|
||||
6 => 4,
|
||||
5 => 4,
|
||||
6 => 5,
|
||||
_ => 1
|
||||
};
|
||||
if (magic.Level > 1)
|
||||
@ -361,6 +371,14 @@ namespace Oshima.FunGame.OshimaServers.Service
|
||||
{
|
||||
item.QualityType = QualityType.Orange;
|
||||
}
|
||||
else if (total > 90 && total <= 108)
|
||||
{
|
||||
item.QualityType = QualityType.Red;
|
||||
}
|
||||
else if (total > 108)
|
||||
{
|
||||
item.QualityType = QualityType.Gold;
|
||||
}
|
||||
return item;
|
||||
}
|
||||
return null;
|
||||
@ -1305,7 +1323,7 @@ namespace Oshima.FunGame.OshimaServers.Service
|
||||
int naLevel = General.GameplayEquilibriumConstant.MaxNormalAttackLevel / cutRate;
|
||||
boss.Level = cLevel;
|
||||
boss.NormalAttack.Level = naLevel;
|
||||
boss.NormalAttack.HardnessTime = 6;
|
||||
boss.NormalAttack.ExHardnessTime = -4;
|
||||
Item[] weapons = [.. FunGameConstant.Equipment.Where(i => i.Id.ToString().StartsWith("11") && (int)i.QualityType == 4)];
|
||||
Item[] armors = [.. FunGameConstant.Equipment.Where(i => i.Id.ToString().StartsWith("12") && (int)i.QualityType == 1)];
|
||||
Item[] shoes = [.. FunGameConstant.Equipment.Where(i => i.Id.ToString().StartsWith("13") && (int)i.QualityType == 1)];
|
||||
|
||||
@ -176,7 +176,7 @@ namespace Oshima.FunGame.OshimaServers.Service
|
||||
WriteLine("");
|
||||
if (isWeb) result.Add("=== 空投 ===\r\n" + Msg);
|
||||
nextDropTime = isTeam ? 90 : 60;
|
||||
if (mQuality < 4)
|
||||
if (mQuality < 5)
|
||||
{
|
||||
mQuality++;
|
||||
}
|
||||
@ -184,11 +184,11 @@ namespace Oshima.FunGame.OshimaServers.Service
|
||||
{
|
||||
wQuality++;
|
||||
}
|
||||
if (aQuality < 1)
|
||||
if (aQuality < 5)
|
||||
{
|
||||
aQuality++;
|
||||
}
|
||||
if (sQuality < 1)
|
||||
if (sQuality < 5)
|
||||
{
|
||||
sQuality++;
|
||||
}
|
||||
@ -253,6 +253,12 @@ namespace Oshima.FunGame.OshimaServers.Service
|
||||
actionQueue.DisplayQueue();
|
||||
if (PrintOut) Console.WriteLine();
|
||||
|
||||
actionQueue.CharacterDeath += ActionQueue_CharacterDeath;
|
||||
if (actionQueue is TeamGamingQueue teamQueue)
|
||||
{
|
||||
//teamQueue.GameEndTeam += TeamQueue_GameEndTeam;
|
||||
}
|
||||
|
||||
// 总回合数
|
||||
int maxRound = 9999;
|
||||
|
||||
@ -375,7 +381,7 @@ namespace Oshima.FunGame.OshimaServers.Service
|
||||
WriteLine("");
|
||||
if (isWeb) result.Add("=== 空投 ===\r\n" + Msg);
|
||||
nextDropTime = isTeam ? 100 : 40;
|
||||
if (mQuality < 4)
|
||||
if (mQuality < 5)
|
||||
{
|
||||
mQuality++;
|
||||
}
|
||||
@ -383,11 +389,11 @@ namespace Oshima.FunGame.OshimaServers.Service
|
||||
{
|
||||
wQuality++;
|
||||
}
|
||||
if (aQuality < 1)
|
||||
if (aQuality < 5)
|
||||
{
|
||||
aQuality++;
|
||||
}
|
||||
if (sQuality < 1)
|
||||
if (sQuality < 5)
|
||||
{
|
||||
sQuality++;
|
||||
}
|
||||
@ -638,6 +644,32 @@ namespace Oshima.FunGame.OshimaServers.Service
|
||||
}
|
||||
}
|
||||
|
||||
private static async Task<bool> TeamQueue_GameEndTeam(TeamGamingQueue queue, Team winner)
|
||||
{
|
||||
foreach (Character character in winner.Members)
|
||||
{
|
||||
Item? i1 = character.UnEquip(EquipSlotType.MagicCardPack);
|
||||
Item? i2 = character.UnEquip(EquipSlotType.Weapon);
|
||||
Item? i3 = character.UnEquip(EquipSlotType.Armor);
|
||||
Item? i4 = character.UnEquip(EquipSlotType.Shoes);
|
||||
Item? i5 = character.UnEquip(EquipSlotType.Accessory1);
|
||||
Item? i6 = character.UnEquip(EquipSlotType.Accessory2);
|
||||
queue.WriteLine(character.GetInfo());
|
||||
}
|
||||
return await Task.FromResult(true);
|
||||
}
|
||||
|
||||
private static async Task<bool> ActionQueue_GameEnd(GamingQueue queue, Character winner)
|
||||
{
|
||||
return await Task.FromResult(true);
|
||||
}
|
||||
|
||||
private static async Task<bool> ActionQueue_CharacterDeath(GamingQueue queue, Character current, Character death)
|
||||
{
|
||||
death.Items.Clear();
|
||||
return await Task.FromResult(true);
|
||||
}
|
||||
|
||||
/// <summary>
|
||||
/// 将回合记录字典序列化为 JSON,然后压缩并写入 ZIP 文件
|
||||
/// </summary>
|
||||
@ -971,7 +1003,7 @@ namespace Oshima.FunGame.OshimaServers.Service
|
||||
Item[] armors = [.. FunGameConstant.Equipment.Where(i => i.Id.ToString().StartsWith("12") && (int)i.QualityType == aQuality)];
|
||||
Item[] shoes = [.. FunGameConstant.Equipment.Where(i => i.Id.ToString().StartsWith("13") && (int)i.QualityType == sQuality)];
|
||||
Item[] accessories = [.. FunGameConstant.Equipment.Where(i => i.Id.ToString().StartsWith("14") && (int)i.QualityType == acQuality)];
|
||||
Item[] consumables = [.. FunGameConstant.AllItems.Where(i => i.ItemType == ItemType.Consumable)];
|
||||
Item[] consumables = [.. FunGameConstant.AllItems.Where(i => i.ItemType == ItemType.Consumable && i.IsInGameItem)];
|
||||
foreach (Character character in queue.HardnessTime.Keys)
|
||||
{
|
||||
if (addLevel)
|
||||
|
||||
@ -121,7 +121,7 @@ namespace Oshima.FunGame.WebAPI
|
||||
user.Inventory.Characters.Add(character);
|
||||
|
||||
// 测试物品
|
||||
Item item = new 攻击之爪20();
|
||||
Item item = new 攻击之爪25();
|
||||
user.Inventory.Items.Add(item);
|
||||
|
||||
sql.UpdateInventory(user.Inventory); // 更新库存
|
||||
|
||||
Loading…
x
Reference in New Issue
Block a user