com.planet_ink.coffee_mud.MOBS
Class StdAuctioneer

java.lang.Object
  extended by com.planet_ink.coffee_mud.MOBS.StdMOB
      extended by com.planet_ink.coffee_mud.MOBS.StdAuctioneer
All Implemented Interfaces:
AuctionPolicy, CMCommon, AbilityContainer, Affectable, Behavable, CMObject, Combatant, Contingent, DBIdentifiable, Economics, Environmental, FactionMember, Followable<MOB>, ItemCollection, ItemPossessor, Modifiable, MsgListener, MUDCmdProcessor, Physical, PhysicalAgent, Rider, ShopKeeper, StatsAffecting, Tattooable, Tickable, Auctioneer, MOB, java.lang.Cloneable, java.lang.Comparable<CMObject>
Direct Known Subclasses:
GenAuctioneer

public class StdAuctioneer
extends StdMOB
implements Auctioneer


Nested Class Summary
 
Nested classes/interfaces inherited from class com.planet_ink.coffee_mud.MOBS.StdMOB
StdMOB.ApplyAffectCharState<T extends StatsAffecting>, StdMOB.ApplyAffectCharStats<T extends StatsAffecting>, StdMOB.ApplyRecAffectPhyStats<T extends StatsAffecting>
 
Nested classes/interfaces inherited from interface com.planet_ink.coffee_mud.core.interfaces.ShopKeeper
ShopKeeper.ShopPrice
 
Nested classes/interfaces inherited from interface com.planet_ink.coffee_mud.MOBS.interfaces.MOB
MOB.Attrib
 
Nested classes/interfaces inherited from interface com.planet_ink.coffee_mud.core.interfaces.ItemPossessor
ItemPossessor.Expire, ItemPossessor.Find, ItemPossessor.Move
 
Field Summary
protected static java.util.Map<java.lang.String,java.lang.Long> lastCheckTimes
           
 AuctionData lastMsgData
           
protected  int maxTimedAuctionDays
           
protected  int minTimedAuctionDays
           
protected  double timedFinalCutPct
           
protected  double timedListingPct
           
protected  double timedListingPrice
           
 
Fields inherited from class com.planet_ink.coffee_mud.MOBS.StdMOB
abilitys, abilityUseCache, abilityUseTrig, affectCharState, affectCharStats, affectPhyStats, affects, ageMinutes, amDead, amDestroyed, amFollowing, atRange, attributesBitmap, baseCharStats, basePhyStats, baseState, behaviors, cachedImageName, charStats, clanAffects, clans, CODES, commandQue, curState, databaseID, description, displayText, experience, expertises, factions, followers, inventory, kickFlag, lastLocation, liegeID, location, maxState, me, miscText, money, moneyVariation, mySession, peaceTime, phyStats, playerStats, possHeldItem, possStartRoom, possWieldedItem, practices, questPoint, racialAffects, rawImageName, recoverAffectP, recoverTickCter, removeFromGame, riding, scripts, soulMate, tattoos, tickAgeCounter, tickStatus, trains, username, victim, wimpHitPoint, worshipCharID, xtraValues
 
Fields inherited from interface com.planet_ink.coffee_mud.core.interfaces.ShopKeeper
DEAL_ALCHEMIST, DEAL_ANYTECHNOLOGY, DEAL_ANYTHING, DEAL_ARMOR, DEAL_AUCTIONEER, DEAL_BANKER, DEAL_BOOKS, DEAL_BUTCHER, DEAL_CASTER, DEAL_CLANBANKER, DEAL_CLANDSELLER, DEAL_CLANPOSTMAN, DEAL_CONFLICTS, DEAL_CSHIPSELLER, DEAL_DESCS, DEAL_FOODSELLER, DEAL_GENERAL, DEAL_GROWER, DEAL_HIDESELLER, DEAL_INNKEEPER, DEAL_INSTRUMENTS, DEAL_INVENTORYONLY, DEAL_JEWELLER, DEAL_LANDSELLER, DEAL_LEATHER, DEAL_LUMBERER, DEAL_MAGIC, DEAL_METALSMITH, DEAL_PETS, DEAL_POSTMAN, DEAL_READABLES, DEAL_SHIPSELLER, DEAL_SLAVES, DEAL_STONEYARDER, DEAL_TRAINER, DEAL_WEAPONS
 
