Nero Ignis 4 years ago
parent
commit
cbb5006b90
  1. 3
      index.html
  2. 10
      js/app.js

3
index.html

@ -87,6 +87,9 @@ @@ -87,6 +87,9 @@
<br/>
<a href="javascript:" class="btn btn-sm btn-success" :disabled="isQuestRedeemable()">Redeem reward ({{ currentQuest.reward }} <img class="resource-icon" src="img/gold.png">)</a>
</div>
<div v-else>
</div>
</div>
</div>
</div>

10
js/app.js

@ -295,6 +295,16 @@ let game = new Vue({ @@ -295,6 +295,16 @@ let game = new Vue({
this.bricks >= this.currentQuest.bricks &&
this.corn >= this.currentQuest.corn
);
},
redeemQuest() {
if (this.isQuestRedeemable()) {
this.money += this.currentQuest.reward;
this.generateQuest();
} else {
return false;
}
}
},
});

Loading…
Cancel
Save