v0.4.1: wands now charge slightly faster when in the wand holster
This commit is contained in:
parent
64b0f46a06
commit
2166d13c62
|
@ -31,6 +31,8 @@ public class WandHolster extends Bag {
|
|||
|
||||
size = 12;
|
||||
}
|
||||
|
||||
public static float HOLSTER_SCALE_FACTOR = 0.85f;
|
||||
|
||||
@Override
|
||||
public boolean grab( Item item ) {
|
||||
|
@ -42,7 +44,7 @@ public class WandHolster extends Bag {
|
|||
if (super.collect( container )) {
|
||||
if (owner != null) {
|
||||
for (Item item : items) {
|
||||
((Wand)item).charge( owner );
|
||||
((Wand)item).charge( owner, HOLSTER_SCALE_FACTOR );
|
||||
}
|
||||
}
|
||||
return true;
|
||||
|
|
|
@ -35,6 +35,7 @@ import com.shatteredpixel.shatteredpixeldungeon.actors.hero.HeroSubClass;
|
|||
import com.shatteredpixel.shatteredpixeldungeon.effects.MagicMissile;
|
||||
import com.shatteredpixel.shatteredpixeldungeon.items.Item;
|
||||
import com.shatteredpixel.shatteredpixeldungeon.items.bags.Bag;
|
||||
import com.shatteredpixel.shatteredpixeldungeon.items.bags.WandHolster;
|
||||
import com.shatteredpixel.shatteredpixeldungeon.items.weapon.melee.MagesStaff;
|
||||
import com.shatteredpixel.shatteredpixeldungeon.mechanics.Ballistica;
|
||||
import com.shatteredpixel.shatteredpixeldungeon.messages.Messages;
|
||||
|
@ -107,7 +108,10 @@ public abstract class Wand extends Item {
|
|||
public boolean collect( Bag container ) {
|
||||
if (super.collect( container )) {
|
||||
if (container.owner != null) {
|
||||
charge( container.owner );
|
||||
if (container instanceof WandHolster)
|
||||
charge( container.owner, ((WandHolster) container).HOLSTER_SCALE_FACTOR );
|
||||
else
|
||||
charge( container.owner );
|
||||
}
|
||||
return true;
|
||||
} else {
|
||||
|
|
|
@ -315,7 +315,7 @@ items.bags.seedpouch.name=seed pouch
|
|||
items.bags.seedpouch.desc=This small velvet pouch allows you to store any number of seeds in it. Very convenient.
|
||||
|
||||
items.bags.wandholster.name=wand holster
|
||||
items.bags.wandholster.desc=This slim holster is made from some exotic animal, and is designed to compactly hold many wands.
|
||||
items.bags.wandholster.desc=This slim holster is made from some exotic animal hide, and is designed to compactly hold many wands.\n\nThe holster projects a magical field around itself, causing all wands inside to recharge slightly faster.
|
||||
|
||||
|
||||
|
||||
|
|
Loading…
Reference in New Issue
Block a user