This is an old revision of the document!
<- CRPL reference <- Digitalis Commands
Arguments | Result | Notation |
---|---|---|
X, Y, Amt | x1 y1 f1 – |
Sets Amt of Digitalis at coordinates. An Amt of 1 means full health Digitalis, and 0 means no Digitalis.
This is based on experiment and observation, not source knowledge.
Using this command to set the Digitalis level to zero results in never-regrowing Digitalis, even if there is Digitalis “growth” (pathway) present. Setting to -1 causes (seemingly) normal behaviour. Pressing “Delete Digitalis” in the editor returns cells to normal.
Weapon | Radius | Amount |
---|---|---|
Blaster | 1 | .52 |
Mortar | 3 | .52 |
Strafer | 2 | .35 |
Bertha | 10 | .7 |
#This function takes four arguments, a centre, then a range, then an amount. :damageDigitalis #Load up the arguments. ->amount ->r ->y0 ->x0 #Optimization: precalculate r^2. <-r dup mul ->r2 #Consider a radius shaped box about the origin. <-r 1 add 0 <-r sub do <-r 1 add 0 <-r sub do #Cull squares in the box not in the circle. I dup mul j dup mul add <-r2 lte if #Translate to our site of action. I <-x0 add J <-y0 add dup2 #Make sure to not inadvertently set digitalis to 0, making it never regrow GetDigitalis ->DigiPresent <-DigiPresent <-amount gt if <-DigiPresent <-amount sub SetDigitalis else <-DigiPresent -1 SetDigitalis endif endif Loop Loop
CurrentY 2 add CurrentY 1 sub do CurrentX 2 add CurrentX 1 sub do I J true SetDigitalisGrowth I J 1 SetDigitalis Loop Loop