mirror of
https://github.com/Card-Forge/forge.git
synced 2025-11-18 11:48:02 +00:00
- Removed some randomness relics from CanPlayAI functions.
This commit is contained in:
@@ -470,7 +470,7 @@ public class AbilityFactoryAttach {
|
||||
// TODO If Not Mandatory, make sure the card is "good enough"
|
||||
if (c.isCreature()) {
|
||||
final int eval = CardFactoryUtil.evaluateCreature(c);
|
||||
if ((eval < 160) && ((eval < 130) || (AllZone.getComputerPlayer().getLife() > 5))) {
|
||||
if (eval < 130) {
|
||||
return null;
|
||||
}
|
||||
}
|
||||
|
||||
@@ -340,15 +340,15 @@ public class AbilityFactoryZoneAffecting {
|
||||
|
||||
double chance = .4; // 40 percent chance of drawing with instant speed
|
||||
// stuff
|
||||
final Random r = MyRandom.getRandom();
|
||||
boolean randomReturn = r.nextFloat() <= Math.pow(chance, sa.getActivationsThisTurn() + 1);
|
||||
if (AbilityFactory.isSorcerySpeed(sa)) {
|
||||
chance = .667; // 66.7% chance for sorcery speed
|
||||
randomReturn = true;
|
||||
}
|
||||
if ((Singletons.getModel().getGameState().getPhaseHandler().is(PhaseType.END_OF_TURN)
|
||||
&& Singletons.getModel().getGameState().getPhaseHandler().isNextTurn(AllZone.getComputerPlayer()))) {
|
||||
chance = .9; // 90% for end of opponents turn
|
||||
randomReturn = true;
|
||||
}
|
||||
final Random r = MyRandom.getRandom();
|
||||
boolean randomReturn = r.nextFloat() <= Math.pow(chance, sa.getActivationsThisTurn() + 1);
|
||||
|
||||
if (AbilityFactory.playReusable(sa)) {
|
||||
randomReturn = true;
|
||||
|
||||
Reference in New Issue
Block a user