Пример #1
0
 // Addition 603
 public static void ADDITION_CANNOTMOVE(ref AdditionValue aval, int value)
 {
     Actor character = aval.sender as Actor;
     if (aval.context == AdditionContext.Applied && value == 0)
         character._status.CannotMove += 1;
     else if (aval.context == AdditionContext.Deapplied)
         character._status.CannotMove -= 1;
 }
Пример #2
0
 public static void ADDITION_BLOCKRATE(ref AdditionValue aval, int value)
 {
     Actor character = (Actor)aval.sender;
     if (aval.context == AdditionContext.Applied)
         character.Status.BlockratePhysical += (ushort)value;
     else if (aval.context == AdditionContext.Deapplied)
         character.Status.BlockratePhysical -= (ushort)value;
 }
Пример #3
0
 public static void ActDead(ref AdditionValue aval, int value)
 {
     Actor starget = aval.sender as Actor;
     if (starget != null)
     {
         //DO SOMETHING
         Console.WriteLine("Act dead");
     }
 }
Пример #4
0
 // Addition 611
 public static void ADDITION_CANSEERESSHOLD(ref AdditionValue aval, int value)
 {
     Actor starget = aval.sender as Actor;
     if (starget != null)
     {
         if (aval.context == AdditionContext.Applied)
             starget._status.ChaseTresshold += (byte)(value ^ 1);
         else if (aval.context == AdditionContext.Deapplied)
             starget._status.ChaseTresshold -= (byte)(value ^ 1);
     }
 }
Пример #5
0
 public static void ADDITION_BREATH(ref AdditionValue aval, int value)
 {
     Actor character = aval.target as Actor;
     if ((aval.context == AdditionContext.Applied || aval.context == AdditionContext.Reapplied) && character != null)
     {
         character._status.CurrentOxygen += (byte)value;
         character._status.Updates |= 1;
         if (character._status.CurrentOxygen > character._status.MaximumOxygen)
         {
             character._status.CurrentOxygen = character._status.MaximumOxygen;
         }
     }
 }
Пример #6
0
        public static void ADDITION_CON(ref AdditionValue aval, int value)
        {
            Character character = (Character)aval.sender;

            if (aval.context == AdditionContext.Applied)
            {
                character._status.MaxRAttack += (ushort)(4 * value);
                character._status.MinRAttack += (ushort)(2 * value);
                character._status.BasePHitrate += (ushort)(2 * value);
                character.stats.EQUIPMENT.concentration += (byte)value;
            }
            else if (aval.context == AdditionContext.Deapplied)
            {
                character._status.MaxRAttack -= (ushort)(4 * value);
                character._status.MinRAttack -= (ushort)(2 * value);
                character._status.BasePHitrate -= (ushort)(2 * value);
                character.stats.EQUIPMENT.concentration -= (byte)value;
            }
        }
