コード例 #1
0
    /// <summary>
    /// gets a timed array of all valid effects
    /// </summary>
    /// <param name="effectType"></param>
    /// <returns></returns>
    public Effect[] getListOfTriggerableEffectsOfType(EffectTypes effectType)
    {
        LinkedList <TimedEffect> listOfTimedEffects = timedAndTriggerdEffects[(int)effectType]; //list of all effects of that type
        LinkedList <Effect>      listOfEffects      = effects[(int)effectType];                 //list of all effects of that type

        int totalEffectCount = listOfTimedEffects.Count + listOfEffects.Count;

        Effect[] effectGrouping = new Effect[listOfTimedEffects.Count + listOfEffects.Count];


        if (!(listOfEffects.Count == 0))
        {
            LinkedListNode <Effect> curNode = listOfEffects.First;
            while (curNode != null)
            {
                Effect effect = curNode.Value;
                if (effect.NumberOfUsesLeft <= 0)
                {
                    LinkedListNode <Effect> tempNode = curNode.Next;
                    listOfEffects.Remove(curNode);
                    curNode = tempNode;
                    totalEffectCount--;
                }
                else
                {
                    curNode.Value.apply(actor);
                    curNode = curNode.Next;
                }
            }
        }


        if (listOfTimedEffects.Count == 0)
        {
            Array.Resize(ref effectGrouping, totalEffectCount);
            return(effectGrouping);
        }

        LinkedListNode <TimedEffect> curNode2 = listOfTimedEffects.First;

        while (curNode2 != null)
        {
            TimedEffect effect2 = curNode2.Value;
            if (effect2.NumberOfUsesLeft <= 0)
            {
                LinkedListNode <TimedEffect> tempNode = curNode2.Next;
                listOfTimedEffects.Remove(curNode2);
                curNode2 = tempNode;
                totalEffectCount--;
            }
            else
            {
                curNode2.Value.apply(actor);
                curNode2 = curNode2.Next;
            }
        }

        Array.Resize(ref effectGrouping, totalEffectCount);
        return(effectGrouping);
    }
コード例 #2
0
 public DummyEffect(EffectTypes type, int targetUniq, string message, int value)
 {
     _type       = type;
     _targetUniq = targetUniq;
     _message    = message;
     _value      = value;
 }
コード例 #3
0
    private void OnEffectTypeSelected(int index, string title)
    {
        //|| string.IsNullOrEmpty(effectInfo.EffectName) || effectInfo.EffectName == BindTypes.NONE
        if (effectInfo == null)
        {
            return;
        }
        int ty = EffectTypes.GetKey(title);

        if (effectInfo != null)
        {
            effectInfo.EffectType = ty;
        }
        if (ty == EffectTypes.Normal)
        {
            effectBindTypeSet.transform.parent.gameObject.SetActive(true);
            effectBindNameSet.transform.parent.gameObject.SetActive(true);
            text1.SetActive(true);
            text2.SetActive(true);
            flySpeed.gameObject.SetActive(false);
        }
        else if (ty == EffectTypes.Bullet)
        {
            flySpeed.gameObject.SetActive(true);
            //effectBindTypeSet.transform.parent.gameObject.SetActive(false);
            //effectBindNameSet.transform.parent.gameObject.SetActive(false);
            //text1.SetActive(false);
            //text2.SetActive(false);
            //if (effectInfo != null)
            //{
            //    effectInfo.BindType = BindTypes.None;
            //    effectInfo.BindName = BindTypes.NONE;
            //}
        }
    }
