Skip to content

Commit

Permalink
free and infinite aqualung (Die4Ever#845)
Browse files Browse the repository at this point in the history
* free and infinite aqualung

* simplify DXRAugAqualung.IsTicked and DXRAugAqualung.Tick

* update aqualung description
  • Loading branch information
MQDuck committed Jul 18, 2024
1 parent 605799d commit ba4d76f
Showing 1 changed file with 13 additions and 15 deletions.
28 changes: 13 additions & 15 deletions DXRBalance/DeusEx/Classes/AugAqualung.uc
Original file line number Diff line number Diff line change
Expand Up @@ -5,28 +5,26 @@ function PostPostBeginPlay()
Super.PostPostBeginPlay();
// description gets overwritten by language file, also DXRAugmentations reads from the default.Description
// use the vanilla Level 3 description for our max level even though we're using level 4 strength, because the level 4 description makes no sense
default.Description = "Soda lime exostructures imbedded in the alveoli of the lungs convert CO2 to O2, extending the time an agent can remain underwater."
$ "|n|nTECH ONE: Lung capacity is extended moderately.|n|nTECH TWO: Lung capacity is extended significantly.";
default.Description = "Soda lime exostructures imbedded in the alveoli of the lungs convert CO2 to O2, allowing an agent to remain underwater indefinitely.";
Description = default.Description;
}

simulated function bool IsTicked()
{// aqualung is perfectly automatic
local bool bWater;

if(Player == None) return false;
bWater = Player.HeadRegion.Zone.bWaterZone && Player.swimTimer > 0;
{// aqualung is, conceptually, always on
return bIsActive && Player != None && Player.HeadRegion.Zone.bWaterZone;
}

return (bAutomatic==false && bIsActive)
|| (bAutomatic && bIsActive && bWater && Player.Energy > 0);
function Tick(float deltaTime)
{
Super.Tick(deltaTime);
if (IsTicked()) {
player.swimTimer = player.swimDuration;
}
}

defaultproperties
{
bAutomatic=true
AutoLength=0
AutoEnergyMult=1// no penalty, it's a gift
MaxLevel=1
LevelValues(0)=60.000000
LevelValues(1)=240.000000
bAlwaysActive=true
EnergyRate=0
MaxLevel=0
}

0 comments on commit ba4d76f

Please sign in to comment.