Example #1
0
File: Push.cs Project: Mixi59/Stump
 public Push(EffectDice effect, FightActor caster, SpellCastHandler castHandler, Cell targetedCell, bool critical)
     : base(effect, caster, castHandler, targetedCell, critical)
 {
     DamagesDisabled = effect.EffectId == EffectsEnum.Effect_PushBack_1103 ||
                       effect.EffectId == EffectsEnum.Effect_PullForward;
     Pull = effect.EffectId == EffectsEnum.Effect_PullForward;
 }
Example #2
0
        public override void Trigger(FightActor trigger)
        {
            base.NotifyTriggered(trigger, this.GlyphSpell);
            SpellCastHandler spellCastHandler = Singleton <SpellManager> .Instance.GetSpellCastHandler(base.Caster,
                                                                                                       this.GlyphSpell, trigger.Cell, false);

            spellCastHandler.MarkTrigger = this;
            spellCastHandler.Initialize();
            spellCastHandler.Execute();
        }
Example #3
0
        internal void NotifySpellCasted(SpellCast cast)
        {
            CastsHistory.AddSpellCast(cast);

            SpellCastHandler handler = SpellCasted;

            if (handler != null)
            {
                handler(this, cast);
            }
        }
Example #4
0
    //public SpellQueue spellQueue;

    private GameCore()
    {
        spellRepository  = new SpellRepository(this);
        itemRepository   = new ItemRepository();
        spellCastHandler = new SpellCastHandler();
        troopsHandler    = new TroopsHandler();
        chosenAccount    = new Account();
        chosenAccount.LoadAccData();
        chosenAdventure = new Adventure(-1);
        espellHandler   = new EnemySpellInfoHandler();
        //spellQueue = new SpellQueue();
    }
Example #5
0
 protected SpellEffectHandler(EffectDice effect, FightActor caster, SpellCastHandler castHandler, Cell targetedCell, bool critical)
     : base(effect)
 {
     Dice                     = effect;
     Caster                   = caster;
     CastHandler              = castHandler;
     TargetedCell             = targetedCell;
     TargetedPoint            = new MapPoint(TargetedCell);
     Critical                 = critical;
     Targets                  = effect.Targets;
     Category                 = SpellIdentifier.GetEffectCategories(effect.EffectId);
     DefaultDispellableStatus = FightDispellableEnum.DISPELLABLE;
 }
Example #6
0
        void OnSpellCasting(FightActor caster, SpellCastHandler spellCastHandler)
        {
            if (spellCastHandler.Informations.Critical == FightSpellCastCriticalEnum.CRITICAL_FAIL)
            {
                return;
            }

            var entries = caster.SpellHistory.GetEntries(x => x.Spell.SpellId == spellCastHandler.Spell.Id);

            if (!entries.Any())
            {
                return;
            }

            UpdateStatus(ChallengeStatusEnum.FAILED);
        }
Example #7
0
        public override void Trigger(FightActor trigger)
        {
            base.NotifyTriggered(trigger, this.TrapSpell);
            MarkShape[] shapes = base.Shapes;
            for (int i = 0; i < shapes.Length; i++)
            {
                MarkShape        markShape        = shapes[i];
                SpellCastHandler spellCastHandler = Singleton <SpellManager> .Instance.GetSpellCastHandler(base.Caster, this.TrapSpell, markShape.Cell, false);

                spellCastHandler.MarkTrigger = this;
                spellCastHandler.Initialize();
                foreach (SpellEffectHandler current in spellCastHandler.GetEffectHandlers())
                {
                    current.EffectZone = new Zone((markShape.Shape == GameActionMarkCellsTypeEnum.CELLS_CROSS) ? SpellShapeEnum.Q : current.Effect.ZoneShape, markShape.Size);
                }
                spellCastHandler.Execute();
            }
        }
Example #8
0
 public DispelMagicEffects(EffectDice effect, FightActor caster, SpellCastHandler castHandler, Cell targetedCell, bool critical)
     : base(effect, caster, castHandler, targetedCell, critical)
 {
 }
Example #9
0
 public DamageSharing(EffectDice effect, FightActor caster, SpellCastHandler castHandler, Cell targetedCell, bool critical)
     : base(effect, caster, castHandler, targetedCell, critical)
 {
 }
Example #10
0
 public SymetricTeleport(EffectDice effect, FightActor caster, SpellCastHandler castHandler, Cell targetedCell, bool critical)
     : base(effect, caster, castHandler, targetedCell, critical)
 {
 }
Example #11
0
 public SwitchPosition(EffectDice effect, FightActor caster, SpellCastHandler castHandler, Cell targetedCell, bool critical) : base(effect, caster, castHandler, targetedCell, critical)
 {
 }
