(self, fit)
| 88 | sizerBombing.Add(label, 0, wx.ALIGN_CENTER) |
| 89 | |
| 90 | def refreshPanel(self, fit): |
| 91 | # If we did anything interesting, we'd update our labels to reflect the new fit's stats here |
| 92 | if fit is None: |
| 93 | return |
| 94 | |
| 95 | mkt = Market.getInstance() |
| 96 | emBomb = mkt.getItem(27920) |
| 97 | thermalBomb = mkt.getItem(27916) |
| 98 | kineticBomb = mkt.getItem(27912) |
| 99 | explosiveBomb = mkt.getItem(27918) |
| 100 | environementBombDamageModifier = 1.0 |
| 101 | |
| 102 | # list all environmental effects affecting bomb damage |
| 103 | relevantEffects = [ |
| 104 | 'Class 6 Red Giant Effects', |
| 105 | 'Class 5 Red Giant Effects', |
| 106 | 'Class 4 Red Giant Effects', |
| 107 | 'Class 3 Red Giant Effects', |
| 108 | 'Class 2 Red Giant Effects', |
| 109 | 'Class 1 Red Giant Effects', |
| 110 | ] |
| 111 | for effect in fit.projectedModules: |
| 112 | if effect.state == FittingModuleState.ONLINE and effect.fullName in relevantEffects: |
| 113 | # note: despite the name, smartbombDamageMultiplier applies to the damage of launched bombs |
| 114 | environementBombDamageModifier = environementBombDamageModifier *\ |
| 115 | effect.item.attributes['smartbombDamageMultiplier'].value |
| 116 | |
| 117 | # signature radius of the current fit to calculate the application of bombs |
| 118 | shipSigRadius = fit.ship.getModifiedItemAttr('signatureRadius') |
| 119 | |
| 120 | # get the raw values for all hp layers |
| 121 | hullHP = fit.ship.getModifiedItemAttr('hp') |
| 122 | armorHP = fit.ship.getModifiedItemAttr('armorHP') |
| 123 | shieldHP = fit.ship.getModifiedItemAttr('shieldCapacity') |
| 124 | |
| 125 | # we calculate the total ehp for pure damage of all types based on raw hp and resonance (resonance= 1-resistance) |
| 126 | emEhp = hullHP / fit.ship.getModifiedItemAttr('emDamageResonance') +\ |
| 127 | armorHP / fit.ship.getModifiedItemAttr('armorEmDamageResonance') +\ |
| 128 | shieldHP / fit.ship.getModifiedItemAttr('shieldEmDamageResonance') |
| 129 | thermalEhp = hullHP / fit.ship.getModifiedItemAttr('thermalDamageResonance') +\ |
| 130 | armorHP / fit.ship.getModifiedItemAttr('armorThermalDamageResonance') +\ |
| 131 | shieldHP / fit.ship.getModifiedItemAttr('shieldThermalDamageResonance') |
| 132 | kineticEhp = hullHP / fit.ship.getModifiedItemAttr('kineticDamageResonance') +\ |
| 133 | armorHP / fit.ship.getModifiedItemAttr('armorKineticDamageResonance') +\ |
| 134 | shieldHP / fit.ship.getModifiedItemAttr('shieldKineticDamageResonance') |
| 135 | explosiveEhp = hullHP / fit.ship.getModifiedItemAttr('explosiveDamageResonance') +\ |
| 136 | armorHP / fit.ship.getModifiedItemAttr('armorExplosiveDamageResonance') +\ |
| 137 | shieldHP / fit.ship.getModifiedItemAttr('shieldExplosiveDamageResonance') |
| 138 | |
| 139 | # updates the labels for each combination of covert op level and damage type |
| 140 | for covertLevel in ("0", "1", "2", "3", "4", "5"): |
| 141 | covertOpsBombDamageModifier = 1 + 0.05 * int(covertLevel) |
| 142 | for damageType, ehp, bomber, bomb in (("em", emEhp, "Purifier", emBomb), |
| 143 | ("thermal", thermalEhp, "Nemesis", thermalBomb), |
| 144 | ("kinetic", kineticEhp, "Manticore", kineticBomb), |
| 145 | ("explosive", explosiveEhp, "Hound", explosiveBomb)): |
| 146 | baseBombDamage = (bomb.attributes['emDamage'].value + bomb.attributes['thermalDamage'].value + |
| 147 | bomb.attributes['kineticDamage'].value + bomb.attributes['explosiveDamage'].value) |
nothing calls this directly
no test coverage detected