Skip to content
This repository has been archived by the owner on Jan 28, 2025. It is now read-only.

Commit

Permalink
Have moved over to new genre format
Browse files Browse the repository at this point in the history
  • Loading branch information
grofit committed Aug 20, 2021
1 parent d96fb98 commit 89ce73e
Show file tree
Hide file tree
Showing 29 changed files with 344 additions and 12 deletions.
6 changes: 3 additions & 3 deletions appveyor.yml
Original file line number Diff line number Diff line change
@@ -1,4 +1,4 @@
version: 0.19.{build}
version: 0.20.{build}
branches:
only:
- master
Expand All @@ -14,9 +14,9 @@ dotnet_csproj:
file_version: '{version}'
informational_version: '{version}'
before_build:
- cmd: nuget restore src/OpenRpg.Genres.Fantasy.sln
- cmd: nuget restore src/OpenRpg.Genres.sln
build:
project: src/OpenRpg.Genres.Fantasy.sln
project: src/OpenRpg.Genres.sln
publish_nuget: true
verbosity: minimal
artifacts:
Expand Down
4 changes: 4 additions & 0 deletions build/pack.bat
Original file line number Diff line number Diff line change
@@ -0,0 +1,4 @@
set version=0.7.00
dotnet pack ../src/OpenRpg.Genres -c Release -o ../../_dist /p:version=%version%
dotnet pack ../src/OpenRpg.Genres.Fantasy -c Release -o ../../_dist /p:version=%version%
dotnet pack ../src/OpenRpg.Genres.Scifi -c Release -o ../../_dist /p:version=%version%
3 changes: 2 additions & 1 deletion readme.md
Original file line number Diff line number Diff line change
Expand Up @@ -6,7 +6,8 @@ This builds on top of the `OpenRpg` core library and adds common genres infrastr
[![Nuget Version][nuget-image]][nuget-url]
[![Join Discord Chat][discord-image]][discord-url]

This contains common fantasy related helpers, i.e providing helpers for str, dex, con, int, wis, cha releated stats and
## Summary
This contains common helpers for various genres, such as fantasy or scifi, i.e providing helpers for str, dex, con, int, wis, cha releated stats and
common item qualities and damage types which all adhere to common fantasy settings.

As with all layers on top of OpenRpg feel free to use parts or all of this as well as augment it to fit your needs.
Expand Down
9 changes: 1 addition & 8 deletions src/OpenRpg.Genres.Fantasy/OpenRpg.Genres.Fantasy.csproj
Original file line number Diff line number Diff line change
Expand Up @@ -10,14 +10,7 @@
<Description>Adds common types and classes for fantasy style settings</Description>
<PackageTags>rpg game-development xna monogame unity godot</PackageTags>
</PropertyGroup>

<ItemGroup>
<PackageReference Include="OpenRpg.Combat" Version="0.18.143" />
<PackageReference Include="OpenRpg.Core" Version="0.18.143" />
<PackageReference Include="OpenRpg.Items" Version="0.18.143" />
<PackageReference Include="OpenRpg.Quests" Version="0.18.143" />
</ItemGroup>


<ItemGroup>
<ProjectReference Include="..\OpenRpg.Genres\OpenRpg.Genres.csproj" />
</ItemGroup>
Expand Down
11 changes: 11 additions & 0 deletions src/OpenRpg.Genres.Scifi/Equipment/CharacterSlots/ArmourSlot.cs
Original file line number Diff line number Diff line change
@@ -0,0 +1,11 @@
using OpenRpg.Genres.Scifi.Types;
using OpenRpg.Items;
using OpenRpg.Items.Equipment;

namespace OpenRpg.Genres.Scifi.Equipment.CharacterSlots
{
public class ArmourSlot : DefaultEquipmentSlot<IItem>
{
public override int SlotType => ItemTypes.Armour;
}
}
11 changes: 11 additions & 0 deletions src/OpenRpg.Genres.Scifi/Equipment/CharacterSlots/WeaponSlot.cs
Original file line number Diff line number Diff line change
@@ -0,0 +1,11 @@
using OpenRpg.Genres.Scifi.Types;
using OpenRpg.Items;
using OpenRpg.Items.Equipment;

namespace OpenRpg.Genres.Scifi.Equipment.CharacterSlots
{
public class WeaponSlot : DefaultEquipmentSlot<IItem>
{
public override int SlotType => ItemTypes.GenericWeapon;
}
}
9 changes: 9 additions & 0 deletions src/OpenRpg.Genres.Scifi/Equipment/IShipEquipment.cs
Original file line number Diff line number Diff line change
@@ -0,0 +1,9 @@
using OpenRpg.Items.Equipment;

