Android Open Source - MythTrack Item






From Project

Back to project page MythTrack.

License

The source code is released under:

MIT License

If you think the Android project MythTrack listed in this page is inappropriate, such as containing malicious code/tools or violating the copyright, please email info at java2s dot com, thanks.

Java Source Code

/**
 * Item represents a single item. It is meant to allow easier access to item attributes while
 * reducing the amount of reads from the database.
 */* www.j av a  2  s .  com*/
 * @author Nolan Jurgens
 */

package nolanjurgens.mythtrack.app;

////////////////////////////////////////////////////////////////////////////////////////////////////
// CLASS - Item                                                                                   //
////////////////////////////////////////////////////////////////////////////////////////////////////
public class Item
{
  // FIELDS ////////////////////////////////////////////////////////////////////////////////////////

  // Item attributes
  private long id;
  private String name;
  private int type;
  private int rarity;
  private int casting;
  private int range;
  private int buyCost;
  private int sellValue;
  private int hitDiceModifier;
  private int fateDiceModifier;
  private int offenseModifier;
  private int defenseModifier;
  private int movementPointsModifier;
  private int cautiousMovementModifier;
  private int nonCombatActionModifier;
  private int courageModifier;
  private int minThreat;
  private int maxThreat;
  private int vitalityModifier;
  private int faithModifier;
  private int ammoCapacity;
  private int versesCapability;
  private int rageModifier;
  private int essenceBase;
  private int essenceCurrent;
  private int durabilityBase;
  private int durabilityCurrent;
  private int partsCapacity;
  private int potionID;
  private int immunities;

  // METHODS ///////////////////////////////////////////////////////////////////////////////////////

  /**
   * Constructor
   */
  public Item()
  {
  }


  /**
   * Get the item's ammo capacity.
   * @return Ammo capacity.
   */
  public int getAmmoCapacity()
  {
    return ammoCapacity;
  }


  /**
   * Get the cost to buy the item.
   * @return Cost of the item.
   */
  public int getBuyCost()
  {
    return buyCost;
  }


  /**
   * Get what type of casting the item can perform.
   * @return Casting type.
   */
  public int getCasting()
  {
    return casting;
  }


  /**
   * Get the item's cautious movement modifier.
   * @return Cautious movement modifier.
   */
  public int getCautiousMovementModifier()
  {
    return cautiousMovementModifier;
  }
  
  
  /**
   * Get the item's courage modifier.
   * @return Courage modifier.
   */
  public int getCourageModifier()
  {
    return courageModifier;
  }


  /**
   * Get the item's defensive target number modifier.
   * @return Defensive target number modifier.
   */
  public int getDefenseModifier()
  {
    return defenseModifier;
  }

  
  /**
   * Get the item's base durability value.
   * @return Base durability.
   */
  public int getDurabilityBase()
  {
    return durabilityBase;
  }


  /**
   * Get the item's current durability value.
   * @return Current durability.
   */
  public int getDurabilityCurrent()
  {
    return durabilityCurrent;
  }


  /**
   * Get the item's base essence value.
   * @return Base essence.
   */
  public int getEssenceBase()
  {
    return essenceBase;
  }


  /**
   * Get the item's current essence value.
   * @return Current essence.
   */
  public int getEssenceCurrent()
  {
    return essenceCurrent;
  }


  /**
   * Get the faith modifier for the item.
   * @return Faith modifier.
   */
  public int getFaithModifier()
  {
    return faithModifier;
  }


  /**
   * Get the item's fate dice modifier.
   * @return Fate dice modifier.
   */
  public int getFateDiceModifier()
  {
    return fateDiceModifier;
  }


  /**
   * Get the item's hit dice modifier.
   * @return Hit dice modifier.
   */
  public int getHitDiceModifier()
  {
    return hitDiceModifier;
  }


  /**
   * Get the item's database ID.
   * @return Database ID.
   */
  public long getID()
  {
    return id;
  }


  /**
   * Get the immunities the item provides.
   * @return Status immunities.
   */
  public int getImmunities()
  {
    return immunities;
  }


  /**
   * Get the item's maximum threat modifier.
   * @return Maximum threat modifier.
   */
  public int getMaxThreat()
  {
    return maxThreat;
  }


  /**
   * Get the item's minimum threat modifier.
   * @return Minimum threat modifier.
   */
  public int getMinThreat()
  {
    return minThreat;
  }

  
  /**
   * Get the item's movement points modifier.
   * @return Movement points modifier.
   */
  public int getMovementPointsModifier()
  {
    return movementPointsModifier;
  }
  
  
  /**
   * Get the name of the item.
   * @return Name of the item.
   */
  public String getName()
  {
    return name;
  }


