Angband.oook.cz
Angband.oook.cz
AboutDownloadVariantsLadderForumCompetitionSpoilersComicScreenshotsFunniesLinks

Go Back   Angband Forums > Angband > Development

Reply
 
Thread Tools Display Modes
Old January 31, 2010, 09:12   #1
Sirridan
Knight
 
Sirridan's Avatar
 
Join Date: May 2009
Posts: 560
Sirridan is on a distinguished road
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.
Any thoughts/suggestions or comments?
Sirridan is offline   Reply With Quote
Old January 31, 2010, 18:22   #2
PowerDiver
Prophet
 
Join Date: Mar 2008
Posts: 2,588
PowerDiver is on a distinguished road
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.
PowerDiver is offline   Reply With Quote
Old January 31, 2010, 21:28   #3
Sirridan
Knight
 
Sirridan's Avatar
 
Join Date: May 2009
Posts: 560
Sirridan is on a distinguished road
Quote:
Originally Posted by PowerDiver View Post
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.
(1) I would say curse killing abilities get rid of some of them, such as NO_DROP and PVAL_FLIP, the rest could be good things for double-edged swords like escaping, mouse, etc. The already implemented curses (light/heavy/perma) are basically how difficult it would be to remove NO_DROP and PVAL_FLIP.

(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.
Sirridan is offline   Reply With Quote
Old January 31, 2010, 21:56   #4
Nick
FAangband maintainer
 
Nick's Avatar
 
Join Date: Apr 2007
Location: Canberra, Australia
Age: 48
Posts: 4,232
Donated: $60
Nick is on a distinguished road
FAangband has a curse system in place that I'm pretty happy with. In outline:
  • There are a collection of curse flags, and corresponding ID flags to show when they're known. They get learned by noticing the effects.
  • The ID spell doesn't show curses, except in the presence of a flag which indicates that all curses are known. *ID*-equivalent shows all curses.
  • Curses can potentially be removed by RC or *RC*, except in the presence of a flag which indicates that all curses are permanent
  • RC for removable curses operates per item, and has a chance of removing each curse on the item. If it fails, it can be tried again, but repeat attempts have a chance of destroying the item (even artifacts). *RC* has an improved chance.
  • Some objects and ego types get standard curses, in which case the have all curses shown by the ID spell (things of Aggravation, for example). Others get random curses, which are not shown by the ID spell.
  • Curse Weapon and Curse Armor bestow a few random (removable) curses on an item.
__________________
One Ring to rule them all, One Ring to find them,
One Ring to bring them all and in the darkness bind them.
Nick is offline   Reply With Quote
Old January 31, 2010, 23:52   #5
Sirridan
Knight
 
Sirridan's Avatar
 
Join Date: May 2009
Posts: 560
Sirridan is on a distinguished road
Quote:
Originally Posted by Nick View Post
FAangband has a curse system in place that I'm pretty happy with. In outline:
  • There are a collection of curse flags, and corresponding ID flags to show when they're known. They get learned by noticing the effects.
  • The ID spell doesn't show curses, except in the presence of a flag which indicates that all curses are known. *ID*-equivalent shows all curses.
  • Curses can potentially be removed by RC or *RC*, except in the presence of a flag which indicates that all curses are permanent
  • RC for removable curses operates per item, and has a chance of removing each curse on the item. If it fails, it can be tried again, but repeat attempts have a chance of destroying the item (even artifacts). *RC* has an improved chance.
  • Some objects and ego types get standard curses, in which case the have all curses shown by the ID spell (things of Aggravation, for example). Others get random curses, which are not shown by the ID spell.
  • Curse Weapon and Curse Armor bestow a few random (removable) curses on an item.
Nifty, I'll have to check your sources and see how you implemented... if you don' mind that is
Sirridan is offline   Reply With Quote
Old February 1, 2010, 05:00   #6
Nick
FAangband maintainer
 
Nick's Avatar
 
Join Date: Apr 2007
Location: Canberra, Australia
Age: 48
Posts: 4,232
Donated: $60
Nick is on a distinguished road
Quote:
Originally Posted by Sirridan View Post
Nifty, I'll have to check your sources and see how you implemented... if you don' mind that is
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.
__________________
One Ring to rule them all, One Ring to find them,
One Ring to bring them all and in the darkness bind them.
Nick is offline   Reply With Quote
Reply


Currently Active Users Viewing This Thread: 1 (0 members and 1 guests)
 
Thread Tools
Display Modes

Posting Rules
You may not post new threads
You may not post replies
You may not post attachments
You may not edit your posts

BB code is On
Smilies are On
[IMG] code is On
HTML code is Off

Forum Jump

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


All times are GMT +1. The time now is 00:56.


Powered by vBulletin® Version 3.8.7
Copyright ©2000 - 2014, vBulletin Solutions, Inc.