mirror of
https://github.com/Card-Forge/forge.git
synced 2025-11-18 19:58:00 +00:00
- Renamed two cards to match the current standard.
- Implemented basic AI playability of AssignGroup (Friend/Foe) cards based on NeedsToPlayVar. - Will need separate AI logic for different cases to improve further (can be tested in canPlayAI).
This commit is contained in:
@@ -11,8 +11,11 @@ import forge.game.spellability.SpellAbility;
|
||||
|
||||
public class AssignGroupAi extends SpellAbilityAi {
|
||||
|
||||
public AssignGroupAi() {
|
||||
// TODO Auto-generated constructor stub
|
||||
protected boolean canPlayAI(Player ai, SpellAbility sa) {
|
||||
// TODO: Currently this AI relies on the card-specific limiting hints (NeedsToPlay / NeedsToPlayVar),
|
||||
// otherwise the AI considers the card playable.
|
||||
|
||||
return true;
|
||||
}
|
||||
|
||||
public SpellAbility chooseSingleSpellAbility(Player player, SpellAbility sa, List<SpellAbility> spells, Map<String, Object> params) {
|
||||
|
||||
@@ -4,5 +4,11 @@ Types:Sorcery
|
||||
A:SP$ AssignGroup | Cost$ 3 G | Defined$ Player | Choices$ DBSearch,DBSacrifice | AILogic$ FriendOrFoe | SpellDescription$ For each player, choose friend or foe. Each friend searches their library for a land card, puts it onto the battlefield tapped, then shuffles their library. Each foe sacrifices an artifact or enchantment they control.
|
||||
SVar:DBSearch:DB$ChangeZone | Origin$ Library | Destination$ Battlefield | DefinedPlayer$ Remembered | ChangeType$ Land | ChangeNum$ 1 | StackDescription$ Each friend searches their library for a land card, puts it onto the battlefield tapped, then shuffles their library. | SpellDescription$ Friend searches their library for a land card, puts it onto the battlefield tapped, then shuffles their library.
|
||||
SVar:DBSacrifice:DB$Sacrifice | Defined$ Remembered | SacValid$ Artifact,Enchantment | SacMessage$ artifact or enchantment | StackDescription$ Each foe sacrifices an artifact or enchantment they control. | SpellDescription$ Foe sacrifices an artifact or enchantment they control.
|
||||
SVar:NeedsToPlayVar:Z GE1
|
||||
SVar:Z:SVar$Z1/Plus.C1
|
||||
SVar:Z1:SVar$C2/Plus.C3
|
||||
SVar:C1:Count$Valid Land.YourTeamCtrl+inZoneLibrary
|
||||
SVar:C2:Count$Valid Enchantment.OppCtrl+inZoneBattlefield
|
||||
SVar:C3:Count$Valid Artifact.OppCtrl+inZoneBattlefield
|
||||
SVar:Picture:http://www.wizards.com/global/images/magic/general/pirs_whim.jpg
|
||||
Oracle:For each player, choose friend or foe. Each friend searches their library for a land card, puts it onto the battlefield tapped, then shuffles their library. Each foe sacrifices an artifact or enchantment they control.
|
||||
|
||||
@@ -10,6 +10,9 @@ SVar:DBChoose:DB$ ChooseCard | Defined$ Remembered | Amount$ 1 | Choices$ Creatu
|
||||
SVar:DBImprint:DB$ Pump | ImprintCards$ Valid Creature.IsNotRemembered+RememberedPlayerCtrl
|
||||
SVar:DBTapAll:DB$ TapAll | ValidCards$ Creature.IsImprinted | SubAbility$ DBCleanup
|
||||
SVar:DBCleanup:DB$ Cleanup | ClearRemembered$ True | ClearChosenCard$ True
|
||||
SVar:RemAIDeck:True
|
||||
SVar:NeedsToPlayVar:Z GE3
|
||||
SVar:Z:SVar$Z1/Plus.Z2
|
||||
SVar:Z1:Count$Valid Creature.YourTeamCtrl+inZoneBattlefield
|
||||
SVar:Z2:Count$Valid Creature.OppCtrl+inZoneBattlefield+untapped
|
||||
SVar:Picture:http://www.wizards.com/global/images/magic/general/regna_sanction.jpg
|
||||
Oracle:For each player, choose friend or foe. Each friend puts a +1/+1 counter on each creature they control. Each foe chooses one untapped creature they control, then taps the rest.
|
||||
@@ -8,6 +8,9 @@ SVar:FoeRepeat:DB$ RepeatEach | Cost$ U | RepeatPlayers$ Remembered | RepeatSubA
|
||||
SVar:PlayChoose:DB$ ChooseCard | Defined$ Player.IsRemembered | Choices$ Creature.RememberedPlayerCtrl | Amount$ 1 | Mandatory$ True | AILogic$ WorstCard | ChoiceTitle$ Choose a creature you control | RememberChosen$ True
|
||||
SVar:BounceAll:DB$ ChangeZoneAll | Origin$ Battlefield | Destination$ Hand | ChangeType$ Creature.IsRemembered | SubAbility$ DBCleanup
|
||||
SVar:DBCleanup:DB$ Cleanup | ClearRemembered$ True | ClearChosenCard$ True
|
||||
SVar:RemAIDeck:True
|
||||
SVar:NeedsToPlayVar:Z GE2
|
||||
SVar:Z:SVar$Z1/Plus.Z2
|
||||
SVar:Z1:Count$Valid Creature.YourTeamCtrl+inZoneBattlefield
|
||||
SVar:Z2:Count$Valid Creature.OppCtrl+inZoneBattlefield
|
||||
SVar:Picture:http://www.wizards.com/global/images/magic/general/zndrsplt_judgment.jpg
|
||||
Oracle:For each player, choose friend or foe. Each friend creates a token that's a copy of a creature they control. Each foe returns a creature they control to its owner's hand.
|
||||
Reference in New Issue
Block a user