Exemplo n.º 1
0
        public AbsorbDamagePetSkill(PetSkillInfo skillInfo, NebulaObject source)
            : base(skillInfo, source)
        {
            if (data.prob < 1f)
            {
                AddCondition(new ProbCondition(data.prob, source));
            }
            if (data.cooldown > 0)
            {
                AddCondition(new CooldownCondition(data.cooldown, source));
            }
            AddCondition(new PetOwnerInCombatCondition(source));

            object objAbsrobDmg;
            object objConvertDmg;
            object objTime;

            if (data.inputs.TryGetValue("absorb_dmg_pc", out objAbsrobDmg))
            {
                m_AbsorbDmgPc = (float)objAbsrobDmg;
            }
            if (data.inputs.TryGetValue("convert_dmg_pc", out objConvertDmg))
            {
                m_ConvertDmgPc = (float)objConvertDmg;
            }
            if (data.inputs.TryGetValue("time", out objTime))
            {
                m_Time = (float)objTime;
            }
            m_BonusName1 = source.Id + "adp1";
            m_BonusName2 = source.Id + "adp2";
        }
Exemplo n.º 2
0
        public override bool TryCast(NebulaObject source, PlayerSkill skill, out Hashtable info)
        {
            info = new Hashtable();
            if (NotEnemyCheck(source, skill, info))
            {
                return(false);
            }

            var sourceBonuses = source.Bonuses();
            var targetObject  = source.Target().targetObject;
            var targetBonuses = targetObject.Bonuses();

            sourceBonuses.RemoveAnyPositiveBuff();
            targetBonuses.RemoveAnyPositiveBuff();

            float critDamagePc = skill.GetFloatInput("crit_dmg_pc");
            float critChancePc = skill.GetFloatInput("crit_chance_pc");
            float time         = skill.GetFloatInput("time");

            bool mastery = RollMastery(source);

            if (mastery)
            {
                time *= 2;
            }

            Buff critDamageBuff = new Buff(skill.id, null, Common.BonusType.increase_crit_damage_on_pc, time, critDamagePc);
            Buff critChanceBuff = new Buff(skill.id, null, Common.BonusType.increase_crit_chance_on_cnt, time, critChancePc);

            sourceBonuses.SetBuff(critDamageBuff, source);
            sourceBonuses.SetBuff(critChanceBuff, source);
            return(true);
        }
Exemplo n.º 3
0
 private void CheckWeaponDistance(NebulaObject target, WeaponHitInfo hit)
 {
     if (hit.normal && BlockedByDistance(target))
     {
         hit.Interrupt(ShotState.blockedByDistance);
     }
 }
Exemplo n.º 4
0
        public DecreasOwnerSubscriberDamageSkill(PetSkillInfo skill, NebulaObject source)
            : base(skill, source)
        {
            if (data.prob < 1f)
            {
                AddCondition(new ProbCondition(data.prob, source));
            }
            if (data.cooldown > 0)
            {
                AddCondition(new CooldownCondition(data.cooldown, source));
            }
            AddCondition(new PetOwnerInCombatCondition(source));
            AddCondition(new PetOwnerHasSubscriberCondition(source));

            object valObj  = null;
            object timeObj = null;

            if (data.inputs.TryGetValue("value", out valObj))
            {
                m_Value = (float)valObj;
            }
            if (data.inputs.TryGetValue("time", out timeObj))
            {
                m_Time = (float)timeObj;
            }
            m_BonusName = source.Id + "dosds";
        }
Exemplo n.º 5
0
        public override bool TryCast(NebulaObject source, PlayerSkill skill, out Hashtable info)
        {
            info = new Hashtable();
            float  hpPercent = skill.data.Inputs.Value <float>("hp_pc");
            string id        = source.Id + skill.data.Id;

            if (!source)
            {
                return(false);
            }

            var sourceDamagable = source.GetComponent <DamagableObject>();

            if (!sourceDamagable)
            {
                return(false);
            }

            //sourceDamagable.SetHealth(Mathf.Clamp( sourceDamagable.health + sourceDamagable.baseMaximumHealth * hpPercent, 0f, sourceDamagable.maximumHealth));
            bool mastery = RollMastery(source);

            if (mastery)
            {
                hpPercent *= 2;
            }
            sourceDamagable.RestoreHealth(source, sourceDamagable.baseMaximumHealth * hpPercent);
            return(true);
        }
