mirror of
https://github.com/Card-Forge/forge.git
synced 2025-11-19 04:08:01 +00:00
- Added code support for cards dependent on the maximum total CMC of targets (e.g. March from the Tomb). Basic AI support also added (but can most likely be made smarter, feel free to improve).
- Note that the relevant SA parameter has been renamed to "MaxTotalTargetCMC" (from "WithTotalCMC") to avoid confusion with the ChangeZone parameter "WithTotalCMC" that means "the total CMC of a single card".
This commit is contained in:
@@ -71,6 +71,7 @@ public class TargetSelection {
|
||||
// Number of targets is explicitly set only if spell is being redirected (ex. Swerve or Redirect)
|
||||
final int minTargets = numTargets != null ? numTargets.intValue() : tgt.getMinTargets(ability.getHostCard(), ability);
|
||||
final int maxTargets = numTargets != null ? numTargets.intValue() : tgt.getMaxTargets(ability.getHostCard(), ability);
|
||||
final int maxTotalCMC = tgt.getMaxTotalCMC(ability.getHostCard(), ability);
|
||||
final int numTargeted = ability.getTargets().getNumTargeted();
|
||||
|
||||
final boolean hasEnoughTargets = minTargets == 0 || numTargeted >= minTargets;
|
||||
|
||||
Reference in New Issue
Block a user