mirror of
https://github.com/magefree/mage.git
synced 2026-01-10 04:42:07 -08:00
Fixes issue when source for damage isn't on the battlefield anymore
This commit is contained in:
parent
480f30d30f
commit
8ea3cc741c
1 changed files with 7 additions and 0 deletions
|
|
@ -864,6 +864,12 @@ public abstract class PlayerImpl<T extends PlayerImpl<T>> implements Player, Ser
|
|||
int actualDamage = event.getAmount();
|
||||
if (actualDamage > 0) {
|
||||
Permanent source = game.getPermanent(sourceId);
|
||||
if(source == null){
|
||||
MageObject lastKnownInformation = game.getLastKnownInformation(sourceId, Zone.BATTLEFIELD);
|
||||
if(lastKnownInformation instanceof Permanent){
|
||||
source = (Permanent) lastKnownInformation;
|
||||
}
|
||||
}
|
||||
if (source != null && (source.getAbilities().containsKey(InfectAbility.getInstance().getId()))) {
|
||||
addCounters(CounterType.POISON.createInstance(actualDamage), game);
|
||||
} else {
|
||||
|
|
@ -1389,6 +1395,7 @@ public abstract class PlayerImpl<T extends PlayerImpl<T>> implements Player, Ser
|
|||
// do nothing
|
||||
}
|
||||
|
||||
@Override
|
||||
public void setAllowBadMoves(boolean allowBadMoves) {
|
||||
// do nothing
|
||||
}
|
||||
|
|
|
|||
Loading…
Add table
Add a link
Reference in a new issue