mirror of
https://github.com/Card-Forge/forge.git
synced 2025-11-20 04:38:00 +00:00
- Little fixes in the AI blocking code.
This commit is contained in:
@@ -506,7 +506,7 @@ public class CombatUtil {
|
||||
int damage = 0;
|
||||
int poison = 0;
|
||||
CardList attackers = new CardList(combat.getAttackers());
|
||||
CardList unblocked = new CardList(combat.getAttackers());
|
||||
CardList unblocked = new CardList();
|
||||
CardList blockers = new CardList();
|
||||
Card attacker = new Card();
|
||||
|
||||
|
||||
@@ -560,7 +560,7 @@ public class ComputerUtil_Block2
|
||||
//Begin with the weakest blockers
|
||||
CardListUtil.sortAttackLowFirst(blockersLeft);
|
||||
|
||||
CardList currentAttackers = attackersLeft;
|
||||
CardList currentAttackers = new CardList(attackersLeft.toArray());
|
||||
|
||||
//first choose good blocks only
|
||||
for(int i = 0; i < attackersLeft.size(); i++) {
|
||||
@@ -602,7 +602,7 @@ public class ComputerUtil_Block2
|
||||
}
|
||||
}
|
||||
|
||||
attackersLeft = currentAttackers;
|
||||
attackersLeft = new CardList(currentAttackers.toArray());
|
||||
|
||||
if(blockersLeft.size() == 0) return combat;
|
||||
|
||||
@@ -619,7 +619,7 @@ public class ComputerUtil_Block2
|
||||
}
|
||||
}
|
||||
|
||||
attackersLeft = currentAttackers;
|
||||
attackersLeft = new CardList(currentAttackers.toArray());
|
||||
|
||||
//choose necessary chump blocks if life is still in danger
|
||||
if (CombatUtil.lifeInDanger(combat))
|
||||
|
||||
@@ -181,8 +181,7 @@ public class MagicStack extends MyObservable {
|
||||
String k[] = parse.split(":");
|
||||
if (k[1].equals("ActualSpell")
|
||||
&& ActualEffectTriggered == false) {
|
||||
AllZone.GameAction.checkWheneverKeyword(sp.getSourceCard(),
|
||||
"ActualSpell", null);
|
||||
AllZone.GameAction.checkWheneverKeyword(sp.getSourceCard(),"ActualSpell", null);
|
||||
sp.getSourceCard().removeIntrinsicKeyword(parse);
|
||||
ActualEffectTriggered = true;
|
||||
}
|
||||
|
||||
@@ -437,7 +437,7 @@ public class PlayerZone_ComesIntoPlay extends DefaultPlayerZone {
|
||||
|
||||
}
|
||||
|
||||
public void setTrigger(boolean b) {
|
||||
public void setTrigger(boolean b) {%
|
||||
trigger = b;
|
||||
}
|
||||
|
||||
|
||||
Reference in New Issue
Block a user