Remove unnecessary cases for target arrows

This commit is contained in:
drdev
2014-06-26 01:14:26 +00:00
parent 0a03f7b69a
commit f0a2809638

View File

@@ -84,82 +84,16 @@ public class TargetingOverlay {
List<Card> cardsVisualized = new ArrayList<Card>(); List<Card> cardsVisualized = new ArrayList<Card>();
cardsVisualized.add(c); cardsVisualized.add(c);
Card enchanting = c.getEnchantingCard();
Card equipping = c.getEquippingCard();
Card fortifying = c.getFortifyingCard();
List<Card> enchantedBy = c.getEnchantedBy();
List<Card> equippedBy = c.getEquippedBy();
List<Card> fortifiedBy = c.getFortifiedBy();
Card paired = c.getPairedWith(); Card paired = c.getPairedWith();
if (paired != null) {
if (null != enchanting) {
if (!enchanting.getController().equals(c.getController())) {
arcsOther.add(new Vector2[] {
endpoints.get(enchanting.getUniqueNumber()),
endpoints.get(c.getUniqueNumber())
});
cardsVisualized.add(enchanting);
}
}
if (null != equipping) {
if (!equipping.getController().equals(c.getController())) {
arcsOther.add(new Vector2[] {
endpoints.get(equipping.getUniqueNumber()),
endpoints.get(c.getUniqueNumber())
});
cardsVisualized.add(equipping);
}
}
if (null != fortifying) {
if (!fortifying.getController().equals(c.getController())) {
arcsOther.add(new Vector2[] {
endpoints.get(fortifying.getUniqueNumber()),
endpoints.get(c.getUniqueNumber())
});
cardsVisualized.add(fortifying);
}
}
if (null != enchantedBy) {
for (Card enc : enchantedBy) {
if (!enc.getController().equals(c.getController())) {
arcsOther.add(new Vector2[] {
endpoints.get(c.getUniqueNumber()),
endpoints.get(enc.getUniqueNumber())
});
cardsVisualized.add(enc);
}
}
}
if (null != equippedBy) {
for (Card eq : equippedBy) {
if (!eq.getController().equals(c.getController())) {
arcsOther.add(new Vector2[] {
endpoints.get(c.getUniqueNumber()),
endpoints.get(eq.getUniqueNumber())
});
cardsVisualized.add(eq);
}
}
}
if (null != fortifiedBy) {
for (Card eq : fortifiedBy) {
if (!eq.getController().equals(c.getController())) {
arcsOther.add(new Vector2[] {
endpoints.get(c.getUniqueNumber()),
endpoints.get(eq.getUniqueNumber())
});
cardsVisualized.add(eq);
}
}
}
if (null != paired) {
arcsOther.add(new Vector2[] { arcsOther.add(new Vector2[] {
endpoints.get(paired.getUniqueNumber()), endpoints.get(paired.getUniqueNumber()),
endpoints.get(c.getUniqueNumber()) endpoints.get(c.getUniqueNumber())
}); });
cardsVisualized.add(paired); cardsVisualized.add(paired);
} }
if (null != combat) {
if (combat != null) {
for (Card planeswalker : combat.getDefendingPlaneswalkers()) { for (Card planeswalker : combat.getDefendingPlaneswalkers()) {
List<Card> cards = combat.getAttackersOf(planeswalker); List<Card> cards = combat.getAttackersOf(planeswalker);
for (Card pwAttacker : cards) { for (Card pwAttacker : cards) {