コード例 #4
0
        public virtual void TestPower(Type type, ActionType actionType, AttackType attackType, string range, DamageTypes damageTypes, string effect,
            EffectTypes effectTypes, PowerFrequency frequency, PowerSource powerSource, string trigger)
        {
            Power power;

            power = Character.GetPowers().Where(x => (x.GetType() == type)).First();
            Assert.NotNull(power, "Power not found");

            Assert.AreEqual(actionType, power.Action);
            Assert.AreEqual(attackType, power.AttackTypeAndRange.AttackType);
            Assert.AreEqual(range, power.AttackTypeAndRange.Range);
            Assert.AreEqual(damageTypes, power.DamageTypes);
            Assert.AreEqual(effect != null, power.HasEffect);
            if (effect != null)
            {
                Assert.AreEqual(effect, power.Effect);
            }
            Assert.AreEqual(effectTypes, power.EffectTypes);
            Assert.AreEqual(frequency, power.Frequency);
            Assert.AreEqual(powerSource, power.PowerSource);
            Assert.AreEqual(trigger != null, power.HasTrigger);
            if (trigger != null)
            {
                Assert.AreEqual(trigger, power.Trigger);
            }
        }
コード例 #5
0
        public ShipMovementInfoChange RemoveEffectTypes(EffectTypes types)
        {
            ShipMovementInfoChange removed = new ShipMovementInfoChange();

            if ((types & EffectTypes.MaxAngularAcceleration) == EffectTypes.MaxAngularAcceleration)
            {
                removed.MaxAngularAcceleration = MaxAngularAcceleration;
                this.MaxAngularAcceleration    = 0;
            }
            if ((types & EffectTypes.MaxAngularVelocity) == EffectTypes.MaxAngularVelocity)
            {
                removed.MaxAngularVelocity = MaxAngularVelocity;
                this.MaxAngularVelocity    = 0;
            }
            if ((types & EffectTypes.MaxLinearAcceleration) == EffectTypes.MaxLinearAcceleration)
            {
                removed.MaxLinearAcceleration = MaxLinearAcceleration;
                this.MaxLinearAcceleration    = 0;
            }
            if ((types & EffectTypes.MaxLinearVelocity) == EffectTypes.MaxLinearVelocity)
            {
                removed.MaxLinearVelocity = MaxLinearVelocity;
                this.MaxLinearVelocity    = 0;
            }
            return(removed);
        }
コード例 #6
0
 public RandomTeleport(TargetingInfo effectWho,
                       EffectTypes harmfulEffectTypes,
                       EffectSounds effectSounds, float maxDistance)
     : base(effectWho, harmfulEffectTypes, effectSounds)
 {
     this.maxDistance = maxDistance;
 }
コード例 #7
0
        private static void AddGenericToEffectSpecList(
            EffectSpecListRec EffectSpecList,
            EffectTypes Type,
            object GenericSpec,
            bool EnabledFlag)
        {
#if DEBUG
            if (!(((GenericSpec is DelayEffectRec) && (Type == EffectTypes.eDelayEffect)) ||
                  ((GenericSpec is NonlinProcSpecRec) && (Type == EffectTypes.eNLProcEffect)) ||
                  ((GenericSpec is FilterSpecRec) && (Type == EffectTypes.eFilterEffect)) ||
                  ((GenericSpec is AnalyzerSpecRec) && (Type == EffectTypes.eAnalyzerEffect)) ||
                  ((GenericSpec is HistogramSpecRec) && (Type == EffectTypes.eHistogramEffect)) ||
                  ((GenericSpec is ResamplerSpecRec) && (Type == EffectTypes.eResamplerEffect)) ||
                  ((GenericSpec is CompressorSpecRec) && (Type == EffectTypes.eCompressorEffect)) ||
                  ((GenericSpec is VocoderSpecRec) && (Type == EffectTypes.eVocoderEffect)) ||
                  ((GenericSpec is IdealLPSpecRec) && (Type == EffectTypes.eIdealLowpassEffect)) ||
                  ((GenericSpec is ConvolverSpecRec) && (Type == EffectTypes.eConvolverEffect)) ||
                  ((GenericSpec is UserEffectSpecRec) && (Type == EffectTypes.eUserEffect)) ||
                  ((GenericSpec is PluggableSpec) && (Type == EffectTypes.ePluggableEffect))))
            {
                Debug.Assert(false);
                throw new ArgumentException();
            }
#endif

            EffectNodeRec Effect = new EffectNodeRec();

            Effect.Type        = Type;
            Effect.u           = GenericSpec;
            Effect.EnabledFlag = EnabledFlag;

            Array.Resize(ref EffectSpecList.List, EffectSpecList.List.Length + 1);
            EffectSpecList.List[EffectSpecList.List.Length - 1] = Effect;
        }
