Exemplo n.º 1
0
        public override void CheckAbnormality(S_ABNORMALITY_END p)
        {
            if (!Game.IsMe(p.TargetId))
            {
                return;
            }
            if (!IsViewModelAvailable <BerserkerLayoutVM>(out var vm))
            {
                return;
            }

            CheckUnleashAbnormals(p);

            switch (p.AbnormalityId)
            {
            case BloodlustId:
                vm !.Bloodlust.StopEffect();
                break;

            case FieryRageId:
                vm !.FieryRage.StopEffect();
                break;

            case UnleashId:
                vm !.Unleash.StopEffect();
                vm !.IsUnleashOn  = false;
                vm !.IsUnleashOff = true;
                break;
            }
        }
Exemplo n.º 2
0
        /// <inheritdoc />
        public MapBonus Convert(MapBonusDTO value, object state)
        {
            var entity = new Bloodlust();

            this.Merge(entity, value, state);
            return(entity);
        }
Exemplo n.º 3
0
        /// <summary>Converts the given object of type <see cref="MapBonusDataContract"/> to an object of type <see cref="MapBonus"/>.</summary>
        /// <param name="value">The value to convert.</param>
        /// <param name="state"></param>
        /// <returns>The converted value.</returns>
        public MapBonus Convert(MapBonusDataContract value, object state)
        {
            if (value == null)
            {
                throw new ArgumentNullException("value", "Precondition: value != null");
            }

            MapBonus mapBonus;

            if (string.Equals(value.Type, "bloodlust", StringComparison.OrdinalIgnoreCase))
            {
                mapBonus = new Bloodlust();
            }
            else
            {
                mapBonus = new UnknownMapBonus();
            }

            var owner = value.Owner;

            if (owner != null)
            {
                mapBonus.Owner = this.converterForTeamColor.Convert(owner, state);
            }

            return(mapBonus);
        }
Exemplo n.º 4
0
        public Skill CreateSkill(Player player)
        {
            List <Skill> playerSkills = player.ListOfSkills;
            Skill        known        = CheckContent(playerSkills);

            if (known == null)
            {
                Bloodlust s1 = new Bloodlust();
                Heal      s2 = new Heal();
                Rage      s3 = new Rage();

                List <Skill> tmp = new List <Skill>();
                if (s1.MinimumLevel <= player.Level)
                {
                    tmp.Add(s1);
                }
                if (s2.MinimumLevel <= player.Level)
                {
                    tmp.Add(s2);
                }
                if (s3.MinimumLevel <= player.Level)
                {
                    tmp.Add(s3);
                }
                if (tmp.Count == 0)
                {
                    return(null);
                }
                return(tmp[Index.RNG(0, tmp.Count)]);
            }
            else if (known.decoratedSkill == null)
            {
                BloodlustDecorator s1  = new BloodlustDecorator(known);
                HealDecorator      s2  = new HealDecorator(known);
                RageDecorator      s3  = new RageDecorator(known);
                List <Skill>       tmp = new List <Skill>();
                if (s1.MinimumLevel <= player.Level)
                {
                    tmp.Add(s1);
                }
                if (s3.MinimumLevel <= player.Level)
                {
                    tmp.Add(s3);
                }
                if (tmp.Count == 0)
                {
                    return(null);
                }
                return(tmp[Index.RNG(0, tmp.Count)]);
            }
            else
            {
                return(null);
            }
        }
Exemplo n.º 5
0
 // Use this for initialization
 void Start()
 {
     speedModifiers = new List <SpeedModifier>();
     rb             = GetComponent <Rigidbody>();
     playerStat     = GetComponent <PlayerStatus>();
     playerStat.StartPlayerStatus();
     blood = GetComponent <Bloodlust>();
     blood.StartBloodlust();
     dash = GetComponent <Dash>();
     dash.StartDash();
     swordAttack         = Instantiate(cleaveAttacks[0], bodyAnimator.transform.position, bodyAnimator.transform.rotation, bodyAnimator.transform);
     currentCleaveAttack = Instantiate(cleaveAttacks[MutationManager.Instance.TentacleMutation.CurrentLevel], bodyAnimator.transform.position, bodyAnimator.transform.rotation, bodyAnimator.transform);
     currentCleaveAttack.SetActive(false);
     bodyAnimator.SetInteger("CleaveLevel", MutationManager.Instance.TentacleMutation.CurrentLevel);
     stunned       = false;
     isStunnable   = true;
     swordReady    = true;
     hopping       = false;
     rot           = 0;
     attackTimer   = 1000;
     cleaveTimer   = 1000;
     currencySound = GetComponent <AudioSource>();
 }
Exemplo n.º 6
0
 // Implement this method in a buddy class to set properties that are specific to 'Bloodlust' (if any)
 partial void Merge(Bloodlust entity, MapBonusDTO dto, object state);
Exemplo n.º 7
0
 public BuffProxy(GetUnitDelegate del, AuraProxy ar)
     : base(del)
 {
     Source = ar;
     pre_steady_focus = new PreSteadyFocus(this);
     bloodlust = new Bloodlust(this);
     potion = new Potion(this);
     anytrinket = new AnyTrinket(this);
     incanters_flow = new IncantersFlow(this);
     raging_blow = new BuffInternal(dbc.Spells[131116], this, "raging_blow_special");
     colossus_smash = new DebuffProxy.DebuffInternal(dbc.Spells[SimcNames.debuffs["colossus_smash"].First().V2], this, "colossus_smash");
     colossus_smash_up = new DebuffProxy.DebuffInternal(dbc.Spells[SimcNames.debuffs["colossus_smash"].First().V2], this, "colossus_smash_up");
 }
Exemplo n.º 8
0
 protected virtual void OnEnable()
 {
     blood      = transform.parent.parent.GetComponent <Bloodlust>();
     playerStat = transform.parent.parent.GetComponent <PlayerStatus>();
     timer      = 0;
 }
Exemplo n.º 9
0
 void Start()
 {
     bloodlust = transform.root.GetComponent <Bloodlust>();
     text      = GetComponent <Text> ();
 }
Exemplo n.º 10
0
 void Start()
 {
     bloodlust = transform.root.GetComponent <Bloodlust>();
     image     = GetComponent <Image>();
 }