mirror of
https://github.com/Card-Forge/forge.git
synced 2025-11-19 04:08:01 +00:00
Merge branch 'AISpiritMirror' into 'master'
Ai spirit mirror See merge request core-developers/forge!223
This commit is contained in:
@@ -71,6 +71,28 @@ public class DestroyAi extends SpellAbilityAi {
|
||||
return false;
|
||||
}
|
||||
|
||||
// Ability that's intended to destroy own useless token to trigger Grave Pacts
|
||||
// should be fired at end of turn or when under attack after blocking to make opponent sac something
|
||||
boolean havepact = false;
|
||||
for (Card cardInPlay : ai.getGame().getCardsIn(ZoneType.Battlefield)) {
|
||||
if ((cardInPlay.getController().equals(ai))
|
||||
&& ("Grave Pact".equals(cardInPlay.getName()))) {
|
||||
havepact = true;
|
||||
}
|
||||
}
|
||||
if (("Pactivator".equals(logic)) && (havepact)) {
|
||||
if (
|
||||
(!ai.getGame().getPhaseHandler().isPlayerTurn(ai)) &&
|
||||
((ai.getGame().getPhaseHandler().is(PhaseType.END_OF_TURN))
|
||||
|| (ai.getGame().getPhaseHandler().is(PhaseType.COMBAT_DECLARE_BLOCKERS)))
|
||||
&&
|
||||
(ai.getOpponents().get(0).getCreaturesInPlay().size() > 0)
|
||||
) {
|
||||
ai.getController().chooseTargetsFor(sa);
|
||||
return true;
|
||||
}
|
||||
}
|
||||
|
||||
// Targeting
|
||||
if (abTgt != null) {
|
||||
sa.resetTargets();
|
||||
|
||||
@@ -3,6 +3,7 @@ ManaCost:3 B
|
||||
Types:Enchantment
|
||||
K:UpkeepCost:B B
|
||||
T:Mode$ Phase | Phase$ End of Turn | ValidPlayer$ You | TriggerZones$ Battlefield | Execute$ TrigToken | TriggerDescription$ At the beginning of your end step, create a 0/1 black Thrull creature token.
|
||||
SVar:TrigToken:DB$Token | TokenImage$ b 0 1 thrull | TokenName$ Thrull | TokenColors$ Black | TokenTypes$ Creature,Thrull | TokenPower$ 0 | TokenToughness$ 1 | TokenOwner$ You | TokenAmount$ 1
|
||||
SVar:TrigToken:DB$Token | TokenImage$ b 0 1 thrull | TokenName$ Thrull | TokenColors$ Black | TokenTypes$ Creature,Thrull | TokenPower$ 0 | TokenToughness$ 1 | TokenOwner$ You | TokenAmount$ 1 | TokenSVars$ PitSac
|
||||
SVar:PitSac:SVar:SacMe:1
|
||||
SVar:Picture:http://www.wizards.com/global/images/magic/general/breeding_pit.jpg
|
||||
Oracle:At the beginning of your upkeep, sacrifice Breeding Pit unless you pay {B}{B}.\nAt the beginning of your end step, create a 0/1 black Thrull creature token.
|
||||
|
||||
@@ -2,7 +2,8 @@ Name:Spirit Mirror
|
||||
ManaCost:2 W W
|
||||
Types:Enchantment
|
||||
T:Mode$ Phase | Phase$ Upkeep | ValidPlayer$ You | TriggerZones$ Battlefield | IsPresent$ Reflection.token | PresentCompare$ EQ0 | Execute$ TrigToken | TriggerDescription$ At the beginning of your upkeep, if there are no Reflection tokens on the battlefield, create a 2/2 white Reflection creature token.
|
||||
SVar:TrigToken:DB$Token | TokenAmount$ 1 | TokenName$ Reflection | TokenTypes$ Creature,Reflection | TokenOwner$ You | TokenColors$ White | TokenPower$ 2 | TokenToughness$ 2
|
||||
A:AB$ Destroy | Cost$ 0 | ValidTgts$ Reflection | TgtPrompt$ Select target Reflection | SpellDescription$ Destroy target Reflection.
|
||||
SVar:TrigToken:DB$Token | TokenAmount$ 1 | TokenName$ Reflection | TokenTypes$ Creature,Reflection | TokenOwner$ You | TokenColors$ White | TokenPower$ 2 | TokenToughness$ 2 | TokenSVars$ ReflectionSac
|
||||
A:AB$ Destroy | Cost$ 0 | ValidTgts$ Reflection | TgtPrompt$ Select target Reflection | AILogic$ Pactivator| SpellDescription$ Destroy target Reflection.
|
||||
SVar:ReflectionSac:SVar:SacMe:2
|
||||
SVar:Picture:http://www.wizards.com/global/images/magic/general/spirit_mirror.jpg
|
||||
Oracle:At the beginning of your upkeep, if there are no Reflection tokens on the battlefield, create a 2/2 white Reflection creature token.\n{0}: Destroy target Reflection.
|
||||
|
||||
Reference in New Issue
Block a user