コード例 #8
0
 public AbsorptionSheild(TargetingInfo effectWho, EffectTypes harmfulEffectTypes, EffectSounds effectSounds,
                         LifeSpan lifeTime, EffectTypes filteredEffectTypes,
                         float absorptionRatio)
     : base(effectWho, harmfulEffectTypes, effectSounds, lifeTime, filteredEffectTypes)
 {
     this.absorptionRatio = absorptionRatio;
 }
コード例 #9
0
        public override GeneralChange RemoveEffectTypes(EffectTypes types)
        {
            GeneralChange returnvalue = new GeneralChange();

            returnvalue.ShipStateChange = ssc.RemoveEffectTypes(types);
            return(returnvalue);
        }
コード例 #10
0
    /// <summary>
    /// if an effect type must be a child of a particular class
    /// this method insures there are no errors
    ///
    /// </summary>
    /// <param name="effect"></param>
    /// <param name="et"></param>
    /// <returns>true if effect passes sanity check</returns>
    private bool varifyEffectType(Effect effect, EffectTypes et)
    {
        switch (et)
        {
        case EffectTypes.damageDealtChange:
            return(effect is DamageDealtChange);

        case EffectTypes.damageReceavedChange:
            break;

        case EffectTypes.damageOverTime:
            return(effect is DamageOverTimeEffect);

        case EffectTypes.preventCardPlaying:
            break;

        case EffectTypes.modifyProjectileSpeed:
            return(effect is ProjectileSpeedModification);

        case EffectTypes.changeEquipment:
            break;

        case EffectTypes.changeSpeed:
            break;

        case EffectTypes.damageOnContact:
            return(effect is DamageOnContactEffect);

        default:
            break;
        }
        return(true);
    }
コード例 #11
0
        public override GeneralChange RemoveEffectTypes(EffectTypes types)
        {
            GeneralChange returnvalue = new GeneralChange();

            returnvalue.MovementInfoChange = smic.RemoveEffectTypes(types);
            return(returnvalue);
        }
コード例 #12
0
        public override GeneralChange RemoveEffectTypes(EffectTypes types)
        {
            GeneralChange returnvalue = new GeneralChange();
            PhysicsState  psc         = PhysicsStateChange;
            bool          filtered    = false;

            if (((int)types * (int)EffectTypes.Position) != 0)
            {
                if (returnvalue.PhysicsChange == null)
                {
                    returnvalue.PhysicsChange = new PhysicsState();
                }
                returnvalue.PhysicsChange.Position += psc.Position;
                psc.Position = ALVector2D.Zero;
                filtered     = true;
            }
            if (((int)types * (int)EffectTypes.Velocity) != 0)
            {
                if (returnvalue.PhysicsChange == null)
                {
                    returnvalue.PhysicsChange = new PhysicsState();
                }
                returnvalue.PhysicsChange.Velocity += psc.Velocity;
                psc.Velocity = ALVector2D.Zero;
                filtered     = true;
            }
            if (filtered)
            {
                PhysicsStateChange = psc;
            }
            return(returnvalue);
        }
