Ejemplo n.º 1
0
    public void LoadBlueprint(EntityBlueprint blueprint, DroneSpawnData data)
    {
        shellImage.sprite = ResourceManager.GetAsset <Sprite>(blueprint.coreShellSpriteID);
        if (shellImage.sprite)
        {
            shellImage.enabled = true;
            shellImage.color   = FactionManager.GetFactionColor(0);
            shellImage.rectTransform.sizeDelta = shellImage.sprite.bounds.size * 100;
            shellImage.type = Image.Type.Sliced;
            // orient shell image so relative center stays the same regardless of shell tier
            shellImage.rectTransform.anchoredPosition = -shellImage.sprite.pivot + shellImage.rectTransform.sizeDelta / 2;
        }
        else
        {
            shellImage.enabled = false;
        }

        coreImage.rectTransform.anchoredPosition = -shellImage.rectTransform.anchoredPosition;
        coreImage.sprite = ResourceManager.GetAsset <Sprite>(blueprint.coreSpriteID);
        if (coreImage.sprite)
        {
            coreImage.enabled                 = true;
            coreImage.material                = ResourceManager.GetAsset <Material>("material_color_swap");
            coreImage.color                   = FactionManager.GetFactionColor(0);
            coreImage.preserveAspect          = true;
            coreImage.type                    = Image.Type.Sliced;
            coreImage.rectTransform.sizeDelta = coreImage.sprite.bounds.size * 100;
        }
        else
        {
            coreImage.enabled = false;
        }

        if (data.type == DroneType.Mini)
        {
            miniDroneShooter.gameObject.SetActive(true);
            miniDroneShooter.enabled = true;
            miniDroneShooter.sprite  = ResourceManager.GetAsset <Sprite>(AbilityUtilities.GetShooterByID(6));
            miniDroneShooter.color   = FactionManager.GetFactionColor(0);
            miniDroneShooter.rectTransform.sizeDelta = miniDroneShooter.sprite.bounds.size * 100;
            miniDroneShooter.type = Image.Type.Sliced;
        }
        else
        {
            miniDroneShooter.gameObject.SetActive(false);
            miniDroneShooter.enabled = false;
        }

        foreach (EntityBlueprint.PartInfo part in blueprint.parts)
        {
            var p = Instantiate(partPrefab, cursorScript.transform.parent).GetComponent <ShipBuilderPart>();
            p.cursorScript = cursorScript;
            cursorScript.parts.Add(p);
            p.info = part;
            p.SetLastValidPos(part.location);
            p.isInChain = true;
            p.validPos  = true;
            p.InitializeMode(BuilderMode.Workshop);
        }
    }
Ejemplo n.º 2
0
    public static Sprite GetAbilitySpriteBySpawnData(DroneSpawnData data)
    {
        switch (data.type)
        {
        // similarity for reasons described above
        case DroneType.Mini:
            return(ResourceManager.GetAsset <Sprite>("mini_drone_ability"));

        case DroneType.Counter:
            return(ResourceManager.GetAsset <Sprite>("counter_drone_ability"));

        case DroneType.Light:
            return(ResourceManager.GetAsset <Sprite>("light_drone_ability"));

        case DroneType.Strike:
            return(ResourceManager.GetAsset <Sprite>("strike_drone_ability"));

        case DroneType.Worker:
            return(ResourceManager.GetAsset <Sprite>("worker_drone_ability"));

        case DroneType.Gun:
            return(ResourceManager.GetAsset <Sprite>("gun_drone_ability"));

        case DroneType.Torpedo:
            return(ResourceManager.GetAsset <Sprite>("torpedo_drone_ability"));

        case DroneType.Heavy:
            return(ResourceManager.GetAsset <Sprite>("heavy_drone_ability"));

        default:
            return(null);
        }
    }
