Please disclose if any significant portion of your mod was created using AI tools by adding the 'AI Generated' category. Failing to do so may result in the mod being removed from Thunderstore.
Decompiled source of Celestial War Tank v2.3.6
TanksMod.dll
Decompiled a month ago
The result has been truncated due to the large size, download it to view full contents!
using System; using System.Collections; using System.Collections.Generic; using System.Diagnostics; using System.IO; using System.Linq; using System.Reflection; using System.Resources; using System.Runtime.CompilerServices; using System.Runtime.Versioning; using System.Security; using System.Security.Permissions; using AncientScepter; using BepInEx; using BepInEx.Bootstrap; using BepInEx.Configuration; using BepInEx.Logging; using EntityStates; using EntityStates.ClayBruiser.Weapon; using EntityStates.Commando.CommandoWeapon; using EntityStates.SurvivorPod; using EntityStates.Toolbot; using EntityStates.Treebot.Weapon; using HG; using HG.BlendableTypes; using JetBrains.Annotations; using KinematicCharacterController; using On.RoR2; using R2API; using R2API.Networking; using R2API.Networking.Interfaces; using R2API.Utils; using RiskOfOptions; using RiskOfOptions.Options; using RoR2; using RoR2.Achievements; using RoR2.Audio; using RoR2.CharacterAI; using RoR2.ContentManagement; using RoR2.ExpansionManagement; using RoR2.Items; using RoR2.Navigation; using RoR2.Orbs; using RoR2.Projectile; using RoR2.Skills; using RoR2.Stats; using RoR2.SurvivorMannequins; using RoR2.UI; using TMPro; using TanksMod.Content; using TanksMod.Content.Achievements; using TanksMod.Content.Characters.Monsters; using TanksMod.Modules; using TanksMod.Modules.Characters; using TanksMod.Modules.Components; using TanksMod.Modules.Components.BasicCar; using TanksMod.Modules.Components.BasicTank; using TanksMod.Modules.Components.FX; using TanksMod.Modules.Components.Lobby; using TanksMod.Modules.Components.Orbs; using TanksMod.Modules.Components.Projectile; using TanksMod.Modules.Components.Projectile.Ghost; using TanksMod.Modules.Components.Projectile._BASE; using TanksMod.Modules.Components.UI; using TanksMod.Modules.Components.User; using TanksMod.Modules.Components.User.CustomPerks; using TanksMod.Modules.Components.Visuals; using TanksMod.Modules.Networking; using TanksMod.Modules.Networking.Skills; using TanksMod.Modules.Pods.ShippingContainerPod; using TanksMod.Modules.Pods.XtraDropImpactPod; using TanksMod.Modules.Survivors; using TanksMod.SkillStates; using TanksMod.SkillStates.BasicNemesisTank._PRIMARY; using TanksMod.SkillStates.BasicTank.DashRam; using TanksMod.SkillStates.BasicTank.Utility; using TanksMod.SkillStates.BasicTank._BASE; using TanksMod.SkillStates.BasicTank._BASE.Cannon; using TanksMod.SkillStates.BasicTank._PRIMARY; using TanksMod.SkillStates.BasicTank._PRIMARY.Shotgun; using TanksMod.SkillStates.BasicTank._PRIMARY.Ultrantenna; using TanksMod.SkillStates.BasicTank._SECONDARY; using TanksMod.SkillStates.BasicTank._SECONDARY.ArtilleryCannon; using TanksMod.SkillStates.BasicTank._SECONDARY.CelestialCannon; using TanksMod.SkillStates.BasicTank._SECONDARY.HowitzerCannon; using TanksMod.SkillStates.BasicTank._SECONDARY.Minigun; using TanksMod.SkillStates.BasicTank._SECONDARY.ObliteratorCannon; using TanksMod.SkillStates.BasicTank._SECONDARY.PiercingCannon; using TanksMod.SkillStates.BasicTank._SPECIAL; using TanksMod.SkillStates.BasicTank._SPECIAL.MiniLandmines; using TanksMod.SkillStates.BasicTank._SPECIAL.MissleLauncher; using TanksMod.SkillStates.BasicTank._UTILITY.RipDozer; using TanksMod.SkillStates.BasicTank._UTILITY.Trencher; using TanksMod.SkillStates.BasicXtraTank._POWERCYCLE; using TanksMod.SkillStates.BasicXtraTank._PRIMARY; using TanksMod.SkillStates.BasicXtraTank._SECONDARY; using TanksMod.SkillStates.BasicXtraTank._SECONDARY.ArtilleryCannon; using TanksMod.SkillStates.BasicXtraTank._SECONDARY.DoubleBarrelCannon; using TanksMod.SkillStates.BasicXtraTank._SPECIAL; using TanksMod.SkillStates.BasicXtraTank._SPECIAL.Blasticular; using TanksMod.SkillStates.BasicXtraTank._UTILITY; using TanksMod.SkillStates.BasicXtraTank._UTILITY.PowerCycle; using TanksMod.SkillStates.BasicXtraTank._UTILITY.PowerCycle.Modes; using TanksMod.SkillStates.Landmine; using TanksMod.SkillStates.MiniLandmine; using TanksMod.SkillStates.Projectile; using TanksMod.SkillStates.Projectile.AAProjectile; using TanksMod.SkillStates.Projectile.FlamethrowerPelletProjectile; using TanksMod.States; using TanksMod.States.Tank; using TanksMod.States.Tank.XTRA; using TanksMod._DEPENDENCIES.StandaloneAncientScepter.Modules; using TanksMod._DEPENDENCIES.StandaloneAncientScepter.SkillStates; using TanksMod._DEPENDENCIES.StandaloneAncientScepter.SkillStates.HowitzerCannon; using TanksMod._DEPENDENCIES.StandaloneAncientScepter.SkillStates.Minigun; using TanksMod._DEPENDENCIES.StandaloneAncientScepter.SkillStates.ObliteratorCannon; using TanksMod._DEPENDENCIES.StandaloneAncientScepter.SkillStates.Projectile.GAProjectile; using Unity.Collections; using Unity.Jobs; using UnityEngine; using UnityEngine.AddressableAssets; using UnityEngine.EventSystems; using UnityEngine.Events; using UnityEngine.Networking; using UnityEngine.Rendering; using UnityEngine.SceneManagement; using UnityEngine.Serialization; using UnityEngine.UI; [assembly: CompilationRelaxations(8)] [assembly: RuntimeCompatibility(WrapNonExceptionThrows = true)] [assembly: Debuggable(DebuggableAttribute.DebuggingModes.Default | DebuggableAttribute.DebuggingModes.DisableOptimizations | DebuggableAttribute.DebuggingModes.IgnoreSymbolStoreSequencePoints | DebuggableAttribute.DebuggingModes.EnableEditAndContinue)] [assembly: TargetFramework(".NETStandard,Version=v2.1", FrameworkDisplayName = ".NET Standard 2.1")] [assembly: AssemblyCompany("CheeseWithHoles")] [assembly: AssemblyConfiguration("Debug")] [assembly: AssemblyFileVersion("2.3.4")] [assembly: AssemblyInformationalVersion("1.0.0")] [assembly: AssemblyProduct("TanksMod")] [assembly: AssemblyTitle("TanksMod")] [assembly: NeutralResourcesLanguage("en")] [assembly: SecurityPermission(SecurityAction.RequestMinimum, SkipVerification = true)] [assembly: SecurityPermission(SecurityAction.RequestMinimum, SkipVerification = true)] [assembly: AssemblyVersion("2.3.4.0")] [module: UnverifiableCode] [module: UnverifiableCode] namespace TanksMod { internal static class Log { internal static ManualLogSource _logSource; internal static void Init(ManualLogSource logSource) { if (Config.enableDebugging.Value) { _logSource = logSource; } } internal static void Debug(object data) { if (_logSource != null) { _logSource.LogDebug(data); } } internal static void Error(object data) { if (_logSource != null) { _logSource.LogError(data); } } internal static void Fatal(object data) { if (_logSource != null) { _logSource.LogFatal(data); } } internal static void Info(object data) { if (_logSource != null) { _logSource.LogInfo(data); } } internal static void Message(object data) { if (_logSource != null) { _logSource.LogInfo(data); } } internal static void Warning(object data) { if (_logSource != null) { _logSource.LogWarning(data); } } } [BepInDependency(/*Could not decode attribute arguments.*/)] [BepInDependency(/*Could not decode attribute arguments.*/)] [BepInDependency(/*Could not decode attribute arguments.*/)] [BepInDependency(/*Could not decode attribute arguments.*/)] [BepInDependency(/*Could not decode attribute arguments.*/)] [BepInDependency(/*Could not decode attribute arguments.*/)] [BepInDependency(/*Could not decode attribute arguments.*/)] [BepInDependency(/*Could not decode attribute arguments.*/)] [NetworkCompatibility(/*Could not decode attribute arguments.*/)] [BepInPlugin("com.cheesewithholes.TanksMod", "TanksMod", "2.3.6")] [R2APISubmoduleDependency(new string[] { "PrefabAPI", "LanguageAPI", "SoundAPI", "UnlockableAPI", "NetworkingAPI", "DirectorAPI" })] public class TanksPlugin : BaseUnityPlugin { public const string MODUID = "com.cheesewithholes.TanksMod"; public const string MODNAME = "TanksMod"; public const string MODVERSION = "2.3.6"; public const string DEVELOPER_PREFIX = "CHEESEWITHHOLES"; public static TanksPlugin instance; public static ExpansionDef tankExpansion; public GameObject playerPrefabObj; public bool addedCheeseComponentToPlayer; public static bool is_Starstorm2_Mod_Installed => Chainloader.PluginInfos.ContainsKey("com.TeamMoonstorm.Starstorm2"); public static bool is_RiskOfOptions_Mod_Installed => Chainloader.PluginInfos.ContainsKey("com.rune580.riskofoptions"); public static bool is_RiskUI_Mod_Installed => Chainloader.PluginInfos.ContainsKey("bubbet.riskui"); public static bool is_BetterHudLite_Mod_Installed => Chainloader.PluginInfos.ContainsKey("com.TheTimeSweeper.BetterHudLite"); public static bool is_CleanerHud_Mod_Installed => Chainloader.PluginInfos.ContainsKey("AAAHIFU.CleanerHud"); public static bool is_StandaloneAncientScepter_Mod_Installed => Chainloader.PluginInfos.ContainsKey("com.DestroyedClone.AncientScepter"); public static bool is_ItemDisplayPlacementHelper_Mod_Installed => Chainloader.PluginInfos.ContainsKey("com.KingEnderBrine.ItemDisplayPlacementHelper"); public static event Action PlayerPrefab; private void Awake() { instance = this; TanksMod.Modules.Assets.Initialize(); Config.myConfig = ((BaseUnityPlugin)this).Config; Config.ReadConfig(); Log.Init(((BaseUnityPlugin)this).Logger); CreateTankDLC(); Rebuild.Init(); StaticBasicModels.Init(); StaticXtraModels.Init(); StaticNemesisModels.Init(); StaticTextures.Init(); TanksMod.Modules.States.RegisterStates(); Buffs.RegisterBuffs(); TanksMod.Modules.Projectiles.RegisterProjectiles(); TanksMod.Modules.Tokens.AddTokens(); TanksMod.Modules.Tokens.AddXtraTokens(); ItemDisplays.Init(); Unlockables.RegisterUnlockables(); PerkSystem.Init(); Sounds.Init(); TankShield.Init(); RegisterMessages(); new BasicTank().Initialize(); if (Config.enableXtraTank.Value) { new BasicXtraTank().Initialize(); } if (Config.enableNemesisTank.Value) { new BasicNemesisTank().Initialize(); } if (Config.enableScoutCar.Value) { new BasicCar().Initialize(); } new ContentPacks().Initialize(); RegisterDependencies(); } private void Update() { if (!addedCheeseComponentToPlayer) { TanksPlugin.PlayerPrefab?.Invoke(); PlayerPrefab += AddComponentToPlayerPrefab; } else { PlayerPrefab -= AddComponentToPlayerPrefab; } } private void RegisterDependencies() { if (is_StandaloneAncientScepter_Mod_Installed) { Log.Warning("StandaloneAncientScepter is installed. Adding content."); TanksMod._DEPENDENCIES.StandaloneAncientScepter.Modules.Assets.PopulateAssets(); TanksMod._DEPENDENCIES.StandaloneAncientScepter.Modules.Projectiles.RegisterProjectiles(); TanksMod._DEPENDENCIES.StandaloneAncientScepter.Modules.Skills.RegisterSkills(); TanksMod._DEPENDENCIES.StandaloneAncientScepter.Modules.Tokens.AddTokens(); TanksMod._DEPENDENCIES.StandaloneAncientScepter.Modules.States.RegisterStates(); } } private void RegisterMessages() { NetworkingAPI.RegisterMessageType<SendInputToBankRequest>(); NetworkingAPI.RegisterMessageType<Fuel>(); NetworkingAPI.RegisterMessageType<Velocity>(); NetworkingAPI.RegisterMessageType<SendStuntStateNetworkRequest>(); NetworkingAPI.RegisterMessageType<PerformCrashEffectsNetworkRequest>(); NetworkingAPI.RegisterMessageType<SyncRootRotationNetworkRequest>(); NetworkingAPI.RegisterMessageType<PerformRotateGroundRotationNetworkRequest>(); NetworkingAPI.RegisterMessageType<PerformSetGroundRotationNetworkRequest>(); NetworkingAPI.RegisterMessageType<PerformSoundNetworkRequest>(); NetworkingAPI.RegisterMessageType<PerformThrusterLoopSoundNetworkRequest>(); NetworkingAPI.RegisterMessageType<SendThrusterEffectsNetworkRequest>(); NetworkingAPI.RegisterMessageType<SyncEmoteToggleNetworkRequest>(); NetworkingAPI.RegisterMessageType<Minigun>(); NetworkingAPI.RegisterMessageType<Shotgun>(); NetworkingAPI.RegisterMessageType<PerformRamForceNetworkRequest>(); } private void CreateTankDLC() { tankExpansion = ScriptableObject.CreateInstance<ExpansionDef>(); tankExpansion.nameToken = "CHEESEWITHHOLES_TANK_EXPANSION_NAME"; tankExpansion.descriptionToken = "CHEESEWITHHOLES_TANK_EXPANSION_DESCRIPTION"; tankExpansion.iconSprite = TanksMod.Modules.Assets.mainAssetBundle.LoadAsset<Sprite>("Tank_DLC_icon"); tankExpansion.disabledIconSprite = TanksMod.Modules.Assets.mainAssetBundle.LoadAsset<Sprite>("Tank_DLC_DISABLED_icon"); ContentAddition.AddExpansionDef(tankExpansion); LanguageAPI.Add("CHEESEWITHHOLES_TANK_EXPANSION_NAME", "Celestial Tanks"); LanguageAPI.Add("CHEESEWITHHOLES_TANK_EXPANSION_DESCRIPTION", "Adds content from the mod 'Celestial War Tank' to the game."); } private void AddComponentToPlayerPrefab() { NetworkManagerConfiguration val = Object.FindObjectOfType<NetworkManagerConfiguration>(); if (Object.op_Implicit((Object)(object)val)) { if (!Object.op_Implicit((Object)(object)playerPrefabObj)) { Log.Warning("Found Player Object!"); playerPrefabObj = val.PlayerPrefab; } } else { Log.Warning("Finding Network Manager Configuration..."); } if (Object.op_Implicit((Object)(object)playerPrefabObj)) { if ((Object)(object)playerPrefabObj.GetComponent<CheesePlayerHandler>() == (Object)null) { Log.Warning("Added CheesePlayerHandler to Player Object!"); playerPrefabObj.AddComponent<CheesePlayerHandler>(); } else { addedCheeseComponentToPlayer = true; } } } } } namespace TanksMod._DEPENDENCIES.StandaloneAncientScepter.SkillStates { internal class Upgraded_AACannon : AACannon { public override void OnEnter() { projectilePrefab = TanksMod._DEPENDENCIES.StandaloneAncientScepter.Modules.Projectiles.gaCannonProjectilePrefab; damageCoefficient = 4.05f; minSpread = 0f; maxSpread = 0.2f; baseDuration = 0.3f; base.OnEnter(); } } internal class Upgraded_ArtillaryCannon : ShootSplashCannon { private int bulletCount = 7; public override void OnEnter() { projectilePrefab = TanksMod._DEPENDENCIES.StandaloneAncientScepter.Modules.Projectiles.rainCannonProjectilePrefab; damageCoefficient = 22f; numberOfBullets = bulletCount; minSpread = 5f; maxSpread = 15f; bloom = 5f; base.OnEnter(); } } internal class Upgraded_BasicCannon : BasicCannon { public override GameObject projectilePrefab => TanksMod._DEPENDENCIES.StandaloneAncientScepter.Modules.Projectiles.fracturedCannonProjectilePrefab; public override float damageCoefficient => 81f; public override DamageType damageType => (DamageType)17536; public override float recoilAmplitude => 3f; public override float characterKnockbackForce => 9f; public override float bodyKnockbackForce => 1000f; } internal class Upgraded_CritCannon : CritCannon { public override GameObject projectilePrefab => TanksMod._DEPENDENCIES.StandaloneAncientScepter.Modules.Projectiles.doctorsCannonProjectilePrefab; public override float spreadBloom => 0.5f; public override float minSpread => 0f; public override float maxSpread => 1f; public override float characterKnockbackForce => 10f; public override float bodyKnockbackForce => 20f; public override void OnEnter() { base.OnEnter(); damageCoefficient = 21f + (((EntityState)this).characterBody.crit - 1f) * 0.15f; } } internal class Upgraded_FrenchGun : FrenchGun { public override void OnEnter() { numberOfBullets = 5; minSpread = 0.5f; maxSpread = 10f; base.OnEnter(); } } internal class Upgraded_KnockerCannon : KnockerCannon { public override GameObject projectilePrefab => TanksMod._DEPENDENCIES.StandaloneAncientScepter.Modules.Projectiles.boxersCannonProjectilePrefab; public override float spreadBloom => 0.5f; public override float minSpread => 0f; public override float maxSpread => 1f; public override float bodyKnockbackForce => 700f; public override float force => 80f; public override void OnEnter() { base.OnEnter(); damageCoefficient = 29.75f + GetBonusDamageFromItems(); } } internal class Upgraded_PiercingCannon : ShootPiercingCannonProjectile { public GameObject laserPrefab = TanksMod.Modules.Assets.laserEffect; public LineRenderer laserLine; private BulletAttack attack; public override GameObject effectPrefab => TanksMod.Modules.Assets.tSixtyTwoCannonFireEffect; public override float damageCoefficient => ((EntityState)this).characterBody.crit - 1f + 37.5f; public override void FixedUpdate() { if (((EntityState)this).fixedAge >= delayBeforeFiringProjectile && !firedProjectile) { firedProjectile = true; FireLaser(); } if (((EntityState)this).fixedAge >= duration && ((EntityState)this).isAuthority) { ((EntityState)this).outer.SetNextStateToMain(); } } public override void OnExit() { base.OnExit(); if (Object.op_Implicit((Object)(object)laserLine)) { Object.Destroy((Object)(object)((Component)laserLine).gameObject, 2f); } } private void FireLaser() { //IL_0002: Unknown result type (might be due to invalid IL or missing references) //IL_0007: Unknown result type (might be due to invalid IL or missing references) //IL_0051: Unknown result type (might be due to invalid IL or missing references) //IL_005b: Expected O, but got Unknown //IL_006f: Unknown result type (might be due to invalid IL or missing references) //IL_0082: Unknown result type (might be due to invalid IL or missing references) //IL_0087: Unknown result type (might be due to invalid IL or missing references) //IL_00b0: Unknown result type (might be due to invalid IL or missing references) //IL_00c0: Unknown result type (might be due to invalid IL or missing references) //IL_00c5: Unknown result type (might be due to invalid IL or missing references) //IL_00d1: Unknown result type (might be due to invalid IL or missing references) //IL_00fe: Unknown result type (might be due to invalid IL or missing references) //IL_0103: Unknown result type (might be due to invalid IL or missing references) //IL_0163: Unknown result type (might be due to invalid IL or missing references) //IL_019b: Unknown result type (might be due to invalid IL or missing references) //IL_01a0: Unknown result type (might be due to invalid IL or missing references) //IL_01e4: Unknown result type (might be due to invalid IL or missing references) //IL_0205: Unknown result type (might be due to invalid IL or missing references) //IL_0216: Unknown result type (might be due to invalid IL or missing references) //IL_021b: Unknown result type (might be due to invalid IL or missing references) //IL_0220: Unknown result type (might be due to invalid IL or missing references) //IL_022a: Unknown result type (might be due to invalid IL or missing references) //IL_022f: Unknown result type (might be due to invalid IL or missing references) //IL_023d: Unknown result type (might be due to invalid IL or missing references) //IL_0248: Unknown result type (might be due to invalid IL or missing references) //IL_0262: Unknown result type (might be due to invalid IL or missing references) //IL_026f: Unknown result type (might be due to invalid IL or missing references) //IL_02a9: Unknown result type (might be due to invalid IL or missing references) //IL_02ae: Unknown result type (might be due to invalid IL or missing references) //IL_02b6: Unknown result type (might be due to invalid IL or missing references) //IL_02bb: Unknown result type (might be due to invalid IL or missing references) //IL_02bd: Unknown result type (might be due to invalid IL or missing references) //IL_02c0: Unknown result type (might be due to invalid IL or missing references) //IL_02fc: Unknown result type (might be due to invalid IL or missing references) //IL_030a: Unknown result type (might be due to invalid IL or missing references) //IL_0319: Unknown result type (might be due to invalid IL or missing references) //IL_0320: Unknown result type (might be due to invalid IL or missing references) //IL_032a: Unknown result type (might be due to invalid IL or missing references) //IL_032f: Unknown result type (might be due to invalid IL or missing references) //IL_0334: Unknown result type (might be due to invalid IL or missing references) //IL_0345: Unknown result type (might be due to invalid IL or missing references) //IL_0346: Unknown result type (might be due to invalid IL or missing references) //IL_034b: Unknown result type (might be due to invalid IL or missing references) //IL_0355: Unknown result type (might be due to invalid IL or missing references) //IL_02ed: Unknown result type (might be due to invalid IL or missing references) //IL_02f2: Unknown result type (might be due to invalid IL or missing references) Ray val = ((BaseState)this).GetAimRay(); ((BaseState)this).AddRecoil(-1f * base.recoilAmplitude, -2f * base.recoilAmplitude, -0.5f * base.recoilAmplitude, 0.5f * base.recoilAmplitude); Util.PlaySound("Play_Scepter_PiercingCannon", ((EntityState)this).gameObject); attack = new BulletAttack(); attack.bulletCount = 1u; attack.aimVector = ((Ray)(ref val)).direction; attack.origin = ((Ray)(ref val)).origin; attack.damage = damageCoefficient * ((EntityState)this).characterBody.damage; attack.damageColorIndex = (DamageColorIndex)0; attack.damageType = DamageTypeCombo.op_Implicit((DamageType)144); attack.falloffModel = (FalloffModel)1; attack.maxDistance = 1000f; attack.force = force; attack.hitMask = CommonMasks.bullet; attack.minSpread = minSpread; attack.maxSpread = maxSpread; attack.isCrit = ((BaseState)this).RollCrit(); attack.owner = ((EntityState)this).gameObject; attack.smartCollision = false; attack.procChainMask = default(ProcChainMask); attack.procCoefficient = 1.5f; attack.radius = 0.75f; attack.sniper = true; attack.stopperMask = CommonMasks.bullet; attack.weapon = null; attack.tracerEffectPrefab = null; attack.spreadPitchScale = 0.25f; attack.spreadYawScale = 0.25f; attack.queryTriggerInteraction = (QueryTriggerInteraction)0; attack.hitEffectPrefab = TanksMod.Modules.Assets.cannonImpactExplosion; attack.damageType.damageSource = (DamageSource)2; attack.Fire(); Color val2 = (Color.yellow + Color.red) / 2f; laserLine = Object.Instantiate<GameObject>(laserPrefab, ((EntityState)this).transform.position, ((EntityState)this).transform.rotation).GetComponent<LineRenderer>(); laserLine.startColor = val2; laserLine.endColor = val2; LineRenderer_ShrinkOverTime lineRenderer_ShrinkOverTime = ((Component)laserLine).gameObject.AddComponent<LineRenderer_ShrinkOverTime>(); lineRenderer_ShrinkOverTime.rate = 2f; lineRenderer_ShrinkOverTime.SetScale(0.5f); Vector3 position = ((BaseState)this).FindModelChild("CannonMuzzle0").position; Vector3 point = ((Ray)(ref val)).GetPoint(1000f); RaycastHit val3 = default(RaycastHit); if (Physics.Raycast(position, ((Ray)(ref val)).direction, ref val3) && (Object)(object)((RaycastHit)(ref val3)).transform != (Object)(object)((EntityState)this).transform) { point = ((RaycastHit)(ref val3)).point; } laserLine.SetPosition(0, position); laserLine.SetPosition(1, point); CharacterMotor characterMotor = ((EntityState)this).characterMotor; characterMotor.velocity -= ((Ray)(ref val)).direction * 3f; base.controller.visual.AddForceToWeight(-GetMainGunDirection(val) * 7f); } } } namespace TanksMod._DEPENDENCIES.StandaloneAncientScepter.SkillStates.Projectile.GAProjectile { internal class DetonateNearTarget : BaseState { private ProjectileSphereTargetFinder targetFinder; private ProjectileTargetComponent projectileTargetComponent; public override void OnEnter() { ((BaseState)this).OnEnter(); projectileTargetComponent = ((EntityState)this).GetComponent<ProjectileTargetComponent>(); targetFinder = ((EntityState)this).GetComponent<ProjectileSphereTargetFinder>(); if (NetworkServer.active) { ((Behaviour)targetFinder).enabled = true; } } public override void FixedUpdate() { ((EntityState)this).FixedUpdate(); if (NetworkServer.active && Object.op_Implicit((Object)(object)targetFinder) && Object.op_Implicit((Object)(object)projectileTargetComponent.target)) { Explode(); } } private void Explode() { //IL_0008: Unknown result type (might be due to invalid IL or missing references) //IL_000d: Unknown result type (might be due to invalid IL or missing references) //IL_0014: Unknown result type (might be due to invalid IL or missing references) //IL_0019: Unknown result type (might be due to invalid IL or missing references) //IL_001e: Unknown result type (might be due to invalid IL or missing references) //IL_002f: Unknown result type (might be due to invalid IL or missing references) //IL_0040: Unknown result type (might be due to invalid IL or missing references) //IL_004c: Unknown result type (might be due to invalid IL or missing references) //IL_0058: Unknown result type (might be due to invalid IL or missing references) //IL_005d: Unknown result type (might be due to invalid IL or missing references) //IL_0062: Unknown result type (might be due to invalid IL or missing references) //IL_0074: Unknown result type (might be due to invalid IL or missing references) //IL_0080: Unknown result type (might be due to invalid IL or missing references) //IL_0082: Unknown result type (might be due to invalid IL or missing references) //IL_0087: Unknown result type (might be due to invalid IL or missing references) //IL_0093: Unknown result type (might be due to invalid IL or missing references) //IL_009e: Unknown result type (might be due to invalid IL or missing references) //IL_00a5: Unknown result type (might be due to invalid IL or missing references) //IL_00aa: Unknown result type (might be due to invalid IL or missing references) //IL_00af: Unknown result type (might be due to invalid IL or missing references) //IL_00b1: Unknown result type (might be due to invalid IL or missing references) //IL_00b6: Unknown result type (might be due to invalid IL or missing references) //IL_00bb: Unknown result type (might be due to invalid IL or missing references) //IL_00c6: Unknown result type (might be due to invalid IL or missing references) //IL_00cb: Unknown result type (might be due to invalid IL or missing references) //IL_00d2: Unknown result type (might be due to invalid IL or missing references) //IL_00dd: Unknown result type (might be due to invalid IL or missing references) //IL_00e4: Unknown result type (might be due to invalid IL or missing references) //IL_00e9: Unknown result type (might be due to invalid IL or missing references) //IL_00ee: Unknown result type (might be due to invalid IL or missing references) //IL_00ff: Expected O, but got Unknown ProjectileDamage component = ((EntityState)this).GetComponent<ProjectileDamage>(); new BlastAttack { procChainMask = ((EntityState)this).projectileController.procChainMask, procCoefficient = ((EntityState)this).projectileController.procCoefficient, attacker = ((EntityState)this).projectileController.owner, inflictor = ((EntityState)this).gameObject, teamIndex = ((EntityState)this).projectileController.teamFilter.teamIndex, baseDamage = component.damage * 2.5f, baseForce = component.force, falloffModel = (FalloffModel)0, crit = component.crit, radius = 5.5f, position = ((EntityState)this).transform.position, damageColorIndex = component.damageColorIndex }.Fire(); EffectManager.SpawnEffect(TanksMod.Modules.Assets.aaCannonNearTargetExplodeEffect, new EffectData { origin = ((EntityState)this).transform.position, rotation = ((EntityState)this).transform.rotation, scale = 5.5f }, true); Util.PlaySound("Play_AACannonNearTargetExplodeSound", ((EntityState)this).gameObject); EntityState.Destroy((Object)(object)((EntityState)this).gameObject); } public override void OnExit() { ((EntityState)this).OnExit(); if (Object.op_Implicit((Object)(object)targetFinder)) { ((Behaviour)targetFinder).enabled = false; } } } } namespace TanksMod._DEPENDENCIES.StandaloneAncientScepter.SkillStates.ObliteratorCannon { internal class Upgraded_ChargeObliteratorCannon : ChargeObliteratorCannon { public override void OnEnter() { shootCannonState = (EntityState)(object)new Upgraded_ShootObliteratorCannon(); base.OnEnter(); } } internal class Upgraded_ShootObliteratorCannon : ShootObliteratorCannon { public override GameObject projectilePrefab => TanksMod._DEPENDENCIES.StandaloneAncientScepter.Modules.Projectiles.oueCannonProjectilePrefab; public override float damageCoefficient => 240f; } } namespace TanksMod._DEPENDENCIES.StandaloneAncientScepter.SkillStates.Minigun { internal class Upgraded_Minigun_Fire : Minigun_Fire { public new uint loop; public GameObject laserPrefab = TanksMod.Modules.Assets.laserEffect; public LineRenderer laserLine; public LineRenderer_ShrinkOverTime shrink; private BulletAttack attack; public override void OnEnter() { //IL_0065: Unknown result type (might be due to invalid IL or missing references) //IL_0070: Unknown result type (might be due to invalid IL or missing references) fireDamageCoeficient = 0.55f; minSpread = 0f; maxSpread = 5f; spreadBloom = 0.5f; playNormalMinigunSound = false; loop = AkSoundEngine.PostEvent("Play_Scepter_Minigun", ((EntityState)this).gameObject); fireFireByForce = true; base.OnEnter(); laserLine = Object.Instantiate<GameObject>(laserPrefab, ((EntityState)this).transform.position, ((EntityState)this).transform.rotation).GetComponent<LineRenderer>(); ((Component)laserLine).transform.parent = ((Component)((BaseState)this).FindModelChild("CannonMuzzle0")).transform; laserLine.startWidth = 0f; laserLine.endWidth = 0f; shrink = ((Component)laserLine).gameObject.AddComponent<LineRenderer_ShrinkOverTime>(); shrink.destroyTime = -1f; shrink.rate = 5f; } public override void FixedUpdate() { //IL_0045: Unknown result type (might be due to invalid IL or missing references) //IL_01dd: Unknown result type (might be due to invalid IL or missing references) //IL_01ea: Unknown result type (might be due to invalid IL or missing references) base.controller.minigun_barrelSpinSpeed = 20f; if (!base.controller.minigun_Overheated && playNormalMinigunSound) { AkSoundEngine.SetRTPCValueByPlayingID("MinigunLoopPitch", 10f * ((BaseState)this).attackSpeedStat, loop); } if (!base.controller.minigun_Overheated) { fireTime -= Time.deltaTime * ((BaseState)this).attackSpeedStat; if (fireTime <= 0f) { base.controller.minigun_BeginCooldown = false; base.controller.minigunHeatLevel += Time.deltaTime * 0.35f / (1f + (float)((EntityState)this).characterBody.inventory.GetItemCount(Items.SecondarySkillMagazine) * 0.33f); if (base.controller.minigunHeatLevel < 0.75f) { Fire(fireDamageCoeficient); } if (base.controller.minigunHeatLevel >= 0.75f) { FireDouble(fireDamageCoeficient); } shrink.SetScale(0.1f); fireTime = 0.03f; } if (!((EntityState)this).inputBank.skill2.down && ((EntityState)this).isAuthority) { Minigun_WhineDown nextState = new Minigun_WhineDown(); base.controller.minigun_barrelSpinSpeed = 20f; ((EntityState)this).outer.SetNextState((EntityState)(object)nextState); } } else { Minigun_WhineDown nextState2 = new Minigun_WhineDown(); base.controller.minigun_barrelSpinSpeed = 20f; ((EntityState)this).outer.SetNextState((EntityState)(object)nextState2); } Color val = default(Color); ((Color)(ref val))..ctor(1f, 0f, 0.4f); laserLine.startColor = val; laserLine.endColor = val; UpdateLaser(); } private void UpdateLaser() { //IL_0015: Unknown result type (might be due to invalid IL or missing references) //IL_001a: Unknown result type (might be due to invalid IL or missing references) //IL_002b: Unknown result type (might be due to invalid IL or missing references) //IL_0030: Unknown result type (might be due to invalid IL or missing references) //IL_0033: Unknown result type (might be due to invalid IL or missing references) //IL_0039: Unknown result type (might be due to invalid IL or missing references) //IL_003a: Unknown result type (might be due to invalid IL or missing references) //IL_003f: Unknown result type (might be due to invalid IL or missing references) //IL_0043: Unknown result type (might be due to invalid IL or missing references) //IL_004d: Unknown result type (might be due to invalid IL or missing references) //IL_0052: Unknown result type (might be due to invalid IL or missing references) //IL_0057: Unknown result type (might be due to invalid IL or missing references) //IL_0058: Unknown result type (might be due to invalid IL or missing references) //IL_005a: Unknown result type (might be due to invalid IL or missing references) //IL_005b: Unknown result type (might be due to invalid IL or missing references) //IL_0096: Unknown result type (might be due to invalid IL or missing references) //IL_00a4: Unknown result type (might be due to invalid IL or missing references) //IL_0088: Unknown result type (might be due to invalid IL or missing references) //IL_008d: Unknown result type (might be due to invalid IL or missing references) if (Object.op_Implicit((Object)(object)laserLine)) { Ray aimRay = ((BaseState)this).GetAimRay(); Vector3 position = ((Component)((BaseState)this).FindModelChild("CannonMuzzle0")).transform.position; Vector3 origin = ((Ray)(ref aimRay)).origin; Vector3 mainGunDirection = GetMainGunDirection(aimRay); Vector3 val = origin + ((Vector3)(ref mainGunDirection)).normalized * 1000f; RaycastHit val2 = default(RaycastHit); if (Physics.Raycast(position, GetMainGunDirection(aimRay), ref val2) && (Object)(object)((RaycastHit)(ref val2)).transform != (Object)(object)((EntityState)this).transform) { val = ((RaycastHit)(ref val2)).point; } laserLine.SetPosition(0, position); laserLine.SetPosition(1, val); } } public void Fire(float damageCoefficient) { //IL_002c: Unknown result type (might be due to invalid IL or missing references) //IL_0031: Unknown result type (might be due to invalid IL or missing references) //IL_0066: Unknown result type (might be due to invalid IL or missing references) //IL_0070: Expected O, but got Unknown //IL_0083: Unknown result type (might be due to invalid IL or missing references) //IL_0084: Unknown result type (might be due to invalid IL or missing references) //IL_0097: Unknown result type (might be due to invalid IL or missing references) //IL_009c: Unknown result type (might be due to invalid IL or missing references) //IL_00c0: Unknown result type (might be due to invalid IL or missing references) //IL_00d0: Unknown result type (might be due to invalid IL or missing references) //IL_00d5: Unknown result type (might be due to invalid IL or missing references) //IL_00e1: Unknown result type (might be due to invalid IL or missing references) //IL_010d: Unknown result type (might be due to invalid IL or missing references) //IL_0112: Unknown result type (might be due to invalid IL or missing references) //IL_0183: Unknown result type (might be due to invalid IL or missing references) //IL_01bb: Unknown result type (might be due to invalid IL or missing references) //IL_01c0: Unknown result type (might be due to invalid IL or missing references) //IL_0204: Unknown result type (might be due to invalid IL or missing references) //IL_0225: Unknown result type (might be due to invalid IL or missing references) //IL_023d: Unknown result type (might be due to invalid IL or missing references) //IL_0244: Unknown result type (might be due to invalid IL or missing references) //IL_024e: Unknown result type (might be due to invalid IL or missing references) //IL_0253: Unknown result type (might be due to invalid IL or missing references) //IL_0258: Unknown result type (might be due to invalid IL or missing references) ((EntityState)this).characterBody.AddSpreadBloom(spreadBloom); EffectManager.SimpleMuzzleFlash(FirePistol2.muzzleEffectPrefab, ((EntityState)this).gameObject, muzzleString, true); Ray aimRay = ((BaseState)this).GetAimRay(); ((BaseState)this).AddRecoil(-1f * Minigun_Fire.recoil, -2f * Minigun_Fire.recoil, -0.5f * Minigun_Fire.recoil, 0.5f * Minigun_Fire.recoil); attack = new BulletAttack(); attack.bulletCount = 1u; attack.aimVector = GetMainGunDirection(aimRay); attack.origin = ((Ray)(ref aimRay)).origin; attack.damage = damageCoefficient * ((EntityState)this).characterBody.damage; attack.damageColorIndex = (DamageColorIndex)0; attack.damageType = DamageTypeCombo.op_Implicit((DamageType)128); attack.falloffModel = (FalloffModel)1; attack.maxDistance = Minigun_Fire.range; attack.force = Minigun_Fire.force; attack.hitMask = CommonMasks.bullet; attack.minSpread = minSpread; attack.maxSpread = maxSpread; attack.isCrit = ((BaseState)this).RollCrit(); attack.owner = ((EntityState)this).gameObject; attack.muzzleName = muzzleString; attack.smartCollision = false; attack.procChainMask = default(ProcChainMask); attack.procCoefficient = Minigun_Fire.procCoefficient; attack.radius = 0.75f; attack.sniper = false; attack.stopperMask = CommonMasks.bullet; attack.weapon = null; attack.tracerEffectPrefab = null; attack.spreadPitchScale = 0.25f; attack.spreadYawScale = 0.25f; attack.queryTriggerInteraction = (QueryTriggerInteraction)0; attack.hitEffectPrefab = MinigunFire.bulletHitEffectPrefab; attack.damageType.damageSource = (DamageSource)2; attack.Fire(); CharacterMotor characterMotor = ((EntityState)this).characterMotor; characterMotor.velocity -= ((Ray)(ref aimRay)).direction * 0.5f; } public void FireDouble(float damageCoefficient) { //IL_002c: Unknown result type (might be due to invalid IL or missing references) //IL_0031: Unknown result type (might be due to invalid IL or missing references) //IL_0066: Unknown result type (might be due to invalid IL or missing references) //IL_0070: Expected O, but got Unknown //IL_0084: Unknown result type (might be due to invalid IL or missing references) //IL_0097: Unknown result type (might be due to invalid IL or missing references) //IL_009c: Unknown result type (might be due to invalid IL or missing references) //IL_00c6: Unknown result type (might be due to invalid IL or missing references) //IL_00d6: Unknown result type (might be due to invalid IL or missing references) //IL_00db: Unknown result type (might be due to invalid IL or missing references) //IL_00e7: Unknown result type (might be due to invalid IL or missing references) //IL_0113: Unknown result type (might be due to invalid IL or missing references) //IL_0118: Unknown result type (might be due to invalid IL or missing references) //IL_0189: Unknown result type (might be due to invalid IL or missing references) //IL_01c1: Unknown result type (might be due to invalid IL or missing references) //IL_01c6: Unknown result type (might be due to invalid IL or missing references) //IL_020a: Unknown result type (might be due to invalid IL or missing references) //IL_022b: Unknown result type (might be due to invalid IL or missing references) //IL_0243: Unknown result type (might be due to invalid IL or missing references) //IL_024a: Unknown result type (might be due to invalid IL or missing references) //IL_0254: Unknown result type (might be due to invalid IL or missing references) //IL_0259: Unknown result type (might be due to invalid IL or missing references) //IL_025e: Unknown result type (might be due to invalid IL or missing references) ((EntityState)this).characterBody.AddSpreadBloom(spreadBloom); EffectManager.SimpleMuzzleFlash(FirePistol2.muzzleEffectPrefab, ((EntityState)this).gameObject, muzzleString, true); Ray aimRay = ((BaseState)this).GetAimRay(); ((BaseState)this).AddRecoil(-1f * Minigun_Fire.recoil, -2f * Minigun_Fire.recoil, -0.5f * Minigun_Fire.recoil, 0.5f * Minigun_Fire.recoil); attack = new BulletAttack(); attack.bulletCount = 1u; attack.aimVector = ((Ray)(ref aimRay)).direction; attack.origin = ((Ray)(ref aimRay)).origin; attack.damage = damageCoefficient * 2f * ((EntityState)this).characterBody.damage; attack.damageColorIndex = (DamageColorIndex)0; attack.damageType = DamageTypeCombo.op_Implicit((DamageType)128); attack.falloffModel = (FalloffModel)1; attack.maxDistance = Minigun_Fire.range; attack.force = Minigun_Fire.force; attack.hitMask = CommonMasks.bullet; attack.minSpread = minSpread; attack.maxSpread = maxSpread; attack.isCrit = ((BaseState)this).RollCrit(); attack.owner = ((EntityState)this).gameObject; attack.muzzleName = muzzleString; attack.smartCollision = false; attack.procChainMask = default(ProcChainMask); attack.procCoefficient = Minigun_Fire.procCoefficient; attack.radius = 0.75f; attack.sniper = false; attack.stopperMask = CommonMasks.bullet; attack.weapon = null; attack.tracerEffectPrefab = null; attack.spreadPitchScale = 0.25f; attack.spreadYawScale = 0.25f; attack.queryTriggerInteraction = (QueryTriggerInteraction)0; attack.hitEffectPrefab = MinigunFire.bulletHitEffectPrefab; attack.damageType.damageSource = (DamageSource)2; attack.Fire(); CharacterMotor characterMotor = ((EntityState)this).characterMotor; characterMotor.velocity -= ((Ray)(ref aimRay)).direction * 0.5f; } public override void OnExit() { base.OnExit(); AkSoundEngine.StopPlayingID(loop); if (Object.op_Implicit((Object)(object)laserLine)) { EntityState.Destroy((Object)(object)((Component)laserLine).gameObject); } } } internal class Upgraded_Minigun_WhineDown : Minigun_WhineDown { } internal class Upgraded_Minigun_WhineUp : Minigun_WhineUp { public override void OnEnter() { whineDown = (EntityState)(object)new Upgraded_Minigun_WhineDown(); fire = (EntityState)(object)new Upgraded_Minigun_Fire(); base.OnEnter(); } } } namespace TanksMod._DEPENDENCIES.StandaloneAncientScepter.SkillStates.HowitzerCannon { internal class Upgraded_ChargeHowitzerCannon : ChargeHowitzerCannon { public override void OnEnter() { maxChargeTime = 1f; shootCannonState = (EntityState)(object)new Upgraded_ShootHowitzerCannon(); failedChargePenaltyDeduction = 12f; base.OnEnter(); } } internal class Upgraded_ShootHowitzerCannon : ShootHowitzerCannon { public override GameObject projectilePrefab => TanksMod._DEPENDENCIES.StandaloneAncientScepter.Modules.Projectiles.fatmansCannonProjectilePrefab; public override float damageCoefficient => 91f; public override float bodyKnockbackForce => 4000f; public override void OnEnter() { base.OnEnter(); groundKnockbackForce = 30f; airKnockbackForce = 50f; } } } namespace TanksMod._DEPENDENCIES.StandaloneAncientScepter.Modules { internal static class Assets { internal static GameObject scepter_Small_ImpactExplosionEffect; internal static GameObject scepter_Medium_ImpactExplosionEffect; internal static GameObject scepter_Big_ImpactExplosionEffect; internal static GameObject scepter_Huge_ImpactExplosionEffect; internal static void PopulateAssets() { if ((Object)(object)TanksMod.Modules.Assets.mainAssetBundle == (Object)null) { Log.Error("Unable to load AssetBundle for StandaloneAncientScepter."); return; } scepter_Small_ImpactExplosionEffect = TanksMod.Modules.Assets.LoadEffect("Scepter_Small_ExplosionEffect", "Play_CannonImpactExplosion"); scepter_Medium_ImpactExplosionEffect = TanksMod.Modules.Assets.LoadEffect("Scepter_Medium_ExplosionEffect", "Play_CannonImpactExplosion"); scepter_Big_ImpactExplosionEffect = TanksMod.Modules.Assets.LoadEffect("Scepter_Big_ExplosionEffect", "Play_CannonImpactExplosion"); scepter_Huge_ImpactExplosionEffect = TanksMod.Modules.Assets.LoadEffect("Scepter_Huge_ExplosionEffect", "Play_CannonImpactExplosion"); } } internal static class Projectiles { internal static GameObject doctorsCannonProjectilePrefab; internal static GameObject fatmansCannonProjectilePrefab; internal static GameObject boxersCannonProjectilePrefab; internal static GameObject fracturedCannonProjectilePrefab; internal static GameObject gaCannonProjectilePrefab; internal static GameObject rainCannonProjectilePrefab; internal static GameObject oueCannonProjectilePrefab; internal static void RegisterProjectiles() { CreateDoctorsCannonProjectile(); TanksMod.Modules.Projectiles.AddProjectile(doctorsCannonProjectilePrefab); CreateFatmansCannonProjectile(); TanksMod.Modules.Projectiles.AddProjectile(fatmansCannonProjectilePrefab); CreateBoxersCannonProjectile(); TanksMod.Modules.Projectiles.AddProjectile(boxersCannonProjectilePrefab); CreateFracturedCannonProjectile(); TanksMod.Modules.Projectiles.AddProjectile(fracturedCannonProjectilePrefab); CreateGACannonProjectile(); TanksMod.Modules.Projectiles.AddProjectile(gaCannonProjectilePrefab); CreateRainCannonProjectile(); TanksMod.Modules.Projectiles.AddProjectile(rainCannonProjectilePrefab); CreaetOUECannonProjectile(); TanksMod.Modules.Projectiles.AddProjectile(oueCannonProjectilePrefab); } private static void CreateDoctorsCannonProjectile() { //IL_0059: Unknown result type (might be due to invalid IL or missing references) //IL_005e: Unknown result type (might be due to invalid IL or missing references) doctorsCannonProjectilePrefab = TanksMod.Modules.Projectiles.CloneProjectilePrefab("ToolbotGrenadeLauncherProjectile", "BasicTankScepterCannonProjectile"); ProjectileImpactExplosion component = doctorsCannonProjectilePrefab.GetComponent<ProjectileImpactExplosion>(); ((ProjectileExplosion)component).blastRadius = 12f; GameObject scepter_Medium_ImpactExplosionEffect = Assets.scepter_Medium_ImpactExplosionEffect; component.impactEffect = scepter_Medium_ImpactExplosionEffect; ((Component)component).GetComponent<Rigidbody>().interpolation = (RigidbodyInterpolation)2; ((Component)component).GetComponent<Rigidbody>().collisionDetectionMode = (CollisionDetectionMode)2; ((Component)component).GetComponent<ProjectileDamage>().damageType = DamageTypeCombo.op_Implicit((DamageType)0); ((Component)component).GetComponent<ProjectileDamage>().crit = true; ((Component)component).GetComponent<ProjectileSimple>().desiredForwardSpeed = 150f; ((Component)component).GetComponent<ProjectileSimple>().lifetime = 9999999f; ((Component)component).GetComponent<SphereCollider>().radius = 0.5f; ProjectileController component2 = ((Component)component).GetComponent<ProjectileController>(); component2.ghostPrefab = TanksMod.Modules.Projectiles.CreateGhostPrefab("CWH_Scepter_CannonBullet", convertMaterials: false); CannonProjectileController cannonProjectileController = ((Component)component).gameObject.AddComponent<CannonProjectileController>(); cannonProjectileController.downforceMultiplier = 0.25f; } private static void CreateFatmansCannonProjectile() { //IL_006a: Unknown result type (might be due to invalid IL or missing references) //IL_006f: Unknown result type (might be due to invalid IL or missing references) fatmansCannonProjectilePrefab = TanksMod.Modules.Projectiles.CloneProjectilePrefab("ToolbotGrenadeLauncherProjectile", "BasicTankScepterHowitzerCannonProjectile"); ProjectileImpactExplosion component = fatmansCannonProjectilePrefab.GetComponent<ProjectileImpactExplosion>(); ((ProjectileExplosion)component).blastRadius = 20f; GameObject scepter_Huge_ImpactExplosionEffect = Assets.scepter_Huge_ImpactExplosionEffect; component.impactEffect = scepter_Huge_ImpactExplosionEffect; ((Component)component).GetComponent<ProjectileController>().procCoefficient = 3f; ((Component)component).GetComponent<Rigidbody>().interpolation = (RigidbodyInterpolation)2; ((Component)component).GetComponent<Rigidbody>().collisionDetectionMode = (CollisionDetectionMode)2; ((Component)component).GetComponent<ProjectileDamage>().damageType = DamageTypeCombo.op_Implicit((DamageType)40); ((Component)component).GetComponent<ProjectileSimple>().desiredForwardSpeed = 90f; ((Component)component).GetComponent<ProjectileSimple>().lifetime = 9999999f; ((Component)component).GetComponent<SphereCollider>().radius = 0.75f; ProjectileController component2 = ((Component)component).GetComponent<ProjectileController>(); component2.ghostPrefab = TanksMod.Modules.Projectiles.CreateGhostPrefab("CWH_Scepter_HowitzerBullet", convertMaterials: false); CannonProjectileController cannonProjectileController = ((Component)component).gameObject.AddComponent<CannonProjectileController>(); cannonProjectileController.downforceMultiplier = 0.25f; } private static void CreateBoxersCannonProjectile() { //IL_0067: Unknown result type (might be due to invalid IL or missing references) //IL_006c: Unknown result type (might be due to invalid IL or missing references) //IL_0081: Unknown result type (might be due to invalid IL or missing references) //IL_0086: Unknown result type (might be due to invalid IL or missing references) boxersCannonProjectilePrefab = TanksMod.Modules.Projectiles.CloneProjectilePrefab("ToolbotGrenadeLauncherProjectile", "BasicTankScepterCromwellCannonProjectile"); ProjectileImpactExplosion component = boxersCannonProjectilePrefab.GetComponent<ProjectileImpactExplosion>(); ((ProjectileExplosion)component).blastRadius = 7f; component.impactEffect = Assets.scepter_Small_ImpactExplosionEffect; ((Component)component).GetComponent<ProjectileController>().procCoefficient = 0.001f; ((Component)component).GetComponent<Rigidbody>().interpolation = (RigidbodyInterpolation)2; ((Component)component).GetComponent<Rigidbody>().collisionDetectionMode = (CollisionDetectionMode)2; ((Component)component).GetComponent<ProjectileDamage>().damageType = DamageTypeCombo.op_Implicit((DamageType)0); ((ProjectileExplosion)component).bonusBlastForce = new Vector3(0f, 1000f, 0f); ((Component)component).GetComponent<ProjectileSimple>().desiredForwardSpeed = 175f; ((Component)component).GetComponent<ProjectileSimple>().lifetime = 9999999f; ((Component)component).GetComponent<SphereCollider>().radius = 0.3f; ((Component)component).gameObject.AddComponent<TravelDamageDwindle>(); ProjectileController component2 = ((Component)component).GetComponent<ProjectileController>(); component2.ghostPrefab = TanksMod.Modules.Projectiles.CreateGhostPrefab("CWH_Scepter_CromwellBullet", convertMaterials: false); CannonProjectileController cannonProjectileController = ((Component)component).gameObject.AddComponent<CannonProjectileController>(); cannonProjectileController.downforceMultiplier = 0.25f; } private static void CreateFracturedCannonProjectile() { fracturedCannonProjectilePrefab = TanksMod.Modules.Projectiles.CreateBaseProjectile(6f, Assets.scepter_Medium_ImpactExplosionEffect, "FracturedCannon", TanksMod.Modules.Projectiles.CreateGhostPrefab("CWH_Scepter_MausBullet", convertMaterials: false), 210f, 0.6f, 0.25f); } private static void CreaetOUECannonProjectile() { //IL_0041: Unknown result type (might be due to invalid IL or missing references) oueCannonProjectilePrefab = TanksMod.Modules.Projectiles.CreateBaseProjectile(35f, TanksMod.Modules.Assets.selfDestructEffect, "OUECannon", TanksMod.Modules.Projectiles.CreateGhostPrefab("CWH_Scepter_ObliteratorCannonBullet", convertMaterials: false), 250f, 0.6f, 0.25f); ForceTeamProjectile forceTeamProjectile = oueCannonProjectilePrefab.AddComponent<ForceTeamProjectile>(); forceTeamProjectile.newTeam = (TeamIndex)(-1); oueCannonProjectilePrefab.GetComponent<TeamFilter>().teamIndex = (TeamIndex)(-1); } private static void CreateGACannonProjectile() { //IL_004f: Unknown result type (might be due to invalid IL or missing references) //IL_0054: Unknown result type (might be due to invalid IL or missing references) //IL_0064: Unknown result type (might be due to invalid IL or missing references) //IL_0069: Unknown result type (might be due to invalid IL or missing references) gaCannonProjectilePrefab = TanksMod.Modules.Projectiles.CreateBaseProjectile(3f, Assets.scepter_Small_ImpactExplosionEffect, "GACannon", TanksMod.Modules.Projectiles.CreateGhostPrefab("CWH_Scepter_AACannonBullet", convertMaterials: false), 210f, 0.3f, 0.01f); EntityStateMachine val = gaCannonProjectilePrefab.gameObject.AddComponent<EntityStateMachine>(); val.initialStateType = new SerializableEntityStateType(typeof(TanksMod._DEPENDENCIES.StandaloneAncientScepter.SkillStates.Projectile.GAProjectile.DetonateNearTarget)); val.mainStateType = new SerializableEntityStateType(typeof(TanksMod._DEPENDENCIES.StandaloneAncientScepter.SkillStates.Projectile.GAProjectile.DetonateNearTarget)); ProjectileSphereTargetFinder val2 = gaCannonProjectilePrefab.gameObject.AddComponent<ProjectileSphereTargetFinder>(); val2.lookRange = 5.5f; val2.targetSearchInterval = 0f; val2.flierAltitudeTolerance = 5.5f; } private static void CreateRainCannonProjectile() { //IL_0068: Unknown result type (might be due to invalid IL or missing references) //IL_006d: Unknown result type (might be due to invalid IL or missing references) rainCannonProjectilePrefab = TanksMod.Modules.Projectiles.CloneProjectilePrefab("ToolbotGrenadeLauncherProjectile", "BasicTankRainCannonProjectile"); ProjectileImpactExplosion component = rainCannonProjectilePrefab.GetComponent<ProjectileImpactExplosion>(); ((ProjectileExplosion)component).blastRadius = 13f; component.impactEffect = Assets.scepter_Big_ImpactExplosionEffect; ((Component)component).GetComponent<Rigidbody>().useGravity = true; ((Component)component).GetComponent<Rigidbody>().interpolation = (RigidbodyInterpolation)2; ((Component)component).GetComponent<Rigidbody>().collisionDetectionMode = (CollisionDetectionMode)2; ((Component)component).GetComponent<ProjectileDamage>().damageType = DamageTypeCombo.op_Implicit((DamageType)131072); ((Component)component).GetComponent<ProjectileSimple>().desiredForwardSpeed = 80f; ((Component)component).GetComponent<ProjectileSimple>().lifetime = 9999999f; ((Component)component).GetComponent<SphereCollider>().radius = 0.4f; TravelDamageIncrease travelDamageIncrease = ((Component)component).gameObject.AddComponent<TravelDamageIncrease>(); travelDamageIncrease.minDamageCoefficient = 22f; travelDamageIncrease.maxDamageCoefficient = 55f; travelDamageIncrease.maxLifeTime = 1f; ProjectileController component2 = ((Component)component).GetComponent<ProjectileController>(); component2.ghostPrefab = TanksMod.Modules.Projectiles.CreateGhostPrefab("CWH_Scepter_Tank02Bullet", convertMaterials: false); } } internal class Skills { private static string prefix = "CHEESEWITHHOLES"; public static void RegisterSkills() { //IL_0062: Unknown result type (might be due to invalid IL or missing references) //IL_0067: Unknown result type (might be due to invalid IL or missing references) //IL_00af: Unknown result type (might be due to invalid IL or missing references) //IL_0155: Unknown result type (might be due to invalid IL or missing references) //IL_015a: Unknown result type (might be due to invalid IL or missing references) //IL_01a2: Unknown result type (might be due to invalid IL or missing references) //IL_0248: Unknown result type (might be due to invalid IL or missing references) //IL_024d: Unknown result type (might be due to invalid IL or missing references) //IL_0289: Unknown result type (might be due to invalid IL or missing references) //IL_032f: Unknown result type (might be due to invalid IL or missing references) //IL_0334: Unknown result type (might be due to invalid IL or missing references) //IL_037c: Unknown result type (might be due to invalid IL or missing references) //IL_0422: Unknown result type (might be due to invalid IL or missing references) //IL_0427: Unknown result type (might be due to invalid IL or missing references) //IL_046f: Unknown result type (might be due to invalid IL or missing references) //IL_0516: Unknown result type (might be due to invalid IL or missing references) //IL_051b: Unknown result type (might be due to invalid IL or missing references) //IL_0563: Unknown result type (might be due to invalid IL or missing references) //IL_060a: Unknown result type (might be due to invalid IL or missing references) //IL_060f: Unknown result type (might be due to invalid IL or missing references) //IL_0657: Unknown result type (might be due to invalid IL or missing references) //IL_06fe: Unknown result type (might be due to invalid IL or missing references) //IL_0703: Unknown result type (might be due to invalid IL or missing references) //IL_074b: Unknown result type (might be due to invalid IL or missing references) //IL_07f2: Unknown result type (might be due to invalid IL or missing references) //IL_07f7: Unknown result type (might be due to invalid IL or missing references) //IL_083f: Unknown result type (might be due to invalid IL or missing references) //IL_08e6: Unknown result type (might be due to invalid IL or missing references) //IL_08eb: Unknown result type (might be due to invalid IL or missing references) //IL_0933: Unknown result type (might be due to invalid IL or missing references) SkillDefInfo skillDefInfo = new SkillDefInfo(); skillDefInfo.skillName = "Doctor's Cannon"; skillDefInfo.skillNameToken = prefix + "_BASICTANK_BODY_SECONDARY_SCEPTER_CANNON_NAME"; skillDefInfo.skillDescriptionToken = prefix + "_BASICTANK_BODY_SECONDARY_SCEPTER_CANNON_DESCRIPTION"; skillDefInfo.skillIcon = TanksMod.Modules.Assets.mainAssetBundle.LoadAsset<Sprite>("CritCannonScepter"); skillDefInfo.activationState = new SerializableEntityStateType(typeof(Upgraded_CritCannon)); skillDefInfo.activationStateMachineName = "Weapon2"; skillDefInfo.baseMaxStock = 1; skillDefInfo.baseRechargeInterval = 7f; skillDefInfo.beginSkillCooldownOnSkillEnd = true; skillDefInfo.canceledFromSprinting = false; skillDefInfo.forceSprintDuringState = false; skillDefInfo.fullRestockOnAssign = true; skillDefInfo.interruptPriority = (InterruptPriority)2; skillDefInfo.resetCooldownTimerOnUse = false; skillDefInfo.isCombatSkill = true; skillDefInfo.mustKeyPress = true; skillDefInfo.cancelSprintingOnActivation = false; skillDefInfo.rechargeStock = 1; skillDefInfo.requiredStock = 1; skillDefInfo.stockToConsume = 1; SkillDef val = TanksMod.Modules.Skills.CreateSkillDef(skillDefInfo); skillDefInfo = new SkillDefInfo(); skillDefInfo.skillName = "Fatman's Cannon"; skillDefInfo.skillNameToken = prefix + "_BASICTANK_BODY_SECONDARY_SCEPTER_HOWITZER_CANNON_NAME"; skillDefInfo.skillDescriptionToken = prefix + "_BASICTANK_BODY_SECONDARY_SCEPTER_HOWITZER_CANNON_DESCRIPTION"; skillDefInfo.skillIcon = TanksMod.Modules.Assets.mainAssetBundle.LoadAsset<Sprite>("HowitzerCannonScepter"); skillDefInfo.activationState = new SerializableEntityStateType(typeof(Upgraded_ChargeHowitzerCannon)); skillDefInfo.activationStateMachineName = "Weapon2"; skillDefInfo.baseMaxStock = 1; skillDefInfo.baseRechargeInterval = 16f; skillDefInfo.beginSkillCooldownOnSkillEnd = true; skillDefInfo.canceledFromSprinting = false; skillDefInfo.forceSprintDuringState = false; skillDefInfo.fullRestockOnAssign = true; skillDefInfo.interruptPriority = (InterruptPriority)2; skillDefInfo.resetCooldownTimerOnUse = false; skillDefInfo.isCombatSkill = true; skillDefInfo.mustKeyPress = true; skillDefInfo.cancelSprintingOnActivation = false; skillDefInfo.rechargeStock = 1; skillDefInfo.requiredStock = 1; skillDefInfo.stockToConsume = 1; SkillDef val2 = TanksMod.Modules.Skills.CreateSkillDef(skillDefInfo); skillDefInfo = new SkillDefInfo(); skillDefInfo.skillName = "Laser Minigun"; skillDefInfo.skillNameToken = prefix + "_BASICTANK_BODY_SECONDARY_SCEPTER_MINIGUN_NAME"; skillDefInfo.skillDescriptionToken = prefix + "_BASICTANK_BODY_SECONDARY_SCEPTER_MINIGUN_DESCRIPTION"; skillDefInfo.skillIcon = TanksMod.Modules.Assets.mainAssetBundle.LoadAsset<Sprite>("MinigunScepter"); skillDefInfo.activationState = new SerializableEntityStateType(typeof(Upgraded_Minigun_WhineUp)); skillDefInfo.activationStateMachineName = "Weapon2"; skillDefInfo.baseMaxStock = 1; skillDefInfo.beginSkillCooldownOnSkillEnd = false; skillDefInfo.canceledFromSprinting = false; skillDefInfo.forceSprintDuringState = false; skillDefInfo.fullRestockOnAssign = true; skillDefInfo.interruptPriority = (InterruptPriority)2; skillDefInfo.resetCooldownTimerOnUse = false; skillDefInfo.isCombatSkill = true; skillDefInfo.mustKeyPress = true; skillDefInfo.cancelSprintingOnActivation = false; skillDefInfo.rechargeStock = 1; skillDefInfo.requiredStock = 1; skillDefInfo.stockToConsume = 1; SkillDef val3 = TanksMod.Modules.Skills.CreateSkillDef(skillDefInfo); skillDefInfo = new SkillDefInfo(); skillDefInfo.skillName = "Boxer's Cannon"; skillDefInfo.skillNameToken = prefix + "_BASICTANK_BODY_SECONDARY_SCEPTER_CROMWELL_CANNON_NAME"; skillDefInfo.skillDescriptionToken = prefix + "_BASICTANK_BODY_SECONDARY_SCEPTER_CROMWELL_CANNON_DESCRIPTION"; skillDefInfo.skillIcon = TanksMod.Modules.Assets.mainAssetBundle.LoadAsset<Sprite>("KnockerCannonScepter"); skillDefInfo.activationState = new SerializableEntityStateType(typeof(Upgraded_KnockerCannon)); skillDefInfo.activationStateMachineName = "Weapon2"; skillDefInfo.baseMaxStock = 1; skillDefInfo.baseRechargeInterval = 2f; skillDefInfo.beginSkillCooldownOnSkillEnd = true; skillDefInfo.canceledFromSprinting = false; skillDefInfo.forceSprintDuringState = false; skillDefInfo.fullRestockOnAssign = true; skillDefInfo.interruptPriority = (InterruptPriority)2; skillDefInfo.resetCooldownTimerOnUse = false; skillDefInfo.isCombatSkill = true; skillDefInfo.mustKeyPress = true; skillDefInfo.cancelSprintingOnActivation = false; skillDefInfo.rechargeStock = 1; skillDefInfo.requiredStock = 1; skillDefInfo.stockToConsume = 1; SkillDef val4 = TanksMod.Modules.Skills.CreateSkillDef(skillDefInfo); skillDefInfo = new SkillDefInfo(); skillDefInfo.skillName = "French Fries"; skillDefInfo.skillNameToken = prefix + "_BASICTANK_BODY_SECONDARY_SCEPTER_FRENCHGUN_NAME"; skillDefInfo.skillDescriptionToken = prefix + "_BASICTANK_BODY_SECONDARY_SCEPTER_FRENCHGUN_DESCRIPTION"; skillDefInfo.skillIcon = TanksMod.Modules.Assets.mainAssetBundle.LoadAsset<Sprite>("FrenchGunScepter"); skillDefInfo.activationState = new SerializableEntityStateType(typeof(Upgraded_FrenchGun)); skillDefInfo.activationStateMachineName = "Weapon2"; skillDefInfo.baseMaxStock = 1; skillDefInfo.baseRechargeInterval = 1f; skillDefInfo.beginSkillCooldownOnSkillEnd = true; skillDefInfo.canceledFromSprinting = false; skillDefInfo.forceSprintDuringState = false; skillDefInfo.fullRestockOnAssign = true; skillDefInfo.interruptPriority = (InterruptPriority)0; skillDefInfo.resetCooldownTimerOnUse = false; skillDefInfo.isCombatSkill = true; skillDefInfo.mustKeyPress = false; skillDefInfo.cancelSprintingOnActivation = false; skillDefInfo.rechargeStock = 1; skillDefInfo.requiredStock = 1; skillDefInfo.stockToConsume = 1; SkillDef val5 = TanksMod.Modules.Skills.CreateSkillDef(skillDefInfo); skillDefInfo = new SkillDefInfo(); skillDefInfo.skillName = "Billy's Cannon"; skillDefInfo.skillNameToken = prefix + "_BASICTANK_BODY_SECONDARY_SCEPTER_T62_CANNON_NAME"; skillDefInfo.skillDescriptionToken = prefix + "_BASICTANK_BODY_SECONDARY_SCEPTER_T62_CANNON_DESCRIPTION"; skillDefInfo.skillIcon = TanksMod.Modules.Assets.mainAssetBundle.LoadAsset<Sprite>("PiercingCannonScepter"); skillDefInfo.activationState = new SerializableEntityStateType(typeof(Upgraded_PiercingCannon)); skillDefInfo.activationStateMachineName = "Weapon2"; skillDefInfo.baseMaxStock = 1; skillDefInfo.baseRechargeInterval = 4f; skillDefInfo.beginSkillCooldownOnSkillEnd = true; skillDefInfo.canceledFromSprinting = false; skillDefInfo.forceSprintDuringState = false; skillDefInfo.fullRestockOnAssign = true; skillDefInfo.interruptPriority = (InterruptPriority)2; skillDefInfo.resetCooldownTimerOnUse = false; skillDefInfo.isCombatSkill = true; skillDefInfo.mustKeyPress = true; skillDefInfo.cancelSprintingOnActivation = false; skillDefInfo.rechargeStock = 1; skillDefInfo.requiredStock = 1; skillDefInfo.stockToConsume = 1; SkillDef val6 = TanksMod.Modules.Skills.CreateSkillDef(skillDefInfo); skillDefInfo = new SkillDefInfo(); skillDefInfo.skillName = "Fractured Cannon"; skillDefInfo.skillNameToken = prefix + "_BASICTANK_BODY_SECONDARY_SCEPTER_MAUS_NAME"; skillDefInfo.skillDescriptionToken = prefix + "_BASICTANK_BODY_SECONDARY_SCEPTER_MAUS_DESCRIPTION"; skillDefInfo.skillIcon = TanksMod.Modules.Assets.mainAssetBundle.LoadAsset<Sprite>("BasicCannonScepter"); skillDefInfo.activationState = new SerializableEntityStateType(typeof(Upgraded_BasicCannon)); skillDefInfo.activationStateMachineName = "Weapon2"; skillDefInfo.baseMaxStock = 1; skillDefInfo.baseRechargeInterval = 10f; skillDefInfo.beginSkillCooldownOnSkillEnd = true; skillDefInfo.canceledFromSprinting = false; skillDefInfo.forceSprintDuringState = false; skillDefInfo.fullRestockOnAssign = true; skillDefInfo.interruptPriority = (InterruptPriority)2; skillDefInfo.resetCooldownTimerOnUse = false; skillDefInfo.isCombatSkill = true; skillDefInfo.mustKeyPress = true; skillDefInfo.cancelSprintingOnActivation = false; skillDefInfo.rechargeStock = 1; skillDefInfo.requiredStock = 1; skillDefInfo.stockToConsume = 1; SkillDef val7 = TanksMod.Modules.Skills.CreateSkillDef(skillDefInfo); skillDefInfo = new SkillDefInfo(); skillDefInfo.skillName = "G/A Cannon"; skillDefInfo.skillNameToken = prefix + "_BASICTANK_BODY_SECONDARY_SCEPTER_AA_NAME"; skillDefInfo.skillDescriptionToken = prefix + "_BASICTANK_BODY_SECONDARY_SCEPTER_AA_DESCRIPTION"; skillDefInfo.skillIcon = TanksMod.Modules.Assets.mainAssetBundle.LoadAsset<Sprite>("AACannonScepter"); skillDefInfo.activationState = new SerializableEntityStateType(typeof(Upgraded_AACannon)); skillDefInfo.activationStateMachineName = "Weapon2"; skillDefInfo.baseMaxStock = 1; skillDefInfo.baseRechargeInterval = 0f; skillDefInfo.beginSkillCooldownOnSkillEnd = true; skillDefInfo.canceledFromSprinting = false; skillDefInfo.forceSprintDuringState = false; skillDefInfo.fullRestockOnAssign = true; skillDefInfo.interruptPriority = (InterruptPriority)0; skillDefInfo.resetCooldownTimerOnUse = true; skillDefInfo.isCombatSkill = true; skillDefInfo.mustKeyPress = false; skillDefInfo.cancelSprintingOnActivation = false; skillDefInfo.rechargeStock = 1; skillDefInfo.requiredStock = 1; skillDefInfo.stockToConsume = 1; SkillDef val8 = (SkillDef)(object)TanksMod.Modules.Skills.CreateSkillDef<SteppedSkillDef>(skillDefInfo); skillDefInfo = new SkillDefInfo(); skillDefInfo.skillName = "Cannon MK II"; skillDefInfo.skillNameToken = prefix + "_BASICTANK_BODY_SECONDARY_SCEPTER_CANNON_MKII_NAME"; skillDefInfo.skillDescriptionToken = prefix + "_BASICTANK_BODY_SECONDARY_SCEPTER_CANNON_MKII_DESCRIPTION"; skillDefInfo.skillIcon = TanksMod.Modules.Assets.mainAssetBundle.LoadAsset<Sprite>("ArtillaryCannonScepter"); skillDefInfo.activationState = new SerializableEntityStateType(typeof(Upgraded_ArtillaryCannon)); skillDefInfo.activationStateMachineName = "Weapon2"; skillDefInfo.baseMaxStock = 1; skillDefInfo.baseRechargeInterval = 12f; skillDefInfo.beginSkillCooldownOnSkillEnd = true; skillDefInfo.canceledFromSprinting = false; skillDefInfo.forceSprintDuringState = false; skillDefInfo.fullRestockOnAssign = true; skillDefInfo.interruptPriority = (InterruptPriority)2; skillDefInfo.resetCooldownTimerOnUse = false; skillDefInfo.isCombatSkill = true; skillDefInfo.mustKeyPress = true; skillDefInfo.cancelSprintingOnActivation = false; skillDefInfo.rechargeStock = 1; skillDefInfo.requiredStock = 1; skillDefInfo.stockToConsume = 1; SkillDef val9 = TanksMod.Modules.Skills.CreateSkillDef(skillDefInfo); skillDefInfo = new SkillDefInfo(); skillDefInfo.skillName = "Oppenheimer’s Unreleased Experimental"; skillDefInfo.skillNameToken = prefix + "_BASICTANK_BODY_SECONDARY_SCEPTER_OBLITERATOR_CANNON_NAME"; skillDefInfo.skillDescriptionToken = prefix + "_BASICTANK_BODY_SECONDARY_SCEPTER_OBLITERATOR_CANNON_DESCRIPTION"; skillDefInfo.skillIcon = TanksMod.Modules.Assets.mainAssetBundle.LoadAsset<Sprite>("ObliteratorCannonScepter"); skillDefInfo.activationState = new SerializableEntityStateType(typeof(Upgraded_ChargeObliteratorCannon)); skillDefInfo.activationStateMachineName = "Weapon2"; skillDefInfo.baseMaxStock = 1; skillDefInfo.baseRechargeInterval = 24f; skillDefInfo.beginSkillCooldownOnSkillEnd = true; skillDefInfo.canceledFromSprinting = false; skillDefInfo.forceSprintDuringState = false; skillDefInfo.fullRestockOnAssign = true; skillDefInfo.interruptPriority = (InterruptPriority)0; skillDefInfo.resetCooldownTimerOnUse = false; skillDefInfo.isCombatSkill = true; skillDefInfo.mustKeyPress = true; skillDefInfo.cancelSprintingOnActivation = false; skillDefInfo.rechargeStock = 1; skillDefInfo.requiredStock = 1; skillDefInfo.stockToConsume = 1; SkillDef val10 = TanksMod.Modules.Skills.CreateSkillDef(skillDefInfo); ItemBase<AncientScepterItem>.instance.RegisterScepterSkill(val, "BasicTankBody", (SkillSlot)1, 0); ItemBase<AncientScepterItem>.instance.RegisterScepterSkill(val2, "BasicTankBody", (SkillSlot)1, 1); ItemBase<AncientScepterItem>.instance.RegisterScepterSkill(val4, "BasicTankBody", (SkillSlot)1, 2); ItemBase<AncientScepterItem>.instance.RegisterScepterSkill(val6, "BasicTankBody", (SkillSlot)1, 3); ItemBase<AncientScepterItem>.instance.RegisterScepterSkill(val5, "BasicTankBody", (SkillSlot)1, 4); ItemBase<AncientScepterItem>.instance.RegisterScepterSkill(val3, "BasicTankBody", (SkillSlot)1, 5); ItemBase<AncientScepterItem>.instance.RegisterScepterSkill(val7, "BasicTankBody", (SkillSlot)1, 6); ItemBase<AncientScepterItem>.instance.RegisterScepterSkill(val8, "BasicTankBody", (SkillSlot)1, 7); ItemBase<AncientScepterItem>.instance.RegisterScepterSkill(val9, "BasicTankBody", (SkillSlot)1, 8); ItemBase<AncientScepterItem>.instance.RegisterScepterSkill(val10, "BasicTankBody", (SkillSlot)1, 10); } } public static class States { internal static void RegisterStates() { TanksMod.Modules.Content.AddEntityState(typeof(Upgraded_ChargeHowitzerCannon)); TanksMod.Modules.Content.AddEntityState(typeof(Upgraded_ShootHowitzerCannon)); TanksMod.Modules.Content.AddEntityState(typeof(Upgraded_Minigun_Fire)); TanksMod.Modules.Content.AddEntityState(typeof(Upgraded_Minigun_WhineDown)); TanksMod.Modules.Content.AddEntityState(typeof(Upgraded_Minigun_WhineUp)); TanksMod.Modules.Content.AddEntityState(typeof(Upgraded_CritCannon)); TanksMod.Modules.Content.AddEntityState(typeof(Upgraded_FrenchGun)); TanksMod.Modules.Content.AddEntityState(typeof(Upgraded_KnockerCannon)); TanksMod.Modules.Content.AddEntityState(typeof(Upgraded_PiercingCannon)); TanksMod.Modules.Content.AddEntityState(typeof(Upgraded_BasicCannon)); TanksMod.Modules.Content.AddEntityState(typeof(Upgraded_AACannon)); TanksMod.Modules.Content.AddEntityState(typeof(Upgraded_ArtillaryCannon)); TanksMod.Modules.Content.AddEntityState(typeof(Upgraded_ChargeObliteratorCannon)); TanksMod.Modules.Content.AddEntityState(typeof(Upgraded_ShootObliteratorCannon)); } } internal static class StaticValues { internal const float scepterCritCannon_Damage_Multiplier = 1.75f; internal const float scepterHowitzerCannon_Damage_Multiplier = 1.3f; internal const float scepterMinigun_Damage_Multiplier = 1f; internal const float scepterKnockCannon_Damage_Multiplier = 1.75f; internal const float scepterPiercingCannon_Damage_Multiplier = 1.5f; internal const float scepterBasicCannon_Damage_Multiplier = 1.5f; internal const float scepterAACannon_Damage_Multiplier = 1.35f; internal const float scepterObilteratorCannon_Damage_Coefficient = 240f; } internal static class Tokens { internal static void AddTokens() { string text = "CHEESEWITHHOLES_BASICTANK_BODY_"; LanguageAPI.Add(text + "SECONDARY_SCEPTER_CANNON_NAME", "Doctor's Cannon"); LanguageAPI.Add(text + "SECONDARY_SCEPTER_CANNON_DESCRIPTION", "Fire the main gun for <style=cIsDamage>" + 2100f.ToString("0") + "% damage</style> with <style=cIsDamage>unfaltering critical chance</style>. Critical chance increases damage of the cannon."); LanguageAPI.Add(text + "SECONDARY_SCEPTER_HOWITZER_CANNON_NAME", "Fatman's Cannon"); LanguageAPI.Add(text + "SECONDARY_SCEPTER_HOWITZER_CANNON_DESCRIPTION", string.Format("Charge, and fire the Howitzer for <style=cIsDamage>{0}% damage</style>. <style=cIsUtility>Stuns and slows enemies</style>. Has an {1}, and is risky to fire in-air.", 9100f, TanksMod.Modules.Tokens.ReallyBadKeyword("extra excessive knockback"))); LanguageAPI.Add(text + "SECONDARY_SCEPTER_CROMWELL_CANNON_NAME", "Boxer's Cannon"); LanguageAPI.Add(text + "SECONDARY_SCEPTER_CROMWELL_CANNON_DESCRIPTION", $"Fire the gun for <style=cIsDamage>{2975f}% damage</style>. <style=cIsDamage>Damage decreases as it travels</style>; <style=cIsDamage>Proc items instead increase damage</style>."); LanguageAPI.Add(text + "SECONDARY_SCEPTER_FRENCHGUN_NAME", "French Fries"); LanguageAPI.Add(text + "SECONDARY_SCEPTER_FRENCHGUN_DESCRIPTION", $"Now shoots <style=cIsDamage>5x{550f} damage</style>, with proc of 10."); LanguageAPI.Add(text + "SECONDARY_SCEPTER_MINIGUN_NAME", "Laser Minigun"); LanguageAPI.Add(text + "SECONDARY_SCEPTER_MINIGUN_DESCRIPTION", string.Format("Fire the minigun for <style=cIsDamage>{0}% damage</style>. Near overheat deals <style=cIsDamage>x2 base damage</style>. Complete overheat {1}. <style=cIsUtility>Attack speed only affects cooldown</style>; {2} increases time to overheat.", 50f, TanksMod.Modules.Tokens.BadKeyword("penalizes cooldown"), TanksMod.Modules.Tokens.GoodKeyword("Backup Magazines"))); LanguageAPI.Add(text + "SECONDARY_SCEPTER_T62_CANNON_NAME", "Billy's Cannon"); LanguageAPI.Add(text + "SECONDARY_SCEPTER_T62_CANNON_DESCRIPTION", $"Fire the laser gun for <style=cIsDamage>{3750f}% damage</style>. Hitting weak points deals <style=cIsDamage>extra damage</style>."); LanguageAPI.Add(text + "SECONDARY_SCEPTER_MAUS_NAME", "Fractured Cannon"); LanguageAPI.Add(text + "SECONDARY_SCEPTER_MAUS_DESCRIPTION", string.Format("Fire the gun for <style=cIsDamage>{0}% damage</style>. Hitting a enemy deals {1}, {2}, and {3}. Possesses the <style=cIsUtility>fastest projectile</style>, allowing for ease of use.", 8100f, TanksMod.Modules.Tokens.isFire("fire"), TanksMod.Modules.Tokens.isBleed("bleed"), TanksMod.Modules.Tokens.isWeakness("weakness"))); LanguageAPI.Add(text + "SECONDARY_SCEPTER_AA_NAME", "G/A Cannon"); LanguageAPI.Add(text + "SECONDARY_SCEPTER_AA_DESCRIPTION", string.Format("Fire the gun for <style=cIsDamage>{0}% damage</style>. Projectile detonates <style=cIsDamage>{1}m</style> near <style=cIsUtility>any</style> targets for an extra <style=cIsDamage>{2}x</style> base damage. While firing, {3}.", 405f, 5.5f, 2.5f, TanksMod.Modules.Tokens.BadKeyword("speed is penalized"))); LanguageAPI.Add(text + "SECONDARY_SCEPTER_CANNON_MKII_NAME", "RAIN"); LanguageAPI.Add(text + "SECONDARY_SCEPTER_CANNON_MKII_DESCRIPTION", $"Fire the gun for <style=cIsDamage>7x{2200f}% damage</style> in a <style=cIsUtility>great arc</style>. Damage increases the further it travels, up to <style=cIsDamage>12x{5500f}% damage</style>.\n\nCooldown: 30s\nBlast Radius: 13m/bullet"); LanguageAPI.Add(text + "SECONDARY_SCEPTER_OBLITERATOR_CANNON_NAME", "Oppenheimer’s Unreleased Experimental"); LanguageAPI.Add(text + "SECONDARY_SCEPTER_OBLITERATOR_CANNON_DESCRIPTION", string.Format("Annihilate {0} in a {1}m for <style=cIsDamage>{2}% damage</style>.", TanksMod.Modules.Tokens.ReallyBadKeyword("ALL"), 35f, 24000f)); } } } namespace TanksMod.States { internal class DeathState : GenericCharacterDeath { public override void OnEnter() { //IL_000f: Unknown result type (might be due to invalid IL or missing references) //IL_0019: Unknown result type (might be due to invalid IL or missing references) //IL_001e: Unknown result type (might be due to invalid IL or missing references) //IL_002f: Unknown result type (might be due to invalid IL or missing references) //IL_0036: Unknown result type (might be due to invalid IL or missing references) //IL_003b: Unknown result type (might be due to invalid IL or missing references) //IL_0040: Unknown result type (might be due to invalid IL or missing references) //IL_0071: Unknown result type (might be due to invalid IL or missing references) TankController component = ((EntityState)this).GetComponent<TankController>(); ((GenericCharacterDeath)this).OnEnter(); Vector3 val = Vector3.up * 3f; if (Object.op_Implicit((Object)(object)((EntityState)this).characterMotor)) { val += ((EntityState)this).characterMotor.velocity; } if (Object.op_Implicit((Object)(object)((GenericCharacterDeath)this).cachedModelTransform)) { RagdollController component2 = ((Component)((GenericCharacterDeath)this).cachedModelTransform).GetComponent<RagdollController>(); if (Object.op_Implicit((Object)(object)component2)) { component2.BeginRagdoll(val); Transform[] bones = component2.bones; foreach (Transform val2 in bones) { Object.Destroy((Object)(object)((Component)val2).gameObject, 10f); } Object.Destroy((Object)(object)((Component)component2).gameObject, 10f); } } DestroyOnTimer val3 = ((Component)((EntityState)this).modelLocator.modelTransform).gameObject.AddComponent<DestroyOnTimer>(); val3.duration = 25f; if (Object.op_Implicit((Object)(object)((BaseState)this).FindModelChild("DeathEffects"))) { ((Component)((BaseState)this).FindModelChild("DeathEffects")).gameObject.SetActive(true); } if (Object.op_Implicit((Object)(object)((BaseState)this).FindModelChild("CrashDust"))) { ((Component)((BaseState)this).FindModelChild("CrashDust")).gameObject.SetActive(false); } Util.PlaySound("Play_DeathSound", ((EntityState)this).gameObject); if (((EntityState)this).skillLocator.special.skillDef.skillName.Equals("Self Destruct") && component.sd_suicide) { ((Component)((EntityState)this).modelLocator.modelTransform).gameObject.SetActive(false); } } public override void FixedUpdate() { ((GenericCharacterDeath)this).FixedUpdate(); if (NetworkServer.active && ((EntityState)this).fixedAge > 4f) { ((Behaviour)((EntityState)this).characterMotor).enabled = false; EntityState.Destroy((Object)(object)((EntityState)this).gameObject); } } public override InterruptPriority GetMinimumInterruptPriority() { //IL_0003: Unknown result type (might be due to invalid IL or missing references) //IL_0006: Unknown result type (might be due to invalid IL or missing references) return (InterruptPriority)9; } } internal class GenericCarMain : BaseCharacterMain { private AimAnimator aimAnimator; protected bool jumpInputReceived; protected bool sprintInputReceived; private Vector3 moveVector = Vector3.zero; private Vector3 aimDirection = Vector3.forward; private bool hasAimAnimator; public override void OnEnter() { ((BaseCharacterMain)this).OnEnter(); Transform modelTransform = ((EntityState)this).GetModelTransform(); if (Object.op_Implicit((Object)(object)modelTransform)) { aimAnimator = ((Component)modelTransform).GetComponent<AimAnimator>(); if (Object.op_Implicit((Object)(object)aimAnimator)) { ((Behaviour)aimAnimator).enabled = true; } } hasAimAnimator = Object.op_Implicit((Object)(object)aimAnimator); } public override void Update() { ((BaseCharacterMain)this).Update(); } public override void FixedUpdate() { ((BaseCharacterMain)this).FixedUpdate(); GatherInputs(); HandleMovements(); PerformInputs(); } public virtual void HandleMovements() { //IL_0013: Unknown result type (might be due to invalid IL or missing references) //IL_0031: Unknown result type (might be due to invalid IL or missing references) //IL_0036: Unknown result type (might be due to invalid IL or missing references) if (base.hasCharacterMotor) { ((EntityState)this).characterMotor.moveDirection = moveVector; } if (base.hasRailMotor) { ((EntityState)this).railMotor.inputMoveVector = moveVector; } if (base.hasCharacterBody) { bool isSprinting = sprintInputReceived; if (((Vector3)(ref moveVector)).magnitude <= 0.5f) { isSprinting = false; } ((EntityState)this).characterBody.isSprinting = isSprinting; } ProcessJump(ignoreRequirements: false); } public void ProcessJump(bool ignoreRequirements) { //IL_0193: Unknown result type (might be due to invalid IL or missing references) //IL_0198: Unknown result type (might be due to invalid IL or missing references) //IL_019f: Unknown result type (might be due to invalid IL or missing references) //IL_01b0: Expected O, but got Unknown //IL_01d3: Unknown result type (might be due to invalid IL or missing references) //IL_01d8: Unknown result type (might be due to invalid IL or missing references) //IL_01df: Unknown result type (might be due to invalid IL or missing references) //IL_01ea: Unknown result type (might be due to invalid IL or missing references) //IL_0201: Expected O, but got Unknown //IL_0215: Unknown result type (might be due to invalid IL or missing references) //IL_021a: Unknown result type (might be due to invalid IL or missing references) //IL_0221: Unknown result type (might be due to invalid IL or missing references) //IL_022c: Unknown result type (might be due to invalid IL or missing references) //IL_0233: Unknown result type (might be due to invalid IL or missing references) //IL_0238: Unknown result type (might be due to invalid IL or missing references) //IL_023d: Unknown result type (might be due to invalid IL or missing references) //IL_0248: Expected O, but got Unknown if (!base.hasCharacterMotor) { return; } bool flag = false; bool flag2 = false; bool flag3 = ignoreRequirements || ((EntityState)this).characterMotor.jumpCount < ((EntityState)this).characterBody.maxJumpCount; if (!(jumpInputReceived && Object.op_Implicit((Object)(object)((EntityState)this).characterBody) && flag3)) { return; } int itemCount = ((EntityState)this).characterBody.inventory.GetItemCount(Items.JumpBoost); float horizontalBonus = 1f; float verticalBonus = 1f; if (((EntityState)this).characterMotor.jumpCount >= ((EntityState)this).characterBody.baseJumpCount) { flag = true; horizontalBonus = 1.5f; verticalBonus = 1.5f; } else if ((float)itemCount > 0f && ((EntityState)this).characterBody.isSprinting) { float num = ((EntityState)this).characterBody.acceleration * ((EntityState)this).characterMotor.airControl; if (((EntityState)this).characterBody.moveSpeed > 0f && num > 0f) { flag2 = true; float num2 = Mathf.Sqrt(10f * (float)itemCount / num); float num3 = ((EntityState)this).characterBody.moveSpeed / num; horizontalBonus = (num2 + num3) / num3; } } ApplyJumpVelocity(((EntityState)this).characterMotor, ((EntityState)this).characterBody, horizontalBonus, verticalBonus); if (((EntityState)this).characterMotor.jumpCount == 0 || ((EntityState)this).characterBody.baseJumpCount == 1) { } if (flag) { EffectManager.SpawnEffect(LegacyResourcesAPI.Load<GameObject>("Prefabs/Effects/FeatherEffect"), new EffectData { origin = ((EntityState)this).characterBody.footPosition }, true); } else if (((EntityState)this).characterMotor.jumpCount > 0) { EffectManager.SpawnEffect(LegacyResourcesAPI.Load<GameObject>("Prefabs/Effects/ImpactEffects/CharacterLandImpact"), new EffectData { origin = ((EntityState)this).characterBody.footPosition, scale = ((EntityState)this).characterBody.radius }, true); } if (flag2) { EffectManager.SpawnEffect(LegacyResourcesAPI.Load<GameObject>("Prefabs/Effects/BoostJumpEffect"), new EffectData { origin = ((EntityState)this).characterBody.footPosition, rotation = Util.QuaternionSafeLookRotation(((EntityState)this).characterMotor.velocity) }, true); } CharacterMotor characterMotor = ((EntityState)this).characterMotor; characterMotor.jumpCount++; JumpDelegate onJump = ((EntityState)this).characterBody.onJump; if (onJump != null) { onJump.Invoke(); } } public void ApplyJumpVelocity(CharacterMotor characterMotor, CharacterBody characterBody, float horizontalBonus, float verticalBonus, bool vault = false) { //IL_0001: Unknown result type (might be due to invalid IL or missing references) //IL_0006: Unknown result type (might be due to invalid IL or missing references) //IL_0025: Unknown result type (might be due to invalid IL or missing references) //IL_002c: Unknown result type (might be due to invalid IL or missing references) //IL_0032: Unknown result type (might be due to invalid IL or missing references) //IL_0037: Unknown result type (might be due to invalid IL or missing references) //IL_004a: Unknown result type (might be due to invalid IL or missing references) //IL_004f: Unknown result type (might be due to invalid IL or missing references) //IL_0050: Unknown result type (might be due to invalid IL or missing references) //IL_0055: Unknown result type (might be due to invalid IL or missing references) //IL_000f: Unknown result type (might be due to invalid IL or missing references) //IL_0010: Unknown result type (might be due to invalid IL or missing references) Vector3 up = Vector3.up; if (vault) { characterMotor.velocity = up; } else { up.y = 0f; Vector3 val = up * characterBody.moveSpeed * horizontalBonus; val.y = characterBody.jumpPower * verticalBonus; characterMotor.velocity += val; } ((BaseCharacterController)characterMotor).Motor.ForceUnground(0.1f); } protected void PerformInputs() { HandleSkill(((EntityState)this).skillLocator.primary, ref ((EntityState)this).inputBank.skill1); HandleSkill(((EntityState)this).skillLocator.secondary, ref ((EntityState)this).inputBank.skill2); HandleSkill(((EntityState)this).skillLocator.utility, ref ((EntityState)this).inputBank.skill3); HandleSkill(((EntityState)this).skillLocator.special, ref ((EntityState)this).inputBank.skill4); } protected void GatherInputs() { //IL_0013: Unknown result type (might be due to invalid IL or missing references) //IL_0018: Unknown result type (might be due to invalid IL or missing references) //IL_0057: Unknown result type (might be due to invalid IL or missing references) //IL_005c: Unknown result type (might be due to invalid IL or missing references) if (base.hasInputBank) { moveVector = ((EntityState)this).inputBank.moveVector; jumpInputReceived = ((ButtonState)(ref ((EntityState)this).inputBank.jump)).justPressed; sprintInputReceived |= ((EntityState)this).inputBank.sprint.down; aimDirection = ((EntityState)this).inputBank.aimDirection; } } protected virtual bool CanExecuteSkill(GenericSkill skillSlot) { return true; } [CompilerGenerated] private void HandleSkill(GenericSkill skillSlot, ref ButtonState buttonState) { if (buttonState.down && Object.op_Implicit((Object)(object)skillSlot) && (!skillSlot.mustKeyPress || !buttonState.hasPressBeenClaimed) && CanExecuteSkill(skillSlot) && skillSlot.ExecuteIfReady()) { buttonState.hasPressBeenClaimed = true; } } public override void OnExit() { //IL_0054: Unknown result type (might be due to invalid IL or missing references) //IL_0078: Unknown result type (might be due to invalid IL or missing references) //IL_007d: Unknown result type (might be due to invalid IL or missing references) Transform modelTransform = ((EntityState)this).GetModelTransform(); if (Object.op_Implicit((Object)(object)modelTransform)) { AimAnimator component = ((Component)modelTransform).GetComponent<AimAnimator>(); if (Object.op_Implicit((Object)(object)component)) { ((Behaviour)component).enabled = false; } } if (((EntityState)this).isAuthority) { if (Object.op_Implicit((Object)(object)((EntityState)this).characterMotor)) { ((EntityState)this).characterMotor.moveDirection = Vector3.zero; } if (Object.op_Implicit((Object)(object)((EntityState)this).railMotor)) { ((EntityState)this).railMotor.inputMoveVector = Vector3.zero; } } ((BaseCharacterMain)this).OnExit(); } } internal class GenericTankMain : BaseCharacterMain { private TankController tank; private AimAnimator aimAnimator; protected bool jumpInputReceived; protected bool sprintInputReceived; private Vector3 moveVector = Vector3.zero; private Vector3 aimDirection = Vector3.forward; private bool hasAimAnimator; public override void OnEnter() { ((BaseCharacterMain)this).OnEnter(); tank = ((EntityState)this).GetComponent<TankController>(); Transform modelTransform = ((EntityState)this).GetModelTransform(); if (Object.op_Implicit((Object)(object)modelTransform)) { aimAnimator = ((Component)modelTransform).GetComponent<AimAnimator>(); if (Object.op_Implicit((Object)(object)aimAnimator)) { ((Behaviour)aimAnimator).enabled = true; } } hasAimAnimator = Object.op_Implicit((Object)(object)aimAnimator); ((Component)((EntityState)this).characterBody.modelLocator.modelTransform).GetComponent<CharacterModel>().DisableAllItemDisplays(); ((Component)((EntityState)this).characterBody.modelLocator.modelTransform).GetComponent<CharacterModel>().UpdateItemDisplay(((EntityState)this).characterBody.master.inventory); } public override void Update() { ((BaseCharacterMain)this).Update(); } public override void FixedUpdate() { if (Object.op_Implicit((Object)(object)((EntityState)this).GetComponent<TankController>()) && (Object)(object)tank == (Object)null) { tank = ((EntityState)this).GetComponent<TankController>(); } ((BaseCharacterMain)this).FixedUpdate(); if (Object.op_Implicit((Object)(object)tank)) { if (Helpers.HasRequiredXtraTankBody(((EntityState)this).characterBody)) { tank.baseCrashWaitTime = 2f; } if (tank.IsNotCrashed()) { GatherInputs(); HandleMovements(); PerformInputs(); } if (Object.op_Implicit((Object)(object)((EntityState)this).characterBody)) { ((EntityState)this).characterBody.SetAimTimer(0f); UpdateFuelStats(); } SetCameraForCertainSkills(); } } private void SetCameraForCertainSkills() { //IL_0045: Unknown result type (might be due to invalid IL or missing references) if (Helpers.HasRequiredXtraTankBody(((EntityState)this).characterBody) && ((EntityState)this).skillLocator.primary.skillDef.skillName == "Calliope") { SetCameraPosition(new Vector3(0f, 3.5f, 0f)); } } private void SetCameraPosition(Vector3 newPos) { //IL_0016: Unknown result type (might be due to invalid IL or missing references) //IL_0032: Unknown result type (might be due to invalid IL or missing references) ((Component)((EntityState)this).transform.Find("AimOrigin")).transform.localPosition = newPos; ((Component)((EntityState)this).transform.Find("CameraPivot")).transform.localPosition = newPos; } private void UpdateFuelStats() { tank.SetNewFuelAmount(SetMaxFuelAmount()); tank.SetNewFuelRechargeRate(SetNewRechargeRate()); tank.newJumpThrustMultiplier = SetNewJumpThrustMultiplier() + tank.thrustPowerBonus; tank.newJumpHoverMultiplier = tank.baseJumpHoverMultiplier + tank.hoverPowerBonus; tank.SetNewFuelDelayRechargeTime(SetNewDelayRecharge()); } private float SetMaxFuelAmount() { //IL_011d: Unknown result type (might be due to invalid IL or missing references) //IL_0127: Unknown result type (might be due to invalid IL or missing references) float num = tank.GetBaseFuelAmount() + 10f * (float)((EntityState)this).characterBody.inventory.GetItemCount(Items.EquipmentMagazine) + 15f * (float)((EntityState)this).characterBody.inventory.GetItemCount(Items.EquipmentMagazineVoid) + 5f * (float)((EntityState)this).characterBody.inventory.GetItemCount(Items.IgniteOnKill) + 40f * (float)((EntityState)this).characterBody.inventory.GetItemCount(Items.Feather) + 10f * (float)((EntityState)this).characterBody.inventory.GetItemCount(Items.StrengthenBurn) + 25f * (float)((EntityState)this).characterBody.inventory.GetItemCount(Items.JumpBoost) + 100f * (float)((EntityState)this).characterBody.inventory.GetItemCount(Items.UtilitySkillMagazine) + 15f * (float)((EntityState)this).characterBody.inventory.GetItemCount(Items.ShinyPearl) + 50f * (float)((EntityState)this).characterBody.inventory.GetItemCount(Items.FallBoots); if (((EntityState)this).characterBody.inventory.GetEquipmentIndex() == Equipment.QuestVolatileBattery.equipmentIndex) { num += 200f; } return num; } private float SetNewRechargeRate() { return tank.GetBaseFuelRechargeRate() * ((EntityState)this).characterBody.attackSpeed; } private float SetNewJumpThrustMultiplier() { return tank.baseJumpThrustMultiplier + 4f * (float)((EntityState)this).characterBody.inventory.GetItemCount(Items.UtilitySkillMagazine) + 2f * (float)((EntityState)this).characterBody.inventory.GetItemCount(Items.ShinyPearl); } private float SetNewDelayRecharge() { return tank.GetBaseFuelDelayRechargeTime() - (((EntityState)this).characterBody.attackSpeed - 1f); } public virtual void HandleMovements() { //IL_0013: Unknown result type (might be due to invalid IL or missing references) //IL_0031: Unknown result type (might be due to invalid IL or missing references) //IL_0036: Unknown result type (might be due to invalid IL or missing references) //IL_006b: Unknown result type (might be due to invalid IL or missing references) //IL_0071: Invalid comparison between Unknown and I4 //IL_00fe: Unknown result type (might be due to invalid IL or missing references) //IL_0103: Unknown result type (might be due to invalid IL or missing references) //IL_007c: Unknown result type (might be due to invalid IL or missing references) //IL_0081: Unknown result type (might be due to invalid IL or missing references) //IL_009b: Unknown result type (might be due to invalid IL or missing references) //IL_008e: Unknown result type (might be due to invalid IL or missing references) //IL_00a0: Unknown result type (might be due to invalid IL or missing references) //IL_00a3: Unknown result type (might be due to invalid IL or missing references) //IL_00a8: Unknown result type (might be due to invalid IL or missing references) //IL_00ec: Unknown result type (might be due to invalid IL or missing references) //IL_00ee: Unknown result type (might be due to invalid IL or missing references) if (base.hasCharacterMotor) { ((EntityState)this).characterMotor.moveDirection = moveVector; } if (base.hasRailMotor) { ((EntityState)this).railMotor.inputMoveVector = moveVector; } if (!base.hasRailMotor && base.hasCharacterDirection && base.hasCharacterBody) { if (hasAimAnimator && (int)aimAnimator.aimType == 1) { Vector3 val = ((moveVector == Vector3.zero) ? ((EntityState)this).characterDirection.forward : moveVector); float num = Vector3.Angle(aimDirection, val); float num2 = Mathf.Max(aimAnimator.pitchRangeMax + aimAnimator.pitchGiveupRange, aimAnimator.yawRangeMax + aimAnimator.yawGiveupRange); ((EntityState)this).characterDirection.moveVector = val; } else { ((EntityState)this).characterDirection.moveVector = moveVector; } } if (((EntityState)this).isAuthority && base.hasCharacterBody) { if (Object.op_Implicit((Object)(object)((EntityState)this).skillLocator.FindSkillByDef(BasicTank.burstThrustersDef)) && tank.CurrentFuel() >= 25f) { ProcessJump(ignoreRequirements: false); } bool isSprinting = sprintInputReceived; if (((Vector3)(ref moveVector)).magnitude <= 0.5f) { isSprinting = false; } ((EntityState)this).characterBody.isSprinting = isSprinting; } } public void ProcessJump(bool ignoreRequirements) { //IL_0193: Unknown result type (might be due to invalid IL or missing references) //IL_0198: Unknown result type (might be due to invalid IL or missing references) //IL_019f: Unknown result type (might be due to invalid IL or missing references) //IL_01b0: Expected O, but got Unknown //IL_01d3: Unknown result type (might be due to invalid IL or missing references) //IL_01d8: Unknown result type (might be due to invalid IL or missing references) //IL_01df: Unknown result type (might be due to invalid IL or missing references) //IL_01ea: Unknown result type (might be due to invalid IL or missing references) //IL_0201: Expected O, but got Unknown //IL_0215: Unknown result type (might be due to invalid IL or missing references) //IL_021a: Unknown result type (might be due to invalid IL or missing references) //IL_0221: Unknown result type (might be due to invalid IL or missing references) //IL_022c: Unknown result type (might be due to invalid IL or missing references) //IL_0233: Unknown result type (might be due to invalid IL or missing references) //IL_0238: Unknown result type (might be due to invalid IL or missing references) //IL_023d: Unknown result type (might be due to invalid IL or missing references) //IL_0248: Expected O, but got Unknown if (!base.hasCharacterMotor) { return; } bool flag = false; bool flag2 = false; bool flag3 = ignoreRequirements || ((EntityState)this).characterMotor.jumpCount < ((EntityState)this).characterBody.maxJumpCount; if (!(jumpInputReceived && Object.op_Implicit((Object)(object)((EntityState)this).characterBody) && flag3)) { return; } int itemCount = ((EntityState)this).characterBody.inventory.GetItemCount(Items.JumpBoost); float horizontalBonus = 1f; float verticalBonus = 1f; if (((EntityState)this).characterMotor.jumpCount >= ((EntityState)this).characterBody.baseJumpCount) { flag = true; horizontalBonus = 1.5f; verticalBonus = 1.5f; } else if ((float)itemCount > 0f && ((EntityState)this).characterBody.isSprinting) { float num = ((EntityState)this).characterBody.acceleration * ((EntityState)this).characterMotor.airControl; if (((EntityState)this).characterBody.moveSpeed > 0f && num > 0f) { flag2 = true; float num2 = Mathf.Sqrt(10f * (float)itemCount / num); float num3 = ((EntityState)this).characterBody.moveSpeed / num; horizontalBonus = (num2 + num3) / num3; } } ApplyJumpVelocity(((EntityState)this).characterMotor, ((EntityState)this).characterBody, horizontalBonus, verticalBonus); if (((EntityState)this).characterMotor.jumpCount == 0 || ((EntityState)this).characterBody.baseJumpCount == 1) { } if (flag) { EffectManager.SpawnEffect(LegacyResourcesAPI.Load<GameObject>("Prefabs/Effects/FeatherEffect"), new EffectData { origin = ((EntityState)this).characterBody.footPosition }, true); } else if (((EntityState)this).characterMotor.jumpCount > 0) { EffectManager.SpawnEffect(LegacyResourcesAPI.Load<GameObject>("Prefabs/Effects/ImpactEffects/CharacterLandImpact"), new EffectData { origin = ((EntityState)this).characterBody.footPosition, scale = ((EntityState)this).characterBody.radius }, true); } if (flag2) { EffectManager.SpawnEffect(LegacyResourcesAPI.Load<GameObject>("Prefabs/Effects/BoostJumpEffect"), new EffectData { origin = ((EntityState)this).characterBody.footPosition, rotation = Util.QuaternionSafeLookRotation(((EntityState)this).characterMotor.velocity) }, true); } CharacterMotor characterMotor = ((EntityState)this).characterMotor; characterMotor.jumpCount++; JumpDelegate onJump = ((EntityState)this).characterBody.onJump; if (onJump != null) { onJump.Invoke(); } } public void ApplyJumpVelocity(CharacterMotor characterMotor, CharacterBody characterBody, float horizontalBonus, float verticalBonus, bool vault = false) { //IL_000c: Unk