添加复苏技能和驱散技能

This commit is contained in:
milimoe 2025-05-11 19:08:14 +08:00
parent d6f84f9020
commit 995c3057d0
Signed by: milimoe
GPG Key ID: 05D280912DA6C69E
18 changed files with 602 additions and 9 deletions

View File

@ -14,7 +14,7 @@ namespace Oshima.FunGame.OshimaModules.Effects.OpenEffects
public override bool BeforeEvadeCheck(Character actor, Character enemy, ref double throwingBonus) public override bool BeforeEvadeCheck(Character actor, Character enemy, ref double throwingBonus)
{ {
if (actor == Skill.Character) if (actor == Skill.Character && Random.Shared.NextDouble() < )
{ {
if (GamingQueue != null) WriteLine($"[ {actor} ] 的普通攻击无视了 [ {enemy} ] 的闪避!"); if (GamingQueue != null) WriteLine($"[ {actor} ] 的普通攻击无视了 [ {enemy} ] 的闪避!");
return false; return false;

View File

@ -32,8 +32,14 @@ namespace Oshima.FunGame.OshimaModules.Effects.PassiveEffects
public override void OnEffectGained(Character character) public override void OnEffectGained(Character character)
{ {
if (_durative) RemainDuration = Duration; if (_durative && RemainDuration == 0)
else RemainDurationTurn = DurationTurn; {
RemainDuration = Duration;
}
else if (RemainDurationTurn == 0)
{
RemainDurationTurn = DurationTurn;
}
AddEffectStatesToCharacter(character, [CharacterState.SkillRestricted]); AddEffectStatesToCharacter(character, [CharacterState.SkillRestricted]);
InterruptCasting(character, Source); InterruptCasting(character, Source);
} }

View File

@ -0,0 +1,51 @@
using Milimoe.FunGame.Core.Entity;
using Milimoe.FunGame.Core.Library.Constant;
namespace Oshima.FunGame.OshimaModules.Effects.PassiveEffects
{
public class : Effect
{
public override long Id => 4104;
public override string Name => "持续性弱驱散";
public override string Description => $"此角色正在被持续性弱驱散。来自:[ {Source} ] 的 [ {Skill.Name} ]";
public override EffectType EffectType => EffectType.WeakDispelling;
public override DispelType DispelType => DispelType.DurativeWeak;
public override Character Source => _sourceCharacter;
public override bool DurativeWithoutDuration => _durativeWithoutDuration;
public override bool Durative => _durative;
public override double Duration => _duration;
public override int DurationTurn => _durationTurn;
private readonly Character _sourceCharacter;
private readonly bool _durativeWithoutDuration;
private readonly bool _durative;
private readonly double _duration;
private readonly int _durationTurn;
public (Skill skill, Character sourceCharacter, bool durativeWithoutDuration = false, bool durative = false, double duration = 0, int durationTurn = 1) : base(skill)
{
GamingQueue = skill.GamingQueue;
DispelledType = DispelledType.Weak;
_sourceCharacter = sourceCharacter;
_durativeWithoutDuration = durativeWithoutDuration;
if (!_durativeWithoutDuration)
{
_durative = durative;
_duration = duration;
_durationTurn = durationTurn;
}
}
public override void OnEffectGained(Character character)
{
if (_durative && RemainDuration == 0)
{
RemainDuration = Duration;
}
else if (RemainDurationTurn == 0)
{
RemainDurationTurn = DurationTurn;
}
}
}
}

View File

@ -0,0 +1,51 @@
using Milimoe.FunGame.Core.Entity;
using Milimoe.FunGame.Core.Library.Constant;
namespace Oshima.FunGame.OshimaModules.Effects.PassiveEffects
{
public class : Effect
{
public override long Id => 4105;
public override string Name => "持续性强驱散";
public override string Description => $"此角色正在被持续性强驱散。来自:[ {Source} ] 的 [ {Skill.Name} ]";
public override EffectType EffectType => EffectType.StrongDispelling;
public override DispelType DispelType => DispelType.DurativeStrong;
public override Character Source => _sourceCharacter;
public override bool DurativeWithoutDuration => _durativeWithoutDuration;
public override bool Durative => _durative;
public override double Duration => _duration;
public override int DurationTurn => _durationTurn;
private readonly Character _sourceCharacter;
private readonly bool _durativeWithoutDuration;
private readonly bool _durative;
private readonly double _duration;
private readonly int _durationTurn;
public (Skill skill, Character sourceCharacter, bool durativeWithoutDuration = false, bool durative = false, double duration = 0, int durationTurn = 1) : base(skill)
{
GamingQueue = skill.GamingQueue;
DispelledType = DispelledType.Strong;
_sourceCharacter = sourceCharacter;
_durativeWithoutDuration = durativeWithoutDuration;
if (!_durativeWithoutDuration)
{
_durative = durative;
_duration = duration;
_durationTurn = durationTurn;
}
}
public override void OnEffectGained(Character character)
{
if (_durative && RemainDuration == 0)
{
RemainDuration = Duration;
}
else if (RemainDurationTurn == 0)
{
RemainDurationTurn = DurationTurn;
}
}
}
}

View File

@ -0,0 +1,58 @@
using Milimoe.FunGame.Core.Entity;
using Milimoe.FunGame.Core.Library.Constant;
namespace Oshima.FunGame.OshimaModules.Effects.PassiveEffects
{
public class : Effect
{
public override long Id => 4106;
public override string Name => "物理护盾";
public override string Description => $"此角色拥有物理护盾。来自:[ {Source} ] 的 [ {Skill.Name} ]";
public override EffectType EffectType => EffectType.Shield;
public override DispelledType DispelledType => DispelledType.CannotBeDispelled;
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 _sourceCharacter;
private readonly double _shield;
private readonly bool _durative;
private readonly double _duration;
private readonly int _durationTurn;
public (Skill skill, Character sourceCharacter, double shield, bool durative = false, double duration = 0, int durationTurn = 1) : base(skill)
{
GamingQueue = skill.GamingQueue;
_sourceCharacter = sourceCharacter;
_shield = shield;
_durative = durative;
_duration = duration;
_durationTurn = durationTurn;
}
public override void OnEffectGained(Character character)
{
if (_durative && RemainDuration == 0)
{
RemainDuration = Duration;
}
else if (RemainDurationTurn == 0)
{
RemainDurationTurn = DurationTurn;
}
character.Shield.Physical += _shield;
}
public override bool OnShieldBroken(Character character, Character attacker, bool isMagic, MagicType magicType, double damage, double shield, double overFlowing)
{
Effect[] effects = [.. character.Effects.Where(e => e is )];
foreach (Effect effect in effects)
{
character.Effects.Remove(effect);
}
return true;
}
}
}

View File

@ -32,8 +32,14 @@ namespace Oshima.FunGame.OshimaModules.Effects.PassiveEffects
public override void OnEffectGained(Character character) public override void OnEffectGained(Character character)
{ {
if (_durative) RemainDuration = Duration; if (_durative && RemainDuration == 0)
else RemainDurationTurn = DurationTurn; {
RemainDuration = Duration;
}
else if (RemainDurationTurn == 0)
{
RemainDurationTurn = DurationTurn;
}
AddEffectStatesToCharacter(character, [CharacterState.NotActionable]); AddEffectStatesToCharacter(character, [CharacterState.NotActionable]);
InterruptCasting(character, Source); InterruptCasting(character, Source);
} }

View File

@ -0,0 +1,44 @@
using Milimoe.FunGame.Core.Entity;
using Milimoe.FunGame.Core.Library.Constant;
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 => $"为目标{(Skill.CanSelectTargetCount > 1 ? $" {Skill.CanSelectTargetCount} " : "")}友方角色提供 {护盾值:0.##} 点物理护盾 {持续时间}。";
private double => Level > 0 ? Math.Abs( + * (Level - 1)) : Math.Abs();
private double { get; set; } = 200;
private double { get; set; } = 100;
private string => _durative && _duration > 0 ? _duration + $" {GameplayEquilibriumConstant.InGameTime}" : (!_durative && _durationTurn > 0 ? _durationTurn + " 回合" : $"0 {GameplayEquilibriumConstant.InGameTime}");
private readonly bool _durative;
private readonly double _duration;
private readonly int _durationTurn;
public (Skill skill, double , double , bool durative = true, double duration = 40, int durationTurn = 0) : base(skill)
{
GamingQueue = skill.GamingQueue;
this. = ;
this. = ;
_durative = durative;
_duration = duration;
_durationTurn = durationTurn;
}
public override void OnSkillCasted(Character caster, List<Character> targets, Dictionary<string, object> others)
{
foreach (Character target in targets)
{
WriteLine($"[ {target} ] 获得了 {护盾值:0.##} 点物理护盾!持续时间:{持续时间}");
e = new(Skill, caster, , _durative, _duration, _durationTurn);
target.Effects.Add(e);
e.OnEffectGained(target);
e.DispelledType = DispelledType;
GamingQueue?.LastRound.ApplyEffects.TryAdd(target, [EffectType.Shield]);
}
}
}
}

View File

@ -0,0 +1,33 @@
using Milimoe.FunGame.Core.Entity;
using Milimoe.FunGame.Core.Library.Constant;
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 => $"弱驱散{(Skill.CanSelectTargetCount > 1 ? $" {Skill.CanSelectTargetCount} " : "")}目标。";
public override DispelType DispelType => DispelType.Weak;
public (Skill skill) : base(skill)
{
GamingQueue = skill.GamingQueue;
}
public override void OnSkillCasted(Character caster, List<Character> targets, Dictionary<string, object> others)
{
Dictionary<Character, bool> isTeammateDictionary = GamingQueue?.GetIsTeammateDictionary(caster, targets) ?? [];
foreach (Character target in targets)
{
WriteLine($"[ {caster} ] 弱驱散了 [ {target} ] ");
bool isEnemy = true;
if (isTeammateDictionary.TryGetValue(target, out bool value))
{
isEnemy = !value;
}
Dispel(caster, target, isEnemy);
}
}
}
}

