Perhaps you could help again. Where do I put in logic for whether or not to pay the upkeep cost. Should it be in Upkeep.java near the main AI handling of cumulative upkeep, or in canPayCost, or in a new boolean method shouldPayCost that returns true by default, but can be expanded as needed for different costs? At the moment the AI pays the upkeep if
possible, but that's not so good for PayLife cumulative upkeep costs (especially not in cases like my test case where I cast
Sleeper Agent, then enchanted it with
Decomposition when the AI gained control of it - needless to say the AI didn't last long

).
Id like to add a logic something along the lines of: if card has SVar:SacMe:Value is greater than 2, or PayLife amount is greater than 10% (or maybe 20%) of current life total, then don't pay the upkeep life cost.