|
|
@ -317,9 +317,13 @@ void genBackground(){ |
|
|
|
} |
|
|
|
} |
|
|
|
} |
|
|
|
} |
|
|
|
|
|
|
|
|
|
|
|
int main(){ |
|
|
|
char * genChar(char* output){ |
|
|
|
|
|
|
|
profs = 0; |
|
|
|
|
|
|
|
languages = 0; |
|
|
|
|
|
|
|
for(int i = 0; i <= 100; i++){ |
|
|
|
|
|
|
|
otherprofs[i] = '\0'; |
|
|
|
|
|
|
|
} |
|
|
|
int i; |
|
|
|
int i; |
|
|
|
strlcat(otherprofs, "", 1); |
|
|
|
|
|
|
|
genRace(); |
|
|
|
genRace(); |
|
|
|
genClass(); |
|
|
|
genClass(); |
|
|
|
genBackground(); |
|
|
|
genBackground(); |
|
|
@ -327,111 +331,113 @@ int main(){ |
|
|
|
stats[i] = dieroll(3,6); |
|
|
|
stats[i] = dieroll(3,6); |
|
|
|
mods[i] = floor((stats[i]/2)-5); |
|
|
|
mods[i] = floor((stats[i]/2)-5); |
|
|
|
} |
|
|
|
} |
|
|
|
printf("Race = %s\nBackground = %s\nClass = %s\nStr = %d %d\nDex = %d %d\nCon = %d %d\nInt = %d %d\nWis = %d %d\nCha = %d %d\n\nHP: %d\n", race, background, class, stats[STR], mods[STR], stats[DEX], mods[DEX], stats[CON], mods[CON], stats[INT], mods[INT], stats[WIS], mods[WIS], stats[CHA], mods[CHA], hp); |
|
|
|
snprintf(output, 512, "Race = %s\r\nBackground = %s\r\nClass = %s\r\nStr = %d %d\r\nDex = %d %d\r\nCon = %d %d\r\nInt = %d %d\r\nWis = %d %d\r\nCha = %d %d\r\n\r\nHP: %d\r\n", race, background, class, stats[STR], mods[STR], stats[DEX], mods[DEX], stats[CON], mods[CON], stats[INT], mods[INT], stats[WIS], mods[WIS], stats[CHA], mods[CHA], hp); |
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
printf("Proficiences:\n"); |
|
|
|
strlcat(output,"Proficiences:\r\n",512); |
|
|
|
if((ATHLETICS & profs) != 0){ |
|
|
|
if((ATHLETICS & profs) != 0){ |
|
|
|
printf("Athletics\n"); |
|
|
|
strlcat(output,"Athletics\r\n",512); |
|
|
|
} |
|
|
|
} |
|
|
|
if((ACROBATICS & profs) != 0){ |
|
|
|
if((ACROBATICS & profs) != 0){ |
|
|
|
printf("Acrobatics\n"); |
|
|
|
strlcat(output,"Acrobatics\r\n",512); |
|
|
|
} |
|
|
|
} |
|
|
|
if((SLEIGHTOFHAND & profs) != 0){ |
|
|
|
if((SLEIGHTOFHAND & profs) != 0){ |
|
|
|
printf("Sleight of Hand\n"); |
|
|
|
strlcat(output,"Sleight of Hand\r\n",512); |
|
|
|
} |
|
|
|
} |
|
|
|
if((STEALTH & profs) != 0){ |
|
|
|
if((STEALTH & profs) != 0){ |
|
|
|
printf("Stealth\n"); |
|
|
|
strlcat(output,"Stealth\r\n",512); |
|
|
|
} |
|
|
|
} |
|
|
|
if((ARCANA & profs) != 0){ |
|
|
|
if((ARCANA & profs) != 0){ |
|
|
|
printf("Arcana\n"); |
|
|
|
strlcat(output,"Arcana\r\n",512); |
|
|
|
} |
|
|
|
} |
|
|
|
if((HISTORY & profs) != 0){ |
|
|
|
if((HISTORY & profs) != 0){ |
|
|
|
printf("History\n"); |
|
|
|
strlcat(output,"History\r\n",512); |
|
|
|
} |
|
|
|
} |
|
|
|
if((INVESTIGATION & profs) != 0){ |
|
|
|
if((INVESTIGATION & profs) != 0){ |
|
|
|
printf("Investigation\n"); |
|
|
|
strlcat(output,"Investigation\r\n",512); |
|
|
|
} |
|
|
|
} |
|
|
|
if((NATURE & profs) != 0){ |
|
|
|
if((NATURE & profs) != 0){ |
|
|
|
printf("Nature\n"); |
|
|
|
strlcat(output,"Nature\r\n",512); |
|
|
|
} |
|
|
|
} |
|
|
|
if((RELIGION & profs) != 0){ |
|
|
|
if((RELIGION & profs) != 0){ |
|
|
|
printf("Regligion\n"); |
|
|
|
strlcat(output,"Regligion\r\n",512); |
|
|
|
} |
|
|
|
} |
|
|
|
if((ANIMALHANDLING & profs) != 0){ |
|
|
|
if((ANIMALHANDLING & profs) != 0){ |
|
|
|
printf("Animal Handling\n"); |
|
|
|
strlcat(output,"Animal Handling\r\n",512); |
|
|
|
} |
|
|
|
} |
|
|
|
if((INSIGHT & profs) != 0){ |
|
|
|
if((INSIGHT & profs) != 0){ |
|
|
|
printf("Insight\n"); |
|
|
|
strlcat(output,"Insight\r\n",512); |
|
|
|
} |
|
|
|
} |
|
|
|
if((MEDICINE & profs) != 0){ |
|
|
|
if((MEDICINE & profs) != 0){ |
|
|
|
printf("Medicine\n"); |
|
|
|
strlcat(output,"Medicine\r\n",512); |
|
|
|
} |
|
|
|
} |
|
|
|
if((PERCEPTION & profs) != 0){ |
|
|
|
if((PERCEPTION & profs) != 0){ |
|
|
|
printf("Perception\n"); |
|
|
|
strlcat(output,"Perception\r\n",512); |
|
|
|
} |
|
|
|
} |
|
|
|
if((SURVIVAL & profs) != 0){ |
|
|
|
if((SURVIVAL & profs) != 0){ |
|
|
|
printf("Survival\n"); |
|
|
|
strlcat(output,"Survival\r\n",512); |
|
|
|
} |
|
|
|
} |
|
|
|
if((DECEPTION & profs) != 0){ |
|
|
|
if((DECEPTION & profs) != 0){ |
|
|
|
printf("Deception\n"); |
|
|
|
strlcat(output,"Deception\r\n",512); |
|
|
|
} |
|
|
|
} |
|
|
|
if((INTIMIDATION & profs) != 0){ |
|
|
|
if((INTIMIDATION & profs) != 0){ |
|
|
|
printf("Intimidation\n"); |
|
|
|
strlcat(output,"Intimidation\r\n",512); |
|
|
|
} |
|
|
|
} |
|
|
|
if((PERFORMANCE & profs) != 0){ |
|
|
|
if((PERFORMANCE & profs) != 0){ |
|
|
|
printf("Performance\n"); |
|
|
|
strlcat(output,"Performance\r\n",512); |
|
|
|
} |
|
|
|
} |
|
|
|
if((PERSUASION & profs) != 0){ |
|
|
|
if((PERSUASION & profs) != 0){ |
|
|
|
printf("Persuaion\n"); |
|
|
|
strlcat(output,"Persuaion\r\n",512); |
|
|
|
} |
|
|
|
} |
|
|
|
|
|
|
|
|
|
|
|
printf("\nLanguages:\nCommon\n"); |
|
|
|
strlcat(output,"\r\nLanguages:\r\nCommon\r\n",512); |
|
|
|
if((ABYSSAL & languages) != 0){ |
|
|
|
if((ABYSSAL & languages) != 0){ |
|
|
|
printf("Abyssal\n"); |
|
|
|
strlcat(output,"Abyssal\r\n",512); |
|
|
|
} |
|
|
|
} |
|
|
|
if((CELESTIAL & languages) != 0){ |
|
|
|
if((CELESTIAL & languages) != 0){ |
|
|
|
printf("Celestial\n"); |
|
|
|
strlcat(output,"Celestial\r\n",512); |
|
|
|
} |
|
|
|
} |
|
|
|
if((DRACONIC & languages) != 0){ |
|
|
|
if((DRACONIC & languages) != 0){ |
|
|
|
printf("Draconic\n"); |
|
|
|
strlcat(output,"Draconic\r\n",512); |
|
|
|
} |
|
|
|
} |
|
|
|
if((DEEPSPEECH & languages) != 0){ |
|
|
|
if((DEEPSPEECH & languages) != 0){ |
|
|
|
printf("Deep Speech\n"); |
|
|
|
strlcat(output,"Deep Speech\r\n",512); |
|
|
|
} |
|
|
|
} |
|
|
|
if((INFERNAL & languages) != 0){ |
|
|
|
if((INFERNAL & languages) != 0){ |
|
|
|
printf("Infernal\n"); |
|
|
|
strlcat(output,"Infernal\r\n",512); |
|
|
|
} |
|
|
|
} |
|
|
|
if((PRIMORDIAL & languages) != 0){ |
|
|
|
if((PRIMORDIAL & languages) != 0){ |
|
|
|
printf("Primordial\n"); |
|
|
|
strlcat(output,"Primordial\r\n",512); |
|
|
|
} |
|
|
|
} |
|
|
|
if((SYLVAN & languages) != 0){ |
|
|
|
if((SYLVAN & languages) != 0){ |
|
|
|
printf("Sylvan\n"); |
|
|
|
strlcat(output,"Sylvan\r\n",512); |
|
|
|
} |
|
|
|
} |
|
|
|
if((UNDERCOMMON & languages) != 0){ |
|
|
|
if((UNDERCOMMON & languages) != 0){ |
|
|
|
printf("Undercommon\n"); |
|
|
|
strlcat(output,"Undercommon\r\n",512); |
|
|
|
} |
|
|
|
} |
|
|
|
if((DWARVISH & languages) != 0){ |
|
|
|
if((DWARVISH & languages) != 0){ |
|
|
|
printf("Dwarvish\n"); |
|
|
|
strlcat(output,"Dwarvish\r\n",512); |
|
|
|
} |
|
|
|
} |
|
|
|
if((ELVISH & languages) != 0){ |
|
|
|
if((ELVISH & languages) != 0){ |
|
|
|
printf("Elvish\n"); |
|
|
|
strlcat(output,"Elvish\r\n",512); |
|
|
|
} |
|
|
|
} |
|
|
|
if((GIANT & languages) != 0){ |
|
|
|
if((GIANT & languages) != 0){ |
|
|
|
printf("Giant\n"); |
|
|
|
strlcat(output,"Giant\r\n",512); |
|
|
|
} |
|
|
|
} |
|
|
|
if((GNOMISH & languages) != 0){ |
|
|
|
if((GNOMISH & languages) != 0){ |
|
|
|
printf("Gnome\n"); |
|
|
|
strlcat(output,"Gnome\r\n",512); |
|
|
|
} |
|
|
|
} |
|
|
|
if((GOBLIN & languages) != 0){ |
|
|
|
if((GOBLIN & languages) != 0){ |
|
|
|
printf("Goblin\n"); |
|
|
|
strlcat(output,"Goblin\r\n",512); |
|
|
|
} |
|
|
|
} |
|
|
|
if((HALFLISH & languages) != 0){ |
|
|
|
if((HALFLISH & languages) != 0){ |
|
|
|
printf("Halfling\n"); |
|
|
|
strlcat(output,"Halfling\r\n",512); |
|
|
|
} |
|
|
|
} |
|
|
|
if((ORC & languages) != 0){ |
|
|
|
if((ORC & languages) != 0){ |
|
|
|
printf("Orcish\n"); |
|
|
|
strlcat(output,"Orcish\r\n",512); |
|
|
|
} |
|
|
|
} |
|
|
|
printf("\nOther Profs: %s\n", otherprofs); |
|
|
|
strlcat(output,"\r\nOther Profs: ",512); |
|
|
|
return 1; |
|
|
|
strlcat(output,otherprofs,512); |
|
|
|
|
|
|
|
strlcat(output,"\r\n",512); |
|
|
|
|
|
|
|
return output; |
|
|
|
} |
|
|
|
} |
|
|
|