View File

@ -0,0 +1,33 @@
using Milimoe.FunGame.Core.Entity;
using Milimoe.FunGame.Core.Library.Constant;
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 => $"强驱散{(Skill.CanSelectTargetCount > 1 ? $" {Skill.CanSelectTargetCount} " : "")}目标。";
public override DispelType DispelType => DispelType.Strong;
public (Skill skill) : base(skill)
{
GamingQueue = skill.GamingQueue;
}
public override void OnSkillCasted(Character caster, List<Character> targets, Dictionary<string, object> others)
{
Dictionary<Character, bool> isTeammateDictionary = GamingQueue?.GetIsTeammateDictionary(caster, targets) ?? [];
foreach (Character target in targets)
{
WriteLine($"[ {caster} ] 强驱散了 [ {target} ] ");
bool isEnemy = true;
if (isTeammateDictionary.TryGetValue(target, out bool value))
{
isEnemy = !value;
}
Dispel(caster, target, isEnemy);
}
}
}
}

View File

@ -0,0 +1,70 @@
using Milimoe.FunGame.Core.Entity;
using Milimoe.FunGame.Core.Library.Constant;
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 => $"持续弱驱散{(Skill.CanSelectTargetCount > 1 ? $" {Skill.CanSelectTargetCount} " : "")}目标{(_durativeWithoutDuration ? _durationString : $" {}")}。\r\n持续性驱散是持续性临时驱散它会在持续时间结束之后恢复目标尚未结束的特效。";
public override DispelType DispelType => DispelType.DurativeWeak;
private string => _durative && _duration > 0 ? + $" {GameplayEquilibriumConstant.InGameTime}" : (!_durative && _durationTurn > 0 ? + " 回合" : $"0 {GameplayEquilibriumConstant.InGameTime}");
private double => _durative && _duration > 0 ? _duration + _levelGrowth * (Level - 1) : (!_durative && _durationTurn > 0 ? _durationTurn + _levelGrowth * (Level - 1) : 0);
private readonly bool _durativeWithoutDuration;
private readonly string _durationString;
private readonly bool _durative;
private readonly double _duration;
private readonly int _durationTurn;
private readonly double _levelGrowth;
public (Skill skill, bool durativeWithoutDuration = false, string durationString = "", bool durative = false, double duration = 0, int durationTurn = 1, double levelGrowth = 0) : base(skill)
{
GamingQueue = skill.GamingQueue;
_durativeWithoutDuration = durativeWithoutDuration;
_durationString = durationString;
if (!_durativeWithoutDuration)
{
_durative = durative;
_duration = duration;
_durationTurn = durationTurn;
_levelGrowth = levelGrowth;
}
}
public override void OnSkillCasted(Character caster, List<Character> targets, Dictionary<string, object> others)
{
Dictionary<Character, bool> isTeammateDictionary = GamingQueue?.GetIsTeammateDictionary(caster, targets) ?? [];
foreach (Character target in targets)
{
WriteLine($"[ {caster} ] 对 [ {target} ] 施加了持续性弱驱散!持续时间:{持续时间}");
bool isDebuff = true;
if (isTeammateDictionary.TryGetValue(target, out bool value))
{
isDebuff = !value;
}
if (target == caster)
{
isDebuff = false;
}
if (target.Effects.FirstOrDefault(e => e is ) is e && e.DurativeWithoutDuration == _durativeWithoutDuration && e.Durative == _durative && e.IsDebuff == isDebuff)
{
if (_duration > e.Duration) e.Duration = _duration;
if (_durationTurn > e.DurationTurn) e.DurationTurn = _durationTurn;
e.DispelledType = DispelledType;
}
else
{
e = new(Skill, caster, _durativeWithoutDuration, _durative, _duration, _durationTurn);
target.Effects.Add(e);
e.OnEffectGained(target);
e.IsDebuff = isDebuff;
e.DispelledType = DispelledType;
}
GamingQueue?.LastRound.ApplyEffects.TryAdd(target, [e.EffectType]);
}
}
}
}

