mirror of
https://gitlab.com/Deukhoofd/BattleSim.git
synced 2025-10-29 02:30:05 +00:00
Added /timer command for enabling the timer after battle has started
This commit is contained in:
@@ -58,13 +58,17 @@ class @challengePaneObject
|
||||
format = defaultformat()
|
||||
# Toggle state when you press the button.
|
||||
if !$button.hasClass('disabled')
|
||||
team = getSelectedTeam()
|
||||
unless team
|
||||
alert("You need to create a team using the Teambuilder before you can battle.")
|
||||
PokeBattle.navigation.showTeambuilder()
|
||||
return
|
||||
disableButtons()
|
||||
teamJSON = team.toNonNullJSON().pokemon
|
||||
if $eventName is "findBattleRandom"
|
||||
teamJSON = []
|
||||
disableButtons()
|
||||
else
|
||||
team = getSelectedTeam()
|
||||
unless team
|
||||
alert("You need to create a team using the Teambuilder before you can battle.")
|
||||
PokeBattle.navigation.showTeambuilder()
|
||||
return
|
||||
disableButtons()
|
||||
teamJSON = team.toNonNullJSON().pokemon
|
||||
# Send the event
|
||||
PokeBattle.primus.send($eventName, format, teamJSON, options.selectedAlt)
|
||||
$button.addClass('disabled').trigger('challenge')
|
||||
|
||||
Reference in New Issue
Block a user