AttackFormula Class Reference

the core formula, which weighs the different factory that go into the calculation More...

#include <attack.h>

Inheritance diagram for AttackFormula:

Inheritance graph
[legend]
List of all members.

Public Member Functions

 AttackFormula (GameMap *gamemap)
float strength_experience (int experience)
float strength_damage (int damage)
float strength_attackbonus (int abonus)
float strength_hemming (int ax, int ay, Vehicle *d_eht)
float defense_experience (int experience)
float defense_defensebonus (int defensebonus)
virtual ~AttackFormula ()

Static Public Member Functions

static float getHemmingFactor (int relDir)

Protected Attributes

GameMapgamemap

Detailed Description

the core formula, which weighs the different factory that go into the calculation

Definition at line 42 of file attack.h.


Constructor & Destructor Documentation

AttackFormula::AttackFormula ( GameMap gamemap  ) 

Definition at line 48 of file attack.cpp.

References gamemap.

virtual AttackFormula::~AttackFormula (  )  [inline, virtual]

Definition at line 56 of file attack.h.


Member Function Documentation

float AttackFormula::strength_experience ( int  experience  ) 

Definition at line 119 of file attack.cpp.

References cgp_experienceDivisorAttack, gamemap, GameMap::getgameparameter(), and maxunitexperience.

Referenced by tfight::calc().

float AttackFormula::strength_damage ( int  damage  ) 

Definition at line 114 of file attack.cpp.

Referenced by tfight::calc().

float AttackFormula::strength_attackbonus ( int  abonus  ) 

Definition at line 136 of file attack.cpp.

Referenced by tfight::calc().

float AttackFormula::strength_hemming ( int  ax,
int  ay,
Vehicle d_eht 
)

Definition at line 93 of file attack.cpp.

References getdirection(), getHemmingFactor(), sidenum, Vehicle::xpos, and Vehicle::ypos.

float AttackFormula::defense_experience ( int  experience  ) 

Definition at line 127 of file attack.cpp.

References cgp_experienceDivisorDefense, gamemap, GameMap::getgameparameter(), and maxunitexperience.

Referenced by tfight::calc().

float AttackFormula::defense_defensebonus ( int  defensebonus  ) 

Definition at line 143 of file attack.cpp.

Referenced by tfight::calc().

float AttackFormula::getHemmingFactor ( int  relDir  )  [static]

Definition at line 77 of file attack.cpp.

References sidenum, and warningMessage().

Referenced by strength_hemming().


Member Data Documentation

GameMap* AttackFormula::gamemap [protected]

Definition at line 46 of file attack.h.

Referenced by AttackFormula(), tfight::calc(), defense_experience(), and strength_experience().


The documentation for this class was generated from the following files:
Generated on Mon May 21 01:46:21 2012 for Advanced Strategic Command by  doxygen 1.5.1