StrEffect.java
jmud-0.11/src/StrEffect.java · 653 B
From the archive jmud-0_11.tgz
Download the archive « Back to the archive contents
class StrEffect extends Effect {
private int theValue;
StrEffect(int duration, Affectable vict, int value) {
super(duration, vict);
theValue = value;
}
void apply(boolean quiet) {
super.apply(quiet);
theVictim.addStr(theValue);
if (!quiet)
theVictim.send(theValue >= 0 ? "Sua força aumenta!" : "Sua força diminui.");
}
void undo(boolean quiet) {
super.undo(quiet);
theVictim.addStr(-theValue);
if (!quiet)
theVictim.send(theValue >= 0 ? "Sua força diminui!" : "Sua força aumenta.");
}
public String getSheet() {
return "força " + theValue + ": " + super.getSheet();
}
}