DotF-GUI Item Data

==// Rough Draft (Basic Outline) - Many variables are excluded in all or some of the code.==
==Item (public class Item)==
String itemName, itemDescription, itemRarity, itemType; double itemValue, itemWeight;
public Item()
{
itemName = "";
itemValue = 0;
itemDescription = "";
itemRarity = "";
itemType = "";
itemWeight = 1.0; // Note: Must add this to all constructors!!!
}
public Item(String itemName, double itemValue, String itemDescription, String itemType)
{
this.itemName = itemName;
this.itemValue = itemValue;
this.itemDescription = itemDescription;
this.itemType = itemType;
itemRarity = "";
}
public Item(String itemName, double itemValue, String itemDescription, String itemRarity, String itemType)
{
this.itemName = itemName; // e.g. "Derp Sword"
this.itemValue = itemValue; // e.g. 5
this.itemDescription = itemDescription; // e.g. "This sword is broken. You can't even equip it. l0l"
this.itemRarity = itemRarity; // e.g. "common", "uncommon", "rare", etc.
this.itemType = itemType; // e.g. "weapon", "armor", "misc".
}
/* Other Constructors */
/* get/set Methods */
==Misc. Item (public class ItemMisc extends Item)==
public ItemMisc(String itemName, double itemValue, String itemDescription, String itemRarity, String itemType)
{
super(itemName, itemValue, itemDescription, itemRarity, itemType);
}
/* Other Constructors */
==Equip Item (public class itemEquip extends Item)==
String itemType, itemClassRestriction; double itemStrengthBoost, itemDexterityBoost, itemEnduranceBoost, itemIntelligenceBoost, itemWillpowerBoost, itemCharismaBoost, itemHealthBoost, itemManaBoost, itemFatigueBoost, itemDamageMinBoost, itemDamageMaxBoost, itemArmorBoost, itemMentalResistanceBoost, itemInitiativeBoost, itemCarryingCapacityBoost, itemRangeBoost, itemStrengthRequirement, itemDexterityRequirement, itemEnduranceRequirement, itemIntelligenceRequirement, itemWillpowerRequirement, itemCharismaRequirement; boolean hasAbility; Arraylist<String> abilityList = new Arraylist<String>();
public itemEquip(String itemName, double itemValue, String itemDescription, String itemRarity, String itemType)
{
super(itemName, itemValue, itemDescription, itemRarity, itemType);
// All stat boost/deduction values are set to 0 here by using their set methods. Negative integer = deduction. hasAbility is set to false and abilityList is empty.
}
/* Other Constructors (Super Long Constructor) */
/* get/set Methods */
==Weapon Item (public class itemWeapon extends ItemEquip)==
String itemWeaponType; boolean[] itemPossibleWeaponSlots = new boolean[3]; boolean itemTwoHand, hasStrengthRoll, hasDexterityRoll, hasIntelligenceRoll, isDefensiveItem;
public itemWeapon(String itemName, double itemValue, String itemDescription, String itemRarity, String itemType)
{
super(itemName, itemValue, itemDescription, itemRarity, itemType, itemRarity, itemType);
itemWeaponType = "";
itemPossibleWeaponSlots = new boolean[3];
itemTwoHand = false; // These should be false by default when declared but whatever.
hasStrengthRoll = true;
hasDexterityRoll = false;
hasIntelligenceRoll = false;
isDefensiveItem = false;
}
public itemWeapon(String itemName, double itemValue, String itemDescription, String itemRarity, String itemType, String itemWeaponType, boolean itemPossibleWeaponSlotOne, boolean itemPossibleWeaponSlotTwo, boolean itemPossibleWeaponSlotThree, boolean itemTwoHand)
{
super(itemName, itemValue, itemDescription, itemRarity, itemType);
this.itemWeaponType = itemWeaponType; // Weapon Type as in "1H sword", "2H axe", "mainhand dagger", "offhand shield", etc. Shields will be classified as a defensive weapon for organizational vanity (OR MAY BE PUT INTO A COMPLETELY DIFFERENT CATEGORY AMG).
itemPossibleWeaponSlots[0] = itemPossibleWeaponSlotOne; // Can you equip this weapon in your main hand?
itemPossibleWeaponSlots[1] = itemPossibleWeaponSlotTwo; // Can you equip this weapon in your off hand?
itemPossibleWeaponSlots[2] = itemPossibleWeaponSlotThree; // Can you equip this weapon in your extra slot?
this.itemTwoHand = itemTwoHand; // Is this weapon a two hander?
}
/* Other Constructors */
/* get/set Methods */
==Armor Item (public class itemArmor extends itemEquip)==
String itemArmorType, itemArmorSlot;
public itemArmor(String itemName, double itemValue, String itemDescription, String itemRarity, String itemType, String itemArmorType, String itemArmorSlot)
{
super(itemName, itemValue, itemDescription, itemRarity, itemType);
this.itemArmorType = itemArmorType; // e.g. heavy, medium, light
this.itemArmorSlot = itemArmorSlot; // e.g. head, chest, neck, ear, hand, finger, trinket, etc.
}
==Consumable Item (public class ItemConsumable extends Item)==
Arraylist<String> abilityList = new Arraylist<String>(); boolean hasCastTime; double itemCastTime;
public itemConsumable(String itemName, double itemValue, String itemDescription, String itemRarity, String itemType, Arraylist<String> abilityList)
{
super(itemName, itemValue, itemDescription, itemRarity, itemType);
this.abilityList = abilityList;
hasCastTime = false;
itemCastTime = 0;
}