Implement basic structure for combat system and refactor code
This commit is contained in:
@@ -0,0 +1,34 @@
|
||||
using System.Collections.Generic;
|
||||
using KernelPanic.Core;
|
||||
using UnityEngine;
|
||||
|
||||
namespace KernelPanic.Data
|
||||
{
|
||||
/// <summary>
|
||||
/// Defines immutable card data used to create runtime card instances.
|
||||
/// </summary>
|
||||
public sealed class CardDefinition : ScriptableObject
|
||||
{
|
||||
[SerializeField] private string id;
|
||||
[SerializeField] private string displayName;
|
||||
[SerializeField] private string description;
|
||||
[SerializeField] private Language language;
|
||||
[SerializeField] private Rarity rarity;
|
||||
[SerializeField] private int cycleCost;
|
||||
[SerializeField] private ResolutionTrack resolutionTrack;
|
||||
[SerializeField] private bool distroExclusive;
|
||||
[SerializeField] private CardDefinition upgradeTarget;
|
||||
[SerializeField] private List<CardEffectDefinition> effects = new();
|
||||
|
||||
public string Id => id;
|
||||
public string DisplayName => displayName;
|
||||
public string Description => description;
|
||||
public Language Language => language;
|
||||
public Rarity Rarity => rarity;
|
||||
public int CycleCost => cycleCost;
|
||||
public ResolutionTrack ResolutionTrack => resolutionTrack;
|
||||
public bool DistroExclusive => distroExclusive;
|
||||
public CardDefinition UpgradeTarget => upgradeTarget;
|
||||
public IReadOnlyList<CardEffectDefinition> Effects => effects;
|
||||
}
|
||||
}
|
||||
@@ -0,0 +1,2 @@
|
||||
fileFormatVersion: 2
|
||||
guid: 5178747fac4dbfc448ff15d8a687e03c
|
||||
@@ -0,0 +1,13 @@
|
||||
using KernelPanic.Combat;
|
||||
using UnityEngine;
|
||||
|
||||
namespace KernelPanic.Data
|
||||
{
|
||||
/// <summary>
|
||||
/// Defines serialized card effect data that can create a runtime effect.
|
||||
/// </summary>
|
||||
public abstract class CardEffectDefinition : ScriptableObject
|
||||
{
|
||||
public abstract ICardEffect CreateRuntimeEffect();
|
||||
}
|
||||
}
|
||||
@@ -0,0 +1,2 @@
|
||||
fileFormatVersion: 2
|
||||
guid: fdb3d58d94b76834598e408448e19d2a
|
||||
@@ -0,0 +1,30 @@
|
||||
using System.Collections.Generic;
|
||||
using KernelPanic.Core;
|
||||
using UnityEngine;
|
||||
|
||||
namespace KernelPanic.Data
|
||||
{
|
||||
/// <summary>
|
||||
/// Defines a playable distro character and its starting combat constraints.
|
||||
/// </summary>
|
||||
public sealed class DistroDefinition : ScriptableObject
|
||||
{
|
||||
[SerializeField] private string id;
|
||||
[SerializeField] private string displayName;
|
||||
[SerializeField] private Language primaryLanguage;
|
||||
[SerializeField] private Language secondaryLanguage;
|
||||
[SerializeField] private int baseUptime;
|
||||
[SerializeField] private int baseRam;
|
||||
[SerializeField] private int baseCyclesPerTurn;
|
||||
[SerializeField] private List<CardDefinition> exclusiveCards = new();
|
||||
|
||||
public string Id => id;
|
||||
public string DisplayName => displayName;
|
||||
public Language PrimaryLanguage => primaryLanguage;
|
||||
public Language SecondaryLanguage => secondaryLanguage;
|
||||
public int BaseUptime => baseUptime;
|
||||
public int BaseRam => baseRam;
|
||||
public int BaseCyclesPerTurn => baseCyclesPerTurn;
|
||||
public IReadOnlyList<CardDefinition> ExclusiveCards => exclusiveCards;
|
||||
}
|
||||
}
|
||||
@@ -0,0 +1,2 @@
|
||||
fileFormatVersion: 2
|
||||
guid: bd550368fd0c75d43a53aa4fb3b6541e
|
||||
@@ -0,0 +1,26 @@
|
||||
using System.Collections.Generic;
|
||||
using KernelPanic.Core;
|
||||
using UnityEngine;
|
||||
|
||||
namespace KernelPanic.Data
|
||||
{
|
||||
/// <summary>
|
||||
/// Defines enemy stats and language affinities for runtime combat setup.
|
||||
/// </summary>
|
||||
public sealed class EnemyDefinition : ScriptableObject
|
||||
{
|
||||
[SerializeField] private string id;
|
||||
[SerializeField] private string displayName;
|
||||
[SerializeField] private int baseUptime;
|
||||
[SerializeField] private List<Language> resistedLanguages = new();
|
||||
[SerializeField] private List<Language> weakLanguages = new();
|
||||
|
||||
public string Id => id;
|
||||
public string DisplayName => displayName;
|
||||
public int BaseUptime => baseUptime;
|
||||
public IReadOnlyList<Language> ResistedLanguages => resistedLanguages;
|
||||
public IReadOnlyList<Language> WeakLanguages => weakLanguages;
|
||||
|
||||
// TODO: Model enemy intents once combat actions are defined.
|
||||
}
|
||||
}
|
||||
@@ -0,0 +1,2 @@
|
||||
fileFormatVersion: 2
|
||||
guid: 8b5b43b43c697c142b33fbfc5160cf90
|
||||
@@ -0,0 +1,17 @@
|
||||
using KernelPanic.Core;
|
||||
using UnityEngine;
|
||||
|
||||
namespace KernelPanic.Data
|
||||
{
|
||||
/// <summary>
|
||||
/// Defines serialized status effect metadata and future stacking behavior.
|
||||
/// </summary>
|
||||
public sealed class StatusEffectDefinition : ScriptableObject
|
||||
{
|
||||
[SerializeField] private StatusType statusType;
|
||||
[SerializeField] private string stackingBehavior;
|
||||
|
||||
public StatusType StatusType => statusType;
|
||||
public string StackingBehavior => stackingBehavior;
|
||||
}
|
||||
}
|
||||
@@ -0,0 +1,2 @@
|
||||
fileFormatVersion: 2
|
||||
guid: 1470a223647d6514f9439de7ded702c9
|
||||
Reference in New Issue
Block a user