Example #1
0
  public void distributeExp(int total) {
    if (this.player) System.out.println("distributing " + total + " exp to you");
    if (this.player) BottomPanel.log("Party receives " + total + " experience!", "green");

    int exp = (int) (total / 1.0 / getHealthySize());
    getHealthy().shrink();
    for (int i = 0; i < getHealthy().size; i++) getHealthy().get(i).addExp(exp);
    wounded.sort();
    healthy.sort();
  }
Example #2
0
 public void givePrisoner(Soldier prisoner, Party recipient) {
   if (this.wounded.contains(prisoner, true)) this.wounded.removeValue(prisoner, true);
   else if (this.healthy.contains(prisoner, true)) this.healthy.removeValue(prisoner, true);
   else BottomPanel.log("trying to add invalid prisoner", "red");
   recipient.addPrisoner(prisoner);
 }
Example #3
0
 public void returnPrisoner(Soldier prisoner, Party recipient) {
   if (this.prisoners.contains(prisoner, true)) this.prisoners.removeValue(prisoner, true);
   else BottomPanel.log("trying to remove invalid prisoner", "red");
   recipient.addSoldier(prisoner);
 }
Example #4
0
 public void heal(Soldier soldier) {
   healNoMessage(soldier);
   if (player) BottomPanel.log(soldier.getName() + " healed", "blue");
 }