예제 #1
0
 public void AddHP(float count)
 {
     HP += count;
     m_Em.AddEffect();
     if (HP > 200000000f)
     {
         HP = 200000000f;
     }
     hpChange.text = "+" + count.ToString("#0");
 }
예제 #2
0
    private void OnWeightChangeCallback(object sender, WeightChangeArgs args)
    {
        if (effectManager == null)
        {
            return;
        }

        if (args.newWeight > maxWeight)
        {
            if (effect == null)
            {
                effect               = new MovementEffect("Inventory overload", 0.2f, EffectStyle.Debuff, EffectType.Physical);
                effect.IsInfinite    = true;
                effect.ShouldBeSaved = false;
                effectManager.AddEffect(effect);
            }
        }
        else
        {
            if (effect != null)
            {
                effectManager.RemoveEffect(effect);
                effect = null;
            }
        }
    }
예제 #3
0
 public override void Apply()
 {
     foreach (var equip in Enumerable.Concat(EffectManager.GetEffects <EffectItemEquipped>(Item), EffectManager.GetEffects <EffectItemEquipped>(Wearer).Where(x => x.Wearer != Wearer || x.Slot == Slot)).ToList())
     {
         equip.Remove();
     }
     EffectManager.AddEffect(Wearer, this);
     EffectManager.AddEffect(Item, this);
 }
예제 #4
0
    private void CreateEffects()
    {
        int count = abilityData.effectData.Count;

        for (int i = 0; i < count; i++)
        {
            Effect newEffect = EffectFactory.CreateEffect(this, abilityData.effectData[i]);
            EffectManager.AddEffect(newEffect);
        }
    }
예제 #5
0
        public override void Apply()
        {
            var damage = EffectManager.GetEffects <EffectLastHit>(Holder).Where(x => x.Attacker == Attacker && x.Holder == Holder).FirstOrDefault();

            if (damage != null)
            {
                damage.Modify(TotalDamage);
            }
            else if (TotalDamage > 0)
            {
                EffectManager.AddEffect(Holder, this);
            }
        }
예제 #6
0
        public override void Apply()
        {
            var damage = EffectManager.GetEffects <EffectStatDamage>(Holder).Where(x => x.Stat == Stat && x.Holder == Holder).FirstOrDefault();

            if (damage != null)
            {
                damage.Modify(Amount);
            }
            else if (Amount > 0)
            {
                EffectManager.AddEffect(Holder, this);
            }
        }
    private void OnHitCallback(object sender, OnHitArgs args)
    {
        float rand = Random.Range(0.0f, 1.0f);

        if (rand <= probablity)
        {
            IEffect       newEffect = (effect as IEffect).Clone();
            EffectManager m         = (args.target as Behaviour).GetComponent <EffectManager>();
            if (m != null && !m.HasEffect(newEffect.Name))
            {
                m.AddEffect(newEffect);
            }
        }
    }
예제 #8
0
    public void Secondary()
    {
        if (!canUse)
        {
            return;
        }

        if (useState == PhysicalWeaponUseState.Default)
        {
            if (OnSecondary != null)
            {
                OnSecondary(this, new EventArgs());
            }

            useState = PhysicalWeaponUseState.Blocking;

            EffectManager manager = GetComponentInParent <EffectManager>();
            if (manager != null)
            {
                blockEffect = new BlockEffect(minBlockValue, maxBlockValue);
                manager.AddEffect(blockEffect);
            }
        }
    }
예제 #9
0
 public void AddEffect(Effect effect)
 {
     EffectManager.AddEffect(effect);
 }
예제 #10
0
 public override void Apply()
 {
     EffectManager.AddEffect(Holder, this);
 }
예제 #11
0
 public override void Apply()
 {
     EffectManager.AddEffect(Master, this);
     EffectManager.AddEffect(Slave, this);
 }
예제 #12
0
 public override void Apply()
 {
     Subject.ClearPosition();
     EffectManager.AddEffect(Holder, this);
     EffectManager.AddEffect(Item, this);
 }
예제 #13
0
 public void AddEffect(Effects effect)
 {
     buffManager.AddEffect(effect);
 }
예제 #14
0
        private void Character_PerformsPower(object sender, PerformsPowerEventArgs e)
        {
            if (sender == null)
            {
                return;
            }

            CharacterPower  power     = e.CharacterPower;
            ClientCharacter character = (ClientCharacter)sender;

            switch (power.Id)
            {
            case CharacterPowerIdentity.DefaultAttack:
                effectManager.AddEffect(new SwingEffect(this.GetScreenPostion(character.DrawPosition), this.GetScreenPostion(character.AimToPosition), character.IsEquiped(ItemIdentity.Bow)));
                break;

            case CharacterPowerIdentity.HardAttack:
                effectManager.AddEffect(new SwingEffect(this.GetScreenPostion(character.DrawPosition), this.GetScreenPostion(character.AimToPosition), character.IsEquiped(ItemIdentity.Bow)));
                break;

            case CharacterPowerIdentity.CriticalAttack:
                break;

            case CharacterPowerIdentity.StunAttack:
                break;

            case CharacterPowerIdentity.SlowingAttack:
                break;

            case CharacterPowerIdentity.DecreaseEnergyCost:
                break;

            case CharacterPowerIdentity.IncreaseEnergyCost:
                break;

            case CharacterPowerIdentity.DecreaseDuration:
                break;

            case CharacterPowerIdentity.IncreaseDuration:
                break;

            case CharacterPowerIdentity.Meditation:
                break;

            case CharacterPowerIdentity.AbsorbDamage:
                break;

            case CharacterPowerIdentity.DeflectDamage:
                break;

            case CharacterPowerIdentity.ShortSpeedBurst:
                break;

            case CharacterPowerIdentity.IncreaseSpeed:
                break;

            case CharacterPowerIdentity.IncreaseMaxHealth:
                break;

            case CharacterPowerIdentity.IncreaseMaxEnergy:
                break;

            case CharacterPowerIdentity.IncreaseHealthRegen:
                break;

            case CharacterPowerIdentity.IncreaseEnergyRegen:
                break;

            case CharacterPowerIdentity.Stealth:
                break;

            case CharacterPowerIdentity.IncreaseSwordPower:
                break;

            case CharacterPowerIdentity.IncreaseBowPower:
                break;

            case CharacterPowerIdentity.IncreasePlateArmor:
                break;

            case CharacterPowerIdentity.IncreaseLeatherArmor:
                break;

            case CharacterPowerIdentity.IncreaseMaxWeight:
                break;

            case CharacterPowerIdentity.Interrupt:
                break;

            default:
                break;
            }
        }
예제 #15
0
 public override void Apply()
 {
     EffectManager.AddEffect(Creature, this);
     StatusEffect.OnAdd();
 }
예제 #16
0
 public void ApplyEffect()
 {
     target.AddEffect(effect.CloneInitializedToSource(this));
 }