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

orks should learn weapon skills with normal speed #977

Open
wants to merge 1 commit into
base: develop
Choose a base branch
from
Open
Show file tree
Hide file tree
Changes from all commits
Commits
File filter

Filter by extension

Filter by extension

Conversations
Failed to load comments.
Loading
Jump to
Jump to file
Failed to load files.
Loading
Diff view
Diff view
6 changes: 6 additions & 0 deletions res/eressea/races.xml
Original file line number Diff line number Diff line change
Expand Up @@ -1193,6 +1193,12 @@ giveunit="yes" getitem="yes" recruitethereal="yes" equipment="yes">
<skill name="cartmaking" modifier="-1"/>
<skill name="taxation" modifier="1"/>
<skill name="unarmed" modifier="-99"/>
<skill name="bow" speed="0"/>
<skill name="catapult" speed="0"/>
<skill name="crossbow" speed="0"/>
<skill name="melee" speed="0"/>
<skill name="polearm" speed="0"/>
<skill name="stamina" speed="0"/>
<attack type="1" damage="1d5"/>
<familiar race="goblin"/>
<familiar race="ghost"/>
Expand Down
6 changes: 4 additions & 2 deletions src/exparse.c
Original file line number Diff line number Diff line change
Expand Up @@ -1070,7 +1070,8 @@ static void start_races(parseinfo *pi, const XML_Char *el, const XML_Char **attr
else if (xml_strequal(el, "skill")) {
const XML_Char *name = NULL;
int i, speed = 0, mod = 0;

bool speed_is_set = false;
assert(rc);
for (i = 0; attr[i]; i += 2) {
const XML_Char *key = attr[i], *val = attr[i + 1];
if (xml_strequal(key, "name")) {
Expand All @@ -1081,6 +1082,7 @@ static void start_races(parseinfo *pi, const XML_Char *el, const XML_Char **attr
}
else if (xml_strequal(key, "speed")) {
speed = xml_int(val);
speed_is_set = true;
}
else {
handle_bad_input(pi, el, key);
Expand All @@ -1090,7 +1092,7 @@ static void start_races(parseinfo *pi, const XML_Char *el, const XML_Char **attr
skill_t sk = findskill(name);
if (sk != NOSKILL) {
rc->bonus[sk] = (char)mod;
if (speed != 0) {
if (speed_is_set) {
set_study_speed(rc, sk, speed);
}
}
Expand Down