Think thats a kind of bug:
the system checks if the killer of an enemy belongs to your group and legionaires and fires arent.
thats the problem with xp-to-killer(and his group)- system.
I would like a bit more complex system.
like (thoughts):
a fight against:
1 orc (100hp) - max 200xp
1 mage (60hp) - max 250xp
all winners get 50% of xp by winning.
rest is divided by:
- damage done to enemy unit (50% of the second 50%)
- support spells/screams etc. (50% of the second 50%)
fight procedure:
- Scarlett buffs Rodrick
- Rodrick attacks orc with melee - 30 dmg
- Scarlett attacks mage with fireball - 25dmg
- Rodrick attacks orc with melee - 30 dmg
- Scarlett heals Rodrick - heals (20 hp)
- Rodrick knockdown orc
- Scarlett attacks mage with melee - 10 dmg
- Rodrick attacks orc with melee- 35 dmg
- Scarlett attacks orc with icebolt - 25 dmg -> mage dead
- Rodrick attaks mage with melee - 20 dmg -> orc dead
Rodrick -> orc:
did
30+25+35 = 90 dmg
1x using knockdown
Scarlett -> orc
buffs Rodrick
heals Rodrick - (20hp)
25 dmg (only 10 counts (Rodrick did 90 dmg - hitpoints of orc are 100hp)
calculating:
orc:
200xp -> 50% ground bonus for all -> 100xp left.
Rodrick:
damage xp: 90dmg -> 90% (90dmg on 100hp) of 50xp = 45 xp
support:1 knockdown
support xp: 1/3 (knockdown / 2 scralett support) -> 1/3 of 50xp = 16.7xp
Scralett:
damge xp: 10dmg(10hp left(did 25dmg)) 10% of 50xp = 5xp
support: buffing rodrick, healing rodrick.
support xp: 2/3 -> 2/3 of 50xp = 33.3xp
SUM:
Rodrick gets :100+45+16.7 = 161.7xp
Scarlett gets: 100+10+33.3 = 143.3xp
xp for mage:
250xp -> 125 xp for grund xp and 125 for support and damage xp
Rodrick->mage
did
20 dmg
damage xp: (20dmg/60hp = 1/3) = 1/3*62.5 = 20.8xp
support xp: 0
Scralett->mage
did
30+10=40 dmg
damage xp: (40dmg/60hp = 2/3) = 2/3*62.5 = 41.7xp
attacks with fireball - 30dmg
attacks with melee - 10dmg
support xp: 0
SUM:
Rodrick:
125+20.8 = 145.8xp
Scarlett:
125+41.7 = 166.7
TOTAL battle xp:
Rodrick:161.7 + 145.8 = 307.5xp of max 450xp
Scarlett:143.3 + 166.7 = 310xp of max 450xp
Sorry its becames a bit complected