Skip to content

Commit

Permalink
bump v0.5.0, and correct refire modifier lookup to be zero (I think)
Browse files Browse the repository at this point in the history
  • Loading branch information
janxious committed Jan 16, 2019
1 parent 84617c2 commit fca37f7
Show file tree
Hide file tree
Showing 4 changed files with 15 additions and 8 deletions.
2 changes: 1 addition & 1 deletion Calculator.DistanceBasedVariance.cs
Original file line number Diff line number Diff line change
Expand Up @@ -77,7 +77,7 @@ private static float ParseBaseMultiplier(Weapon weapon)
return multiplier;
}
}

private static class ReverseDistanceBasedVariance
{
public static bool IsApplicable(Weapon weapon)
Expand Down
13 changes: 12 additions & 1 deletion JammingEnabler.cs
Original file line number Diff line number Diff line change
Expand Up @@ -55,10 +55,21 @@ static void Prefix(AbstractActor __instance)
}
}

private static float GetRefireModifier(Weapon weapon)
{
if (weapon.RefireModifier > 0 && weapon.roundsSinceLastFire < 2)
return (float) weapon.RefireModifier;
return 0.0f;
}

private static bool AttemptToAddJam(AbstractActor actor, Weapon weapon)
{
// TODO: can we exponentially increase refiremodifier?
var refireModifier = weapon.RefireModifier;
// LadyAlekto: every turn fired, the refiremodifier gets added
// LadyAlekto: either as toggle or global
// LadyAlekto: and when you brace a turn, it resets
// LadyAlekto: brace as in "dont shoot"
var refireModifier = GetRefireModifier(weapon);
var roll = Random.Range(1, 100);
var skill = actor.SkillGunnery;
var mitigationRoll = Random.Range(2, 11);
Expand Down
2 changes: 1 addition & 1 deletion Properties/AssemblyInfo.cs
Original file line number Diff line number Diff line change
Expand Up @@ -31,5 +31,5 @@
// You can specify all the values or you can default the Build and Revision Numbers
// by using the '*' as shown below:
// [assembly: AssemblyVersion("1.0.*")]
[assembly: AssemblyVersion("0.4.2.*")]
[assembly: AssemblyVersion("0.5.0.*")]
[assembly: AssemblyFileVersion("0.0.0.0")] // match HBS assembly version (shrug)
6 changes: 1 addition & 5 deletions mod.json
Original file line number Diff line number Diff line change
Expand Up @@ -2,7 +2,7 @@
"Name": "WeaponRealizer",
"Enabled": true,

"Version": "0.4.1",
"Version": "0.5.0",

"Author": "janxious",
"Website": "https://github.com/janxious/WeaponRealizer",
Expand Down Expand Up @@ -45,10 +45,6 @@

"jamming": true,
"jamChanceMultiplier": 1.0,
"jammingMessages": {
"default": ["% Jammed", "% Unjammed"],
"gaussyGunGun": ["%: Current Destabilized", "%: Current Stabilized"]
},

"debug": true
}
Expand Down

0 comments on commit fca37f7

Please sign in to comment.