mirror of
https://github.com/Card-Forge/forge.git
synced 2025-11-15 10:18:01 +00:00
Merge remote-tracking branch 'core/master'
This commit is contained in:
@@ -1537,11 +1537,11 @@ public class AiController {
|
||||
top = game.getStack().peekAbility();
|
||||
}
|
||||
final boolean topOwnedByAI = top != null && top.getActivatingPlayer().equals(player);
|
||||
final boolean mustRespond = top != null && top.hasParam("AIRespondsToOwnAbility");
|
||||
|
||||
if (topOwnedByAI) {
|
||||
// AI's own spell: should probably let my stuff resolve first, but may want to copy the SA or respond to it
|
||||
// in a scripted timed fashion.
|
||||
final boolean mustRespond = top.hasParam("AIRespondsToOwnAbility");
|
||||
|
||||
if (!mustRespond) {
|
||||
saList = ComputerUtilAbility.getSpellAbilities(cards, player); // get the SA list early to check for copy SAs
|
||||
@@ -1567,6 +1567,10 @@ public class AiController {
|
||||
|
||||
SpellAbility chosenSa = chooseSpellAbilityToPlayFromList(saList, true);
|
||||
|
||||
if (topOwnedByAI && !mustRespond && chosenSa != ComputerUtilAbility.getFirstCopySASpell(saList)) {
|
||||
return null; // not planning to copy the spell and not marked as something the AI would respond to
|
||||
}
|
||||
|
||||
return chosenSa;
|
||||
}
|
||||
|
||||
|
||||
@@ -310,6 +310,8 @@ public abstract class GameState {
|
||||
newText.append("|Flipped");
|
||||
} else if (c.getCurrentStateName().equals(CardStateName.Meld)) {
|
||||
newText.append("|Meld");
|
||||
} else if (c.getCurrentStateName().equals(CardStateName.Modal)) {
|
||||
newText.append("|Modal");
|
||||
}
|
||||
if (c.isAttachedToEntity()) {
|
||||
newText.append("|AttachedTo:").append(c.getEntityAttachedTo().getId());
|
||||
@@ -1252,6 +1254,9 @@ public abstract class GameState {
|
||||
zone.setCards(kv.getValue());
|
||||
}
|
||||
}
|
||||
for (Card cmd : p.getCommanders()) {
|
||||
p.getZone(ZoneType.Command).add(Player.createCommanderEffect(p.getGame(), cmd));
|
||||
}
|
||||
}
|
||||
|
||||
/**
|
||||
@@ -1322,7 +1327,10 @@ public abstract class GameState {
|
||||
c.setState(CardStateName.Flipped, true);
|
||||
} else if (info.startsWith("Meld")) {
|
||||
c.setState(CardStateName.Meld, true);
|
||||
} else if (info.startsWith("OnAdventure")) {
|
||||
} else if (info.startsWith("Modal")) {
|
||||
c.setState(CardStateName.Modal, true);
|
||||
}
|
||||
else if (info.startsWith("OnAdventure")) {
|
||||
String abAdventure = "DB$ Effect | RememberObjects$ Self | StaticAbilities$ Play | ExileOnMoved$ Exile | Duration$ Permanent | ConditionDefined$ Self | ConditionPresent$ Card.nonCopiedSpell";
|
||||
AbilitySub saAdventure = (AbilitySub)AbilityFactory.getAbility(abAdventure, c);
|
||||
StringBuilder sbPlay = new StringBuilder();
|
||||
@@ -1334,10 +1342,8 @@ public abstract class GameState {
|
||||
c.setExiledWith(c); // This seems to be the way it's set up internally. Potentially not needed here?
|
||||
c.setExiledBy(c.getController());
|
||||
} else if (info.startsWith("IsCommander")) {
|
||||
// TODO: This doesn't seem to properly restore the ability to play the commander. Why?
|
||||
c.setCommander(true);
|
||||
player.setCommanders(Lists.newArrayList(c));
|
||||
player.getZone(ZoneType.Command).add(Player.createCommanderEffect(player.getGame(), c));
|
||||
} else if (info.startsWith("Id:")) {
|
||||
int id = Integer.parseInt(info.substring(3));
|
||||
idToCard.put(id, c);
|
||||
|
||||
@@ -26,7 +26,7 @@ public class RearrangeTopOfLibraryAi extends SpellAbilityAi {
|
||||
final PhaseHandler ph = aiPlayer.getGame().getPhaseHandler();
|
||||
final Card source = sa.getHostCard();
|
||||
|
||||
if (source.isPermanent() && sa.getRestrictions().isInstantSpeed()
|
||||
if (source.isPermanent() && !sa.getRestrictions().isSorcerySpeed()
|
||||
&& (sa.getPayCosts().hasTapCost() || sa.getPayCosts().hasManaCost())) {
|
||||
// If it has an associated cost, try to only do this before own turn
|
||||
if (!(ph.is(PhaseType.END_OF_TURN) && ph.getNextTurn() == aiPlayer)) {
|
||||
|
||||
@@ -67,7 +67,7 @@ Staff of Zegon|ATQ
|
||||
Strip Mine|ATQ
|
||||
Su-Chi|ATQ
|
||||
Tablet of Epityr|ATQ
|
||||
#Tawnos's Coffin|ATQ
|
||||
Tawnos's Coffin|ATQ
|
||||
Tawnos's Wand|ATQ
|
||||
Tawnos's Weaponry|ATQ
|
||||
Tetravus|ATQ
|
||||
@@ -78,7 +78,7 @@ Triskelion|ATQ
|
||||
Urza's Avenger|ATQ
|
||||
Urza's Chalice|ATQ
|
||||
Urza's Mine|ATQ
|
||||
#Urza's Miter|ATQ
|
||||
Urza's Miter|ATQ
|
||||
Urza's Power Plant|ATQ
|
||||
Urza's Tower|ATQ
|
||||
Wall of Spears|ATQ
|
||||
@@ -146,7 +146,7 @@ Oasis|ARN
|
||||
Old Man of the Sea|ARN
|
||||
Oubliette|ARN
|
||||
Piety|ARN
|
||||
#Pyramids|ARN
|
||||
Pyramids|ARN
|
||||
Repentant Blacksmith|ARN
|
||||
Ring of Ma'ruf|ARN
|
||||
Rukh Egg|ARN
|
||||
@@ -154,7 +154,7 @@ Sandals of Abdallah|ARN
|
||||
Sandstorm|ARN
|
||||
Serendib Djinn|ARN
|
||||
Serendib Efreet|ARN
|
||||
#Shahrazad|ARN
|
||||
Shahrazad|ARN
|
||||
Sindbad|ARN
|
||||
Singing Tree|ARN
|
||||
Sorceress Queen|ARN
|
||||
@@ -162,7 +162,7 @@ Stone-Throwing Devils|ARN
|
||||
Unstable Mutation|ARN
|
||||
War Elephant|ARN
|
||||
Wyluli Wolf|ARN
|
||||
#Ydwen Efreet|ARN
|
||||
Ydwen Efreet|ARN
|
||||
AErathi Berserker|LEG
|
||||
Abomination|LEG
|
||||
Acid Rain|LEG
|
||||
@@ -226,7 +226,7 @@ Deadfall|LEG
|
||||
Demonic Torment|LEG
|
||||
Devouring Deep|LEG
|
||||
Disharmony|LEG
|
||||
#Divine Intervention|LEG
|
||||
Divine Intervention|LEG
|
||||
Divine Offering|LEG
|
||||
Divine Transformation|LEG
|
||||
Dream Coat|LEG
|
||||
@@ -263,11 +263,11 @@ Ghosts of the Damned|LEG
|
||||
Giant Slug|LEG
|
||||
Giant Strength|LEG
|
||||
Giant Turtle|LEG
|
||||
#Glyph of Delusion|LEG
|
||||
Glyph of Delusion|LEG
|
||||
Glyph of Destruction|LEG
|
||||
Glyph of Doom|LEG
|
||||
Glyph of Life|LEG
|
||||
#Glyph of Reincarnation|LEG
|
||||
Glyph of Reincarnation|LEG
|
||||
Gosta Dirk|LEG
|
||||
Gravity Sphere|LEG
|
||||
Great Defender|LEG
|
||||
@@ -292,7 +292,7 @@ Hunding Gjornersen|LEG
|
||||
Hyperion Blacksmith|LEG
|
||||
Ichneumon Druid|LEG
|
||||
Immolation|LEG
|
||||
#Imprison|LEG
|
||||
Imprison|LEG
|
||||
In the Eye of Chaos|LEG
|
||||
Indestructible Aura|LEG
|
||||
Infernal Medusa|LEG
|
||||
@@ -375,7 +375,7 @@ Ramirez DePietro|LEG
|
||||
Ramses Overdark|LEG
|
||||
Rapid Fire|LEG
|
||||
Rasputin Dreamweaver|LEG
|
||||
#Rebirth|LEG
|
||||
Rebirth|LEG
|
||||
Recall|LEG
|
||||
Red Mana Battery|LEG
|
||||
Reincarnation|LEG
|
||||
@@ -422,7 +422,7 @@ Syphon Soul|LEG
|
||||
Takklemaggot|LEG
|
||||
Telekinesis|LEG
|
||||
Teleport|LEG
|
||||
#Tempest Efreet|LEG
|
||||
Tempest Efreet|LEG
|
||||
Tetsuo Umezawa|LEG
|
||||
The Abyss|LEG
|
||||
The Brute|LEG
|
||||
@@ -551,7 +551,7 @@ Earthbind|LEB
|
||||
Earthquake|LEB
|
||||
Elvish Archers|LEB
|
||||
Evil Presence|LEB
|
||||
#False Orders|LEB
|
||||
False Orders|LEB
|
||||
Farmstead|LEB
|
||||
Fastbond|LEB
|
||||
Fear|LEB
|
||||
@@ -592,7 +592,7 @@ Hurricane|LEB
|
||||
Hypnotic Specter|LEB
|
||||
Ice Storm|LEB
|
||||
Icy Manipulator|LEB
|
||||
#Illusionary Mask|LEB
|
||||
Illusionary Mask|LEB
|
||||
Instill Energy|LEB
|
||||
Invisibility|LEB
|
||||
Iron Star|LEB
|
||||
@@ -659,7 +659,7 @@ Phantom Monster|LEB
|
||||
Pirate Ship|LEB
|
||||
Plague Rats|LEB
|
||||
Plateau|LEB
|
||||
#Power Leak|LEB
|
||||
Power Leak|LEB
|
||||
Power Sink|LEB
|
||||
Power Surge|LEB
|
||||
Prodigal Sorcerer|LEB
|
||||
@@ -676,7 +676,7 @@ Resurrection|LEB
|
||||
Reverse Damage|LEB
|
||||
Righteousness|LEB
|
||||
Roc of Kher Ridges|LEB
|
||||
#Rock Hydra|LEB
|
||||
Rock Hydra|LEB
|
||||
Rod of Ruin|LEB
|
||||
Royal Assassin|LEB
|
||||
Sacrifice|LEB
|
||||
@@ -857,7 +857,7 @@ Scavenger Folk|DRK
|
||||
#Season of the Witch|DRK
|
||||
Sisters of the Flame|DRK
|
||||
Skull of Orm|DRK
|
||||
#Sorrow's Path|DRK
|
||||
Sorrow's Path|DRK
|
||||
Spitting Slug|DRK
|
||||
Squire|DRK
|
||||
Standing Stones|DRK
|
||||
@@ -874,8 +874,8 @@ Venom|DRK
|
||||
Wand of Ith|DRK
|
||||
War Barge|DRK
|
||||
Water Wurm|DRK
|
||||
#Whippoorwill|DRK
|
||||
Whippoorwill|DRK
|
||||
Witch Hunter|DRK
|
||||
Word of Binding|DRK
|
||||
#Worms of the Earth|DRK
|
||||
Worms of the Earth|DRK
|
||||
Wormwood Treefolk|DRK
|
||||
|
||||
File diff suppressed because it is too large
Load Diff
File diff suppressed because it is too large
Load Diff
File diff suppressed because it is too large
Load Diff
File diff suppressed because it is too large
Load Diff
Reference in New Issue
Block a user