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(); }
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); }
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); }
public void heal(Soldier soldier) { healNoMessage(soldier); if (player) BottomPanel.log(soldier.getName() + " healed", "blue"); }