Пример #7
0
        public static void RandomizeItem(ref AdditionValue aval, int value)
        {
            if (aval.context == AdditionContext.Applied)
            {
                Character character = (Character)aval.sender;
                List<uint> Itemlist = new List<uint>();
                switch (value)
                {
                    case 1:
                        Itemlist.Clear();
                        Itemlist.Add(100000);
                        Itemlist.Add(100001);
                        Itemlist.Add(100002);
                        Itemlist.Add(100003);
                        break;

                    case 2:
                        Itemlist.Clear();
                        Itemlist.Add(100000);
                        Itemlist.Add(100001);
                        Itemlist.Add(100002);
                        Itemlist.Add(100003);
                        break;

                    case 3:
                        Itemlist.Clear();
                        Itemlist.Add(100000);
                        Itemlist.Add(100001);
                        Itemlist.Add(100002);
                        Itemlist.Add(100003);
                        break;

                    case 4:
                        Itemlist.Clear();
                        Itemlist.Add(100000);
                        Itemlist.Add(100001);
                        Itemlist.Add(100002);
                        Itemlist.Add(100003);
                        break;

                    case 5:
                        Itemlist.Clear();
                        Itemlist.Add(100000);
                        Itemlist.Add(100001);
                        Itemlist.Add(100002);
                        Itemlist.Add(100003);
                        break;

                    case 6:
                        Itemlist.Clear();
                        Itemlist.Add(100000);
                        Itemlist.Add(100001);
                        Itemlist.Add(100002);
                        Itemlist.Add(100003);
                        break;

                    case 7:
                        Itemlist.Clear();
                        Itemlist.Add(100000);
                        Itemlist.Add(100001);
                        Itemlist.Add(100002);
                        Itemlist.Add(100003);
                        break;

                    case 8:
                        Itemlist.Clear();
                        Itemlist.Add(100000);
                        Itemlist.Add(100001);
                        Itemlist.Add(100002);
                        Itemlist.Add(100003);
                        break;

                    case 9:
                        Itemlist.Clear();
                        Itemlist.Add(100000);
                        Itemlist.Add(100001);
                        Itemlist.Add(100002);
                        Itemlist.Add(100003);
                        break;

                    case 10:
                        Itemlist.Clear();
                        Itemlist.Add(100000);
                        Itemlist.Add(100001);
                        Itemlist.Add(100002);
                        Itemlist.Add(100003);
                        break;

                    case 11:
                        Itemlist.Clear();
                        Itemlist.Add(100000);
                        Itemlist.Add(100001);
                        Itemlist.Add(100002);
                        Itemlist.Add(100003);
                        break;

                    case 12:
                        Itemlist.Clear();
                        Itemlist.Add(100000);
                        Itemlist.Add(100001);
                        Itemlist.Add(100002);
                        Itemlist.Add(100003);
                        break;

                    case 13:
                        Itemlist.Clear();
                        Itemlist.Add(100000);
                        Itemlist.Add(100001);
                        Itemlist.Add(100002);
                        Itemlist.Add(100003);
                        break;

                    case 14:
                        Itemlist.Clear();
                        Itemlist.Add(100000);
                        Itemlist.Add(100001);
                        Itemlist.Add(100002);
                        Itemlist.Add(100003);
                        break;

                    case 15:
                        Itemlist.Clear();
                        Itemlist.Add(100000);
                        Itemlist.Add(100001);
                        Itemlist.Add(100002);
                        Itemlist.Add(100003);
                        break;

                    case 16:
                        Itemlist.Clear();
                        Itemlist.Add(100000);
                        Itemlist.Add(100001);
                        Itemlist.Add(100002);
                        Itemlist.Add(100003);
                        break;

                    case 17:
                        Itemlist.Clear();
                        Itemlist.Add(100000);
                        Itemlist.Add(100001);
                        Itemlist.Add(100002);
                        Itemlist.Add(100003);
                        break;

                    case 18: Itemlist.Clear();
                        Itemlist.Add(100000);
                        Itemlist.Add(100001);
                        Itemlist.Add(100002);
                        Itemlist.Add(100003);
                        break;

                    case 19:
                        Itemlist.Clear();
                        Itemlist.Add(100000);
                        Itemlist.Add(100001);
                        Itemlist.Add(100002);
                        Itemlist.Add(100003);
                        break;
                }

                if (Itemlist.Count == 0) return;
                int rand = Singleton.WorldTasks.random.Next(0, 100) % Itemlist.Count;
                Common.Items.GiveItem(character, Itemlist[rand], 1);
            }
        }
Пример #8
0
 //524        | P. Short Attack           			    | True                 | True
 //525        | P. Ranged Attack                		    | True                 | True
 //526        | Magic Attack           			        | True                 | True
 public static void PATTACK(ref AdditionValue aval, int value)
 {
     //Memory subfunction
     //Addition 500 - Min. P. Short Attack;
     Actor character = aval.sender as Actor;
     BattleStatus status = character.Status;
     if (aval.context == AdditionContext.Applied)
     {
         status.MinPAttack += value;
         status.MaxPAttack += value;
     }
     else if (aval.context == AdditionContext.Deapplied)
     {
         status.MinPAttack -= value;
         status.MaxPAttack -= value;
     }
 }
