//
// Licensed under the MIT License. See LICENSE file in the project root for full license information.
//
namespace MUnique.OpenMU.DataModel.Configuration;
using MUnique.OpenMU.Annotations;
using MUnique.OpenMU.AttributeSystem;
using MUnique.OpenMU.DataModel.Configuration.Items;
using MUnique.OpenMU.DataModel.Entities;
using MUnique.OpenMU.PlugIns;
///
/// Defines the game configuration.
/// A game configuration contains the whole configuration of a game, directly or indirectly.
///
[AggregateRoot]
[Cloneable]
public partial class GameConfiguration
{
///
/// Gets or sets the maximum reachable level.
///
public short MaximumLevel { get; set; }
///
/// Gets or sets the maximum reachable master level.
///
public short MaximumMasterLevel { get; set; }
///
/// Gets or sets the experience rate of the game.
///
public float ExperienceRate { get; set; }
///
/// Gets or sets the master experience rate of the game.
///
public float MasterExperienceRate { get; set; } = 1.0f;
///
/// Gets or sets a value indicating whether experience overflow should be prevented.
/// When true, if gaining experience would exceed the amount needed for the next level,
/// only the necessary experience for the next level is gained, and the overflow is discarded.
/// When false, excess experience is applied to subsequent levels (default behavior).
///
public bool PreventExperienceOverflow { get; set; }
///
/// Gets or sets the minimum monster level which are required to be killed
/// in order to gain master experience for master character classes.
///
public byte MinimumMonsterLevelForMasterExperience { get; set; }
///
/// Gets or sets the information range. This defines how far players can see other game objects.
///
public byte InfoRange { get; set; }
///
/// Gets or sets a value indicating whether area skills hit players.
///
///
/// Usually false, during castle siege this might be true.
///
public bool AreaSkillHitsPlayer { get; set; }
///
/// Gets or sets the maximum inventory money value.
///
public int MaximumInventoryMoney { get; set; }
///
/// Gets or sets the maximum vault money value.
///
public int MaximumVaultMoney { get; set; }
///
/// Gets or sets a value indicating whether money pickup should be clamped to the maximum inventory money limit instead of failing when the limit would be exceeded.
///
///
/// When true, if picking up money would exceed the maximum inventory money, the player will receive as much as possible (up to the limit) instead of the pickup failing completely.
/// When false, the pickup will fail if it would exceed the maximum (default behavior).
///
public bool ClampMoneyOnPickup { get; set; }
///
/// Gets or sets the level delta used to determine the pool of items eligible for excellent drops.
/// A monster must be at least this many levels above an item's DropLevel for the item to be eligible as excellent.
///
public byte ExcellentItemDropLevelDelta { get; set; }
///
/// Gets or sets the experience formula per level. The variable name for the level is "level".
///
public string? ExperienceFormula { get; set; }
///
/// Gets or sets the experience formula per master level. The variable name for the level is "level".
///
public string? MasterExperienceFormula { get; set; }
///
/// Gets or sets the interval for attribute recoveries. See also MUnique.OpenMU.GameLogic.Attributes.Stats.Regeneration.
///
public int RecoveryInterval { get; set; }
///
/// Gets or sets the maximum numbers of letters a player can have in his inbox.
///
public int MaximumLetters { get; set; }
///
/// Gets or sets the price of sending a letter.
///
public int LetterSendPrice { get; set; }
///
/// Gets or sets the maximum number of characters per account.
///
public byte MaximumCharactersPerAccount { get; set; }
///
/// Gets or sets the character name regex.
///
///
/// "^[a-zA-Z0-9]{3,10}$";.
///
public string? CharacterNameRegex { get; set; }
///
/// Gets or sets the maximum length of the password.
///
public int MaximumPasswordLength { get; set; }
///
/// Gets or sets the maximum size of parties.
///
public byte MaximumPartySize { get; set; }
///
/// Gets or sets a value indicating whether if a monster should drop or adds money to the character directly.
///
public bool ShouldDropMoney { get; set; }
///
/// Gets or sets the duration of item drops on the ground.
///
public TimeSpan ItemDropDuration { get; set; }
///
/// Gets or sets the maximum droppable item option level.
///
public byte MaximumItemOptionLevelDrop { get; set; }
///
/// Gets or sets the accumulated damage which needs to be done to decrease of a defending item by 1.
///
public double DamagePerOneItemDurability { get; set; }
///
/// Gets or sets the accumulated damage which needs to be done to decrease of a pet item by 1.
///
public double DamagePerOnePetDurability { get; set; }
///
/// Gets or sets the number of hits which needs to be done to decrease the of an offensive item by 1.
///
public double HitsPerOneItemDurability { get; set; }
///
/// Gets or sets the duel configuration.
///
[MemberOfAggregate]
public virtual DuelConfiguration? DuelConfiguration { get; set; }
///
/// Gets or sets the possible jewel mixes.
///
[MemberOfAggregate]
public virtual ICollection JewelMixes { get; protected set; } = null!;
///
/// Gets or sets the warp list.
///
[MemberOfAggregate]
public virtual ICollection WarpList { get; protected set; } = null!;
///
/// Gets or sets the drop item groups which can be assigned to maps and characters.
///
[MemberOfAggregate]
public virtual ICollection DropItemGroups { get; protected set; } = null!;
///
/// Gets or sets the skills of this game configuration.
///
[MemberOfAggregate]
public virtual ICollection Skills { get; protected set; } = null!;
///
/// Gets or sets the character classes.
///
[MemberOfAggregate]
public virtual ICollection CharacterClasses { get; protected set; } = null!;
///
/// Gets or sets the item definitions.
///
[MemberOfAggregate]
public virtual ICollection Items { get; protected set; } = null!;
///
/// Gets or sets the item level bonus tables.
///
[MemberOfAggregate]
public virtual ICollection ItemLevelBonusTables { get; protected set; } = null!;
///
/// Gets or sets the item slot types.
///
[MemberOfAggregate]
public virtual ICollection ItemSlotTypes { get; protected set; } = null!;
///
/// Gets or sets the item option definitions.
///
[MemberOfAggregate]
public virtual ICollection ItemOptions { get; protected set; } = null!;
///
/// Gets or sets the item option types.
///
[MemberOfAggregate]
public virtual ICollection ItemOptionTypes { get; protected set; } = null!;
///
/// Gets or sets the item set groups.
///
[MemberOfAggregate]
public virtual ICollection ItemSetGroups { get; protected set; } = null!;
///
/// Gets or sets the item option combination bonuses.
///
[MemberOfAggregate]
public virtual ICollection ItemOptionCombinationBonuses { get; protected set; } = null!;
///
/// Gets or sets the map definitions.
///
[MemberOfAggregate]
public virtual ICollection Maps { get; protected set; } = null!;
///
/// Gets or sets the monster definitions.
///
[MemberOfAggregate]
public virtual ICollection Monsters { get; protected set; } = null!;
///
/// Gets or sets the attributes.
///
[MemberOfAggregate]
public virtual ICollection Attributes { get; protected set; } = null!;
///
/// Gets or sets the magic effects.
///
[MemberOfAggregate]
public virtual ICollection MagicEffects { get; protected set; } = null!;
///
/// Gets or sets the master skill roots.
///
[MemberOfAggregate]
public virtual ICollection MasterSkillRoots { get; protected set; } = null!;
///
/// Gets or sets the attribute combinations.
///
[MemberOfAggregate]
public virtual ICollection GlobalAttributeCombinations { get; protected set; } = null!;
///
/// Gets or sets the base attribute values.
///
[MemberOfAggregate]
public virtual ICollection GlobalBaseAttributeValues { get; protected set; } = null!;
///
/// Gets or sets the plug in configurations.
///
[MemberOfAggregate]
public virtual ICollection PlugInConfigurations { get; protected set; } = null!;
///
/// Gets or sets the event definitions.
///
[MemberOfAggregate]
public virtual ICollection MiniGameDefinitions { get; protected set; } = null!;
///
/// Gets or sets the castle siege configuration.
///
[MemberOfAggregate]
public virtual CastleSiegeConfiguration? CastleSiegeConfiguration { get; set; }
///
public override string ToString()
{
return "Default Game Configuration";
}
}