Fix titan fleet bonii (#577)

This commit is contained in:
blitzmann
2016-05-01 16:45:19 -04:00
parent fb1c5a760f
commit 941c57b4a8
5 changed files with 18 additions and 4 deletions

View File

@@ -5,9 +5,10 @@
type = "gang"
gangBoost = "rechargeRate"
gangBonus = "shipBonusTitanA4"
gangBonusSkill = "Amarr Titan"
runTime = "late"
def handler(fit, src, context):
if "gang" not in context: return
fit.ship.boostItemAttr(gangBoost, src.getModifiedItemAttr(gangBonus) * src.parent.character.getSkill("Amarr Titan").level)
fit.ship.boostItemAttr(gangBoost, src.getModifiedItemAttr(gangBonus) * src.parent.character.getSkill(gangBonusSkill).level)

View File

@@ -5,9 +5,10 @@
type = "gang"
gangBoost = "shieldCapacity"
gangBonus = "shipBonusTitanC4"
gangBonusSkill = "Caldari Titan"
runTime = "late"
def handler(fit, src, context):
if "gang" not in context: return
fit.ship.boostItemAttr(gangBoost, src.getModifiedItemAttr(gangBonus) * src.parent.character.getSkill("Caldari Titan").level)
fit.ship.boostItemAttr(gangBoost, src.getModifiedItemAttr(gangBonus) * src.parent.character.getSkill(gangBonusSkill).level)

View File

@@ -5,9 +5,10 @@
type = "gang"
gangBoost = "armorHP"
gangBonus = "shipBonusTitanG4"
gangBonusSkill = "Gallente Titan"
runTime = "late"
def handler(fit, src, context):
if "gang" not in context: return
fit.ship.boostItemAttr(gangBoost, src.getModifiedItemAttr(gangBonus) * src.parent.character.getSkill("Gallente Titan").level)
fit.ship.boostItemAttr(gangBoost, src.getModifiedItemAttr(gangBonus) * src.parent.character.getSkill(gangBonusSkill).level)

View File

@@ -5,9 +5,10 @@
type = "gang"
gangBoost = "signatureRadius"
gangBonus = "shipBonusTitanM4"
gangBonusSkill = "Minmatar Titan"
runTime = "late"
def handler(fit, src, context):
if "gang" not in context: return
fit.ship.boostItemAttr(gangBoost, src.getModifiedItemAttr(gangBonus) * src.parent.character.getSkill("Minmatar Titan").level)
fit.ship.boostItemAttr(gangBoost, src.getModifiedItemAttr(gangBonus) * src.parent.character.getSkill(gangBonusSkill).level)

View File

@@ -207,9 +207,14 @@ class Squad(object):
newBoostAttr = effect.getattr("gangBonus") or "commandBonus"
# Get boost amount for current boost
newBoostAmount = thing.getModifiedItemAttr(newBoostAttr) or 0
# Skill used to modify the gang bonus (for purposes of comparing old vs new)
newBoostSkill = effect.getattr("gangBonusSkill")
# If skill takes part in gang boosting, multiply by skill level
if type(thing) == Skill:
newBoostAmount *= thing.level
# boost the gang bonus based on skill noted in effect file
if newBoostSkill:
newBoostAmount *= thing.parent.character.getSkill(newBoostSkill).level
# If new boost is more powerful, replace older one with it
if abs(newBoostAmount) > abs(currBoostAmount):
self.wing.gang.linearBoosts[boostedAttr] = (newBoostAmount, boostInfo)
@@ -287,9 +292,14 @@ class Store(object):
newBoostAttr = effect.getattr("gangBonus") or "commandBonus"
# Get boost amount for current boost
newBoostAmount = thing.getModifiedItemAttr(newBoostAttr) or 0
# Skill used to modify the gang bonus (for purposes of comparing old vs new)
newBoostSkill = effect.getattr("gangBonusSkill")
# If skill takes part in gang boosting, multiply by skill level
if type(thing) == Skill:
newBoostAmount *= thing.level
# boost the gang bonus based on skill noted in effect file
if newBoostSkill:
newBoostAmount *= thing.parent.character.getSkill(newBoostSkill).level
# If new boost is more powerful, replace older one with it
if abs(newBoostAmount) > abs(currBoostAmount):
boosts[boostedAttr] = (newBoostAmount, boostInfo)