View Single Post
Old December 30, 2020, 18:14   #4
wobbly
Prophet
 
Join Date: May 2012
Location: Adelaide, Australia
Posts: 2,584
wobbly will become famous soon enough
Quote:
Originally Posted by DavidMedley View Post
Good point... Lots of status effects hurt your device skill.
witness the insanity:

} else if (player_timed_grade_eq(p, TMD_FOOD, "Weak")) {
int badness = 15 - (player->timed[TMD_FOOD] * 10) / PY_FOOD_WEAK;
state->to_h -= badness;
state->to_d -= badness;
state->skills[SKILL_DEVICE] = state->skills[SKILL_DEVICE] * 9 / 10;

} else if (player_timed_grade_eq(p, TMD_FOOD, "Faint")) {
int badness = 20 - (player->timed[TMD_FOOD] * 10) / PY_FOOD_FAINT;
state->to_h -= badness;
state->to_d -= badness;
state->skills[SKILL_DEVICE] = state->skills[SKILL_DEVICE] * 8 / 10;

} else if (player_timed_grade_eq(p, TMD_FOOD, "Starving")) {
int badness = 28 - (player->timed[TMD_FOOD] * 10) / PY_FOOD_STARVE;
state->to_h -= badness;
state->to_d -= badness;
state->skills[SKILL_DEVICE] = state->skills[SKILL_DEVICE] * 7 / 10;

if (player_timed_grade_eq(p, TMD_STUN, "Heavy Stun")) {
state->to_h -= 20;
state->to_d -= 20;
state->skills[SKILL_DEVICE] = state->skills[SKILL_DEVICE] * 8 / 10;
} else if (player_timed_grade_eq(p, TMD_STUN, "Stun")) {
state->to_h -= 5;
state->to_d -= 5;
state->skills[SKILL_DEVICE] = state->skills[SKILL_DEVICE] * 9 / 10;
}

if (p->timed[TMD_BLESSED]) {
state->to_a += 5;
state->to_h += 10;
state->skills[SKILL_DEVICE] = state->skills[SKILL_DEVICE] * 105 / 100;
}

if (p->timed[TMD_HERO]) {
of_on(state->flags, OF_PROT_FEAR);
state->to_h += 12;
state->skills[SKILL_DEVICE] = state->skills[SKILL_DEVICE] * 105 / 100;
}

if (p->timed[TMD_SHERO]) {
of_on(state->flags, OF_PROT_FEAR);
state->to_h += 24;
state->to_a -= 10;
state->skills[SKILL_DEVICE] = state->skills[SKILL_DEVICE] * 9 / 10;
}

if (p->timed[TMD_CONFUSED]) {
state->skills[SKILL_DEVICE] = state->skills[SKILL_DEVICE] * 75 / 100;
}
if (p->timed[TMD_AMNESIA]) {
state->skills[SKILL_DEVICE] = state->skills[SKILL_DEVICE] * 8 / 10;
}
if (p->timed[TMD_POISONED]) {
state->skills[SKILL_DEVICE] = state->skills[SKILL_DEVICE] * 95 / 100;
}
if (p->timed[TMD_IMAGE]) {
state->skills[SKILL_DEVICE] = state->skills[SKILL_DEVICE] * 8 / 10;
}

if (of_has(state->flags, OF_AFRAID)) {
state->to_h -= 20;
state->to_a += 8;
state->skills[SKILL_DEVICE] = state->skills[SKILL_DEVICE] * 95 / 100;
}
wobbly is offline   Reply With Quote