public virtual void OnDrop(BoWTeam captureteam) { PlaySound(748); if (captureteam != null && !captureteam.Deleted && State == PvPBattleState.Running) { LocalBroadcast("{0} have lost the Crystal of Power.", captureteam.Name); } }
public virtual void OnStolen(PlayerMobile pm, BoWTeam captureteam) { PlaySound(748); if (captureteam != null && !captureteam.Deleted && State == PvPBattleState.Running) { LocalBroadcast("{0} have stolen the Crystal of Power!", captureteam.Name); } }
public virtual int CompareTeamRank(BoWTeam a, BoWTeam b) { int result = 0; if (a.CompareNull(b, ref result)) { return(result); } if (a.Deleted && b.Deleted) { return(0); } if (a.Deleted) { return(1); } if (b.Deleted) { return(-1); } if (a.Points > b.Points) { return(-1); } if (a.Points < b.Points) { return(1); } return(0); }
public void Calcdamage(Mobile m, int damage) { if (Battle == null || Battle.Deleted) { return; } if (!(m is PlayerMobile)) { return; } var pm = (PlayerMobile)m; var team = Battle.FindTeam(pm) as BoWTeam; if (team == null) { return; } if (!Battle.IsParticipant(pm)) { pm.SendMessage("You must be a participant to perform that action."); return; } if (_Controller != team) { if (CurrentHealth - damage > 0) { CurrentHealth -= damage; } else if (CurrentHealth - damage == 0) { CurrentHealth = 0; Hue = 0; if (_Controller.Multi > 1) { _Controller.Multi--; } _Controller = null; } else if (CurrentHealth - damage < 0) { Battle.LocalBroadcast("{0} have taken control of a magical brazier!", team.Name); Hue = team.Color; CurrentHealth = damage - CurrentHealth; Battle.EnsureStatistics(pm)["Brazier Captures"]++; if (_Controller != null && _Controller.Multi > 1) { _Controller.Multi--; } _Controller = team; _Controller.Multi++; } OwnedMessage(); } else if (_Controller == team) { if (CurrentHealth + damage < 10) { CurrentHealth += damage; } else { CurrentHealth = 10; if (_LastFX + TimeSpan.FromSeconds(20) <= DateTime.UtcNow) { BaseSpecialEffect e = SpecialFX.FirePentagram.CreateInstance( Location, Map, 5, 0, TimeSpan.FromMilliseconds(1000 - ((10 - 1) * 100))); e.Send(); _LastFX = DateTime.UtcNow; } } OwnedMessage(); } }
public virtual int CompareTeamRank(BoWTeam a, BoWTeam b) { int result = 0; if (a.CompareNull(b, ref result)) { return result; } if (a.Deleted && b.Deleted) { return 0; } if (a.Deleted) { return 1; } if (b.Deleted) { return -1; } if (a.Points > b.Points) { return -1; } if (a.Points < b.Points) { return 1; } return 0; }