From 7b8951b6e8e9bc0a4bbf2b54ab5e9e149c61f80f Mon Sep 17 00:00:00 2001 From: Enno Rehling Date: Thu, 11 Jan 2018 16:47:22 +0100 Subject: [PATCH] kill the fleechance attribute --- src/attributes/CMakeLists.txt | 1 - src/attributes/attributes.c | 1 - src/battle.c | 10 ++++++---- src/items.c | 5 +++-- 4 files changed, 9 insertions(+), 8 deletions(-) diff --git a/src/attributes/CMakeLists.txt b/src/attributes/CMakeLists.txt index 8be9dc7ff..fb077cfe9 100644 --- a/src/attributes/CMakeLists.txt +++ b/src/attributes/CMakeLists.txt @@ -7,7 +7,6 @@ otherfaction.test.c SET(_FILES attributes.c -fleechance.c follow.c hate.c iceberg.c diff --git a/src/attributes/attributes.c b/src/attributes/attributes.c index 8ea24dddd..a5911200c 100644 --- a/src/attributes/attributes.c +++ b/src/attributes/attributes.c @@ -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" diff --git a/src/battle.c b/src/battle.c index fa4038b14..ab5fa2ca1 100644 --- a/src/battle.c +++ b/src/battle.c @@ -55,7 +55,6 @@ OR IN CONNECTION WITH THE USE OR PERFORMANCE OF THIS SOFTWARE. /* attributes includes */ #include -#include #include #include #include @@ -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�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) { diff --git a/src/items.c b/src/items.c index c62b1240f..94afd8ca1 100644 --- a/src/items.c +++ b/src/items.c @@ -11,8 +11,6 @@ #include "economy.h" #include "magic.h" -#include - #include #include #include @@ -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));