1 package de.jos.game.xml; 2 3 public class Action { 4 5 public static final int TYPE_NONE = 0; 6 public static final int TYPE_TIME_BONUS = 1; 7 public static final int TYPE_NEXT_SCORE_MULTIPLICATOR = 2; 8 public static final int TYPE_CLEAR_BOARD_COLOR = 3; 9 public static final int TYPE_RESET_REAR_RANK = 4; 10 public static final int TYPE_RECHARGE_BALLS = 5; 11 public static final int TYPE_FOUR_BALL_FORMATIONS = 6; 12 13 private Integer timeBonus = null; 14 private String nextScoreMultiplicator = null; 15 private Integer clearBoardColor = null; 16 private Integer resetRearRank = null; 17 private String rechargeBalls = null; 18 private String fourBallFormations = null; 19 private String descriptionKey = null; 20 private String description = null; 21 private String descriptionShort = null; 22 23 private int type = TYPE_NONE; 24 25 public void updateType() { 26 if (getTimeBonus() != null) { 27 type = TYPE_TIME_BONUS; 28 } else if (getNextScoreMultiplicator() != null) { 29 type = TYPE_NEXT_SCORE_MULTIPLICATOR; 30 } else if (getClearBoardColor() != null) { 31 type = TYPE_CLEAR_BOARD_COLOR; 32 } else if (getResetRearRank() != null) { 33 type = TYPE_RESET_REAR_RANK; 34 } else if (getRechargeBalls() != null) { 35 type = TYPE_RECHARGE_BALLS; 36 } else if (getFourBallFormations() != null) { 37 type = TYPE_FOUR_BALL_FORMATIONS; 38 } 39 } 40 41 public int getType() { 42 return type; 43 } 44 45 public void setType(int type) { 46 this.type = type; 47 } 48 49 public Integer getClearBoardColor() { 50 return clearBoardColor; 51 } 52 53 public void setClearBoardColor(Integer clearBoardColor) { 54 this.clearBoardColor = clearBoardColor; 55 } 56 57 public String getDescriptionKey() { 58 return descriptionKey; 59 } 60 61 public void setDescriptionKey(String descriptionKey) { 62 this.descriptionKey = descriptionKey; 63 } 64 65 public String getFourBallFormations() { 66 return fourBallFormations; 67 } 68 69 public void setFourBallFormations(String fourBallFormations) { 70 this.fourBallFormations = fourBallFormations; 71 } 72 73 public String getNextScoreMultiplicator() { 74 return nextScoreMultiplicator; 75 } 76 77 public void setNextScoreMultiplicator(String nextScoreMultiplicator) { 78 this.nextScoreMultiplicator = nextScoreMultiplicator; 79 } 80 81 public String getRechargeBalls() { 82 return rechargeBalls; 83 } 84 85 public void setRechargeBalls(String rechargeBalls) { 86 this.rechargeBalls = rechargeBalls; 87 } 88 89 public Integer getResetRearRank() { 90 return resetRearRank; 91 } 92 93 public void setResetRearRank(Integer resetRearRank) { 94 this.resetRearRank = resetRearRank; 95 } 96 97 public Integer getTimeBonus() { 98 return timeBonus; 99 } 100 101 public void setTimeBonus(Integer timeBonus) { 102 this.timeBonus = timeBonus; 103 } 104 105 public String getDescriptionShort() { 106 return descriptionShort; 107 } 108 109 public void setDescriptionShort(String descriptionShort) { 110 this.descriptionShort = descriptionShort; 111 } 112 113 public String getDescription() { 114 return description; 115 } 116 117 public void setDescription(String description) { 118 this.description = description; 119 } 120 121 }