Blog/Components/Pages/Warframe.razor 8.2 K · 205 lines · raw · history

1 @page "/Warframe"
2 <PageTitle>Warframe drops</PageTitle>
3
4 <main>
5 <h1>Warframe drops</h1>
6
7 <form method="get" action="/Warframe" class="flex-row">
8 <label for="q">Search for a part</label>
9 <input type="search" id="q" name="q" value="@Query" list="drop-names" autofocus
10 placeholder="Nikana Prime Blade" autocomplete="off"/>
11 <button type="submit">Search</button>
12 </form>
13
14 @* Filled in by script from /api/warframe/names. *@
15 <datalist id="drop-names"></datalist>
16
17 @if (Status.Error is { } error)
18 {
19 <p class="error">@error</p>
20 }
21
22 @if (Tables is not { } tables)
23 {
24 @if (Status.Error is null)
25 {
26 <p>Reading the drop tables…</p>
27 }
28 }
29 else
30 {
31 @if (Matches.Count > 1)
32 {
33 <Panel Legend="@($"{Matches.Count} matches")">
34 <ul class="matches">
35 @foreach (var name in Matches)
36 {
37 <li>
38 <a href="@SearchLink(name)" class="@(name == Item?.Name ? "active" : null)">@name</a>
39 </li>
40 }
41 </ul>
42 </Panel>
43 }
44
45 @if (Item is { } item)
46 {
47 <h2 class="item-name">
48 @item.Name
49 <a class="wiki" href="@WikiLink(item.Name)" rel="external noreferrer">[wiki]</a>
50 </h2>
51
52 @if (item.Sources.Count == 0 && !item.FromRelics)
53 {
54 <p>Nothing in the drop tables gives this out.</p>
55 }
56
57 @if (item.FromRelics)
58 {
59 <Panel Legend="From relics">
60 <p>
61 <b>Intact</b> is the chance in an unrefined relic, <b>Radiant</b> after
62 four upgrades. Relics you can still farm are listed first.
63 </p>
64
65 @foreach (var (line, relicSources) in RelicRoutes(item))
66 {
67 <div class="relic">
68 <h3>
69 <a href="@ItemLink(line.Relic)">@line.Relic</a>
70 <a class="wiki" href="@WikiLink(line.Relic)" rel="external noreferrer">[wiki]</a>
71 <span class="muted">@line.Rarity</span>
72 <span>@Percent(line.Intact) intact → @Percent(line.Radiant) radiant</span>
73 </h3>
74
75 @if (relicSources.Count == 0)
76 {
77 <p class="muted">Vaulted: nothing currently drops this relic.</p>
78 }
79 else
80 {
81 <p class="muted relic-lead">Best places to farm this relic</p>
82 <div class="table-scroll">
83 <table>
84 <tbody>
85 @foreach (var source in relicSources)
86 {
87 <tr>
88 <td>@source.Location</td>
89 <td class="muted">@source.Context</td>
90 <td class="muted">@CategoryLabel(source.Category)</td>
91 <td class="chance">@Percent(source.Chance)</td>
92 </tr>
93 }
94 </tbody>
95 </table>
96 </div>
97 }
98 </div>
99 }
100 </Panel>
101 }
102
103 @if (item.Sources.Count > 0)
104 {
105 <Panel Legend="@(item.FromRelics ? "Also drops directly from" : "Drops from")">
106 <div class="table-scroll">
107 <table>
108 <thead>
109 <tr>
110 <th>Where</th>
111 <th>Rotation / stage</th>
112 <th>Kind</th>
113 <th class="chance">Chance</th>
114 </tr>
115 </thead>
116 <tbody>
117 @foreach (var source in item.Sources.Take(MaxSources))
118 {
119 <tr>
120 <td>@source.Location</td>
121 <td class="muted">@source.Context</td>
122 <td class="muted">@CategoryLabel(source.Category)</td>
123 <td class="chance" title="@source.Rarity">@Percent(source.Chance)</td>
124 </tr>
125 }
126 </tbody>
127 </table>
128 </div>
129
130 @if (item.Sources.Count > MaxSources)
131 {
132 <p class="muted">
133 @(item.Sources.Count - MaxSources) more places with a lower chance.
134 </p>
135 }
136 </Panel>
137 }
138
139 @if (item.IsRelic)
140 {
141 <Panel Legend="Contains">
142 <div class="table-scroll">
143 <table>
144 <thead>
145 <tr>
146 <th>Reward</th>
147 <th>Rarity</th>
148 <th class="chance">Intact</th>
149 <th class="chance">Radiant</th>
150 </tr>
151 </thead>
152 <tbody>
153 @foreach (var line in item.Contents)
154 {
155 <tr>
156 <td>
157 <a href="@ItemLink(line.Item)">@line.Item</a>
158 <a class="wiki" href="@WikiLink(line.Item)" rel="external noreferrer">[wiki]</a>
159 </td>
160 <td class="muted">@line.Rarity</td>
161 <td class="chance">@Percent(line.Intact)</td>
162 <td class="chance">@Percent(line.Radiant)</td>
163 </tr>
164 }
165 </tbody>
166 </table>
167 </div>
168 </Panel>
169 }
170 }
171 else if (Matches.Count == 0 && !string.IsNullOrWhiteSpace(Query))
172 {
173 <p>Nothing called “@Query” drops anywhere. Try part of the name.</p>
174 }
175 else if (Matches.Count == 0)
176 {
177 <Panel Legend="What this is">
178 <p>
179 @ItemCount(tables) items from Warframe's published drop tables. Search a
180 part to see where it drops, sorted by chance; for prime parts, the relics
181 holding it and where to farm those.
182 </p>
183 <p>
184 Chances are per reward roll, as published. For enemies, the enemy's drop
185 chance multiplied by the item's share of it.
186 </p>
187 <p>
188 Try
189 <a href="/Warframe?q=Gyre+Prime">Gyre Prime</a>,
190 <a href="/Warframe?q=Tellurium">Tellurium</a>,
191 <a href="/Warframe?q=Nitain+Extract">Nitain Extract</a> or
192 <a href="/Warframe?q=Lith+Q3">Lith Q3</a>.
193 </p>
194 </Panel>
195 }
196
197 <p class="muted">
198 <a href="https://www.warframe.com/droptables">Drop tables</a> by Digital Extremes,
199 last updated @tables.LastUpdate. This copy was pulled @Age(tables.FetchedAt) and
200 refreshes when the site is deployed.
201 </p>
202 }
203 </main>
204
205 <script type="module" src="@Assets["Components/Pages/Warframe.razor.js"]"></script>