mirror of
https://github.com/correl/mage.git
synced 2024-12-25 03:00:15 +00:00
Fixed ClassCastException for Baron Von Count
This commit is contained in:
parent
9258621bf1
commit
6769630308
1 changed files with 4 additions and 2 deletions
|
@ -196,8 +196,9 @@ class BaronVonCountMoveDoomCounterEffect extends OneShotEffect {
|
|||
@Override
|
||||
public boolean apply(Game game, Ability source) {
|
||||
Player controller = game.getPlayer(source.getControllerId());
|
||||
Permanent sourcePermanent = game.getPermanent(source.getSourceId());
|
||||
MageObject mageObject = game.getObject(source.getSourceId());
|
||||
if (controller != null && mageObject != null) {
|
||||
if (controller != null && sourcePermanent != null && mageObject != null) {
|
||||
if (game.getState().getValue(mageObject.getId() + "_doom") == null) {
|
||||
return false;
|
||||
}
|
||||
|
@ -272,8 +273,9 @@ class BaronVonCountDestroyPlayerEffect extends OneShotEffect {
|
|||
game.informPlayers(targetPlayer.getLogName() + " was destroyed");
|
||||
targetPlayer.lost(game); // double checks canLose, but seems more future-proof than lostForced
|
||||
}
|
||||
Permanent sourcePermanent = game.getPermanent(source.getSourceId());
|
||||
MageObject mageObject = game.getObject(source.getSourceId());
|
||||
if (mageObject != null) {
|
||||
if (sourcePermanent != null && mageObject != null) {
|
||||
if (game.getState().getValue(mageObject.getId() + "_doom") == null) {
|
||||
return false;
|
||||
}
|
||||
|
|
Loading…
Reference in a new issue