}
return 0;
}
protected int damageCreature(int damage, UUID sourceId, Game game, boolean preventable, boolean combat) {
GameEvent event = new DamageCreatureEvent(objectId, sourceId, controllerId, damage, preventable, combat);
if (!game.replaceEvent(event)) {
int actualDamage = event.getAmount();
if (actualDamage > 0) {
if (this.damage + event.getAmount() > this.toughness.getValue()) {
actualDamage = this.toughness.getValue() - this.damage;
}
this.damage += actualDamage;
game.fireEvent(new DamagedCreatureEvent(objectId, sourceId, controllerId, actualDamage, combat));
return actualDamage;