Skip to content
New issue

Have a question about this project? Sign up for a free GitHub account to open an issue and contact its maintainers and the community.

By clicking “Sign up for GitHub”, you agree to our terms of service and privacy statement. We’ll occasionally send you account related emails.

Already on GitHub? Sign in to your account

Subsites/lotr rise to war #36

Merged
merged 7 commits into from
Dec 4, 2021
Merged
Show file tree
Hide file tree
Changes from all commits
Commits
File filter

Filter by extension

Filter by extension

Conversations
Failed to load comments.
Loading
Jump to
Jump to file
Failed to load files.
Loading
Diff view
Diff view
Original file line number Diff line number Diff line change
Expand Up @@ -22,11 +22,21 @@ protected override IEnumerable<Type> InitializeDatasetTypes()
return new List<Type>
{
typeof(AlignmentType),
typeof(AttackMethod),
typeof(BuildingType),
typeof(Commander),
typeof(CommanderClass),
typeof(CommanderSkill),
typeof(EquipmentItem),
typeof(Faction),
typeof(ItemType),
typeof(RaceType),
typeof(RingPowerLevel),
typeof(RingSkill),
typeof(RingSkillCategory),
typeof(SignificantStructure),
typeof(Skill),
typeof(UnitType),
};
}

Expand Down
Original file line number Diff line number Diff line change
@@ -1,4 +1,6 @@
namespace Utilities.Games.Models.Subsites.LOTR_RiseToWar
using System.ComponentModel.DataAnnotations;

namespace Utilities.Games.Models.Subsites.LOTR_RiseToWar
{
/// <summary>
/// The alignment of an entity. (ie. Good, Evil, Neutral)
Expand All @@ -7,6 +9,7 @@ public class AlignmentType {
/// <summary>
/// Name of the alignment.
/// </summary>
[Key]
public string Name { get; set; }
}
}
15 changes: 15 additions & 0 deletions Utilities.Games.Models/Subsites/LOTR_RiseToWar/AttackMethod.cs
Original file line number Diff line number Diff line change
@@ -0,0 +1,15 @@
using System.ComponentModel.DataAnnotations;

namespace Utilities.Games.Models.Subsites.LOTR_RiseToWar
{
/// <summary>
/// Reference to the type that an attack incurs.
/// </summary>
public class AttackMethod {
/// <summary>
/// Name of the attack type.
/// </summary>
[Key]
public string Name { get; set; }
}
}
91 changes: 91 additions & 0 deletions Utilities.Games.Models/Subsites/LOTR_RiseToWar/BuildingType.cs
Original file line number Diff line number Diff line change
@@ -0,0 +1,91 @@
using System;
using System.ComponentModel.DataAnnotations;
using Utilities.Games.Models.Contracts.Attributes;

namespace Utilities.Games.Models.Subsites.LOTR_RiseToWar
{
/// <summary>
/// Represents a building that can be constructed.
/// </summary>
public class BuildingType {
/// <summary>
/// Name of the building type.
/// </summary>
[Key]
public string Name { get; set; }

/// <summary>
/// Reference to which levels are available for this building type and the associated costs, requirements, and effects.
/// </summary>
public object[] Levels { get; set; }
}
/// <summary>
/// Represents the costs, requirements, and effects associated with acquiring or achieving this level of a building type's construction.
/// </summary>
public class BuildingLevel
{
/// <summary>
/// Reference to the building level.
/// </summary>
[Key]
public int Level { get; set; }

/// <summary>
/// Base resource/time costs to construct this level of a building type.
/// </summary>
public BuildingConstructionCost Costs { get; set; }

/// <summary>
/// Collection of other building requirements before construction can begin on this leve.
/// </summary>
public MinimumConstructionRequirement[] Requirements { get; set; }

// TODO: Effects per level
}
/// <summary>
/// Represents the construction costs associated with a specific level of a building type.
/// </summary>
public class BuildingConstructionCost
{

/// <summary>
/// Construction cost of Wood resources.
/// </summary>
public int Wood { get; set; }

/// <summary>
/// Construction cost of Stone resources.
/// </summary>
public int Stone { get; set; }

/// <summary>
/// Construction cost of Iron resources.
/// </summary>
public int Iron { get; set; }

/// <summary>
/// Construction cost of Grain resources.
/// </summary>
public int Grain { get; set; }

/// <summary>
/// Construction cost of time.
/// </summary>
public TimeSpan Time { get; set; }
}
/// <summary>
/// Represents a single minimum building requirement for a building type.
/// </summary>
public class MinimumConstructionRequirement {
/// <summary>
/// Reference to the building type that his requirement is based on.
/// </summary>
[PseudoForeignKey(typeof(BuildingType), nameof(BuildingType.Name))]
public string Building { get; set; }

/// <summary>
/// Represents the minimum level that the <see cref="BuildingType"/> must achieve before this requirement is satisfied.
/// </summary>
public int MinimumLevel { get; set; }
}
}
5 changes: 4 additions & 1 deletion Utilities.Games.Models/Subsites/LOTR_RiseToWar/Commander.cs
Original file line number Diff line number Diff line change
@@ -1,5 +1,7 @@
using System.ComponentModel.DataAnnotations;
using System;
using System.ComponentModel.DataAnnotations;
using Utilities.Games.Models.Contracts.Attributes;
using Utilities.Games.Models.Subsites.LOTR_RiseToWar.Contracts;