  /**
   * Get the item's non-combat action modifier.
   * @return Non-combat action modifier.
   */
  public int getNonCombatActionModifier()
  {
    return nonCombatActionModifier;
  }


  /**
   * Get the item's offensive target number modifier.
   * @return Offensive target number modifier.
   */
  public int getOffenseModifier()
  {
    return offenseModifier;
  }


  /**
   * Get the item's parts capacity.
   * @return Parts capacity.
   */
  public int getPartsCapacity()
  {
    return partsCapacity;
  }
  

  /**
   * Get the item's potion ID.
   * @return Potion ID.
   */
  public int getPotionID()
  {
    return potionID;
  }


  /**
   * Get the rage modifier for the item.
   * @return Rage modifier.
   */
  public int getRageModifier()
  {
    return rageModifier;
  }
  
  
  /**
   * Get the range of the item.
   * @return Range of the item.
   */
  public int getRange()
  {
    return range;
  }


  /**
   * Get the rarity of the item.
   * @return Rarity of the item.
   */
  public int getRarity()
  {
    return rarity;
  }


  /**
   * Get the sell value of the item.
   * @return Sell value.
   */
  public int getSellValue()
  {
    return sellValue;
  }

  
  /**
   * Get the type of the item.
   * @return Item type.
   */
  public int getType()
  {
    return type;
  }


  /**
   * Get the item's verses capability.
   * @return Verses capability.
   */
  public int getVersesCapability()
  {
    return versesCapability;
  }
  
  
  /**
   * Get the item's vitality modifier.
   * @return Vitality modifier.
   */
  public int getVitalityModifier()
  {
    return vitalityModifier;
  }


  /**
   * Set the item's ammo capacity.
   * @param ammoCapacity Ammo capacity.
   */
  public void setAmmoCapacity(int ammoCapacity)
  {
    this.ammoCapacity = ammoCapacity;
  }


  /**
   * Set the cost of the item.
   * @param buyCost Cost to buy the item.
   */
  public void setBuyCost(int buyCost)
  {
    this.buyCost = buyCost;
  }


  /**
   * Set what type of casting the item can perform.
   * @param casting Casting type.
   */
  public void setCasting(int casting)
  {
    this.casting = casting;
  }


  /**
   * Set the item's cautious movement modifier.
   * @param cautiousMovementModifier Cautious movement modifier.
   */
  public void setCautiousMovementModifier(int cautiousMovementModifier)
  {
    this.cautiousMovementModifier = cautiousMovementModifier;
  }
  
  
  /**
   * Set the item's courage modifier.
   * @param courageModifier Courage modifier.
   */
  public void setCourageModifier(int courageModifier)
  {
    this.courageModifier = courageModifier;
  }


  /**
   * Set the item's defensive target number modifier.
   * @param defenseModifier Defensive target number modifier.
   */
  public void setDefensiveModifier(int defenseModifier)
  {
    this.defenseModifier = defenseModifier;
  }


  /**
   * Set the item's base durability value.
   * @param durabilityBase Base durability value.
   */
  public void setDurabilityBase(int durabilityBase)
  {
    this.durabilityBase = durabilityBase;
  }


  /**
   * Set the item's current durability value.
   * @param durabilityCurrent Current durability value.
   */
  public void setDurabilityCurrent(int durabilityCurrent)
  {
    this.durabilityCurrent = durabilityCurrent;
  }


  /**
   * Set the item's base essence value.
   * @param essenceBase Base essence value.
   */
  public void setEssenceBase(int essenceBase)
  {
    this.essenceBase = essenceBase;
  }


  /**
   * Set the item's current essence value.
   * @param essenceCurrent Current essence value.
   */
  public void setEssenceCurrent(int essenceCurrent)
  {
    this.essenceCurrent = essenceCurrent;
  }


  /**
   * Set the item's faith modifier.
   * @param faithModifier Faith modifier.
   */
  public void setFaithModifier(int faithModifier)
  {
    this.faithModifier = faithModifier;
  }
  

  /**
   * Set the item's fate dice modifier.
   * @param fateDiceModifier Fate dice modifier.
   */
  public void setFateDiceModifier(int fateDiceModifier)
  {
    this.fateDiceModifier = fateDiceModifier;
  }


  /**
   * Set the item's hit dice modifier.
   * @param hitDiceModifier Hit dice modifier.
   */
  public void setHitDiceModifier(int hitDiceModifier)
  {
    this.hitDiceModifier = hitDiceModifier;
  }


  /**
   * Set the item's ID.
   * @param id Database ID.
   */
  public void setID(long id)
  {
    this.id = id;
  }


