mirror of
https://github.com/Card-Forge/forge.git
synced 2025-11-19 20:28:00 +00:00
- Updated AI of some more cards with ChooseColor effects.
This commit is contained in:
@@ -9,6 +9,7 @@ import forge.game.phase.PhaseHandler;
|
|||||||
import forge.game.phase.PhaseType;
|
import forge.game.phase.PhaseType;
|
||||||
import forge.game.player.Player;
|
import forge.game.player.Player;
|
||||||
import forge.game.spellability.SpellAbility;
|
import forge.game.spellability.SpellAbility;
|
||||||
|
import forge.game.zone.ZoneType;
|
||||||
import forge.util.MyRandom;
|
import forge.util.MyRandom;
|
||||||
|
|
||||||
public class ChooseColorAi extends SpellAbilityAi {
|
public class ChooseColorAi extends SpellAbilityAi {
|
||||||
@@ -36,6 +37,14 @@ public class ChooseColorAi extends SpellAbilityAi {
|
|||||||
source.setSVar("PayX", Integer.toString(x));
|
source.setSVar("PayX", Integer.toString(x));
|
||||||
return true;
|
return true;
|
||||||
}
|
}
|
||||||
|
|
||||||
|
if ("Addle".equals(sa.getHostCard().getName())) {
|
||||||
|
PhaseHandler ph = game.getPhaseHandler();
|
||||||
|
if (ph.getPhase().isBefore(PhaseType.COMBAT_DECLARE_ATTACKERS) || ai.getOpponent().getCardsIn(ZoneType.Hand).isEmpty()) {
|
||||||
|
return false;
|
||||||
|
}
|
||||||
|
return true;
|
||||||
|
}
|
||||||
boolean chance = MyRandom.getRandom().nextFloat() <= Math.pow(.6667, sa.getActivationsThisTurn());
|
boolean chance = MyRandom.getRandom().nextFloat() <= Math.pow(.6667, sa.getActivationsThisTurn());
|
||||||
return chance;
|
return chance;
|
||||||
}
|
}
|
||||||
|
|||||||
@@ -3,5 +3,6 @@ ManaCost:2 W
|
|||||||
Types:Instant
|
Types:Instant
|
||||||
A:SP$ PumpAll | Cost$ 2 W | ValidCards$ Creature.YouCtrl | NumDef$ +2 | SubAbility$ ChooseColor | SpellDescription$ Creatures you control get +0/+2 until end of turn. Threshold - If seven or more cards are in your graveyard, choose a color. Creatures you control also gain protection from the chosen color until end of turn.
|
A:SP$ PumpAll | Cost$ 2 W | ValidCards$ Creature.YouCtrl | NumDef$ +2 | SubAbility$ ChooseColor | SpellDescription$ Creatures you control get +0/+2 until end of turn. Threshold - If seven or more cards are in your graveyard, choose a color. Creatures you control also gain protection from the chosen color until end of turn.
|
||||||
SVar:ChooseColor:DB$ ProtectionAll | Condition$ Threshold | ValidCards$ Creature.YouCtrl | Gains$ Choice | Choices$ AnyColor
|
SVar:ChooseColor:DB$ ProtectionAll | Condition$ Threshold | ValidCards$ Creature.YouCtrl | Gains$ Choice | Choices$ AnyColor
|
||||||
|
SVar:RemAIDeck:True
|
||||||
SVar:Picture:http://www.wizards.com/global/images/magic/general/aven_warcraft.jpg
|
SVar:Picture:http://www.wizards.com/global/images/magic/general/aven_warcraft.jpg
|
||||||
Oracle:Creatures you control get +0/+2 until end of turn.\nThreshold - If seven or more cards are in your graveyard, choose a color. Creatures you control also gain protection from the chosen color until end of turn.
|
Oracle:Creatures you control get +0/+2 until end of turn.\nThreshold - If seven or more cards are in your graveyard, choose a color. Creatures you control also gain protection from the chosen color until end of turn.
|
||||||
|
|||||||
@@ -4,7 +4,7 @@ Types:Enchantment Aura
|
|||||||
K:Enchant creature
|
K:Enchant creature
|
||||||
A:SP$ Attach | Cost$ 1 W U | ValidTgts$ Creature | AILogic$ Pump
|
A:SP$ Attach | Cost$ 1 W U | ValidTgts$ Creature | AILogic$ Pump
|
||||||
K:ETBReplacement:Other:ChooseColor
|
K:ETBReplacement:Other:ChooseColor
|
||||||
SVar:ChooseColor:DB$ ChooseColor | Defined$ You | SpellDescription$ As CARDNAME enters the battlefield, choose a color.
|
SVar:ChooseColor:DB$ ChooseColor | Defined$ You | AILogic$ MostProminentInHumanDeck | SpellDescription$ As CARDNAME enters the battlefield, choose a color.
|
||||||
K:etbCounter:SLEIGHT:1
|
K:etbCounter:SLEIGHT:1
|
||||||
S:Mode$ PreventDamage | Target$ Creature.EnchantedBy | Source$ Card.ChosenColor | Description$ Prevent all damage that would be dealt to enchanted creature by sources of the last chosen color.
|
S:Mode$ PreventDamage | Target$ Creature.EnchantedBy | Source$ Card.ChosenColor | Description$ Prevent all damage that would be dealt to enchanted creature by sources of the last chosen color.
|
||||||
A:AB$ PutCounter | Cost$ X | Defined$ Self | CounterType$ SLEIGHT | CounterNum$ 1 | SubAbility$ ChooseColor | References$ X | SpellDescription$ Put a sleight counter on CARDNAME and choose a color. X is the number of sleight counters on CARDNAME.
|
A:AB$ PutCounter | Cost$ X | Defined$ Self | CounterType$ SLEIGHT | CounterNum$ 1 | SubAbility$ ChooseColor | References$ X | SpellDescription$ Put a sleight counter on CARDNAME and choose a color. X is the number of sleight counters on CARDNAME.
|
||||||
|
|||||||
@@ -3,8 +3,7 @@ ManaCost:2
|
|||||||
Types:Snow Artifact
|
Types:Snow Artifact
|
||||||
K:CARDNAME enters the battlefield tapped.
|
K:CARDNAME enters the battlefield tapped.
|
||||||
K:ETBReplacement:Other:ChooseColor
|
K:ETBReplacement:Other:ChooseColor
|
||||||
SVar:ChooseColor:DB$ ChooseColor | Defined$ You | SpellDescription$ As CARDNAME enters the battlefield, choose a color.
|
SVar:ChooseColor:DB$ ChooseColor | Defined$ You | AILogic$ MostProminentInComputerDeck | SpellDescription$ As CARDNAME enters the battlefield, choose a color.
|
||||||
A:AB$ Mana | Cost$ T | Produced$ Chosen | SpellDescription$ Add one mana of the chosen color to your mana pool.
|
A:AB$ Mana | Cost$ T | Produced$ Chosen | SpellDescription$ Add one mana of the chosen color to your mana pool.
|
||||||
SVar:RemAIDeck:True
|
|
||||||
SVar:Picture:http://www.wizards.com/global/images/magic/general/coldsteel_heart.jpg
|
SVar:Picture:http://www.wizards.com/global/images/magic/general/coldsteel_heart.jpg
|
||||||
Oracle:Coldsteel Heart enters the battlefield tapped.\nAs Coldsteel Heart enters the battlefield, choose a color.\n{T}: Add one mana of the chosen color to your mana pool.
|
Oracle:Coldsteel Heart enters the battlefield tapped.\nAs Coldsteel Heart enters the battlefield, choose a color.\n{T}: Add one mana of the chosen color to your mana pool.
|
||||||
|
|||||||
@@ -5,5 +5,6 @@ K:ETBReplacement:Other:ChooseColor
|
|||||||
SVar:ChooseColor:DB$ ChooseColor | Defined$ You | SpellDescription$ As CARDNAME enters the battlefield, choose a color. | AILogic$ MostProminentInHumanDeck
|
SVar:ChooseColor:DB$ ChooseColor | Defined$ You | SpellDescription$ As CARDNAME enters the battlefield, choose a color. | AILogic$ MostProminentInHumanDeck
|
||||||
T:Mode$ SpellCast | ValidCard$ Card.ChosenColor | TriggerZones$ Battlefield | Execute$ TrigLoseLife | TriggerDescription$ Whenever a player casts a spell of the chosen color, that player loses 1 life.
|
T:Mode$ SpellCast | ValidCard$ Card.ChosenColor | TriggerZones$ Battlefield | Execute$ TrigLoseLife | TriggerDescription$ Whenever a player casts a spell of the chosen color, that player loses 1 life.
|
||||||
SVar:TrigLoseLife:AB$LoseLife | Cost$ 0 | Defined$ TriggeredActivator | LifeAmount$ 1
|
SVar:TrigLoseLife:AB$LoseLife | Cost$ 0 | Defined$ TriggeredActivator | LifeAmount$ 1
|
||||||
|
SVar:RemRandomDeck:True
|
||||||
SVar:Picture:http://www.wizards.com/global/images/magic/general/curse_of_wizardry.jpg
|
SVar:Picture:http://www.wizards.com/global/images/magic/general/curse_of_wizardry.jpg
|
||||||
Oracle:As Curse of Wizardry enters the battlefield, choose a color.\nWhenever a player casts a spell of the chosen color, that player loses 1 life.
|
Oracle:As Curse of Wizardry enters the battlefield, choose a color.\nWhenever a player casts a spell of the chosen color, that player loses 1 life.
|
||||||
|
|||||||
@@ -6,5 +6,6 @@ SVar:TrigChoose:AB$ ChooseColor | Cost$ 0 | Defined$ TriggeredPlayer | AILogic$
|
|||||||
SVar:DBEffect:DB$ Effect | ReplacementEffects$ ReplaceChosen | SVars$ ProduceChosen
|
SVar:DBEffect:DB$ Effect | ReplacementEffects$ ReplaceChosen | SVars$ ProduceChosen
|
||||||
SVar:ReplaceChosen:Event$ ProduceMana | ActiveZones$ Command | ValidCard$ Land | ManaReplacement$ ProduceChosen | Description$ Lands tapped for mana produce mana of the chosen color instead of any other color.
|
SVar:ReplaceChosen:Event$ ProduceMana | ActiveZones$ Command | ValidCard$ Land | ManaReplacement$ ProduceChosen | Description$ Lands tapped for mana produce mana of the chosen color instead of any other color.
|
||||||
SVar:ProduceChosen:Colorless->Chosen & U->Chosen & B->Chosen & R->Chosen & G->Chosen & W->Chosen
|
SVar:ProduceChosen:Colorless->Chosen & U->Chosen & B->Chosen & R->Chosen & G->Chosen & W->Chosen
|
||||||
|
SVar:RemRandomDeck:True
|
||||||
SVar:Picture:http://www.wizards.com/global/images/magic/general/hall_of_gemstone.jpg
|
SVar:Picture:http://www.wizards.com/global/images/magic/general/hall_of_gemstone.jpg
|
||||||
Oracle:At the beginning of each player's upkeep, that player chooses a color. Until end of turn, lands tapped for mana produce mana of the chosen color instead of any other color.
|
Oracle:At the beginning of each player's upkeep, that player chooses a color. Until end of turn, lands tapped for mana produce mana of the chosen color instead of any other color.
|
||||||
|
|||||||
@@ -2,11 +2,10 @@ Name:Harsh Judgment
|
|||||||
ManaCost:2 W W
|
ManaCost:2 W W
|
||||||
Types:Enchantment
|
Types:Enchantment
|
||||||
K:ETBReplacement:Other:ChooseColor
|
K:ETBReplacement:Other:ChooseColor
|
||||||
SVar:ChooseColor:DB$ ChooseColor | Defined$ You | SpellDescription$ As CARDNAME enters the battlefield, choose a color. | AILogic$ MostProminentInHumanDeck
|
SVar:ChooseColor:DB$ ChooseColor | Defined$ You | AILogic$ MostProminentInHumanDeck | SpellDescription$ As CARDNAME enters the battlefield, choose a color.
|
||||||
R:Event$ DamageDone | ValidTarget$ You | ActiveZones$ Battlefield | ValidSource$ Instant.ChosenColor,Sorcery.ChosenColor | IsCombat$ False | ReplaceWith$ HarshDmg | Description$ If an instant or sorcery spell of the chosen color would deal damage to you, it deals that damage to its controller instead.
|
R:Event$ DamageDone | ValidTarget$ You | ActiveZones$ Battlefield | ValidSource$ Instant.ChosenColor,Sorcery.ChosenColor | IsCombat$ False | ReplaceWith$ HarshDmg | Description$ If an instant or sorcery spell of the chosen color would deal damage to you, it deals that damage to its controller instead.
|
||||||
SVar:HarshDmg:AB$ DealDamage | Cost$ 0 | Defined$ ReplacedSourceController | DamageSource$ ReplacedSource | NumDmg$ HarshX | References$ HarshX
|
SVar:HarshDmg:AB$ DealDamage | Cost$ 0 | Defined$ ReplacedSourceController | DamageSource$ ReplacedSource | NumDmg$ HarshX | References$ HarshX
|
||||||
SVar:HarshX:ReplaceCount$DamageAmount
|
SVar:HarshX:ReplaceCount$DamageAmount
|
||||||
SVar:RemRandomDeck:True
|
SVar:RemRandomDeck:True
|
||||||
SVar:RemAIDeck:True
|
|
||||||
SVar:Picture:http://www.wizards.com/global/images/magic/general/harsh_judgment.jpg
|
SVar:Picture:http://www.wizards.com/global/images/magic/general/harsh_judgment.jpg
|
||||||
Oracle:As Harsh Judgment enters the battlefield, choose a color.\nIf an instant or sorcery spell of the chosen color would deal damage to you, it deals that damage to its controller instead.
|
Oracle:As Harsh Judgment enters the battlefield, choose a color.\nIf an instant or sorcery spell of the chosen color would deal damage to you, it deals that damage to its controller instead.
|
||||||
|
|||||||
Reference in New Issue
Block a user