Not a member of Pastebin yet?
Sign Up,
it unlocks many cool features!
- void strike(void) {
- int x, blok2;
- printf("Where you want to hit?\n\n");
- printf("(0) blow to the head\n");
- printf("(1) punch in the stomach\n");
- printf("(2) hit in the legs\n\n");
- scanf("%d", &x);
- srand(time(0));
- blok2 = rand() %3;
- if (x == blok2) {
- printf("You do not hit\n\n");
- }
- else if ((x > 2) || (x < 0)){
- printf("*MORTAL COMBAT*\n");
- }
- else {
- printf("You have got! - %d HP\n\n", power);
- enemy_hp = enemy_hp - power;
- }
- }
Add Comment
Please, Sign In to add comment