It's quite simple. TQ has two tables in their database which define the effects and limits of shared battle power.
cq_tutor_type:
| id | User_lev_min | User_lev_max | Student_num | Battle_lev_share |
| 1 | 70 | 109 | 2 | 10 |
| 2 | 110 | 119 | 3 | 15 |
| 3 | 120 | 129 | 5 | 25 |
| 4 | 130 | 133 | 7 | 35 |
| 5 | 134 | 140 | 10 | 50 |
The
cq_tutor_type table controls the percentage of battle power the mentor can share with an apprentice.
cq_tutor_battle_limit_type:
| id | Battle_lev_limit |
| 1 | 100 |
| 10 | 98 |
| 20 | 96 |
| 30 | 93 |
| 40 | 91 |
| 50 | 88 |
| 60 | 86 |
| 70 | 83 |
| 80 | 80 |
| 90 | 77 |
| 100 | 72 |
| 110 | 67 |
| 120 | 62 |
| 130 | 57 |
| 140 | 52 |
| 150 | 50 |
| 160 | 47 |
| 170 | 44 |
| 180 | 40 |
| 190 | 37 |
| 200 | 34 |
| 210 | 30 |
| 220 | 27 |
The second table,
cq_tutor_battle_limit_type controls the maximum shared battle power the apprentice can receive. It it much too large to post here, but I have provided a part of it. It is keyed by the apprentice's battle power (the
id column) and its only other column is the limit.
Calculating the shared battle is quite easy - you need only know the battle power of the mentor, the battle power of the apprentice, and the level of the mentor.
For this example, I'll use a level 130 mentor with 142 battle power and an apprentice with 50 battle power.
Pseudocode:
Code:
mentor_lev = 130
mentor_bp = 142
appr_bp = 50
battle_lev_share = lookup_share(mentor_lev) // battle_lev_share = 35
share = (mentor_bp - appr_bp) * battle_lev_share / 100 // share = 32
share_limit = lookup_limit(appr_bp) // share_limit = 88
result = min(share, share_limit) // result = 32