v0.2.4b: fixed issue with unstable spellbook, also tweaked how artifacts deal with charge caps on load.
This commit is contained in:
@@ -142,15 +142,12 @@ public class CloakOfShadows extends Artifact {
|
|||||||
return desc;
|
return desc;
|
||||||
}
|
}
|
||||||
|
|
||||||
//Note: cloak needs to bundle chargecap as it is dynamic.
|
|
||||||
private static final String CHARGECAP = "chargecap";
|
|
||||||
private static final String STEALTHED = "stealthed";
|
private static final String STEALTHED = "stealthed";
|
||||||
private static final String COOLDOWN = "cooldown";
|
private static final String COOLDOWN = "cooldown";
|
||||||
|
|
||||||
@Override
|
@Override
|
||||||
public void storeInBundle( Bundle bundle ) {
|
public void storeInBundle( Bundle bundle ) {
|
||||||
super.storeInBundle(bundle);
|
super.storeInBundle(bundle);
|
||||||
bundle.put( CHARGECAP, chargeCap );
|
|
||||||
bundle.put( STEALTHED, stealthed );
|
bundle.put( STEALTHED, stealthed );
|
||||||
bundle.put( COOLDOWN, cooldown );
|
bundle.put( COOLDOWN, cooldown );
|
||||||
}
|
}
|
||||||
@@ -158,7 +155,6 @@ public class CloakOfShadows extends Artifact {
|
|||||||
@Override
|
@Override
|
||||||
public void restoreFromBundle( Bundle bundle ) {
|
public void restoreFromBundle( Bundle bundle ) {
|
||||||
super.restoreFromBundle(bundle);
|
super.restoreFromBundle(bundle);
|
||||||
chargeCap = bundle.getInt( CHARGECAP );
|
|
||||||
stealthed = bundle.getBoolean( STEALTHED );
|
stealthed = bundle.getBoolean( STEALTHED );
|
||||||
cooldown = bundle.getInt( COOLDOWN );
|
cooldown = bundle.getInt( COOLDOWN );
|
||||||
}
|
}
|
||||||
|
|||||||
@@ -150,15 +150,12 @@ public class TimekeepersHourglass extends Artifact {
|
|||||||
}
|
}
|
||||||
|
|
||||||
|
|
||||||
//needs to bundle chargecap as it is dynamic.
|
|
||||||
private static final String CHARGECAP = "chargecap";
|
|
||||||
private static final String SANDBAGS = "sandbags";
|
private static final String SANDBAGS = "sandbags";
|
||||||
private static final String BUFF = "buff";
|
private static final String BUFF = "buff";
|
||||||
|
|
||||||
@Override
|
@Override
|
||||||
public void storeInBundle( Bundle bundle ) {
|
public void storeInBundle( Bundle bundle ) {
|
||||||
super.storeInBundle(bundle);
|
super.storeInBundle(bundle);
|
||||||
bundle.put( CHARGECAP, chargeCap );
|
|
||||||
bundle.put( SANDBAGS, sandBags );
|
bundle.put( SANDBAGS, sandBags );
|
||||||
|
|
||||||
if (activeBuff != null)
|
if (activeBuff != null)
|
||||||
@@ -168,7 +165,6 @@ public class TimekeepersHourglass extends Artifact {
|
|||||||
@Override
|
@Override
|
||||||
public void restoreFromBundle( Bundle bundle ) {
|
public void restoreFromBundle( Bundle bundle ) {
|
||||||
super.restoreFromBundle(bundle);
|
super.restoreFromBundle(bundle);
|
||||||
chargeCap = bundle.getInt( CHARGECAP );
|
|
||||||
sandBags = bundle.getInt( SANDBAGS );
|
sandBags = bundle.getInt( SANDBAGS );
|
||||||
|
|
||||||
//these buffs belong to hourglass, need to handle unbundling within the hourglass class.
|
//these buffs belong to hourglass, need to handle unbundling within the hourglass class.
|
||||||
|
|||||||
@@ -111,7 +111,7 @@ public class UnstableSpellbook extends Artifact {
|
|||||||
|
|
||||||
@Override
|
@Override
|
||||||
public Item upgrade() {
|
public Item upgrade() {
|
||||||
chargeCap = (((level+1)/2)+1);
|
chargeCap = (((level+1)/2)+3);
|
||||||
|
|
||||||
//for artifact transmutation.
|
//for artifact transmutation.
|
||||||
while (scrolls.size() > (levelCap-1-level))
|
while (scrolls.size() > (levelCap-1-level))
|
||||||
@@ -161,21 +161,17 @@ public class UnstableSpellbook extends Artifact {
|
|||||||
return desc;
|
return desc;
|
||||||
}
|
}
|
||||||
|
|
||||||
//needs to bundle chargecap as it is dynamic.
|
|
||||||
private static final String CHARGECAP = "chargecap";
|
|
||||||
private static final String SCROLLS = "scrolls";
|
private static final String SCROLLS = "scrolls";
|
||||||
|
|
||||||
@Override
|
@Override
|
||||||
public void storeInBundle( Bundle bundle ) {
|
public void storeInBundle( Bundle bundle ) {
|
||||||
super.storeInBundle(bundle);
|
super.storeInBundle(bundle);
|
||||||
bundle.put( CHARGECAP, chargeCap );
|
|
||||||
bundle.put( SCROLLS, scrolls.toArray(new String[scrolls.size()]) );
|
bundle.put( SCROLLS, scrolls.toArray(new String[scrolls.size()]) );
|
||||||
}
|
}
|
||||||
|
|
||||||
@Override
|
@Override
|
||||||
public void restoreFromBundle( Bundle bundle ) {
|
public void restoreFromBundle( Bundle bundle ) {
|
||||||
super.restoreFromBundle(bundle);
|
super.restoreFromBundle(bundle);
|
||||||
chargeCap = bundle.getInt( CHARGECAP );
|
|
||||||
scrolls.clear();
|
scrolls.clear();
|
||||||
Collections.addAll(scrolls, bundle.getStringArray(SCROLLS));
|
Collections.addAll(scrolls, bundle.getStringArray(SCROLLS));
|
||||||
}
|
}
|
||||||
|
|||||||
Reference in New Issue
Block a user