Hinter MatchOptions.Extended: Glyphe als Teamwahl einer Lane (Türme 5 s unverwundbar, sobald einer unter 50 % fällt; 4 Runden Abklingzeit nur nach Auslösen), vier Rezepte (Bollwerk, Glutsturm, Quellherz, Splitterkrone), Ancient-Stufen 1-3 (150 x Stufe, Reparatur 1.000, Schuss 45/75/110), Mid-Bots jagen bei sicherer Lane die Grotte. Teampanel mit Glyphe und Ancient, Rezepte im Shop (TEILE FEHLEN), Glyphen-Ring und Ancient-Schüsse. Kern 566/566 (s2 35), EditMode 32/32, PlayMode 17/17, Verify 718/0, Selbsttest 30/30, Golden 0, Fingerabdruck unverändert. Co-Authored-By: Claude Opus 5.5 <noreply@anthropic.com>
214 lines
7.1 KiB
C#
214 lines
7.1 KiB
C#
using System.Collections.Generic;
|
|
|
|
namespace Luneraria.Core
|
|
{
|
|
/// <summary>
|
|
/// Combat definition of a unit type: troop, monster, send, hero, champion, boss or building.
|
|
/// One type for all, as in the reference, where definitions were dictionaries; the defaults
|
|
/// are the fallbacks the rules used for missing keys (e.g. SiegeFactor 1, HpFactor 1).
|
|
/// </summary>
|
|
public sealed class UnitDef
|
|
{
|
|
public string Id = "";
|
|
public string DisplayName = "";
|
|
public int Cost;
|
|
public string UpgradeId = "";
|
|
public double MaxHp = 1.0;
|
|
public double Damage;
|
|
/// <summary>0 Klinge, 1 Durchschlag, 2 Impuls.</summary>
|
|
public int AttackType;
|
|
/// <summary>0 Leicht, 1 Schwer, 2 Ätherisch.</summary>
|
|
public int ArmorType;
|
|
public double AttackRange = 1.0;
|
|
public double Speed = 2.0;
|
|
public string Ability = "";
|
|
public int LeakValue;
|
|
public int Bounty;
|
|
public string AbilityDescription = "";
|
|
public bool IsBoss;
|
|
public int IncomeGain;
|
|
// Set by the match for army units and heroes.
|
|
public string Role = "";
|
|
public string HeroId = "";
|
|
public int Level = 1;
|
|
public double ViewScale = 1.0;
|
|
public double Regen;
|
|
public double ItemSplash;
|
|
public List<string> Talents = new List<string>();
|
|
public double DamageBonus;
|
|
public double ReductionBonus;
|
|
public double AttackSpeedBonus;
|
|
/// <summary>Heroes with an ultimate (H1): the trigger rule chosen in planning, "" = none.</summary>
|
|
public string UltimateRule = "";
|
|
/// <summary>H1: cosmetic skin of a hero ("" = standard); the view swaps materials, the rules never read it.</summary>
|
|
public string Skin = "";
|
|
// Attack champions.
|
|
public string ChampionId = "";
|
|
public string Priority = "";
|
|
public double SiegeFactor = 1.0;
|
|
// Monsters: wave strength factor (heals of e06 scale with it).
|
|
public double HpFactor = 1.0;
|
|
// Buildings: outer, inner, base or core.
|
|
public string Tier = "";
|
|
|
|
public UnitDef Clone()
|
|
{
|
|
var copy = (UnitDef)MemberwiseClone();
|
|
copy.Talents = new List<string>(Talents);
|
|
return copy;
|
|
}
|
|
}
|
|
|
|
public sealed class HeroSpec
|
|
{
|
|
public string Id = "";
|
|
public string Name = "";
|
|
public string Title = "";
|
|
public string Model = "";
|
|
public int Cost;
|
|
public string RoleText = "";
|
|
public bool Provisional;
|
|
public string Summary = "";
|
|
/// <summary>H1 heroes describe their own kit; reference heroes show the ability of their troop model.</summary>
|
|
public string PassiveText = "";
|
|
public string AbilityText = "";
|
|
public string UltimateName = "";
|
|
public string UltimateText = "";
|
|
/// <summary>Level-1 values without items and talents.</summary>
|
|
public UnitDef Base = new UnitDef();
|
|
}
|
|
|
|
public sealed class TalentOption
|
|
{
|
|
public readonly string Id;
|
|
public readonly string Name;
|
|
public readonly string Text;
|
|
|
|
public TalentOption(string id, string name, string text)
|
|
{
|
|
Id = id;
|
|
Name = name;
|
|
Text = text;
|
|
}
|
|
}
|
|
|
|
public sealed class ItemSpec
|
|
{
|
|
public string Id = "";
|
|
public string Name = "";
|
|
public int Cost;
|
|
public string Text = "";
|
|
public double HpFlat;
|
|
public double Damage;
|
|
public double Reduction;
|
|
public double AttackSpeed;
|
|
public double Regen;
|
|
public double Splash;
|
|
public int MinLevel = 1;
|
|
/// <summary>S2 recipe items (extended rules): the two items it is made of and the fee on top; Cost is the sum.</summary>
|
|
public string[] Parts = new string[0];
|
|
public int RecipeFee;
|
|
|
|
public bool IsRecipe { get { return Parts.Length > 0; } }
|
|
}
|
|
|
|
public sealed class ChampionSpec
|
|
{
|
|
public string Id = "";
|
|
public string Name = "";
|
|
public string RoleText = "";
|
|
public string Model = "";
|
|
public int Cost;
|
|
/// <summary>Send type whose base values the champion scales (s02, s03, s04).</summary>
|
|
public string Base = "";
|
|
public string Text = "";
|
|
public string Priority = "";
|
|
public double SiegeFactor = 1.0;
|
|
public double ViewScale = 1.0;
|
|
}
|
|
|
|
public sealed class BotProfile
|
|
{
|
|
public string Name = "";
|
|
public double Front;
|
|
public double Melee;
|
|
public double Ranged;
|
|
public double Splash;
|
|
public double Support;
|
|
public int UpgradeFrom;
|
|
public double SupportLane;
|
|
public string Hero = "";
|
|
public int HeroRound;
|
|
public string[] Items = new string[0];
|
|
public int[] TalentChoices = new int[0];
|
|
public string Champion = "";
|
|
/// <summary>Boss hunters only; 0 = never goes to the grotto.</summary>
|
|
public int BossFrom;
|
|
public int BossTroops;
|
|
|
|
public bool HuntsBoss { get { return BossFrom > 0; } }
|
|
|
|
public double Share(string role)
|
|
{
|
|
switch (role)
|
|
{
|
|
case "front": return Front;
|
|
case "melee": return Melee;
|
|
case "ranged": return Ranged;
|
|
case "splash": return Splash;
|
|
default: return Support;
|
|
}
|
|
}
|
|
}
|
|
|
|
public static partial class ContentData
|
|
{
|
|
static OrderedMap<string, UnitDef> Map(params UnitDef[] entries)
|
|
{
|
|
var map = new OrderedMap<string, UnitDef>();
|
|
foreach (UnitDef entry in entries)
|
|
map[entry.Id] = entry;
|
|
return map;
|
|
}
|
|
|
|
static OrderedMap<string, HeroSpec> Ordered(params HeroSpec[] entries)
|
|
{
|
|
var map = new OrderedMap<string, HeroSpec>();
|
|
foreach (HeroSpec entry in entries)
|
|
map[entry.Id] = entry;
|
|
return map;
|
|
}
|
|
|
|
static OrderedMap<string, ItemSpec> Ordered(params ItemSpec[] entries)
|
|
{
|
|
var map = new OrderedMap<string, ItemSpec>();
|
|
foreach (ItemSpec entry in entries)
|
|
map[entry.Id] = entry;
|
|
return map;
|
|
}
|
|
|
|
static OrderedMap<string, ChampionSpec> Ordered(params ChampionSpec[] entries)
|
|
{
|
|
var map = new OrderedMap<string, ChampionSpec>();
|
|
foreach (ChampionSpec entry in entries)
|
|
map[entry.Id] = entry;
|
|
return map;
|
|
}
|
|
|
|
static OrderedMap<string, BotProfile> Ordered(params BotProfile[] entries)
|
|
{
|
|
var map = new OrderedMap<string, BotProfile>();
|
|
foreach (BotProfile entry in entries)
|
|
map[entry.Name] = entry;
|
|
return map;
|
|
}
|
|
|
|
static OrderedMap<string, string> Pairs(params string[] keysAndValues)
|
|
{
|
|
var map = new OrderedMap<string, string>();
|
|
for (int i = 0; i + 1 < keysAndValues.Length; i += 2)
|
|
map[keysAndValues[i]] = keysAndValues[i + 1];
|
|
return map;
|
|
}
|
|
}
|
|
}
|