#include <vehicle.h>
Public Types | |
| enum | Status { off, init1a, init2, ready, init1b } |
Public Member Functions | |
| ReactionFire (Vehicle *_unit) | |
| Status | getStatus () const |
| for each player that can still be attacked one bit is set | |
| int | enable () |
| enables the reaction fire or returns an error code ( result < 0 = -errorNr ) | |
| void | disable () |
| void | endOwnTurn () |
| hook that is called when a turn ends | |
| void | endAnyTurn () |
| void | checkData () |
| bool | canPerformAttack (Vehicle *target) |
| bool | canMove () const |
Public Attributes | |
| vector< int > | weaponShots |
| vector< int > | nonattackableUnits |
Friends | |
| class | Vehicle |
| class | UnitPropertyEditor |
| class | ChangeUnitProperty |
Definition at line 126 of file vehicle.h.
| Vehicle::ReactionFire::ReactionFire | ( | Vehicle * | _unit | ) |
Definition at line 558 of file vehicle.cpp.
References UnitWeapon::count, Vehicle::typ, VehicleType::weapons, and weaponShots.
| Status Vehicle::ReactionFire::getStatus | ( | ) | const [inline] |
for each player that can still be attacked one bit is set
Definition at line 138 of file vehicle.h.
Referenced by attackpossible2n(), ReactionFireSwitchCommand::avail(), JumpDriveCommand::available(), RepairUnitCommand::availExternally(), canPerformAttack(), copyVehicleData(), ServiceTargetSearcher::externallyAvailable(), ReactionFireSwitchCommand::go(), UnitPropertyEditor::init(), ReactionFireLayer::paintSingleField(), Vehicle::postAttack(), and AttackCommand::searchTargets().
| int Vehicle::ReactionFire::enable | ( | ) |
enables the reaction fire or returns an error code ( result < 0 = -errorNr )
Definition at line 586 of file vehicle.cpp.
References UnitWeapon::count, ContainerBaseType::hasFunction(), Vehicle::height, init2, ContainerBaseType::NoReactionfire, off, ready, SingleWeapon::shootable(), SingleWeapon::sourceheight, Vehicle::typ, VehicleType::wait, UnitWeapon::weapon, and VehicleType::weapons.
Referenced by copyVehicleData(), trunreplay::execnextreplaymove(), and setReactionFire().
| void Vehicle::ReactionFire::disable | ( | ) |
Definition at line 623 of file vehicle.cpp.
References ContainerBaseType::hasFunction(), init1a, init2, ContainerBaseType::MoveWithReactionFire, off, Vehicle::setMovement(), and Vehicle::typ.
Referenced by copyVehicleData(), trunreplay::execnextreplaymove(), UnitPropertyEditor::init(), and setReactionFire().
| void Vehicle::ReactionFire::endOwnTurn | ( | ) |
hook that is called when a turn ends
Definition at line 639 of file vehicle.cpp.
References init1a, init1b, init2, nonattackableUnits, off, and ready.
Referenced by Vehicle::endOwnTurn().
| void Vehicle::ReactionFire::endAnyTurn | ( | ) |
| void Vehicle::ReactionFire::checkData | ( | ) |
Definition at line 565 of file vehicle.cpp.
References UnitWeapon::count, SingleWeapon::reactionFireShots, Vehicle::typ, UnitWeapon::weapon, VehicleType::weapons, and weaponShots.
| bool Vehicle::ReactionFire::canPerformAttack | ( | Vehicle * | target | ) |
Definition at line 660 of file vehicle.cpp.
References Player::diplomacy, ContainerBase::getCarrier(), ContainerBase::getMap(), ContainerBase::getOwner(), GameMap::getPlayer(), getStatus(), DiplomaticStateVector::isHostile(), Vehicle::networkid, nonattackableUnits, and ready.
Referenced by tsearchreactionfireingunits::attack().
| bool Vehicle::ReactionFire::canMove | ( | ) | const |
Definition at line 651 of file vehicle.cpp.
References ContainerBaseType::hasFunction(), ContainerBaseType::MoveWithReactionFire, off, and Vehicle::typ.
Referenced by Vehicle::canMove(), Vehicle::getHeightChange(), and Vehicle::getMovement().
friend class UnitPropertyEditor [friend] |
friend class ChangeUnitProperty [friend] |
Definition at line 148 of file vehicle.h.
Referenced by checkData(), ReactionFire(), RegisterUnitRFTarget::runAction(), RegisterUnitRFTarget::undoAction(), and Vehicle::write().
Definition at line 149 of file vehicle.h.
Referenced by canPerformAttack(), endOwnTurn(), RegisterUnitRFTarget::runAction(), RegisterUnitRFTarget::undoAction(), and Vehicle::write().
1.5.1