Example #1
0
 public void SetUpAbilityTabAsAbility(AbilityDataSO data)
 {
     isAbility           = true;
     isPassive           = false;
     myAbilityData       = data;
     myPassiveData       = null;
     abilityImage.sprite = data.sprite;
     AbilityInfoSheetController.Instance.BuildSheetFromData(abilityInfoSheet, data, AbilityInfoSheet.PivotDirection.Upwards);
 }
Example #2
0
    public void BuildAllTextValueViewsFromData(PassiveInfoSheet sheet, StatusIconDataSO data, int stacks)
    {
        Debug.Log("AbilityInfoSheetController.BuildAllTextValueViewsFromData() called...");

        // Set up text files
        sheet.nameText.text = data.statusName;
        TextLogic.SetStatusIconDescriptionText(data.statusName, sheet.descriptionText, stacks);
        sheet.abilityImage.sprite = data.statusSprite;
    }
Example #3
0
    public void BuildTalentInfoPanelFromPassiveData(Talent talent)
    {
        // Set button image
        StatusIconDataSO data = StatusIconLibrary.Instance.GetStatusIconByName(talent.talentName);

        talent.talentImage.sprite = data.statusSprite;

        PassiveInfoSheetController.Instance.BuildSheetFromData(talent.passiveInfoSheet, data, talent.passiveStacks, PassiveInfoSheet.PivotDirection.Upwards);
        TextLogic.SetStatusIconDescriptionText(talent.talentName, talent.passiveInfoSheet.descriptionText, talent.passiveStacks);
    }
Example #4
0
    public void SetUpAbilityTabAsPassive(StatusIconDataSO data, int stacks)
    {
        isPassive     = true;
        isAbility     = false;
        myAbilityData = null;
        myPassiveData = data;
        passiveStacks = stacks;

        passiveImage.sprite = data.statusSprite;
        PassiveInfoSheetController.Instance.BuildSheetFromData(passiveInfoSheet, data, stacks, PassiveInfoSheet.PivotDirection.Upwards);
    }
Example #5
0
 public void AddNewStatusIcon(StatusIconDataSO iconData, int stacksGained)
 {
     // only create an icon if the the effects' stacks are at least 1 or -1
     if (stacksGained != 0)
     {
         Debug.Log("StatusManager.AddNewStatusProcess() called");
         GameObject newIconGO = Instantiate(statusIconPrefab, gameObject.transform);
         StatusIcon newStatus = newIconGO.GetComponent <StatusIcon>();
         newStatus.InitializeSetup(iconData);
         newStatus.ModifyStatusIconStacks(stacksGained);
         myStatusIcons.Add(newStatus);
     }
 }
Example #6
0
    // Initialization + Setup
    #region
    public void InitializeSetup(StatusIconDataSO iconData)
    {
        myIconData       = iconData;
        statusSprite     = iconData.statusSprite;
        iconImage.sprite = statusSprite;

        statusName = iconData.statusName;
        if (iconData.showStackCount)
        {
            statusStacksText.gameObject.SetActive(true);
        }

        statusStacksText.text = statusStacks.ToString();
    }
Example #7
0
    // Initialization + Setup
    #region
    public void InitializeSetup(string passiveName, int stacks)
    {
        // Get data
        StatusIconDataSO data = StatusIconLibrary.Instance.GetStatusIconByName(passiveName);

        // Build main views and properties from status icon data
        attributeImage.sprite  = data.statusSprite;
        attributeName          = data.statusName;
        attributeNameText.text = data.statusName;

        // Build info panel pop up window
        PassiveInfoSheetController.Instance.BuildSheetFromData(passiveInfoSheet, data, stacks, PassiveInfoSheet.PivotDirection.Upwards);
        TextLogic.SetStatusIconDescriptionText(data.statusName, passiveInfoSheet.descriptionText, stacks);

        // Set stack count + components
        ModifyStacks(stacks);
        if (data.showStackCount == false)
        {
            attributeStacksText.gameObject.SetActive(false);
        }
    }
Example #8
0
    // Logic
    #region
    public StatusIconDataSO GetStatusIconByName(string name)
    {
        StatusIconDataSO iconReturned = null;

        foreach (StatusIconDataSO icon in allIcons)
        {
            if (icon.statusName == name)
            {
                iconReturned = icon;
                break;
            }
        }

        if (iconReturned == null)
        {
            Debug.Log("StatusIconLibrary.GetStatusIconByName() could not find a status with the name " +
                      name + ", returning null...");
        }

        return(iconReturned);
    }
