rle.simple.board.item
Class SimpleItemFactory

java.lang.Object
  extended by rle.core.vm.PlugInBase
      extended by rle.simple.board.item.SimpleItemFactory
All Implemented Interfaces:
PlugIn

public class SimpleItemFactory
extends PlugInBase

Used to create items. Item creation follows this basic outline:

 1.  CreationContext info is used to pick item type
 2.  Item object instantiated and setConfig() called
 3.  Magic and any additional properties are handled by a pluggable ItemFinisher
 
Some basic conclusions follow from this. If you'd like to influence the type of item chosen, provide a hint with the CreationContext. If you want higher quality items, use either an ICC hint or provide an ICC with a higher level. If you want to modify bonuses or any other arbitrary stuff modeled by Item attributes, the best place to do so is with an ItemFinisher because it has the last word, although it cannot actually cause a different Item object to be returned.


Field Summary
 
Fields inherited from class rle.core.vm.PlugInBase
config, context, parameters
 
Constructor Summary
SimpleItemFactory()
           
 
Method Summary
 Item create(Board d)
          Create an item with a CreationContext configured for this Board.
 Item create(CreationContext cc)
          Create an item using the given context.
 Item createItem(InfoView info)
           
 
Methods inherited from class rle.core.vm.PlugInBase
config, getContext, getParameters, paramMap, setConfig, setParameters
 
Methods inherited from class java.lang.Object
clone, equals, finalize, getClass, hashCode, notify, notifyAll, toString, wait, wait, wait
 

Constructor Detail

SimpleItemFactory

public SimpleItemFactory()
Method Detail

create

public Item create(Board d)
Create an item with a CreationContext configured for this Board.


create

public Item create(CreationContext cc)
Create an item using the given context.


createItem

public Item createItem(InfoView info)