initialise starting inventory and attributes this function can be run multiple times and will overwrite the effects of previous runs */
| 1370 | this function can be run multiple times and will overwrite the effects of |
| 1371 | previous runs */ |
| 1372 | void |
| 1373 | u_init_inventory_attrs(void) |
| 1374 | { |
| 1375 | gl.lastinvnr = 51; |
| 1376 | while (gi.invent) |
| 1377 | useupall(gi.invent); |
| 1378 | |
| 1379 | u.umoney0 = 0; |
| 1380 | u_init_role(); |
| 1381 | u_init_race(); |
| 1382 | |
| 1383 | if (discover) |
| 1384 | ini_inv(Wishing); |
| 1385 | |
| 1386 | if (u.umoney0) |
| 1387 | ini_inv(Money); |
| 1388 | u.umoney0 += hidden_gold(TRUE); /* in case sack has gold in it */ |
| 1389 | |
| 1390 | init_attr(75); /* init attribute values */ |
| 1391 | vary_init_attr(); /* minor variation to attrs */ |
| 1392 | u_init_carry_attr_boost(); |
| 1393 | } |
| 1394 | |
| 1395 | /* side effects of starting inventory (e.g. discovering it) and skills (both |
| 1396 | those based on role and those based on starting inventory) */ |
no test coverage detected