forked from github/server
Mantis 2552: rewrite goblin stealing to be more readable.
This commit is contained in:
parent
2e1bd01c54
commit
d03f2cdab6
21
src/steal.c
21
src/steal.c
|
@ -193,8 +193,17 @@ void steal_cmd(unit * u, struct order *ord, econ_request ** stealorders)
|
|||
n = effsk - max_skill(r, f, SK_PERCEPTION);
|
||||
|
||||
if (n <= 0) {
|
||||
/* Wahrnehmung == Tarnung */
|
||||
if (u_race(u) != get_race(RC_GOBLIN) || effsk <= 3) {
|
||||
/* Wenn Goblins mit einem Tarnungstalent von mindestens 4 klauen, bekommen
|
||||
* sie mindestens 50 Silber, selbst dann, wenn sie erwischt werden. */
|
||||
if (u_race(u) == get_race(RC_GOBLIN) && effsk >= 4) {
|
||||
ADDMSG(&u->faction->msgs, msg_message("stealfatal", "unit target", u,
|
||||
u2));
|
||||
ADDMSG(&u2->faction->msgs, msg_message("thiefdiscover", "unit target", u,
|
||||
u2));
|
||||
n = 1;
|
||||
goblin = true;
|
||||
}
|
||||
else {
|
||||
ADDMSG(&u->faction->msgs, msg_message("stealfail", "unit target", u, u2));
|
||||
if (n == 0) {
|
||||
ADDMSG(&u2->faction->msgs, msg_message("stealdetect", "unit", u2));
|
||||
|
@ -205,14 +214,6 @@ void steal_cmd(unit * u, struct order *ord, econ_request ** stealorders)
|
|||
}
|
||||
return;
|
||||
}
|
||||
else {
|
||||
ADDMSG(&u->faction->msgs, msg_message("stealfatal", "unit target", u,
|
||||
u2));
|
||||
ADDMSG(&u2->faction->msgs, msg_message("thiefdiscover", "unit target", u,
|
||||
u2));
|
||||
n = 1;
|
||||
goblin = true;
|
||||
}
|
||||
}
|
||||
|
||||
i = i_get(u->items, rring->itype);
|
||||
|
|
Loading…
Reference in New Issue