Skip to content
This repository was archived by the owner on Apr 29, 2025. It is now read-only.
danielmunro edited this page Mar 8, 2012 · 14 revisions

#Actor

There are many different kinds of actors in Phud, including mobs, questmasters, shopkeepers, trainers, and users.

##Types of Actors

###Mob

Every NPC in Phud is a mob, or mobile. They inhabit the world and make it interesting.

###Questmaster

Grants and tracks quests.

###Shopkeeper

Buys and sells items.

###Trainer

Trains users attributes and vitals.

###User

Human playable actors.

##Actor Methods

###Ability


###getAbilities() An array of skills and spells the actor knows.

###addAbility() Give a skill or spell to an actor.

###removeAbility() Revoke a skill or spell from an actor.

###Attributes


###getAttribute() Get the value of a specific attribute, such as hp, saves, str, dam, or ac_bash, to name a few, plus modifiers from equipment and affects.

###getMaxAttribute() Get the maximum allowable attribute for the actor (race dependent).

###getUnmodifiedAttribute() Get the base, unmodified attribute of the actor (before taking into account ability or equipment affects).

###modifyAttribute() Modify a given attribute for an actor.

###setAttribute() Override the previous attribute completely and set a new one.

###Currency


###getCurrency() Get the amount of gold, silver, or copper an actor has.

###modifyCurrency() Change the amount of currency the actor has.

###getWorth() Gets the value of all the currency the actor has in the lowest common denominator, copper. This is useful for calculating if the actor has enough money to buy something.

###decreaseFunds() Remove funds regardless of currency denominations, such as when the actor buys an item.

###Fighting


###getTarget() Gets the actor who is the subject of aggression.

###setTarget() Sets the actor who will be the subject of aggression.

###reconcileTarget() Based on all the games rules and arguments passed to the method, it will return with a valid target, if any.

###getAttackSubscriber() When this is subscribed to the server, the actor will attack their target every pulse until their target is no longer set.

###attack() One attack against a target.

###Getters and Setters


###getProficiencyIn() Gets the level of proficiency for the given proficiency set.

###getAlignment() Gets the alignment level of the actor, indicating good, neutral, or evil.

###modifyAlignment() Changes the alignment of the actor.

###getDisposition() Gets the physical position of the actor, ie, standing, sitting, laying down.

###setDisposition() Change the actor's disposition.

###getAlias() The name of the actor.

###getLong() The long description of the actor.

###getEquipped() The equipment object.

###getSex() Gets the actor's sex.

###getDisplaySex() Shorthand for determining the proper word to display for the given sex.

###setSex() Give the actor a new sex.

###getRoom() Gets the room the actor is in.

###setRoom() Changes the room the actor is in.

###getRace() Gets the race object assigned to the actor.

###setRace() Give the actor a new race.

Clone this wiki locally