add comments to CountersSourceCount for null param usage

This commit is contained in:
xenohedron 2024-05-21 00:57:32 -04:00
parent 51546e7c78
commit 398744dfbe
5 changed files with 14 additions and 4 deletions

View file

@ -33,7 +33,7 @@ import java.util.stream.IntStream;
*/
public final class GavelOfTheRighteous extends CardImpl {
private static final DynamicValue xValue = new CountersSourceCount(null);
private static final DynamicValue xValue = new CountersSourceCount();
public GavelOfTheRighteous(UUID ownerId, CardSetInfo setInfo) {
super(ownerId, setInfo, new CardType[]{CardType.ARTIFACT}, "{2}");

View file

@ -22,7 +22,7 @@ import java.util.UUID;
*/
public final class HancockGhoulishMayor extends CardImpl {
private static final DynamicValue xValue = new CountersSourceCount(null);
private static final DynamicValue xValue = new CountersSourceCount();
private static final FilterCreaturePermanent filter = new FilterCreaturePermanent();
static {

View file

@ -30,7 +30,7 @@ import mage.target.common.TargetDiscard;
*/
public final class IndominusRexAlpha extends CardImpl {
private static final DynamicValue xValue = new CountersSourceCount(null);
private static final DynamicValue xValue = new CountersSourceCount();
public IndominusRexAlpha(UUID ownerId, CardSetInfo setInfo) {
super(ownerId, setInfo, new CardType[]{CardType.CREATURE}, "{1}{U/B}{U/B}{G}{G}");

View file

@ -58,7 +58,7 @@ public final class OmarthisGhostfireInitiate extends CardImpl {
// When Omarthis dies, manifest a number of cards from the top of your library equal to the number of counters on it.
this.addAbility(new DiesSourceTriggeredAbility(
new ManifestEffect(new CountersSourceCount(null))
new ManifestEffect(new CountersSourceCount())
.setText("manifest a number of cards from the top of your library equal to the number of counters on it."),
false
));

View file

@ -12,6 +12,16 @@ public class CountersSourceCount implements DynamicValue {
private final CounterType counterType;
/**
* Number of counters of any type on the source permanent
*/
public CountersSourceCount() {
this((CounterType) null);
}
/**
* Number of counters of the specified type on the source permanent
*/
public CountersSourceCount(CounterType counterType) {
this.counterType = counterType;
}