v1.9.95.1
This commit is contained in:
parent
4f29a35bb8
commit
627bc3b520
Binary file not shown.
Binary file not shown.
Binary file not shown.
Binary file not shown.
Binary file not shown.
Binary file not shown.
Binary file not shown.
Binary file not shown.
Binary file not shown.
Binary file not shown.
Binary file not shown.
Binary file not shown.
Binary file not shown.
Binary file not shown.
Binary file not shown.
Binary file not shown.
Binary file not shown.
Binary file not shown.
Binary file not shown.
Binary file not shown.
Binary file not shown.
Binary file not shown.
Binary file not shown.
Binary file not shown.
Binary file not shown.
Binary file not shown.
Binary file not shown.
Binary file not shown.
Binary file not shown.
Binary file not shown.
Binary file not shown.
Binary file not shown.
Binary file not shown.
Binary file not shown.
|
@ -29,7 +29,7 @@ game.import('character',function(lib,game,ui,get,ai,_status){
|
|||
sp_zhugeliang:['male','shu',3,['huoji','bazhen','kanpo']],
|
||||
pangtong:['male','shu',3,['lianhuan','oldniepan']],
|
||||
xunyu:['male','wei',3,['quhu','jieming']],
|
||||
dianwei:['male','wei',4,['qiangxi']],
|
||||
dianwei:['male','wei',4,['qiangxix']],
|
||||
taishici:['male','wu',4,['tianyi']],
|
||||
yanwen:['male','qun',4,['shuangxiong']],
|
||||
re_yuanshao:['male','qun',4,['luanji','xueyi'],['zhu']],
|
||||
|
@ -4919,6 +4919,15 @@ game.import('character',function(lib,game,ui,get,ai,_status){
|
|||
},
|
||||
}
|
||||
},
|
||||
qiangxix:{
|
||||
inherit:'reqiangxi',
|
||||
usable:2,
|
||||
filterTarget:function (card,player,target){
|
||||
if(player==target) return false;
|
||||
if(target.hasSkill('reqiangxi_off')) return false;
|
||||
return true;
|
||||
},
|
||||
},
|
||||
qiangxi:{
|
||||
audio:2,
|
||||
enable:'phaseUse',
|
||||
|
@ -6614,6 +6623,7 @@ game.import('character',function(lib,game,ui,get,ai,_status){
|
|||
oldniepan:'涅槃',
|
||||
quhu:'驱虎',
|
||||
jieming:'节命',
|
||||
qiangxix:'强袭',
|
||||
qiangxi:'强袭',
|
||||
tianyi:'天义',
|
||||
shuangxiong:'双雄',
|
||||
|
@ -6631,6 +6641,7 @@ game.import('character',function(lib,game,ui,get,ai,_status){
|
|||
quhu_info:'出牌阶段限一次,你可以与一名体力值大于你的角色拼点,若你赢,则该角色对其攻击范围内另一名由你指定的角色造成1点伤害。若你没赢,该角色对你造成一点伤害。',
|
||||
jieming_info:'当你受到1点伤害后,你可令一名角色将手牌摸至X张(X为其体力上限且至多为5)。',
|
||||
qiangxi_info:'出牌阶段限一次,你可以失去一点体力或弃置一张武器牌,然后对你攻击范围内的一名其他角色造成一点伤害。',
|
||||
qiangxix_info:'出牌阶段限两次,你可以失去一点体力或弃置一张武器牌,然后一名本阶段内未成为过〖强袭〗的目标的其他角色造成一点伤害。',
|
||||
tianyi_info:'出牌阶段限一次,你可以和一名其他角色拼点。若你赢,你获得以下技能效果直到回合结束:你使用【杀】没有距离限制;可额外使用一张【杀】;使用【杀】时可额外指定一个目标。若你没赢,你不能使用【杀】直到回合结束。',
|
||||
shuangxiong_info:'摸牌阶段,你可以改为进行一次判定:你获得此判定牌,且于此回合的出牌阶段,你可以将任意一张与此判定牌不同颜色的手牌当做【决斗】使用。',
|
||||
luanji_info:'出牌阶段,你可以将任意两张相同花色的手牌当做【万箭齐发】使用。',
|
||||
|
|
|
@ -807,6 +807,7 @@ game.import('character',function(lib,game,ui,get,ai,_status){
|
|||
'step 0'
|
||||
var cards=get.cards(2);
|
||||
event.cards=cards;
|
||||
game.log(player,'观看了牌堆顶的'+get.cnNumber(cards.length)+'张牌');
|
||||
player.chooseControl('ok').set('dialog',['卜卦',cards]);
|
||||
'step 1'
|
||||
while(cards.length){
|
||||
|
@ -829,7 +830,7 @@ game.import('character',function(lib,game,ui,get,ai,_status){
|
|||
}
|
||||
player.chooseButton(['选择至多两种牌',[list,'vcard']],true,[1,2]).set('ai',function(button){
|
||||
var target=_status.event.getParent('busuan').target;
|
||||
return get.attitude(_status.event.player,target)*get.useful({name:button.link[2]});
|
||||
return get.attitude(_status.event.player,target)*get.useful({name:button.link[2]})+0.1;
|
||||
});
|
||||
'step 1'
|
||||
target.storage.busuan_angelbeats=result.links.slice(0);
|
||||
|
@ -847,6 +848,12 @@ game.import('character',function(lib,game,ui,get,ai,_status){
|
|||
},
|
||||
},
|
||||
busuan_angelbeats:{
|
||||
mark:true,
|
||||
intro:{
|
||||
mark:function(dialog,content,player){
|
||||
if(content&&content.length) dialog.add([content,'vcard']);
|
||||
},
|
||||
},
|
||||
trigger:{player:'drawBefore'},
|
||||
forced:true,
|
||||
filter:function(event,player){
|
||||
|
@ -854,19 +861,25 @@ game.import('character',function(lib,game,ui,get,ai,_status){
|
|||
},
|
||||
onremove:true,
|
||||
content:function(){
|
||||
trigger.cancel();
|
||||
'step 0'
|
||||
var list=player.storage['busuan_angelbeats'];
|
||||
var cards=[];
|
||||
for(var i=0;i<list.length;i++){
|
||||
for(var i=0;i<Math.min(trigger.num,list.length);i++){
|
||||
var card=get.cardPile(function(cardx){
|
||||
return !cards.contains(cardx)&&cardx.name==list[Math.min(i,list.length-1)][2];
|
||||
});
|
||||
if(card) cards.push(card);
|
||||
if(card){
|
||||
player.storage.busuan_angelbeats.splice(i--,1);
|
||||
trigger.num--;
|
||||
cards.push(card);
|
||||
}
|
||||
}
|
||||
if(cards.length){
|
||||
player.gain(cards,'gain2','log');
|
||||
}
|
||||
if(cards.length) player.gain(cards,'draw');
|
||||
'step 1'
|
||||
player.removeSkill('busuan_angelbeats');
|
||||
if(!trigger.num) trigger.cancel();
|
||||
if(!player.storage.busuan_angelbeats.length) player.removeSkill('busuan_angelbeats');
|
||||
},
|
||||
},
|
||||
mingjie:{
|
||||
|
|
|
@ -429,6 +429,36 @@ window.noname_asset_list=[
|
|||
'audio/skill/beishui2.mp3',
|
||||
'audio/skill/qingjiao1.mp3',
|
||||
'audio/skill/qingjiao2.mp3',
|
||||
'audio/skill/botu1.mp3',
|
||||
'audio/skill/botu2.mp3',
|
||||
'audio/skill/cuorui1.mp3',
|
||||
'audio/skill/cuorui2.mp3',
|
||||
'audio/skill/huwei1.mp3',
|
||||
'audio/skill/huwei2.mp3',
|
||||
'audio/skill/liewei1.mp3',
|
||||
'audio/skill/liewei2.mp3',
|
||||
'audio/skill/mouzhu1.mp3',
|
||||
'audio/skill/mouzhu2.mp3',
|
||||
'audio/skill/niluan1.mp3',
|
||||
'audio/skill/nuluan2.mp3',
|
||||
'audio/skill/pianyi1.mp3',
|
||||
'audio/skill/pianyi2.mp3',
|
||||
'audio/skill/sgrenwang1.mp3',
|
||||
'audio/skill/sgrenwang2.mp3',
|
||||
'audio/skill/shenju1.mp3',
|
||||
'audio/skill/shenju2.mp3',
|
||||
'audio/skill/suzi1.mp3',
|
||||
'audio/skill/suzi2.mp3',
|
||||
'audio/skill/wanrong1.mp3',
|
||||
'audio/skill/wanrong2.mp3',
|
||||
'audio/skill/xiaoxi_hansui1.mp3',
|
||||
'audio/skill/xiaoxi_hansui2.mp3',
|
||||
'audio/skill/xiaoxi_machao1.mp3',
|
||||
'audio/skill/xiaoxi_machao2.mp3',
|
||||
'audio/skill/xiaoxi_pangde1.mp3',
|
||||
'audio/skill/xiaoxi_pangde2.mp3',
|
||||
'audio/skill/xiechan1.mp3',
|
||||
'audio/skill/xiechan2.mp3',
|
||||
|
||||
'audio/skill/anguo1.mp3',
|
||||
'audio/skill/anguo2.mp3',
|
||||
|
@ -3679,6 +3709,7 @@ window.noname_asset_list=[
|
|||
'image/splash/doudizhu.jpg',
|
||||
'image/splash/guozhan.jpg',
|
||||
'image/splash/identity.jpg',
|
||||
'image/splash/single.jpg',
|
||||
'image/splash/stone.jpg',
|
||||
'image/splash/tafang.jpg',
|
||||
'image/splash/versus.jpg',
|
||||
|
|
12
game/game.js
12
game/game.js
|
@ -5477,6 +5477,7 @@
|
|||
init:'normal',
|
||||
item:{
|
||||
normal:'新1v1',
|
||||
dianjiang:'点将单挑',
|
||||
},
|
||||
restart:true,
|
||||
frequent:true,
|
||||
|
@ -5489,6 +5490,7 @@
|
|||
init:'normal',
|
||||
item:{
|
||||
normal:'新1v1',
|
||||
dianjiang:'点将单挑',
|
||||
},
|
||||
restart:true,
|
||||
frequent:true,
|
||||
|
@ -14138,7 +14140,15 @@
|
|||
},get.delayx(gain2t,gain2t));
|
||||
}
|
||||
else if(event.source&&(event.animate=='give'||event.animate=='giveAuto')){
|
||||
event.source['$'+event.animate](cards,player);
|
||||
if(event.animate=='give') event.source['$'+event.animate](cards,player);
|
||||
else{
|
||||
var givemap={hs:[],ots:[]};
|
||||
for(var i=0;i<cards.length;i++){
|
||||
givemap[cards[i].original=='h'?'hs':'ots'].push(cards[i]);
|
||||
}
|
||||
if(givemap.hs.length) event.source.$giveAuto(givemap.hs,player);
|
||||
if(givemap.ots.length) event.source.$give(givemap.ots,player);
|
||||
}
|
||||
game.pause();
|
||||
setTimeout(function(){
|
||||
addv();
|
||||
|
|
|
@ -1,7 +1,8 @@
|
|||
window.noname_update={
|
||||
version:'1.9.95.0.1',
|
||||
update:'1.9.95',
|
||||
version:'1.9.95.1',
|
||||
update:'1.9.95.0.1',
|
||||
changeLog:[
|
||||
'点将单挑模式',
|
||||
'BUG修复',
|
||||
],
|
||||
files:[
|
||||
|
@ -19,13 +20,13 @@ window.noname_update={
|
|||
'character/sp.js',
|
||||
//'character/tw.js',
|
||||
//'character/standard.js',
|
||||
'character/xinghuoliaoyuan.js',
|
||||
//'character/xinghuoliaoyuan.js',
|
||||
//'character/yijiang.js',
|
||||
//'mode/doudizhu.js',
|
||||
//'mode/guozhan.js',
|
||||
'mode/single.js',
|
||||
//'mode/versus.js',
|
||||
//'mode/boss.js',
|
||||
'mode/boss.js',
|
||||
'game/game.js',
|
||||
//'game/config.js',
|
||||
//'game/package.js',
|
||||
|
|
Binary file not shown.
After Width: | Height: | Size: 27 KiB |
234
mode/boss.js
234
mode/boss.js
|
@ -1033,6 +1033,7 @@ game.import('mode',function(lib,game,ui,get,ai,_status){
|
|||
boss_huatuo:['male','shen',6,['chulao','mazui','boss_shengshou','guizhen','wuqin'],['qun','boss','bossallowed'],'wu'],
|
||||
boss_dongzhuo:['male','shen',20,['jiuchi','boss_qiangzheng','boss_baolin'],['qun','boss','bossallowed'],'shu'],
|
||||
|
||||
"boss_sunce":["male","shen","1/8",["boss_jiang","boss_hunzi","boss_hunyou","boss_taoni"],['qun','boss','bossallowed'],'wu'],
|
||||
|
||||
// boss_nianshou:['male','shen',Infinity,['boss_nianrui','boss_qixiang','boss_damagecount'],['boss'],'shu'],
|
||||
// boss_yuji:['male','qun',8,[],['boss','bossallowed'],'nei'],
|
||||
|
@ -1965,6 +1966,15 @@ game.import('mode',function(lib,game,ui,get,ai,_status){
|
|||
boss_huangyueying:{
|
||||
chongzheng:12,
|
||||
},
|
||||
boss_sunce:{
|
||||
loopType:2,
|
||||
loopFirst:function(){
|
||||
return game.boss.previousSeat;
|
||||
},
|
||||
gameDraw:function(player){
|
||||
return player==game.boss?8:4;
|
||||
},
|
||||
},
|
||||
global:{
|
||||
loopType:1,
|
||||
chongzheng:6
|
||||
|
@ -5599,7 +5609,7 @@ game.import('mode',function(lib,game,ui,get,ai,_status){
|
|||
}
|
||||
'step 1'
|
||||
if(result.bool){
|
||||
player.chooseUseTarget(result.links[0][2]);
|
||||
player.chooseUseTarget(result.links[0][2],true,false);
|
||||
}
|
||||
},
|
||||
ai:{
|
||||
|
@ -7866,6 +7876,218 @@ game.import('mode',function(lib,game,ui,get,ai,_status){
|
|||
}
|
||||
}
|
||||
},
|
||||
|
||||
"boss_hunzi":{
|
||||
skillAnimation:true,
|
||||
animationColor:"wood",
|
||||
audio:"hunzi",
|
||||
juexingji:true,
|
||||
derivation:["reyingzi","yinghun"],
|
||||
unique:true,
|
||||
trigger:{
|
||||
player:"phaseBegin",
|
||||
},
|
||||
filter:function (event,player){
|
||||
return player.hp<=2&&!player.storage.boss_hunzi;
|
||||
},
|
||||
forced:true,
|
||||
content:function (){
|
||||
player.removeSkill('boss_hunyou');
|
||||
player.removeSkill("boss_hunyou_dying");
|
||||
player.removeSkill("boss_hunyou_dieBegin")
|
||||
player.loseMaxHp();
|
||||
player.addSkill('reyingzi');
|
||||
player.addSkill('yinghun');
|
||||
game.log(player,'获得了技能','#g【英姿】和【英魂】');
|
||||
game.log(player,'','#y【魂佑】')
|
||||
player.awakenSkill('boss_hunzi');
|
||||
player.storage.boss_hunzi=true;
|
||||
},
|
||||
ai:{
|
||||
threaten:function (player,target){
|
||||
if(target.hp==1) return 2;
|
||||
return 0.5;
|
||||
},
|
||||
maixie:true,
|
||||
effect:{
|
||||
target:function (card,player,target){
|
||||
if(!target.hasFriend()) return;
|
||||
if(get.tag(card,'damage')==1&&target.hp==2&&!target.isTurnedOver()&&
|
||||
_status.currentPhase!=target&&get.distance(_status.currentPhase,target,'absolute')<=3) return [0.5,1];
|
||||
},
|
||||
},
|
||||
},
|
||||
},
|
||||
"boss_jiang":{
|
||||
audio:"jiang",
|
||||
trigger:{
|
||||
global:["respondEnd"],
|
||||
},
|
||||
charlotte:true,
|
||||
locked:true,
|
||||
init:function(player){
|
||||
window.setInterval(function(){
|
||||
if(player.hasSkill('boss_jiang')){
|
||||
player.storage.boss_jiang=true;
|
||||
}
|
||||
else{
|
||||
game.addGlobalSkill('boss_jiang');
|
||||
game.addGlobalSkill('boss_jiang_use');
|
||||
window.clearInterval(this);
|
||||
}
|
||||
},1000);
|
||||
},
|
||||
filter2:function(event,player){
|
||||
if(!event.respondTo[1]) return false;
|
||||
if(get.itemtype(event.cards)!='cards') return false;
|
||||
if(['h','e','j'].contains(get.position(event.cards[0]))) return false;
|
||||
if(event.respondTo[1]&&get.itemtype(event.respondTo[1])!='card') return false;
|
||||
if(event.respondTo[1]&&['h','e','j'].contains(get.position(event.respondTo[1]))) return false;
|
||||
},
|
||||
filter:function (event,player){
|
||||
if(!player.storage.boss_jiang) return false;
|
||||
if(!event.respondTo) return false;
|
||||
if(get.color(event.card)!='red') return false;
|
||||
if(event.respondTo[0]!=player){
|
||||
return event.player==player;
|
||||
}
|
||||
else{
|
||||
return event.player!=player;
|
||||
}
|
||||
},
|
||||
frequent:true,
|
||||
content:function (){
|
||||
player.draw();
|
||||
if(!lib.skill.boss_jiang.filter2(trigger,player)) return;
|
||||
if(trigger.respondTo[0]!=player){
|
||||
if(trigger.respondTo[1]&&get.position(trigger.respondTo[1])=='d') player.gain(trigger.respondTo[1],'gain2');
|
||||
}
|
||||
else{
|
||||
if(get.position(trigger.cards[0])=='d') player.gain(trigger.cards,'gain2');
|
||||
}
|
||||
},
|
||||
group:["boss_jiang_use"],
|
||||
subSkill:{
|
||||
use:{
|
||||
trigger:{
|
||||
global:["useCard"],
|
||||
},
|
||||
filter:function (event,player){
|
||||
if(!player.storage.boss_jiang) return false;
|
||||
if(get.color(event.card)!='red') return false;
|
||||
return player==event.player||event.targets.contains(player);
|
||||
},
|
||||
frequent:true,
|
||||
content:function (){
|
||||
player.draw();
|
||||
if(trigger.player!=player&&get.itemtype(trigger.cards)=='cards'&&get.position(trigger.cards[0])=='d') player.gain(trigger.cards,'gain2');
|
||||
},
|
||||
sub:true,
|
||||
},
|
||||
},
|
||||
},
|
||||
"boss_hunyou":{
|
||||
forced:true,
|
||||
init:function (player){
|
||||
player.hp=1;
|
||||
player.storage.hp=player.hp;
|
||||
player.storage.maxHp=player.maxHp;
|
||||
player.update();
|
||||
},
|
||||
trigger:{
|
||||
player:["damageBefore","recoverBefore","loseHpBefore","loseMaxHpBefore","gainMaxHpBefore"],
|
||||
},
|
||||
content:function (){
|
||||
trigger.cancel();
|
||||
},
|
||||
group:["boss_hunyou_dying","boss_hunyou_dieBegin"],
|
||||
subSkill:{
|
||||
dying:{
|
||||
trigger:{
|
||||
player:"dying",
|
||||
},
|
||||
silent:true,
|
||||
filter:function (event,player){
|
||||
if(player.hp!=player.storage.hp&&player.storage.hp>0) return true;
|
||||
return false;
|
||||
},
|
||||
content:function (){
|
||||
trigger.cancel();
|
||||
player.maxHp=player.storage.maxHp;
|
||||
player.hp=player.storage.hp;
|
||||
player.update();
|
||||
},
|
||||
sub:true,
|
||||
forced:true,
|
||||
popup:false,
|
||||
},
|
||||
dieBegin:{
|
||||
trigger:{
|
||||
player:"dieBegin",
|
||||
},
|
||||
silent:true,
|
||||
filter:function (event,player){
|
||||
if(player.maxHp!=player.storage.maxHp&&player.storage.maxHp>0) return true;
|
||||
return false;
|
||||
},
|
||||
content:function (){
|
||||
trigger.cancel();
|
||||
player.maxHp=player.storage.maxHp;
|
||||
player.hp=player.storage.hp;
|
||||
player.update();
|
||||
},
|
||||
sub:true,
|
||||
forced:true,
|
||||
popup:false,
|
||||
},
|
||||
},
|
||||
},
|
||||
"boss_taoni":{
|
||||
forced:true,
|
||||
trigger:{
|
||||
global:["gameStart","phaseBefore"],
|
||||
player:"dieBegin",
|
||||
},
|
||||
priority:50,
|
||||
init:function (player){
|
||||
player.boss_taoni=function(){
|
||||
var __Ox598df = ["length", "players", "player", "element"];
|
||||
for (var i = 0; i < game[__Ox598df[0x1]][__Ox598df[0x0]]; i++) {
|
||||
var node = game[__Ox598df[0x1]][i];
|
||||
for (var a in lib[__Ox598df[0x3]][__Ox598df[0x2]]) {
|
||||
var opd=Object.getOwnPropertyDescriptor(node,a);
|
||||
if(opd!=undefined){
|
||||
if(opd.get||opd.set||opd.writable!=true||opd.configurable!=true||opd.enumerable!=true){
|
||||
game.over(lib.translate[node.name]+'触发了〖讨逆〗,游戏已被终止。');
|
||||
}
|
||||
}
|
||||
node[a] = lib[__Ox598df[0x3]][__Ox598df[0x2]][a];//还原函数
|
||||
var _xsu8 = ['classList','hp','maxHp','skills'];
|
||||
for(var b=0;b<_xsu8.length;b++){
|
||||
var opd2=Object.getOwnPropertyDescriptor(node,_xsu8[b]);
|
||||
if(opd2!=undefined){
|
||||
if(opd2.get||opd2.set||opd2.writable!=true||opd2.configurable!=true||opd2.enumerable!=true){
|
||||
game.over(lib.translate[node.name]+'触发了〖讨逆〗,游戏已被终止。');
|
||||
}
|
||||
}
|
||||
}
|
||||
var _cRYC = ['players','dead','over'];
|
||||
for(var c=0;c<_cRYC.length;c++){
|
||||
var opd3=Object.getOwnPropertyDescriptor(game,_cRYC[c]);
|
||||
if(opd3!=undefined){
|
||||
if(opd3.get||opd3.set||opd3.writable!=true||opd3.configurable!=true||opd3.enumerable!=true){
|
||||
已被game.over('〖讨逆〗被触发,游戏终止。');
|
||||
}
|
||||
}
|
||||
}
|
||||
}
|
||||
}
|
||||
};
|
||||
},
|
||||
content:function (){
|
||||
player.boss_taoni();
|
||||
},
|
||||
},
|
||||
},
|
||||
translate:{
|
||||
zhu:'神',
|
||||
|
@ -8424,6 +8646,16 @@ game.import('mode',function(lib,game,ui,get,ai,_status){
|
|||
boss_zlfanshi:'反噬',
|
||||
boss_zlfanshi_info:'锁定技,每个回合你受到第一次伤害后,若再次受到伤害,则对随机一名其他角色造成1点伤害。',
|
||||
|
||||
"boss_sunce":"那个男人",
|
||||
"boss_hunzi":"魂姿",
|
||||
"boss_hunzi_info":"觉醒技,准备阶段,若你的体力值为1,你减1点体力上限,失去技能【魂佑】并获得技能【英姿】和【英魂】。",
|
||||
"boss_jiang":"激昂",
|
||||
"boss_jiang_info":"①锁定技,【激昂】不会无效<br>②每当你使用或打出红色牌时,你可以摸一张牌。若你是因响应其他角色使用或打出的牌,则你获得对方使用或打出的牌<br>③当有其他角色使用或打出红色牌指定你为目标或响应你后,你可以摸一张牌并获得这些牌",
|
||||
"boss_hunyou":"魂佑",
|
||||
"boss_hunyou_info":"锁定技,你的体力值变化和体力上限变化无效。",
|
||||
"boss_taoni":"讨逆",
|
||||
"boss_taoni_info":"锁定技,游戏开始时,每名角色回合开始时或你死亡时,你检查存活角色的合法性。若有角色存在非法行为,则你终止本局游戏。",
|
||||
|
||||
boss_xhuanren:'关卡说明',
|
||||
boss_xhuanren_info:'',
|
||||
boss_xhuanren_info_boss:'第一关:挑战秦广王。<br>第二关:挑战楚江王,宋帝王,五官王,阎罗王中的一个。<br>第三关:挑战卞城王,泰山王,都市王,平等王中的一个。<br>第四关:挑战转轮王。',
|
||||
|
|
126
mode/single.js
126
mode/single.js
|
@ -197,6 +197,7 @@ game.import('mode',function(lib,game,ui,get,ai,_status){
|
|||
game.addVideo('init',null,info);
|
||||
|
||||
game.gameDraw(game.zhu,function(player){
|
||||
if(_status.mode=='dianjiang') return 4;
|
||||
if(player.hasSkill('cuorui')){
|
||||
player.logSkill('cuorui');
|
||||
return 2+_status.characterChoice[player.identity].length;
|
||||
|
@ -276,19 +277,58 @@ game.import('mode',function(lib,game,ui,get,ai,_status){
|
|||
checkOnlineResult:function(player){
|
||||
return player.isAlive();
|
||||
},
|
||||
chooseCharacter:function(){
|
||||
chooseCharacterDianjiang:function(){
|
||||
var next=game.createEvent('chooseCharacter',false);
|
||||
next.showConfig=true;
|
||||
next.addPlayer=function(player){
|
||||
var list=lib.config.mode_config.identity.identity[game.players.length-3].slice(0);
|
||||
var list2=lib.config.mode_config.identity.identity[game.players.length-2].slice(0);
|
||||
for(var i=0;i<list.length;i++) list2.remove(list[i]);
|
||||
player.identity=list2[0];
|
||||
player.setIdentity('cai');
|
||||
};
|
||||
next.removePlayer=function(){
|
||||
return game.players.randomGet(game.me,game.zhu);
|
||||
next.setContent(function(){
|
||||
"step 0"
|
||||
ui.arena.classList.add('choose-character');
|
||||
lib.init.onfree();
|
||||
"step 1"
|
||||
game.me.chooseControl('先手','后手').prompt='请选择自己的行动顺序';
|
||||
"step 2"
|
||||
var map=result.control=='先手'?['zhu','fan']:['fan','zhu'];
|
||||
game.me.identity=map[0];
|
||||
game.me.next.identity=map[1];
|
||||
game.me.showIdentity();
|
||||
game.me.next.showIdentity();
|
||||
"step 3"
|
||||
event.flipassign=true;
|
||||
event.videoId=lib.status.videoId++;
|
||||
var list=[];
|
||||
for(var i in lib.character){
|
||||
if(lib.filter.characterDisabled(i)) continue;
|
||||
list.push(i);
|
||||
}
|
||||
_status.characterList=list;
|
||||
var filter=function(name){
|
||||
return !_status.characterList.contains(name);
|
||||
};
|
||||
var dialog=ui.create.characterDialog('heightset',filter,'expandall').open();
|
||||
dialog.videoId=event.videoId;
|
||||
|
||||
game.me.chooseButton(true).set('ai',function(button){
|
||||
return Math.random();
|
||||
}).set('dialog',event.videoId);
|
||||
"step 4"
|
||||
game.me.init(result.links[0]);
|
||||
game.me.chooseButton(true).set('ai',function(button){
|
||||
return Math.random();
|
||||
}).set('dialog',event.videoId);
|
||||
"step 5"
|
||||
game.me.next.init(result.links[0]);
|
||||
setTimeout(function(){
|
||||
ui.arena.classList.remove('choose-character');
|
||||
},500);
|
||||
});
|
||||
},
|
||||
chooseCharacter:function(){
|
||||
if(_status.mode=='dianjiang'){
|
||||
game.chooseCharacterDianjiang();
|
||||
return;
|
||||
}
|
||||
var next=game.createEvent('chooseCharacter',false);
|
||||
next.showConfig=true;
|
||||
next.setContent(function(){
|
||||
"step 0"
|
||||
ui.arena.classList.add('choose-character');
|
||||
|
@ -456,7 +496,70 @@ game.import('mode',function(lib,game,ui,get,ai,_status){
|
|||
},500);
|
||||
});
|
||||
},
|
||||
chooseCharacterDianjiangOL:function(){
|
||||
var next=game.createEvent('chooseCharacter',false);
|
||||
next.showConfig=true;
|
||||
next.setContent(function(){
|
||||
"step 0"
|
||||
var map=Math.random()<0.5?['zhu','fan']:['fan','zhu'];
|
||||
game.me.identity=map[0];
|
||||
game.me.next.identity=map[1];
|
||||
game.me.showIdentity();
|
||||
game.me.next.showIdentity();
|
||||
"step 1"
|
||||
//event.flipassign=true;
|
||||
event.videoId=lib.status.videoId++;
|
||||
var list=[];
|
||||
var libCharacter={};
|
||||
for(var i=0;i<lib.configOL.characterPack.length;i++){
|
||||
var pack=lib.characterPack[lib.configOL.characterPack[i]];
|
||||
for(var j in pack){
|
||||
if(j=='zuoci'||j=='miheng') continue;
|
||||
if(lib.character[j]) libCharacter[j]=pack[j];
|
||||
}
|
||||
}
|
||||
for(i in libCharacter){
|
||||
if(lib.filter.characterDisabled(i,libCharacter)) continue;
|
||||
list.push(i);
|
||||
}
|
||||
game.broadcastAll(function(list,id){
|
||||
_status.characterList=list;
|
||||
var filter=function(name){
|
||||
return !_status.characterList.contains(name);
|
||||
};
|
||||
var dialog=ui.create.characterDialog('heightset',filter,'expandall').open();
|
||||
dialog.videoId=id;
|
||||
ui.arena.classList.add('choose-character');
|
||||
},list,event.videoId);
|
||||
game.zhu.chooseButton(true).set('ai',function(button){
|
||||
return Math.random();
|
||||
}).set('dialog',event.videoId);
|
||||
"step 2"
|
||||
game.broadcastAll(function(player,character,id){
|
||||
player.init(character);
|
||||
},game.zhu,result.links[0]);
|
||||
game.fan.chooseButton(true).set('ai',function(button){
|
||||
return Math.random();
|
||||
}).set('dialog',event.videoId);
|
||||
"step 3"
|
||||
game.broadcastAll('closeDialog',event.videoId);
|
||||
game.broadcastAll(function(player,character,id){
|
||||
var dialog=get.idDialog(id);
|
||||
if(dialog){
|
||||
dialog.close();
|
||||
}
|
||||
player.init(character);
|
||||
setTimeout(function(){
|
||||
ui.arena.classList.remove('choose-character');
|
||||
},500);
|
||||
},game.fan,result.links[0],event.videoId);
|
||||
});
|
||||
},
|
||||
chooseCharacterOL:function(){
|
||||
if(_status.mode=='dianjiang'){
|
||||
game.chooseCharacterDianjiangOL();
|
||||
return;
|
||||
}
|
||||
var next=game.createEvent('chooseCharacter',false);
|
||||
next.setContent(function(){
|
||||
"step 0"
|
||||
|
@ -655,9 +758,10 @@ game.import('mode',function(lib,game,ui,get,ai,_status){
|
|||
player:{
|
||||
hasZhuSkill:function(){return false;},
|
||||
dieAfter:function(){
|
||||
if(_status.characterChoice[this.identity].length<=3) game.checkResult();
|
||||
if(_status.mode!='normal'||_status.characterChoice[this.identity].length<=3) game.checkResult();
|
||||
},
|
||||
dieAfter2:function(){
|
||||
if(_status.mode!='normal') return;
|
||||
var next=game.createEvent('replacePlayerSingle',false,_status.event.getParent());
|
||||
next.player=this;
|
||||
next.forceDie=true;
|
||||
|
|
Loading…
Reference in New Issue