Planar conquest updates

This commit is contained in:
drdev
2015-03-14 01:39:40 +00:00
parent 12f2411b05
commit 30dfaaf6df
3 changed files with 5 additions and 2 deletions

View File

@@ -96,6 +96,9 @@ public class ConquestMapScreen extends FScreen {
} }
int startIndex = regionIndex * rows * cols; int startIndex = regionIndex * rows * cols;
int position = startIndex + row * cols + col; int position = startIndex + row * cols + col;
if (position > model.getProgress()) {
return false;
}
model.setPlaneswalkerPosition(position); model.setPlaneswalkerPosition(position);
return true; return true;
} }
@@ -185,7 +188,7 @@ public class ConquestMapScreen extends FScreen {
else { else {
//draw planeswalker token above stop //draw planeswalker token above stop
int planeswalkerPosition = model.getPlaneswalkerPosition() - startIndex; int planeswalkerPosition = model.getPlaneswalkerPosition() - startIndex;
if (planeswalkerPosition < opponents.size()) { if (planeswalkerPosition >= 0 && planeswalkerPosition < opponents.size()) {
GridPosition pos = new GridPosition(startIndex, planeswalkerPosition); GridPosition pos = new GridPosition(startIndex, planeswalkerPosition);
x0 = x + colWidth * pos.col + iconOffsetX; x0 = x + colWidth * pos.col + iconOffsetX;
y0 = y + rowHeight * pos.row + iconOffsetY; y0 = y + rowHeight * pos.row + iconOffsetY;

Binary file not shown.

Before

Width:  |  Height:  |  Size: 322 KiB

After

Width:  |  Height:  |  Size: 172 KiB

View File

@@ -50,7 +50,7 @@ public final class ConquestData {
private int wins, losses; private int wins, losses;
private int winStreakBest = 0; private int winStreakBest = 0;
private int winStreakCurrent = 0; private int winStreakCurrent = 0;
private int progress = 0; private int progress = 100;
private int planewalkerPosition = 0; private int planewalkerPosition = 0;
private int difficulty; private int difficulty;
private ConquestPlane startingPlane, currentPlane; private ConquestPlane startingPlane, currentPlane;