public void FinishSequence(Mobile cible) { Owner.Animate(17, 7, 1, true, false, 0); //SortNubiaHelper.MakeEffect( Owner, cible, this, true, mustExplose ); if (!(cible is NubiaCreature)) { return; } NubiaCreature creat = cible as NubiaCreature; if (creat.Hits < Math.Max(8, (creat.HitsMax / 5))) { SortNubiaHelper.makeBigSmoke(creat.Location, creat.Map); RuneVie rune = new RuneVie(); rune.creature = NubiaHelper.CopyCreature(creat); rune.MoveToWorld(creat.Location, creat.Map); creat.Delete(); } else { Owner.SendMessage("La créature n'est pas assez affaibli"); } EndSortNubia(); //important ;) }
public void FinishSequence(Mobile cible) { Owner.Animate(17, 7, 1, true, false, 0); bool mustExplose = false; double Ddamage = (int)((Owner.Niveau + Utility.RandomMinMax(minDegat, maxDegat)) * (Maitrise / 100.0)); Ddamage *= getRatio(); //int damage = (int)Ddamage; //if(damage > 40) // mustExplose = true; //damage /= m_number; //Donc en fait le minMax correspond au global !! if (cible != Owner && Owner.CanBeHarmful(cible)) { cible.Paralyze(TimeSpan.FromSeconds(Ddamage)); } if (cible.Combatant == null && cible != Owner) { cible.Combatant = Owner; } SortNubiaHelper.MakeParalyzeEffect(Owner, cible, energie, Ddamage); int i = 0; ArrayList targets = new ArrayList(); foreach (Mobile m in cible.GetMobilesInRange(5)) { if (m == Owner || m == cible || !(Owner.CanBeHarmful(m))) { continue; } i++; if (i >= m_number) { break; } SortNubiaHelper.MakeParalyzeEffect(Owner, m, energie, Ddamage); if (m.Combatant == null) { m.Combatant = Owner; } //m.Damage( damage , Owner ); targets.Add(m); } int count = targets.Count; for (int t = 0; t < count; t++) { Mobile mob = targets[t] as Mobile; mob.Paralyze(TimeSpan.FromSeconds(Ddamage)); } m_timer = new InternalTimer(this, Ddamage); m_timer.Start(); return; }
public override void EndSortNubia() { //Clone for (int i = 0; i < m_copyItems.Count; i++) { Item it = m_copyItems[i] as Item; it.Delete(); } for (int c = 0; c < m_saveItems.Count; c++) { Item it = m_saveItems[c] as Item; Owner.EquipItem(it); } Owner.BodyValue = m_body; Owner.HueMod = -1; Owner.HairItemID = m_hair; Owner.HairHue = m_hairHue; Owner.FacialHairItemID = m_beard; Owner.FacialHairHue = m_hairHue; Owner.Name = m_name; SortNubiaHelper.makeBigSmoke(Owner.Location, Owner.Map); Owner.SendMessage("Fin de l'effet de '{0}'", Nom); base.EndSortNubia(); }
public void FinishSequence(Mobile cible) { Owner.Animate(17, 7, 1, true, false, 0); double time = (int)(Owner.Niveau / 3) * (Maitrise / 5.0); time *= getRatio(); SortNubiaHelper.makeBigSmoke(Owner.Location, Owner.Map); //SAVES m_saveItems = new ArrayList(); m_copyItems = new ArrayList(); /*private int m_hair = 0; * private int m_beard = 0;*/ m_hair = Owner.HairItemID; m_beard = Owner.FacialHairItemID; m_hue = Owner.Hue; m_hairHue = Owner.HairHue; m_body = Owner.BodyValue; m_name = Owner.Name; for (int i = 0; i < 24; i++) { Item it = Owner.FindItemOnLayer((Layer)i) as Item; if (it != null && !(it is Backpack)) { m_saveItems.Add(it); try{ Owner.Backpack.AddItem(it); } catch {} } } //Clone for (int c = 0; c < 24; c++) { Item it = NubiaHelper.CopyItem(cible.FindItemOnLayer((Layer)c) as Item); if (it != null && !(it is Backpack)) { m_copyItems.Add(it); Owner.EquipItem(it); it.Movable = false; } } Owner.Name = cible.Name; Owner.BodyValue = cible.BodyValue; Owner.HueMod = cible.Hue; Owner.HairItemID = cible.HairItemID; Owner.HairHue = cible.HairHue; Owner.FacialHairItemID = cible.FacialHairItemID; Owner.FacialHairHue = cible.FacialHairHue; m_timer = new InternalTimer(this, time); Owner.SendMessage("Vous garderez cette apparence pour {0} secondes", ((int)time).ToString()); m_timer.Start(); return; }
public bool isDisturb() { if (disturb != MagieDisturb.None) { Owner.PrivateOverheadMessage(MessageType.System, 1645, true, SortNubiaHelper.GetDisturbMessage(disturb), Owner.NetState); m_state = MagieState.None; m_disturb = MagieDisturb.None; return(true); } return(false); }
public void FinishSequence(Mobile cible) { Owner.Animate(13, 7, 1, true, false, 0); double Ddamage = (int)((Owner.Niveau + Utility.RandomMinMax(minDegat, maxDegat)) * (Maitrise / 100.0)); Ddamage *= getRatio(); int damage = (int)Ddamage; damage /= m_number; //Donc en fait le minMax correspond au global !! if (Owner.CanBeBeneficial(cible)) { cible.Heal(damage); } //if(cible.Combatant == null && cible != Owner) // cible.Combatant = Owner; SortNubiaHelper.MakeEffect(Owner, cible, this, false, false); int i = 0; ArrayList targets = new ArrayList(); foreach (Mobile m in cible.GetMobilesInRange(5)) { if (m == cible || m == Owner.Combatant || !(Owner.CanBeBeneficial(m))) { continue; } i++; if (i >= m_number) { break; } SortNubiaHelper.MakeEffect(Owner, cible, this, false, false); if (m.Combatant == null) { m.Combatant = Owner; } //m.Damage( damage , Owner ); targets.Add(m); } int count = targets.Count; for (int t = 0; t < count; t++) { Mobile mob = targets[t] as Mobile; mob.Heal(damage); } EndSortNubia(); //important ;) }
public void FinishSequence(Mobile cible) { Owner.Animate(17, 7, 1, true, false, 0); //SortNubiaHelper.MakeEffect( Owner, cible, this, true, mustExplose ); if (!(cible is NubiaCreature)) { return; } NubiaCreature creat = cible as NubiaCreature; Owner.SendMessage("{0} est lié à '{1}'", creat.Name, SortNubiaHelper.getEnergieString(creat.Energie)); EndSortNubia(); //important ;) }
public bool canCraft(NubiaPlayer from) { if (from == null) { Console.WriteLine("From null dans canCraft magie"); return(false); } if (SortNubiaHelper.calculMaitriseEnergie(this.energie, from.Energie) > 0 && SortNubiaHelper.calculMaitriseDomaine(this.Domaine, from.Domaine) > 0) { return(true); } return(false); }
public override void OnDelete() { SortNubiaHelper.makeBigSmoke(Location, Map); base.OnDelete(); }
public void FinishSequence(IPoint3D p, bool carre) { if (!Owner.CanSee(p)) { Owner.SendLocalizedMessage(500237); // Target can not be seen. } double time = (int)(Owner.Niveau) * (Maitrise / 10.0); time *= getRatio(); m_timer = new InternalTimer(this, time); m_timer.Start(); bool blok = (m_damageWalk < 1); int id = 0x93; if (!carre) { SpellHelper.GetSurfaceTop(ref p); int dx = Owner.Location.X - p.X; int dy = Owner.Location.Y - p.Y; int rx = (dx - dy) * 44; int ry = (dx + dy) * 44; int number = (int)((Owner.Niveau) * (Maitrise / 60.0)); bool eastToWest; if (rx >= 0 && ry >= 0) { eastToWest = false; } else if (rx >= 0) { eastToWest = true; } else if (ry >= 0) { eastToWest = true; } else { eastToWest = false; } Effects.PlaySound(p, Owner.Map, 0x1F6); for (int i = -(number / 2); i < (number / 2); ++i) { Point3D loc = new Point3D(eastToWest ? p.X + i : p.X, eastToWest ? p.Y : p.Y + i, p.Z); bool canFit = SpellHelper.AdjustField(ref loc, Owner.Map, 22, true); //Effects.SendLocationParticles( EffectItem.Create( loc, Caster.Map, EffectItem.DefaultDuration ), 0x376A, 9, 10, 5025 ); if (!canFit) { continue; } Item item = new InternalItem(loc, Owner.Map, Owner, SortNubiaHelper.getMur(energie), time, blok, m_damageWalk); item.Hue = 0; // SortNubiaHelper.getCompColor(competence); m_items.Add(item); //Effects.SendLocationParticles( item, 0x3728, 9, 10, 5025 ); SortNubiaHelper.makeBigSmoke(item.Location, item.Map); //new InternalItem( loc, Caster.Map, Caster ); } } else { Point3D cp = (Point3D)p; int decal = 4; bool eastToWest = true; for (int u = 0; u < 4; u++) { switch (u) { case 0: cp = (Point3D)p; cp.X += decal; eastToWest = false; break; case 1: cp = (Point3D)p; cp.X -= decal; eastToWest = false; break; case 2: cp = (Point3D)p; cp.Y += decal; eastToWest = true; break; case 3: cp = (Point3D)p; cp.Y -= decal; eastToWest = true; break; } for (int i = -3; i <= 3; ++i) { Point3D loc = new Point3D(eastToWest ? cp.X + i : cp.X, eastToWest ? cp.Y : cp.Y + i, cp.Z); bool canFit = SpellHelper.AdjustField(ref loc, Owner.Map, 22, true); //Effects.SendLocationParticles( EffectItem.Create( loc, Caster.Map, EffectItem.DefaultDuration ), 0x376A, 9, 10, 5025 ); if (!canFit) { continue; } Item item = new InternalItem(loc, Owner.Map, Owner, SortNubiaHelper.getMur(energie), time, blok, m_damageWalk); item.Hue = 2184; //ohaCompHelper.getCompColor(competence); m_items.Add(item); SortNubiaHelper.makeBigSmoke(item.Location, item.Map); //new InternalItem( loc, Caster.Map, Caster ); } } } }
public static string formatName(SortNubia sort) { return(SortNubiaHelper.getDomaineString(sort.Domaine) + ": " + sort.DefaultName); }
public void FinishSequence(Mobile cible) { Owner.Animate(17, 7, 1, true, false, 0); bool mustExplose = false; int poisonLevel = m_minDegat; if (poisonLevel > 3) { poisonLevel = 3; } if (poisonLevel < 0) { poisonLevel = 0; } if (cible != Owner && Owner.CanBeHarmful(cible)) { cible.Poison = Poison.GetPoison(poisonLevel); } else { m_number++; } if (cible.Combatant == null && cible != Owner) { cible.Combatant = Owner; } SortNubiaHelper.MakeEffect(Owner, cible, this, true, mustExplose); int i = 0; ArrayList targets = new ArrayList(); foreach (Mobile m in cible.GetMobilesInRange(5)) { if (m == Owner || m == cible || !(Owner.CanBeHarmful(m))) { continue; } i++; if (i >= m_number) { break; } SortNubiaHelper.MakeEffect(Owner, m, this, true, mustExplose); if (m.Combatant == null) { m.Combatant = Owner; } //m.Damage( damage , Owner ); targets.Add(m); } int count = targets.Count; for (int t = 0; t < count; t++) { Mobile mob = targets[t] as Mobile; mob.Poison = Poison.GetPoison(poisonLevel); } EndSortNubia(); //important ;) }