Ejemplo n.º 3
0
    public void InitializeBuildPhase(EntityBlueprint blueprint, EntityBlueprint.PartInfo currentPart, DroneSpawnData data)
    {
        searcherString   = "";
        displayingTypes  = new bool[] { true, false, true, true, true };
        this.currentData = data;
        this.currentPart = currentPart;
        selectionPhaseParent.SetActive(false);
        buildPhaseParent.SetActive(true);
        LoadBlueprint(blueprint, data);

        builderPartDict = new Dictionary <EntityBlueprint.PartInfo, ShipBuilderInventoryScript>();
        contentsArray   = new Transform[] { smallBuilderContents, mediumBuilderContents, largeBuilderContents };
        contentTexts    = new GameObject[] { smallBuilderText, mediumBuilderText, largeBuilderText };
        foreach (GameObject obj in contentTexts)
        {
            obj.SetActive(false);
        }

        foreach (EntityBlueprint.PartInfo part in player.GetInventory())
        {
            if (part.abilityID != 10 && ResourceManager.GetAsset <PartBlueprint>(part.partID).size == 0)
            {
                AddPart(part);
            }
        }

        GetComponentInChildren <ShipBuilderPartDisplay>().Initialize(this);
        phase = DroneWorkshopPhase.BuildPhase;

        cursorScript.gameObject.SetActive(true);
        cursorScript.SetMode(BuilderMode.Workshop);
    }
Ejemplo n.º 4
0
 protected override void Start()
 {
     data      = DroneWorkshop.ParseDronePart(part);
     blueprint = ScriptableObject.CreateInstance <EntityBlueprint>();
     JsonUtility.FromJsonOverwrite(data.drone, blueprint);
     base.Start();
 }
Ejemplo n.º 5
0
 public static Sprite GetAbilityImageByID(int ID, string secondaryData)
 {
     if (ID == 0)
     {
         return(null);
     }
     if (ID == 10)
     {
         DroneSpawnData data = DroneUtilities.GetDroneSpawnDataByShorthand(secondaryData);
         return(DroneUtilities.GetAbilitySpriteBySpawnData(data));
     }
     return(ResourceManager.GetAsset <Sprite>("AbilitySprite" + ID));
 }
Ejemplo n.º 6
0
 public override void AssignDisplay(EntityBlueprint blueprint, DroneSpawnData data, int faction = 0)
 {
     base.AssignDisplay(blueprint, data);
     statsDisplay.gameObject.SetActive(true);
     droneDesc.enabled = true;
     droneDesc.text    = ("DRONE TYPE: " + data.type).ToUpper()
                         + "\nUNIQUE CHARACTERISTIC:\n" + "<color=lime>"
                         + DroneUtilities.GetUniqueCharacteristic(data.type) + "</color>"
                         + "\nPART LIMIT: " + DroneUtilities.GetPartLimit(data.type)
                         + "\nSPAWNING COOLDOWN: " + DroneUtilities.GetCooldown(data.type)
                         + "\nSPAWNING DELAY: " + DroneUtilities.GetDelay(data.type)
                         + "\nSPAWNING ENERGY COST: " + DroneUtilities.GetEnergyCost(data.type);
     foreach (DisplayPart part in parts)
     {
         buildValue += EntityBlueprint.GetPartValue(part.info);
     }
 }
Ejemplo n.º 7
0
    public override void AssignDisplay(EntityBlueprint blueprint, DroneSpawnData data, int faction = 0)
    {
        base.AssignDisplay(blueprint, data);
        statsDisplay.gameObject.SetActive(true);
        droneDesc.enabled = true;

        string description = string.Join("\n", new string[]
        {
            ($"DRONE TYPE: {data.type}").ToUpper(),
            "UNIQUE CHARACTERISTIC:",
            $"<color=lime>{DroneUtilities.GetUniqueCharacteristic(data.type)}</color>",
            $"PART LIMIT: {DroneUtilities.GetPartLimit(data.type)}",
            $"SPAWNING COOLDOWN: {DroneUtilities.GetCooldown(data.type)}",
            $"SPAWNING DELAY: {DroneUtilities.GetDelay(data.type)}",
            $"SPAWNING ENERGY COST: {DroneUtilities.GetEnergyCost(data.type)}",
        });

        droneDesc.text = description;

        foreach (DisplayPart part in parts)
        {
            buildValue += EntityBlueprint.GetPartValue(part.info);
        }
    }
