/** * Mode Battle */ #RequireContext CSmMode #Const CompatibleMapTypes "BattleArena" #Const Version "2012-07-25" #Include "MathLib" as MathLib #Include "TextLib" as TextLib #Include "Libs/Nadeo/Top.Script.txt" as Top #Include "Libs/Nadeo/Mode.Script.txt" as Mode #Include "Libs/Nadeo/Victory.Script.txt" as Victory #Include "Libs/Nadeo/Interface.Script.txt" as Interface #Include "Libs/Nadeo/ShootMania/SM.Script.txt" as SM #Include "Libs/Nadeo/ShootMania/Score.Script.txt" as Score #Include "Libs/Nadeo/ShootMania/Airshot.Script.txt" as Airshot #Include "Libs/Nadeo/ShootMania/BalancedWeapons.Script.txt" as BalancedWeapons /* -------------------------------------- */ // Settings /* -------------------------------------- */ #Setting S_RespawnTime 6001 as _("Respawn time") ///< Time before respawn #Setting S_AutoBalance True as _("Use autobalance") ///< Use auto balance at the start of the map #Setting S_RoundsToWin 3 as _("Rounds to win") ///< Number of rounds to win a map #Setting S_RoundGapToWin 2 as _("Round gap to win") ///< Minimum gap between the two leaders to win a map #Setting S_RoundsLimit 5 as _("Rounds limit") ///< Point limit on map #Setting S_TimeLimit 300 as _("Time limit (seconds)") ///< Time limit (seconds) #Setting S_CaptureMaxValue 30000 as _("Capture time (milliseconds)") ///< Pole capture time (milliseconds) #Const UITickPeriod 200 /* -------------------------------------- */ // Extends /* -------------------------------------- */ /* -------------------------------------- */ // Update the player UI message ***UIPlayer*** *** UI.BigMessageSound = CUIConfig::EUISound::Notice; UI.BigMessage = Airshot::Message(Player); *** /* -------------------------------------- */ // Set the EndTime of the round ***EndTime*** *** EndTime = StartTime + S_TimeLimit*1000; *** /* -------------------------------------- */ // Define when a capture is possible ***IsCapturePossible*** *** declare IsCapturePossible = !IsGoalDenied; *** /* -------------------------------------- */ // Set the rules in the SpawnScreen ***Rules*** *** declare ModeName = "Battle"; declare ModeRules = TextLib::Compose(_("Two teams\n\n- Be the first to capture all the poles of the opposing team in the allotted time (%1 seconds) to score 1 point.\n- The first team to reach the point limit wins."), TextLib::ToText(S_TimeLimit)); *** /* -------------------------------------- */ // Update the markers above the poles ***UpdateMarkers*** *** PolesMarkers = [1 => Text, 2 => Text]; for (Clan, 1, 2) { foreach (Pole in ClanPoles[Clan]) { declare Color = "$fff"; if (Pole.Gauge.ValueReal >= 1.) Color = "$aaa"; declare Pos = Pole.Position + <0., 25., 0.>; PolesMarkers[3 - Clan] ^= """"""; } } *** /* -------------------------------------- */ // Functions /* -------------------------------------- */ /* ------------------------------------- */ /** Update the manialink in the SpawnScreen * * @return The manialink string */ Text UpdateLayerSpawnScreen() { declare Text ML; ---Rules--- ML = """