forked from External/mage
Spells on the stack can now get counters.
This commit is contained in:
parent
5de03a4165
commit
3b3f136d34
6 changed files with 38 additions and 21 deletions
|
|
@ -105,13 +105,10 @@ public class SpellStack extends ArrayDeque<StackObject> {
|
|||
|
||||
public Spell getSpell(UUID id) {
|
||||
for (StackObject stackObject: this) {
|
||||
if (stackObject.getId().equals(id)) {
|
||||
if (stackObject instanceof Spell) {
|
||||
if (stackObject instanceof Spell) {
|
||||
if (stackObject.getId().equals(id) || stackObject.getSourceId().equals(id)) {
|
||||
return (Spell)stackObject;
|
||||
}
|
||||
else {
|
||||
return null;
|
||||
}
|
||||
}
|
||||
}
|
||||
return null;
|
||||
|
|
|
|||
Loading…
Add table
Add a link
Reference in a new issue