forked from External/mage
Refactoring
See github line by line comments in 'File changed'
This commit is contained in:
parent
c0cf22bbf7
commit
f04ba151f7
52 changed files with 87 additions and 220 deletions
|
|
@ -43,7 +43,7 @@ import mage.game.stack.StackObject;
|
|||
*/
|
||||
public class TargetSpell extends TargetObject {
|
||||
|
||||
protected FilterSpell filter;
|
||||
protected final FilterSpell filter;
|
||||
|
||||
public TargetSpell() {
|
||||
this(1, 1, new FilterSpell());
|
||||
|
|
@ -82,10 +82,7 @@ public class TargetSpell extends TargetObject {
|
|||
return false;
|
||||
}
|
||||
Spell spell = game.getStack().getSpell(id);
|
||||
if (spell != null) {
|
||||
return filter.match(spell, source.getSourceId(), source.getControllerId(), game);
|
||||
}
|
||||
return false;
|
||||
return spell != null && filter.match(spell, source.getSourceId(), source.getControllerId(), game);
|
||||
}
|
||||
|
||||
@Override
|
||||
|
|
|
|||
Loading…
Add table
Add a link
Reference in a new issue