v0.2.3: refactoring/tweaks to artifacts and active buffs

This commit is contained in:
Evan Debenham 2014-12-08 16:34:50 -05:00
parent 6fc71c9f8b
commit 59df503355
2 changed files with 15 additions and 9 deletions

View File

@ -114,6 +114,11 @@ public class Artifact extends KindofMisc {
passiveBuff.detach();
passiveBuff = null;
if (activeBuff != null){
activeBuff.detach();
activeBuff = null;
}
return true;
} else {

View File

@ -86,16 +86,8 @@ public class CloakOfShadows extends Artifact {
GLog.i("You return from underneath your cloak.");
}
} else {
if (stealthed) {
stealthed = false;
activeBuff.detach();
activeBuff = null;
GLog.i("You return from underneath your cloak.");
}
} else
super.execute(hero, action);
}
}
@Override
@ -107,6 +99,15 @@ public class CloakOfShadows extends Artifact {
}
}
@Override
public boolean doUnequip(Hero hero, boolean collect, boolean single) {
if (super.doUnequip(hero, collect, single)){
stealthed = false;
return true;
} else
return false;
}
@Override
protected ArtifactBuff passiveBuff() {
return new cloakRecharge();