コード例 #13
0
        public ShipStateChange RemoveEffectTypes(EffectTypes types)
        {
            ShipStateChange removed = new ShipStateChange();

            if ((types & EffectTypes.Energy) == EffectTypes.Energy)
            {
                removed.Energy = Energy;
                this.Energy    = 0;
            }
            if ((types & EffectTypes.EnergyChangeRate) == EffectTypes.EnergyChangeRate)
            {
                removed.EnergyChangeRate = EnergyChangeRate;
                this.EnergyChangeRate    = 0;
            }
            if ((types & EffectTypes.Health) == EffectTypes.Health)
            {
                removed.Health = Health;
                this.Health    = 0;
            }
            if ((types & EffectTypes.HealthChangeRate) == EffectTypes.HealthChangeRate)
            {
                removed.HealthChangeRate = HealthChangeRate;
                this.HealthChangeRate    = 0;
            }
            return(removed);
        }
コード例 #14
0
 public BackwardsTeleport(TargetingInfo effectWho,
                          EffectTypes harmfulEffectTypes,
                          EffectSounds effectSounds, float distance)
     : base(effectWho, harmfulEffectTypes, effectSounds)
 {
     this.distance = distance;
 }
コード例 #15
0
 public DummyEffect(EffectTypes type, int targetUniq, string message, int value)
 {
     _type = type;
     _targetUniq = targetUniq;
     _message = message;
     _value = value;
 }
コード例 #16
0
ファイル: Effect.cs プロジェクト: Zac-King/Combat_Form
 Effect(string n, int d, float v, EffectTypes t)
 {
     this.name     = n;
     this.duration = d;
     this.value    = v;
     this.type     = t;
 }
コード例 #17
0
    public Effect getEffectofType(EffectTypes type)
    {
        // This makes a new effect of specified type
        Effect e;

        switch (type)
        {
        case EffectTypes.test:
            e = new TestEffect("");
            break;

        case EffectTypes.moveUnit:
            e = new MoveEffect();
            break;

        case EffectTypes.enemySpawn:
            e = new EnemyEffect();
            break;

        case EffectTypes.enemyConversion:
            e = new ConversationEffect();
            break;

        default:
            e = new NullEffect();
            break;
        }
        return(e);
    }
コード例 #18
0
ファイル: Effect.cs プロジェクト: dmaulikr/iOSHack
 /// <summary>
 /// Creates a new effect that increases or decreases a specified stat or skill over time.
 /// </summary>
 /// <param name="effectType">Effect type.</param>
 /// <param name="attributeType">Attribute type.</param>
 /// <param name="rounds">Rounds.</param>
 public Effect(EffectTypes effectType, AttributeTypes attributeType, int rounds, int effectValue)
 {
     EffectType    = effectType;
     AttributeType = attributeType;
     PeriodType    = PeriodTypes.EffectOverTime;
     Rounds        = rounds;
     EffectValue   = effectValue;
 }
コード例 #19
0
 public AttackEffect(AttackEffect other)
 {
     type                    = other.type;
     effectType              = other.effectType;
     CalculatedEffectValue   = other.CalculatedEffectValue;
     CalculatedDurationValue = other.CalculatedDurationValue;
     currentDuration         = CalculatedDurationValue;
 }
コード例 #20
0
ファイル: Effect.cs プロジェクト: dmaulikr/iOSHack
 /// <summary>
 /// Creates an on going effect that increases or decreases a specified stat or skill
 /// </summary>
 /// <param name="effectType">Effect type.</param>
 /// <param name="attributeType">Attribute type.</param>
 public Effect(EffectTypes effectType, AttributeTypes attributeType, int effectValue)
 {
     EffectType    = effectType;
     AttributeType = attributeType;
     PeriodType    = PeriodTypes.OnGoing;
     Rounds        = -1;
     EffectValue   = effectValue;
 }
コード例 #21
0
ファイル: VSTypes.cs プロジェクト: UB1AFU/VSSystem
 public Effect(EffectTypes type, int parameter, int parameter2 = 0, int Who = 1, States setstate = States.NONE)
 {
     this.Type = type;
     this.Parameter = parameter;
     this.Parameter2 = parameter2;
     this.Who = Who;
     this.SetState = setstate;
 }
