Package scripts :: Script quest_engine :: Class Quest
[hide private]
[frames] | no frames]

Class Quest

source code

object --+
         |
        Quest

Class that holds the information for a quest

Instance Methods [hide private]
 
__init__(self, quest_id, quest_giver_id, quest_name, description, variables)
x.__init__(...) initializes x; see x.__class__.__doc__ for signature
source code
 
setValue(self, variable_name, value)
Set the value of a quest variable
source code
 
getValue(self, variable_name)
Get the value of a quest_variable
source code
 
getGoalValue(self, variable_name)
Get the goal value of a quest_variable
source code
 
increaseValue(self, variable_name, value)
Increase a variable by a specified value
source code
 
decreaseValue(self, variable_name, value)
Decrease a variable by a specified value
source code
 
isGoalValue(self, variable_name)
Check if the variable has reached it's goal value
source code
 
isEqualOrBiggerThanGoalValue(self, variable_name)
Check if the variable is equil or bigger then it's goal value
source code
 
restartQuest(self)
Restarts the quest.
source code

Inherited from object: __delattr__, __format__, __getattribute__, __hash__, __new__, __reduce__, __reduce_ex__, __repr__, __setattr__, __sizeof__, __str__, __subclasshook__

Properties [hide private]

Inherited from object: __class__

Method Details [hide private]

__init__(self, quest_id, quest_giver_id, quest_name, description, variables)
(Constructor)

source code 

x.__init__(...) initializes x; see x.__class__.__doc__ for signature

Overrides: object.__init__
(inherited documentation)

setValue(self, variable_name, value)

source code 

Set the value of a quest variable

Parameters:
  • variable_name - the name of the variable to set
  • value - the value you want to assign to the variable
Returns:
True on success

getValue(self, variable_name)

source code 

Get the value of a quest_variable

Parameters:
  • variable_name - the name of the variable to set
Returns:
the value of the quest_variable

getGoalValue(self, variable_name)

source code 

Get the goal value of a quest_variable

Parameters:
  • variable_name - the name of the variable to set
Returns:
the goal value of the quest variable

increaseValue(self, variable_name, value)

source code 

Increase a variable by a specified value

Parameters:
  • variable_name - the name of the variable to set
  • value - the value you want to increase the variable with
Returns:
True on success

decreaseValue(self, variable_name, value)

source code 

Decrease a variable by a specified value

Parameters:
  • variable_name - the name of the variable to set
  • value - the value you want to decrease the variable with
Returns:
True on success

isGoalValue(self, variable_name)

source code 

Check if the variable has reached it's goal value

Parameters:
  • variable_name - the name of the variable to check
Returns:
True when the variable has reached the goal value

isEqualOrBiggerThanGoalValue(self, variable_name)

source code 

Check if the variable is equil or bigger then it's goal value

Parameters:
  • variable_name - the name of the variable to set
Returns:
True when it has reached or exceeded the goal value

restartQuest(self)

source code 

Restarts the quest. This sets all values to the reset values, if there is a reset value present