2016-02-10 03:10:51 +00:00
|
|
|
mixin displayOtherTeam(team, text)
|
|
|
|
- var teamvisible = team.collection.parents[0].get('visibleteam')
|
|
|
|
- var isdef = typeof teamvisible
|
|
|
|
if isdef != 'undefined' && teamvisible
|
|
|
|
section.battle_team_preview
|
|
|
|
p= text
|
|
|
|
ul.row-fluid.unstyled
|
|
|
|
- team.get('pokemon').each(function(pokemon) {
|
|
|
|
li.px_40
|
|
|
|
+displayPokemon(pokemon)
|
|
|
|
- })
|
2016-02-01 22:19:30 +00:00
|
|
|
|
|
|
|
mixin displayYourTeam(team, text)
|
|
|
|
section.battle_team_preview
|
|
|
|
p= text
|
|
|
|
ul.row-fluid.unstyled
|
|
|
|
- for (var i = 0; i < battle.numActive; i++)
|
|
|
|
li.px_40.lead_text
|
|
|
|
if battle.numActive > 1
|
|
|
|
| Lead #{i + 1}
|
|
|
|
else
|
|
|
|
| Lead
|
|
|
|
ul.arrange_team.row-fluid.unstyled
|
|
|
|
- yourTeam.get('pokemon').each(function(pokemon, i) {
|
|
|
|
li.px_40.img-polaroid.arrange_pokemon
|
|
|
|
+displayPokemon(pokemon, i)
|
|
|
|
- })
|
|
|
|
|
|
|
|
.button.submit_arrangement Start battle
|
|
|
|
|
|
|
|
mixin displayPokemon(pokemon, i)
|
|
|
|
.team_pokemon
|
|
|
|
- var style = window.PokemonIconBackground(pokemon)
|
|
|
|
.pokemon_icon(data-index = i, style = style)
|
|
|
|
if pokemon.get('gender') === 'F'
|
|
|
|
.gender.gender_female ♀
|
|
|
|
else if pokemon.get('gender') === 'M'
|
|
|
|
.gender.gender_male ♂
|
2016-02-19 23:54:42 +00:00
|
|
|
if pokemon.get('level') != 120
|
2016-02-01 22:19:30 +00:00
|
|
|
.level Lv.#{pokemon.get('level')}
|
|
|
|
|
|
|
|
.battle_teams
|
|
|
|
- var theirTeam = battle.getOpponentTeam()
|
|
|
|
- var yourTeam = battle.getTeam()
|
|
|
|
+displayOtherTeam(theirTeam, theirTeam.get('owner') + "'s team:")
|
|
|
|
if !battle.get('spectating')
|
|
|
|
+displayYourTeam(yourTeam, "Click Pokemon to switch them around:")
|
|
|
|
else
|
|
|
|
+displayOtherTeam(yourTeam, yourTeam.get('owner') + "'s team:")
|