Exemplo n.º 6
0
        public override bool TryCast(NebulaObject source, PlayerSkill skill, out Hashtable info)
        {
            info = new Hashtable();
            info.SetSkillUseState(Common.SkillUseState.normal);

            float radius  = skill.GetFloatInput("radius");
            bool  mastery = RollMastery(source);

            if (mastery)
            {
                radius *= 2;
                info.SetMastery(true);
            }
            else
            {
                info.SetMastery(false);
            }

            var targets = GetTargets(source, source, radius);

            foreach (var pTarget in targets)
            {
                var item = pTarget.Value;
                if (item.invisible)
                {
                    item.SetInvisibility(false);
                }
            }

            return(true);
        }
Exemplo n.º 7
0
        public void OnOwnerKilled(NebulaObject owner)
        {
            float difficulty   = GetOwnerDifficulty(owner);
            float npcLevel     = GetLevel(owner);
            float npcMaxHealth = MaxHealth(owner);

            List <NebulaObject> playerGroups = new List <NebulaObject>();

            foreach (var kvp in m_Damagers)
            {
                if (kvp.Value.DamagerType == Common.ItemType.Avatar)
                {
                    NebulaObject nebObject;
                    if (owner.world.TryGetObject((byte)kvp.Value.DamagerType, kvp.Value.DamagerId, out nebObject))
                    {
                        if (false == AddToGroup(nebObject, playerGroups))
                        {
                            GiveExpAndPvpPointsToPlayer(nebObject, owner, difficulty, npcLevel, npcMaxHealth);
                        }
                    }
                }
            }

            if (playerGroups.Count > 0)
            {
                foreach (NebulaObject pgo in playerGroups)
                {
                    GiveExpAndPvpPointsToPlayer(pgo, owner, difficulty, npcLevel, npcMaxHealth);
                }
            }
        }
Exemplo n.º 8
0
        //Check range heal to ally when using skill
        protected bool CheckForHealAlly(NebulaObject source)
        {
            var targetComponent    = source.Target();
            var weaponComponent    = source.Weapon();
            var characterComponent = source.Character();


            bool allSourceComponentsPresent = targetComponent && weaponComponent && characterComponent;

            if (allSourceComponentsPresent)
            {
                var targetObject = targetComponent.targetObject;
                if (targetObject)
                {
                    var  targetBonuses              = targetObject.Bonuses();
                    var  targetCharacter            = targetObject.Character();
                    var  targetDamagable            = targetObject.Damagable();
                    bool allTargetComponentsPresent = targetBonuses && targetCharacter && targetDamagable;
                    if (allTargetComponentsPresent)
                    {
                        var relation = characterComponent.RelationTo(targetCharacter);
                        if (relation == FractionRelation.Friend)
                        {
                            float distanceToTarget = source.transform.DistanceTo(targetObject.transform);
                            if (distanceToTarget <= weaponComponent.optimalDistance)
                            {
                                return(true);
                            }
                        }
                    }
                }
            }
            return(false);
        }
Exemplo n.º 9
0
        protected ConcurrentDictionary <string, Item> GetTargets(NebulaObject source, NebulaObject centerObject, float radius)
        {
            var sourceCharacter = source.Character();

            return(source.mmoWorld().GetItems((item) => {
                if (centerObject.transform.DistanceTo(item.transform) < radius)
                {
                    var damagable = item.Damagable();
                    var bonuses = item.Bonuses();
                    var character = item.Character();
                    bool allComponentsPresent = damagable && bonuses && character;

                    if (allComponentsPresent)
                    {
                        if (item.Id != centerObject.Id && (item.Id != source.Id))
                        {
                            var relation = sourceCharacter.RelationTo(character);
                            if (relation == FractionRelation.Enemy || relation == FractionRelation.Neutral)
                            {
                                return true;
                            }
                            //}
                        }
                    }
                }
                return false;
            }));
        }
Exemplo n.º 10
0
        public override bool TryCast(NebulaObject source, PlayerSkill skill, out Hashtable info)
        {
            info = new Hashtable();
            info.SetSkillUseState(SkillUseState.normal);

            if (!source)
            {
                return(false);
            }
            var damagable = source.GetComponent <DamagableObject>();

            if (!damagable)
            {
                return(false);
            }

            float hpPc = skill.GetFloatInput("hp_pc");
            float hp   = hpPc * damagable.maximumHealth;
            //damagable.SetHealth(damagable.health + hp);
            bool mastery = RollMastery(source);

            if (mastery)
            {
                hp *= 2;
                info.SetMastery(true);
            }
            else
            {
                info.SetMastery(false);
            }
            //damagable.RestoreHealth(source, hp);
            //source.Weapon().HealSelf(hp, skill.idInt);
            source.MmoMessage().SendHeal(EventReceiver.OwnerAndSubscriber, source.Weapon().HealSelf(hp, skill.idInt));
            return(true);
        }
