- [[crpl:crplreference|CRPL reference]] <- [[crpl:crplreference#creeper_commands|Creeper Commands]]
===== DamageCreeper =====
^Arguments^Result^Notation^
|Cell coordinates, max number of cells, radius, amount, terrain flag|None. |''i1 i2 i3 i4 i5 b -- ''|
=== Description ===
Reduces creeper level in a disk of radius i4, centered at cell (i1,i2). The amount of creeper removed at each cell is i5/1000000, and the central cell is reduced twice.
If i3 is larger than the number of cells in the disk, this parameter has no effect. Otherwise only i3 cells are reduced (the central cell counts twice), moving out from the center in concentric squares. The total amount of creeper removed is
i5/1000000 * min(i3, number of cells in disk + 1)
In other words, the area affected is roughly the intersection of a disk of radius i4 and a square of side length sqrt(i3-1), both centered at (i1,i2).
If the terrain flag b is TRUE, then cells at higher terrain level than the central cell are not affected.
The command also creates a graphical mist effect.
This command uses integer creeper (1000000 units per creeper).
=== Emulating the in-game weapons ===
^Weapon^Radius^Units of creeper^
|Blaster|3|1.0|
|Mortar|4|3.5|
|Strafer|2|1.0|
|Bertha|10|100.0|
|Thor left/right cannons|6|10.0|
|Thor main cannons|12|20.0|
Note: Blasters have a maximum cells of 12 and never hit higher terrain (terrain flag TRUE), and Strafers have a maximum cells of 8.
=== Examples ===
# Reduce creeper level by 1.0 in a radius 5 disk centered at the current mouse location.
# The central cell is lowered by 2.0.
# Note that parameter i3 is too large to modify the area of effect.
DamageCreeper(GetMouseCell 9999 5 1000000 FALSE)
# Reduce creeper level by 2.0 in a 5 by 5 square centered at the current mouse location.
# The central cell is lowered by 4.0.
# Terrain higher than current mouse location is unaffected.
# Note that parameter i4 is too large to modify the area of effect.
DamageCreeper(GetMouseCell 26 20 2000000 TRUE)