Angband.oook.cz
Angband.oook.cz
AboutVariantsLadderForumCompetitionComicScreenshotsFunniesLinks

Go Back   Angband Forums > Angband > Vanilla

Reply
 
Thread Tools Display Modes
Old October 8, 2017, 12:13   #11
Nick
Vanilla maintainer
 
Nick's Avatar
 
Join Date: Apr 2007
Location: Canberra, Australia
Age: 52
Posts: 6,573
Donated: $60
Nick is on a distinguished road
3.0.5 blows table and comments:
Code:
/*
 * This table is used to help calculate the number of blows the player can
 * make in a single round of attacks (one player turn) with a normal weapon.
 *
 * This number ranges from a single blow/round for weak players to up to six
 * blows/round for powerful warriors.
 *
 * Note that certain artifacts and ego-items give "bonus" blows/round.
 *
 * First, from the player class, we extract some values:
 *
 *    Warrior --> num = 6; mul = 5; div = MAX(30, weapon_weight);
 *    Mage    --> num = 4; mul = 2; div = MAX(40, weapon_weight);
 *    Priest  --> num = 5; mul = 3; div = MAX(35, weapon_weight);
 *    Rogue   --> num = 5; mul = 3; div = MAX(30, weapon_weight);
 *    Ranger  --> num = 5; mul = 4; div = MAX(35, weapon_weight);
 *    Paladin --> num = 5; mul = 4; div = MAX(30, weapon_weight);
 *
 * To get "P", we look up the relevant "adj_str_blow[]" (see above),
 * multiply it by "mul", and then divide it by "div", rounding down.
 *
 * To get "D", we look up the relevant "adj_dex_blow[]" (see above),
 * note especially column 6 (DEX 18/101) and 11 (DEX 18/150).
 *
 * The player gets "blows_table[P][D]" blows/round, as shown below,
 * up to a maximum of "num" blows/round, plus any "bonus" blows/round.
 */
const byte blows_table[12][12] =
{
	/* P/D */
	/* 0,   1,   2,   3,   4,   5,   6,   7,   8,   9,  10,  11+ */

	/* 0  */
	{  1,   1,   1,   1,   1,   1,   2,   2,   2,   2,   2,   3 },

	/* 1  */
	{  1,   1,   1,   1,   2,   2,   3,   3,   3,   4,   4,   4 },

	/* 2  */
	{  1,   1,   2,   2,   3,   3,   4,   4,   4,   5,   5,   5 },

	/* 3  */
	{  1,   2,   2,   3,   3,   4,   4,   4,   5,   5,   5,   5 },

	/* 4  */
	{  1,   2,   2,   3,   3,   4,   4,   5,   5,   5,   5,   5 },

	/* 5  */
	{  2,   2,   3,   3,   4,   4,   5,   5,   5,   5,   5,   6 },

	/* 6  */
	{  2,   2,   3,   3,   4,   4,   5,   5,   5,   5,   5,   6 },

	/* 7  */
	{  2,   3,   3,   4,   4,   4,   5,   5,   5,   5,   5,   6 },

	/* 8  */
	{  3,   3,   3,   4,   4,   4,   5,   5,   5,   5,   6,   6 },

	/* 9  */
	{  3,   3,   4,   4,   4,   4,   5,   5,   5,   5,   6,   6 },

	/* 10 */
	{  3,   3,   4,   4,   4,   4,   5,   5,   5,   6,   6,   6 },

	/* 11+ */
	{  3,   3,   4,   4,   4,   4,   5,   5,   6,   6,   6,   6 },
};
So in fact every class could get 6 blows out of the blows table, but the non-warrior classes were capped.
__________________
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 online now   Reply With Quote
Old October 8, 2017, 17:50   #12
Derakon
Prophet
 
Derakon's Avatar
 
Join Date: Dec 2009
Posts: 7,950
Derakon is on a distinguished road
Huh, and priests could get 5 blows/round back then.
Derakon is offline   Reply With Quote
Old October 8, 2017, 20:51   #13
kandrc
Adept
 
Join Date: Dec 2007
Posts: 222
kandrc is on a distinguished road
Quote:
Originally Posted by Derakon View Post
Huh, and priests could get 5 blows/round back then.
No. I don't recall how it worked in Frog-knows, but in 2.x, it was 1 blow table with priest and mage limited to 4 blows, warrior allowed 6, and everybody else limited to 5.
kandrc is offline   Reply With Quote
Old October 8, 2017, 22:35   #14
Derakon
Prophet
 
Derakon's Avatar
 
Join Date: Dec 2009
Posts: 7,950
Derakon is on a distinguished road
Quote:
Originally Posted by kandrc View Post
No. I don't recall how it worked in Frog-knows, but in 2.x, it was 1 blow table with priest and mage limited to 4 blows, warrior allowed 6, and everybody else limited to 5.
I'm just looking at the code Nick posted. Specifically this bit:
Code:
 *    Warrior --> num = 6; mul = 5; div = MAX(30, weapon_weight);
 *    Mage    --> num = 4; mul = 2; div = MAX(40, weapon_weight);
 *    Priest  --> num = 5; mul = 3; div = MAX(35, weapon_weight);
 *    Rogue   --> num = 5; mul = 3; div = MAX(30, weapon_weight);
 *    Ranger  --> num = 5; mul = 4; div = MAX(35, weapon_weight);
 *    Paladin --> num = 5; mul = 4; div = MAX(30, weapon_weight);
It's entirely possible that the cap on Priests has fluctuated over the years, so my "back then" should only refer to 3.0.5. Sorry for the confusion.
Derakon is offline   Reply With Quote
Old October 9, 2017, 10:26   #15
PowerWyrm
Veteran
 
PowerWyrm's Avatar
 
Join Date: Apr 2008
Posts: 1,975
PowerWyrm is on a distinguished road
Quote:
Originally Posted by Derakon View Post
Huh, and priests could get 5 blows/round back then.
No, priests were capped at 4 (in class.txt). There's just a typo in the comment.
__________________
PWMAngband variant maintainer - check http://www.mangband.org/forum/viewforum.php?f=9 to learn more about this new variant!
PowerWyrm is offline   Reply With Quote
Old October 10, 2017, 10:28   #16
Werbaer
Apprentice
 
Join Date: Aug 2014
Posts: 79
Werbaer is on a distinguished road
Quote:
Originally Posted by PowerWyrm View Post
No, priests were capped at 4 (in class.txt). There's just a typo in the comment.
Quote:
Originally Posted by kandrc View Post
I don't recall how it worked in Frog-knows, but in 2.x, it was 1 blow table with priest and mage limited to 4 blows, warrior allowed 6, and everybody else limited to 5.
At least from 2.7.9v6 up tp 2.9.3, priests had 5 max blows. Up to 2.9.2, it was hardcoded in the source. 2.9.3 introduced the p_class.txt file, and still used 5 attacks for a priest.

The change from 5 to 4 attacks was made in 3.0. Since it was only necessary to change the p_class.txt file, the source code comment wasn't updated.
Werbaer 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
Class bonuses spara Vanilla 5 August 3, 2017 20:22
Level 30 bonuses? Bogatyr Vanilla 3 November 11, 2014 16:10
Class bonuses fizzix Vanilla 25 August 7, 2011 14:40
learning damage bonuses PowerDiver Vanilla 40 July 23, 2011 18:21
Uncursed negative Magical Bonuses Cauldron Vanilla 8 May 17, 2009 10:56


All times are GMT +1. The time now is 23:50.


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