NovaBryan/EVE_Dump
Log | Files | 📦 下载最新源码 (.zip) | Refs | README

attribute.py (1127B)


      1 #Embedded file name: C:\BuildAgent\work\20d73f1b24eed06e\eve\release\V24.01\packages\characterskills\attribute.py
      2 import dogma.const
      3 import gametime
      4 from dogma.effects import IsBoosterSkillAccelerator
      5 ATTRIBUTEBONUS_BY_ATTRIBUTEID = {dogma.const.attributePerception: dogma.const.attributePerceptionBonus,
      6  dogma.const.attributeMemory: dogma.const.attributeMemoryBonus,
      7  dogma.const.attributeWillpower: dogma.const.attributeWillpowerBonus,
      8  dogma.const.attributeIntelligence: dogma.const.attributeIntelligenceBonus,
      9  dogma.const.attributeCharisma: dogma.const.attributeCharismaBonus}
     10 
     11 def IsBoosterExpiredThen(timeOffset, boosterExpiryTime):
     12     return boosterExpiryTime <= gametime.GetWallclockTime() + timeOffset
     13 
     14 
     15 def FindAttributeBooster(dogmaIM, boosters):
     16     for b in boosters:
     17         if IsBoosterSkillAccelerator(dogmaIM.dogmaStaticMgr, b):
     18             return b
     19 
     20 
     21 def GetBoosterlessValue(dogmaIM, typeID, attributeID, currentValue):
     22     effectID = ATTRIBUTEBONUS_BY_ATTRIBUTEID[attributeID]
     23     boosterEffect = dogmaIM.GetTypeAttribute2(typeID, effectID)
     24     newValue = currentValue - boosterEffect
     25     return newValue