Angband.oook.cz
Angband.oook.cz
AboutVariantsLadderForumCompetitionComicScreenshotsFunniesLinks

Go Back   Angband Forums > Angband > Development

Reply
 
Thread Tools Display Modes
Old January 22, 2020, 05:19   #1
Pete Mack
Prophet
 
Join Date: Apr 2007
Location: Seattle, WA
Posts: 5,752
Donated: $40
Pete Mack is on a distinguished road
blocked on some minor development.

I was trying to get my hand back in to coding for angband.

I am trying to implement this:
http://angband.oook.cz/forum/showpos...5&postcount=16

but i am blocked by this:
https://github.com/angband/angband/issues/4260
Note: see my final comment on what confuses me: why does each element_info record have an associated bitflag???

Nick, can you explain how element_info is actually used, so i can finish this? It is a pretty easy problem otherwise.
Pete Mack is offline   Reply With Quote
Old January 22, 2020, 11:28   #2
Nick
Vanilla maintainer
 
Nick's Avatar
 
Join Date: Apr 2007
Location: Canberra, Australia
Age: 55
Posts: 8,397
Donated: $60
Nick will become famous soon enough
The bitflag field is for recording how the item itself reacts to the element - so it can contain the EL_INFO_HATES flag if the element can destroy it, or the EL_INFO_IGNORE flag if the element can't destroy it. The HATES flag is assigned to object bases (tvals), and then the IGNORE flag can be applied to exceptions.
__________________
One for the Dark Lord on his dark throne
In the Land of Mordor where the Shadows lie.
Nick is offline   Reply With Quote
Old January 22, 2020, 11:55   #3
Pete Mack
Prophet
 
Join Date: Apr 2007
Location: Seattle, WA
Posts: 5,752
Donated: $40
Pete Mack is on a distinguished road
thanks much. Adding a comment to this effect. Also: if the object gets a random resist, shouldn't it also get set to
obj-init.c:356,362
Code:
    obj_info[effect].flags |= EL_INFO_RESIST | EL_INFO_RANDOM;
not just:
Code:
    obj_info[effect].flags |=  EL_INFO_RANDOM;
That is, it should resist the element if it has a resistance from any source.
Pete Mack is offline   Reply With Quote
Old January 22, 2020, 12:10   #4
Nick
Vanilla maintainer
 
Nick's Avatar
 
Join Date: Apr 2007
Location: Canberra, Australia
Age: 55
Posts: 8,397
Donated: $60
Nick will become famous soon enough
Quote:
Originally Posted by Pete Mack View Post
thanks much. Adding a comment to this effect. Also: if the object gets a random resist, shouldn't it also get set to
obj-init.c:356,362
Code:
    obj_info[effect].flags |= EL_INFO_RESIST | EL_INFO_RANDOM;
not just:
Code:
    obj_info[effect].flags |=  EL_INFO_RANDOM;
That is, it should resist the element if it has a resistance from any source.
No, the actual resist is handled by the res_level field (1 being single resist, 3 immunity). Some of the reason for the way this stuff is structured is to allow for use in variants with more resistance levels than V.
__________________
One for the Dark Lord on his dark throne
In the Land of Mordor where the Shadows lie.
Nick is offline   Reply With Quote
Old January 22, 2020, 12:20   #5
Pete Mack
Prophet
 
Join Date: Apr 2007
Location: Seattle, WA
Posts: 5,752
Donated: $40
Pete Mack is on a distinguished road
Sure, but as written, the object can get destroyed by an element if it has a random resist, but not if it has a default resist. Or that is what it looks like.
Pete Mack is offline   Reply With Quote
Old January 22, 2020, 20:27   #6
Nick
Vanilla maintainer
 
Nick's Avatar
 
Join Date: Apr 2007
Location: Canberra, Australia
Age: 55
Posts: 8,397
Donated: $60
Nick will become famous soon enough
Quote:
Originally Posted by Pete Mack View Post
Sure, but as written, the object can get destroyed by an element if it has a random resist, but not if it has a default resist. Or that is what it looks like.
Oh, I get it. Yes it should. Bug filed.
__________________
One for the Dark Lord on his dark throne
In the Land of Mordor where the Shadows lie.
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
Development lull Nick Vanilla 4 August 27, 2018 21:35
MUD development Whelk Idle chatter 11 January 9, 2011 01:03
Is development *too* active? the Invisible Stalker Vanilla 14 December 26, 2010 17:47
Development forum camlost Oook! 5 February 22, 2009 21:06
[FA] FAangband development Nick Variants 174 May 30, 2008 02:02


All times are GMT +1. The time now is 19:03.


Powered by vBulletin® Version 3.8.11
Copyright ©2000 - 2020, vBulletin Solutions Inc.