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

spells.py
 
Provide data and functions for handle players spells.

 
Modules
       
auxiliary
fight
gainlevel
hooks
mud
mudsys
olc
random
storage
utils

 
Classes
       
Spell

 
class Spell
    Implements one spell.
 
  Methods defined here:
__init__(self, name, set=None)
Standard class constructor.
store(self)
return a storage set representation of the spell.

 
Functions
       
__unload__()
remove all hooks.
add_spell(self, name)
function add new spell to character.
cmd_cast(ch, cmd, arg)
Usage: rzuc <spell name> [target]
 
Cast selected spell on selected target. During battle, you can cast spell
on your current target without specify it. Area spells don't need target too.
cmd_sdelete(ch, cmd, arg)
Usage: sdelete <nazwa czaru>
 
Delete spell.
cmd_sedit(ch, cmd, arg)
Usage: sedit <nazwa czaru>
 
Add or edit spell.
cmd_slist(ch, cmd, arg)
Usage: slist
 
Show list of spells.
cmd_srename(ch, cmd, arg)
Usage: srename '<nazwa czaru>' '<nowa nazwa>'
 
Rename selected spell.
get_spell(spellname)
function return spell statistics.
load_spells()
read all of the spells from file.
save_spells(spell=None)
save all of the spells to file.
sedit_chooser(sock, data, option)
figure out what we want to edit in spell and display a prompt.
sedit_menu(sock, data)
Display main menu for add/modify spell.
sedit_parser(sock, data, choice, arg)
parse out what we want to change a specified field to in spell.
spell_fading_hook(info)
Send informations about end of spell.
spellolc_chooser(sock, data, option)
Set new level for selected spell.
spellolc_menu(sock, data)
Show level of spell.
spellsolc_choice_exec(sock, data)
Edit spells.
spellsolc_chooser(sock, data, option)
Try pick spell to set.
spellsolc_extend_menu(sock, data)
Display option in main menu.
spellsolc_menu(sock, data)
Display all spells and values for they.
spellsolc_parser(sock, mobile, choice, arg)
Set new spell or level for it.
spellsolc_to_proto(thing)
Save spells.

 
Data
        SPELL_DELETE = 3
SPELL_EDIT = 2
SPELL_NEW = 1
__SPELL_AREA__ = 3
__SPELL_COST__ = 6
__SPELL_DIFFICULT__ = 5
__SPELL_DURATION__ = 4
__SPELL_GROUP__ = 1
__SPELL_NEEDS__ = 9
__SPELL_TARGET__ = 2
__SPELL_TYPE__ = 8
__SPELL_VALUE__ = 7
__spells__ = [<spells.Spell instance>]
__spells_file__ = '../lib/misc/spells'
spell_groups = ['battle', 'other']
spell_names = ['Kamienny pocisk']
spell_targets = ['char', 'self', 'object']
spellolc_opt_map = {'1': (1, 'Wybierz rodzaj czaru: '), '2': (2, 'Wybierz rodzaj celu czaru: '), '3': (3, ''), '4': (4, 'Podaj d\xc5\x82ugo\xc5\x9b\xc4\x87 dzia\xc5\x82ania czaru: '), '5': (5, 'Podaj trudno\xc5\x9b\xc4\x87 rzucenia czaru: '), '6': (6, 'Podaj koszt zm\xc4\x99czenia: '), '7': (7, 'Podaj warto\xc5\x9b\xc4\x87 efektu czaru: '), '8': (8, 'Podaj efekt czaru: '), '9': (9, 'Podaj wymagania czaru: ')}