Skip to content
New issue

Have a question about this project? Sign up for a free GitHub account to open an issue and contact its maintainers and the community.

By clicking “Sign up for GitHub”, you agree to our terms of service and privacy statement. We’ll occasionally send you account related emails.

Already on GitHub? Sign in to your account

ItemType mult_item Change to Array #37

Open
Mochnant opened this issue Oct 30, 2018 · 1 comment
Open

ItemType mult_item Change to Array #37

Mochnant opened this issue Oct 30, 2018 · 1 comment

Comments

@Mochnant
Copy link
Collaborator

To support multiple items (and variable boost) thereof, change the mult_item,mult_val elements of ItemType to an array.

For example, a pick could provide +1 iron and an enchanted pick could provide +2 iron. Alternately, an iron hammer or a mithril hammer or admantium hammer could all provide +1 when crafting iron weapons.

Current gamedata.cpp:

// name, plural, abbr,
// flags,
// pSkill, pLevel, pMonths, pOutput, pInput array
// mSkill, mLevel, mOutput, mInput array
// weight, type, baseprice, combat, index, battleindex
// walk,ride,fly,swim,
// hitchItem, hitchwalk
// mult_item,mult_val

	{"iron","iron","IRON",
	 0,
	 S_MINING,1,1,1, {{-1,0}, {-1,0},{-1,0},{-1,0}},
	 -1,0,0, {{-1,0},{-1,0},{-1,0},{-1,0}},
	 5, IT_NORMAL, 30,0,0, 0,
	 0,0,0,0,
	 -1,0,
	 I_PICK,1},

Proposed (3 maximum, could be more if preferred):

	{"iron","iron","IRON",
	 0,
	 S_MINING,1,1,1, {{-1,0}, {-1,0},{-1,0},{-1,0}},
	 -1,0,0, {{-1,0},{-1,0},{-1,0},{-1,0}},
	 5, IT_NORMAL, 30,0,0, 0,
	 0,0,0,0,
	 -1,0,
	 {{I_PICK,1}, {I_EPICK, 2}, {-1, 0}},
@nedbrek
Copy link
Owner

nedbrek commented Feb 6, 2021

Commit adb3715 adds a mult_item vector (and makes the gamedata use it) - but there is still some code that needs to be updated (the first item in the array is pulled into the original structure field - most of the code only looks at that).

Sign up for free to join this conversation on GitHub. Already have an account? Sign in to comment
Projects
None yet
Development

No branches or pull requests

2 participants