mirror of
https://github.com/Card-Forge/forge.git
synced 2025-11-20 12:48:00 +00:00
* Firebolt fix AI targets
This commit is contained in:
@@ -7610,8 +7610,13 @@ public class CardFactory implements NewConstants {
|
||||
}
|
||||
|
||||
Card c = getFlying();
|
||||
if((c == null) || (!check.equals(c))) throw new RuntimeException(card
|
||||
+ " error in chooseTargetAI() - Card c is " + c + ", Card check is " + check);
|
||||
if((c == null) || (!check.equals(c))) {
|
||||
c = getAnyCreature();
|
||||
if (c == null) {
|
||||
setTargetPlayer(Constant.Player.Human);
|
||||
return;
|
||||
}
|
||||
}
|
||||
|
||||
setTargetCard(c);
|
||||
}//chooseTargetAI()
|
||||
@@ -7625,6 +7630,14 @@ public class CardFactory implements NewConstants {
|
||||
return null;
|
||||
}
|
||||
|
||||
Card getAnyCreature() {
|
||||
CardList creatures = CardFactoryUtil.AI_getHumanCreature(card, true);
|
||||
for(int i = 0; i < creatures.size(); i++)
|
||||
if(creatures.get(i).getNetDefense() <= damage) return creatures.get(i);
|
||||
|
||||
return null;
|
||||
}
|
||||
|
||||
@Override
|
||||
public void resolve() {
|
||||
if(getTargetCard() != null) {
|
||||
|
||||
Reference in New Issue
Block a user