|
View:
New views
2 Messages
—
Rating Filter:
Alert me
|
|
|
[ 1482524 ] alchemy with gain level asymmetricHoudy, I was working on this (http://sourceforge.net/tracker/index.php?func=detail&aid=1482524&group_id=9746&atid=109746) bug, and I think I found the problem. It looks like the check for seeing if an object would be upgraded by dipping it into a potion of gain level was catching anything that is dipped into the potion (such that if a potion of full healing were dipped in it, it would never get to that section of code because it would cut out before it could run it.) I just moved the upgrade section down below the part that checks for potions (I put it next to the part that check for dipping in oil, it seemed approperate). Here is the output of diff -u on the files.
--- slashem-0.0.8E0/src/potion.c 2005-07-02 00:31:37.000000000 -0700 +++ potion.c 2006-11-28 11:42:05.000000000 -0800 @@ -2751,26 +2751,7 @@ * Give out name of new object and allow user to name the potion */ /* KMH, balance patch -- idea by Dylan O'Donnell <dylanw@...> */ - else if (potion->otyp == POT_GAIN_LEVEL) { - res = upgrade_obj(obj); - - if (res != 0) { - - if (res == 1) { - /* The object was upgraded */ - pline("Hmm! You don't recall dipping that into the potion."); - prinv((char *)0, obj, 0L); - } /* else potion exploded */ - if (!objects[potion->otyp].oc_name_known && - !objects[potion->otyp].oc_uname) - docall(potion); - useup(potion); - update_inventory(); - exercise(A_WIS, TRUE); - return(1); - } - /* no return here, go for Interesting... message */ - } else if (obj->otyp == POT_POLYMORPH || + else if (obj->otyp == POT_POLYMORPH || potion->otyp == POT_POLYMORPH) { /* some objects can't be polymorphed */ if (obj->otyp == potion->otyp || /* both POT_POLY */ @@ -2881,6 +2862,7 @@ useup(potion); return(1); } + #ifdef INVISIBLE_OBJECTS if (!always_visible(obj)) { if (potion->otyp == POT_INVISIBILITY && !obj->oinvis) { @@ -2987,6 +2969,27 @@ return 1; } + else if (potion->otyp == POT_GAIN_LEVEL) { + res = upgrade_obj(obj); + + if (res != 0) { + + if (res == 1) { + /* The object was upgraded */ + pline("Hmm! You don't recall dipping that into the potion."); + prinv((char *)0, obj, 0L); + } /* else potion exploded */ + if (!objects[potion->otyp].oc_name_known && + !objects[potion->otyp].oc_uname) + docall(potion); + useup(potion); + update_inventory(); + exercise(A_WIS, TRUE); + return(1); + } + /* no return here, go for Interesting... message */ + } + /* KMH, balance patch -- acid affects damage(proofing) */ if (potion->otyp == POT_ACID && (obj->oclass == ARMOR_CLASS || obj->oclass == WEAPON_CLASS || is_weptool(obj))) { I tried it out (I tested dipping the potion of full healing into the potion of gain level, and the other way around. Both resulted in a diluted potion of gain ability. Also I tried dipping a fedora into a potion of gain level and it gave me the "you don't remember dipping this..." message.) and it seemed to work for me. Thanks, Michael DiPietro
Check out the all-new Yahoo! Mail beta - Fire up a more powerful email and get things done faster. ------------------------------------------------------------------------- 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 |
|
|
Re: [ 1482524 ] alchemy with gain level asymmetricOn 2006-11-28 07:55:43 PM, likeyou dontknow wrote:
[snip] > I tried it out (I tested dipping the potion of full healing into the > potion of gain level, and the other way around. Both resulted in a > diluted potion of gain ability. Also I tried dipping a fedora into a > potion of gain level and it gave me the "you don't remember dipping > this..." message.) and it seemed to work for me. Thanks, Michael. I've committed this fix. Cheers, Ali. ------------------------------------------------------------------------- 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 |