* 2.0.2 mage tree

Super super janky implementation of winded

* Clean up breathless definition

* Numerical values and archetype req update for non mage ability trees

Notably excludes:
Effigy attack speed
Double/Triple totem multipliers
more shields damage change
arrow hurricane nerf

don't think this includes dependencies but idk if any changed? Topology fixing still needed

* Archer, Warrior and Shaman updated (mostly)

* Assassin tree changes

* Item db update

guess this is the 2.0.2 branch now

* Mage edit to match ingame

* Fix misc. atree stuff that wasn't fixed yet

warrior connections and positions
double/triple totem implementation
ragna nerf

---------

Co-authored-by: hppeng <hppeng>
Co-authored-by: TopHat of Pride <33451677+TopHat-of-Pride@users.noreply.github.com>
Co-authored-by: aspiepuppy <emimeado@gmail.com>
This commit is contained in:
hppeng-wynn 2023-02-17 03:40:23 -08:00 committed by GitHub
parent 2bdebda89f
commit dc878caf1c
No known key found for this signature in database
GPG key ID: 4AEE18F83AFDEB23
21 changed files with 36286 additions and 34526 deletions

61077
clean.json

File diff suppressed because it is too large Load diff

File diff suppressed because one or more lines are too long

1
data/2.0.2.1/atree.json Normal file

File diff suppressed because one or more lines are too long

File diff suppressed because one or more lines are too long

1
data/2.0.2.1/items.json Normal file

File diff suppressed because one or more lines are too long

1069
data/2.0.2.1/tomes.json Normal file

File diff suppressed because it is too large Load diff

File diff suppressed because it is too large Load diff

File diff suppressed because one or more lines are too long

View file

