|
|
#1 |
|
Knight
Join Date: May 2009
Posts: 560
![]() |
Tackling the new curses
I'm trying to contribute a little to the Angband source right now, and I thought it would be fun and interesting to try and implement the new curses described on some of the tickets (Anchor, pval flip, no drop, etc).
So far, I can get them to display properly! Tomorrow I'll try and get at least Anchor implemented (no teleportation) Here is a dump of the broadsword (I added the curse flag to the base item just for testing) Code:
[Character Equipment]
a) a Broad Sword (2d5) (+0,+0) {anchor}
Prevents teleportation.
Combat info:
2 blows/round.
With an additional 3 strength and 3 dex you would get 3 blows
With an additional 0 strength and 5 dex you would get 3 blows
Average damage/hit: 9.2.
|
|
|
|
|
|
#2 |
|
Prophet
Join Date: Mar 2008
Posts: 2,588
![]() |
The important questions are
(1) how does remove curse and/or *REMOVE CURSE affect the object if at all (2) do you plan to update the resistances screen to show curses (3) code for learning the flag whenever you or a monster tries to port you Does the current codebase use a single function whenever porting the @? If not, you should factor that out so all of the checks and learning are in one place. |
|
|
|
|
|
#3 | |
|
Knight
Join Date: May 2009
Posts: 560
![]() |
Quote:
(2) I had no thought of that at first, but it is a very good idea, I think I should do that. (3) That's coming up next, I think I remember it being a single function called by the other spells like ?phase, or tself, but I'm not 100% on that. If that is NOT how it is, I think I'll add that and add the check there. |
|
|
|
|
|
|
#4 |
|
FAangband maintainer
Join Date: Apr 2007
Location: Canberra, Australia
Age: 47
Posts: 3,724
Donated: $60
![]() |
FAangband has a curse system in place that I'm pretty happy with. In outline:
__________________
"There is no safety. There is no end. The word must be heard in silence. There must be darkness to see the stars. The dance is always danced above the hollow place, above the terrible abyss." - The Farthest Shore, Ursula Le Guin |
|
|
|
|
|
#5 | |
|
Knight
Join Date: May 2009
Posts: 560
![]() |
Quote:
|
|
|
|
|
|
|
#6 |
|
FAangband maintainer
Join Date: Apr 2007
Location: Canberra, Australia
Age: 47
Posts: 3,724
Donated: $60
![]() |
Go right ahead. Particularly relevant bits are the curse flags in defines.h, the notice_curse function in dungeon.c (and all calls to it, many also in dungeon.c), the checking for known curses in xtra1.c and the remove_curse* routines in spells2.c.
__________________
"There is no safety. There is no end. The word must be heard in silence. There must be darkness to see the stars. The dance is always danced above the hollow place, above the terrible abyss." - The Farthest Shore, Ursula Le Guin |
|
|
|
![]() |
| Currently Active Users Viewing This Thread: 1 (0 members and 1 guests) | |
| Thread Tools | |
| Display Modes | |
|
|
Similar Threads
|
||||
| Thread | Thread Starter | Forum | Replies | Last Post |
| on heavy curses | PowerDiver | Vanilla | 48 | November 26, 2009 22:15 |
| What we need: More heavy curses | buzzkill | Variants | 16 | November 4, 2009 18:53 |
| Can't save via ctrl-s in curses mode | Therem Harth | ToME | 6 | September 27, 2009 00:15 |
| Curses | Nick | Development | 29 | March 19, 2009 13:36 |