- Basic AI for AF Learn

- Some minor tweaks and fixes for AF Learn
This commit is contained in:
Hans Mackowiak
2021-04-07 05:11:55 +00:00
committed by Michael Kamensky
parent 5b77205b77
commit 0627d37f69
36 changed files with 382 additions and 17 deletions

View File

@@ -0,0 +1,7 @@
Name:Academic Dispute
ManaCost:R
Types:Instant
A:SP$ Pump | ValidTgts$ Creature | TgtPrompt$ Select target creature | KW$ HIDDEN CARDNAME blocks each combat if able. | SubAbility$ DBPump | StackDescription$ SpellDescription | SpellDescription$ Target creature blocks this turn if able.
SVar:DBPump:DB$ Pump | Defined$ Targeted | KW$ Reach | OptionQuestion$ Do you want TARGETS to gain reach? | SubAbility$ DBLearn | StackDescription$ SpellDescription | SpellDescription$ You may have it gain reach until end of turn.
SVar:DBLearn:DB$ Learn | SpellDescription$ Learn. (You may reveal a Lesson card you own from outside the game and put it into your hand, or discard a card to draw a card.)
Oracle:Target creature blocks this turn if able. You may have it gain reach until end of turn.\nLearn. (You may reveal a Lesson card you own from outside the game and put it into your hand, or discard a card to draw a card.)

View File

@@ -0,0 +1,6 @@
Name:Arcane Subtraction
ManaCost:1 U
Types:Instant
A:SP$ Pump | ValidTgts$ Creature | TgtPrompt$ Select target creature | NumAtt$ -4 | IsCurse$ True | SubAbility$ DBLearn | SpellDescription$ Target creature gets -4/-0 until end of turn.
SVar:DBLearn:DB$ Learn | SpellDescription$ Learn. (You may reveal a Lesson card you own from outside the game and put it into your hand, or discard a card to draw a card.)
Oracle:Target creature gets -4/-0 until end of turn.\nLearn. (You may reveal a Lesson card you own from outside the game and put it into your hand, or discard a card to draw a card.)

View File

@@ -0,0 +1,7 @@
Name:Cram Session
ManaCost:1 BG
Types:Sorcery
A:SP$ GainLife | LifeAmount$ 4 | Defined$ You | SubAbility$ DBLearn | SpellDescription$ You gain 4 life.
SVar:DBLearn:DB$ Learn | SpellDescription$ Learn. (You may reveal a Lesson card you own from outside the game and put it into your hand, or discard a card to draw a card.)
DeckHas:Ability$LifeGain
Oracle:You gain 4 life.\nLearn. (You may reveal a Lesson card you own from outside the game and put it into your hand, or discard a card to draw a card.)

View File

@@ -0,0 +1,6 @@
Name:Divide by Zero
ManaCost:2 U
Types:Instant
A:SP$ ChangeZone | ValidTgts$ Permanent.cmcGE1,Card.inZoneStack+cmcGE1 | TgtZone$ Stack,Battlefield | Origin$ Battlefield,Stack | Fizzle$ True | Destination$ Hand | SubAbility$ DBLearn | SpellDescription$ Return target spell or permanent with mana value 1 or greater to its owners hand.
SVar:DBLearn:DB$ Learn | SpellDescription$ Learn. (You may reveal a Lesson card you own from outside the game and put it into your hand, or discard a card to draw a card.)
Oracle:Return target spell or permanent with mana value 1 or greater to its owners hand.\nLearn. (You may reveal a Lesson card you own from outside the game and put it into your hand, or discard a card to draw a card.)

View File