Fields inherited from interface com.planet_ink.coffee_mud.core.interfaces.Tickable
STATUS_AFFECT, STATUS_ALIVE, STATUS_BEHAVIOR, STATUS_CLASS, STATUS_DEAD, STATUS_END, STATUS_FIGHT, STATUS_MISC, STATUS_MISC2, STATUS_MISC3, STATUS_MISC4, STATUS_MISC5, STATUS_MISC6, STATUS_MISC7, STATUS_NOT, STATUS_OTHER, STATUS_RACE, STATUS_REBIRTH, STATUS_SCRIPT, STATUS_START, STATUS_WEATHER, TICKID_AREA, TICKID_BEAMWEAPON, TICKID_CLAN, TICKID_CLANITEM, TICKID_DEADBODY_DECAY, TICKID_ELECTRONICS, TICKID_EMAIL, TICKID_EXIT_BEHAVIOR, TICKID_EXIT_REOPEN, TICKID_ITEM_BEHAVIOR, TICKID_ITEM_BOUNCEBACK, TICKID_LIGHT_FLICKERS, TICKID_LIVEAUCTION, TICKID_LONGERMASK, TICKID_MISCELLANEOUS, TICKID_MOB, TICKID_PROPERTY_SPECIAL, TICKID_QUEST, TICKID_READYTOSTOP, TICKID_ROOM_BEHAVIOR, TICKID_ROOM_ITEM_REJUV, TICKID_SOLITARYMASK, TICKID_SPECIALCOMBAT, TICKID_SPECIALMANEUVER, TICKID_SPELL_AFFECT, TICKID_SUPPORT, TICKID_TIMEAUCTION, TICKID_TRAP_DESTRUCTION, TICKID_TRAP_RESET
 
Fields inherited from interface com.planet_ink.coffee_mud.MOBS.interfaces.MOB
AGE_MILLIS_THRESHOLD, END_SHEATH_TIME, START_SHEATH_TIME
 
Fields inherited from interface com.planet_ink.coffee_mud.core.interfaces.MUDCmdProcessor
METAFLAG_AS, METAFLAG_ASMESSAGE, METAFLAG_FORCED, METAFLAG_INORDER, METAFLAG_MPFORCED, METAFLAG_ORDER, METAFLAG_POSSESSED, METAFLAG_SNOOPED
 
Constructor Summary
StdAuctioneer()
           
 
Method Summary
 void addSoldType(int mask)
          Adds the ShopKeeper DEAL_* constants describing what is sold or bought by this ShopKeeper to the existing shopkeeper mask.
 java.lang.String auctionHouse()
          Gets the name of the auction house to which this auctioneer belongs.
 void autoGive(MOB src, MOB tgt, Item I)
           
 java.lang.String budget()
          Returns a description of the buying budget of the shopkeeper.
 java.lang.String devalueRate()
          Returns a string describing the percentage in the drop of the price at which this ShopKeeper will buy back items based on the number already in his inventory.
 boolean doISellThis(Environmental thisThang)
          Returns whether this ShopKeeper deals in the type of item passed in.
 void executeMsg(Environmental myHost, CMMsg msg)
          The general message event handler for the object.
 Pair<java.lang.Long,TimeClock.TimePeriod> finalBudget()
          Returns a description of the buying budget of the shopkeeper.
 double[] finalDevalueRate()
          Returns a double array describing the percentage in the drop of the price at which this ShopKeeper will buy back items based on the number already in his inventory.
 java.lang.String finalIgnoreMask()
          Returns the mask used to determine if a customer is ignored by the ShopKeeper.
 int finalInvResetRate()
          Returns the number of ticks between totally resetting this ShopKeepers inventory back to what it was.
 java.lang.String[] finalItemPricingAdjustments()
          A string set describing how pricing for this ShopKeeper will differ based on item masks The format for each string is a floating point number followers by a space and a zapper mask
 java.lang.String finalPrejudiceFactors()
          A string describing how pricing for this ShopKeeper will differ based on customer attributes such as race.
 CoffeeShop getShop()
          the CoffeeShop method to access the shopkeepers store of goods
protected  Area getStartArea()
           
 long getWhatIsSoldMask()
          Returns the ShopKeeper DEAL_* mask describing what is sold or bought by this ShopKeeper
 java.lang.String getWhatIsSoldZappermask()
          Returns the zapper mask which applies to items to determine whether they are bought and solid by this shopkeeper.
 java.lang.String ID()
          The CoffeeMud Java Class ID shared by all instances of this object.
 java.lang.String ignoreMask()
          Returns the mask used to determine if a customer is ignored by the ShopKeeper.
 int invResetRate()
          Returns the number of ticks between totally resetting this ShopKeepers inventory back to what it was.
 boolean isSold(int mask)
          Returns whether the given type of good is sold by this shopkeeper.
 java.lang.String[] itemPricingAdjustments()
          A string set describing how pricing for this ShopKeeper will differ based on item masks The format for each string is a floating point number followers by a space and a zapper mask
 double liveFinalCutPct()
          Gets the percent of an items final value to take off the winning bid for the house for a live auction.
 double liveListingPrice()
          Gets the flat fee in base currency to list an item of any sort at the auction house for a live auction.
 int maxTimedAuctionDays()
          Gets the maximum number of game-days that an auction can continue.
 void mergeAuctioneerPolicy(Auctioneer auction)
          Alters this policy to take account of the policies of the policies of a full timed auctioneer.
 int minTimedAuctionDays()
          Gets the minimum number of game-days that an auction can continue.
 boolean okMessage(Environmental myHost, CMMsg msg)
          The general message event previewer for the object.
