Skip to content

Commit

Permalink
Update Caravans and Merchant Transport
Browse files Browse the repository at this point in the history
Update Caravans and Merchant Transport
  • Loading branch information
romaniac01 committed Aug 31, 2023
1 parent 44dba0a commit eb38fb9
Show file tree
Hide file tree
Showing 6 changed files with 53 additions and 15 deletions.
26 changes: 19 additions & 7 deletions db/effects.js
Original file line number Diff line number Diff line change
Expand Up @@ -1368,30 +1368,42 @@ const templates = {
icon: "CostGold",
sort: 161
},
CaravanGoldPerSec300_50_Carry: {
name: "Short Dist Gold Carry/Trip 50+%Trade",
icon: "CarryCapacityGold",
sort: 164
},
CaravanGoldPerSec300_50: {
name: "Gold/Sec Solo Trade 50 on Avg Map",
name: "Gold/Sec Solo Avg Map 50+%Trade",
icon: "CostGold",
sort: 163
sort: 165
},
CaravanGoldPerSec300_100_Carry: {
name: "Short Dist Gold Carry/Trip 100+%Trade",
icon: "CarryCapacityGold",
sort: 162
},
CaravanGoldPerSec300_100: {
name: "Gold/Sec Solo Trade 100 on Avg Map",
name: "Gold/Sec Solo Avg Map 50+%Trade",
icon: "CostGold",
sort: 162
sort: 163
},
CaravanGoldCoop: {
name: "Gold/Sec Coop 50% Trade Bonus",
icon: "CostGold",
sort: 164
sort: 167
},
FishBoatTimeToFish: {
name: "Time to Fish",
icon: "BuildPoints",
sort: 25
sort: 25,
lowerIsBetter: true
},
FishBoatTimeToTravel_100Size: {
name: "Time to Travel from 100m",
icon: "BuildPoints",
sort: 26
sort: 26,
lowerIsBetter: true
},
FishBoatFishPerSec_100Size: {
name: "Food/Sec from 100m",
Expand Down
10 changes: 9 additions & 1 deletion db/units/convert-stats.js
Original file line number Diff line number Diff line change
Expand Up @@ -167,7 +167,9 @@ export async function convertUnitStats(unit) {
addEffect("CaravanGoldPerSec300")
addEffect("CaravanGoldPerSec500")
addEffect("CaravanGoldPerSec300_100")
addEffect("CaravanGoldPerSec300_100_Carry")
addEffect("CaravanGoldPerSec300_50")
addEffect("CaravanGoldPerSec300_50_Carry")
addEffect("CaravanGoldCoop")
addEffect("FishBoatTimeToFish")
addEffect("FishBoatTimeToTravel_100Size")
Expand All @@ -182,9 +184,15 @@ export async function convertUnitStats(unit) {
stats["CaravanGoldPerSec150"] = 1
stats["CaravanGoldPerSec300"] = 1
stats["CaravanGoldPerSec500"] = 1
stats["CaravanGoldCoop"] = 1.224744871
}
if (unit.name.endsWith("Civ_Caravan")) {
stats["CaravanGoldPerSec300_50"] = 1
stats["CaravanGoldPerSec300_50_Carry"] = 1
}
if (unit.name.endsWith("Civ_UtilityBoat")) {
stats["CaravanGoldPerSec300_100"] = 1
stats["CaravanGoldCoop"] = 1.224744871
stats["CaravanGoldPerSec300_100_Carry"] = 1
}
if (unit.name.endsWith("Civ_FishingBoat")) {
stats["FishBoatTimeToFish"] = 1
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-08-19T10:38:10.062Z</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-08-31T21:25:07.194Z</lastmod><changefreq>weekly</changefreq><priority>1.0</priority></url></urlset>
26 changes: 22 additions & 4 deletions src/components/Stats.vue
Original file line number Diff line number Diff line change
Expand Up @@ -174,13 +174,31 @@ export default {
((Math.sqrt((stats["CarryCapacityGold"] * 500) / stats["Trade"]) *
2) /
stats["MaximumVelocity"])
}
if (stats.CaravanGoldPerSec300_50_Carry) {
stats["CaravanGoldPerSec300_50_Carry"] = Math.min(
62.5 * stats["Trade"],
150
)
stats["CaravanGoldPerSec300_50"] =
50 /
((Math.sqrt((50 * 300) / stats["Trade"]) * 2) /
stats["CaravanGoldPerSec300_50_Carry"] /
((Math.sqrt(
(stats["CaravanGoldPerSec300_50_Carry"] * 300) / stats["Trade"]
) *
2) /
stats["MaximumVelocity"])
}
if (stats.CaravanGoldPerSec300_100_Carry) {
stats["CaravanGoldPerSec300_100_Carry"] = Math.min(
(100 * stats["Trade"]) / 1.5,
300
)
stats["CaravanGoldPerSec300_100"] =
100 /
((Math.sqrt((100 * 300) / stats["Trade"]) * 2) /
stats["CaravanGoldPerSec300_100_Carry"] /
((Math.sqrt(
(stats["CaravanGoldPerSec300_100_Carry"] * 300) / stats["Trade"]
) *
2) /
stats["MaximumVelocity"])
}
if (stats.FishBoatTimeToFish) {
Expand Down
2 changes: 1 addition & 1 deletion src/data/effects.json

Large diffs are not rendered by default.

2 changes: 1 addition & 1 deletion src/data/units.json

Large diffs are not rendered by default.

0 comments on commit eb38fb9

Please sign in to comment.