Example #9
0
    // Add, Update, and Remove Status Icon Logic
    #region
    public void StartAddStatusProcess(StatusIconDataSO iconData, int stacksGainedOrLost)
    {
        Debug.Log("StartAddStatusProcess() called");

        if (myStatusIcons.Count > 0)
        {
            StatusIconDataSO si = null;
            int  stacks         = 0;
            bool iconUpdated    = false;

            foreach (StatusIcon icon in myStatusIcons)
            {
                if (iconData.statusName == icon.statusName)
                {
                    // Icon already exists in character's list
                    UpdateStatusIcon(icon, stacksGainedOrLost);
                    iconUpdated = true;
                    break;
                }

                else
                {
                    si     = iconData;
                    stacks = stacksGainedOrLost;
                }
            }

            if (iconUpdated == false)
            {
                AddNewStatusIcon(si, stacks);
            }
        }
        else
        {
            AddNewStatusIcon(iconData, stacksGainedOrLost);
        }
    }
Example #10
0
 // Initialization + Setup
 #region
 public void BuildSheetFromData(PassiveInfoSheet sheet, StatusIconDataSO data, int stacks, PassiveInfoSheet.PivotDirection pivotDirection)
 {
     BuildAllTextValueViewsFromData(sheet, data, stacks);
     SetPivotDirection(sheet, pivotDirection);
     RefreshAllLayoutGroups(sheet);
 }
