This is based on Omori's BlåhajDB
This can be used to easily figure out if the enemy is casting a spell I can cancel, and it gives the user control over each spell individually
There are fully working examples at Flofian - BGXInterruptExamples
Include "Interrupt.h" in your champion script
#include "Interrupt.h"
void InterruptDB::InitializeCancelMenu(tab, smallMenu, boolMenuDanger, debugUseAllies);
Parameter | Type | Description |
---|---|---|
tab |
TreeTab* |
Required. Pre-Created Tab |
smallMenu |
bool |
Optional. This makes the menu less indented |
boolMenuDanger |
int |
Optional. Use this to change the menu from sliders to checkboxes (see below) Set this to the minimal danger level you want to have enabled by default |
debugUseAllies |
bool |
Optional. Only used for debugging, shows menu for allies instead of enemies |
int InterruptDB::getCastingImportance(target);
Parameter | Type | Description |
---|---|---|
target |
game_object_script |
Required. Target to check |
return |
int |
Returned Value If using sliders: returns slider value If using Checkboxes: returns 0 or 1 |
interruptableSpell InterruptDB::getInterruptable(target);
Parameter | Type | Description |
---|---|---|
target |
game_object_script |
Required. Target to check |
return |
interruptableSpell |
Returned Value Custom spelldata struct (see below) |
struct interruptableSpell {
float minRemainingTime;
float maxRemainingTime;
float expectedRemainingTime;
int dangerLevel;
};
Parameter | Description | Example: Pyke Q at cast start | Example: VelKoz R at cast start |
---|---|---|---|
minRemainingTime |
How long the target has to charge the spell | 0 (could release instantly) | 1 (can only recast after 1s) |
maxRemainingTime |
How long the target could theoretically charge the spell | 3 (could charge for 3s) | 2.8 (max duration) |
expectedRemainingTime |
How long the target is most likely to charge the spell | 1 (needs to charge for 1s for full range) | 2.8 (most often used fully) |
dangerLevel |
Same as getCastingImportance | (by default 0, depends on menu) | (by default 3, depends on menu) |
std::string InterruptDB::getCastingImportance(target);
Parameter | Type | Description |
---|---|---|
target |
game_object_script |
Required. Target to check |
return |
std::string |
Returned Value The real name of the champion, since for example Wukong is internally called MonkeyKing |
- Change structure to make it a class, allowing multiple menus (for example 1 boolMenu for Q, 1 boolMenu for R)
- Allow boolMenu to include multiple Spells (for example on Nami: only use R to interrupt Katarina R, and dont use Q)
- Add into stuct if the target can move during the spell
- (Maybe) Figure out how many R shots Jhin has left to fix expectedRemainingTime on him
- (Maybe) Figure out the expectedRemainingTime on more spells based on allies/enemies nearby (example: Janna will stop using R when all allies nearby are full hp)
- (Maybe) Figure out a way to fix buffs not being accurate (example Lucian R)