bug fixes to slater point unlocks

This commit is contained in:
Bart van der Braak 2020-03-01 16:20:07 +01:00
parent 470fd4ae8f
commit 31c5d02f92
3 changed files with 29 additions and 4 deletions

View file

@ -16,7 +16,7 @@ export default {
{id: 2, name: 'Defence level', filter: 'defence_req', value: {min: 1, current: 99, max: 99}, image: 'defence_icon.png'},
],
pointUnlocks: [
{id: 0, name: 'Seeing red', monster_ids: [83, 3], unlock: 'false', masters: [5,6,7]},
{id: 0, name: 'Seeing red', monster_ids: [83], unlock: 'false', masters: [5,6,7]},
{id: 1, name: 'I hope you mith me', monster_ids: [72], unlock: 'false', masters: [5,6,7]},
{id: 2, name: 'Watch the birdie', monster_ids: [4], unlock: 'false', masters: [4,5,6,7]},
{id: 3, name: 'Hot stuff', monster_ids: [102], unlock: 'false', masters: [4,6,7]},

View file

@ -193,9 +193,10 @@ export default {
//filter based on Point Unlocks
this.configData.pointUnlocks.forEach(reward=>{
if ((reward.unlock === 'true' && reward.block) || (reward.unlock === 'false' && !reward.block)) {
//if reward unlocked but blocks monsters OR reward not unlocked and doesnt block
//then, add to removal
if (reward.unlock === 'true' && reward.block) {
removeIds = removeIds.concat(reward.monster_ids)
}
else if (reward.unlock === 'false' && !reward.block && reward.masters.includes(this.currentMaster.id)) {
removeIds = removeIds.concat(reward.monster_ids)
}
});