@@ -0,0 +1,11 @@
Name:Dream Strix
ManaCost:2 U
Types:Creature Bird Ilusion
PT:2/2
K:Flying
T:Mode$ BecomesTarget | ValidTarget$ Card.Self | SourceType$ Spell | TriggerZones$ Battlefield | Execute$ TrigSac | TriggerDescription$ When CARDNAME becomes the target of a spell, sacrifice it.
SVar:TrigSac:DB$ Sacrifice | ValidCard$ Card.Self
T:Mode$ ChangesZone | Origin$ Battlefield | Destination$ Graveyard | ValidCard$ Card.Self | Execute$ TrigLearn | TriggerDescription$ When CARDNAME dies, learn. (You may reveal a Lesson card you own from outside the game and put it into your hand, or discard a card to draw a card.)
SVar:TrigLearn:DB$ Learn
DeckHas:Ability$Sacrifice
Oracle:Flying\nWhen Dream Strix becomes the target of a spell, sacrifice it.\nWhen Dream Strix dies, learn. (You may reveal a Lesson card you own from outside the game and put it into your hand, or discard a card to draw a card.)

View File

@@ -0,0 +1,6 @@
Name:Enthusiastic Study
ManaCost:2 R
Types:Instant
A:SP$ Pump | ValidTgts$ Creature | TgtPrompt$ Select target creature | NumAtt$ +3 | NumDef$ +1 | KW$ Trample | SubAbility$ DBLearn | SpellDescription$ Target creature gets +3/+1 and gains trample until end of turn.
SVar:DBLearn:DB$ Learn | SpellDescription$ Learn. (You may reveal a Lesson card you own from outside the game and put it into your hand, or discard a card to draw a card.)
Oracle:Target creature gets +3/+1 and gains trample until end of turn.\nLearn. (You may reveal a Lesson card you own from outside the game and put it into your hand, or discard a card to draw a card.)

View File

@@ -0,0 +1,9 @@
Name:Eyetwitch
ManaCost:B
Types:Creature Eye Bat
PT:1/1
K:Flying
T:Mode$ ChangesZone | Origin$ Battlefield | Destination$ Graveyard | ValidCard$ Card.Self | Execute$ TrigLearn | TriggerDescription$ When CARDNAME dies, learn. (You may reveal a Lesson card you own from outside the game and put it into your hand, or discard a card to draw a card.)
SVar:TrigLearn:DB$ Learn
SVar:SacMe:1
Oracle:Flying\nWhen Eyetwitch dies, learn. (You may reveal a Lesson card you own from outside the game and put it into your hand, or discard a card to draw a card.)

View File

@@ -0,0 +1,6 @@
Name:Field Trip
ManaCost:2 G
Types:Sorcery
A:SP$ ChangeZone | Origin$ Library | Destination$ Battlefield | Tapped$ True | ChangeType$ Land.Forest+Basic | ChangeNum$ 1 | SubAbility$ DBLearn | SpellDescription$ Search your library for a basic Forest card, put that card onto the battlefield tapped, then shuffle.
SVar:DBLearn:DB$ Learn | SpellDescription$ Learn. (You may reveal a Lesson card you own from outside the game and put it into your hand, or discard a card to draw a card.)
Oracle:Search your library for a basic Forest card, put that card onto the battlefield tapped, then shuffle.\nLearn. (You may reveal a Lesson card you own from outside the game and put it into your hand, or discard a card to draw a card.)

View File

@@ -0,0 +1,10 @@
Name:First Day of Class
ManaCost:1 R
Types:Instant
A:SP$ Effect | Triggers$ CreatureETB | SubAbility$ DBLearn | SpellDescription$ Whenever a creature enters the battlefield under your control this turn, put a +1/+1 counter on it and it gains haste until end of turn.
SVar:CreatureETB:Mode$ ChangesZone | Origin$ Any | Destination$ Battlefield | ValidCard$ Creature.YouCtrl | TriggerZones$ Command | Execute$ TrigPutCounter | TriggerDescription$ Whenever a creature enters the battlefield under your control this turn, put a +1/+1 counter on it and it gains haste until end of turn.
SVar:TrigPutCounter:DB$ PutCounter | Defined$ TriggeredCardLKICopy | CounterType$ P1P1 | SubAbility$ DBPump
SVar:DBPump:DB$ Pump | Defined$ TriggeredCard | KW$ Haste
SVar:DBLearn:DB$ Learn | SpellDescription$ Learn. (You may reveal a Lesson card you own from outside the game and put it into your hand, or discard a card to draw a card.)
DeckHas:Ability$Counters
Oracle:Whenever a creature enters the battlefield under your control this turn, put a +1/+1 counter on it and it gains haste until end of turn.\nLearn. (You may reveal a Lesson card you own from outside the game and put it into your hand, or discard a card to draw a card.)

