The secret code is:
Explanation: At first glance, my gut instinct (soon to be proved wrong) told me this must be impossible! After all:
However, then I realised I had completely overlooked the possibility that:
Which colour could this be? Well, we know from guess#3 and guess#4 that we have to have:
It now follows that the other three must be ordered ...
The Abyss Creature Chief said:
First I determined what the party consists of
Now that the party is determined the only way I could see how to approach this is try to assert one position as correct and see if it works out.
I've found the answers too complicate, so I share mine. Only three rules are needed:
501 — Two correct numbers in wrong places
135 — One correct number in the right place
167 — One correct number in wrong place
I will share my process:
Notes of format !5 | !0 | !1 means that the first position can't be 5, second can't be 0, etc.
Possible is short for values which are possible and also have been previously discussed
Impossible represents values which have been ruled out
Definite represents values which have been confirmed to exist, though makes no statement on ...
Rule 1) 501 — Two correct numbers in wrong places
Rule 2) 135 — One correct number in the right place
Rule 3) 483 — All numbers are wrong
Rule 4) 167 — One correct number in wrong place
Rule 5) 430 — One correct number in the wrong place
Starting from the most elimination Rule 3
Finding the 2nd digit
The remaining digit
2) 1X5 — 3 gets eliminated by the next clue
3) XXX — All eliminated
4) X67 — 1 gets eliminated for being in the "wrong" place here but the "right place" on Clue 2
5) XX0 — 4 and 3 gets eliminated by clue 3, leaving 0
2) XX5 — The 0 took the 1's place, so only 5 is left
4) XX7 — 1 gets eliminated by clues 1 and 2, and 6 would be in the "right" place ...