Skip to content

Commit

Permalink
Updated readme and added missing values to json.
Browse files Browse the repository at this point in the history
  • Loading branch information
RealityMachina committed Jun 1, 2018
1 parent 23adf9a commit 3985387
Show file tree
Hide file tree
Showing 3 changed files with 26 additions and 3 deletions.
9 changes: 8 additions & 1 deletion PunchinOut/BasicPanic.cs
Original file line number Diff line number Diff line change
Expand Up @@ -175,7 +175,14 @@ public static bool ShouldPanic(Mech mech, AttackDirector.AttackSequence attackSe
return false;
}


if(mech.team == mech.Combat.LocalPlayerTeam && !BasicPanic.Settings.PlayerTeamCanPanic)
{
return false;
}
else if (mech.team != mech.Combat.LocalPlayerTeam && !BasicPanic.Settings.EnemiesCanPanic)
{
return false;
}

int PanicRoll = 0;

Expand Down
16 changes: 15 additions & 1 deletion README.md
Original file line number Diff line number Diff line change
Expand Up @@ -28,8 +28,22 @@ Stressed Pilots by default, experience -10 to their hit chances, and are 5% more
Panicked Pilots by default, experience -15 to their hit chances, and are 5% more likelier to be hit due to improper piloting. They roll for ejection every time they're hit while in this state.

## Special Cases
Pilots with one point of HP left or are the last survivor in their lance will always roll for ejection when they receive an attack, no matter what.
Pilots with one point of HP left, have no weapons remaining, or are the last survivor in their lance will always roll for ejection when they receive an attack, no matter what.

Certain classes of mechs may have their pilots roll for a lower capped chance to eject at an earlier panic state. By default, this applies to enemy light mechs only, when they hit the Fatigued panic state.


## Configuration

`mod.json` has some settings on how the chances work -- for a simple change to the max ejection roll, just change the `MaxEjectChance`. Rolls for the general panic system should be relatively self-explanatory.

Other settings:

AlwaysGatedChanges control whether only one panic state transition can happen for a mech per round. This prevents multiple alpha strikes from taking one of your mechs straight to the panicked state.

The Early Panic Thresholds use ints to represent the panic states:

0 = normal
1 = fatigued
2 = stressed
3 = panicked
4 changes: 3 additions & 1 deletion mod.json
Original file line number Diff line number Diff line change
Expand Up @@ -10,7 +10,9 @@

"Settings": {
"PlayerCharacterAlwaysResists": true,

"PlayerTeamCanPanic": true,
"EnemiesCanPanic": true,

"PlayerLightsConsiderEjectingEarly": false,
"EnemyLightsConsiderEjectingEarly": true,
"LightMechEarlyPanicThreshold": 1,
Expand Down

0 comments on commit 3985387

Please sign in to comment.