protected  java.lang.String parseBidString(java.lang.String targetMessage)
           
 java.lang.String prejudiceFactors()
          A string describing how pricing for this ShopKeeper will differ based on customer attributes such as race.
 void setAuctionHouse(java.lang.String name)
          Sets the name of the auction house to which this auctioneer belongs.
 void setBudget(java.lang.String factors)
          Sets a description of the buying budget of the shopkeeper.
 void setDevalueRate(java.lang.String factors)
          Sets a string describing the percentage in the drop of the price at which this ShopKeeper will buy back items based on the number already in his inventory.
 void setIgnoreMask(java.lang.String factors)
          Sets the mask used to determine if a customer is ignored by the ShopKeeper.
 void setInvResetRate(int ticks)
          Sets the number of ticks between totally resetting this ShopKeepers inventory back to what it was.
 void setItemPricingAdjustments(java.lang.String[] factors)
          Sets the string set describing how pricing for this ShopKeeper will differ based on item masks The format for each string is a floating point number followers by a space and a zapper mask
 void setLiveFinalCutPct(double d)
          Gets the percent of an items final value to take off the winning bid for the house.
 void setLiveListingPrice(double d)
          Sets the flat fee in base currency to list an item of any sort at the auction house for a live auction.
 void setMaxTimedAuctionDays(int d)
          Sets the maximum number of game-days that an auction can continue.
 void setMinTimedAuctionDays(int d)
          Sets the minimum number of game-days that an auction can continue.
 void setPrejudiceFactors(java.lang.String factors)
          Sets the string describing how pricing for this ShopKeeper will differ based on customer attributes such as race.
 void setTimedFinalCutPct(double d)
          Gets the percent of an items final value to take off the winning bid for the house.
 void setTimedListingPct(double d)
          Sets the percent of an items value, per day, to charge to list an item.
 void setTimedListingPrice(double d)
          Sets the flat fee in base currency to list an item of any sort at the auction house for a timed auction.
 void setWhatIsSoldMask(long newSellCode)
          Sets the encoded ShopKeeper DEAL_* constants describing what is sold or bought by this ShopKeeper
 void setWhatIsSoldZappermask(java.lang.String newSellMask)
          Sets the zapper mask which applies to items to determine whether they are bought and solid by this shopkeeper.
 java.lang.String storeKeeperString()
          Based on the value of this ShopKeepers whatIsSold() method, this will return a displayable string describing that type.
 boolean tick(Tickable ticking, int tickID)
          this is the method which is called periodically by the threading engine.
 double timedFinalCutPct()
          Gets the percent of an items final value to take off the winning bid for the house for a timed auction.
 double timedListingPct()
          Gets the percent of an items value, per day, to charge to list an item.
 double timedListingPrice()
          Gets the flat fee in base currency to list an item of any sort at the auction house for a timed auction.
 
