Skip to content

Commit

Permalink
feat(actions): add support for Groundwork
Browse files Browse the repository at this point in the history
- Update Chinese translations
- Update suggested craftsmanship/control up to level 520
- Update icons

Closes doxxx#377.
  • Loading branch information
doxxx authored Apr 1, 2020
2 parents 3ca5409 + 83bdc50 commit 5e2dc8f
Show file tree
Hide file tree
Showing 15 changed files with 216 additions and 27 deletions.
4 changes: 2 additions & 2 deletions app/data/buffs/Meal.json
Original file line number Diff line number Diff line change
Expand Up @@ -605,7 +605,7 @@
"hq": false,
"id": "8dd8ec5598b",
"name": {
"cn": "Mejillones al Ajillo (patch 5.1)",
"cn": "蒜炒贻贝",
"de": "Miserabelmuscheln al Ajillo",
"en": "Mejillones al Ajillo",
"fr": "Moules al ajillo",
Expand All @@ -621,7 +621,7 @@
"hq": true,
"id": "8dd8ec5598b",
"name": {
"cn": "Mejillones al Ajillo (patch 5.1)",
"cn": "蒜炒贻贝",
"de": "Miserabelmuscheln al Ajillo",
"en": "Mejillones al Ajillo",
"fr": "Moules al ajillo",
Expand Down
Binary file added app/img/actions/Alchemist/groundwork.png
Loading
Sorry, something went wrong. Reload?
Sorry, we cannot display this file.
Sorry, this file is invalid so it cannot be displayed.
Binary file added app/img/actions/Armorer/groundwork.png
Loading
Sorry, something went wrong. Reload?
Sorry, we cannot display this file.
Sorry, this file is invalid so it cannot be displayed.
Binary file added app/img/actions/Blacksmith/groundwork.png
Loading
Sorry, something went wrong. Reload?
Sorry, we cannot display this file.
Sorry, this file is invalid so it cannot be displayed.
Binary file added app/img/actions/Carpenter/groundwork.png
Loading
Sorry, something went wrong. Reload?
Sorry, we cannot display this file.
Sorry, this file is invalid so it cannot be displayed.
Binary file added app/img/actions/Culinarian/groundwork.png
Loading
Sorry, something went wrong. Reload?
Sorry, we cannot display this file.
Sorry, this file is invalid so it cannot be displayed.
Binary file added app/img/actions/Goldsmith/groundwork.png
Loading
Sorry, something went wrong. Reload?
Sorry, we cannot display this file.
Sorry, this file is invalid so it cannot be displayed.
Binary file added app/img/actions/Leatherworker/groundwork.png
Loading
Sorry, something went wrong. Reload?
Sorry, we cannot display this file.
Sorry, this file is invalid so it cannot be displayed.
Binary file added app/img/actions/Weaver/groundwork.png
Loading
Sorry, something went wrong. Reload?
Sorry, we cannot display this file.
Sorry, this file is invalid so it cannot be displayed.
Binary file modified app/img/actions/wasteNot.png
Loading
Sorry, something went wrong. Reload?
Sorry, we cannot display this file.
Sorry, this file is invalid so it cannot be displayed.
Binary file modified app/img/actions/wasteNot2.png
Loading
Sorry, something went wrong. Reload?
Sorry, we cannot display this file.
Sorry, this file is invalid so it cannot be displayed.
1 change: 1 addition & 0 deletions app/js/actions.js
Original file line number Diff line number Diff line change
Expand Up @@ -69,6 +69,7 @@ var AllActions = {

// ShadowBringers actions
preparatoryTouch: new Action( 'preparatoryTouch', 'Preparatory Touch', 20, 40, 1.0, 2.0, 0.0, 'immediate', 1, 'All', 71),
groundwork: new Action( 'groundwork', 'Groundwork', 20, 18, 1.0, 0.0, 3.0, 'immediate', 1, 'All', 72),
delicateSynthesis: new Action( 'delicateSynthesis', 'Delicate Synthesis', 10, 32, 1.0, 1.0, 1.0, 'immediate', 1, 'All', 76),
intensiveSynthesis: new Action( 'intensiveSynthesis', 'Intensive Synthesis', 10, 6, 1.0, 0.0, 3.0, 'immediate', 1, 'All', 78, true, true),
trainedEye: new Action( 'trainedEye', 'Trained Eye', 10, 250, 1.0, 0.0, 0.0, 'immediate', 1, 'All', 80),
Expand Down
229 changes: 206 additions & 23 deletions app/js/ffxivcraftmodel.js
Original file line number Diff line number Diff line change
Expand Up @@ -291,6 +291,9 @@ function ApplyModifiers(s, action, condition) {
cpCost = 0;
}
}
if (isActionEq(action, AllActions.groundwork) && s.durabilityState < 20) {
progressIncreaseMultiplier *= 0.5;
}

// Effects modifying quality increase multiplier
var qualityIncreaseMultiplier = 1;
Expand Down Expand Up @@ -2091,7 +2094,77 @@ var SuggestedCraftsmanship = {
447: 2099,
448: 2112,
449: 2126,
450: 2140
450: 2140,
451: 2151,
452: 2162,
453: 2173,
454: 2184,
455: 2195,
456: 2206,
457: 2217,
458: 2228,
459: 2239,
460: 2250,
461: 2261,
462: 2272,
463: 2283,
464: 2294,
465: 2305,
466: 2316,
467: 2327,
468: 2338,
469: 2349,
470: 2360,
471: 2372,
472: 2384,
473: 2396,
474: 2408,
475: 2420,
476: 2432,
477: 2444,
478: 2456,
479: 2468,
480: 2480,
481: 2484,
482: 2488,
483: 2492,
484: 2496,
485: 2500,
486: 2504,
487: 2508,
488: 2512,
489: 2516,
490: 2520,
491: 2525,
492: 2530,
493: 2535,
494: 2540,
495: 2545,
496: 2550,
497: 2555,
498: 2560,
499: 2565,
500: 2570,
501: 2575,
502: 2580,
503: 2585,
504: 2590,
505: 2595,
506: 2600,
507: 2605,
508: 2610,
509: 2615,
510: 2620,
511: 2620,
512: 2620,
513: 2620,
514: 2620,
515: 2620,
516: 2620,
517: 2620,
518: 2620,
519: 2620,
520: 2620
};

var SuggestedControl = {
Expand Down Expand Up @@ -2544,21 +2617,111 @@ var SuggestedControl = {
447: 1951,
448: 1964,
449: 1977,
450: 1990
450: 1990,
451: 1996,
452: 2002,
453: 2008,
454: 2014,
455: 2020,
456: 2027,
457: 2034,
458: 2041,
459: 2048,
460: 2055,
461: 2062,
462: 2069,
463: 2076,
464: 2083,
465: 2090,
466: 2097,
467: 2104,
468: 2111,
469: 2118,
470: 2125,
471: 2132,
472: 2139,
473: 2146,
474: 2153,
475: 2160,
476: 2167,
477: 2174,
478: 2181,
479: 2188,
480: 2195,
481: 2206,
482: 2217,
483: 2228,
484: 2239,
485: 2250,
486: 2261,
487: 2272,
488: 2283,
489: 2294,
490: 2305,
491: 2316,
492: 2327,
493: 2338,
494: 2349,
495: 2360,
496: 2372,
497: 2384,
498: 2396,
499: 2408,
500: 2420,
501: 2432,
502: 2444,
503: 2456,
504: 2468,
505: 2480,
506: 2492,
507: 2504,
508: 2516,
509: 2528,
510: 2540,
511: 2540,
512: 2540,
513: 2540,
514: 2540,
515: 2540,
516: 2540,
517: 2540,
518: 2540,
519: 2540,
520: 2540
};

var LevelDifferenceFactors = {
'craftsmanship': {
'-10': 0.75,
'-9': 0.77,
'-8': 0.8,
'-7': 0.82,
'-6': 0.85,
'-5': 0.87,
'-4': 0.9,
'-3': 0.92,
'-2': 0.95,
'-1': 0.97,
'-30': 0.8,
'-29': 0.82,
'-28': 0.84,
'-27': 0.86,
'-26': 0.88,
'-25': 0.90,
'-24': 0.92,
'-23': 0.94,
'-22': 0.96,
'-21': 0.98,
'-20': 1,
'-19': 1,
'-18': 1,
'-17': 1,
'-16': 1,
'-15': 1,
'-14': 1,
'-13': 1,
'-12': 1,
'-11': 1,
'-10': 1,
'-9': 1,
'-8': 1,
'-7': 1,
'-6': 1,
'-5': 1,
'-4': 1,
'-3': 1,
'-2': 1,
'-1': 1,
0: 1,
1: 1.05,
2: 1.1,
Expand All @@ -2582,16 +2745,36 @@ var LevelDifferenceFactors = {
20: 1.5
},
'control': {
'-10': 0.5,
'-9': 0.55,
'-8': 0.6,
'-7': 0.65,
'-6': 0.7,
'-5': 0.75,
'-4': 0.8,
'-3': 0.85,
'-2': 0.9,
'-1': 0.95,
'-30': 0.6,
'-29': 0.64,
'-28': 0.68,
'-27': 0.72,
'-26': 0.76,
'-25': 0.80,
'-24': 0.84,
'-23': 0.88,
'-22': 0.92,
'-21': 0.96,
'-20': 1,
'-19': 1,
'-18': 1,
'-17': 1,
'-16': 1,
'-15': 1,
'-14': 1,
'-13': 1,
'-12': 1,
'-11': 1,
'-10': 1,
'-9': 1,
'-8': 1,
'-7': 1,
'-6': 1,
'-5': 1,
'-4': 1,
'-3': 1,
'-2': 1,
'-1': 1,
0: 1,
1: 1,
2: 1,
Expand All @@ -2617,7 +2800,7 @@ var LevelDifferenceFactors = {
};

function getLevelDifferenceFactor(kind, levelDiff) {
if (levelDiff < -10) levelDiff = -10;
if (levelDiff < -30) levelDiff = -30;
else if (levelDiff > 20) levelDiff = 20;

var factors = LevelDifferenceFactors[kind];
Expand Down
4 changes: 3 additions & 1 deletion app/js/services/actions.js
Original file line number Diff line number Diff line change
Expand Up @@ -48,6 +48,7 @@

// Shadowbringers
preparatoryTouch: { skillID: {"Alchemist": 100305, "Armorer": 100301, "Blacksmith": 100300, "Carpenter": 100299, "Culinarian": 100306, "Goldsmith": 100302, "Leatherworker": 100303, "Weaver": 100304} },
groundwork: { skillID: {"Alchemist": 100337, "Armorer": 100333, "Blacksmith": 100332, "Carpenter": 100331, "Culinarian": 100338, "Goldsmith": 100334, "Leatherworker": 100335, "Weaver": 100336} },
delicateSynthesis: { skillID: {"Alchemist": 100329, "Armorer": 100325, "Blacksmith": 100324, "Carpenter": 100323, "Culinarian": 100330, "Goldsmith": 100326, "Leatherworker": 100327, "Weaver": 100328} },
intensiveSynthesis: { skillID: {"Alchemist": 100321, "Armorer": 100317, "Blacksmith": 100316, "Carpenter": 100315, "Culinarian": 100322, "Goldsmith": 100318, "Leatherworker": 100319, "Weaver": 100320} },
trainedEye: { common: true, skillID: {"Alchemist": 100289, "Armorer": 100285, "Blacksmith": 100284, "Carpenter": 100283, "Culinarian": 100290, "Goldsmith": 100286, "Leatherworker": 100287, "Weaver": 100288} },
Expand Down Expand Up @@ -120,6 +121,7 @@
"carefulSynthesis",
"rapidSynthesis2",
"focusedSynthesis",
"groundwork",
"intensiveSynthesis"
]
},
Expand Down Expand Up @@ -157,9 +159,9 @@
{
name: "Buffs", actions: [
"innerQuiet",
"veneration",
"greatStrides",
"innovation",
"veneration",
"nameOfTheElements"
]
},
Expand Down
5 changes: 4 additions & 1 deletion app/locale/cn.json
Original file line number Diff line number Diff line change
Expand Up @@ -14,7 +14,9 @@

"Rapid Synthesis": "高速制作",

"Ingenuity": "新颖",
"Innovation": "改革",
"Veneration": "崇敬",
"Flawless Synthesis": "坚实制作",
"Manipulation": "掌握",

Expand All @@ -41,6 +43,7 @@
"Name of the Elements" : "元素之美名",

"Preparatory Touch": "坯料加工",
"Groundwork": "坯料制作",
"Delicate Synthesis": "精密制作",
"Intensive Synthesis": "集中制作",
"Trained Eye": "工匠的神速技巧",
Expand Down Expand Up @@ -170,7 +173,7 @@
"RELIABILITY_OPTIONS": "可靠性(%)",
"RELIABILITY_INFO": "使用非100%成功率的技能会降低可靠性,降低此设置将允许求解器以牺牲可靠性为代价找到可能产生更高品质的工序。(默认值:100%)",
"LIMIT_MAX_LENGTH": "限制工序最大长度",
"LIMIT_MAX_LENGTH_INFO": "启用该选项将限制求解工序的最大长度",
"LIMIT_MAX_LENGTH_INFO": "向超过指定限制的工序添加惩罚。请注意,这不是严格的限制!在某些条件下,求解器可能仍会生成超出限制的工序",
"MAX_LENGTH": "最大工序长度",
"MAX_LENGTH_INFO": "在此设置求解工序的最大长度。",
"ALGORITHM_OPTIONS": "算法",
Expand Down

0 comments on commit 5e2dc8f

Please sign in to comment.