Skip to content

Commit fcdc8f0

Browse files
committed
New example filter
1 parent a1968c3 commit fcdc8f0

File tree

2 files changed

+17
-3
lines changed

2 files changed

+17
-3
lines changed

filters/double_legendary.cl

Lines changed: 16 additions & 0 deletions
Original file line numberDiff line numberDiff line change
@@ -0,0 +1,16 @@
1+
// Searches for a first shop buffoon pack with the four jokers that give increased mult to suits.
2+
#include "lib/immolate.cl"
3+
long filter(instance* inst) {
4+
int score = 0;
5+
for (int i = 1; i <= 2; i++) {
6+
pack pack = pack_info(next_pack(inst, 1));
7+
if (pack.type == Arcana_Pack || pack.type == Spectral_Pack) {
8+
item cards[5];
9+
(pack.type == Arcana_Pack ? arcana_pack(cards, pack.size, inst, 1) : spectral_pack(cards, pack.size, inst, 1));
10+
for (int i = 0; i < pack.size; i++) {
11+
if (cards[i] == The_Soul) score++;
12+
}
13+
};
14+
}
15+
return score;
16+
}

search.cl

Lines changed: 1 addition & 3 deletions
Original file line numberDiff line numberDiff line change
@@ -1,8 +1,6 @@
1-
#include "filters/test.cl"
1+
#include "filters/double_legendary.cl"
22

33
// Search
4-
// Note that when embedding the files into the C code, this part will have to be included after filter.cl is loaded.
5-
64
__kernel void search(char8 starting_seed, long num_seeds, long filter_cutoff) {
75
seed _seed = s_new_c8(starting_seed);
86
if (get_global_id(0) != 0) {

0 commit comments

Comments
 (0)