Methods inherited from class com.planet_ink.coffee_mud.MOBS.StdMOB
abilities, actions, addAbility, addBehavior, addEffect, addExpertise, addFaction, addFollower, addItem, addItem, addNonUninvokableEffect, addPriorityEffect, addScript, addTattoo, addTattoo, addTattoo, adjustFaction, affectCharState, affectCharStats, affectPhyStats, allAbilities, amActive, amDead, amDestroyed, amFollowing, amUltimatelyFollowing, baseCharStats, basePhyStats, baseState, baseWeight, behaviors, bringToLife, bringToLife, calculateActionCost, canSaveDatabaseID, charStats, clanEffects, clans, clearCommandQueue, cloneFix, commandQueSize, compareTo, confirmLocation, copyFactions, copyOf, curState, databaseID, delAbility, delAllAbilities, delAllBehaviors, delAllEffects, delAllExpertises, delAllItems, delAllScripts, delBehavior, delEffect, delExpertise, delFollower, delItem, delScript, delTattoo, delTattoo, dequeCommand, description, description, destroy, displayText, displayText, dispossess, doCommand, doCommand, eachBehavior, eachEffect, eachItem, eachScript, effects, enqueCommand, enqueCommands, expertises, expirationDate, factions, fetchAbility, fetchAbility, fetchBehavior, fetchBehavior, fetchEffect, fetchEffect, fetchExpertise, fetchFaction, fetchFactionData, fetchFactionRanges, fetchFirstWornItem, fetchFollower, fetchFollower, fetchFollowerOrder, fetchFromInventory, fetchHeldItem, fetchItem, fetchRandomAbility, fetchScript, fetchWieldedItem, fetchWornItems, findAbility, findItem, findItem, findItems, findItems, findTattoo, findTattooStartsWith, fixChannelColors, flagVariableEq, followers, freeWearPositions, genericName, getAbilityUsageCache, getAgeMinutes, getAttributesBitmap, getClanRole, getCodeNum, getCombatant, getDirectionToTarget, getExperience, getExpNeededDelevel, getExpNeededLevel, getExpNextLevel, getExpPrevLevel, getFactionListing, getGroupMembers, getGroupMembersAndRideables, getItem, getLiegeID, getMoney, getMoneyVariation, getMyDeity, getNaturalWeapon, getPeaceTime, getPractices, getQuestPoint, getRandomItem, getRideBuddies, getSaveStatIndex, getStartRoom, getStat, getStatCodes, getTickStatus, getTrains, getVictim, getWearPositions, getWimpHitPoint, getWorshipCharID, hasFaction, hasOnlyGoldInInventory, healthText, image, initializeClass, isAttributeSet, isContent, isEitherOfUsDead, isFollowedBy, isGeneric, isInCombat, isMarriedToLiege, isMine, isMonster, isPermissableToFight, isPlayer, isPossessing, isRacialAbility, isSavable, isStat, items, killMeDead, L, lastTickedDateTime, location, makePeace, maxCarry, maxFollowers, maxItems, maxRange, maxState, mayIFight, mayPhysicallyAttack, minRange, miscTextFormat, moveItemTo, moveItemTo, name, Name, name, newInstance, numAbilities, numAllAbilities, numAllEffects, numBehaviors, numEffects, numFollowers, numItems, numScripts, personalEffects, phyStats, playerStats, prequeCommand, prequeCommands, racialEffects, rangeToTarget, rawImage, recoverCharStats, recoverMaxState, recoverPhyStats, removeFaction, removeFromGame, resetToMaxState, riding, sameAs, scripts, session, setActions, setAgeMinutes, setAttribute, setAttributesBitmap, setBaseCharStats, setBasePhyStats, setBaseState, setClan, setCombatant, setDatabaseID, setDescription, setDisplayText, setExperience, setExpirationDate, setFollowing, setImage, setLiegeID, setLocation, setMiscText, setMoney, setMoneyVariation, setName, setPlayerStats, setPractices, setQuestPoint, setRangeToTarget, setRiding, setSavable, setSession, setSoulMate, setStartRoom, setStat, setTrains, setVictim, setWimpHitPoint, setWorshipCharID, soulMate, tattoos, tell, tell, text, titledName, totalFollowers, willFollowOrdersOf
 
Methods inherited from class java.lang.Object
clone, equals, finalize, getClass, hashCode, notify, notifyAll, toString, wait, wait, wait
 
Methods inherited from interface com.planet_ink.coffee_mud.core.interfaces.Environmental
description, displayText, expirationDate, image, isGeneric, L, maxRange, minRange, miscTextFormat, Name, rawImage, sameAs, setDescription, setDisplayText, setExpirationDate, setImage, setMiscText, setName, text
 
Methods inherited from interface com.planet_ink.coffee_mud.core.interfaces.Tickable
getTickStatus, name
 
Methods inherited from interface com.planet_ink.coffee_mud.core.interfaces.StatsAffecting
affectCharState, affectCharStats, affectPhyStats
 
Methods inherited from interface com.planet_ink.coffee_mud.core.interfaces.Contingent
amDestroyed, destroy, isSavable, setSavable
 
Methods inherited from interface com.planet_ink.coffee_mud.core.interfaces.CMObject
copyOf, initializeClass, newInstance
 
Methods inherited from interface java.lang.Comparable
compareTo
 
Methods inherited from interface com.planet_ink.coffee_mud.core.interfaces.Modifiable
getSaveStatIndex, getStat, getStatCodes, isStat, setStat
 

Field Detail

timedListingPrice

protected double timedListingPrice

timedListingPct

protected double timedListingPct

timedFinalCutPct

protected double timedFinalCutPct

maxTimedAuctionDays

protected int maxTimedAuctionDays

minTimedAuctionDays

protected int minTimedAuctionDays

lastMsgData

public AuctionData lastMsgData

lastCheckTimes

protected static final java.util.Map<java.lang.String,java.lang.Long> lastCheckTimes
Constructor Detail

StdAuctioneer

public StdAuctioneer()
Method Detail

ID

