Skip to content

Commit

Permalink
[Magiclysm] New Spell: Nature's Commune (CleverRaven#48330)
Browse files Browse the repository at this point in the history
* 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 <[email protected]>

Co-authored-by: actual-nh <[email protected]>
Co-authored-by: Curtis Merrill <[email protected]>
  • Loading branch information
3 people authored Jul 12, 2021
1 parent fec9886 commit 00b2a14
Show file tree
Hide file tree
Showing 7 changed files with 59 additions and 4 deletions.
22 changes: 22 additions & 0 deletions data/mods/Magiclysm/Spells/druid.json
Original file line number Diff line number Diff line change
Expand Up @@ -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",
Expand Down
12 changes: 12 additions & 0 deletions data/mods/Magiclysm/effects/effects.json
Original file line number Diff line number Diff line change
Expand Up @@ -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 ] }
}
]
3 changes: 2 additions & 1 deletion data/mods/Magiclysm/itemgroups/spellbooks.json
Original file line number Diff line number Diff line change
Expand Up @@ -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 ]
]
},
{
Expand Down
9 changes: 9 additions & 0 deletions data/mods/Magiclysm/items/spell_scrolls.json
Original file line number Diff line number Diff line change
Expand Up @@ -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",
Expand Down
7 changes: 5 additions & 2 deletions data/mods/Magiclysm/items/spellbooks.json
Original file line number Diff line number Diff line change
Expand Up @@ -225,15 +225,18 @@
"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",
"price": 5000,
"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",
Expand Down
3 changes: 2 additions & 1 deletion data/mods/Magiclysm/professions.json
Original file line number Diff line number Diff line change
Expand Up @@ -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" },
Expand Down
7 changes: 7 additions & 0 deletions src/monster.cpp
Original file line number Diff line number Diff line change
Expand Up @@ -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" );
Expand Down Expand Up @@ -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 ) {
Expand Down

0 comments on commit 00b2a14

Please sign in to comment.