View File

@@ -0,0 +1,8 @@
Name:Gnarled Professor
ManaCost:2 G G
Types:Creature Treefolk Druid
PT:5/4
K:Trample
T:Mode$ ChangesZone | Origin$ Any | Destination$ Battlefield | ValidCard$ Card.Self | Execute$ TrigLearn | TriggerDescription$ When CARDNAME enters the battlefield, learn. (You may reveal a Lesson card you own from outside the game and put it into your hand, or discard a card to draw a card.)
SVar:TrigLearn:DB$ Learn
Oracle:Trample\nWhen Gnarled Professor enters the battlefield, learn. (You may reveal a Lesson card you own from outside the game and put it into your hand, or discard a card to draw a card.)

View File

@@ -0,0 +1,7 @@
Name:Guiding Voice
ManaCost:W
Types:Sorcery
A:SP$ PutCounter | ValidTgts$ Creature | TgtPrompt$ Select target creature | CounterType$ P1P1 | CounterNum$ 1 | SubAbility$ DBLearn | SpellDescription$ Put a +1/+1 counter on target creature.
SVar:DBLearn:DB$ Learn | SpellDescription$ Learn. (You may reveal a Lesson card you own from outside the game and put it into your hand, or discard a card to draw a card.)
DeckHas:Ability$Counters
Oracle:Put a +1/+1 counter on target creature.\nLearn. (You may reveal a Lesson card you own from outside the game and put it into your hand, or discard a card to draw a card.)

View File

@@ -0,0 +1,7 @@
Name:Hunt for Specimens
ManaCost:1 B
Types:Sorcery
A:SP$ Token | TokenScript$ bg_1_1_pest_lifegain | SubAbility$ DBLearn | SpellDescription$ Create a 1/1 black and green Pest creature token with "When this creature dies, you gain 1 life."
SVar:DBLearn:DB$ Learn | SpellDescription$ Learn. (You may reveal a Lesson card you own from outside the game and put it into your hand, or discard a card to draw a card.)
DeckHas:Ability$Token & Ability$LifeGain
Oracle:Create a 1/1 black and green Pest creature token with "When this creature dies, you gain 1 life."\nLearn. (You may reveal a Lesson card you own from outside the game and put it into your hand, or discard a card to draw a card.)

View File

@@ -0,0 +1,6 @@
Name:Igneous Inspiration
ManaCost:2 R
Types:Sorcery
A:SP$ DealDamage | ValidTgts$ Creature,Player,Planeswalker | TgtPrompt$ Select any target | NumDmg$ 3 | SubAbility$ DBLearn | SpellDescription$ CARDNAME deals 3 damage to any target.
SVar:DBLearn:DB$ Learn | SpellDescription$ Learn. (You may reveal a Lesson card you own from outside the game and put it into your hand, or discard a card to draw a card.)
Oracle:Igneous Inspiration deals 3 damage to any target.\nLearn. (You may reveal a Lesson card you own from outside the game and put it into your hand, or discard a card to draw a card.)

View File

@@ -0,0 +1,9 @@
Name:Overgrown Arch
ManaCost:1 G
Types:Creature Plant Wall
PT:0/4
K:Defender
A:AB$ GainLife | Cost$ T | LifeAmount$ 1 | SpellDescription$ You gain 1 life.
A:AB$ Learn | Cost$ 2 Sac<1/CARDNAME> | SpellDescription$ Learn. (You may reveal a Lesson card you own from outside the game and put it into your hand, or discard a card to draw a card.)
DeckHas:Ability$LifeGain & Ability$Sacrifice
Oracle:Defender\n{T}: You gain 1 life.\n{2}, Sacrifice Overgrown Arch: Learn. (You may reveal a Lesson card you own from outside the game and put it into your hand, or discard a card to draw a card.)