public java.lang.String ID()
Description copied from interface: CMObject
The CoffeeMud Java Class ID shared by all instances of this object. Unlike the Java Class name, this method does not include package information. However, it must return a String value unique to its class category in the ClassLoader. Class categories include Libraries, Common, Areas, Abilities, Behaviors, CharClasses, Commands, Exits Locales, MOBS, Races, WebMacros, Basic Items, Armor, Weapons, ClanItems, Tech. The name is typically identical to the class name.

Specified by:
ID in interface CMObject
Overrides:
ID in class StdMOB
Returns:
the name of this class

getShop

public CoffeeShop getShop()
Description copied from interface: ShopKeeper
the CoffeeShop method to access the shopkeepers store of goods

Specified by:
getShop in interface ShopKeeper
Returns:
the CoffeeShop object
See Also:
CoffeeShop

auctionHouse

public java.lang.String auctionHouse()
Description copied from interface: Auctioneer
Gets the name of the auction house to which this auctioneer belongs.

Specified by:
auctionHouse in interface Auctioneer
Returns:
name of the auction house
See Also:
Auctioneer.setAuctionHouse(String)

setAuctionHouse

public void setAuctionHouse(java.lang.String name)
Description copied from interface: Auctioneer
Sets the name of the auction house to which this auctioneer belongs.

Specified by:
setAuctionHouse in interface Auctioneer
Parameters:
name - name of the auction house
See Also:
Auctioneer.auctionHouse()

timedListingPrice

public double timedListingPrice()
Description copied from interface: AuctionPolicy
Gets the flat fee in base currency to list an item of any sort at the auction house for a timed auction.

Specified by:
timedListingPrice in interface AuctionPolicy
Returns:
the flat fee in base currency to list
See Also:
AuctionPolicy.setTimedListingPrice(double)

setTimedListingPrice

public void setTimedListingPrice(double d)
Description copied from interface: AuctionPolicy
Sets the flat fee in base currency to list an item of any sort at the auction house for a timed auction.

Specified by:
setTimedListingPrice in interface AuctionPolicy
Parameters:
d - the flat fee in base currency to list
See Also:
AuctionPolicy.timedListingPrice()

timedListingPct

public double timedListingPct()
Description copied from interface: AuctionPolicy
Gets the percent of an items value, per day, to charge to list an item. 0.0-1.0 for a timed auction.

Specified by:
timedListingPct in interface AuctionPolicy
Returns:
the percent of an items value, per day
See Also:
AuctionPolicy.setTimedListingPct(double)

setTimedListingPct

public void setTimedListingPct(double d)
Description copied from interface: AuctionPolicy
Sets the percent of an items value, per day, to charge to list an item. 0.0-1.0for a timed auction.

Specified by:
setTimedListingPct in interface AuctionPolicy
Parameters:
d - the percent of an items value, per day
See Also:
AuctionPolicy.timedListingPct()

timedFinalCutPct

public double timedFinalCutPct()
Description copied from interface: AuctionPolicy
Gets the percent of an items final value to take off the winning bid for the house for a timed auction. 0.0-1.0

Specified by:
timedFinalCutPct in interface AuctionPolicy
Returns:
the percent of an items final value
See Also:
AuctionPolicy.setTimedFinalCutPct(double)

setTimedFinalCutPct

public void setTimedFinalCutPct(double d)
Description copied from interface: AuctionPolicy
Gets the percent of an items final value to take off the winning bid for the house. for a timed auction. 0.0-1.0

Specified by:
setTimedFinalCutPct in interface AuctionPolicy
Parameters:
d - the percent of an items final value
See Also:
AuctionPolicy.timedFinalCutPct()

maxTimedAuctionDays

public int maxTimedAuctionDays()
Description copied from interface: AuctionPolicy
Gets the maximum number of game-days that an auction can continue.

Specified by:
maxTimedAuctionDays in interface AuctionPolicy
Returns:
the maximum number of game-days
See Also:
AuctionPolicy.setMaxTimedAuctionDays(int)

setMaxTimedAuctionDays

public void setMaxTimedAuctionDays(int d)
Description copied from interface: AuctionPolicy
Sets the maximum number of game-days that an auction can continue.

Specified by:
setMaxTimedAuctionDays in interface AuctionPolicy
Parameters:
d - the maximum number of game-days
See Also:
AuctionPolicy.maxTimedAuctionDays()

minTimedAuctionDays

public int minTimedAuctionDays()
Description copied from interface: AuctionPolicy
Gets the minimum number of game-days that an auction can continue.

Specified by:
minTimedAuctionDays in interface AuctionPolicy
Returns:
the minimum number of game-days
See Also:
AuctionPolicy.setMinTimedAuctionDays(int)

setMinTimedAuctionDays

