Skip to content

Commit 3c553cc

Browse files
committed
Erratic Deck, bump version
1 parent 02c0618 commit 3c553cc

File tree

8 files changed

+63
-4
lines changed

8 files changed

+63
-4
lines changed

filters/double_legendary.cl

Lines changed: 1 addition & 1 deletion
Original file line numberDiff line numberDiff line change
@@ -1,4 +1,4 @@
1-
// Searches for a first shop buffoon pack with the four jokers that give increased mult to suits.
1+
// Searches for a first shop with two packs that give legendary jokers
22
#include "./lib/immolate.cl"
33
long filter(instance* inst) {
44
int score = 0;

filters/erratic_flush_five.cl

Lines changed: 16 additions & 0 deletions
Original file line numberDiff line numberDiff line change
@@ -0,0 +1,16 @@
1+
// Searches for an Erratic Deck seed with lots of an exact card
2+
#include "./lib/immolate.cl"
3+
long filter(instance* inst) {
4+
int scores[52];
5+
for (int i = 0; i < 52; i++) scores[i] = 0;
6+
item deck[52];
7+
init_erratic_deck(inst, deck);
8+
for (int i = 0; i < 52; i++) {
9+
scores[deck[i]-C_2]++;
10+
}
11+
int score = scores[0];
12+
for (int i = 1; i < 52; i++) {
13+
if (scores[i] > score) score = scores[i];
14+
}
15+
return score;
16+
}

filters/erratic_ranks.cl

Lines changed: 16 additions & 0 deletions
Original file line numberDiff line numberDiff line change
@@ -0,0 +1,16 @@
1+
// Searches for an Erratic Deck seed with lots of a rank
2+
#include "./lib/immolate.cl"
3+
long filter(instance* inst) {
4+
int16 scores;
5+
for (int i = 0; i < 13; i++) scores[i] = 0;
6+
item deck[52];
7+
init_erratic_deck(inst, deck);
8+
for (int i = 0; i < 52; i++) {
9+
scores[rank(deck[i])-_2]++;
10+
}
11+
int score = scores[0];
12+
for (int i = 1; i < 13; i++) {
13+
if (scores[i] > score) score = scores[i];
14+
}
15+
return score;
16+
}

filters/erratic_suits.cl

Lines changed: 19 additions & 0 deletions
Original file line numberDiff line numberDiff line change
@@ -0,0 +1,19 @@
1+
// Searches for an Erratic Deck seed with lots of a type of suit
2+
#include "./lib/immolate.cl"
3+
long filter(instance* inst) {
4+
int4 scores;
5+
for (int i = 0; i < 4; i++) scores[i] = 0;
6+
item deck[52];
7+
init_erratic_deck(inst, deck);
8+
for (int i = 0; i < 52; i++) {
9+
if (suit(deck[i]) == Spades) scores[0]++;
10+
if (suit(deck[i]) == Diamonds) scores[1]++;
11+
if (suit(deck[i]) == Clubs) scores[2]++;
12+
if (suit(deck[i]) == Hearts) scores[3]++;
13+
}
14+
int score = scores[0];
15+
if (scores[1] > score) score = scores[1];
16+
if (scores[2] > score) score = scores[2];
17+
if (scores[3] > score) score = scores[3];
18+
return score;
19+
}

immolate.c

Lines changed: 1 addition & 1 deletion
Original file line numberDiff line numberDiff line change
@@ -2,7 +2,7 @@
22
int main(int argc, char **argv) {
33

44
// Print version
5-
printf_s("Immolate Beta v1.0.0k.0\n");
5+
printf_s("Immolate Beta v1.0.0L.0\n");
66

77
// Handle CLI arguments
88
unsigned int platformID = 0;

lib/cache.cl

Lines changed: 2 additions & 0 deletions
Original file line numberDiff line numberDiff line change
@@ -30,6 +30,7 @@ typedef enum RandomType {
3030
R_Voucher,
3131
R_Voucher_Tag,
3232
R_Soul,
33+
R_Erratic,
3334
R_END
3435
} rtype;
3536

@@ -96,6 +97,7 @@ text type_str(int x) {
9697
case R_Voucher: return init_text("Voucher", 7);
9798
case R_Voucher_Tag: return init_text("Voucher_fromtag", 15);
9899
case R_Soul: return init_text("soul_", 5);
100+
case R_Erratic: return init_text("erratic", 7);
99101
default: return init_text("", 0);
100102
}
101103
}

lib/functions.cl

Lines changed: 7 additions & 1 deletion
Original file line numberDiff line numberDiff line change
@@ -355,4 +355,10 @@ item next_voucher_from_tag(instance* inst, int ante) {
355355
}
356356
return i;
357357
}
358-
#endif
358+
#endif
359+
360+
void init_erratic_deck(instance* inst, item out[]) {
361+
for (int i = 0; i < 52; i++) {
362+
out[i] = randchoice_simple(inst, R_Erratic, CARDS);
363+
}
364+
}

search.cl

Lines changed: 1 addition & 1 deletion
Original file line numberDiff line numberDiff line change
@@ -1,4 +1,4 @@
1-
#include "./filters/double_legendary.cl"
1+
#include "./filters/erratic_flush_five.cl"
22

33
// Search
44
__kernel void search(char8 starting_seed, long num_seeds, long filter_cutoff) {

0 commit comments

Comments
 (0)