You signed in with another tab or window. Reload to refresh your session.You signed out in another tab or window. Reload to refresh your session.You switched accounts on another tab or window. Reload to refresh your session.Dismiss alert
### Steps to reproduce
The core of the problem is that the killer does not get unjustified kills where he should and that the mostDamageUnjustified never has any other value than false, which makes it useless.
There are several ways of showing the different nuances of the problem:
Setup:
Modify player_death.lua and/or drop_loot.lua by adding print("drop_loot:", lastHitUnjustified, mostDamageUnjustified) somewhere where it always gets executed (e.g. line 2 for drop_loot.lua and line 5 for player_death.lua)
Procedure 1
Get two players, one killer and one victim
Use the killer to deal damage > 50% of the victims hp
Summon creatures to finish off the victim (e.g. Fire Elemental)
Kill the victim using fire elementals
Look at what gets printed in the terminal: it says false false , which means that neither the last hit nor the most damage was unjustified
Procedure 2
Get three players, two killers and one victim
Use the first killer to deal damage > 50% of the victims hp
Use the second killer to finish off the victim
Look at what gets printed in the terminal: it says true false , which means that the last hit was unjustified, but not the most damage one
Procedure 3
Get two players, one killer and one victim, and also one monster without master (i.e. a regular monster)
Use the killer to deal damage > 50% of the victims hp
Use the victim to "flee" from the killer and get finished off by the monster
Look at what gets printed in the terminal: it says false false , which means that neither the last hit nor the most damage was unjustified
### Behaviour Procedure 1: ### Expected behaviour
The terminal should print true, true
The killer should get an unjustified kill, which he does - as expected.
### Actual behaviour
The terminal prints false, false
The killer was a monster, but it had a master which commanded its behaviour, so for the SQL entry to make sense, it should be registred as an unjustified kill because the last hit was caused by a player.
Most damage was dealt by a player, so this should also register as unjustified.
The killer gets an unjustified kill, as expected.
Procedure 2: ### Expected behaviour
The terminal should print true true
Both killers should get an unjustified kill
### Actual behaviour
The terminal prints true false
Only the lasthit killer gets an unjustified kill
Procedure 3: ### Expected behaviour
The terminal should print false true
The mostDamageKiller should get an unjustified kill
### Actual behaviour
The terminal prints false false
The killer does not get an unjustified kill
Environment
TFS 1.4, Windows, but it should not be environment specific
Reproduction environment
Not necessary, the only change that is recommended is a print, to visualize the problem.
The text was updated successfully, but these errors were encountered:
### Steps to reproduce
The core of the problem is that the killer does not get unjustified kills where he should and that the mostDamageUnjustified never has any other value than false, which makes it useless.
There are several ways of showing the different nuances of the problem:
Setup:
Procedure 1
Procedure 2
Procedure 3
### Behaviour
Procedure 1:
### Expected behaviour
The terminal should print true, true
The killer should get an unjustified kill, which he does - as expected.
### Actual behaviour
The terminal prints false, false
The killer was a monster, but it had a master which commanded its behaviour, so for the SQL entry to make sense, it should be registred as an unjustified kill because the last hit was caused by a player.
Most damage was dealt by a player, so this should also register as unjustified.
The killer gets an unjustified kill, as expected.
Procedure 2:
### Expected behaviour
The terminal should print true true
Both killers should get an unjustified kill
### Actual behaviour
The terminal prints true false
Only the lasthit killer gets an unjustified kill
Procedure 3:
### Expected behaviour
The terminal should print false true
The mostDamageKiller should get an unjustified kill
### Actual behaviour
The terminal prints false false
The killer does not get an unjustified kill
Environment
TFS 1.4, Windows, but it should not be environment specific
Reproduction environment
Not necessary, the only change that is recommended is a print, to visualize the problem.
The text was updated successfully, but these errors were encountered: