Magic the Gathering: Friends or Foes?
JavaScript (ES6), &nbsp;26 23 17 15&nbsp; 14 bytes

Takes input as two ASCII codes in currying syntax (a)(b). Returns 4 for friends or 0 for foes.

a=&gt;b=&gt;a*b/.6&amp;4


Try it online!

How?

NB: only the integer quotient of the division by 0.6 is shown below.

Combo | a  | b  | a*b  | / 0.6 | AND 4
------+----+----+------+-------+------
  WU  | 87 | 85 | 7395 | 12325 |   4
  UB  | 85 | 66 | 5610 |  9350 |   4
  BR  | 66 | 82 | 5412 |  9020 |   4
  RG  | 82 | 71 | 5822 |  9703 |   4
  GW  | 71 | 87 | 6177 | 10295 |   4
  UW  | 85 | 87 | 7395 | 12325 |   4
  BU  | 66 | 85 | 5610 |  9350 |   4
  RB  | 82 | 66 | 5412 |  9020 |   4
  GR  | 71 | 82 | 5822 |  9703 |   4
  WG  | 87 | 71 | 6177 | 10295 |   4
------+----+----+------+-------+------
  WB  | 87 | 66 | 5742 |  9570 |   0
  UR  | 85 | 82 | 6970 | 11616 |   0
  BG  | 66 | 71 | 4686 |  7810 |   0
  RW  | 82 | 87 | 7134 | 11890 |   0
  GU  | 71 | 85 | 6035 | 10058 |   0
  BW  | 66 | 87 | 5742 |  9570 |   0
  RU  | 82 | 85 | 6970 | 11616 |   0
  GB  | 71 | 66 | 4686 |  7810 |   0
  WR  | 87 | 82 | 7134 | 11890 |   0
  UG  | 85 | 71 | 6035 | 10058 |   0


Previous approach, 15 bytes

Takes input as two ASCII codes in currying syntax (a)(b). Returns 0 for friends or 1 for foes.

a=&gt;b=&gt;a*b%103%2


Try it online!

How?

Combo | a  | b  | a*b  | MOD 103 | MOD 2
------+----+----+------+---------+------
  WU  | 87 | 85 | 7395 |    82   |   0
  UB  | 85 | 66 | 5610 |    48   |   0
  BR  | 66 | 82 | 5412 |    56   |   0
  RG  | 82 | 71 | 5822 |    54   |   0
  GW  | 71 | 87 | 6177 |   100   |   0
  UW  | 85 | 87 | 7395 |    82   |   0
  BU  | 66 | 85 | 5610 |    48   |   0
  RB  | 82 | 66 | 5412 |    56   |   0
  GR  | 71 | 82 | 5822 |    54   |   0
  WG  | 87 | 71 | 6177 |   100   |   0
------+----+----+------+---------+------
  WB  | 87 | 66 | 5742 |    77   |   1
  UR  | 85 | 82 | 6970 |    69   |   1
  BG  | 66 | 71 | 4686 |    51   |   1
  RW  | 82 | 87 | 7134 |    27   |   1
  GU  | 71 | 85 | 6035 |    61   |   1
  BW  | 66 | 87 | 5742 |    77   |   1
  RU  | 82 | 85 | 6970 |    69   |   1
  GB  | 71 | 66 | 4686 |    51   |   1
  WR  | 87 | 82 | 7134 |    27   |   1
  UG  | 85 | 71 | 6035 |    61   |   1


Initial approach, 23 bytes

Takes input as a 2-character string. Returns true for friends or false for foes.

s=&gt;parseInt(s,35)%9%7&lt;3


Try it online!