#include <attack.h>
Inheritance diagram for tfight:

Public Member Functions | |
| void | calc (void) |
| Performs the calculation of the attack. The result is only stored in the av and dv structures and is not written to the map. | |
| virtual void | setresult (const Context &context)=0 |
| Writes the result of the attack calculation to the actual units. | |
| virtual void | visit (FightVisitor &visitor)=0 |
| virtual int | getAttackingPlayer ()=0 |
| virtual int | getDefendingPlayer ()=0 |
Public Attributes | |
| tfight::tavalues | av |
| tfight::tavalues | dv |
Protected Member Functions | |
| tfight (GameMap *gamemap) | |
Protected Attributes | |
| int | dist |
Classes | |
| struct | tavalues |
Definition at line 81 of file attack.h.
| void tfight::calc | ( | void | ) |
Performs the calculation of the attack. The result is only stored in the av and dv structures and is not written to the map.
Definition at line 151 of file attack.cpp.
References tfight::tavalues::armor, tfight::tavalues::attackbonus, av, cgp_attackPower, tfight::tavalues::damage, AttackFormula::defense_defensebonus(), AttackFormula::defense_experience(), tfight::tavalues::defensebonus, dv, tfight::tavalues::experience, AttackFormula::gamemap, GameMap::getgameparameter(), tfight::tavalues::hemming, tfight::tavalues::kamikaze, maxunitexperience, tfight::tavalues::strength, AttackFormula::strength_attackbonus(), AttackFormula::strength_damage(), AttackFormula::strength_experience(), warningMessage(), and tfight::tavalues::weapcount.
Referenced by trunreplay::execnextreplaymove(), and GuiFunctions::AttackGui::getName().
| virtual void tfight::setresult | ( | const Context & | context | ) | [pure virtual] |
Writes the result of the attack calculation to the actual units.
Implemented in tunitattacksunit, tunitattacksbuilding, tmineattacksunit, and tunitattacksobject.
| virtual void tfight::visit | ( | FightVisitor & | visitor | ) | [pure virtual] |
Implemented in tunitattacksunit, tunitattacksbuilding, tmineattacksunit, and tunitattacksobject.
Referenced by BattleSoundPlayer::BattleSoundPlayer(), GetAttackerImage::GetAttackerImage(), GetTargetImage::GetTargetImage(), and BattleSoundPlayer::playEnd().
| virtual int tfight::getAttackingPlayer | ( | ) | [pure virtual] |
Implemented in UnitAttacksSomething, tunitattacksbuilding, tmineattacksunit, and tunitattacksobject.
| virtual int tfight::getDefendingPlayer | ( | ) | [pure virtual] |
Implemented in tunitattacksunit, tunitattacksbuilding, tmineattacksunit, and tunitattacksobject.
int tfight::dist [protected] |
Definition at line 84 of file attack.h.
Referenced by tunitattacksobject::setup(), tmineattacksunit::setup(), tunitattacksbuilding::setup(), and tunitattacksunit::setup().
| struct tfight::tavalues tfight::av |
Referenced by tsearchreactionfireingunits::attack(), AttackPanel::AttackPanel(), calc(), trunreplay::execnextreplaymove(), GuiFunctions::AttackGui::getName(), AttackPanel::painter(), tunitattacksobject::setresult(), tunitattacksbuilding::setresult(), tunitattacksunit::setresult(), and tmineattacksunit::setup().
| struct tfight::tavalues tfight::dv |
Referenced by tsearchreactionfireingunits::attack(), AttackPanel::AttackPanel(), calc(), trunreplay::execnextreplaymove(), GuiFunctions::AttackGui::getName(), AttackPanel::painter(), tunitattacksobject::setresult(), tmineattacksunit::setresult(), tunitattacksbuilding::setresult(), tunitattacksunit::setresult(), tmineattacksunit::setup(), and BattleSoundPlayer::visit().
1.5.1