From 9aca49e5396a0fd6ba2a3aa72f99f2d0269f388d Mon Sep 17 00:00:00 2001 From: DarkPhoenix Date: Sat, 6 Jun 2020 00:25:19 +0300 Subject: [PATCH] Add damage mod effect and gun application readout --- eos/effects.py | 14 ++++++++++++++ gui/builtinViewColumns/misc.py | 15 +++++++++++++-- 2 files changed, 27 insertions(+), 2 deletions(-) diff --git a/eos/effects.py b/eos/effects.py index 78f73d13a..0272aa01a 100644 --- a/eos/effects.py +++ b/eos/effects.py @@ -36484,3 +36484,17 @@ class Effect8056(BaseEffect): fit.modules.filteredItemBoost( lambda mod: mod.item.requiresSkill('Large Vorton Projector'), 'speed', ship.getModifiedItemAttr('shipBonusUB2'), skill='EDENCOM Battleship', **kwargs) + + +class Effect8057(BaseEffect): + + type = 'passive' + + @staticmethod + def handler(fit, module, context, projectionRange, **kwargs): + fit.modules.filteredItemMultiply(lambda mod: mod.item.group.name == 'Vorton Projector', + 'damageMultiplier', module.getModifiedItemAttr('damageMultiplier'), + stackingPenalties=True, **kwargs) + fit.modules.filteredItemMultiply(lambda mod: mod.item.group.name == 'Vorton Projector', + 'speed', module.getModifiedItemAttr('speedMultiplier'), + stackingPenalties=True, **kwargs) diff --git a/gui/builtinViewColumns/misc.py b/gui/builtinViewColumns/misc.py index 0c6d6a164..65761dee6 100644 --- a/gui/builtinViewColumns/misc.py +++ b/gui/builtinViewColumns/misc.py @@ -123,6 +123,15 @@ class Miscellanea(ViewColumn): text = ' | '.join(i[0] for i in info) tooltip = ' and '.join(i[1] for i in info).capitalize() return text, tooltip + elif itemGroup == "Vorton Projector": + cloudSize = stuff.getModifiedItemAttr("aoeCloudSize") + aoeVelocity = stuff.getModifiedItemAttr("aoeVelocity") + if not cloudSize or not aoeVelocity: + return "", None + text = "{0}{1} | {2}{3}".format(formatAmount(cloudSize, 3, 0, 3), "m", + formatAmount(aoeVelocity, 3, 0, 3), "m/s") + tooltip = "Explosion radius and explosion velocity" + return text, tooltip elif itemCategory == "Subsystem": slots = ("hi", "med", "low") info = [] @@ -279,7 +288,8 @@ class Miscellanea(ViewColumn): "Heat Sink", "Ballistic Control system", "Structure Weapon Upgrade", - "Entropic Radiation Sink" + "Entropic Radiation Sink", + "Vorton Projector Upgrade" ): attrMap = { "Gyrostabilizer": ("damageMultiplier", "speedMultiplier", "Projectile weapon"), @@ -287,7 +297,8 @@ class Miscellanea(ViewColumn): "Heat Sink": ("damageMultiplier", "speedMultiplier", "Energy weapon"), "Ballistic Control system": ("missileDamageMultiplierBonus", "speedMultiplier", "Missile"), "Structure Weapon Upgrade": ("missileDamageMultiplierBonus", "speedMultiplier", "Missile"), - "Entropic Radiation Sink": ("damageMultiplier", "speedMultiplier", "Precursor weapon")} + "Entropic Radiation Sink": ("damageMultiplier", "speedMultiplier", "Precursor weapon"), + "Vorton Projector Upgrade": ("damageMultiplier", "speedMultiplier", "Vorton projector")} dmgAttr, rofAttr, weaponName = attrMap[itemGroup] dmg = stuff.getModifiedItemAttr(dmgAttr) rof = stuff.getModifiedItemAttr(rofAttr)