Skip to content

Commit

Permalink
2024_10_27_update_starting_gear_info
Browse files Browse the repository at this point in the history
  • Loading branch information
romaniac01 committed Oct 27, 2024
1 parent 2f6cc6b commit d660d8e
Show file tree
Hide file tree
Showing 10 changed files with 322 additions and 241 deletions.
2 changes: 1 addition & 1 deletion api-types/Advisors.ts
Original file line number Diff line number Diff line change
Expand Up @@ -43,7 +43,7 @@ export interface Advisor {
sellable: "true" | "false" // FIXME should be `boolean`
tradeable: "true" | "false" // FIXME should be `boolean`
destroyable: "true" | "false" // FIXME should be `boolean`
civilization?: "Egypt" | "Greek" | "Celt" | "Persia" | "Norse" | "Babylonian"
civilization?: "Egypt" | "Greek" | "Celt" | "Persia" | "Norse" | "Babylonian" | "Indian"
shortdescriptionid?: string // FIXME should be `number`
specialborder?: "true" // FIXME should be `boolean`
}
Expand Down
28 changes: 18 additions & 10 deletions db/items/convert.ts
Original file line number Diff line number Diff line change
Expand Up @@ -12,9 +12,7 @@ import { convertLootTable } from "./convert-loot-table"
import { buildSearchString } from "./search"
import {
getQuestName,
isBabylonianStartingGear,
isNorseStartingGear,
isPersianStartingGear,
isProStartingGear,
isReforgeable,
isStartingGear,
isLevel40StartingGear,
Expand Down Expand Up @@ -56,9 +54,19 @@ export async function convertItem(trait: Trait): Promise<Item> {
event: convertEvent(trait),
lootTable: convertLootTable(trait),
starting: [
isPersianStartingGear(trait) && "persian",
isBabylonianStartingGear(trait) && "babylonian",
isNorseStartingGear(trait) && "norse",
isProStartingGear(trait) && "persian",
isProStartingGear(trait) && "babylonian",
isProStartingGear(trait) && "norse",
isProStartingGear(trait) && "indian",

isLevel40StartingGear(trait) && "greek",
isLevel40StartingGear(trait) && "egyptian",
isLevel40StartingGear(trait) && "celtic",
isLevel40StartingGear(trait) && "persian",
isLevel40StartingGear(trait) && "roman",
isLevel40StartingGear(trait) && "babylonian",
isLevel40StartingGear(trait) && "norse",
isLevel40StartingGear(trait) && "indian",
].filter(Boolean) as string[],
visualfactor: visualfactor_text,
search: "",
Expand All @@ -68,9 +76,9 @@ export async function convertItem(trait: Trait): Promise<Item> {
if (trait.traittype.toLowerCase().startsWith("vanity")) {
item.levels = [1]
}
if (isStartingGear(trait)) {
/*if (isStartingGear(trait)) {
item.levels = [20]
}
}*/
}

if (!item.starting!.length) {
Expand All @@ -85,9 +93,9 @@ export async function convertItem(trait: Trait): Promise<Item> {
if (item.effects) {
item.effectsRange = isReforgeable(trait) || undefined
}
} else if (isStartingGear(trait)) {
} else if (isProStartingGear(trait)) {
if (item.effects) {
item.effectsRange = !isStartingGear(trait) || undefined
item.effectsRange = !isProStartingGear(trait) || undefined
}
} else if (isLevel40StartingGear(trait)) {
if (item.effects) {
Expand Down
13 changes: 9 additions & 4 deletions db/items/search.ts
Original file line number Diff line number Diff line change
Expand Up @@ -11,10 +11,9 @@ import {
import { convertEvent } from "./convert-event"

import {
isBabylonianStartingGear,
isProStartingGear,
isLevel40StartingGear,
isClassicItem,
isNorseStartingGear,
isPersianStartingGear,
isQuestReward,
isReforgeable,
isSoldByCouncilOfImhotep,
Expand Down Expand Up @@ -77,7 +76,7 @@ export async function buildSearchString(item: Item, trait: Trait): Promise<strin
builder.add("Classic")
} else {
builder.add("Celeste")
}
}/*
if (isBabylonianStartingGear(trait)) {
builder.add("Babylonian Starting Gear")
}
Expand All @@ -86,6 +85,12 @@ export async function buildSearchString(item: Item, trait: Trait): Promise<strin
}
if (isNorseStartingGear(trait)) {
builder.add("Norse Starting Gear")
}*/
if (isProStartingGear(trait)) {
builder.add("Pro Starting Gear")
}
if (isLevel40StartingGear(trait)) {
builder.add("Level 40 Starting Gear")
}
if (item.lootTable) {
builder.add(item.lootTable)
Expand Down
35 changes: 27 additions & 8 deletions db/items/source.ts
Original file line number Diff line number Diff line change
Expand Up @@ -123,7 +123,7 @@ const eventSummer2019 = [
"se2019_spear1h",
"se2019_scepter2h",
]

/*
const persianStartingGear = [
"armorbldg_u201", "armorclth_r201", "armorlgt_r201", "armormed_r201",
"armorplt_u201", "arrowoh_u201_vr", "ballista2h_u201_vr", "bow1h_u201",
Expand All @@ -145,7 +145,24 @@ const norseStartingGear = [
"bow1h_u201", "firethrower2h_u201", "fishingnet1h_u201", "javalin2h_u201",
"ramhead2h_u201", "scepter2h_u201", "shield1h_u201", "spear1h_u201",
"spear2h_u201", "sword1h_u201", "tool1h_u201",
]*/

const proStartingGear = [
"armorbldg_u201", "armorclth_r201", "armorlgt_r201", "armormed_r201",
"armorplt_u201", "arrowoh_u201_vr", "axe2h_u201", "ballista2h_u201_vr",
"bow1h_u201", "firethrower2h_u201", "fishingnet1h_u201", "javalin2h_u201",
"ramhead2h_u201", "scepter2h_u201", "shield1h_u201", "spear1h_u201",
"spear2h_u201", "sword1h_u201", "tool1h_u201", "clubh_u201",
]
/*
const level40StartingGear = [
"arrowoh_r202", "axe2h_r202", "gear_siege_r202", "banner_r202", "warhorn_r202",
"bellybow1h_r202", "bow1h_r202", "armormed_r202", "club2h_r202", "firethrower2h_r202",
"armorlgt_r202", "tool1h_r202", "spear2h_r202", "gear_r202", "scout1h_r202",
"javalin2h_r202", "spear1h_r202", "gear_bldg_los_r202", "merchant2h_r202",
"fishingnet1h_r202", "armorplt_r202", "ramhead2h_r202", "armorbldg_r202",
"gear_boat_r202", "",
]*/

const eventReforgeIgnoreList = [
"armorbldg_winter2021",
Expand Down Expand Up @@ -326,21 +343,23 @@ export function isReforgeable(trait: Trait) {
export function isClassicItem(trait: Trait) {
return trait.dbid < celesteLegendariesStart
}

/*
export function isPersianStartingGear(trait: Trait) {
return persianStartingGear.includes(trait.name)
}
export function isBabylonianStartingGear(trait: Trait) {
return babylonianStartingGear.includes(trait.name)
return trait.name.startsWith("_bahram")
}
export function isNorseStartingGear(trait: Trait) {
return norseStartingGear.includes(trait.name)
}
return proStartingGear.includes(trait.name)
}*/

export function isProStartingGear(trait: Trait) {
return proStartingGear.includes(trait.name)
}
export function isStartingGear(trait: Trait) {
return isPersianStartingGear(trait)
|| isBabylonianStartingGear(trait)
|| isNorseStartingGear(trait)
return isProStartingGear(trait)
&& isLevel40StartingGear(trait)
}
20 changes: 20 additions & 0 deletions db/materials/currencies.ts
Original file line number Diff line number Diff line change
Expand Up @@ -47,10 +47,26 @@ export const currencies = [
resource: "Art/UserInterface/Icons/Buildings/AvatarMarket_ua",
iconName: "market",
},
{
resource: "Art/UserInterface/Avatar/RegionShieldC01_4_ua",
iconName: "greek",
},
{
resource: "Art/UserInterface/Avatar/RegionShieldC02_4_ua",
iconName: "egyptian",
},
{
resource: "Art/UserInterface/Avatar/RegionShieldC03_4_ua",
iconName: "celtic",
},
{
resource: "Art/UserInterface/Avatar/RegionShieldC04_4_ua",
iconName: "persian",
},
{
resource: "Art/UserInterface/Avatar/RegionShieldC05_4_ua",
iconName: "roman",
},
{
resource: "Art/UserInterface/Avatar/RegionShieldC06_4_ua",
iconName: "babylonian",
Expand All @@ -59,6 +75,10 @@ export const currencies = [
resource: "Art/UserInterface/Avatar/RegionShieldC07_4_ua",
iconName: "norse",
},
{
resource: "Art/UserInterface/Avatar/RegionShieldC08_4_ua",
iconName: "indian",
},
{
resource: "Art/UserInterface/Icons/Blueprints/BlueprintIcons_All/Blueprint_WorkshopSawmill_ua",
iconName: "workshop-logger",
Expand Down
56 changes: 40 additions & 16 deletions src/app/results/item/item.component.html
Original file line number Diff line number Diff line change
Expand Up @@ -179,24 +179,48 @@

<!-- STARTING GEAR -->
<div *ngIf="item.starting?.length">
<div class="row --source">
<span>
Pro Civilization Starting Gear:
</span>
<div *ngIf="level < 21">
<div class="row --source">
<span>
Pro Civilization Starting Gear:
</span>
</div>

<div class="row --materials">
<ng-container *ngFor="let civ of item.starting">
<div class="icon-materials-container">
<span class="icon--materials icon--materials--{{ civ }}"></span>
</div>
<span>{{ civ | titlecase }}</span>
<span></span><!-- wrap line -->
<span></span><!-- wrap line -->
<span></span><!-- wrap line -->
<span></span><!-- wrap line -->
<span></span><!-- wrap line -->
</ng-container>
</div>
</div>

<div class="row --materials">
<ng-container *ngFor="let civ of item.starting">
<div class="icon-materials-container">
<span class="icon--materials icon--materials--{{ civ }}"></span>
</div>
<span>{{ civ | titlecase }}</span>
<span></span><!-- wrap line -->
<span></span><!-- wrap line -->
<span></span><!-- wrap line -->
<span></span><!-- wrap line -->
<span></span><!-- wrap line -->
</ng-container>
<div *ngIf="level > 22">
<div class="row --source">
<span>
Level 40 Civilization Starting Gear:
</span>
</div>

<div class="row --materials">
<ng-container *ngFor="let civ of item.starting">
<div class="icon-materials-container">
<span class="icon--materials icon--materials--{{ civ }}"></span>
</div>
<span>{{ civ | titlecase }}</span>
<span></span><!-- wrap line -->
<span></span><!-- wrap line -->
<span></span><!-- wrap line -->
<span></span><!-- wrap line -->
<span></span><!-- wrap line -->
</ng-container>
</div>
</div>
</div>

Expand Down
2 changes: 1 addition & 1 deletion src/assets/db/items.json

Large diffs are not rendered by default.

Binary file modified src/assets/sprites/materials.png
Loading
Sorry, something went wrong. Reload?
Sorry, we cannot display this file.
Sorry, this file is invalid so it cannot be displayed.
Loading

0 comments on commit d660d8e

Please sign in to comment.