This shows you the differences between two versions of the page.
| Both sides previous revisionPrevious revisionNext revision | Previous revision | ||
| crpl:docs:setdigitalis [2015/03/27 06:34] – added sectiaon warren | crpl:docs:setdigitalis [2025/02/14 14:57] (current) – external edit 127.0.0.1 | ||
|---|---|---|---|
| Line 8: | Line 8: | ||
| === Description === | === Description === | ||
| Sets Amt of Digitalis at coordinates. | Sets Amt of Digitalis at coordinates. | ||
| - | An Amt of 1 means full health Digitalis, and 0 means no Digitalis. | + | An Amt of 1 means full health Digitalis, -1 means killed or not-yet-grown, and 0 means no Digitalis |
| + | |||
| + | === Zero quirk === | ||
| + | FIXME This is based on experiment and observation, | ||
| + | |||
| + | Using this command to set the Digitalis level to zero results in never-regrowing Digitalis, even if there is Digitalis " | ||
| + | |||
| + | === Examples === | ||
| - | === Emulating the in game weapons === | ||
| ^Weapon^Radius^Amount^ | ^Weapon^Radius^Amount^ | ||
| |Blaster|1|.52| | |Blaster|1|.52| | ||
| Line 17: | Line 23: | ||
| |Bertha|10|.7| | |Bertha|10|.7| | ||
| - | Note: blasters will not injure digitalis that is uphill ever. | + | * ** Emulating the in game weapons **\\ %% %% \\ // |
| - | < | + | Note: blasters will not injure digitalis that is uphill ever. //\\ %% %%\\ < |
| #This function takes four arguments, a centre, then a range, then an amount. | #This function takes four arguments, a centre, then a range, then an amount. | ||
| : | : | ||
| Line 32: | Line 38: | ||
| I dup mul j dup mul add <-r2 lte if | I dup mul j dup mul add <-r2 lte if | ||
| #Translate to our site of action. | #Translate to our site of action. | ||
| - | I <-x0 add J <-x0 add dup2 | + | I <-x0 add J <-y0 add dup2 |
| - | #DAMAGE! | + | #Make sure to not inadvertently set digitalis to 0, making it never regrow |
| - | GetDigitalis <-amount sub SetDigitalis | + | GetDigitalis |
| + | < | ||
| + | < | ||
| + | else | ||
| + | < | ||
| + | endif | ||
| endif | endif | ||
| Loop | Loop | ||
| Loop | Loop | ||
| </ | </ | ||
| - | |||
| - | === Examples === | ||
| * **Lay down Digitalis on 3x3 grid under a unit**\\ %% %% \\ //The reason for the 2 is that the limit is one more than the loop iterates through. | * **Lay down Digitalis on 3x3 grid under a unit**\\ %% %% \\ //The reason for the 2 is that the limit is one more than the loop iterates through. | ||