User Tools

Site Tools


crpl:docs:damagecreeper

Differences

This shows you the differences between two versions of the page.

Link to this comparison view

Next revision
Previous revision
crpl:docs:damagecreeper [2014/01/21 22:43] – Created. Mystery parameters still need explanation. stewbasiccrpl:docs:damagecreeper [2020/07/05 08:46] (current) – - Discussion tag Karsten75
Line 1: Line 1:
-~~DISCUSSION~~ 
 <- [[crpl:crplreference|CRPL reference]] <- [[crpl:crplreference#creeper_commands|Creeper Commands]] <- [[crpl:crplreference|CRPL reference]] <- [[crpl:crplreference#creeper_commands|Creeper Commands]]
 =====  DamageCreeper  ===== =====  DamageCreeper  =====
  
 ^Arguments^Result^Notation^ ^Arguments^Result^Notation^
-|Cell coordinates, ?, radius, amount, ?|None. |''i1 i2 i3 i4 i5 b -- ''| +|Cell coordinates, max number of cells, radius, amount, terrain flag|None. |''i1 i2 i3 i4 i5 b -- ''|
  
 === Description === === Description ===
-Reduces the creeper level by i5/1000000 at each cell in a disk of radius i4, centered at cell (i1,i2). The reduction in the central cell is doubledAlso creates a graphical mist effect.+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 
 + 
 +<code> 
 +i5/1000000 * min(i3, number of cells in disk + 1) 
 +</code> 
 + 
 +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 === === Examples ===
 <code> <code>
-# Reduce creeper level by 1.0 in a radius disk at the current mouse location.+# Reduce creeper level by 1.0 in a radius disk centered at the current mouse location.
 # The central cell is lowered by 2.0. # The central cell is lowered by 2.0.
-DamageCreeper(GetMouseCell 0 2 1000000 FALSE)+# 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)
 </code> </code>
  
crpl/docs/damagecreeper.1390362222.txt.gz · Last modified: 2014/10/01 15:02 (external edit)