private void DodgeState_RecalculateRollSpeed(On.EntityStates.Commando.DodgeState.orig_RecalculateRollSpeed orig, EntityStates.Commando.DodgeState self) { orig(self); var count = GetCount(self.characterBody); if (count > 0) { self.rollSpeed *= 1f + buffFrac * commandoDodgeFrac * count; } }
private void DodgeState_OnEnter(On.EntityStates.Commando.DodgeState.orig_OnEnter orig, EntityStates.Commando.DodgeState self) { self.outer.commonComponents.characterBody.isSprinting = true; orig(self); }
private static void DodgeState_OnEnter(On.EntityStates.Commando.DodgeState.orig_OnEnter orig, EntityStates.Commando.DodgeState self) { orig(self); if (self.outer.commonComponents.characterBody?.skillLocator?.utility?.skillDef && self.outer.commonComponents.characterBody.skillLocator.utility.skillDef == rollSkillDef) { self.outer.commonComponents.characterBody.AddTimedBuff(RoR2Content.Buffs.Immune, self.duration); } }