View File

@ -0,0 +1,70 @@
using Milimoe.FunGame.Core.Entity;
using Milimoe.FunGame.Core.Library.Constant;
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 => $"持续强驱散{(Skill.CanSelectTargetCount > 1 ? $" {Skill.CanSelectTargetCount} " : "")}目标{(_durativeWithoutDuration ? _durationString : $" {}")}。\r\n持续性驱散是持续性临时驱散它会在持续时间结束之后恢复目标尚未结束的特效。";
public override DispelType DispelType => DispelType.DurativeStrong;
private string => _durative && _duration > 0 ? + $" {GameplayEquilibriumConstant.InGameTime}" : (!_durative && _durationTurn > 0 ? + " 回合" : $"0 {GameplayEquilibriumConstant.InGameTime}");
private double => _durative && _duration > 0 ? _duration + _levelGrowth * (Level - 1) : (!_durative && _durationTurn > 0 ? _durationTurn + _levelGrowth * (Level - 1) : 0);
private readonly bool _durativeWithoutDuration;
private readonly string _durationString;
private readonly bool _durative;
private readonly double _duration;
private readonly int _durationTurn;
private readonly double _levelGrowth;
public (Skill skill, bool durativeWithoutDuration = false, string durationString = "", bool durative = false, double duration = 0, int durationTurn = 1, double levelGrowth = 0) : base(skill)
{
GamingQueue = skill.GamingQueue;
_durativeWithoutDuration = durativeWithoutDuration;
_durationString = durationString;
if (!_durativeWithoutDuration)
{
_durative = durative;
_duration = duration;
_durationTurn = durationTurn;
_levelGrowth = levelGrowth;
}
}
public override void OnSkillCasted(Character caster, List<Character> targets, Dictionary<string, object> others)
{
Dictionary<Character, bool> isTeammateDictionary = GamingQueue?.GetIsTeammateDictionary(caster, targets) ?? [];
foreach (Character target in targets)
{
WriteLine($"[ {caster} ] 对 [ {target} ] 施加了持续性强驱散!持续时间:{持续时间}");
bool isDebuff = true;
if (isTeammateDictionary.TryGetValue(target, out bool value))
{
isDebuff = !value;
}
if (target == caster)
{
isDebuff = false;
}
if (target.Effects.FirstOrDefault(e => e is ) is e && e.DurativeWithoutDuration == _durativeWithoutDuration && e.Durative == _durative && e.IsDebuff == isDebuff)
{
if (_duration > e.Duration) e.Duration = _duration;
if (_durationTurn > e.DurationTurn) e.DurationTurn = _durationTurn;
e.DispelledType = DispelledType;
}
else
{
e = new(Skill, caster, _durativeWithoutDuration, _durative, _duration, _durationTurn);
target.Effects.Add(e);
e.OnEffectGained(target);
e.IsDebuff = isDebuff;
e.DispelledType = DispelledType;
}
GamingQueue?.LastRound.ApplyEffects.TryAdd(target, [e.EffectType]);
}
}
}
}