コード例 #22
0
ファイル: Effect.cs プロジェクト: Sonorh/RaccoonKnightTwg
 public Effect(Characteristics target, float amount, EffectTypes type, int duration, DurationTypes durType)
 {
     Target = target;
     Amount = amount;
     Type = type;
     Duration = duration;
     DurType = durType;
 }
コード例 #23
0
 public RemoteActionEffect(TargetingInfo effectsWho,
                           EffectTypes effectTypes,
                           EffectSounds effectSounds,
                           IAction action)
     : base(effectsWho, effectTypes, effectSounds)
 {
     this.action = action;
 }
コード例 #24
0
 public void triggerEffects(EffectTypes effectType, Actor actor)
 {
     Effect[] list = getListOfTriggerableEffectsOfType(effectType);
     for (int i = 0; i < list.Length; i++)
     {
         list[i].apply(actor);
     }
 }
コード例 #25
0
        public override void initContentImpl(int aId)
        {
            DataTable dt = Database.getData("effect_def", "effect_def_id", aId, null);

            if (dt == null)
            {
                Program.MainForm.logError("Could not load Effect [" + aId + "]");
                return;
            }
            if (dt.Rows.Count == 0)
            {
                Program.MainForm.logError("Could not load Effect [" + aId + "]");
                return;
            }

            Program.MainForm.logInfo("Effect loaded [" + aId + "]");
            DataRow dataRow = dt.Rows[0];

            txtSystemName.Text         = dataRow["system_name"].ToString();
            txtDisplayName.Text        = dataRow["display_name"].ToString();
            txtDisplayDescription.Text = dataRow["display_description"].ToString();

            int flags = (int)dataRow["flags"];

            chkIsFriendly.Checked = ((flags & Globals.EFFECT_FLAG_Friendly) != 0) ? true : false;
            ComboUtils.fillCombo(cboEffectType, "ref_effect_type", "name", "ref_effect_type_id", Database.getNullableId(dataRow, "ref_effect_type_id"));

            int duration = (int)dataRow["duration"];

            if (duration <= 0)
            {
                radInstant.Checked  = true;
                numDuration.Enabled = false;
            }
            else
            {
                radDuration.Checked = true;
                numDuration.Enabled = true;
                numDuration.Value   = duration;
            }

            dt.Dispose();
            ControlName = txtSystemName.Text;

            // Choose the proper sub-item type, load the data into all controls
            EffectTypes effectType = (EffectTypes)Database.getNullableId(dataRow, "ref_effect_type_id");

            switchEffectType(EffectTypes.HealthChange);
            switchEffectType(effectType);

            {
                mHealthChangeControl.loadEffectData(Id);
                mStatModControl.loadEffectData(Id);
                mGiveObjectControl.loadEffectData(Id);
                mSpaceEffectControl.loadEffectData(Id);
                mChangePositionControl.loadEffectData(Id);
            }
        }
コード例 #26
0
 public VuxSlowDownEffect(TargetingInfo effectsWho,
                          EffectTypes effectTypes,
                          EffectSounds effectSounds,
                          LifeSpan lifeTime,
                          ShipMovementInfoChange percents)
     : base(effectsWho, effectTypes, effectSounds, lifeTime, percents)
 {
     this.isHarmful = percents.MaxAngularAcceleration < 1 || percents.MaxAngularVelocity < 1 || percents.MaxLinearAcceleration < 1 || percents.MaxLinearVelocity < 1;
 }
コード例 #27
0
 public ShipStateEffect(TargetingInfo effectsWho,
                        EffectTypes effectTypes,
                        EffectSounds effectSounds,
                        ShipStateChange ssc)
     : base(effectsWho, effectTypes | ssc.HarmfulEffectTypes, effectSounds)
 {
     this.ssc       = ssc;
     this.isHarmful = ssc.Energy < 0 || ssc.EnergyChangeRate < 0 || ssc.Health < 0 || ssc.HealthChangeRate < 0;
 }
