mirror of
https://github.com/Card-Forge/forge.git
synced 2025-11-15 10:18:01 +00:00
Tweak AI to skip useless Enlisting (#2594)
This commit is contained in:
@@ -342,11 +342,16 @@ public class PlayerControllerAi extends PlayerController {
|
||||
@Override
|
||||
public List<Card> enlistAttackers(List<Card> attackers) {
|
||||
CardCollection cards = CostEnlist.getCardsForEnlisting(brains.getPlayer());
|
||||
ComputerUtilCard.sortByEvaluateCreature(new CardCollection(attackers));
|
||||
cards = CardLists.filter(cards, CardPredicates.hasGreaterPowerThan(0));
|
||||
CardCollection chosenAttackers = new CardCollection(attackers);
|
||||
ComputerUtilCard.sortByEvaluateCreature(chosenAttackers);
|
||||
|
||||
// do not enlist more than available payment choices (currently ignores multiple instances of Enlist, but can that even happen?)
|
||||
attackers = attackers.subList(0, cards.size());
|
||||
if (attackers.size() > cards.size()) {
|
||||
chosenAttackers = chosenAttackers.subList(0, cards.size());
|
||||
}
|
||||
// TODO check if not needed as defender
|
||||
return attackers;
|
||||
return chosenAttackers;
|
||||
}
|
||||
|
||||
@Override
|
||||
|
||||
@@ -118,7 +118,7 @@
|
||||
</goals>
|
||||
<configuration>
|
||||
<!-- TODO: insert placeholder for latest version tag -->
|
||||
<fromRef>forge-1.6.53</fromRef>
|
||||
<fromRef>forge-1.6.56</fromRef>
|
||||
<file>../forge-gui/release-files/CHANGES.txt</file>
|
||||
<templateContent>
|
||||
<![CDATA[
|
||||
|
||||
@@ -3,7 +3,7 @@ ManaCost:3 G G W W
|
||||
Types:Legendary Creature Dinosaur Vampire
|
||||
PT:12/12
|
||||
K:Trample
|
||||
T:Mode$ AttackersDeclared | AttackingPlayer$ You | Execute$ TrigCharm | TriggerDescription$ Whenever you attack, ABILITY
|
||||
T:Mode$ AttackersDeclared | AttackingPlayer$ You | Execute$ TrigCharm | TriggerZones$ Battlefield | TriggerDescription$ Whenever you attack, ABILITY
|
||||
SVar:TrigCharm:DB$ Charm | CharmNum$ 1 | Choices$ DBDino,DBVampire
|
||||
SVar:DBDino:DB$ Token | TokenAmount$ 1 | TokenOwner$ You | TokenScript$ g_x_x_dinosaur_trample | TokenPower$ X | TokenToughness$ X | TokenTapped$ True | TokenAttacking$ True | TokenOwner$ You | SpellDescription$ Create a tapped and attacking X/X green Dinosaur creature token with trample, where X is the greatest power among other attacking creatures.
|
||||
SVar:DBVampire:DB$ Token | TokenAmount$ Y | TokenScript$ w_1_1_vampire_lifelink | TokenOwner$ You | SpellDescription$ Create X 1/1 white Vampire creature tokens with lifelink, where X is the number of other attacking creatures.
|
||||
|
||||
Reference in New Issue
Block a user