Ejemplo n.º 8
0
    public void EnterCommand(string command)
    {
        inputField.text = "";
        inputField.ActivateInputField();

        if (UnityEngine.SceneManagement.SceneManager.GetActiveScene().name == "SampleScene")
        {
            if (command.Equals("poor", StringComparison.CurrentCultureIgnoreCase))
            {
                GodPowers();
                textBox.text += "\n<color=lime>Have you tried being born into wealth?</color>";
            }
            else if (command.Equals("I am God", StringComparison.CurrentCultureIgnoreCase))
            {
                GodPowers();
                var player = PlayerCore.Instance;
                player.AddCredits(999999);
                textBox.text += "\n<color=lime>I am noob.</color>";
            }
            else if (command.Equals("Immortality", StringComparison.CurrentCultureIgnoreCase))
            {
                var player = PlayerCore.Instance;
                player.SetMaxHealth(new float[] { 99999, 99999, 99999 }, true);
                player.SetRegens(new float[] { 99999, 99999, 99999 });
                textBox.text += "\n<color=lime>Immortality is an illusion, enjoy it while it lasts.</color>";
            }
            else if (command.Equals("Skynet will rise", StringComparison.CurrentCultureIgnoreCase))
            {
                SectorManager.instance.Clear();
                SectorManager.instance.LoadSectorFile(System.IO.Path.Combine(Application.streamingAssetsPath, "Sectors/AI-Test"));
                PlayerCore.Instance.Warp(Vector3.zero);
                textBox.text += "\n<color=lime>I, for one, welcome our new robotic overlords.</color>";
            }
            else if (command.StartsWith("Add power ", StringComparison.CurrentCultureIgnoreCase))
            {
                int number = int.Parse(command.Substring(10).Trim());
                if (PlayerCore.Instance)
                {
                    PlayerCore.Instance.AddPower(number);
                }
                else
                {
                    foreach (ShellCore core in AIData.entities)
                    {
                        if (core)
                        {
                            core.AddPower(number);
                        }
                    }
                }
            }
            else if (command.StartsWith("Add rep ", StringComparison.CurrentCultureIgnoreCase))
            {
                int number = int.Parse(command.Substring(8).Trim());
                PlayerCore.Instance.reputation += number;
            }
            else if (command.StartsWith("Add shards ", StringComparison.CurrentCultureIgnoreCase))
            {
                int number = int.Parse(command.Substring(11).Trim());
                PlayerCore.Instance.shards += number;
            }
            else if (command.StartsWith("Add money ", StringComparison.CurrentCultureIgnoreCase))
            {
                int number = int.Parse(command.Substring(10).Trim());
                PlayerCore.Instance.AddCredits(number);
            }
            else if (command.Equals("Full log", StringComparison.CurrentCultureIgnoreCase))
            {
                fullLog       = true;
                textBox.text += "\n<color=lime>I see all, I know all</color>";
            }
            else if (command.Equals("Commit sudoku", StringComparison.CurrentCultureIgnoreCase))
            {
                PlayerCore.Instance.TakeCoreDamage(float.MaxValue);
                textBox.text += "\n<color=lime>Die, die, die!</color>";
            }
            else if (command.StartsWith("Speed of light", StringComparison.CurrentCultureIgnoreCase))
            {
                int locNum = 0;
                if (command.Length > 14)
                {
                    bool success = int.TryParse(command.Substring(14).Trim(), out locNum);
                    if (!success)
                    {
                        Debug.Log("Wrong number format!");
                    }
                }

                // TODO: broke, fix

                /*
                 * if (locNum < TaskManager.objectiveLocations.Count)
                 * {
                 *  PlayerCore.Instance.Warp(TaskManager.objectiveLocations[locNum].location);
                 * }
                 */
                textBox.text += "\n<color=lime>Country roads, take me home. To the place I belong!</color>";
            }
            else if (command.Equals("Spectate", StringComparison.CurrentCultureIgnoreCase))
            {
                var player = PlayerCore.Instance;
                SpriteRenderer[] renderers = player.GetComponentsInChildren <SpriteRenderer>(true);
                for (int i = 0; i < renderers.Length; i++)
                {
                    renderers[i].color = new Color(1f, 1f, 1f, 0.1f);
                }

                spectateEnabled = true;
                Collider2D[] colliders = player.GetComponentsInChildren <Collider2D>(true);
                for (int i = 0; i < colliders.Length; i++)
                {
                    colliders[i].enabled = false;
                }

                player.GetComponent <TractorBeam>().enabled = false;
                player.GetAbilityHandler().Deinitialize();
                player.hud.DeinitializeHUD();
                player.IsInvisible = true;
                textBox.text      += "\n<color=lime>You can hide, but you can't run!</color>";
            }
            else if (command.Equals("Exit", StringComparison.CurrentCultureIgnoreCase))
            {
                textBox.enabled = image.enabled = !image.enabled;
                inputField.gameObject.SetActive(image.enabled);
            }
            else if (command.Equals("I am Ormanus", StringComparison.CurrentCultureIgnoreCase))
            {
                EnterCommand("I am god");
                EnterCommand("spectate");
                EnterCommand("skynet will rise");
            }
            else if (command.Equals("fps", StringComparison.CurrentCultureIgnoreCase))
            {
                textBox.text += $"\n{1f / Time.smoothDeltaTime}";
            }
            else if (command.Equals("parts please", StringComparison.CurrentCultureIgnoreCase))
            {
                ShipBuilder.heavyCheat = true;
                textBox.text          += "\n<color=lime>I just wanna equip DeadZone parts for god's sake.</color>";
            }
            else if (command.Equals("moar data", StringComparison.CurrentCultureIgnoreCase))
            {
                ReticleScript.instance.DebugMode = true;
            }
            else if (command.Equals("marco", StringComparison.CurrentCultureIgnoreCase))
            {
                MapMakerScript.EnableMapCheat();
                WarpingEnabled = true;
                textBox.text  += "\n<color=lime>Polo.</color>";
            }
            else if (command.Equals("caught em all", StringComparison.CurrentCultureIgnoreCase))
            {
                PartIndexScript.partsObtainedCheat = true;
                textBox.text += "\n<color=lime>There's a time and place for everything! But not now.</color>";
            }
            else if (command.Equals("counting cards", StringComparison.CurrentCultureIgnoreCase))
            {
                NodeEditorFramework.Standard.RandomizerNode.PrintRandomRolls = true;
                textBox.text += "\n<color=lime>Don't let the casino catch you!</color>";
            }
            else if (command.Equals("Update debug", StringComparison.CurrentCultureIgnoreCase))
            {
                updateLog     = true;
                textBox.text += "\n<color=lime>You're probably not gonna be able to see this.</color>";
            }
            else if (command.Equals("Damacy", StringComparison.CurrentCultureIgnoreCase))
            {
                /* Adds all part/ability/tier/drone permutations to the player's inventory.*/
                var parts = PlayerCore.Instance.GetInventory();
                EntityBlueprint.PartInfo info;
                for (int i = 0; i < 8; i++)
                {
                    info           = new EntityBlueprint.PartInfo();
                    info.partID    = "SmallCenter1";
                    info.abilityID = 10;
                    DroneSpawnData data = DroneUtilities.GetDefaultData((DroneType)i);
                    info.secondaryData = JsonUtility.ToJson(data);
                    if (info.abilityID == 0 || info.abilityID == 10)
                    {
                        info.tier = 0;
                    }

                    parts.Add(info);
                }

                info = new EntityBlueprint.PartInfo();
                foreach (string name in ResourceManager.allPartNames)
                {
                    for (int i = 0; i < 38; i++)
                    {
                        info.partID    = name;
                        info.abilityID = i;
                        if ((info.abilityID >= 14 && info.abilityID <= 16) || info.abilityID == 3)
                        {
                            info.abilityID = 0;
                        }

                        if (info.abilityID == 10)
                        {
                            DroneSpawnData data = DroneUtilities.GetDefaultData((DroneType)UnityEngine.Random.Range(0, 8));
                            info.secondaryData = JsonUtility.ToJson(data);
                        }

                        if (info.abilityID == 0 || info.abilityID == 10 || info.abilityID == 21)
                        {
                            info.tier = 0;
                        }
                        else
                        {
                            info.tier = 1;
                        }

                        parts.Add(info);
                        parts.Add(info);
                        parts.Add(info);
                    }
                }

                textBox.text += "\n<color=lime>Katamete korogasu I LOVE YOU!</color>";
            }
            else if (command.Equals("Win siege", StringComparison.CurrentCultureIgnoreCase))
            {
                NodeEditorFramework.Standard.WinSiegeCondition.OnSiegeWin.Invoke(SectorManager.instance.current.sectorName);
            }
            else if (command.Equals("No limits", StringComparison.CurrentCultureIgnoreCase))
            {
                if (PlayerCore.Instance?.cursave != null)
                {
                    PlayerCore.Instance.cursave.abilityCaps = PlayerCore.Instance.abilityCaps = new int[] { 99999, 99999, 99999, 99999 };
                    textBox.text += "\n<color=lime>Ouch, now I have a headache.</color>";
                }
            }
            else if (command.Equals("I am an uncivilized barbarian", StringComparison.CurrentCultureIgnoreCase))
            {
                if (PlayerCore.Instance)
                {
                    PlayerCore.Instance.SetWeaponGCD(0);
                    textBox.text += "\n<color=lime>Heathen.</color>";
                }
            }
        }
        else if (UnityEngine.SceneManagement.SceneManager.GetActiveScene().name == "MainMenu")
        {
            if (command.StartsWith("Load ", StringComparison.CurrentCultureIgnoreCase))
            {
                string directory = command.Substring(5).Trim();
                string finalPath = System.IO.Path.Combine(Application.streamingAssetsPath, "Sectors", directory);
                if (System.IO.Directory.Exists(finalPath))
                {
                    SectorManager.customPath    = finalPath;
                    VersionNumberScript.version = directory + " [Custom]";
                    VersionNumberScript.Refresh();
                    textBox.text += "\n<color=lime>Custom world loaded!</color>";
                }
                else
                {
                    textBox.text += "\n<color=orange>Invalid path.</color>";
                }
            }
        }
    }
