无名杀吧 关注:63,695贴子:286,031
  • 5回复贴,共1

关于修改孙翊凶疑的代码求助

只看楼主收藏回复

想咨询一下大佬。我想这么修改,代码应该具体怎么整?
限定技。当你处于濒死状态时,若剩余武将牌堆中:有“徐氏”,则你将体力值回复至3点,并将此武将牌替换为“徐氏”;没有“徐氏”,则你将体力值回复至1点并获得〖魂姿〗。
改成
限定技。当你处于濒死状态时,则你将体力值回复至3点,并将此武将牌替换为“徐氏”
{
audio:2,
skillAnimation:true,
animationColor:"wood",
limited:true,
enable:"chooseToUse",
filter:function(event,player){
if(event.type!='dying') return false;
if(player!=event.dying) return false;
return true;
},
content:function(){
player.awakenSkill('syxiongyi');
if(!_status.characterlist){
lib.skill.pingjian.initList();
}
var hp=1-player.hp;
if((player.name1=='re_sunyi'||player.name2=='re_sunyi')&&_status.characterlist.contains('xushi')){
hp+=2;
_status.characterlist.remove('xushi');
_status.characterlist.add('re_sunyi');
player.reinit('re_sunyi','xushi',false);
}
else{
player.addSkillLog('olhunzi');
}
if(hp>0) player.recover(hp);
},
ai:{
order:1,
save:true,
skillTagFilter:function(player,arg,target){
return player==target;
},
result:{
player:10,
},
},
derivation:["olhunzi","reyingzi","gzyinghun"],
mark:true,
intro:{
content:"limited",
},
init:function(player,skill){
player.storage[skill]=false;
},
}


IP属地:上海1楼2023-06-15 20:00回复


    IP属地:上海2楼2023-06-15 20:00
    回复
      也就是不管徐氏在不在省余武将排队都能替换成这张武将卡


      IP属地:上海3楼2023-06-15 21:22
      回复
        把第一个if语句里的徐氏条件删了


        IP属地:河北来自Android客户端4楼2023-06-15 22:16
        回复
          else里的全删了就行了


          IP属地:河北来自Android客户端5楼2023-06-15 22:16
          回复
            老哥,这么改对不?
            @不懂爱情的中年人
            {
            audio:2,
            skillAnimation:true,
            animationColor:"wood",
            limited:true,
            enable:"chooseToUse",
            filter:function(event,player){
            if(event.type!='dying') return false;
            if(player!=event.dying) return false;
            return true;
            },
            content:function(){
            player.awakenSkill('syxiongyi');
            if(!_status.characterlist){
            lib.skill.pingjian.initList();
            }
            var hp=1-player.hp;
            if(player.name1=='re_sunyi'){
            hp+=2;
            player.reinit('re_sunyi','xushi',false);
            }
            if(hp>0) player.recover(hp);
            },
            mark:true,
            intro:{
            content:"limited",
            },
            init:function(player,skill){
            player.storage[skill]=false;
            },
            }


            IP属地:上海6楼2023-06-17 07:37
            回复