mirror of
https://github.com/correl/mage.git
synced 2024-11-15 11:09:30 +00:00
* Void Winnower - Fixed that {X} costs of spells were not taken into account for the can't cast spells ability.
This commit is contained in:
parent
f3184bb6c8
commit
b3deb7bedd
1 changed files with 3 additions and 2 deletions
|
@ -44,6 +44,7 @@ import mage.game.Game;
|
|||
import mage.game.events.GameEvent;
|
||||
import mage.game.events.GameEvent.EventType;
|
||||
import mage.game.permanent.Permanent;
|
||||
import mage.game.stack.Spell;
|
||||
|
||||
/**
|
||||
*
|
||||
|
@ -115,9 +116,9 @@ class VoidWinnowerCantCastEffect extends ContinuousRuleModifyingEffectImpl {
|
|||
public boolean applies(GameEvent event, Ability source, Game game) {
|
||||
if (game.getOpponents(source.getControllerId()).contains(event.getPlayerId())) {
|
||||
MageObject object = game.getObject(event.getSourceId());
|
||||
if (object != null) {
|
||||
if (object != null && (object instanceof Spell)) {
|
||||
// the low bit will always be set on an odd number.
|
||||
return (object.getManaCost().convertedManaCost() & 1) == 0;
|
||||
return (((Spell) object).getConvertedManaCost() & 1) == 0;
|
||||
}
|
||||
}
|
||||
return false;
|
||||
|
|
Loading…
Reference in a new issue