mirror of
https://github.com/Card-Forge/forge.git
synced 2025-11-18 11:48:02 +00:00
- Correct some code style issues.
This commit is contained in:
@@ -97,7 +97,7 @@ public class ComputerUtilCard {
|
||||
*/
|
||||
public static Card getBestPlaneswalkerAI(final List<Card> list) {
|
||||
List<Card> all = CardLists.filter(list, CardPredicates.Presets.PLANESWALKERS);
|
||||
if (all.size() == 0) {
|
||||
if (all.isEmpty()) {
|
||||
return null;
|
||||
}
|
||||
// no AI logic, just return most expensive
|
||||
@@ -111,7 +111,7 @@ public class ComputerUtilCard {
|
||||
*/
|
||||
public static Card getWorstPlaneswalkerAI(final List<Card> list) {
|
||||
List<Card> all = CardLists.filter(list, CardPredicates.Presets.PLANESWALKERS);
|
||||
if (all.size() == 0) {
|
||||
if (all.isEmpty()) {
|
||||
return null;
|
||||
}
|
||||
// no AI logic, just return least expensive
|
||||
|
||||
@@ -84,11 +84,10 @@ public abstract class DamageAiBase extends SpellAbilityAi {
|
||||
|
||||
// burn Planeswalkers
|
||||
// TODO: Must be removed completely when the "planeswalker redirection" rule is removed.
|
||||
if (!noPlaneswalkerRedirection) {
|
||||
if (Iterables.any(enemy.getCardsIn(ZoneType.Battlefield), CardPredicates.Presets.PLANESWALKERS)) {
|
||||
if (!noPlaneswalkerRedirection
|
||||
&& Iterables.any(enemy.getCardsIn(ZoneType.Battlefield), CardPredicates.Presets.PLANESWALKERS)) {
|
||||
return true;
|
||||
}
|
||||
}
|
||||
|
||||
if (avoidTargetP(comp, sa)) {
|
||||
return false;
|
||||
|
||||
@@ -361,11 +361,9 @@ public class DamageDealAi extends DamageAiBase {
|
||||
return ComputerUtilCard.getBestPlaneswalkerAI(killables);
|
||||
}
|
||||
|
||||
if (!hPlay.isEmpty()) {
|
||||
if (pl.isOpponentOf(ai) && activator.equals(ai)) {
|
||||
if (!hPlay.isEmpty() && pl.isOpponentOf(ai) && activator.equals(ai)) {
|
||||
return ComputerUtilCard.getBestPlaneswalkerAI(hPlay);
|
||||
}
|
||||
}
|
||||
|
||||
return null;
|
||||
}
|
||||
|
||||
Reference in New Issue
Block a user