Implement xeon gas and electric store weather effects

This commit is contained in:
blitzmann
2018-05-20 14:33:37 -04:00
parent a5b959fbf8
commit d110dd4c76
3 changed files with 38 additions and 6 deletions

View File

@@ -1,6 +1,13 @@
runTime = "early"
type = ("projected", "passive")
type = ("projected", "passive", "gang")
def handler(fit, beacon, context):
pass
def handler(fit, beacon, context, **kwargs):
for x in range(1, 3):
if beacon.getModifiedItemAttr("warfareBuff{}ID".format(x)):
value = beacon.getModifiedItemAttr("warfareBuff{}Value".format(x))
id = beacon.getModifiedItemAttr("warfareBuff{}ID".format(x))
if id:
fit.addCommandBonus(id, value, beacon, kwargs['effect'], 'early')

View File

@@ -1,6 +1,13 @@
runTime = "early"
type = ("projected", "passive")
type = ("projected", "passive", "gang")
def handler(fit, beacon, context):
pass
def handler(fit, beacon, context, **kwargs):
for x in range(1, 3):
if beacon.getModifiedItemAttr("warfareBuff{}ID".format(x)):
value = beacon.getModifiedItemAttr("warfareBuff{}Value".format(x))
id = beacon.getModifiedItemAttr("warfareBuff{}ID".format(x))
if id:
fit.addCommandBonus(id, value, beacon, kwargs['effect'], 'early')

View File

@@ -672,6 +672,24 @@ class Fit(object):
groups = ("Energy Weapon", "Hybrid Weapon")
self.modules.filteredItemBoost(lambda mod: mod.item.group.name in groups, "maxRange", value, stackingPenalties=True)
# Abysmal Weather Effects
if warfareBuffID == 90: # Weather_electric_storm_EM_resistance_penalty
for tankType in ("shield", "armor"):
self.ship.boostItemAttr("{}EmDamageResonance".format(tankType), value)
self.ship.boostItemAttr("emDamageResonance", value) # for hull
if warfareBuffID == 92: # Weather_electric_storm_capacitor_recharge_bonus
self.ship.boostItemAttr("rechargeRate", value, stackingPenalties=True)
if warfareBuffID == 93: # Weather_xenon_gas_explosive_resistance_penalty
for tankType in ("shield", "armor"):
self.ship.boostItemAttr("{}ExplosiveDamageResonance".format(tankType), value)
self.ship.boostItemAttr("explosiveDamageResonance", value) # for hull
if warfareBuffID == 94: # Weather_xenon_gas_shield_hp_bonus
self.ship.boostItemAttr("shieldCapacity", value) # for hull
if warfareBuffID == 95: # Weather_infernal_thermal_resistance_penalty
for tankType in ("shield", "armor"):
self.ship.boostItemAttr("{}ThermalDamageResonance".format(tankType), value)