Exemplo n.º 11
0
        /// <summary>
        /// Get items which allowed be targets on healing when used area healing
        /// </summary>
        /// <param name="source">Who healed</param>
        /// <param name="target">What center object</param>
        /// <param name="radius">Radius where see items</param>
        /// <returns>Return dictionary of founded items</returns>
        protected ConcurrentDictionary <string, Item> GetHealTargets(NebulaObject source, NebulaObject target, float radius)
        {
            var sourceCharacter = source.Character();

            return(source.mmoWorld().GetItems((item) => {
                float distance = target.transform.DistanceTo(item.transform);
                if (distance < radius)
                {
                    var itemDamagable = item.Damagable();
                    var itemCharacter = item.Character();
                    var itemBonuses = item.Bonuses();
                    bool allItemComponentsPresent = itemDamagable && itemCharacter && itemBonuses;
                    if (allItemComponentsPresent)
                    {
                        if (item.Id != target.Id && (item.Id != source.Id))
                        {
                            var relation = sourceCharacter.RelationTo(itemCharacter);
                            if (relation == FractionRelation.Friend)
                            {
                                return true;
                            }
                        }
                    }
                }
                return false;
            }));
        }
Exemplo n.º 12
0
        public override bool TryCast(NebulaObject source, PlayerSkill skill, out Hashtable info)
        {
            info = new Hashtable();

            if (!source)
            {
                return(false);
            }
            var sourceBonuses = source.GetComponent <PlayerBonuses>();

            if (!sourceBonuses)
            {
                return(false);
            }

            string buffID            = source.Id + skill.data.Id;
            float  buffSpeedPercent  = skill.data.Inputs.Value <float>("b_speed_pc");
            float  buffSpeedInterval = skill.data.Inputs.Value <float>("b_speed_interval");
            bool   mastery           = RollMastery(source);

            if (mastery)
            {
                buffSpeedInterval *= 2;
            }

            Buff speedBuff = new Buff(buffID, null, BonusType.increase_speed_on_pc, buffSpeedInterval, buffSpeedPercent);

            sourceBonuses.SetBuff(speedBuff, source);
            return(true);
        }
        public string GetKillOtherPlayerMessage(PlayerCharacterObject player, NebulaObject enemy)
        {
            MmoWorld       world          = player.nebulaObject.mmoWorld();
            RaceableObject playerRaceable = player.GetComponent <RaceableObject>();

            PlayerCharacterObject enemyCharacter = enemy.GetComponent <PlayerCharacterObject>();
            RaceableObject        enemyRaceable  = enemy.GetComponent <RaceableObject>();

            string systemName     = world.Resource().Zones.GetZoneName(world.Name);
            string playerName     = player.characterName;
            string playerRaceName = world.Resource().Zones.GetRaceName(playerRaceable.getRace());

            string sourceCoalitionName = player.guildName;

            if (sourceCoalitionName == null)
            {
                sourceCoalitionName = string.Empty;
            }

            string enemyName     = enemyCharacter.characterName;
            string enemyRaceName = world.Resource().Zones.GetRaceName(enemyRaceable.getRace());

            string enemyCoalitionName = enemyCharacter.guildName;

            if (enemyCoalitionName == null)
            {
                enemyCoalitionName = string.Empty;
            }

            return(string.Format("scm11:zone={0};chname={1};chrace={2};chcoal={3};enname={4};enrace={5};encoal={6}",
                                 world.Name, playerName, playerRaceable.race, sourceCoalitionName,
                                 enemyName, enemyRaceable.race, enemyCoalitionName));
        }
Exemplo n.º 14
0
        public override bool TryCast(NebulaObject source, PlayerSkill skill, out Hashtable info)
        {
            info = new Hashtable();
            float hpSpeed     = skill.GetDataInput <float>("hp_speed", 0f);
            float hpSpeedTime = skill.GetDataInput <float>("hp_speed_time", 0f);
            float speedPc     = skill.GetDataInput <float>("speed_pc", 0f);
            float speedTime   = skill.GetDataInput <float>("speed_time", 0f);

            bool mastery = RollMastery(source);

            if (mastery)
            {
                hpSpeedTime *= 2;
                speedTime   *= 2;
            }

            var bonuses = source.Bonuses();

            if (bonuses)
            {
                Buff healingBuff = new Buff(skill.data.Id.ToString(), null, Common.BonusType.increase_healing_speed_on_pc, hpSpeedTime, hpSpeed);
                Buff speedBuff   = new Buff(skill.data.Id.ToString(), null, Common.BonusType.increase_speed_on_pc, speedTime, speedPc);
                bonuses.SetBuff(healingBuff, source);
                bonuses.SetBuff(speedBuff, source);
            }
            return(true);
        }
