Example #1
0
 private void HandleIsHeal(EAbility key, string value)
 {
     if (value.ToLowerInvariant().Equals("true"))
     {
         AbilityTable.Instance.Table[key].Data.IsHeal = true;
     }
 }
Example #2
0
 private void HandleSingleFXRandomTranslate(EAbility key, string value)
 {
     if (value.ToLowerInvariant().Equals("true"))
     {
         AbilityTable.Instance.Table[key].Data.SingleFXRandomTranslate = true;
     }
 }
Example #3
0
 private void HandleCustomGraphics(EAbility key, string value)
 {
     if (value.ToLowerInvariant().Equals("true"))
     {
         AbilityTable.Instance.Table[key].Data.CustomGraphics = true;
     }
 }
Example #4
0
 private void HandleHostile(EAbility key, string value)
 {
     if (value.ToLowerInvariant().Equals("false"))
     {
         AbilityTable.Instance.Table[key].Data.Hostile = false;
     }
 }
Example #5
0
 public void Tick()
 {
     QAbility?.Tick();
     WAbility?.Tick();
     EAbility?.Tick();
     RAbility?.Tick();
 }
Example #6
0
    public void ChangePlayerAbility(EAbility type)
    {
        string soundName = "ActivePickup";

        // necessary guard, as this method gets called before audioManager is intialized
        if (audioManager != null)
        {
            audioManager.Play(soundName);
        }

        m_chosenAbility = m_playerAbilities[(int)type].Ability;

        switch (m_chosenAbility)
        {
        case PlayerController.EAbility.Dash:
            m_cooldownReady.color = Color.blue;
            break;

        case PlayerController.EAbility.ProjectileExplosion:
            m_cooldownReady.color = Color.red;
            break;

        case PlayerController.EAbility.Slowmo:
            m_cooldownReady.color = Color.yellow;
            break;
        }
    }
Example #7
0
        private void AddPrereq(EAbility dependent, EAbility prereq)
        {
            SkillNode dependentNode = m_SkillTree[(int)dependent];
            SkillNode prereqNode    = m_SkillTree[(int)prereq];

            prereqNode.AddDependent(dependentNode);
            dependentNode.AddPrereq(prereqNode);
        }
Example #8
0
        private void AddAntireq(EAbility antireq1, EAbility antireq2)
        {
            SkillNode antireqNode1 = m_SkillTree[(int)antireq1];
            SkillNode antireqNode2 = m_SkillTree[(int)antireq2];

            antireqNode1.AddAntireq(antireqNode2);
            antireqNode2.AddAntireq(antireqNode1);
        }
Example #9
0
        private void HandleResistType(EAbility type, string s)
        {
            var resist = EResistType.None;

            if (EnumUtil <EResistType> .TryGetEnumValue(s, ref resist))
            {
                AbilityTable.Instance.Table[type].Data.Resist = resist;
            }
        }
Example #10
0
        private void HandleInjuries(EAbility type, string s)
        {
            var injury = EInjury.None;

            if (EnumUtil <EInjury> .TryGetEnumValue(s, ref injury))
            {
                AbilityTable.Instance.Table[type].Data.Injuries.Add(injury);
            }
        }
Example #11
0
        private void HandleCastType(EAbility key, string value)
        {
            var type = ECastType.None;

            if (EnumUtil <ECastType> .TryGetEnumValue(value, ref type))
            {
                AbilityTable.Instance.Table[key].Data.CastType = type;
            }
        }
Example #12
0
            private int remainingPrereqs;        // Count of unlearnt

            public SkillNode(EAbility skillType)
            {
                type             = skillType;
                status           = ESkillStatus.Learnable;
                prereqs          = new List <SkillNode>();
                antireqs         = new List <SkillNode>();
                dependents       = new List <SkillNode>();
                remainingPrereqs = 0;
            }
Example #13
0
        public void SetAbility(EAbility a, bool lWeapon, bool isWeapon)
        {
            this._ability      = a;
            this._lWeapon      = lWeapon;
            this._isWpnAbility = isWeapon;
            var img = this._imgHandle.GetComponent <Image>();

            img.sprite = GUISpriteLoader.Instance.GetAbilityBtnImg(a);
            img.transform.localScale = ViewParams.WPN_IMG_SCALE;
        }
