Fixed issue where popover wasn't appearing when first pokemon didn't have a mega stone
This commit is contained in:
parent
2e1bb22aab
commit
b7230033bb
|
@ -248,6 +248,7 @@ class @Pokemon extends Backbone.Model
|
|||
if @get('species') == "Rayquaza" and "Dragon Ascent" in @get('moves')
|
||||
return true
|
||||
item = @getItem()
|
||||
return false if typeof item == "undefined"
|
||||
return false if item.type != 'megastone'
|
||||
[ species, forme ] = item.mega
|
||||
return false if @get('species') != species || @get('forme') != 'default'
|
||||
|
|
|
@ -166,6 +166,7 @@ class @BattleView extends Backbone.View
|
|||
this
|
||||
|
||||
movePopover: ($this, moveName, move) =>
|
||||
console.log(moveName)
|
||||
{type, damage} = move
|
||||
damageFriendly = move.damage[0].toUpperCase() + move.damage.substr(1)
|
||||
targetFriendly = move.target[0].toUpperCase() + move.target.substr(1)
|
||||
|
|
|
@ -1855,6 +1855,9 @@
|
|||
return true;
|
||||
}
|
||||
item = this.getItem();
|
||||
if (typeof item === "undefined") {
|
||||
return false;
|
||||
}
|
||||
if (item.type !== 'megastone') {
|
||||
return false;
|
||||
}
|
||||
|
@ -3198,6 +3201,7 @@
|
|||
|
||||
BattleView.prototype.movePopover = function($this, moveName, move) {
|
||||
var damage, damageFriendly, displayName, options, targetFriendly, type;
|
||||
console.log(moveName);
|
||||
type = move.type, damage = move.damage;
|
||||
damageFriendly = move.damage[0].toUpperCase() + move.damage.substr(1);
|
||||
targetFriendly = move.target[0].toUpperCase() + move.target.substr(1);
|
||||
|
|
|
@ -1855,6 +1855,9 @@
|
|||
return true;
|
||||
}
|
||||
item = this.getItem();
|
||||
if (typeof item === "undefined") {
|
||||
return false;
|
||||
}
|
||||
if (item.type !== 'megastone') {
|
||||
return false;
|
||||
}
|
||||
|
@ -2924,6 +2927,7 @@
|
|||
|
||||
BattleView.prototype.movePopover = function($this, moveName, move) {
|
||||
var damage, damageFriendly, displayName, options, targetFriendly, type;
|
||||
console.log(moveName);
|
||||
type = move.type, damage = move.damage;
|
||||
damageFriendly = move.damage[0].toUpperCase() + move.damage.substr(1);
|
||||
targetFriendly = move.target[0].toUpperCase() + move.target.substr(1);
|
||||
|
|
Loading…
Reference in New Issue