Groovy Documentation

de.dewarim.goblin.pc
[Groovy] Class PlayerCharacter

java.lang.Object
  de.dewarim.goblin.Creature
      de.dewarim.goblin.pc.PlayerCharacter

class PlayerCharacter
extends Creature

Property Summary
java.lang.Boolean alive

static java.lang.Object belongsTo

static java.lang.Object constraints

Melee currentMelee

java.lang.Integer deaths

static java.lang.Object hasMany

java.lang.Long level

static java.lang.Object mapping

java.lang.Long questLevel

java.lang.Long spentExperience

java.lang.Integer victories

java.lang.Long xp

 
Constructor Summary
PlayerCharacter()

 
Method Summary
java.lang.Integer calculateSumOfItems(ItemType type)

Calculate the sum of all items of a specific type.

java.lang.Boolean checkComponent(Component component)

Check if the player character has enough of a specific component to produce an item.

boolean equals(java.lang.Object o)

MailBox fetchArchiveBox()

MailBox fetchInbox()

java.util.List fetchOpenQuests()

MailBox fetchOutBox()

int hashCode()

void initializeEquipmentSlots()

A player character should have individual EquipmentSlots, as they may very well be removed...

void initializeMailboxes()

void initializePlayerCharacter()

void resurrect()

 
Methods inherited from class Creature
addCreatureCombatAttributes, attack, canEquipItem, computeCombatSkill, computeDamage, computeInitiative, computeParry, computeStrike, equals, equipItem, equipItem, fetchCombatSkills, fetchCombatSkills, fetchEquipment, fetchItemCombatAttributeMap, fetchProductionSkills, fetchResistanceAttributeMap, getItems, hashCode, unequipItem
 

Property Detail

alive

java.lang.Boolean alive


belongsTo

static java.lang.Object belongsTo


constraints

static java.lang.Object constraints


currentMelee

Melee currentMelee


deaths

java.lang.Integer deaths


hasMany

static java.lang.Object hasMany


level

java.lang.Long level


mapping

static java.lang.Object mapping


questLevel

java.lang.Long questLevel


spentExperience

java.lang.Long spentExperience


victories

java.lang.Integer victories


xp

java.lang.Long xp


 
Constructor Detail

PlayerCharacter

PlayerCharacter()


 
Method Detail

calculateSumOfItems

java.lang.Integer calculateSumOfItems(ItemType type)
Calculate the sum of all items of a specific type.
Parameters:
type - the item type
Returns:
the sum of all items of this type the player character owns


checkComponent

java.lang.Boolean checkComponent(Component component)
Check if the player character has enough of a specific component to produce an item. Note: this is a very rudimentary way of checking. It will need tweaking if we add crafting recipes for items with special qualities.
Parameters:
component
Returns:
true if the player has the needed amount of this component


equals

boolean equals(java.lang.Object o)


fetchArchiveBox

MailBox fetchArchiveBox()


fetchInbox

MailBox fetchInbox()


fetchOpenQuests

java.util.List fetchOpenQuests()


fetchOutBox

MailBox fetchOutBox()


hashCode

int hashCode()


initializeEquipmentSlots

void initializeEquipmentSlots()
A player character should have individual EquipmentSlots, as they may very well be removed... (eg, loose your right hand)


initializeMailboxes

void initializeMailboxes()


initializePlayerCharacter

void initializePlayerCharacter()


resurrect

void resurrect()


 

Groovy Documentation