Basic Characters

version 1 by ShadowChaser

  • Home page
  • Beginning
  • Previous



  • Example: ** The Hideous Rabbit of Thoth - This demonstrates most of the functions used in this extension. You might want to keep examining your status whilst testing.

        "The Hideous Rabbit of Thoth" by Shadowchaser

        Include Basic Characters by ShadowChaser.

        The health of the player is 15.

        The black chamber of spellcasting is a room. "You are standing in the black chamber of spellcasting. A sign above you says 'You may CAST a spell here only at your peril.'".

        The abyss is a room.

        The hideous mutated rabbit is an animal in the abyss. "[if the hideous mutated rabbit is dead]You see a dead mutated rabbit here.[else]A hideous mutated rabbit eyes you with an evil stare.[end if]". The description is "It is hideous beyond all comprehension".

        The hideous mutated rabbit is heal_unsafe.

        casting is an action applying to nothing.

        understand "cast" as casting.
        understand "cast spell" as casting.
        understand "chant" as casting.

        Check casting:
            if the player is magically spent begin;
                say "You have no psychic energy left." instead;
            end if.

        Carry out Casting:
            decrease_magic_of the player by 3.

        Report Casting: Say "You use up some of your psychic energy...".

        After casting:
            if the hideous mutated rabbit is not in the black chamber begin;
                say "You chant the deadly words of power. A foul smelling black smoke rises from the ground and when it clears it reveals a hideous mutated rabbit. The rabbit glares at you.";
                now the player is heal_unsafe;
                now the player is regen_unsafe;
                now the hideous mutated rabbit is in the black chamber;
                decrease_Sanity_of the player by 20;
                Say "Your sanity is shaken.";
            else if the hideous mutated rabbit is dead;
                say "You chant the deadly words of power. A foul smelling black smoke rises from the ground and when it clears it reveals a re-animated mutated rabbit. The rabbit glares at you.";
                now the player is heal_unsafe;
                now the player is regen_unsafe;
                now the health of the hideous mutated rabbit is 10;
                decrease_Sanity_of the player by 20;
                Say "Your sanity is shaken.";
            else;
                say "You chant, and a blast of psychic energy hits the rabbit.";
                hurt the rabbit by 3;
            end if.

        To hurt the rabbit by (x - a number):
            decrease_health_of the hideous mutated rabbit by x;
            say "The rabbit screams in pain.";
            if the hideous mutated rabbit is dead begin;
                Say "It collapses in a lifeless heap.";
                now the player is regen_safe;
                now the player is heal_safe;
            end if.

        Instead of attacking the hideous mutated rabbit:
            if the hideous mutated rabbit is dead begin;
                say "It's already dead.";
            else;
                say "You punch the rabbit.";
                hurt the rabbit by 2;
            end if.
                
            
        Rabbit Attack is a scene.
        Rabbit Attack begins when the hideous mutated rabbit is in the black chamber for the first time.
        Rabbit Attack ends when the health of the player is 0.

        Every turn during Rabbit Attack:
            if the rabbit is not dead begin;
                say "The rabbit launches itself at you and bites you.";
                decrease_health_of the player by 2;
                if the player is dead begin;
                    Say "You die from your wounds...";
                    end the game in death;
                end if;
            end if.

        Test me with "cast / hit rabbit / cast / cast / cast".