I'm running Traveller variant that combines Classic with T2300. I'm using CT for character creation, but have a need to include the SIZ characteristic. In T2300, one rolls for SIZ and STR is derived from that roll and one's body type. But, in CT, STR is rolled, so I'm reverse-deriving SIZ from that and the body type.
The code I'm using is;
function GetSize()
{
var BodTyp = BodyType.text;
switch(BodTyp)
{
case 'Normal':
BodyTypeMod = 0;
case 'Ectomorph':
BodyTypeMod = 2;
case 'Endomorph':
BodyTypeMod = -1;
case 'Mesomorph':
BodyTypeMod = -4;
default:
BodyTypeMod = 0;
}
return STRScore.value + BodyTypeMod;
}
The function returns just the STR score and doesn't pay the least attention to the drop down selection for body type.
I thought, perhaps, that switch isn't a valid Javascript command, but I looked it up in an O'Reilly Javascript book and it's there. Does anyone see anything else I might be doing wrong?
Comments