forked from External/mage
refactor: added counter removal events (#11989)
This commit is contained in:
parent
860a767cca
commit
52ddcac59d
11 changed files with 385 additions and 36 deletions
29
Mage/src/main/java/mage/game/events/RemoveCounterEvent.java
Normal file
29
Mage/src/main/java/mage/game/events/RemoveCounterEvent.java
Normal file
|
|
@ -0,0 +1,29 @@
|
|||
package mage.game.events;
|
||||
|
||||
import mage.abilities.Ability;
|
||||
import mage.cards.Card;
|
||||
import mage.players.Player;
|
||||
|
||||
public class RemoveCounterEvent extends GameEvent {
|
||||
|
||||
boolean isDamage;
|
||||
|
||||
public RemoveCounterEvent(String name, Card targetCard, Ability source, boolean isDamage){
|
||||
super(GameEvent.EventType.REMOVE_COUNTER, targetCard.getId(), source,
|
||||
(source == null ? null : source.getControllerId()));
|
||||
setData(name);
|
||||
this.isDamage = isDamage;
|
||||
}
|
||||
|
||||
public RemoveCounterEvent(String name, Player targetPlayer, Ability source, boolean isDamage){
|
||||
super(GameEvent.EventType.REMOVE_COUNTER, targetPlayer.getId(), source,
|
||||
(source == null ? null : source.getControllerId()));
|
||||
setData(name);
|
||||
this.isDamage = isDamage;
|
||||
}
|
||||
|
||||
boolean counterRemovedDueToDamage(){
|
||||
return this.isDamage;
|
||||
}
|
||||
|
||||
}
|
||||
Loading…
Add table
Add a link
Reference in a new issue