public void Explode(Fighter fighter) { Caster.Fight.TryEndSequence(1, 0); Caster.Fight.TryStartSequence(fighter.ContextualId, 1); var spellLevel = SpellLevelRecord.GetLevel((ushort)AssociatedSpellId, AssociatedSpellGrade); Caster.Fight.RemoveMarkTrigger(fighter, this); Caster.HandleSpellEffects(spellLevel, CenterCell, FightSpellCastCriticalEnum.NORMAL); Caster.Fight.CheckFightEnd(); }
public void ActivateZone(Fighter fighter) { // fighter.Fight.TryEndSequence(1, 0); // fighter.Fight.TryStartSequence(1, 0); var spellLevel = SpellLevelRecord.GetLevel((ushort)AssociatedSpellId, AssociatedSpellGrade); DisplayTriggered(fighter); Caster.HandleSpellEffects(spellLevel, CenterCell, FightSpellCastCriticalEnum.NORMAL); Caster.Fight.CheckFightEnd(); }
public short CalculateJet(ExtendedSpellEffect record, short statdata) { short jet = (short)(SpellEffectsHandler.GetRandom(record)); if (record.BaseEffect.SpellLevelId != 0) { ushort spellId = SpellLevelRecord.GetLevel(record.BaseEffect.SpellLevelId).SpellId; jet += GetSpellBoost(spellId); } return((short)(Math.Floor((double)jet * (100 + statdata + FighterStats.Stats.AllDamagesBonusPercent) / 100) + FighterStats.Stats.AllDamagesBonus)); }
public override SpellLevelRecord GetSpellLevel(ushort spellid) { if (this.AutoCastSpell == null) { return(SpellLevelRecord.GetLevel(spellid, CompanionRecord.GetSpellGrade(Master.Client.Character))); } else { return(this.AutoCastSpell.SpellId == spellid ? this.AutoCastSpell : SpellLevelRecord.GetLevel(spellid, CompanionRecord.GetSpellGrade(Master.Client.Character))); } }
public CompanionFighter(CompanionRecord template, CharacterFighter master, FightTeam team) : base(team) { this.Template = template; this.Master = master; this.Spells = Template.GetSpellItems(Master.Client.Character); this.Shortcuts = GenerateShortcuts(); if (this.Template.StartingSpellLevelId != 0) { this.AutoCastSpell = SpellLevelRecord.GetLevel(Template.StartingSpellLevelId); } this.ReadyToFight = true; }
public static void Sort() { foreach (SpellCategoryEnum category in Enum.GetValues(typeof(SpellCategoryEnum))) { if (File.Exists(SpellCategory.GetFileName(category))) { Categories.Add(SpellCategory.FromCategory(category)); } } foreach (var spell in SpellRecord.Spells) { var level = SpellLevelRecord.GetLevel(spell.Id, DEFAULT_SEARCH_GRADE); spell.Category = Get(level.Effects.ConvertAll <EffectsEnum>(x => x.BaseEffect.EffectType)); } }
public void ActivateOnTurnStart(Fighter fighter) { var spellLevel = SpellLevelRecord.GetLevel((ushort)AssociatedSpellId, AssociatedSpellGrade); DisplayTriggered(fighter); foreach (var effect in spellLevel.Effects) { Caster.Fight.TryStartSequence(Caster.ContextualId, 1); short[] cells = ShapesProvider.Handle(effect.ZoneShape, CenterCell, fighter.CellId, effect.ZoneSize).ToArray(); SpellEffectsHandler.Handle(Caster, spellLevel, effect, new List <Fighter>() { fighter }, CenterCell); Caster.Fight.TryEndSequence(1, 0); } Caster.Fight.CheckFightEnd(); }
public void CastDetonation(Fighter master, Fighter bomb, ushort explosionSpellId, int bombMonsterId, sbyte spellGrade) { master.Fight.TryEndSequence(1, 0); // During Spell Cast BombWallRecord bwall = BombWallRecord.GetWallRecord(bombMonsterId); master.Fight.TryStartSequence(master.ContextualId, 1); master.Fight.Send(new GameActionFightSpellCastMessage(0, master.ContextualId, 0, bomb.CellId, (sbyte)FightSpellCastCriticalEnum.NORMAL , true, bwall.CibleDetonationSpellId, spellGrade, new short[0])); SpellLevelRecord elevel = SpellLevelRecord.GetLevel(bwall.CibleDetonationSpellId, spellGrade); bomb.HandleSpellEffects(elevel, bomb.CellId, FightSpellCastCriticalEnum.NORMAL); master.Fight.CheckFightEnd(); master.Fight.TryEndSequence(1, 0); }
public override SpellLevelRecord GetSpellLevel(ushort spellid) { return(SpellLevelRecord.GetLevel(spellid, SpawnRecord.ActualGrade)); }
static bool LearnSpell(WorldClient client, ObjectEffect effect, uint uid) { var level = SpellLevelRecord.GetLevel((int)(effect as ObjectEffectInteger).value); return(client.Character.LearnSpell(level.SpellId)); }
public override SpellLevelRecord GetSpellLevel(ushort spellid) { var spell = Client.Character.Spells.Find(x => x.spellId == spellid); return(SpellLevelRecord.GetLevel(spellid, spell.spellLevel)); }