#lang battlearena

To Install

Package Source: battlearena

Need a reminder how to install a package? Check out this video tutorial.

Hello World 1

Code a basic Battle Arena game.

(battlearena-game)

Avatar 1

Code a game with an avatar.

(battlearena-game
#:avatar (basic-avatar))

Avatar 2

Code a game with an avatar that has a custom sprite.

(battlearena-game
#:avatar (basic-avatar
          #:sprite pirateboy-sprite))

Avatar 3

Code a game with a fast-moving sprite.

(define (my-avatar)
 (basic-avatar #:sprite pirategirl-sprite
               #:speed 20))

(battlearena-game
#:avatar (my-avatar))

Avatar 4

Code a game with a fast-moving sprite, a large backpack, and double the health and shield values.

(define (my-avatar)
 (basic-avatar #:sprite pirateboy-sprite
               #:speed 20
               #:item-slots 5
               #:health 200
               #:shield 200
               #:max-health 200
               #:max-shield 200))

(battlearena-game
#:avatar (my-avatar))

Background 1

Code a game with that has a custom background.

(battlearena-game
#:bg (basic-bg))

Background 2

Code a game with that has a lava background.

(battlearena-game
#:bg (basic-bg
      #:image LAVA-BG))

Background 3

Code a game with that has a lava background and a 2 by 2 grid.

(define (my-bg)
 (basic-bg #:image LAVA-BG
           #:rows 2
           #:columns 2))

(battlearena-game
#:bg (my-bg))

Background 4

Code a game with that has a high definition lava background, 2 by 2 grid, and starts on tile 3.

(define (my-bg)
 (basic-bg #:image LAVA-BG
           #:rows 2
           #:columns 2
           #:start-tile 3
           #:hd? #t))

(battlearena-game #:bg (my-bg))

Boost 1

Code a game with a "Damage Boost" item that temporarily increases the damage of your weapon. Customize the icon.

(battlearena-game
#:weapon-list (list (repeater))
#:item-list (list
             (basic-item
              #:name "Damage Boost"
              #:icon (make-icon "DB" 'orangered)
              #:on-use (change-damage-by
                        1000
                        #:for 200))))

Boost 2

Code a game with a temporary "Speed Boost" item with a custom icon.

(battlearena-game
#:item-list (list
             (basic-item
              #:name "Speed Boost"
              #:icon (make-icon "SB" 'yellow)
              #:on-use (multiply-speed-by
                        2
                        #:for 200))))

Boost 3

Code a game with that has both a Damage and a Speed Boost defined items.

(define (damage-boost)
 (basic-item #:name   "Damage Boost"
             #:icon (make-icon "DB" 'orangered)
             #:on-use (change-damage-by 1000 #:for 200)
             #:rarity 'epic))

(define (speed-boost)
 (basic-item #:name   "Speed Boost"
             #:icon (make-icon "SB" 'yellow)
             #:on-use (multiply-speed-by 2 #:for 200)
             #:rarity 'uncommon))

(battlearena-game
#:item-list (list (damage-boost)
                  (speed-boost)))

Dagger Tower 1

Code a game with that has a custom weapon that deploys a dagger tower.

(battlearena-game
#:weapon-list (list (dagger-tower)))

Dagger Tower 2

Code a game with that has a custom weapon that deploys a fast, spread shooting dagger tower.

(battlearena-game
#:weapon-list (list (dagger-tower
                     #:speed      10
                     #:fire-mode  'spread)))

Dagger Tower 3

Code a game with that has a custom weapon that deploys a fast, spread shooting dagger tower with a custom dagger.

(battlearena-game
#:weapon-list (list (dagger-tower
                     #:fire-sound LASER-SOUND
                     #:damage     200
                     #:speed      10
                     #:fire-mode  'spread)))

Enemy 1

Code a game with an enemy.

(battlearena-game
#:enemy-list (list
              (basic-enemy)))

Enemy 2

Code a game with 10 random enemies

(battlearena-game
#:enemy-list (list
              (curry basic-enemy
                     #:amount-in-world 10)))

Enemy 3

Code a game with several enemies that have moderate intelligence.

(define (my-enemy)
 (basic-enemy #:sprite darkknight-sprite
              #:ai 'medium
              #:amount-in-world 5))

(battlearena-game
#:enemy-list (list
              (my-enemy)))

Enemy 4

Code a game with 8 enemies: 5 weak with low intelligence, and 3 strong with moderate intelligence. Choose your own sprites.

(define (easy-enemy)
 (basic-enemy #:ai 'easy
              #:sprite wizard-sprite
              #:health 50
              #:amount-in-world 5))

(define (medium-enemy)
 (basic-enemy #:ai 'medium
              #:sprite darkknight-sprite
              #:health 200
              #:amount-in-world 3))

(battlearena-game
#:enemy-list (list
              (easy-enemy)
              (medium-enemy)))

Enemy 5

Code a game with 5 high intelligence enemies that have a weapon that does 50 damage.

(define (hard-enemy)
 (basic-enemy #:ai 'hard
              #:sprite pirategirl-sprite
              #:amount-in-world 5
              #:weapon (repeater
                        #:damage 50)))

(battlearena-game
#:avatar       (basic-avatar)
#:enemy-list   (list (hard-enemy)))

Enemy Weapon 1

Code a game with an enemy that uses a sword.

(battlearena-game
#:enemy-list (list (basic-enemy
                    #:weapon (sword))))

Enemy Weapon 2

Code a game with that has an enemy, give it a custom weapon and customize it.

(define (my-weapon)
 (sword #:damage 40))

(battlearena-game
#:enemy-list (list (basic-enemy
                    #:weapon (my-weapon))))

Enemy Weapon 3

Code a game with an enemy that uses a weak and slow repeater that shoots short-ranged darts.

(define (my-weapon)
 (repeater
  #:name  "Light Repeater"
  #:damage 5
  #:speed  1
  #:range  200))

(battlearena-game
#:enemy-list (list (basic-enemy
                    #:weapon (my-weapon))))

Fire Magic 1

Code a game with that has fire magic in it.

(battlearena-game
#:weapon-list (list (fire-magic)))

Fire Magic 2

Code a game with fire magic that does 20 damage.

(define (my-weapon)
 (fire-magic
  #:name "Heavy Fire Magic"
  #:damage 20))

(battlearena-game
#:weapon-list (list
               (my-weapon)))

Fire Magic 3

Code a game with a powerful, fast fire magic that has a high rarity.

(define (my-weapon)
 (fire-magic #:damage 20
             #:speed  10
             #:rarity 'epic))

(battlearena-game
#:weapon-list (list (my-weapon)))

Fire Magic 4

Code a game with a legendary fire magic with a customized sprite, damage, speed, and range.

(define (my-weapon)
 (fire-magic
  #:name "Fire Magic"
  #:icon (make-icon "FM" 'red)
  #:color 'green
  #:damage 20
  #:speed 10
  #:range 50
  #:rarity 'legendary))

(battlearena-game
#:weapon-list (list
               (my-weapon)))

Force Field 1

Code a game with a "Force Field" item.

(battlearena-game
#:item-list (list (basic-item #:name "Force Field"
                              #:on-use (spawn (force-field)))))

Force Field 2

Code a game with a "Force Field" item that lasts for a long time. Customize the icon.

(battlearena-game
#:item-list (list (basic-item #:name "Force Field"
                              #:icon (make-icon "FF")
                              #:on-use (spawn (force-field #:duration 1000)))))

Force Field 3

Code a game with a "Force Field" item that has a custom icon. Customize the duration and allow the player to shoot out of it.

(define (force-field-item)
 (basic-item #:name "Force Field"
             #:icon (make-icon "FF")
             #:on-use (spawn (force-field #:allow-friendly-dart? #t
                                          #:duration 3000))))

(battlearena-game
#:item-list (list (force-field-item)))

Health 1

Code a game with a "Health Power-up" item that increases your health. Customize the icon and make it respawnable.

(battlearena-game
#:item-list (list
             (basic-item
              #:name "Health Power-up"
              #:icon (make-icon "HP" 'green 'white)
              #:on-use (change-health-by 50)
              #:respawn? #t)))

Health 2

Code a game with a "Max Health Power-up" item that sets your health to 100. Customize the icon and the rarity.

(battlearena-game
#:item-list (list (basic-item #:name   "Max Health Power-up"
                              #:icon (make-icon "MHP" 'green 'white)
                              #:on-use (set-health-to 100)
                              #:rarity 'epic)))

Health 3

Code a game with 2 health items: the first one should increase your health, the second one should fully restore your health. Make custom icons for both.

(define (health-powerup)
 (basic-item #:name     "Health Power-up"
             #:icon   (make-icon "HP")
             #:on-use   (change-health-by 50)))

(define (max-health-powerup)
 (basic-item #:name   "Max Health Power-up"
             #:icon (make-icon "MHP")
             #:on-use (set-health-to 100)))

(battlearena-game
#:item-list      (list (health-powerup)
                       (max-health-powerup)))

Hello World 1

Code a basic Battle Arena game.

(battlearena-game)

Homing Repeater 1

Code a game with a weapon that fires homing darts.

(battlearena-game
#:weapon-list    (list (repeater #:name "Homing Repeater"
                                 #:icon (make-icon "HR")
                                 #:fire-mode 'homing)))

Homing Repeater 2

Code a game with a powerful, slow repeater that shoots homing darts. Customize the name and the icon.

(battlearena-game
#:weapon-list (list (repeater #:name      "Homing Repeater"
                              #:icon      (make-icon "HR")
                              #:fire-mode 'homing
                              #:damage    50
                              #:speed     5)))

Homing Repeater 3

Code a game with a rare weapon that fires homing darts with customized sprite, damage, speed, and range.

(define (homing-repeater)
 (repeater #:name      "Homing Repeater"
           #:icon      (make-icon "HR")
           #:fire-mode 'homing
           #:rarity    'rare
           #:sprite    (rectangle 10 2 'solid 'pink)
           #:damage    50
           #:speed     8
           #:range     40))

(battlearena-game
#:weapon-list    (list (homing-repeater)))

Ice Magic 1

Code a game with that has ice magic in it.

(battlearena-game
#:weapon-list (list (ice-magic)))

Ice Magic 2

Code a game with that has ice magic with 20 damage.

(define (my-weapon)
 (ice-magic #:name   "Heavy Ice Magic"
            #:damage 20))

(battlearena-game
#:weapon-list (list (my-weapon)))

Ice Magic 3

Code a game with that has an 'epic ice magic with 20 damage and 10 speed.

(define (my-weapon)
 (ice-magic #:name   "Ice Magic"
            #:sprite (make-icon "FM" 'red)
            #:damage 20
            #:speed  10
            #:rarity 'epic))

(battlearena-game
#:weapon-list (list (my-weapon)))

Ice Magic 4

Code a game with that has a 'legendary ice magic with a customized sprite, damage, speed, and range.

(define (my-weapon)
 (ice-magic #:name   "Ice Magic"
            #:icon   (make-icon "FM" 'red)
            #:color  'green
            #:damage  20
            #:speed   10
            #:range   50
            #:rarity  'legendary))

(battlearena-game
#:weapon-list (list (my-weapon)))

Lava Pit 1

Code a game with that has a custom weapon that deploys a lava pit.

(battlearena-game
#:weapon-list (list (lava-pit)))

Lava Pit 2

Code a game with that has a custom weapon that deploys a lava pit with custom damage and size.

(battlearena-game
#:weapon-list (list (lava-pit
                     #:damage 25
                     #:size   2)))

Lava Pit 3

Code a game with that has a custom weapon that deploys a lava pit with custom damage, size, sprite, and range.

(define (my-lava-pit)
 (lava-pit #:damage  25
           #:size    2
           #:sprite  (circle 10 'solid 'black)
           #:icon    (make-icon "LAVA" 'red 'white)))

(battlearena-game
#:weapon-list (list (my-lava-pit)))

Level Design 1

Code a game with a forest background that has world objects.

(battlearena-game
#:bg (basic-bg #:image FOREST-BG)
#:enable-world-objects? #t)

Level Design 2

Code a game with a forest background filled with high definition trees.

(battlearena-game
#:bg             (basic-bg #:image FOREST-BG)
#:other-entities (make-world-objects round-tree
                                     pine-tree
                                     #:hd? #t))

Level Design 3

Code a game with a pink background that has two randomly-colored types of trees in high definition.

(battlearena-game
#:bg (basic-bg
      #:image PINK-BG)
#:other-entities (make-world-objects
                  candy-cane-tree
                  snow-pine-tree
                  #:hd? #t
                  #:random-color? #t))

Level Design 4

Code a game with 3 world objects with customized position, tile, size, and/or hue.

(battlearena-game
#:other-entities
(pine-tree
 (posn 100 200)
 #:tile 0)
(wood-house
 (posn 100 200)
 #:tile 1
 #:size 0.5)
(brick-house
 (posn 100 200)
 #:tile 2
 #:hue
 (random 360)))

Magic Balance 1

Code a game with that has a light magic weapon.

(battlearena-game
#:weapon-list (list (ring-of-fire #:name "Light Magic"
                                  #:icon (make-icon "LM")
                                  #:damage 20
                                  #:rarity 'common)))

Magic Balance 2

Code a game with that has a heavy magic weapon.

(battlearena-game
#:weapon-list (list (ring-of-fire #:name "Heavy Magic"
                                  #:icon   (make-icon "HM")
                                  #:sprite (scale 2 flame-sprite)
                                  #:damage 200
                                  #:rarity 'epic)))

Magic Balance 3

Code a game with that has a light and a heavy magic weapon. Balance them relative to each other.

(define (heavy-magic)
 (ring-of-fire #:name   "Heavy Magic"
               #:icon   (make-icon "HM")
               #:sprite (scale 2 flame-sprite)
               #:damage 200
               #:rarity 'epic))

(define (light-magic)
 (ring-of-fire #:name     "Light Magic"
               #:icon   (make-icon "LM")
               #:damage   20
               #:duration 20
               #:rarity   'common))

(battlearena-game
#:weapon-list (list (heavy-magic)
                    (light-magic)))

Melee Balance 1

Code a game with that has a 'common light melee weapon with 10 damage.

(battlearena-game
#:weapon-list (list (sword #:name "Light Sword"
                           #:sprite (make-icon "LS")
                           #:damage 10
                           #:rarity 'common)))

Melee Balance 2

Code a game with that has an 'epic heavy melee weapon with 200 damage.

(battlearena-game
#:weapon-list (list (sword #:name "Heavy Sword"
                           #:icon (make-icon "HS")
                           #:sprite (scale 2 swinging-sword-sprite)
                           #:damage 200
                           #:rarity 'epic)))

Melee Balance 3

Code a game with that has a light and a heavy melee weapon. Balance them relative to each other.

(define (heavy-sword)
 (sword #:name "Heavy Sword"
        #:icon (make-icon "HS")
        #:sprite (scale 2 swinging-sword-sprite)
        #:damage 200
        #:rarity 'epic))

(define (light-sword)
 (sword #:name "Light Sword"
        #:icon (make-icon "LS")
        #:damage 10
        #:rarity 'common))

(battlearena-game
#:weapon-list (list (heavy-sword)
                    (light-sword)))

Paint Thrower 1

Code a game with that has a paint thrower in it.

(battlearena-game
#:weapon-list (list (paint-thrower)))

Paint Thrower 2

Code a game with that has a paint thrower with 20 damage.

(define (my-weapon)
 (paint-thrower #:name   "Heavy Paint Thrower"
                #:damage 20))

(battlearena-game
#:weapon-list (list (my-weapon)))

Paint Thrower 3

Code a game with that has an 'epic paint thrower with 20 damage and 10 speed.

(define (my-weapon)
 (paint-thrower #:name   "Paint Thrower"
                #:sprite (make-icon "PT" 'blue)
                #:damage 20
                #:speed  10
                #:rarity 'epic))

(battlearena-game
#:weapon-list (list (my-weapon)))

Paint Thrower 4

Code a game with that has a 'legendary paint thrower with a customized sprite, damage, speed, and range.

(define (my-weapon)
 (paint-thrower #:name   "Paint Thrower"
                #:icon   (make-icon "PT" 'blue)
                #:color 'green
                #:damage  20
                #:speed   10
                #:range   50
                #:rarity  'legendary))

(battlearena-game
#:weapon-list (list (my-weapon)))

Repeater Armor 1

Code a game with that has armor called Repeater Armor.

(battlearena-game
#:item-list (list (basic-armor #:name   "Repeater Armor"
                               #:icon (make-icon "RA"))))

Repeater Armor 2

Code a game with that has working Repeater Armor.

(battlearena-game
#:item-list (list (basic-armor #:name          "Repeater Armor"
                               #:icon        (make-icon "RA")
                               #:protects-from "Repeater"
                               #:change-damage (divide-by 2)
                               #:rarity        'rare)))

Repeater Armor 3

Code a game with that has 10 enemies with a repeater and armor for your avatar that will protect against that repeater!

(battlearena-game
#:enemy-list (list (basic-enemy #:amount-in-world 10
                                #:weapon          (repeater)))
#:item-list (list (basic-armor #:name          "Repeater Armor"
                               #:icon          (make-icon "RA")
                               #:protects-from "Repeater"
                               #:change-damage (divide-by 2)
                               #:rarity        'rare)))

Repeater Balance 1

Code a game with that has a light repeater weapon.

(battlearena-game
#:weapon-list (list (repeater #:name "Light Repeater"
                              #:sprite paint-sprite
                              #:damage 20
                              #:speed  30
                              #:range  50
                              #:rarity 'common)))

Repeater Balance 2

Code a game with that has a heavy repeater weapon.

(battlearena-game
#:weapon-list (list (repeater #:name "Heavy Repeater"
                              #:sprite (scale 2 paint-sprite)
                              #:damage 500
                              #:speed  10
                              #:range  50
                              #:rarity 'uncommon)))

Repeater Balance 3

Code a game with that has a light and a heavy repeater weapon. Balance them relative to each other.

(define (heavy-weapon)
 (repeater #:name "Heavy Repeater"
           #:icon (make-icon "HR")
           #:rarity 'rare
           #:sprite (scale 2 paint-sprite)
           #:damage 500
           #:speed  10
           #:range  50))

(define (light-weapon)
 (repeater #:name "Light Repeater"
           #:icon (make-icon "LR")
           #:rarity 'common
           #:sprite paint-sprite
           #:damage 20
           #:speed  30
           #:range  50))

(battlearena-game
#:weapon-list (list (heavy-weapon)
                    (light-weapon)))

Repeater Tower 1

Code a game with that has a weapon that deploys a Repeater Tower.

(battlearena-game
#:weapon-list (list (repeater-tower)))

Repeater Tower 2

Code a game with a tower that quickly shoots fast-moving darts.

(battlearena-game
#:weapon-list (list (repeater-tower
                     #:speed      20
                     #:fire-rate  10)))

Repeater Tower 3

Code a game with a tower that shoots extremely powerful, fast-moving, long-ranged darts at a very slow rate.

(battlearena-game
#:weapon-list (list (repeater-tower
                     #:speed      15
                     #:damage     1000
                     #:range      500
                     #:fire-rate  0.1)))

Rocket Tower 1

Code a game with that has a custom weapon that deploys a Rocket Tower.

(battlearena-game
#:weapon-list (list (rocket-tower)))

Rocket Tower 2

Code a game with that has a custom weapon that deploys a slow shooting, homing Rocket Tower.

(battlearena-game
#:weapon-list (list (rocket-tower
                     #:speed      2
                     #:fire-mode  'homing)))

Rocket Tower 3

Code a game with that has a custom weapon that deploys a slow shooting, homing Rocket Tower that shoots a custom rocket.

(battlearena-game
#:weapon-list (list (rocket-tower
                     #:range      200
                     #:damage     1000
                     #:speed      2
                     #:fire-mode  'homing)))

Shield 1

Code a game with that has an item that increases your shield by 50.

(battlearena-game
#:item-list (list (basic-item
                   #:name     "Shield Power-up"
                   #:icon   (make-icon "SP" 'blue 'white)
                   #:on-use   (change-shield-by 50))))

Shield 2

Code a game with a "Max Shield Power-up" item that sets your shield to 100. Customize the icon.

(battlearena-game
#:item-list (list
             (basic-item
              #:name "Max Shield Power-up"
              #:icon (make-icon "MSP" 'blue 'white)
              #:on-use (set-shield-to 100))))

Shield 3

Code a game with that has both a Shield and Max Shield defined items.

(define (shield-powerup)
 (basic-item #:name     "Shield Power-up"
             #:icon   (make-icon "SP" 'blue 'white)
             #:on-use   (change-shield-by 50)
             #:rarity   'uncommon
             #:respawn? #t))

(define (max-shield)
 (basic-item #:name     "Max Shield Power-up"
             #:icon   (make-icon "MSP" 'blue 'white)
             #:on-use   (set-shield-to 100)
             #:rarity   'epic))

(battlearena-game
#:item-list (list (shield-powerup)
                  (max-shield)))

Single Shot 1

Code a game with a weapon that fires only once per click.

(battlearena-game
#:weapon-list (list
               (repeater #:name "Single Shot"
                         #:icon (make-icon "SS")
                         #:rapid-fire? #f)))

Single Shot 2

Code a game with a powerful, fast repeater that shoots a single dart with short range. Customize the icon and the name.

(define (my-weapon)
 (repeater #:name        "Single Shot"
           #:icon        (make-icon "SS")
           #:rapid-fire? #f
           #:damage      20
           #:speed       20
           #:range       5))

(battlearena-game
#:weapon-list (list (my-weapon)))

Single Shot 3

Code a game with a 'rare single-shot weapon that fires a dart with customized sprite, damage, speed, and range.

(define (single-shot)
 (repeater #:name        "Single Shot"
           #:icon        (make-icon "SS")
           #:sprite      (rectangle 10 2 'solid 'cyan)
           #:damage      40
           #:speed       20
           #:range       50
           #:rapid-fire? #f
           #:rarity      'rare))

(battlearena-game
#:weapon-list (list (single-shot)))

Size 1

Code a game with a "Grow Power-up" item that makes you bigger. Customize the icon.

(battlearena-game
#:item-list (list
             (basic-item
              #:name "Grow Power-up"
              #:icon (make-icon "BIG" 'red 'white)
              #:on-use (scale-sprite
                        2
                        #:for 100))))

Size 2

Code a game with an item that makes you shrink, name it and customize the icon.

(battlearena-game
#:item-list (list (basic-item #:name   "Shrink Power-up"
                              #:icon (make-icon "SML" 'blue 'white)
                              #:on-use (scale-sprite 0.5 #:for 100))))

Size 3

Code a game with both grow powerups and shrink powerups.

(define (grow-powerup)
 (basic-item #:name   "Grow Power-up"
             #:icon (make-icon "BIG" 'red 'white)
             #:on-use (scale-sprite 2 #:for 100)
             #:rarity 'common))

(define (shrink-powerup)
 (basic-item #:name     "Shrink Power-up"
             #:icon   (make-icon "SML" 'blue 'white)
             #:on-use   (scale-sprite 0.5 #:for 100)
             #:rarity   'rare))

(battlearena-game
#:item-list      (list (grow-powerup)
                       (shrink-powerup)))

Spear 1

Code a game with that has a spear.

(battlearena-game
#:weapon-list (list (spear)))

Spear 2

Code a game with a strong spear. Customize the name.

(battlearena-game
#:weapon-list (list (spear #:name "Heavy Spear"
                           #:damage 50)))

Spear 3

Code a game with an epic rarity spear that does 50 damage.

(define (my-spear)
 (spear
  #:name "Heavy Spear"
  #:damage 50
  #:rarity 'epic))

(battlearena-game
#:weapon-list (list
               (my-spear)))

Spear 4

Code a game with that has a 'blue 'legendary spear with 100 damage, 20 speed, and 10 range.

(define (my-spear)
 (spear #:name   "Spear"
        #:icon   (make-icon "LS" 'blue)
        #:color 'blue
        #:damage 100
        #:speed 20
        #:range 10
        #:rarity 'legendary))

(battlearena-game
#:weapon-list (list (my-spear)))

Spear Tower 1

Code a game with a spear tower.

(battlearena-game
#:weapon-list (list (spear-tower)))

Spear Tower 2

Code a game with a tower that shoots fast, long-ranged spears.

(battlearena-game
#:weapon-list (list (spear-tower
                     #:speed 10
                     #:range 50)))

Spear Tower 3

Code a game with a tower that shoots fast, powerful, gold-colored spears with a long range.

(battlearena-game
#:weapon-list (list (spear-tower
                     #:sprite (set-sprite-color 'gold spear-sprite)
                     #:damage 100
                     #:speed 10
                     #:range 50)))

Spike Mine 1

Code a game with a spike mine.

(battlearena-game
#:weapon-list (list (spike-mine)))

Spike Mine 2

Code a game with a spike mine that uses fast, long-ranged darts.

(battlearena-game
#:weapon-list (list (spike-mine
                     #:speed 10
                     #:range 50)))

Spike Mine 3

Code a game with that has a weapon that deploys a spike mine with a large range and speed, high damage, and custom sprite.

(battlearena-game
#:weapon-list (list (spike-mine
                     #:sprite (set-sprite-color 'red spike-mine-sprite)
                     #:damage 100
                     #:range  100)))

Spread Shot 1

Code a game with a spread-shot weapon.

(battlearena-game
#:weapon-list (list (repeater #:name      "Spread Shot"
                              #:icon      (make-icon "SPR")
                              #:fire-mode 'spread)))

Spread Shot 2

Code a game with a powerful, fast repeater that shoots multiple darts. Customize the name and the icon.

(define (my-weapon)
 (repeater #:name      "Spread Shot"
           #:icon      (make-icon "SPR")
           #:fire-mode 'spread
           #:damage     20
           #:speed      15))

(battlearena-game
#:weapon-list    (list (my-weapon)))

Spread Shot 3

Code a game with a 'rare spread-shot weapon that fires darts with customized sprite, damage, durability, and speed.

(define (spread-shot)
 (repeater #:name        "Spread Shot"
           #:icon        (make-icon "SPR")
           #:fire-mode   'spread
           #:sprite      (rectangle 10 2 'solid 'orange)
           #:rarity      'rare
           #:damage       20
           #:speed        15))

(battlearena-game
#:weapon-list    (list (spread-shot)))

Sword 1

Code a game with that has a sword.

(battlearena-game
#:weapon-list (list (sword)))

Sword 2

Code a game with a sword that does 50 damage.

(battlearena-game
#:weapon-list (list
               (sword
                #:name "Heavy Sword"
                #:damage 50)))

Sword 3

Code a game with that has an 'epic sword that does 50 damage.

(define (my-sword)
 (sword #:name   "Heavy Sword"
        #:damage 50
        #:rarity 'epic))

(battlearena-game
#:weapon-list (list (my-sword)))

Sword 4

Code a game with that has a 'gold 'legendary sword with 100 damage and 100 duration.

(define (my-sword)
 (sword #:name   "Sword"
        #:icon   (make-icon "LS" 'gold)
        #:color 'gold
        #:damage 100
        #:duration  100
        #:rarity 'legendary))

(battlearena-game
#:weapon-list (list (my-sword)))

Sword Armor 1

Code a game with that has armor called Sword Armor.

(battlearena-game
#:item-list (list (basic-armor #:name   "Sword Armor"
                               #:icon (make-icon "SA"))))

Sword Armor 2

Code a game with that has working Sword Armor.

(battlearena-game
#:item-list (list (basic-armor #:name   "Sword Armor"
                               #:icon (make-icon "SA")
                               #:protects-from "Sword"
                               #:change-damage (subtract-by 30)
                               #:rarity 'rare)))

Sword Armor 3

Code a game with that has 10 enemies with a sword and armor for your avatar that will protect against that sword!

(battlearena-game
#:enemy-list (list (basic-enemy #:amount-in-world 10
                                #:weapon       (sword)))
#:item-list (list (basic-armor #:name          "Sword Armor"
                               #:icon        (make-icon "RA")
                               #:protects-from "Sword"
                               #:change-damage (divide-by 2)
                               #:rarity        'rare)))

Wall Builder

????

(battlearena-game
#:enemy-list (list (basic-enemy #:amount-in-world 20))
#:weapon-list (list (basic-weapon
                     #:dart (builder-dart #:entity
                                          (wall)))))