void ReviveActor(FightActor actor, int heal) { var cell = TargetedCell; if (!Fight.IsCellFree(cell)) { cell = Map.GetRandomAdjacentFreeCell(TargetedPoint, true); } actor.Revive(heal, Caster); actor.SummoningEffect = this; actor.Position.Cell = cell; actor.BuffRemoved += OnBuffRemoved; if (Spell.Id == (int)SpellIdEnum.LAISSE_SPIRITUELLE_420) { var actorBuffId = actor.PopNextBuffId(); var addStateHandler = new AddState(new EffectDice(EffectsEnum.Effect_AddState, (short)SpellStatesEnum.ZOMBI_74, 0, 0), actor, null, actor.Cell, false); var actorBuff = new StateBuff(actorBuffId, actor, Caster, addStateHandler, Spell, FightDispellableEnum.DISPELLABLE_BY_DEATH, SpellManager.Instance.GetSpellState((uint)SpellStatesEnum.ZOMBI_74)) { Duration = -1000 }; actor.AddBuff(actorBuff, true); } ActionsHandler.SendGameActionFightReviveMessage(Fight.Clients, Caster, actor); ContextHandler.SendGameFightTurnListMessage(Fight.Clients, Fight); }
protected Buff AddStateBuffDirectly(FightActor target, bool bypassMaxStack, SpellState state, FightActor triggerer = null) { var id = target.PopNextBuffId(); var buff = new StateBuff(id, target, Caster, this, Spell, DefaultDispellableStatus, state, triggerer: triggerer); target.AddBuff(buff, bypassMaxStack); return(buff); }
public TriggerBuff AddTriggerBuff(FightActor target, TriggerBuffApplyHandler applyTrigger, TriggerBuffRemoveHandler removeTrigger) { var id = target.PopNextBuffId(); var buff = new TriggerBuff(id, target, Caster, this, Spell, Spell, Critical, DefaultDispellableStatus, Priority, applyTrigger, removeTrigger); target.AddBuff(buff); return(buff); }
protected Buff AddStatBuffDirectly(FightActor target, short value, PlayerFields caracteritic, short?customActionId = null, bool noDelay = false, FightActor triggerrer = null) { var id = target.PopNextBuffId(); var buff = new StatBuff(id, target, Caster, this, Spell, value, caracteritic, Critical, DefaultDispellableStatus, triggerrer); if (customActionId != null) { buff.CustomActionId = customActionId; } if (noDelay) { buff.Delay = 0; } target.AddBuff(buff); return(buff); }