Skip to main content

Module control_gain_effect

Module control_gain_effect 

Source

Structs§

ControlGainEffect

Functions§

end_of_combat_hook
Hook invoked at end of combat — reverts steals scheduled with LoseControlCondition::EndOfCombat.
leaves_play_hook
Hook invoked as a permanent leaves the battlefield — reverts scheduled LoseControlCondition::LeavesPlay commands. The card is technically already in limbo when this fires, so we just clear the schedule.
run
Revert a scheduled control-gain. Mirrors Java ControlGainEffect’s GameCommand.run(): restore original_controller_eot, drop the lose_control_condition, and clear granted keywords. Zone guard — if the card has already left the battlefield, the scheduler caller is expected to have handled cleanup via leaves_play_hook.
untap_hook
Hook invoked whenever a card untaps — reverts the steal if the card was scheduled with LoseControlCondition::NextUntap.