Overhaul UI and overall QoL
This commit is contained in:
@@ -7,7 +7,7 @@ namespace KernelPanic.Combat
|
||||
{
|
||||
public sealed class DealDamageEffect : ICardEffect
|
||||
{
|
||||
private const int RustOverflowRollMax = 1000000;
|
||||
private const int RustOverflowRollMax = 10000000;
|
||||
private const string RustUnsigned64LimitText = "18446744073709551615";
|
||||
|
||||
private readonly int _minAmount;
|
||||
|
||||
@@ -347,6 +347,7 @@ namespace KernelPanic.Combat
|
||||
_lazyStack.Enqueue(card);
|
||||
break;
|
||||
default:
|
||||
GameEvents.RaiseCardResolving(new CardResolvedEvent(card, ResolutionTrack.Native));
|
||||
ExecuteCardEffects(card, ResolveTargets(card));
|
||||
ResolveCardRiders(card);
|
||||
_deckController.Discard(card);
|
||||
@@ -392,6 +393,10 @@ namespace KernelPanic.Combat
|
||||
return Mathf.Max(0, cost);
|
||||
}
|
||||
|
||||
// Read-only UI query. PlayCard applies this existing Fedora discount after effective cost.
|
||||
public int GetDisplayedPlayCost(CardInstance card) =>
|
||||
Mathf.Max(0, GetEffectiveCardCost(card) - (card != null && CanApplyFedoraBonus(card) ? 1 : 0));
|
||||
|
||||
public bool RequiresTarget(CardInstance card)
|
||||
{
|
||||
return card?.Definition != null && CardEffectFactory.RequiresSingleTarget(card.Definition) && LivingEnemyStates().Count > 0;
|
||||
|
||||
@@ -31,6 +31,7 @@ namespace KernelPanic.Combat
|
||||
{
|
||||
CardInstance card = _queuedCards.Dequeue();
|
||||
_queuedView.Remove(card);
|
||||
GameEvents.RaiseCardResolving(new CardResolvedEvent(card, ResolutionTrack.InterpreterQueue));
|
||||
GameEvents.RaiseCardResolved(new CardResolvedEvent(card, ResolutionTrack.InterpreterQueue));
|
||||
}
|
||||
}
|
||||
@@ -45,6 +46,7 @@ namespace KernelPanic.Combat
|
||||
|
||||
card = _queuedCards.Dequeue();
|
||||
_queuedView.Remove(card);
|
||||
GameEvents.RaiseCardResolving(new CardResolvedEvent(card, ResolutionTrack.InterpreterQueue));
|
||||
return true;
|
||||
}
|
||||
|
||||
|
||||
@@ -48,6 +48,7 @@ namespace KernelPanic.Combat
|
||||
|
||||
card = _stackedCards.Pop();
|
||||
_stackedView.Remove(card);
|
||||
GameEvents.RaiseCardResolving(new CardResolvedEvent(card, ResolutionTrack.LazyStack));
|
||||
return true;
|
||||
}
|
||||
}
|
||||
|
||||
Reference in New Issue
Block a user