Example #14
0
        public void Tick()
        {
            QAbility?.Tick();
            WAbility?.Tick();
            EAbility?.Tick();
            RAbility?.Tick();

            HPRegen?.Tick();
            MPRegen?.Tick();
            State?.Tick();
            --Game.Player.Hunger;
        }
Example #15
0
        public Sprite GetAbilityBtnImg(EAbility ability)
        {
            var path  = StringUtil.PathBuilder(ICON_PATH, "Icon", EXTENSION);
            var stuff = Resources.LoadAll(path);
            int index = 1;

            if (AbilityTable.Instance.Table.ContainsKey(ability))
            {
                index = AbilityTable.Instance.Table[ability].Data.IconSprite;
            }
            return(stuff[index + 1] as Sprite);
        }
Example #16
0
        private void HandleEffects(XElement el, string value, EAbility key)
        {
            var type = EEffect.None;

            foreach (var att in el.Attributes())
            {
                if (EnumUtil <EEffect> .TryGetEnumValue(att.Value, ref type))
                {
                    var effect = EffectBuilder.Instance.BuildEffect(el, type);
                    this._table.Table[key].Data.Effects.Add(effect);
                }
            }
        }
Example #17
0
        private void HandleSprites(EAbility key, string value)
        {
            var csv = value.Split(',');

            foreach (var v in csv)
            {
                int parsed = 0;
                if (int.TryParse(v, out parsed))
                {
                    AbilityTable.Instance.Table[key].Data.Sprites.Add(parsed);
                }
            }
        }
Example #18
0
 public MAbility CreateNewObject(EAbility ability)
 {
     try
     {
         var proto = AbilityTable.Instance.Table[ability];
         return(proto.Copy());
     }
     catch (Exception e)
     {
         Debug.LogError(e);
         return(null);
     }
 }
Example #19
0
        private void HandleShapeshiftSprites(XElement element, EAbility type)
        {
            var v = AbilityTable.Instance.Table[type] as Shapeshift;

            foreach (var ele in element.Elements())
            {
                switch (ele.Name.ToString())
                {
                case ("CharAttackHead"): { v.Info.CharAttackHead = int.Parse(ele.Value); } break;

                case ("CharAttackTorso"): { v.Info.CharAttackTorso = int.Parse(ele.Value); } break;

                case ("CharHeadDead"): { v.Info.CharHeadDead = int.Parse(ele.Value); } break;

                case ("CharHeadFlinch"): { v.Info.CharHeadFlinch = int.Parse(ele.Value); } break;

                case ("CharHead"): { v.Info.CharHead = int.Parse(ele.Value); } break;

                case ("CharTorso"): { v.Info.CharTorso = int.Parse(ele.Value); } break;
                }
            }
        }
Example #20
0
        public void AcquireSkill(EAbility skill)
        {
            SkillNode newSkill = m_SkillTree[(int)skill];

            switch (newSkill.GetStatus())
            {
            case ESkillStatus.Learnable:
                GuiOutput.Log(String.Format("{0} Acquired!", skill));
                newSkill.Acquire();
                break;

            case ESkillStatus.MissingPrereq:
                GuiOutput.Log("MISSING PREREQ");
                break;

            case ESkillStatus.Unlearnable:
                GuiOutput.Log("UNLEARNABLE");
                break;

            case ESkillStatus.Acquired:
                GuiOutput.Log("ALREADY LEARNT");
                break;
            }
        }
