| 6 | IMPLEMENT(Prep_Down); |
| 7 | |
| 8 | bool Prep_Down::execute(aithread &thread) const |
| 9 | { |
| 10 | // Retrieve parameters |
| 11 | BYTE bSaveCount, bMinCount; |
| 12 | WORD wUnitType; |
| 13 | thread.readTuple( std::tie(bSaveCount, bMinCount, wUnitType) ); |
| 14 | |
| 15 | // Get count |
| 16 | int count = GetStandardUnitCount(wUnitType, false) - bSaveCount; |
| 17 | if ( count < bMinCount ) |
| 18 | count = bMinCount; |
| 19 | |
| 20 | // Add to attack group |
| 21 | // AI_AttackAdd(count, wUnitType); |
| 22 | |
| 23 | // Save debug info and return |
| 24 | thread.saveDebug(Text::Red, this->getOpcode(), "%u %u %s", bSaveCount, bMinCount, AISCRIPT::getUnitName(wUnitType)); |
| 25 | return true; |
| 26 | } |
nothing calls this directly
no test coverage detected