mirror of
https://github.com/milimoe/FunGame-Testing.git
synced 2025-12-05 08:09:04 +00:00
添加物品测试
This commit is contained in:
parent
c38e755f4f
commit
8d9c9d0095
@ -4,8 +4,14 @@ Microsoft Visual Studio Solution File, Format Version 12.00
|
|||||||
VisualStudioVersion = 17.5.33516.290
|
VisualStudioVersion = 17.5.33516.290
|
||||||
MinimumVisualStudioVersion = 10.0.40219.1
|
MinimumVisualStudioVersion = 10.0.40219.1
|
||||||
Project("{9A19103F-16F7-4668-BE54-9A1E7A4F7556}") = "FunGame.Testing", "Library\FunGame.Testing.csproj", "{6F6B4A21-8F39-4B0D-84E8-98AE3E93F06F}"
|
Project("{9A19103F-16F7-4668-BE54-9A1E7A4F7556}") = "FunGame.Testing", "Library\FunGame.Testing.csproj", "{6F6B4A21-8F39-4B0D-84E8-98AE3E93F06F}"
|
||||||
|
ProjectSection(ProjectDependencies) = postProject
|
||||||
|
{94B564CD-7A1E-4B3C-AF78-23EBCD5D627E} = {94B564CD-7A1E-4B3C-AF78-23EBCD5D627E}
|
||||||
|
EndProjectSection
|
||||||
EndProject
|
EndProject
|
||||||
Project("{9A19103F-16F7-4668-BE54-9A1E7A4F7556}") = "FunGame.Testing.Desktop", "Desktop\FunGame.Testing.Desktop.csproj", "{05FA61CB-22AA-4834-8C45-1161C42DF2C7}"
|
Project("{9A19103F-16F7-4668-BE54-9A1E7A4F7556}") = "FunGame.Testing.Desktop", "Desktop\FunGame.Testing.Desktop.csproj", "{05FA61CB-22AA-4834-8C45-1161C42DF2C7}"
|
||||||
|
ProjectSection(ProjectDependencies) = postProject
|
||||||
|
{94B564CD-7A1E-4B3C-AF78-23EBCD5D627E} = {94B564CD-7A1E-4B3C-AF78-23EBCD5D627E}
|
||||||
|
EndProjectSection
|
||||||
EndProject
|
EndProject
|
||||||
Project("{9A19103F-16F7-4668-BE54-9A1E7A4F7556}") = "FunGame.Core", "..\FunGame.Core\FunGame.Core.csproj", "{94B564CD-7A1E-4B3C-AF78-23EBCD5D627E}"
|
Project("{9A19103F-16F7-4668-BE54-9A1E7A4F7556}") = "FunGame.Core", "..\FunGame.Core\FunGame.Core.csproj", "{94B564CD-7A1E-4B3C-AF78-23EBCD5D627E}"
|
||||||
EndProject
|
EndProject
|
||||||
|
|||||||
@ -8,7 +8,7 @@ namespace Milimoe.FunGame.Testing.Effects
|
|||||||
public override long Id => 4101;
|
public override long Id => 4101;
|
||||||
public override string Name => "眩晕";
|
public override string Name => "眩晕";
|
||||||
public override string Description => $"此角色被眩晕了,不能行动。来自:[ {Source} ] 的 [ {Skill.Name} ]";
|
public override string Description => $"此角色被眩晕了,不能行动。来自:[ {Source} ] 的 [ {Skill.Name} ]";
|
||||||
public override EffectControlType ControlType => EffectControlType.Stun;
|
public override EffectType EffectType => EffectType.Stun;
|
||||||
public override bool TargetSelf => true;
|
public override bool TargetSelf => true;
|
||||||
public override Character Source => _sourceCharacter;
|
public override Character Source => _sourceCharacter;
|
||||||
public override bool Durative => _durative;
|
public override bool Durative => _durative;
|
||||||
|
|||||||
@ -8,7 +8,7 @@ namespace Milimoe.FunGame.Testing.Effects
|
|||||||
public override long Id => 4102;
|
public override long Id => 4102;
|
||||||
public override string Name => "累积之压标记";
|
public override string Name => "累积之压标记";
|
||||||
public override string Description => $"此角色持有累积之压标记,已累计 {MarkLevel} 层。来自:[ {Source} ]";
|
public override string Description => $"此角色持有累积之压标记,已累计 {MarkLevel} 层。来自:[ {Source} ]";
|
||||||
public override EffectControlType ControlType => EffectControlType.Mark;
|
public override EffectType EffectType => EffectType.Mark;
|
||||||
public override bool TargetSelf => true;
|
public override bool TargetSelf => true;
|
||||||
public override Character Source => _sourceCharacter;
|
public override Character Source => _sourceCharacter;
|
||||||
public int MarkLevel { get; set; } = 1;
|
public int MarkLevel { get; set; } = 1;
|
||||||
|
|||||||
89
Library/Items/攻击之爪.cs
Normal file
89
Library/Items/攻击之爪.cs
Normal file
@ -0,0 +1,89 @@
|
|||||||
|
using Milimoe.FunGame.Core.Entity;
|
||||||
|
using Milimoe.FunGame.Core.Library.Constant;
|
||||||
|
|
||||||
|
namespace FunGame.Testing.Items
|
||||||
|
{
|
||||||
|
public class 攻击之爪10 : Item
|
||||||
|
{
|
||||||
|
public override long Id => 14001;
|
||||||
|
public override string Name => "攻击之爪 +10";
|
||||||
|
public override string Description => Skills.Passives.Count > 0 ? Skills.Passives.First().Description : "";
|
||||||
|
|
||||||
|
public 攻击之爪10(Character? character = null) : base(ItemType.Accessory, slot: EquipSlotType.Accessory)
|
||||||
|
{
|
||||||
|
Skills.Passives.Add(new 攻击之爪技能(character, this, 10));
|
||||||
|
}
|
||||||
|
}
|
||||||
|
|
||||||
|
public class 攻击之爪30 : Item
|
||||||
|
{
|
||||||
|
public override string Name => "攻击之爪 +30";
|
||||||
|
public override string Description => Skills.Passives.Count > 0 ? Skills.Passives.First().Description : "";
|
||||||
|
|
||||||
|
public 攻击之爪30(Character? character = null) : base(ItemType.Accessory, slot: EquipSlotType.Accessory)
|
||||||
|
{
|
||||||
|
Skills.Passives.Add(new 攻击之爪技能(character, this, 30));
|
||||||
|
}
|
||||||
|
}
|
||||||
|
|
||||||
|
public class 攻击之爪50 : Item
|
||||||
|
{
|
||||||
|
public override string Name => "攻击之爪 +50";
|
||||||
|
public override string Description => Skills.Passives.Count > 0 ? Skills.Passives.First().Description : "";
|
||||||
|
|
||||||
|
public 攻击之爪50(Character? character = null) : base(ItemType.Accessory, slot: EquipSlotType.Accessory)
|
||||||
|
{
|
||||||
|
Skills.Passives.Add(new 攻击之爪技能(character, this, 50));
|
||||||
|
}
|
||||||
|
}
|
||||||
|
|
||||||
|
public class 攻击之爪技能 : Skill
|
||||||
|
{
|
||||||
|
public override long Id => 5001;
|
||||||
|
public override string Name => "攻击之爪";
|
||||||
|
public override string Description => Effects.Count > 0 ? Effects.First().Description : "";
|
||||||
|
public Item Item { get; }
|
||||||
|
|
||||||
|
public 攻击之爪技能(Character? character, Item item, double exATK) : base(SkillType.Passive, character)
|
||||||
|
{
|
||||||
|
Level = 1;
|
||||||
|
Item = item;
|
||||||
|
Effects.Add(new 攻击之爪特效(this, character, item, exATK));
|
||||||
|
}
|
||||||
|
|
||||||
|
public override IEnumerable<Effect> AddInactiveEffectToCharacter()
|
||||||
|
{
|
||||||
|
return Effects;
|
||||||
|
}
|
||||||
|
}
|
||||||
|
|
||||||
|
public class 攻击之爪特效 : Effect
|
||||||
|
{
|
||||||
|
public override long Id => Skill.Id;
|
||||||
|
public override string Name => Skill.Name;
|
||||||
|
public override string Description => $"增加角色 {攻击力加成} 点攻击力。" + (!TargetSelf ? $"来自:[ {Source} ] 的 [ {Item.Name} ]" : "");
|
||||||
|
public override EffectType EffectType => EffectType.Item;
|
||||||
|
public override bool TargetSelf => true;
|
||||||
|
|
||||||
|
public Item Item { get; }
|
||||||
|
private readonly double 攻击力加成 = 0;
|
||||||
|
|
||||||
|
public override void OnEffectGained(Character character)
|
||||||
|
{
|
||||||
|
character.ExATK2 += 攻击力加成;
|
||||||
|
}
|
||||||
|
|
||||||
|
public override void OnEffectLost(Character character)
|
||||||
|
{
|
||||||
|
character.ExATK2 -= 攻击力加成;
|
||||||
|
}
|
||||||
|
|
||||||
|
public 攻击之爪特效(Skill skill, Character? source, Item item, double exATK) : base(skill)
|
||||||
|
{
|
||||||
|
ActionQueue = skill.ActionQueue;
|
||||||
|
Source = source;
|
||||||
|
Item = item;
|
||||||
|
攻击力加成 = exATK;
|
||||||
|
}
|
||||||
|
}
|
||||||
|
}
|
||||||
@ -1,6 +1,6 @@
|
|||||||
using Milimoe.FunGame.Testing.Tests;
|
using Milimoe.FunGame.Testing.Tests;
|
||||||
|
|
||||||
bool printout = false;
|
bool printout = true;
|
||||||
List<string> strs = FunGameSimulation.StartGame(printout);
|
List<string> strs = FunGameSimulation.StartGame(printout);
|
||||||
if (printout == false)
|
if (printout == false)
|
||||||
{
|
{
|
||||||
@ -10,5 +10,4 @@ if (printout == false)
|
|||||||
}
|
}
|
||||||
}
|
}
|
||||||
|
|
||||||
|
|
||||||
Console.ReadKey();
|
Console.ReadKey();
|
||||||
|
|||||||
@ -24,17 +24,17 @@ namespace Milimoe.FunGame.Testing.Skills
|
|||||||
{
|
{
|
||||||
public override long Id => Skill.Id;
|
public override long Id => Skill.Id;
|
||||||
public override string Name => Skill.Name;
|
public override string Name => Skill.Name;
|
||||||
public override string Description => $"暴击伤害提升 30%。";
|
public override string Description => $"暴击伤害提升 70%。";
|
||||||
public override bool TargetSelf => true;
|
public override bool TargetSelf => true;
|
||||||
|
|
||||||
public override void OnEffectGained(Character character)
|
public override void OnEffectGained(Character character)
|
||||||
{
|
{
|
||||||
character.ExCritDMG += 0.3;
|
character.ExCritDMG += 0.7;
|
||||||
}
|
}
|
||||||
|
|
||||||
public override void OnEffectLost(Character character)
|
public override void OnEffectLost(Character character)
|
||||||
{
|
{
|
||||||
character.ExCritDMG -= 0.3;
|
character.ExCritDMG -= 0.7;
|
||||||
}
|
}
|
||||||
}
|
}
|
||||||
}
|
}
|
||||||
|
|||||||
@ -36,7 +36,7 @@ namespace Milimoe.FunGame.Testing.Skills
|
|||||||
public override void OnEffectGained(Character character)
|
public override void OnEffectGained(Character character)
|
||||||
{
|
{
|
||||||
Skill.IsInEffect = true;
|
Skill.IsInEffect = true;
|
||||||
character.CharacterEffectControlTypes.Add(this, [EffectControlType.Unselectable]);
|
character.CharacterEffectTypes.Add(this, [EffectType.Unselectable]);
|
||||||
character.UpdateCharacterState();
|
character.UpdateCharacterState();
|
||||||
character.ExSPD += 100;
|
character.ExSPD += 100;
|
||||||
character.ExCritRate += 0.08;
|
character.ExCritRate += 0.08;
|
||||||
@ -48,7 +48,7 @@ namespace Milimoe.FunGame.Testing.Skills
|
|||||||
if (!破隐一击)
|
if (!破隐一击)
|
||||||
{
|
{
|
||||||
// 在没有打出破隐一击的情况下,恢复角色状态
|
// 在没有打出破隐一击的情况下,恢复角色状态
|
||||||
character.CharacterEffectControlTypes.Remove(this);
|
character.CharacterEffectTypes.Remove(this);
|
||||||
character.UpdateCharacterState();
|
character.UpdateCharacterState();
|
||||||
}
|
}
|
||||||
character.ExSPD -= 100;
|
character.ExSPD -= 100;
|
||||||
@ -61,7 +61,7 @@ namespace Milimoe.FunGame.Testing.Skills
|
|||||||
{
|
{
|
||||||
首次伤害 = false;
|
首次伤害 = false;
|
||||||
破隐一击 = true;
|
破隐一击 = true;
|
||||||
character.CharacterEffectControlTypes.Remove(this);
|
character.CharacterEffectTypes.Remove(this);
|
||||||
character.UpdateCharacterState();
|
character.UpdateCharacterState();
|
||||||
double d = 伤害加成;
|
double d = 伤害加成;
|
||||||
damage = Calculation.Round2Digits(damage + d);
|
damage = Calculation.Round2Digits(damage + d);
|
||||||
|
|||||||
@ -25,7 +25,7 @@ namespace Milimoe.FunGame.Testing.Skills
|
|||||||
{
|
{
|
||||||
public override long Id => Skill.Id;
|
public override long Id => Skill.Id;
|
||||||
public override string Name => Skill.Name;
|
public override string Name => Skill.Name;
|
||||||
public override string Description => $"对目标敌人造成 {Calculation.Round2Digits(90 + 60 * (Skill.Level - 1))} + {Calculation.Round2Digits((1.2 + 1.8 * (Skill.Level - 1)) * 100)}% 智力 [ {Damage} ] 点{CharacterSet.GetMagicName(MagicType)}。";
|
public override string Description => $"对目标敌人造成 {Calculation.Round2Digits(90 + 60 * (Skill.Level - 1))} + {Calculation.Round2Digits((1.2 + 1.8 * (Skill.Level - 1)) * 100)}% 智力 [ {Damage} ] 点{CharacterSet.GetMagicDamageName(MagicType)}。";
|
||||||
public override bool TargetSelf => false;
|
public override bool TargetSelf => false;
|
||||||
public override int TargetCount => 1;
|
public override int TargetCount => 1;
|
||||||
|
|
||||||
|
|||||||
@ -1,4 +1,5 @@
|
|||||||
using System.Text;
|
using System.Text;
|
||||||
|
using FunGame.Testing.Items;
|
||||||
using Milimoe.FunGame.Core.Api.Utility;
|
using Milimoe.FunGame.Core.Api.Utility;
|
||||||
using Milimoe.FunGame.Core.Entity;
|
using Milimoe.FunGame.Core.Entity;
|
||||||
using Milimoe.FunGame.Core.Library.Common.Addon;
|
using Milimoe.FunGame.Core.Library.Common.Addon;
|
||||||
@ -78,7 +79,7 @@ namespace Milimoe.FunGame.Testing.Tests
|
|||||||
// M = 5, W = 0, P1 = 0, P3 = 2
|
// M = 5, W = 0, P1 = 0, P3 = 2
|
||||||
// M = 5, W = 1, P1 = 0, P3 = 0
|
// M = 5, W = 1, P1 = 0, P3 = 0
|
||||||
|
|
||||||
if (list.Count > 3)
|
if (list.Count > 11)
|
||||||
{
|
{
|
||||||
if (PrintOut) Console.WriteLine();
|
if (PrintOut) Console.WriteLine();
|
||||||
if (PrintOut) Console.WriteLine("Start!!!");
|
if (PrintOut) Console.WriteLine("Start!!!");
|
||||||
@ -320,6 +321,7 @@ namespace Milimoe.FunGame.Testing.Tests
|
|||||||
|
|
||||||
// 总游戏时长
|
// 总游戏时长
|
||||||
double totalTime = 0;
|
double totalTime = 0;
|
||||||
|
送礼(actionQueue, totalTime);
|
||||||
|
|
||||||
// 总回合数
|
// 总回合数
|
||||||
int i = 1;
|
int i = 1;
|
||||||
@ -432,5 +434,18 @@ namespace Milimoe.FunGame.Testing.Tests
|
|||||||
Msg += str + "\r\n";
|
Msg += str + "\r\n";
|
||||||
if (PrintOut) Console.WriteLine(str);
|
if (PrintOut) Console.WriteLine(str);
|
||||||
}
|
}
|
||||||
|
|
||||||
|
public static void 送礼(ActionQueue queue, double totalTime)
|
||||||
|
{
|
||||||
|
if (totalTime == 0)
|
||||||
|
{
|
||||||
|
WriteLine("社区送温暖了,现在向所有人发放 [ 攻击之爪 +50 ]!!");
|
||||||
|
foreach (Character character in queue.Queue)
|
||||||
|
{
|
||||||
|
Item 攻击之爪 = new 攻击之爪50();
|
||||||
|
queue.Equip(character, EquipItemToSlot.Accessory1, 攻击之爪);
|
||||||
|
}
|
||||||
|
}
|
||||||
|
}
|
||||||
}
|
}
|
||||||
}
|
}
|
||||||
|
|||||||
Loading…
x
Reference in New Issue
Block a user