Basic Characters

version 1 by ShadowChaser

  • Home page
  • Beginning
  • Previous
  • Next



  • Section 5 - Magic

    Table of Magic_Rank
    rank  
    "almost completely drained"  
    "extremely drained"  
    "drained"  
    "slightly drained"  
    "almost fully charged"  

    To say magic_of (item - a thing):
        now BC_val is the magic_level of the item;
        now BC_maxval is the max_magic of the item;
        if the magic_level of the item is 0 begin;
             say "completely drained";
        otherwise if the magic_level of the item is the max_magic of the item;
            say "fully charged";
        otherwise;
            say "[EqualRankOf BC_val out_of BC_maxval from_table Table of Magic_Rank]";
        end if.

    A person has a number called magic_level. A person has a number called max_magic. A person has a number called magic_regen_rate. A person has a number called magic_counter. A person can be either regen_safe or regen_unsafe. A person is usually regen_safe.

    The magic_level of a person is usually 10. The max_magic of a person is usually 10. The magic_regen_rate of a person is usually 5. The magic_counter of a person is usually 0.

    An animal has a number called magic_level. An animal has a number called magic_health. An animal has a number called magic_regen_rate. An animal has a number called magic_counter. An animal can be either regen_safe or regen_unsafe. An animal is usually regen_safe.

    The magic_level of an animal is usually 10. The max_magic of an animal is usually 10. The magic_regen_rate of an animal is usually 5. The magic_counter of an animal is usually 0.

    To increase_magic_of (item - a thing) by (mp - a number):
        let varmp be the magic_level of the item;
        let varmp be varmp + mp;
        now the magic_level of the item is varmp;
        if the magic_level of the item > the max_magic of the item begin;
            now the magic_level of the item is the max_magic of the item;
        end if.

    To decrease_magic_of (itemobj - a thing) by (mp - a number):
        let varmp be the magic_level of the itemobj;
        let varmp be varmp - mp;
        now the magic_level of the itemobj is varmp;
        if the magic_level of the itemobj < 0 begin;
            now the magic_level of the itemobj is 0;
        end if.

    To say report_magic_healing :
        say "You feel a little more psychically charged[if the magic_level of the player >= the max_magic of the player]; In fact, you are fully charged[end if].".

    Requesting the magic level of the player is an action out of world.

    Report requesting the magic level of the player:
        if using the no magic reporting option begin;
            say "You are no magician.";
        else;
            say "You are [magic_of the player].";
        end if.

    Understand "magic" as requesting the magic level of the player.

    Definition: a person (called the drained_actor) is magically spent if the magic_level of the drained_actor is 0.
    Definition: an animal (called the drained_actor) is magically spent if the magic_level of the drained_actor is 0.