Differ Between Control Untap Haste Effects
Most Effects does "Gain Control, do Untap, Gain Haste"
very few like "Blind with Anger" does Untap before Gain Control.
This would matter under which control the creature does untap for possible trigger.
The bigger problem here is even if untap() gets done before controller change in ControlGainEffect because of frozen stack a WaitingTrigger is created.
That means when after resolving TriggerHandler adds trigger to stack it still uses new host controller for it.
We might have to store controller in TriggerWaiting somehow or force it with runWaitingTriggers() directly afterwards but I'm not sure that's a good idea?
i would need to debug it
This issue has not been updated in a while and has now been marked as stale. Stale messages will be auto closed.
If we remove the param and script it with extra effect either before or after ControlGain it might be cleaner without engine workarounds?
If we remove the param and script it with extra effect either before or after ControlGain it might be cleaner without engine workarounds?
technically yes, but it would make AI way more difficult
i would prefer if we have a parameter for UntapBefore and UntapAfter ?
wouldn't your idea also has the problem with waiting triggers?
Currently AbilityUtils.resolveSubAbilities should try and fill the WaitingTrigger from the previous events with the currently available ones
Would have to test it handles this interaction correctly though
Currently
AbilityUtils.resolveSubAbilitiesshould try and fill the WaitingTrigger from the previous events with the currently available onesWould have to test it handles this interaction correctly though
your problem was that while the waiting trigger are filled, when the trigger finally going to resolve and are put on the stack, the untap trigger might happen for the wrong controller
i think this might also be the problem if the cards were using extra script lines, because it isn't the problem of the effect, but the bigger problem of the TriggerHandler
@tool4ever @Northmoc while touching GainControl Effect, we might look into this issue again for Untap Trigger
I don't have a better idea besides refactoring such scripts into UntapEffect -> ControlGainEffect and storing the current controller while running collectTriggerForWaiting
@tool4ever what we could do is use LKI objects of the Trigger so it keeps the current Controller