I noticed that the Scripting for Page Destinations based on %LIFE gave me fits when I was first trying to add it to my Crab Arena game. I was able to get it working right, by putting all the %LIFE Variable Changes in the Script itself above the Page Destination Scripting. That and I had to get the nesting just right.
For example:
On an Enemy Attack link I would do something like this in the Script off the link itself:
%ATTACK := 1D20
IF %ATTACK < 10 THEN
$DEST := @Px (miss page)
IF %ATTACK > 9 THEN
BEGIN
%LIFE := %LIFE - 1D6 + 2
IF %LIFE > 0 THEN
$DEST := @Px (damage result page)
IF %LIFE < 1 THEN
$DEST := @Px (death page)
END
You can even complicate it more, by balancing all the nesting – for example add 3 attack types to the enemies attack:
%ATTACK := 1D20
IF %ATTACK < 10 THEN
$DEST := @Px (miss page)
IF %ATTACK > 9 THEN
BEGIN
%TYPE := 1D3
IF %TYPE = 1 THEN
BEGIN
%LIFE := %LIFE - 1D6 + 2
IF %LIFE > 0 THEN
$DEST := @Px (damage result page)
IF %LIFE < 1 THEN
$DEST := @Px (death page)
END
IF %TYPE = 2 THEN
BEGIN
%LIFE := %LIFE - 1D10
IF %LIFE > 0 THEN
$DEST := @Px (damage result page)
IF %LIFE < 1 THEN
$DEST := @Px (death page)
END
IF %TYPE = 3 THEN
BEGIN
%LIFE := %LIFE - 2D8 + 12
IF %LIFE > 0 THEN
$DEST := @Px (damage result page)
IF %LIFE < 1 THEN
$DEST := @Px (death page)
END
END
(My apologies if you know all of this already)