forked from External/mage
Add common effect class for "Its controller searches..." (Path to Exile, etc) Fixes #9654
This commit is contained in:
parent
58c55bf08c
commit
76fcfafc8b
19 changed files with 243 additions and 653 deletions
|
|
@ -62,14 +62,9 @@ public class SacrificeTargetEffect extends OneShotEffect {
|
|||
|
||||
@Override
|
||||
public String getText(Mode mode) {
|
||||
if (staticText.isEmpty() && !mode.getTargets().isEmpty()) {
|
||||
if (mode.getTargets().get(0).getNumberOfTargets() == 1) {
|
||||
return "The controller of target " + mode.getTargets().get(0).getTargetName() + " sacrifices it";
|
||||
} else {
|
||||
return "The controller of " + mode.getTargets().get(0).getNumberOfTargets() + " target " + mode.getTargets().get(0).getTargetName() + " sacrifices it";
|
||||
}
|
||||
if (staticText != null && !staticText.isEmpty()) {
|
||||
return staticText;
|
||||
}
|
||||
return staticText;
|
||||
return getTargetPointer().describeTargets(mode.getTargets(), "that permanent") + "'s controller sacrifices it";
|
||||
}
|
||||
|
||||
}
|
||||
|
|
|
|||
Loading…
Add table
Add a link
Reference in a new issue