forked from github/server
Die Menge des zu verdienenden Silbers ist falsch berechnet, enn mehr als eine Einheit unterhält.
This commit is contained in:
parent
be72363b0d
commit
50b6823e28
|
@ -2647,7 +2647,7 @@ expandentertainment(region * r)
|
|||
change_money(u, u->n);
|
||||
rsetmoney(r, rmoney(r) - u->n);
|
||||
m -= u->n;
|
||||
entertaining -= u->n;
|
||||
entertaining -= o->qty;
|
||||
|
||||
/* Nur soviel PRODUCEEXP wie auch tatsächlich gemacht wurde */
|
||||
produceexp(u, SK_ENTERTAINMENT, min(u->n, u->number));
|
||||
|
|
|
@ -318,27 +318,7 @@ unit_setmagic(unit& u, const char * type)
|
|||
static void
|
||||
unit_addorder(unit& u, const char * str)
|
||||
{
|
||||
char buf[1024];
|
||||
char * s = buf;
|
||||
boolean quote = false;
|
||||
order * ord;
|
||||
|
||||
while (*str) {
|
||||
switch (*str) {
|
||||
case '"':
|
||||
quote=!quote;
|
||||
break;
|
||||
case ' ':
|
||||
if (quote) *s++ = SPACE_REPLACEMENT;
|
||||
else *s++ = ' ';
|
||||
break;
|
||||
default:
|
||||
*s++ = *str;
|
||||
}
|
||||
++str;
|
||||
}
|
||||
*s=0;
|
||||
ord = parse_order(buf, u.faction->locale);
|
||||
order * ord = parse_order(str, u.faction->locale);
|
||||
addlist(&u.orders, ord);
|
||||
u.faction->lastorders = turn;
|
||||
}
|
||||
|
|
|
@ -155,7 +155,28 @@ function test_monsters()
|
|||
process_orders()
|
||||
end
|
||||
|
||||
test_monsters()
|
||||
function test_parser()
|
||||
-- this script tests the changes to quotes
|
||||
|
||||
plain = terraform(0, 0, "plain")
|
||||
skill = 5
|
||||
|
||||
f = add_faction("enno@eressea.de", "human", "de")
|
||||
f.age = 20
|
||||
u = add_unit(f, plain)
|
||||
u.number = 10
|
||||
u:clear_orders()
|
||||
u:add_order("Nummer Partei test")
|
||||
u:add_order("BENENNE PARTEI \"Diese Partei heisst \\\"Enno's Schergen\\\".\"")
|
||||
u:add_order("BENENNE EINHEIT \"Mein Name ist \\\"Enno\\\".\"")
|
||||
|
||||
process_orders()
|
||||
write_reports()
|
||||
write_game("parser")
|
||||
end
|
||||
|
||||
test_parser()
|
||||
-- test_monsters()
|
||||
-- test_combat()
|
||||
-- test_rewards()
|
||||
-- test_give()
|
||||
|
|
Loading…
Reference in New Issue