Make it so Chaos Wheel spins after winning a game

This commit is contained in:
drdev
2016-01-10 18:12:16 +00:00
parent 8e5822fe82
commit bc7a6fef0d
6 changed files with 33 additions and 5 deletions

View File

@@ -187,6 +187,7 @@ public final class ConquestData {
public void addWin(ConquestEvent event) {
getOrCreatePlaneData(event.getLocation().getPlane()).addWin(event);
getSelectedCommander().getRecord().addWin();
event.setConquered(true);
}
public void addLoss(ConquestEvent event) {

View File

@@ -12,6 +12,7 @@ public abstract class ConquestEvent {
private final ConquestLocation location;
private final int tier;
private Deck opponentDeck;
private boolean conquered;
public ConquestEvent(ConquestLocation location0, int tier0) {
location = location0;
@@ -33,6 +34,13 @@ public abstract class ConquestEvent {
return opponentDeck;
}
public boolean wasConquered() {
return conquered;
}
public void setConquered(boolean conquered0) {
conquered = conquered0;
}
protected abstract Deck buildOpponentDeck();
public abstract void addVariants(Set<GameType> variants);
public abstract String getEventName();

View File

@@ -113,7 +113,7 @@ public class ConquestLocation implements IXmlWritable {
catch (Exception e) { return false; }
}
public ConquestEvent getEvent() {
public ConquestEvent createEvent() {
//TODO: Make this pull from predefined events
return new ConquestEvent(this, 0) {
private final PaperCard commander = Aggregates.random(getRegion().getCommanders());