TASK: Make character deflect projectiles with a %chance.

Since i haven't found any possible way to do it with editor (could miss smth, but doubt it), dicided to try with scripting.

1 - Tried to find "Flags" param info from editor (immunities there mostly, but has a "deflecting" as well), where it is stored. Wanted to put "deflecting" part in some %chance wrap, but can't find any info in files.

2 - After fail with #1 tried to recreate it. And... decided to ask for an advice.

The only thing i can imagine is smth like:


EVENT
OnCharacterUsedSkillOnMe(CHARACTER:character, SKILL_ID:skillID)
IF "c1& "
IsProjectileSkill(SKILL:skill)
.....
THEN
ShootLocalProjectileAt(skill,source,,target)


...for all projectile skills in the game, without any idea how to include ranged auto attacks here.

Thought about deflecting after block - easier with call,
OnBlock(CHARACTER:source, ITEM:source, CHARACTER:target, ITEM:target)
but have no idea how to define target, let alone projectile_skill for action.

Any advice? Or may be there is a simple way to do that? smile