Basic Characters

version 1 by ShadowChaser

  • Home page
  • Beginning
  • Previous
  • Next



  • Section 6 - Natural healing

    Natural_Healing is a scene.

    Natural_Healing begins when play begins.

    Every turn during Natural_Healing:
        repeat with item running through people begin;
            naturally_heal the item;
            naturally_magically_heal the item;
        end repeat;
        repeat with item running through animals begin;
            naturally_heal the item;
            naturally_magically_heal the item;
        end repeat.
        
    To naturally_heal (item - a thing):
        if the item is not dead and the health of the item < the max_health of the item begin;
            if the heal_rate of the item > 0 and the item is heal_safe begin;
                now the heal_counter of the item is the heal_counter of the item + 1;
                if the heal_counter of the item is the heal_rate of the item begin;
                    increase_health_of the item by 1;
                    now the heal_counter of the item is 0;
                    if the item is the player begin;
                        say "[report_healing]";
                    end if;
                end if;
            end if;
        end if.

    To naturally_magically_heal (item - a thing):
        if the magic_level of the item < the max_magic of the item begin;
            if the magic_regen_rate of the item > 0 and the item is regen_safe begin;
                now the magic_counter of the item is the magic_counter of the item + 1;
                if the magic_counter of the item is the magic_regen_rate of the item begin;
                    increase_magic_of the item by 1;
                    now the magic_counter of the item is 0;
                    if the item is the player begin;
                        say "[report_magic_healing]";
                    end if;
                end if;
            end if;
        end if.