コード例 #28
0
        public static List <TypeInfo> GetEffectTypes()
        {
            if (!EffectTypes.Any())
            {
                var all = LoadAllEffects <IHueEffect>();
                EffectTypes = all;
            }

            return(EffectTypes);
        }
コード例 #29
0
 public BaseProlongedEffect(TargetingInfo effectsWho,
                            EffectTypes harmfulEffectTypes,
                            EffectSounds effectSounds,
                            LifeSpan lifeTime)
     : base(effectsWho,
            harmfulEffectTypes,
            effectSounds)
 {
     this.lifeTime = lifeTime;
 }
コード例 #30
0
ファイル: EffectsLayer.cs プロジェクト: lwx1010/2D_XProject
        public LayerInfo GetEffect(EffectTypes eType)
        {
            string eTypeKey = Enum.GetName(typeof(EffectTypes), eType);

            if (!_resources.ContainsKey(eTypeKey))
            {
                return(null);
            }
            return(_resources[eTypeKey]);
        }
コード例 #31
0
 protected virtual void SwitchTo(uint handle, EffectTypes effect)
 {
     if (RunningEffects[handle].Type == effect)
     {
         return;
     }
     RunningEffects[handle].PrevType = RunningEffects[handle].Type;
     RunningEffects[handle].Type     = effect;
     Log("Effect " + handle.ToString() + " [" + RunningEffects[handle].PrevType.ToString() + "] to [" + effect.ToString() + "]");
 }
コード例 #32
0
ファイル: EffectsLayer.cs プロジェクト: lwx1010/2D_XProject
        public bool enableEffect(EffectTypes eType)
        {
            LayerInfo effect = GetEffect(eType);

            if (effect == null)
            {
                return(false);
            }
            return(((EffectBase)effect).Enabled);
        }
コード例 #33
0
        private Weapon CreateWeaponSword(EffectTypes effectType, AttributeTypes attributeTypes, int value, string name)
        {
            List <Effect> effects = new List <Effect>();

            Effect tempEffect = new Effect(effectType, attributeTypes, value);

            effects.Add(tempEffect);

            return(new Weapon(6, WeaponTypes.Sword, Handedness.Single, DamageTypes.Slashing, name, ItemTypes.Weapon, MaterialTypes.Steel, 400, effects));
        }
コード例 #34
0
 public MovementInfoEffect(TargetingInfo effectsWho,
                           EffectTypes effectTypes,
                           EffectSounds effectSounds,
                           LifeSpan lifeTime,
                           ShipMovementInfoChange smic)
     : base(effectsWho, effectTypes | smic.HarmfulEffectTypes, effectSounds, lifeTime)
 {
     this.smic      = smic;
     this.isHarmful = smic.MaxAngularAcceleration < 0 || smic.MaxAngularVelocity < 0 || smic.MaxLinearAcceleration < 0 || smic.MaxLinearVelocity < 0;
 }
コード例 #35
0
 public override void TestPower(Type type, ActionType actionType, AttackType attackType, string range, DamageTypes damageTypes, string effect,
     EffectTypes effectTypes, PowerFrequency frequency, PowerSource powerSource, string trigger)
 {
     base.TestPower(type, actionType, attackType, range, damageTypes, effect, effectTypes, frequency, powerSource, trigger);
 }
コード例 #36
0
        private void removeSpecificEffectType(EffectTypes effectType)
        {
            List<IEffect> toRemove = new List<IEffect>();
            foreach (IEffect e in currentEffects)
            {
                if (e.type == effectType)
                {
                    toRemove.Add(e);
                }
            }

            foreach (IEffect e in toRemove)
            {
                currentEffects.Remove(e);
            }
        }
