v2.2.0: converted inventory spells to use new consumption system
This commit is contained in:
+2
-3
@@ -35,7 +35,6 @@ public abstract class InventorySpell extends Spell {
|
|||||||
|
|
||||||
@Override
|
@Override
|
||||||
protected void onCast(Hero hero) {
|
protected void onCast(Hero hero) {
|
||||||
curItem = detach( hero.belongings.backpack );
|
|
||||||
GameScene.selectItem( itemSelector );
|
GameScene.selectItem( itemSelector );
|
||||||
}
|
}
|
||||||
|
|
||||||
@@ -78,6 +77,8 @@ public abstract class InventorySpell extends Spell {
|
|||||||
}
|
}
|
||||||
|
|
||||||
if (item != null) {
|
if (item != null) {
|
||||||
|
|
||||||
|
curItem = detach(curUser.belongings.backpack);
|
||||||
|
|
||||||
((InventorySpell)curItem).onItemSelected( item );
|
((InventorySpell)curItem).onItemSelected( item );
|
||||||
curUser.spend( 1f );
|
curUser.spend( 1f );
|
||||||
@@ -87,8 +88,6 @@ public abstract class InventorySpell extends Spell {
|
|||||||
Sample.INSTANCE.play( Assets.Sounds.READ );
|
Sample.INSTANCE.play( Assets.Sounds.READ );
|
||||||
Invisibility.dispel();
|
Invisibility.dispel();
|
||||||
|
|
||||||
} else {
|
|
||||||
curItem.collect( curUser.belongings.backpack );
|
|
||||||
}
|
}
|
||||||
}
|
}
|
||||||
};
|
};
|
||||||
|
|||||||
Reference in New Issue
Block a user