wyvern.lib.classes.random
Class ArmorEnchanter

java.lang.Object
  extended bywyvern.lib.classes.random.ArmorEnchanter

public class ArmorEnchanter
extends java.lang.Object

Knows how to produce magical armor of a given level by picking a base armor type and adding enchantments.

Version:
1.0, Apr 30, 2001
Author:
Steve Yegge

Field Summary
static int DEFAULT_CURSE_CHANCE
          The default chance that a randomly generated level-1 armor will have a cursed enchantment.
 
Constructor Summary
ArmorEnchanter()
           
 
Method Summary
static GameObject generateArmor(int level)
          Creates a armor (possibly cursed) of the passed level.
static GameObject generateArmor(int level, int curseChance)
          Creates a armor (possibly cursed) of the passed level.
static void main(java.lang.String[] args)
          Tests the enchanter functions.
 
Methods inherited from class java.lang.Object
clone, equals, finalize, getClass, hashCode, notify, notifyAll, toString, wait, wait, wait
 

Field Detail

DEFAULT_CURSE_CHANCE

public static final int DEFAULT_CURSE_CHANCE
The default chance that a randomly generated level-1 armor will have a cursed enchantment. It goes up 1 point per level, up to a maximum of 50% at level 20.

See Also:
Constant Field Values
Constructor Detail

ArmorEnchanter

public ArmorEnchanter()
Method Detail

generateArmor

public static GameObject generateArmor(int level)
Creates a armor (possibly cursed) of the passed level.

Parameters:
level - the level of item to generate

generateArmor

public static GameObject generateArmor(int level,
                                       int curseChance)
Creates a armor (possibly cursed) of the passed level.

Parameters:
level - the level of armor to generate (1-20)
curseChance - the chance the item will have a cursed enchantment on it instead of a normal enchantment (1-100)

main

public static void main(java.lang.String[] args)
Tests the enchanter functions.