namespace OpenRpg.Genres.Scifi.Equipment
{
public interface IShipEquipment : IEquipment
{

}
}
11 changes: 11 additions & 0 deletions src/OpenRpg.Genres.Scifi/Equipment/ShipSlots/EngineSlot.cs
Original file line number Diff line number Diff line change
@@ -0,0 +1,11 @@
using OpenRpg.Genres.Scifi.Types;
using OpenRpg.Items;
using OpenRpg.Items.Equipment;

namespace OpenRpg.Genres.Scifi.Equipment.ShipSlots
{
public class EngineSlot : DefaultEquipmentSlot<IItem>
{
public override int SlotType => ShipItemTypes.Engine;
}
}
11 changes: 11 additions & 0 deletions src/OpenRpg.Genres.Scifi/Equipment/ShipSlots/HullArmourSlot.cs
Original file line number Diff line number Diff line change
@@ -0,0 +1,11 @@
using OpenRpg.Genres.Scifi.Types;
using OpenRpg.Items;
using OpenRpg.Items.Equipment;

namespace OpenRpg.Genres.Scifi.Equipment.ShipSlots
{
public class HullArmourSlot : DefaultEquipmentSlot<IItem>
{
public override int SlotType => ShipItemTypes.HullArmour;
}
}
11 changes: 11 additions & 0 deletions src/OpenRpg.Genres.Scifi/Equipment/ShipSlots/MiscSlot.cs
Original file line number Diff line number Diff line change
@@ -0,0 +1,11 @@
using OpenRpg.Genres.Scifi.Types;
using OpenRpg.Items;
using OpenRpg.Items.Equipment;

namespace OpenRpg.Genres.Scifi.Equipment.ShipSlots
{
public class MiscSlot : DefaultEquipmentSlot<IItem>
{
public override int SlotType => ShipItemTypes.Misc;
}
}
11 changes: 11 additions & 0 deletions src/OpenRpg.Genres.Scifi/Equipment/ShipSlots/ShieldSlot.cs
Original file line number Diff line number Diff line change
@@ -0,0 +1,11 @@
using OpenRpg.Genres.Scifi.Types;
using OpenRpg.Items;
using OpenRpg.Items.Equipment;

namespace OpenRpg.Genres.Scifi.Equipment.ShipSlots
{
public class ShieldSlot : DefaultEquipmentSlot<IItem>
{
public override int SlotType => ShipItemTypes.Shield;
}
}
11 changes: 11 additions & 0 deletions src/OpenRpg.Genres.Scifi/Equipment/ShipSlots/WeaponSlot.cs
Original file line number Diff line number Diff line change
@@ -0,0 +1,11 @@
using OpenRpg.Genres.Scifi.Types;
using OpenRpg.Items;
using OpenRpg.Items.Equipment;

namespace OpenRpg.Genres.Scifi.Equipment.ShipSlots
{
public class WeaponSlot : DefaultEquipmentSlot<IItem>
{
public override int SlotType => ShipItemTypes.GenericWeapon;
}
}
11 changes: 11 additions & 0 deletions src/OpenRpg.Genres.Scifi/Equipment/ShipSlots/WingSlot.cs
Original file line number Diff line number Diff line change
@@ -0,0 +1,11 @@
using OpenRpg.Genres.Scifi.Types;
using OpenRpg.Items;
using OpenRpg.Items.Equipment;

namespace OpenRpg.Genres.Scifi.Equipment.ShipSlots
{
public class WingSlot : DefaultEquipmentSlot<IItem>
{
public override int SlotType => ShipItemTypes.Wings;
}
}
13 changes: 13 additions & 0 deletions src/OpenRpg.Genres.Scifi/Extensions/EquipmentExtensions.cs
Original file line number Diff line number Diff line change
@@ -0,0 +1,13 @@
using OpenRpg.Genres.Scifi.Equipment;
using OpenRpg.Genres.Scifi.Equipment.CharacterSlots;
using OpenRpg.Genres.Scifi.Types;
using OpenRpg.Items.Equipment;

namespace OpenRpg.Genres.Scifi.Extensions
{
public static class EquipmentExtensions
{
public static WeaponSlot WeaponSlot(this IEquipment equipment) => equipment.Slots.Get(CharacterEquipmentSlotTypes.WeaponSlot) as WeaponSlot;
public static ArmourSlot ArmourSlot(this IEquipment equipment) => equipment.Slots.Get(CharacterEquipmentSlotTypes.ArmourSlot) as ArmourSlot;
}
}
24 changes: 24 additions & 0 deletions src/OpenRpg.Genres.Scifi/Extensions/ShipEquipmentExtensions.cs
Original file line number Diff line number Diff line change
@@ -0,0 +1,24 @@
using OpenRpg.Genres.Scifi.Equipment;
using OpenRpg.Genres.Scifi.Equipment.ShipSlots;
using OpenRpg.Genres.Scifi.Types;

