Added a devour healing routine for necromancers to safe-room. #2292
Added a devour healing routine for necromancers to safe-room. #2292rpherbig merged 12 commits intoelanthia-online:masterfrom
Conversation
…ould help clean them up based on their threshold if they ended combat dinged up. This happens a bunch at lower circles.
|
Could use feedback on whether this should be an explicit setting, or based on if devour is found as a setting in the yaml. I almost thing it should be an explicit setting, or it could be the safe-room force && devour. |
|
What about a setting like |
|
Smart, lol |
… had previously added. Reconfigured some of the logic, and added the get to specify the bag which contains it. Also fixed the failure message in the bput.
|
@jandersson and @izawwlgood, How's this look to you guys? I've used it on Melborne but once you can cast Devour better, it becomes unused. It is an option for lower necros. |
| fix_standing | ||
| elsif settings.necro_safe_room_use_material | ||
| devour_healing(settings) | ||
| return |
There was a problem hiding this comment.
Should this be here? This will skip over give_and_take below
There was a problem hiding this comment.
Removed it, thought give_and_take was something else.
| break if result =~ 'What were you' | ||
| DRCA.cast_spell(settings.necromancer_healing['Devour'], settings) | ||
| devours -= 1 unless right_hand | ||
| end |
There was a problem hiding this comment.
Do we want to put material back into the harvest container in case we finish healing with some left in hand?
There was a problem hiding this comment.
Good call, added it. Though it shouldn't pull out a second if there is already some in hand. I use the unless right_hand to avoid getting another out.
…f failed to devour.
|
@rpherbig this should be good to go, I've been using it. |
| walk_to(settings.safe_room) | ||
| release_invisibility | ||
| devours = count_items_in_container('material', settings.thanatology['harvest_container']) | ||
| return unless devours > 0 |
There was a problem hiding this comment.
What do you think about return if devours.zero??
There was a problem hiding this comment.
I feel like if I had done that to begin with, you'd be asking me why not return unless devours > 0.
There was a problem hiding this comment.
No, my default position is to use if over unless. It generally reads cleaner (obviously there are exceptions).
|
|
||
| result = bput("get material in my #{settings.thanatology['harvest_container']}", 'You get', 'You are already', 'What were you') unless right_hand | ||
| break if result =~ 'What were you' | ||
| DRCA.cast_spell(settings.necromancer_healing['Devour'], settings) |
There was a problem hiding this comment.
You need to add common-arcana to custom_require at the top. If you also add include DRCA to the class, you don't need to prefix this function call.
| @@ -355,6 +355,13 @@ class DRYamlValidator | |||
| error("thanatology['ritual_type']: '#{settings.thanatology['ritual_type']}' is invalid, only [preserve, harvest, fetish, cut, dissect, consume, arise, and cycle] are supported at this time.") | |||
| end | |||
|
|
|||
There was a problem hiding this comment.
Is it worth adding a validator for the case in which the user has thanatology['store'] = false but necro_safe_room_use_material: true?
…lso changed to return using the .zero? function.
This happens a bunch at lower circles, which is why I originally added it to my scripts.