Skip to content
Open
Show file tree
Hide file tree
Changes from all commits
Commits
File filter

Filter by extension

Filter by extension

Conversations
Failed to load comments.
Loading
Jump to
Jump to file
Failed to load files.
Loading
Diff view
Diff view
30 changes: 26 additions & 4 deletions src/act.offensive.cpp
Original file line number Diff line number Diff line change
Expand Up @@ -1410,14 +1410,36 @@ ACMD(do_eye_gouge) {
if (CONFUSED(ch))
vict = random_attack_target(ch, vict, true);

percent = random_number(1, 101);
prob = GET_SKILL(ch, SKILL_EYE_GOUGE);
int thac0_01 = 25;
int thac0_00 = classes[(int)GET_CLASS(ch)].thac0;
int thac0 = (calc_thac0(GET_LEVEL(ch), thac0_01, thac0_00) * 10);
thac0 -= stat_bonus[GET_DEX(ch)].tohit * 10;
thac0 -= GET_HITROLL(ch);
thac0 -= GET_SKILL(ch, SKILL_EYE_GOUGE) / 2;
thac0 -= stat_bonus[GET_DEX(ch)].rogue_skills;

int diceroll = random_number(1, 200);

int victim_ac = GET_AC(vict) + stat_bonus[GET_DEX(vict)].defense * 10;
victim_ac = std::min(100, victim_ac);

bool success;
if (diceroll > 190 || !AWAKE(vict))
success = true;
else if (diceroll < 11)
success = false;
else
success = thac0 - diceroll <= victim_ac;

success = success && !parry(ch, vict);
success = success && !dodge(ch, vict);

WAIT_STATE(ch, (PULSE_VIOLENCE * 3) / 2);
if (displaced(ch, vict))
return;
if (percent > prob && AWAKE(vict))
if (!success) {
damage(ch, vict, 0, SKILL_EYE_GOUGE); /* Miss message */
else if (damage_evasion(vict, ch, 0, DAM_PIERCE)) {
} else if (damage_evasion(vict, ch, 0, DAM_PIERCE)) {
act(EVASIONCLR "Your thumbs poke harmlessly at $N" EVASIONCLR ". If $E even has eyes.&0", false, ch, 0, vict,
TO_CHAR);
act(EVASIONCLR "$n" EVASIONCLR " tries poking at $N's eyes, but nothing seems to happen.&0", false, ch, 0, vict,
Expand Down
5 changes: 4 additions & 1 deletion src/fight.hpp
Original file line number Diff line number Diff line change
Expand Up @@ -49,6 +49,9 @@ void die(CharData *ch, CharData *killer);
bool skill_message(int dam, CharData *ch, CharData *vict, int attacktype, bool death);
int damage(CharData *ch, CharData *victim, int dam, int attacktype);
void hit(CharData *ch, CharData *victim, int type);
bool dodge(CharData *ch, CharData *victim);
bool parry(CharData *ch, CharData *victim);
bool riposte(CharData *ch, CharData *victim);
void perform_violence(void);
void pickup_dropped_weapon(CharData *ch);
int blessed_blow(CharData *ch, ObjData *weapon);
Expand All @@ -61,4 +64,4 @@ bool displaced(CharData *ch, CharData *victim);

/* Structures */
extern CharData *combat_list;
extern CharData *next_combat_list;
extern CharData *next_combat_list;