Rebalance most languages and revamp main game loop
This commit is contained in:
@@ -236,16 +236,16 @@ public class GentooHaskellTests
|
||||
for (int i=0;i<cards.Length;i++)
|
||||
{
|
||||
stack.Enqueue(cards[i]);
|
||||
Assert.That(stack.Entries[0].MultiplierPercent, Is.EqualTo(Math.Min(250,100+i*50)));
|
||||
Assert.That(stack.Entries[0].MultiplierPercent, Is.EqualTo(new[] {150,175,200,250,250,250}[i]));
|
||||
}
|
||||
int[] expected = {250,250,250,200,150,100,100};
|
||||
int[] expected = {250,250,250,200,175,150,100};
|
||||
foreach (int percent in expected)
|
||||
{
|
||||
Assert.That(stack.TryPopEntry(out var entry), Is.True);
|
||||
Assert.That(entry.MultiplierPercent, Is.EqualTo(percent));
|
||||
}
|
||||
stack.Enqueue(cards[3].CopyForCombat());
|
||||
Assert.That(stack.Entries[0].MultiplierPercent, Is.EqualTo(100));
|
||||
Assert.That(stack.Entries[0].MultiplierPercent, Is.EqualTo(150));
|
||||
stack.Enqueue(stack.Cards[0]);
|
||||
Assert.That(stack.Count, Is.EqualTo(1), "Same pending instance cannot be pushed twice");
|
||||
}
|
||||
@@ -275,8 +275,8 @@ public class GentooHaskellTests
|
||||
CollectionAssert.AreEqual(cards, played);
|
||||
CollectionAssert.AreEqual(cards.Reverse().ToArray(), resolving);
|
||||
CollectionAssert.AreEqual(resolving, resolved);
|
||||
Assert.That(Target.CurrentUptime, Is.EqualTo(9980)); // 10 + 8 + 2
|
||||
Assert.That(Player.Shield, Is.EqualTo(4)); // 3 * 1.5, nearest-even
|
||||
Assert.That(Target.CurrentUptime, Is.EqualTo(9979)); // 10 + 8 + 3
|
||||
Assert.That(Player.Shield, Is.EqualTo(5)); // 3 * 1.75, nearest-even
|
||||
Assert.That(_combat.HandController.Cards.Count, Is.EqualTo(2)); // draw + rider, not multiplied
|
||||
foreach (var card in cards)
|
||||
{
|
||||
@@ -300,7 +300,7 @@ public class GentooHaskellTests
|
||||
{
|
||||
Drain("InterpretQueueSequenced"); Drain();
|
||||
CollectionAssert.AreEqual(new[]{"shop_py_list_append","lang_hs_thunk"},order);
|
||||
Assert.That(Target.CurrentUptime, Is.EqualTo(9990)); // round(4*1.3), twice; not wave-start 85%.
|
||||
Assert.That(Target.CurrentUptime, Is.EqualTo(9984)); // round(6*1.3) + round(4*1.5*1.3); resolution-time Compilation.
|
||||
}
|
||||
finally { GameEvents.CardResolved -= observe; }
|
||||
}
|
||||
@@ -476,7 +476,7 @@ public class GentooHaskellTests
|
||||
var dead=Target; dead.State.IsDefeated=true;
|
||||
((List<EnemyInstance>)_combat.Enemies).Remove(dead);
|
||||
Drain(); Drain();
|
||||
Assert.That(other.CurrentUptime,Is.EqualTo(9996));
|
||||
Assert.That(other.CurrentUptime,Is.EqualTo(9994)); // One 4 * 1.5 hit after retargeting.
|
||||
Assert.That(_combat.DeckController.DiscardPile.Count(c=>c==card),Is.EqualTo(1));
|
||||
}
|
||||
|
||||
@@ -540,7 +540,7 @@ public class GentooHaskellTests
|
||||
Assert.That(Player.FlatCardDamageBonus,Is.EqualTo(7));
|
||||
Assert.That(Player.FlatEffectBonus,Is.Zero,"DNF does not amplify non-damage effects");
|
||||
Drain();
|
||||
Assert.That(10000-Target.CurrentUptime,Is.EqualTo(95),"DNF is additive before stack/Compilation, not applied twice");
|
||||
Assert.That(10000-Target.CurrentUptime,Is.EqualTo(105),"DNF is additive before stack/Compilation: 20 + 24 + 27 + 34, not applied twice");
|
||||
}
|
||||
|
||||
[TestCase(0, 2)]
|
||||
@@ -609,7 +609,7 @@ public class GentooHaskellTests
|
||||
card.ClearTargetSnapshot();
|
||||
Assert.That(_combat.LazyStack.Entries[0].Targets[0],Is.SameAs(captured));
|
||||
Drain();
|
||||
Assert.That(10000-Target.CurrentUptime,Is.EqualTo(3));
|
||||
Assert.That(10000-Target.CurrentUptime,Is.EqualTo(5)); // round(4 * 1.5 * 0.85).
|
||||
}
|
||||
|
||||
[UnityTest]
|
||||
@@ -640,7 +640,7 @@ public class GentooHaskellTests
|
||||
Assert.That(text,Does.Contain("6/6"));
|
||||
Assert.That(text,Does.Contain("+50%"));
|
||||
var multipliers=root.Query<Label>(className:"execution-multiplier").ToList();
|
||||
CollectionAssert.AreEqual(new[]{"x2.5","x2.0","x1.5","x1.0"},multipliers.Select(l=>l.text));
|
||||
CollectionAssert.AreEqual(new[]{"x2.5","x2.0","x1.75","x1.5"},multipliers.Select(l=>l.text));
|
||||
foreach(var label in multipliers)
|
||||
Assert.That(label.worldBound.xMax,Is.LessThanOrEqualTo(root.worldBound.xMax+1),size.ToString());
|
||||
var end=root.Query<Button>().ToList().Single(b=>b.text=="[E] end turn");
|
||||
|
||||
Reference in New Issue
Block a user