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

[common-arcana.lic] Fix use_auto_mana with rituals #6756

Merged
Merged
Changes from all 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
6 changes: 3 additions & 3 deletions common-arcana.lic
Original file line number Diff line number Diff line change
Expand Up @@ -723,7 +723,7 @@ module DRCA
discern_data['cambrinth'] = nil
else
discern =~ /minimum (\d+) mana streams and you think you can reinforce it with (\d+) more/i
calculate_mana(Regexp.last_match(1).to_i, Regexp.last_match(2).to_i, discern_data, data['cyclic'], settings)
calculate_mana(Regexp.last_match(1).to_i, Regexp.last_match(2).to_i, discern_data, data['cyclic'] || data['ritual'], settings)
end
end
pause 1
Expand All @@ -734,7 +734,7 @@ module DRCA
data
end

def calculate_mana(min, more, discern_data, cyclic, settings)
def calculate_mana(min, more, discern_data, cyclic_or_ritual, settings)
total = min + more
total = (total * settings.prep_scaling_factor).floor
discern_data['mana'] = [(total / 5.0).ceil, min].max
Expand All @@ -759,7 +759,7 @@ module DRCA
discern_data['mana'] = discern_data['mana'] + (remaining - total_cambrinth_cap)
remaining = total - discern_data['mana']
end
if cyclic || total_cambrinth_charges == 0
if cyclic_or_ritual || total_cambrinth_charges == 0
discern_data['cambrinth'] = nil
discern_data['mana'] = discern_data['mana'] + remaining
elsif remaining > 0
Expand Down
Loading