Skip to content

Commit

Permalink
feat(pass-2): support SkillModifier of -1, to apply to current Skill (#…
Browse files Browse the repository at this point in the history
…33)

This is needed to being able to apply a custom effect, avoiding
other magic. This is normally done by the EVE client, in custom
code too.
  • Loading branch information
TrueBrain authored Mar 5, 2024
1 parent 18becd8 commit 9779a7d
Showing 1 changed file with 7 additions and 0 deletions.
7 changes: 7 additions & 0 deletions src/calculate/pass_2.rs
Original file line number Diff line number Diff line change
Expand Up @@ -277,6 +277,13 @@ impl Pass for PassTwo {
}
Modifier::OwnerRequiredSkillModifier(skill_type_id)
| Modifier::LocationRequiredSkillModifier(skill_type_id) => {
/* Some skills apply on -1, indicating they should apply on anything that uses that skill. */
let skill_type_id = if skill_type_id == -1 {
source_type_id
} else {
skill_type_id
};

for attribute_skill_id in &ATTRIBUTE_SKILLS {
if ship.hull.attributes.contains_key(attribute_skill_id)
&& ship.hull.attributes[attribute_skill_id].base_value
Expand Down

0 comments on commit 9779a7d

Please sign in to comment.