Exemplo n.º 15
0
        public override bool TryCast(NebulaObject source, PlayerSkill skill, out Hashtable info)
        {
            info = new Hashtable();
            info.SetSkillUseState(SkillUseState.normal);

            if (!source)
            {
                return(false);
            }

            float speedPc   = skill.data.Inputs.Value <float>("speed_pc");
            float speedTime = skill.data.Inputs.Value <float>("speed_time");

            bool mastery = RollMastery(source);

            if (mastery)
            {
                speedTime *= 2;
                speedPc   *= 2.0f;
                info.SetMastery(true);
            }
            else
            {
                info.SetMastery(false);
            }

            Buff buff = new Buff(skill.data.Id.ToString(), null, BonusType.increase_speed_on_pc, speedTime, speedPc);

            source.GetComponent <PlayerBonuses>().SetBuff(buff, source);
            return(true);
        }
Exemplo n.º 16
0
 public InputDamage(NebulaObject source, WeaponDamage damage, DamageParams damageParams = null)
 {
     m_Damager = source;
     m_Damage  = damage;
     if (m_Damager)
     {
         var sourceCharacter = source.Character();
         if (sourceCharacter)
         {
             m_Workshop = (Workshop)sourceCharacter.workshop;
             m_Level    = sourceCharacter.level;
         }
         else
         {
             m_Workshop = Workshop.Arlen;
             m_Level    = 1;
         }
         var sourceRaceable = source.Raceable();
         if (sourceRaceable)
         {
             m_Race = (Race)sourceRaceable.race;
         }
         else
         {
             m_Race = Race.None;
         }
     }
     else
     {
         m_Workshop = Workshop.Arlen;
         m_Level    = 1;
         m_Race     = Race.None;
     }
     m_DamageParams = damageParams;
 }
Exemplo n.º 17
0
        public Hashtable GetPetAtWorld(string itemId)
        {
            var          world   = player.nebulaObject.mmoWorld();
            NebulaObject petItem = null;

            if (false == world.TryGetObject((byte)ItemType.Bot, itemId, out petItem))
            {
                return(CreateResponse(RPCErrorCode.ItemNotFound));
            }
            var petComponent = petItem.GetComponent <PetObject>();

            if (false == petComponent)
            {
                return(CreateResponse(RPCErrorCode.ComponentNotFound));
            }

            if (petComponent.info == null)
            {
                return(CreateResponse(RPCErrorCode.UnknownError));
            }

            var info   = petComponent.info.GetInfo(player.resource);
            var result = CreateResponse(RPCErrorCode.Ok);

            result.Add((int)SPC.Info, info);
            return(result);
        }
Exemplo n.º 18
0
 public override void HandleDeath(NebulaObject obj)
 {
     if (this.npcGroup != null)
     {
         this.npcGroup.HandleNpcDeath(obj.Id);
     }
 }
Exemplo n.º 19
0
        private bool AddToGroup(NebulaObject obj, List <NebulaObject> groupObjects)
        {
            var character = obj.GetComponent <PlayerCharacterObject>();

            if (character != null && character.hasGroup)
            {
                if (false == ContainsGroupObject(groupObjects, obj))
                {
                    groupObjects.Add(obj);
                }

                foreach (var member in character.group.members)
                {
                    NebulaObject go;
                    if (obj.mmoWorld().TryGetObject((byte)ItemType.Avatar, member.Value.gameRefID, out go))
                    {
                        if (false == ContainsGroupObject(groupObjects, go))
                        {
                            groupObjects.Add(go);
                        }
                    }
                }
                return(true);
            }
            return(false);
        }
