/// <summary> /// Reduces the attack skills and healing rating for opponent /// by -10 if trained, or -20 if specialized /// </summary> public void FightDirty_ApplyHighAttack(Creature target) { // attack debuff var spellID = GetCreatureSkill(Skill.DirtyFighting).AdvancementClass == SkillAdvancementClass.Specialized ? SpellId.DF_Specialized_AttackDebuff : SpellId.DF_Trained_AttackDebuff; var spell = new Spell(spellID); if (spell.NotFound) { return; // TODO: friendly message to install DF patch } target.EnchantmentManager.Add(spell, this); target.EnqueueBroadcast(new GameMessageScript(target.Guid, ACE.Entity.Enum.PlayScript.DirtyFightingAttackDebuff)); FightDirty_SendMessage(target, spell); // healing resistance rating spellID = GetCreatureSkill(Skill.DirtyFighting).AdvancementClass == SkillAdvancementClass.Specialized ? SpellId.DF_Specialized_HealingDebuff : SpellId.DF_Trained_HealingDebuff; spell = new Spell(spellID); if (spell.NotFound) { return; // TODO: friendly message to install DF patch } target.EnchantmentManager.Add(spell, this); target.EnqueueBroadcast(new GameMessageScript(target.Guid, ACE.Entity.Enum.PlayScript.DirtyFightingHealDebuff)); FightDirty_SendMessage(target, spell); }
public void EmitSplatter(Creature target, float damage) { if (target.IsDead) { return; } target.EnqueueBroadcast(new GameMessageSound(target.Guid, Sound.HitFlesh1, 0.5f)); if (damage >= target.Health.MaxValue * 0.25f) { var painSound = (Sound)Enum.Parse(typeof(Sound), "Wound" + ThreadSafeRandom.Next(1, 3), true); target.EnqueueBroadcast(new GameMessageSound(target.Guid, painSound, 1.0f)); } var splatter = (PlayScript)Enum.Parse(typeof(PlayScript), "Splatter" + GetSplatterHeight() + GetSplatterDir(target)); target.EnqueueBroadcast(new GameMessageScript(target.Guid, splatter)); }
public override void OnUnWield(Creature creature) { creature.RadarColor = null; creature.EnqueueBroadcast(true, new GameMessagePublicUpdatePropertyInt(creature, PropertyInt.RadarBlipColor, 0)); creature.SetProperty(PropertyBool.AdvocateState, false); base.OnUnWield(creature); }
public override void OnWield(Creature creature) { creature.RadarColor = ACE.Entity.Enum.RadarColor.Advocate; creature.EnqueueBroadcast(true, new GameMessagePublicUpdatePropertyInt(creature, PropertyInt.RadarBlipColor, (int)creature.RadarColor)); creature.SetProperty(PropertyBool.AdvocateState, true); base.OnWield(creature); }
/// <summary> /// Reduces the defense skills of the opponent by /// -10 if trained, or -20 if specialized /// </summary> public void FightDirty_ApplyLowAttack(Creature target) { var spellID = GetCreatureSkill(Skill.DirtyFighting).AdvancementClass == SkillAdvancementClass.Specialized ? SpellId.DF_Specialized_DefenseDebuff : SpellId.DF_Trained_DefenseDebuff; var spell = new Spell(spellID); if (spell.NotFound) { return; // TODO: friendly message to install DF patch } target.EnchantmentManager.Add(spell, this); target.EnqueueBroadcast(new GameMessageScript(target.Guid, PlayScript.DirtyFightingDefenseDebuff)); FightDirty_SendMessage(target, spell); }
/// <summary> /// Applies bleed ticks for 60 damage per 20 seconds if trained, /// 120 damage per 20 seconds if specialized /// </summary> /// <returns></returns> public void FightDirty_ApplyMediumAttack(Creature target) { var spellID = GetCreatureSkill(Skill.DirtyFighting).AdvancementClass == SkillAdvancementClass.Specialized ? SpellId.DF_Specialized_Bleed : SpellId.DF_Trained_Bleed; var spell = new Spell(spellID); if (spell.NotFound) { return; // TODO: friendly message to install DF patch } target.EnchantmentManager.Add(spell, this); // only send if not already applied? target.EnqueueBroadcast(new GameMessageScript(target.Guid, ACE.Entity.Enum.PlayScript.DirtyFightingDamageOverTime)); FightDirty_SendMessage(target, spell); }
/// <summary> /// Reduces the defense skills of the opponent by /// -10 if trained, or -20 if specialized /// </summary> public void FightDirty_ApplyLowAttack(Creature target) { var spellID = GetCreatureSkill(Skill.DirtyFighting).AdvancementClass == SkillAdvancementClass.Specialized ? Network.Enum.Spell.DF_Specialized_DefenseDebuff : Network.Enum.Spell.DF_Trained_DefenseDebuff; var spell = new Spell(spellID); if (spell.NotFound) { return; // TODO: friendly message to install DF patch } var enchantment = new Enchantment(target, Guid, (uint)spellID, 20, 1, EnchantmentMask.CreatureSpells); target.EnchantmentManager.Add(enchantment, this); target.EnqueueBroadcast(new GameMessageScript(target.Guid, ACE.Entity.Enum.PlayScript.DirtyFightingDefenseDebuff)); FightDirty_SendMessage(target, spell); }