Rebalance most languages and revamp main game loop

This commit is contained in:
2026-10-25 23:50:04 +01:00
parent 53f831d91e
commit a4109f5be0
76 changed files with 4198 additions and 573 deletions
+51 -10
View File
@@ -44,12 +44,12 @@ public class CardUtilityEffectTests
_temporary.Clear();
}
[TestCase("ubuntu", 2, 2)]
[TestCase("ubuntu", 3, 3)]
[TestCase("ubuntu", 5, 3)]
[TestCase("UBUNTU", 3, 3)]
[TestCase("mint", 5, 2)]
[TestCase(null, 3, 2)]
[TestCase("ubuntu", 2, 3)]
[TestCase("ubuntu", 3, 5)]
[TestCase("ubuntu", 5, 5)]
[TestCase("UBUNTU", 3, 5)]
[TestCase("mint", 5, 3)]
[TestCase(null, 3, 3)]
public void CatalogAskUbuntuUsesBonusOnlyForUbuntuVersionThreeAndLater(string distro, int version, int expected)
{
if (distro != null) Configure(distro, version);
@@ -58,8 +58,10 @@ public class CardUtilityEffectTests
ExecuteCatalog(card);
Assert.That(_combat.HandController.Cards.Count, Is.EqualTo(expected));
Assert.That(_combat.DeckController.DrawPile.Count, Is.EqualTo(10 - expected));
Assert.That(_combat.Python.Choices.Count, Is.EqualTo(expected));
Assert.That(_combat.Python.Choose(0), Is.True);
Assert.That(_combat.HandController.Cards.Count, Is.EqualTo(1));
Assert.That(_combat.DeckController.DrawPile.Count, Is.EqualTo(9));
}
[Test]
@@ -73,8 +75,10 @@ public class CardUtilityEffectTests
ExecuteCatalog(card);
Assert.That(_combat.HandController.Cards.Count, Is.EqualTo(8), "Three base draws plus two flat and three magnitude.");
Assert.That(_combat.DeckController.DrawPile.Count, Is.EqualTo(4));
Assert.That(_combat.Python.Choices.Count, Is.EqualTo(5), "Inspection count is fixed, regardless of effect bonuses.");
Assert.That(_combat.Python.Choose(0), Is.True);
Assert.That(_combat.HandController.Cards.Count, Is.EqualTo(1));
Assert.That(_combat.DeckController.DrawPile.Count, Is.EqualTo(11));
}
[TestCase(2)]
@@ -193,6 +197,43 @@ public class CardUtilityEffectTests
Assert.That(_combat.DeckController.DrawPile, Is.Empty);
}
[TestCase(0, 0)]
[TestCase(2, 3)]
[TestCase(6, 10)]
public void UnwrapReplacementDrawDoesNotScaleWithMagnitudeOrSourceBonuses(int magnitude, int flatBonus)
{
FillDeck(12);
var card = Card("lang_rs_unwrap", Language.Rust);
card.ApplyMagnitudeUpgrade(magnitude);
Player.FlatEffectBonus = flatBonus;
ExecuteCatalog(card);
Assert.That(_combat.HandController.Cards.Count, Is.EqualTo(1));
Assert.That(_combat.DeckController.DrawPile.Count, Is.EqualTo(11));
Assert.That(CardEffectFactory.GetRulesText(card), Does.Contain("draw 1 (fixed)"));
}
[TestCase(0)]
[TestCase(1)]
public void UnwrapFixedDrawPreservesBlockedJavaCardAndDrawOrder(int ram)
{
_combat.HandController.SetRamCapacity(ram);
var java = Card("java_top", Language.Java);
var next = Card("python_next");
SetDrawOrder(java, next);
var card = Card("lang_rs_unwrap", Language.Rust);
ExecuteCatalog(card);
Assert.That(_combat.HandController.Cards, Is.Empty);
Assert.That(_combat.DeckController.DrawPile, Is.EqualTo(new[] { next, java }));
_combat.HandController.SetRamCapacity(2);
ExecuteCatalog(card);
Assert.That(_combat.HandController.Cards, Is.EqualTo(new[] { java }));
Assert.That(_combat.DeckController.DrawPile, Is.EqualTo(new[] { next }));
}
private void Configure(string distroId, int version)
{
var distro = ScriptableObject.CreateInstance<DistroDefinition>();