コード例 #37
0
ファイル: Aura.cs プロジェクト: karliky/wowwow
 public virtual void Release( Mobile m )
 {
     if ( effect != EffectTypes.None )
         m.CumulativeAuraEffects[ effect ] = null;
     if ( auraPeriodicTimer != null )
     {
         auraPeriodicTimer.Stop();
         auraPeriodicTimer = null;
     }
     effect = EffectTypes.None;
     val = 0;
     if ( OnRelease != null )
     {
         ( OnRelease as AuraReleaseDelegate )( m );
     }
 }
コード例 #38
0
ファイル: Aura.cs プロジェクト: karliky/wowwow
 public Aura( EffectTypes et )
 {
 }
コード例 #39
0
 /// <summary>
 /// 移除特效
 /// </summary>
 /// <param name="type">特效类型</param>
 public void RemoveEffect(EffectTypes type)
 {
     AnimationBase animation = effects.SingleOrDefault(X => X.Key == type).Value;
     if (animation != null) {
         effects.Remove(type);
         this.Children.Remove(animation);
         animation.Dispose(animation, null);
     }
 }
コード例 #40
0
ファイル: VSTypes.cs プロジェクト: UB1AFU/VSSystem
 // Event for the effect. Parameter function vary based on the type. Who is 0 (User) and 1 (target)
 public static void Event(VSPlayer User, TSPlayer Target, EffectTypes type, int Parameter, int Parameter2 = 0,
     int Who = 1, States setstate = States.NONE)
 {
     if (type.Equals(EffectTypes.BUFF))
     {
         try
         {
             if (Who == 0)
                 User.TSPlayer.SetBuff(Parameter, Parameter2 * 60, false);
             else
                 Target.SetBuff(Parameter, Parameter2 * 60, false);
         }
         catch (Exception)
         {
             Log.ConsoleError("[VSSystem] A command has returned an error at Effect parameter: Invalid buff ID");
         }
     }
     else if (type.Equals(EffectTypes.HEALSELF))
     {
         if (Who == 0)
             User.TSPlayer.Heal(Parameter);
         else
             Target.Heal(Parameter);
     }
     else if (type.Equals(EffectTypes.TICKLE))
     {
         if (Who == 0)
         {
             if (VSSystem.ItemCheck(TShock.Utils.GetItemByName("Hand Warmer")[0].netID, User.TSPlayer))
             {
                 User.TSPlayer.DamagePlayer(10000);
                 User.TSPlayer.TPlayer.KillMe(10000, 0, true, " was tickled to death for having Hand Warmer.");
             }
             else
                 User.TSPlayer.SetBuff(47, Parameter * 60, false);
         }
         else
         {
             if (VSSystem.ItemCheck(TShock.Utils.GetItemByName("Hand Warmer")[0].netID, Target))
             {
                 Target.DamagePlayer(10000);
                 Target.TPlayer.KillMe(10000, 0, true, " was tickled to death for having Hand Warmer.");
             }
             else
                 Target.SetBuff(47, Parameter * 60, false);
         }
     }
     else if (type.Equals(EffectTypes.STATE) && setstate != States.NONE)
     {
         if (Who == 0)
             User.SetState(setstate, Parameter);
         else
             VSSystem.VSPlayers[Target.UserID].SetState(setstate, Parameter);
     }
 }
コード例 #41
0
        public void DrawConeBlast(List<Point> points, TCODColor color)
        {
            m_type = EffectTypes.Cone;
            m_animationStartTime = TCODSystem.getElapsedMilli();
            m_points = points;

            m_color = color;
            m_done = false;
        }
コード例 #42
0
        public void DrawExploadingPointBlast(List<Point> path, List<List<Point>> blast, TCODColor color)
        {
            m_type = EffectTypes.ExploadingPoint;
            m_animationStartTime = TCODSystem.getElapsedMilli();
            m_path = path;
            m_blast = blast;

            m_color = color;
            m_done = false;
        }
