public override bool Apply(Fighter[] targets) { if (targets.Count() > 0) { short[] cells = new short[targets.Length]; for (int i = 0; i < targets.Length; i++) { targets[i].Stats.CurrentLifePoints = 0; cells[i] = targets[i].CellId; } this.Source.Fight.CheckDeads(); foreach (var cell in cells) { SummonedFighter fighter = this.CreateSummon(); this.Fight.AddSummon(fighter); return(true); } } return(true); }
public static void SendSlaveSwitchContextMessage(IPacketReceiver client, SummonedFighter actor) { sbyte slotIndex = 0; client.Send(new SlaveSwitchContextMessage(actor.Summoner.Id, actor.Id, actor.Spells.Select(x => x.Value.GetSpellItem()), actor.GetSlaveCharacteristicsInformations(), actor.Spells.Select(x => new ShortcutSpell(slotIndex++, (short)x.Value.Template.Id)))); }
public static SummonedFighter SummonFighter(MonsterRecord template, sbyte gradeId, Fighter source, MapPoint castPoint) { SummonedFighter fighter = new SummonedFighter(template, gradeId, source, source.Team, castPoint.CellId); source.Fight.AddSummon(fighter); return(fighter); }
void Fighter_OnSlideEvt(Fighter target, Fighter source, short startCellId, short endCellId) { SummonedFighter summon = CreateSummoned(source); Fighter.Fight.SequencesManager.StartSequence(SequenceTypeEnum.SEQUENCE_SPELL); Fighter.Fight.AddSummon(summon); Fighter.Fight.SequencesManager.EndSequence(SequenceTypeEnum.SEQUENCE_SPELL); }
public static SummonedFighter MakeControlableBrained(CharacterFighter source, ControlableMonsterFighter target) { target.Die(source); SummonedFighter fighter = new SummonedFighter(target.Template, target.GradeId, source, target.Team, target.CellId); source.Fight.AddSummon(fighter); return(fighter); }
public override void Execute() { var effect = Level.Effects.First(); var template = MonsterRecord.GetMonster(effect.DiceMin); this.SummonedTree = Summon.SummonFighter(template, (sbyte)(template.GradeExist(Level.Grade) ? Level.Grade : template.LastGrade().Id), Source, CastPoint); SpellLevelRecord upgradeLevel = UpgradedTreeSpellRecord.GetLevel(Level.Grade); Source.OnTurnStartEvt += OnTurnStarted; }
public SummonedFighter Summon(Fighter source, ushort monsterId, short cellId) { SummonedFighter summon = this.CreateSummoned(source, MonsterRecord.GetMonster(monsterId), cellId); bool sequence = this.Fighter.Fight.SequencesManager.StartSequence(SequenceTypeEnum.SEQUENCE_SPELL); this.Fighter.Fight.AddSummon(summon); if (sequence) { this.Fighter.Fight.SequencesManager.EndSequence(SequenceTypeEnum.SEQUENCE_SPELL); } return(summon); }
public static void SendGameActionFightSummonMessage(IPacketReceiver client, SummonedFighter summon) { var fighterInfos = summon.GetGameFightFighterInformations(); var action = summon.CanPlay() ? (short)ActionsEnum.ACTION_SUMMON_CREATURE : (short)ActionsEnum.ACTION_SUMMON_STATIC_CREATURE; if (summon is SummonedClone) { action = summon is SummonedImage ? (short)EffectsEnum.Effect_Illusions : (short)ActionsEnum.ACTION_CHARACTER_ADD_DOUBLE; } if (summon.IsControlled()) { action = (short)ActionsEnum.ACTION_SUMMON_SLAVE; } client.Send(new GameActionFightSummonMessage(action, summon.Summoner.Id, new[] { fighterInfos })); }
public static void SendGameActionFightSummonMessage(IPacketReceiver client, SummonedFighter summon) { client.Send(new GameActionFightSummonMessage(181, summon.Summoner.Id, summon.GetGameFightFighterInformations())); }