kill the fleechance attribute

This commit is contained in:
Enno Rehling 2018-01-11 16:47:22 +01:00
parent f1b70aca6f
commit 7b8951b6e8
4 changed files with 9 additions and 8 deletions

View File

@ -7,7 +7,6 @@ otherfaction.test.c
SET(_FILES
attributes.c
fleechance.c
follow.c
hate.c
iceberg.c

View File

@ -25,7 +25,6 @@ OR IN CONNECTION WITH THE USE OR PERFORMANCE OF THIS SOFTWARE.
/* attributes includes */
#include "follow.h"
#include "fleechance.h"
#include "hate.h"
#include "iceberg.h"
#include "key.h"

View File

@ -55,7 +55,6 @@ OR IN CONNECTION WITH THE USE OR PERFORMANCE OF THIS SOFTWARE.
/* attributes includes */
#include <attributes/key.h>
#include <attributes/fleechance.h>
#include <attributes/racename.h>
#include <attributes/otherfaction.h>
#include <attributes/moved.h>
@ -2330,7 +2329,6 @@ static double horse_fleeing_bonus(const unit * u)
double fleechance(unit * u)
{
double c = 0.20; /* Fluchtwahrscheinlichkeit in % */
attrib *a = a_find(u->attribs, &at_fleechance);
/* Einheit u versucht, dem Get<65>mmel zu entkommen */
c += (effskill(u, SK_STEALTH, 0) * 0.05);
@ -2343,11 +2341,12 @@ double fleechance(unit * u)
else {
c = fmin(c, 0.75);
}
#if 0
/* TODO: mistletoe */
if (a) {
c += a->data.flt;
}
#endif
return c;
}
@ -3362,6 +3361,8 @@ static int join_battle(battle * b, unit * u, bool attack, fighter ** cp)
fighter *c = NULL;
if (!attack) {
#if 0
/* TODO: mistletoe */
attrib *a = a_find(u->attribs, &at_fleechance);
if (a != NULL) {
if (rng_double() <= a->data.flt) {
@ -3369,6 +3370,7 @@ static int join_battle(battle * b, unit * u, bool attack, fighter ** cp)
return false;
}
}
#endif
}
for (s = b->sides; s != b->sides + b->nsides; ++s) {

View File

@ -11,8 +11,6 @@
#include "economy.h"
#include "magic.h"
#include <attributes/fleechance.h>
#include <spells/shipcurse.h>
#include <spells/unitcurse.h>
#include <spells/regioncurse.h>
@ -387,7 +385,10 @@ use_mistletoe(struct unit *user, const struct item_type *itype, int amount,
}
use_pooled(user, itype->rtype, GET_SLACK | GET_RESERVE | GET_POOLED_SLACK,
user->number);
#if 0
/* TODO: mistletoe */
a_add(&user->attribs, make_fleechance((float)1.0));
#endif
ADDMSG(&user->faction->msgs,
msg_message("use_item", "unit item", user, itype->rtype));