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] New Spell: Nature's Commune #48330

Merged
merged 5 commits into from
Jul 12, 2021
Merged
Show file tree
Hide file tree
Changes from 3 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
22 changes: 22 additions & 0 deletions data/mods/Magiclysm/Spells/druid.json
Original file line number Diff line number Diff line change
Expand Up @@ -396,5 +396,27 @@
"shape": "blast",
"effect": "summon",
"effect_str": "mon_wolf"
},
{
"id": "druid_natures_commune",
"type": "SPELL",
"name": "Nature's Commune",
"description": "Concentrate in the nature around you and commune with it, improving your health and calming the nearby wildlife.",
Termineitor244 marked this conversation as resolved.
Show resolved Hide resolved
"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
}
]
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 in your way." ],
"apply_message": "A warmth embrace surrounds you, like that of a mother with her child.",
Termineitor244 marked this conversation as resolved.
Show resolved Hide resolved
"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 @@ -120,7 +120,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
8 changes: 8 additions & 0 deletions data/mods/Magiclysm/items/spell_scrolls.json
Original file line number Diff line number Diff line change
Expand Up @@ -1026,5 +1026,13 @@
"name": { "str": "Scroll of freezing touch", "str_pl": "Scrolls of freezing touch" },
"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",
"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, revitalize your body while you enter in communion with all that surrounds you.",
Termineitor244 marked this conversation as resolved.
Show resolved Hide resolved
"use_action": { "type": "learn_spell", "spells": [ "druid_natures_commune" ] }
}
]
7 changes: 5 additions & 2 deletions data/mods/Magiclysm/items/spellbooks.json
Original file line number Diff line number Diff line change
Expand Up @@ -221,14 +221,17 @@
"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",
"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 @@ -96,6 +96,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 @@ -1220,6 +1221,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