forked from External/mage
New cards
[CHK] BloodthirstyOgre / HorobiDeathsWail / KumanosPupil / MyojinOfInfiniteRage / MyojinOfLifesWeb / MyojinOfNightsReach / MyojinOfSeeingWinds / OniPossession / PainwrackerOni Framework PutOntoBattlefieldTargetEffect - new effect SetCardSubtypeAttachedEffect - added constuctor with list of types TargetControlledCreaturePermanent - added constructor with "required" and "filter" DrawCardControllerEffect / SacrificeTargetEffect - improved text generation CountersCount - added flag to return the number of counters as negative value
This commit is contained in:
parent
182d636078
commit
e88a2a199f
16 changed files with 1153 additions and 23 deletions
|
|
@ -31,6 +31,7 @@ package mage.abilities.effects.common;
|
|||
import mage.Constants.Outcome;
|
||||
import mage.abilities.Ability;
|
||||
import mage.abilities.dynamicvalue.DynamicValue;
|
||||
import mage.abilities.dynamicvalue.common.PermanentsOnBattlefieldCount;
|
||||
import mage.abilities.dynamicvalue.common.StaticValue;
|
||||
import mage.abilities.effects.OneShotEffect;
|
||||
import mage.game.Game;
|
||||
|
|
@ -75,12 +76,13 @@ public class DrawCardControllerEffect extends OneShotEffect<DrawCardControllerEf
|
|||
|
||||
private void setText() {
|
||||
StringBuilder sb = new StringBuilder();
|
||||
boolean oneCard = amount instanceof StaticValue && amount.calculate(null, null) == 1;
|
||||
boolean oneCard = (amount instanceof StaticValue && amount.calculate(null, null) == 1)
|
||||
|| amount instanceof PermanentsOnBattlefieldCount;
|
||||
sb.append("draw ").append(oneCard ? "a" : amount).append(" card");
|
||||
if (!oneCard) {
|
||||
sb.append("s");
|
||||
}
|
||||
String message = amount.getMessage();
|
||||
String message = amount.getMessage();
|
||||
if (message.length() > 0) {
|
||||
sb.append(" for each ");
|
||||
}
|
||||
|
|
|
|||
Loading…
Add table
Add a link
Reference in a new issue