diff --git a/src/give.c b/src/give.c index 4f8417bf2..d1a9d75f4 100644 --- a/src/give.c +++ b/src/give.c @@ -227,7 +227,7 @@ static bool can_give_men(const unit *u, const unit *dst, order *ord, message **m if (unit_has_cursed_item(u)) { if (msg) *msg = msg_error(u, ord, 78); } - else if (dst && (has_skill(u, SK_MAGIC) && dst->number > 0)) { + else if (has_skill(u, SK_MAGIC)) { /* cannot give units to and from magicians */ if (msg) *msg = msg_error(u, ord, 158); } diff --git a/src/kernel/unit.c b/src/kernel/unit.c index f92916b2f..2f38a0836 100644 --- a/src/kernel/unit.c +++ b/src/kernel/unit.c @@ -1245,24 +1245,6 @@ static int item_invis(const unit *u) { + (rsphere ? i_get(u->items, rsphere->itype) * 100 : 0); } -#ifdef NEWATSROI -static int item_modification(const unit * u, skill_t sk, int val) -{ - if (sk == SK_STEALTH) { - if (item_invis(u) >= u->number) { - val += ROIBONUS; - } - } - if (sk == SK_PERCEPTION) { - const struct resource_type *rtype = get_resourcetype(R_AMULET_OF_TRUE_SEEING); - if (i_get(u->items, rtype->itype) >= u->number) { - val += ATSBONUS; - } - } - return val; -} -#endif - static int att_modification(const unit * u, skill_t sk) { double result = 0; @@ -1335,11 +1317,6 @@ int get_modifier(const unit * u, skill_t sk, int level, const region * r, bool n skill += rc_skillmod(u_race(u), r, sk); skill += att_modification(u, sk); -#ifdef NEWATSROI - if (!noitem) { - skill = item_modification(u, sk, skill); - } -#endif skill = skillmod(u->attribs, u, r, sk, skill, SMF_ALWAYS); if (fval(u, UFL_HUNGER)) { @@ -1382,9 +1359,6 @@ int effskill_study(const unit * u, skill_t sk, const region * r) int invisible(const unit * target, const unit * viewer) { -#ifdef NEWATSROI - return 0; -#else if (viewer && viewer->faction == target->faction) return 0; else { @@ -1398,7 +1372,6 @@ int invisible(const unit * target, const unit * viewer) } return hidden; } -#endif } /** remove the unit from memory.