Skip to content

Commit

Permalink
Executioner M2 Rework
Browse files Browse the repository at this point in the history
  • Loading branch information
Moffein committed Dec 9, 2023
1 parent 0f6f968 commit b9b525d
Show file tree
Hide file tree
Showing 11 changed files with 55 additions and 47 deletions.
19 changes: 19 additions & 0 deletions Starstorm 2/Starstorm2Release/README.md
Original file line number Diff line number Diff line change
Expand Up @@ -53,6 +53,25 @@ The SS2 team is free to use any of the new code from this mod as long as this re

## Changelog

`0.16.0`

- Executioner
- Primaries
- Increased damage from 150% -> 180%
*4 shots to kill a Lemurian on stage 1.*
- Ion Burst
- Increased damage from 320% -> 2x250%.
- Reduced stocks from 10 -> 5 (3200% damage total -> 2500% damage total)
- Recharges stocks every 12s, on top of the on-kill restock.
- No longer gains double stocks from killing Feared enemies.
*This skill struggled in MP, and often ended up requiring too much time to build up for too little payoff. Should be able to fire off big bursts more frequently now.*
- Crowd Dispersion
- Now fully Stuns instead of just Staggering.

`0.15.6`

- Watch Metronome
Expand Down
Binary file modified Starstorm 2/Starstorm2Release/VideogameMod2Unofficial.zip
Binary file not shown.
2 changes: 1 addition & 1 deletion Starstorm 2/Starstorm2Release/manifest.json
Original file line number Diff line number Diff line change
@@ -1,6 +1,6 @@
{
"name": "Videogame_Mod_2_Unofficial",
"version_number": "0.15.6",
"version_number": "0.16.0",
"website_url": "https://github.com/Moffein/Starstorm2Unofficial",
"description": "A restoration of the pre-SotV Videogame Mod 2. Compatible with the official Videogame Mod 2!",
"dependencies": [
Expand Down
Binary file not shown.
2 changes: 1 addition & 1 deletion Starstorm 2/StarstormPlugin.cs
Original file line number Diff line number Diff line change
Expand Up @@ -53,7 +53,7 @@ public class StarstormPlugin : BaseUnityPlugin
{
internal const string guid = "com.ChirrLover.Starstorm2Unofficial";
internal const string modName = "Starstorm 2 Unofficial";
internal const string version = "0.15.6";
internal const string version = "0.16.0";

public static StarstormPlugin instance;

Expand Down
Original file line number Diff line number Diff line change
Expand Up @@ -49,7 +49,7 @@ public void TriggerEffects(CharacterBody killerBody, DamageType damageType)
int orbCount = 1;
CharacterBody body = this.GetComponent<CharacterBody>();
if (body) orbCount = Executioner.ExecutionerCore.GetIonCountFromBody(body);
if (body.HasBuff(Cores.BuffCore.fearDebuff)) orbCount *= 2;
//if (body.HasBuff(Cores.BuffCore.fearDebuff)) orbCount *= 2;

for (int i = 0; i < orbCount; i++)
{
Expand Down
Original file line number Diff line number Diff line change
Expand Up @@ -7,7 +7,7 @@ namespace EntityStates.SS2UStates.Executioner
{
public class ExecutionerBurstPistol : BaseState
{
public static float damageCoefficient = 1.5f;
public static float damageCoefficient = 1.8f;
public static float force = 100f;
public static float baseDuration = 0.5f;
public static float baseShotDuration = 0.12f;
Expand Down
Original file line number Diff line number Diff line change
Expand Up @@ -7,7 +7,7 @@ namespace EntityStates.SS2UStates.Executioner
{
public class ExecutionerSinglePistol : BaseState
{
public static float damageCoefficient = 1.5f;
public static float damageCoefficient = 1.8f;
public static float force = 100f;
public static float baseDuration = 0.25f;
public static string attackSoundString = "SS2UExecutionerPrimaryClassic";//"ExecutionerPrimary";
Expand Down
19 changes: 12 additions & 7 deletions Starstorm 2/Survivors/Executioner/EntityStates/Secondary.cs
Original file line number Diff line number Diff line change
Expand Up @@ -13,7 +13,8 @@ namespace EntityStates.SS2UStates.Executioner
{
public class ExecutionerIonGun : BaseCustomSkillState
{
public static float damageCoefficient = 3.2f;
public static int shotCount = 2;
public static float damageCoefficient = 2.5f;
public static float procCoefficient = 1.0f;
public static float baseDuration = 0.12f;
public static float recoil = 1f;
Expand Down Expand Up @@ -41,16 +42,22 @@ public override void OnEnter()
//how do we get this skill's slot without hardcoding like this
// doesn't really matter
skill = base.characterBody.skillLocator.GetSkill(SkillSlot.Secondary);
this.shotsToFire = skill.stock;
//if (shotsToFire > 10) shotsToFire = 10;
if (skill)
{
this.shotsToFire = skill.stock * shotCount;

if (!base.characterBody.HasBuff(Starstorm2Unofficial.Cores.BuffCore.exeSuperchargedBuff))
{
skill.stock = 0;
}
}
this.duration = baseDuration;// / this.attackSpeedStat;
base.characterBody.SetAimTimer(2f);
this.muzzleString = "Muzzle";

isCrit = base.RollCrit();

Shoot();
shotsToFire--;
}

public override void OnExit()
Expand All @@ -70,7 +77,6 @@ public override void FixedUpdate()
if (this.shotsToFire > 0)
{
this.Shoot();
this.shotsToFire--;
}
else
{
Expand All @@ -81,6 +87,7 @@ public override void FixedUpdate()

private void Shoot()
{
this.shotsToFire--;
//Util.PlayAttackSpeedSound(base.effectComponent.ionShootSound, base.gameObject, this.attackSpeedStat);
Util.PlaySound("SS2UExecutionerSecondaryClassic", base.gameObject);
base.AddRecoil(-2f * recoil, -3f * recoil, -1f * recoil, 1f * recoil);
Expand Down Expand Up @@ -130,8 +137,6 @@ private void Shoot()
};
bullet.AddModdedDamageType(DamageTypeCore.ModdedDamageTypes.ExtendFear);
bullet.Fire();

if (!base.characterBody.HasBuff(Starstorm2Unofficial.Cores.BuffCore.exeSuperchargedBuff)) skill.DeductStock(1);
}
}

Expand Down
3 changes: 2 additions & 1 deletion Starstorm 2/Survivors/Executioner/EntityStates/Utility.cs
Original file line number Diff line number Diff line change
Expand Up @@ -124,7 +124,8 @@ private void CreateFearAoe()
Type state = ssoh.targetStateMachine.state.GetType();
if (state != typeof(EntityStates.StunState) && state != typeof(EntityStates.ShockState) && state != typeof(EntityStates.FrozenState))
{
ssoh.SetStun(-1f);
//ssoh.SetStun(-1f); //-1f = stagger
ssoh.SetStun(2f);
}
}

Expand Down
51 changes: 17 additions & 34 deletions Starstorm 2/Survivors/Executioner/ExecutionerCore.cs
Original file line number Diff line number Diff line change
Expand Up @@ -186,8 +186,8 @@ internal override void InitializeSkills()
skillIcon = Modules.Assets.mainAssetBundle.LoadAsset<Sprite>("texExecutionerSecondary"),
activationState = new SerializableEntityStateType(typeof(ExecutionerIonGun)),
activationStateMachineName = "Weapon",
baseMaxStock = 10,
baseRechargeInterval = 0f,
baseMaxStock = 5,
baseRechargeInterval = 12f,
beginSkillCooldownOnSkillEnd = true,
canceledFromSprinting = false,
forceSprintDuringState = false,
Expand All @@ -197,7 +197,7 @@ internal override void InitializeSkills()
isCombatSkill = true,
mustKeyPress = false,
cancelSprintingOnActivation = true,
rechargeStock = 0,
rechargeStock = 1,
requiredStock = 1,
stockToConsume = 0,
keywordTokens = new string[] { "KEYWORD_SHOCKING" }
Expand Down Expand Up @@ -231,6 +231,7 @@ internal override void InitializeSkills()
stockToConsume = 1,
keywordTokens = new string[]
{
"KEYWORD_STUNNING",
"KEYWORD_SS2U_FEAR"
}
});
Expand Down Expand Up @@ -335,9 +336,9 @@ internal override void RegisterTokens()
LanguageAPI.Add("SS2UEXECUTIONER_NAME", "Executioner");
LanguageAPI.Add("SS2UEXECUTIONER_SUBTITLE", "Dreaded Guillotine");
LanguageAPI.Add("SS2UEXECUTIONER_DESCRIPTION", "The Executioner's goal is to spill as much blood as possible in the shortest amount of time. Bullets loaded, ion manipulators charged.<style=cSub>\r\n\r\n" +
" < ! > Ion Burst deals massive damage, but does not regenerate stocks over time.\r\n\r\n" +
" < ! > Ion Burst deals massive damage but regenerates stocks slowly. Kill weak enemies to charge it up quickly, then unload it into stronger enemies.\r\n\r\n" +
" < ! > Crowd Disperion interrupts enemy attacks, providing you with a window of opportunity.\r\n\r\n" +
" < ! > Feared enemies give extra Ion Burst charges when killed.\r\n\r\n" +
" < ! > Feared enemies are executed at low health.\r\n\r\n" +
" < ! > Combine Execution with Crowd Dispersion to quickly kill groups of enemies.\r\n\r\n");
LanguageAPI.Add("SS2UEXECUTIONER_OUTRO_FLAVOR", "..and so he left, bloodlust unfulfilled.");
LanguageAPI.Add("SS2UEXECUTIONER_OUTRO_FAILURE", "..and so he vanished, escaping what he'd believed was inevitable.");
Expand All @@ -358,18 +359,18 @@ internal override void RegisterTokens()
LanguageAPI.Add("SS2UEXECUTIONER_PISTOL_DESCRIPTION", $"Fire your pistol for <style=cIsDamage>{shotCount}x{dmg}% damage</style>.");

dmg = ExecutionerSinglePistol.damageCoefficient * 100f;
LanguageAPI.Add("SS2UEXECUTIONER_PISTOL_SINGLE_NAME", "Standard Issue Pistol");
LanguageAPI.Add("SS2UEXECUTIONER_PISTOL_SINGLE_NAME", "Standard-Issue Pistol");
LanguageAPI.Add("SS2UEXECUTIONER_PISTOL_SINGLE_DESCRIPTION", $"Fire your pistol for <style=cIsDamage>{dmg}% damage</style>.");

dmg = ExecutionerIonGun.damageCoefficient * 100f;

int shots = ExecutionerIonGun.shotCount;
LanguageAPI.Add("SS2UEXECUTIONER_IONGUN_NAME", "Ion Burst");
LanguageAPI.Add("SS2UEXECUTIONER_IONGUN_DESCRIPTION", $"<style=cIsDamage>Shocking</style>. Unload a barrage of ionized bullets for <style=cIsDamage>{dmg}% damage</style> each. Every slain enemy <style=cIsUtility>adds a bullet</style>.");
LanguageAPI.Add("SS2UEXECUTIONER_IONGUN_DESCRIPTION", $"<style=cIsDamage>Shocking</style>. Unload a barrage of ionized bullets for <style=cIsDamage>{shots}x{dmg}% damage</style> each. Every slain enemy <style=cIsUtility>adds a stock</style>. Hold up to 5.");

LanguageAPI.Add("KEYWORD_SS2U_FEAR", "<style=cKeywordName>Fear</style><style=cSub>Reduce movement speed by <style=cIsDamage>50%</style>. Feared enemies are <style=cIsHealth>instantly killed</style> if below <style=cIsHealth>15%</style> health.</style>");

LanguageAPI.Add("SS2UEXECUTIONER_DASH_NAME", "Crowd Dispersion");
LanguageAPI.Add("SS2UEXECUTIONER_DASH_DESCRIPTION", $"<style=cIsUtility>Dash forward</style> and <style=cIsDamage>Fear</style> nearby enemies.");
LanguageAPI.Add("SS2UEXECUTIONER_DASH_DESCRIPTION", $"<style=cIsDamage>Stunning</style>. <style=cIsUtility>Dash forward</style> and <style=cIsDamage>Fear</style> nearby enemies.");

dmg = ExecutionerAxeSlam.damageCoefficient * 100f;

Expand Down Expand Up @@ -636,41 +637,23 @@ private static void GlobalEventManager_onCharacterDeathGlobal(DamageReport damag
if (damageReport.attackerBody && damageReport.attackerBody.bodyIndex == ExecutionerCore.bodyIndex)
{
int orbCount = GetIonCountFromBody(victimBody);
if (victimFeared) orbCount *= 2;
//if (damageReport.damageInfo.damageType.HasFlag(DamageType.BypassOneShotProtection)) orbCount *= 2; //Was used to make exe axe give double charges on kill. Unnecessary.
//if (victimFeared) orbCount *= 2;

for (int i = 0; i < orbCount; i++)
{
Modules.Orbs.ExecutionerIonOrb ionOrb = new Modules.Orbs.ExecutionerIonOrb();
ionOrb.origin = victimBody.corePosition;
ionOrb.target = Util.FindBodyMainHurtBox(damageReport.attackerBody);
OrbManager.instance.AddOrb(ionOrb);
}

//These aren't used anymore because the hardcoded Ion Burst value list was ridiculous.
/*if (orbCount >= 50 && orbCount < 110)
for (int i = 0; i < orbCount; i++)
{
Modules.Orbs.ExecutionerIonTempSuperOrb tempSuperIonOrb = new Modules.Orbs.ExecutionerIonTempSuperOrb();
tempSuperIonOrb.origin = victimBody.corePosition;
tempSuperIonOrb.target = Util.FindBodyMainHurtBox(damageReport.attackerBody);
OrbManager.instance.AddOrb(tempSuperIonOrb);
Modules.Orbs.ExecutionerIonOrb ionOrb = new Modules.Orbs.ExecutionerIonOrb();
ionOrb.origin = victimBody.corePosition;
ionOrb.target = Util.FindBodyMainHurtBox(damageReport.attackerBody);
OrbManager.instance.AddOrb(ionOrb);
}
if (orbCount >= 110)
{
Modules.Orbs.ExecutionerIonSuperOrb superIonOrb = new Modules.Orbs.ExecutionerIonSuperOrb();
superIonOrb.origin = victimBody.corePosition;
superIonOrb.target = Util.FindBodyMainHurtBox(damageReport.attackerBody);
OrbManager.instance.AddOrb(superIonOrb);
}*/
}
}
}
}

internal static int GetIonCountFromBody(CharacterBody body)
{
if (body.isChampion) return 10;
if (body.isChampion) return 5;
return 1;
}

Expand Down

0 comments on commit b9b525d

Please sign in to comment.