randomenc
index
/home/thindil/Projekty/anaria/server/lib/pymodules/randomenc.py

randomenc.py
 
Provide functions and data structure for random encounters.

 
Modules
       
auxiliary
char
event
hooks
mud
olc
random
storage
utils
zone

 
Classes
       
RandomEncData

 
class RandomEncData
    Data for random encounters.
 
  Methods defined here:
__init__(self, set=None)
Standard class constructor.
copy(self)
copyTo(self, to)
store(self)

 
Functions
       
__unload__()
remove the hooks for random encounters.
clean_event(owner, void, none)
clear random encounter if still exist.
randenc_event(owner, tgt, action)
event for start fight in random encounter.
randenc_hook(info)
When player enter room, check did random encounter appear.
randencolc_choice_exec(sock, data)
Edit random encounters.
randencolc_chooser(sock, data, option)
figure out what field we want to edit, and display prompt.
randencolc_extend_menu(sock, data)
Display option in main menu.
randencolc_menu(sock, data)
Display random encounters settings.
randencolc_parser(sock, data, choice, arg)
parse out what we want to change a specifield field to.

 
Data
        __RANDENC_ACTIONS__ = 3
__RANDENC_AMOUNT__ = 4
__RANDENC_ENEMIES__ = 2
__RANDENC_SECURITY__ = 1
randencolc_opt_map = {'1': (1, 'Wybierz poziom bezpiecze\xc5\x84stwa strefy: '), '2': (2, 'Podaj list\xc4\x99 przeciwnik\xc3\xb3w, oddzielonych \xc5\x9brednikiem: '), '3': (3, 'Podaj komendy dla przeciwnik\xc3\xb3w, oddzielone \xc5\x9brednikiem: '), '4': (4, 'Podaj maksymaln\xc4\x85 ilo\xc5\x9b\xc4\x87 przeciwnik\xc3\xb3w jaka mo\xc5\xbce si\xc4\x99 pojawi\xc4\x87: ')}
security = {'danger': 30, 'deadly': 70, 'peace': 10, 'safe': 0, 'war': 50}