Angband.oook.cz
Angband.oook.cz
AboutVariantsLadderForumCompetitionComicScreenshotsFunniesLinks

Go Back   Angband Forums > Angband > Development

Reply
 
Thread Tools Display Modes
Old April 27, 2009, 22:25   #1
Obsilium
Rookie
 
Join Date: Apr 2007
Location: Iceland
Posts: 22
Obsilium is on a distinguished road
Is there any effective method to get rid of annoying trap types in V?

I have been trying to eliminate trap doors from my Angband version without success. Is there any proper method for doing so? I really like to completely finish all levels that I enter and in moments of stupidity I tend to allow mobs like Harowen to TD me to the next level.
Obsilium is offline   Reply With Quote
Old April 27, 2009, 22:54   #2
PaulBlay
Knight
 
Join Date: Jan 2009
Posts: 657
PaulBlay is on a distinguished road
Quote:
Originally Posted by Obsilium View Post
I have been trying to eliminate trap doors from my Angband version without success. Is there any proper method for doing so? I really like to completely finish all levels that I enter and in moments of stupidity I tend to allow mobs like Harowen to TD me to the next level.
Find the function pick_trap in trap.c

Change to be like follows.

Code:
void pick_trap(int y, int x)
{
	int feat;

	static const int min_level[] =
	{
		2,		/* Trap door */
		2,		/* Open pit */
		2,		/* Spiked pit */
		2,		/* Poison pit */
		3,		/* Summoning rune */
		1,		/* Teleport rune */
		2,		/* Fire rune */
		2,		/* Acid rune */
		2,		/* Slow rune */
		6,		/* Strength dart */
		6,		/* Dexterity dart */
		6,		/* Constitution dart */
		2,		/* Gas blind */
		1,		/* Gas confuse */
		2,		/* Gas poison */
		2,		/* Gas sleep */
	};

	/* Paranoia */
	if (cave_feat[y][x] != FEAT_INVIS) return;

	/* Pick a trap */
	while (1)
	{
		/* Hack -- pick a trap */
		feat = FEAT_TRAP_HEAD + randint0(16);

		/* Check against minimum depth */
		if (min_level[feat - FEAT_TRAP_HEAD] > p_ptr->depth) continue;

		/* Hack -- no trap doors */
		if (feat == FEAT_TRAP_HEAD + 0x00) continue;

		/* Done */
		break;
	}

	/* Activate the trap */
	cave_set_feat(y, x, feat);
}
Recompile.
__________________
Currently turning (Angband) Japanese.
PaulBlay is offline   Reply With Quote
Old April 28, 2009, 00:45   #3
Big Al
Swordsman
 
Big Al's Avatar
 
Join Date: Apr 2007
Location: Calgary
Age: 35
Posts: 327
Donated: $18.32
Big Al is on a distinguished road
Or you could just change the min_level for trap doors to something big, from eg. 2 to 200.
__________________
Come play Metroplexity!
Un, V MX H- D c-- f- PV s- d+ P++ M+
c-- S I++ So+ B+ ac- !GHB SQ RQ+ V+
Big Al is offline   Reply With Quote
Old April 28, 2009, 00:49   #4
Obsilium
Rookie
 
Join Date: Apr 2007
Location: Iceland
Posts: 22
Obsilium is on a distinguished road
The trick seems to be that I am not a compiling expert at all. I tried looking at the instructions on the Wiki but I'm not any nearer to getting it done right.
Obsilium is offline   Reply With Quote
Old April 28, 2009, 03:57   #5
PaulBlay
Knight
 
Join Date: Jan 2009
Posts: 657
PaulBlay is on a distinguished road
Quote:
Originally Posted by Big Al View Post
Or you could just change the min_level for trap doors to something big, from eg. 2 to 200.
Good point, but make it a legal level or it might cause problems. (Say, 125)

Quote:
Originally Posted by Obsilium View Post
The trick seems to be that I am not a compiling expert at all. I tried looking at the instructions on the Wiki but I'm not any nearer to getting it done right.
If you want an alternative set of instructions, the ones for Angband/65 will (largely) apply. (The ones for VC++ IDE). Big Al's idea is easiest, though.

http://roguebasin.roguelikedevelopme...d/65\Compiling
__________________
Currently turning (Angband) Japanese.
PaulBlay 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
Annoying Scrolls of Create Traps... buzzkill Vanilla 9 January 10, 2009 05:47
Types of vaults Wraitheist Vanilla 5 September 8, 2008 01:53
Some newbie questions about Angband types Anne Variants 7 February 28, 2008 03:44
Will we get rid of the 32 bit flag variables? Bandobras Vanilla 18 December 22, 2007 14:54
Too Much Luck - Annoying? Conker Vanilla 15 September 28, 2007 08:58


All times are GMT +1. The time now is 09:02.


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