public void setMinTimedAuctionDays(int d)
Description copied from interface: AuctionPolicy
Sets the minimum number of game-days that an auction can continue.

Specified by:
setMinTimedAuctionDays in interface AuctionPolicy
Parameters:
d - the minimum number of game-days
See Also:
AuctionPolicy.minTimedAuctionDays()

getWhatIsSoldMask

public long getWhatIsSoldMask()
Description copied from interface: ShopKeeper
Returns the ShopKeeper DEAL_* mask describing what is sold or bought by this ShopKeeper

Specified by:
getWhatIsSoldMask in interface ShopKeeper
Returns:
the dealer type constants to the 2nd power, shifted 8 bits left
See Also:
ShopKeeper.DEAL_DESCS, ShopKeeper.setWhatIsSoldMask(long)

isSold

public boolean isSold(int mask)
Description copied from interface: ShopKeeper
Returns whether the given type of good is sold by this shopkeeper.

Specified by:
isSold in interface ShopKeeper
Parameters:
mask - the ShopKeeper DEAL_* constant describing what is sold or bought by this ShopKeeper
Returns:
true if the shopkeeper will make such a deal
See Also:
ShopKeeper.DEAL_DESCS, ShopKeeper.getWhatIsSoldMask()

setWhatIsSoldMask

public void setWhatIsSoldMask(long newSellCode)
Description copied from interface: ShopKeeper
Sets the encoded ShopKeeper DEAL_* constants describing what is sold or bought by this ShopKeeper

Specified by:
setWhatIsSoldMask in interface ShopKeeper
Parameters:
newSellCode - the dealer type constants to the 2nd power, shifted 8 bits left
See Also:
ShopKeeper.DEAL_DESCS, ShopKeeper.addSoldType(int)

addSoldType

public void addSoldType(int mask)
Description copied from interface: ShopKeeper
Adds the ShopKeeper DEAL_* constants describing what is sold or bought by this ShopKeeper to the existing shopkeeper mask. A value of 0 will clear the whole mask.

Specified by:
addSoldType in interface ShopKeeper
Parameters:
mask - the ShopKeeper DEAL_* constants describing what is sold or bought by this ShopKeeper
See Also:
ShopKeeper.DEAL_DESCS, ShopKeeper.isSold(int)

tick

public boolean tick(Tickable ticking,
                    int tickID)
Description copied from interface: Tickable
this is the method which is called periodically by the threading engine. How often it is called depends on the parameters passed to the threadding engine when it is submitted for thread access. Typically the period is once per TIME_TICK period, but that is determined when the object is submitted to the thread engine.

Specified by:
tick in interface Tickable
Overrides:
tick in class StdMOB
Parameters:
ticking - a reference to this Tickable object
tickID - the TICKID_ constant describing this periodic call, as defined in Tickable
Returns:
true always, unless this object no longer wishes to ever tick again, in which case false
See Also:
Tickable, ServiceEngine, TickableGroup

autoGive

public void autoGive(MOB src,
                     MOB tgt,
                     Item I)

parseBidString

protected java.lang.String parseBidString(java.lang.String targetMessage)

okMessage

public boolean okMessage(Environmental myHost,
                         CMMsg msg)
Description copied from interface: MsgListener
The general message event previewer for the object. Messages passed herein are in a pending state, and may be safely modified or rejected without fear that they might be in the middle of being executed. Messages passed herein may not necessarily be FOR or FROM this object, but will almost always represent events which want to happen in the same rom. This method should always always return true UNLESS this message needs to be canceled, in which case it is necessary to tell the mob initiating the event (CMMsg.source()) why it is being cancelled. Every game event goes through these methods.

Specified by:
okMessage in interface MsgListener
Overrides:
okMessage in class StdMOB
Parameters:
myHost - either the initiator of the event, or the host of this object
msg - the CMMsg that wants to be executed
Returns:
whether this message is allowed to execute
See Also:
CMMsg, CMMsg.source()

executeMsg

public void executeMsg(Environmental myHost,
                       CMMsg msg)
Description copied from interface: MsgListener
The general message event handler for the object. Messages passed herein may not necessarily be FOR this object, or from it, but will almost always represent events happening in the same room. The messages have already been through an approval process, so this method is called only to affect the final execution of the meaning of the message. Every game event goes through these methods.

Specified by:
executeMsg in interface MsgListener
Overrides:
executeMsg in class StdMOB
Parameters:
myHost - either the initiator of the event, or the host of this object
msg - the CMMsg that needs to be executed
See Also:
CMMsg

storeKeeperString

public java.lang.String storeKeeperString()
Description copied from interface: ShopKeeper
Based on the value of this ShopKeepers whatIsSold() method, this will return a displayable string describing that type.

