From 00b2a14113f1a9656775403bc4c08346e6a75fd4 Mon Sep 17 00:00:00 2001 From: Termineitor244 <53200489+Termineitor244@users.noreply.github.com> Date: Mon, 12 Jul 2021 16:03:18 -0500 Subject: [PATCH] [Magiclysm] New Spell: Nature's Commune (#48330) * Added new spell "Nature's Commune", and its effect * Update monster.cpp * Added spawns, and added the spell to the Ecoterrorist professions * Apply gramatical suggestions from @actual-nh Co-authored-by: actual-nh <74678550+actual-nh@users.noreply.github.com> Co-authored-by: actual-nh <74678550+actual-nh@users.noreply.github.com> Co-authored-by: Curtis Merrill --- data/mods/Magiclysm/Spells/druid.json | 22 +++++++++++++++++++ data/mods/Magiclysm/effects/effects.json | 12 ++++++++++ .../mods/Magiclysm/itemgroups/spellbooks.json | 3 ++- data/mods/Magiclysm/items/spell_scrolls.json | 9 ++++++++ data/mods/Magiclysm/items/spellbooks.json | 7 ++++-- data/mods/Magiclysm/professions.json | 3 ++- src/monster.cpp | 7 ++++++ 7 files changed, 59 insertions(+), 4 deletions(-) diff --git a/data/mods/Magiclysm/Spells/druid.json b/data/mods/Magiclysm/Spells/druid.json index dbe29be9b020b..2a902d966168a 100644 --- a/data/mods/Magiclysm/Spells/druid.json +++ b/data/mods/Magiclysm/Spells/druid.json @@ -399,6 +399,28 @@ "effect": "summon", "effect_str": "mon_wolf" }, + } + "id": "druid_natures_commune", + "type": "SPELL", + "name": "Nature's Commune", + "description": "You concentrate on the nature around you and commune with it, improving your health and calming the nearby wildlife.", + "valid_targets": [ "self" ], + "effect": "attack", + "effect_str": "natures_commune", + "shape": "blast", + "flags": [ "CONCENTRATE", "SOMATIC", "VERBAL", "NO_LEGS", "NO_HANDS" ], + "energy_source": "MANA", + "spell_class": "DRUID", + "difficulty": 4, + "base_casting_time": 12000, + "base_energy_cost": 250, + "final_energy_cost": 400, + "energy_increment": 10, + "max_level": 20, + "min_duration": 10000, + "max_duration": 40000, + "duration_increment": 2000 + }, { "id": "druid_growth", "type": "SPELL", diff --git a/data/mods/Magiclysm/effects/effects.json b/data/mods/Magiclysm/effects/effects.json index 74e0760460e89..c2392299e553e 100644 --- a/data/mods/Magiclysm/effects/effects.json +++ b/data/mods/Magiclysm/effects/effects.json @@ -300,5 +300,17 @@ "int_add_val": 1, "base_mods": { "speed_mod": [ -25 ] }, "scaling_mods": { "speed_mod": [ -5 ] } + }, + { + "type": "effect_type", + "id": "natures_commune", + "name": [ "Nature's Commune" ], + "desc": [ "You can feel Mother Nature welcoming you, revitalizing your body and calming the natural fauna around you." ], + "apply_message": "A warm embrace surrounds you, like that of a mother with her child.", + "remove_message": "Your commune with Mother Nature fades.", + "rating": "good", + "max_duration": "20 m", + "//": "No morale_mod is currently possible in effects, but this effect should give +5/+10 morale whenever that it's implemented.", + "base_mods": { "health_min": [ 1 ], "health_chance": [ 40 ], "h_mod_min": [ 1 ], "h_mod_chance": [ 80 ] } } ] diff --git a/data/mods/Magiclysm/itemgroups/spellbooks.json b/data/mods/Magiclysm/itemgroups/spellbooks.json index 5fadcf918fdfd..46b508bb2a11d 100644 --- a/data/mods/Magiclysm/itemgroups/spellbooks.json +++ b/data/mods/Magiclysm/itemgroups/spellbooks.json @@ -122,7 +122,8 @@ [ "spell_scroll_improved_knock", 35 ], [ "spell_scroll_knifeshot", 35 ], [ "spell_scroll_feralform", 30 ], - [ "spell_scroll_summon_wolf", 30 ] + [ "spell_scroll_summon_wolf", 30 ], + [ "spell_scroll_natures_commune", 30 ] ] }, { diff --git a/data/mods/Magiclysm/items/spell_scrolls.json b/data/mods/Magiclysm/items/spell_scrolls.json index e4b7a4e43075a..96588e673bd1f 100644 --- a/data/mods/Magiclysm/items/spell_scrolls.json +++ b/data/mods/Magiclysm/items/spell_scrolls.json @@ -1044,6 +1044,15 @@ "description": "Your hands freeze anything they touch at temperatures so cold it slows down your foes.", "use_action": { "type": "learn_spell", "spells": [ "freezing_touch" ] } }, + { + "type": "BOOK", + "copy-from": "spell_scroll", + "id": "spell_scroll_natures_commune", + "//": "Druid spell", + "name": { "str": "Scroll of Nature's Commune", "str_pl": "Scrolls of Nature's Commune" }, + "description": "Your connection with nature allows you to become one with it; you revitalize your body while in communion with the flora and fauna around you.", + "use_action": { "type": "learn_spell", "spells": [ "druid_natures_commune" ] } + }, { "type": "BOOK", "copy-from": "spell_scroll", diff --git a/data/mods/Magiclysm/items/spellbooks.json b/data/mods/Magiclysm/items/spellbooks.json index 070f01e30d43d..98fc6ccea2730 100644 --- a/data/mods/Magiclysm/items/spellbooks.json +++ b/data/mods/Magiclysm/items/spellbooks.json @@ -225,7 +225,7 @@ "id": "druid_spellbook", "type": "BOOK", "name": { "str": "The Book of Trees", "str_pl": "copies of The Book of Trees" }, - "//": "4 Druid spells", + "//": "5 Druid spells", "description": "A bark covered book.", "weight": "355 g", "volume": "500 ml", @@ -233,7 +233,10 @@ "material": [ "paper" ], "symbol": "?", "color": "green", - "use_action": { "type": "learn_spell", "spells": [ "druid_woodshaft", "druid_veggrasp", "druid_rootstrike", "druid_naturebow1" ] } + "use_action": { + "type": "learn_spell", + "spells": [ "druid_woodshaft", "druid_veggrasp", "druid_rootstrike", "druid_naturebow1", "druid_natures_commune" ] + } }, { "id": "recovery_spellbook", diff --git a/data/mods/Magiclysm/professions.json b/data/mods/Magiclysm/professions.json index efd91927f5d9a..caf21206ca043 100644 --- a/data/mods/Magiclysm/professions.json +++ b/data/mods/Magiclysm/professions.json @@ -616,7 +616,8 @@ "spells": [ { "id": "druidic_regrowth", "level": 3 }, { "id": "druid_feralform", "level": 2 }, - { "id": "druid_veggrasp", "level": 2 } + { "id": "druid_veggrasp", "level": 2 }, + { "id": "druid_natures_commune", "level": 2 } ], "skills": [ { "level": 3, "name": "spellcraft" }, diff --git a/src/monster.cpp b/src/monster.cpp index a80fe4a06014e..50dfdd97cd3ad 100644 --- a/src/monster.cpp +++ b/src/monster.cpp @@ -98,6 +98,7 @@ static const efftype_id effect_venom_player1( "venom_player1" ); static const efftype_id effect_venom_player2( "venom_player2" ); static const efftype_id effect_venom_weaken( "venom_weaken" ); static const efftype_id effect_webbed( "webbed" ); +static const efftype_id effect_natures_commune( "natures_commune" ); static const itype_id itype_corpse( "corpse" ); static const itype_id itype_milk( "milk" ); @@ -1194,6 +1195,12 @@ monster_attitude monster::attitude( const Character *u ) const } if( has_flag( MF_ANIMAL ) ) { + if( u->has_effect( effect_natures_commune ) ) { + effective_anger -= 10; + if( effective_anger < 10 ) { + effective_morale += 55; + } + } if( u->has_trait( trait_ANIMALEMPATH ) ) { effective_anger -= 10; if( effective_anger < 10 ) {