commit - a704cbeeb2bba3876c3b1fa6bc84185db93c02ec
commit + ad0031e7ce0d7fb149f4edde12cce981d72f755a
blob - ae0708741b8923c117fe7baafa41581ed261f4e8
blob + 36ca03c01350d6b561ed936bf84d370d8d8d6192
--- rolls.c
+++ rolls.c
}
void
-cmd_compel(char *stat)
+cmd_compel(char *cmd)
{
struct character *curchar = get_current_character();
+ char stat[MAX_STAT_LEN];
int ival[2] = { -1, -1 };
int ret;
return;
}
- if (strlen(stat) == 0) {
+ ret = get_args_from_cmd(cmd, stat, &ival[1]);
+ if (ret <= -10) {
info:
printf("Please specify the stat you'd like to use in this move\n\n");
printf("heart\t- You charm, pacify, barter, or convince\n");
printf("shadow\t- You lie or swindle\n");
printf("Example: compel iron\n");
return;
- }
+ } else if (ret <= -20)
+ return;
if (strcmp(stat, "iron") == 0) {
ival[0] = curchar->iron;
}
void
-cmd_secure_an_advantage(char *stat)
+cmd_secure_an_advantage(char *cmd)
{
struct character *curchar = get_current_character();
+ char stat[MAX_STAT_LEN];
int ival[2] = { -1, -1 };
int ret;
return;
}
- if (strlen(stat) == 0) {
+ ret = get_args_from_cmd(cmd, stat, &ival[1]);
+ if (ret <= -10) {
info:
printf("Please specify the stat you'd like to use in this move\n\n");
printf("edge\t- Act with speed, agility, or precision\n");
printf("wits\t- Act with expertise, insight, or observation\n\n");
printf("Example: secureanadvantage iron\n");
return;
- }
+ } else if (ret <= -20)
+ return;
if (strcmp(stat, "iron") == 0) {
ival[0] = curchar->iron;