Specified by:
storeKeeperString in interface ShopKeeper
Returns:
a description of the whatIsSold() code
See Also:
ShopKeeper.isSold(int)

doISellThis

public boolean doISellThis(Environmental thisThang)
Description copied from interface: ShopKeeper
Returns whether this ShopKeeper deals in the type of item passed in. The determination is based on the whatIsSold() code.

Specified by:
doISellThis in interface ShopKeeper
Parameters:
thisThang - the item to determine if the shopkeeper deals in
Returns:
whether the shopkeeper deals in the type of item passed in
See Also:
ShopKeeper.isSold(int)

getStartArea

protected Area getStartArea()

finalPrejudiceFactors

public java.lang.String finalPrejudiceFactors()
Description copied from interface: Economics
A string describing how pricing for this ShopKeeper will differ based on customer attributes such as race.

Specified by:
finalPrejudiceFactors in interface Economics
Returns:
the string describing price prejudicing

prejudiceFactors

public java.lang.String prejudiceFactors()
Description copied from interface: Economics
A string describing how pricing for this ShopKeeper will differ based on customer attributes such as race.

Specified by:
prejudiceFactors in interface Economics
Returns:
the string describing price prejudicing

setPrejudiceFactors

public void setPrejudiceFactors(java.lang.String factors)
Description copied from interface: Economics
Sets the string describing how pricing for this ShopKeeper will differ based on customer attributes such as race.

Specified by:
setPrejudiceFactors in interface Economics
Parameters:
factors - the string describing price prejudicing

finalIgnoreMask

public java.lang.String finalIgnoreMask()
Description copied from interface: Economics
Returns the mask used to determine if a customer is ignored by the ShopKeeper.

Specified by:
finalIgnoreMask in interface Economics
Returns:
the mask used
See Also:
MaskingLibrary

ignoreMask

public java.lang.String ignoreMask()
Description copied from interface: Economics
Returns the mask used to determine if a customer is ignored by the ShopKeeper.

Specified by:
ignoreMask in interface Economics
Returns:
the mask used
See Also:
MaskingLibrary

setIgnoreMask

public void setIgnoreMask(java.lang.String factors)
Description copied from interface: Economics
Sets the mask used to determine if a customer is ignored by the ShopKeeper.

Specified by:
setIgnoreMask in interface Economics
Parameters:
factors - the mask to use
See Also:
MaskingLibrary

finalItemPricingAdjustments

public java.lang.String[] finalItemPricingAdjustments()
Description copied from interface: Economics
A string set describing how pricing for this ShopKeeper will differ based on item masks The format for each string is a floating point number followers by a space and a zapper mask

Specified by:
finalItemPricingAdjustments in interface Economics
Returns:
an array of the strings describing price adjustments

itemPricingAdjustments

public java.lang.String[] itemPricingAdjustments()
Description copied from interface: Economics
A string set describing how pricing for this ShopKeeper will differ based on item masks The format for each string is a floating point number followers by a space and a zapper mask

Specified by:
itemPricingAdjustments in interface Economics
Returns:
an array of the strings describing price adjustments

setItemPricingAdjustments

public void setItemPricingAdjustments(java.lang.String[] factors)
Description copied from interface: Economics
Sets the string set describing how pricing for this ShopKeeper will differ based on item masks The format for each string is a floating point number followers by a space and a zapper mask

Specified by:
setItemPricingAdjustments in interface Economics
Parameters:
factors - the string describing price prejudicing

finalBudget

public Pair<java.lang.Long,TimeClock.TimePeriod> finalBudget()
Description copied from interface: Economics
Returns a description of the buying budget of the shopkeeper. Format is an amount of base currency followed by HOUR,WEEK,DAY,MONTH or YEAR.

Specified by:
finalBudget in interface Economics
Returns:
the pair for the shopkeepers buying budget

budget

public java.lang.String budget()
Description copied from interface: Economics
Returns a description of the buying budget of the shopkeeper. Format is an amount of base currency followed by HOUR,WEEK,DAY,MONTH or YEAR.

Specified by:
budget in interface Economics
Returns:
the string for the shopkeepers buying budget

setBudget

public void setBudget(java.lang.String factors)
Description copied from interface: Economics
Sets a description of the buying budget of the shopkeeper. Format is an amount of base currency followed by HOUR,WEEK,DAY,MONTH or YEAR.

Specified by:
setBudget in interface Economics
Parameters:
factors - the string for the shopkeepers buying budget

finalDevalueRate

public double[] finalDevalueRate()
Description copied from interface: Economics
Returns a double array describing the percentage in the drop of the price at which this ShopKeeper will buy back items based on the number already in his inventory. The format is a number representing the percentage price drop per normal item followed by a space, followed by a number representing the percentage price drop per raw resource item. A value of null or [0,0] would mean no drop in price for either, ever.

