Skip to content
New issue

Have a question about this project? Sign up for a free GitHub account to open an issue and contact its maintainers and the community.

By clicking “Sign up for GitHub”, you agree to our terms of service and privacy statement. We’ll occasionally send you account related emails.

Already on GitHub? Sign in to your account

Mountain update (2021-11-16 patch) #273

Merged
merged 4 commits into from
Sep 5, 2023
Merged
Show file tree
Hide file tree
Changes from all commits
Commits
File filter

Filter by extension

Filter by extension


Conversations
Failed to load comments.
Loading
Jump to
Jump to file
Failed to load files.
Loading
Diff view
Diff view
1 change: 1 addition & 0 deletions build/process-population.js
Original file line number Diff line number Diff line change
Expand Up @@ -24,6 +24,7 @@
"data/pop-csv/laboratory.csv",
"data/pop-csv/living-garden.csv",
"data/pop-csv/lost-city.csv",
"data/pop-csv/mountain.csv",
"data/pop-csv/mousoleum.csv",
"data/pop-csv/moussu-picchu.csv",
"data/pop-csv/prickly-plains.csv",
Expand Down
2 changes: 1 addition & 1 deletion data/_utils.js
Original file line number Diff line number Diff line change
Expand Up @@ -77,7 +77,7 @@ exports.genVarItem = function genVarItem(type, value, base) {
* @param {string} type
* @param {string[]|string} values
* @param {object} [{}] base
* @returns {{vars: {type: {value: true}}, fields:{type: value}}}[]}
* @returns {{vars: {type: {value: true}}, fields:{type: value}}[]}}
*/
exports.genVarField = function genVarField(type, values, base) {
if (!Array.isArray(values)) values = [values];
Expand Down
84 changes: 84 additions & 0 deletions data/pop-csv/mountain.csv
Original file line number Diff line number Diff line change
@@ -0,0 +1,84 @@
"Location","Phase","Cheese","Charm","Attraction Rate","Mouse","Sample Size"
"Mountain","-","Cheddar","-","19.15%","Brown",658
"Mountain","-","Cheddar","-","19.00%","White",658
"Mountain","-","Cheddar","-","18.84%","Frozen",658
"Mountain","-","Cheddar","-","17.78%","Granite",658
"Mountain","-","Cheddar","-","17.02%","Grey",658
"Mountain","-","Cheddar","-","8.21%","Dwarf",658
"Mountain","-","White Cheddar","-","45.09%","Frozen",1936
"Mountain","-","White Cheddar","-","37.50%","Granite",1936
"Mountain","-","White Cheddar","-","17.41%","Dwarf",1936
"Mountain","-","Marble","-","19.75%","Granite",162
"Mountain","-","Marble","-","16.05%","Frozen",162
"Mountain","-","Marble","-","14.81%","Dwarf",162
"Mountain","-","Marble","-","10.49%","Brown",162
"Mountain","-","Marble","-","9.88%","Grey",162
"Mountain","-","Marble","-","8.64%","White",162
"Mountain","-","Marble","-","8.64%","Bionic",162
"Mountain","-","Marble","-","6.79%","Diamond",162
"Mountain","-","Marble","-","4.94%","Gold",162
"Mountain","-","Swiss","-","25.00%","Dwarf",576
"Mountain","-","Swiss","-","15.63%","Steel",576
"Mountain","-","Swiss","-","13.72%","Bionic",576
"Mountain","-","Swiss","-","9.03%","Frozen",576
"Mountain","-","Swiss","-","8.51%","Ninja",576
"Mountain","-","Swiss","-","6.25%","Gold",576
"Mountain","-","Swiss","-","6.08%","Diamond",576
"Mountain","-","Swiss","-","5.56%","White",576
"Mountain","-","Swiss","-","3.99%","Zombie",576
"Mountain","-","Swiss","-","3.30%","Brown",576
"Mountain","-","Swiss","-","2.95%","Grey",576
"Mountain","-","Brie","-","18.34%","Flying",4280
"Mountain","-","Brie","-","15.89%","Steel",4280
"Mountain","-","Brie","-","15.12%","Diamond",4280
"Mountain","-","Brie","-","14.70%","Bionic",4280
"Mountain","-","Brie","-","13.18%","Ninja",4280
"Mountain","-","Brie","-","10.98%","Gold",4280
"Mountain","-","Brie","-","7.69%","Frozen",4280
"Mountain","-","Brie","-","4.11%","Zombie",4280
"Mountain","-","Brie","Prospector's","22.45%","Diamond",294
"Mountain","-","Brie","Prospector's","15.99%","Steel",294
"Mountain","-","Brie","Prospector's","14.97%","Gold",294
"Mountain","-","Brie","Prospector's","14.29%","Flying",294
"Mountain","-","Brie","Prospector's","13.95%","Bionic",294
"Mountain","-","Brie","Prospector's","9.52%","Ninja",294
"Mountain","-","Brie","Prospector's","5.78%","Frozen",294
"Mountain","-","Brie","Prospector's","3.06%","Zombie",294
"Mountain","-","Gouda","-","18.91%","Flying",2691
"Mountain","-","Gouda","-","16.43%","Diamond",2691
"Mountain","-","Gouda","-","15.98%","Gold",2691
"Mountain","-","Gouda","-","15.68%","Steel",2691
"Mountain","-","Gouda","-","13.94%","Bionic",2691
"Mountain","-","Gouda","-","12.93%","Ninja",2691
"Mountain","-","Gouda","-","6.13%","Zombie",2691
"Mountain","-","Gouda","Prospector's","19.03%","Flying",925
"Mountain","-","Gouda","Prospector's","16.97%","Diamond",925
"Mountain","-","Gouda","Prospector's","15.14%","Bionic",925
"Mountain","-","Gouda","Prospector's","14.70%","Gold",925
"Mountain","-","Gouda","Prospector's","14.59%","Steel",925
"Mountain","-","Gouda","Prospector's","12.86%","Ninja",925
"Mountain","-","Gouda","Prospector's","6.70%","Zombie",925
"Mountain","-","SB+","-","20.22%","Flying",9543
"Mountain","-","SB+","-","14.97%","Pebble",9543
"Mountain","-","SB+","-","13.45%","Silvertail",9543
"Mountain","-","SB+","-","12.70%","Fog",9543
"Mountain","-","SB+","-","11.18%","Frosty Snow",9543
"Mountain","-","SB+","-","10.79%","Gold",9543
"Mountain","-","SB+","-","6.76%","Diamond",9543
"Mountain","-","SB+","-","6.04%","Ninja",9543
"Mountain","-","SB+","-","2.82%","Zombie",9543
"Mountain","-","SB+","-","1.06%","Black Widow",9543
"Mountain","-","SB+","Prospector's","17.85%","Silvertail",874
"Mountain","-","SB+","Prospector's","16.25%","Flying",874
"Mountain","-","SB+","Prospector's","15.45%","Gold",874
"Mountain","-","SB+","Prospector's","14.87%","Diamond",874
"Mountain","-","SB+","Prospector's","10.41%","Fog",874
"Mountain","-","SB+","Prospector's","10.30%","Pebble",874
"Mountain","-","SB+","Prospector's","8.24%","Frosty Snow",874
"Mountain","-","SB+","Prospector's","3.78%","Ninja",874
"Mountain","-","SB+","Prospector's","2.17%","Zombie",874
"Mountain","-","SB+","Prospector's","0.69%","Black Widow",874
"Mountain","-","Chedd-Ore","-","35.93%","Craggy Ore",8831
"Mountain","-","Chedd-Ore","-","34.55%","Slope Swimmer",8831
"Mountain","-","Chedd-Ore","-","29.52%","Mountain",8831
"Mountain","-","Abominable Asiago","-","100.00%","Abominable Snow",1806
143 changes: 143 additions & 0 deletions data/pop-js/_template.js
Original file line number Diff line number Diff line change
@@ -0,0 +1,143 @@
const utils = require("../_utils");

module.exports = {
default: {
// frequently used: charm, cheese, location, stage
// less common: base, trap, after, before
// know what you're doing: detail, pstage, pdetail
location: utils.genVarField("location", VALUE),
config: [
{
opts: {
// Options for filtering results out by name or attraction rate. Include is preferred over exclude
// include: [],
// exclude: [],
// attraction: 0.0,
},
},
],
},
series: [
// Simple query
{
cheese: utils.genVarField("cheese", "SB+"),
},

// Simple AND multi condition query.
{
charm: utils.genVarField("charm", "Dragonbane"),
stage: utils.genVarField("stage", "Boss"),
},

// Two simple queries. Same as writing a simple query twice but different values.
{
cheese: utils.genVarField("cheese", ["Brie", "Gouda"]),
},

// Query permutation. Aka Cartesion Product. Same as writing 4 queries
{
cheese: utils.genVarField("cheese", ["Brie", "Gouda"]),
charm: utils.genVarField("charm", ["Power Charm", "Lucky Charm"]),
},

// Simple query equivalent but manually typed and commented
{
// Note that the key "cheese" doesn't matter, it's what in the var that matters
// You'll see the 'config' key used a lot for custom queries
cheese: [
{
// 'vars' controls how the database queries. See below for more advanced examples
vars: {
cheese: {
"SB+": true,
},
},
// 'fields' controls what will be written to the csv columns.
// here SB+ will be in the cheese column.
fields: {
cheese: "SB+",
},
},
],
},

// Negating query. Most queries are for a var to be true but we can do the opposite as well
// (see catacombs)
// Query for antiskele charm
{
charm: utils.genVarField("charm", "Antiskele"),
},
// Query for NO antiskele charm
{
charm: [
{
vars: {
charm: {
Antiskele: false,
},
},
// We don't fill out 'fields'. csv charm column will default to '-'
},
],
},

// Custom stage name output
// When you want the output name to be different from MHCT stage name
// You can also use the postProcess to change stage names.
{
config: [
{
vars: {
stage: { "Commander's Hideout": true },
},
fields: {
stage: "Commander's Lair",
},
},
],
},

// Multi stage AND. Each hunt needs to have these stages (eg BWRift, Moussu Picchu)
{
config: [
{
vars: {
// up to stage5
stage: { "First Part": true },
stage1: { "Second Part": true },
},
fields: {
stage: "Custom Name"
}
},
],
},

// Multi stage OR. Each hunt should have one of these stages (eg BB)
// Useful for aggregating stages
{
config: [
{
vars: {
stage: {
"One": true,
"Two": true,
"Three": true
}
},
fields: {
stage: "Combined"
}
},
],
},
],
/**
*
* @param {{stage: string, location: string, cheese: string, mouse: string, attraction: string, sample: number}[]} data
* @returns {{stage: string, location: string, cheese: string, mouse: string, attraction: string, sample: number}[]}
*/
postProcess: function(data) {
return data;
},
};
Loading
Loading