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, {
|
await triggers.onDamage.execute(ctx.game, {
|
||||||
entityId: ctx.entityId,
|
entityId: ctx.entityId,
|
||||||
amount: ctx.stacks,
|
amount: ctx.stacks,
|
||||||
sourceEntityId:
|
sourceEntityId: ctx.sourceEntityId,
|
||||||
(ctx.sourceEntityId ?? ctx.entityId === "player")
|
|
||||||
? undefined
|
|
||||||
: "player",
|
|
||||||
});
|
});
|
||||||
} else if (ctx.effect.id === "draw") {
|
} else if (ctx.effect.id === "draw") {
|
||||||
await triggers.onDraw.execute(ctx.game, { count: ctx.stacks });
|
await triggers.onDraw.execute(ctx.game, { count: ctx.stacks });
|
||||||
|
|
|
||||||
Loading…
Reference in New Issue