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",
},
}