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:
hypercross 2026-04-23 00:53:05 +08:00
parent 63e55a828e
commit 359e7b7485
1 changed files with 1 additions and 4 deletions

View File

@ -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 });