Commit Diff


commit - a704cbeeb2bba3876c3b1fa6bc84185db93c02ec
commit + ad0031e7ce0d7fb149f4edde12cce981d72f755a
blob - ae0708741b8923c117fe7baafa41581ed261f4e8
blob + 36ca03c01350d6b561ed936bf84d370d8d8d6192
--- rolls.c
+++ rolls.c
@@ -456,9 +456,10 @@ info:
 }
 
 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;
 
@@ -467,7 +468,8 @@ cmd_compel(char *stat)
 		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");
@@ -475,7 +477,8 @@ info:
 		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;
@@ -498,9 +501,10 @@ info:
 }
 
 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;
 
@@ -509,7 +513,8 @@ cmd_secure_an_advantage(char *stat)
 		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");
@@ -519,7 +524,8 @@ info:
 		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;