Example #21
0
        private void HandleIndex(EAbility type, XElement ele, string mod, string value)
        {
            double v = 1;

            double.TryParse(value, out v);
            switch (mod)
            {
            case ("AccMod"): { this._table.Table[type].Data.AccMod = v; } break;

            case ("AoE"): { this._table.Table[type].Data.AoE = v; } break;

            case ("APCost"): { this._table.Table[type].Data.APCost = (int)v; } break;

            case ("ArmorIgnoreMod"): { this._table.Table[type].Data.ArmorIgnoreMod = v; } break;

            case ("ArmorPierceMod"): { this._table.Table[type].Data.ArmorPierceMod = v; } break;

            case ("BlockIgnoreMod"): { this._table.Table[type].Data.BlockIgnoreMod = v; } break;

            case ("ECastType"): { this.HandleCastType(type, value); } break;

            case ("CastDuration"): { this._table.Table[type].Data.CastDuration = (int)v; } break;

            case ("CustomGraphics"): { this.HandleCustomGraphics(type, value); } break;

            case ("DamageMod"): { this._table.Table[type].Data.DamageMod = double.Parse(value); } break;

            case ("Description"): { this._table.Table[type].Data.Description = value; } break;

            case ("DisplayDamage"): { this.HandleDisplayDamage(type, value); } break;

            case ("DmgPerPower"): { this._table.Table[type].Data.DmgPerPower = double.Parse(value); } break;

            case ("Duration"): { this._table.Table[type].Data.Duration = double.Parse(value); } break;

            case ("DodgeMod"): { this._table.Table[type].Data.DodgeMod = v; } break;

            case ("EEffect"): { this.HandleEffects(ele, value, type); } break;

            case ("FatigueCost"): { this._table.Table[type].Data.FatigueCost = (int)v; } break;

            case ("FlatDamage"): { this._table.Table[type].Data.FlatDamage = v; } break;

            case ("Hostile"): { this.HandleHostile(type, value); } break;

            case ("HitsTiles"): { this.HandleHitsTiles(type, value); } break;

            case ("IconSprite"): { this._table.Table[type].Data.IconSprite = (int)v; } break;

            case ("IsHeal"): { this.HandleIsHeal(type, value); } break;

            case ("Injury"): { this.HandleInjuries(type, value); } break;

            case ("MaxSprites"): { this._table.Table[type].Data.MaxSprites = (int)v; } break;

            case ("MeleeBlockChanceMod"): { this._table.Table[type].Data.MeleeBlockChanceMod = v; } break;

            case ("MinSprites"): { this._table.Table[type].Data.MinSprites = (int)v; } break;

            case ("ParryModMod"): { this._table.Table[type].Data.ParryModMod = v; } break;

            case ("ProcessDamage"): { this.HandleProcessDamage(type, value); } break;

            case ("Range"): { this._table.Table[type].Data.Range = (int)v; } break;

            case ("RangeBlockMod"): { this._table.Table[type].Data.RangeBlockMod = v; } break;

            case ("RechargeTime"): { this._table.Table[type].Data.RechargeTime = v; } break;

            case ("EResistType"): { this.HandleResistType(type, value); } break;

            case ("ShapeshiftSprites"): { this.HandleShapeshiftSprites(ele, type); } break;

            case ("ShieldDamageMod"): { this._table.Table[type].Data.ShieldDamageMod = v; } break;

            case ("SingleFXRandomTranslate"): { this.HandleSingleFXRandomTranslate(type, value); } break;

            case ("Sprites"): { this.HandleSprites(type, value); } break;

            case ("SpellLevel"): { this._table.Table[type].Data.SpellLevel = (int)v; } break;
            }
        }
Example #22
0
 public MAbility(EAbility t) : base(t)
 {
 }
Example #23
0
 public AAbility(EAbility type)
 {
     this._data  = new AbilityData();
     this._logic = new AbilityLogic();
     this._type  = type;
 }
Example #24
0
 public Shapeshift(EAbility type) : base(type)
 {
     this.Info = new ShapeshiftInfo();
 }
