0.1.5::wyckedsceptre::wyckedsceptre::Attack Class Reference

An object for simulating a single RPG attack. More...

Inheritance diagram for 0.1.5::wyckedsceptre::wyckedsceptre::Attack:
Inheritance graph
[legend]
Collaboration diagram for 0.1.5::wyckedsceptre::wyckedsceptre::Attack:
Collaboration graph
[legend]

List of all members.

Public Member Functions

def __init__
 Constructor for the Attack object.
def __eq__
 overloaded equality operator for Attack object
def highest
 The highest possible outcome of an attack roll.
def lowest
 The lowest possible outcome of an attack roll.
def roll_damage
 Rolls for damage and includes bonus.

Detailed Description

An object for simulating a single RPG attack.

The attack is composed of a Die object plus a bonus


Member Function Documentation

def 0.1.5::wyckedsceptre::wyckedsceptre::Attack::__eq__ (   self,
  other 
)

overloaded equality operator for Attack object

def 0.1.5::wyckedsceptre::wyckedsceptre::Attack::__init__ (   self,
  description = '',
  die_roll = '1d6',
  attack_bonus = 0 
)

Constructor for the Attack object.

Parameters:
description - string that describes the attack
die_roll - string used in the Die object constructor
attack_bonus - integer used as a static bonus to the attack damage
def 0.1.5::wyckedsceptre::wyckedsceptre::Attack::highest (   self  ) 

The highest possible outcome of an attack roll.

Returns:
the highest possible damage of an attack as an integer
def 0.1.5::wyckedsceptre::wyckedsceptre::Attack::lowest (   self  ) 

The lowest possible outcome of an attack roll.

Returns:
the lowest possible damage of an attack as an integer
def 0.1.5::wyckedsceptre::wyckedsceptre::Attack::roll_damage (   self  ) 

Rolls for damage and includes bonus.

Returns:
a random damage roll for the Attack object as an integer

The documentation for this class was generated from the following file:
Generated on Tue Nov 2 22:28:25 2010 for wyckedsceptre by  doxygen 1.6.3