|
||||||||||
PREV CLASS NEXT CLASS | FRAMES NO FRAMES | |||||||||
SUMMARY: NESTED | FIELD | CONSTR | METHOD | DETAIL: FIELD | CONSTR | METHOD |
java.lang.Objectjurpe.containers.XMLCollection
jurpe.containers.MasterShop
public class MasterShop
Shop type contains every BasicItems and derived available in the game-world.
It is an XMLCollection. A shop contains four ArrayLists of:
XMLCollection
,
BasicItem
,
Serialized FormConstructor Summary | |
---|---|
MasterShop(Skills skills)
Constructor |
Method Summary | |
---|---|
void |
addNewItem(BasicItem sh)
Add Shield object to Shop collection |
void |
addRandomItems(RandomNames names,
ItemValueType ivt,
int number)
Add some random items to the ones available |
java.util.AbstractList<BasicItem> |
getItems()
Get list of items (BasicItems) in this shop. |
java.util.AbstractList<BasicItem> |
getItems(int n)
Get a list of the first n items (BasicItems) in this shop. |
java.util.AbstractList<Weapon> |
getWeapons(Skill skl,
boolean rand)
Get available weapons for a given skill |
void |
shuffleItems()
Changes the order of the items. |
Methods inherited from class jurpe.containers.XMLCollection |
---|
size |
Methods inherited from class java.lang.Object |
---|
equals, getClass, hashCode, notify, notifyAll, toString, wait, wait, wait |
Constructor Detail |
---|
public MasterShop(Skills skills)
skills
- Available Skills For this game.Skills
Method Detail |
---|
public void addNewItem(BasicItem sh)
sh
- Shield to add to the Shoppublic void addRandomItems(RandomNames names, ItemValueType ivt, int number) throws JurpeException
names
- Handle to dictionary.xmlivt
- Value for random items to createnumber
- Number to items to randomly create.
JurpeException
public void shuffleItems()
public java.util.AbstractList<BasicItem> getItems()
BasicItem
public java.util.AbstractList<BasicItem> getItems(int n)
n
- Total number of shields to be returned (actually the first n
ones in the shop.xml)
BasicItem
public java.util.AbstractList<Weapon> getWeapons(Skill skl, boolean rand)
skl
- Skill to search the weapon forrand
- Set to false if you want to search among the weapon from
shop.xml, true if you want to search in the randomly created
weapons
Weapon
|
Jurpe - Java Universal Role Playing Engine - http://jurpe.sourceforge.net | |||||||||
PREV CLASS NEXT CLASS | FRAMES NO FRAMES | |||||||||
SUMMARY: NESTED | FIELD | CONSTR | METHOD | DETAIL: FIELD | CONSTR | METHOD |