|
Atrinik Server 2.5
|
#include <global.h>Go to the source code of this file.
Defines | |
| #define | MAX_EXPERIENCE new_levels[MAXLEVEL] |
| #define | MAX_EXP_IN_OBJ new_levels[MAXLEVEL] / (MAX_EXP_CAT - 1) |
Functions | |
| uint64 | level_exp (int level, double expmul) |
| sint64 | add_exp (object *op, sint64 exp, int skill_nr, int exact) |
| void | player_lvl_adj (object *who, object *op) |
| sint64 | adjust_exp (object *pl, object *op, sint64 exp) |
| void | apply_death_exp_penalty (object *op) |
| float | calc_level_difference (int who_lvl, int op_lvl) |
| uint64 | calculate_total_exp (object *op) |
Variables | |
| uint64 | new_levels [MAXLEVEL+2] |
| _level_color | level_color [201] |
Experience management.
Definition in file exp.c.
| #define MAX_EXPERIENCE new_levels[MAXLEVEL] |
| sint64 add_exp | ( | object * | op, |
| sint64 | exp, | ||
| int | skill_nr, | ||
| int | exact | ||
| ) |
Make sure that we don't exceed max or min set on experience.
This function also adjusts skill category experience, and overall player experience based on the skill category that has the most experience.
| pl | Player. |
| op | Skill object. |
| exp | Experience. |
| void apply_death_exp_penalty | ( | object * | op | ) |
| float calc_level_difference | ( | int | who_lvl, |
| int | op_lvl | ||
| ) |
Calculate level difference.
We will get a bonus or malus value here, unless both levels match.
Yellow does not always mean same level, but in equal range.
Experience multiplication based on target color range:
If the target is in yellow range, the experience multiplication is between 0.8 and 1.1 (80% - 110%).
If the target is in blue range, the experience
| who_lvl | Player. |
| op_lvl | Victim. |
| uint64 calculate_total_exp | ( | object * | op | ) |
| uint64 level_exp | ( | int | level, |
| double | expmul | ||
| ) |
| _level_color level_color[201] |
| uint64 new_levels[MAXLEVEL+2] |
{
0, 0, 1500, 4000, 8000,
16000, 32000, 64000, 125000, 250000,
500000, 1100000, 2300000, 3600000, 5000000,
6500000, 8100000, 9800000, 11600000, 13500000,
15500000, 17600000, 19800000, 22100000, 24500000,
27000000, 29600000, 32300000, 35100000, 38000000,
41000000, 44100000, 47300000, 50600000, 54000000,
57500000, 61100000, 64800000, 68600000, 72500000,
76500000, 80600000, 84800000, 89100000, 93500000,
98000000, 102600000, 107300000, 112100000, 117000000,
122000000, 127100000, 132300000, 137600000, 143000000,
148500000, 154100000, 159800000, 165600000, 171500000,
177500000, 183600000, 189800000, 196100000, 202500000,
209000000, 215600000, 222300000, 229100000, 236000000,
243000000, 250100000, 257300000, 264600000, 272000000,
280200000, 294800000, 310200000, 326300000, 343200000,
361000000, 379700000, 399300000, 419900000, 441500000,
464200000, 488100000, 513100000, 539400000, 567000000,
596000000, 626400000, 658300000, 691900000, 727100000,
764100000, 802900000, 843700000, 886500000, 931500000,
978700000, 1028200000, 1080300000, 1134900000, 1192300000,
1252500000, 1315800000, 1382200000, 1451900000, 1525100000,
2100000000ULL, 4200000000ULL, 8400000000ULL, 16800000000ULL, 33600000000ULL,
67200000000ULL, 134400000000ULL
}
Experience needed for each level.
Around level 11 you need to kill 38 + (2 * (your_level - 11)) yellow monsters with a base exp of 125 to level up.
1.7.4