v0.4.0: refactored artifacts storing their image reference

This commit is contained in:
Evan Debenham
2016-05-13 16:24:31 -04:00
parent 07ec295889
commit c96966f54d
4 changed files with 28 additions and 19 deletions
@@ -32,6 +32,7 @@ import com.shatteredpixel.shatteredpixeldungeon.sprites.ItemSpriteSheet;
import com.shatteredpixel.shatteredpixeldungeon.utils.GLog;
import com.shatteredpixel.shatteredpixeldungeon.windows.WndOptions;
import com.watabou.noosa.audio.Sample;
import com.watabou.utils.Bundle;
import com.watabou.utils.Random;
import java.util.ArrayList;
@@ -123,6 +124,13 @@ public class ChaliceOfBlood extends Artifact {
return super.upgrade();
}
@Override
public void restoreFromBundle(Bundle bundle) {
super.restoreFromBundle(bundle);
if (level() >= 7) image = ItemSpriteSheet.ARTIFACT_CHALICE3;
else if (level() >= 3) image = ItemSpriteSheet.ARTIFACT_CHALICE2;
}
@Override
protected ArtifactBuff passiveBuff() {
return new chaliceRegen();