Spells on the stack can now get counters.

This commit is contained in:
LevelX2 2014-05-02 16:45:26 +02:00
parent 5de03a4165
commit 3b3f136d34
6 changed files with 38 additions and 21 deletions

View file

@ -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;