public UserInfo(UserId userId, User user) { Dead = true; MaxStats = new Stats.Stats(new ReadOnlyDictionary <StatsProperty, decimal>( new Dictionary <StatsProperty, decimal> { { StatsProperty.Health, 100 }, { StatsProperty.Mana, 100 }, { StatsProperty.Stamina, 100 }, { StatsProperty.Intelligence, 100 }, { StatsProperty.Strength, 100 }, { StatsProperty.Defence, 100 }, { StatsProperty.Karma, 100 } } )); MinStats = new Stats.Stats(new ReadOnlyDictionary <StatsProperty, decimal>( new Dictionary <StatsProperty, decimal> { { StatsProperty.Health, 0 }, { StatsProperty.Mana, 0 }, { StatsProperty.Stamina, 0 }, { StatsProperty.Intelligence, 0 }, { StatsProperty.Strength, 0 }, { StatsProperty.Defence, 0 }, { StatsProperty.Karma, -100 } } )); BaseStats = new Stats.Stats(Stats.Stats.DefaultStats); UserId = userId; User = user; _name = Generator.Generate(User.Random); Statistics = new Statistics(user); Level = new UserLevel(user); RecalculateStats(); }
public UserInfo(bool dead, UserId userId, Stats.Stats baseStats, Stats.Stats currentStats) { Dead = dead; UserId = userId; BaseStats = baseStats; CurrentStats = currentStats; }
public UserInfo(bool dead, UserId userId, Stats.Stats baseStats, Stats.Stats currentStats, string _name, Statistics statistics, UserLevel level) { Dead = dead; UserId = userId; BaseStats = baseStats; CurrentStats = currentStats; this._name = _name; Statistics = statistics; Level = level; }
internal static Stats.Stats ApplyItems(StatsEffect stats, IEnumerable <ItemInfo> activeItems) { var result = new Stats.Stats(stats.Effect); foreach (var item in activeItems) { if (item.Item.Effect == null) { continue; } for (var i = 0; i < item.Count; i++) { result = result.Apply(item.Item.Effect); } } return(result); }
public UserInfo(UserId userId, User user) { Dead = true; MaxStats = new Stats.Stats(new ReadOnlyDictionary <StatsProperty, decimal>( new Dictionary <StatsProperty, decimal> { { StatsProperty.Health, 100 }, { StatsProperty.Mana, 100 }, { StatsProperty.Stamina, 100 }, { StatsProperty.Intelligence, 100 }, { StatsProperty.Strength, 100 }, { StatsProperty.Defence, 100 }, { StatsProperty.Karma, 100 } } )); MinStats = new Stats.Stats(new ReadOnlyDictionary <StatsProperty, decimal>( new Dictionary <StatsProperty, decimal> { { StatsProperty.Health, 0 }, { StatsProperty.Mana, 0 }, { StatsProperty.Stamina, 0 }, { StatsProperty.Intelligence, 0 }, { StatsProperty.Strength, 0 }, { StatsProperty.Defence, 0 }, { StatsProperty.Karma, -100 } } )); BaseStats = new Stats.Stats(new ReadOnlyDictionary <StatsProperty, decimal>( new Dictionary <StatsProperty, decimal> { { StatsProperty.Health, MaxStats.Effect[StatsProperty.Health] }, { StatsProperty.Mana, MaxStats.Effect[StatsProperty.Mana] }, { StatsProperty.Stamina, MaxStats.Effect[StatsProperty.Stamina] } } )); UserId = userId; User = user; RecalculateStats(); }