mirror of
https://github.com/Card-Forge/forge.git
synced 2025-11-20 12:48:00 +00:00
- Fixed a bug in the AI of PreventDamage AF.
This commit is contained in:
@@ -233,7 +233,7 @@ public class AbilityFactory_PreventDamage {
|
|||||||
else if (AllZone.getStack().size() > 0) {
|
else if (AllZone.getStack().size() > 0) {
|
||||||
tgt.resetTargets();
|
tgt.resetTargets();
|
||||||
// check stack for something on the stack will kill anything i control
|
// check stack for something on the stack will kill anything i control
|
||||||
ArrayList<Object> objects = AbilityFactory.predictThreatenedObjects(af);
|
ArrayList<Object> objects = new ArrayList<Object>();//AbilityFactory.predictThreatenedObjects(af);
|
||||||
|
|
||||||
if (objects.contains(AllZone.getComputerPlayer()))
|
if (objects.contains(AllZone.getComputerPlayer()))
|
||||||
tgt.addTarget(AllZone.getComputerPlayer());
|
tgt.addTarget(AllZone.getComputerPlayer());
|
||||||
@@ -248,9 +248,11 @@ public class AbilityFactory_PreventDamage {
|
|||||||
threatenedTargets.add(c);
|
threatenedTargets.add(c);
|
||||||
}
|
}
|
||||||
|
|
||||||
// Choose "best" of the remaining to save
|
if(!threatenedTargets.isEmpty()) {
|
||||||
tgt.addTarget(CardFactoryUtil.AI_getBestCreature(threatenedTargets));
|
// Choose "best" of the remaining to save
|
||||||
chance = true;
|
tgt.addTarget(CardFactoryUtil.AI_getBestCreature(threatenedTargets));
|
||||||
|
chance = true;
|
||||||
|
}
|
||||||
|
|
||||||
} // Protect combatants
|
} // Protect combatants
|
||||||
else if (AllZone.getPhase().is(Constant.Phase.Combat_Declare_Blockers_InstantAbility)) {
|
else if (AllZone.getPhase().is(Constant.Phase.Combat_Declare_Blockers_InstantAbility)) {
|
||||||
|
|||||||
Reference in New Issue
Block a user