Пример #9
0
        /// <summary>
        /// Adds the specified value of ice-resistance to the specified aval.sender
        /// </summary>
        /// <param name="aval.sender"></param>
        /// <param name="Value"></param>
        /// <param name="aval.context"></param>
        public static void IceResistance(ref AdditionValue aval, int value)
        {
            //CHARACTER TO INVOKE
            Actor targeta = aval.sender as Actor;
            targeta._status.Updates |= 2;

            lock (targeta._status)
            {
                //CHECKS IF WE ARE aval.contextING OR DEaval.contextING
                if (aval.context == AdditionContext.Applied)
                    targeta._status.IceResistance += (ushort)value;
                else if (aval.context == AdditionContext.Deapplied)
                    targeta._status.IceResistance -= (ushort)value;
            }
        }
Пример #10
0
 public static void BLOCKSPRECOVERY(ref AdditionValue aval, int value)
 {
     Character starget = aval.sender as Character;
     if (starget != null)
     {
         if (aval.context == AdditionContext.Applied)
             starget.blocksprecovery += (byte)(value ^ 1);
         else if (aval.context == AdditionContext.Deapplied)
             starget.blockhprecovery -= (byte)(value ^ 1);
     }
 }
Пример #11
0
        public static void ADDITION_LP(ref AdditionValue aval, int value)
        {
            Actor character = aval.target as Actor;
            if ((aval.context == AdditionContext.Applied || aval.context == AdditionContext.Reapplied) && character != null)
            {
                character._status.CurrentLp += (byte)value;
                character._status.Updates |= 1;
                if (character._status.CurrentLp > 7)
                {
                    character._status.CurrentLp = 7;
                }

                //Do lp effect
                if (value > 0)
                    Common.Skills.SendSkillEffect(character, aval.additionid, 3, (uint)value);
            }
        }
Пример #12
0
        public static void ADDITION_INT(ref AdditionValue aval, int value)
        {
            Character character = (Character)aval.sender;

            if (aval.context == AdditionContext.Applied)
            {
                character._status.MaxMAttack += (ushort)(6 * value);
                character._status.MinMAttack += (ushort)(3 * value);
                character._status.BasePHitrate += (ushort)(1 * value);
                character.stats.EQUIPMENT.intelligence += (byte)value;
            }
            else if (aval.context == AdditionContext.Deapplied)
            {
                character._status.MaxMAttack -= (ushort)(6 * value);
                character._status.MinMAttack -= (ushort)(3 * value);
                character._status.BaseRHitrate -= (ushort)(1 * value);
                character.stats.EQUIPMENT.intelligence -= (byte)value;
            }
        }
Пример #13
0
 //Addition 586
 public static void ADDITION_DROPRATE(ref AdditionValue aval, int value)
 {
 }
Пример #14
0
        public static void ADDITION_DEX(ref AdditionValue aval, int value)
        {
            Character character = (Character)aval.sender;

            if (aval.context == AdditionContext.Applied)
            {
                character._status.BasePHitrate += (ushort)(1 * value);
                character.stats.EQUIPMENT.dexterity += (byte)value;
            }
            else if (aval.context == AdditionContext.Deapplied)
            {
                character._status.BasePHitrate -= (ushort)(1 * value);
                character.stats.EQUIPMENT.dexterity -= (byte)value;
            }
        }
Пример #15
0
        // Addition 665
        public static void ADDITION_CURRENTSPTARGET(ref AdditionValue aval, int value)
        {
            Actor character = aval.target as Actor;
            if ((aval.context == AdditionContext.Applied || aval.context == AdditionContext.Reapplied) && character != null)
            {
                character._status.CurrentSp += (ushort)value;
                character._status.Updates |= 1;
                if (character._status.CurrentSp > (ushort)character._status.MaxSP)
                {
                    character._status.CurrentSp = (ushort)character._status.MaxSP;
                }

                Common.Skills.SendSkillEffect(character, aval.additionid, 2, (uint)value);
            }
        }