View File

@@ -0,0 +1,8 @@
Name:Poet's Quill
ManaCost:1 B
Types:Artifact — Equipment
T:Mode$ ChangesZone | Origin$ Any | Destination$ Battlefield | ValidCard$ Card.Self | Execute$ TrigLearn | TriggerDescription$ When CARDNAME enters the battlefield, learn. (You may reveal a Lesson card you own from outside the game and put it into your hand, or discard a card to draw a card.)
SVar:TrigLearn:DB$ Learn
S:Mode$ Continuous | Affected$ Creature.EquippedBy | AddPower$ 1 | AddToughness$ 1 | AddKeyword$ Lifelink | Description$ Equipped creature gets +1/+1 and has lifelink.
K:Equip:1 B
Oracle:When Poet's Quill enters the battlefield, learn. (You may reveal a Lesson card you own from outside the game and put it into your hand, or discard a card to draw a card.)\nEquipped creature gets +1/+1 and has lifelink.\nEquip {1}{B}

View File

@@ -0,0 +1,6 @@
Name:Pop Quiz
ManaCost:2 U
Types:Instant
A:SP$ Draw | Cost$ 2 U | Defined$ You | NumCards$ 1 | SubAbility$ DBLearn | SpellDescription$ Draw a card.
SVar:DBLearn:DB$ Learn | SpellDescription$ Learn. (You may reveal a Lesson card you own from outside the game and put it into your hand, or discard a card to draw a card.)
Oracle:Draw a card.\nLearn. (You may reveal a Lesson card you own from outside the game and put it into your hand, or discard a card to draw a card.)

View File

@@ -0,0 +1,7 @@
Name:Professor of Symbology
ManaCost:1 W
Types:Creature Kor Cleric
PT:2/1
T:Mode$ ChangesZone | Origin$ Any | Destination$ Battlefield | ValidCard$ Card.Self | Execute$ TrigLearn | TriggerDescription$ When CARDNAME enters the battlefield, Learn. (You may reveal a Lesson card you own from outside the game and put it into your hand, or discard a card to draw a card.)
SVar:TrigLearn:DB$ Learn
Oracle:When Professor of Symbology enters the battlefield, learn. (You may reveal a Lesson card you own from outside the game and put it into your hand, or discard a card to draw a card.)

View File

@@ -0,0 +1,11 @@
Name:Retriever Phoenix
ManaCost:3 R
Types:Creature Phoenix
PT:2/2
K:Flying
K:Haste
T:Mode$ ChangesZone | ValidCard$ Card.wasCast+Self | Destination$ Battlefield | Execute$ TrigLearn | TriggerDescription$ When CARDNAME enters the battlefield, if you cast it, learn. (You may reveal a Lesson card you own from outside the game and put it into your hand, or discard a card to draw a card.)
R:Event$ Learn | ActiveZones$ Graveyard | ValidPlayer$ You | Optional$ True | ReplaceWith$ Return | IsPresent$ Card.Self | Description$ As long as CARDNAME is in your graveyard, if you would learn, you may instead return CARDNAME to the battlefield.
SVar:Return:DB$ ChangeZone | Defined$ Self | Origin$ Graveyard | Destination$ Battlefield
DeckHas:Ability$Graveyard
Oracle:Flying, haste\nWhen Retriever Phoenix enters the battlefield, if you cast it, learn. (You may reveal a Lesson card you own from outside the game and put it into your hand, or discard a card to draw a card.)\nAs long as Retriever Phoenix is in your graveyard, if you would learn, you may instead return Retriever Phoenix to the battlefield.

View File

