|
View:
New views
1 Messages
—
Rating Filter:
Alert me
|
|
|
[ 949005 ] [C343-10] Vampires can drain corpses in pitI was looking at this (http://sourceforge.net/tracker/index.php?func=detail&aid=949005&group_id=9746&atid=109746) bug and did a bit of coding for it. I made some additions such that if you are flying you should be able to use the '>' key to fly into the pit with no damage. At which point you can pick up objects which are in the pit. I have tested it using an amulet of flying with a pit that I make (I don't know how to make a spiked pit, or how to generate a pit such that it isn't mine) but it seemed to work, I would fly over it as normal until I pressed the > key at which point I would fly into it. the < key will not take me out of the pit but any of the 8 standard direction keys will take me out of the pit (I fly above the pit, not in that direction, the next move I make will actually move me away from the pit).
here are the additions I made: --- ../../../slashem-0.0.8E0/src/do.c 2005-07-02 00:31:37.000000000 -0700 +++ ./do.c 2006-11-29 15:41:12.000000000 -0800 @@ -824,6 +824,14 @@ "ladder" : surface(u.ux, u.uy)); return (0); /* didn't move */ } + + if (Flying && (trap = t_at(u.ux,u.uy)) && !In_sokoban(&u.uz)) { + if (trap->ttyp == PIT || trap->ttyp == SPIKED_PIT) { + dotrapfly(trap); + return(0); + } + } + if (!stairs_down && !ladder_down) { if (!(trap = t_at(u.ux,u.uy)) || (trap->ttyp != TRAPDOOR && trap->ttyp != HOLE) and to trap.c : --- ../../../slashem-0.0.8E0/src/trap.c 2005-07-02 00:31:37.000000000 -0700 +++ ./trap.c 2006-11-29 15:43:02.000000000 -0800 @@ -587,6 +587,46 @@ #endif /*STEED*/ void +dotrapfly(trap) +register struct trap *trap; +{ + register int ttype = trap->ttyp; + + nomul(0); + + switch(ttype) { + case PIT: + case SPIKED_PIT: + seetrap(trap); + + if (!In_sokoban(&u.uz)) { + char verbbuf[BUFSZ]; + + Strcpy(verbbuf,"fly"); + You("%s into %s pit!", verbbuf, a_your[trap->madeby_u]); + } + /* wumpus reference */ + if (Role_if(PM_RANGER) && !trap->madeby_u && !trap->once && + In_quest(&u.uz) && Is_qlocate(&u.uz)) { + pline("Fortunately it has a bottom after all..."); + trap->once = 1; + } else if (u.umonnum == PM_PIT_VIPER || + u.umonnum == PM_PIT_FIEND) + pline("How pitiful. Isn't that the pits?"); + if (ttype == SPIKED_PIT) { + const char *predicament = "above the set of sharp iron spikes"; + + You("stop %s!", predicament); + } + if (!Passes_walls) + u.utrap = rn1(6,2); + u.utraptype = TT_PIT; + + break; + } +} + +void dotrap(trap, trflags) register struct trap *trap; unsigned trflags; I did my best to remove everything that wasn't nessary from the function I added to trap.c but there were some things that I couldn't figure out what they did. namely nomul(0). And this doesn't fix that you can eat things at the bottom of a pit which you cannot reach. But I thought I would submit it anyways. Cheers, Michael DiPietro
Everyone is raving about the all-new Yahoo! Mail beta. ------------------------------------------------------------------------- Take Surveys. Earn Cash. Influence the Future of IT Join SourceForge.net's Techsay panel and you'll get the chance to share your opinions on IT & business topics through brief surveys - and earn cash http://www.techsay.com/default.php?page=join.php&p=sourceforge&CID=DEVDEV _______________________________________________ Slashem-devel mailing list Slashem-devel@... https://lists.sourceforge.net/lists/listinfo/slashem-devel |
| Free embeddable forum powered by Nabble | Forum Help |