mirror of
https://github.com/Relintai/mtg-forge-ios.git
synced 2025-04-15 00:48:26 +02:00
- Some improvements in ComputerUtilCombat regarding predicting attack clone effects and MustBeBlocked.
git-svn-id: http://svn.slightlymagic.net/forge/trunk@35710 269b9781-a132-4a9b-9d4e-f004f1b56b58
This commit is contained in:
parent
bb602eb5af
commit
851845fcf3
@ -407,7 +407,11 @@ public class ComputerUtilCombat {
|
|||||||
|
|
||||||
if (blockers.isEmpty()) {
|
if (blockers.isEmpty()) {
|
||||||
if (!attacker.getSVar("MustBeBlocked").equals("")) {
|
if (!attacker.getSVar("MustBeBlocked").equals("")) {
|
||||||
return true;
|
boolean cond = !"attackingplayer".equalsIgnoreCase(attacker.getSVar("MustBeBlocked"))
|
||||||
|
|| combat.getDefenderByAttacker(attacker) instanceof Player;
|
||||||
|
if (cond) {
|
||||||
|
return true;
|
||||||
|
}
|
||||||
}
|
}
|
||||||
}
|
}
|
||||||
if (threateningCommanders.contains(attacker)) {
|
if (threateningCommanders.contains(attacker)) {
|
||||||
@ -2543,9 +2547,12 @@ public class ComputerUtilCombat {
|
|||||||
if (exec != null) {
|
if (exec != null) {
|
||||||
if (exec.getApi() == ApiType.Clone && "Self".equals(exec.getParam("CloneTarget"))
|
if (exec.getApi() == ApiType.Clone && "Self".equals(exec.getParam("CloneTarget"))
|
||||||
&& exec.hasParam("ValidTgts") && exec.getParam("ValidTgts").contains("Creature")
|
&& exec.hasParam("ValidTgts") && exec.getParam("ValidTgts").contains("Creature")
|
||||||
&& exec.getParam("ValidTgts").contains("+attacking")) {
|
&& exec.getParam("ValidTgts").contains("attacking")) {
|
||||||
// Tilonalli's Skinshifter and potentially other similar cards that can clone other stuff
|
// Tilonalli's Skinshifter and potentially other similar cards that can clone other stuff
|
||||||
// while attacking
|
// while attacking
|
||||||
|
if (exec.getParam("ValidTgts").contains("nonLegendary") && attacker.getType().isLegendary()) {
|
||||||
|
continue;
|
||||||
|
}
|
||||||
int maxPwr = 0;
|
int maxPwr = 0;
|
||||||
for (Card c : attacker.getController().getCreaturesInPlay()) {
|
for (Card c : attacker.getController().getCreaturesInPlay()) {
|
||||||
if (c.getNetPower() > maxPwr || (c.getNetPower() == maxPwr && ComputerUtilCard.evaluateCreature(c) > ComputerUtilCard.evaluateCreature(attackerAfterTrigs))) {
|
if (c.getNetPower() > maxPwr || (c.getNetPower() == maxPwr && ComputerUtilCard.evaluateCreature(c) > ComputerUtilCard.evaluateCreature(attackerAfterTrigs))) {
|
||||||
|
Loading…
Reference in New Issue
Block a user