mirror of
https://github.com/Card-Forge/forge.git
synced 2025-11-18 11:48:02 +00:00
Merge remote-tracking branch 'Core/master' into coremaster
This commit is contained in:
@@ -510,6 +510,15 @@ public class AiCostDecision extends CostDecisionMakerBase {
|
||||
Integer c = cost.convertAmount();
|
||||
if (c == null) {
|
||||
if (ability.getSVar(cost.getAmount()).equals("XChoice")) {
|
||||
if ("SacToReduceCost".equals(ability.getParam("AILogic"))) {
|
||||
// e.g. Torgaar, Famine Incarnate
|
||||
// TODO: currently returns an empty list, so the AI doesn't sacrifice anything. Trying to make
|
||||
// the AI decide on creatures to sac makes the AI sacrifice them, but the cost is not reduced and the
|
||||
// AI pays the full mana cost anyway (despite sacrificing creatures).
|
||||
return PaymentDecision.card(new CardCollection());
|
||||
}
|
||||
|
||||
// Other cards are assumed to be flagged RemAIDeck for now
|
||||
return null;
|
||||
}
|
||||
|
||||
|
||||
@@ -124,6 +124,12 @@ public class LifeSetAi extends SpellAbilityAi {
|
||||
amount = AbilityUtils.calculateAmount(sa.getHostCard(), amountStr, sa);
|
||||
}
|
||||
|
||||
// special cases when amount can't be calculated without targeting first
|
||||
if (amount == 0 && "TargetedPlayer$StartingLife/HalfDown".equals(source.getSVar(amountStr))) {
|
||||
// e.g. Torgaar, Famine Incarnate
|
||||
return doHalfStartingLifeLogic(ai, opponent, sa);
|
||||
}
|
||||
|
||||
if (sourceName.equals("Eternity Vessel")
|
||||
&& (opponent.isCardInPlay("Vampire Hexmage") || (source.getCounters(CounterType.CHARGE) == 0))) {
|
||||
return false;
|
||||
@@ -131,8 +137,7 @@ public class LifeSetAi extends SpellAbilityAi {
|
||||
|
||||
// If the Target is gaining life, target self.
|
||||
// if the Target is modifying how much life is gained, this needs to
|
||||
// be
|
||||
// handled better
|
||||
// be handled better
|
||||
final TargetRestrictions tgt = sa.getTargetRestrictions();
|
||||
if (tgt != null) {
|
||||
sa.resetTargets();
|
||||
@@ -154,4 +159,36 @@ public class LifeSetAi extends SpellAbilityAi {
|
||||
return true;
|
||||
}
|
||||
|
||||
private boolean doHalfStartingLifeLogic(Player ai, Player opponent, SpellAbility sa) {
|
||||
int aiAmount = ai.getStartingLife() / 2;
|
||||
int oppAmount = opponent.getStartingLife() / 2;
|
||||
int aiLife = ai.getLife();
|
||||
int oppLife = opponent.getLife();
|
||||
|
||||
sa.resetTargets();
|
||||
|
||||
final TargetRestrictions tgt = sa.getTargetRestrictions();
|
||||
if (tgt != null) {
|
||||
if (tgt.canOnlyTgtOpponent()) {
|
||||
if (oppLife > oppAmount) {
|
||||
sa.getTargets().add(opponent);
|
||||
} else {
|
||||
return false;
|
||||
}
|
||||
} else {
|
||||
if (aiAmount > ai.getLife() && aiLife < 5) {
|
||||
sa.getTargets().add(ai);
|
||||
} else if (oppLife > oppAmount) {
|
||||
sa.getTargets().add(opponent);
|
||||
} else if (aiAmount > aiLife) {
|
||||
sa.getTargets().add(ai);
|
||||
} else {
|
||||
return false;
|
||||
}
|
||||
}
|
||||
}
|
||||
|
||||
return true;
|
||||
}
|
||||
|
||||
}
|
||||
|
||||
@@ -4,5 +4,5 @@ Types:Creature Human Knight
|
||||
PT:2/2
|
||||
S:Mode$ Continuous | Affected$ Card.Self | AddPower$ X | References$ X | Description$ CARDNAME gets +1/+0 for each legendary creature you control.
|
||||
SVar:X:Count$Valid Creature.Legendary+YouCtrl
|
||||
SVar:BuffedBy:Legendary Creature
|
||||
SVar:BuffedBy:Creature.Legendary
|
||||
Oracle:Benalish Honor Guard gets +1/+0 for each legendary creature you control.
|
||||
|
||||
@@ -1,6 +1,6 @@
|
||||
Name:Charge
|
||||
ManaCost:W
|
||||
Types:Instant
|
||||
A:SP$ PumpAll | Cost$ W | ValidCards$ Creature.YouCtrl | NumAtt$ +1 | SpellDescription$ Creatures you control get +1/+1 until end of turn.
|
||||
A:SP$ PumpAll | Cost$ W | ValidCards$ Creature.YouCtrl | NumAtt$ +1 | NumDef$ +1 | SpellDescription$ Creatures you control get +1/+1 until end of turn.
|
||||
SVar:Picture:http://www.wizards.com/global/images/magic/general/charge.jpg
|
||||
Oracle:Creatures you control get +1/+1 until end of turn.
|
||||
|
||||
@@ -1,8 +1,8 @@
|
||||
Name:Gift of Growth
|
||||
ManaCost:1 G
|
||||
Types:Instant
|
||||
K:Kicker:1 G
|
||||
K:Kicker:2
|
||||
A:SP$ Untap | Cost$ 1 G | ValidTgts$ Creature | TgtPrompt$ Select target creature | SubAbility$ DBPump | SpellDescription$ Untap target creature. It gets +2/+2 until end of turn. If this spell was kicked, that creature gets +4/+4 until end of turn instead.
|
||||
SVar:DBPump:DB$ Pump | Defined$ Targeted | NumAtt$ +X | NumDef$ +X | References$ X
|
||||
SVar:X:Count$Kicked.4.2
|
||||
Oracle:Kicker {2} (You may pay an additional {2} as you cast this spell.)\nUntap target creature. It gets +2/+2 until end of turn. If this spell was kicked, that creature gets +4/+4 until end of turn instead.
|
||||
Oracle:Kicker {2} (You may pay an additional {2} as you cast this spell.)\nUntap target creature. It gets +2/+2 until end of turn. If this spell was kicked, that creature gets +4/+4 until end of turn instead.
|
||||
|
||||
@@ -3,8 +3,8 @@ ManaCost:1 R R
|
||||
Types:Creature Goblin Warrior
|
||||
PT:2/2
|
||||
S:Mode$ ReduceCost | ValidCard$ Goblin | Type$ Spell | Activator$ You | Amount$ 1 | Description$ Goblin spells you cast cost {1} less to cast.
|
||||
S:Mode$ Continuous | Affected$ Creature.Goblin+YouCtrl | AddKeyword$ Haste | Description$ Goblin creatures you control have haste.
|
||||
S:Mode$ Continuous | Affected$ Goblin.YouCtrl | AddKeyword$ Haste | Description$ Goblins you control have haste.
|
||||
SVar:PlayMain1:TRUE
|
||||
SVar:BuffedBy:Goblin
|
||||
SVar:Picture:http://www.wizards.com/global/images/magic/general/goblin_warchief.jpg
|
||||
Oracle:Goblin spells you cast cost {1} less to cast.\nGoblin creatures you control have haste.
|
||||
Oracle:Goblin spells you cast cost {1} less to cast.\nGoblins you control have haste.
|
||||
|
||||
@@ -2,6 +2,6 @@ Name:Llanowar Envoy
|
||||
ManaCost:2 G
|
||||
Types:Creature Elf Scout
|
||||
PT:3/2
|
||||
A:AB$ Mana | Cost$ 1 G | Produced$ Any | SpellDescription$ Add one mana of any color to your mana pool.
|
||||
A:AB$ Mana | Cost$ 1 G | Produced$ Any | SpellDescription$ Add one mana of any color.
|
||||
SVar:RemAIDeck:True
|
||||
Oracle:{1}{G}: Add one mana of any color to your mana pool.
|
||||
Oracle:{1}{G}: Add one mana of any color.
|
||||
|
||||
@@ -6,6 +6,6 @@ T:Mode$ ChangesZone | Origin$ Any | Destination$ Battlefield | ValidCard$ Elf.Ot
|
||||
SVar:TrigPutCounter:DB$ PutCounter | Defined$ Self | CounterType$ P1P1 | CounterNum$ 1
|
||||
A:AB$ Mana | Cost$ T | Produced$ G | Amount$ X | References$ X | SpellDescription$ Add an amount of {G} equal to CARDNAME's power.
|
||||
SVar:X:Count$CardPower
|
||||
DeckHints:Type$Eldrazi
|
||||
DeckHints:Type$Elf
|
||||
SVar:Picture:http://www.wizards.com/global/images/magic/general/marwyn_the_nurturer.jpg
|
||||
Oracle:Whenever another Elf enters the battlefield under your control, put a +1/+1 counter on Marwyn, the Nurturer.\n{T}: Add an amount of {G} equal to Marwyn's power.
|
||||
|
||||
7
forge-gui/res/cardsfolder/n/naban_dean_of_iteration.txt
Normal file
7
forge-gui/res/cardsfolder/n/naban_dean_of_iteration.txt
Normal file
@@ -0,0 +1,7 @@
|
||||
Name:Naban, Dean of Iteration
|
||||
ManaCost:1 U
|
||||
Types:Legendary Creature Human Wizard
|
||||
PT:2/1
|
||||
S:Mode$ Continuous | Affected$ You | AddKeyword$ Panharmonicon:Wizard.YouCtrl | Description$ If a Wizard entering the battlefield under your control causes a triggered ability of a permanent you control to trigger, that ability triggers an additional time.
|
||||
SVar:Picture:http://www.wizards.com/global/images/magic/general/naban_dean_of_iteration.jpg
|
||||
Oracle:If a Wizard entering the battlefield under your control causes a triggered ability of a permanent you control to trigger, that ability triggers an additional time.
|
||||
@@ -1,6 +1,6 @@
|
||||
Name:Shanna, Sisay's Legacy
|
||||
ManaCost:G W
|
||||
Types:Creature Human Warrior
|
||||
Types:Legendary Creature Human Warrior
|
||||
PT:0/0
|
||||
S:Mode$ CantTarget | ValidCard$ Card.Self | ValidSource$ Card | ValidSA$ Activated,Triggered | Activator$ Player.Opponent | Description$ CARDNAME can't be the target of abilities your opponents control.
|
||||
S:Mode$ Continuous | Affected$ Card.Self | AddPower$ X | AddToughness$ X | References$ X | Description$ CARDNAME gets +1/+1 for each creature you control.
|
||||
|
||||
@@ -2,12 +2,11 @@ Name:Torgaar, Famine Incarnate
|
||||
ManaCost:6 B B
|
||||
Types:Legendary Creature Avatar
|
||||
PT:7/6
|
||||
A:SP$ PermanentCreature | Cost$ 6 B B Sac<X/Creature> | Announce$ X | References$ X,Y
|
||||
A:SP$ PermanentCreature | Cost$ 6 B B Sac<X/Creature> | Announce$ X | References$ X,Y | AILogic$ SacToReduceCost
|
||||
S:Mode$ ReduceCost | ValidCard$ Card.Self | Type$ Spell | Amount$ Y | EffectZone$ All | References$ Y | Description$ As an additional cost to cast this spell, you may sacrifice any number of creatures. This spell costs {2} less to cast for each creature sacrificed as an additional cost.
|
||||
SVar:X:XChoice
|
||||
SVar:Y:SVar$X/Times.2
|
||||
T:Mode$ ChangesZone | Origin$ Any | Destination$ Battlefield | ValidCard$ Card.Self | Execute$ TrigSetLife | TriggerDescription$ When CARDNAME enters the battlefield, up to one target player’s life total becomes half their starting life total, rounded down.
|
||||
SVar:TrigSetLife:DB$ SetLife | ValidTgts$ Player | LifeAmount$ HalfLife | TargetMin$ 0 | TargetMax$ 1 | References$ HalfLife
|
||||
SVar:HalfLife:TargetedPlayer$StartingLife/HalfDown
|
||||
SVar:RemAIDeck:True
|
||||
Oracle:As an additional cost to cast this spell, you may sacrifice any number of creatures. This spell costs {2} less to cast for each creature sacrificed as an additional cost.\nWhen Torgaar, Famine Incarnate enters the battlefield, up to one target player’s life total becomes half their starting life total, rounded down.
|
||||
@@ -2,5 +2,5 @@
|
||||
Name:Modern
|
||||
Order:102
|
||||
Type:Sanctioned
|
||||
Sets:8ED, MRD, DST, 5DN, CHK, BOK, SOK, 9ED, RAV, GPT, DIS, CSP, TSP, TSB, PLC, FUT, 10E, LRW, EVE, SHM, MOR, ALA, CFX, ARB, M10, ZEN, WWK, ROE, M11, SOM, MBS, NPH, M12, ISD, DKA, AVR, M13, RTR, GTC, DGM, M14, THS, BNG, JOU, M15, KTK, FRF, DTK, MM2, ORI, BFZ, OGW, SOI, EMN, KLD, AER, AKH, W17, HOU, XLN, RIX
|
||||
Sets:8ED, MRD, DST, 5DN, CHK, BOK, SOK, 9ED, RAV, GPT, DIS, CSP, TSP, TSB, PLC, FUT, 10E, LRW, EVE, SHM, MOR, ALA, CFX, ARB, M10, ZEN, WWK, ROE, M11, SOM, MBS, NPH, M12, ISD, DKA, AVR, M13, RTR, GTC, DGM, M14, THS, BNG, JOU, M15, KTK, FRF, DTK, MM2, ORI, BFZ, OGW, SOI, EMN, KLD, AER, AKH, W17, HOU, XLN, RIX, DOM
|
||||
Banned:Ancient Den; Birthing Pod; Blazing Shoal; Chrome Mox; Cloudpost; Dark Depths; Deathrite Shaman; Dig Through Time; Dread Return; Eye of Ugin; Gitaxian Probe; Glimpse of Nature; Golgari Grave-Troll; Great Furnace; Green Sun's Zenith; Hypergenesis; Mental Misstep; Ponder; Preordain; Punishing Fire; Rite of Flame; Seat of the Synod; Second Sunrise; Seething Song; Sensei's Divining Top; Skullclamp; Splinter Twin; Stoneforge Mystic; Summer Bloom; Treasure Cruise; Tree of Tales; Umezawa's Jitte; Vault of Whispers
|
||||
|
||||
@@ -2,5 +2,5 @@
|
||||
Name:Standard
|
||||
Order:101
|
||||
Type:Sanctioned
|
||||
Sets:KLD, AER, AKH, W17, HOU, XLN, RIX
|
||||
Sets:KLD, AER, AKH, W17, HOU, XLN, RIX, DOM
|
||||
Banned: Attune with Aether; Rogue Refiner; Rampaging Ferocidon; Ramunap Ruins; Smuggler's Copter; Aetherworks Marvel; Felidar Guardian
|
||||
|
||||
@@ -13,6 +13,7 @@ Hedron Alignment|The Alignment|The hedrons are right!
|
||||
Helix Pinnacle|The Tower|The view from the top is great!
|
||||
Hellkite Tyrant|The Hoard|You made your bed of treasure, now lie in it!
|
||||
Laboratory Maniac|The Insanity|No more questions? I'm omniscient now!
|
||||
Lich's Mastery|The Absence of Lifeforce|Life's a lich, then you die.
|
||||
Mayael's Aria|The Gargantuan|Just my shadow weighs a ton!
|
||||
Maze's End|The Labyrinth|What? No bossfight?
|
||||
Mechanized Production|The Rise of Replicas|Welcome to the future of mass production!
|
||||
|
||||
@@ -11,6 +11,7 @@ Arlinn, Embraced by the Moon|Arlinn's Hunt|Fair fight? What fair fight?
|
||||
Ashiok, Nightmare Weaver|Ashiok's Identity|I subscribe to the theory of blank slate!
|
||||
Chandra Ablaze|Chandra's Bargain|I feel like I've seen those before...
|
||||
Chandra Nalaar|Chandra's Rage|Feel the power of my wrath!
|
||||
Chandra, Bold Pyromancer|Chandra's Flame Wave|Let's have a campfire!
|
||||
Chandra, Flamecaller|Chandra's Sea of Flames|You didn't activate this for 0 just to get the achievement, did you?
|
||||
Chandra, Pyrogenius|Chandra's Warm Embrace|Did I say 'warm'? I meant 'red hot'.
|
||||
Chandra, Pyromaster|Chandra's Vengeance|Please file in triplicate!
|
||||
@@ -49,6 +50,7 @@ Jace, Telepath Unbound|Jace's Erasure|First empty your mind and then... nope, th
|
||||
Jace, the Living Guildpact|Jace's Timetwister|Symmetry? What symmetry?
|
||||
Jace, the Mind Sculptor|Jace's Lobotomy|What do you mean, "overpowered"?
|
||||
Jace, Unraveler of Secrets|Jace's Perfect Plan|So, I've read about this neat guy named Erayo...
|
||||
Jaya Ballard|Jaya's Flashback|Fire is easily rekindled.
|
||||
Karn Liberated|Karn's Reset|Let's do this again!
|
||||
Kaya, Ghost Assassin|Kaya's Syphon|You don't MIND, do you?
|
||||
Kiora, Master of the Depths|Kiora's Fight Club|First rule is not to talk about the sucker punches
|
||||
@@ -90,7 +92,9 @@ Sorin, Lord of Innistrad|Sorin's Recruitment|My favorite game is Shogi!
|
||||
Sorin, Solemn Visitor|Sorin's Abyss|Don't get so close to the edge!
|
||||
Tamiyo, Field Researcher|Tamiyo's Omniscience|I know exactly how your story ends...
|
||||
Tamiyo, the Moon Sage|Tamiyo's Recycling|Wash, rinse, repeat!
|
||||
Teferi, Hero of Dominaria|Teferi's Oblivion|Don't worry. It's just a phase.
|
||||
Teferi, Temporal Archmage|Teferi's Time Slip|Let's speed this up a bit!
|
||||
Teferi, Timebender|Teferi's Time Warp|Let's do that again!
|
||||
Tezzeret the Schemer|Tezzeret's Assembly Line|Smashing, isn't it?
|
||||
Tezzeret the Seeker|Tezzeret's Robots|You can't stop the progress!
|
||||
Tezzeret, Agent of Bolas|Tezzeret's Drain|Technological superiority for the win!
|
||||
|
||||
Reference in New Issue
Block a user