shave a few more bytes by assuming resources are numbered contiguously
regularize hand tables a bit with HandDef structure