This shows you the differences between two versions of the page.
Both sides previous revisionPrevious revisionNext revision | Previous revisionLast revisionBoth sides next revision | ||
crpl:docs:setdigitalis [2015/03/27 02:34] – added sectiaon warren | crpl:docs:setdigitalis [2016/07/25 09:28] – fixed first example to reflect zero quirk, reorganized examples planetfall | ||
---|---|---|---|
Line 10: | Line 10: | ||
An Amt of 1 means full health Digitalis, and 0 means no Digitalis. | An Amt of 1 means full health Digitalis, and 0 means no Digitalis. | ||
- | === Emulating | + | === Zero quirk === |
+ | FIXME This is based on experiment and observation, | ||
+ | |||
+ | Using this command to set the Digitalis level to zero results | ||
+ | |||
+ | === Examples | ||
^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. |