[MB2] Implement Hish of the Snake Cult (#13102)

This commit is contained in:
PurpleCrowbar 2024-12-02 23:44:58 +00:00 committed by GitHub
parent 695f8e5c4d
commit 9ddafd16ed
No known key found for this signature in database
GPG key ID: B5690EEEBB952194
4 changed files with 79 additions and 4 deletions

View file

@ -13,9 +13,10 @@ import mage.filter.predicate.mageobject.PowerPredicate;
public class DauntAbility extends SimpleEvasionAbility {
private static final FilterCreaturePermanent filter = new FilterCreaturePermanent("creatures with power 2 or less");
private final boolean asKeyword;
static {
filter.add(new PowerPredicate(ComparisonType.FEWER_THAN, 3));
filter.add(new PowerPredicate(ComparisonType.OR_LESS, 2));
}
public static FilterCreaturePermanent getFilter() {
@ -23,11 +24,17 @@ public class DauntAbility extends SimpleEvasionAbility {
}
public DauntAbility() {
this(false);
}
public DauntAbility(boolean asKeyword) {
super(new CantBeBlockedByCreaturesSourceEffect(filter, Duration.WhileOnBattlefield));
this.asKeyword = asKeyword;
}
private DauntAbility(final DauntAbility ability) {
super(ability);
this.asKeyword = ability.asKeyword;
}
@Override
@ -37,6 +44,7 @@ public class DauntAbility extends SimpleEvasionAbility {
@Override
public String getRule() {
return "{this} can't be blocked by creatures with power 2 or less.";
return this.asKeyword ? "Daunt <i>({this} can't be blocked by creatures with power 2 or less.)</i>" :
"{this} can't be blocked by creatures with power 2 or less.";
}
}

View file

@ -29,7 +29,7 @@ public class PoisonousAbility extends DealsCombatDamageToAPlayerTriggeredAbility
@Override
public String getRule() {
return String.format("Poisonous %d. <i>(%s)</i>", n, super.getRule());
return String.format("Poisonous %d <i>(%s)</i>", n, super.getRule());
}
@Override
@ -53,4 +53,4 @@ class AddPoisonCountersEffect extends AddCountersTargetEffect {
public AddPoisonCountersEffect copy() {
return new AddPoisonCountersEffect(this);
}
}
}