Пример #16
0
 public static void ADDITION_SPRECOVERYRATE(ref AdditionValue aval, int value)
 {
     Actor character = aval.sender as Actor;
     if (aval.context == AdditionContext.Applied)
         character._status.SpRecoveryRate += (ushort)value;
     else if (aval.context == AdditionContext.Deapplied)
         character._status.SpRecoveryRate -= (ushort)value;
 }
Пример #17
0
        //545        | Strength                           | True                 | False
        //546        | Dexterity                          | True                 | False
        //547        | Intellect                          | True                 | False
        //548        | Concentration                      | True                 | False
        //549        | Luck                               | True                 | False
        public static void ADDITION_STR(ref AdditionValue aval, int value)
        {
            Character character = (Character)aval.sender;

            if (aval.context == AdditionContext.Applied)
            {
                character._status.MaxPAttack += (ushort)(2 * value);
                character._status.MinPAttack += (ushort)(1 * value);
                character._status.MaxHP += (ushort)(10 * value);
                character.stats.EQUIPMENT.strength += (byte)value;
                character._status.Updates |= 1;
            }
            else if (aval.context == AdditionContext.Deapplied)
            {
                character._status.MaxPAttack -= (ushort)(2 * value);
                character._status.MinPAttack -= (ushort)(1 * value);
                character._status.MaxHP -= (ushort)(10 * value);
                character.stats.EQUIPMENT.strength -= (byte)value;
                character._status.Updates |= 1;
            }
        }
Пример #18
0
        public static void ADDITION_LUK(ref AdditionValue aval, int value)
        {
            Character character = (Character)aval.sender;

            if (aval.context == AdditionContext.Applied)
                character.stats.EQUIPMENT.luck += (byte)value;
            else if (aval.context == AdditionContext.Deapplied)
                character.stats.EQUIPMENT.luck -= (byte)value;
        }
Пример #19
0
 /// <summary>
 /// Casting Time
 /// </summary>
 /// <param name="aval.sender"></param>
 /// <param name="target"></param>
 /// <param name="value"></param>
 /// <param name="aval.context"></param>
 public static void CastTime(ref AdditionValue aval, int value)
 {
     Actor character = aval.target as Actor;
     BattleStatus status = character.Status;
     if (aval.context == AdditionContext.Applied)
         status.CastingTime += (ushort)value;
     else if (aval.context == AdditionContext.Deapplied)
         status.CastingTime -= (ushort)value;
 }
Пример #20
0
 public static void ADDITION_MBREATHCAPACITY(ref AdditionValue aval, int value)
 {
     Actor character = aval.target as Actor;
     if (aval.context == AdditionContext.Applied)
         character._status.MaximumOxygen += (byte)value;
     else if (aval.context == AdditionContext.Deapplied)
         character._status.MaximumOxygen -= (byte)value;
     character._status.Updates |= 1;
 }
Пример #21
0
 public static void MEVASIONRATE(ref AdditionValue aval, int value)
 {
     //Memory subfunction
     //Addition 535 -  Magic Evasionrate  ;
     Actor character = aval.sender as Actor;
     BattleStatus status = character.Status;
     if (aval.context == AdditionContext.Applied)
         status.BaseMEvasionrate += value;
     else if (aval.context == AdditionContext.Deapplied)
         status.BaseMEvasionrate -= value;
 }
Пример #22
0
        public static void ADDITION_MSP(ref AdditionValue aval, int value)
        {
            //Memory subfunction
            //Addition 533 -  P. Short Hitrate ;

            Actor character = aval.target as Actor;
            BattleStatus status = character.Status;
            if (aval.context == AdditionContext.Applied)
                status.MaxSP += value;
            else if (aval.context == AdditionContext.Deapplied)
                status.MaxSP -= value;
            character._status.Updates |= 1;
        }
