mirror of
https://github.com/Card-Forge/forge.git
synced 2025-11-15 18:28:00 +00:00
- Added AI checks to LoseLife drawbacks.
This commit is contained in:
@@ -648,7 +648,7 @@ public class AbilityFactoryAlterLife {
|
||||
|
||||
@Override
|
||||
public boolean chkAIDrawback() {
|
||||
return true;
|
||||
return loseLifeDoTriggerAINoCost(this.af, this, false);
|
||||
}
|
||||
|
||||
@Override
|
||||
@@ -772,7 +772,8 @@ public class AbilityFactoryAlterLife {
|
||||
}
|
||||
|
||||
// Don't use loselife before main 2 if possible
|
||||
if (Singletons.getModel().getGameState().getPhaseHandler().getPhase().isBefore(PhaseType.MAIN2) && !params.containsKey("ActivationPhases") && !priority) {
|
||||
if (Singletons.getModel().getGameState().getPhaseHandler().getPhase().isBefore(PhaseType.MAIN2)
|
||||
&& !params.containsKey("ActivationPhases") && !priority) {
|
||||
return false;
|
||||
}
|
||||
|
||||
|
||||
@@ -328,7 +328,8 @@ public class AbilityFactoryZoneAffecting {
|
||||
}
|
||||
|
||||
// Don't use draw abilities before main 2 if possible
|
||||
if (Singletons.getModel().getGameState().getPhaseHandler().getPhase().isBefore(PhaseType.MAIN2) && !params.containsKey("ActivationPhases")) {
|
||||
if (Singletons.getModel().getGameState().getPhaseHandler().getPhase().isBefore(PhaseType.MAIN2)
|
||||
&& !params.containsKey("ActivationPhases")) {
|
||||
return false;
|
||||
}
|
||||
|
||||
@@ -342,8 +343,8 @@ public class AbilityFactoryZoneAffecting {
|
||||
if (AbilityFactory.isSorcerySpeed(sa)) {
|
||||
chance = .667; // 66.7% chance for sorcery speed
|
||||
}
|
||||
if ((Singletons.getModel().getGameState().getPhaseHandler().is(PhaseType.END_OF_TURN) && Singletons.getModel().getGameState().getPhaseHandler().isNextTurn(
|
||||
AllZone.getComputerPlayer()))) {
|
||||
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
|
||||
}
|
||||
final Random r = MyRandom.getRandom();
|
||||
|
||||
Reference in New Issue
Block a user