namespace OpenRpg.Genres.Scifi.Extensions
{
public static class ShipEquipmentExtensions
{
public static WingSlot WingSlot(this IShipEquipment equipment) => equipment.Slots.Get(ShipEquipmentSlotTypes.WingsSlot) as WingSlot;
public static EngineSlot EngineSlot(this IShipEquipment equipment) => equipment.Slots.Get(ShipEquipmentSlotTypes.EngineSlot) as EngineSlot;
public static ShieldSlot ShieldSlot(this IShipEquipment equipment) => equipment.Slots.Get(ShipEquipmentSlotTypes.ShieldSlot) as ShieldSlot;
public static HullArmourSlot HullArmourSlot(this IShipEquipment equipment) => equipment.Slots.Get(ShipEquipmentSlotTypes.HullArmourSlot) as HullArmourSlot;
public static MiscSlot MiscSlot1(this IShipEquipment equipment) => equipment.Slots.Get(ShipEquipmentSlotTypes.MiscSlot1) as MiscSlot;
public static MiscSlot MiscSlot2(this IShipEquipment equipment) => equipment.Slots.Get(ShipEquipmentSlotTypes.MiscSlot2) as MiscSlot;
public static MiscSlot MiscSlot3(this IShipEquipment equipment) => equipment.Slots.Get(ShipEquipmentSlotTypes.MiscSlot3) as MiscSlot;
public static MiscSlot MiscSlot4(this IShipEquipment equipment) => equipment.Slots.Get(ShipEquipmentSlotTypes.MiscSlot4) as MiscSlot;
public static WeaponSlot WeaponSlot1(this IShipEquipment equipment) => equipment.Slots.Get(ShipEquipmentSlotTypes.WeaponSlot1) as WeaponSlot;
public static WeaponSlot WeaponSlot2(this IShipEquipment equipment) => equipment.Slots.Get(ShipEquipmentSlotTypes.WeaponSlot2) as WeaponSlot;
public static WeaponSlot WeaponSlot3(this IShipEquipment equipment) => equipment.Slots.Get(ShipEquipmentSlotTypes.WeaponSlot3) as WeaponSlot;
public static WeaponSlot WeaponSlot4(this IShipEquipment equipment) => equipment.Slots.Get(ShipEquipmentSlotTypes.WeaponSlot4) as WeaponSlot;
public static WeaponSlot WeaponSlot5(this IShipEquipment equipment) => equipment.Slots.Get(ShipEquipmentSlotTypes.WeaponSlot5) as WeaponSlot;
public static WeaponSlot WeaponSlot6(this IShipEquipment equipment) => equipment.Slots.Get(ShipEquipmentSlotTypes.WeaponSlot6) as WeaponSlot;
}
}
18 changes: 18 additions & 0 deletions src/OpenRpg.Genres.Scifi/OpenRpg.Genres.Scifi.csproj
Original file line number Diff line number Diff line change
@@ -0,0 +1,18 @@
<Project Sdk="Microsoft.NET.Sdk">

<PropertyGroup>
<Version>0.0.0</Version>
<TargetFrameworks>netstandard2.0;net46</TargetFrameworks>
<Title>OpenRpg.Genres.Scifi</Title>
<Authors>Grofit (LP)</Authors>
<PackageLicenseUrl>https://github.com/openrpg/OpenRpg.Genres/blob/master/LICENSE</PackageLicenseUrl>
<PackageProjectUrl>https://github.com/openrpg/OpenRpg.Genres</PackageProjectUrl>
<Description>Adds common types and classes for scifi/space ship related game types</Description>
<PackageTags>rpg game-development xna monogame unity godot</PackageTags>
</PropertyGroup>

<ItemGroup>
<ProjectReference Include="..\OpenRpg.Genres\OpenRpg.Genres.csproj" />
</ItemGroup>

</Project>
9 changes: 9 additions & 0 deletions src/OpenRpg.Genres.Scifi/Ships/IPilot.cs
Original file line number Diff line number Diff line change
@@ -0,0 +1,9 @@
using OpenRpg.Genres.Characters;

namespace OpenRpg.Genres.Scifi.Ships
{
public interface IPilot : ICharacter
{

}
}
15 changes: 15 additions & 0 deletions src/OpenRpg.Genres.Scifi/Ships/IShip.cs
Original file line number Diff line number Diff line change
@@ -0,0 +1,15 @@
using OpenRpg.Genres.Scifi.Equipment;
using OpenRpg.Genres.Scifi.Variables;
using OpenRpg.Items.Inventory;

