- name: stationengineer
  regex: <Talent identifier="stationengineer">!anyvalue="(?<xpbonus>!num)"!anyvalue="(?<repairspeed1>!num)"!anyvalue="(?<repairspeed2>!num)"!anymultiplyvalue="(?<xpbonusv>!num)"
  lua: |
    xpbonus=round(xpbonus*4, 2)
    repairspeed1=round(repairspeed1*2, 2)
    repairspeed2=round(repairspeed2*2, 2)
    xpbonusv=round(xpbonus/100, 2)
  files:
    - '**/TalentsEngineer.xml'
- name: stationengineer
  regex: <Affliction!anyidentifier="stationengineer"!anyvalue="(?<repairspeed1v>!num)"!anyvalue="(?<repairspeed2v>!num)"
  lua: |
    repairspeed1v=round(repairspeed1v*2, 2)
    repairspeed2v=round(repairspeed2v*2, 2)
  files:
    - '**/AfflictionsEngineer.xml'

- name: junctionjunkie
  regex: <Talent identifier="junctionjunkie"!anyamount!anyamount!anyvalue="(?<skillbonus>!num)"!anyxpamount!anyvalue="(?<xpreward>!num)"!anylevel!anyvalue="(?<levelupgrade>!num)"!anyamount!anyvalue="(?<repairspeed>!num)"!anyGiveExperience amount="(?<xprewardv>!num)"!anyvalue="(?<skillbonusv>!num)"!anyjunctionboxes" level="(?<levelupgradev>!num)"!anyRepairSpeed!anyvalue="(?<repairspeedv>!num)"
  lua: |
    skillbonus=round(skillbonus*2, 2)
    xpreward=round(xpreward*4, 0)
    levelupgrade=round(levelupgrade*2, 0)
    repairspeed=round(repairspeed*2, 2)
    xprewardv=xpreward
    skillbonusv=skillbonus
    levelupgradev=levelupgrade
    repairspeedv=round(repairspeed/100, 2)
  files:
    - '**/TalentsEngineer.xml'

- name: egghead
  regex: <Talent identifier="egghead">!anyvalue="(?<xpbonus>!num)"!anyvalue="(?<xpbonusv>!num)"
  lua: |
    xpbonus=round(xpbonus*32, 2)
    xpbonusv=round(xpbonusv*32, 2)
  files:
    - '**/TalentsEngineer.xml'

- name: grounded
  regex: <Talent identifier="grounded">!anyvalue="(?<bonusskill>!num)"!anyvalue="(?<resistanfce>!num)"!anyvalue="(?<bonusskillv>!num)"!anymultiplier="(?<resistanfcev>!num)"
  lua: |
    bonusskill=round(bonusskill*2, 2)
    resistanfce=round(resistanfce*2, 2)
    bonusskillv=bonusskill
    resistanfcev=round(1-resistanfce/100, 2)
  files:
    - '**/TalentsEngineer.xml'

- name: funwithfission
  regex: <Talent identifier="funwithfission">!anyvalue="(?<quality>!num)"!anyvalue="(?<qualityv>!num)"
  lua: |
    quality=round(quality*2, 0)
    qualityv=round(qualityv*2, 0)
  files:
    - '**/TalentsEngineer.xml'

- name: melodicrespite
  regex: <Talent identifier="melodicrespite">!anyamount!anyvalue="(?<repairspeed>!num)"!anyvalue="(?<duration>!num)"!anyrange="(?<range>!num)"!anyamount="(?<durationv>!num)"
  lua: |
    repairspeed=round(repairspeed*2, 2)
    duration=round(duration*1.5, 2)
    range=round(range*2, 2)
    durationv=duration
  files:
    - '**/TalentsEngineer.xml'
- name: melodicrespite
  regex: <Affliction!anyidentifier="melodicrespite"!anyduration="(?<durationv>!num)"!anyvalue="(?<repairspeedv>!num)"
  lua: |
    durationv=round(durationv*1.5, 2)
    repairspeedv=round(repairspeedv*2, 2)
  files:
    - '**/AfflictionsEngineer.xml'

- name: aggressiveengineering
  regex: <Talent identifier="aggressiveengineering">!anymultiplier="(?<damagebonusv>!num)"
  lua: |
    damagebonusv=round(damagebonusv*2, 2)
  files:
    - '**/TalentsEngineer.xml'

- name: militaryapplications
  regex: <Talent identifier="militaryapplications">!anyvalue="(?<skillbonus>!num)"!anyvalue="(?<skillbonusv>!num)"
  lua: |
    skillbonus=round(skillbonus*2, 0)
    skillbonusv=skillbonus
  files:
    - '**/TalentsEngineer.xml'

