-- Gun Game: a ladder of 24 weapons, from the Spartan Laser to the Energy -- Sword. Every kill moves the killer up a rung and earns a point, but a -- beat-down, from the front or from behind, earns nothing; being -- assassinated costs a rung and a point. The first to 24 points wins: the -- last of them a kill with the sword. Three rounds, nothing to pick up. --[=[ mode name = "Gun Game" [rules] score_to_win = 24 kill_points = 0 death_points = 0 suicide_points = 0 betrayal_points = 0 [options] "rounds.teams" = 0 "rounds.reset_players" = 1 "rounds.limit" = 3 "rounds.minutes" = 0 "map.weapons" = 11 "map.vehicles" = 1 "player.primary_weapon" = 16 "player.secondary_weapon" = -1 "player.pickup" = 2 "player.grenades" = 2 "player.ammo" = 2 ]=] alias rung = player.number[0] alias deaths = player.number[1] alias given = player.number[2] alias top = global.number[0] alias melee_weapons = global.number[1] alias death_count = temporaries.number[0] alias how = temporaries.number[1] alias killer = temporaries.player[0] -- The ladder's last rung, and the first of the two (the Gravity Hammer -- and the Energy Sword) whose melee strikes are the weapon's own. declare top = 23 declare melee_weapons = 22 -- No weapon given yet. declare player.number[2] = -1 -- Deaths, as each player's death count changes. for each player do death_count = current_player.get_death_count() if death_count != current_player.deaths then current_player.deaths = death_count how = current_player.get_death_damage_mod() killer = current_player.get_killer() if killer != no_player then if how == damage_mod.none or killer.rung >= melee_weapons then killer.score += 1 if killer.rung < top then killer.rung += 1 end end end if how == damage_mod.assassination and current_player.rung > 0 then current_player.score -= 1 current_player.rung -= 1 end end end -- Each player's rung's weapon, kept in their hands from life to life. for each player do if current_player.given != current_player.rung then current_player.given = current_player.rung if current_player.rung == 0 then current_player.set_weapon(spartan_laser) altif current_player.rung == 1 then current_player.set_weapon(rocket_launcher) altif current_player.rung == 2 then current_player.set_weapon(shotgun) altif current_player.rung == 3 then current_player.set_weapon(missile_pod) altif current_player.rung == 4 then current_player.set_weapon(sniper_rifle) altif current_player.rung == 5 then current_player.set_weapon(beam_rifle) altif current_player.rung == 6 then current_player.set_weapon(brute_shot) altif current_player.rung == 7 then current_player.set_weapon(fuel_rod_gun) altif current_player.rung == 8 then current_player.set_weapon(mauler) altif current_player.rung == 9 then current_player.set_weapon(battle_rifle) altif current_player.rung == 10 then current_player.set_weapon(machine_gun_turret) altif current_player.rung == 11 then current_player.set_weapon(magnum) altif current_player.rung == 12 then current_player.set_weapon(plasma_cannon) altif current_player.rung == 13 then current_player.set_weapon(carbine) altif current_player.rung == 14 then current_player.set_weapon(plasma_rifle) altif current_player.rung == 15 then current_player.set_weapon(spiker) altif current_player.rung == 16 then current_player.set_weapon(assault_rifle) altif current_player.rung == 17 then current_player.set_weapon(flamethrower) altif current_player.rung == 18 then current_player.set_weapon(plasma_pistol) altif current_player.rung == 19 then current_player.set_weapon(smg) altif current_player.rung == 20 then current_player.set_weapon(needler) altif current_player.rung == 21 then current_player.set_weapon(sentinel_beam) altif current_player.rung == 22 then current_player.set_weapon(gravity_hammer) altif current_player.rung == 23 then current_player.set_weapon(energy_sword) end end end