comparison xrogue/effects.c @ 239:837044d2c362

Merge the GCC5 and build fix branches. This fixes all warnings produced by GCC 5, except the ones related to system functions. Those could be fixed by including the proper headers, but it would be better to replace the system-dependent code with functions from mdport.c.
author John "Elwin" Edwards
date Fri, 11 Mar 2016 19:47:52 -0500
parents e1cd27c5464f
children
comparison
equal deleted inserted replaced
232:bac2c81fec78 239:837044d2c362
307 msg("The stench of %s sickens you. Blech!", 307 msg("The stench of %s sickens you. Blech!",
308 prname(attname, FALSE)); 308 prname(attname, FALSE));
309 if (on(player, HASSTINK)) lengthen(unstink, STINKTIME); 309 if (on(player, HASSTINK)) lengthen(unstink, STINKTIME);
310 else { 310 else {
311 turn_on(player, HASSTINK); 311 turn_on(player, HASSTINK);
312 fuse(unstink, (VOID *)NULL, STINKTIME, AFTER); 312 fuse(unstink, NULL, STINKTIME, AFTER);
313 } 313 }
314 } 314 }
315 } 315 }
316 316
317 /* 317 /*
321 if (on(*att, CANCHILL)) { 321 if (on(*att, CANCHILL)) {
322 if (!ISWEARING(R_SUSABILITY) && !save(VS_POISON, def, 0)) { 322 if (!ISWEARING(R_SUSABILITY) && !save(VS_POISON, def, 0)) {
323 msg("You cringe at %s's chilling touch.", 323 msg("You cringe at %s's chilling touch.",
324 prname(attname, FALSE)); 324 prname(attname, FALSE));
325 chg_str(-1); 325 chg_str(-1);
326 if (lost_str++ == 0) 326 if (lost_str++ == 0) {
327 fuse(res_strength, (VOID *)NULL, CHILLTIME, AFTER); 327 int temp_arg = 0;
328 fuse(res_strength, &temp_arg, CHILLTIME, AFTER);
329 }
328 else lengthen(res_strength, CHILLTIME); 330 else lengthen(res_strength, CHILLTIME);
329 } 331 }
330 } 332 }
331 333
332 /* 334 /*
357 player.t_ctype == C_RANGER) { 359 player.t_ctype == C_RANGER) {
358 msg("The wound heals quickly."); 360 msg("The wound heals quickly.");
359 } 361 }
360 else { 362 else {
361 turn_on(*def, HASDISEASE); 363 turn_on(*def, HASDISEASE);
362 fuse(cure_disease, (VOID *)NULL, roll(HEALTIME,SICKTIME), AFTER); 364 fuse(cure_disease, NULL, roll(HEALTIME,SICKTIME), AFTER);
363 msg(terse ? "You have been diseased!" 365 msg(terse ? "You have been diseased!"
364 : "You have contracted an annoying disease!"); 366 : "You have contracted an annoying disease!");
365 } 367 }
366 } 368 }
367 369
489 def->t_action != A_FREEZE && 491 def->t_action != A_FREEZE &&
490 !save(VS_MAGIC, def, -4)) { 492 !save(VS_MAGIC, def, -4)) {
491 turn_off(*att, CANDANCE); 493 turn_off(*att, CANDANCE);
492 turn_on(*def, ISDANCE); 494 turn_on(*def, ISDANCE);
493 msg("You begin to dance uncontrollably!"); 495 msg("You begin to dance uncontrollably!");
494 fuse(undance, (VOID *)NULL, roll(2,4), AFTER); 496 fuse(undance, NULL, roll(2,4), AFTER);
495 } 497 }
496 498
497 /* 499 /*
498 * Suffocating our hero. Monsters don't get suffocated. 500 * Suffocating our hero. Monsters don't get suffocated.
499 * That's too hard for now. 501 * That's too hard for now.
502 !ISWEARING(R_FREEDOM) && 504 !ISWEARING(R_FREEDOM) &&
503 rnd(100) < 30 && 505 rnd(100) < 30 &&
504 (find_slot(suffocate) == 0)) { 506 (find_slot(suffocate) == 0)) {
505 turn_on(*att, DIDSUFFOCATE); 507 turn_on(*att, DIDSUFFOCATE);
506 msg("%s is beginning to suffocate you!", prname(attname, TRUE)); 508 msg("%s is beginning to suffocate you!", prname(attname, TRUE));
507 fuse(suffocate, (VOID *)NULL, roll(9,3), AFTER); 509 fuse(suffocate, NULL, roll(9,3), AFTER);
508 } 510 }
509 511
510 /* 512 /*
511 * some creatures stops the poor guy from moving. 513 * some creatures stops the poor guy from moving.
512 * How can we do this to a monster? 514 * How can we do this to a monster?
546 msg("You smell an unpleasant odor. Phew!"); 548 msg("You smell an unpleasant odor. Phew!");
547 } 549 }
548 550
549 else { 551 else {
550 int odor_str = -(rnd(6)+1); 552 int odor_str = -(rnd(6)+1);
553 int temp_arg2 = 0;
551 554
552 msg("You are overcome by a foul odor!"); 555 msg("You are overcome by a foul odor!");
553 if (lost_str == 0) { 556 if (lost_str == 0) {
554 chg_str(odor_str); 557 chg_str(odor_str);
555 fuse(res_strength, (VOID *)NULL, SMELLTIME, AFTER); 558 fuse(res_strength, &temp_arg2, SMELLTIME, AFTER);
556 lost_str -= odor_str; 559 lost_str -= odor_str;
557 } 560 }
558 else lengthen(res_strength, SMELLTIME); 561 else lengthen(res_strength, SMELLTIME);
559 } 562 }
560 } 563 }