From 9a4b7459396c46f429fb3094d0242844618e60f6 Mon Sep 17 00:00:00 2001 From: Allanis Date: Mon, 10 Mar 2014 01:17:33 +0000 Subject: [PATCH] [Change] Tweaked the boarding messages and chances somewhat. --- src/board.c | 9 +++++---- 1 file changed, 5 insertions(+), 4 deletions(-) diff --git a/src/board.c b/src/board.c index 3888827..529aa99 100644 --- a/src/board.c +++ b/src/board.c @@ -168,17 +168,18 @@ static int board_fail(unsigned int wdw) { p = pilot_get(player->target); /* Fail chance. */ - if(RNG(0, 100) > (int)(50. * - (10. + (double)p->ship->crew/10.+(double)player->ship->crew))) + if(RNGF() > (0.5 * + (10. + (double)p->ship->crew/10.+(double)player->ship->crew))) return 0; - if(RNG(0, 2)==0) { + if(RNGF() < 0.4) { /* 40% of instadeath! */ /* 33% of instant death. */ p->armour = -1; player_message("You have tripped the ship's self destruct mechanism!"); } else /* You just got locked out!! */ - player_message("The ship's security system locks you out!"); + player_message("The ship's security system locks %s out!", + (player->ship->crew > 0) ? "your crew" : "you"); board_exit(wdw, NULL); return 1;