BattleSim/client/views/battle_user_info.jade

41 lines
2.4 KiB
Plaintext
Raw Normal View History

2016-02-01 22:19:30 +00:00
each team in [ yourTeam, opponentTeam ]
- var leftOrRight = (team === yourTeam ? 'left' : 'right')
- var teamIndex = (team === yourTeam ? yourIndex : 1 - yourIndex)
.bg-faded-blue(class = 'fill-' + leftOrRight)
div(class = leftOrRight)
.owner_name= team.get('owner')
.battle-timer.frozen-timer.hidden
.battle-timer.remaining-timer
.pokemon_icons
- var teamvisible = team.collection.parents[0].get('visibleteam')
- var isdef = typeof teamvisible
2016-02-10 02:10:17 +00:00
- var orig = team.get('pokemon')
- var teamPokemon = team.getRandomOrder()
- for (var i = 0, len = teamPokemon.length; i < len; i += 1)
- var pokemon = teamPokemon[i]
if pokemon
.icon_wrapper
- var origpkmn = orig.findWhere({species: pokemon.species});
- var faintClass = (origpkmn.isFainted() ? 'fainted' : '')
- var style = window.PokemonIconBackground(origpkmn)
if isdef != 'undefined' && teamvisible
2016-02-01 22:19:30 +00:00
a.pokemon_icon(href=window.PokemonIconBackground(origpkmn), target="_blank", class = faintClass, style = style, data-team = teamIndex, data-slot = i)
if !origpkmn.isFainted()
.pokemon_hp_background
.pokemon_hp(style="height: " + (origpkmn.getSpecies().id) + "%", class=origpkmn.getHPColor())
2016-02-10 02:10:17 +00:00
else
- var hasbeeninbattle = origpkmn.get('beeninbattle')
if hasbeeninbattle == true
- console.log('hasbeeninbattle')
a.pokemon_icon(href=window.PokemonIconBackground(origpkmn), target="_blank", class = faintClass, style = style, data-team = teamIndex, data-slot = i)
if !origpkmn.isFainted()
.pokemon_hp_background
.pokemon_hp(style="height: " + (origpkmn.getSpecies().id) + "%", class=origpkmn.getHPColor())
else
- console.log('hasnoybeeninbattle')
- var newstyle = "background:url('../Sprites/Icons/iconempty.png')!important; background-size: cover!important;"
a.pokemon_icon(href="", target="_blank", class = faintClass, style = newstyle, data-team = teamIndex, data-slot = i)
if !origpkmn.isFainted()
.pokemon_hp_background
.pokemon_hp(style="height: " + (origpkmn.getSpecies().id) + "%", class=origpkmn.getHPColor())