namespace OpenRpg.Genres.Scifi.Ships
{
public interface IShip
{
IPilot Pilot { get; }
IShipTemplate ShipTemplate { get; }
IShipEquipment Equipment { get; }
IInventory Inventory { get; }
IShipStats Stats { get; }
}
}
11 changes: 11 additions & 0 deletions src/OpenRpg.Genres.Scifi/Ships/IShipTemplate.cs
Original file line number Diff line number Diff line change
@@ -0,0 +1,11 @@
using OpenRpg.Core.Common;
using OpenRpg.Core.Effects;
using OpenRpg.Core.Requirements;

namespace OpenRpg.Genres.Scifi.Ships
{
public interface IShipTemplate : IHasDataId, IHasLocaleDescription, IHasEffects, IHasRequirements
{

}
}
10 changes: 10 additions & 0 deletions src/OpenRpg.Genres.Scifi/Types/CharacterEquipmentSlotTypes.cs
Original file line number Diff line number Diff line change
@@ -0,0 +1,10 @@
namespace OpenRpg.Genres.Scifi.Types
{
public class CharacterEquipmentSlotTypes
{
public static int UnknownSlot = 0;

public static int WeaponSlot = 50;
public static int ArmourSlot = 51;
}
}
11 changes: 11 additions & 0 deletions src/OpenRpg.Genres.Scifi/Types/DamageTypes.cs
Original file line number Diff line number Diff line change
@@ -0,0 +1,11 @@
namespace OpenRpg.Genres.Scifi.Types
{
public class DamageTypes : Genres.Types.DamageTypes
{
public static int Physical = 50;
public static int Ion = 51;
public static int Laser = 52;
public static int Ballistic = 53;
public static int Explosive = 54;
}
}
31 changes: 31 additions & 0 deletions src/OpenRpg.Genres.Scifi/Types/EffectTypes.cs
Original file line number Diff line number Diff line change
@@ -0,0 +1,31 @@
namespace OpenRpg.Genres.Scifi.Types
{
public class EffectTypes
{
// Generic All types
public static int AllDamageBonusAmount = 50;
public static int AllDefenseBonusAmount = 51;
public static int AllAttributeBonusAmount = 52;
public static int AllAttackBonusPercentage = 55;
public static int AllDefenseBonusPercentage = 56;

// Resource types
public static int EnergyBonusAmount = 70;
public static int EnergyBonusPercentage = 71;
public static int ArmourBonusAmount = 73;
public static int ArmourBonusPercentage = 74;
public static int ShieldBonusAmount = 75;
public static int ShieldBonusPercentage = 76;

public static int PhysicalDamageAmount = 90;
public static int PhysicalDamagePercentage = 91;
public static int IonDamageAmount = 92;
public static int IonDamagePercentage = 93;
public static int LaserDamageAmount = 94;
public static int LaserDamagePercentage = 95;
public static int BallisticDamageAmount = 96;
public static int BallisticDamagePercentage = 97;
public static int ExplosiveDamageAmount = 98;
public static int ExplosiveDamagePercentage = 99;
}
}
9 changes: 9 additions & 0 deletions src/OpenRpg.Genres.Scifi/Types/ItemTypes.cs
Original file line number Diff line number Diff line change
@@ -0,0 +1,9 @@
namespace OpenRpg.Genres.Scifi.Types
{
public class ItemTypes : Genres.Types.ItemTypes
{
public static int Armour = 30;

public static int Consumable = 50;
}
}
22 changes: 22 additions & 0 deletions src/OpenRpg.Genres.Scifi/Types/ShipEquipmentSlotTypes.cs
Original file line number Diff line number Diff line change
@@ -0,0 +1,22 @@
namespace OpenRpg.Genres.Scifi.Types
{
public class ShipEquipmentSlotTypes
{
public static int UnknownSlot = 0;

public static int EngineSlot = 50;
public static int HullArmourSlot = 51;
public static int ShieldSlot = 52;
public static int WingsSlot = 53;
public static int MiscSlot1 = 54;
public static int MiscSlot2 = 55;
public static int MiscSlot3 = 56;
public static int MiscSlot4 = 57;
public static int WeaponSlot1 = 58;
public static int WeaponSlot2 = 59;
public static int WeaponSlot3 = 60;
public static int WeaponSlot4 = 61;
public static int WeaponSlot5 = 62;
public static int WeaponSlot6 = 63;
}
}
13 changes: 13 additions & 0 deletions src/OpenRpg.Genres.Scifi/Types/ShipItemTypes.cs
Original file line number Diff line number Diff line change
@@ -0,0 +1,13 @@
namespace OpenRpg.Genres.Scifi.Types
{
public class ShipItemTypes : Genres.Types.ItemTypes
{
public static int Wings = 30;
public static int HullArmour = 31;
public static int Shield = 32;
public static int Engine = 33;
public static int Misc = 34;

public static int Consumable = 50;
}
}
Loading

0 comments on commit 89ce73e

Please sign in to comment.