mirror of
https://github.com/correl/mage.git
synced 2024-11-15 19:19:33 +00:00
Improved rule text generation.
This commit is contained in:
parent
4f810c9955
commit
cf602a19c4
2 changed files with 9 additions and 5 deletions
|
@ -129,7 +129,7 @@ public class GainAbilityControlledEffect extends ContinuousEffectImpl<GainAbilit
|
|||
}
|
||||
String gainedAbility = ability.getRule();
|
||||
sb.append(filter.getMessage()).append(" you control ");
|
||||
if (duration.equals(Duration.WhileOnBattlefield)) {
|
||||
if (duration.equals(Duration.WhileOnBattlefield) || duration.equals(Duration.EndOfGame)) {
|
||||
sb.append("have ");
|
||||
if (gainedAbility.startsWith("Whenever ") || gainedAbility.startsWith("{T}")) {
|
||||
gainedAbility = "\"" + gainedAbility + "\"";
|
||||
|
@ -139,7 +139,7 @@ public class GainAbilityControlledEffect extends ContinuousEffectImpl<GainAbilit
|
|||
sb.append("gain ");
|
||||
}
|
||||
sb.append(gainedAbility);
|
||||
if (!duration.toString().isEmpty()) {
|
||||
if (!duration.toString().isEmpty() && !duration.equals(Duration.EndOfGame)) {
|
||||
sb.append(" ").append(duration.toString());
|
||||
}
|
||||
staticText = sb.toString();
|
||||
|
|
|
@ -28,13 +28,18 @@
|
|||
|
||||
package mage.abilities.keyword;
|
||||
|
||||
import java.io.ObjectStreamException;
|
||||
import mage.Constants.Zone;
|
||||
import mage.abilities.MageSingleton;
|
||||
import mage.abilities.StaticAbility;
|
||||
|
||||
import java.io.ObjectStreamException;
|
||||
|
||||
/**
|
||||
* October 1, 2012
|
||||
* 702.71. Changeling
|
||||
* 702.71a Changeling is a characteristic-defining ability. "Changeling" means "This object
|
||||
* is every creature type." This ability works everywhere, even outside the game. See rule 604.3.
|
||||
* 702.71b Multiple instances of changeling on the same object are redundant.
|
||||
*
|
||||
* @author nantuko
|
||||
*/
|
||||
|
@ -56,12 +61,11 @@ public class ChangelingAbility extends StaticAbility<ChangelingAbility> implemen
|
|||
|
||||
@Override
|
||||
public String getRule() {
|
||||
return "Changeling (This card is every creature type at all times.)";
|
||||
return "Changeling <i>(This card is every creature type at all times.)<i/>";
|
||||
}
|
||||
|
||||
@Override
|
||||
public ChangelingAbility copy() {
|
||||
return fINSTANCE;
|
||||
}
|
||||
|
||||
}
|
||||
|
|
Loading…
Reference in a new issue