diff --git a/config.py b/config.py index 716f5ef24..339a19e0a 100644 --- a/config.py +++ b/config.py @@ -20,10 +20,10 @@ debug = False saveInRoot = False # Version data -version = "1.33.3" -tag = "git" -expansionName = "Lifeblood" -expansionVersion = "1.7" +version = "1.34.0" +tag = "Stable" +expansionName = " Arms Race" +expansionVersion = "1.3" evemonMinVersion = "4081" pyfaPath = None @@ -65,7 +65,7 @@ def getPyfaRoot(): def getGitVersion(): - with open(os.path.join(pyfaPath, 'gitversion')) as f: + with open(os.path.join(pyfaPath, '.version')) as f: version = f.readline() return version diff --git a/dist_assets/win/pyfa.spec b/dist_assets/win/pyfa.spec index 21e8bef83..f3522bd81 100644 --- a/dist_assets/win/pyfa.spec +++ b/dist_assets/win/pyfa.spec @@ -23,7 +23,7 @@ added_files = [ ('../../eve.db', '.'), ('../../README.md', '.'), ('../../LICENSE', '.'), - ('../../gitversion', '.'), + ('../../.version', '.'), ] import_these = [] diff --git a/eos/db/migrations/upgrade27.py b/eos/db/migrations/upgrade27.py new file mode 100644 index 000000000..23d0959a7 --- /dev/null +++ b/eos/db/migrations/upgrade27.py @@ -0,0 +1,9 @@ +""" +Migration 27 + +- Resets all alpha clones to 1 (CCP consolidated all alpha's into one skillset) +""" + + +def upgrade(saveddata_engine): + saveddata_engine.execute("UPDATE characters SET alphaCloneID = 1 WHERE alphaCloneID IS NOT NULL") diff --git a/eos/effects/antiwarpscramblingpassive.py b/eos/effects/antiwarpscramblingpassive.py index b6181e9a3..6a3165c0a 100644 --- a/eos/effects/antiwarpscramblingpassive.py +++ b/eos/effects/antiwarpscramblingpassive.py @@ -6,4 +6,4 @@ type = "passive" def handler(fit, module, context): - fit.ship.increaseItemAttr("warmScrambleStatus", module.getModifiedItemAttr("warpScrambleStrength")) + fit.ship.increaseItemAttr("warpScrambleStatus", module.getModifiedItemAttr("warpScrambleStrength")) diff --git a/eos/effects/boosterarmorhppenalty.py b/eos/effects/boosterarmorhppenalty.py index 436e653f2..c65338065 100644 --- a/eos/effects/boosterarmorhppenalty.py +++ b/eos/effects/boosterarmorhppenalty.py @@ -1,7 +1,7 @@ # boosterArmorHpPenalty # # Used by: -# Implants from group: Booster (12 of 52) +# Implants from group: Booster (12 of 54) type = "boosterSideEffect" # User-friendly name for the side effect diff --git a/eos/effects/boostermaxvelocitypenalty.py b/eos/effects/boostermaxvelocitypenalty.py index 51cbea76a..c6b7d99e0 100644 --- a/eos/effects/boostermaxvelocitypenalty.py +++ b/eos/effects/boostermaxvelocitypenalty.py @@ -1,7 +1,7 @@ # boosterMaxVelocityPenalty # # Used by: -# Implants from group: Booster (12 of 52) +# Implants from group: Booster (12 of 54) type = "boosterSideEffect" # User-friendly name for the side effect diff --git a/eos/effects/boostermodifyboosterturretpenalty.py b/eos/effects/boostermodifyboosterturretpenalty.py index c855a84e4..e016e57e8 100644 --- a/eos/effects/boostermodifyboosterturretpenalty.py +++ b/eos/effects/boostermodifyboosterturretpenalty.py @@ -9,7 +9,7 @@ type = "passive" def handler(fit, container, context): level = container.level if "skill" in context else 1 - attrs = ("boosterTurretFalloffPenalty", "boosterTurretOptimalRange", "boosterTurretTrackingPenalty") + attrs = ("boosterTurretFalloffPenalty", "boosterTurretOptimalRangePenalty", "boosterTurretTrackingPenalty") for attr in attrs: fit.boosters.filteredItemBoost(lambda booster: True, attr, container.getModifiedItemAttr("boosterAttributeModifier") * level) diff --git a/eos/effects/boostershieldboostamountpenaltyshieldskills.py b/eos/effects/boostershieldboostamountpenaltyshieldskills.py index d3badaf46..4c9726ea9 100644 --- a/eos/effects/boostershieldboostamountpenaltyshieldskills.py +++ b/eos/effects/boostershieldboostamountpenaltyshieldskills.py @@ -1,3 +1,9 @@ +# boosterShieldBoostAmountPenaltyShieldSkills +# +# Used by: +# Implants named like: Crash Booster (3 of 4) +# Implants named like: Frentix Booster (3 of 4) +# Implants named like: Mindflood Booster (3 of 4) type = "boosterSideEffect" # User-friendly name for the side effect diff --git a/eos/effects/boostershieldcapacitypenalty.py b/eos/effects/boostershieldcapacitypenalty.py index 905a519e6..9497300b9 100644 --- a/eos/effects/boostershieldcapacitypenalty.py +++ b/eos/effects/boostershieldcapacitypenalty.py @@ -1,7 +1,7 @@ # boosterShieldCapacityPenalty # # Used by: -# Implants from group: Booster (12 of 52) +# Implants from group: Booster (12 of 54) type = "boosterSideEffect" # User-friendly name for the side effect diff --git a/eos/effects/boosterturretoptimalrangepenalty.py b/eos/effects/boosterturretoptimalrangepenalty.py index 11354017f..e62bef3f5 100644 --- a/eos/effects/boosterturretoptimalrangepenalty.py +++ b/eos/effects/boosterturretoptimalrangepenalty.py @@ -10,7 +10,7 @@ type = "boosterSideEffect" displayName = "Turret Optimal Range" # Attribute that this effect targets -attr = "boosterTurretOptimalRange" +attr = "boosterTurretOptimalRangePenalty" def handler(fit, booster, context): diff --git a/eos/effects/covertopsandreconopscloakmoduledelaybonus.py b/eos/effects/covertopsandreconopscloakmoduledelaybonus.py index b33179fbc..a808a2650 100644 --- a/eos/effects/covertopsandreconopscloakmoduledelaybonus.py +++ b/eos/effects/covertopsandreconopscloakmoduledelaybonus.py @@ -5,8 +5,8 @@ # Ships from group: Blockade Runner (4 of 4) # Ships from group: Covert Ops (7 of 7) # Ships from group: Expedition Frigate (2 of 2) -# Ships from group: Force Recon Ship (7 of 8) -# Ships from group: Stealth Bomber (4 of 5) +# Ships from group: Force Recon Ship (8 of 8) +# Ships from group: Stealth Bomber (5 of 5) # Ships named like: Stratios (2 of 2) # Subsystems named like: Defensive Covert Reconfiguration (4 of 4) # Ship: Astero diff --git a/eos/effects/covertopscloakcpupercentbonus1.py b/eos/effects/covertopscloakcpupercentbonus1.py index e7763ec56..703b37189 100644 --- a/eos/effects/covertopscloakcpupercentbonus1.py +++ b/eos/effects/covertopscloakcpupercentbonus1.py @@ -8,4 +8,4 @@ runTime = "early" def handler(fit, ship, context): fit.modules.filteredItemBoost(lambda mod: mod.item.requiresSkill("Cloaking"), - "cpu", ship.getModifiedItemAttr("eliteBonusCoverOps1"), skill="Covert Ops") + "cpu", ship.getModifiedItemAttr("eliteBonusCovertOps1"), skill="Covert Ops") diff --git a/eos/effects/covertopscloakcpupercentrolebonus.py b/eos/effects/covertopscloakcpupercentrolebonus.py index fea79b8e2..74269721d 100644 --- a/eos/effects/covertopscloakcpupercentrolebonus.py +++ b/eos/effects/covertopscloakcpupercentrolebonus.py @@ -5,7 +5,9 @@ # Ship: Astero # Ship: Enforcer # Ship: Pacifier +# Ship: Victor # Ship: Victorieux Luxury Yacht +# Ship: Virtuoso type = "passive" runTime = "early" diff --git a/eos/effects/covertopsstealthbombersiegemissilelaunchercpuneedbonus.py b/eos/effects/covertopsstealthbombersiegemissilelaunchercpuneedbonus.py new file mode 100644 index 000000000..926aa81c0 --- /dev/null +++ b/eos/effects/covertopsstealthbombersiegemissilelaunchercpuneedbonus.py @@ -0,0 +1,10 @@ +# covertOpsStealthBomberSiegeMissileLauncherCPUNeedBonus +# +# Used by: +# Ship: Virtuoso +type = "passive" + + +def handler(fit, ship, context): + fit.modules.filteredItemMultiply(lambda mod: mod.item.group.name == "Missile Launcher Torpedo", + "cpu", ship.getModifiedItemAttr("stealthBomberLauncherCPU")) diff --git a/eos/effects/covertopsstealthbombersiegemissilelauncerpowerneedbonus.py b/eos/effects/covertopsstealthbombersiegemissilelauncherpowerneedbonus.py similarity index 72% rename from eos/effects/covertopsstealthbombersiegemissilelauncerpowerneedbonus.py rename to eos/effects/covertopsstealthbombersiegemissilelauncherpowerneedbonus.py index 3fb9ab56c..6e26dc922 100644 --- a/eos/effects/covertopsstealthbombersiegemissilelauncerpowerneedbonus.py +++ b/eos/effects/covertopsstealthbombersiegemissilelauncherpowerneedbonus.py @@ -1,7 +1,7 @@ -# covertOpsStealthBomberSiegeMissileLauncerPowerNeedBonus +# covertOpsStealthBomberSiegeMissileLauncherPowerNeedBonus # # Used by: -# Ships from group: Stealth Bomber (4 of 5) +# Ships from group: Stealth Bomber (5 of 5) type = "passive" diff --git a/eos/effects/covertopsstealthbombertargettingdelaybonus.py b/eos/effects/covertopsstealthbombertargettingdelaybonus.py index 0575b557e..14d838e74 100644 --- a/eos/effects/covertopsstealthbombertargettingdelaybonus.py +++ b/eos/effects/covertopsstealthbombertargettingdelaybonus.py @@ -2,7 +2,7 @@ # # Used by: # Ships from group: Black Ops (5 of 5) -# Ships from group: Stealth Bomber (4 of 5) +# Ships from group: Stealth Bomber (5 of 5) # Ship: Caedes # Ship: Chremoas # Ship: Endurance diff --git a/eos/effects/cynosuraldurationbonus.py b/eos/effects/cynosuraldurationbonus.py index e49828315..cb306dded 100644 --- a/eos/effects/cynosuraldurationbonus.py +++ b/eos/effects/cynosuraldurationbonus.py @@ -1,7 +1,7 @@ # cynosuralDurationBonus # # Used by: -# Ships from group: Force Recon Ship (6 of 8) +# Ships from group: Force Recon Ship (7 of 8) type = "passive" diff --git a/eos/effects/cynosuraltheoryconsumptionbonus.py b/eos/effects/cynosuraltheoryconsumptionbonus.py index f0f43c0fb..217374cee 100644 --- a/eos/effects/cynosuraltheoryconsumptionbonus.py +++ b/eos/effects/cynosuraltheoryconsumptionbonus.py @@ -1,7 +1,7 @@ # cynosuralTheoryConsumptionBonus # # Used by: -# Ships from group: Force Recon Ship (6 of 8) +# Ships from group: Force Recon Ship (7 of 8) # Skill: Cynosural Field Theory type = "passive" diff --git a/eos/effects/elitebonuscoveropsbombemdmg1.py b/eos/effects/elitebonuscoveropsbombemdmg1.py index 0c4adf51c..e9ac65114 100644 --- a/eos/effects/elitebonuscoveropsbombemdmg1.py +++ b/eos/effects/elitebonuscoveropsbombemdmg1.py @@ -7,4 +7,4 @@ type = "passive" def handler(fit, ship, context): fit.modules.filteredChargeBoost(lambda mod: mod.charge.requiresSkill("Bomb Deployment"), - "emDamage", ship.getModifiedItemAttr("eliteBonusCoverOps1"), skill="Covert Ops") + "emDamage", ship.getModifiedItemAttr("eliteBonusCovertOps1"), skill="Covert Ops") diff --git a/eos/effects/elitebonuscoveropsbombexplosivedmg1.py b/eos/effects/elitebonuscoveropsbombexplosivedmg1.py index 6bca48435..efc729b51 100644 --- a/eos/effects/elitebonuscoveropsbombexplosivedmg1.py +++ b/eos/effects/elitebonuscoveropsbombexplosivedmg1.py @@ -2,10 +2,11 @@ # # Used by: # Ship: Hound +# Ship: Virtuoso type = "passive" def handler(fit, ship, context): fit.modules.filteredChargeBoost(lambda mod: mod.charge.requiresSkill("Bomb Deployment"), - "explosiveDamage", ship.getModifiedItemAttr("eliteBonusCoverOps1"), + "explosiveDamage", ship.getModifiedItemAttr("eliteBonusCovertOps1"), skill="Covert Ops") diff --git a/eos/effects/elitebonuscoveropsbombkineticdmg1.py b/eos/effects/elitebonuscoveropsbombkineticdmg1.py index bbab8ded0..e44ec9270 100644 --- a/eos/effects/elitebonuscoveropsbombkineticdmg1.py +++ b/eos/effects/elitebonuscoveropsbombkineticdmg1.py @@ -7,5 +7,5 @@ type = "passive" def handler(fit, ship, context): fit.modules.filteredChargeBoost(lambda mod: mod.charge.requiresSkill("Bomb Deployment"), - "kineticDamage", ship.getModifiedItemAttr("eliteBonusCoverOps1"), + "kineticDamage", ship.getModifiedItemAttr("eliteBonusCovertOps1"), skill="Covert Ops") diff --git a/eos/effects/elitebonuscoveropsbombthermaldmg1.py b/eos/effects/elitebonuscoveropsbombthermaldmg1.py index 13dd5af5a..681231040 100644 --- a/eos/effects/elitebonuscoveropsbombthermaldmg1.py +++ b/eos/effects/elitebonuscoveropsbombthermaldmg1.py @@ -2,10 +2,11 @@ # # Used by: # Ship: Nemesis +# Ship: Virtuoso type = "passive" def handler(fit, ship, context): fit.modules.filteredChargeBoost(lambda mod: mod.charge.requiresSkill("Bomb Deployment"), - "thermalDamage", ship.getModifiedItemAttr("eliteBonusCoverOps1"), + "thermalDamage", ship.getModifiedItemAttr("eliteBonusCovertOps1"), skill="Covert Ops") diff --git a/eos/effects/elitebonuscoveropsnosneutfalloff1.py b/eos/effects/elitebonuscoveropsnosneutfalloff1.py index aa5b5b558..8c142334a 100644 --- a/eos/effects/elitebonuscoveropsnosneutfalloff1.py +++ b/eos/effects/elitebonuscoveropsnosneutfalloff1.py @@ -7,5 +7,5 @@ type = "passive" def handler(fit, src, context): fit.modules.filteredItemBoost(lambda mod: mod.item.group.name in ("Energy Nosferatu", "Energy Neutralizer"), - "falloffEffectiveness", src.getModifiedItemAttr("eliteBonusCoverOps1"), + "falloffEffectiveness", src.getModifiedItemAttr("eliteBonusCovertOps1"), stackingPenalties=True, skill="Covert Ops") diff --git a/eos/effects/elitebonuscoveropsscanprobestrength2.py b/eos/effects/elitebonuscoveropsscanprobestrength2.py index 7b3df9a4b..8b922cee1 100644 --- a/eos/effects/elitebonuscoveropsscanprobestrength2.py +++ b/eos/effects/elitebonuscoveropsscanprobestrength2.py @@ -7,5 +7,5 @@ type = "passive" def handler(fit, ship, context): fit.modules.filteredChargeBoost(lambda mod: mod.charge.group.name == "Scanner Probe", - "baseSensorStrength", ship.getModifiedItemAttr("eliteBonusCoverOps2"), + "baseSensorStrength", ship.getModifiedItemAttr("eliteBonusCovertOps2"), skill="Covert Ops") diff --git a/eos/effects/elitebonuscoveropswarpvelocity1.py b/eos/effects/elitebonuscoveropswarpvelocity1.py index 77c3b560e..1a25a973a 100644 --- a/eos/effects/elitebonuscoveropswarpvelocity1.py +++ b/eos/effects/elitebonuscoveropswarpvelocity1.py @@ -6,4 +6,4 @@ type = "passive" def handler(fit, src, context): - fit.ship.boostItemAttr("warpSpeedMultiplier", src.getModifiedItemAttr("eliteBonusCoverOps1"), skill="Covert Ops") + fit.ship.boostItemAttr("warpSpeedMultiplier", src.getModifiedItemAttr("eliteBonusCovertOps1"), skill="Covert Ops") diff --git a/eos/effects/elitebonuscovertopsshtdamage3.py b/eos/effects/elitebonuscovertopsshtdamage3.py new file mode 100644 index 000000000..2a9628566 --- /dev/null +++ b/eos/effects/elitebonuscovertopsshtdamage3.py @@ -0,0 +1,10 @@ +# eliteBonusCovertOpsSHTDamage3 +# +# Used by: +# Ship: Virtuoso +type = "passive" + + +def handler(fit, src, context): + fit.modules.filteredItemBoost(lambda mod: mod.item.requiresSkill("Small Hybrid Turret"), "damageMultiplier", + src.getModifiedItemAttr("eliteBonusCovertOps3"), skill="Covert Ops") diff --git a/eos/effects/elitecovertopsbonusarmorrepamount4.py b/eos/effects/elitecovertopsbonusarmorrepamount4.py new file mode 100644 index 000000000..00a63046b --- /dev/null +++ b/eos/effects/elitecovertopsbonusarmorrepamount4.py @@ -0,0 +1,10 @@ +# eliteCovertOpsBonusArmorRepAmount4 +# +# Used by: +# Ship: Virtuoso +type = "passive" + + +def handler(fit, src, context): + fit.modules.filteredItemBoost(lambda mod: mod.item.requiresSkill("Repair Systems"), "armorDamageAmount", + src.getModifiedItemAttr("eliteBonusCovertOps4"), skill="Covert Ops") diff --git a/eos/effects/elitereconbonusarmorrepamount3.py b/eos/effects/elitereconbonusarmorrepamount3.py new file mode 100644 index 000000000..658f94883 --- /dev/null +++ b/eos/effects/elitereconbonusarmorrepamount3.py @@ -0,0 +1,10 @@ +# eliteReconBonusArmorRepAmount3 +# +# Used by: +# Ship: Victor +type = "passive" + + +def handler(fit, src, context): + fit.modules.filteredItemBoost(lambda mod: mod.item.requiresSkill("Repair Systems"), "armorDamageAmount", + src.getModifiedItemAttr("eliteBonusReconShip3"), skill="Recon Ships") diff --git a/eos/effects/elitereconbonusmhtdamage1.py b/eos/effects/elitereconbonusmhtdamage1.py new file mode 100644 index 000000000..3bb0f6833 --- /dev/null +++ b/eos/effects/elitereconbonusmhtdamage1.py @@ -0,0 +1,10 @@ +# eliteReconBonusMHTDamage1 +# +# Used by: +# Ship: Victor +type = "passive" + + +def handler(fit, src, context): + fit.modules.filteredItemBoost(lambda mod: mod.item.requiresSkill("Medium Hybrid Turret"), "damageMultiplier", + src.getModifiedItemAttr("eliteBonusReconShip1"), skill="Recon Ships") diff --git a/eos/effects/elitereconstasiswebbonus2.py b/eos/effects/elitereconstasiswebbonus2.py index 5cbfad54b..071739847 100644 --- a/eos/effects/elitereconstasiswebbonus2.py +++ b/eos/effects/elitereconstasiswebbonus2.py @@ -4,6 +4,7 @@ # Ship: Huginn # Ship: Moracha # Ship: Rapier +# Ship: Victor type = "passive" diff --git a/eos/effects/hackingvirusstrengthbonus.py b/eos/effects/hackingvirusstrengthbonus.py new file mode 100644 index 000000000..d830a228e --- /dev/null +++ b/eos/effects/hackingvirusstrengthbonus.py @@ -0,0 +1,6 @@ +# Not used by any item +type = "passive" + + +def handler(fit, src, context): + fit.modules.filteredItemIncrease(lambda mod: mod.item.requiresSkill("Hacking"), "virusStrength", src.getModifiedItemAttr("virusStrengthBonus")) diff --git a/eos/effects/missileskillwarheadupgradesemdamagebonus.py b/eos/effects/missileskillwarheadupgradesemdamagebonus.py index 360b4d070..675b09ab0 100644 --- a/eos/effects/missileskillwarheadupgradesemdamagebonus.py +++ b/eos/effects/missileskillwarheadupgradesemdamagebonus.py @@ -1,7 +1,7 @@ # missileSkillWarheadUpgradesEmDamageBonus # # Used by: -# Implants named like: Agency Damage Booster (3 of 3) +# Implants named like: Agency 'Pyrolancea' DB Dose (3 of 3) # Skill: Warhead Upgrades type = "passive" diff --git a/eos/effects/missileskillwarheadupgradesexplosivedamagebonus.py b/eos/effects/missileskillwarheadupgradesexplosivedamagebonus.py index 213c334eb..98c7941d6 100644 --- a/eos/effects/missileskillwarheadupgradesexplosivedamagebonus.py +++ b/eos/effects/missileskillwarheadupgradesexplosivedamagebonus.py @@ -1,7 +1,7 @@ # missileSkillWarheadUpgradesExplosiveDamageBonus # # Used by: -# Implants named like: Agency Damage Booster (3 of 3) +# Implants named like: Agency 'Pyrolancea' DB Dose (3 of 3) # Skill: Warhead Upgrades type = "passive" diff --git a/eos/effects/missileskillwarheadupgradeskineticdamagebonus.py b/eos/effects/missileskillwarheadupgradeskineticdamagebonus.py index 5496877de..497f1e20c 100644 --- a/eos/effects/missileskillwarheadupgradeskineticdamagebonus.py +++ b/eos/effects/missileskillwarheadupgradeskineticdamagebonus.py @@ -1,7 +1,7 @@ # missileSkillWarheadUpgradesKineticDamageBonus # # Used by: -# Implants named like: Agency Damage Booster (3 of 3) +# Implants named like: Agency 'Pyrolancea' DB Dose (3 of 3) # Skill: Warhead Upgrades type = "passive" diff --git a/eos/effects/missileskillwarheadupgradesthermaldamagebonus.py b/eos/effects/missileskillwarheadupgradesthermaldamagebonus.py index c42b27a90..23685da0a 100644 --- a/eos/effects/missileskillwarheadupgradesthermaldamagebonus.py +++ b/eos/effects/missileskillwarheadupgradesthermaldamagebonus.py @@ -1,7 +1,7 @@ # missileSkillWarheadUpgradesThermalDamageBonus # # Used by: -# Implants named like: Agency Damage Booster (3 of 3) +# Implants named like: Agency 'Pyrolancea' DB Dose (3 of 3) # Skill: Warhead Upgrades type = "passive" diff --git a/eos/effects/navigationvelocitybonuspostpercentmaxvelocityship.py b/eos/effects/navigationvelocitybonuspostpercentmaxvelocityship.py index 6398685c8..bf8dd4894 100644 --- a/eos/effects/navigationvelocitybonuspostpercentmaxvelocityship.py +++ b/eos/effects/navigationvelocitybonuspostpercentmaxvelocityship.py @@ -2,7 +2,7 @@ # # Used by: # Modules from group: Rig Anchor (4 of 4) -# Implants named like: Agency Speed Booster (3 of 3) +# Implants named like: Agency 'Overclocker' SB Dose (3 of 3) # Implants named like: grade Snake (16 of 18) # Modules named like: Auxiliary Thrusters (8 of 8) # Implant: Quafe Zero diff --git a/eos/effects/rolebonus2boosterpenaltyreduction.py b/eos/effects/rolebonus2boosterpenaltyreduction.py new file mode 100644 index 000000000..19645f49e --- /dev/null +++ b/eos/effects/rolebonus2boosterpenaltyreduction.py @@ -0,0 +1,21 @@ +# roleBonus2BoosterPenaltyReduction +# +# Used by: +# Ship: Victor +# Ship: Virtuoso +type = "passive" + + +def handler(fit, src, context): + fit.boosters.filteredItemBoost(lambda mod: mod.item.group.name == "Booster", "boosterMissileAOECloudPenalty", src.getModifiedItemAttr("shipBonusRole2")) + fit.boosters.filteredItemBoost(lambda mod: mod.item.group.name == "Booster", "boosterCapacitorCapacityPenalty", src.getModifiedItemAttr("shipBonusRole2")) + fit.boosters.filteredItemBoost(lambda mod: mod.item.group.name == "Booster", "boosterAOEVelocityPenalty", src.getModifiedItemAttr("shipBonusRole2")) + fit.boosters.filteredItemBoost(lambda mod: mod.item.group.name == "Booster", "boosterArmorRepairAmountPenalty", src.getModifiedItemAttr("shipBonusRole2")) + fit.boosters.filteredItemBoost(lambda mod: mod.item.group.name == "Booster", "boosterMissileVelocityPenalty", src.getModifiedItemAttr("shipBonusRole2")) + fit.boosters.filteredItemBoost(lambda mod: mod.item.group.name == "Booster", "boosterTurretTrackingPenalty", src.getModifiedItemAttr("shipBonusRole2")) + fit.boosters.filteredItemBoost(lambda mod: mod.item.group.name == "Booster", "boosterShieldCapacityPenalty", src.getModifiedItemAttr("shipBonusRole2")) + fit.boosters.filteredItemBoost(lambda mod: mod.item.group.name == "Booster", "boosterTurretOptimalRangePenalty", src.getModifiedItemAttr("shipBonusRole2")) + fit.boosters.filteredItemBoost(lambda mod: mod.item.group.name == "Booster", "boosterShieldBoostAmountPenalty", src.getModifiedItemAttr("shipBonusRole2")) + fit.boosters.filteredItemBoost(lambda mod: mod.item.group.name == "Booster", "boosterTurretFalloffPenalty", src.getModifiedItemAttr("shipBonusRole2")) + fit.boosters.filteredItemBoost(lambda mod: mod.item.group.name == "Booster", "boosterArmorHPPenalty", src.getModifiedItemAttr("shipBonusRole2")) + fit.boosters.filteredItemBoost(lambda mod: mod.item.group.name == "Booster", "boosterMaxVelocityPenalty", src.getModifiedItemAttr("shipBonusRole2")) diff --git a/eos/effects/rolebonusbomblauncherpwgcpu3.py b/eos/effects/rolebonusbomblauncherpwgcpu3.py new file mode 100644 index 000000000..e61365e2a --- /dev/null +++ b/eos/effects/rolebonusbomblauncherpwgcpu3.py @@ -0,0 +1,10 @@ +# roleBonusBombLauncherPWGCPU3 +# +# Used by: +# Ship: Virtuoso +type = "passive" + + +def handler(fit, src, context): + fit.modules.filteredItemBoost(lambda mod: mod.item.requiresSkill("Bomb Deployment"), "power", src.getModifiedItemAttr("shipBonusRole3")) + fit.modules.filteredItemBoost(lambda mod: mod.item.requiresSkill("Bomb Deployment"), "cpu", src.getModifiedItemAttr("shipBonusRole3")) diff --git a/eos/effects/rolebonusmhtdamage1.py b/eos/effects/rolebonusmhtdamage1.py new file mode 100644 index 000000000..bbec67fbd --- /dev/null +++ b/eos/effects/rolebonusmhtdamage1.py @@ -0,0 +1,9 @@ +# roleBonusMHTDamage1 +# +# Used by: +# Ship: Victor +type = "passive" + + +def handler(fit, src, context): + fit.modules.filteredItemBoost(lambda mod: mod.item.requiresSkill("Medium Hybrid Turret"), "damageMultiplier", src.getModifiedItemAttr("shipBonusRole1")) diff --git a/eos/effects/rolebonustorprof1.py b/eos/effects/rolebonustorprof1.py new file mode 100644 index 000000000..c87583d18 --- /dev/null +++ b/eos/effects/rolebonustorprof1.py @@ -0,0 +1,9 @@ +# roleBonusTorpRoF1 +# +# Used by: +# Ship: Virtuoso +type = "passive" + + +def handler(fit, src, context): + fit.modules.filteredItemBoost(lambda mod: mod.item.group.name == "Missile Launcher Torpedo", "speed", src.getModifiedItemAttr("shipBonusRole1")) diff --git a/eos/effects/shieldboostamplifierpassive.py b/eos/effects/shieldboostamplifierpassive.py index 810f08aba..c1361e338 100644 --- a/eos/effects/shieldboostamplifierpassive.py +++ b/eos/effects/shieldboostamplifierpassive.py @@ -1,7 +1,7 @@ # shieldBoostAmplifierPassive # # Used by: -# Implants named like: Agency Tank Booster (3 of 3) +# Implants named like: Agency 'Hardshell' TB Dose (3 of 3) # Implants named like: grade Crystal (15 of 18) type = "passive" diff --git a/eos/effects/shipbonuselitecover2torpedoemdamage.py b/eos/effects/shipbonuselitecover2torpedoemdamage.py index 6db342ce5..89697d829 100644 --- a/eos/effects/shipbonuselitecover2torpedoemdamage.py +++ b/eos/effects/shipbonuselitecover2torpedoemdamage.py @@ -7,4 +7,4 @@ type = "passive" def handler(fit, ship, context): fit.modules.filteredChargeBoost(lambda mod: mod.charge.requiresSkill("Torpedoes"), - "emDamage", ship.getModifiedItemAttr("eliteBonusCoverOps2"), skill="Covert Ops") + "emDamage", ship.getModifiedItemAttr("eliteBonusCovertOps2"), skill="Covert Ops") diff --git a/eos/effects/shipbonuselitecover2torpedoexplosivedamage.py b/eos/effects/shipbonuselitecover2torpedoexplosivedamage.py index 29c7a5755..779189de1 100644 --- a/eos/effects/shipbonuselitecover2torpedoexplosivedamage.py +++ b/eos/effects/shipbonuselitecover2torpedoexplosivedamage.py @@ -2,10 +2,11 @@ # # Used by: # Ship: Hound +# Ship: Virtuoso type = "passive" def handler(fit, ship, context): fit.modules.filteredChargeBoost(lambda mod: mod.charge.requiresSkill("Torpedoes"), - "explosiveDamage", ship.getModifiedItemAttr("eliteBonusCoverOps2"), + "explosiveDamage", ship.getModifiedItemAttr("eliteBonusCovertOps2"), skill="Covert Ops") diff --git a/eos/effects/shipbonuselitecover2torpedokineticdamage.py b/eos/effects/shipbonuselitecover2torpedokineticdamage.py index 811f14ee2..5ed5f7a69 100644 --- a/eos/effects/shipbonuselitecover2torpedokineticdamage.py +++ b/eos/effects/shipbonuselitecover2torpedokineticdamage.py @@ -7,5 +7,5 @@ type = "passive" def handler(fit, ship, context): fit.modules.filteredChargeBoost(lambda mod: mod.charge.requiresSkill("Torpedoes"), - "kineticDamage", ship.getModifiedItemAttr("eliteBonusCoverOps2"), + "kineticDamage", ship.getModifiedItemAttr("eliteBonusCovertOps2"), skill="Covert Ops") diff --git a/eos/effects/shipbonuselitecover2torpedothermaldamage.py b/eos/effects/shipbonuselitecover2torpedothermaldamage.py index 245685e41..358023fee 100644 --- a/eos/effects/shipbonuselitecover2torpedothermaldamage.py +++ b/eos/effects/shipbonuselitecover2torpedothermaldamage.py @@ -2,10 +2,11 @@ # # Used by: # Ship: Nemesis +# Ship: Virtuoso type = "passive" def handler(fit, ship, context): fit.modules.filteredChargeBoost(lambda mod: mod.charge.requiresSkill("Torpedoes"), - "thermalDamage", ship.getModifiedItemAttr("eliteBonusCoverOps2"), + "thermalDamage", ship.getModifiedItemAttr("eliteBonusCovertOps2"), skill="Covert Ops") diff --git a/eos/effects/shipbonusemshieldresistancecb2.py b/eos/effects/shipbonusemshieldresistancecb2.py index 4e9cdf83d..f69913dfd 100644 --- a/eos/effects/shipbonusemshieldresistancecb2.py +++ b/eos/effects/shipbonusemshieldresistancecb2.py @@ -1,7 +1,7 @@ # shipBonusEmShieldResistanceCB2 # # Used by: -# Ships named like: Rattlesnake (2 of 2) +# Ship: Rattlesnake # Ship: Rokh # Ship: Scorpion Navy Issue type = "passive" diff --git a/eos/effects/shipbonusexplosiveshieldresistancecb2.py b/eos/effects/shipbonusexplosiveshieldresistancecb2.py index 77f1f0356..8c1459e98 100644 --- a/eos/effects/shipbonusexplosiveshieldresistancecb2.py +++ b/eos/effects/shipbonusexplosiveshieldresistancecb2.py @@ -1,7 +1,7 @@ # shipBonusExplosiveShieldResistanceCB2 # # Used by: -# Ships named like: Rattlesnake (2 of 2) +# Ship: Rattlesnake # Ship: Rokh # Ship: Scorpion Navy Issue type = "passive" diff --git a/eos/effects/shipbonusforceauxiliaryc1remoteboostandcapamount.py b/eos/effects/shipbonusforceauxiliaryc1remoteboostandcapamount.py index f4d1939eb..952cbb532 100644 --- a/eos/effects/shipbonusforceauxiliaryc1remoteboostandcapamount.py +++ b/eos/effects/shipbonusforceauxiliaryc1remoteboostandcapamount.py @@ -1,7 +1,6 @@ # shipBonusForceAuxiliaryC1RemoteBoostAndCapAmount # # Used by: -# Ship: Loggerhead # Ship: Minokawa type = "passive" diff --git a/eos/effects/shipbonusheavydronearmorhppiratefaction.py b/eos/effects/shipbonusheavydronearmorhppiratefaction.py index 369005a2d..244690dca 100644 --- a/eos/effects/shipbonusheavydronearmorhppiratefaction.py +++ b/eos/effects/shipbonusheavydronearmorhppiratefaction.py @@ -1,7 +1,7 @@ # shipBonusHeavyDroneArmorHpPirateFaction # # Used by: -# Ships named like: Rattlesnake (2 of 2) +# Ship: Rattlesnake type = "passive" diff --git a/eos/effects/shipbonusheavydronedamagemultiplierpiratefaction.py b/eos/effects/shipbonusheavydronedamagemultiplierpiratefaction.py index 6682948a8..8f38f24ee 100644 --- a/eos/effects/shipbonusheavydronedamagemultiplierpiratefaction.py +++ b/eos/effects/shipbonusheavydronedamagemultiplierpiratefaction.py @@ -1,7 +1,7 @@ # shipBonusHeavyDroneDamageMultiplierPirateFaction # # Used by: -# Ships named like: Rattlesnake (2 of 2) +# Ship: Rattlesnake type = "passive" diff --git a/eos/effects/shipbonusheavydronehppiratefaction.py b/eos/effects/shipbonusheavydronehppiratefaction.py index 9c12a7101..c05b7da76 100644 --- a/eos/effects/shipbonusheavydronehppiratefaction.py +++ b/eos/effects/shipbonusheavydronehppiratefaction.py @@ -1,7 +1,7 @@ # shipBonusHeavyDroneHPPirateFaction # # Used by: -# Ships named like: Rattlesnake (2 of 2) +# Ship: Rattlesnake type = "passive" diff --git a/eos/effects/shipbonusheavydroneshieldhppiratefaction.py b/eos/effects/shipbonusheavydroneshieldhppiratefaction.py index f2575bf91..6fd8b4d3d 100644 --- a/eos/effects/shipbonusheavydroneshieldhppiratefaction.py +++ b/eos/effects/shipbonusheavydroneshieldhppiratefaction.py @@ -1,7 +1,7 @@ # shipBonusHeavyDroneShieldHpPirateFaction # # Used by: -# Ships named like: Rattlesnake (2 of 2) +# Ship: Rattlesnake type = "passive" diff --git a/eos/effects/shipbonuskineticmissiledamagegb2.py b/eos/effects/shipbonuskineticmissiledamagegb2.py index 203f8ff3c..67a68211d 100644 --- a/eos/effects/shipbonuskineticmissiledamagegb2.py +++ b/eos/effects/shipbonuskineticmissiledamagegb2.py @@ -1,7 +1,7 @@ # shipBonusKineticMissileDamageGB2 # # Used by: -# Ships named like: Rattlesnake (2 of 2) +# Ship: Rattlesnake type = "passive" diff --git a/eos/effects/shipbonuskineticshieldresistancecb2.py b/eos/effects/shipbonuskineticshieldresistancecb2.py index 9fb1f3929..257628fe1 100644 --- a/eos/effects/shipbonuskineticshieldresistancecb2.py +++ b/eos/effects/shipbonuskineticshieldresistancecb2.py @@ -1,7 +1,7 @@ # shipBonusKineticShieldResistanceCB2 # # Used by: -# Ships named like: Rattlesnake (2 of 2) +# Ship: Rattlesnake # Ship: Rokh # Ship: Scorpion Navy Issue type = "passive" diff --git a/eos/effects/shipbonusmf1torpedoexplosionvelocity.py b/eos/effects/shipbonusmf1torpedoexplosionvelocity.py index db283c8bd..c546c4716 100644 --- a/eos/effects/shipbonusmf1torpedoexplosionvelocity.py +++ b/eos/effects/shipbonusmf1torpedoexplosionvelocity.py @@ -2,6 +2,7 @@ # # Used by: # Ship: Hound +# Ship: Virtuoso type = "passive" diff --git a/eos/effects/shipbonusmf1torpedoflighttime.py b/eos/effects/shipbonusmf1torpedoflighttime.py index 97c790694..539d8a205 100644 --- a/eos/effects/shipbonusmf1torpedoflighttime.py +++ b/eos/effects/shipbonusmf1torpedoflighttime.py @@ -2,6 +2,7 @@ # # Used by: # Ship: Hound +# Ship: Virtuoso type = "passive" diff --git a/eos/effects/shipbonussentrydronearmorhppiratefaction.py b/eos/effects/shipbonussentrydronearmorhppiratefaction.py index a1f49486f..bda4ffa41 100644 --- a/eos/effects/shipbonussentrydronearmorhppiratefaction.py +++ b/eos/effects/shipbonussentrydronearmorhppiratefaction.py @@ -1,7 +1,7 @@ # shipBonusSentryDroneArmorHpPirateFaction # # Used by: -# Ships named like: Rattlesnake (2 of 2) +# Ship: Rattlesnake type = "passive" diff --git a/eos/effects/shipbonussentrydronedamagemultiplierpiratefaction.py b/eos/effects/shipbonussentrydronedamagemultiplierpiratefaction.py index f218f02ed..27fc5822c 100644 --- a/eos/effects/shipbonussentrydronedamagemultiplierpiratefaction.py +++ b/eos/effects/shipbonussentrydronedamagemultiplierpiratefaction.py @@ -1,7 +1,7 @@ # shipBonusSentryDroneDamageMultiplierPirateFaction # # Used by: -# Ships named like: Rattlesnake (2 of 2) +# Ship: Rattlesnake type = "passive" diff --git a/eos/effects/shipbonussentrydronehppiratefaction.py b/eos/effects/shipbonussentrydronehppiratefaction.py index fab5592b9..4cfd46da4 100644 --- a/eos/effects/shipbonussentrydronehppiratefaction.py +++ b/eos/effects/shipbonussentrydronehppiratefaction.py @@ -1,7 +1,7 @@ # shipBonusSentryDroneHPPirateFaction # # Used by: -# Ships named like: Rattlesnake (2 of 2) +# Ship: Rattlesnake type = "passive" diff --git a/eos/effects/shipbonussentrydroneshieldhppiratefaction.py b/eos/effects/shipbonussentrydroneshieldhppiratefaction.py index 42db4065f..d757d2ef0 100644 --- a/eos/effects/shipbonussentrydroneshieldhppiratefaction.py +++ b/eos/effects/shipbonussentrydroneshieldhppiratefaction.py @@ -1,7 +1,7 @@ # shipBonusSentryDroneShieldHpPirateFaction # # Used by: -# Ships named like: Rattlesnake (2 of 2) +# Ship: Rattlesnake type = "passive" diff --git a/eos/effects/shipbonusshtfalloffgf1.py b/eos/effects/shipbonusshtfalloffgf1.py new file mode 100644 index 000000000..1173ac822 --- /dev/null +++ b/eos/effects/shipbonusshtfalloffgf1.py @@ -0,0 +1,10 @@ +# shipBonusSHTFalloffGF1 +# +# Used by: +# Ship: Virtuoso +type = "passive" + + +def handler(fit, src, context): + fit.modules.filteredItemBoost(lambda mod: mod.item.requiresSkill("Small Hybrid Turret"), "falloff", + src.getModifiedItemAttr("shipBonusGF"), skill="Gallente Frigate") diff --git a/eos/effects/shipfalloffbonusgf.py b/eos/effects/shipbonusshtfalloffgf2.py similarity index 92% rename from eos/effects/shipfalloffbonusgf.py rename to eos/effects/shipbonusshtfalloffgf2.py index 09fbcf7e7..ea9d1c560 100644 --- a/eos/effects/shipfalloffbonusgf.py +++ b/eos/effects/shipbonusshtfalloffgf2.py @@ -1,4 +1,4 @@ -# shipFalloffBonusGF +# shipBonusSHTFalloffGF2 # # Used by: # Ship: Atron diff --git a/eos/effects/shipbonussurveyprobeexplosiondelayskillsurveycovertops3.py b/eos/effects/shipbonussurveyprobeexplosiondelayskillsurveycovertops3.py index 08f67f3ab..db215459d 100644 --- a/eos/effects/shipbonussurveyprobeexplosiondelayskillsurveycovertops3.py +++ b/eos/effects/shipbonussurveyprobeexplosiondelayskillsurveycovertops3.py @@ -7,5 +7,5 @@ type = "passive" def handler(fit, ship, context): fit.modules.filteredChargeBoost(lambda mod: mod.charge.group.name == "Survey Probe", - "explosionDelay", ship.getModifiedItemAttr("eliteBonusCoverOps3"), + "explosionDelay", ship.getModifiedItemAttr("eliteBonusCovertOps3"), skill="Covert Ops") diff --git a/eos/effects/shipbonusthermalmissiledamagegb2.py b/eos/effects/shipbonusthermalmissiledamagegb2.py index 65b8c1ba5..3903c3e7e 100644 --- a/eos/effects/shipbonusthermalmissiledamagegb2.py +++ b/eos/effects/shipbonusthermalmissiledamagegb2.py @@ -1,7 +1,7 @@ # shipBonusThermalMissileDamageGB2 # # Used by: -# Ships named like: Rattlesnake (2 of 2) +# Ship: Rattlesnake type = "passive" diff --git a/eos/effects/shipbonusthermicshieldresistancecb2.py b/eos/effects/shipbonusthermicshieldresistancecb2.py index af97edbed..96067063f 100644 --- a/eos/effects/shipbonusthermicshieldresistancecb2.py +++ b/eos/effects/shipbonusthermicshieldresistancecb2.py @@ -1,7 +1,7 @@ # shipBonusThermicShieldResistanceCB2 # # Used by: -# Ships named like: Rattlesnake (2 of 2) +# Ship: Rattlesnake # Ship: Rokh # Ship: Scorpion Navy Issue type = "passive" diff --git a/eos/effects/shipbonustitang2emexplosivedamagebonus.py b/eos/effects/shipbonustitang2emexplosivedamagebonus.py index 76ea9a030..d98b44d4b 100644 --- a/eos/effects/shipbonustitang2emexplosivedamagebonus.py +++ b/eos/effects/shipbonustitang2emexplosivedamagebonus.py @@ -1,4 +1,4 @@ -# shipBonusTitanG2AllDamageBonus +# shipBonusTitanG2EMExplosiveDamageBonus # # Used by: # Ship: Komodo diff --git a/eos/effects/shipbonustorpedovelocitygf2.py b/eos/effects/shipbonustorpedovelocitygf2.py index 188c679d5..a52c4046d 100644 --- a/eos/effects/shipbonustorpedovelocitygf2.py +++ b/eos/effects/shipbonustorpedovelocitygf2.py @@ -2,6 +2,7 @@ # # Used by: # Ship: Nemesis +# Ship: Virtuoso type = "passive" diff --git a/eos/effects/shiphturretfalloffbonusgc.py b/eos/effects/shiphturretfalloffbonusgc.py index 78e2987cf..61fefdc54 100644 --- a/eos/effects/shiphturretfalloffbonusgc.py +++ b/eos/effects/shiphturretfalloffbonusgc.py @@ -1,6 +1,7 @@ # shipHTurretFalloffBonusGC # # Used by: +# Ship: Victor # Ship: Vigilant type = "passive" diff --git a/eos/effects/shipshtdmgbonusrookie.py b/eos/effects/shipshtdmgbonusrookie.py index 27939cc52..5603af34a 100644 --- a/eos/effects/shipshtdmgbonusrookie.py +++ b/eos/effects/shipshtdmgbonusrookie.py @@ -3,6 +3,7 @@ # Used by: # Ship: Velator # Ship: Violator +# Ship: Virtuoso type = "passive" diff --git a/eos/effects/shipstasiswebstrengthbonusmc2.py b/eos/effects/shipstasiswebstrengthbonusmc2.py index 65e9bb3b8..03a6c3198 100644 --- a/eos/effects/shipstasiswebstrengthbonusmc2.py +++ b/eos/effects/shipstasiswebstrengthbonusmc2.py @@ -1,6 +1,7 @@ # shipStasisWebStrengthBonusMC2 # # Used by: +# Ship: Victor # Ship: Vigilant type = "passive" diff --git a/eos/effects/shipstasiswebstrengthbonusmf2.py b/eos/effects/shipstasiswebstrengthbonusmf2.py index d2f5b1ad4..09822f202 100644 --- a/eos/effects/shipstasiswebstrengthbonusmf2.py +++ b/eos/effects/shipstasiswebstrengthbonusmf2.py @@ -2,6 +2,7 @@ # # Used by: # Ship: Daredevil +# Ship: Virtuoso type = "passive" diff --git a/eos/effects/structuralanalysiseffect.py b/eos/effects/structuralanalysiseffect.py index 295e601f3..4bd171488 100644 --- a/eos/effects/structuralanalysiseffect.py +++ b/eos/effects/structuralanalysiseffect.py @@ -1,7 +1,7 @@ # structuralAnalysisEffect # # Used by: -# Implants named like: Agency Tank Booster (3 of 3) +# Implants named like: Agency 'Hardshell' TB Dose (3 of 3) # Implants named like: Inherent Implants 'Noble' Repair Proficiency RP (6 of 6) # Modules named like: Auxiliary Nano Pump (8 of 8) # Implant: Imperial Navy Modified 'Noble' Implant diff --git a/eos/effects/structurewarpscrambleblockmwdwithnpceffect.py b/eos/effects/structurewarpscrambleblockmwdwithnpceffect.py index 4103b3f42..283a1451f 100644 --- a/eos/effects/structurewarpscrambleblockmwdwithnpceffect.py +++ b/eos/effects/structurewarpscrambleblockmwdwithnpceffect.py @@ -9,6 +9,9 @@ type = "projected", "active" def handler(fit, module, context): if "projected" not in context: return + + fit.ship.increaseItemAttr("warpScrambleStatus", module.getModifiedItemAttr("warpScrambleStrength")) + # this is such a dirty hack for mod in fit.modules: if not mod.isEmpty and mod.item.requiresSkill("High Speed Maneuvering") and mod.state > State.ONLINE: diff --git a/eos/effects/surgicalstrikedamagemultiplierbonuspostpercentdamagemultiplierlocationshipmodulesrequiringgunnery.py b/eos/effects/surgicalstrikedamagemultiplierbonuspostpercentdamagemultiplierlocationshipmodulesrequiringgunnery.py index 1acb28e5c..78b9750ec 100644 --- a/eos/effects/surgicalstrikedamagemultiplierbonuspostpercentdamagemultiplierlocationshipmodulesrequiringgunnery.py +++ b/eos/effects/surgicalstrikedamagemultiplierbonuspostpercentdamagemultiplierlocationshipmodulesrequiringgunnery.py @@ -1,7 +1,7 @@ # surgicalStrikeDamageMultiplierBonusPostPercentDamageMultiplierLocationShipModulesRequiringGunnery # # Used by: -# Implants named like: Agency Damage Booster (3 of 3) +# Implants named like: Agency 'Pyrolancea' DB Dose (3 of 3) # Implants named like: Eifyr and Co. 'Gunslinger' Surgical Strike SS (6 of 6) # Implant: Standard Cerebral Accelerator type = "passive" diff --git a/eos/effects/warpdisruptsphere.py b/eos/effects/warpdisruptsphere.py index 3fe88bd13..4a6d788e9 100644 --- a/eos/effects/warpdisruptsphere.py +++ b/eos/effects/warpdisruptsphere.py @@ -2,7 +2,9 @@ # # Used by: # Modules from group: Warp Disrupt Field Generator (7 of 7) -type = "active" +from eos.saveddata.module import State + +type = "projected", "active" runTime = "early" @@ -14,3 +16,11 @@ def handler(fit, module, context): fit.modules.filteredItemBoost(lambda mod: mod.item.group.name == "Propulsion Module", "speedFactor", module.getModifiedItemAttr("speedFactorBonus")) fit.ship.forceItemAttr("disallowAssistance", 1) + + if "projected" in context: + fit.ship.increaseItemAttr("warpScrambleStatus", module.getModifiedItemAttr("warpScrambleStrength")) + + if module.charge is not None and module.charge.ID == 45010: + for mod in fit.modules: + if not mod.isEmpty and mod.item.requiresSkill("High Speed Maneuvering") and mod.state > State.ONLINE: + mod.state = State.ONLINE diff --git a/eos/effects/warpscramble.py b/eos/effects/warpscramble.py index 7aa194099..7424625ae 100644 --- a/eos/effects/warpscramble.py +++ b/eos/effects/warpscramble.py @@ -6,4 +6,5 @@ type = "projected", "active" def handler(fit, module, context): - fit.ship.increaseItemAttr("warpScrambleStatus", module.getModifiedItemAttr("warpScrambleStrength")) + if "projected" in context: + fit.ship.increaseItemAttr("warpScrambleStatus", module.getModifiedItemAttr("warpScrambleStrength")) diff --git a/eos/effects/warpscrambleblockmwdwithnpceffect.py b/eos/effects/warpscrambleblockmwdwithnpceffect.py index 1e417b710..d5144a4a2 100644 --- a/eos/effects/warpscrambleblockmwdwithnpceffect.py +++ b/eos/effects/warpscrambleblockmwdwithnpceffect.py @@ -2,7 +2,6 @@ # # Used by: # Modules named like: Warp Scrambler (26 of 26) - from eos.saveddata.module import State runTime = "early" @@ -12,6 +11,9 @@ type = "projected", "active" def handler(fit, module, context): if "projected" not in context: return + + fit.ship.increaseItemAttr("warpScrambleStatus", module.getModifiedItemAttr("warpScrambleStrength")) + # this is such a dirty hack for mod in fit.modules: if not mod.isEmpty and mod.item.requiresSkill("High Speed Maneuvering") and mod.state > State.ONLINE: diff --git a/eos/saveddata/character.py b/eos/saveddata/character.py index 371f02c54..278a05d92 100644 --- a/eos/saveddata/character.py +++ b/eos/saveddata/character.py @@ -158,9 +158,7 @@ class Character(object): name += " *" if self.alphaCloneID: - clone = eos.db.getAlphaClone(self.alphaCloneID) - type = clone.alphaCloneName.split()[1] - name += ' (\u03B1{})'.format(type[0].upper()) + name += ' (\u03B1)' return name diff --git a/eve.db b/eve.db index a862983e7..688a52300 100644 Binary files a/eve.db and b/eve.db differ diff --git a/gui/builtinPreferenceViews/pyfaGeneralPreferences.py b/gui/builtinPreferenceViews/pyfaGeneralPreferences.py index 59b236a40..412e1a988 100644 --- a/gui/builtinPreferenceViews/pyfaGeneralPreferences.py +++ b/gui/builtinPreferenceViews/pyfaGeneralPreferences.py @@ -89,6 +89,10 @@ class PFGeneralPref(PreferenceView): self.stDefaultSystem = wx.StaticText(panel, wx.ID_ANY, "Default Market Prices:", wx.DefaultPosition, wx.DefaultSize, 0) self.stDefaultSystem.Wrap(-1) priceSizer.Add(self.stDefaultSystem, 0, wx.ALL | wx.ALIGN_CENTER_VERTICAL, 5) + self.stDefaultSystem.SetCursor(helpCursor) + self.stDefaultSystem.SetToolTip( + wx.ToolTip('The source you choose will be tried first, but subsequent sources will be used if the preferred ' + 'source fails. The system you choose is absolute and requests will not be made against other systems.')) self.chPriceSource = wx.Choice(panel, choices=sorted(Price.sources.keys())) self.chPriceSystem = wx.Choice(panel, choices=list(Price.systemsList.keys())) diff --git a/gui/builtinStatsViews/targetingMiscViewFull.py b/gui/builtinStatsViews/targetingMiscViewFull.py index e85336977..e43f04418 100644 --- a/gui/builtinStatsViews/targetingMiscViewFull.py +++ b/gui/builtinStatsViews/targetingMiscViewFull.py @@ -193,7 +193,12 @@ class TargetingMiscViewFull(StatsView): elif labelName == "labelFullSigRadius": label.SetToolTip(wx.ToolTip("Probe Size: %.3f" % (fit.probeSize or 0))) elif labelName == "labelFullWarpSpeed": - label.SetToolTip(wx.ToolTip("Max Warp Distance: %.1f AU" % fit.maxWarpDistance)) + maxWarpDistance = "Max Warp Distance: %.1f AU" % fit.maxWarpDistance + if fit.ship.getModifiedItemAttr("warpScrambleStatus"): + warpScrambleStatus = "Warp Core Strength: %.1f" % (fit.ship.getModifiedItemAttr("warpScrambleStatus") * -1) + else: + warpScrambleStatus = "Warp Core Strength: %.1f" % 0 + label.SetToolTip(wx.ToolTip("%s\n%s" % (maxWarpDistance, warpScrambleStatus))) elif labelName == "labelSensorStr": if fit.jamChance > 0: label.SetToolTip( @@ -218,9 +223,12 @@ class TargetingMiscViewFull(StatsView): self._cachedValues[counter] = newValues elif labelName == "labelFullWarpSpeed": if fit: - label.SetToolTip(wx.ToolTip("Max Warp Distance: %.1f AU" % fit.maxWarpDistance)) - else: - label.SetToolTip(wx.ToolTip("")) + maxWarpDistance = "Max Warp Distance: %.1f AU" % fit.maxWarpDistance + if fit.ship.getModifiedItemAttr("warpScrambleStatus"): + warpScrambleStatus = "Warp Core Strength: %.1f" % (fit.ship.getModifiedItemAttr("warpScrambleStatus") * -1) + else: + warpScrambleStatus = "Warp Core Strength: %.1f" % 0 + label.SetToolTip(wx.ToolTip("%s\n%s" % (maxWarpDistance, warpScrambleStatus))) elif labelName == "labelSensorStr": if fit: if fit.jamChance > 0: diff --git a/gui/builtinStatsViews/targetingMiscViewMinimal.py b/gui/builtinStatsViews/targetingMiscViewMinimal.py index 5e17f8969..9d4761bf3 100644 --- a/gui/builtinStatsViews/targetingMiscViewMinimal.py +++ b/gui/builtinStatsViews/targetingMiscViewMinimal.py @@ -188,7 +188,12 @@ class TargetingMiscViewMinimal(StatsView): lockTime += "%5s\t%s\n" % (left, right) label.SetToolTip(wx.ToolTip(lockTime)) elif labelName == "labelFullWarpSpeed": - label.SetToolTip(wx.ToolTip("Max Warp Distance: %.1f AU" % fit.maxWarpDistance)) + maxWarpDistance = "Max Warp Distance: %.1f AU" % fit.maxWarpDistance + if fit.ship.getModifiedItemAttr("warpScrambleStatus"): + warpScrambleStatus = "Warp Core Strength: %.1f" % (fit.ship.getModifiedItemAttr("warpScrambleStatus") * -1) + else: + warpScrambleStatus = "Warp Core Strength: %.1f" % 0 + label.SetToolTip(wx.ToolTip("%s\n%s" % (maxWarpDistance, warpScrambleStatus))) elif labelName == "labelSensorStr": if fit.jamChance > 0: label.SetToolTip(wx.ToolTip("Type: %s\n%.1f%% Chance of Jam" % (fit.scanType, fit.jamChance))) @@ -212,7 +217,12 @@ class TargetingMiscViewMinimal(StatsView): self._cachedValues[counter] = newValues elif labelName == "labelFullWarpSpeed": if fit: - label.SetToolTip(wx.ToolTip("Max Warp Distance: %.1f AU" % fit.maxWarpDistance)) + maxWarpDistance = "Max Warp Distance: %.1f AU" % fit.maxWarpDistance + if fit.ship.getModifiedItemAttr("warpScrambleStatus"): + warpScrambleStatus = "Warp Core Strength: %.1f" % (fit.ship.getModifiedItemAttr("warpScrambleStatus") * -1) + else: + warpScrambleStatus = "Warp Core Strength: %.1f" % 0 + label.SetToolTip(wx.ToolTip("%s\n%s" % (maxWarpDistance, warpScrambleStatus))) else: label.SetToolTip(wx.ToolTip("")) elif labelName == "labelSensorStr": diff --git a/scripts/effectUsedBy.py b/scripts/effectUsedBy.py index 3e045105b..d97038deb 100755 --- a/scripts/effectUsedBy.py +++ b/scripts/effectUsedBy.py @@ -405,10 +405,11 @@ if options.effects: else: effect_list = [] for effect_file in os.listdir(effects_path): - file_name, file_extension = effect_file.rsplit('.', 1) - # Ignore non-py files and exclude implementation-specific 'effects' - if file_extension == "py" and not file_name in ("__init__"): - effect_list.append(file_name) + if not effect_file.startswith('__'): + file_name, file_extension = effect_file.rsplit('.', 1) + # Ignore non-py files and exclude implementation-specific 'effects' + if file_extension == "py" and not file_name in ("__init__"): + effect_list.append(file_name) # Stage 2 diff --git a/scripts/jsonToSql.py b/scripts/jsonToSql.py index 7fff0dd0d..6629c62b2 100755 --- a/scripts/jsonToSql.py +++ b/scripts/jsonToSql.py @@ -113,13 +113,30 @@ def main(db, json_path): def convertClones(data): newData = [] + # December, 2017 - CCP decided to use only one set of skill levels for alpha clones. However, this is still + # represented in the data as a skillset per race. To ensure that all skills are the same, we store them in a way + # that we can check to make sure all races have the same skills, as well as skill levels + + check = {} + for ID in data: for skill in data[ID]["skills"]: newData.append({ "alphaCloneID": int(ID), - "alphaCloneName": data[ID]["internalDescription"], + "alphaCloneName": "Alpha Clone", "typeID": skill["typeID"], "level": skill["level"]}) + if ID not in check: + check[ID] = {} + check[ID][int(skill["typeID"])] = int(skill["level"]) + + if not reduce(lambda a, b: a if a == b else False, [v for _, v in check.iteritems()]): + raise Exception("Alpha Clones not all equal") + + newData = [x for x in newData if x['alphaCloneID'] == 1] + + if len(newData) == 0: + raise Exception("Alpha Clone processing failed") return newData diff --git a/service/market.py b/service/market.py index 7f0efda35..1d3bfe312 100644 --- a/service/market.py +++ b/service/market.py @@ -223,8 +223,6 @@ class Market(object): "Guristas Shuttle" : False, "Mobile Decoy Unit" : False, # Seems to be left over test mod for deployables "Tournament Micro Jump Unit" : False, # Normally seen only on tournament arenas - "Victor": False, # See GH Issue 1323 - "Virtuoso": False, # See GH Issue 1323 } # do not publish ships that we convert diff --git a/service/marketSources/evecentral.py b/service/marketSources/evecentral.py index 3a17ac957..e323015c5 100644 --- a/service/marketSources/evecentral.py +++ b/service/marketSources/evecentral.py @@ -40,48 +40,30 @@ class EveCentral(object): for typeID in types: # Add all typeID arguments data.append(("typeid", typeID)) - # Attempt to send request and process it - try: - network = Network.getInstance() - data = network.request(baseurl, network.PRICES, data) - xml = minidom.parse(data) - types = xml.getElementsByTagName("marketstat").item(0).getElementsByTagName("type") - # Cycle through all types we've got from request - for type_ in types: - # Get data out of each typeID details tree - typeID = int(type_.getAttribute("id")) - sell = type_.getElementsByTagName("sell").item(0) - # If price data wasn't there, set price to zero - try: - percprice = float(sell.getElementsByTagName("percentile").item(0).firstChild.data) - except (TypeError, ValueError): - pyfalog.warning("Failed to get price for: {0}", type_) - percprice = 0 + network = Network.getInstance() + data = network.request(baseurl, network.PRICES, data) + xml = minidom.parse(data) + types = xml.getElementsByTagName("marketstat").item(0).getElementsByTagName("type") + # Cycle through all types we've got from request + for type_ in types: + # Get data out of each typeID details tree + typeID = int(type_.getAttribute("id")) + sell = type_.getElementsByTagName("sell").item(0) + # If price data wasn't there, set price to zero + try: + percprice = float(sell.getElementsByTagName("percentile").item(0).firstChild.data) + except (TypeError, ValueError): + pyfalog.warning("Failed to get price for: {0}", type_) + percprice = 0 - # Fill price data - priceobj = priceMap[typeID] - priceobj.price = percprice - priceobj.time = time.time() + VALIDITY - priceobj.failed = None + # Fill price data + priceobj = priceMap[typeID] + priceobj.price = percprice + priceobj.time = time.time() + VALIDITY + priceobj.failed = None - # delete price from working dict - del priceMap[typeID] - - # If getting or processing data returned any errors - except TimeoutError: - # Timeout error deserves special treatment - pyfalog.warning("Price fetch timout") - for typeID in priceMap.keys(): - priceobj = priceMap[typeID] - priceobj.time = time.time() + TIMEOUT - priceobj.failed = True - - del priceMap[typeID] - except: - # all other errors will pass and continue onward to the REREQUEST delay - pyfalog.warning("Caught exception in fetchPrices") - pass - pass + # delete price from working dict + del priceMap[typeID] Price.register(EveCentral) diff --git a/service/marketSources/evemarketdata.py b/service/marketSources/evemarketdata.py index 0b3c63dac..0a5861388 100644 --- a/service/marketSources/evemarketdata.py +++ b/service/marketSources/evemarketdata.py @@ -38,48 +38,36 @@ class EveMarketData(object): data.append(("system_id", system)) # Use Jita for market data.append(("type_ids", ','.join(str(x) for x in types))) - # Attempt to send request and process it - try: - network = Network.getInstance() - data = network.request(baseurl, network.PRICES, data) - xml = minidom.parse(data) - print (xml.getElementsByTagName("eve").item(0)) - types = xml.getElementsByTagName("eve").item(0).getElementsByTagName("price") - # Cycle through all types we've got from request - for type_ in types: - # Get data out of each typeID details tree - typeID = int(type_.getAttribute("id")) - price = 0 + network = Network.getInstance() + data = network.request(baseurl, network.PRICES, data) + xml = minidom.parse(data) + types = xml.getElementsByTagName("eve").item(0).getElementsByTagName("price") - try: - price = float(type_.firstChild.data) - except (TypeError, ValueError): - pyfalog.warning("Failed to get price for: {0}", type_) + # Cycle through all types we've got from request + for type_ in types: + # Get data out of each typeID details tree + typeID = int(type_.getAttribute("id")) - # Fill price data - priceobj = priceMap[typeID] + try: + price = float(type_.firstChild.data) + except (TypeError, ValueError): + pyfalog.warning("Failed to get price for: {0}", type_) + + # Fill price data + priceobj = priceMap[typeID] + + # eve-marketdata returns 0 if price data doesn't even exist for the item. In this case, don't reset the + # cached price, and set the price timeout to TIMEOUT (every 15 minutes currently). Se GH issue #1334 + if price != 0: priceobj.price = price priceobj.time = time.time() + VALIDITY - priceobj.failed = None - - # delete price from working dict - del priceMap[typeID] - - # If getting or processing data returned any errors - except TimeoutError: - # Timeout error deserves special treatment - pyfalog.warning("Price fetch timout") - for typeID in priceMap.keys(): - priceobj = priceMap[typeID] + else: priceobj.time = time.time() + TIMEOUT - priceobj.failed = True - del priceMap[typeID] - except: - # all other errors will pass and continue onward to the REREQUEST delay - pyfalog.warning("Caught exception in fetchPrices") - pass - pass + priceobj.failed = None + + # delete price from working dict + del priceMap[typeID] Price.register(EveMarketData) diff --git a/service/network.py b/service/network.py index 9befd3fff..f7667a5b1 100644 --- a/service/network.py +++ b/service/network.py @@ -126,6 +126,7 @@ class Network(object): raise AuthenticationError() elif error.code >= 500: raise ServerError() + raise Error(error) except urllib.error.URLError as error: pyfalog.warning("Timed out or other URL error:") pyfalog.warning(error) diff --git a/service/price.py b/service/price.py index ab6963829..8bdd58b63 100644 --- a/service/price.py +++ b/service/price.py @@ -105,11 +105,34 @@ class Price(object): return # attempt to find user's selected price source, otherwise get first one - sourceCls = cls.sources.get(sFit.serviceFittingOptions["priceSource"], cls.sources[list(cls.sources.keys())[0]]) - sourceCls(toRequest, cls.systemsList[sFit.serviceFittingOptions["priceSystem"]], priceMap) + sourcesToTry = list(cls.sources.keys()) + curr = sFit.serviceFittingOptions["priceSource"] if sFit.serviceFittingOptions["priceSource"] in sourcesToTry else sourcesToTry[0] - # if we get to this point, then we've got an error. Set to REREQUEST delay - for typeID in list(priceMap.keys()): + while len(sourcesToTry) > 0: + sourcesToTry.remove(curr) + try: + sourceCls = cls.sources.get(curr) + sourceCls(toRequest, cls.systemsList[sFit.serviceFittingOptions["priceSystem"]], priceMap) + break + # If getting or processing data returned any errors + except TimeoutError: + # Timeout error deserves special treatment + pyfalog.warning("Price fetch timout") + for typeID in priceMap.keys(): + priceobj = priceMap[typeID] + priceobj.time = time.time() + TIMEOUT + priceobj.failed = True + + del priceMap[typeID] + except Exception as ex: + # something happened, try another source + pyfalog.warn('Failed to fetch prices from price source {}: {}'.format(curr, ex, sourcesToTry[0])) + if len(sourcesToTry) > 0: + pyfalog.warn('Trying {}'.format(sourcesToTry[0])) + curr = sourcesToTry[0] + + # if we get to this point, then we've got an error in all of our sources. Set to REREQUEST delay + for typeID in priceMap.keys(): priceobj = priceMap[typeID] priceobj.time = time.time() + REREQUEST priceobj.failed = True