* Draft - Fixed that first draft direction is shown as left, second as right and third again to left.

This commit is contained in:
LevelX2 2014-11-19 15:12:17 +01:00
parent 04648eb0eb
commit 2e68f6c692
2 changed files with 17 additions and 17 deletions

View file

@ -133,7 +133,7 @@ public class DraftPanel extends javax.swing.JPanel {
int left = draftView.getPlayers().size() - right;
int height = left * 18;
lblTableImage.setSize(new Dimension(lblTableImage.getWidth(), height));
Image tableImage = ImageHelper.getImageFromResources(draftView.getBoosterNum() == 2 ? "/draft/table_right.png":"/draft/table_left.png");
Image tableImage = ImageHelper.getImageFromResources(draftView.getBoosterNum() == 2 ? "/draft/table_left.png":"/draft/table_right.png");
BufferedImage resizedTable = ImageHelper.getResizedImage(BufferedImageBuilder.bufferImage(tableImage, BufferedImage.TYPE_INT_ARGB), lblTableImage.getWidth());
lblTableImage.setIcon(new ImageIcon(resizedTable));
@ -150,11 +150,11 @@ public class DraftPanel extends javax.swing.JPanel {
int right = players / 2;
int left = players - right;
if (index <= left) {
// left side up (8 - 1)
tablePosition = (9 - index) - (8- left);
// left side down (1 - 8)
tablePosition = index;
} else {
// right side down (9-18)
tablePosition = 8 + (index - left);
// right side up (16 - 9)
tablePosition = 9 + right - (index - left);
}
switch(tablePosition) {
case 1:

View file

@ -36,6 +36,7 @@ import mage.abilities.effects.OneShotEffect;
import mage.abilities.effects.postresolve.ExileSpellEffect;
import mage.cards.Card;
import mage.cards.CardImpl;
import mage.constants.Zone;
import mage.filter.FilterCard;
import mage.filter.predicate.Predicates;
import mage.filter.predicate.mageobject.CardTypePredicate;
@ -100,30 +101,29 @@ class SpelltwineEffect extends OneShotEffect {
@Override
public boolean apply(Game game, Ability source) {
Player you = game.getPlayer(source.getControllerId());
Player controller = game.getPlayer(source.getControllerId());
Card cardOne = game.getCard(source.getTargets().get(0).getFirstTarget());
Card cardTwo = game.getCard(source.getTargets().get(1).getFirstTarget());
if (you != null) {
if (controller != null) {
if (cardOne != null) {
cardOne.moveToExile(null, null, source.getSourceId(), game);
controller.moveCardToExileWithInfo(cardOne, null, "", source.getSourceId(), game, Zone.GRAVEYARD);
}
if (cardTwo != null) {
cardTwo.moveToExile(null, null, source.getSourceId(), game);
controller.moveCardToExileWithInfo(cardTwo, null, "", source.getSourceId(), game, Zone.GRAVEYARD);
}
boolean castCardOne = true;
if (cardOne != null && you.chooseUse(Outcome.Neutral, "Cast the copy of " + cardOne.getName() + " first?", game)) {
Card copyOne = game.copyCard(cardOne, source, you.getId());
you.cast(copyOne.getSpellAbility(), game, true);
if (cardOne != null && controller.chooseUse(Outcome.Neutral, "Cast the copy of " + cardOne.getName() + " first?", game)) {
Card copyOne = game.copyCard(cardOne, source, controller.getId());
controller.cast(copyOne.getSpellAbility(), game, true);
castCardOne = false;
}
if (cardTwo != null) {
Card copyTwo = game.copyCard(cardTwo, source, you.getId());
you.cast(copyTwo.getSpellAbility(), game, true);
Card copyTwo = game.copyCard(cardTwo, source, controller.getId());
controller.cast(copyTwo.getSpellAbility(), game, true);
}
if (cardOne != null && castCardOne) {
Card copyOne = game.copyCard(cardOne, source, you.getId());
you.cast(copyOne.getSpellAbility(), game, true);
Card copyOne = game.copyCard(cardOne, source, controller.getId());
controller.cast(copyOne.getSpellAbility(), game, true);
}
return true;
}