mirror of
https://github.com/Card-Forge/forge.git
synced 2025-11-19 12:18:00 +00:00
Clean up
This commit is contained in:
@@ -1202,7 +1202,7 @@ public class AiAttackController {
|
|||||||
}
|
}
|
||||||
|
|
||||||
// look at the attacker in relation to the blockers to establish a
|
// look at the attacker in relation to the blockers to establish a
|
||||||
// number of factors about the attacking context that will be relevant
|
// number of factors about the attacking context that will be relevant
|
||||||
// to the attackers decision according to the selected strategy
|
// to the attackers decision according to the selected strategy
|
||||||
for (final Card defender : validBlockers) {
|
for (final Card defender : validBlockers) {
|
||||||
// if both isWorthLessThanAllKillers and canKillAllDangerous are false there's nothing more to check
|
// if both isWorthLessThanAllKillers and canKillAllDangerous are false there's nothing more to check
|
||||||
|
|||||||
@@ -191,7 +191,7 @@ public class ChooseCardAi extends SpellAbilityAi {
|
|||||||
} else if (logic.equals("NeedsPrevention")) {
|
} else if (logic.equals("NeedsPrevention")) {
|
||||||
final Game game = ai.getGame();
|
final Game game = ai.getGame();
|
||||||
final Combat combat = game.getCombat();
|
final Combat combat = game.getCombat();
|
||||||
CardCollectionView better = CardLists.filter(options, new Predicate<Card>() {
|
CardCollectionView better = CardLists.filter(options, new Predicate<Card>() {
|
||||||
@Override
|
@Override
|
||||||
public boolean apply(final Card c) {
|
public boolean apply(final Card c) {
|
||||||
if (combat == null || !combat.isAttacking(c, ai) || !combat.isUnblocked(c)) {
|
if (combat == null || !combat.isAttacking(c, ai) || !combat.isUnblocked(c)) {
|
||||||
|
|||||||
@@ -526,16 +526,16 @@ public class PumpAi extends PumpAiBase {
|
|||||||
}
|
}
|
||||||
list = getCurseCreatures(ai, sa, defense, attack, keywords);
|
list = getCurseCreatures(ai, sa, defense, attack, keywords);
|
||||||
} else {
|
} else {
|
||||||
if (!tgt.canTgtCreature()) {
|
|
||||||
ZoneType zone = tgt.getZone().get(0);
|
|
||||||
list = new CardCollection(game.getCardsIn(zone));
|
|
||||||
} else {
|
|
||||||
list = getPumpCreatures(ai, sa, defense, attack, keywords, immediately);
|
|
||||||
}
|
|
||||||
if (sa.canTarget(ai)) {
|
if (sa.canTarget(ai)) {
|
||||||
sa.getTargets().add(ai);
|
sa.getTargets().add(ai);
|
||||||
return true;
|
return true;
|
||||||
}
|
}
|
||||||
|
if (tgt.canTgtCreature()) {
|
||||||
|
list = getPumpCreatures(ai, sa, defense, attack, keywords, immediately);
|
||||||
|
} else {
|
||||||
|
ZoneType zone = tgt.getZone().get(0);
|
||||||
|
list = new CardCollection(game.getCardsIn(zone));
|
||||||
|
}
|
||||||
}
|
}
|
||||||
|
|
||||||
list = CardLists.getValidCards(list, tgt.getValidTgts(), ai, source, sa);
|
list = CardLists.getValidCards(list, tgt.getValidTgts(), ai, source, sa);
|
||||||
|
|||||||
@@ -426,6 +426,7 @@ public class TargetRestrictions {
|
|||||||
*/
|
*/
|
||||||
public final boolean canTgtCreature() {
|
public final boolean canTgtCreature() {
|
||||||
for (final String s : this.validTgts) {
|
for (final String s : this.validTgts) {
|
||||||
|
// TODO check IsCommander when in that variant
|
||||||
if ((s.contains("Creature") || s.startsWith("Permanent"))
|
if ((s.contains("Creature") || s.startsWith("Permanent"))
|
||||||
&& !s.contains("nonCreature")) {
|
&& !s.contains("nonCreature")) {
|
||||||
return true;
|
return true;
|
||||||
|
|||||||
@@ -1,6 +1,6 @@
|
|||||||
Name:Seismic Shift
|
Name:Seismic Shift
|
||||||
ManaCost:3 R
|
ManaCost:3 R
|
||||||
Types:Sorcery
|
Types:Sorcery
|
||||||
A:SP$ Destroy | Cost$ 3 R | ValidTgts$ Land | TgtPrompt$ Select target artifact or land | SubAbility$ DBPump | SpellDescription$ Destroy target land.
|
A:SP$ Destroy | Cost$ 3 R | ValidTgts$ Land | TgtPrompt$ Select target land | SubAbility$ DBPump | SpellDescription$ Destroy target land.
|
||||||
SVar:DBPump:DB$ Pump | ValidTgts$ Creature | KW$ HIDDEN CARDNAME can't block. | IsCurse$ True | TargetMin$ 0 | TargetMax$ 2 | TgtPrompt$ Select up to two target creatures | SpellDescription$ Up to two target creatures can't block this turn.
|
SVar:DBPump:DB$ Pump | ValidTgts$ Creature | KW$ HIDDEN CARDNAME can't block. | IsCurse$ True | TargetMin$ 0 | TargetMax$ 2 | TgtPrompt$ Select up to two target creatures | SpellDescription$ Up to two target creatures can't block this turn.
|
||||||
Oracle:Destroy target land. Up to two target creatures can't block this turn.
|
Oracle:Destroy target land. Up to two target creatures can't block this turn.
|
||||||
|
|||||||
Reference in New Issue
Block a user