Update grid_summons_controller.rb
Set the proper uncap level for transcended summons
This commit is contained in:
parent
c0b2c9502f
commit
645fc07327
1 changed files with 7 additions and 5 deletions
|
|
@ -32,16 +32,18 @@ module Api
|
||||||
|
|
||||||
def update_uncap_level
|
def update_uncap_level
|
||||||
summon = @summon.summon
|
summon = @summon.summon
|
||||||
max_uncap_level = if summon.flb && !summon.ulb
|
max_uncap_level = if summon.flb && !summon.ulb && !summon.xlb
|
||||||
4
|
4
|
||||||
elsif summon.ulb
|
elsif summon.ulb && !summon.xlb
|
||||||
5
|
5
|
||||||
|
elsif summon.xlb
|
||||||
|
6
|
||||||
else
|
else
|
||||||
3
|
3
|
||||||
end
|
end
|
||||||
|
|
||||||
greater_than_max_uncap = summon_params[:uncap_level].to_i > max_uncap_level
|
greater_than_max_uncap = summon_params[:uncap_level].to_i > max_uncap_level
|
||||||
can_be_transcended = summon.xlb && summon_params[:transcendence_step] && summon_params[:transcendence_step]&.to_i.positive?
|
can_be_transcended = summon.xlb && summon_params[:transcendence_step] && summon_params[:transcendence_step]&.to_i&.positive?
|
||||||
|
|
||||||
uncap_level = if greater_than_max_uncap || can_be_transcended
|
uncap_level = if greater_than_max_uncap || can_be_transcended
|
||||||
max_uncap_level
|
max_uncap_level
|
||||||
|
|
@ -130,8 +132,8 @@ module Api
|
||||||
|
|
||||||
def render_grid_summon_view(grid_summon, conflict_position = nil)
|
def render_grid_summon_view(grid_summon, conflict_position = nil)
|
||||||
GridSummonBlueprint.render(grid_summon, view: :nested,
|
GridSummonBlueprint.render(grid_summon, view: :nested,
|
||||||
root: :grid_summon,
|
root: :grid_summon,
|
||||||
meta: { replaced: conflict_position })
|
meta: { replaced: conflict_position })
|
||||||
end
|
end
|
||||||
|
|
||||||
def authorize
|
def authorize
|
||||||
|
|
|
||||||
Loading…
Reference in a new issue