@ -302,7 +302,7 @@ function expandRecipe(recipe) {
function idRound(id){ function idRound(id){
rounded = Math.round(id); rounded = Math.round(id);
if(rounded == 0){ if(rounded == 0){
return 1; //this is a hack, will need changing along w/ rest of ID system if anything changes return Math.sign(id); //this is a hack, will need changing along w/ rest of ID system if anything changes
}else{ }else{
return rounded; return rounded;
} }

View file

@ -87,10 +87,10 @@ stat_scaling: {
"slider_name": Optional[str], "slider_name": Optional[str],
"slider_step": Optional[float], "slider_step": Optional[float],
round: Optional[bool] // Control floor behavior. True for stats and false for slider by default round: Optional[bool] // Control floor behavior. True for stats and false for slider by default
slider_behavior: Optional[str] // One of: "merge", "modify". default: merge behavior: Optional[str] // One of: "merge", "modify". default: merge
// merge: add if exist, make new part if not exist // merge: add if exist, make new part if not exist
// modify: change existing part, by incrementing properties. do nothing if not exist // modify: change existing part, by incrementing properties. do nothing if not exist
slider_max: Optional[float] // affected by slider_behavior slider_max: Optional[float] // affected by behavior
inputs: Optional[list[scaling_target]] // List of things to scale. Omit this if using slider inputs: Optional[list[scaling_target]] // List of things to scale. Omit this if using slider
output: Optional[scaling_target | List[scaling_target]] // One of the following: output: Optional[scaling_target | List[scaling_target]] // One of the following:
@ -511,18 +511,35 @@ const atree_make_interactives = new (class extends ComputeNode {
const slider_map = new Map(); const slider_map = new Map();
const button_map = new Map(); const button_map = new Map();
// first, pull out all the sliders and toggles. let to_process = [];
for (const [abil_id, ability] of merged_abils.entries()) { for (const [abil_id, ability] of merged_abils) {
for (const effect of ability.effects) { for (const effect of ability.effects) {
if (effect['type'] === "stat_scaling" && effect['slider'] === true) { if (effect['type'] === "stat_scaling" && effect['slider'] === true) {
const { slider_name, slider_behavior = 'merge', slider_max, slider_step } = effect; to_process.push([effect, abil_id, ability]);
}
if (effect['type'] === "raw_stat" && effect['toggle']) {
to_process.push([effect, abil_id, ability]);
}
}
}
let unprocessed = [];
// first, pull out all the sliders and toggles.
let k = to_process.length;
for (let i = 0; i < k; ++i) {
for (const [effect, abil_id, ability] of to_process) {
if (effect['type'] === "stat_scaling" && effect['slider'] === true) {
const { slider_name, behavior = 'merge', slider_max, slider_step } = effect;
if (slider_map.has(slider_name)) { if (slider_map.has(slider_name)) {
if (slider_max !== undefined) { if (slider_max !== undefined) {
const slider_info = slider_map.get(slider_name); const slider_info = slider_map.get(slider_name);
slider_info.max += slider_max; slider_info.max += slider_max;
} }
else {
unprocessed.push([effect, abil_id, ability]);
}
} }
else if (slider_behavior === 'merge') { else if (behavior === 'merge') {
console.log(effect);
slider_map.set(slider_name, { slider_map.set(slider_name, {
label_name: slider_name+' ('+ability.display_name+')', label_name: slider_name+' ('+ability.display_name+')',
max: slider_max, max: slider_max,
@ -532,6 +549,9 @@ const atree_make_interactives = new (class extends ComputeNode {
abil: ability abil: ability
}); });
} }
else {
unprocessed.push([effect, abil_id, ability]);
}
} }
if (effect['type'] === "raw_stat" && effect['toggle']) { if (effect['type'] === "raw_stat" && effect['toggle']) {
const { toggle: toggle_name } = effect; const { toggle: toggle_name } = effect;
@ -540,6 +560,9 @@ const atree_make_interactives = new (class extends ComputeNode {
}); });
} }
} }
if (unprocessed.length == to_process.length) { break; }
to_process = unprocessed;
unprocessed = [];
} }
// next, render the sliders and toggles onto the abilities. // next, render the sliders and toggles onto the abilities.
for (const [slider_name, slider_info] of slider_map.entries()) { for (const [slider_name, slider_info] of slider_map.entries()) {
@ -623,9 +646,13 @@ const atree_scaling = new (class extends ComputeNode {
continue; continue;
case 'stat_scaling': case 'stat_scaling':
let total = 0; let total = 0;
const {slider = false, scaling = [0]} = effect; const {slider = false, scaling = [0], behavior="merge"} = effect;
let { positive = true, round = true } = effect; let { positive = true, round = true } = effect;
if (slider) { if (slider) {
if (behavior == "modify" && !slider_map.has(effect.slider_name)) {
// Dangerous control flow.. early continue
continue;
}
const slider_val = slider_map.get(effect.slider_name).slider.value; const slider_val = slider_map.get(effect.slider_name).slider.value;
total = parseInt(slider_val) * scaling[0]; total = parseInt(slider_val) * scaling[0];
round = false; round = false;

File diff suppressed because it is too large Load diff

File diff suppressed because one or more lines are too long

View file

@ -29,7 +29,8 @@ function parsePowdering(powder_info) {
let atree_data = null; let atree_data = null;
const wynn_version_names = [ const wynn_version_names = [
'2.0.1.1', '2.0.1.1',
'2.0.1.2' '2.0.1.2',
'2.0.2.1'
]; ];
const WYNN_VERSION_LATEST = wynn_version_names.length - 1; const WYNN_VERSION_LATEST = wynn_version_names.length - 1;
// Default to the newest version. // Default to the newest version.

View file

@ -17,7 +17,7 @@ let armor_powder_node = new (class extends ComputeNode {
} }
})(); })();
const damageMultipliers = new Map([ ["totem", 0.2], ["warscream", 0.0], ["ragnarokkr", 0.30], ["fortitude", 0.60], ["radiance", 0.0] ]); const damageMultipliers = new Map([ ["totem", 0.2], ["warscream", 0.0], ["ragnarokkr", 0.20], ["fortitude", 0.60], ["radiance", 0.0] ]);
let boosts_node = new (class extends ComputeNode { let boosts_node = new (class extends ComputeNode {
constructor() { super('builder-boost-input'); } constructor() { super('builder-boost-input'); }

View file

@ -67,6 +67,9 @@ function calculateSpellDamage(stats, weapon, _conversions, use_spell_damage, ign
// 2.1. First, apply neutral conversion (scale weapon damage). Keep track of total weapon damage here. // 2.1. First, apply neutral conversion (scale weapon damage). Keep track of total weapon damage here.
let damages = []; let damages = [];
const neutral_convert = conversions[0] / 100; const neutral_convert = conversions[0] / 100;
if (neutral_convert == 0) {
present = [false, false, false, false, false, false]
}
let weapon_min = 0; let weapon_min = 0;
let weapon_max = 0; let weapon_max = 0;
for (const damage of weapon_damages) { for (const damage of weapon_damages) {

View file

@ -1,4 +1,4 @@
const DB_VERSION = 121; const DB_VERSION = 122;
// @See https://github.com/mdn/learning-area/blob/master/javascript/apis/client-side-storage/indexeddb/video-store/index.jsA // @See https://github.com/mdn/learning-area/blob/master/javascript/apis/client-side-storage/indexeddb/video-store/index.jsA
let db; let db;

View file

@ -1,4 +1,4 @@
const ING_DB_VERSION = 19; const ING_DB_VERSION = 20;
// @See https://github.com/mdn/learning-area/blob/master/javascript/apis/client-side-storage/indexeddb/video-store/index.js // @See https://github.com/mdn/learning-area/blob/master/javascript/apis/client-side-storage/indexeddb/video-store/index.js

View file

@ -15,4 +15,4 @@ if __name__ == "__main__":
args = parser.parse_args() args = parser.parse_args()
infile, outfile = args.infile, args.outfile infile, outfile = args.infile, args.outfile
json.dump(json.load(open(infile)), open(outfile, "w")) json.dump(json.load(open(infile)), open(outfile, "w"), ensure_ascii=False, separators=(',', ':'))

View file

@ -3794,5 +3794,9 @@
"Blue Wynnter Sweater": 3792, "Blue Wynnter Sweater": 3792,
"Green Wynnter Sweater": 3793, "Green Wynnter Sweater": 3793,
"Purple Wynnter Sweater": 3794, "Purple Wynnter Sweater": 3794,
"Red Wynnter Sweater": 3795 "Red Wynnter Sweater": 3795,
"Athanasia": 3796,
"Provenance": 3797,
"Veneration": 3798,
"Reckoning": 3799
} }

View file

@ -221,4 +221,4 @@ with open("ing_map.json", "w") as ing_mapfile:
#save ings #save ings
with open(outfile, "w") as out_file: with open(outfile, "w") as out_file:
json.dump(ings, out_file) json.dump(ings, out_file, ensure_ascii=False, separators=(',', ':'))

View file

@ -96,5 +96,5 @@ with open("id_map.json","w") as id_mapfile:
#write the data back to the outfile #write the data back to the outfile
with open(outfile, "w+") as out_file: with open(outfile, "w+") as out_file:
json.dump(data, out_file) json.dump(data, out_file, ensure_ascii=False, separators=(',', ':'))