Skip to content

Commit

Permalink
fixes Creature Dash arrow keys error
Browse files Browse the repository at this point in the history
  • Loading branch information
codemaster321 committed May 6, 2024
1 parent 159d4df commit 1a57c1f
Showing 1 changed file with 8 additions and 2 deletions.
10 changes: 8 additions & 2 deletions src/ui/interface.js
Original file line number Diff line number Diff line change
Expand Up @@ -836,6 +836,7 @@ export class UI {

this.selectedCreature = creatureType;
const stats = game.retrieveCreatureStats(creatureType);
if (stats === undefined) return;

//function to add the name, realm, size etc of the current card in the menu
function addCardCharacterInfo() {
Expand Down Expand Up @@ -949,7 +950,7 @@ export class UI {
.children('#upgrade')
.text('Upgrade: ' + stats.ability_info[key].upgrade);

if (key !== 0) {
if (stats.ability_info[key].costs !== undefined && key !== 0) {
$ability
.children('.wrapper')
.children('.info')
Expand Down Expand Up @@ -1138,7 +1139,8 @@ export class UI {
} else {
$ability.children('.wrapper').children('.info').children('#upgrade').text(' ');
}
if (key !== 0) {

if (stats.ability_info[key].costs !== undefined && key !== 0) {
$ability
.children('.wrapper')
.children('.info')
Expand Down Expand Up @@ -1569,6 +1571,10 @@ export class UI {

if (game.realms.indexOf(creatureType[0]) - 1 > -1) {
const realm = game.realms[game.realms.indexOf(creatureType[0]) - 1];

if (realm === '-') {
return;
}
nextCreature = realm + creatureType[1];
this.lastViewedCreature = nextCreature;
this.showCreature(nextCreature, this.selectedPlayer);
Expand Down

0 comments on commit 1a57c1f

Please sign in to comment.