Refactor: Condition.apply needs a GameEvent parameter
Cards like [[Resourceful Defense]] have an intervening if-clause which needs to look at the permanent that is leaving the battlefield in order to verify if the condition for the triggered ability is met.
As currentling implemented Condition's .apply() only takes in a Game parameter, and I don't see how to get access to the event information which is causing the condition to go off. GameState has a simultaneousEvents variable which would store the events, but it's cleared before each event is individually handled:
https://github.com/magefree/mage/blob/94dc91d8e19a395770b091e87d9e2c79260d09b8/Mage/src/main/java/mage/game/GameState.java#L783-L795
The current alternative is to create a custom triggered ability, e.g. [[The Ozolith]]: https://github.com/magefree/mage/blob/f6be167aeb0fa61840f4efa893d901bf80039be6/Mage.Sets/src/mage/cards/t/TheOzolith.java#L61-L94
These kinds of implementations could be simplified to use common abilities if the Condition has a was of looking at the event that is setting off the triggered ability.
Resourceful Defense - (Gatherer) (Scryfall) (EDHREC)
{2}{W} Enchantment Whenever a permanent you control leaves the battlefield, if it had counters on it, put those counters on target permanent you control. {4}{W}: Move any number of counters from target permanent you control to another target permanent you control.
The Ozolith - (Gatherer) (Scryfall) (EDHREC)
{1} Legendary Artifact Whenever a creature you control leaves the battlefield, if it had counters on it, put those counters on The Ozolith. At the beginning of combat on your turn, if The Ozolith has counters on it, you may move all counters from The Ozolith onto target creature.