fixed bug causing AI never play a card there are one or more cards in graveyard or other zones, fixed and improved removemana ability, fixed/added primitives.

This commit is contained in:
Vittorio Alfieri
2020-12-30 17:52:06 +01:00
parent 1f98173197
commit 1444ed6b7c
6 changed files with 330 additions and 198 deletions

View File

@@ -5268,7 +5268,7 @@ type=Sorcery
[card]
name=Boneyard Scourge
abilities=flying
autograveyard=@movedto(creature[Dragon]|mygraveyard) from (myBattlefield): aslongas(this|mygraveyard) may pay{1}{B}: moveTo(myBattlefield) target(Boneyard Scourge|mygraveyard)
autograveyard=@movedto(creature[Dragon]|graveyard) from(myBattlefield):may pay({1}{B}):moveTo(myBattlefield) all(this)
text=Flying -- Whenever a Dragon you control dies while Boneyard Scourge is in your graveyard, you may pay {1}{B}. If you do, return Boneyard Scourge from your graveyard to the battlefield.
mana={2}{B}{B}
type=Creature
@@ -22242,6 +22242,53 @@ auto=mypoolsave(white)
auto=mypoolsave(black)
auto=mypoolsave(green)
auto=mypoolsave(blue)
auto=mypoolsave(artifact)
auto=mypoolsave(land)
auto=@each untap restriction{compare(mybluepoolcount)~morethan~0}:thisforeach(variable{mybluepoolcount}) add{C} && removemana({U})
auto=@each untap restriction{compare(mygreenpoolcount)~morethan~0}:thisforeach(variable{mygreenpoolcount}) add{C} && removemana({G})
auto=@each untap restriction{compare(myredpoolcount)~morethan~0}:thisforeach(variable{myredpoolcount})add{C} && removemana({R})
auto=@each untap restriction{compare(myblackpoolcount)~morethan~0}:thisforeach(variable{myblackpoolcount}) add{C} && removemana({B})
auto=@each untap restriction{compare(mywhitepoolcount)~morethan~0}:thisforeach(variable{mywhitepoolcount}) add{C} && removemana({W})
auto=@each upkeep restriction{compare(mybluepoolcount)~morethan~0}:thisforeach(variable{mybluepoolcount}) add{C} && removemana({U})
auto=@each upkeep restriction{compare(mygreenpoolcount)~morethan~0}:thisforeach(variable{mygreenpoolcount}) add{C} && removemana({G})
auto=@each upkeep restriction{compare(myredpoolcount)~morethan~0}:thisforeach(variable{myredpoolcount})add{C} && removemana({R})
auto=@each upkeep restriction{compare(myblackpoolcount)~morethan~0}:thisforeach(variable{myblackpoolcount}) add{C} && removemana({B})
auto=@each upkeep restriction{compare(mywhitepoolcount)~morethan~0}:thisforeach(variable{mywhitepoolcount}) add{C} && removemana({W})
auto=@each draw restriction{compare(mybluepoolcount)~morethan~0}:thisforeach(variable{mybluepoolcount}) add{C} && removemana({U})
auto=@each draw restriction{compare(mygreenpoolcount)~morethan~0}:thisforeach(variable{mygreenpoolcount}) add{C} && removemana({G})
auto=@each draw restriction{compare(myredpoolcount)~morethan~0}:thisforeach(variable{myredpoolcount})add{C} && removemana({R})
auto=@each draw restriction{compare(myblackpoolcount)~morethan~0}:thisforeach(variable{myblackpoolcount}) add{C} && removemana({B})
auto=@each draw restriction{compare(mywhitepoolcount)~morethan~0}:thisforeach(variable{mywhitepoolcount}) add{C} && removemana({W})
auto=@each firstmain restriction{compare(mybluepoolcount)~morethan~0}:thisforeach(variable{mybluepoolcount}) add{C} && removemana({U})
auto=@each firstmain restriction{compare(mygreenpoolcount)~morethan~0}:thisforeach(variable{mygreenpoolcount}) add{C} && removemana({G})
auto=@each firstmain restriction{compare(myredpoolcount)~morethan~0}:thisforeach(variable{myredpoolcount})add{C} && removemana({R})
auto=@each firstmain restriction{compare(myblackpoolcount)~morethan~0}:thisforeach(variable{myblackpoolcount}) add{C} && removemana({B})
auto=@each firstmain restriction{compare(mywhitepoolcount)~morethan~0}:thisforeach(variable{mywhitepoolcount}) add{C} && removemana({W})
auto=@each combatbegins restriction{compare(mybluepoolcount)~morethan~0}:thisforeach(variable{mybluepoolcount}) add{C} && removemana({U})
auto=@each combatbegins restriction{compare(mygreenpoolcount)~morethan~0}:thisforeach(variable{mygreenpoolcount}) add{C} && removemana({G})
auto=@each combatbegins restriction{compare(myredpoolcount)~morethan~0}:thisforeach(variable{myredpoolcount})add{C} && removemana({R})
auto=@each combatbegins restriction{compare(myblackpoolcount)~morethan~0}:thisforeach(variable{myblackpoolcount}) add{C} && removemana({B})
auto=@each combatbegins restriction{compare(mywhitepoolcount)~morethan~0}:thisforeach(variable{mywhitepoolcount}) add{C} && removemana({W})
auto=@each combatends restriction{compare(mybluepoolcount)~morethan~0}:thisforeach(variable{mybluepoolcount}) add{C} && removemana({U})
auto=@each combatends restriction{compare(mygreenpoolcount)~morethan~0}:thisforeach(variable{mygreenpoolcount}) add{C} && removemana({G})
auto=@each combatends restriction{compare(myredpoolcount)~morethan~0}:thisforeach(variable{myredpoolcount})add{C} && removemana({R})
auto=@each combatends restriction{compare(myblackpoolcount)~morethan~0}:thisforeach(variable{myblackpoolcount}) add{C} && removemana({B})
auto=@each combatends restriction{compare(mywhitepoolcount)~morethan~0}:thisforeach(variable{mywhitepoolcount}) add{C} && removemana({W})
auto=@each secondmain restriction{compare(mybluepoolcount)~morethan~0}:thisforeach(variable{mybluepoolcount}) add{C} && removemana({U})
auto=@each secondmain restriction{compare(mygreenpoolcount)~morethan~0}:thisforeach(variable{mygreenpoolcount}) add{C} && removemana({G})
auto=@each secondmain restriction{compare(myredpoolcount)~morethan~0}:thisforeach(variable{myredpoolcount})add{C} && removemana({R})
auto=@each secondmain restriction{compare(myblackpoolcount)~morethan~0}:thisforeach(variable{myblackpoolcount}) add{C} && removemana({B})
auto=@each secondmain restriction{compare(mywhitepoolcount)~morethan~0}:thisforeach(variable{mywhitepoolcount}) add{C} && removemana({W})
auto=@each endofturn restriction{compare(mybluepoolcount)~morethan~0}:thisforeach(variable{mybluepoolcount}) add{C} && removemana({U})
auto=@each endofturn restriction{compare(mygreenpoolcount)~morethan~0}:thisforeach(variable{mygreenpoolcount}) add{C} && removemana({G})
auto=@each endofturn restriction{compare(myredpoolcount)~morethan~0}:thisforeach(variable{myredpoolcount})add{C} && removemana({R})
auto=@each endofturn restriction{compare(myblackpoolcount)~morethan~0}:thisforeach(variable{myblackpoolcount}) add{C} && removemana({B})
auto=@each endofturn restriction{compare(mywhitepoolcount)~morethan~0}:thisforeach(variable{mywhitepoolcount}) add{C} && removemana({W})
auto=@each cleanup restriction{compare(mybluepoolcount)~morethan~0}:thisforeach(variable{mybluepoolcount}) add{C} && removemana({U})
auto=@each cleanup restriction{compare(mygreenpoolcount)~morethan~0}:thisforeach(variable{mygreenpoolcount}) add{C} && removemana({G})
auto=@each cleanup restriction{compare(myredpoolcount)~morethan~0}:thisforeach(variable{myredpoolcount})add{C} && removemana({R})
auto=@each cleanup restriction{compare(myblackpoolcount)~morethan~0}:thisforeach(variable{myblackpoolcount}) add{C} && removemana({B})
auto=@each cleanup restriction{compare(mywhitepoolcount)~morethan~0}:thisforeach(variable{mywhitepoolcount}) add{C} && removemana({W})
text=If you would lose unspent mana, that mana becomes colorless instead.
mana={5}
type=Artifact
@@ -26575,6 +26622,89 @@ power=2
toughness=3
[/card]
[card]
name=Kroxa, Titan of Death's Hunger
auto=ifnot paid(alternative) then sacrifice
auto=if type(*|opponenthand)~equalto~0 then life:-3 opponent
auto=if type(*[-land]|opponenthand)~morethan~0 then if type(land|opponenthand)~equalto~0 then ability$!name(Discard non-land card) name(Discard non-land card) reject notatarget(*[-land]|myhand)!$ opponent
auto=if type(*[-land]|opponenthand)~equalto~0 then if type(land|opponenthand)~morethan~0 then ability$!name(Discard land card) name(Discard land card) reject notatarget(land|myhand) and!(life:-3)! !$ opponent
auto=if type(*[-land]|opponenthand)~morethan~0 then if type(land|opponenthand)~morethan~0 then ability$!name(Choose one) choice name(Discard non-land card) reject notatarget(*[-land]|myhand) _ choice name(Discard land card) reject notatarget(land|myhand) and!(life:-3)! !$ opponent
auto=@combat(attacking) source(this) restriction{type(*|opponenthand)~equalto~0}:life:-3 opponent
auto=@combat(attacking) source(this) restriction{type(*[-land]|opponenthand)~morethan~0,type(land|opponenthand)~equalto~0}:ability$!name(Discard non-land) card name(Discard non-land card) reject notatarget(*[-land]|myhand)!$ opponent
auto=@combat(attacking) source(this) restriction{type(*[-land]|opponenthand)~equalto~0,type(land|opponenthand)~morethan~0}:ability$!name(Discard land card) name(Discard land card) reject notatarget(land|myhand) and!(life:-3)! $ opponent
auto=@combat(attacking) source(this) restriction{type(*[-land]|opponenthand)~morethan~0,type(land|opponenthand)~morethan~0}:ability$!name(Choose one) choice name(Discard non-land card) reject notatarget(*[-land]|myhand) _ choice name(Discard land card) reject notatarget(land|myhand) and!(life:-3)! !$ opponent
autograveyard={G}{G}{U}{U}{E(*|mygraveyard)}{E(*|mygraveyard)}{E(*|mygraveyard)}{E(*|mygraveyard)}{E(*|mygraveyard)}:name(Escape-{B}{B}{R}{R},exile five) activate castcard(alternative)
text=When Kroxa enters the battlefield, sacrifice it unless it escaped. -- Whenever Kroxa enters the battlefield or attacks, each opponent discards a card, then each opponent who didn't discard a nonland card this way loses 3 life. -- Escape — {B}{B}{R}{R}, Exile five other cards from your graveyard. (You may cast this card from your graveyard for its escape cost.)
mana={B}{R}
type=Legendary Creature
subtype=Elder Giant
power=6
toughness=6
[/card]
[card]
name=Kruphix, God of Horizons
abilities=indestructible,nomaxhand
auto=mypoolsave(red)
auto=mypoolsave(white)
auto=mypoolsave(black)
auto=mypoolsave(green)
auto=mypoolsave(blue)
auto=mypoolsave(artifact)
auto=mypoolsave(land)
auto=@each untap restriction{compare(mybluepoolcount)~morethan~0}:thisforeach(variable{mybluepoolcount}) add{C} && removemana({U})
auto=@each untap restriction{compare(mygreenpoolcount)~morethan~0}:thisforeach(variable{mygreenpoolcount}) add{C} && removemana({G})
auto=@each untap restriction{compare(myredpoolcount)~morethan~0}:thisforeach(variable{myredpoolcount})add{C} && removemana({R})
auto=@each untap restriction{compare(myblackpoolcount)~morethan~0}:thisforeach(variable{myblackpoolcount}) add{C} && removemana({B})
auto=@each untap restriction{compare(mywhitepoolcount)~morethan~0}:thisforeach(variable{mywhitepoolcount}) add{C} && removemana({W})
auto=@each upkeep restriction{compare(mybluepoolcount)~morethan~0}:thisforeach(variable{mybluepoolcount}) add{C} && removemana({U})
auto=@each upkeep restriction{compare(mygreenpoolcount)~morethan~0}:thisforeach(variable{mygreenpoolcount}) add{C} && removemana({G})
auto=@each upkeep restriction{compare(myredpoolcount)~morethan~0}:thisforeach(variable{myredpoolcount})add{C} && removemana({R})
auto=@each upkeep restriction{compare(myblackpoolcount)~morethan~0}:thisforeach(variable{myblackpoolcount}) add{C} && removemana({B})
auto=@each upkeep restriction{compare(mywhitepoolcount)~morethan~0}:thisforeach(variable{mywhitepoolcount}) add{C} && removemana({W})
auto=@each draw restriction{compare(mybluepoolcount)~morethan~0}:thisforeach(variable{mybluepoolcount}) add{C} && removemana({U})
auto=@each draw restriction{compare(mygreenpoolcount)~morethan~0}:thisforeach(variable{mygreenpoolcount}) add{C} && removemana({G})
auto=@each draw restriction{compare(myredpoolcount)~morethan~0}:thisforeach(variable{myredpoolcount})add{C} && removemana({R})
auto=@each draw restriction{compare(myblackpoolcount)~morethan~0}:thisforeach(variable{myblackpoolcount}) add{C} && removemana({B})
auto=@each draw restriction{compare(mywhitepoolcount)~morethan~0}:thisforeach(variable{mywhitepoolcount}) add{C} && removemana({W})
auto=@each firstmain restriction{compare(mybluepoolcount)~morethan~0}:thisforeach(variable{mybluepoolcount}) add{C} && removemana({U})
auto=@each firstmain restriction{compare(mygreenpoolcount)~morethan~0}:thisforeach(variable{mygreenpoolcount}) add{C} && removemana({G})
auto=@each firstmain restriction{compare(myredpoolcount)~morethan~0}:thisforeach(variable{myredpoolcount})add{C} && removemana({R})
auto=@each firstmain restriction{compare(myblackpoolcount)~morethan~0}:thisforeach(variable{myblackpoolcount}) add{C} && removemana({B})
auto=@each firstmain restriction{compare(mywhitepoolcount)~morethan~0}:thisforeach(variable{mywhitepoolcount}) add{C} && removemana({W})
auto=@each combatbegins restriction{compare(mybluepoolcount)~morethan~0}:thisforeach(variable{mybluepoolcount}) add{C} && removemana({U})
auto=@each combatbegins restriction{compare(mygreenpoolcount)~morethan~0}:thisforeach(variable{mygreenpoolcount}) add{C} && removemana({G})
auto=@each combatbegins restriction{compare(myredpoolcount)~morethan~0}:thisforeach(variable{myredpoolcount})add{C} && removemana({R})
auto=@each combatbegins restriction{compare(myblackpoolcount)~morethan~0}:thisforeach(variable{myblackpoolcount}) add{C} && removemana({B})
auto=@each combatbegins restriction{compare(mywhitepoolcount)~morethan~0}:thisforeach(variable{mywhitepoolcount}) add{C} && removemana({W})
auto=@each combatends restriction{compare(mybluepoolcount)~morethan~0}:thisforeach(variable{mybluepoolcount}) add{C} && removemana({U})
auto=@each combatends restriction{compare(mygreenpoolcount)~morethan~0}:thisforeach(variable{mygreenpoolcount}) add{C} && removemana({G})
auto=@each combatends restriction{compare(myredpoolcount)~morethan~0}:thisforeach(variable{myredpoolcount})add{C} && removemana({R})
auto=@each combatends restriction{compare(myblackpoolcount)~morethan~0}:thisforeach(variable{myblackpoolcount}) add{C} && removemana({B})
auto=@each combatends restriction{compare(mywhitepoolcount)~morethan~0}:thisforeach(variable{mywhitepoolcount}) add{C} && removemana({W})
auto=@each secondmain restriction{compare(mybluepoolcount)~morethan~0}:thisforeach(variable{mybluepoolcount}) add{C} && removemana({U})
auto=@each secondmain restriction{compare(mygreenpoolcount)~morethan~0}:thisforeach(variable{mygreenpoolcount}) add{C} && removemana({G})
auto=@each secondmain restriction{compare(myredpoolcount)~morethan~0}:thisforeach(variable{myredpoolcount})add{C} && removemana({R})
auto=@each secondmain restriction{compare(myblackpoolcount)~morethan~0}:thisforeach(variable{myblackpoolcount}) add{C} && removemana({B})
auto=@each secondmain restriction{compare(mywhitepoolcount)~morethan~0}:thisforeach(variable{mywhitepoolcount}) add{C} && removemana({W})
auto=@each endofturn restriction{compare(mybluepoolcount)~morethan~0}:thisforeach(variable{mybluepoolcount}) add{C} && removemana({U})
auto=@each endofturn restriction{compare(mygreenpoolcount)~morethan~0}:thisforeach(variable{mygreenpoolcount}) add{C} && removemana({G})
auto=@each endofturn restriction{compare(myredpoolcount)~morethan~0}:thisforeach(variable{myredpoolcount})add{C} && removemana({R})
auto=@each endofturn restriction{compare(myblackpoolcount)~morethan~0}:thisforeach(variable{myblackpoolcount}) add{C} && removemana({B})
auto=@each endofturn restriction{compare(mywhitepoolcount)~morethan~0}:thisforeach(variable{mywhitepoolcount}) add{C} && removemana({W})
auto=@each cleanup restriction{compare(mybluepoolcount)~morethan~0}:thisforeach(variable{mybluepoolcount}) add{C} && removemana({U})
auto=@each cleanup restriction{compare(mygreenpoolcount)~morethan~0}:thisforeach(variable{mygreenpoolcount}) add{C} && removemana({G})
auto=@each cleanup restriction{compare(myredpoolcount)~morethan~0}:thisforeach(variable{myredpoolcount})add{C} && removemana({R})
auto=@each cleanup restriction{compare(myblackpoolcount)~morethan~0}:thisforeach(variable{myblackpoolcount}) add{C} && removemana({B})
auto=@each cleanup restriction{compare(mywhitepoolcount)~morethan~0}:thisforeach(variable{mywhitepoolcount}) add{C} && removemana({W})
auto=this(variable{type:managplustype:manauplusend}<7) transforms((removetypes,newability[becomes(Legendary Enchantment God)]))
auto=this(variable{type:managplustype:manauplusend}>6) transforms((Legendary Enchantment Creature))
text=Indestructible -- As long as your devotion to green and blue is less than seven, Kruphix isn't a creature. -- You have no maximum hand size. -- If unused mana would empty from your mana pool, that mana becomes colorless instead.
mana={3}{G}{U}
type=Legendary Enchantment Creature
subtype=God
power=4
toughness=7
[/card]
[card]
name=Kuldotha Flamefiend
other={4}{R}{R}{S(*[artifact]|mybattlefield)} name(Sacrifice artifact)
auto=if paid(alternative) then thisforeach(variable{4}) ability$!name(Deal 1 damage) name(Deal 1 damage) target(player,creature,planeswalker) damage:1!$ controller
@@ -26586,8 +26716,38 @@ power=4
toughness=4
[/card]
[card]
name=Kumano's Blessing
target=creature
abilities=flash
auto=@damaged(creature[toughness=1]) from(mytgt):if compare(thatmuch)~morethan~0 then name(Damaged creature goes to exile) name(Damaged creature goes to exile) target(creature[fresh;toughness=1]|graveyard) moveto(exile)
auto=@damaged(creature[toughness=2]) from(mytgt):if compare(thatmuch)~morethan~1 then name(Damaged creature goes to exile) name(Damaged creature goes to exile) target(creature[fresh;toughness=2]|graveyard) moveto(exile)
auto=@damaged(creature[toughness=3]) from(mytgt):if compare(thatmuch)~morethan~2 then name(Damaged creature goes to exile) name(Damaged creature goes to exile) target(creature[fresh;toughness=3]|graveyard) moveto(exile)
auto=@damaged(creature[toughness=4]) from(mytgt):if compare(thatmuch)~morethan~3 then name(Damaged creature goes to exile) name(Damaged creature goes to exile) target(creature[fresh;toughness=4]|graveyard) moveto(exile)
auto=@damaged(creature[toughness=5]) from(mytgt):if compare(thatmuch)~morethan~4 then name(Damaged creature goes to exile) name(Damaged creature goes to exile) target(creature[fresh;toughness=5]|graveyard) moveto(exile)
auto=@damaged(creature[toughness=6]) from(mytgt):if compare(thatmuch)~morethan~5 then name(Damaged creature goes to exile) name(Damaged creature goes to exile) target(creature[fresh;toughness=6]|graveyard) moveto(exile)
auto=@damaged(creature[toughness=7]) from(mytgt):if compare(thatmuch)~morethan~6 then name(Damaged creature goes to exile) name(Damaged creature goes to exile) target(creature[fresh;toughness=7]|graveyard) moveto(exile)
auto=@damaged(creature[toughness=8]) from(mytgt):if compare(thatmuch)~morethan~7 then name(Damaged creature goes to exile) name(Damaged creature goes to exile) target(creature[fresh;toughness=8]|graveyard) moveto(exile)
auto=@damaged(creature[toughness=9]) from(mytgt):if compare(thatmuch)~morethan~8 then name(Damaged creature goes to exile) name(Damaged creature goes to exile) target(creature[fresh;toughness=9]|graveyard) moveto(exile)
auto=@damaged(creature[toughness=10]) from(mytgt):if compare(thatmuch)~morethan~9 then name(Damaged creature goes to exile) name(Damaged creature goes to exile) target(creature[fresh;toughness=10]|graveyard) moveto(exile)
auto=@damaged(creature[toughness=11]) from(mytgt):if compare(thatmuch)~morethan~10 then name(Damaged creature goes to exile) name(Damaged creature goes to exile) target(creature[fresh;toughness=11]|graveyard) moveto(exile)
auto=@damaged(creature[toughness=12]) from(mytgt):if compare(thatmuch)~morethan~11 then name(Damaged creature goes to exile) name(Damaged creature goes to exile) target(creature[fresh;toughness=12]|graveyard) moveto(exile)
auto=@damaged(creature[toughness=13]) from(mytgt):if compare(thatmuch)~morethan~12 then name(Damaged creature goes to exile) name(Damaged creature goes to exile) target(creature[fresh;toughness=13]|graveyard) moveto(exile)
auto=@damaged(creature[toughness=14]) from(mytgt):if compare(thatmuch)~morethan~13 then name(Damaged creature goes to exile) name(Damaged creature goes to exile) target(creature[fresh;toughness=14]|graveyard) moveto(exile)
auto=@damaged(creature[toughness=15]) from(mytgt):if compare(thatmuch)~morethan~14 then name(Damaged creature goes to exile) name(Damaged creature goes to exile) target(creature[fresh;toughness=15]|graveyard) moveto(exile)
auto=@damaged(creature[toughness=16]) from(mytgt):if compare(thatmuch)~morethan~15 then name(Damaged creature goes to exile) name(Damaged creature goes to exile) target(creature[fresh;toughness=16]|graveyard) moveto(exile)
auto=@damaged(creature[toughness=17]) from(mytgt):if compare(thatmuch)~morethan~16 then name(Damaged creature goes to exile) name(Damaged creature goes to exile) target(creature[fresh;toughness=17]|graveyard) moveto(exile)
auto=@damaged(creature[toughness=18]) from(mytgt):if compare(thatmuch)~morethan~17 then name(Damaged creature goes to exile) name(Damaged creature goes to exile) target(creature[fresh;toughness=18]|graveyard) moveto(exile)
auto=@damaged(creature[toughness=19]) from(mytgt):if compare(thatmuch)~morethan~18 then name(Damaged creature goes to exile) name(Damaged creature goes to exile) target(creature[fresh;toughness=19]|graveyard) moveto(exile)
auto=@damaged(creature[toughness=20]) from(mytgt):if compare(thatmuch)~morethan~19 then name(Damaged creature goes to exile) name(Damaged creature goes to exile) target(creature[fresh;toughness=20]|graveyard) moveto(exile)
auto=@damaged(creature) from(mytgt):all(trigger[to]) transforms((,newability[exiledeath])) ueot
text=Flash -- Enchant creature -- If a creature dealt damage by enchanted creature this turn would die, exile it instead.
mana={2}{R}
type=Enchantment
subtype=Aura
[/card]
[card]
name=Kumena's Speaker
auto=aslongas(other merfolk,island|mybattlefield) 1/1
auto=aslongas(other *[merfolk;island]|mybattlefield) 1/1
text=Kumena's Speaker gets +1/+1 as long as you control another Merfolk or an Island.
mana={G}
type=Creature
@@ -26664,6 +26824,14 @@ power=3
toughness=3
[/card]
[card]
name=Kyren Archive
auto=@each my upkeep:may name(Exile top card) all(*[zpos=1]|mylibrary) moveto(myexile) and!( counter(0/0,1,KyrenExiled) )!
auto={5}{S}:all(*|myhand) reject && ability$!name(Move back exiled cards) name(Move back exiled cards) all(*[counter{0/0.1.KyrenExiled}]|myexile) moveto(ownerhand)!$ controller
text=At the beginning of your upkeep, you may exile the top card of your library face down. -- {5}, Discard your hand, Sacrifice Kyren Archive: Put all cards exiled with Kyren Archive into their owner's hand.
mana={3}
type=Artifact
[/card]
[card]
name=Kytheon, Hero of Akros
auto=@combat(attacking) source(this) restriction{type(other creature[attacking]|myBattlefield)~morethan~1}:moveto(ownerBattlefield) && flip(Gideon, Battle-Forged)
auto={2}{W}:all(this) indestructible ueot
@@ -26771,6 +26939,13 @@ mana={1}{B}{R}
type=Sorcery
[/card]
[card]
name=Last Rites
auto=name(Discard cards) name(Discard cards) target(<anyamount>*|myhand) transforms((,newability[reject],newability[target(*[-land]|opponenthand) reject])) forever
text=Discard any number of cards. Target player reveals his or her hand, then you choose a nonland card from it for each card discarded this way. That player discards those cards.
mana={2}{B}
type=Sorcery
[/card]
[card]
name=Last-Ditch Effort
target=creature,player
auto=if type(*[creature]|mybattlefield)~morethan~0 then choice name(Sacrifice 1 creature) ability$!sacrifice notatarget(*[creature]|mybattlefield)!$ controller && damage:1
@@ -28508,7 +28683,7 @@ subtype=Aura
[card]
name=Luminous Broodmoth
abilities=flying
auto=@movedto(creature[-flying]|myGraveyard) from(myBattlefield):all(triger[to]) moveTo(myBattlefield) && transforms((,newability[counter(0/0,1,Flying],newability[this(counter{0/0.1.Flying}>=1) flying]))
auto=@movedto(creature[-flying]|myGraveyard) from(myBattlefield):all(trigger[to]) moveTo(myBattlefield) && transforms((,newability[counter(0/0,1,Flying],newability[this(counter{0/0.1.Flying}>=1) flying]))
text=Flying -- Whenever a creature you control without flying dies, return it to the battlefield under its owner's control with a flying counter on it.
mana={2}{W}{W}
type=Creature
@@ -47117,21 +47292,8 @@ toughness=3
[/card]
[card]
name=Sublime Epiphany
auto=choice name(Choose 1) target(*|stack) fizzle
auto=choice name(Choose 3) target(*[-land]|battlefield) moveto(ownerhand)
auto=choice name(Choose 4) clone notatarget(creature|mybattlefield)
auto=choice name(Choose 5) target(player) draw:1
auto=choice name(Choose 1,3) target(*|stack) fizzle && ability$!name(Return permanent) name(Return permanent) target(*[-land]|battlefield) moveto(ownerhand)!$ controller
auto=choice name(Choose 1,4) target(*|stack) fizzle && ability$!name(Copy creature) name(Copy creature) clone notatarget(creature|mybattlefield)!$ controller
auto=choice name(Choose 1,5) target(*|stack) fizzle && ability$!name(Target player draws card) name(Target player draws card) target(player) draw:1!$ controller
auto=choice name(Choose 3,4) target(*[-land]|battlefield) moveto(ownerhand) && ability$!name(Copy creature) name(Copy creature) clone notatarget(creature|mybattlefield)!$ controller
auto=choice name(Choose 3,5) target(*[-land]|battlefield) moveto(ownerhand) && ability$!name(Target player draws card) name(Target player draws card) target(player) draw:1!$ controller
auto=choice name(Choose 4,5) clone notatarget(creature|mybattlefield) && ability$!name(Target player draws card) name(Target player draws card) target(player) draw:1!$ controller
auto=choice name(Choose 1,3,4) target(*|stack) fizzle && ability$!name(Return permanent) name(Return permanent) target(*[-land]|battlefield) moveto(ownerhand)!$ controller && ability$!name(Copy creature) name(Copy creature) clone notatarget(creature|mybattlefield)!$ controller
auto=choice name(Choose 1,3,5) target(*|stack) fizzle && ability$!name(Return permanent) name(Return permanent) target(*[-land]|battlefield) moveto(ownerhand)!$ controller && ability$!name(Target player draws card) name(Target player draws card) target(player) draw:1!$ controller
auto=choice name(Choose 1,4,5) target(*|stack) fizzle && ability$!name(Copy creature) name(Copy creature) clone notatarget(creature|mybattlefield)!$ controller && ability$!name(Target player draws card) name(Target player draws card) target(player) draw:1!$ controller
auto=choice name(Choose 3,4,5) target(*[-land]|battlefield) moveto(ownerhand) && ability$!name(Copy creature) name(Copy creature) clone notatarget(creature|mybattlefield)!$ controller && ability$!name(Target player draws card) name(Target player draws card) target(player) draw:1!$ controller
auto=choice name(Choose 1,3,4,5) target(*|stack) fizzle && ability$!name(Return permanent) name(Return permanent) target(*[-land]|battlefield) moveto(ownerhand)!$ controller && ability$!name(Copy creature) name(Copy creature) clone notatarget(creature|mybattlefield)!$ controller && ability$!name(Target player draws card) name(Target player draws card) target(player) draw:1!$ controller
auto=if type(*|stack)~morethan~1 then choice name(Counter target spell) name(Counter target spell) target(*|stack) transforms((,newability[fizzle],newability[ability$!name(Target player draws card) may name(Target player draws card) target(player) draw:1!$ opponent],newability[ability$!name(Return permanent) may name(Return permanent) target(*[-land]|battlefield) moveto(ownerhand)!$ opponent],newability[ability$!name(Copy creature) may name(Copy creature) clone target(creature|mybattlefield)!$ opponent])) forever
auto=choice name(Don't counter any spell) name(Don't counter any spell) transforms((,newability[ability$!name(Target player draws card) may name(Target player draws card) target(player) draw:1!$ controller],newability[ability$!name(Return permanent) may name(Return permanent) target(*[-land]|battlefield) moveto(ownerhand)!$ controller],newability[ability$!name(Copy creature) may name(Copy creature) clone target(creature|mybattlefield)!$ controller])) forever
text=Choose one or more — • Counter target spell. -- • Counter target activated or triggered ability. -- • Return target nonland permanent to its owner's hand. -- • Create a token that's a copy of target creature you control. -- • Target player draws a card.
mana={4}{U}{U}
type=Instant
@@ -49690,7 +49852,7 @@ type=Artifact
[card]
name=Thrash // Threat
other={2}{R}{G} name(Threat)
otherrestricction=myturnonly
otherrestriction=myturnonly
auto=if paid(alternative) then token(Beast,Creature Beast,4/4,red,green,trample)
auto=ifnot paid(alternative) then target(creature) transforms((,newability[dynamicability<!powerstrike!> target(*[creature;planeswalker]|opponentbattlefield)])) ueot
text=Target creature you control deals damage equal to its power to target creature or planeswalker you don't control. -- Create a 4/4 red and green Beast creature token with trample.

View File

@@ -7142,32 +7142,6 @@ power=3
toughness=3
[/card]
[card]
name=Kroxa, Titan of Death's Hunger
text=When Kroxa enters the battlefield, sacrifice it unless it escaped. -- Whenever Kroxa enters the battlefield or attacks, each opponent discards a card, then each opponent who didn't discard a nonland card this way loses 3 life. -- Escape— {B}{B}{R}{R}, Exile five other cards from your graveyard. (You may cast this card from your graveyard for its escape cost.)
mana={B}{R}
type=Legendary Creature
subtype=Elder Giant
power=6
toughness=6
[/card]
[card]
name=Kruphix, God of Horizons
abilities=indestructible
text=Indestructible -- As long as your devotion to green and blue is less than seven, Kruphix isn't a creature. -- You have no maximum hand size. -- If unused mana would empty from your mana pool, that mana becomes colorless instead.
mana={3}{G}{U}
type=Legendary Enchantment Creature
subtype=God
power=4
toughness=7
[/card]
[card]
name=Kumano's Blessing
text=Flash -- Enchant creature -- If a creature dealt damage by enchanted creature this turn would die, exile it instead.
mana={2}{R}
type=Enchantment
subtype=Aura
[/card]
[card]
name=Kurkesh, Onakke Ancient
text=Whenever you activate an ability of an artifact, if it isn't a mana ability, you may pay {R}. If you do, copy that ability. You may choose new targets for the copy.
mana={2}{R}{R}
@@ -7177,12 +7151,6 @@ power=4
toughness=3
[/card]
[card]
name=Kyren Archive
text=At the beginning of your upkeep, you may exile the top card of your library face down. -- {5}, Discard your hand, Sacrifice Kyren Archive: Put all cards exiled with Kyren Archive into their owner's hand.
mana={3}
type=Artifact
[/card]
[card]
name=Labro Bot
text=When this creature enters the battlefield, return target host card or card with augment from your graveyard to your hand.
mana={5}
@@ -7276,12 +7244,6 @@ mana={1}{R}
type=Instant
[/card]
[card]
name=Last Rites
text=Discard any number of cards. Target player reveals his or her hand, then you choose a nonland card from it for each card discarded this way. That player discards those cards.
mana={2}{B}
type=Sorcery
[/card]
[card]
name=Last Thoughts
text=Draw a card. -- Cipher (Then you may exile this spell card encoded on a creature you control. Whenever that creature deals combat damage to a player, its controller may cast a copy of the encoded card without paying its mana cost.)
mana={3}{U}

View File

@@ -7133,8 +7133,8 @@ class AARemoveMana: public ActivatedAbilityTP
public:
ManaCost * mManaDesc;
bool mRemoveAll;
AARemoveMana(GameObserver* observer, int _id, MTGCardInstance * card, Targetable * _target, string ManaDesc, int who = TargetChooser::UNSET);
bool forceclean;
AARemoveMana(GameObserver* observer, int _id, MTGCardInstance * card, Targetable * _target, string ManaDesc, int who = TargetChooser::UNSET, bool forceclean = false);
int resolve();
const string getMenuText();
AARemoveMana * clone() const;

View File

@@ -1341,8 +1341,8 @@ MTGCardInstance * AIPlayerBaka::chooseCard(TargetChooser * tc, MTGCardInstance *
}
for(int players = 0; players < 2;++players)
{
MTGGameZone * zones[] = { playerZones->hand, playerZones->library, playerZones->inPlay, playerZones->graveyard,playerZones->stack,playerZones->exile };
for (int j = 0; j < 6; j++)
MTGGameZone * zones[] = { playerZones->hand, playerZones->library, playerZones->inPlay, playerZones->graveyard, playerZones->stack, playerZones->exile, playerZones->commandzone };
for (int j = 0; j < 7; j++)
{
MTGGameZone * zone = zones[j];
for (int k = 0; k < zone->nb_cards; k++)
@@ -1908,7 +1908,7 @@ int AIPlayerBaka::createAbilityTargets(MTGAbility * a, MTGCardInstance * c, Rank
for (int i = 0; i < 2; i++)
{
Player * p = observer->players[i];
MTGGameZone * playerZones[] = { p->game->graveyard, p->game->library, p->game->hand, p->game->inPlay,p->game->stack,p->game->exile, p->game->commandzone, p->game->sideboard, p->game->reveal };
MTGGameZone * playerZones[] = { p->game->graveyard, p->game->library, p->game->hand, p->game->inPlay, p->game->stack, p->game->exile, p->game->commandzone, p->game->sideboard, p->game->reveal };
if(a->getActionTc()->canTarget((Targetable*)p))
{
if(a->getActionTc()->maxtargets == 1)
@@ -2395,7 +2395,7 @@ int AIPlayerBaka::chooseTarget(TargetChooser * _tc, Player * forceTarget,MTGCard
}
}
MTGPlayerCards * playerZones = target->game;
MTGGameZone * zones[] = { playerZones->hand, playerZones->library, playerZones->inPlay, playerZones->graveyard,playerZones->stack,playerZones->exile,playerZones->commandzone, playerZones->sideboard, playerZones->reveal };
MTGGameZone * zones[] = { playerZones->hand, playerZones->library, playerZones->inPlay, playerZones->graveyard, playerZones->stack, playerZones->exile, playerZones->commandzone, playerZones->sideboard, playerZones->reveal };
for (int j = 0; j < 9; j++)
{
MTGGameZone * zone = zones[j];
@@ -2745,7 +2745,8 @@ MTGCardInstance * AIPlayerBaka::FindCardToPlay(ManaCost * pMana, const char * ty
}
}
//canplayfromexile
while ((card = cd.nextmatch(game->exile, card))&& card->has(Constants::CANPLAYFROMEXILE))
card = NULL; // fixed bug causing AI never play a card there are one or more cards in graveyard or other zones...
while ((card = cd.nextmatch(game->exile, card)) && card->has(Constants::CANPLAYFROMEXILE))
{
if (!CanHandleCost(card->getManaCost(),card))
continue;
@@ -2899,6 +2900,138 @@ MTGCardInstance * AIPlayerBaka::FindCardToPlay(ManaCost * pMana, const char * ty
maxCost = pMana->getConvertedCost();
}
}
//play from commandzone
card = NULL; // fixed bug causing AI never play a card there are one or more cards in exile or other zones...
while ((card = cd.nextmatch(game->commandzone, card)))
{
if (!CanHandleCost(card->getManaCost(),card))
continue;
if (game->playRestrictions->canPutIntoZone(card, game->stack) == PlayRestriction::CANT_PLAY)
continue;
if (card->hasType(Subtypes::TYPE_LEGENDARY) && game->inPlay->findByName(card->name))
continue;
if(hints && hints->HintSaysItsForCombo(observer,card))
{
if(hints->canWeCombo(observer,card,this))
{
AbilityFactory af(observer);
int canPlay = af.parseCastRestrictions(card,card->controller(),card->getRestrictions());
if(!canPlay)
continue;
nextCardToPlay = card;
gotPayments.clear();
if((!pMana->canAfford(nextCardToPlay->getManaCost()) || nextCardToPlay->getManaCost()->getKicker()))
gotPayments = canPayMana(nextCardToPlay,nextCardToPlay->getManaCost());
return activateCombo();
}
else
{
nextCardToPlay = NULL;
continue;
}
}
int currentCost = card->getManaCost()->getConvertedCost();
int hasX = card->getManaCost()->hasX();
gotPayments.clear();
if((!pMana->canAfford(card->getManaCost()) || card->getManaCost()->getKicker()))
gotPayments = canPayMana(card,card->getManaCost());
//for preformence reason we only look for specific mana if the payment couldn't be made with pmana.
if ((currentCost > maxCost || hasX) && (gotPayments.size() || pMana->canAfford(card->getManaCost())))
{
TargetChooserFactory tcf(observer);
TargetChooser * tc = tcf.createTargetChooser(card);
int shouldPlayPercentage = 0;
if (tc)
{
int hasTarget = chooseTarget(tc,NULL,NULL,true);
if(
(tc->maxtargets > hasTarget && tc->maxtargets > 1 && !tc->targetMin && tc->maxtargets != TargetChooser::UNLITMITED_TARGETS) ||//target=<3>creature
(tc->maxtargets == TargetChooser::UNLITMITED_TARGETS && hasTarget < 1)//target=creatures
)
hasTarget = 0;
if (!hasTarget)//single target covered here.
{
SAFE_DELETE(tc);
continue;
}
shouldPlayPercentage = 90;
if(tc->targetMin && hasTarget < tc->maxtargets)
shouldPlayPercentage = 0;
if(tc->maxtargets > 1 && tc->maxtargets != TargetChooser::UNLITMITED_TARGETS && hasTarget <= tc->maxtargets)
{
int maxA = hasTarget-tc->maxtargets;
shouldPlayPercentage += (10*maxA);//reduce the chances of playing multitarget if we are not above max targets.
}
if(tc->maxtargets == TargetChooser::UNLITMITED_TARGETS)
{
shouldPlayPercentage = 40 + (10*hasTarget);
int totalCost = pMana->getConvertedCost()-currentCost;
int totalTargets = hasTarget+hasTarget;
if(hasX && totalCost <= totalTargets)// {x} spell with unlimited targeting tend to divide damage, we want atleast 1 damage per target before casting.
{
shouldPlayPercentage = 0;
}
}
SAFE_DELETE(tc);
}
else
{
int shouldPlay = effectBadOrGood(card);
if (shouldPlay == BAKA_EFFECT_GOOD) {
shouldPlayPercentage = 90;
}
else if (BAKA_EFFECT_DONTKNOW == shouldPlay) {
//previously shouldPlayPercentage = 80;, I found this a little to high
//for cards which AI had no idea how to use.
shouldPlayPercentage = 60;
}
else {
// shouldPlay == baka_effect_bad giving it a 10 for odd ball lottery chance.
shouldPlayPercentage = 10;
}
}
//Reduce the chances of playing a spell with X cost if available mana is low
if (hasX)
{
int xDiff = pMana->getConvertedCost() - currentCost;
if (xDiff < 0)
xDiff = 0;
shouldPlayPercentage = shouldPlayPercentage - static_cast<int> ((shouldPlayPercentage * 1.9f) / (1 + xDiff));
}
if(card->getManaCost() && card->getManaCost()->getKicker() && card->getManaCost()->getKicker()->isMulti)
{
shouldPlayPercentage = 10* size_t(gotPayments.size())/int(1+(card->getManaCost()->getConvertedCost()+card->getManaCost()->getKicker()->getConvertedCost()));
if(shouldPlayPercentage <= 10)
shouldPlayPercentage = shouldPlayPercentage/3;
}
DebugTrace("Should I play from commandzone" << (card ? card->name : "Nothing" ) << "?" << endl
<<"shouldPlayPercentage = "<< shouldPlayPercentage);
if(card->getRestrictions().size())
{
AbilityFactory af(observer);
int canPlay = af.parseCastRestrictions(card,card->controller(),card->getRestrictions());
if(!canPlay)
continue;
}
int randomChance = randomGenerator.random();
int chance = randomChance % 100;
if (chance > shouldPlayPercentage)
continue;
if(shouldPlayPercentage <= 10)
{
DebugTrace("shouldPlayPercentage was less than 10 this was a lottery roll on RNG");
}
nextCardToPlay = card;
maxCost = currentCost;
if (hasX)
maxCost = pMana->getConvertedCost();
}
}
//play from hand
card = NULL; // fixed bug causing AI never play a card there are one or more cards in exile or other zones...
while ((card = cd.nextmatch(game->hand, card)))
{
if (!CanHandleCost(card->getManaCost(),card))
@@ -3054,135 +3187,6 @@ MTGCardInstance * AIPlayerBaka::FindCardToPlay(ManaCost * pMana, const char * ty
maxCost = pMana->getConvertedCost();
}
}
//play from commandzone
while ((card = cd.nextmatch(game->commandzone, card)))
{
if (!CanHandleCost(card->getManaCost(),card))
continue;
if (game->playRestrictions->canPutIntoZone(card, game->stack) == PlayRestriction::CANT_PLAY)
continue;
if (card->hasType(Subtypes::TYPE_LEGENDARY) && game->inPlay->findByName(card->name))
continue;
if(hints && hints->HintSaysItsForCombo(observer,card))
{
if(hints->canWeCombo(observer,card,this))
{
AbilityFactory af(observer);
int canPlay = af.parseCastRestrictions(card,card->controller(),card->getRestrictions());
if(!canPlay)
continue;
nextCardToPlay = card;
gotPayments.clear();
if((!pMana->canAfford(nextCardToPlay->getManaCost()) || nextCardToPlay->getManaCost()->getKicker()))
gotPayments = canPayMana(nextCardToPlay,nextCardToPlay->getManaCost());
return activateCombo();
}
else
{
nextCardToPlay = NULL;
continue;
}
}
int currentCost = card->getManaCost()->getConvertedCost();
int hasX = card->getManaCost()->hasX();
gotPayments.clear();
if((!pMana->canAfford(card->getManaCost()) || card->getManaCost()->getKicker()))
gotPayments = canPayMana(card,card->getManaCost());
//for preformence reason we only look for specific mana if the payment couldn't be made with pmana.
if ((currentCost > maxCost || hasX) && (gotPayments.size() || pMana->canAfford(card->getManaCost())))
{
TargetChooserFactory tcf(observer);
TargetChooser * tc = tcf.createTargetChooser(card);
int shouldPlayPercentage = 0;
if (tc)
{
int hasTarget = chooseTarget(tc,NULL,NULL,true);
if(
(tc->maxtargets > hasTarget && tc->maxtargets > 1 && !tc->targetMin && tc->maxtargets != TargetChooser::UNLITMITED_TARGETS) ||//target=<3>creature
(tc->maxtargets == TargetChooser::UNLITMITED_TARGETS && hasTarget < 1)//target=creatures
)
hasTarget = 0;
if (!hasTarget)//single target covered here.
{
SAFE_DELETE(tc);
continue;
}
shouldPlayPercentage = 90;
if(tc->targetMin && hasTarget < tc->maxtargets)
shouldPlayPercentage = 0;
if(tc->maxtargets > 1 && tc->maxtargets != TargetChooser::UNLITMITED_TARGETS && hasTarget <= tc->maxtargets)
{
int maxA = hasTarget-tc->maxtargets;
shouldPlayPercentage += (10*maxA);//reduce the chances of playing multitarget if we are not above max targets.
}
if(tc->maxtargets == TargetChooser::UNLITMITED_TARGETS)
{
shouldPlayPercentage = 40 + (10*hasTarget);
int totalCost = pMana->getConvertedCost()-currentCost;
int totalTargets = hasTarget+hasTarget;
if(hasX && totalCost <= totalTargets)// {x} spell with unlimited targeting tend to divide damage, we want atleast 1 damage per target before casting.
{
shouldPlayPercentage = 0;
}
}
SAFE_DELETE(tc);
}
else
{
int shouldPlay = effectBadOrGood(card);
if (shouldPlay == BAKA_EFFECT_GOOD) {
shouldPlayPercentage = 90;
}
else if (BAKA_EFFECT_DONTKNOW == shouldPlay) {
//previously shouldPlayPercentage = 80;, I found this a little to high
//for cards which AI had no idea how to use.
shouldPlayPercentage = 60;
}
else {
// shouldPlay == baka_effect_bad giving it a 10 for odd ball lottery chance.
shouldPlayPercentage = 10;
}
}
//Reduce the chances of playing a spell with X cost if available mana is low
if (hasX)
{
int xDiff = pMana->getConvertedCost() - currentCost;
if (xDiff < 0)
xDiff = 0;
shouldPlayPercentage = shouldPlayPercentage - static_cast<int> ((shouldPlayPercentage * 1.9f) / (1 + xDiff));
}
if(card->getManaCost() && card->getManaCost()->getKicker() && card->getManaCost()->getKicker()->isMulti)
{
shouldPlayPercentage = 10* size_t(gotPayments.size())/int(1+(card->getManaCost()->getConvertedCost()+card->getManaCost()->getKicker()->getConvertedCost()));
if(shouldPlayPercentage <= 10)
shouldPlayPercentage = shouldPlayPercentage/3;
}
DebugTrace("Should I play from commandzone" << (card ? card->name : "Nothing" ) << "?" << endl
<<"shouldPlayPercentage = "<< shouldPlayPercentage);
if(card->getRestrictions().size())
{
AbilityFactory af(observer);
int canPlay = af.parseCastRestrictions(card,card->controller(),card->getRestrictions());
if(!canPlay)
continue;
}
int randomChance = randomGenerator.random();
int chance = randomChance % 100;
if (chance > shouldPlayPercentage)
continue;
if(shouldPlayPercentage <= 10)
{
DebugTrace("shouldPlayPercentage was less than 10 this was a lottery roll on RNG");
}
nextCardToPlay = card;
maxCost = currentCost;
if (hasX)
maxCost = pMana->getConvertedCost();
}
}
if(nextCardToPlay)
{
if(!pMana->canAfford(nextCardToPlay->getManaCost()) || nextCardToPlay->getManaCost()->getKicker())

View File

@@ -5543,8 +5543,8 @@ AAMulligan * AAMulligan::clone() const
}
// Remove Mana From ManaPool
AARemoveMana::AARemoveMana(GameObserver* observer, int _id, MTGCardInstance * card, Targetable * _target, string manaDesc, int who) :
ActivatedAbilityTP(observer, _id, card, _target, NULL, who)
AARemoveMana::AARemoveMana(GameObserver* observer, int _id, MTGCardInstance * card, Targetable * _target, string manaDesc, int who, bool forceclean) :
ActivatedAbilityTP(observer, _id, card, _target, NULL, who), forceclean(forceclean)
{
if (!manaDesc.size())
{
@@ -5577,7 +5577,7 @@ int AARemoveMana::resolve()
}
else //Remove all mana
{
if(game->getCurrentGamePhase() != MTG_PHASE_ENDOFTURN)
if(game->getCurrentGamePhase() != MTG_PHASE_ENDOFTURN && !forceclean)
{
if (player->doesntEmpty->getConvertedCost() && !player->poolDoesntEmpty->getConvertedCost())
{
@@ -5624,7 +5624,8 @@ int AARemoveMana::resolve()
}
else //remove a "standard" mana Description
{
((ManaCost *)manaPool)->remove(mManaDesc); //why do I have to cast here?
manaPool->pay(mManaDesc); //Changed because the mana icons were not disappearing.
//((ManaCost *)manaPool)->remove(mManaDesc); //why do I have to cast here?
}
}
return 1;

View File

@@ -3675,7 +3675,10 @@ MTGAbility * AbilityFactory::parseMagicLine(string s, int id, Spell * spell, MTG
if (splitRemove.size())
{
Targetable * t = spell? spell->getNextTarget() : NULL;
MTGAbility *a = NEW AARemoveMana(observer, id, card, t, splitRemove[1], who);
bool forceclean = false;
if(s.find("forceclean")!=string::npos)
forceclean = true;
MTGAbility *a = NEW AARemoveMana(observer, id, card, t, splitRemove[1], who, forceclean);
a->oneShot = 1;
return a;
}