Function CustomDefeatReduceDifficultyBJ

Line
5601
Location
blizzard.j
Constant?
no
Type
function
Arguments
nothing
Returns
nothing
5601
function CustomDefeatReduceDifficultyBJ takes nothing returns nothing
5602
    local gamedifficulty diff = GetGameDifficulty()
5603
5604
    call PauseGame( false )
5605
5606
    // Knock the difficulty down, if possible.
5607
    if (diff == MAP_DIFFICULTY_EASY) then
5608
        // Sorry, but it doesn't get any easier than this.
5609
    elseif (diff == MAP_DIFFICULTY_NORMAL) then
5610
        call SetGameDifficulty(MAP_DIFFICULTY_EASY)
5611
    elseif (diff == MAP_DIFFICULTY_HARD) then
5612
        call SetGameDifficulty(MAP_DIFFICULTY_NORMAL)
5613
    else
5614
        // Unrecognized difficulty
5615
    endif
5616
5617
    call RestartGame( true )
5618
endfunction