Skip to content
New issue

Have a question about this project? Sign up for a free GitHub account to open an issue and contact its maintainers and the community.

By clicking “Sign up for GitHub”, you agree to our terms of service and privacy statement. We’ll occasionally send you account related emails.

Already on GitHub? Sign in to your account

Bestow as Static Effect #6992

Draft
wants to merge 1 commit into
base: master
Choose a base branch
from
Draft

Bestow as Static Effect #6992

wants to merge 1 commit into from

Conversation

Hanmac
Copy link
Contributor

@Hanmac Hanmac commented Feb 9, 2025

Closes #6811

currently it causes flickering

And sometimes, the Bestow Effect isn't removed as it should, but I can't find the remaining one.
That causes the Creature Spell still be cast as Aura even if it shouldn't.

And sometimes, the effect might be removed, but the static effect of the effect isn't cleared

@@ -104,6 +104,8 @@ public final static boolean playSpellAbility(final PlayerControllerHuman control
if (rollback.isInZone(ZoneType.Exile)) {
rollback.addMayLookTemp(p);
}
} else {
Copy link
Contributor

Choose a reason for hiding this comment

The reason will be displayed to describe this comment to others. Learn more.

else is wrong
just move it into the block above

Copy link
Contributor Author

Choose a reason for hiding this comment

The reason will be displayed to describe this comment to others. Learn more.

in theory undoAlternateHost could handle reverting castFaceDown too

bestowEffect.addStaticAbility(s);

GameCommand until = SpellAbilityEffect.exileEffectCommand(getGame(), bestowEffect);
addLeavesPlayCommand(until);
Copy link
Contributor

Choose a reason for hiding this comment

The reason will be displayed to describe this comment to others. Learn more.

need to find a way to also cleanup when it leaves stack without resolving

Copy link
Contributor Author

Choose a reason for hiding this comment

The reason will be displayed to describe this comment to others. Learn more.

Leaving the stack without resolving should already call unanimateBestow directly

Copy link
Contributor

Choose a reason for hiding this comment

The reason will be displayed to describe this comment to others. Learn more.

it seems CounterEffect would call it
but ChangeZoneEffect not currently

@Hanmac
Copy link
Contributor Author

Hanmac commented Feb 12, 2025

@tool4ever i couldn't pinpoint the cause of the issues yet (both visual and functional)

but my gut is telling me that the Remembered List of the LKI could be a cause.
Right now when the Effect are copied, the remembered still uses the original objects?

newCopy.addRemembered(copyFrom.getRemembered());
newCopy.addImprintedCards(copyFrom.getImprintedCards());
newCopy.setChosenCards(copyFrom.getChosenCards());

@tool4ever
Copy link
Contributor

Probably need to manually add the effect to Command instead so you have greater control over when statics are applied 🤔

@Hanmac
Copy link
Contributor Author

Hanmac commented Feb 12, 2025

Probably need to manually add the effect to Command instead so you have greater control over when statics are applied 🤔

I think the main problem are that Bestow uses LKI -> StaticEffect to check.

And then the LKI object isn't used anymore, but the StaticEffect might still linger ...
I tried debugging it, but i haven't found all cases where the BestowEffect should be removed again after checks.

Especially the ones where you Cancel the Spell cast

Sign up for free to join this conversation on GitHub. Already have an account? Sign in to comment
Projects
None yet
Development

Successfully merging this pull request may close these issues.

animate Bestow as Static Ability
2 participants