/*
* 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
#include <config.h>
#include <stdlib.h>
+#include "chance.h"
#include "file.h"
#include "misc.h"
#include "nat.h"
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");
}