add missing files

This commit is contained in:
2026-10-24 00:54:13 +02:00
parent ec3e784683
commit ce564c10a3
237 changed files with 5733 additions and 0 deletions
@@ -0,0 +1,67 @@
using System.Linq;
using KernelPanic.Core;
namespace KernelPanic.Combat
{
public sealed class CompilationDrawEffect : ICardEffect
{
internal const int RequiredCompilation = 2;
internal const int DrawCount = 1;
public void Execute(CombatContext context)
{
if (context.CombatManager.Compilation.Level >= RequiredCompilation) new DrawEffect(DrawCount).Execute(context);
}
}
public sealed class MakeJ4Effect : ICardEffect
{
internal const int RequiredCompilation = 3;
internal const int BaseDamage = 8;
internal const int CompiledDamage = 11;
public void Execute(CombatContext context)
{
int amount = context.CombatManager.Compilation.Level >= RequiredCompilation ? CompiledDamage : BaseDamage;
new DealDamageEffect(amount, amount, Language.C).Execute(context);
}
}
public sealed class HaskellFilterEffect : ICardEffect
{
internal const int BaseDamage = 4;
internal const int ConditionalDamage = 6;
public void Execute(CombatContext context)
{
bool harmful = context.Targets.Any(target => target != null && !target.IsDefeated
&& target.Statuses.Any(status => !StatusEffectController.GetDescriptor(status.Type).IsBeneficial));
int amount = harmful ? ConditionalDamage : BaseDamage;
new DealDamageEffect(amount, amount, Language.Haskell).Execute(context);
}
}
public sealed class HaskellMaybeEffect : ICardEffect
{
internal const int HealAmount = 3;
internal const int ShieldAmount = 4;
public void Execute(CombatContext context)
{
if (context.Source.CurrentUptime >= context.Source.MaxUptime)
{
new ShieldEffect(ShieldAmount).Execute(context);
return;
}
if (!context.CombatManager.CanPlayerReceiveCardHeal(context.Card))
{
context.CombatManager.ReportEffectResult("heal blocked");
return;
}
int amount = UpgradeMath.ScaleAmount(UpgradeMath.ApplySourceFlatBonus(HealAmount, context), context.Card);
int before = context.Source.CurrentUptime;
context.Source.CurrentUptime = System.Math.Min(context.Source.MaxUptime, CardScaling.Add(before, amount));
context.CombatManager.ReportEffectResult($"maybe: restored {context.Source.CurrentUptime - before} Uptime");
}
}
}