Ejemplo n.º 9
0
    public virtual void AssignDisplay(EntityBlueprint blueprint, DroneSpawnData data, int faction = 0)
    {
        this.faction = faction;
        ClearDisplay();
        shell.sprite = ResourceManager.GetAsset <Sprite>(blueprint.coreShellSpriteID);
        if (shell.sprite)
        {
            shell.enabled = true;
            shell.rectTransform.sizeDelta = shell.sprite.bounds.size * 100;
            shell.color = FactionManager.GetFactionColor(faction);
            shell.type  = Image.Type.Sliced;
            shell.rectTransform.pivot = new Vector2(shell.sprite.pivot.x
                                                    / (shell.sprite.bounds.size.x * 100), shell.sprite.pivot.y / (shell.sprite.bounds.size.y * 100));
        }
        else
        {
            shell.enabled = false;
        }

        core.sprite = ResourceManager.GetAsset <Sprite>(blueprint.coreSpriteID);
        if (core.sprite)
        {
            core.enabled = true;
            core.rectTransform.sizeDelta = core.sprite.bounds.size * 100;
            core.type     = Image.Type.Sliced;
            core.material = ResourceManager.GetAsset <Material>("material_color_swap");
            core.color    = FactionManager.GetFactionColor(faction);
            // orient core image so relative center stays the same regardless of shell tier
        }
        else
        {
            core.enabled = false;
        }

        if (data != null && data.type == DroneType.Mini)
        {
            miniDroneShooter.enabled = true;
            miniDroneShooter.sprite  = ResourceManager.GetAsset <Sprite>(AbilityUtilities.GetShooterByID(6));
            miniDroneShooter.color   = FactionManager.GetFactionColor(faction);
            miniDroneShooter.rectTransform.sizeDelta = miniDroneShooter.sprite.bounds.size * 100;
            miniDroneShooter.type = Image.Type.Sliced;
        }
        else if (blueprint.intendedType == EntityBlueprint.IntendedType.Turret ||
                 blueprint.intendedType == EntityBlueprint.IntendedType.Tank || blueprint.intendedType == EntityBlueprint.IntendedType.WeaponStation)
        {
            miniDroneShooter.enabled = true;
            miniDroneShooter.sprite  =
                ResourceManager.GetAsset <Sprite>(AbilityUtilities.GetShooterByID(blueprint.parts[0].abilityID, blueprint.parts[0].secondaryData));
            miniDroneShooter.color = FactionManager.GetFactionColor(faction);
            miniDroneShooter.rectTransform.sizeDelta = miniDroneShooter.sprite.bounds.size * 100;
            miniDroneShooter.type = Image.Type.Sliced;
        }
        else
        {
            miniDroneShooter.enabled = false;
        }

        if (blueprint.intendedType != EntityBlueprint.IntendedType.Turret &&
            blueprint.intendedType != EntityBlueprint.IntendedType.Tank)
        {
            foreach (EntityBlueprint.PartInfo part in blueprint.parts)
            {
                DisplayPart basePart = Instantiate(partPrefab, transform, false).GetComponent <DisplayPart>();
                basePart.UpdateFaction(faction);
                parts.Add(basePart);
                basePart.info = part;
            }
        }
    }
