Ticket #3973: capture.diff
File capture.diff, 876 bytes (added by , 8 years ago) |
---|
-
binaries/data/mods/public/simulation/components/Attack.js
Attack.prototype.PerformAttack = functio 581 581 { 582 582 let multiplier = this.GetAttackBonus(type, target); 583 583 let cmpHealth = Engine.QueryInterface(target, IID_Health); 584 584 if (!cmpHealth || cmpHealth.GetHitpoints() == 0) 585 585 return; 586 multiplier *= cmpHealth.GetMaxHitpoints() / cmpHealth.GetHitpoints();586 multiplier *= cmpHealth.GetMaxHitpoints() / (0.1 * cmpHealth.GetMaxHitpoints() + 0.9 * cmpHealth.GetHitpoints()); 587 587 588 588 let cmpOwnership = Engine.QueryInterface(this.entity, IID_Ownership); 589 589 if (!cmpOwnership || cmpOwnership.GetOwner() == -1) 590 590 return; 591 591