Package schlachtfeld :: Module Char :: Class Char
[hide private]
[frames] | no frames]

Class Char

source code

Known Subclasses:
Hero, Leader

A single soldier. Will be imported from either a prefab character file from amov or via a template.

Instance Methods [hide private]
  __init__(self, source="tag:1w6.org,2007:Mensch", template=True)
Basic creation of a single soldier.
  __repr__(self)
Hopefully nice printout for a soldier.
  sethost(self, host)
Assign the soldier to a hosting Group-Entity.
  name_me(self, template)
Give the soldier a random name or import it from the file.
  damage(self, tp, ws, hws)
Damage a character and check for suvivial.
  checkalive(self)
Check if a character is still alive after being damaged.
  checkmorale(self)
A morale-check to figure out if the character will cross over or desert his Group.
  escape_check(self)
Check if the character tried to escape and made it alive.
  queue_up(self, amt=-1)
Adjust queue-value of character - either reduce by 1 (standard) or raise or lower deliberately.
  attack(self)
Make an attack-roll to be compared to the enemy's roll.
  upgrade(self, expadd, object=('random',0))
Randomly enhance the characters skills and attributes.
  manual_sytle(self, style)

Instance Variables [hide private]
  bTP
The damage a character can take before going down.
  WS
The wound value determines, how much damage suffices to inflict a wound on the character.
  dam
The damage which te characters main weapon inflicts.
  armor
The armor value of the character.
  wounds
deep wounds, critical wounds
  morale
base, speech, combat, bias, hero

Method Details [hide private]

__init__(self, source="tag:1w6.org,2007:Mensch", template=True)
(Constructor)

source code 
Basic creation of a single soldier.

__repr__(self)
(Representation operator)

source code 
Hopefully nice printout for a soldier.

sethost(self, host)

source code 
Assign the soldier to a hosting Group-Entity.

name_me(self, template)

source code 
Give the soldier a random name or import it from the file.

damage(self, tp, ws, hws)

source code 
Damage a character and check for suvivial. Arguments: hitpoints, wounds heavy wounds.

checkalive(self)

source code 
Check if a character is still alive after being damaged.

checkmorale(self)

source code 
A morale-check to figure out if the character will cross over or desert his Group. This method also automatically determines the fighting style of the soldier.

escape_check(self)

source code 
Check if the character tried to escape and made it alive.

queue_up(self, amt=-1)

source code 
Adjust queue-value of character - either reduce by 1 (standard) or raise or lower deliberately. Check for activeness.

attack(self)

source code 
Make an attack-roll to be compared to the enemy's roll. Base method to evaluate comabat. Contributions: base skill, weapon, armor, +-d6, wounds (deep: each -3, crit: each -6 while in combat), , group situation (strategy & bias), morale bonus

upgrade(self, expadd, object=('random',0))

source code 
Randomly enhance the characters skills and attributes. Dashes are spent and collected until a higher level is reached. Higher attributes and skills are preferred, thus specializing the character. expadd: number of dashes (float - subdashes included) object: object of enhancement; 'attribute', 'skill' or 'random' + name of object; standard is 'random'

manual_sytle(self, style)

source code 
None

Instance Variable Details [hide private]

bTP

The damage a character can take before going down.

WS

The wound value determines, how much damage suffices to inflict a wound on the character. It's a List containing the value for deep wounds and for critical wounds. A deep wounds weakens the character (3 points off any skill and attribute), a critical wounds disables (the character has to roll, if he keeps standing).

dam

The damage which te characters main weapon inflicts.

armor

The armor value of the character.

wounds

deep wounds, critical wounds

morale

base, speech, combat, bias, hero