User Tools

Site Tools


crpl:docs:damagecreeper

<- CRPL reference <- Creeper Commands

DamageCreeper

ArgumentsResultNotation
Cell coordinates, max number of cells, radius, amount, terrain flagNone. 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

WeaponRadiusUnits of creeper
Blaster31.0
Mortar43.5
Strafer21.0
Bertha10100.0
Thor left/right cannons610.0
Thor main cannons1220.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)
crpl/docs/damagecreeper.txt · Last modified: 2020/07/05 08:46 by Karsten75