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

[Magiclysm] Attunements - Overclocker traits #44631

Merged
merged 1 commit into from
Oct 8, 2020
Merged
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
2 changes: 2 additions & 0 deletions data/mods/Magiclysm/traits/attunements.json
Original file line number Diff line number Diff line change
Expand Up @@ -576,6 +576,8 @@
"valid": false,
"description": "The Technomancer specializes in augmenting humans without actually modifying them; and the Overclocker takes the heat aptitude of a Kelvinist and puts that to work. You are able to think significantly faster, and are able to align your leylines for spellcasting faster as a result.",
"prereqs": [ "KELVINIST", "TECHNOMANCER" ],
"passive_mods": { "int_mod": 5 },
"casting_time_multiplier": 0.75,
"spells_learned": [ [ "overaccelerate", 5 ] ],
"cancels": [
"ARTIFICER",
Expand Down
1 change: 1 addition & 0 deletions src/character.cpp
Original file line number Diff line number Diff line change
Expand Up @@ -7784,6 +7784,7 @@ mutation_value_map = {
{ "mana_multiplier", calc_mutation_value_multiplicative<&mutation_branch::mana_multiplier> },
{ "mana_regen_multiplier", calc_mutation_value_multiplicative<&mutation_branch::mana_regen_multiplier> },
{ "bionic_mana_penalty", calc_mutation_value_multiplicative<&mutation_branch::bionic_mana_penalty> },
{ "casting_time_multiplier", calc_mutation_value_multiplicative<&mutation_branch::casting_time_multiplier> },
{ "speed_modifier", calc_mutation_value_multiplicative<&mutation_branch::speed_modifier> },
{ "movecost_modifier", calc_mutation_value_multiplicative<&mutation_branch::movecost_modifier> },
{ "movecost_flatground_modifier", calc_mutation_value_multiplicative<&mutation_branch::movecost_flatground_modifier> },
Expand Down
3 changes: 3 additions & 0 deletions src/magic.cpp
Original file line number Diff line number Diff line change
Expand Up @@ -869,6 +869,9 @@ int spell::casting_time( const Character &guy, bool ignore_encumb ) const
} else {
casting_time = type->base_casting_time;
}

casting_time *= guy.mutation_value( "casting_time_multiplier" );

if( !ignore_encumb ) {
if( !has_flag( spell_flag::NO_LEGS ) ) {
// the first 20 points of encumbrance combined is ignored
Expand Down
1 change: 1 addition & 0 deletions src/mutation.h
Original file line number Diff line number Diff line change
Expand Up @@ -304,6 +304,7 @@ struct mutation_branch {
cata::optional<float> mana_regen_multiplier = cata::nullopt;
// for every point of bionic power, reduces max mana pool by 1 * bionic_mana_penalty
cata::optional<float> bionic_mana_penalty = cata::nullopt;
cata::optional<float> casting_time_multiplier = cata::nullopt;
// spells learned and their associated level when gaining the mutation
std::map<spell_id, int> spells_learned;
/** mutation enchantments */
Expand Down
1 change: 1 addition & 0 deletions src/mutation_data.cpp
Original file line number Diff line number Diff line change
Expand Up @@ -467,6 +467,7 @@ void mutation_branch::load( const JsonObject &jo, const std::string & )
optional( jo, was_loaded, "mana_multiplier", mana_multiplier, cata::nullopt );
optional( jo, was_loaded, "mana_regen_multiplier", mana_regen_multiplier, cata::nullopt );
optional( jo, was_loaded, "bionic_mana_penalty", bionic_mana_penalty, cata::nullopt );
optional( jo, was_loaded, "casting_time_multiplier", casting_time_multiplier, cata::nullopt );

if( jo.has_object( "rand_cut_bonus" ) ) {
JsonObject sm = jo.get_object( "rand_cut_bonus" );
Expand Down