mirror of
https://github.com/Card-Forge/forge.git
synced 2025-11-16 18:58:00 +00:00
- CheckStyle.
This commit is contained in:
@@ -12,7 +12,7 @@ import forge.game.player.Player;
|
||||
import forge.util.MyRandom;
|
||||
|
||||
public class CharmAi extends SpellAiLogic {
|
||||
|
||||
|
||||
@Override
|
||||
protected boolean canPlayAI(Player ai, SpellAbility sa) {
|
||||
final Random r = MyRandom.getRandom();
|
||||
@@ -23,10 +23,10 @@ public class CharmAi extends SpellAiLogic {
|
||||
|
||||
List<AbilitySub> chooseFrom = CharmEffect.makePossibleOptions(sa);
|
||||
List<AbilitySub> chosenList = chooseOptionsAi(ai, timingRight, chooseFrom, num, min);
|
||||
|
||||
|
||||
if (chosenList == null || chosenList.isEmpty()) {
|
||||
return false;
|
||||
}
|
||||
}
|
||||
|
||||
// prevent run-away activations - first time will always return true
|
||||
return r.nextFloat() <= Math.pow(.6667, sa.getActivationsThisTurn());
|
||||
@@ -51,9 +51,10 @@ public class CharmAi extends SpellAiLogic {
|
||||
break;
|
||||
}
|
||||
}
|
||||
if (thisPick != null)
|
||||
if (thisPick != null) {
|
||||
chosenList.add(thisPick);
|
||||
}
|
||||
}
|
||||
return chosenList.size() >= min ? chosenList : null;
|
||||
}
|
||||
}
|
||||
}
|
||||
|
||||
Reference in New Issue
Block a user