mirror of
https://github.com/Card-Forge/forge.git
synced 2025-11-19 12:18:00 +00:00
Merge branch 'master' into 'master'
Check for alternative additional costs in the AI routines. Closes #813 and #820 See merge request core-developers/forge!1334
This commit is contained in:
@@ -95,9 +95,15 @@ public class ComputerUtilAbility {
|
||||
|
||||
public static List<SpellAbility> getOriginalAndAltCostAbilities(final List<SpellAbility> originList, final Player player) {
|
||||
final List<SpellAbility> newAbilities = Lists.newArrayList();
|
||||
for (SpellAbility sa : originList) {
|
||||
sa.setActivatingPlayer(player);
|
||||
|
||||
List<SpellAbility> originListWithAddCosts = Lists.newArrayList();
|
||||
for (SpellAbility sa : originList) {
|
||||
// If this spell has alternative additional costs, add them instead of the unmodified SA itself
|
||||
sa.setActivatingPlayer(player);
|
||||
originListWithAddCosts.addAll(GameActionUtil.getAdditionalCostSpell(sa));
|
||||
}
|
||||
|
||||
for (SpellAbility sa : originListWithAddCosts) {
|
||||
// determine which alternative costs are cheaper than the original and prioritize them
|
||||
List<SpellAbility> saAltCosts = GameActionUtil.getAlternativeCosts(sa, player);
|
||||
List<SpellAbility> priorityAltSa = Lists.newArrayList();
|
||||
|
||||
@@ -1,5 +1,5 @@
|
||||
Name:Thrilling Encore
|
||||
ManaCost:4 B
|
||||
Types:Instant
|
||||
A:SP$ ChangeZone | Cost$ 4 B | Origin$ Graveyard | Destination$ Battlefield | Defined$ ThisTurnEntered_Graveyard_from_Battlefield_Creature.nonToken | SpellDescription$ Put onto the battlefield under your control all creature cards in all graveyards that were put there from the battlefield this turn.
|
||||
A:SP$ ChangeZone | Cost$ 4 B | Origin$ Graveyard | Destination$ Battlefield | Defined$ ThisTurnEntered_Graveyard_from_Battlefield_Creature.nonToken | GainControl$ True | SpellDescription$ Put onto the battlefield under your control all creature cards in all graveyards that were put there from the battlefield this turn.
|
||||
Oracle:Put onto the battlefield under your control all creature cards in all graveyards that were put there from the battlefield this turn.
|
||||
|
||||
Reference in New Issue
Block a user