Addressed round 3 of feedback (no assets).

This commit is contained in:
Sam 2022-05-09 08:49:15 -04:00
parent 13ea6dee93
commit 5d0ba6e2b8
2 changed files with 14 additions and 25 deletions

View File

@ -1004,7 +1004,7 @@ impl CharacterAbility {
}| { }| {
// Do we want to make buff_strength affect this instead of power? // Do we want to make buff_strength affect this instead of power?
// Look into during modular weapon transition // Look into during modular weapon transition
*strength *= stats.buff_strength; *strength *= stats.buff_strength * stats.power;
}, },
); );
*range *= stats.range; *range *= stats.range;
@ -1046,7 +1046,7 @@ impl CharacterAbility {
} => { } => {
// Do we want to make buff_strength affect this instead of power? // Do we want to make buff_strength affect this instead of power?
// Look into during modular weapon transition // Look into during modular weapon transition
*buff_strength *= stats.buff_strength; *buff_strength *= stats.buff_strength * stats.power;
*buildup_duration /= stats.speed; *buildup_duration /= stats.speed;
*cast_duration /= stats.speed; *cast_duration /= stats.speed;
*recover_duration /= stats.speed; *recover_duration /= stats.speed;

View File

@ -37,29 +37,18 @@ impl<T: ItemDesc> From<&T> for ItemKey {
}, },
ItemDefinitionId::Compound { .. } => ItemKey::Empty, ItemDefinitionId::Compound { .. } => ItemKey::Empty,
}, },
ItemKind::ModularComponent(mod_comp) => { ItemKind::ModularComponent(_) => match item_definition_id {
use modular::ModularComponent; ItemDefinitionId::Simple(id) => ItemKey::Tool(id.to_owned()),
match mod_comp { ItemDefinitionId::Compound { simple_base, .. } => {
ModularComponent::ToolPrimaryComponent { .. } => { if let Ok(key) =
if let ItemDefinitionId::Simple(id) = item_definition_id { modular::weapon_component_to_key(simple_base, item_desc.components())
match modular::weapon_component_to_key(id, item_desc.components()) { {
Ok(key) => ItemKey::ModularWeaponComponent(key), ItemKey::ModularWeaponComponent(key)
// TODO: Maybe use a different ItemKey?
Err(_) => ItemKey::Tool(id.to_owned()),
}
} else { } else {
ItemKey::Empty ItemKey::Tool(simple_base.to_owned())
} }
}, },
ModularComponent::ToolSecondaryComponent { .. } => { ItemDefinitionId::Modular { .. } => ItemKey::Empty,
if let ItemDefinitionId::Simple(id) = item_definition_id {
// TODO: Maybe use a different ItemKey?
ItemKey::Tool(id.to_owned())
} else {
ItemKey::Empty
}
},
}
}, },
ItemKind::Lantern(Lantern { kind, .. }) => ItemKey::Lantern(kind.clone()), ItemKind::Lantern(Lantern { kind, .. }) => ItemKey::Lantern(kind.clone()),
ItemKind::Glider(Glider { kind, .. }) => ItemKey::Glider(kind.clone()), ItemKind::Glider(Glider { kind, .. }) => ItemKey::Glider(kind.clone()),