Represents an Inventory for player.
rogue.creature.util.Inventory.Inventory |
( |
int |
maximumItems, |
|
|
int |
gold |
|
) |
| |
Creates a new Inventory Object.
- Parameters
-
maximumItems | Amount of Items, a character can carry |
gold | Amount of Gold character initially starts with |
Adds an Item if Inventory is not full.
- Parameters
-
- Returns
- Returns true, if adding Item is successfull, otherwise false (e.g. Inventory is full)
- Exceptions
-
Adds an Item to inventory, if he has enough gold and at least on free inventory space left
- Parameters
-
- Exceptions
-
Takes away amount of Players gold
- Parameters
-
amount | Amount of Gold, Player looses |
- Returns
- true if amount could be decreased, false if an error occured (e.g. not enough gold)
- Exceptions
-
void rogue.creature.util.Inventory.decreaseStability |
( |
| ) |
|
Redzuiert die Haltbarkeit der angelegten Waffe
void rogue.creature.util.Inventory.equip |
( |
Item |
item | ) |
|
Starts to wear an unequipped Item
- Parameters
-
void rogue.creature.util.Inventory.fullInventoryScreen |
( |
Item |
item | ) |
|
Let user select an Item to destroy and auto add new item
- Parameters
-
int rogue.creature.util.Inventory.getBonusDamageOfWornItems |
( |
| ) |
|
Returns the sum of all Bonusdamage
- Returns
- Bonusdamage for user
int rogue.creature.util.Inventory.getHealthBonus |
( |
| ) |
|
Returns sum of all Bonushealth
- Returns
- Bonushealth for user
Item [] rogue.creature.util.Inventory.getWornItems |
( |
| ) |
|
Returns all Items currently worn by user
- Returns
- List of all worn Items by user
void rogue.creature.util.Inventory.increaseGold |
( |
int |
amount | ) |
|
Adds amount to Players gold stash
- Parameters
-
amount | Amount of Gold to add to players gold stash |
ArrayList<Item> rogue.creature.util.Inventory.listBackpack |
( |
| ) |
|
Returns the List of all Items in Inventory
- Returns
- list of all items in inventory
void rogue.creature.util.Inventory.removeItem |
( |
Item |
item | ) |
|
void rogue.creature.util.Inventory.removeItem |
( |
int |
index | ) |
|
Deletes an item from Inventory at given index
- Parameters
-
index | Index from which item should be deleted |
void rogue.creature.util.Inventory.sellItem |
( |
int |
index | ) |
|
Sells Item at Index (adding GoldValue to amount of Gold to players inventory)
- Parameters
-
index | Index of Item to be sold |
void rogue.creature.util.Inventory.showInfo |
( |
int |
place, |
|
|
Terminal |
term |
|
) |
| |
Calls showItem for Item in backpack
- Parameters
-
place | Index of Item to be shown |
term | Used Terminal |
void rogue.creature.util.Inventory.showWorn |
( |
int |
index, |
|
|
Terminal |
term |
|
) |
| |
Calls showItem Method for worn Item
- Parameters
-
index | Index of Item to be shown |
term | Used Terminal |
The documentation for this class was generated from the following file:
- rogue/creature/util/Inventory.java