Ejemplo n.º 10
0
    public static string GetAbilityNameByID(int ID, string secondaryData)
    {
        switch (ID)
        {
        case 0:
            return("None");

        case 1:
            return("Speed Thrust");

        case 2:
            return("Shell Boost");

        case 3:
            return("Main Bullet");

        case 4:
            return("Beam");

        case 5:
            return("Bullet");

        case 6:
            return("Cannon");

        case 7:
            return("Missile");

        case 8:
            return("Torpedo");

        case 9:
            return("Laser");

        case 10:
            if (secondaryData == null)
            {
                return("Spawn Drone");
            }

            DroneSpawnData data = DroneUtilities.GetDroneSpawnDataByShorthand(secondaryData);
            return(DroneUtilities.GetAbilityNameByType(data.type));

        case 11:
            return("Core Heal");

        case 12:
            return("Energy");

        case 13:
            return("Speed");

        case 14:
            return("Siege Bullet");

        case 15:
            return("Speeder Bullet");

        case 16:
            return("Harvester");

        case 17:
            return("Shell Regen");

        case 18:
            return("Shell Max");

        case 19:
            return("Energy Regen");

        case 20:
            return("Energy Max");

        case 21:
            return("Command");

        case 22:
            return("Core Regen");

        case 23:
            return("Core Max");

        case 24:
            return("Stealth");

        case 25:
            return("Damage Boost");

        case 26:
            return("Area Restore");

        case 27:
            return("Pin Down");

        case 28:
            return("Retreat");

        case 29:
            return("Absorb Field");

        case 30:
            return("Shell Regen");

        case 31:
            return("Core Regen");

        case 32:
            return("Energy Regen");

        case 33:
            return("Disrupt");

        case 34:
            return("Control");

        case 35:
            return("Invert Tractor");

        case 36:
            return("Bomb");

        case 37:
            return("Ion");

        case 38:
            return("Flak");

        default:
            return("Name unset");
        }
    }
