feat: add combat and deleveling AI

This commit is contained in:
Иванов Иван
2024-08-15 17:23:24 +02:00
parent bdd026519f
commit 2943f7a50b
79 changed files with 61368 additions and 6746 deletions

View File

@@ -15,8 +15,9 @@ namespace Client.Domain.Entities
public string Name { get; set; }
public string IconName { get; set; }
public string Description { get; set; }
public int Mana { get { return mana; } set { mana = value; }}
public int Mana { get; set; }
public uint Weight { get; set; }
public virtual string FullDescription => Description;
public BaseItem(uint id, uint itemId, ItemTypeEnum type, string name, string iconName, string description, int mana, uint weight)
{
@@ -26,10 +27,8 @@ namespace Client.Domain.Entities
Name = name;
IconName = iconName;
Description = description;
this.mana = mana;
Mana = mana;
Weight = weight;
}
private int mana;
}
}

View File

@@ -12,7 +12,6 @@ namespace Client.Domain.Entities
public uint Amount { get => amount; set => amount = value; }
public bool IsQuest { get; set; }
public bool IsAutoused { get => isAutoused; set => isAutoused = value; }
public string FullDescription { get => Description; }
public EtcItem(uint id, uint itemId, ItemTypeEnum type, string name, string iconName, string description, int mana, uint weight, uint amount, bool isQuest, bool isAutoused) :
base(id, itemId, type, name, iconName, description, mana, weight)

View File

@@ -70,6 +70,14 @@ namespace Client.Domain.Entities
[JsonProperty("AttackerIds", ObjectCreationHandling = ObjectCreationHandling.Replace)]
public List<uint> AttackerIds { get => attackerIds; set { if (!value.All(attackerIds.Contains) || !attackerIds.All(value.Contains)) { attackerIds = value; OnPropertyChanged("AttackerIds"); } } }
public bool HasValidTarget
{
get
{
return Target != null && Target.IsHostile && !Target.VitalStats.IsDead;
}
}
public Hero(uint id, Transform transform, FullName fullName, VitalStats vitalStats, Phenotype phenotype, ExperienceInfo experienceInfo, PermanentStats permanentStats, VariableStats variableStats, Reputation reputation, InventoryInfo inventoryInfo, uint targetId, bool isStanding)
{
Id = id;

View File

@@ -16,9 +16,6 @@ namespace Client.Domain.Entities
string Description { get; set; }
int Mana { get; set; }
uint Weight { get; set; }
uint Amount { get; set; }
bool IsQuest { get; set; }
bool IsAutoused { get; set; }
string FullDescription { get; }
}
}

View File

@@ -16,7 +16,7 @@ namespace Client.Domain.Entities
public Transform Transform { get; set; }
public bool IsHostile { get; set; }
public uint NpcId { get; set; }
public SpoilStateEnum SpoilState { get; set; }
public SpoilStateEnum SpoilState { get { return spoilState; } set { if (spoilState != value) { spoilState = value; OnPropertyChanged(); } } }
public FullName FullName
{
get => fullName;
@@ -134,5 +134,6 @@ namespace Client.Domain.Entities
private uint aggroRadius;
private VitalStats vitalStats;
private FullName fullName;
private SpoilStateEnum spoilState;
}
}

View File

@@ -0,0 +1,28 @@
using Client.Domain.Enums;
using System;
using System.Collections.Generic;
using System.Linq;
using System.Text;
using System.Threading.Tasks;
namespace Client.Domain.Entities
{
public class WeaponItem : BaseItem, ItemInterface
{
public WeaponTypeEnum WeaponType { get; set; }
public CrystalTypeEnum CrystalType { get; set; }
public byte SoulshotCount { get; set; }
public byte SpiritshotCount { get; set; }
public bool IsEquipped { get; set; }
public WeaponItem(uint id, uint itemId, ItemTypeEnum type, string name, string iconName, string description, int mana, uint weight, WeaponTypeEnum weaponType, CrystalTypeEnum crystalType, byte soulshotCount, byte spiritshotCount, bool isEquipped) :
base(id, itemId, type, name, iconName, description, mana, weight)
{
WeaponType = weaponType;
CrystalType = crystalType;
SoulshotCount = soulshotCount;
SpiritshotCount = spiritshotCount;
IsEquipped = isEquipped;
}
}
}