Example #25
0
        public void HandleType(EAbility type)
        {
            var table = AbilityTable.Instance.Table;

            switch (type)
            {
            case (EAbility.Aim): { table.Add(type, new Aim()); } break;

            case (EAbility.Attack_Of_Opportunity): { table.Add(type, new AttackOfOpportunity()); } break;

            case (EAbility.Bite): { table.Add(type, new Bite()); } break;

            case (EAbility.Bulldoze): { table.Add(type, new Bulldoze()); } break;

            case (EAbility.Break_Armor): { table.Add(type, new BreakArmor()); } break;

            case (EAbility.Break_Shield): { table.Add(type, new BreakShield()); } break;

            case (EAbility.Charge): { table.Add(type, new Charge()); } break;

            case (EAbility.Cerebral_Nova): { table.Add(type, new CerebralNova()); } break;

            case (EAbility.Chop): { table.Add(type, new Chop()); } break;

            case (EAbility.Crush): { table.Add(type, new Crush()); } break;

            case (EAbility.Eldritch_Chomp): { table.Add(type, new EldrtichChomp()); } break;

            case (EAbility.Feeblemind): { table.Add(type, new FeebleMind()); } break;

            case (EAbility.Fire): { table.Add(type, new Fire()); } break;

            case (EAbility.Healing_Touch): { table.Add(type, new HealingTouch()); } break;

            case (EAbility.Gash): { table.Add(type, new Gash()); } break;

            case (EAbility.Great_Strike): { table.Add(type, new GreatStrike()); } break;

            case (EAbility.Hadoken): { table.Add(type, new Hadoken()); } break;

            case (EAbility.Haste_Song): { table.Add(type, new HasteSong()); } break;

            case (EAbility.Hold_Person): { table.Add(type, new HoldPerson()); } break;

            case (EAbility.Intellect): { table.Add(type, new Intellect()); } break;

            case (EAbility.Kamehameha): { table.Add(type, new Kamehameha()); } break;

            case (EAbility.Maim): { table.Add(type, new Maim()); } break;

            case (EAbility.Mental_Laceration): { table.Add(type, new MentalLaceration()); } break;

            case (EAbility.Moonbeam): { table.Add(type, new Moonbeam()); } break;

            case (EAbility.Mind_Blast): { table.Add(type, new MindBlast()); } break;

            case (EAbility.Mind_Hunt): { table.Add(type, new MindHunt()); } break;

            case (EAbility.Orc_Metal): { table.Add(type, new OrcMetal()); } break;

            case (EAbility.Pain_Link): { table.Add(type, new PainLink()); } break;

            case (EAbility.Pierce): { table.Add(type, new Pierce()); } break;

            case (EAbility.Psychic_Artillery): { table.Add(type, new PsychicArtillery()); } break;

            case (EAbility.Pull): { table.Add(type, new Pull()); } break;

            case (EAbility.Quick_Heal): { table.Add(type, new QuickHeal()); } break;

            case (EAbility.Quick_Barrier): { table.Add(type, new QuickBarrier()); } break;

            case (EAbility.Rejuvenation): { table.Add(type, new Rejuvenation()); } break;

            case (EAbility.Riposte): { table.Add(type, new Riposte()); } break;

            case (EAbility.Scatter): { table.Add(type, new Scatter()); } break;

            case (EAbility.Sever): { table.Add(type, new Sever()); } break;

            case (EAbility.Soothing_Mist): { table.Add(type, new SoothingMist()); } break;

            case (EAbility.Shield_Bash): { table.Add(type, new ShieldBash()); } break;

            case (EAbility.Shield_Wall): { table.Add(type, new ShieldWall()); } break;

            case (EAbility.Shove): { table.Add(type, new Shove()); } break;

            case (EAbility.Slash): { table.Add(type, new Slash()); } break;

            case (EAbility.Slime_Rain): { table.Add(type, new SlimeRain()); } break;

            case (EAbility.Spear_Wall): { table.Add(type, new SpearWall()); } break;

            case (EAbility.Stab): { table.Add(type, new Stab()); } break;

            case (EAbility.Stun): { table.Add(type, new Stun()); } break;

            case (EAbility.Suppress_Area): { table.Add(type, new SuppressArea()); } break;

            case (EAbility.Summon_Shoggoth): { table.Add(type, new SummonShoggoth()); } break;

            case (EAbility.Sunbeam): { table.Add(type, new Sunbeam()); } break;

            case (EAbility.Weenlight_Sonata): { table.Add(type, new WeenlightSonata()); } break;

            case (EAbility.Wereween): { table.Add(type, new Wereween()); } break;

            case (EAbility.Wide_Strike): { table.Add(type, new WideStrike()); } break;

            case (EAbility.Whirlwind): { table.Add(type, new Whirlwind()); } break;

            case (EAbility.Wrap): { table.Add(type, new Wrap()); } break;
            }
        }
