|
||||||||||
PREV CLASS NEXT CLASS | FRAMES NO FRAMES | |||||||||
SUMMARY: NESTED | FIELD | CONSTR | METHOD | DETAIL: FIELD | CONSTR | METHOD |
java.lang.Objectjurpe.containers.XMLCollection
jurpe.system.generation.RandomNames
public final class RandomNames
Class for creating random names for monsters, items, and such. Random names may be composed by 2 or 3 words. In case of 2 words they are in the form attribute+name, ie: Red Dragon, in case of 3 words they are in the form attribute+name+geography, ie: Red Dragon of the Mysty Lands. Strings are read from an XML file like dictionary.xml. You may specify tags to read from. When read, strings are stored in ArrayList of ValuedString objects. You may then ask for a string with an associated value. Higher values corresponds to rarer objects.
Constructor Summary | |
---|---|
RandomNames()
Constructor with default values. |
|
RandomNames(java.lang.String attribute,
java.lang.String name,
java.lang.String geography,
java.lang.String armor,
java.lang.String shield)
Constructor. |
Method Summary | |
---|---|
java.lang.String |
getArmor(ItemValueType value)
Get random generated armor name. |
java.lang.String |
getAttribute(ItemValueType value)
Get random generated attribute (Red, Mysty, Hungry ...). |
java.lang.String |
getCompleteMonsterName()
Get generated a complete Monster name (attribute+name+geography)., with a default level of 100 points. |
java.lang.String |
getCompleteMonsterName(int value)
Get generated a complete Monster name (attribute+name+geography). |
java.lang.String |
getGeography(ItemValueType value)
Get random generated geography (of the Red Lands, of the Misty Mountains ...). |
java.lang.String |
getMonsterName(ItemValueType value)
Get random generated monster name (kavu, donkey, dragon ...). |
java.lang.String |
getShield(ItemValueType value)
Get random generated shield name. |
static void |
main(java.lang.String[] args)
Deprecated. |
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 RandomNames()
public RandomNames(java.lang.String attribute, java.lang.String name, java.lang.String geography, java.lang.String armor, java.lang.String shield)
attribute
- The first tag name to be read from dictionary.xmlname
- The second tag name to be read from dictionary.xmlgeography
- The third tag name to be read from dictionary.xmlarmor
- The fourth tag name to be read from dictionary.xmlshield
- The fifth tag name to be read from dictionary.xmlMethod Detail |
---|
public java.lang.String getCompleteMonsterName()
public java.lang.String getCompleteMonsterName(int value)
value
- monster level (monster character points) (from 40 to 140)
public java.lang.String getAttribute(ItemValueType value)
value
- Rarity or exceptionality. Range from 10 (common) to 70 (rare)
public java.lang.String getGeography(ItemValueType value)
value
- Rarity or exceptionality. Range from 10 (common) to 70 (rare)
public java.lang.String getShield(ItemValueType value)
value
- Rarity or exceptionality. Range from 10 (common) to 70 (rare)
public java.lang.String getArmor(ItemValueType value)
value
- Rarity or exceptionality. Range from 10 (common) to 70 (rare)
public java.lang.String getMonsterName(ItemValueType value)
value
- Rarity or exceptionality. Range from 10 (common) to 70 (rare)
public static void main(java.lang.String[] args)
args
- not used
|
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 |