Balanced Random Weapon

From Hedgewars Wiki
Jump to: navigation, search

Balanced Random Weapon is a style where each hedgehog gets 1 to 3 random weapons and/or utilities per turn. Weapons are reset each turn. This style differs from Random Weapon in that the chosen ammo types are weighted; stronger weapons are less likely than weak ones.

Ammo distribution

This section will explain how the weapons will be selected.

On each turn, the current hedgehog gets 3 ammo points. These ammo points are only used to choose random weapons and utilities seen in the lists below. Now random weapons and utilities are assigned to the hedgehog, where each weapon and utility reduces the ammo points by its cost. The availabie weapons and utilities are listed in the following sections. Here's the algorithm under which a hedgehog gets its ammo for this turn:

  1. Add a random weapon to ammo and subtract cost
  2. If there's still ammo points left:
    1. Forget any item in mind
    2. Choose a random weapon and keep it in mind (but don't add it to the ammo yet)
    3. Choose a random utility and keep it in mind (but don't add it to the ammo yet)
    4. Forget any items which are either too expensive or have already been taken by this hedgehog
    5. Randomly add one of the items which are still in mind to the hedgehog's ammo and substract cost
    6. Return to step 2

If there are 0 ammo points at step 2, the algorithm is finished.

Example

Let's say the turn starts for the hedgehog Will.

As always, Will starts with 3 ammo points.

In step 1, the bazooka is chosen and added to the ammo. This costs 1 ammo point, leaving 2 ammo points for Will.

Then, in steps 2b and 2c a grenade and a parachute are chosen. The random choise decides to use the grenade, which costs 1 point, leaving 1 point.

Then, step 2 is repeated. This time, a ballgun and a teleportation a chosen in steps 2b and 2c. However, the ballgun is too expensive (cost: 3 points) which leaves the only remaining choice to be the teleportation. The teleportation is added to Will's ammo, the final point is substracted and the algorithm is finished.

Finally, the hedgehog ends up with 1 bazooka, 1 grenade and 1 teleportation.

Initial ammo

The following tables show the weapons and utilities each hedgehog can start with, along with its cost.

Weapons

Weapon Cost
Grenade 1
Cluster Bomb 1
Bazooka 1
Homing Bee 2
Shotgun 1
Mine 1
Desert Eagle 1
Dynamite 2
Shoryuken 1
Whip 1
Pick Hammer 1
Baseball Bat 2
Mortar 1
Cake 3
Seduction 1
Watermelon Bomb 3
Hellish hand-grenade 3
Drill Rocket 2
Ballgun 3
RC Plane 3
Sniper Rifle 1
Molotov Cocktail 1
Birdy 2
Blow Torch 1
Old Limburger 1
Flamethrower 2
Sticky mine 2
Kamikaze 1
Air Attack 2
Mine Strike 2
Napalm 2
Drill Strike 2

Air Attack, Mine Strike, Napalm and Drill Strike are only available on open landscapes, not in caves.

Utilities

Utility Cost
Teleportation 1
Construction 2
Switch Hedgehog 2
Low Gravity 1
Resurrector 2
Rope 2
Parachute 1
Flying Saucer 2
Portable Portal Device 2
Mudball 2

Ammo in crates

From time to time, utility crates drop. These crates contain one of the following, with equal probability:

Customization

It is possible to alter the game scheme, most settings (e.g. turn time) can be configured freely without limits. The weapon scheme is fixed and can not be altered.

The following game modifiers are fixed in Balanced Random Weapon, setting them in the game scheme has no effect:

  • Reset weapons: Always enabled
  • Per-hog ammo: Always disabled

See also