fix(slay-the-spire-like): pass correct sourceEntityId in instant
triggers Simplify the sourceEntityId logic to use the context value directly.
This commit is contained in:
@@ -95,10 +95,7 @@ export function addInstantEffectTriggers(triggers: Triggers) {
|
||||
await triggers.onDamage.execute(ctx.game, {
|
||||
entityId: ctx.entityId,
|
||||
amount: ctx.stacks,
|
||||
sourceEntityId:
|
||||
(ctx.sourceEntityId ?? ctx.entityId === "player")
|
||||
? undefined
|
||||
: "player",
|
||||
sourceEntityId: ctx.sourceEntityId,
|
||||
});
|
||||
} else if (ctx.effect.id === "draw") {
|
||||
await triggers.onDraw.execute(ctx.game, { count: ctx.stacks });
|
||||
|
||||
Reference in New Issue
Block a user