Angband.oook.cz
Angband.oook.cz
AboutVariantsLadderForumCompetitionComicScreenshotsFunniesLinks

Go Back   Angband Forums > Angband > Vanilla

 
 
Thread Tools Display Modes
Prev Previous Post   Next Post Next
Old March 22, 2020, 14:13   #11
wobbly
Veteran
 
Join Date: May 2012
Location: Adelaide, Australia
Posts: 2,246
wobbly is on a distinguished road
Code:
void do_cmd_run(struct command *cmd)
{
	struct loc grid;
	int dir;

	/* Get arguments */
	if (cmd_get_direction(cmd, "direction", &dir, false) != CMD_OK)
		return;

	if (player_confuse_dir(player, &dir, true))
		return;
Code:
bool player_confuse_dir(struct player *p, int *dp, bool too)
{
	int dir = *dp;

	if (p->timed[TMD_CONFUSED])
		if ((dir == 5) || (randint0(100) < 75))
			/* Random direction */
			dir = ddd[randint0(8)];

	/* Running attempts always fail */
	if (too) {
		msg("You are too confused.");
		return true;
	}
pretty sure if player_confuse_dir will always return true if you tell it "too"

Edit:Yeah working in mine now. Will open a pull request

Edit2: I guess the "running attempts always fail" bit was literally true

Last edited by wobbly; March 22, 2020 at 14:47.
wobbly is offline   Reply With Quote
 


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
Current master post-4.1.3 Nick Vanilla 505 June 16, 2019 00:26
Suggestion for Rangers (repost from master-post thread) Thraalbee Vanilla 1 April 13, 2019 18:08
Issues on current master Nick Vanilla 277 June 18, 2017 22:30
Bugs and complaints on current master Nick Vanilla 588 April 27, 2017 22:54
Master Thief Grotug Idle chatter 1 March 26, 2017 23:54


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


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