Example #11
0
    public void BuildInfoPanelTabElements(ItemCardInfoTab tab, string passiveName, int stacks)
    {
        Debug.Log("ItemCardPanelHover.BuildInfoPanelTabElements() called for " + passiveName);

        PassiveInfoSheet.PivotDirection pivotDirection = PassiveInfoSheet.PivotDirection.Downwards;
        StatusIconDataSO iconData = null;

        if (passiveName == "BonusStrength")
        {
            iconData = StatusIconLibrary.Instance.GetStatusIconByName("Bonus Strength");
        }
        else if (passiveName == "BonusWisdom")
        {
            iconData = StatusIconLibrary.Instance.GetStatusIconByName("Bonus Wisdom");
        }
        else if (passiveName == "BonusDexterity")
        {
            iconData = StatusIconLibrary.Instance.GetStatusIconByName("Bonus Dexterity");
        }
        else if (passiveName == "BonusStamina")
        {
            iconData = StatusIconLibrary.Instance.GetStatusIconByName("Bonus Stamina");
        }
        else if (passiveName == "BonusInitiative")
        {
            iconData = StatusIconLibrary.Instance.GetStatusIconByName("Bonus Initiative");
        }
        else if (passiveName == "BonusMobility")
        {
            iconData = StatusIconLibrary.Instance.GetStatusIconByName("Bonus Mobility");
        }
        else if (passiveName == "BonusCritical")
        {
            iconData = StatusIconLibrary.Instance.GetStatusIconByName("Bonus Critical");
        }
        else if (passiveName == "BonusDodge")
        {
            iconData = StatusIconLibrary.Instance.GetStatusIconByName("Bonus Dodge");
        }
        else if (passiveName == "BonusParry")
        {
            iconData = StatusIconLibrary.Instance.GetStatusIconByName("Bonus Parry");
        }
        else if (passiveName == "BonusMaxEnergy")
        {
            iconData = StatusIconLibrary.Instance.GetStatusIconByName("Bonus Max Energy");
        }
        else if (passiveName == "BonusMeleeRange")
        {
            iconData = StatusIconLibrary.Instance.GetStatusIconByName("Bonus Melee Range");
        }
        else if (passiveName == "BonusAuraSize")
        {
            iconData = StatusIconLibrary.Instance.GetStatusIconByName("Radiance");
        }
        else if (passiveName == "BonusFireDamage")
        {
            // TO DO: make a status icon data SO object for critical
        }
        else if (passiveName == "BonusFrostDamage")
        {
            // TO DO: make a status icon data SO object for critical
        }
        else if (passiveName == "BonusAirDamage")
        {
            // TO DO: make a status icon data SO object for critical
        }
        else if (passiveName == "BonusPoisonDamage")
        {
            // TO DO: make a status icon data SO object for critical
        }
        else if (passiveName == "BonusShadowDamage")
        {
            // TO DO: make a status icon data SO object for critical
        }
        else if (passiveName == "Enrage")
        {
            iconData = StatusIconLibrary.Instance.GetStatusIconByName("Enrage");
        }
        else if (passiveName == "Poisonous")
        {
            iconData = StatusIconLibrary.Instance.GetStatusIconByName("Poisonous");
        }
        else if (passiveName == "Immolation")
        {
            iconData = StatusIconLibrary.Instance.GetStatusIconByName("Immolation");
        }
        else if (passiveName == "Cautious")
        {
            iconData = StatusIconLibrary.Instance.GetStatusIconByName("Cautious");
        }
        else if (passiveName == "Growing")
        {
            iconData = StatusIconLibrary.Instance.GetStatusIconByName("Growing");
        }
        else if (passiveName == "Fast Learner")
        {
            iconData = StatusIconLibrary.Instance.GetStatusIconByName("Fast Learner");
        }
        else if (passiveName == "Pierce")
        {
            iconData = StatusIconLibrary.Instance.GetStatusIconByName("Pierce");
        }
        else if (passiveName == "Unwavering")
        {
            iconData = StatusIconLibrary.Instance.GetStatusIconByName("Unwavering");
        }
        else if (passiveName == "Flux")
        {
            iconData = StatusIconLibrary.Instance.GetStatusIconByName("Flux");
        }
        else if (passiveName == "HawkEye")
        {
            iconData = StatusIconLibrary.Instance.GetStatusIconByName("Hawk Eye");
        }
        else if (passiveName == "Thorns")
        {
            iconData = StatusIconLibrary.Instance.GetStatusIconByName("Thorns");
        }
        else if (passiveName == "Opportunist")
        {
            iconData = StatusIconLibrary.Instance.GetStatusIconByName("Opportunist");
        }
        else if (passiveName == "BonusPowerLimit")
        {
            iconData = StatusIconLibrary.Instance.GetStatusIconByName("Bonus Power Limit");
        }
        else if (passiveName == "BonusAllResistances")
        {
            iconData = StatusIconLibrary.Instance.GetStatusIconByName("Bonus All Resistances");
        }
        else if (passiveName == "Stealth")
        {
            iconData = StatusIconLibrary.Instance.GetStatusIconByName("Stealth");
        }
        else if (passiveName == "TrueSight")
        {
            iconData = StatusIconLibrary.Instance.GetStatusIconByName("True Sight");
        }
        else if (passiveName == "Slippery")
        {
            iconData = StatusIconLibrary.Instance.GetStatusIconByName("Slippery");
        }
        else if (passiveName == "Unstoppable")
        {
            iconData = StatusIconLibrary.Instance.GetStatusIconByName("Unstoppable");
        }
        else if (passiveName == "PerfectAim")
        {
            iconData = StatusIconLibrary.Instance.GetStatusIconByName("Perfect Aim");
        }
        else if (passiveName == "Virtuoso")
        {
            iconData = StatusIconLibrary.Instance.GetStatusIconByName("Virtuoso");
        }
        else if (passiveName == "Riposte")
        {
            iconData = StatusIconLibrary.Instance.GetStatusIconByName("Riposte");
        }
        else if (passiveName == "ShadowForm")
        {
            iconData = StatusIconLibrary.Instance.GetStatusIconByName("Shadow Form");
        }


        if (iconData != null)
        {
            PassiveInfoSheetController.Instance.BuildSheetFromData(tab.passiveInfoSheet, iconData, stacks, pivotDirection);
            TextLogic.SetStatusIconDescriptionText(iconData.statusName, tab.passiveInfoSheet.descriptionText, stacks);
        }
    }