View File

@ -6,7 +6,7 @@ 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 => $"为{(Skill.CanSelectTargetCount > 1 ? $" {Skill.CanSelectTargetCount} " : "")}目标回复 {Heal:0.##} 点生命值。"; public override string Description => $"为{(Skill.CanSelectTargetCount > 1 ? $" {Skill.CanSelectTargetCount} " : "")}目标回复 {Heal:0.##} 点生命值。{(CanRespawn ? "" : "")}";
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;

View File

@ -45,10 +45,12 @@ namespace Oshima.FunGame.OshimaModules
(long)MagicID. => new (), (long)MagicID. => new (),
(long)MagicID. => new (), (long)MagicID. => new (),
(long)MagicID. => new (), (long)MagicID. => new (),
(long)MagicID. => new (),
(long)MagicID. => new (), (long)MagicID. => new (),
(long)MagicID. => new (), (long)MagicID. => new (),
(long)MagicID. => new (), (long)MagicID. => new (),
(long)MagicID. => new (), (long)MagicID. => new (),
(long)MagicID. => new (),
(long)SkillID. => new (), (long)SkillID. => new (),
(long)SuperSkillID. => new (), (long)SuperSkillID. => new (),
(long)SuperSkillID. => new (), (long)SuperSkillID. => new (),

