Example #1
0
 def __calculateAmmoShots(self):
     if self.charge is not None:
         # Set number of cycles before reload is needed
         chargeRate = self.getModifiedItemAttr("chargeRate")
         numCharges = self.numCharges
         numShots = floorFloat(float(numCharges) / chargeRate)
     else:
         numShots = None
     return numShots
Example #2
0
 def __calculateAmmoShots(self):
     if self.charge is not None:
         # Set number of cycles before reload is needed
         chargeRate = self.getModifiedItemAttr("chargeRate")
         numCharges = self.numCharges
         numShots = floorFloat(float(numCharges) / chargeRate)
     else:
         numShots = None
     return numShots
Example #3
0
 def numCharges(self):
     if self.charge is None:
         charges = 0
     else:
         chargeVolume = self.charge.volume
         containerCapacity = self.item.capacity
         if chargeVolume is None or containerCapacity is None:
             charges = 0
         else:
             charges = floorFloat(float(containerCapacity) / chargeVolume)
     return charges
Example #4
0
 def numCharges(self):
     if self.charge is None:
         charges = 0
     else:
         chargeVolume = self.charge.volume
         containerCapacity = self.item.capacity
         if chargeVolume is None or containerCapacity is None:
             charges = 0
         else:
             charges = floorFloat(float(containerCapacity) / chargeVolume)
     return charges
Example #5
0
 def __calculateCrystalShots(self):
     if self.charge is not None:
         if self.getModifiedChargeAttr("crystalsGetDamaged") == 1:
             # For depletable crystals, calculate average amount of shots before it's destroyed
             hp = self.getModifiedChargeAttr("hp")
             chance = self.getModifiedChargeAttr("crystalVolatilityChance")
             damage = self.getModifiedChargeAttr("crystalVolatilityDamage")
             crystals = self.numCharges
             numShots = floorFloat(float(crystals * hp) / (damage * chance))
         else:
             # Set 0 (infinite) for permanent crystals like t1 laser crystals
             numShots = 0
     else:
         numShots = None
     return numShots
Example #6
0
 def __calculateCrystalShots(self):
     if self.charge is not None:
         if self.getModifiedChargeAttr("crystalsGetDamaged") == 1:
             # For depletable crystals, calculate average amount of shots before it's destroyed
             hp = self.getModifiedChargeAttr("hp")
             chance = self.getModifiedChargeAttr("crystalVolatilityChance")
             damage = self.getModifiedChargeAttr("crystalVolatilityDamage")
             crystals = self.numCharges
             numShots = floorFloat(float(crystals * hp) / (damage * chance))
         else:
             # Set 0 (infinite) for permanent crystals like t1 laser crystals
             numShots = 0
     else:
         numShots = None
     return numShots