mirror of
https://github.com/magefree/mage.git
synced 2025-12-25 13:02:06 -08:00
parent
92b722d3ca
commit
11373fd75d
3 changed files with 39 additions and 8 deletions
|
|
@ -68,15 +68,15 @@ public class PlayFromTopOfLibraryEffect extends AsThoughEffectImpl {
|
|||
public boolean applies(UUID objectId, Ability affectedAbility, Ability source, Game game, UUID playerId) {
|
||||
// can play lands/spells (must check specific part and allows specific part)
|
||||
|
||||
Card cardToCheck = game.getCard(objectId); // maybe this should be removed and only check SpellAbility characteristics
|
||||
Card cardToCheck = game.getCard(objectId); // maybe this should be removed and only check SpellAbility characteristics -- No! don't forget PlayLandAbility
|
||||
if (cardToCheck == null) {
|
||||
return false;
|
||||
}
|
||||
if (affectedAbility instanceof SpellAbility) {
|
||||
SpellAbility spell = (SpellAbility) affectedAbility;
|
||||
cardToCheck = spell.getCharacteristics(game);
|
||||
if (spell.getManaCosts().isEmpty()){
|
||||
return false;
|
||||
if (spell.getManaCosts().isEmpty()) {
|
||||
return false; // prevent casting cards without mana cost?
|
||||
}
|
||||
}
|
||||
// only permits you to cast
|
||||
|
|
|
|||
Loading…
Add table
Add a link
Reference in a new issue