Skip to content

Commit

Permalink
Fix Unit stats self heal to Prioritise the proto action on units
Browse files Browse the repository at this point in the history
Fix Unit stats self heal to Prioritise the proto action on units
  • Loading branch information
romaniac01 committed Oct 28, 2023
1 parent 29a5e99 commit 91f6da5
Show file tree
Hide file tree
Showing 3 changed files with 10 additions and 4 deletions.
10 changes: 8 additions & 2 deletions db/units/convert-stats.js
Original file line number Diff line number Diff line change
Expand Up @@ -367,6 +367,10 @@ export function parseAction(action, stats, inactiveActions) {
stats.MinimumRange = action.MinRange
}

if (name === "SelfHeal") {
stats.WorkRateSelfHeal = action.Rate[0].amount
}

if (name === "Sacrifice") {
if (Array.isArray(action.Rate)) {
for (let i = 0; i < action.Rate.length; i++) {
Expand Down Expand Up @@ -561,8 +565,10 @@ function convertTactic(tactic, stats, inactiveActions) {
if (tactic.active !== "1") {
break
}
stats.WorkRateSelfHeal = parseFloat(tactic.rate[0].text)
break
if (!stats.WorkRateSelfHeal) {
stats.WorkRateSelfHeal = parseFloat(tactic.rate[0].text)
break
}
}
if (tactic.affectsTargetsInCombat === "") {
const healType = "Rate" + tactic.name.text
Expand Down
2 changes: 1 addition & 1 deletion public/sitemap.xml
Original file line number Diff line number Diff line change
@@ -1 +1 @@
<?xml version="1.0" encoding="UTF-8"?><urlset xmlns="http://www.sitemaps.org/schemas/sitemap/0.9"><url><loc>https://unitstats.projectceleste.com</loc><lastmod>2023-10-24T18:40:46.260Z</lastmod><changefreq>weekly</changefreq><priority>1.0</priority></url></urlset>
<?xml version="1.0" encoding="UTF-8"?><urlset xmlns="http://www.sitemaps.org/schemas/sitemap/0.9"><url><loc>https://unitstats.projectceleste.com</loc><lastmod>2023-10-28T09:28:16.081Z</lastmod><changefreq>weekly</changefreq><priority>1.0</priority></url></urlset>
2 changes: 1 addition & 1 deletion src/data/units.json

Large diffs are not rendered by default.

0 comments on commit 91f6da5

Please sign in to comment.