[PIP] Implement Mr. House, President and CEO (#11610)

* move Cybernetic Datasmith's robot token to RobotCantBlockToken since Mr. House has a more generic version

* Update tokens database
This commit is contained in:
jimga150 2024-01-06 15:09:14 -05:00 committed by GitHub
parent aa4d1654c7
commit 068f5db976
No known key found for this signature in database
GPG key ID: 4AEE18F83AFDEB23
7 changed files with 206 additions and 16 deletions

View file

@ -45,7 +45,7 @@ public class OneOrMoreDiceRolledTriggeredAbility extends TriggeredAbilityImpl {
int maxRoll = ((DiceRolledEvent) event)
.getResults()
.stream()
.filter(Integer.class::isInstance) // only numerical die result can be masured
.filter(Integer.class::isInstance) // only numerical die result can be measured
.map(Integer.class::cast)
.mapToInt(Integer::intValue)
.max()
@ -53,7 +53,7 @@ public class OneOrMoreDiceRolledTriggeredAbility extends TriggeredAbilityImpl {
int totalRoll = ((DiceRolledEvent) event)
.getResults()
.stream()
.filter(Integer.class::isInstance) // only numerical die result can be masured
.filter(Integer.class::isInstance) // only numerical die result can be measured
.map(Integer.class::cast)
.mapToInt(Integer::intValue)
.sum();

View file

@ -0,0 +1,35 @@
package mage.game.permanent.token;
import mage.MageInt;
import mage.abilities.common.SimpleStaticAbility;
import mage.abilities.effects.common.combat.CantBlockSourceEffect;
import mage.constants.CardType;
import mage.constants.Duration;
import mage.constants.SubType;
/**
* @author TheElk801
*/
public final class RobotCantBlockToken extends TokenImpl {
public RobotCantBlockToken() {
super("Robot Token", "4/4 colorless Robot artifact creature token with \"This creature can't block.\"");
cardType.add(CardType.ARTIFACT);
cardType.add(CardType.CREATURE);
subtype.add(SubType.ROBOT);
power = new MageInt(4);
toughness = new MageInt(4);
this.addAbility(new SimpleStaticAbility(
new CantBlockSourceEffect(Duration.WhileOnBattlefield)
.setText("this creature can't block")
));
}
protected RobotCantBlockToken(final RobotCantBlockToken token) {
super(token);
}
public RobotCantBlockToken copy() {
return new RobotCantBlockToken(this);
}
}

View file

@ -1,10 +1,7 @@
package mage.game.permanent.token;
import mage.MageInt;
import mage.abilities.common.SimpleStaticAbility;
import mage.abilities.effects.common.combat.CantBlockSourceEffect;
import mage.constants.CardType;
import mage.constants.Duration;
import mage.constants.SubType;
/**
@ -13,16 +10,12 @@ import mage.constants.SubType;
public final class RobotToken extends TokenImpl {
public RobotToken() {
super("Robot Token", "4/4 colorless Robot artifact creature token with \"This creature can't block.\"");
super("Robot Token", "3/3 colorless Robot artifact creature token");
cardType.add(CardType.ARTIFACT);
cardType.add(CardType.CREATURE);
subtype.add(SubType.ROBOT);
power = new MageInt(4);
toughness = new MageInt(4);
this.addAbility(new SimpleStaticAbility(
new CantBlockSourceEffect(Duration.WhileOnBattlefield)
.setText("this creature can't block")
));
power = new MageInt(3);
toughness = new MageInt(3);
}
protected RobotToken(final RobotToken token) {