Add tutorial and QoL improvements
This commit is contained in:
@@ -19,6 +19,8 @@ namespace KernelPanic.Data
|
||||
[SerializeField] private ResolutionTrack resolutionTrack;
|
||||
[SerializeField] private bool distroExclusive;
|
||||
[SerializeField] private bool isToken;
|
||||
[SerializeField, Tooltip("Junk/NOP cards can be exhausted by dnf autoremove, regardless of their name or token status.")]
|
||||
private bool isJunk;
|
||||
[SerializeField] private bool isRunOnly;
|
||||
[SerializeField, TextArea] private string designNotes;
|
||||
[SerializeField] private List<string> requiresSystem = new();
|
||||
@@ -35,6 +37,7 @@ namespace KernelPanic.Data
|
||||
public ResolutionTrack ResolutionTrack => resolutionTrack;
|
||||
public bool DistroExclusive => distroExclusive;
|
||||
public bool IsToken => isToken;
|
||||
public bool IsJunk => isJunk;
|
||||
public bool IsRunOnly => isRunOnly;
|
||||
public string DesignNotes => designNotes;
|
||||
public IReadOnlyList<string> RequiresSystem => requiresSystem;
|
||||
|
||||
@@ -8,6 +8,11 @@ namespace KernelPanic.Data
|
||||
/// </summary>
|
||||
public abstract class CardEffectDefinition : ScriptableObject
|
||||
{
|
||||
[SerializeField, Tooltip("Enemy selection required by this effect. All-enemy effects in a mixed card must resolve all living enemies themselves.")]
|
||||
private CardTargeting targeting;
|
||||
|
||||
public CardTargeting Targeting => targeting;
|
||||
|
||||
public abstract ICardEffect CreateRuntimeEffect();
|
||||
}
|
||||
}
|
||||
|
||||
@@ -11,14 +11,14 @@ namespace KernelPanic.Data
|
||||
{
|
||||
private static readonly LanguageCatalogEntry[] Entries =
|
||||
{
|
||||
new(Language.C, "C", "bare metal", ResolutionTrack.Native, "C is immediate, high-risk burst damage. C damage rolls a 50% crit chance instead of the normal 25%, spills overkill into other enemies, and C cards can segfault: hurting you and corrupting a hand card.", null, Distro("arch", "Arch"), Distro("templeos", "TempleOS")),
|
||||
new(Language.C, "C", "bare metal", ResolutionTrack.Native, "C is immediate, high-risk burst damage. C damage rolls a 50% crit chance instead of the normal 25%, spills overkill into other enemies, and C cards can segfault: hurting you and corrupting a hand card. Segfault corruption recovers automatically after 3 rounds. C repair cards restore corrupted cards sooner.", null, Distro("arch", "Arch"), Distro("gentoo", "Gentoo"), Distro("templeos", "TempleOS")),
|
||||
new(Language.CPlusPlus, "C++", "template arsenal", ResolutionTrack.Native, "C++ is planned as a Native setup/payoff language built from upgraded C cards. It should keep C's direct-hit pressure while adding heavier combo requirements.", "unlock: upgrade a C card during a run"),
|
||||
new(Language.Rust, "Rust", "safe systems", ResolutionTrack.Native, "Rust is immediate, reliable damage with defensive payoff. Rust overkill becomes Shield, and Rust damage has a tiny 0.001% chance to overflow into the unsigned 64-bit limit.", null, Distro("arch", "Arch"), Distro("fedora", "Fedora")),
|
||||
new(Language.Python, "Python", "queued scripts", ResolutionTrack.InterpreterQueue, "Python cards enter the interpreter queue instead of resolving immediately. They are slower, but let you stage delayed damage, draw, and repeat effects around the exchange structure.", null, Distro("ubuntu", "Ubuntu"), Distro("kali", "Kali"), Distro("mint", "Mint")),
|
||||
new(Language.JavaScript, "JavaScript", "runtime chaos", ResolutionTrack.Native, "JavaScript resolves immediately and is intentionally swingy: wide damage ranges, chance-based outcomes, and conditional repeat effects. It rewards embracing variance.", null, Distro("ubuntu", "Ubuntu"), Distro("endeavouros", "EndeavourOS"), Distro("mint", "Mint")),
|
||||
new(Language.TypeScript, "TypeScript", "typed runtime", ResolutionTrack.Native, "TypeScript is planned as the steadier JavaScript branch: Native timing with less chaos and more controlled setup/payoff patterns.", "unlock: upgrade a JavaScript card during a run"),
|
||||
new(Language.Haskell, "Haskell", "lazy proofs", ResolutionTrack.LazyStack, "Haskell uses the lazy stack: effects are stored for later instead of firing now, then resolve in last-in-first-out order. It is for delayed burst turns and precise sequencing.", null, Distro("gentoo", "Gentoo"), Distro("nixos", "NixOS")),
|
||||
new(Language.Assembly, "Assembly", "raw opcodes", ResolutionTrack.Native, "Assembly is planned as the most direct Native language: low-level, high-commitment effects that should trade flexibility for extreme precision or shield-bypass pressure.", null, Distro("gentoo", "Gentoo"), Distro("templeos", "TempleOS")),
|
||||
new(Language.Haskell, "Haskell", "lazy proofs", ResolutionTrack.LazyStack, "Lazy proofs. Build a stack of delayed operations. Later cards gain stronger effects when evaluated. Snapshot x1.0 / x1.5 / x2.0 / x2.5 at play; LIFO after Python. Only damage and explicit Shield multiply.", null, Distro("gentoo", "Gentoo"), Distro("nixos", "NixOS")),
|
||||
new(Language.Assembly, "Assembly", "raw opcodes", ResolutionTrack.Native, "Assembly is planned as the most direct Native language: low-level, high-commitment effects that should trade flexibility for extreme precision or shield-bypass pressure.", null, Distro("templeos", "TempleOS")),
|
||||
new(Language.Java, "Java", "warming vm", ResolutionTrack.Native, "Java cards are heavy but scale over the run: each Java card uses 2 RAM, Java damage spills overkill into other enemies, and JIT makes Java cards cheaper as you keep playing them. The discount cools after each wave.", null, Distro("debian", "Debian"), Distro("fedora", "Fedora")),
|
||||
new(Language.Go, "Go", "small services", ResolutionTrack.Native, "Go is planned as a straightforward Native language for small, dependable actions. Its identity should be simple scaling, services, and concurrency-style utility without much randomness.", null, Distro("cachyos", "CachyOS"), Distro("nixos", "NixOS")),
|
||||
new(Language.Ruby, "Ruby", "sharp scripts", ResolutionTrack.InterpreterQueue, "Ruby is planned as an interpreter-queue combo language: delayed scripting with expressive effects that should get better when sequenced with other queued cards.", null, Distro("kali", "Kali"), Distro("endeavouros", "EndeavourOS")),
|
||||
|
||||
@@ -39,7 +39,13 @@ namespace KernelPanic.Data
|
||||
StartTurnNoDebuffShield = 23,
|
||||
EveryNthCardEachWaveCycle = 24,
|
||||
FirstCThisTurnDamageMultiplier = 25,
|
||||
TurnStartGenerateLanguageCard = 26
|
||||
TurnStartGenerateLanguageCard = 26,
|
||||
PortageWaveStartShield = 27,
|
||||
// Amount is successful-play Shield; the first accepted card's discount is always 1.
|
||||
FirstCardEachRoundDiscountAndShield = 28,
|
||||
CompilationAdvancedPreviousRoundCycle = 29,
|
||||
AfterFirstRoundShield = 30,
|
||||
AfterFirstRoundCompilation = 31
|
||||
}
|
||||
|
||||
[Serializable]
|
||||
@@ -91,6 +97,8 @@ namespace KernelPanic.Data
|
||||
[SerializeField] private List<string> requiresSystem = new();
|
||||
[SerializeField] private PackageEffectData offDistroEffect;
|
||||
[SerializeField] private PackageEffectData onDistroEffect;
|
||||
[SerializeField] private List<PackageEffectData> offDistroAdditionalEffects = new();
|
||||
[SerializeField] private List<PackageEffectData> onDistroAdditionalEffects = new();
|
||||
|
||||
public string Id => id;
|
||||
public string DisplayName => displayName;
|
||||
@@ -115,6 +123,15 @@ namespace KernelPanic.Data
|
||||
{
|
||||
return IsIntendedFor(distroId) ? onDistroEffect : offDistroEffect;
|
||||
}
|
||||
|
||||
// Keep the original serialized primary effects intact for existing assets/saves.
|
||||
public IEnumerable<PackageEffectData> EffectsFor(string distroId)
|
||||
{
|
||||
yield return EffectFor(distroId);
|
||||
var additional = IsIntendedFor(distroId) ? onDistroAdditionalEffects : offDistroAdditionalEffects;
|
||||
if (additional == null) yield break;
|
||||
foreach (var effect in additional) yield return effect;
|
||||
}
|
||||
}
|
||||
|
||||
[Serializable]
|
||||
@@ -129,6 +146,13 @@ namespace KernelPanic.Data
|
||||
public PackageDefinition Definition { get; }
|
||||
public int UpgradeLevel { get; }
|
||||
|
||||
public IEnumerable<PackageEffectData> EffectsFor(string distroId)
|
||||
{
|
||||
if (Definition == null) yield break;
|
||||
foreach (var effect in Definition.EffectsFor(distroId))
|
||||
yield return PackageEffectScaling.Scale(effect, UpgradeLevel);
|
||||
}
|
||||
|
||||
public PackageEffectData EffectFor(string distroId)
|
||||
{
|
||||
PackageEffectData effect = Definition == null ? default : Definition.EffectFor(distroId);
|
||||
@@ -165,6 +189,9 @@ namespace KernelPanic.Data
|
||||
PackageEffectKind.FirstNativeCardEachWaveFlatDamage => 1,
|
||||
PackageEffectKind.JavaScriptFlatDamage => 1,
|
||||
PackageEffectKind.TurnStartGenerateLanguageCard => 0,
|
||||
PackageEffectKind.PortageWaveStartShield => 2,
|
||||
PackageEffectKind.CompilationAdvancedPreviousRoundCycle => 0,
|
||||
PackageEffectKind.AfterFirstRoundCompilation => 0,
|
||||
_ => 1
|
||||
};
|
||||
}
|
||||
|
||||
Reference in New Issue
Block a user