mirror of
https://github.com/Card-Forge/forge.git
synced 2025-11-16 10:48:00 +00:00
Merge branch 'master' into 'master'
Fix Multikicker for the AI + assorted minor fixes Closes #1719 See merge request core-developers/forge!3954
This commit is contained in:
@@ -19,7 +19,10 @@ package forge.ai;
|
||||
|
||||
import com.google.common.base.Predicate;
|
||||
import com.google.common.base.Predicates;
|
||||
import com.google.common.collect.*;
|
||||
import com.google.common.collect.ImmutableList;
|
||||
import com.google.common.collect.Iterables;
|
||||
import com.google.common.collect.Lists;
|
||||
import com.google.common.collect.Multimap;
|
||||
import forge.ai.ability.ChooseGenericEffectAi;
|
||||
import forge.ai.ability.ProtectAi;
|
||||
import forge.ai.ability.TokenAi;
|
||||
@@ -44,7 +47,10 @@ import forge.game.player.Player;
|
||||
import forge.game.replacement.ReplacementEffect;
|
||||
import forge.game.replacement.ReplacementLayer;
|
||||
import forge.game.replacement.ReplacementType;
|
||||
import forge.game.spellability.*;
|
||||
import forge.game.spellability.AbilitySub;
|
||||
import forge.game.spellability.SpellAbility;
|
||||
import forge.game.spellability.SpellAbilityStackInstance;
|
||||
import forge.game.spellability.TargetRestrictions;
|
||||
import forge.game.staticability.StaticAbility;
|
||||
import forge.game.trigger.Trigger;
|
||||
import forge.game.trigger.TriggerType;
|
||||
@@ -109,6 +115,10 @@ public class ComputerUtil {
|
||||
}
|
||||
|
||||
final Cost cost = sa.getPayCosts();
|
||||
|
||||
// Remember the now-forgotten kicker cost? Why is this needed?
|
||||
sa.getHostCard().setKickerMagnitude(source.getKickerMagnitude());
|
||||
|
||||
// TODO: update mana color conversion for Daxos of Meletis
|
||||
if (cost == null) {
|
||||
if (ComputerUtilMana.payManaCost(ai, sa)) {
|
||||
|
||||
@@ -156,6 +156,7 @@ public class PermanentAi extends SpellAbilityAi {
|
||||
ManaCostBeingPaid mcbp = new ManaCostBeingPaid(mCost);
|
||||
if (!ComputerUtilMana.canPayManaCost(mcbp, sa, ai)) {
|
||||
card.setKickerMagnitude(i);
|
||||
sa.setSVar("Multikicker", String.valueOf(i));
|
||||
break;
|
||||
}
|
||||
card.setKickerMagnitude(i + 1);
|
||||
|
||||
@@ -2,7 +2,7 @@ Name:Bloodsoaked Altar
|
||||
ManaCost:4 B B
|
||||
Types:Artifact
|
||||
A:AB$ Token | Cost$ T PayLife<2> Discard<1/Card> Sac<1/Creature> | LegacyImage$ b 5 5 demon flying m20 | TokenAmount$ 1 | TokenScript$ b_5_5_demon_flying | TokenOwner$ You | SorcerySpeed$ True | SpellDescription$ Create a 5/5 black Demon creature token with flying. Activate this ability only any time you could play a sorcery.
|
||||
SVar:AIPreference:DiscardCost$Card
|
||||
SVar:AIPreference:DiscardCost$Card | SacCost$Creature.Token,Creature.cmcLE3
|
||||
DeckHas:Ability$Token
|
||||
AI:RemoveDeck:Random
|
||||
Oracle:{T}, Pay 2 life, Discard a card, Sacrifice a creature: Create a 5/5 black Demon creature token with flying. Activate this ability only any time you could play a sorcery.
|
||||
|
||||
@@ -3,6 +3,6 @@ ManaCost:B
|
||||
Types:Sorcery
|
||||
A:SP$ Destroy | Cost$ B Sac<1/Creature> | ValidTgts$ Creature | TgtPrompt$ Select target creature | SpellDescription$ Destroy target creature.
|
||||
SVar:AICostPreference:SacCost$Creature.Token,Creature.cmcLE2
|
||||
AI:RemoveDeck:All
|
||||
AI:RemoveDeck:Random
|
||||
SVar:Picture:http://www.wizards.com/global/images/magic/general/bone_splinters.jpg
|
||||
Oracle:As an additional cost to cast this spell, sacrifice a creature.\nDestroy target creature.
|
||||
|
||||
@@ -1,4 +1,4 @@
|
||||
Name:Saw it Coming
|
||||
Name:Saw It Coming
|
||||
ManaCost:1 U U
|
||||
Types:Instant
|
||||
A:SP$ Counter | Cost$ 1 U U | TargetType$ Spell | ValidTgts$ Card | SpellDescription$ Counter target spell.
|
||||
|
||||
@@ -5,6 +5,5 @@ PT:5/4
|
||||
T:Mode$ ChangesZone | Origin$ Any | Destination$ Graveyard | ValidCard$ Creature.Other | TriggerZones$ Battlefield | Execute$ TrigDmg | TriggerDescription$ Whenever another creature dies, or a creature card is put into a graveyard from anywhere than the battlefield, or a creature card leaves your graveyard, CARDNAME deals 1 damage to each opponent.
|
||||
T:Mode$ ChangesZone | Origin$ Graveyard | Destination$ Any | ValidCard$ Card.Creature+Other+YouOwn | TriggerZones$ Battlefield | Execute$ TrigDmg | Secondary$ True | TriggerDescription$ Whenever another creature dies, or a creature card is put into a graveyard from anywhere than the battlefield, or a creature card leaves your graveyard, CARDNAME deals 1 damage to each opponent.
|
||||
SVar:TrigDmg:DB$ DealDamage | Defined$ Player.Opponent | NumDmg$ 1
|
||||
A:AB$ Mill | Cost$ 1 B | NumCards$ 1 | Defined$ Player | SpellDescription$ Each player mills a card.
|
||||
AI:RemoveDeck:All
|
||||
A:AB$ Mill | Cost$ 1 B | NumCards$ 1 | Defined$ Player | AILogic$ EndOfOppTurn | SpellDescription$ Each player mills a card.
|
||||
Oracle:Whenever another creature dies, or a creature card is put into a graveyard from anywhere other than the battlefield, or a creature card leaves your graveyard, Syr Konrad, the Grim deals 1 damage to each opponent.\n{1}{B}: Each player mills a card.
|
||||
|
||||
Reference in New Issue
Block a user