Skip to content

Commit

Permalink
Implement Cobra effects
Browse files Browse the repository at this point in the history
  • Loading branch information
DarkFenX committed Oct 30, 2024
1 parent f76f7e8 commit c4cf1d1
Showing 1 changed file with 103 additions and 1 deletion.
104 changes: 103 additions & 1 deletion eos/effects.py
Original file line number Diff line number Diff line change
Expand Up @@ -40868,7 +40868,6 @@ class Effect12165(BaseEffect):

@staticmethod
def handler(fit, ship, context, projectionRange, **kwargs):

# Get pilot sec status bonus directly here, instead of going through the intermediary effects
try:
sec_status = ship.owner.getPilotSecurity(low_limit=-10, high_limit=0)
Expand All @@ -40888,6 +40887,25 @@ def handler(fit, ship, context, projectionRange, **kwargs):
f'{dmgType}Damage', bonus, **kwargs)


class Effect12176(BaseEffect):
"""
shipBonusAllShieldresistATCC1

Used by:
Ship: Cobra
"""

type = 'passive'

@staticmethod
def handler(fit, ship, context, projectionRange, **kwargs):
for dmgType in ('em', 'thermal', 'kinetic', 'explosive'):
fit.ship.boostItemAttr(
'shield{}DamageResonance'.format(dmgType.capitalize()),
ship.getModifiedItemAttr('shipBonusCC3'),
skill='Caldari Cruiser', **kwargs)


class Effect12179(BaseEffect):
"""
ShipBonusAllShieldResistATCF1
Expand All @@ -40907,6 +40925,72 @@ def handler(fit, ship, context, projectionRange, **kwargs):
skill='Caldari Frigate', **kwargs)


class Effect12180(BaseEffect):
"""
roleBonusATCruiserMJDFittingReduction

Used by:
Ship: Cobra
"""

type = 'passive'

@staticmethod
def handler(fit, ship, context, projectionRange, **kwargs):
fit.modules.filteredItemBoost(
lambda mod: mod.item.group.name == 'Micro Jump Drive',
'cpu', ship.getModifiedItemAttr('flagCruiserFittingBonusPropMods'), **kwargs)
fit.modules.filteredItemBoost(
lambda mod: mod.item.group.name == 'Micro Jump Drive',
'power', ship.getModifiedItemAttr('flagCruiserFittingBonusPropMods'), **kwargs)


class Effect12181(BaseEffect):
"""
ATcruiserTackleBonus1

Used by:
Ship: Cobra
"""

type = 'passive'

@staticmethod
def handler(fit, ship, context, projectionRange, **kwargs):
# Get pilot sec status bonus directly here, instead of going through the intermediary effects
try:
sec_status = ship.owner.getPilotSecurity(low_limit=-10, high_limit=0)
except (KeyboardInterrupt, SystemExit):
raise
except:
return
bonus = ship.getModifiedItemAttr('ATcruiserStasisWebifierBonus') * sec_status
fit.modules.filteredItemBoost(lambda mod: mod.item.group.name == 'Stasis Web', 'maxRange', bonus, **kwargs)


class Effect12202(BaseEffect):
"""
ATcruiserTackleBonus2

Used by:
Ship: Cobra
"""

type = 'passive'

@staticmethod
def handler(fit, ship, context, projectionRange, **kwargs):
# Get pilot sec status bonus directly here, instead of going through the intermediary effects
try:
sec_status = ship.owner.getPilotSecurity(low_limit=-10, high_limit=0)
except (KeyboardInterrupt, SystemExit):
raise
except:
return
bonus = ship.getModifiedItemAttr('ATcruiserScramblerDisruptorBonus') * sec_status
fit.modules.filteredItemBoost(lambda mod: mod.item.group.name == 'Warp Scrambler', 'maxRange', bonus, **kwargs)


class Effect12203(BaseEffect):
"""
ATfrigDroneBonus
Expand All @@ -40923,3 +41007,21 @@ def handler(fit, ship, context, projectionRange, **kwargs):
fit.drones.filteredItemBoost(
lambda drone: drone.item.requiresSkill('Light Drone Operation'),
attr, ship.getModifiedItemAttr('ATfrigDroneBonus'), **kwargs)


class Effect12214(BaseEffect):
"""
AtcruiserDroneBonus

Used by:
Ship: Cobra
"""

type = 'passive'

@staticmethod
def handler(fit, ship, context, projectionRange, **kwargs):
for attr in ('shieldCapacity', 'armorHP', 'hp', 'damageMultiplier'):
fit.drones.filteredItemBoost(
lambda drone: drone.item.requiresSkill('Medium Drone Operation'),
attr, ship.getModifiedItemAttr('ATcruiserDroneBonus'), **kwargs)

0 comments on commit c4cf1d1

Please sign in to comment.