mirror of
https://github.com/Card-Forge/forge.git
synced 2025-11-15 10:18:01 +00:00
Merge branch 'ai-spike2' into 'master'
AI Spike support, part 3. See merge request core-developers/forge!1177
This commit is contained in:
@@ -282,7 +282,7 @@ public class CountersPutAi extends SpellAbilityAi {
|
||||
if (!source.canTransform()) {
|
||||
return false;
|
||||
}
|
||||
} else if (logic.equals("MoveCounterSpike")) {
|
||||
} else if (logic.startsWith("MoveCounterSpike")) {
|
||||
return doMoveCounterSpikeLogic(ai, sa, ph);
|
||||
}
|
||||
|
||||
@@ -1009,8 +1009,9 @@ public class CountersPutAi extends SpellAbilityAi {
|
||||
// Spikes (Tempest)
|
||||
|
||||
// Try not to do it unless at the end of opponent's turn or the creature is threatened
|
||||
Combat combat = ai.getGame().getCombat();
|
||||
boolean threatened = ComputerUtil.predictThreatenedObjects(ai, null, true).contains(sa.getHostCard())
|
||||
final int creatDiff = sa.getParam("AILogic").contains("ExtraEff") ? 450 : 1;
|
||||
final Combat combat = ai.getGame().getCombat();
|
||||
final boolean threatened = ComputerUtil.predictThreatenedObjects(ai, null, true).contains(sa.getHostCard())
|
||||
|| (combat != null && combat.isBlocked(sa.getHostCard()) && ComputerUtilCombat.attackerWouldBeDestroyed(ai, sa.getHostCard(), combat));
|
||||
|
||||
if (!(threatened || (ph.is(PhaseType.END_OF_TURN) && ph.getNextTurn() == ai))) {
|
||||
@@ -1025,7 +1026,7 @@ public class CountersPutAi extends SpellAbilityAi {
|
||||
public boolean apply(Card card) {
|
||||
boolean tgtThreatened = ComputerUtil.predictThreatenedObjects(ai, null, true).contains(card) || (combat != null && combat.isBlocked(card) && ComputerUtilCombat.attackerWouldBeDestroyed(ai, card, combat));
|
||||
// when threatened, any non-threatened target is good to preserve the counter
|
||||
return !tgtThreatened && (threatened || ComputerUtilCard.evaluateCreature(card, false, false) > ComputerUtilCard.evaluateCreature(sa.getHostCard(), false, false) + 1);
|
||||
return !tgtThreatened && (threatened || ComputerUtilCard.evaluateCreature(card, false, false) > ComputerUtilCard.evaluateCreature(sa.getHostCard(), false, false) + creatDiff);
|
||||
}
|
||||
});
|
||||
|
||||
|
||||
@@ -3,7 +3,7 @@ ManaCost:3 G
|
||||
Types:Creature Spike
|
||||
PT:0/0
|
||||
K:etbCounter:P1P1:3
|
||||
A:AB$ PutCounter | Cost$ 2 SubCounter<1/P1P1> | ValidTgts$ Creature | CounterType$ P1P1 | CounterNum$ 1 | AILogic$ MoveCounterSpike | SpellDescription$ Put a +1/+1 counter on target creature.
|
||||
A:AB$ PutCounter | Cost$ 2 SubCounter<1/P1P1> | ValidTgts$ Creature | CounterType$ P1P1 | CounterNum$ 1 | AILogic$ MoveCounterSpike.ExtraEff | SpellDescription$ Put a +1/+1 counter on target creature.
|
||||
A:AB$ Token | Cost$ 2 SubCounter<1/P1P1> | TokenAmount$ 1 | TokenName$ Spike | TokenTypes$ Creature,Spike | TokenOwner$ You | TokenColors$ Green | TokenPower$ 1 | TokenToughness$ 1 | SpellDescription$ Create a 1/1 green Spike creature token.
|
||||
SVar:Picture:http://www.wizards.com/global/images/magic/general/spike_breeder.jpg
|
||||
Oracle:Spike Breeder enters the battlefield with three +1/+1 counters on it.\n{2}, Remove a +1/+1 counter from Spike Breeder: Put a +1/+1 counter on target creature.\n{2}, Remove a +1/+1 counter from Spike Breeder: Create a 1/1 green Spike creature token.
|
||||
|
||||
@@ -3,7 +3,7 @@ ManaCost:1 G G
|
||||
Types:Creature Spike
|
||||
PT:0/0
|
||||
K:etbCounter:P1P1:2
|
||||
A:AB$ PutCounter | Cost$ 2 SubCounter<1/P1P1> | ValidTgts$ Creature | CounterType$ P1P1 | CounterNum$ 1 | AILogic$ MoveCounterSpike | SpellDescription$ Put a +1/+1 counter on target creature.
|
||||
A:AB$ PutCounter | Cost$ 2 SubCounter<1/P1P1> | ValidTgts$ Creature | CounterType$ P1P1 | CounterNum$ 1 | AILogic$ MoveCounterSpike.ExtraEff | SpellDescription$ Put a +1/+1 counter on target creature.
|
||||
A:AB$ GainLife | Cost$ SubCounter<1/P1P1> | LifeAmount$ 2 | SpellDescription$ You gain 2 life.
|
||||
SVar:Picture:http://www.wizards.com/global/images/magic/general/spike_feeder.jpg
|
||||
Oracle:Spike Feeder enters the battlefield with two +1/+1 counters on it.\n{2}, Remove a +1/+1 counter from Spike Feeder: Put a +1/+1 counter on target creature.\nRemove a +1/+1 counter from Spike Feeder: You gain 2 life.
|
||||
|
||||
@@ -3,7 +3,7 @@ ManaCost:6 G
|
||||
Types:Creature Spike
|
||||
PT:0/0
|
||||
K:etbCounter:P1P1:6
|
||||
A:AB$ PutCounter | Cost$ 2 SubCounter<1/P1P1> | ValidTgts$ Creature | CounterType$ P1P1 | CounterNum$ 1 | AILogic$ MoveCounterSpike | SpellDescription$ Put a +1/+1 counter on target creature.
|
||||
A:AB$ PutCounter | Cost$ 2 SubCounter<1/P1P1> | ValidTgts$ Creature | CounterType$ P1P1 | CounterNum$ 1 | AILogic$ MoveCounterSpike.ExtraEff | SpellDescription$ Put a +1/+1 counter on target creature.
|
||||
A:AB$ Regenerate | Cost$ 1 SubCounter<1/P1P1> | SpellDescription$ Regenerate Spike Hatcher.
|
||||
SVar:Picture:http://www.wizards.com/global/images/magic/general/spike_hatcher.jpg
|
||||
Oracle:Spike Hatcher enters the battlefield with six +1/+1 counters on it.\n{2}, Remove a +1/+1 counter from Spike Hatcher: Put a +1/+1 counter on target creature.\n{1}, Remove a +1/+1 counter from Spike Hatcher: Regenerate Spike Hatcher.
|
||||
|
||||
@@ -3,7 +3,7 @@ ManaCost:2 G G
|
||||
Types:Creature Spike Soldier
|
||||
PT:0/0
|
||||
K:etbCounter:P1P1:3
|
||||
A:AB$ PutCounter | Cost$ 2 SubCounter<1/P1P1> | ValidTgts$ Creature | TgtPrompt$ Select target creature | CounterType$ P1P1 | CounterNum$ 1 | AILogic$ MoveCounterSpike | SpellDescription$ Put a +1/+1 counter on target creature.
|
||||
A:AB$ PutCounter | Cost$ 2 SubCounter<1/P1P1> | ValidTgts$ Creature | TgtPrompt$ Select target creature | CounterType$ P1P1 | CounterNum$ 1 | AILogic$ MoveCounterSpike.ExtraEff | SpellDescription$ Put a +1/+1 counter on target creature.
|
||||
A:AB$ Pump | Cost$ SubCounter<1/P1P1> | Defined$ Self | NumAtt$ 2 | NumDef$ 2 | SpellDescription$ CARDNAME gets +2/+2 until end of turn.
|
||||
SVar:Picture:http://www.wizards.com/global/images/magic/general/spike_soldier.jpg
|
||||
Oracle:Spike Soldier enters the battlefield with three +1/+1 counters on it.\n{2}, Remove a +1/+1 counter from Spike Soldier: Put a +1/+1 counter on target creature.\nRemove a +1/+1 counter from Spike Soldier: Spike Soldier gets +2/+2 until end of turn.
|
||||
|
||||
@@ -3,7 +3,7 @@ ManaCost:3 G G
|
||||
Types:Creature Spike
|
||||
PT:0/0
|
||||
K:etbCounter:P1P1:3
|
||||
A:AB$ PutCounter | Cost$ 2 SubCounter<1/P1P1> | ValidTgts$ Creature | TgtPrompt$ Select target creature | CounterType$ P1P1 | CounterNum$ 1 | AILogic$ MoveCounterSpike | SpellDescription$ Put a +1/+1 counter on target creature.
|
||||
A:AB$ PutCounter | Cost$ 2 SubCounter<1/P1P1> | ValidTgts$ Creature | TgtPrompt$ Select target creature | CounterType$ P1P1 | CounterNum$ 1 | AILogic$ MoveCounterSpike.ExtraEff | SpellDescription$ Put a +1/+1 counter on target creature.
|
||||
A:AB$ Animate | Cost$ 2 SubCounter<1/P1P1> | ValidTgts$ Land | TgtPrompt$ Choose target land. | Power$ 2 | Toughness$ 2 | Types$ Creature | Permanent$ True | SubAbility$ DBPutCounter | SpellDescription$ Target land becomes a 2/2 creature that's still a land. Put a +1/+1 counter on it.
|
||||
SVar:DBPutCounter:DB$PutCounter | Defined$ Targeted | CounterType$ P1P1 | CounterNum$ 1
|
||||
SVar:Picture:http://www.wizards.com/global/images/magic/general/spike_tiller.jpg
|
||||
|
||||
@@ -3,7 +3,7 @@ ManaCost:2 G G
|
||||
Types:Creature Spike
|
||||
PT:0/0
|
||||
K:etbCounter:P1P1:3
|
||||
A:AB$ PutCounter | Cost$ 2 SubCounter<1/P1P1> | ValidTgts$ Creature | CounterType$ P1P1 | CounterNum$ 1 | AILogic$ MoveCounterSpike | SpellDescription$ Put a +1/+1 counter on target creature.
|
||||
A:AB$ PutCounter | Cost$ 2 SubCounter<1/P1P1> | ValidTgts$ Creature | CounterType$ P1P1 | CounterNum$ 1 | AILogic$ MoveCounterSpike.ExtraEff | SpellDescription$ Put a +1/+1 counter on target creature.
|
||||
A:AB$ Fog | Cost$ 1 SubCounter<1/P1P1> | AILogic$ SeriousDamage | SpellDescription$ Prevent all combat damage that would be dealt this turn.
|
||||
SVar:Picture:http://www.wizards.com/global/images/magic/general/spike_weaver.jpg
|
||||
Oracle:Spike Weaver enters the battlefield with three +1/+1 counters on it.\n{2}, Remove a +1/+1 counter from Spike Weaver: Put a +1/+1 counter on target creature.\n{1}, Remove a +1/+1 counter from Spike Weaver: Prevent all combat damage that would be dealt this turn.
|
||||
|
||||
Reference in New Issue
Block a user