Example #26
0
 public bool HasSkill(EAbility skill)
 {
     return(m_SkillTree.HasSkill(skill));
 }
Example #27
0
        public sbyte GetAbility(EAbility eAbility)
        {
            switch (eAbility)
            {
            case EAbility.NONE: return(0);

            case EAbility.Control: return(uControl);

            case EAbility.Corners: return(uCorners);

            case EAbility.Crossing: return(uCrossing);

            case EAbility.Dribbling: return(uDribbling);

            case EAbility.Finishing: return(uFinishing);

            case EAbility.Flair: return(uFlair);

            case EAbility.FreeKicks: return(uFreeKicks);

            case EAbility.LongPassing: return(uLongPassing);

            case EAbility.LongShots: return(uLongShots);

            case EAbility.Marking: return(uMarking);

            case EAbility.Passing: return(uPassing);

            case EAbility.Penalties: return(uPenalties);

            case EAbility.Tackling: return(uTackling);

            case EAbility.Volleying: return(uVolleying);

            case EAbility.Aggression: return(uAggression);

            case EAbility.Composure: return(uComposure);

            case EAbility.Concentration: return(uConcentration);

            case EAbility.Creativity: return(uCreativity);

            case EAbility.Determination: return(uDetermination);

            case EAbility.Leadership: return(uLeadership);

            case EAbility.Movement: return(uMovement);

            case EAbility.Positioning: return(uPositioning);

            case EAbility.WorkRate: return(uWorkRate);

            case EAbility.Pace: return(uPace);

            case EAbility.Stamina: return(uStamina);

            case EAbility.Strength: return(uStrength);

            case EAbility.AerialAbility: return(uAerialAbility);

            case EAbility.LongThrows: return(uLongThrows);

            case EAbility.CommandOfArea: return(uCommandOfArea);

            case EAbility.Distribution: return(uDistribution);

            case EAbility.Handling: return(uHandling);

            case EAbility.OneOnOnes: return(uOneOnOnes);

            case EAbility.SavingPenalties: return(uSavingPenalties);

            case EAbility.ShotStopping: return(uShotStopping);

            case EAbility.SpeedRat: return((sbyte)(uPace + uStamina + uMovement + uWorkRate));

            case EAbility.PassingRat: return((sbyte)(uPassing + uCrossing + uDistribution + uLongPassing));

            case EAbility.SetPeicesRat: return((sbyte)(uFreeKicks + uCorners + uPenalties + uLongThrows));

            case EAbility.FocusRat: return((sbyte)(uDetermination + uComposure + uLeadership + uConcentration));

            case EAbility.SkillRat: return((sbyte)(uFlair + uDribbling + uCreativity + uControl));

            case EAbility.StrengthRat: return((sbyte)(uStrength + uAggression));

            case EAbility.AerialRat: return((sbyte)(uAerialAbility));

            case EAbility.ShootingRat: return((sbyte)(uLongShots + uFinishing + uVolleying));

            case EAbility.DefendingRat: return((sbyte)(uTackling + uMarking + uPositioning));

            case EAbility.PositioningRat: return((sbyte)(uPositioning));

            case EAbility.GoalkeepingRat: return((sbyte)(uCommandOfArea + uDistribution + uHandling + uOneOnOnes + uSavingPenalties + uShotStopping));

            default:
                return(0);
            }
        }
Example #28
0
 public bool HasSkill(EAbility skill)
 {
     return(m_SkillTree[(int)skill].GetStatus() == ESkillStatus.Acquired);
 }
Example #29
0
 public void AcquireSkill(EAbility skill)
 {
     m_SkillTree.AcquireSkill(skill);
 }
Example #30
0
 private void HandleType(EAbility type)
 {
     this._mediator.HandleType(type);
 }