@@ -0,0 +1,7 @@
Name:Rise of Extus
ManaCost:4 W/B W/B
Types:Sorcery
A:SP$ ChangeZone | ValidTgts$ Creature | TgtPrompt$ Select target creature | Origin$ Battlefield | Destination$ Exile | SubAbility$ DBExile | SpellDescription$ Exile target creature.
SVar:DBExile:DB$ ChangeZone | Origin$ Graveyard | Destination$ Exile | TargetMin$ 0 | ValidTgts$ Instant,Sorcery | TgtPrompt$ Select up to one target instant or sorcery card from a graveyard | SubAbility$ DBLearn | SpellDescription$ Exile up to one target instant or sorcery card from a graveyard.
SVar:DBLearn:DB$ Learn | SpellDescription$ Learn. (You may reveal a Lesson card you own from outside the game and put it into your hand, or discard a card to draw a card.)
Oracle:Exile target creature. Exile up to one target instant or sorcery card from a graveyard.\nLearn. (You may reveal a Lesson card you own from outside the game and put it into your hand, or discard a card to draw a card.)

View File

@@ -0,0 +1,10 @@
Name:Sparring Regimen
ManaCost:2 W
Types:Enchantment
T:Mode$ ChangesZone | Origin$ Any | Destination$ Battlefield | ValidCard$ Card.Self | Execute$ TrigLearn | TriggerDescription$ When CARDNAME enters the battlefield, learn. (You may reveal a Lesson card you own from outside the game and put it into your hand, or discard a card to draw a card.)
SVar:TrigLearn:DB$ Learn
T:Mode$ AttackersDeclared | AttackingPlayer$ You | Execute$ TrigPutCounter | TriggerZones$ Battlefield | TriggerDescription$ Whenever you attack, put a +1/+1 counter on target attacking creature and untap it.
SVar:TrigPutCounter:DB$ PutCounter | CounterType$ P1P1 | CounterNum$ 1 | ValidTgts$ Creature.attacking | TgtPrompt$ Select target attacking creature | SubAbility$ DBUntap
SVar:DBUntap:DB$ Untap | Defined$ Targeted
DeckHas:Ability$Counters
Oracle:When Sparring Regimen enters the battlefield, learn. (You may reveal a Lesson card you own from outside the game and put it into your hand, or discard a card to draw a card.)\nWhenever you attack, put a +1/+1 counter on target attacking creature and untap it.

View File

@@ -0,0 +1,6 @@
Name:Study Break
ManaCost:1 W
Types:Instant
A:SP$ Tap | Cost$ 1 W | TargetMin$ 0 | TargetMax$ 2 | TgtPrompt$ Choose up to two target creatures | ValidTgts$ Creature | SpellDescription$ Tap up to two target creatures. | SubAbility$ DBLearn
SVar:DBLearn:DB$ Learn | SpellDescription$ Learn. (You may reveal a Lesson card you own from outside the game and put it into your hand, or discard a card to draw a card.)
Oracle:Tap up to two target creatures.\nLearn. (You may reveal a Lesson card you own from outside the game and put it into your hand, or discard a card to draw a card.)

View File

@@ -476,8 +476,9 @@ public class PlayerControllerHuman extends PlayerController implements IGameCont
final boolean useUiPointAtCard =
(FModel.getPreferences().getPrefBoolean(FPref.UI_SELECT_FROM_CARD_DISPLAYS) && (!GuiBase.getInterface().isLibgdxPort())) ?
(cz.is(ZoneType.Battlefield) || cz.is(ZoneType.Hand) || cz.is(ZoneType.Library) ||
cz.is(ZoneType.Graveyard) || cz.is(ZoneType.Exile) || cz.is(ZoneType.Flashback) || cz.is(ZoneType.Command)) :
(cz.is(ZoneType.Hand) && cz.getPlayer() == player || cz.is(ZoneType.Battlefield));
cz.is(ZoneType.Graveyard) || cz.is(ZoneType.Exile) || cz.is(ZoneType.Flashback) ||
cz.is(ZoneType.Command) || cz.is(ZoneType.Sideboard)) :
(cz.is(ZoneType.Hand, player) || cz.is(ZoneType.Battlefield));
if (!useUiPointAtCard) {
return false;
}