mirror of
https://github.com/Card-Forge/forge.git
synced 2025-11-17 03:08:02 +00:00
- CheckStyle.
This commit is contained in:
@@ -43,7 +43,7 @@ import forge.game.player.Player;
|
|||||||
}
|
}
|
||||||
|
|
||||||
/**
|
/**
|
||||||
* Returns this effect description with needed prelude and epilogue
|
* Returns this effect description with needed prelude and epilogue.
|
||||||
* @param params
|
* @param params
|
||||||
* @param commonSpell
|
* @param commonSpell
|
||||||
* @return
|
* @return
|
||||||
@@ -60,11 +60,12 @@ import forge.game.player.Player;
|
|||||||
// Own description
|
// Own description
|
||||||
String stackDesc = params.get("StackDescription");
|
String stackDesc = params.get("StackDescription");
|
||||||
if (stackDesc != null) {
|
if (stackDesc != null) {
|
||||||
if ( !"None".equalsIgnoreCase(stackDesc) ) // by typing "none" they want to suppress output
|
if (!"None".equalsIgnoreCase(stackDesc)) { // by typing "none" they want to suppress output
|
||||||
sb.append(stackDesc.replace("CARDNAME", sa.getSourceCard().getName()));
|
sb.append(stackDesc.replace("CARDNAME", sa.getSourceCard().getName()));
|
||||||
} else
|
}
|
||||||
|
} else {
|
||||||
sb.append(this.getStackDescription(sa));
|
sb.append(this.getStackDescription(sa));
|
||||||
|
}
|
||||||
|
|
||||||
// This inlcudes all subAbilities
|
// This inlcudes all subAbilities
|
||||||
final AbilitySub abSub = sa.getSubAbility();
|
final AbilitySub abSub = sa.getSubAbility();
|
||||||
@@ -95,14 +96,16 @@ import forge.game.player.Player;
|
|||||||
// Some checked target first and params["Defined"] then - @see targetIsPreferred
|
// Some checked target first and params["Defined"] then - @see targetIsPreferred
|
||||||
// Some wanted empty list when params["Defined"] was not set - @see wantEmptyAsDefault
|
// Some wanted empty list when params["Defined"] was not set - @see wantEmptyAsDefault
|
||||||
// Poor me had to gather it all in a single place
|
// Poor me had to gather it all in a single place
|
||||||
private final static List<Player> emptyPlayerList = Collections.unmodifiableList(new ArrayList<Player>());
|
private static final List<Player> emptyPlayerList = Collections.unmodifiableList(new ArrayList<Player>());
|
||||||
private List<Player> getTargetPlayers(SpellAbility sa, final boolean wantEmptyAsDefault, final boolean targetIsPreferred) {
|
private List<Player> getTargetPlayers(SpellAbility sa, final boolean wantEmptyAsDefault, final boolean targetIsPreferred) {
|
||||||
final Target tgt = sa.getTarget();
|
final Target tgt = sa.getTarget();
|
||||||
final String defined = sa.getParam("Defined");
|
final String defined = sa.getParam("Defined");
|
||||||
if ( tgt != null && ( targetIsPreferred || ( StringUtils.isEmpty(defined) && !wantEmptyAsDefault ) ) )
|
if (tgt != null && (targetIsPreferred || (StringUtils.isEmpty(defined) && !wantEmptyAsDefault))) {
|
||||||
return tgt.getTargetPlayers();
|
return tgt.getTargetPlayers();
|
||||||
if ( StringUtils.isEmpty(defined) && wantEmptyAsDefault )
|
}
|
||||||
|
if (StringUtils.isEmpty(defined) && wantEmptyAsDefault) {
|
||||||
return emptyPlayerList;
|
return emptyPlayerList;
|
||||||
|
}
|
||||||
return AbilityFactory.getDefinedPlayers(sa.getSourceCard(), defined, sa);
|
return AbilityFactory.getDefinedPlayers(sa.getSourceCard(), defined, sa);
|
||||||
}
|
}
|
||||||
|
|
||||||
@@ -116,5 +119,4 @@ import forge.game.player.Player;
|
|||||||
return tgt != null ? tgt.getTargets() : AbilityFactory.getDefinedObjects(sa.getSourceCard(), sa.getParam("Defined"), sa);
|
return tgt != null ? tgt.getTargets() : AbilityFactory.getDefinedObjects(sa.getSourceCard(), sa.getParam("Defined"), sa);
|
||||||
}
|
}
|
||||||
|
|
||||||
|
|
||||||
}
|
}
|
||||||
Reference in New Issue
Block a user