forked from External/mage
TargetAmount refactors (#13128)
* Add minimum and maximum target counts as parameters for TargetAmount and its subclasses; update/add several rules comments (and one actual text) for clarity; remove unused imports * Get amount+description from target instead of parameters for DistributeCountersEffect and DamageMultiEffect; additions to TargetImpl.getDescription to accommodate * Create separate method to check if "any number" phrasing should be used, override it in TargetAmount * Check instanceof TargetAmount before casting * Add new constructors to chain off of for TargetCreaturePermanentAmount & TargetCreatureOrPlaneswalkerAmount * Fix text for Storm the Seedcore * Use Integer.MAX_VALUE instead of 0 to represent no maximum targets * Add comment about getUseAnyNumber() * Use amount-only constructors in some TargetAmount subclasses, add clarifying documentation * Fix a few calls * Require more specific filters
This commit is contained in:
parent
960c26a291
commit
73b63d14ad
123 changed files with 444 additions and 365 deletions
|
|
@ -22,9 +22,8 @@ public abstract class TargetPermanentOrPlayerAmount extends TargetAmount {
|
|||
|
||||
protected FilterPermanentOrPlayer filter;
|
||||
|
||||
TargetPermanentOrPlayerAmount(DynamicValue amount, int maxNumberOfTargets) {
|
||||
super(amount);
|
||||
this.maxNumberOfTargets = maxNumberOfTargets;
|
||||
TargetPermanentOrPlayerAmount(DynamicValue amount, int minNumberOfTargets, int maxNumberOfTargets) {
|
||||
super(amount, minNumberOfTargets, maxNumberOfTargets);
|
||||
}
|
||||
|
||||
TargetPermanentOrPlayerAmount(final TargetPermanentOrPlayerAmount target) {
|
||||
|
|
|
|||
Loading…
Add table
Add a link
Reference in a new issue