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) {
|
public static Card getBestPlaneswalkerAI(final List<Card> list) {
|
||||||
List<Card> all = CardLists.filter(list, CardPredicates.Presets.PLANESWALKERS);
|
List<Card> all = CardLists.filter(list, CardPredicates.Presets.PLANESWALKERS);
|
||||||
if (all.size() == 0) {
|
if (all.isEmpty()) {
|
||||||
return null;
|
return null;
|
||||||
}
|
}
|
||||||
// no AI logic, just return most expensive
|
// no AI logic, just return most expensive
|
||||||
@@ -111,7 +111,7 @@ public class ComputerUtilCard {
|
|||||||
*/
|
*/
|
||||||
public static Card getWorstPlaneswalkerAI(final List<Card> list) {
|
public static Card getWorstPlaneswalkerAI(final List<Card> list) {
|
||||||
List<Card> all = CardLists.filter(list, CardPredicates.Presets.PLANESWALKERS);
|
List<Card> all = CardLists.filter(list, CardPredicates.Presets.PLANESWALKERS);
|
||||||
if (all.size() == 0) {
|
if (all.isEmpty()) {
|
||||||
return null;
|
return null;
|
||||||
}
|
}
|
||||||
// no AI logic, just return least expensive
|
// no AI logic, just return least expensive
|
||||||
|
|||||||
@@ -84,10 +84,9 @@ public abstract class DamageAiBase extends SpellAbilityAi {
|
|||||||
|
|
||||||
// burn Planeswalkers
|
// burn Planeswalkers
|
||||||
// TODO: Must be removed completely when the "planeswalker redirection" rule is removed.
|
// TODO: Must be removed completely when the "planeswalker redirection" rule is removed.
|
||||||
if (!noPlaneswalkerRedirection) {
|
if (!noPlaneswalkerRedirection
|
||||||
if (Iterables.any(enemy.getCardsIn(ZoneType.Battlefield), CardPredicates.Presets.PLANESWALKERS)) {
|
&& Iterables.any(enemy.getCardsIn(ZoneType.Battlefield), CardPredicates.Presets.PLANESWALKERS)) {
|
||||||
return true;
|
return true;
|
||||||
}
|
|
||||||
}
|
}
|
||||||
|
|
||||||
if (avoidTargetP(comp, sa)) {
|
if (avoidTargetP(comp, sa)) {
|
||||||
|
|||||||
@@ -361,10 +361,8 @@ public class DamageDealAi extends DamageAiBase {
|
|||||||
return ComputerUtilCard.getBestPlaneswalkerAI(killables);
|
return ComputerUtilCard.getBestPlaneswalkerAI(killables);
|
||||||
}
|
}
|
||||||
|
|
||||||
if (!hPlay.isEmpty()) {
|
if (!hPlay.isEmpty() && pl.isOpponentOf(ai) && activator.equals(ai)) {
|
||||||
if (pl.isOpponentOf(ai) && activator.equals(ai)) {
|
return ComputerUtilCard.getBestPlaneswalkerAI(hPlay);
|
||||||
return ComputerUtilCard.getBestPlaneswalkerAI(hPlay);
|
|
||||||
}
|
|
||||||
}
|
}
|
||||||
|
|
||||||
return null;
|
return null;
|
||||||
|
|||||||
Reference in New Issue
Block a user