]> git.pond.sub.org Git - empserver/blobdiff - src/lib/subs/mslsub.c
Update copyright notice
[empserver] / src / lib / subs / mslsub.c
index a8a5ddecbeff4970b50f2a46a41be4132490405f..69b06a9541c734af1093f2576e76270e89c2c9a7 100644 (file)
@@ -1,6 +1,6 @@
 /*
  *  Empire - A multi-player, client/server Internet based war game.
- *  Copyright (C) 1986-2013, Dave Pare, Jeff Bailey, Thomas Ruschak,
+ *  Copyright (C) 1986-2015, Dave Pare, Jeff Bailey, Thomas Ruschak,
  *                Ken Stevens, Steve McClure, Markus Armbruster
  *
  *  Empire is free software: you can redistribute it and/or modify
@@ -35,6 +35,7 @@
 #include <config.h>
 
 #include <stdlib.h>
+#include "chance.h"
 #include "file.h"
 #include "misc.h"
 #include "nat.h"
@@ -162,7 +163,7 @@ msl_hit(struct plnstr *pp, int hardtarget, int type,
        hit = 1;
     } else {
        hitchance = pln_hitchance(pp, hardtarget, type);
-       hit = (roll(100) <= hitchance);
+       hit = pct_chance(hitchance);
        mpr(pp->pln_own, "\t%d%% hitchance...%s\n", hitchance,
            hit ? "HIT!" : "miss");
     }