Created
April 24, 2015 01:00
-
-
Save Chris-plus-alphanumericgibberish/f2b67fe3a76ccd1fbd69 to your computer and use it in GitHub Desktop.
Extra attack vs a monster
This file contains bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters
STATIC_OVL boolean | |
hitum(mon, tmp, uattk) /* returns TRUE if monster still lives */ | |
struct monst *mon; | |
int tmp; | |
struct attack *uattk; | |
{ | |
boolean malive; | |
int mhit = (tmp > (dieroll = rnd(20)) || u.uswallow); | |
if(mhit && is_displacer(mon->data) && rn2(2)){ | |
You("hit a displaced image!"); | |
return TRUE; | |
} | |
if(tmp > dieroll) exercise(A_DEX, TRUE); | |
malive = known_hitum(mon, &mhit, uattk); | |
(void) passive(mon, mhit, malive, AT_WEAP); | |
if(u.sealsActive&SEAL_MARIONETTE && uwep){ | |
struct monst *m2 = m_at(mon->mx+u.dx,mon->my+u.dy); | |
if(!m2 || DEADMONSTER(m2) || m2==mon) return(malive); | |
int mhit = (tmp > (dieroll = rnd(20)) || u.uswallow); | |
if(tmp > dieroll) exercise(A_DEX, TRUE); | |
(void) passive(m2, mhit, known_hitum(m2, &mhit, uattk), AT_WEAP); | |
} | |
return(malive); | |
} |
Sign up for free
to join this conversation on GitHub.
Already have an account?
Sign in to comment