* damage terrain - check against armor * @param part Part to check. * @param power Power of the damage. * @return bool Return true objective was destroyed */
| 478 | * @return bool Return true objective was destroyed |
| 479 | */ |
| 480 | bool Tile::damage(int part, int power) |
| 481 | { |
| 482 | bool objective = false; |
| 483 | if (power >= _objects[part]->getArmor()) |
| 484 | objective = destroy(part); |
| 485 | return objective; |
| 486 | } |
| 487 | |
| 488 | /** |
| 489 | * Set a "virtual" explosive on this tile. We mark a tile this way to detonate it later. |
no test coverage detected