namespace Utilities.Games.Models.Subsites.LOTR_RiseToWar
{
Expand Down Expand Up @@ -29,6 +31,7 @@ public class Commander
/// <summary>
/// Collection of special classes for the commander.
/// </summary>
[PseudoForeignKey(typeof(CommanderClass), nameof(CommanderClass.Name))]
public string[] Classes { get; set; }

/// <summary>
Expand Down
Original file line number Diff line number Diff line change
@@ -1,4 +1,5 @@
using System.ComponentModel.DataAnnotations;
using Utilities.Games.Models.Subsites.LOTR_RiseToWar.Contracts;

namespace Utilities.Games.Models.Subsites.LOTR_RiseToWar
{
Expand Down
Original file line number Diff line number Diff line change
@@ -1,4 +1,4 @@
namespace Utilities.Games.Models.Subsites.LOTR_RiseToWar
namespace Utilities.Games.Models.Subsites.LOTR_RiseToWar.Contracts
{
/// <summary>
/// A commander's base stat.
Expand Down
Original file line number Diff line number Diff line change
@@ -0,0 +1,18 @@
namespace Utilities.Games.Models.Subsites.LOTR_RiseToWar.Contracts
{
/// <summary>
/// Represents a 2D coordinate point.
/// </summary>
public class Coordinate
{
/// <summary>
/// Represents the -X- location on the World Map.
/// </summary>
public int X { get; set; }

/// <summary>
/// Represents the -Y- location on the World Map.
/// </summary>
public int Y { get; set; }
}
}
Original file line number Diff line number Diff line change
@@ -1,4 +1,4 @@
namespace Utilities.Games.Models.Subsites.LOTR_RiseToWar
namespace Utilities.Games.Models.Subsites.LOTR_RiseToWar.Contracts
{
/// <summary>
/// An altered effect.
Expand Down
37 changes: 37 additions & 0 deletions Utilities.Games.Models/Subsites/LOTR_RiseToWar/EquipmentItem.cs
Original file line number Diff line number Diff line change
@@ -0,0 +1,37 @@
using System.ComponentModel.DataAnnotations;
using Utilities.Games.Models.Contracts.Attributes;

namespace Utilities.Games.Models.Subsites.LOTR_RiseToWar
{
/// <summary>
/// Represents a specific equipment item.
/// </summary>
public class EquipmentItem {
/// <summary>
/// Name of the item.
/// </summary>
[Key]
public string Name { get; set; }

/// <summary>
/// Reference to the type of item this is.
/// </summary>
[PseudoForeignKey(typeof(ItemType), nameof(ItemType.Name))]
public string Type { get; set; }

/// <summary>
/// Reference to the sub-type of item this is.
/// </summary>
public string SubType { get; set; }

/// <summary>
/// List of race types this equipment can be given to.
/// </summary>
[PseudoForeignKey(typeof(RaceType), nameof(RaceType.Name))]
public string[] SupportedRaces { get; set; }

// TODO: Effects, Growth per sharpening

// TODO: Skills, Growth per refinement
}
}
Original file line number Diff line number Diff line change
Expand Up @@ -3,19 +3,18 @@
namespace Utilities.Games.Models.Subsites.LOTR_RiseToWar
{
/// <summary>
/// A sub-skill that a commander can learn.
/// Represents an item type.
/// </summary>
public class SubSkill
{
public class ItemType {
/// <summary>
/// Name of the skill.
/// Name of the item type. For example: Equipment, Respect, Boost, Special.
/// </summary>
[Key]
public string Name { get; set; }

/// <summary>
/// The round that this skill kicks in.
/// Available sub-types. For example: Head, Armour, Hand, Accessory.
/// </summary>
public int Round { get; set; }
public string[] SubTypes { get; set; }
}
}
20 changes: 20 additions & 0 deletions Utilities.Games.Models/Subsites/LOTR_RiseToWar/RingPowerLevel.cs
Original file line number Diff line number Diff line change
@@ -0,0 +1,20 @@
using System.ComponentModel.DataAnnotations;

namespace Utilities.Games.Models.Subsites.LOTR_RiseToWar
{
/// <summary>
/// Represents an instance of a level applied to a Ring of Power.
/// </summary>
public class RingPowerLevel {
/// <summary>
/// Represents the level associated with this level of Ring Power.
/// </summary>
[Key]
public int Level { get; set; }

/// <summary>
/// Reference to the minimum amount of Ring Power is required to unlock this level of Ring Power.
/// </summary>
public int MinimumPowerCost { get; set; }
}
}
36 changes: 36 additions & 0 deletions Utilities.Games.Models/Subsites/LOTR_RiseToWar/RingSkill.cs
Original file line number Diff line number Diff line change
@@ -0,0 +1,36 @@
using System.ComponentModel.DataAnnotations;
using Utilities.Games.Models.Contracts.Attributes;

namespace Utilities.Games.Models.Subsites.LOTR_RiseToWar
{
/// <summary>
/// Represents a skill that can be unlocked as Ring levels progress.
/// </summary>
public class RingSkill {
/// <summary>
/// Name of the Ring skill.
/// </summary>
[Key]
public string Name { get; set; }

/// <summary>
/// Reference to the category for which this skill applies.
/// </summary>
[PseudoForeignKey(typeof(RingSkillCategory), nameof(RingSkillCategory.Name))]
public string Category { get; set; }

/// <summary>
/// Available progressions for this skill.
/// </summary>
public RingSkillLevel[] Levels { get; set; }
}
public class RingSkillLevel {
/// <summary>
/// Reference to which level this object applies to.
/// </summary>
[Key]
public int Level { get; set; }

// TODO: Effects per level
}
}
Original file line number Diff line number Diff line change
@@ -0,0 +1,15 @@
using System.ComponentModel.DataAnnotations;

namespace Utilities.Games.Models.Subsites.LOTR_RiseToWar
{
/// <summary>
/// Represents the category for various <see cref="RingSkill"/>s.
/// </summary>
public class RingSkillCategory {
/// <summary>
/// Name of the <see cref="RingSkill"/> category.
/// </summary>
[Key]
public string Name { get; set; }
}
}
Original file line number Diff line number Diff line change
@@ -0,0 +1,58 @@
using System.ComponentModel.DataAnnotations;
using Utilities.Games.Models.Subsites.LOTR_RiseToWar.Contracts;

namespace Utilities.Games.Models.Subsites.LOTR_RiseToWar
{
/// <summary>
/// Represents a significant structure on the world map.
/// </summary>
public class SignificantStructure {
/// <summary>
/// Name of the structure.
/// </summary>
[Key]
public string Name { get; set; }

/// <summary>
/// Location on the World Map that the center of this structure exists.
/// </summary>
public Coordinate Coordinates { get; set; }

/// <summary>
/// Represents the strength tier of the structure.
/// </summary>
public int Tier { get; set; }

/// <summary>
/// The hourly Ring Power output rate.
/// </summary>
public int HourlyPowerRate { get; set; }

/// <summary>
/// Base, statistical defensive characteristics for this structure.
/// </summary>
public StructureDefenses Defenses { get; set; }

// TODO: Effects
}

/// <summary>
/// The base statistical characteristics of a structure's defenses.
/// </summary>
public class StructureDefenses {
/// <summary>
/// The commander level of the army(ies) currently defending the structure.
/// </summary>
public int DefenderLevel { get; set; }

/// <summary>
/// The total number of armies stationed at the structure.
/// </summary>
public int TotalArmyCount { get; set; }

/// <summary>
/// The total amount of Siege defense is available for this structure.
/// </summary>
public int TotalSiegeDefenses { get; set; }
}
}
Loading