  /**
   * Set the immunities the item provides.
   * @param immunities Immunities the item provides.
   */
  public void setImmunities(int immunities)
  {
    this.immunities = immunities;
  }


  /**
   * Set the item's maximum threat modifier.
   * @param maxThreat Maximum threat modifier.
   */
  public void setMaxThreat(int maxThreat)
  {
    this.maxThreat = maxThreat;
  }
  
  
  /**
   * Set the item's minimum threat modifier.
   * @param minThreat Minimum threat modifier.
   */
  public void setMinThreat(int minThreat)
  {
    this.minThreat = minThreat;
  }
  
  
  /**
   * Set the item's movement points modifier.
   * @param movementPointsModifier Movement points modifier.
   */
  public void setMovementPointsModifier(int movementPointsModifier)
  {
    this.movementPointsModifier = movementPointsModifier;
  }
  
  
  /**
   * Set the name of the item.
   * @param name Name.
   */
  public void setName(String name)
  {
    this.name = name;
  }


  /**
   * Set the item's non-combat action modifier.
   * @param nonCombatActionModifier Non-combat action modifier.
   */
  public void setNonCombatActionModifier(int nonCombatActionModifier)
  {
    this.nonCombatActionModifier = nonCombatActionModifier;
  }


  /**
   * Set the item's offensive target number modifier.
   * @param offenseModifier Offensive target number modifier.
   */
  public void setOffensiveModifier(int offenseModifier)
  {
    this.offenseModifier = offenseModifier;
  }


  /**
   * Set the item's parts capacity.
   * @param partsCapacity Parts capacity.
   */
  public void setPartsCapacity(int partsCapacity)
  {
    this.partsCapacity = partsCapacity;
  }


  /**
   * Set the item's potion ID.
   * @param potionID Potion ID.
   */
  public void setPotionID(int potionID)
  {
    this.potionID = potionID;
  }


  /**
   * Set the item's rage modifier.
   * @param rageModifier Rage modifier.
   */
  public void setRageModifier(int rageModifier)
  {
    this.rageModifier = rageModifier;
  }
  
  
  /**
   * Set the item's range.
   * @param range Range.
   */
  public void setRange(int range)
  {
    this.range = range;
  }


  /**
   * Set the rarity of the item.
   * @param rarity Rarity.
   */
  public void setRarity(int rarity)
  {
    this.rarity = rarity;
  }


  /**
   * Set the item's sell value.
   * @param sellValue Sell value.
   */
  public void setSellValue(int sellValue)
  {
    this.sellValue = sellValue;
  }
  
  
  /**
   * Set the item's type.
   * @param type Type.
   */
  public void setType(int type)
  {
    this.type = type;
  }


  /**
   * Set the item's verses capability.
   * @param versesCapability Verses capability.
   */
  public void setVersesCapability(int versesCapability)
  {
    this.versesCapability = versesCapability;
  }


  /**
   * Set the item's vitality modifier.
   * @param vitalityModifier Vitality modifier.
   */
  public void setVitalityModifier(int vitalityModifier)
  {
    this.vitalityModifier = vitalityModifier;
  }

}




Java Source Code List

nolanjurgens.mythtrack.app.BuyItemDialog.java
nolanjurgens.mythtrack.app.CreateHeroDialog.java
nolanjurgens.mythtrack.app.DeleteHeroDialog.java
nolanjurgens.mythtrack.app.EquipmentInfoDialog.java
nolanjurgens.mythtrack.app.HeroDisplayFragment.java
nolanjurgens.mythtrack.app.HeroHelper.java
nolanjurgens.mythtrack.app.HeroList.java
nolanjurgens.mythtrack.app.HeroTrackerActivity.java
nolanjurgens.mythtrack.app.Hero.java
nolanjurgens.mythtrack.app.InventoryList.java
nolanjurgens.mythtrack.app.ItemHelper.java
nolanjurgens.mythtrack.app.ItemList.java
nolanjurgens.mythtrack.app.Item.java
nolanjurgens.mythtrack.app.MainActivity.java
nolanjurgens.mythtrack.app.RemoveItemDialog.java
nolanjurgens.mythtrack.app.SettingsActivity.java
nolanjurgens.mythtrack.app.SettingsFragment.java
nolanjurgens.mythtrack.app.StatInfoDialog.java
nolanjurgens.mythtrack.app.StatPickerDialog.java
nolanjurgens.mythtrack.app.TitleHelper.java
nolanjurgens.mythtrack.app.Title.java
nolanjurgens.mythtrack.provider.MythTrackBackup.java
nolanjurgens.mythtrack.provider.MythTrackContract.java
nolanjurgens.mythtrack.provider.MythTrackDatabase.java