/*****************************************************************************
 * Copyright (c) 2014-2026 OpenRCT2 developers
 *
 * For a complete list of all authors, please refer to contributors.md
 * Interested in contributing? Visit https://github.com/OpenRCT2/OpenRCT2
 *
 * OpenRCT2 is licensed under the GNU General Public License version 3.
 *****************************************************************************/

#pragma once

#include "../../../SpriteIds.h"
#include "../../RideData.h"
#include "../../RideStringIds.h"
#include "../../ShopItem.h"

// clang-format off
namespace OpenRCT2
{
constexpr RideTypeDescriptor kInvertedRollerCoasterRTD =
{
    .Category = RideCategory::rollerCoaster,
    .StartTrackPiece = TrackElemType::endStation,
    .TrackPaintFunctions = TrackDrawerDescriptor({
        .trackStyle = TrackStyle::invertedRollerCoaster,
        .supportType = MetalSupportType::boxed,
        .enabledTrackGroups = { TrackGroup::straight, TrackGroup::stationEnd, TrackGroup::liftHill, TrackGroup::flatRollBanking, TrackGroup::verticalLoop, TrackGroup::slope, TrackGroup::slopeSteepUp, TrackGroup::slopeSteepDown, TrackGroup::slopeCurve, TrackGroup::slopeCurveSteep, TrackGroup::sBend, TrackGroup::curveSmall, TrackGroup::curve, TrackGroup::curveLarge, TrackGroup::twist, TrackGroup::halfLoop, TrackGroup::corkscrew, TrackGroup::helixDownBankedQuarter, TrackGroup::helixUpBankedQuarter, TrackGroup::brakes, TrackGroup::onridePhoto, TrackGroup::halfLoopLarge, TrackGroup::blockBrakes, TrackGroup::slopeRollBanking, TrackGroup::diagBrakes, TrackGroup::diagBlockBrakes, TrackGroup::diagSlope, TrackGroup::diagSlopeSteepUp, TrackGroup::diagSlopeSteepDown,  TrackGroup::halfLoopMedium, TrackGroup::corkscrewLarge, TrackGroup::diveLoop, TrackGroup::slopeSteepLong,  TrackGroup::slopeVertical, TrackGroup::curveVertical,TrackGroup::quarterLoop, TrackGroup::diagSlopeSteepLong, TrackGroup::slopeCurveBanked, TrackGroup::slopeRollBanking,TrackGroup::slopeCurveLarge, TrackGroup::slopeCurveLargeBanked, TrackGroup::helixUpUnbankedQuarter, TrackGroup::helixDownUnbankedQuarter },
        .extraTrackGroups = { TrackGroup::booster, TrackGroup::barrelRoll, TrackGroup::zeroGRoll, TrackGroup::zeroGRollLarge },
    }),
    .InvertedTrackPaintFunctions = {},
    .flags = kRtdFlagsHasThreeColours | kRtdFlagsCommonCoaster | kRtdFlagsCommonCoasterNonAlt |
        RtdFlags(RtdFlag::hasLeaveWhenAnotherVehicleArrivesAtStation, RtdFlag::checkGForces,
                     RtdFlag::allowMultipleCircuits, RtdFlag::isSuspended, RtdFlag::allowReversedTrains),
    .RideModes = EnumsToFlags(RideMode::continuousCircuit, RideMode::continuousCircuitBlockSectioned, RideMode::poweredLaunchPassthrough, RideMode::poweredLaunch),
    .DefaultMode = RideMode::continuousCircuit,
    .OperatingSettings = { 7, 27 },
    .BoosterSettings = { 0, 38 },
    .LegacyBoosterSettings = { 0, 38 },
    .Naming = { STR_RIDE_NAME_INVERTED_ROLLER_COASTER, STR_RIDE_DESCRIPTION_INVERTED_ROLLER_COASTER },
    .NameConvention = { RideComponentType::train, RideComponentType::track, RideComponentType::station },
    .availableBreakdowns = { Breakdown::safetyCutOut, Breakdown::restraintsStuckClosed, Breakdown::restraintsStuckOpen, Breakdown::vehicleMalfunction, Breakdown::brakesFailure },
    .Heights = { 42, 40, 29, 8, },
    .MaxMass = 27,
    .LiftData = { Audio::SoundId::liftBM, 5, 7 },
    .RatingsMultipliers = { 50, 30, 10 },
    .UpkeepCosts = { 40, 20, 80, 13, 3, 10 },
    .BuildCosts = { 65.00_GBP, 2.50_GBP, 50, },
    .DefaultPrices = { 20, 20 },
    .DefaultMusic = kMusicObjectTechno,
    .PhotoItem = ShopItem::photo2,
    .BonusValue = 100,
    .ColourPresets = TRACK_COLOUR_PRESETS(
        { Drawing::Colour::bordeauxRed, Drawing::Colour::bordeauxRed, Drawing::Colour::black },
        { Drawing::Colour::white, Drawing::Colour::yellow, Drawing::Colour::white },
        { Drawing::Colour::salmonPink, Drawing::Colour::salmonPink, Drawing::Colour::grey },
        { Drawing::Colour::black, Drawing::Colour::brightRed, Drawing::Colour::black },
        { Drawing::Colour::saturatedBrown, Drawing::Colour::white, Drawing::Colour::saturatedBrown },
        { Drawing::Colour::yellow, Drawing::Colour::yellow, Drawing::Colour::black },
        { Drawing::Colour::black, Drawing::Colour::black, Drawing::Colour::periwinkle }, // Great Bear
        { Drawing::Colour::darkBlue, Drawing::Colour::darkBlue, Drawing::Colour::tan }, // Montu / Oziris
        { Drawing::Colour::darkPink, Drawing::Colour::darkPink, Drawing::Colour::violet }, // Banshee (Renders)
    ),
    .ColourPreview = { SPR_RIDE_DESIGN_PREVIEW_INVERTED_ROLLER_COASTER_TRACK, SPR_RIDE_DESIGN_PREVIEW_INVERTED_ROLLER_COASTER_SUPPORTS },
    .ColourKey = RideColourKey::ride,
    .Name = "inverted_rc",
    .RatingsData =
    {
        RatingsCalculationType::normal,
        { RideRating::make(3, 60), RideRating::make(2, 80), RideRating::make(3, 20) },
        17,
        kDynamicRideShelterRating,
        true,
        {
            { RatingsModifierType::bonusLength,           6000,             764, 0, 0 },
            { RatingsModifierType::bonusSynchronisation,  0,                RideRating::make(0, 42), RideRating::make(0, 05), 0 },
            { RatingsModifierType::bonusTrainLength,      0,                187245, 0, 0 },
            { RatingsModifierType::bonusMaxSpeed,         0,                44281, 88562, 35424 },
            { RatingsModifierType::bonusAverageSpeed,     0,                291271, 436906, 0 },
            { RatingsModifierType::bonusDuration,         150,              26214, 0, 0 },
            { RatingsModifierType::bonusGForces,          0,                24576, 29789, 55606 },
            { RatingsModifierType::bonusTurns,            0,                26749, 29552, 57186 },
            { RatingsModifierType::bonusDrops,            0,                29127, 39009, 49152 },
            { RatingsModifierType::bonusSheltered,        0,                15420, 15291, 35108 },
            { RatingsModifierType::bonusReversedTrains,   0,                2, 12, 20 },
            { RatingsModifierType::bonusProximity,        0,                15657, 0, 0 },
            { RatingsModifierType::bonusScenery,          0,                8366, 0, 0 },
            { RatingsModifierType::requirementDropHeight, 12,               2, 2, 2 },
            { RatingsModifierType::requirementMaxSpeed,   0xA0000,          2, 2, 2 },
            { RatingsModifierType::requirementNegativeGs, MakeFixed16_2dp(0, 30), 2, 2, 2 },
            { RatingsModifierType::penaltyLateralGs,      0,                24576, 29789, 55606 },
        },
    },
};
} // namespace OpenRCT2
// clang-format on
