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

Public Member Functions | |
| int | getAttackingPlayer () |
| int | getDefendingPlayer () |
| tmineattacksunit (const MapCoordinate &mineposition, int minenum, Vehicle *&attackedunit) | |
| void | setup (const MapCoordinate &position, int minenum, Vehicle *&attackedunit) |
| void | setresult (const Context &context) |
| Writes the result of the attack calculation to the actual units. | |
| Mine * | getFirstMine () |
| void | visit (FightVisitor &visitor) |
| Vehicle * | getTarget () |
Definition at line 209 of file attack.h.
| tmineattacksunit::tmineattacksunit | ( | const MapCoordinate & | mineposition, | |
| int | minenum, | |||
| Vehicle *& | attackedunit | |||
| ) |
Calculates the fight if a unit drives onto a mine.
| mineposition | The field on which the mine was placed | |
| minenum | The number of a specific mine which explodes. If -1 , all mines on this field which are able to attack the unit will explode. | |
| attackedunit | The unit which moved onto the minefield. |
Definition at line 542 of file attack.cpp.
References setup().
| int tmineattacksunit::getAttackingPlayer | ( | ) | [inline, virtual] |
| int tmineattacksunit::getDefendingPlayer | ( | ) | [inline, virtual] |
| void tmineattacksunit::setup | ( | const MapCoordinate & | position, | |
| int | minenum, | |||
| Vehicle *& | attackedunit | |||
| ) |
Definition at line 548 of file attack.cpp.
References tfight::tavalues::armor, tfight::tavalues::attackbonus, tfight::av, chtieffliegend, cmantipersonnelmine, cmm_trooper, tfight::tavalues::color, cwminen, ContainerBase::damage, tfight::tavalues::damage, tfight::tavalues::defensebonus, tfight::dist, tfight::dv, errorMessage(), Vehicle::experience, tfight::tavalues::experience, Vehicle::getArmor(), GameMap::getField(), ContainerBase::getMap(), MapField::getMine(), ContainerBase::getOwner(), tfight::tavalues::height, Vehicle::height, tfight::tavalues::hemming, VehicleType::initiative, tfight::tavalues::initiative, tfight::tavalues::kamikaze, MapField::mines, VehicleType::movemalustyp, Mine::strength, tfight::tavalues::strength, Vehicle::typ, Mine::type, tfight::tavalues::weapcount, tfight::tavalues::weapnum, and tfight::tavalues::weapontype.
Referenced by tmineattacksunit().
| void tmineattacksunit::setresult | ( | const Context & | context | ) | [virtual] |
Writes the result of the attack calculation to the actual units.
Implements tfight.
Definition at line 621 of file attack.cpp.
References ContainerBase::damage, tfight::tavalues::damage, tfight::dv, ContainerBase::getMap(), ActionRegistry::InflictDamage, MapField::mines, and ActionRegistry::RemoveMine.
| Mine * tmineattacksunit::getFirstMine | ( | ) |
Definition at line 644 of file attack.cpp.
References MapField::mines.
Referenced by GetAttackerImage::visit().
| void tmineattacksunit::visit | ( | FightVisitor & | visitor | ) | [inline, virtual] |
| Vehicle* tmineattacksunit::getTarget | ( | ) | [inline] |
Definition at line 245 of file attack.h.
Referenced by BattleSoundPlayer::visit(), and GetTargetImage::visit().
1.5.1