| 2052 | } |
| 2053 | |
| 2054 | void BattleUnit::updateCloak(GameState &state [[maybe_unused]], unsigned int ticks) |
| 2055 | { |
| 2056 | if (isConscious()) |
| 2057 | { |
| 2058 | auto e1 = agent->getFirstItemInSlot(EquipmentSlotType::LeftHand); |
| 2059 | auto e2 = agent->getFirstItemInSlot(EquipmentSlotType::RightHand); |
| 2060 | |
| 2061 | if (cloakTicksAccumulated < CLOAK_TICKS_REQUIRED_UNIT) |
| 2062 | { |
| 2063 | cloakTicksAccumulated += ticks; |
| 2064 | } |
| 2065 | if ((!e1 || e1->type->type != AEquipmentType::Type::CloakingField) && |
| 2066 | (!e2 || e2->type->type != AEquipmentType::Type::CloakingField)) |
| 2067 | { |
| 2068 | cloakTicksAccumulated = 0; |
| 2069 | } |
| 2070 | } |
| 2071 | } |
| 2072 | |
| 2073 | void BattleUnit::updateStateAndStats(GameState &state, unsigned int ticks) |
| 2074 | { |
nothing calls this directly
no test coverage detected