Exemplo n.º 20
0
        public RestoreHpPetSkill(PetSkillInfo skillInfo, NebulaObject source)
            : base(skillInfo, source)
        {
            AddCondition(new PetOwnerHpPcLessThanCondition(data.prob, source));
            if (data.cooldown > 0.0f)
            {
                AddCondition(new CooldownCondition(data.cooldown, source));
            }

            object objMaxHpPc;
            object objHpAtSecPc;
            object objTime;

            if (data.inputs.TryGetValue("max_hp_pc", out objMaxHpPc))
            {
                m_MaxHpPc = (float)objMaxHpPc;
            }
            if (data.inputs.TryGetValue("hp_at_sec_pc", out objHpAtSecPc))
            {
                m_HpAtSecPc = (float)objHpAtSecPc;
            }
            if (data.inputs.TryGetValue("time", out objTime))
            {
                m_Time = (float)objTime;
            }
            m_BonusName1 = source.Id + "rhps1";
            m_BonusName2 = source.Id + "rhps2";
        }
Exemplo n.º 21
0
        public AccelerationPetSkill(PetSkillInfo skill, NebulaObject source)
            : base(skill, source)
        {
            if (data.prob < 1f)
            {
                AddCondition(new ProbCondition(data.prob, source));
            }
            if (data.cooldown > 0)
            {
                AddCondition(new CooldownCondition(data.cooldown, source));
            }

            m_PercentValue = 0f;
            m_Time         = 0f;
            object objPercentValue = null;
            object objTimeValue    = null;

            if (data.inputs.TryGetValue("value", out objPercentValue))
            {
                m_PercentValue = (float)objPercentValue;
            }
            if (data.inputs.TryGetValue("time", out objTimeValue))
            {
                m_Time = (float)objTimeValue;
            }
            m_BonusName = source.Id + "aps";
        }
Exemplo n.º 22
0
        public override bool TryCast(NebulaObject source, PlayerSkill skill, out Hashtable info)
        {
            info = new Hashtable();

            if (!source)
            {
                return(false);
            }

            var bonuses = source.GetComponent <PlayerBonuses>();

            float time   = skill.data.Inputs.Value <float>("time");
            float timePc = skill.data.Inputs.Value <float>("time_pc");

            float mult = 1f - timePc;

            bonuses.MultInterval(BonusType.decrease_speed_on_cnt, mult);
            bonuses.MultInterval(BonusType.decrease_speed_on_pc, mult);

            bool mastery = RollMastery(source);

            if (mastery)
            {
                time *= 2;
            }

            Buff buff = new Buff(skill.data.Id.ToString(), null, BonusType.decrease_time_of_negative_speed_buffs, time, mult);

            bonuses.SetBuff(buff, source);
            return(true);
        }
Exemplo n.º 23
0
        public override bool DoUse()
        {
            PlayerBonuses bonuses = null;

            if (pet)
            {
                if (pet.owner)
                {
                    var ownerTarget = pet.owner.Target();
                    if (ownerTarget.targetIsEnemySubscriber)
                    {
                        bonuses = ownerTarget.targetObject.Bonuses();
                    }
                    else
                    {
                        var anySubscriber = ownerTarget.anyEnemySubscriber;
                        if (anySubscriber)
                        {
                            bonuses = anySubscriber.Bonuses();
                        }
                    }
                }
            }

            if (bonuses)
            {
                Buff buff = new Buff(m_BonusName, null, Common.BonusType.decrease_damage_on_pc, m_Time, m_Value);
                bonuses.SetBuff(buff, pet.nebulaObject);
                m_LastEnemy = bonuses.nebulaObject;
                s_Log.InfoFormat("used pet skill 3 and set buff (decrease_damage_on_pc) on object = {0}:{1}".Color(LogColor.white), (ItemType)m_LastEnemy.Type, m_LastEnemy.Id);
                return(true);
            }
            return(false);
        }
Exemplo n.º 24
0
        public override bool TryCast(NebulaObject source, PlayerSkill skill, out Hashtable info)
        {
            info = new Hashtable();
            if (NotEnemyCheck(source, skill, info))
            {
                return(false);
            }

            float dmgMult = skill.GetFloatInput("dmg_mult");
            float hpMult  = skill.GetFloatInput("hp_mult");

            bool mastery = RollMastery(source);

            if (mastery)
            {
                dmgMult *= 2;
                hpMult  *= 2;
            }
            WeaponHitInfo hit;
            var           shot = source.Weapon().Fire(out hit, skill.data.Id, dmgMult);

            if (hit.normalOrMissed)
            {
                float hp = hit.actualDamage.totalDamage * hpMult;
                source.Damagable().RestoreHealth(source, hp);
                source.MmoMessage().SendShot(Common.EventReceiver.OwnerAndSubscriber, shot);
                return(true);
            }
            else
            {
                source.MmoMessage().SendShot(Common.EventReceiver.ItemOwner, shot);
                return(false);
            }
        }
