I’m creating a text based RPG (will be turned into a top-down dungeon crawler later), and all I’ve gotten to the point of developing all my Objects.
I have a basic idea of what I need inside these objects, but I would love if I could get some opinions on what else to include! I’ll post what I already have, along with comments if necessary. Anything that is extended will include all of the inherited variables.
Player class:
private String name;
private double evadeChance;
private int experience;
private int money;
private int level;
private int baseAttack; // starting base + stats
private int speed; //speed based on weight and stats //***DEFINE BASE SPEED***//
private int finalAttack; // baseAttack + weapon damage
private int health;
private int skillPoints;
private String style; // mage/melee/range
public Vector<Item> inventory = new Vector<Item>(); // inventory
public Vector<Item> equipped = new Vector<Item>(); // equipped item
Armor class:
protected int price;
protected int level;
protected String name;
protected int wieldLevel;
protected int itemLevel;
protected int weight;
protected double reduction; // value to reduce income damage by
Weapon class:
protected int price;
protected int level;
protected String name;
protected int wieldLevel;
protected int itemLevel;
protected int weight;
protected int damage; // double?
protected double missChance;
protected boolean hasAmmo;
protected boolean needsAmmo = false;
protected String type; // bow/axe/etc...
Potion class:
protected int damage; // double?
protected double missChance;
protected boolean hasAmmo;
protected boolean needsAmmo = false;
protected String type;
Ammo class:
protected int damage; // double?
protected double missChance;
protected boolean hasAmmo;
protected boolean needsAmmo = false;
protected String type;
protected String forWeapon;
protected int quantity;
Creature class:
protected String name;
protected int damage;
protected int level;
protected int experience; // reward for slaying (xp)
protected int health;
protected int bounty; // reward for slaying (cash)
protected double missChance;
protected int speed; // relative to weight & base speed; getSpeed() returns speed - weightAddition
For reference: wieldLevel is the required level to EQUIP the item. itemLevel is the level of the item relative to it’s effectiveness (ie. a very very rare super weapon can have a level of 999).
Any other variables you think would be good to include? I’ve been trying to think of others to put in here so I can finish the constructors, but I always think there’s something I’m missing.