Exemple #1
0
 public static void LookByPerson(player.Player p, string name)
 {
     //判断是否有
     if (!ALLItem.ContainsKey(name))
     {
         p.SendMes("查无此物");
         return;
     }
     //执行使用
     p.SendMes(ALLItem[name].Report());
 }
Exemple #2
0
        public static void Lottery(player.Player p)
        {
            var price = 3 + p.StatusInt.Get("抽奖次数") / 10;

            if (p.StatusInt.Get("抽奖次数") > 9 && p.StatusInt.Get("抽奖次数") % 10 == 0)
            {
                p.SendMes($"这是你第{p.StatusInt.Get("抽奖次数")}次抽奖啦~下一次,我就会多收你一枚金币了~");
            }
            if (p.Gold < price)
            {
                p.SendMes($"你的金币数量不足{price}枚");
                return;
            }
            else
            {
                //抽奖次数+1
                p.StatusInt.AddOne("抽奖次数");
                p.Gold -= price;
            }

            Item item0;

            //累计值增加
            p.StatusInt.Add("累计值", 1);
            //大奖!
            if (p.StrictJude(p.StatusInt.Get("累计值")))
            {
                p.StatusInt.Lose("累计值", 10);
                var i = Common.D() - p.Lucky;
                if (i <= -10)
                {
                    item0 = RandomOne(ItemsS);
                }
                else if (i <= 5)
                {
                    item0 = RandomOne(ItemsA);
                }
                else
                {
                    item0 = RandomOne(ItemsB);
                }
            }
            //普通抽取
            else
            {
                item0 = RandomOne(ItemsC);
            }
            //告知
            p.Package.AddOne(item0.name);
            p.SendMes($"花费{price}枚金币,你抽中了一个{item0.Level}级{item0.name}");
        }
Exemple #3
0
        public override void PlayWin(player.Player p)
        {
            var itm = p.Jude(50) ? ItemList.RandomC() : ItemList.RandomB();

            p.SendMes($"为名除害消灭{name},获得{itm}");
            p.Package.AddOne(itm);
        }
Exemple #4
0
        public override void PlayWin(player.Player p)
        {
            var itm = ItemList.RandomA();

            p.SendMes($"你悄无声息的走出了监视区域,成功收集到了暗黑组织犯罪的证据,获得官方奖励的{itm}一个");
            p.Package.AddOne(itm);
        }
Exemple #5
0
        public override void PlayWin(player.Player p)
        {
            var itm = ItemList.RandomS();

            p.SendMes($"走出地下迷宫,揭破地下组织的阴谋,获得官方奖励的{itm}一个");
            p.Package.AddOne(itm);
        }
Exemple #6
0
 //使用的时候(全体物品)
 public static void UseItemByPerson(player.Player p, string name)
 {
     //判断是否有
     if (!p.Package.Contain(name))
     {
         p.SendMes("你没有这个物品");
         return;
     }
     //判断是否可以使用
     if (!ALLItem.ContainsKey(name))
     {
         p.SendMes("此物品不可使用");
         return;
     }
     //执行使用
     ALLItem[name].UseBy(p);
 }
Exemple #7
0
 //失败惩罚
 virtual public void PlayLose(player.Player p)
 {
     if (level == "小兵")
     {
         p.SendMes($"挑战失败,你被{name}打的落花流水");
     }
     else if (level == "队长")
     {
         p.Crazy += 5;
         p.SendMes($"挑战失败,你被{name}打的落花流水,疯狂+5");
     }
     else
     {
         p.Crazy += 25;
         p.SendMes($"在绝对的力量面前,你实在过于弱小,疯狂+25");
     }
 }
Exemple #8
0
        //在子类作用域隐藏父类变量
        public override void PlayWin(player.Player p)
        {
            p.StatusStr.Set(name, "击杀");
            //xx,成就的方法记载
            p.StatusStr.Set($"焚毁晴空号!", "成就");
            p.SendMes($"你!战胜了{name}!?获得{lose}");

            p.Package.Add("神偷手套", 3);
        }
Exemple #9
0
        public void LookByP(player.Player p)
        {
            p.SendMes($@"
{name} {level} 
修为:{XW}
三相: 体质{Basic} | 疯狂{Crazy} | 幸运{Lucky}
战斗效果: {fuc}
掉落: {lose}");
        }
Exemple #10
0
        //在子类作用域隐藏父类变量
        public override void PlayWin(player.Player p)
        {
            p.StatusStr.Set(name, "击杀");
            //xx,成就的方法记载
            p.StatusStr.Set($"令其死亡!", "成就");
            p.SendMes($"你!战胜了{name}!?获得{lose}");

            p.Package.AddOne("焚血");
        }
Exemple #11
0
 //在子类作用域隐藏父类变量
 public override void PlayWin(player.Player p)
 {
     p.StatusStr.Set(name, "击杀");
     //xx,成就的方法记载
     p.StatusStr.Set($"击杀{name}", "成就");
     p.SendMes($"你!战胜了{name}!?获得{lose}");
     p.Package.Add("闪回石", 22);
     p.Package.AddOne("缩小药水");
     p.Package.AddOne("忘忧草");
 }
Exemple #12
0
        //和玩家战斗
        public void DefeatByPlayer(player.Player p)
        {
            if (p.StatusStr.Contain(name))
            {
                p.SendMes($"你已经击杀过一次{name}了");
                p.StatusInt.Set("上次挑衅时间", 0);
                return;
            }
            p.SendMes($"你正在挑衅{name}");

            Effect(p);
            if (p.GetAtk() > GetATK())
            {
                PlayWin(p);
            }
            else
            {
                PlayLose(p);
            }
            EffectLose(p);
        }
Exemple #13
0
        public void LookByPerson(player.Player p)
        {
            p.SendMes($@"遗迹 {name} 
...
{des}
...
首领: {header}
队长: {mid}
小兵: {solder}
--------------------
你可以使用'挑衅#怪物名'来攻击怪物");
        }
Exemple #14
0
        //死亡掉落(基础C和基础B)
        virtual public void PlayWin(player.Player p)
        {
            string iname = "";

            if (level == "小兵")
            {
                iname = ItemList.RandomC();
            }
            else if (level == "队长")
            {
                iname = ItemList.RandomB();
            }
            p.SendMes($"你击杀了{name},获得一个{iname}");
            p.Package.AddOne(iname);
        }
Exemple #15
0
 public static void MonsterATKbyPerson(player.Player p, string monster_name)
 {
     //选出怪物
     if (monster_name == Now.solder)
     {
         MonsterList.Monsters[monster_name].DefeatByPlayer(p);
     }
     else if (monster_name == Now.mid)
     {
         MonsterList.Monsters[monster_name].DefeatByPlayer(p);
     }
     else if (monster_name == Now.header)
     {
         MonsterList.Monsters[monster_name].DefeatByPlayer(p);
     }
     else
     {
         p.SendMes("请挑衅遗迹中存在的怪物");
         //如果挑战错怪了,就再给一次挑战机会
         p.StatusInt.Set("上次挑衅时间", 0);
     }
 }
Exemple #16
0
        public override void PlayWin(player.Player p)
        {
            p.SendMes($"你击杀了{c}只蝙蝠,获得{(int)c / 10}枚金币");

            p.Gold += (int)c / 10;
        }
Exemple #17
0
 //在子类作用域隐藏父类变量
 public override void PlayWin(player.Player p)
 {
     p.SendMes($"你击杀了{name},获得一枚闪回石");
     p.Package.AddOne("闪回石");
 }