forked from External/mage
[KHM] Implemented Toralf, God of Fury / Toralf's Hammer
This commit is contained in:
parent
e18e3c79d4
commit
c0efada19a
4 changed files with 253 additions and 44 deletions
|
|
@ -1,20 +1,19 @@
|
|||
|
||||
|
||||
package mage.game.events;
|
||||
|
||||
import java.util.UUID;
|
||||
|
||||
/**
|
||||
*
|
||||
* @author BetaSteward_at_googlemail.com
|
||||
*/
|
||||
public abstract class DamagedEvent extends GameEvent {
|
||||
|
||||
protected boolean combat;
|
||||
protected int excess;
|
||||
|
||||
public DamagedEvent(EventType type, UUID targetId, UUID attackerId, UUID playerId, int amount, boolean combat) {
|
||||
super(type, targetId, null, playerId, amount, false);
|
||||
this.combat = combat;
|
||||
this.excess = 0;
|
||||
this.setSourceId(attackerId);
|
||||
}
|
||||
|
||||
|
|
@ -26,4 +25,11 @@ public abstract class DamagedEvent extends GameEvent {
|
|||
return flag;
|
||||
}
|
||||
|
||||
public void setExcess(int excess) {
|
||||
this.excess = Math.max(excess, 0);
|
||||
}
|
||||
|
||||
public int getExcess() {
|
||||
return excess;
|
||||
}
|
||||
}
|
||||
|
|
|
|||
Loading…
Add table
Add a link
Reference in a new issue