コード例 #43
0
 /// <summary>
 /// 通过调整色相改变特效颜色
 /// </summary>
 /// <param name="type">特效类型</param>
 /// <param name="value"></param>
 public void ShiftEffectColor(EffectTypes type, double value)
 {
     AnimationBase animation = effects.SingleOrDefault(X => X.Key == type).Value;
     if (animation != null) {
         animation.Effect = value == 0 ? null : new ShiftHue() { HueShift = value };
     }
 }
コード例 #44
0
 /// <summary>
 /// 设置特效是否显示
 /// </summary>
 /// <param name="type"></param>
 /// <param name="visible"></param>
 public void SetEffectVisible(EffectTypes type, bool visible)
 {
     AnimationBase animation = effects.SingleOrDefault(X => X.Key == type).Value;
     if (animation != null) { animation.IsVisible = visible; }
 }
コード例 #45
0
 /// <summary>
 /// 设置特效位置
 /// </summary>
 /// <param name="type"></param>
 /// <param name="p"></param>
 public void SetEffectPosition(EffectTypes type, Point p)
 {
     AnimationBase animation = effects.SingleOrDefault(X => X.Key == type).Value;
     if (animation != null) { animation.Position = p; }
 }
コード例 #46
0
ファイル: Unit.cs プロジェクト: scerdam/Maze
 /// <summary>
 /// Returns a collection of effects with the specifed type.
 /// </summary>
 /// <param name="effectType"></param>
 /// <returns></returns>
 public List<EffectEntry> GetEffectsByType(EffectTypes effectType)
 {
     List<EffectEntry> result = new List<EffectEntry>();
     /*foreach (EffectHolder effect in effectList)
     {
         if (effect.EffectInfo.EffectType == effectType)
             result.Add(effect.EffectInfo);
     }*/
     for (int i = 0; i < effectList.Count; ++i)
     {
         if (effectList[i].EffectInfo.EffectType == effectType)
             result.Add(effectList[i].EffectInfo);
     }
     return result;
 }
コード例 #47
0
        public void DrawRangedBolt(List<Point> path, TCODColor color, int tailLength, bool drawLastTargetSquare)
        {
            m_type = EffectTypes.RangedBolt;
            m_animationStartTime = TCODSystem.getElapsedMilli();
            m_points = path;

            if (!drawLastTargetSquare)
                m_points.RemoveAt(m_points.Count - 1);

            m_color = color;

            m_tailLength = tailLength;

            m_done = false;
        }
コード例 #48
0
ファイル: Unit.cs プロジェクト: scerdam/Maze
 /// <summary>
 /// Determines whether the unit has applied aura with the specified effect type.
 /// </summary>
 /// <param name="effectType">One of the <see cref="EffectTypes"/> value.</param>
 /// <returns><c>true</c> if the unit has at least one aura with the specified type; otherwise, <c>false</c>.</returns>
 public bool HasEffectType(EffectTypes effectType)
 {
     return GetEffectsByType(effectType).Count > 0;
 }
コード例 #49
0
        private void FinishAnimation()
        {
            m_done = true;

            m_type = EffectTypes.None;
            return;
        }
コード例 #50
0
 public void DrawStream(List<Point> path, TCODColor color, Dictionary<Point, bool> locationsOccupied)
 {
     m_type = EffectTypes.Stream;
     m_animationStartTime = TCODSystem.getElapsedMilli();
     m_points = path;
     m_color = color;
     m_locationsOccupied = locationsOccupied;
     m_done = false;
 }
コード例 #51
0
 /// <summary>
 /// 添加特效
 /// </summary>
 /// <param name="animation">特效动画</param>
 /// <param name="type">特效类型</param>
 public void AddEffect(AnimationBase animation, EffectTypes type)
 {
     RemoveEffect(type);
     effects.Add(type, animation);
     this.Children.Add(animation);
     animation.HeartStart();
 }