Specified by:
finalDevalueRate in interface Economics
Returns:
null, or the price dropping percentage rule for this shopkeeper

devalueRate

public java.lang.String devalueRate()
Description copied from interface: Economics
Returns a string describing the percentage in the drop of the price at which this ShopKeeper will buy back items based on the number already in his inventory. The format is a number representing the percentage price drop per normal item followed by a space, followed by a number representing the percentage price drop per raw resource item. A value of "0 0" would mean no drop in price for either, ever.

Specified by:
devalueRate in interface Economics
Returns:
the price dropping percentage rule for this shopkeeper

setDevalueRate

public void setDevalueRate(java.lang.String factors)
Description copied from interface: Economics
Sets a string describing the percentage in the drop of the price at which this ShopKeeper will buy back items based on the number already in his inventory. The format is a number representing the percentage price drop per normal item followed by a space, followed by a number representing the percentage price drop per raw resource item. A value of "0 0" would mean no drop in price for either, ever.

Specified by:
setDevalueRate in interface Economics
Parameters:
factors - the price dropping percentage rule for this shopkeeper

setWhatIsSoldZappermask

public void setWhatIsSoldZappermask(java.lang.String newSellMask)
Description copied from interface: ShopKeeper
Sets the zapper mask which applies to items to determine whether they are bought and solid by this shopkeeper.

Specified by:
setWhatIsSoldZappermask in interface ShopKeeper
Parameters:
newSellMask - the item zappermask
See Also:
ShopKeeper.isSold(int), ShopKeeper.getWhatIsSoldZappermask(), MaskingLibrary

getWhatIsSoldZappermask

public java.lang.String getWhatIsSoldZappermask()
Description copied from interface: ShopKeeper
Returns the zapper mask which applies to items to determine whether they are bought and solid by this shopkeeper.

Specified by:
getWhatIsSoldZappermask in interface ShopKeeper
Returns:
the item zappermask
See Also:
ShopKeeper.isSold(int), ShopKeeper.setWhatIsSoldZappermask(String), MaskingLibrary

finalInvResetRate

public int finalInvResetRate()
Description copied from interface: Economics
Returns the number of ticks between totally resetting this ShopKeepers inventory back to what it was.

Specified by:
finalInvResetRate in interface Economics
Returns:
the number of ticks between total resets of inventory

invResetRate

public int invResetRate()
Description copied from interface: Economics
Returns the number of ticks between totally resetting this ShopKeepers inventory back to what it was.

Specified by:
invResetRate in interface Economics
Returns:
the number of ticks between total resets of inventory

setInvResetRate

public void setInvResetRate(int ticks)
Description copied from interface: Economics
Sets the number of ticks between totally resetting this ShopKeepers inventory back to what it was.

Specified by:
setInvResetRate in interface Economics
Parameters:
ticks - the number of ticks between total resets of inventory

liveListingPrice

public double liveListingPrice()
Description copied from interface: AuctionPolicy
Gets the flat fee in base currency to list an item of any sort at the auction house for a live auction.

Specified by:
liveListingPrice in interface AuctionPolicy
Returns:
the flat fee in base currency to list
See Also:
AuctionPolicy.setLiveListingPrice(double)

setLiveListingPrice

public void setLiveListingPrice(double d)
Description copied from interface: AuctionPolicy
Sets the flat fee in base currency to list an item of any sort at the auction house for a live auction.

Specified by:
setLiveListingPrice in interface AuctionPolicy
Parameters:
d - the flat fee in base currency to list
See Also:
AuctionPolicy.liveListingPrice()

liveFinalCutPct

public double liveFinalCutPct()
Description copied from interface: AuctionPolicy
Gets the percent of an items final value to take off the winning bid for the house for a live auction. 0.0-1.0

Specified by:
liveFinalCutPct in interface AuctionPolicy
Returns:
the percent of an items final value
See Also:
AuctionPolicy.setLiveFinalCutPct(double)

setLiveFinalCutPct

public void setLiveFinalCutPct(double d)
Description copied from interface: AuctionPolicy
Gets the percent of an items final value to take off the winning bid for the house. for a live auction. 0.0-1.0

Specified by:
setLiveFinalCutPct in interface AuctionPolicy
Parameters:
d - the percent of an items final value
See Also:
AuctionPolicy.liveFinalCutPct()

mergeAuctioneerPolicy

public void mergeAuctioneerPolicy(Auctioneer auction)
Description copied from interface: AuctionPolicy
Alters this policy to take account of the policies of the policies of a full timed auctioneer.

Specified by:
mergeAuctioneerPolicy in interface AuctionPolicy
Parameters:
auction - the auctioneer
See Also:
Auctioneer