public void AddHP(float count) { HP += count; m_Em.AddEffect(); if (HP > 200000000f) { HP = 200000000f; } hpChange.text = "+" + count.ToString("#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; } } }
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); }
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); } }
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); } }
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); } } }
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); } } }
public void AddEffect(Effect effect) { EffectManager.AddEffect(effect); }
public override void Apply() { EffectManager.AddEffect(Holder, this); }
public override void Apply() { EffectManager.AddEffect(Master, this); EffectManager.AddEffect(Slave, this); }
public override void Apply() { Subject.ClearPosition(); EffectManager.AddEffect(Holder, this); EffectManager.AddEffect(Item, this); }
public void AddEffect(Effects effect) { buffManager.AddEffect(effect); }
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; } }
public override void Apply() { EffectManager.AddEffect(Creature, this); StatusEffect.OnAdd(); }
public void ApplyEffect() { target.AddEffect(effect.CloneInitializedToSource(this)); }