Ejemplo n.º 11
0
    public static string GetDescriptionByID(int ID, int tier, string secondaryData)
    {
        switch (ID)
        {
        case 0:
            return("Does nothing.");

        case 1:
            return($"+{SpeedThrust.boost * tier} speed for 10 seconds.");

        case 2:
            return($"Instantly heal {HealthHeal.heals[0] * tier} shell.");

        case 3:
            return($"Projectile that deals {MainBullet.GetDamage(tier)} damage. \nStays with you no matter what.");

        case 4:
            return($"Instant attack that deals {Beam.beamDamage * tier} damage.");

        case 5:
            return($"Projectile that deals {Bullet.bulletDamage * tier} damage.");

        case 6:
            return($"Instant attack that deals {Cannon.cannonDamage * tier} damage.");

        case 7:
            return($"Slow homing projectile that deals {Missile.missileDamage * tier} damage.");

        case 8:
            return($"Slow projectile that deals {Torpedo.torpedoDamage * tier} damage to ground entities.");

        case 9:
            return($"Fast projectile that deals {Laser.laserDamage * tier} damage. 25% pierces to core.");

        case 10:
            if (string.IsNullOrEmpty(secondaryData))
            {
                return("Spawns a drone.");
            }

            DroneSpawnData data = DroneUtilities.GetDroneSpawnDataByShorthand(secondaryData);
            return(DroneUtilities.GetDescriptionByType(data.type));

        case 11:
            return($"Instantly heal {HealthHeal.heals[1] * tier} core.");

        case 12:
            return($"Instantly heal {HealthHeal.heals[2] * tier} energy.");

        case 13:
            return($"+{Speed.boost * tier} speed.");

        case 17:
            return($"Passively increases shell regen by {ShellRegen.regens[0] * tier} points.");

        case 18:
            return($"Passively increases maximum shell by {ShellMax.maxes[0] * tier} points.");

        case 19:
            return($"Passively increases energy regen by {ShellRegen.regens[2] * tier} points.");

        case 20:
            return($"Passively increases maximum energy by {ShellMax.maxes[2] * tier} points.");

        case 21:
            return($"Passively increases the maximum allowed number of controlled units by {Command.commandUnitIncrease}.");

        case 22:
            return($"Passively increases core regen by {ShellRegen.regens[1] * tier} points.");

        case 23:
            return($"Passively increases maximum core by {ShellMax.maxes[1] * tier} points.");

        case 24:
            return("Become invisible to enemies.");

        case 25:
            return($"All weapon damage increased by {DamageBoost.damageAddition * Mathf.Max(1, tier)}.");

        case 26:
            return($"Instantly heals self and nearby allies by {AreaRestore.heal * Mathf.Max(1, tier)} shell");

        case 27:
            return("Immobilizes the target.");

        case 28:
            return("Respawn at base.");

        case 29:
            return("Absorb damage and turn it into energy.");

        case 30:
            return($"Temporarily increase shell regen by { ActiveRegen.healAmounts[0] } per second.");

        case 31:
            return("Temporarily increase core... wait, this isn't supposed to exist!");

        case 32:
            return($"Temporarily increase energy regen by { ActiveRegen.healAmounts[2] } per second.");

        case 33:
            return("Disrupt enemy ability cooldowns.");

        case 34:
            return($"Gives allies additional {Control.baseControlFractionBoost * 100}% shell and {Control.damageAddition} weapon damage.");

        case 35:
            return("Temporarily pulls you to your tractor target and allows you to tractor most entities.");

        case 36:
            return($"Stationary projectile that deals {Bomb.bombDamage} damage. \nProjectile lasts {45F * tier} seconds.");

        case 37:
            return($"Slow moving beam that deals {IonLineController.damageC * tier} damage per second for 5 seconds. "
                   + $"\nBeam costs {IonLineController.energyC * tier} energy per second.");

        case 38:
            return($"Fires at most 5 projectiles at different targets that each deal {Flak.bulletDamage * tier} damage.");

        default:
            return("Description unset");
        }
    }
