Skip to content

Commit

Permalink
Initial commit
Browse files Browse the repository at this point in the history
  • Loading branch information
Standing-Storm committed Sep 3, 2024
1 parent 1ab5fb4 commit 291a301
Show file tree
Hide file tree
Showing 8 changed files with 441 additions and 199 deletions.
395 changes: 198 additions & 197 deletions data/mods/Magiclysm/Spells/animist.json

Large diffs are not rendered by default.

21 changes: 21 additions & 0 deletions data/mods/Magiclysm/Spells/classless.json
Original file line number Diff line number Diff line change
Expand Up @@ -661,6 +661,27 @@
"base_casting_time": 0,
"final_casting_time": 0
},
{
"id": "eoc_enervation_setup",
"type": "SPELL",
"name": "Set Up Proficiency: Enervation",
"description": "Sets up proficiency gain. This is a bug if you have it.",
"valid_targets": [ "self" ],
"spell_class": "NONE",
"flags": [ "NO_LEGS" ],
"difficulty": 0,
"min_damage": 1,
"max_damage": 1,
"duration_increment": 1,
"effect": "effect_on_condition",
"effect_str": "EOC_SPELLCASTING_ENERVATION_PROFICIENCY_ADD",
"shape": "blast",
"energy_source": "NONE",
"base_energy_cost": 0,
"final_energy_cost": 0,
"base_casting_time": 0,
"final_casting_time": 0
},
{
"id": "eoc_conveyance_setup",
"type": "SPELL",
Expand Down
163 changes: 163 additions & 0 deletions data/mods/Magiclysm/eoc_spell_casting_proficiencies.json
Original file line number Diff line number Diff line change
Expand Up @@ -151,6 +151,44 @@
}
]
},
{
"type": "effect_on_condition",
"id": "EOC_SPELLCASTING_ENERVATION_PROFICIENCY_ADD",
"global": false,
"eoc_type": "ACTIVATION",
"effect": [
{ "math": [ "u_prof_lowest", "=", "4" ] },
{
"if": { "math": [ "u_proficiency('prof_magic_enervation_beginner', 'format': 'percent')", ">=", "100" ] },
"then": [
{
"if": { "math": [ "u_proficiency('prof_magic_enervation_apprentice', 'format': 'percent')", ">=", "100" ] },
"then": [
{
"if": { "math": [ "u_proficiency('prof_magic_enervation_master', 'format': 'percent')", ">=", "100" ] },
"then": [ { "math": [ "u_prof_level", "=", "3" ] }, { "math": [ "u_prof_lowest", "=", "min(u_prof_level, u_prof_lowest)" ] } ],
"else": [
{ "math": [ "u_proficiency('prof_magic_enervation_master', 'format': 'percent')", "+=", "rand(4) / 64" ] },
{ "math": [ "u_prof_level", "=", "2" ] },
{ "math": [ "u_prof_lowest", "=", "min(u_prof_level, u_prof_lowest)" ] }
]
}
],
"else": [
{ "math": [ "u_proficiency('prof_magic_enervation_apprentice', 'format': 'percent')", "+=", "rand(4) / 32" ] },
{ "math": [ "u_prof_level", "=", "1" ] },
{ "math": [ "u_prof_lowest", "=", "min(u_prof_level, u_prof_lowest)" ] }
]
}
],
"else": [
{ "math": [ "u_proficiency('prof_magic_enervation_beginner', 'format': 'percent')", "+=", "rand(4) / 16" ] },
{ "math": [ "u_prof_level", "=", "0" ] },
{ "math": [ "u_prof_lowest", "=", "min(u_prof_level, u_prof_lowest)" ] }
]
}
]
},
{
"type": "effect_on_condition",
"id": "EOC_SPELLCASTING_CONVEYANCE_PROFICIENCY_ADD",
Expand Down Expand Up @@ -188,5 +226,130 @@
]
}
]
},
{
"type": "effect_on_condition",
"id": "EOC_EVOCATION_SPELLS_PROFICIENCY_BONUSES",
"eoc_type": "EVENT",
"required_event": "opens_spellbook",
"effect": [
{
"math": [
"u_spellcasting_adjustment('damage', 'flag_whitelist': 'EVOCATION_SPELL')",
"=",
"( (u_proficiency('prof_magic_evocation_beginner', 'format': 'percent') / 10) + (u_proficiency('prof_magic_evocation_apprentice', 'format': 'percent') / 10) + (u_proficiency('prof_magic_evocation_master', 'format': 'percent') / 10) ) )"
]
}
]
},
{
"type": "effect_on_condition",
"id": "EOC_CHANNELING_SPELLS_PROFICIENCY_BONUSES",
"eoc_type": "EVENT",
"required_event": "opens_spellbook",
"effect": [
{
"math": [
"u_spellcasting_adjustment('casting_time', 'flag_whitelist': 'CHANNELING_SPELL')",
"=",
"( (u_proficiency('prof_magic_channel_beginner', 'format': 'percent') / 10) + (u_proficiency('prof_magic_channel_apprentice', 'format': 'percent') / 10) + (u_proficiency('prof_magic_channel_master', 'format': 'percent') / 10) ) ) * -1"
]
},
{
"math": [
"u_spellcasting_adjustment('cost', 'flag_whitelist': 'CHANNELING_SPELL')",
"=",
"( (u_proficiency('prof_magic_channel_beginner', 'format': 'percent') / 10) + (u_proficiency('prof_magic_channel_apprentice', 'format': 'percent') / 10) + (u_proficiency('prof_magic_channel_master', 'format': 'percent') / 10) ) ) * -1"
]
}
]
},
{
"type": "effect_on_condition",
"id": "EOC_CONJURATION_SPELLS_PROFICIENCY_BONUSES",
"eoc_type": "EVENT",
"required_event": "opens_spellbook",
"effect": [
{
"math": [
"u_spellcasting_adjustment('duration', 'flag_whitelist': 'CONJURATION_SPELL')",
"=",
"( (u_proficiency('prof_magic_summon_beginner', 'format': 'percent') / 10) + (u_proficiency('prof_magic_summon_apprentice', 'format': 'percent') / 10) + (u_proficiency('prof_magic_summon_master', 'format': 'percent') / 10) ) )"
]
},
{
"math": [
"u_spellcasting_adjustment('cost', 'flag_whitelist': 'CONJURATION_SPELL')",
"=",
"( (u_proficiency('prof_magic_summon_beginner', 'format': 'percent') / 10) + (u_proficiency('prof_magic_summon_apprentice', 'format': 'percent') / 10) + (u_proficiency('prof_magic_summon_master', 'format': 'percent') / 10) ) ) * -1"
]
}
]
},
{
"type": "effect_on_condition",
"id": "EOC_ENHANCEMENT_SPELLS_PROFICIENCY_BONUSES",
"eoc_type": "EVENT",
"required_event": "opens_spellbook",
"effect": [
{
"math": [
"u_spellcasting_adjustment('duration', 'flag_whitelist': 'ENHANCEMENT_SPELL')",
"=",
"( (u_proficiency('prof_magic_enhancement_beginner', 'format': 'percent') / 10) + (u_proficiency('prof_magic_enhancement_apprentice', 'format': 'percent') / 10) + (u_proficiency('prof_magic_enhancement_master', 'format': 'percent') / 10) ) )"
]
},
{
"math": [
"u_spellcasting_adjustment('casting_time', 'flag_whitelist': 'ENHANCEMENT_SPELL')",
"=",
"( (u_proficiency('prof_magic_enhancement_beginner', 'format': 'percent') / 10) + (u_proficiency('prof_magic_enhancement_apprentice', 'format': 'percent') / 10) + (u_proficiency('prof_magic_enhancement_master', 'format': 'percent') / 10) ) ) * -1"
]
}
]
},
{
"type": "effect_on_condition",
"id": "EOC_ENERVATION_SPELLS_PROFICIENCY_BONUSES",
"eoc_type": "EVENT",
"required_event": "opens_spellbook",
"effect": [
{
"math": [
"u_spellcasting_adjustment('duration', 'flag_whitelist': 'ENERVATION_SPELL')",
"=",
"( (u_proficiency('prof_magic_enervation_beginner', 'format': 'percent') / 10) + (u_proficiency('prof_magic_enervation_apprentice', 'format': 'percent') / 10) + (u_proficiency('prof_magic_enervation_master', 'format': 'percent') / 10) ) )"
]
},
{
"math": [
"u_spellcasting_adjustment('aoe', 'flag_whitelist': 'ENERVATION_SPELL')",
"=",
"( (u_proficiency('prof_magic_enervation_beginner', 'format': 'percent') / 10) + (u_proficiency('prof_magic_enervation_apprentice', 'format': 'percent') / 10) + (u_proficiency('prof_magic_enervation_master', 'format': 'percent') / 10) ) )"
]
}
]
},
{
"type": "effect_on_condition",
"id": "EOC_CONVEYANCE_SPELLS_PROFICIENCY_BONUSES",
"eoc_type": "EVENT",
"required_event": "opens_spellbook",
"effect": [
{
"math": [
"u_spellcasting_adjustment('cost', 'flag_whitelist': 'CONVEYANCE_SPELL')",
"=",
"( (u_proficiency('prof_magic_conveyance_beginner', 'format': 'percent') / 10) + (u_proficiency('prof_magic_conveyance_apprentice', 'format': 'percent') / 10) + (u_proficiency('prof_magic_conveyance_master', 'format': 'percent') / 10) ) ) * -1"
]
},
{
"math": [
"u_spellcasting_adjustment('range', 'flag_whitelist': 'CONVEYANCE_SPELL')",
"=",
"( (u_proficiency('prof_magic_conveyance_beginner', 'format': 'percent') / 10) + (u_proficiency('prof_magic_conveyance_apprentice', 'format': 'percent') / 10) + (u_proficiency('prof_magic_conveyance_master', 'format': 'percent') / 10) ) )"
]
}
]
}
]
6 changes: 6 additions & 0 deletions data/mods/Magiclysm/jmath.json
Original file line number Diff line number Diff line change
Expand Up @@ -41,6 +41,12 @@
"num_args": 2,
"return": "_0 + (((((u_proficiency('prof_magic_enhancement_beginner', 'format': 'percent') * 1) / 10) + ((u_proficiency('prof_magic_enhancement_apprentice', 'format': 'percent') * 1) / 10) + ((u_proficiency('prof_magic_enhancement_master', 'format': 'percent') * 1) / 10))) * _1 )"
},
{
"type": "jmath_function",
"id": "enhancement_proficiency_modifier",
"num_args": 0,
"return": "1 + ( (u_proficiency('prof_magic_enhancement_beginner', 'format': 'percent') / 10) + (u_proficiency('prof_magic_enhancement_apprentice', 'format': 'percent') / 10) + (u_proficiency('prof_magic_enhancement_master', 'format': 'percent') / 10) ) )"
},
{
"type": "jmath_function",
"id": "enhancement_proficiency_negate_calculate",
Expand Down
7 changes: 5 additions & 2 deletions data/mods/Magiclysm/magic_balance.md
Original file line number Diff line number Diff line change
Expand Up @@ -97,10 +97,13 @@ Channeling covers spells that require the caster to focus for long periods of ti
Conjuration encompasses spells that summon something or someone, usually for a set period of time. Most Golemancy is covered by this, along with the Animist's Summon Undead, Ignus Fattus, or the Druid's Nature's Bow. Conjuration specializes in spells that temporarily summon something, rather than permanently creating something, which would be a bit more suited to Channeling. Proficiency in Conjuration will lower the mana cost of spells and improve the duration times of summoned creatures/objects.

### Enhancement
Enhancement covers spells that improve the target in some way, mentally, physically, or emotionally. While there are many spells in this class, some of them are Cat's Grace, Ogre's Strength, Eagle's Sight, or Feral Form. Note that spells which exclusively heal are not included, as they are fixing something which is damaged, while Enhancement covers spells which improve on the whole. However, if a spell both heals and buffs something, then it should be included in this. Any spells which exclusively debuff or hinder something should also not be included. Proficiency in Enhancement will lower the casting time of spells and improve the duration of enhancement.
Enhancement covers spells that improve the target in some way, mentally, physically, or emotionally. While there are many spells in this class, some of them are Cat's Grace, Ogre's Strength, Eagle's Sight, or Feral Form. Note that spells which exclusively heal are not included, as they are fixing something which is damaged, while Enhancement covers spells which improve on the whole. However, if a spell both heals and buffs something, then it should be included in this. Any spells which exclusively debuff or hinder something should also not be included; see below. Proficiency in Enhancement will lower the casting time of spells and improve the duration of enhancement.

### Enervation
Enervation spells are the opposite of Enhancement, being spells that reduce the capabilities of the target in some way, such as Slow, A Shadow in the Crowd, or . This includes spells such as Domination or Beguiling the Savage Beast that take control of the target's mind or actions. Spells that do damage as their primary effect but have some debuffing power as an additional ability are not Enervation spells. Proficiency in Enervation will improve the duration of the spell and increase its area of effect.

### Conveyance
Conveyance encompasses spells which involve translocating, teleporting, or moving the caster/target. Some spells covered are Phase Door, Magus's Mark, Shocking Dash, or Translocate Self. Proficiency in Conveyance will extend the range of the spell (if applicable), or lower the casting time if not, and lower the mana cost of the incantation.
Conveyance encompasses spells which involve translocating, teleporting, or moving the caster/target. Some spells covered are Phase Door, Magus's Mark, Shocking Dash, or Translocate Self. Proficiency in Conveyance will extend the range of the spell and lower the mana cost of the incantation.

#### How The JMATH Works
The JMATH behind spellcasting proficiencies is fairly simple, this is how it works:
Expand Down
36 changes: 36 additions & 0 deletions data/mods/Magiclysm/proficiencies.json
Original file line number Diff line number Diff line change
Expand Up @@ -235,6 +235,42 @@
"time_to_learn": "32 h",
"required_proficiencies": [ "prof_magic_enhancement_apprentice" ]
},
{
"type": "proficiency",
"id": "prof_magic_enervation_beginner",
"category": "prof_magic_casting",
"name": { "str": "Novice Enervation" },
"//": "This covers anything that debilitates a target, such as slowing them, silencing them, reducing their regeneration, and so on.",
"description": "You're familiar with debilitating your enemies through magic.",
"can_learn": true,
"default_time_multiplier": 1.5,
"default_skill_penalty": 0.2,
"time_to_learn": "8 h"
},
{
"type": "proficiency",
"id": "prof_magic_enervation_apprentice",
"category": "prof_magic_casting",
"name": { "str": "Apprentice Enervation" },
"description": "You're proficient in debilitating your enemies through magic.",
"can_learn": true,
"default_time_multiplier": 1.5,
"default_skill_penalty": 0.2,
"time_to_learn": "16 h",
"required_proficiencies": [ "prof_magic_enhancement_beginner" ]
},
{
"type": "proficiency",
"id": "prof_magic_enervation_master",
"category": "prof_magic_casting",
"name": { "str": "Master Enervation" },
"description": "You've mastered the art of debilitating your enemies with the power of magical incantations.",
"can_learn": true,
"default_time_multiplier": 1.5,
"default_skill_penalty": 0.2,
"time_to_learn": "32 h",
"required_proficiencies": [ "prof_magic_enhancement_apprentice" ]
},
{
"type": "proficiency",
"id": "prof_magic_conveyance_beginner",
Expand Down
6 changes: 6 additions & 0 deletions src/magic.cpp
Original file line number Diff line number Diff line change
Expand Up @@ -167,6 +167,12 @@ std::string enum_to_string<spell_flag>( spell_flag data )
case spell_flag::NON_MAGICAL: return "NON_MAGICAL";
case spell_flag::PSIONIC: return "PSIONIC";
case spell_flag::RECHARM: return "RECHARM";
case spell_flag::EVOCATION_SPELL: return "EVOCATION_SPELL";
case spell_flag::CHANNELING_SPELL: return "CHANNELING_SPELL";
case spell_flag::CONJURATION_SPELL: return "CONJURATION_SPELL";
case spell_flag::ENHANCEMENT_SPELL: return "ENHANCEMENT_SPELL";
case spell_flag::ENERVATION_SPELL: return "ENERVATION_SPELL";
case spell_flag::CONVEYANCE_SPELL: return "CONVEYANCE_SPELL";
case spell_flag::LAST: break;
}
cata_fatal( "Invalid spell_flag" );
Expand Down
6 changes: 6 additions & 0 deletions src/magic.h
Original file line number Diff line number Diff line change
Expand Up @@ -85,6 +85,12 @@ enum class spell_flag : int {
NON_MAGICAL, // ignores spell resistance
PSIONIC, // psychic powers instead of traditional magic
RECHARM, // charm_monster spell adds to duration of existing charm_monster effect
EVOCATION_SPELL, // Evocation spell category, used for Magiclysm proficiencies
CHANNELING_SPELL, // Channeling spell category, used for Magiclysm proficiencies
CONJURATION_SPELL, // Conjuration spell category, used for Magiclysm proficiencies
ENHANCEMENT_SPELL, // Enhancement spell category, used for Magiclysm proficiencies
ENERVATION_SPELL, // Enervation spell category, used for Magiclysm proficiencies
CONVEYANCE_SPELL, // Conveyance spell category, used for Magiclysm proficiencies
LAST
};

Expand Down

0 comments on commit 291a301

Please sign in to comment.