Skip to content

Added a devour healing routine for necromancers to safe-room. #2292

Merged
rpherbig merged 12 commits intoelanthia-online:masterfrom
jbrock24:add-necro-devour-safe-room-healing
Jan 6, 2018
Merged

Added a devour healing routine for necromancers to safe-room. #2292
rpherbig merged 12 commits intoelanthia-online:masterfrom
jbrock24:add-necro-devour-safe-room-healing

Conversation

@jbrock24
Copy link
Copy Markdown
Contributor

@jbrock24 jbrock24 commented Jan 4, 2018

This happens a bunch at lower circles, which is why I originally added it to my scripts.

…ould help clean them up based on their threshold if they ended combat dinged up. This happens a bunch at lower circles.
@jbrock24
Copy link
Copy Markdown
Contributor Author

jbrock24 commented Jan 4, 2018

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.

@jandersson
Copy link
Copy Markdown
Contributor

What about a setting like necromancer_heal_with_material ?

@jbrock24
Copy link
Copy Markdown
Contributor Author

jbrock24 commented Jan 4, 2018

Smart, lol

@jbrock24
Copy link
Copy Markdown
Contributor Author

jbrock24 commented Jan 5, 2018

@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.

Comment thread safe-room.lic Outdated
fix_standing
elsif settings.necro_safe_room_use_material
devour_healing(settings)
return
Copy link
Copy Markdown
Contributor

Choose a reason for hiding this comment

The reason will be displayed to describe this comment to others. Learn more.

Should this be here? This will skip over give_and_take below

Copy link
Copy Markdown
Contributor Author

Choose a reason for hiding this comment

The reason will be displayed to describe this comment to others. Learn more.

Removed it, thought give_and_take was something else.

Comment thread safe-room.lic
break if result =~ 'What were you'
DRCA.cast_spell(settings.necromancer_healing['Devour'], settings)
devours -= 1 unless right_hand
end
Copy link
Copy Markdown
Contributor

Choose a reason for hiding this comment

The reason will be displayed to describe this comment to others. Learn more.

Do we want to put material back into the harvest container in case we finish healing with some left in hand?

Copy link
Copy Markdown
Contributor Author

Choose a reason for hiding this comment

The reason will be displayed to describe this comment to others. Learn more.

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.

@jbrock24
Copy link
Copy Markdown
Contributor Author

jbrock24 commented Jan 5, 2018

@rpherbig this should be good to go, I've been using it.

Comment thread safe-room.lic Outdated
walk_to(settings.safe_room)
release_invisibility
devours = count_items_in_container('material', settings.thanatology['harvest_container'])
return unless devours > 0
Copy link
Copy Markdown
Contributor

Choose a reason for hiding this comment

The reason will be displayed to describe this comment to others. Learn more.

What do you think about return if devours.zero??

Copy link
Copy Markdown
Contributor Author

Choose a reason for hiding this comment

The reason will be displayed to describe this comment to others. Learn more.

I feel like if I had done that to begin with, you'd be asking me why not return unless devours > 0.

Copy link
Copy Markdown
Contributor

Choose a reason for hiding this comment

The reason will be displayed to describe this comment to others. Learn more.

No, my default position is to use if over unless. It generally reads cleaner (obviously there are exceptions).

Copy link
Copy Markdown
Contributor Author

Choose a reason for hiding this comment

The reason will be displayed to describe this comment to others. Learn more.

Ok, gotcha.

Comment thread safe-room.lic Outdated

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)
Copy link
Copy Markdown
Contributor

Choose a reason for hiding this comment

The reason will be displayed to describe this comment to others. Learn more.

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.

Copy link
Copy Markdown
Contributor Author

Choose a reason for hiding this comment

The reason will be displayed to describe this comment to others. Learn more.

Done.

Comment thread validate.lic
@@ -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

Copy link
Copy Markdown
Contributor

Choose a reason for hiding this comment

The reason will be displayed to describe this comment to others. Learn more.

Is it worth adding a validator for the case in which the user has thanatology['store'] = false but necro_safe_room_use_material: true?

Copy link
Copy Markdown
Contributor Author

Choose a reason for hiding this comment

The reason will be displayed to describe this comment to others. Learn more.

Done, good call.

@rpherbig rpherbig merged commit 0c4d570 into elanthia-online:master Jan 6, 2018
@jbrock24 jbrock24 deleted the add-necro-devour-safe-room-healing branch February 14, 2018 02:11
Sign up for free to join this conversation on GitHub. Already have an account? Sign in to comment

Labels

None yet

Projects

None yet

Development

Successfully merging this pull request may close these issues.

3 participants