2018-06-15 14:50:42 -04:00
|
|
|
// Copyright (c) 2017 PSForever
|
|
|
|
|
package objects
|
|
|
|
|
|
Damages (#225)
* refactored WSA code handling HitMessage, handling SplashMessage, and handling LashMessage; modified projectiles for future functionality
* players can die from being shot now; the damage model is simplistic since main goal was to write around the potential for negative damage ('healed from getting shot'); HitHint works correctly; dedicated AvatarService channel for each avatar helps reduce message spam
* vehicle destruction, and replacement with lightweight wreckage objects upon continent join; made flushing vehicle terminal more accessible
* simple work on vehicle shield charging (amp station benefit) (that's my commit story and I'm sticking with it)
* a flexible calculation workflow that can be applied, grabbing damage information, resistance information, and then combining it with a resolution function; players and vehicles have resistance values; removed redundant damage calculations from WSA
* broke up DamageCalculations, ResistanceCalculations, and ResolutionCalculations into packages under vital; fixed an error with exo-suit calculation resistances; events for dealing with synchronized player and vehicle damage calculations and building the papertrail of those damages; updating codecov.yml file for ignore classes
* added tests for various components (damage model, destroyed vehicle converter, vitality, etc..) and some functionality improvements
* added a field to keep track of how projectiles will be attributed at the time of target death
2018-07-30 09:28:45 -04:00
|
|
|
import net.psforever.objects._
|
2020-08-01 12:25:03 +02:00
|
|
|
import net.psforever.objects.avatar.Avatar
|
Damages (#225)
* refactored WSA code handling HitMessage, handling SplashMessage, and handling LashMessage; modified projectiles for future functionality
* players can die from being shot now; the damage model is simplistic since main goal was to write around the potential for negative damage ('healed from getting shot'); HitHint works correctly; dedicated AvatarService channel for each avatar helps reduce message spam
* vehicle destruction, and replacement with lightweight wreckage objects upon continent join; made flushing vehicle terminal more accessible
* simple work on vehicle shield charging (amp station benefit) (that's my commit story and I'm sticking with it)
* a flexible calculation workflow that can be applied, grabbing damage information, resistance information, and then combining it with a resolution function; players and vehicles have resistance values; removed redundant damage calculations from WSA
* broke up DamageCalculations, ResistanceCalculations, and ResolutionCalculations into packages under vital; fixed an error with exo-suit calculation resistances; events for dealing with synchronized player and vehicle damage calculations and building the papertrail of those damages; updating codecov.yml file for ignore classes
* added tests for various components (damage model, destroyed vehicle converter, vitality, etc..) and some functionality improvements
* added a field to keep track of how projectiles will be attributed at the time of target death
2018-07-30 09:28:45 -04:00
|
|
|
import net.psforever.objects.ballistics._
|
2018-06-15 14:50:42 -04:00
|
|
|
import net.psforever.objects.definition.ProjectileDefinition
|
Damages (#225)
* refactored WSA code handling HitMessage, handling SplashMessage, and handling LashMessage; modified projectiles for future functionality
* players can die from being shot now; the damage model is simplistic since main goal was to write around the potential for negative damage ('healed from getting shot'); HitHint works correctly; dedicated AvatarService channel for each avatar helps reduce message spam
* vehicle destruction, and replacement with lightweight wreckage objects upon continent join; made flushing vehicle terminal more accessible
* simple work on vehicle shield charging (amp station benefit) (that's my commit story and I'm sticking with it)
* a flexible calculation workflow that can be applied, grabbing damage information, resistance information, and then combining it with a resolution function; players and vehicles have resistance values; removed redundant damage calculations from WSA
* broke up DamageCalculations, ResistanceCalculations, and ResolutionCalculations into packages under vital; fixed an error with exo-suit calculation resistances; events for dealing with synchronized player and vehicle damage calculations and building the papertrail of those damages; updating codecov.yml file for ignore classes
* added tests for various components (damage model, destroyed vehicle converter, vitality, etc..) and some functionality improvements
* added a field to keep track of how projectiles will be attributed at the time of target death
2018-07-30 09:28:45 -04:00
|
|
|
import net.psforever.objects.serverobject.mblocker.Locker
|
2023-02-14 00:09:28 -05:00
|
|
|
import net.psforever.objects.sourcing.{ObjectSource, PlayerSource, SourceEntry, VehicleSource}
|
Damage Changes/Explosions (#644)
* created base damage interaction classes and replaced various projectile-based damage that utilized ResolvedProjectile; not refined, maintains redundancy and overloads, but should work
* continuing to reduce the exposure of ResolvedProjectile and replacing it with applications of DamageInteraction, DamageResult, and DamageReason
* removed ResolvedProjectile from the project; adjusted remaining code paths to work around it
* vitals.test became vital.base; no one liked this
* lots of inheritance, polymorphism, and other chicanery; moved around files, so it also looks like more files have changed when they have not (even if they did)
* codecov file correction
* master rebase; vital directory structure changed, so file imports have been modified in several other files; ResolutionSelection has been removed, requiring direct function literal assignment; tests repaired, where necessary; no actual functional change
* code comments
* DamageResult is its own case class now, wrapping around a before/after target and the interaction used in its calaculations; tests have been corrected
* adjusted Player.Die() to demonstrate a damage-based suicide approach
* resolved circular inheritance in projectile damage modifiers; better employed explosion reason, damages players around exploding vehicle as example
* expanded explosions to other object types; exploding is now a flag and the damage is an innate property of the object type; removed advanced references to properties on the damage source, since the damage source is easily accessible; wrote comments; fixed tests
* overhaul to painbox damage to align with normal player damage handling, thus assimilating it properly into the damage system
* future development; normal vector from euler angles; custom proximity test
* where 'innateDamage' should have not replaced 'explosion'
* moved the hitPos for the generator test; attempting to imrpove the reliability of the auto-repair integration tests (didn't ...)
* spelling and private val
2020-12-08 14:32:42 -05:00
|
|
|
import net.psforever.objects.vital.base.{DamageResolution, DamageType}
|
|
|
|
|
import net.psforever.objects.vital.interaction.DamageInteraction
|
|
|
|
|
import net.psforever.objects.vital.projectile.ProjectileReason
|
2020-01-06 08:45:55 -05:00
|
|
|
import net.psforever.types.{PlanetSideGUID, _}
|
2018-06-15 14:50:42 -04:00
|
|
|
import org.specs2.mutable.Specification
|
|
|
|
|
|
|
|
|
|
class ProjectileTest extends Specification {
|
2023-02-14 00:09:28 -05:00
|
|
|
val player: Player = Player(Avatar(0, "TestCharacter", PlanetSideEmpire.TR, CharacterSex.Male, 0, CharacterVoice.Mute))
|
|
|
|
|
val fury: Vehicle = Vehicle(GlobalDefinitions.fury)
|
Damages (#225)
* refactored WSA code handling HitMessage, handling SplashMessage, and handling LashMessage; modified projectiles for future functionality
* players can die from being shot now; the damage model is simplistic since main goal was to write around the potential for negative damage ('healed from getting shot'); HitHint works correctly; dedicated AvatarService channel for each avatar helps reduce message spam
* vehicle destruction, and replacement with lightweight wreckage objects upon continent join; made flushing vehicle terminal more accessible
* simple work on vehicle shield charging (amp station benefit) (that's my commit story and I'm sticking with it)
* a flexible calculation workflow that can be applied, grabbing damage information, resistance information, and then combining it with a resolution function; players and vehicles have resistance values; removed redundant damage calculations from WSA
* broke up DamageCalculations, ResistanceCalculations, and ResolutionCalculations into packages under vital; fixed an error with exo-suit calculation resistances; events for dealing with synchronized player and vehicle damage calculations and building the papertrail of those damages; updating codecov.yml file for ignore classes
* added tests for various components (damage model, destroyed vehicle converter, vitality, etc..) and some functionality improvements
* added a field to keep track of how projectiles will be attributed at the time of target death
2018-07-30 09:28:45 -04:00
|
|
|
|
2020-09-15 19:46:56 -04:00
|
|
|
"Range" should {
|
Damages (#225)
* refactored WSA code handling HitMessage, handling SplashMessage, and handling LashMessage; modified projectiles for future functionality
* players can die from being shot now; the damage model is simplistic since main goal was to write around the potential for negative damage ('healed from getting shot'); HitHint works correctly; dedicated AvatarService channel for each avatar helps reduce message spam
* vehicle destruction, and replacement with lightweight wreckage objects upon continent join; made flushing vehicle terminal more accessible
* simple work on vehicle shield charging (amp station benefit) (that's my commit story and I'm sticking with it)
* a flexible calculation workflow that can be applied, grabbing damage information, resistance information, and then combining it with a resolution function; players and vehicles have resistance values; removed redundant damage calculations from WSA
* broke up DamageCalculations, ResistanceCalculations, and ResolutionCalculations into packages under vital; fixed an error with exo-suit calculation resistances; events for dealing with synchronized player and vehicle damage calculations and building the papertrail of those damages; updating codecov.yml file for ignore classes
* added tests for various components (damage model, destroyed vehicle converter, vitality, etc..) and some functionality improvements
* added a field to keep track of how projectiles will be attributed at the time of target death
2018-07-30 09:28:45 -04:00
|
|
|
"local projectile range" in {
|
2020-08-01 12:25:03 +02:00
|
|
|
Projectile.baseUID < Projectile.rangeUID mustEqual true
|
Damages (#225)
* refactored WSA code handling HitMessage, handling SplashMessage, and handling LashMessage; modified projectiles for future functionality
* players can die from being shot now; the damage model is simplistic since main goal was to write around the potential for negative damage ('healed from getting shot'); HitHint works correctly; dedicated AvatarService channel for each avatar helps reduce message spam
* vehicle destruction, and replacement with lightweight wreckage objects upon continent join; made flushing vehicle terminal more accessible
* simple work on vehicle shield charging (amp station benefit) (that's my commit story and I'm sticking with it)
* a flexible calculation workflow that can be applied, grabbing damage information, resistance information, and then combining it with a resolution function; players and vehicles have resistance values; removed redundant damage calculations from WSA
* broke up DamageCalculations, ResistanceCalculations, and ResolutionCalculations into packages under vital; fixed an error with exo-suit calculation resistances; events for dealing with synchronized player and vehicle damage calculations and building the papertrail of those damages; updating codecov.yml file for ignore classes
* added tests for various components (damage model, destroyed vehicle converter, vitality, etc..) and some functionality improvements
* added a field to keep track of how projectiles will be attributed at the time of target death
2018-07-30 09:28:45 -04:00
|
|
|
}
|
2018-06-15 14:50:42 -04:00
|
|
|
}
|
|
|
|
|
|
|
|
|
|
"ProjectileDefinition" should {
|
|
|
|
|
"define (default)" in {
|
|
|
|
|
val obj = new ProjectileDefinition(31) //9mmbullet_projectile
|
|
|
|
|
|
2022-03-27 19:57:32 -04:00
|
|
|
obj.ProjectileType mustEqual Projectiles.Types.bullet_9mm_projectile
|
2018-06-15 14:50:42 -04:00
|
|
|
obj.ObjectId mustEqual 31
|
|
|
|
|
obj.Damage0 mustEqual 0
|
|
|
|
|
obj.Damage1 mustEqual 0
|
|
|
|
|
obj.Damage2 mustEqual 0
|
|
|
|
|
obj.Damage3 mustEqual 0
|
|
|
|
|
obj.Damage4 mustEqual 0
|
|
|
|
|
obj.Acceleration mustEqual 0
|
|
|
|
|
obj.AccelerationUntil mustEqual 0f
|
|
|
|
|
obj.ProjectileDamageType mustEqual DamageType.None
|
|
|
|
|
obj.ProjectileDamageTypeSecondary mustEqual DamageType.None
|
|
|
|
|
obj.DegradeDelay mustEqual 1f
|
|
|
|
|
obj.DegradeMultiplier mustEqual 1f
|
|
|
|
|
obj.InitialVelocity mustEqual 1
|
|
|
|
|
obj.Lifespan mustEqual 1f
|
|
|
|
|
obj.DamageAtEdge mustEqual 1f
|
2020-09-05 09:08:18 -04:00
|
|
|
obj.DamageRadius mustEqual 0f
|
2018-06-15 14:50:42 -04:00
|
|
|
obj.UseDamage1Subtract mustEqual false
|
|
|
|
|
}
|
|
|
|
|
|
|
|
|
|
"define (custom)" in {
|
|
|
|
|
val obj = new ProjectileDefinition(31) //9mmbullet_projectile
|
|
|
|
|
obj.Damage0 = 2
|
|
|
|
|
obj.Damage1 = 4
|
|
|
|
|
obj.Damage2 = 8
|
|
|
|
|
obj.Damage3 = 16
|
|
|
|
|
obj.Damage4 = 32
|
|
|
|
|
obj.Acceleration = 5
|
|
|
|
|
obj.AccelerationUntil = 5.5f
|
|
|
|
|
obj.ProjectileDamageType = DamageType.Splash
|
|
|
|
|
obj.ProjectileDamageTypeSecondary = DamageType.Radiation
|
|
|
|
|
obj.DegradeDelay = 11.1f
|
|
|
|
|
obj.DegradeMultiplier = 22.2f
|
|
|
|
|
obj.InitialVelocity = 50
|
|
|
|
|
obj.Lifespan = 11.2f
|
|
|
|
|
obj.DamageAtEdge = 3f
|
|
|
|
|
obj.DamageRadius = 3f
|
|
|
|
|
obj.UseDamage1Subtract = true
|
|
|
|
|
|
|
|
|
|
obj.Damage0 mustEqual 2
|
|
|
|
|
obj.Damage1 mustEqual 4
|
|
|
|
|
obj.Damage2 mustEqual 8
|
|
|
|
|
obj.Damage3 mustEqual 16
|
|
|
|
|
obj.Damage4 mustEqual 32
|
|
|
|
|
obj.Acceleration mustEqual 5
|
|
|
|
|
obj.AccelerationUntil mustEqual 5.5f
|
|
|
|
|
obj.ProjectileDamageType mustEqual DamageType.Splash
|
|
|
|
|
obj.ProjectileDamageTypeSecondary mustEqual DamageType.Radiation
|
|
|
|
|
obj.DegradeDelay mustEqual 11.1f
|
|
|
|
|
obj.DegradeMultiplier mustEqual 22.2f
|
|
|
|
|
obj.InitialVelocity mustEqual 50
|
|
|
|
|
obj.Lifespan mustEqual 11.2f
|
|
|
|
|
obj.DamageAtEdge mustEqual 3f
|
|
|
|
|
obj.DamageRadius mustEqual 3f
|
|
|
|
|
obj.UseDamage1Subtract mustEqual true
|
|
|
|
|
}
|
|
|
|
|
|
|
|
|
|
"define (failure)" in {
|
2022-03-27 19:57:32 -04:00
|
|
|
Projectiles.Types(31) mustEqual Projectiles.Types.bullet_9mm_projectile
|
2018-06-15 14:50:42 -04:00
|
|
|
try {
|
2022-03-27 19:57:32 -04:00
|
|
|
ProjectileDefinition(Projectiles.Types.bullet_9mm_projectile) //passes
|
2020-07-14 05:54:05 +02:00
|
|
|
} catch {
|
|
|
|
|
case _: NoSuchElementException =>
|
2018-06-15 14:50:42 -04:00
|
|
|
ko
|
|
|
|
|
}
|
|
|
|
|
|
|
|
|
|
Projectiles(2) must throwA[NoSuchElementException]
|
|
|
|
|
new ProjectileDefinition(2) must throwA[NoSuchElementException]
|
|
|
|
|
}
|
|
|
|
|
|
|
|
|
|
"cascade damage values" in {
|
|
|
|
|
val obj = new ProjectileDefinition(31) //9mmbullet_projectile
|
|
|
|
|
obj.Damage4 = 32
|
|
|
|
|
obj.Damage3 = 16
|
|
|
|
|
obj.Damage2 = 8
|
|
|
|
|
obj.Damage1 = 4
|
|
|
|
|
obj.Damage0 = 2
|
|
|
|
|
|
|
|
|
|
//initial
|
|
|
|
|
obj.Damage4 mustEqual 32
|
|
|
|
|
obj.Damage3 mustEqual 16
|
|
|
|
|
obj.Damage2 mustEqual 8
|
|
|
|
|
obj.Damage1 mustEqual 4
|
|
|
|
|
obj.Damage0 mustEqual 2
|
|
|
|
|
//negate Damage4
|
|
|
|
|
obj.Damage4 = None
|
|
|
|
|
obj.Damage4 mustEqual 16
|
|
|
|
|
obj.Damage3 mustEqual 16
|
|
|
|
|
obj.Damage2 mustEqual 8
|
|
|
|
|
obj.Damage1 mustEqual 4
|
|
|
|
|
obj.Damage0 mustEqual 2
|
|
|
|
|
//negate Damage3
|
|
|
|
|
obj.Damage3 = None
|
|
|
|
|
obj.Damage4 mustEqual 8
|
|
|
|
|
obj.Damage3 mustEqual 8
|
|
|
|
|
obj.Damage2 mustEqual 8
|
|
|
|
|
obj.Damage1 mustEqual 4
|
|
|
|
|
obj.Damage0 mustEqual 2
|
|
|
|
|
//negate Damage2
|
|
|
|
|
obj.Damage2 = None
|
|
|
|
|
obj.Damage4 mustEqual 4
|
|
|
|
|
obj.Damage3 mustEqual 4
|
|
|
|
|
obj.Damage2 mustEqual 4
|
|
|
|
|
obj.Damage1 mustEqual 4
|
|
|
|
|
obj.Damage0 mustEqual 2
|
|
|
|
|
//negate Damage1
|
|
|
|
|
obj.Damage1 = None
|
|
|
|
|
obj.Damage4 mustEqual 2
|
|
|
|
|
obj.Damage3 mustEqual 2
|
|
|
|
|
obj.Damage2 mustEqual 2
|
|
|
|
|
obj.Damage1 mustEqual 2
|
|
|
|
|
obj.Damage0 mustEqual 2
|
|
|
|
|
//negate Damage0
|
|
|
|
|
obj.Damage0 = None
|
|
|
|
|
obj.Damage4 mustEqual 0
|
|
|
|
|
obj.Damage3 mustEqual 0
|
|
|
|
|
obj.Damage2 mustEqual 0
|
|
|
|
|
obj.Damage1 mustEqual 0
|
|
|
|
|
obj.Damage0 mustEqual 0
|
|
|
|
|
//set Damage3, set Damage0
|
|
|
|
|
obj.Damage3 = 13
|
|
|
|
|
obj.Damage0 = 7
|
|
|
|
|
obj.Damage4 mustEqual 13
|
|
|
|
|
obj.Damage3 mustEqual 13
|
|
|
|
|
obj.Damage2 mustEqual 7
|
|
|
|
|
obj.Damage1 mustEqual 7
|
|
|
|
|
obj.Damage0 mustEqual 7
|
|
|
|
|
}
|
|
|
|
|
}
|
|
|
|
|
|
Damages (#225)
* refactored WSA code handling HitMessage, handling SplashMessage, and handling LashMessage; modified projectiles for future functionality
* players can die from being shot now; the damage model is simplistic since main goal was to write around the potential for negative damage ('healed from getting shot'); HitHint works correctly; dedicated AvatarService channel for each avatar helps reduce message spam
* vehicle destruction, and replacement with lightweight wreckage objects upon continent join; made flushing vehicle terminal more accessible
* simple work on vehicle shield charging (amp station benefit) (that's my commit story and I'm sticking with it)
* a flexible calculation workflow that can be applied, grabbing damage information, resistance information, and then combining it with a resolution function; players and vehicles have resistance values; removed redundant damage calculations from WSA
* broke up DamageCalculations, ResistanceCalculations, and ResolutionCalculations into packages under vital; fixed an error with exo-suit calculation resistances; events for dealing with synchronized player and vehicle damage calculations and building the papertrail of those damages; updating codecov.yml file for ignore classes
* added tests for various components (damage model, destroyed vehicle converter, vitality, etc..) and some functionality improvements
* added a field to keep track of how projectiles will be attributed at the time of target death
2018-07-30 09:28:45 -04:00
|
|
|
"SourceEntry" should {
|
|
|
|
|
"construct for players" in {
|
|
|
|
|
SourceEntry(player) match {
|
2020-07-14 05:54:05 +02:00
|
|
|
case o: PlayerSource =>
|
Damages (#225)
* refactored WSA code handling HitMessage, handling SplashMessage, and handling LashMessage; modified projectiles for future functionality
* players can die from being shot now; the damage model is simplistic since main goal was to write around the potential for negative damage ('healed from getting shot'); HitHint works correctly; dedicated AvatarService channel for each avatar helps reduce message spam
* vehicle destruction, and replacement with lightweight wreckage objects upon continent join; made flushing vehicle terminal more accessible
* simple work on vehicle shield charging (amp station benefit) (that's my commit story and I'm sticking with it)
* a flexible calculation workflow that can be applied, grabbing damage information, resistance information, and then combining it with a resolution function; players and vehicles have resistance values; removed redundant damage calculations from WSA
* broke up DamageCalculations, ResistanceCalculations, and ResolutionCalculations into packages under vital; fixed an error with exo-suit calculation resistances; events for dealing with synchronized player and vehicle damage calculations and building the papertrail of those damages; updating codecov.yml file for ignore classes
* added tests for various components (damage model, destroyed vehicle converter, vitality, etc..) and some functionality improvements
* added a field to keep track of how projectiles will be attributed at the time of target death
2018-07-30 09:28:45 -04:00
|
|
|
o.Name mustEqual "TestCharacter"
|
|
|
|
|
o.Faction mustEqual PlanetSideEmpire.TR
|
|
|
|
|
o.Seated mustEqual false
|
|
|
|
|
o.ExoSuit mustEqual ExoSuitType.Standard
|
|
|
|
|
o.Health mustEqual 0
|
|
|
|
|
o.Armor mustEqual 0
|
|
|
|
|
o.Definition mustEqual GlobalDefinitions.avatar
|
|
|
|
|
o.Position mustEqual Vector3.Zero
|
|
|
|
|
o.Orientation mustEqual Vector3.Zero
|
2023-02-14 00:09:28 -05:00
|
|
|
o.Velocity.isEmpty mustEqual true
|
Damages (#225)
* refactored WSA code handling HitMessage, handling SplashMessage, and handling LashMessage; modified projectiles for future functionality
* players can die from being shot now; the damage model is simplistic since main goal was to write around the potential for negative damage ('healed from getting shot'); HitHint works correctly; dedicated AvatarService channel for each avatar helps reduce message spam
* vehicle destruction, and replacement with lightweight wreckage objects upon continent join; made flushing vehicle terminal more accessible
* simple work on vehicle shield charging (amp station benefit) (that's my commit story and I'm sticking with it)
* a flexible calculation workflow that can be applied, grabbing damage information, resistance information, and then combining it with a resolution function; players and vehicles have resistance values; removed redundant damage calculations from WSA
* broke up DamageCalculations, ResistanceCalculations, and ResolutionCalculations into packages under vital; fixed an error with exo-suit calculation resistances; events for dealing with synchronized player and vehicle damage calculations and building the papertrail of those damages; updating codecov.yml file for ignore classes
* added tests for various components (damage model, destroyed vehicle converter, vitality, etc..) and some functionality improvements
* added a field to keep track of how projectiles will be attributed at the time of target death
2018-07-30 09:28:45 -04:00
|
|
|
case _ =>
|
|
|
|
|
ko
|
|
|
|
|
}
|
|
|
|
|
}
|
|
|
|
|
|
|
|
|
|
"construct for vehicles" in {
|
|
|
|
|
SourceEntry(fury) match {
|
2020-07-14 05:54:05 +02:00
|
|
|
case o: VehicleSource =>
|
Damages (#225)
* refactored WSA code handling HitMessage, handling SplashMessage, and handling LashMessage; modified projectiles for future functionality
* players can die from being shot now; the damage model is simplistic since main goal was to write around the potential for negative damage ('healed from getting shot'); HitHint works correctly; dedicated AvatarService channel for each avatar helps reduce message spam
* vehicle destruction, and replacement with lightweight wreckage objects upon continent join; made flushing vehicle terminal more accessible
* simple work on vehicle shield charging (amp station benefit) (that's my commit story and I'm sticking with it)
* a flexible calculation workflow that can be applied, grabbing damage information, resistance information, and then combining it with a resolution function; players and vehicles have resistance values; removed redundant damage calculations from WSA
* broke up DamageCalculations, ResistanceCalculations, and ResolutionCalculations into packages under vital; fixed an error with exo-suit calculation resistances; events for dealing with synchronized player and vehicle damage calculations and building the papertrail of those damages; updating codecov.yml file for ignore classes
* added tests for various components (damage model, destroyed vehicle converter, vitality, etc..) and some functionality improvements
* added a field to keep track of how projectiles will be attributed at the time of target death
2018-07-30 09:28:45 -04:00
|
|
|
o.Name mustEqual "Fury"
|
Destroy and repair (#346)
* bog-standard order_terminal amenities now take damage up to the point of destruction and can be repaired from destruction to functional to the point of being fully repaired; this is mostly proof fo concept
* restored proper destruction to FacilityTurrets; extended proper rrepairs to FacilityTurrets; co-opted terminal hacking into TerminalControl; started to expand on hacking protocol, but chose restraint
* changes made thus that a clear Definition hierarchy is established; all of this is in line with making future changes to repair/destroy variables, and making generic the repair code
* all meaningful facility amenities take damage and can be repaired; spawn tubes can be destroyed and the base will properly lose spawns (and show it on the map); some hack logic has been redistributed into the appropriate control objects, following in the wake of repair/damage logic
* deployables are repairable; the TRAP has been converted into a ComplexDeployable; changed the nature of the Repairable traits
* player bank repair and medapp heal has been moved out from WSA into PlayerControl
* overhaul of Progress callback system and the inclusion of player revival as a Progress activity
* begun relocating functionality for hacking outside of WSA; set up behavoir mixin for cargo operations, in order to move vehicle hack function, but did not yet integrate
* integration of the actor behavior mixin for vehicle cargo operations to support the integration of vehicle hacking finalization
* establishing inheritance/override potential of Damageable activity; Generator and SpawnTube map behavior behavior (currently inactive)
* ImplantTerminalMech objects now have a 'with-coordinates' constructor and a deprecated 'no-coordinates' constructor; implants mechs and interfaces are now damageable and repairable, and their damage state can also block mounting
* generators are destroyed and repaired properly, and even explode, killing a radius-worth of players
* destroy and repair pass on deployables, except for explosive types
* Damageable pass; client synchronization pass
* helpful comments
* some tests for damageable and repairable; refined output and repaired existing tests
* enabled friendly fire check and recovery
* handled friendly fire against allied mines; moved jammer code to common damageable behavior
* tweaks to damageability, infantry heal and repair, and sensor and explosive animations
* animations; framework for future vitals events; closing database connections
* adding some deployable tests; fixing a bunch of other tests; History is back
* testing for basic Damageable functions; removing a log message
* finicky animation stuff
* event messages to the Generator to represent health changes
* damage against BFR's is now only used against mythical creatures
* test fix
2020-04-14 15:17:32 -04:00
|
|
|
o.Faction mustEqual PlanetSideEmpire.NEUTRAL
|
Damages (#225)
* refactored WSA code handling HitMessage, handling SplashMessage, and handling LashMessage; modified projectiles for future functionality
* players can die from being shot now; the damage model is simplistic since main goal was to write around the potential for negative damage ('healed from getting shot'); HitHint works correctly; dedicated AvatarService channel for each avatar helps reduce message spam
* vehicle destruction, and replacement with lightweight wreckage objects upon continent join; made flushing vehicle terminal more accessible
* simple work on vehicle shield charging (amp station benefit) (that's my commit story and I'm sticking with it)
* a flexible calculation workflow that can be applied, grabbing damage information, resistance information, and then combining it with a resolution function; players and vehicles have resistance values; removed redundant damage calculations from WSA
* broke up DamageCalculations, ResistanceCalculations, and ResolutionCalculations into packages under vital; fixed an error with exo-suit calculation resistances; events for dealing with synchronized player and vehicle damage calculations and building the papertrail of those damages; updating codecov.yml file for ignore classes
* added tests for various components (damage model, destroyed vehicle converter, vitality, etc..) and some functionality improvements
* added a field to keep track of how projectiles will be attributed at the time of target death
2018-07-30 09:28:45 -04:00
|
|
|
o.Definition mustEqual GlobalDefinitions.fury
|
|
|
|
|
o.Health mustEqual 650
|
|
|
|
|
o.Shields mustEqual 0
|
|
|
|
|
o.Position mustEqual Vector3.Zero
|
|
|
|
|
o.Orientation mustEqual Vector3.Zero
|
2023-02-14 00:09:28 -05:00
|
|
|
o.Velocity.isEmpty mustEqual true
|
Damages (#225)
* refactored WSA code handling HitMessage, handling SplashMessage, and handling LashMessage; modified projectiles for future functionality
* players can die from being shot now; the damage model is simplistic since main goal was to write around the potential for negative damage ('healed from getting shot'); HitHint works correctly; dedicated AvatarService channel for each avatar helps reduce message spam
* vehicle destruction, and replacement with lightweight wreckage objects upon continent join; made flushing vehicle terminal more accessible
* simple work on vehicle shield charging (amp station benefit) (that's my commit story and I'm sticking with it)
* a flexible calculation workflow that can be applied, grabbing damage information, resistance information, and then combining it with a resolution function; players and vehicles have resistance values; removed redundant damage calculations from WSA
* broke up DamageCalculations, ResistanceCalculations, and ResolutionCalculations into packages under vital; fixed an error with exo-suit calculation resistances; events for dealing with synchronized player and vehicle damage calculations and building the papertrail of those damages; updating codecov.yml file for ignore classes
* added tests for various components (damage model, destroyed vehicle converter, vitality, etc..) and some functionality improvements
* added a field to keep track of how projectiles will be attributed at the time of target death
2018-07-30 09:28:45 -04:00
|
|
|
case _ =>
|
|
|
|
|
ko
|
|
|
|
|
}
|
|
|
|
|
}
|
|
|
|
|
|
|
|
|
|
"construct for generic object" in {
|
2023-02-14 00:09:28 -05:00
|
|
|
val obj = Tool(GlobalDefinitions.suppressor)
|
|
|
|
|
obj.GUID = PlanetSideGUID(1)
|
Damages (#225)
* refactored WSA code handling HitMessage, handling SplashMessage, and handling LashMessage; modified projectiles for future functionality
* players can die from being shot now; the damage model is simplistic since main goal was to write around the potential for negative damage ('healed from getting shot'); HitHint works correctly; dedicated AvatarService channel for each avatar helps reduce message spam
* vehicle destruction, and replacement with lightweight wreckage objects upon continent join; made flushing vehicle terminal more accessible
* simple work on vehicle shield charging (amp station benefit) (that's my commit story and I'm sticking with it)
* a flexible calculation workflow that can be applied, grabbing damage information, resistance information, and then combining it with a resolution function; players and vehicles have resistance values; removed redundant damage calculations from WSA
* broke up DamageCalculations, ResistanceCalculations, and ResolutionCalculations into packages under vital; fixed an error with exo-suit calculation resistances; events for dealing with synchronized player and vehicle damage calculations and building the papertrail of those damages; updating codecov.yml file for ignore classes
* added tests for various components (damage model, destroyed vehicle converter, vitality, etc..) and some functionality improvements
* added a field to keep track of how projectiles will be attributed at the time of target death
2018-07-30 09:28:45 -04:00
|
|
|
SourceEntry(obj) match {
|
2020-07-14 05:54:05 +02:00
|
|
|
case o: ObjectSource =>
|
2023-02-14 00:09:28 -05:00
|
|
|
o.Name mustEqual "Suppressor"
|
Damages (#225)
* refactored WSA code handling HitMessage, handling SplashMessage, and handling LashMessage; modified projectiles for future functionality
* players can die from being shot now; the damage model is simplistic since main goal was to write around the potential for negative damage ('healed from getting shot'); HitHint works correctly; dedicated AvatarService channel for each avatar helps reduce message spam
* vehicle destruction, and replacement with lightweight wreckage objects upon continent join; made flushing vehicle terminal more accessible
* simple work on vehicle shield charging (amp station benefit) (that's my commit story and I'm sticking with it)
* a flexible calculation workflow that can be applied, grabbing damage information, resistance information, and then combining it with a resolution function; players and vehicles have resistance values; removed redundant damage calculations from WSA
* broke up DamageCalculations, ResistanceCalculations, and ResolutionCalculations into packages under vital; fixed an error with exo-suit calculation resistances; events for dealing with synchronized player and vehicle damage calculations and building the papertrail of those damages; updating codecov.yml file for ignore classes
* added tests for various components (damage model, destroyed vehicle converter, vitality, etc..) and some functionality improvements
* added a field to keep track of how projectiles will be attributed at the time of target death
2018-07-30 09:28:45 -04:00
|
|
|
o.Faction mustEqual PlanetSideEmpire.NEUTRAL
|
2023-02-14 00:09:28 -05:00
|
|
|
o.Definition mustEqual GlobalDefinitions.suppressor
|
Damages (#225)
* refactored WSA code handling HitMessage, handling SplashMessage, and handling LashMessage; modified projectiles for future functionality
* players can die from being shot now; the damage model is simplistic since main goal was to write around the potential for negative damage ('healed from getting shot'); HitHint works correctly; dedicated AvatarService channel for each avatar helps reduce message spam
* vehicle destruction, and replacement with lightweight wreckage objects upon continent join; made flushing vehicle terminal more accessible
* simple work on vehicle shield charging (amp station benefit) (that's my commit story and I'm sticking with it)
* a flexible calculation workflow that can be applied, grabbing damage information, resistance information, and then combining it with a resolution function; players and vehicles have resistance values; removed redundant damage calculations from WSA
* broke up DamageCalculations, ResistanceCalculations, and ResolutionCalculations into packages under vital; fixed an error with exo-suit calculation resistances; events for dealing with synchronized player and vehicle damage calculations and building the papertrail of those damages; updating codecov.yml file for ignore classes
* added tests for various components (damage model, destroyed vehicle converter, vitality, etc..) and some functionality improvements
* added a field to keep track of how projectiles will be attributed at the time of target death
2018-07-30 09:28:45 -04:00
|
|
|
o.Position mustEqual Vector3.Zero
|
|
|
|
|
o.Orientation mustEqual Vector3.Zero
|
2023-02-14 00:09:28 -05:00
|
|
|
o.Velocity.isEmpty mustEqual true
|
Damages (#225)
* refactored WSA code handling HitMessage, handling SplashMessage, and handling LashMessage; modified projectiles for future functionality
* players can die from being shot now; the damage model is simplistic since main goal was to write around the potential for negative damage ('healed from getting shot'); HitHint works correctly; dedicated AvatarService channel for each avatar helps reduce message spam
* vehicle destruction, and replacement with lightweight wreckage objects upon continent join; made flushing vehicle terminal more accessible
* simple work on vehicle shield charging (amp station benefit) (that's my commit story and I'm sticking with it)
* a flexible calculation workflow that can be applied, grabbing damage information, resistance information, and then combining it with a resolution function; players and vehicles have resistance values; removed redundant damage calculations from WSA
* broke up DamageCalculations, ResistanceCalculations, and ResolutionCalculations into packages under vital; fixed an error with exo-suit calculation resistances; events for dealing with synchronized player and vehicle damage calculations and building the papertrail of those damages; updating codecov.yml file for ignore classes
* added tests for various components (damage model, destroyed vehicle converter, vitality, etc..) and some functionality improvements
* added a field to keep track of how projectiles will be attributed at the time of target death
2018-07-30 09:28:45 -04:00
|
|
|
case _ =>
|
|
|
|
|
ko
|
|
|
|
|
}
|
|
|
|
|
}
|
|
|
|
|
|
|
|
|
|
"contain timely information" in {
|
2020-08-01 12:25:03 +02:00
|
|
|
val obj =
|
2021-03-21 14:22:00 -04:00
|
|
|
Player(Avatar(0, "TestCharacter-alt", PlanetSideEmpire.TR, CharacterSex.Male, 0, CharacterVoice.Mute))
|
Damages (#225)
* refactored WSA code handling HitMessage, handling SplashMessage, and handling LashMessage; modified projectiles for future functionality
* players can die from being shot now; the damage model is simplistic since main goal was to write around the potential for negative damage ('healed from getting shot'); HitHint works correctly; dedicated AvatarService channel for each avatar helps reduce message spam
* vehicle destruction, and replacement with lightweight wreckage objects upon continent join; made flushing vehicle terminal more accessible
* simple work on vehicle shield charging (amp station benefit) (that's my commit story and I'm sticking with it)
* a flexible calculation workflow that can be applied, grabbing damage information, resistance information, and then combining it with a resolution function; players and vehicles have resistance values; removed redundant damage calculations from WSA
* broke up DamageCalculations, ResistanceCalculations, and ResolutionCalculations into packages under vital; fixed an error with exo-suit calculation resistances; events for dealing with synchronized player and vehicle damage calculations and building the papertrail of those damages; updating codecov.yml file for ignore classes
* added tests for various components (damage model, destroyed vehicle converter, vitality, etc..) and some functionality improvements
* added a field to keep track of how projectiles will be attributed at the time of target death
2018-07-30 09:28:45 -04:00
|
|
|
obj.Position = Vector3(1.2f, 3.4f, 5.6f)
|
|
|
|
|
obj.Orientation = Vector3(2.1f, 4.3f, 6.5f)
|
|
|
|
|
obj.Velocity = Some(Vector3(1.1f, 2.2f, 3.3f))
|
|
|
|
|
val sobj = SourceEntry(obj)
|
|
|
|
|
obj.Position = Vector3.Zero
|
|
|
|
|
obj.Orientation = Vector3.Zero
|
|
|
|
|
obj.Velocity = None
|
|
|
|
|
obj.ExoSuit = ExoSuitType.Agile
|
|
|
|
|
|
|
|
|
|
sobj match {
|
2020-07-14 05:54:05 +02:00
|
|
|
case o: PlayerSource =>
|
Damages (#225)
* refactored WSA code handling HitMessage, handling SplashMessage, and handling LashMessage; modified projectiles for future functionality
* players can die from being shot now; the damage model is simplistic since main goal was to write around the potential for negative damage ('healed from getting shot'); HitHint works correctly; dedicated AvatarService channel for each avatar helps reduce message spam
* vehicle destruction, and replacement with lightweight wreckage objects upon continent join; made flushing vehicle terminal more accessible
* simple work on vehicle shield charging (amp station benefit) (that's my commit story and I'm sticking with it)
* a flexible calculation workflow that can be applied, grabbing damage information, resistance information, and then combining it with a resolution function; players and vehicles have resistance values; removed redundant damage calculations from WSA
* broke up DamageCalculations, ResistanceCalculations, and ResolutionCalculations into packages under vital; fixed an error with exo-suit calculation resistances; events for dealing with synchronized player and vehicle damage calculations and building the papertrail of those damages; updating codecov.yml file for ignore classes
* added tests for various components (damage model, destroyed vehicle converter, vitality, etc..) and some functionality improvements
* added a field to keep track of how projectiles will be attributed at the time of target death
2018-07-30 09:28:45 -04:00
|
|
|
o.Name mustEqual "TestCharacter-alt"
|
|
|
|
|
o.Faction mustEqual PlanetSideEmpire.TR
|
|
|
|
|
o.ExoSuit mustEqual ExoSuitType.Standard
|
|
|
|
|
o.Definition mustEqual GlobalDefinitions.avatar
|
|
|
|
|
o.Position mustEqual Vector3(1.2f, 3.4f, 5.6f)
|
|
|
|
|
o.Orientation mustEqual Vector3(2.1f, 4.3f, 6.5f)
|
2023-02-14 00:09:28 -05:00
|
|
|
o.Velocity.contains(Vector3(1.1f, 2.2f, 3.3f)) mustEqual true
|
Damages (#225)
* refactored WSA code handling HitMessage, handling SplashMessage, and handling LashMessage; modified projectiles for future functionality
* players can die from being shot now; the damage model is simplistic since main goal was to write around the potential for negative damage ('healed from getting shot'); HitHint works correctly; dedicated AvatarService channel for each avatar helps reduce message spam
* vehicle destruction, and replacement with lightweight wreckage objects upon continent join; made flushing vehicle terminal more accessible
* simple work on vehicle shield charging (amp station benefit) (that's my commit story and I'm sticking with it)
* a flexible calculation workflow that can be applied, grabbing damage information, resistance information, and then combining it with a resolution function; players and vehicles have resistance values; removed redundant damage calculations from WSA
* broke up DamageCalculations, ResistanceCalculations, and ResolutionCalculations into packages under vital; fixed an error with exo-suit calculation resistances; events for dealing with synchronized player and vehicle damage calculations and building the papertrail of those damages; updating codecov.yml file for ignore classes
* added tests for various components (damage model, destroyed vehicle converter, vitality, etc..) and some functionality improvements
* added a field to keep track of how projectiles will be attributed at the time of target death
2018-07-30 09:28:45 -04:00
|
|
|
case _ =>
|
|
|
|
|
ko
|
|
|
|
|
}
|
|
|
|
|
}
|
|
|
|
|
}
|
|
|
|
|
|
2018-06-15 14:50:42 -04:00
|
|
|
"Projectile" should {
|
Damages (#225)
* refactored WSA code handling HitMessage, handling SplashMessage, and handling LashMessage; modified projectiles for future functionality
* players can die from being shot now; the damage model is simplistic since main goal was to write around the potential for negative damage ('healed from getting shot'); HitHint works correctly; dedicated AvatarService channel for each avatar helps reduce message spam
* vehicle destruction, and replacement with lightweight wreckage objects upon continent join; made flushing vehicle terminal more accessible
* simple work on vehicle shield charging (amp station benefit) (that's my commit story and I'm sticking with it)
* a flexible calculation workflow that can be applied, grabbing damage information, resistance information, and then combining it with a resolution function; players and vehicles have resistance values; removed redundant damage calculations from WSA
* broke up DamageCalculations, ResistanceCalculations, and ResolutionCalculations into packages under vital; fixed an error with exo-suit calculation resistances; events for dealing with synchronized player and vehicle damage calculations and building the papertrail of those damages; updating codecov.yml file for ignore classes
* added tests for various components (damage model, destroyed vehicle converter, vitality, etc..) and some functionality improvements
* added a field to keep track of how projectiles will be attributed at the time of target death
2018-07-30 09:28:45 -04:00
|
|
|
val beamer_def = GlobalDefinitions.beamer
|
|
|
|
|
val beamer_wep = Tool(beamer_def)
|
2020-07-14 05:54:05 +02:00
|
|
|
val firemode = beamer_wep.FireMode
|
Damages (#225)
* refactored WSA code handling HitMessage, handling SplashMessage, and handling LashMessage; modified projectiles for future functionality
* players can die from being shot now; the damage model is simplistic since main goal was to write around the potential for negative damage ('healed from getting shot'); HitHint works correctly; dedicated AvatarService channel for each avatar helps reduce message spam
* vehicle destruction, and replacement with lightweight wreckage objects upon continent join; made flushing vehicle terminal more accessible
* simple work on vehicle shield charging (amp station benefit) (that's my commit story and I'm sticking with it)
* a flexible calculation workflow that can be applied, grabbing damage information, resistance information, and then combining it with a resolution function; players and vehicles have resistance values; removed redundant damage calculations from WSA
* broke up DamageCalculations, ResistanceCalculations, and ResolutionCalculations into packages under vital; fixed an error with exo-suit calculation resistances; events for dealing with synchronized player and vehicle damage calculations and building the papertrail of those damages; updating codecov.yml file for ignore classes
* added tests for various components (damage model, destroyed vehicle converter, vitality, etc..) and some functionality improvements
* added a field to keep track of how projectiles will be attributed at the time of target death
2018-07-30 09:28:45 -04:00
|
|
|
val projectile = beamer_wep.Projectile
|
2018-06-15 14:50:42 -04:00
|
|
|
|
Damages (#225)
* refactored WSA code handling HitMessage, handling SplashMessage, and handling LashMessage; modified projectiles for future functionality
* players can die from being shot now; the damage model is simplistic since main goal was to write around the potential for negative damage ('healed from getting shot'); HitHint works correctly; dedicated AvatarService channel for each avatar helps reduce message spam
* vehicle destruction, and replacement with lightweight wreckage objects upon continent join; made flushing vehicle terminal more accessible
* simple work on vehicle shield charging (amp station benefit) (that's my commit story and I'm sticking with it)
* a flexible calculation workflow that can be applied, grabbing damage information, resistance information, and then combining it with a resolution function; players and vehicles have resistance values; removed redundant damage calculations from WSA
* broke up DamageCalculations, ResistanceCalculations, and ResolutionCalculations into packages under vital; fixed an error with exo-suit calculation resistances; events for dealing with synchronized player and vehicle damage calculations and building the papertrail of those damages; updating codecov.yml file for ignore classes
* added tests for various components (damage model, destroyed vehicle converter, vitality, etc..) and some functionality improvements
* added a field to keep track of how projectiles will be attributed at the time of target death
2018-07-30 09:28:45 -04:00
|
|
|
"construct" in {
|
2020-07-14 05:54:05 +02:00
|
|
|
val obj = Projectile(
|
|
|
|
|
beamer_wep.Projectile,
|
|
|
|
|
beamer_wep.Definition,
|
|
|
|
|
beamer_wep.FireMode,
|
|
|
|
|
PlayerSource(player),
|
|
|
|
|
beamer_def.ObjectId,
|
|
|
|
|
Vector3(1.2f, 3.4f, 5.6f),
|
|
|
|
|
Vector3(0.2f, 0.4f, 0.6f)
|
|
|
|
|
)
|
Damages (#225)
* refactored WSA code handling HitMessage, handling SplashMessage, and handling LashMessage; modified projectiles for future functionality
* players can die from being shot now; the damage model is simplistic since main goal was to write around the potential for negative damage ('healed from getting shot'); HitHint works correctly; dedicated AvatarService channel for each avatar helps reduce message spam
* vehicle destruction, and replacement with lightweight wreckage objects upon continent join; made flushing vehicle terminal more accessible
* simple work on vehicle shield charging (amp station benefit) (that's my commit story and I'm sticking with it)
* a flexible calculation workflow that can be applied, grabbing damage information, resistance information, and then combining it with a resolution function; players and vehicles have resistance values; removed redundant damage calculations from WSA
* broke up DamageCalculations, ResistanceCalculations, and ResolutionCalculations into packages under vital; fixed an error with exo-suit calculation resistances; events for dealing with synchronized player and vehicle damage calculations and building the papertrail of those damages; updating codecov.yml file for ignore classes
* added tests for various components (damage model, destroyed vehicle converter, vitality, etc..) and some functionality improvements
* added a field to keep track of how projectiles will be attributed at the time of target death
2018-07-30 09:28:45 -04:00
|
|
|
obj.profile mustEqual projectile
|
|
|
|
|
obj.tool_def mustEqual beamer_def
|
|
|
|
|
obj.fire_mode mustEqual firemode
|
|
|
|
|
obj.owner match {
|
2020-07-14 05:54:05 +02:00
|
|
|
case _: PlayerSource =>
|
Damages (#225)
* refactored WSA code handling HitMessage, handling SplashMessage, and handling LashMessage; modified projectiles for future functionality
* players can die from being shot now; the damage model is simplistic since main goal was to write around the potential for negative damage ('healed from getting shot'); HitHint works correctly; dedicated AvatarService channel for each avatar helps reduce message spam
* vehicle destruction, and replacement with lightweight wreckage objects upon continent join; made flushing vehicle terminal more accessible
* simple work on vehicle shield charging (amp station benefit) (that's my commit story and I'm sticking with it)
* a flexible calculation workflow that can be applied, grabbing damage information, resistance information, and then combining it with a resolution function; players and vehicles have resistance values; removed redundant damage calculations from WSA
* broke up DamageCalculations, ResistanceCalculations, and ResolutionCalculations into packages under vital; fixed an error with exo-suit calculation resistances; events for dealing with synchronized player and vehicle damage calculations and building the papertrail of those damages; updating codecov.yml file for ignore classes
* added tests for various components (damage model, destroyed vehicle converter, vitality, etc..) and some functionality improvements
* added a field to keep track of how projectiles will be attributed at the time of target death
2018-07-30 09:28:45 -04:00
|
|
|
ok
|
|
|
|
|
case _ =>
|
|
|
|
|
ko
|
|
|
|
|
}
|
|
|
|
|
obj.attribute_to mustEqual obj.tool_def.ObjectId
|
2018-06-15 14:50:42 -04:00
|
|
|
obj.shot_origin mustEqual Vector3(1.2f, 3.4f, 5.6f)
|
|
|
|
|
obj.shot_angle mustEqual Vector3(0.2f, 0.4f, 0.6f)
|
2020-09-05 09:08:18 -04:00
|
|
|
obj.fire_time <= System.currentTimeMillis() mustEqual true
|
Damages (#225)
* refactored WSA code handling HitMessage, handling SplashMessage, and handling LashMessage; modified projectiles for future functionality
* players can die from being shot now; the damage model is simplistic since main goal was to write around the potential for negative damage ('healed from getting shot'); HitHint works correctly; dedicated AvatarService channel for each avatar helps reduce message spam
* vehicle destruction, and replacement with lightweight wreckage objects upon continent join; made flushing vehicle terminal more accessible
* simple work on vehicle shield charging (amp station benefit) (that's my commit story and I'm sticking with it)
* a flexible calculation workflow that can be applied, grabbing damage information, resistance information, and then combining it with a resolution function; players and vehicles have resistance values; removed redundant damage calculations from WSA
* broke up DamageCalculations, ResistanceCalculations, and ResolutionCalculations into packages under vital; fixed an error with exo-suit calculation resistances; events for dealing with synchronized player and vehicle damage calculations and building the papertrail of those damages; updating codecov.yml file for ignore classes
* added tests for various components (damage model, destroyed vehicle converter, vitality, etc..) and some functionality improvements
* added a field to keep track of how projectiles will be attributed at the time of target death
2018-07-30 09:28:45 -04:00
|
|
|
obj.isResolved mustEqual false
|
|
|
|
|
}
|
|
|
|
|
|
|
|
|
|
"construct (different attribute)" in {
|
2020-07-14 05:54:05 +02:00
|
|
|
val obj1 = Projectile(
|
|
|
|
|
beamer_wep.Projectile,
|
|
|
|
|
beamer_wep.Definition,
|
|
|
|
|
beamer_wep.FireMode,
|
|
|
|
|
player,
|
|
|
|
|
Vector3(1.2f, 3.4f, 5.6f),
|
|
|
|
|
Vector3(0.2f, 0.4f, 0.6f)
|
|
|
|
|
)
|
Damages (#225)
* refactored WSA code handling HitMessage, handling SplashMessage, and handling LashMessage; modified projectiles for future functionality
* players can die from being shot now; the damage model is simplistic since main goal was to write around the potential for negative damage ('healed from getting shot'); HitHint works correctly; dedicated AvatarService channel for each avatar helps reduce message spam
* vehicle destruction, and replacement with lightweight wreckage objects upon continent join; made flushing vehicle terminal more accessible
* simple work on vehicle shield charging (amp station benefit) (that's my commit story and I'm sticking with it)
* a flexible calculation workflow that can be applied, grabbing damage information, resistance information, and then combining it with a resolution function; players and vehicles have resistance values; removed redundant damage calculations from WSA
* broke up DamageCalculations, ResistanceCalculations, and ResolutionCalculations into packages under vital; fixed an error with exo-suit calculation resistances; events for dealing with synchronized player and vehicle damage calculations and building the papertrail of those damages; updating codecov.yml file for ignore classes
* added tests for various components (damage model, destroyed vehicle converter, vitality, etc..) and some functionality improvements
* added a field to keep track of how projectiles will be attributed at the time of target death
2018-07-30 09:28:45 -04:00
|
|
|
obj1.attribute_to mustEqual obj1.tool_def.ObjectId
|
|
|
|
|
|
2020-07-14 05:54:05 +02:00
|
|
|
val obj2 = Projectile(
|
|
|
|
|
beamer_wep.Projectile,
|
|
|
|
|
beamer_wep.Definition,
|
|
|
|
|
beamer_wep.FireMode,
|
|
|
|
|
PlayerSource(player),
|
|
|
|
|
65,
|
|
|
|
|
Vector3(1.2f, 3.4f, 5.6f),
|
|
|
|
|
Vector3(0.2f, 0.4f, 0.6f)
|
|
|
|
|
)
|
Damages (#225)
* refactored WSA code handling HitMessage, handling SplashMessage, and handling LashMessage; modified projectiles for future functionality
* players can die from being shot now; the damage model is simplistic since main goal was to write around the potential for negative damage ('healed from getting shot'); HitHint works correctly; dedicated AvatarService channel for each avatar helps reduce message spam
* vehicle destruction, and replacement with lightweight wreckage objects upon continent join; made flushing vehicle terminal more accessible
* simple work on vehicle shield charging (amp station benefit) (that's my commit story and I'm sticking with it)
* a flexible calculation workflow that can be applied, grabbing damage information, resistance information, and then combining it with a resolution function; players and vehicles have resistance values; removed redundant damage calculations from WSA
* broke up DamageCalculations, ResistanceCalculations, and ResolutionCalculations into packages under vital; fixed an error with exo-suit calculation resistances; events for dealing with synchronized player and vehicle damage calculations and building the papertrail of those damages; updating codecov.yml file for ignore classes
* added tests for various components (damage model, destroyed vehicle converter, vitality, etc..) and some functionality improvements
* added a field to keep track of how projectiles will be attributed at the time of target death
2018-07-30 09:28:45 -04:00
|
|
|
obj2.attribute_to == obj2.tool_def.ObjectId mustEqual false
|
|
|
|
|
obj2.attribute_to mustEqual 65
|
2018-06-15 14:50:42 -04:00
|
|
|
}
|
|
|
|
|
|
|
|
|
|
"resolve" in {
|
2020-07-14 05:54:05 +02:00
|
|
|
val obj = Projectile(
|
|
|
|
|
projectile,
|
|
|
|
|
beamer_def,
|
|
|
|
|
firemode,
|
|
|
|
|
PlayerSource(player),
|
|
|
|
|
beamer_def.ObjectId,
|
|
|
|
|
Vector3.Zero,
|
|
|
|
|
Vector3.Zero
|
|
|
|
|
)
|
Damages (#225)
* refactored WSA code handling HitMessage, handling SplashMessage, and handling LashMessage; modified projectiles for future functionality
* players can die from being shot now; the damage model is simplistic since main goal was to write around the potential for negative damage ('healed from getting shot'); HitHint works correctly; dedicated AvatarService channel for each avatar helps reduce message spam
* vehicle destruction, and replacement with lightweight wreckage objects upon continent join; made flushing vehicle terminal more accessible
* simple work on vehicle shield charging (amp station benefit) (that's my commit story and I'm sticking with it)
* a flexible calculation workflow that can be applied, grabbing damage information, resistance information, and then combining it with a resolution function; players and vehicles have resistance values; removed redundant damage calculations from WSA
* broke up DamageCalculations, ResistanceCalculations, and ResolutionCalculations into packages under vital; fixed an error with exo-suit calculation resistances; events for dealing with synchronized player and vehicle damage calculations and building the papertrail of those damages; updating codecov.yml file for ignore classes
* added tests for various components (damage model, destroyed vehicle converter, vitality, etc..) and some functionality improvements
* added a field to keep track of how projectiles will be attributed at the time of target death
2018-07-30 09:28:45 -04:00
|
|
|
obj.isResolved mustEqual false
|
|
|
|
|
obj.isMiss mustEqual false
|
2018-06-15 14:50:42 -04:00
|
|
|
|
Damages (#225)
* refactored WSA code handling HitMessage, handling SplashMessage, and handling LashMessage; modified projectiles for future functionality
* players can die from being shot now; the damage model is simplistic since main goal was to write around the potential for negative damage ('healed from getting shot'); HitHint works correctly; dedicated AvatarService channel for each avatar helps reduce message spam
* vehicle destruction, and replacement with lightweight wreckage objects upon continent join; made flushing vehicle terminal more accessible
* simple work on vehicle shield charging (amp station benefit) (that's my commit story and I'm sticking with it)
* a flexible calculation workflow that can be applied, grabbing damage information, resistance information, and then combining it with a resolution function; players and vehicles have resistance values; removed redundant damage calculations from WSA
* broke up DamageCalculations, ResistanceCalculations, and ResolutionCalculations into packages under vital; fixed an error with exo-suit calculation resistances; events for dealing with synchronized player and vehicle damage calculations and building the papertrail of those damages; updating codecov.yml file for ignore classes
* added tests for various components (damage model, destroyed vehicle converter, vitality, etc..) and some functionality improvements
* added a field to keep track of how projectiles will be attributed at the time of target death
2018-07-30 09:28:45 -04:00
|
|
|
obj.Resolve()
|
|
|
|
|
obj.isResolved mustEqual true
|
|
|
|
|
obj.isMiss mustEqual false
|
|
|
|
|
}
|
|
|
|
|
|
|
|
|
|
"missed" in {
|
2020-07-14 05:54:05 +02:00
|
|
|
val obj = Projectile(
|
|
|
|
|
projectile,
|
|
|
|
|
beamer_def,
|
|
|
|
|
firemode,
|
|
|
|
|
PlayerSource(player),
|
|
|
|
|
beamer_def.ObjectId,
|
|
|
|
|
Vector3.Zero,
|
|
|
|
|
Vector3.Zero
|
|
|
|
|
)
|
Damages (#225)
* refactored WSA code handling HitMessage, handling SplashMessage, and handling LashMessage; modified projectiles for future functionality
* players can die from being shot now; the damage model is simplistic since main goal was to write around the potential for negative damage ('healed from getting shot'); HitHint works correctly; dedicated AvatarService channel for each avatar helps reduce message spam
* vehicle destruction, and replacement with lightweight wreckage objects upon continent join; made flushing vehicle terminal more accessible
* simple work on vehicle shield charging (amp station benefit) (that's my commit story and I'm sticking with it)
* a flexible calculation workflow that can be applied, grabbing damage information, resistance information, and then combining it with a resolution function; players and vehicles have resistance values; removed redundant damage calculations from WSA
* broke up DamageCalculations, ResistanceCalculations, and ResolutionCalculations into packages under vital; fixed an error with exo-suit calculation resistances; events for dealing with synchronized player and vehicle damage calculations and building the papertrail of those damages; updating codecov.yml file for ignore classes
* added tests for various components (damage model, destroyed vehicle converter, vitality, etc..) and some functionality improvements
* added a field to keep track of how projectiles will be attributed at the time of target death
2018-07-30 09:28:45 -04:00
|
|
|
obj.isResolved mustEqual false
|
|
|
|
|
obj.isMiss mustEqual false
|
|
|
|
|
|
|
|
|
|
obj.Miss()
|
|
|
|
|
obj.isResolved mustEqual true
|
|
|
|
|
obj.isMiss mustEqual true
|
2018-06-15 14:50:42 -04:00
|
|
|
}
|
Damages (#225)
* refactored WSA code handling HitMessage, handling SplashMessage, and handling LashMessage; modified projectiles for future functionality
* players can die from being shot now; the damage model is simplistic since main goal was to write around the potential for negative damage ('healed from getting shot'); HitHint works correctly; dedicated AvatarService channel for each avatar helps reduce message spam
* vehicle destruction, and replacement with lightweight wreckage objects upon continent join; made flushing vehicle terminal more accessible
* simple work on vehicle shield charging (amp station benefit) (that's my commit story and I'm sticking with it)
* a flexible calculation workflow that can be applied, grabbing damage information, resistance information, and then combining it with a resolution function; players and vehicles have resistance values; removed redundant damage calculations from WSA
* broke up DamageCalculations, ResistanceCalculations, and ResolutionCalculations into packages under vital; fixed an error with exo-suit calculation resistances; events for dealing with synchronized player and vehicle damage calculations and building the papertrail of those damages; updating codecov.yml file for ignore classes
* added tests for various components (damage model, destroyed vehicle converter, vitality, etc..) and some functionality improvements
* added a field to keep track of how projectiles will be attributed at the time of target death
2018-07-30 09:28:45 -04:00
|
|
|
}
|
2018-06-15 14:50:42 -04:00
|
|
|
|
Damage Changes/Explosions (#644)
* created base damage interaction classes and replaced various projectile-based damage that utilized ResolvedProjectile; not refined, maintains redundancy and overloads, but should work
* continuing to reduce the exposure of ResolvedProjectile and replacing it with applications of DamageInteraction, DamageResult, and DamageReason
* removed ResolvedProjectile from the project; adjusted remaining code paths to work around it
* vitals.test became vital.base; no one liked this
* lots of inheritance, polymorphism, and other chicanery; moved around files, so it also looks like more files have changed when they have not (even if they did)
* codecov file correction
* master rebase; vital directory structure changed, so file imports have been modified in several other files; ResolutionSelection has been removed, requiring direct function literal assignment; tests repaired, where necessary; no actual functional change
* code comments
* DamageResult is its own case class now, wrapping around a before/after target and the interaction used in its calaculations; tests have been corrected
* adjusted Player.Die() to demonstrate a damage-based suicide approach
* resolved circular inheritance in projectile damage modifiers; better employed explosion reason, damages players around exploding vehicle as example
* expanded explosions to other object types; exploding is now a flag and the damage is an innate property of the object type; removed advanced references to properties on the damage source, since the damage source is easily accessible; wrote comments; fixed tests
* overhaul to painbox damage to align with normal player damage handling, thus assimilating it properly into the damage system
* future development; normal vector from euler angles; custom proximity test
* where 'innateDamage' should have not replaced 'explosion'
* moved the hitPos for the generator test; attempting to imrpove the reliability of the auto-repair integration tests (didn't ...)
* spelling and private val
2020-12-08 14:32:42 -05:00
|
|
|
"Projectile DamageInteraction" should { //TODO wrong place for this test?
|
Damages (#225)
* refactored WSA code handling HitMessage, handling SplashMessage, and handling LashMessage; modified projectiles for future functionality
* players can die from being shot now; the damage model is simplistic since main goal was to write around the potential for negative damage ('healed from getting shot'); HitHint works correctly; dedicated AvatarService channel for each avatar helps reduce message spam
* vehicle destruction, and replacement with lightweight wreckage objects upon continent join; made flushing vehicle terminal more accessible
* simple work on vehicle shield charging (amp station benefit) (that's my commit story and I'm sticking with it)
* a flexible calculation workflow that can be applied, grabbing damage information, resistance information, and then combining it with a resolution function; players and vehicles have resistance values; removed redundant damage calculations from WSA
* broke up DamageCalculations, ResistanceCalculations, and ResolutionCalculations into packages under vital; fixed an error with exo-suit calculation resistances; events for dealing with synchronized player and vehicle damage calculations and building the papertrail of those damages; updating codecov.yml file for ignore classes
* added tests for various components (damage model, destroyed vehicle converter, vitality, etc..) and some functionality improvements
* added a field to keep track of how projectiles will be attributed at the time of target death
2018-07-30 09:28:45 -04:00
|
|
|
val beamer_wep = Tool(GlobalDefinitions.beamer)
|
2020-07-14 05:54:05 +02:00
|
|
|
val p_source = PlayerSource(player)
|
2021-03-21 14:22:00 -04:00
|
|
|
val player2 = Player(Avatar(0, "TestTarget", PlanetSideEmpire.NC, CharacterSex.Female, 1, CharacterVoice.Mute))
|
2020-07-14 05:54:05 +02:00
|
|
|
val p2_source = PlayerSource(player2)
|
|
|
|
|
val projectile = Projectile(
|
|
|
|
|
beamer_wep.Projectile,
|
|
|
|
|
GlobalDefinitions.beamer,
|
|
|
|
|
beamer_wep.FireMode,
|
|
|
|
|
p_source,
|
|
|
|
|
GlobalDefinitions.beamer.ObjectId,
|
|
|
|
|
Vector3.Zero,
|
|
|
|
|
Vector3.Zero
|
|
|
|
|
)
|
Damages (#225)
* refactored WSA code handling HitMessage, handling SplashMessage, and handling LashMessage; modified projectiles for future functionality
* players can die from being shot now; the damage model is simplistic since main goal was to write around the potential for negative damage ('healed from getting shot'); HitHint works correctly; dedicated AvatarService channel for each avatar helps reduce message spam
* vehicle destruction, and replacement with lightweight wreckage objects upon continent join; made flushing vehicle terminal more accessible
* simple work on vehicle shield charging (amp station benefit) (that's my commit story and I'm sticking with it)
* a flexible calculation workflow that can be applied, grabbing damage information, resistance information, and then combining it with a resolution function; players and vehicles have resistance values; removed redundant damage calculations from WSA
* broke up DamageCalculations, ResistanceCalculations, and ResolutionCalculations into packages under vital; fixed an error with exo-suit calculation resistances; events for dealing with synchronized player and vehicle damage calculations and building the papertrail of those damages; updating codecov.yml file for ignore classes
* added tests for various components (damage model, destroyed vehicle converter, vitality, etc..) and some functionality improvements
* added a field to keep track of how projectiles will be attributed at the time of target death
2018-07-30 09:28:45 -04:00
|
|
|
val fury_dm = fury.DamageModel
|
|
|
|
|
|
|
|
|
|
"construct" in {
|
Damage Changes/Explosions (#644)
* created base damage interaction classes and replaced various projectile-based damage that utilized ResolvedProjectile; not refined, maintains redundancy and overloads, but should work
* continuing to reduce the exposure of ResolvedProjectile and replacing it with applications of DamageInteraction, DamageResult, and DamageReason
* removed ResolvedProjectile from the project; adjusted remaining code paths to work around it
* vitals.test became vital.base; no one liked this
* lots of inheritance, polymorphism, and other chicanery; moved around files, so it also looks like more files have changed when they have not (even if they did)
* codecov file correction
* master rebase; vital directory structure changed, so file imports have been modified in several other files; ResolutionSelection has been removed, requiring direct function literal assignment; tests repaired, where necessary; no actual functional change
* code comments
* DamageResult is its own case class now, wrapping around a before/after target and the interaction used in its calaculations; tests have been corrected
* adjusted Player.Die() to demonstrate a damage-based suicide approach
* resolved circular inheritance in projectile damage modifiers; better employed explosion reason, damages players around exploding vehicle as example
* expanded explosions to other object types; exploding is now a flag and the damage is an innate property of the object type; removed advanced references to properties on the damage source, since the damage source is easily accessible; wrote comments; fixed tests
* overhaul to painbox damage to align with normal player damage handling, thus assimilating it properly into the damage system
* future development; normal vector from euler angles; custom proximity test
* where 'innateDamage' should have not replaced 'explosion'
* moved the hitPos for the generator test; attempting to imrpove the reliability of the auto-repair integration tests (didn't ...)
* spelling and private val
2020-12-08 14:32:42 -05:00
|
|
|
val obj = DamageInteraction(
|
|
|
|
|
DamageResolution.Hit,
|
2020-07-14 05:54:05 +02:00
|
|
|
PlayerSource(player2),
|
Damage Changes/Explosions (#644)
* created base damage interaction classes and replaced various projectile-based damage that utilized ResolvedProjectile; not refined, maintains redundancy and overloads, but should work
* continuing to reduce the exposure of ResolvedProjectile and replacing it with applications of DamageInteraction, DamageResult, and DamageReason
* removed ResolvedProjectile from the project; adjusted remaining code paths to work around it
* vitals.test became vital.base; no one liked this
* lots of inheritance, polymorphism, and other chicanery; moved around files, so it also looks like more files have changed when they have not (even if they did)
* codecov file correction
* master rebase; vital directory structure changed, so file imports have been modified in several other files; ResolutionSelection has been removed, requiring direct function literal assignment; tests repaired, where necessary; no actual functional change
* code comments
* DamageResult is its own case class now, wrapping around a before/after target and the interaction used in its calaculations; tests have been corrected
* adjusted Player.Die() to demonstrate a damage-based suicide approach
* resolved circular inheritance in projectile damage modifiers; better employed explosion reason, damages players around exploding vehicle as example
* expanded explosions to other object types; exploding is now a flag and the damage is an innate property of the object type; removed advanced references to properties on the damage source, since the damage source is easily accessible; wrote comments; fixed tests
* overhaul to painbox damage to align with normal player damage handling, thus assimilating it properly into the damage system
* future development; normal vector from euler angles; custom proximity test
* where 'innateDamage' should have not replaced 'explosion'
* moved the hitPos for the generator test; attempting to imrpove the reliability of the auto-repair integration tests (didn't ...)
* spelling and private val
2020-12-08 14:32:42 -05:00
|
|
|
ProjectileReason(
|
|
|
|
|
DamageResolution.Hit,
|
|
|
|
|
projectile,
|
|
|
|
|
fury_dm
|
|
|
|
|
),
|
2020-07-14 05:54:05 +02:00
|
|
|
Vector3(1.2f, 3.4f, 5.6f)
|
|
|
|
|
)
|
Damage Changes/Explosions (#644)
* created base damage interaction classes and replaced various projectile-based damage that utilized ResolvedProjectile; not refined, maintains redundancy and overloads, but should work
* continuing to reduce the exposure of ResolvedProjectile and replacing it with applications of DamageInteraction, DamageResult, and DamageReason
* removed ResolvedProjectile from the project; adjusted remaining code paths to work around it
* vitals.test became vital.base; no one liked this
* lots of inheritance, polymorphism, and other chicanery; moved around files, so it also looks like more files have changed when they have not (even if they did)
* codecov file correction
* master rebase; vital directory structure changed, so file imports have been modified in several other files; ResolutionSelection has been removed, requiring direct function literal assignment; tests repaired, where necessary; no actual functional change
* code comments
* DamageResult is its own case class now, wrapping around a before/after target and the interaction used in its calaculations; tests have been corrected
* adjusted Player.Die() to demonstrate a damage-based suicide approach
* resolved circular inheritance in projectile damage modifiers; better employed explosion reason, damages players around exploding vehicle as example
* expanded explosions to other object types; exploding is now a flag and the damage is an innate property of the object type; removed advanced references to properties on the damage source, since the damage source is easily accessible; wrote comments; fixed tests
* overhaul to painbox damage to align with normal player damage handling, thus assimilating it properly into the damage system
* future development; normal vector from euler angles; custom proximity test
* where 'innateDamage' should have not replaced 'explosion'
* moved the hitPos for the generator test; attempting to imrpove the reliability of the auto-repair integration tests (didn't ...)
* spelling and private val
2020-12-08 14:32:42 -05:00
|
|
|
obj.cause.asInstanceOf[ProjectileReason].projectile mustEqual projectile
|
Damages (#225)
* refactored WSA code handling HitMessage, handling SplashMessage, and handling LashMessage; modified projectiles for future functionality
* players can die from being shot now; the damage model is simplistic since main goal was to write around the potential for negative damage ('healed from getting shot'); HitHint works correctly; dedicated AvatarService channel for each avatar helps reduce message spam
* vehicle destruction, and replacement with lightweight wreckage objects upon continent join; made flushing vehicle terminal more accessible
* simple work on vehicle shield charging (amp station benefit) (that's my commit story and I'm sticking with it)
* a flexible calculation workflow that can be applied, grabbing damage information, resistance information, and then combining it with a resolution function; players and vehicles have resistance values; removed redundant damage calculations from WSA
* broke up DamageCalculations, ResistanceCalculations, and ResolutionCalculations into packages under vital; fixed an error with exo-suit calculation resistances; events for dealing with synchronized player and vehicle damage calculations and building the papertrail of those damages; updating codecov.yml file for ignore classes
* added tests for various components (damage model, destroyed vehicle converter, vitality, etc..) and some functionality improvements
* added a field to keep track of how projectiles will be attributed at the time of target death
2018-07-30 09:28:45 -04:00
|
|
|
obj.target mustEqual p2_source
|
Damage Changes/Explosions (#644)
* created base damage interaction classes and replaced various projectile-based damage that utilized ResolvedProjectile; not refined, maintains redundancy and overloads, but should work
* continuing to reduce the exposure of ResolvedProjectile and replacing it with applications of DamageInteraction, DamageResult, and DamageReason
* removed ResolvedProjectile from the project; adjusted remaining code paths to work around it
* vitals.test became vital.base; no one liked this
* lots of inheritance, polymorphism, and other chicanery; moved around files, so it also looks like more files have changed when they have not (even if they did)
* codecov file correction
* master rebase; vital directory structure changed, so file imports have been modified in several other files; ResolutionSelection has been removed, requiring direct function literal assignment; tests repaired, where necessary; no actual functional change
* code comments
* DamageResult is its own case class now, wrapping around a before/after target and the interaction used in its calaculations; tests have been corrected
* adjusted Player.Die() to demonstrate a damage-based suicide approach
* resolved circular inheritance in projectile damage modifiers; better employed explosion reason, damages players around exploding vehicle as example
* expanded explosions to other object types; exploding is now a flag and the damage is an innate property of the object type; removed advanced references to properties on the damage source, since the damage source is easily accessible; wrote comments; fixed tests
* overhaul to painbox damage to align with normal player damage handling, thus assimilating it properly into the damage system
* future development; normal vector from euler angles; custom proximity test
* where 'innateDamage' should have not replaced 'explosion'
* moved the hitPos for the generator test; attempting to imrpove the reliability of the auto-repair integration tests (didn't ...)
* spelling and private val
2020-12-08 14:32:42 -05:00
|
|
|
obj.cause.asInstanceOf[ProjectileReason].damageModel mustEqual fury.DamageModel
|
|
|
|
|
obj.hitPos mustEqual Vector3(1.2f, 3.4f, 5.6f)
|
2018-06-15 14:50:42 -04:00
|
|
|
}
|
|
|
|
|
}
|
|
|
|
|
}
|