forked from External/mage
fix Discover text
This commit is contained in:
parent
3abdb72910
commit
e802db32d3
2 changed files with 9 additions and 4 deletions
|
|
@ -29,9 +29,14 @@ public class ActivateAsSorceryActivatedAbility extends ActivatedAbilityImpl {
|
|||
|
||||
@Override
|
||||
public String getRule() {
|
||||
if (mayActivate == TargetController.OPPONENT) {
|
||||
return super.getRule() + " Only your opponents may activate this ability and only as a sorcery.";
|
||||
String superRule = super.getRule();
|
||||
String newText = (mayActivate == TargetController.OPPONENT
|
||||
? " Only your opponents may activate this ability and only as a sorcery."
|
||||
: " Activate only as a sorcery.");
|
||||
if (superRule.endsWith("</i>")) {
|
||||
return superRule.replaceFirst(" <i>", newText + " <i>");
|
||||
} else {
|
||||
return superRule + newText;
|
||||
}
|
||||
return super.getRule() + " Activate only as a sorcery.";
|
||||
}
|
||||
}
|
||||
|
|
|
|||
Loading…
Add table
Add a link
Reference in a new issue