* Set the amount of turns this tile is smoking. 0 = no smoke. * @param smoke : amount of turns this tile is smoking. */
| 655 | * @param smoke : amount of turns this tile is smoking. |
| 656 | */ |
| 657 | void Tile::addSmoke(int smoke) |
| 658 | { |
| 659 | if (_fire == 0) |
| 660 | { |
| 661 | if (_overlaps == 0) |
| 662 | { |
| 663 | _smoke = std::max(1, std::min(_smoke + smoke, 15)); |
| 664 | } |
| 665 | else |
| 666 | { |
| 667 | _smoke += smoke; |
| 668 | } |
| 669 | _animationOffset = RNG::generate(0,3); |
| 670 | addOverlap(); |
| 671 | } |
| 672 | } |
| 673 | |
| 674 | /** |
| 675 | * Set the amount of turns this tile is smoking. 0 = no smoke. |
no test coverage detected