advice on coding change concerning altar destruction
Posted: Wednesday, 6th April 2016, 15:32
This is a question for those very familiar with the crawl code base:
I want to make a change that allows players to destroy altars, giving the player a boost of experience, but invoking wrath on the player at the same time. It could be done with a new command, but probably would be easier to just use a wand of destruction. I'm thinking of inserting into the beam finalization code the check to see if the target is an altar, and if so, call the altar destruction function. It feels like feature and/or altar destruction may have existed in crawls long dark past (or maybe I'm thinking of nethack?), so if there is already code in there somewhere that supports what I'm trying to do that would be nice.
Any ideas would be appreciated.
I want to make a change that allows players to destroy altars, giving the player a boost of experience, but invoking wrath on the player at the same time. It could be done with a new command, but probably would be easier to just use a wand of destruction. I'm thinking of inserting into the beam finalization code the check to see if the target is an altar, and if so, call the altar destruction function. It feels like feature and/or altar destruction may have existed in crawls long dark past (or maybe I'm thinking of nethack?), so if there is already code in there somewhere that supports what I'm trying to do that would be nice.
Any ideas would be appreciated.