Пример #23
0
        public static void MINRATTACK(ref AdditionValue aval, int value)
        {
            //Memory subfunction
            //Addition 501 - Min. P. R. Attack;

            Actor character = aval.sender as Actor;
            BattleStatus status = character.Status;
            if (aval.context == AdditionContext.Applied)
                status.MinRAttack += value;
            else if (aval.context == AdditionContext.Deapplied)
                status.MinRAttack -= value;
        }
Пример #24
0
 //579        | P. Defence                               | True                 | True
 //580        | Magic Defence                            | True                 | False
 public static void ADDITION_PHYSICALDEFENSE(ref AdditionValue aval, int value)
 {
     Actor character = aval.sender as Actor;
     if (aval.context == AdditionContext.Applied)
         character._status.DefencePhysical += (byte)value;
     else if (aval.context == AdditionContext.Deapplied)
         character._status.DefencePhysical -= (byte)value;
 }
Пример #25
0
        public static void MINWRATTACK(ref AdditionValue aval, int value)
        {
            //Memory subfunction
            //Addition 519 - Min. Ranged Weapon Damage;

            Actor character = aval.sender as Actor;
            BattleStatus status = character.Status;
            if (aval.context == AdditionContext.Applied)
                status.MinWRAttack += (ushort)value;
            else if (aval.context == AdditionContext.Deapplied)
                status.MinWRAttack -= (ushort)value;
        }
Пример #26
0
 public static void ADDITION_SP(ref AdditionValue aval, int value)
 {
     Actor character = aval.target as Actor;
     if ((aval.context == AdditionContext.Applied || aval.context == AdditionContext.Reapplied) && character != null)
     {
         character._status.CurrentSp += (ushort)value;
         character._status.Updates |= 1;
         if (character._status.CurrentSp > (ushort)character._status.MaxSP)
         {
             character._status.CurrentSp = (ushort)character._status.MaxSP;
         }
     }
 }
Пример #27
0
 //533        | P. Short Hitrate        			        | True                 | True
 //534        | P. Ranged Hitrate          			    | True                 | True
 //535        | Magic Hitrate          			        | True                 | True
 public static void PHITRATE(ref AdditionValue aval, int value)
 {
     //Memory subfunction
     //Addition 533 -  P. Short Hitrate ;
     Actor character = aval.sender as Actor;
     BattleStatus status = character.Status;
     if (aval.context == AdditionContext.Applied)
         status.BasePHitrate += value;
     else if (aval.context == AdditionContext.Deapplied)
         status.BasePHitrate -= value;
 }
Пример #28
0
 public static void ADDITION_SPRECOVERQUANTITY(ref AdditionValue aval, int value)
 {
     Actor character = aval.sender as Actor;
     if (aval.context == AdditionContext.Applied)
         character._status.SpRecoveryQuantity += (short)value;
     else if (aval.context == AdditionContext.Deapplied)
         character._status.SpRecoveryQuantity -= (short)value;
 }
Пример #29
0
        // Addition 613
        public static void ADDITION_CEXP(ref AdditionValue aval, int value)
        {
            Character character = aval.sender as Character;

            if (value <= -20000)
            {
                double valueb = ((double)(value + 20000) / (double)1000);
                if (aval.context == AdditionContext.Applied)
                    character._CexpModifier += valueb;
                else if (aval.context == AdditionContext.Deapplied)
                    character._CexpModifier -= valueb;
            }
            else if (value >= 20000)
            {
                double valueb = ((double)(value - 20000) / (double)1000);
                if (aval.context == AdditionContext.Applied)
                    character._CexpModifier += valueb;
                else if (aval.context == AdditionContext.Deapplied)
                    character._CexpModifier -= valueb;
            }
        }
Пример #30
0
 // Addition 670
 public static void ADDITION_CHATBAN(ref AdditionValue aval, int value)
 {
     Character starget = aval.sender as Character;
     if (starget != null)
     {
         if (aval.context == AdditionContext.Applied)
             starget.chatmute += (byte)(value ^ 1);
         else if (aval.context == AdditionContext.Deapplied)
             starget.chatmute -= (byte)(value ^ 1);
     }
 }