Exemplo n.º 25
0
        public IncreaseEnergyCostPetSkill(PetSkillInfo skill, NebulaObject source)
            : base(skill, source)
        {
            if (data.prob < 1f)
            {
                AddCondition(new ProbCondition(data.prob, source));
            }
            if (data.cooldown > 0)
            {
                AddCondition(new CooldownCondition(data.cooldown, source));
            }

            AddCondition(new PetOwnerEnergyLessThanTargetEnergyCondition(source));
            AddCondition(new PetOwnerInCombatCondition(source));

            object objEnergyPc;
            object objTime;

            if (skill.inputs.TryGetValue("energy_pc", out objEnergyPc))
            {
                m_EnergyPc = (float)objEnergyPc;
            }
            if (skill.inputs.TryGetValue("time", out objTime))
            {
                m_Time = (float)objTime;
            }
            m_BonusName = source.Id + "iecps";
        }
Exemplo n.º 26
0
 public void OnHitMe(NebulaObject whoHit)
 {
     if (!hasTarget)
     {
         SetTarget(whoHit.Id, whoHit.Type);
     }
 }
Exemplo n.º 27
0
 private void CheckPlayerAgro(NebulaObject targetObject)
 {
     if (targetObject.IsPlayer())
     {
         targetObject.Target().OnHitMe(nebulaObject);
     }
 }
Exemplo n.º 28
0
        public void OnBuffSetted(Buff buff, NebulaObject source)
        {
            if (source != null && noTarget && (nebulaObject.getItemType() != ItemType.Avatar))
            {
                if (BuffUtils.IsDebuff(buff.buffType))
                {
                    if (nebulaObject.IsBot())
                    {
                        var weap            = GetComponent <BaseWeapon>();
                        var character       = GetComponent <CharacterObject>();
                        var sourceCharacter = source.GetComponent <CharacterObject>();

                        if (weap != null && character != null && sourceCharacter != null)
                        {
                            var relation = character.RelationTo(sourceCharacter);

                            if (relation == FractionRelation.Enemy || relation == FractionRelation.Neutral)
                            {
                                SetTarget(source);
                            }
                        }
                    }
                }
            }
        }
Exemplo n.º 29
0
        private void Collect(NebulaObject ichest)
        {
            if (!m_Collected)
            {
                m_ChestObjects.Dequeue();
                if (m_ChestObjects.Count == 0)
                {
                    m_Collected = true;
                }
                //m_Collected = true;

                var player = pet.owner.GetComponent <MmoActor>();
                var chest  = ichest.GetComponent <ChestComponent>();
                if (player != null && chest != null)
                {
                    ConcurrentBag <ServerInventoryItem> addedObjects;
                    bool status = player.Inventory.AddAllFromChest(chest, player.nebulaObject.Id, out addedObjects);
                    pet.nebulaObject.MmoMessage().SendCollectChest(new System.Collections.Hashtable {
                        { (int)SPC.Target, ichest.Id },
                        { (int)SPC.TargetType, ichest.Type },
                        { (int)SPC.Status, status }
                    });
                    if (status)
                    {
                        player.EventOnInventoryUpdated();
                    }
                }
            }
        }
Exemplo n.º 30
0
        //private static readonly ILogger log = LogManager.GetCurrentClassLogger();

        public override bool TryCast(NebulaObject source, PlayerSkill skill, out Hashtable info)
        {
            info = new Hashtable();
            info.SetSkillUseState(SkillUseState.normal);

            float pc      = skill.GetFloatInput("hpdmg_pc");
            float time    = skill.GetFloatInput("time");
            var   bonuses = source.Bonuses();

            bool mastery = RollMastery(source);

            if (mastery)
            {
                time *= 2;
                pc   *= 2;
                info.SetMastery(true);
            }
            else
            {
                info.SetMastery(false);
            }

            Buff damageBuff  = new Buff(skill.data.Id.ToString(), null, Common.BonusType.increase_damage_on_pc, time, pc);
            Buff healingBuff = new Buff(skill.data.Id.ToString(), null, Common.BonusType.increase_healing_on_pc, time, pc);

            //log.InfoFormat("set damage and healing buff {0}:{1} green", pc, time);
            bonuses.SetBuff(damageBuff, source);
            bonuses.SetBuff(healingBuff, source);
            return(true);
        }