Hyperlink Combat System

version 1 by Philip Black

  • Home page
  • Beginning
  • Previous
  • Next



  • Example: * Simple Warrior Combat Demo - A group of simple test arenas showing off the warrior class.
    "Simple Warrior Combat Demo"
        Include Hyperlink Combat System by Philip Black.
        North of Waiting Room is Combat Arena. "You are in a room with various weapons.[paragraph break]Go [o]NORTH[x] to try a basic Combat Arena.[line break]Go [o]EAST[x] to see how to make passive guards who join in an attack".
        Victory for a Player: [This script runs whenever Combat Ends!]
            Say "[Paragraph Break]VICTORY! The enemy is defeated. You have won.";
            [Spesify what happens next here]
            rule succeeds.
            
        Defeat for a Player: [This script runs whenever Combat Ends in failure!]
            End the story saying "[Paragraph Break]Defeat! The enemy overwhelms you, you have lost!";
            [Spesify what happens next here]
            rule succeeds.
        Default-Attack for Player: [This it the default attack behavior of THE PLAYER]
            StandardAttackSequence;
            rule succeeds.
        To say Target Name: [The word 'you' can be replaced with the tag for the player's name]
            If the Player is Target:
                Say "Player";
            [ Say "[Player name]";]
            Otherwise:
                Say "[Target]";
                
        To say Attacker Name:
            If the Player is Global Attacker:
                Say "Player";
            [ Say "[Player name]'s";]
            Otherwise:
                Say "[Global Attacker]'s";
                
        To say MyWeapon:
            If the player encloses a readied weapon: [This allows you to use the tag [MyWeapon] in combat discriptions to say what weapon the player is using]
                Say "[random readied weapon enclosed by the player]";
            Otherwise:
                Say "[One of]fists[or]feet[at random]";
        Rule for printing the description of something (called item):
             if the item is Subdued person:
                Say "[line break][description of item][paragraph break]The [noun] is defeated! [If the noun encloses at least 1 thing]You could loot them if you want (They are carrying [list of things enclosed by the noun])[otherwise]But unfortunately they don't have anything worth taking[end if]";
            Otherwise if item is a person:
                say "[line break][description of item] [bold type]Actions:[roman type] '[o]Attack [Item][x]' |"; [THIEVING MENU GOES HERE]
            Otherwise:
                say "[line break][description of item][if item is readied weapon] (Readied Weapon)[end if][if the maximum shots of item is at least 1 and current shots of item is less than maximum shots of item] ([current shots of item] of [maximum shots of item] [shots text of item] left)▶[o]RELOAD[x]◀ |[otherwise if the maximum shots of item is at least 1] ([current shots of item] of [maximum shots of item] [shots text of item] left)[end if] [bold type]Actions:[roman type][if the item is fixed in place][otherwise if the item is enclosed by the player] '[o]Drop [Item][x]' |[otherwise] '[o]Take [Item][x]' |[end if][if the item is wearable] '[o]Wear [Item][x]' |[end if][if the item is edible] '[o]Eat [Item][x]' |[end if][if the item is Potion] '[o]Drink [Item][x]' |[end if][if the item is readied Weapon] '[o]Unequip [Item][x]' |[otherwise if the item is Weapon] '[o]Equip [Item][x]' |[end if][if the item is locked] '[o]Unlock [Item][x]' |[end if][if the item is unlocked and the item is lockable] '[o]Lock [Item][x]' |[end if][line break]";
                
        The Attacking Text of Player is " You charge at [Target] ".
        The HITTING U of Player is "and HIT! ".
        The CRITICAL HIT of Player is "and HIT HARD! ".
        Mace is a kind of weapon. The Description is "A metal club.".
        There is a Mace in Waiting Room.
        accuracy bonus of a Mace is 3.
        the current shots of Mace is 0. [It doesn't need ammo, so both are 0]
        the maximum shots of Mace is 0.
        The dice number of Mace is 3.
        The damage die of Mace is 14.
        The Min Range of Mace is 0. [Short range. High damage]
        The Max Range of Mace is 2.
        Revolver is a kind of ranged weapon. The Description is "A Six shot [o]Revolver[x].".
        There is a Revolver in Waiting Room.
        accuracy bonus of a Revolver is 2. [hanguns aren't that acurate]
        the current shots of Revolver is 6.
        the maximum shots of Revolver is 6.
        The dice number of Revolver is 2.
        The damage die of Revolver is 12.
        The Min Range of Revolver is 0. [How close they can get before you can't attack with the weapon - ideal for bows and so on]
        The Max Range of Revolver is 20. [How far away it can hit]
        Hardy Longbow is a kind of ranged weapon. The Description is "A [o]Hardy Longbow[x]. It must be reloaded every other turn.".
        There is a Hardy Longbow in Waiting Room.
        accuracy bonus of a Hardy Longbow is 5. [Longbows are fairly acurate]
        the current shots of Hardy Longbow is 0.
        the maximum shots of Hardy Longbow is 1. [Longbows take time to reload]
        The dice number of Hardy Longbow is 1.
        The damage die of Hardy Longbow is 20.
        The Min Range of Hardy Longbow is 3. [How close they can get before you can't attack with the weapon - ideal for bows and so on]
        The Max Range of Hardy Longbow is 50. [How far away it can hit]
        Rockrock is a person in Combat Arena. Rockrock is hostile. The initiative of RockRock is 10.
        The health of Rockrock is 100.
        The permanent health of Rockrock is 100.
        The dice number of Rockrock is 10. [Rockrock is VERY STRONG. You need to kill it before it kills you.]
        The damage die of Rockrock is 12.
        The Min Range of Rockrock is 0. [Short range.]
        The Max Range of Rockrock is 1.
        Move Speed of Rockrock is 1. [Rockrock is very slow!]
        The Current Range of Rockrock is 20. [This is the didtance ]
        Rockrock is Predatory Attacker.
        The Waiting Text of Rockrock is "The Rockrock grinds into motion. ".
        The Attacking Text of Rockrock is " The Rockrock crashes towards [Target Name] ".
        Default-Attack for a Rockrock: [This it the default attack behavior AI of a RockRock]
            StandardAttackSequence;
            rule succeeds.
        Defeat for a Rockrock:
            Say "[Paragraph Break]You smash the Rockrock to bits! If all enemies are killed here, you can go back [o]SOUTH[x] to try the next area! ";
            rule succeeds.
        Goblin is a person in Combat Arena. Goblin is hostile. The initiative of Goblin is 9.
        The health of Goblin is 12.
        The permanent health of Goblin is 12.
        The Waiting Text of Goblin is "The Goblin waves its axe and screams. ".
        The Attacking Text of Goblin is " The Goblin slashes at [Target Name] ".
            
        Default-Attack for a Goblin:
            StandardAttackSequence;
            rule succeeds.
            
        Defeat for a Goblin:
            Say "[Paragraph Break]You smash the Rockrock to bits! If all enemies are killed here, you can go back [o]SOUTH[x] to try the next area! ";
            rule succeeds.
            
            
        West of Combat Arena 2 is Waiting Room. "This area is to show how to make a passive guard who attacks when provoked, and how friends back you up in combat! Try attacking one of the people here! Tip: If you [o]attack the Hobgoblin[x], local brawler Sam the Slayer will help you! But if you [o]attack Sam[x], the Hobgoblin will help you!".
        Hobgoblin is a person in Combat Arena 2. Hobgoblin is passive. The initiative of Hobgoblin is 10.
        The health of Hobgoblin is 100.
        The permanent health of Hobgoblin is 100.
        The Hobgoblin carries a Mace.
        The Waiting Text of Hobgoblin is "The Hobgoblin waves its mace and screams. ".
        The Attacking Text of Hobgoblin is "The Hobgoblin charges to bash [Target Name]'s head in ".
        Default-Attack for a Hobgoblin:
            StandardAttackSequence;
            rule succeeds.
        Victory for a Hobgoblin:
            Say "[Paragraph Break]You cut down Sam the Slayer! ";
            If Hobgoblin is Friendly:
                Now Hobgoblin is passive;
                If the health of Hobgoblin is at least 1:
                    Say "[Paragraph Break]Having won the day, the Hobgoblin returns to its post. ";
            rule succeeds.
        Check attacking a Hobgoblin:
            If FirstTurn is false:
                If the health of Sam the Slayer is at least 1:
                    Now Generic Ending is false;
                    Now Hobgoblin is hostile;
                    Now Sam the Slayer is Friendly;
                    Say "The Hobgoblin screams and draws its mace as as you run to attack! Sam sees them running at you and draws his sword!";
                Otherwise:
                    Say "You poke Sam's body with a stick. He isn't getting up.";
        passive2 is a faction.
            
        Sam the Slayer is a person in Combat Arena 2. Sam the Slayer is passive2. The initiative of Sam the Slayer is 10.
        The health of Sam the Slayer is 100.
        The permanent health of Sam the Slayer is 100.
        Sam the Slayer carries a Hardy Longbow.
        Move Speed of Sam the Slayer is 1. [Sam the Slayer is very slow!]
        The Current Range of Sam the Slayer is 8. [This is the didtance ]
        Sam the Slayer is Predatory Attacker.
        The Waiting Text of Sam the Slayer is "Sam the Slayer weaves and ducks around, getting ready to attack! ".
        The Attacking Text of Sam the Slayer is "Sam shoots his bow at [Target Name] ".
        The HITTING U of Sam the Slayer is "and scores a HIT! ".
        The Reloading Text of Sam the Slayer is "Sam strings an arrow onto his bow! ".
        The YouMiss TheyBlock of Sam the Slayer is "Sam jumps back, avoiding [Attacker Name] attack! ".
        Default-Attack for a Sam the Slayer: [This it the default attack behavior AI of a Sam the Slayer]
            StandardAttackSequence;
            rule succeeds.
        Victory for a Sam the Slayer:
            Say "[Paragraph Break]You cut down the Hobgoblin! ";
            If Sam the Slayer is Friendly:
                Now Sam the Slayer is passive2;
                If the health of Sam the Slayer is at least 1:
                    Say "[Paragraph Break]Having won the day, the Sam the Slayer returns to his post. ";
            rule succeeds.
            
        Check attacking a Sam the Slayer:
            If FirstTurn is false:
                If the health of Sam the Slayer is at least 1:
                    Now Sam the Slayer is hostile;
                    Now Hobgoblin is Friendly;
                    Say "Sam roars in anger as you attack! The Hobgoblin sees your aligance and attacks Sam!";
                Otherwise:
                    Say "You poke Sam's body with a stick. He isn't getting up.";