Example #12
0
        public SpellEffectHandler GetSpellEffectHandler(EffectDice effect, FightActor caster, SpellCastHandler castHandler, Cell targetedCell, bool critical)
        {
            SpellEffectConstructor handler;

            return(m_spellsEffectHandler.TryGetValue(effect.EffectId, out handler) ? handler(effect, caster, castHandler, targetedCell, critical) : new DefaultSpellEffect(effect, caster, castHandler, targetedCell, critical));
        }
Example #13
0
 public VitalityPercent(EffectDice effect, FightActor caster, SpellCastHandler castHandler, Cell targetedCell, bool critical)
     : base(effect, caster, castHandler, targetedCell, critical)
 {
 }
Example #14
0
 public ReduceBuffDuration(EffectDice effect, FightActor caster, SpellCastHandler castHandler, Cell targetedCell, bool critical)
     : base(effect, caster, castHandler, targetedCell, critical)
 {
 }
Example #15
0
 public RandomModifier(EffectDice effect, FightActor caster, SpellCastHandler castHandler, Cell targetedCell, bool critical)
     : base(effect, caster, castHandler, targetedCell, critical)
 {
 }
Example #16
0
 public GiveHpPercentWhenAttack(EffectDice effect, FightActor caster, SpellCastHandler castHandler, Cell targetedCell, bool critical)
     : base(effect, caster, castHandler, targetedCell, critical)
 {
 }
Example #17
0
 public ReviveAndGiveHP(EffectDice effect, FightActor caster, SpellCastHandler castHandler, Cell targetedCell, bool critical)
     : base(effect, caster, castHandler, targetedCell, critical)
 {
 }
Example #18
0
 public HealReceivedDamages(EffectDice effect, FightActor caster, SpellCastHandler castHandler, Cell targetedCell, bool critical)
     : base(effect, caster, castHandler, targetedCell, critical)
 {
 }
Example #19
0
 public RevealsInvisible(EffectDice effect, FightActor caster, SpellCastHandler castHandler, Cell targetedCell, bool critical) : base(effect, caster, castHandler, targetedCell, critical)
 {
 }
Example #20
0
 public KillAndSummon(EffectDice effect, FightActor caster, SpellCastHandler castHandler, Cell targetedCell, bool critical)
     : base(effect, caster, castHandler, targetedCell, critical)
 {
 }
Example #21
0
 public Attract(EffectDice effect, FightActor caster, SpellCastHandler castHandler, Cell targetedCell, bool critical)
     : base(effect, caster, castHandler, targetedCell, critical)
 {
     Pull            = true;
     DamagesDisabled = true;
 }
Example #22
0
 public DirectDamage(EffectDice effect, FightActor caster, SpellCastHandler castHandler, Cell targetedCell, bool critical)
     : base(effect, caster, castHandler, targetedCell, critical)
 {
     BuffTriggerType = BuffTriggerType.Unknown;
 }
Example #23
0
 public DamageIntercept(EffectDice effect, FightActor caster, SpellCastHandler castHandler, Cell targetedCell, bool critical)
     : base(effect, caster, castHandler, targetedCell, critical)
 {
     DefaultDispellableStatus = FightDispellableEnum.DISPELLABLE_BY_DEATH;
 }
Example #24
0
 public TriggerGlyphs(EffectDice effect, FightActor caster, SpellCastHandler castHandler, Cell targetedCell, bool critical) : base(effect, caster, castHandler, targetedCell, critical)
 {
 }
Example #25
0
 public HPSteal(EffectDice effect, FightActor caster, SpellCastHandler castHandler, Cell targetedCell, bool critical)
     : base(effect, caster, castHandler, targetedCell, critical)
 {
 }
Example #26
0
 public AddState(EffectDice effect, FightActor caster, SpellCastHandler castHandler, Cell targetedCell, bool critical)
     : base(effect, caster, castHandler, targetedCell, critical)
 {
     DefaultDispellableStatus = DISPELABLE_STATES.Contains((SpellStatesEnum)Dice.Value) ? FightDispellableEnum.DISPELLABLE : FightDispellableEnum.DISPELLABLE_BY_DEATH;
 }
Example #27
0
 public TransmitCharacteristic(EffectDice effect, FightActor caster, SpellCastHandler castHandler, Cell targetedCell, bool critical)
     : base(effect, caster, castHandler, targetedCell, critical)
 {
 }
Example #28
0
 public PunishmentDamage(EffectDice effect, FightActor caster, SpellCastHandler castHandler, Cell targetedCell, bool critical)
     : base(effect, caster, castHandler, targetedCell, critical)
 {
 }