double calculateKickDamagePotential(Entity enemy, MovePath path, IGame game) { if (!(enemy instanceof Mech)) { return 0.0; } // if they can kick me, and probably hit, they probably will. PhysicalInfo theirKick = new PhysicalInfo(enemy, null, path.getEntity(), new EntityState(path), PhysicalAttackType.RIGHT_KICK, game, getOwner(), true); if (theirKick.getProbabilityToHit() <= 0.5) { return 0.0; } return theirKick.getExpectedDamageOnHit() * theirKick.getProbabilityToHit(); }
double calculateMyKickDamagePotential(MovePath path, Entity enemy, IGame game) { if (!(path.getEntity() instanceof Mech)) { return 0.0; } PhysicalInfo myKick = new PhysicalInfo(path.getEntity(), new EntityState(path), enemy, null, PhysicalAttackType.RIGHT_KICK, game, getOwner(), true); if (myKick.getProbabilityToHit() <= 0.5) { return 0; } return myKick.getExpectedDamageOnHit() * myKick.getProbabilityToHit(); }
final PhysicalInfo guessInfo = new PhysicalInfo(shooter, null, target, null, attackType, game, owner, true); final PhysicalInfo accurateInfo = new PhysicalInfo(shooter, target, attackType, game, owner, false); if (guessInfo.getHitData().getValue() != accurateInfo.getHitData().getValue()) { ret += "Incorrect To Hit prediction, physical attack " + attackType.name() + ":\n";
new PhysicalInfo(hitter, e, PhysicalAttackType.RIGHT_PUNCH, final PhysicalInfo left_punch = new PhysicalInfo( hitter, e, final PhysicalInfo right_kick = new PhysicalInfo( hitter, e, final PhysicalInfo left_kick = new PhysicalInfo( hitter, e,
PhysicalInfo testPhysicalInfo = Mockito.spy(new PhysicalInfo(mockPrincess)); Mockito.doReturn(15.0).when(testPhysicalInfo).getExpectedDamage(); Mockito.doReturn(0.46129).when(testPhysicalInfo).getExpectedCriticals(); testPhysicalInfo = Mockito.spy(new PhysicalInfo(mockPrincess)); Mockito.doReturn(15.0).when(testPhysicalInfo).getExpectedDamage(); Mockito.doReturn(0.46129).when(testPhysicalInfo).getExpectedCriticals(); testPhysicalInfo = Mockito.spy(new PhysicalInfo(mockPrincess)); Mockito.doReturn(15.0).when(testPhysicalInfo).getExpectedDamage(); Mockito.doReturn(0.46129).when(testPhysicalInfo).getExpectedCriticals(); testPhysicalInfo = Mockito.spy(new PhysicalInfo(mockPrincess)); Mockito.doReturn(15.0).when(testPhysicalInfo).getExpectedDamage(); Mockito.doReturn(0.46129).when(testPhysicalInfo).getExpectedCriticals(); testPhysicalInfo = Mockito.spy(new PhysicalInfo(mockPrincess)); Mockito.doReturn(15.0).when(testPhysicalInfo).getExpectedDamage(); Mockito.doReturn(0.46129).when(testPhysicalInfo).getExpectedCriticals(); testPhysicalInfo = Mockito.spy(new PhysicalInfo(mockPrincess)); Mockito.doReturn(15.0).when(testPhysicalInfo).getExpectedDamage(); Mockito.doReturn(0.86129).when(testPhysicalInfo).getExpectedCriticals(); testPhysicalInfo = Mockito.spy(new PhysicalInfo(mockPrincess)); Mockito.doReturn(15.0).when(testPhysicalInfo).getExpectedDamage(); Mockito.doReturn(0.26129).when(testPhysicalInfo).getExpectedCriticals(); testPhysicalInfo = Mockito.spy(new PhysicalInfo(mockPrincess));
PhysicalInfo myKick = new PhysicalInfo( path.getEntity(), new EntityState(path), target, null,
PhysicalInfo testPhysicalInfo = Mockito.spy(new PhysicalInfo(mockPrincess)); testPhysicalInfo.setShooter(mockShooter); testPhysicalInfo.setTarget(mockTarget);