Crossfire Server, Trunk
altar_valkyrie Namespace Reference

Functions

def accept (description)
 

Variables

 altar = Crossfire.WhoAmI()
 
int level_factor = 0
 
 obj = altar.Above
 
int part_factor = 1
 
 pl = Crossfire.WhoIsActivator()
 
 praying = pl.CheckArchInventory('skill_praying')
 
int res = 0
 
int value = obj.Exp / 5 * part_factor
 

Detailed Description

Altar of Valkyrie
Followers of Valkyrie don't get any praying spells, because Valkyrie hates magic.
Instead, they gain experience by combat bravery; and the way they prove that is
by bringing the flesh of dead enemies as a sacrifice in Her altar.

Of course, the script only activates for followers of Valkyrie, and only runs for
sacrifices of type FLESH.

Then, it can handle each in two ways:

- Ideally, all items will have Exp stored.  In this case, you'll get 1/5 of that
  Exp, with a bonus if it's a head or heart.

- Otherwise, we'll use the Level and resistances to estimate how hard it was to
  kill the monster.  In fact, I'm not at all certain the algorithm used to
  estimate is reasonable at all for higher levels...  but then again, I'm not
  sure it's still necessary either, so feel free to remove it :-)

Function Documentation

◆ accept()

def altar_valkyrie.accept (   description)

Variable Documentation

◆ altar

altar_valkyrie.altar = Crossfire.WhoAmI()

◆ level_factor

float altar_valkyrie.level_factor = 0

Definition at line 39 of file altar_valkyrie.py.

◆ obj

◆ part_factor

float altar_valkyrie.part_factor = 1

Definition at line 40 of file altar_valkyrie.py.

◆ pl

◆ praying

altar_valkyrie.praying = pl.CheckArchInventory('skill_praying')

Definition at line 29 of file altar_valkyrie.py.

◆ res

◆ value

int altar_valkyrie.value = obj.Exp / 5 * part_factor

Definition at line 69 of file altar_valkyrie.py.