Ejemplo n.º 12
0
    public static string GetDescriptionByID(int ID, int tier, string secondaryData)
    {
        switch (ID)
        {
        case 0:
            return("Does nothing.");

        case 1:
            return("+" + SpeedThrust.boost * tier + " speed for 10 seconds.");

        case 2:
            return("Instantly heal " + HealthHeal.heals[0] * tier + " shell.");

        case 3:
            return("Projectile that deals " + MainBullet.GetDamage(tier) + " damage. \nStays with you no matter what.");

        case 4:
            return("Instant attack that deals " + Beam.beamDamage * tier + " damage.");

        case 5:
            return("Projectile that deals " + Bullet.bulletDamage * tier + " damage.");

        case 6:
            return("Instant attack that deals " + Cannon.cannonDamage * tier + " damage.");

        case 7:
            return("Slow homing projectile that deals " + Missile.missileDamage * tier + " damage.");

        case 8:
            return("Slow projectile that deals " + Torpedo.torpedoDamage * tier + " damage to ground entities.");

        case 9:
            return("Fast projectile that deals " + Laser.laserDamage * tier + " damage. 25% pierces to core.");

        case 10:
            if (secondaryData == null || secondaryData == "")
            {
                return("Spawns a drone.");
            }
            DroneSpawnData data = DroneUtilities.GetDroneSpawnDataByShorthand(secondaryData);
            return(DroneUtilities.GetDescriptionByType(data.type));

        case 11:
            return("Instantly heal " + HealthHeal.heals[1] * tier + " core.");

        case 12:
            return("Instantly heal " + HealthHeal.heals[2] * tier + " energy.");

        case 13:
            return("+" + Speed.boost * tier + " speed.");

        case 17:
            return("Passively increases shell regen by " + ShellRegen.regen * tier + " points.");

        case 18:
            return("Passively increases maximum shell by " + ShellMax.max * tier + " points.");

        case 19:
            return("Passively increases energy regen by " + ShellRegen.regen * tier + " points.");

        case 20:
            return("Passively increases maximum energy by " + ShellMax.max * tier + " points.");

        case 21:
            return("Passively increases the maximum allowed number of controlled units by " + Command.commandUnitIncrease + ".");

        case 24:
            return("Become invisible to enemies.");

        case 25:
            return("All weapon damage increased by 150.");

        case 26:
            return("Instantly heals self and nearby allies by +500 shell and +500 core.");

        case 27:
            return("Immobilizes the target.");

        case 28:
            return("Respawn at base.");

        case 29:
            return("Absorb damage and turn it into energy.");

        case 30:
            return("Temporarily increase shell regen.");

        case 31:
            return("Temporarily increase core... wait, this isn't supposed to exist!");

        case 32:
            return("Temporarily increase energy regen.");

        case 33:
            return("Disrupt enemy ability cooldowns.");

        case 34:
            return("Makes allies stronger.");

        case 35:
            return("Temporarily pulls you to your tractor target.");

        case 36:
            return($"Stationary projectile that deals {Bomb.bombDamage} damage. \nProjectile lasts {45F * tier} seconds.");

        case 37:
            return($"Slow moving beam that deals {IonLineController.damageC} damage per second for 5 seconds. \nBeam costs {IonLineController.energyC} energy per");

        default:
            return("Description unset");
        }
    }