Exemplo n.º 1
0
        public bool calcDebuffSuccess(TSkill skill, L2Character caster)
        {
            bool success = false;

            int rnd = new Random().Next(0, 100);

            success = rnd <= skill.activate_rate;

            caster.sendMessage(skill.skill_id + " success " + rnd + "% (" + skill.activate_rate + "% base)");

            return(success);
        }
Exemplo n.º 2
0
        private void affect(L2Character target)
        {
            target.sendMessage("u can feel defence.");
            //Random rn = new Random();
            //if (Zone._skills != null)
            //{
            //    foreach (L2Skill sk in Zone._skills)
            //    {
            //        if (rn.Next(0, 100) > Zone._skill_prob)
            //            continue;

            //        target.addAbnormal(sk, null, true, false);
            //    }
            //}

            //if (Zone._skill != null)
            //{
            //    if (rn.Next(0, 100) > Zone._skill_prob)
            //        return;

            //    target.addAbnormal(Zone._skill, null, true, false);
            //}
        }
Exemplo n.º 3
0
 public void CastBuffForQuestReward(L2Character cha, int skillId)
 {
     cha.sendMessage("l2citizen.CastBuffForQuestReward " + skillId);
     new BuffForQuestReward(this, cha, skillId);
 }