- A minor code improvement related to the previous commit.

This commit is contained in:
Agetian
2017-06-12 06:23:45 +00:00
parent 65850b63b1
commit abfb2d432f

View File

@@ -677,8 +677,9 @@ public class AiController {
}
private AiPlayDecision canPlaySpellBasic(final Card card, final SpellAbility sa) {
String needsToPlayName = sa != null && sa.isRightSplit() ? "NeedsToPlaySplit" : "NeedsToPlay";
String needsToPlayVarName = sa != null && sa.isRightSplit() ? "NeedsToPlayVarSplit": "NeedsToPlayVar";
boolean isRightSplit = sa != null && sa.isRightSplit();
String needsToPlayName = isRightSplit ? "NeedsToPlaySplit" : "NeedsToPlay";
String needsToPlayVarName = isRightSplit ? "NeedsToPlayVarSplit": "NeedsToPlayVar";
if (card.hasSVar(needsToPlayName)) {
final String needsToPlay = card.getSVar(needsToPlayName);