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:
parent
63e55a828e
commit
359e7b7485
|
|
@ -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 });
|
||||
|
|
|
|||
Loading…
Reference in New Issue