Skip to content

Commit 6001494

Browse files
committed
Update Gatherer and capacity and fix generate gold
1 parent 990c7d2 commit 6001494

File tree

6 files changed

+52
-9
lines changed

6 files changed

+52
-9
lines changed

db/effects.js

+24-4
Original file line numberDiff line numberDiff line change
@@ -270,9 +270,9 @@ export function addEffect(name) {
270270
if ((name.startsWith("Convert")) && name !== "ConvertResist" && name !== "ConvertConvertableBuilding" && name !== "Convert2ConvertableBuilding") {
271271
addEffect(name.replace("Convert", "Chaos"))
272272
}
273-
if (name == "AutoGatherGold") {
273+
/*if (name == "AutoGatherGold") {
274274
addEffect(name.replace("AutoGatherGold", "AutoGatherGoldIndia"))
275-
}
275+
}*/
276276
/*
277277
if (name.startsWith("Chaos")) {
278278
console.log(name)
@@ -554,7 +554,7 @@ const templates = {
554554
},
555555
AutoGatherFood: { name: "Generating Food", icon: "GatherFood", sort: 10 },
556556
AutoGatherGold: { name: "Generating Gold", icon: "GatherGold", sort: 12 },
557-
AutoGatherGoldIndia: { name: "Generating Gold (only India)", icon: "GatherGold", sort: 12 },
557+
//AutoGatherGoldIndia: { name: "Generating Gold (only India)", icon: "GatherGold", sort: 12 },
558558
AutoGatherShrineGather: { name: "Generating Extra Gold at Indian Shrine", icon: "GatherGold", sort: 13 },
559559
AutoGatherTree: { name: "Generating Wood", icon: "GatherTree", sort: 11 },
560560
AutoGatherStone: { name: "Generating Stone", icon: "GatherStone", sort: 13 },
@@ -1482,7 +1482,27 @@ const templates = {
14821482
GathererLimit: {
14831483
name: "Gatherer Limit",
14841484
icon: "PopulationCount",
1485-
sort: 209
1485+
sort: 210
1486+
},
1487+
InitialResourceFood: {
1488+
name: "Food Contained",
1489+
icon: "CostFood",
1490+
sort: 210
1491+
},
1492+
InitialResourceWood: {
1493+
name: "Wood Contained",
1494+
icon: "CostWood",
1495+
sort: 210
1496+
},
1497+
InitialResourceGold: {
1498+
name: "Gold Contained",
1499+
icon: "CostGold",
1500+
sort: 210
1501+
},
1502+
InitialResourceStone: {
1503+
name: "Stone Contained",
1504+
icon: "CostStone",
1505+
sort: 210
14861506
}
14871507
}
14881508

db/units/convert-stats.js

+10-2
Original file line numberDiff line numberDiff line change
@@ -135,6 +135,9 @@ export async function convertUnitStats(unit) {
135135
if (unit.GathererLimit) {
136136
stats["GathererLimit"] = unit.GathererLimit
137137
}
138+
if (unit.InitialResource) {
139+
stats["InitialResource" + unit.InitialResource["resourcetype"]] = unit.InitialResource["quantity"]
140+
}
138141

139142
if (unit.Tactics) {
140143
const tactics = await getTactics(unit.Tactics)
@@ -232,9 +235,14 @@ export async function convertUnitStats(unit) {
232235
if (unit.UnitType.includes("AbstractWall")) {
233236
stats["Hitpoints"] = stats["Hitpoints"] * 1.77
234237
}
235-
238+
236239
if (unit.UnitType.includes("Herdable")) {
237-
stats.AutoGatherGoldIndia = stats.AutoGatherGold
240+
for (let i = 0; i < inactiveActions.length; i++) {
241+
if (inactiveActions[i] === "AutoGatherGold") {
242+
inactiveActions.splice(i)
243+
}
244+
}
245+
// stats.AutoGatherGoldIndia = stats.AutoGatherGold
238246
}
239247

240248

public/sitemap.xml

+1-1
Original file line numberDiff line numberDiff line change
@@ -1 +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>2024-11-01T12:23:17.714Z</lastmod><changefreq>weekly</changefreq><priority>1.0</priority></url></urlset>
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>2024-11-01T20:20:38.510Z</lastmod><changefreq>weekly</changefreq><priority>1.0</priority></url></urlset>

src/components/Stats.vue

+15
Original file line numberDiff line numberDiff line change
@@ -96,6 +96,18 @@ export default {
9696
if (stats["ConvertResist"] === 1000) {
9797
stats["ConvertResist"] = Infinity
9898
}
99+
if (stats["InitialResourceFood"] === 999) {
100+
stats["InitialResourceFood"] = Infinity
101+
}
102+
if (stats["InitialResourceWood"] === 999) {
103+
stats["InitialResourceWood"] = Infinity
104+
}
105+
if (stats["InitialResourceGold"] === 999) {
106+
stats["InitialResourceGold"] = Infinity
107+
}
108+
if (stats["InitialResourceStone"] === 999) {
109+
stats["InitialResourceStone"] = Infinity
110+
}
99111
// Remove stats from inactive actions
100112
this.unit.inactiveActions.forEach(a => {
101113
for (let key in stats) {
@@ -257,6 +269,9 @@ export default {
257269
) {
258270
e = "Pierce DPS per unit"
259271
}
272+
if (this.unit.types.includes("Herdable") && name === "AutoGatherGold") {
273+
e = "Generating Gold (Indian Civ only)"
274+
}
260275
/* Enneris only has Bonus vs Buildings from the RangedAttack2*/
261276
/*if (this.unit.id === "Ro_Shp_Enneris" && name === "DamageBonusBuilding") {
262277
e = "Special Attack Bonus vs Buildings"

src/data/effects.json

+1-1
Large diffs are not rendered by default.

src/data/units.json

+1-1
Large diffs are not rendered by default.

0 commit comments

Comments
 (0)