|
||||||||||
PREV CLASS NEXT CLASS | FRAMES NO FRAMES | |||||||||
SUMMARY: NESTED | FIELD | CONSTR | METHOD | DETAIL: FIELD | CONSTR | METHOD |
java.lang.Object wyvern.kernel.properties.PList wyvern.kernel.maps.MapObject wyvern.lib.classes.random.RandomObject wyvern.lib.classes.random.RandomRing
Generates random rings for dungeons and such. The more powerful the ring, the more rare it is. Some rings are generated with curses, with more nastier being more likely to be cursed.
Field Summary |
Fields inherited from class wyvern.lib.classes.random.RandomObject |
DEFAULT_BAG_CHANCE |
Fields inherited from class wyvern.kernel.maps.MapObject |
IN_MAP_EDITOR, listenerList_ |
Fields inherited from class wyvern.kernel.properties.PList |
readOnly_ |
Fields inherited from interface wyvern.lib.PropertyList |
PROPERTY_PACKAGE |
Constructor Summary | |
RandomRing()
|
Method Summary | |
GameObject |
generate()
Produces a random ring. |
void |
generateMixed(GameObject ring)
Adds more or less equally-weighted properties to the ring, one good one and one bad one. |
void |
generateMixedResistance(GameObject ring)
Generates one resistance and one vulnerability. |
void |
generateMixedStats(GameObject ring)
Generates one positive stat and one negative stat, each level 1. |
void |
generatePlusMinus(GameObject ring,
int level)
Adds one good OR one bad property to the ring (50/50). |
void |
generateStat(GameObject obj,
int level)
Puts a positive or negative (50/50) adjustment on a random stat or skill. |
static void |
main(java.lang.String[] args)
Tests the class. |
void |
transform(GameMap map,
int x,
int y)
Generates a ring and sets it in the map. |
Methods inherited from class wyvern.lib.classes.random.RandomObject |
addChanceProperty, addObjProperty, addRandomProperty, createBag, generateFromList, getBagChance, getCurseChance, getLevel, getListName, setContainer, setDangerLevelFromMap, setMap, transferProperties, usingList, usingSingleArch |
Methods inherited from class java.lang.Object |
clone, equals, finalize, getClass, hashCode, notify, notifyAll, wait, wait, wait |
Constructor Detail |
public RandomRing()
Method Detail |
public void transform(GameMap map, int x, int y)
transform
in class RandomObject
map
- the map to put the generated ring in.x
- x locationy
- y locationpublic GameObject generate()
generate
in class RandomObject
public void generateMixed(GameObject ring)
ring
- the same object, with extra properties added to it.
The object's identified-description and shop value will be
updated appropriately.public void generateMixedResistance(GameObject ring)
public void generateMixedStats(GameObject ring)
public void generatePlusMinus(GameObject ring, int level)
level
- 1 for +/-1, 2 for +/-2, etc.ring
- the same object, with extra properties added to it.
The object's identified-description and shop value will be
updated appropriately.public void generateStat(GameObject obj, int level)
obj
- the object to add it tolevel
- the int adjustment to addpublic static void main(java.lang.String[] args)
|
||||||||||
PREV CLASS NEXT CLASS | FRAMES NO FRAMES | |||||||||
SUMMARY: NESTED | FIELD | CONSTR | METHOD | DETAIL: FIELD | CONSTR | METHOD |