mirror of
https://github.com/correl/mage.git
synced 2025-01-12 11:08:01 +00:00
* Bitter Feud - Fixed a bug that it did not work for damage dealt by Planeswalker.
This commit is contained in:
parent
64176c1fa6
commit
cd387234cf
1 changed files with 13 additions and 1 deletions
|
@ -136,6 +136,18 @@ class BitterFeudEffect extends ReplacementEffectImpl {
|
||||||
return new BitterFeudEffect(this);
|
return new BitterFeudEffect(this);
|
||||||
}
|
}
|
||||||
|
|
||||||
|
@Override
|
||||||
|
public boolean checksEventType(GameEvent event, Game game) {
|
||||||
|
switch(event.getType()) {
|
||||||
|
case DAMAGE_CREATURE:
|
||||||
|
case DAMAGE_PLAYER:
|
||||||
|
case DAMAGE_PLANESWALKER:
|
||||||
|
return true;
|
||||||
|
default:
|
||||||
|
return false;
|
||||||
|
}
|
||||||
|
}
|
||||||
|
|
||||||
@Override
|
@Override
|
||||||
public boolean applies(GameEvent event, Ability source, Game game) {
|
public boolean applies(GameEvent event, Ability source, Game game) {
|
||||||
player1 = (Player) game.getState().getValue(source.getSourceId() + "_player1");
|
player1 = (Player) game.getState().getValue(source.getSourceId() + "_player1");
|
||||||
|
@ -147,7 +159,7 @@ class BitterFeudEffect extends ReplacementEffectImpl {
|
||||||
targetPlayerId = event.getTargetId();
|
targetPlayerId = event.getTargetId();
|
||||||
break;
|
break;
|
||||||
case DAMAGE_CREATURE:
|
case DAMAGE_CREATURE:
|
||||||
case DAMAGED_PLANESWALKER:
|
case DAMAGE_PLANESWALKER:
|
||||||
Permanent permanent = game.getPermanent(event.getTargetId());
|
Permanent permanent = game.getPermanent(event.getTargetId());
|
||||||
if (permanent != null) {
|
if (permanent != null) {
|
||||||
targetPlayerId = permanent.getControllerId();
|
targetPlayerId = permanent.getControllerId();
|
||||||
|
|
Loading…
Reference in a new issue