mirror of
https://github.com/Card-Forge/forge.git
synced 2025-11-19 04:08:01 +00:00
Fix Strive check
This commit is contained in:
@@ -746,7 +746,7 @@ public class AiController {
|
||||
return AiPlayDecision.CantPlaySa;
|
||||
}
|
||||
|
||||
boolean xCost = sa.getPayCosts().hasXInAnyCostPart();
|
||||
boolean xCost = sa.getPayCosts().hasXInAnyCostPart() || sa.getHostCard().hasStartOfKeyword("Strive");
|
||||
if (!xCost && !ComputerUtilCost.canPayCost(sa, player)) {
|
||||
// for most costs, it's OK to check if they can be paid early in order to avoid running a heavy API check
|
||||
// when the AI won't even be able to play the spell in the first place (even if it could afford it)
|
||||
|
||||
@@ -59,7 +59,7 @@ public class CopyPermanentAi extends SpellAbilityAi {
|
||||
}
|
||||
}
|
||||
|
||||
if (sa.hasParam("AtEOT") && !aiPlayer.getGame().getPhaseHandler().is(PhaseType.MAIN1)) {
|
||||
if (sa.hasParam("AtEOT") && !ph.is(PhaseType.MAIN1)) {
|
||||
return false;
|
||||
}
|
||||
|
||||
@@ -118,7 +118,6 @@ public class CopyPermanentAi extends SpellAbilityAi {
|
||||
final String sourceName = ComputerUtilAbility.getAbilitySourceName(sa);
|
||||
final boolean canCopyLegendary = sa.hasParam("NonLegendary");
|
||||
|
||||
|
||||
// ////
|
||||
// Targeting
|
||||
if (sa.usesTargeting()) {
|
||||
|
||||
@@ -163,8 +163,6 @@ public class DiscardAi extends SpellAbilityAi {
|
||||
return false;
|
||||
} // discardTargetAI()
|
||||
|
||||
|
||||
|
||||
@Override
|
||||
protected boolean doTriggerAINoCost(Player ai, SpellAbility sa, boolean mandatory) {
|
||||
final TargetRestrictions tgt = sa.getTargetRestrictions();
|
||||
@@ -211,9 +209,8 @@ public class DiscardAi extends SpellAbilityAi {
|
||||
return true;
|
||||
} // discardCheckDrawbackAI()
|
||||
|
||||
|
||||
public boolean confirmAction(Player player, SpellAbility sa, PlayerActionConfirmMode mode, String message) {
|
||||
if ( mode == PlayerActionConfirmMode.Random ) { //
|
||||
if ( mode == PlayerActionConfirmMode.Random ) {
|
||||
// TODO For now AI will always discard Random used currently with: Balduvian Horde and similar cards
|
||||
return true;
|
||||
}
|
||||
|
||||
@@ -1412,7 +1412,7 @@ public class Card extends GameEntity implements Comparable<Card>, IHasSVars {
|
||||
@Override
|
||||
public int addCounter(final CounterType counterType, final int n, final Player source, final SpellAbility cause, final boolean applyMultiplier, final boolean fireEvents, GameEntityCounterTable table) {
|
||||
int addAmount = n;
|
||||
if(addAmount <= 0 || !canReceiveCounters(counterType)) {
|
||||
if (addAmount <= 0 || !canReceiveCounters(counterType)) {
|
||||
// As per rule 107.1b
|
||||
return 0;
|
||||
}
|
||||
|
||||
@@ -1,7 +1,7 @@
|
||||
Name:Rise of the Hobgoblins
|
||||
ManaCost:RW RW
|
||||
Types:Enchantment
|
||||
T:Mode$ ChangesZone | Origin$ Any | Destination$ Battlefield | ValidCard$ Card.Self | Execute$ TrigToken | OptionalDecider$ You | TriggerDescription$ When CARDNAME enters the battlefield, you may pay {X}. If you do, create X 1/1 red and white Goblin Soldier creature tokens.
|
||||
T:Mode$ ChangesZone | Origin$ Any | Destination$ Battlefield | ValidCard$ Card.Self | Execute$ TrigToken | TriggerDescription$ When CARDNAME enters the battlefield, you may pay {X}. If you do, create X 1/1 red and white Goblin Soldier creature tokens.
|
||||
SVar:TrigToken:AB$ Token | Cost$ X | TokenAmount$ X | TokenScript$ rw_1_1_goblin_soldier | TokenOwner$ You | LegacyImage$ rw 1 1 goblin soldier eve
|
||||
SVar:X:Count$xPaid
|
||||
A:AB$ PumpAll | Cost$ RW | ValidCards$ Creature.Red+YouCtrl,Creature.White+YouCtrl | KW$ First Strike | SpellDescription$ Red creatures and white creatures you control gain first strike until end of turn.
|
||||
|
||||
Reference in New Issue
Block a user