… | |
… | |
1378 | update_all_los (env->map, env->x, env->y); |
1378 | update_all_los (env->map, env->x, env->y); |
1379 | } |
1379 | } |
1380 | } |
1380 | } |
1381 | |
1381 | |
1382 | /* |
1382 | /* |
1383 | * Returns true if the given player is a legal class. |
|
|
1384 | * The function to add and remove class-bonuses to the stats doesn't |
|
|
1385 | * check if the stat becomes negative, thus this function |
|
|
1386 | * merely checks that all stats are 1 or more, and returns |
|
|
1387 | * false otherwise. |
|
|
1388 | */ |
|
|
1389 | int |
|
|
1390 | allowed_class (const object *op) |
|
|
1391 | { |
|
|
1392 | return op->stats.Dex > 0 |
|
|
1393 | && op->stats.Str > 0 |
|
|
1394 | && op->stats.Con > 0 |
|
|
1395 | && op->stats.Int > 0 |
|
|
1396 | && op->stats.Wis > 0 |
|
|
1397 | && op->stats.Pow > 0 |
|
|
1398 | && op->stats.Cha > 0; |
|
|
1399 | } |
|
|
1400 | |
|
|
1401 | /* |
|
|
1402 | * set the new dragon name after gaining levels or |
1383 | * set the new dragon name after gaining levels or |
1403 | * changing ability focus (later this can be extended to |
1384 | * changing ability focus (later this can be extended to |
1404 | * eventually change the player's face and animation) |
1385 | * eventually change the player's face and animation) |
1405 | */ |
1386 | */ |
1406 | void |
1387 | void |