jurpe.system.generation
Class CostGenerator

java.lang.Object
  extended by jurpe.system.generation.CostGenerator

public final class CostGenerator
extends java.lang.Object

This class generates costs for randomly created items.


Constructor Summary
CostGenerator(int bc, int um, int lm)
          Constructor.
CostGenerator(int bc, int um, int lm, double umw, int lmw)
          Constructor
 
Method Summary
 int getCost()
          Get the cost
 int getReduction()
          Get reduction
static void main(java.lang.String[] args)
           
 void setLowerModifier(int lm)
          Set lower modifier
 void setUpperModifier(int um)
          Set upper modifier
 
Methods inherited from class java.lang.Object
equals, getClass, hashCode, notify, notifyAll, toString, wait, wait, wait
 

Constructor Detail

CostGenerator

public CostGenerator(int bc,
                     int um,
                     int lm)
Constructor. Commonly used parameters are: 50,x,2 (Random Items) where x is modifier

Parameters:
bc - Basic Cost for item (minimum value)
um - Parameter that exponentially affects cost (ie: IQ + 2, 2 is upperModifier)
lm - Parameter that lowers the cost (IE: in armors, their weight)

CostGenerator

public CostGenerator(int bc,
                     int um,
                     int lm,
                     double umw,
                     int lmw)
Constructor

Parameters:
bc - Basic Cost for item (minimum value)
um - Parameter that exponentially affects cost (ie: IQ + 2, 2 is upperModifier)
umw - Weight for upper Modifier
lm - Parameter that lowers the cost (IE: in armors, their weight)
lmw - Weight for lower Modifier
Method Detail

setUpperModifier

public void setUpperModifier(int um)
Set upper modifier

Parameters:
um - UpperModifier

setLowerModifier

public void setLowerModifier(int lm)
Set lower modifier

Parameters:
lm - UpperModifier

getCost

public int getCost()
Get the cost

Returns:
Computed cost

getReduction

public int getReduction()
Get reduction

Returns:
Cost reduction

main

public static void main(java.lang.String[] args)

Jurpe - Java Universal Role Playing Engine - http://jurpe.sourceforge.net