Issue information

Issue ID
#1652
Status
Fixed
Severity
None
Started
Hercules Elf Bot
Jun 9, 2008 19:02
Last Post
Hercules Elf Bot
Jun 9, 2008 19:02
Confirmation
N/A

Hercules Elf Bot - Jun 9, 2008 19:02

Originally posted by [b]Brainstorm[/b]
http://www.eathena.ws/board/index.php?autocom=bugtracker&showbug=1652

Updated Doc:
CODE
bonus5 bAutoSpellWhenHit,x,y,n,t,i;    n/10% chance to cast skill x of level y when being hit by a direct attack.
                    Target must be within spell's range to go
                    off.
                    t: Trigger criteria:
                       BF_SHORT: Trigger on melee attack
                       BF_LONG: Trigger on ranged attack
                       ( Default: BF_SHORT+BF_LONG )
                      
                       BF_WEAPON: Trigger on weapon skills
                       BF_MAGIC: Trigger on magic skills
                       BF_MISC: Trigger on misc skills
                       ( Default: BF_WEAPON )
                      
                       BF_NORMAL: Trigger on normal
                       attacks.
                       BF_SKILL: Trigger on skills
                       (Default: BF_SKILL if type is BF_MISC or BF_MAGIC, BF_NORMAL if type is BF_WEAPON)
                      
                       i: 1=cast on enemy, not on self
                       2=use random skill lv in [1..y]
                       3=1+2 (random lv on enemy)

Ok, the problems start here:
1) Area spells (meteor storm of dark_lord_card) are always centered on user, no matter what we set.
2) Cards like dark lord, on aegis, trigger with normal attacks AND skills, so the default behavior should be changed to BF_NORMAL + BF_SKILL, so we dont need to set it for every item that is broken.
3) A shitload of cards and items are using the wrong bonus, bAutoSpellWhenHit, which triggers on RANGED and MELEE attacks

EDIT
Ok, i hit a few walls on this now.
Autospellwhenhit uses the same function as normal autospell, meaning that i cant modify the default values without touching attack autospell items too (fireblend as example).
So the 2 viable options:
1) Make a second similar function that has different default flags.
2) Make all these items use:
bonus5 bAutoSpellWhenHit,x,y,n,BF_SHORT|BF_WEAPON|BF_NORMAL|BF_SKILL,i;
(for about 20-30 different items...)

This post has been edited by Brainstorm: Jun 10 2008, 05:10 AM