Thread: Comp 229
View Single Post
Old January 12, 2020, 05:26   #10
wobbly
Prophet
 
Join Date: May 2012
Location: Adelaide, Australia
Posts: 2,550
wobbly will become famous soon enough
Code:
	/* Bashing chance depends on melee skill, DEX, and a level bonus. */
	int bash_chance = p->state.skills[SKILL_TO_HIT_MELEE] / 8 +
		adj_dex_th[p->state.stat_ind[STAT_DEX]] / 2;
Code:
		/* Calculate attack quality, a mix of momentum and accuracy. */
		bash_quality = p->state.skills[SKILL_TO_HIT_MELEE] / 4 + p->wt / 8 +
			p->upkeep->total_weight / 80 + shield->weight / 2;
Not at all a bunch of esoteric equations. Its worth reading the whole thing in player-attack.c if you really want to know.
wobbly is offline   Reply With Quote