View File

@ -32,6 +32,11 @@ namespace Oshima.FunGame.OshimaModules.Skills
public double { get; set; } = 0.12; public double { get; set; } = 0.12;
private bool = false; private bool = false;
public override bool BeforeCriticalCheck(Character actor, Character enemy, ref double throwingBonus)
{
return !;
}
public override void AfterDamageCalculation(Character character, Character enemy, double damage, bool isNormalAttack, bool isMagicDamage, MagicType magicType, DamageResult damageResult) public override void AfterDamageCalculation(Character character, Character enemy, double damage, bool isNormalAttack, bool isMagicDamage, MagicType magicType, DamageResult damageResult)
{ {
if (character == Skill.Character && damageResult != DamageResult.Evaded && ! && enemy.HP > 0) if (character == Skill.Character && damageResult != DamageResult.Evaded && ! && enemy.HP > 0)

View File

@ -0,0 +1,41 @@
using Milimoe.FunGame.Core.Entity;
using Milimoe.FunGame.Core.Library.Constant;
using Oshima.FunGame.OshimaModules.Effects.SkillEffects;
namespace Oshima.FunGame.OshimaModules.Skills
{
public class : Skill
{
public override long Id => (long)MagicID.;
public override string Name => "复苏术";
public override string Description => string.Join("", Effects.Select(e => e.Description));
public override string DispelDescription => Effects.FirstOrDefault(e => e is )?.DispelDescription ?? "";
public override double MPCost => Level > 0 ? 100 + (100 * (Level - 1)) : 100;
public override double CD => 100;
public override double CastTime => 6;
public override double HardnessTime { get; set; } = 8;
public override bool CanSelectSelf => true;
public override bool CanSelectEnemy => false;
public override bool CanSelectTeammate => true;
public override int CanSelectTargetCount => 1;
public (Character? character = null) : base(SkillType.Magic, character)
{
SelectTargetPredicates.Add(c => c.HP >= 0 && c.HP < c.MaxHP);
Effects.Add(new (this));
Effects.Add(new (this, 40, 65, true));
}
public override List<Character> GetSelectableTargets(Character caster, List<Character> enemys, List<Character> teammates)
{
List<Character> targets = base.GetSelectableTargets(caster, enemys, teammates);
if (GamingQueue != null)
{
// 从死亡队列中获取队友,加入目标列表。
Dictionary<Character, bool> deaths = GamingQueue.GetIsTeammateDictionary(caster, GamingQueue.Eliminated);
targets = [.. targets.Union(deaths.Where(kv => kv.Value).Select(kv => kv.Key)).Distinct()];
}
return targets;
}
}
}

View File

@ -0,0 +1,118 @@
using Milimoe.FunGame.Core.Entity;
using Milimoe.FunGame.Core.Library.Constant;
using Oshima.FunGame.OshimaModules.Effects.PassiveEffects;
using Oshima.FunGame.OshimaModules.Effects.SkillEffects;
namespace Oshima.FunGame.OshimaModules.Skills
{
public class : Skill
{
public override long Id => (long)MagicID.;
public override string Name => "大地之墙";
public override string Description => string.Join("", Effects.Select(e => e.Description));
public override string DispelDescription => "驱散性:持续性弱驱散\r\n被驱散性护盾不可驱散持续性弱驱散在护盾值用尽前需强驱散否则可弱驱散";
public override double MPCost
{
get
{
return Level switch
{
8 => + 6 * ,
7 => + 4 * ,
6 => + 4 * ,
5 => + 3 * ,
4 => + 3 * ,
3 => + 2.5 * ,
_ =>
};
}
}
public override double CD => Level > 0 ? 100 - (2 * (Level - 1)) : 100;
public override double CastTime
{
get
{
return Level switch
{
8 => 7,
7 => 7,
6 => 8,
5 => 8,
4 => 9,
3 => 10,
2 => 11,
_ => 12
};
}
}
public override double HardnessTime { get; set; } = 8;
private double { get; set; } = 90;
private double { get; set; } = 90;
public override bool CanSelectSelf => true;
public override bool CanSelectEnemy => false;
public override bool CanSelectTeammate => true;
public override int CanSelectTargetCount
{
get
{
return Level switch
{
8 => 4,
7 => 3,
6 => 3,
5 => 2,
4 => 2,
3 => 2,
_ => 1
};
}
}
public (Character? character = null) : base(SkillType.Magic, character)
{
Effect shield = new (this, 120, 160, true, 60)
{
DispelledType = DispelledType.CannotBeDispelled
};
Effects.Add(shield);
Effect dispel = new (this, durative: true, duration: 30)
{
DispelledType = DispelledType.Strong
};
Effects.Add(dispel);
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 => $"";
public override bool ForceHideInStatusBar => true;
public override void OnTimeElapsed(Character character, double elapsed)
{
if (!character.Effects.Any(e => e is ) && character.Effects.FirstOrDefault(e => e is ) is e)
{
e.DispelledType = DispelledType.Weak;
}
else
{
character.Effects.Remove(this);
}
}
public override void OnSkillCasted(Character caster, List<Character> targets, Dictionary<string, object> others)
{
foreach (Character target in targets)
{
if (!target.Effects.Any(e => e is ))
{
target.Effects.Add(new (Skill));
}
}
}
}
}

View File

@ -39,8 +39,8 @@ namespace Oshima.FunGame.OshimaServers.Service
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 ()]);
FunGameConstant.Magics.AddRange([new (), new (), new (), new (), new (), new (), new (), new (), new (), new (), FunGameConstant.Magics.AddRange([new (), new (), new (), new (), new (), new (), new (), new (), new (), new (), new (),
new (), new (), new (), new ()]); new (), new (), new (), new (), new ()]);
Dictionary<string, Item> exItems = Factory.GetGameModuleInstances<Item>(OshimaGameModuleConstant.General, OshimaGameModuleConstant.Item); 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(exItems.Values.Where(i => (int)i.ItemType >= 0 && (int)i.ItemType < 5));

View File

@ -606,7 +606,7 @@ namespace Oshima.FunGame.OshimaServers.Service
Item[] = [.. FunGameConstant.Equipment.Where(i => i.Id.ToString().StartsWith("12") && (int)i.QualityType == aQuality)]; Item[] = [.. FunGameConstant.Equipment.Where(i => i.Id.ToString().StartsWith("12") && (int)i.QualityType == aQuality)];
Item[] = [.. FunGameConstant.Equipment.Where(i => i.Id.ToString().StartsWith("13") && (int)i.QualityType == sQuality)]; Item[] = [.. FunGameConstant.Equipment.Where(i => i.Id.ToString().StartsWith("13") && (int)i.QualityType == sQuality)];
Item[] = [.. FunGameConstant.Equipment.Where(i => i.Id.ToString().StartsWith("14") && (int)i.QualityType == acQuality)]; Item[] = [.. FunGameConstant.Equipment.Where(i => i.Id.ToString().StartsWith("14") && (int)i.QualityType == acQuality)];
Item? a = null, b = null, c = null, d = null; Item? a = null, b = null, c = null, d = null, d2 = null;
if (.Length > 0) if (.Length > 0)
{ {
a = [Random.Shared.Next(.Length)]; a = [Random.Shared.Next(.Length)];
@ -623,11 +623,16 @@ namespace Oshima.FunGame.OshimaServers.Service
{ {
d = [Random.Shared.Next(.Length)]; d = [Random.Shared.Next(.Length)];
} }
if (.Length > 0)
{
d2 = [Random.Shared.Next(.Length)];
}
List<Item> = []; List<Item> = [];
if (a != null) .Add(a); if (a != null) .Add(a);
if (b != null) .Add(b); if (b != null) .Add(b);
if (c != null) .Add(c); if (c != null) .Add(c);
if (d != null) .Add(d); if (d != null) .Add(d);
if (d2 != null) .Add(d2);
Item? = FunGameService.GenerateMagicCardPack(3, (QualityType)mQuality); Item? = FunGameService.GenerateMagicCardPack(3, (QualityType)mQuality);
if ( != null) if ( != null)
{ {