无名杀吧 关注:63,922贴子:286,821
  • 3回复贴,共1

求大神改下我的神左慈代码

只看楼主收藏回复

之前花钱找人帮忙写了一个神左慈的代码
受到伤害,以及回合结束都能永久获得一名武将的所有技能
现在想修改一下,就是在永久获得武将技能之前,先选择任意一名角色,然后再让这名武将永久获得技能。也就是说可以给场上任何一个人。
麻烦大神帮帮我


IP属地:湖南1楼2023-08-27 08:24回复
    skill={
    audio:"huashen2",
    trigger:{
    player:["phaseJieshuBegin","damageEnd"],
    },
    forced:true,
    init:function (player) {
    player.storage.diyzc_yihua = [];
    // player.storage.wanhua2=0;
    },
    config:{
    "diyzc_yihua_full":true,
    },
    intro:{
    name:"亿化的武将",
    content:"characters",
    },
    content:function () {
    'step 0'
    debugger;
    var list;
    if (lib.skill.diyzc_yihua.config.diyzc_yihua_full !== false) {
    list = Object.keys(lib.character).filter(c=>!lib.character[c][4].contains('unseen'));
    } else {
    if (_status.characterlist) {
    list = _status.characterlist.slice();
    } else if (_status.connectMode) {
    list = get.charactersOL();
    } else {
    list = get.gainableCharacters();
    }
    }
    list.remove(player.getStorage('diyzc_yihua'));
    var stagePlayers = game.players.concat(game.dead);
    for (const player of stagePlayers) {
    list.remove(player.name);
    list.remove(player.name1);
    list.remove(player.name2);
    }
    list = list.randomGets(5);
    if (!list) {
    event.finish();
    return;
    }
    event.list = list;
    player.chooseButton(true).set('ai',function(button){
    return get.rank(button.link,true)-lib.character[button.link][2];
    }).set('createDialog',['获得一张武将牌上的所有技能',[list,'character']]);
    'step 1'
    if (result.links[0] && lib.character[result.links[0]]) {
    // game.log(player, "获得", result.links[0], "武将的所有技能");
    // player.storage.diyzc_yihua.push(result.links[0]);
    player.markAuto('diyzc_yihua', [result.links[0]]);
    // player.addSkill(lib.character[result.links[0]][3]);
    for (var skill of lib.character[result.links[0]][3]) {
    player.addSkillLog(skill);
    }
    }
    },
    contentx:function () {
    'step 0'
    // if(player.storage.wanhua2<1){
    // player.storage.wanhua2++;
    // event.finish();
    // }
    // else{
    // player.storage.wanhua2=0;
    // }
    'step 1'
    player.logSkill('万化');
    var list = [];
    var list2 = [];
    var players = game.players.concat(game.dead);
    for (var i = 0; i < players.length; i++) {
    list2.add(players[i].name);
    list2.add(players[i].name1);
    list2.add(players[i].name2);
    }
    for (var i in lib.character) {
    if (lib.character[i][4].contains('boss')) continue;
    if (lib.character[i][4].contains('minskin')) continue;
    if (player.storage.wanhua.contains(i)) continue;
    if (list2.contains(i)) continue;
    list.push(i);
    }
    var name = list.randomGet();
    player.storage.wanhua.push(name);
    player.markSkill('wanhua');
    var skills = lib.character[name][3];
    for (var i = 0; i < skills.length; i++) {
    player.addSkill(skills[i]);
    }
    event.dialog = ui.create.dialog('<div class="text center">' + get.translation(player) + '发动了【万化】', [[name], 'character']);
    game.delay(2);
    'step 2'
    event.dialog.close();
    },
    ai:{
    threaten:3,
    maixie:true,
    "maixie_hp":true,
    },
    "audioname2":{
    "key_shiki":"shiki_omusubi",
    },
    }


    IP属地:湖南2楼2023-08-27 08:25
    回复


      IP属地:湖南来自Android客户端3楼2023-08-27 10:39
      回复
        再花钱找那个人帮写


        IP属地:湖北来自Android客户端4楼2023-12-10 18:43
        回复