- name: weaponartisan
  regex: <Talent identifier="weaponartisan">!anyvalue="(?<quality>!num)"!anyvalue="(?<qualityv>!num)"
  lua: |
    quality=round(quality*2, 0)
    qualityv=quality
  files:
    - '**/TalentsEngineer.xml'

- name: gridmaintainer
  regex: <Talent identifier="gridmaintainer">!anyvalue="(?<repairspeed>!num)"!anyvalue="(?<repairspeedv>!num)"
  lua: |
    repairspeed=round(repairspeed*2, 2)
    repairspeedv=round(repairspeedv*2, 2)
  files:
    - '**/TalentsEngineer.xml'

- name: pyromaniac
  regex: <Talent identifier="pyromaniac">!anyvalue="(?<damagebonus>!num)"!anymultiplier="(?<damagebonusv>!num)"!anyvalue="(?<damagebonusv2>!num)"
  lua: |
    damagebonus=round(damagebonus*2, 2)
    damagebonusv=round(damagebonus/100, 2)
    damagebonusv2=round(damagebonus*2/100, 2)
  files:
    - '**/TalentsEngineer.xml'

- name: unlimitedpower
  regex: <Talent identifier="unlimitedpower">!anyvalue="(?<quality>!num)"!anyvalue="(?<powerbonus>!num)"!anyvalue="(?<qualityv>!num)"!anyvalue="(?<powerbonusv>!num)"!anyvalue="(?<powerbonusv2>!num)"
  lua: |
    quality=round(quality*2, 0)
    powerbonus=round(powerbonus*2, 2)
    qualityv=quality
    powerbonusv=round(1+powerbonus/100, 2)
    powerbonusv2=round(1+powerbonus/100, 2)
  files:
    - '**/TalentsEngineer.xml'

- name: betterthannew
  regex: <Talent identifier="betterthannew">!anyvalue="(?<deteriorationrate>!num)"!anyvalue="(?<deteriorationratev>!num)"
  lua: |
    deteriorationrate=round(deteriorationrate*2, 2)
    deteriorationratev=round(1-deteriorationrate/100, 2)
  files:
    - '**/TalentsEngineer.xml'

- name: lightningwizard
  regex: <Talent identifier="lightningwizard">!anystun!anyvalue="(?<stunseconds>!num)"!anystun!anyamount="(?<stunsecondsv>!num)"
  lua: |
    stunseconds=round(stunseconds*2, 2)
    stunsecondsv=stunseconds
  files:
    - '**/TalentsEngineer.xml'

- name: unstoppablecuriosity
  regex: <Talent identifier="unstoppablecuriosity">!anyvalue="(?<dooropeningspeed>!num)"!anyvalue="(?<crowbarpower>!num)"!anymultiplier="(?<crowbarpowerv>!num)"!anymultiplyvalue="(?<dooropeningspeedv>!num)"
  lua: |
    dooropeningspeed=round(dooropeningspeed*2, 2)
    crowbarpower=round(crowbarpower*2, 2)
    crowbarpowerv=round(crowbarpower/100, 2)
    dooropeningspeedv=round(dooropeningspeed/100, 2)
  files:
    - '**/TalentsEngineer.xml'

- name: cruising
  regex: <Talent identifier="cruising">!anyvalue="(?<fuelefficiency>!num)"!anyvalue="(?<fuelefficiencyv>!num)"!anyvalue="(?<fuelefficiencyv2>!num)"
  lua: |
    fuelefficiency=round(fuelefficiency*2, 2)
    fuelefficiencyv=round(1-fuelefficiency/100, 2)
    fuelefficiencyv2=round(1-fuelefficiency/100, 2)
  files:
    - '**/TalentsEngineer.xml'

- name: buzzing
  regex: <Talent identifier="buzzing">!anyvalue="(?<poweroutput>!num)"!anyvalue="(?<poweroutputv>!num)"!anyvalue="(?<poweroutputv2>!num)"
  lua: |
    poweroutput=round(poweroutput*2, 2)
    poweroutputv=round(1+poweroutput/100, 2)
    poweroutputv2=round(1+poweroutput/100, 2)
  files:
    - '**/TalentsEngineer.xml'

# Don't know how these multipliers work yet, 0.5 is ambiguous
# - name: dangerzone
#   regex: <Talent identifier="dangerzone">!anyvalue="(?<resistance>!num)"!anymultiplier="(?<resistancev>!num)"
#   lua: |
#     resistance=round(resistance*1.5, 2)
#     resistancev=round(resistancev*1.5, 2)
#   files:
#     - '**/TalentsEngineer.xml'

- name: phdinnuclearphysics
  regex: <Talent identifier="phdinnuclearphysics">!anyvalue="(?<meleepower>!num)"!anymultiplier="(?<meleepowerv>!num)"
  lua: |
    meleepower=round(meleepower*2, 2)
    meleepowerv=round(meleepower/100, 2)
  files:
    - '**/TalentsEngineer.xml'
