mirror of
https://github.com/Card-Forge/forge.git
synced 2025-11-14 09:48:02 +00:00
Fix Pump / Draw AI half broken (#8918)
This commit is contained in:
@@ -54,7 +54,7 @@ public class DrawAi extends SpellAbilityAi {
|
|||||||
}
|
}
|
||||||
|
|
||||||
if (ComputerUtil.playImmediately(ai, sa)) {
|
if (ComputerUtil.playImmediately(ai, sa)) {
|
||||||
return new AiAbilityDecision(0, AiPlayDecision.CantPlayAi);
|
return new AiAbilityDecision(100, AiPlayDecision.WillPlay);
|
||||||
}
|
}
|
||||||
|
|
||||||
// Don't tap creatures that may be able to block
|
// Don't tap creatures that may be able to block
|
||||||
@@ -73,9 +73,10 @@ public class DrawAi extends SpellAbilityAi {
|
|||||||
// TODO: make this configurable in the AI profile
|
// TODO: make this configurable in the AI profile
|
||||||
return new AiAbilityDecision(100, AiPlayDecision.WillPlay);
|
return new AiAbilityDecision(100, AiPlayDecision.WillPlay);
|
||||||
}
|
}
|
||||||
|
return new AiAbilityDecision(0, AiPlayDecision.CostNotAcceptable);
|
||||||
}
|
}
|
||||||
|
|
||||||
return new AiAbilityDecision(0, AiPlayDecision.CantPlayAi);
|
return new AiAbilityDecision(100, AiPlayDecision.WillPlay);
|
||||||
}
|
}
|
||||||
|
|
||||||
/*
|
/*
|
||||||
@@ -173,9 +174,8 @@ public class DrawAi extends SpellAbilityAi {
|
|||||||
public AiAbilityDecision chkDrawback(SpellAbility sa, Player ai) {
|
public AiAbilityDecision chkDrawback(SpellAbility sa, Player ai) {
|
||||||
if (targetAI(ai, sa, sa.isTrigger() && sa.getHostCard().isInPlay())) {
|
if (targetAI(ai, sa, sa.isTrigger() && sa.getHostCard().isInPlay())) {
|
||||||
return new AiAbilityDecision(100, AiPlayDecision.WillPlay);
|
return new AiAbilityDecision(100, AiPlayDecision.WillPlay);
|
||||||
} else {
|
|
||||||
return new AiAbilityDecision(0, AiPlayDecision.TargetingFailed);
|
|
||||||
}
|
}
|
||||||
|
return new AiAbilityDecision(0, AiPlayDecision.TargetingFailed);
|
||||||
}
|
}
|
||||||
|
|
||||||
/**
|
/**
|
||||||
@@ -540,9 +540,8 @@ public class DrawAi extends SpellAbilityAi {
|
|||||||
|
|
||||||
if (targetAI(ai, sa, mandatory)) {
|
if (targetAI(ai, sa, mandatory)) {
|
||||||
return new AiAbilityDecision(100, AiPlayDecision.WillPlay);
|
return new AiAbilityDecision(100, AiPlayDecision.WillPlay);
|
||||||
} else {
|
|
||||||
return new AiAbilityDecision(0, AiPlayDecision.TargetingFailed);
|
|
||||||
}
|
}
|
||||||
|
return new AiAbilityDecision(0, AiPlayDecision.TargetingFailed);
|
||||||
}
|
}
|
||||||
|
|
||||||
/* (non-Javadoc)
|
/* (non-Javadoc)
|
||||||
|
|||||||
@@ -339,11 +339,11 @@ public class PumpAi extends PumpAiBase {
|
|||||||
return new AiAbilityDecision(0, AiPlayDecision.CantPlayAi);
|
return new AiAbilityDecision(0, AiPlayDecision.CantPlayAi);
|
||||||
}
|
}
|
||||||
|
|
||||||
if (!pumpTgtAI(ai, sa, defense, attack, false, false)) {
|
if (pumpTgtAI(ai, sa, defense, attack, false, false)) {
|
||||||
return new AiAbilityDecision(0, AiPlayDecision.TargetingFailed);
|
return new AiAbilityDecision(100, AiPlayDecision.WillPlay);
|
||||||
}
|
}
|
||||||
|
|
||||||
return new AiAbilityDecision(0, AiPlayDecision.CantPlayAi);
|
return new AiAbilityDecision(0, AiPlayDecision.TargetingFailed);
|
||||||
}
|
}
|
||||||
|
|
||||||
private boolean pumpTgtAI(final Player ai, final SpellAbility sa, final int defense, final int attack, final boolean mandatory,
|
private boolean pumpTgtAI(final Player ai, final SpellAbility sa, final int defense, final int attack, final boolean mandatory,
|
||||||
|
|||||||
@@ -131,7 +131,7 @@ public class PumpAllAi extends PumpAiBase {
|
|||||||
boolean result = ai.getCreaturesInPlay().anyMatch(c -> c.isValid(valid, source.getController(), source, sa)
|
boolean result = ai.getCreaturesInPlay().anyMatch(c -> c.isValid(valid, source.getController(), source, sa)
|
||||||
&& ComputerUtilCard.shouldPumpCard(ai, sa, c, defense, power, keywords));
|
&& ComputerUtilCard.shouldPumpCard(ai, sa, c, defense, power, keywords));
|
||||||
return result ? new AiAbilityDecision(100, AiPlayDecision.WillPlay) : new AiAbilityDecision(0, AiPlayDecision.CantPlayAi);
|
return result ? new AiAbilityDecision(100, AiPlayDecision.WillPlay) : new AiAbilityDecision(0, AiPlayDecision.CantPlayAi);
|
||||||
} // pumpAllCanPlayAI()
|
}
|
||||||
|
|
||||||
@Override
|
@Override
|
||||||
public AiAbilityDecision chkDrawback(SpellAbility sa, Player aiPlayer) {
|
public AiAbilityDecision chkDrawback(SpellAbility sa, Player aiPlayer) {
|
||||||
|
|||||||
@@ -3,7 +3,7 @@ ManaCost:B
|
|||||||
Types:Instant
|
Types:Instant
|
||||||
A:SP$ Animate | Triggers$ TrigChangeZone | ValidTgts$ Creature.YouCtrl | TgtPrompt$ Select target creature you control | SpellDescription$ Until end of turn, target creature you control gains "When this creature dies, return it to the battlefield tapped under its owner's control, then create a Wicked Role token attached to it." (Enchanted creature gets +1/+1. When this Aura is put into a graveyard, each opponent loses 1 life.)
|
A:SP$ Animate | Triggers$ TrigChangeZone | ValidTgts$ Creature.YouCtrl | TgtPrompt$ Select target creature you control | SpellDescription$ Until end of turn, target creature you control gains "When this creature dies, return it to the battlefield tapped under its owner's control, then create a Wicked Role token attached to it." (Enchanted creature gets +1/+1. When this Aura is put into a graveyard, each opponent loses 1 life.)
|
||||||
SVar:TrigChangeZone:Mode$ ChangesZone | Origin$ Battlefield | Destination$ Graveyard | ValidCard$ Card.Self | Execute$ TrigChangeZone2 | TriggerController$ TriggeredCardController | TriggerDescription$ When this creature dies, return it to the battlefield tapped under its owner's control, then create a Wicked Role token attached to it. (Enchanted creature gets +1/+1. When this Aura is put into a graveyard, each opponent loses 1 life.)
|
SVar:TrigChangeZone:Mode$ ChangesZone | Origin$ Battlefield | Destination$ Graveyard | ValidCard$ Card.Self | Execute$ TrigChangeZone2 | TriggerController$ TriggeredCardController | TriggerDescription$ When this creature dies, return it to the battlefield tapped under its owner's control, then create a Wicked Role token attached to it. (Enchanted creature gets +1/+1. When this Aura is put into a graveyard, each opponent loses 1 life.)
|
||||||
SVar:TrigChangeZone2:DB$ ChangeZone | Origin$ Graveyard | Destination$ Battlefield | Defined$ TriggeredNewCardLKICopy | SubAbility$ DBToken
|
SVar:TrigChangeZone2:DB$ ChangeZone | Origin$ Graveyard | Destination$ Battlefield | Defined$ TriggeredNewCardLKICopy | Tapped$ True | SubAbility$ DBToken
|
||||||
SVar:DBToken:DB$ Token | TokenAmount$ 1 | TokenScript$ role_wicked | TokenOwner$ You | AttachedTo$ TriggeredNewCardLKICopy
|
SVar:DBToken:DB$ Token | TokenAmount$ 1 | TokenScript$ role_wicked | TokenOwner$ You | AttachedTo$ TriggeredNewCardLKICopy
|
||||||
DeckHas:Ability$Token & Type$Role|Aura
|
DeckHas:Ability$Token & Type$Role|Aura
|
||||||
Oracle:Until end of turn, target creature you control gains "When this creature dies, return it to the battlefield tapped under its owner's control, then create a Wicked Role token attached to it." (Enchanted creature gets +1/+1. When this Aura is put into a graveyard, each opponent loses 1 life.)
|
Oracle:Until end of turn, target creature you control gains "When this creature dies, return it to the battlefield tapped under its owner's control, then create a Wicked Role token attached to it." (Enchanted creature gets +1/+1. When this Aura is put into a graveyard, each opponent loses 1 life.)
|
||||||
|
|||||||
@@ -10,7 +10,7 @@ SVar:DBPutCounters:DB$ PutCounter | ETB$ True | Defined$ Self | CounterType$ P1P
|
|||||||
SVar:DBCleanup:DB$ Cleanup | ClearRemembered$ True
|
SVar:DBCleanup:DB$ Cleanup | ClearRemembered$ True
|
||||||
T:Mode$ ChangesZone | Origin$ Battlefield | Destination$ Graveyard | ValidCard$ Card.Self | Execute$ TrigPutCounter | TriggerDescription$ When NICKNAME dies, put its counters on target creature you control, then shuffle this card into its owner's library.
|
T:Mode$ ChangesZone | Origin$ Battlefield | Destination$ Graveyard | ValidCard$ Card.Self | Execute$ TrigPutCounter | TriggerDescription$ When NICKNAME dies, put its counters on target creature you control, then shuffle this card into its owner's library.
|
||||||
SVar:TrigPutCounter:DB$ PutCounter | ValidTgts$ Creature.YouCtrl | TgtPrompt$ Select target creature you control | CounterType$ EachFromSource | EachFromSource$ TriggeredCardLKICopy | SubAbility$ DBChangeZone
|
SVar:TrigPutCounter:DB$ PutCounter | ValidTgts$ Creature.YouCtrl | TgtPrompt$ Select target creature you control | CounterType$ EachFromSource | EachFromSource$ TriggeredCardLKICopy | SubAbility$ DBChangeZone
|
||||||
SVar:DBChangeZone:DB$ ChangeZone | Defined$ Self | Origin$ Graveyard | Destination$ Library | LibraryPosition$ 0 | Shuffle$ True
|
SVar:DBChangeZone:DB$ ChangeZone | Defined$ TriggeredNewCardLKICopy | Origin$ Graveyard | Destination$ Library | LibraryPosition$ 0 | Shuffle$ True
|
||||||
SVar:X:Count$RememberedNumber/Times.2
|
SVar:X:Count$RememberedNumber/Times.2
|
||||||
DeckHas:Ability$Counters
|
DeckHas:Ability$Counters
|
||||||
Oracle:Flying, trample\nAs Sin enters, remove all counters from any number of artifacts, creatures, and enchantments. Sin enters with X +1/+1 counters on it, where X is twice the number of counters removed this way.\nWhen Sin dies, put its counters on target creature you control, then shuffle this card into its owner's library.
|
Oracle:Flying, trample\nAs Sin enters, remove all counters from any number of artifacts, creatures, and enchantments. Sin enters with X +1/+1 counters on it, where X is twice the number of counters removed this way.\nWhen Sin dies, put its counters on target creature you control, then shuffle this card into its owner's library.
|
||||||
|
|||||||
Reference in New Issue
Block a user