Example #12
0
    public void ApplyPassiveEffectToCharacter(CharacterData character, StatusIconDataSO passive, int passiveStacks)
    {
        // TO DO: this method should not belong in TalentController, find a better place for it

        if (passive.statusName == "Tenacious")
        {
            character.ModifyTenacious(passiveStacks);
        }

        else if (passive.statusName == "M*******t")
        {
            character.ModifyMasochist(passiveStacks);
        }

        else if (passive.statusName == "Last Stand")
        {
            character.ModifyLastStand(passiveStacks);
        }

        else if (passive.statusName == "Slippery")
        {
            character.ModifySlippery(passiveStacks);
        }

        else if (passive.statusName == "Riposte")
        {
            character.ModifyRiposte(passiveStacks);
        }

        else if (passive.statusName == "Perfect Reflexes")
        {
            character.ModifyPerfectReflexes(passiveStacks);
        }

        else if (passive.statusName == "Opportunist")
        {
            character.ModifyOpportunist(passiveStacks);
        }

        else if (passive.statusName == "Patient Stalker")
        {
            character.ModifyPatientStalker(passiveStacks);
        }

        else if (passive.statusName == "Stealth")
        {
            character.ModifyStealth(passiveStacks);
        }

        else if (passive.statusName == "Cautious")
        {
            character.ModifyCautious(passiveStacks);
        }

        else if (passive.statusName == "Guardian Aura")
        {
            character.ModifyGuardianAura(passiveStacks);
        }

        else if (passive.statusName == "Unwavering")
        {
            character.ModifyUnwavering(passiveStacks);
        }

        else if (passive.statusName == "Fiery Aura")
        {
            character.ModifyFieryAura(passiveStacks);
        }

        else if (passive.statusName == "Immolation")
        {
            character.ModifyImmolation(passiveStacks);
        }

        else if (passive.statusName == "Demon")
        {
            character.ModifyDemon(passiveStacks);
        }

        else if (passive.statusName == "Shatter")
        {
            character.ModifyShatter(passiveStacks);
        }

        else if (passive.statusName == "Frozen Heart")
        {
            character.ModifyFrozenHeart(passiveStacks);
        }

        else if (passive.statusName == "Predator")
        {
            character.ModifyPredator(passiveStacks);
        }

        else if (passive.statusName == "Hawk Eye")
        {
            character.ModifyHawkEye(passiveStacks);
        }

        else if (passive.statusName == "Flux")
        {
            character.ModifyFlux(passiveStacks);
        }

        else if (passive.statusName == "Coup De Grace")
        {
            character.ModifyCoupDeGrace(passiveStacks);
        }

        else if (passive.statusName == "Quick Draw")
        {
            character.ModifyQuickDraw(passiveStacks);
        }

        else if (passive.statusName == "Phasing")
        {
            character.ModifyPhasing(passiveStacks);
        }

        else if (passive.statusName == "Ethereal Being")
        {
            character.ModifyEtherealBeing(passiveStacks);
        }

        else if (passive.statusName == "Encouraging Aura")
        {
            character.ModifyEncouragingAura(passiveStacks);
        }

        else if (passive.statusName == "Radiance")
        {
            character.ModifyRadiance(passiveStacks);
        }

        else if (passive.statusName == "Sacred Aura")
        {
            character.ModifySacredAura(passiveStacks);
        }

        else if (passive.statusName == "Shadow Aura")
        {
            character.ModifyShadowAura(passiveStacks);
        }

        else if (passive.statusName == "Shadow Form")
        {
            character.ModifyShadowForm(passiveStacks);
        }

        else if (passive.statusName == "Poisonous")
        {
            character.ModifyPoisonous(passiveStacks);
        }

        else if (passive.statusName == "Venomous")
        {
            character.ModifyVenomous(passiveStacks);
        }

        else if (passive.statusName == "Toxicity")
        {
            character.ModifyToxicity(passiveStacks);
        }

        else if (passive.statusName == "Toxic Aura")
        {
            character.ModifyToxicAura(passiveStacks);
        }

        else if (passive.statusName == "Storm Aura")
        {
            character.ModifyStormAura(passiveStacks);
        }

        else if (passive.statusName == "Storm Lord")
        {
            character.ModifyStormLord(passiveStacks);
        }

        // Racial passives
        else if (passive.statusName == "Forest Wisdom")
        {
            character.ModifyForestWisdom(passiveStacks);
        }
        else if (passive.statusName == "Satyr Trickery")
        {
            character.ModifySatyrTrickery(passiveStacks);
        }
        else if (passive.statusName == "Human Ambition")
        {
            character.ModifyHumanAmbition(passiveStacks);
        }
        else if (passive.statusName == "Gnollish Blood Lust")
        {
            character.ModifyGnollishBloodLust(passiveStacks);
        }
        else if (passive.statusName == "Orcish Grit")
        {
            character.ModifyOrcishGrit(passiveStacks);
        }
        else if (passive.statusName == "Free From Flesh")
        {
            character.ModifyFreeFromFlesh(passiveStacks);
        }
    }
Example #13
0
 public StatusPairing(StatusIconDataSO data, int stacks)
 {
     statusData   = data;
     statusStacks = stacks;
 }