mirror of
https://github.com/Card-Forge/forge.git
synced 2025-11-19 12:18:00 +00:00
- Little CanPlayAI updates.
This commit is contained in:
@@ -5,7 +5,7 @@ Text:no text
|
|||||||
T:Mode$ Phase | Phase$ Upkeep | ValidPlayer$ You | Execute$ TrigSacUnless | TriggerZones$ Battlefield | TriggerDescription$ At the beginning of your upkeep, sacrifice CARDNAME unless you sacrifice a land.
|
T:Mode$ Phase | Phase$ Upkeep | ValidPlayer$ You | Execute$ TrigSacUnless | TriggerZones$ Battlefield | TriggerDescription$ At the beginning of your upkeep, sacrifice CARDNAME unless you sacrifice a land.
|
||||||
SVar:TrigSacUnless:AB$ Sacrifice | Cost$ 0 | Defined$ Self | UnlessCost$ Sac<1/Land> | UnlessPayer$ You
|
SVar:TrigSacUnless:AB$ Sacrifice | Cost$ 0 | Defined$ Self | UnlessCost$ Sac<1/Land> | UnlessPayer$ You
|
||||||
S:Mode$ CantPlayLand | Description$ Players can't play lands.
|
S:Mode$ CantPlayLand | Description$ Players can't play lands.
|
||||||
SVar:RemAIDeck:True
|
SVar:RemRandomDeck:True
|
||||||
SVar:Rarity:Rare
|
SVar:Rarity:Rare
|
||||||
SVar:Picture:http://www.wizards.com/global/images/magic/general/territorial_dispute.jpg
|
SVar:Picture:http://www.wizards.com/global/images/magic/general/territorial_dispute.jpg
|
||||||
SetInfo:MMQ|Rare|http://magiccards.info/scans/en/mm/217.jpg
|
SetInfo:MMQ|Rare|http://magiccards.info/scans/en/mm/217.jpg
|
||||||
|
|||||||
@@ -102,6 +102,11 @@ public class DrawAi extends SpellAiLogic {
|
|||||||
&& !sa.hasParam("ActivationPhases")) {
|
&& !sa.hasParam("ActivationPhases")) {
|
||||||
return false;
|
return false;
|
||||||
}
|
}
|
||||||
|
if (!Singletons.getModel().getGame().getPhaseHandler().getNextTurn().equals(ai)
|
||||||
|
&& !sa.hasParam("PlayerTurn") && !AbilityFactory.isSorcerySpeed(sa)
|
||||||
|
&& ai.getCardsIn(ZoneType.Hand).size() < 2) {
|
||||||
|
return false;
|
||||||
|
}
|
||||||
|
|
||||||
// Don't tap creatures that may be able to block
|
// Don't tap creatures that may be able to block
|
||||||
if (ComputerUtil.waitForBlocking(sa)) {
|
if (ComputerUtil.waitForBlocking(sa)) {
|
||||||
|
|||||||
@@ -96,18 +96,19 @@ public class LifeGainAi extends SpellAiLogic {
|
|||||||
&& !sa.hasParam("ActivationPhases")) {
|
&& !sa.hasParam("ActivationPhases")) {
|
||||||
return false;
|
return false;
|
||||||
}
|
}
|
||||||
|
// Don't use lifegain before main 2 if possible
|
||||||
|
if (!lifeCritical && !Singletons.getModel().getGame().getPhaseHandler().getNextTurn().equals(ai)
|
||||||
|
&& !sa.hasParam("PlayerTurn") && !AbilityFactory.isSorcerySpeed(sa)) {
|
||||||
|
return false;
|
||||||
|
}
|
||||||
|
|
||||||
// Don't tap creatures that may be able to block
|
// Don't tap creatures that may be able to block
|
||||||
if (ComputerUtil.waitForBlocking(sa)) {
|
if (ComputerUtil.waitForBlocking(sa)) {
|
||||||
return false;
|
return false;
|
||||||
}
|
}
|
||||||
|
|
||||||
// TODO handle proper calculation of X values based on Cost and what
|
|
||||||
// would be paid
|
|
||||||
// final int amount = calculateAmount(af.getHostCard(), amountStr, sa);
|
|
||||||
|
|
||||||
// prevent run-away activations - first time will always return true
|
// prevent run-away activations - first time will always return true
|
||||||
final boolean chance = r.nextFloat() <= Math.pow(.6667, sa.getActivationsThisTurn());
|
final boolean chance = r.nextFloat() <= Math.pow(.9, sa.getActivationsThisTurn());
|
||||||
|
|
||||||
final Target tgt = sa.getTarget();
|
final Target tgt = sa.getTarget();
|
||||||
if (tgt != null) {
|
if (tgt != null) {
|
||||||
|
|||||||
Reference in New Issue
Block a user