shenhua
This commit is contained in:
parent
d7a52b8c80
commit
390847f78c
|
@ -228,13 +228,14 @@ card.standard={
|
||||||
else if(nh==target.hp+1&&target.hp>=2&&target.num('h','tao')<=1){
|
else if(nh==target.hp+1&&target.hp>=2&&target.num('h','tao')<=1){
|
||||||
keep=true;
|
keep=true;
|
||||||
}
|
}
|
||||||
|
var mode=get.mode();
|
||||||
if(target.hp>=2&&keep&&target.hasFriend()){
|
if(target.hp>=2&&keep&&target.hasFriend()){
|
||||||
if(target.hp>2) return 0;
|
if(target.hp>2) return 0;
|
||||||
if(target.hp==2){
|
if(target.hp==2){
|
||||||
for(var i=0;i<game.players.length;i++){
|
for(var i=0;i<game.players.length;i++){
|
||||||
if(target!=game.players[i]&&ai.get.attitude(target,game.players[i])>=3){
|
if(target!=game.players[i]&&ai.get.attitude(target,game.players[i])>=3){
|
||||||
if(game.players[i].hp<=1) return 0;
|
if(game.players[i].hp<=1) return 0;
|
||||||
if(lib.config.mode=='identity'&&game.players[i].isZhu&&game.players[i].hp<=2) return 0;
|
if(mode=='identity'&&game.players[i].isZhu&&game.players[i].hp<=2) return 0;
|
||||||
}
|
}
|
||||||
}
|
}
|
||||||
}
|
}
|
||||||
|
@ -243,7 +244,7 @@ card.standard={
|
||||||
var att=ai.get.attitude(player,target);
|
var att=ai.get.attitude(player,target);
|
||||||
if(att<3&&att>=0&&player!=target) return 0;
|
if(att<3&&att>=0&&player!=target) return 0;
|
||||||
var tri=_status.event.getParent()._trigger;
|
var tri=_status.event.getParent()._trigger;
|
||||||
if(lib.config.mode=='identity'&&player.identity=='fan'&&target.identity=='fan'){
|
if(mode=='identity'&&player.identity=='fan'&&target.identity=='fan'){
|
||||||
if(tri&&tri.name=='dying'&&tri.source&&tri.source.identity=='fan'&&tri.source!=target){
|
if(tri&&tri.name=='dying'&&tri.source&&tri.source.identity=='fan'&&tri.source!=target){
|
||||||
var num=0;
|
var num=0;
|
||||||
for(var i=0;i<game.players.length;i++){
|
for(var i=0;i<game.players.length;i++){
|
||||||
|
@ -256,12 +257,12 @@ card.standard={
|
||||||
return 0;
|
return 0;
|
||||||
}
|
}
|
||||||
}
|
}
|
||||||
if(lib.config.mode=='identity'&&player.identity=='zhu'&&target.identity=='nei'){
|
if(mode=='identity'&&player.identity=='zhu'&&target.identity=='nei'){
|
||||||
if(tri&&tri.name=='dying'&&tri.source&&tri.source.identity=='zhong'){
|
if(tri&&tri.name=='dying'&&tri.source&&tri.source.identity=='zhong'){
|
||||||
return 0;
|
return 0;
|
||||||
}
|
}
|
||||||
}
|
}
|
||||||
if(lib.config.mode=='stone'&&target.isMin()&&
|
if(mode=='stone'&&target.isMin()&&
|
||||||
player!=target&&tri&&tri.name=='dying'&&player.side==target.side&&
|
player!=target&&tri&&tri.name=='dying'&&player.side==target.side&&
|
||||||
tri.source!=target.getEnemy()){
|
tri.source!=target.getEnemy()){
|
||||||
return 0;
|
return 0;
|
||||||
|
@ -638,7 +639,7 @@ card.standard={
|
||||||
}
|
}
|
||||||
if(num>1) return 0;
|
if(num>1) return 0;
|
||||||
var nh=target.num('h');
|
var nh=target.num('h');
|
||||||
if(lib.config.mode=='identity'){
|
if(get.mode()=='identity'){
|
||||||
if(target.isZhu&&nh<=2&&target.hp<=1) return -100;
|
if(target.isZhu&&nh<=2&&target.hp<=1) return -100;
|
||||||
}
|
}
|
||||||
if(nh==0) return -2;
|
if(nh==0) return -2;
|
||||||
|
@ -698,7 +699,7 @@ card.standard={
|
||||||
}
|
}
|
||||||
if(num>1) return 0;
|
if(num>1) return 0;
|
||||||
var nh=target.num('h');
|
var nh=target.num('h');
|
||||||
if(lib.config.mode=='identity'){
|
if(get.mode()=='identity'){
|
||||||
if(target.isZhu&&nh<=2&&target.hp<=1) return -100;
|
if(target.isZhu&&nh<=2&&target.hp<=1) return -100;
|
||||||
}
|
}
|
||||||
if(nh==0) return -2;
|
if(nh==0) return -2;
|
||||||
|
@ -1147,7 +1148,8 @@ card.standard={
|
||||||
}
|
}
|
||||||
if(num>0) return num;
|
if(num>0) return num;
|
||||||
if(num==0){
|
if(num==0){
|
||||||
if(lib.config.mode=='identity'){
|
var mode=get.mode();
|
||||||
|
if(mode=='identity'){
|
||||||
if(target.identity=='nei') return 1;
|
if(target.identity=='nei') return 1;
|
||||||
var situ=ai.get.situation();
|
var situ=ai.get.situation();
|
||||||
if(target.identity=='fan'){
|
if(target.identity=='fan'){
|
||||||
|
@ -1157,7 +1159,7 @@ card.standard={
|
||||||
if(situ<-1) return 1;
|
if(situ<-1) return 1;
|
||||||
}
|
}
|
||||||
}
|
}
|
||||||
else if(lib.config.mode=='guozhan'){
|
else if(mode=='guozhan'){
|
||||||
if(target.identity=='ye') return 1;
|
if(target.identity=='ye') return 1;
|
||||||
for(var i=0;i<game.players.length;i++){
|
for(var i=0;i<game.players.length;i++){
|
||||||
if(game.players[i].identity=='unknown') return -1;
|
if(game.players[i].identity=='unknown') return -1;
|
||||||
|
|
|
@ -175,7 +175,7 @@ character.hearth={
|
||||||
}
|
}
|
||||||
if(target){
|
if(target){
|
||||||
player.line(target,'green');
|
player.line(target,'green');
|
||||||
player.markSkillCharacter(target,get.translation(link),lib.translate[link+'_info'],'maoxian');
|
player.markSkillCharacter('maoxian',target,get.translation(link),lib.translate[link+'_info']);
|
||||||
}
|
}
|
||||||
player.checkMarks();
|
player.checkMarks();
|
||||||
game.delay();
|
game.delay();
|
||||||
|
|
|
@ -192,16 +192,7 @@ character.shenhua={
|
||||||
player.chooseToDiscard(true);
|
player.chooseToDiscard(true);
|
||||||
"step 1"
|
"step 1"
|
||||||
var target=player.storage.fangquan;
|
var target=player.storage.fangquan;
|
||||||
target.marks.fangquan=target.markCharacter(player,{
|
target.markSkillCharacter('fangquan',player,'放权','进行一个额外回合');
|
||||||
name:'放权',
|
|
||||||
content:'进行一个额外的回合'
|
|
||||||
});
|
|
||||||
game.addVideo('markCharacter',target,{
|
|
||||||
name:'放权',
|
|
||||||
content:'进行一个额外的回合',
|
|
||||||
id:'fangquan',
|
|
||||||
target:player.dataset.position
|
|
||||||
});
|
|
||||||
target.phase();
|
target.phase();
|
||||||
target.addSkill('fangquan3');
|
target.addSkill('fangquan3');
|
||||||
player.removeSkill('fangquan2');
|
player.removeSkill('fangquan2');
|
||||||
|
@ -214,11 +205,7 @@ character.shenhua={
|
||||||
popup:false,
|
popup:false,
|
||||||
audio:false,
|
audio:false,
|
||||||
content:function(){
|
content:function(){
|
||||||
if(player.marks.fangquan){
|
player.unmarkSkill('fangquan');
|
||||||
player.marks.fangquan.delete();
|
|
||||||
delete player.marks.fangquan;
|
|
||||||
game.addVideo('unmark',player,'fangquan');
|
|
||||||
}
|
|
||||||
player.removeSkill('fangquan3');
|
player.removeSkill('fangquan3');
|
||||||
}
|
}
|
||||||
},
|
},
|
||||||
|
@ -1951,7 +1938,7 @@ character.shenhua={
|
||||||
inherit:'bagua_skill',
|
inherit:'bagua_skill',
|
||||||
filter:function(event,player){
|
filter:function(event,player){
|
||||||
if(!event.filterCard({name:'shan'})) return false;
|
if(!event.filterCard({name:'shan'})) return false;
|
||||||
if(event.parent.player.num('s','unequip')) return false;
|
if(event.getParent().player.num('s','unequip')) return false;
|
||||||
if(player.get('e','2')) return false;
|
if(player.get('e','2')) return false;
|
||||||
return true;
|
return true;
|
||||||
},
|
},
|
||||||
|
@ -2405,16 +2392,13 @@ character.shenhua={
|
||||||
audio:2,
|
audio:2,
|
||||||
content:function(){
|
content:function(){
|
||||||
'step 0'
|
'step 0'
|
||||||
var next=player.chooseToUse();
|
player.chooseToUse(function(card){
|
||||||
next.filterCard=function(card){
|
if(!lib.filter.cardEnabled(card,_status.event.player,_status.event)){
|
||||||
if(!lib.filter.cardEnabled(card,player,_status.event)){
|
|
||||||
return false;
|
return false;
|
||||||
}
|
}
|
||||||
var type=get.type(card,'trick');
|
var type=get.type(card,'trick');
|
||||||
return type=='trick'||type=='equip';
|
return type=='trick'||type=='equip';
|
||||||
};
|
},'是否使用一张锦囊牌或装备牌?').set('logSkill','jiewei');
|
||||||
next.prompt='是否使用一张锦囊牌或装备牌?';
|
|
||||||
next.logSkill='jiewei';
|
|
||||||
'step 1'
|
'step 1'
|
||||||
if(result.bool){
|
if(result.bool){
|
||||||
var goon=false;
|
var goon=false;
|
||||||
|
@ -2432,21 +2416,23 @@ character.shenhua={
|
||||||
}
|
}
|
||||||
}
|
}
|
||||||
if(goon){
|
if(goon){
|
||||||
player.chooseTarget('是否弃置场上的一张'+get.translation(type)+'牌?',function(card,player,target){
|
var next=player.chooseTarget('是否弃置场上的一张'+get.translation(type)+'牌?',function(card,player,target){
|
||||||
if(type=='equip'){
|
if(_status.event.type=='equip'){
|
||||||
return target.num('e')>0;
|
return target.num('e')>0;
|
||||||
}
|
}
|
||||||
else{
|
else{
|
||||||
return target.num('j')>0;
|
return target.num('j')>0;
|
||||||
}
|
}
|
||||||
}).ai=function(target){
|
});
|
||||||
|
next.set('ai',function(target){
|
||||||
if(type=='equip'){
|
if(type=='equip'){
|
||||||
return -ai.get.attitude(player,target);
|
return -ai.get.attitude(player,target);
|
||||||
}
|
}
|
||||||
else{
|
else{
|
||||||
return ai.get.attitude(player,target);
|
return ai.get.attitude(player,target);
|
||||||
}
|
}
|
||||||
};
|
});
|
||||||
|
next.set('type',type);
|
||||||
event.type=type;
|
event.type=type;
|
||||||
}
|
}
|
||||||
else{
|
else{
|
||||||
|
@ -2478,7 +2464,7 @@ character.shenhua={
|
||||||
content:function(){
|
content:function(){
|
||||||
"step 0";
|
"step 0";
|
||||||
player.chooseTarget('是否发动【新雷击】?').ai=function(target){
|
player.chooseTarget('是否发动【新雷击】?').ai=function(target){
|
||||||
return ai.get.damageEffect(target,player,player,'thunder');
|
return ai.get.damageEffect(target,_status.event.player,_status.event.player,'thunder');
|
||||||
};
|
};
|
||||||
"step 1"
|
"step 1"
|
||||||
if(result.bool){
|
if(result.bool){
|
||||||
|
@ -2588,13 +2574,14 @@ character.shenhua={
|
||||||
return player.canUse({name:'sha'},target);
|
return player.canUse({name:'sha'},target);
|
||||||
},
|
},
|
||||||
ai1:function(card){
|
ai1:function(card){
|
||||||
if(!check) return 0;
|
if(!_status.event.check) return 0;
|
||||||
return 6-ai.get.value(card);
|
return 6-ai.get.value(card);
|
||||||
},
|
},
|
||||||
ai2:function(target){
|
ai2:function(target){
|
||||||
if(!check) return 0;
|
if(!_status.event.check) return 0;
|
||||||
return ai.get.effect(target,{name:'sha'},_status.event.player);
|
return ai.get.effect(target,{name:'sha'},_status.event.player);
|
||||||
}
|
},
|
||||||
|
check:check
|
||||||
});
|
});
|
||||||
"step 1"
|
"step 1"
|
||||||
if(result.bool){
|
if(result.bool){
|
||||||
|
@ -2664,32 +2651,37 @@ character.shenhua={
|
||||||
return 10-ai.get.value(card);
|
return 10-ai.get.value(card);
|
||||||
},
|
},
|
||||||
ai2:function(target){
|
ai2:function(target){
|
||||||
var att=ai.get.attitude(player,target);
|
var att=ai.get.attitude(_status.event.player,target);
|
||||||
|
var trigger=_status.event.getParent()._trigger;
|
||||||
|
var da=0;
|
||||||
|
if(_status.event.player.hp==1){
|
||||||
|
da=10;
|
||||||
|
}
|
||||||
if(trigger.num>1){
|
if(trigger.num>1){
|
||||||
if(target.maxHp>5&&target.hp>1) return -att/10;
|
if(target.maxHp>5&&target.hp>1) return -att/10+da;
|
||||||
return -att;
|
return -att+da;
|
||||||
}
|
}
|
||||||
var eff=ai.get.damageEffect(target,trigger.source,target,trigger.nature);
|
var eff=ai.get.damageEffect(target,trigger.source,target,trigger.nature);
|
||||||
if(att==0) return 0.1;
|
if(att==0) return 0.1+da;
|
||||||
if(eff>=0&&trigger.num==1){
|
if(eff>=0&&trigger.num==1){
|
||||||
return att;
|
return att+da;
|
||||||
}
|
}
|
||||||
if(target.hp==target.maxHp) return -att;
|
if(target.hp==target.maxHp) return -att+da;
|
||||||
if(target.hp==1){
|
if(target.hp==1){
|
||||||
if(target.maxHp<=4&&!target.hasSkillTag('maixie')){
|
if(target.maxHp<=4&&!target.hasSkillTag('maixie')){
|
||||||
if(target.maxHp<=3){
|
if(target.maxHp<=3){
|
||||||
return -att;
|
return -att+da;
|
||||||
}
|
}
|
||||||
return -att/2;
|
return -att/2+da;
|
||||||
}
|
}
|
||||||
return 0;
|
return da;
|
||||||
}
|
}
|
||||||
if(target.hp==target.maxHp-1){
|
if(target.hp==target.maxHp-1){
|
||||||
if(target.hp>2||target.hasSkillTag('maixie')) return att/5;
|
if(target.hp>2||target.hasSkillTag('maixie')) return att/5+da;
|
||||||
if(att>0) return 0.02;
|
if(att>0) return 0.02+da;
|
||||||
return 0.05;
|
return 0.05+da;
|
||||||
}
|
}
|
||||||
return att/2;
|
return att/2+da;
|
||||||
},
|
},
|
||||||
prompt:'天香:弃置一张红桃牌转移伤害'
|
prompt:'天香:弃置一张红桃牌转移伤害'
|
||||||
});
|
});
|
||||||
|
@ -2747,7 +2739,7 @@ character.shenhua={
|
||||||
event.card=get.cards()[0];
|
event.card=get.cards()[0];
|
||||||
if(player.storage.buqu==undefined) player.storage.buqu=[];
|
if(player.storage.buqu==undefined) player.storage.buqu=[];
|
||||||
player.storage.buqu.push(event.card);
|
player.storage.buqu.push(event.card);
|
||||||
game.addVideo('storage',player,['buqu',get.cardsInfo(player.storage.buqu),'cards']);
|
player.syncStorage('buqu');
|
||||||
player.showCards(player.storage.buqu,'不屈')
|
player.showCards(player.storage.buqu,'不屈')
|
||||||
player.markSkill('buqu');
|
player.markSkill('buqu');
|
||||||
"step 1"
|
"step 1"
|
||||||
|
@ -2807,7 +2799,7 @@ character.shenhua={
|
||||||
content:function(){
|
content:function(){
|
||||||
"step 0";
|
"step 0";
|
||||||
player.chooseTarget('是否发动【雷击】?').ai=function(target){
|
player.chooseTarget('是否发动【雷击】?').ai=function(target){
|
||||||
return ai.get.damageEffect(target,player,player);
|
return ai.get.damageEffect(target,_status.event.player,_status.event.player,'thunder');
|
||||||
};
|
};
|
||||||
"step 1"
|
"step 1"
|
||||||
if(result.bool){
|
if(result.bool){
|
||||||
|
@ -2861,10 +2853,11 @@ character.shenhua={
|
||||||
player.chooseCard(get.translation(trigger.player)+'的'+(trigger.judgestr||'')+'判定为'+
|
player.chooseCard(get.translation(trigger.player)+'的'+(trigger.judgestr||'')+'判定为'+
|
||||||
get.translation(trigger.player.judging[0])+',是否发动【鬼道】?','he',function(card){
|
get.translation(trigger.player.judging[0])+',是否发动【鬼道】?','he',function(card){
|
||||||
return get.color(card)=='black';
|
return get.color(card)=='black';
|
||||||
}).ai=function(card){
|
}).set('ai',function(card){
|
||||||
var trigger=_status.event.parent._trigger;
|
var trigger=_status.event.getParent()._trigger;
|
||||||
var player=_status.event.player;
|
var player=_status.event.player;
|
||||||
var result=trigger.judge(card)-trigger.judge(trigger.player.judging[0]);
|
var judging=_status.event.judging;
|
||||||
|
var result=trigger.judge(card)-trigger.judge(judging);
|
||||||
var attitude=ai.get.attitude(player,trigger.player);
|
var attitude=ai.get.attitude(player,trigger.player);
|
||||||
if(attitude==0||result==0) return 0;
|
if(attitude==0||result==0) return 0;
|
||||||
if(attitude>0){
|
if(attitude>0){
|
||||||
|
@ -2873,7 +2866,7 @@ character.shenhua={
|
||||||
else{
|
else{
|
||||||
return -result;
|
return -result;
|
||||||
}
|
}
|
||||||
};
|
}).set('judging',trigger.player.judging[0]);
|
||||||
"step 1"
|
"step 1"
|
||||||
if(result.bool){
|
if(result.bool){
|
||||||
player.respond(result.cards,'highlight');
|
player.respond(result.cards,'highlight');
|
||||||
|
|
|
@ -150,7 +150,8 @@ character.standard={
|
||||||
get.translation(trigger.player.judging[0])+',是否发动【鬼才】?').set('ai',function(card){
|
get.translation(trigger.player.judging[0])+',是否发动【鬼才】?').set('ai',function(card){
|
||||||
var trigger=_status.event.getParent()._trigger;
|
var trigger=_status.event.getParent()._trigger;
|
||||||
var player=_status.event.player;
|
var player=_status.event.player;
|
||||||
var result=trigger.judge(card)-trigger.judge(trigger.player.judging[0]);
|
var judging=_status.event.judging;
|
||||||
|
var result=trigger.judge(card)-trigger.judge(judging);
|
||||||
var attitude=ai.get.attitude(player,trigger.player);
|
var attitude=ai.get.attitude(player,trigger.player);
|
||||||
if(attitude==0||result==0) return 0;
|
if(attitude==0||result==0) return 0;
|
||||||
if(attitude>0){
|
if(attitude>0){
|
||||||
|
@ -159,7 +160,7 @@ character.standard={
|
||||||
else{
|
else{
|
||||||
return -result-ai.get.value(card)/2;
|
return -result-ai.get.value(card)/2;
|
||||||
}
|
}
|
||||||
});
|
}).set('judging',trigger.player.judging[0]);
|
||||||
"step 1"
|
"step 1"
|
||||||
if(result.bool){
|
if(result.bool){
|
||||||
player.respond(result.cards,'highlight');
|
player.respond(result.cards,'highlight');
|
||||||
|
@ -171,7 +172,12 @@ character.standard={
|
||||||
if(result.bool){
|
if(result.bool){
|
||||||
player.logSkill('guicai');
|
player.logSkill('guicai');
|
||||||
if(trigger.player.judging[0].clone){
|
if(trigger.player.judging[0].clone){
|
||||||
trigger.player.judging[0].clone.delete();
|
trigger.player.judging[0].clone.classList.remove('thrownhighlight');
|
||||||
|
game.broadcast(function(card){
|
||||||
|
if(card.clone){
|
||||||
|
card.clone.classList.remove('thrownhighlight');
|
||||||
|
}
|
||||||
|
},trigger.player.judging[0]);
|
||||||
game.addVideo('deletenode',player,get.cardsInfo([trigger.player.judging[0].clone]));
|
game.addVideo('deletenode',player,get.cardsInfo([trigger.player.judging[0].clone]));
|
||||||
}
|
}
|
||||||
ui.discardPile.appendChild(trigger.player.judging[0]);
|
ui.discardPile.appendChild(trigger.player.judging[0]);
|
||||||
|
|
|
@ -4498,26 +4498,21 @@ character.yijiang={
|
||||||
enable:'phaseUse',
|
enable:'phaseUse',
|
||||||
usable:1,
|
usable:1,
|
||||||
audio:2,
|
audio:2,
|
||||||
group:['qice3'],
|
|
||||||
direct:true,
|
|
||||||
filter:function(event,player){
|
filter:function(event,player){
|
||||||
return player.num('h')>0
|
return player.num('h')>0
|
||||||
},
|
},
|
||||||
delay:0,
|
chooseButton:{
|
||||||
content:function(){
|
dialog:function(){
|
||||||
"step 0"
|
var list=['taoyuan','wugu','juedou','huogong','jiedao','tiesuo','guohe','shunshou','wuzhong','wanjian','nanman'];
|
||||||
var list=[];
|
for(var i=0;i<list.length;i++){
|
||||||
player.getStat('skill').qice--;
|
list[i]=['锦囊','',list[i]];
|
||||||
for(var i in lib.card){
|
}
|
||||||
if(lib.card[i].mode&&lib.card[i].mode.contains(lib.config.mode)==false) continue;
|
return ui.create.dialog([list,'vcard']);
|
||||||
if(lib.card[i].type=='trick') list.push(['锦囊','',i]);
|
},
|
||||||
}
|
filter:function(button,player){
|
||||||
list=['taoyuan','wugu','juedou','huogong','jiedao','tiesuo','guohe','shunshou','wuzhong','wanjian','nanman'];
|
return lib.filter.filterCard({name:button.link[2]},player,_status.event.getParent());
|
||||||
for(var i=0;i<list.length;i++){
|
},
|
||||||
list[i]=['锦囊','',list[i]];
|
check:function(button,player){
|
||||||
}
|
|
||||||
var dialog=ui.create.dialog([list,'vcard']);
|
|
||||||
player.chooseButton(dialog,function(button){
|
|
||||||
var recover=0,lose=1;
|
var recover=0,lose=1;
|
||||||
for(var i=0;i<game.players.length;i++){
|
for(var i=0;i<game.players.length;i++){
|
||||||
if(!game.players[i].isOut()){
|
if(!game.players[i].isOut()){
|
||||||
|
@ -4552,32 +4547,24 @@ character.yijiang={
|
||||||
if(lose>recover&&lose>0) return (button.link[2]=='nanman')?1:-1;
|
if(lose>recover&&lose>0) return (button.link[2]=='nanman')?1:-1;
|
||||||
if(lose<recover&&recover>0) return (button.link[2]=='taoyuan')?1:-1;
|
if(lose<recover&&recover>0) return (button.link[2]=='taoyuan')?1:-1;
|
||||||
return (button.link[2]=='wuzhong')?1:-1;
|
return (button.link[2]=='wuzhong')?1:-1;
|
||||||
});
|
},
|
||||||
"step 1"
|
backup:function(links,player){
|
||||||
if(result.bool){
|
return {
|
||||||
lib.skill.qice2.viewAs={name:result.buttons[0].link[2]};
|
filterCard:true,
|
||||||
// player.popup(result.buttons[0].link[2]);
|
selectCard:-1,
|
||||||
event.parent.parent.backup('qice2');
|
audio:2,
|
||||||
event.parent.parent.step=0;
|
popname:true,
|
||||||
if(event.isMine()){
|
viewAs:{name:links[0][2]},
|
||||||
event.parent.parent.openskilldialog='将全部手牌当'+get.translation(result.buttons[0].link[2])+'使用';
|
|
||||||
}
|
}
|
||||||
}
|
},
|
||||||
else{
|
prompt:function(links,player){
|
||||||
if(player.skills.contains('qice4')){
|
return '将全部手牌当'+get.translation(links[0][2])+'使用';
|
||||||
player.addTempSkill('qice5','phaseAfter')
|
|
||||||
}
|
|
||||||
else{
|
|
||||||
player.addTempSkill('qice4','phaseAfter')
|
|
||||||
}
|
|
||||||
event.finish();
|
|
||||||
}
|
}
|
||||||
},
|
},
|
||||||
ai:{
|
ai:{
|
||||||
order:1,
|
order:1,
|
||||||
result:{
|
result:{
|
||||||
player:function(player){
|
player:function(player){
|
||||||
if(player.skills.contains('qice5')) return 0;
|
|
||||||
var num=0;
|
var num=0;
|
||||||
var cards=player.get('h');
|
var cards=player.get('h');
|
||||||
if(cards.length>=3&&player.hp>=3) return 0;
|
if(cards.length>=3&&player.hp>=3) return 0;
|
||||||
|
@ -4592,24 +4579,6 @@ character.yijiang={
|
||||||
threaten:1.6,
|
threaten:1.6,
|
||||||
}
|
}
|
||||||
},
|
},
|
||||||
qice2:{
|
|
||||||
filterCard:true,
|
|
||||||
selectCard:-1,
|
|
||||||
audio:2,
|
|
||||||
popname:true
|
|
||||||
},
|
|
||||||
qice3:{
|
|
||||||
trigger:{player:'useCardBefore'},
|
|
||||||
forced:true,
|
|
||||||
popup:false,
|
|
||||||
filter:function(event,player){
|
|
||||||
return event.skill=='qice2';
|
|
||||||
},
|
|
||||||
content:function(){
|
|
||||||
player.getStat('skill').qice++;
|
|
||||||
}
|
|
||||||
},
|
|
||||||
qice4:{},
|
|
||||||
zhiyu:{
|
zhiyu:{
|
||||||
audio:2,
|
audio:2,
|
||||||
trigger:{player:'damageEnd'},
|
trigger:{player:'damageEnd'},
|
||||||
|
@ -5865,7 +5834,7 @@ character.yijiang={
|
||||||
xuanfeng:'旋风',
|
xuanfeng:'旋风',
|
||||||
zhiyu:'智愚',
|
zhiyu:'智愚',
|
||||||
qice:'奇策',
|
qice:'奇策',
|
||||||
qice2:'奇策',
|
qice_backup:'奇策',
|
||||||
jiangchi:'将弛',
|
jiangchi:'将弛',
|
||||||
jiangchi_less:'少摸一张',
|
jiangchi_less:'少摸一张',
|
||||||
jiangchi_more:'多摸一张',
|
jiangchi_more:'多摸一张',
|
||||||
|
|
|
@ -1764,8 +1764,8 @@ window.noname_asset_list=[
|
||||||
'audio/skill/qiaoshi2.mp3',
|
'audio/skill/qiaoshi2.mp3',
|
||||||
'audio/skill/qiaoshui1.mp3',
|
'audio/skill/qiaoshui1.mp3',
|
||||||
'audio/skill/qiaoshui2.mp3',
|
'audio/skill/qiaoshui2.mp3',
|
||||||
'audio/skill/qice21.mp3',
|
'audio/skill/qice_backup1.mp3',
|
||||||
'audio/skill/qice22.mp3',
|
'audio/skill/qice_backup2.mp3',
|
||||||
'audio/skill/qieting1.mp3',
|
'audio/skill/qieting1.mp3',
|
||||||
'audio/skill/qieting2.mp3',
|
'audio/skill/qieting2.mp3',
|
||||||
'audio/skill/qilin_skill.mp3',
|
'audio/skill/qilin_skill.mp3',
|
||||||
|
|
192
game/game.js
192
game/game.js
|
@ -4257,8 +4257,8 @@
|
||||||
ui.click.cancel();
|
ui.click.cancel();
|
||||||
event.aiexclude.add(skill);
|
event.aiexclude.add(skill);
|
||||||
var info=get.info(skill);
|
var info=get.info(skill);
|
||||||
if(info.aiexclude){
|
if(info.sourceSkill){
|
||||||
event.aiexclude.add(info.aiexclude);
|
event.sourceSkill.add(info.aiexclude);
|
||||||
}
|
}
|
||||||
}
|
}
|
||||||
else{
|
else{
|
||||||
|
@ -4292,7 +4292,7 @@
|
||||||
if(event.dialog&&typeof event.dialog=='object') event.dialog.close();
|
if(event.dialog&&typeof event.dialog=='object') event.dialog.close();
|
||||||
var dialog=info.chooseButton.dialog(event,player);
|
var dialog=info.chooseButton.dialog(event,player);
|
||||||
var next=player.chooseButton(dialog);
|
var next=player.chooseButton(dialog);
|
||||||
next.set('ai',info.chooseButton.check||function(){return 0;});
|
next.set('ai',info.chooseButton.check||function(){return 1;});
|
||||||
next.set('filterButton',info.chooseButton.filter||function(){return true;});
|
next.set('filterButton',info.chooseButton.filter||function(){return true;});
|
||||||
event.buttoned=event.result.skill;
|
event.buttoned=event.result.skill;
|
||||||
}
|
}
|
||||||
|
@ -4303,7 +4303,7 @@
|
||||||
if(result.bool){
|
if(result.bool){
|
||||||
var info=get.info(event.buttoned).chooseButton;
|
var info=get.info(event.buttoned).chooseButton;
|
||||||
lib.skill[event.buttoned+'_backup']=info.backup(result.links,player);
|
lib.skill[event.buttoned+'_backup']=info.backup(result.links,player);
|
||||||
lib.skill[event.buttoned+'_backup'].aiexclude=event.buttoned;
|
lib.skill[event.buttoned+'_backup'].sourceSkill=event.buttoned;
|
||||||
if(game.online){
|
if(game.online){
|
||||||
event._sendskill=[event.buttoned+'_backup',lib.skill[event.buttoned+'_backup']];
|
event._sendskill=[event.buttoned+'_backup',lib.skill[event.buttoned+'_backup']];
|
||||||
}
|
}
|
||||||
|
@ -5385,6 +5385,15 @@
|
||||||
else{
|
else{
|
||||||
player.stat[player.stat.length-1].skill[event.skill]++;
|
player.stat[player.stat.length-1].skill[event.skill]++;
|
||||||
}
|
}
|
||||||
|
var sourceSkill=get.info(event.skill).sourceSkill;
|
||||||
|
if(sourceSkill){
|
||||||
|
if(player.stat[player.stat.length-1].skill[sourceSkill]==undefined){
|
||||||
|
player.stat[player.stat.length-1].skill[sourceSkill]=1;
|
||||||
|
}
|
||||||
|
else{
|
||||||
|
player.stat[player.stat.length-1].skill[sourceSkill]++;
|
||||||
|
}
|
||||||
|
}
|
||||||
}
|
}
|
||||||
}
|
}
|
||||||
"step 1"
|
"step 1"
|
||||||
|
@ -5568,6 +5577,15 @@
|
||||||
else{
|
else{
|
||||||
player.stat[player.stat.length-1].skill[skill]++;
|
player.stat[player.stat.length-1].skill[skill]++;
|
||||||
}
|
}
|
||||||
|
var sourceSkill=get.info(skill).sourceSkill;
|
||||||
|
if(sourceSkill){
|
||||||
|
if(player.stat[player.stat.length-1].skill[sourceSkill]==undefined){
|
||||||
|
player.stat[player.stat.length-1].skill[sourceSkill]=1;
|
||||||
|
}
|
||||||
|
else{
|
||||||
|
player.stat[player.stat.length-1].skill[sourceSkill]++;
|
||||||
|
}
|
||||||
|
}
|
||||||
}
|
}
|
||||||
if(player.stat[player.stat.length-1].allSkills==undefined){
|
if(player.stat[player.stat.length-1].allSkills==undefined){
|
||||||
player.stat[player.stat.length-1].allSkills=1;
|
player.stat[player.stat.length-1].allSkills=1;
|
||||||
|
@ -5790,6 +5808,15 @@
|
||||||
if(event.skill) name=get.translation(event.skill)+':';
|
if(event.skill) name=get.translation(event.skill)+':';
|
||||||
if(event.card) name+=get.translation(event.card.name);
|
if(event.card) name+=get.translation(event.card.name);
|
||||||
}
|
}
|
||||||
|
if(event.highlight){
|
||||||
|
game.broadcast(function(cards){
|
||||||
|
for(var i=0;i<cards.length;i++){
|
||||||
|
if(cards[i].clone){
|
||||||
|
cards[i].clone.classList.add('thrownhighlight');
|
||||||
|
}
|
||||||
|
}
|
||||||
|
},cards);
|
||||||
|
}
|
||||||
event.trigger('respond');
|
event.trigger('respond');
|
||||||
game.delayx(0.5);
|
game.delayx(0.5);
|
||||||
},
|
},
|
||||||
|
@ -6213,6 +6240,11 @@
|
||||||
while(player.node.marks.childNodes.length){
|
while(player.node.marks.childNodes.length){
|
||||||
player.node.marks.firstChild.remove();
|
player.node.marks.firstChild.remove();
|
||||||
}
|
}
|
||||||
|
game.broadcast(function(player){
|
||||||
|
while(player.node.marks.childNodes.length){
|
||||||
|
player.node.marks.firstChild.remove();
|
||||||
|
}
|
||||||
|
},player);
|
||||||
}
|
}
|
||||||
for(var i in player.tempSkills){
|
for(var i in player.tempSkills){
|
||||||
player.skills.remove(i);
|
player.skills.remove(i);
|
||||||
|
@ -7141,7 +7173,13 @@
|
||||||
switch(get.itemtype(this.storage[skill])){
|
switch(get.itemtype(this.storage[skill])){
|
||||||
case 'cards':game.addVideo('storage',this,[skill,get.cardsInfo(this.storage[skill]),'cards']);break;
|
case 'cards':game.addVideo('storage',this,[skill,get.cardsInfo(this.storage[skill]),'cards']);break;
|
||||||
case 'card':game.addVideo('storage',this,[skill,get.cardInfo(this.storage[skill]),'card']);break;
|
case 'card':game.addVideo('storage',this,[skill,get.cardInfo(this.storage[skill]),'card']);break;
|
||||||
default:game.addVideo('storage',this,[skill,JSON.parse(JSON.stringify(this.storage[skill]))]);
|
default:
|
||||||
|
try{
|
||||||
|
game.addVideo('storage',this,[skill,JSON.parse(JSON.stringify(this.storage[skill]))]);
|
||||||
|
}
|
||||||
|
catch(e){
|
||||||
|
console.log(this.storage[skill]);
|
||||||
|
}
|
||||||
}
|
}
|
||||||
},
|
},
|
||||||
playerfocus:function(time){
|
playerfocus:function(time){
|
||||||
|
@ -7206,7 +7244,7 @@
|
||||||
chooseToUse:function(use){
|
chooseToUse:function(use){
|
||||||
var next=game.createEvent('chooseToUse');
|
var next=game.createEvent('chooseToUse');
|
||||||
next.player=this;
|
next.player=this;
|
||||||
if(arguments.length==1){
|
if(arguments.length==1&&get.objtype(arguments[0])=='object'){
|
||||||
for(var i in use){
|
for(var i in use){
|
||||||
next[i]=use[i];
|
next[i]=use[i];
|
||||||
}
|
}
|
||||||
|
@ -8499,33 +8537,43 @@
|
||||||
else{
|
else{
|
||||||
game.addVideo('markSkill',this,[name]);
|
game.addVideo('markSkill',this,[name]);
|
||||||
}
|
}
|
||||||
if(!info){
|
game.broadcastAll(function(storage,player,name,info,card){
|
||||||
if(this.marks[name]){
|
player.storage[name]=storage;
|
||||||
return this;
|
if(!info){
|
||||||
}
|
if(player.marks[name]){
|
||||||
if(lib.skill[name]){
|
player.updateMarks();
|
||||||
info=lib.skill[name].intro;
|
return;
|
||||||
}
|
}
|
||||||
if(!info){
|
if(lib.skill[name]){
|
||||||
return this;
|
info=lib.skill[name].intro;
|
||||||
}
|
}
|
||||||
}
|
if(!info){
|
||||||
if(this.marks[name]){
|
return;
|
||||||
this.marks[name].info=info;
|
}
|
||||||
}
|
}
|
||||||
else{
|
if(player.marks[name]){
|
||||||
if(card){
|
player.marks[name].info=info;
|
||||||
this.marks[name]=this.mark(card,info,name);
|
}
|
||||||
}
|
else{
|
||||||
else{
|
if(card){
|
||||||
this.marks[name]=this.mark(name,info);
|
player.marks[name]=player.mark(card,info,name);
|
||||||
}
|
}
|
||||||
}
|
else{
|
||||||
this.updateMarks();
|
player.marks[name]=player.mark(name,info);
|
||||||
|
}
|
||||||
|
}
|
||||||
|
player.updateMarks();
|
||||||
|
},this.storage[name],this,name,info,card);
|
||||||
return this;
|
return this;
|
||||||
},
|
},
|
||||||
unmarkSkill:function(name){
|
unmarkSkill:function(name){
|
||||||
game.addVideo('unmarkSkill',this,name);
|
game.addVideo('unmarkSkill',this,name);
|
||||||
|
game.broadcast(function(player,name){
|
||||||
|
if(player.marks[name]){
|
||||||
|
player.marks[name].delete();
|
||||||
|
delete player.marks[name];
|
||||||
|
}
|
||||||
|
},this,name);
|
||||||
if(this.marks[name]){
|
if(this.marks[name]){
|
||||||
this.marks[name].delete();
|
this.marks[name].delete();
|
||||||
delete this.marks[name];
|
delete this.marks[name];
|
||||||
|
@ -8545,41 +8593,43 @@
|
||||||
}
|
}
|
||||||
}
|
}
|
||||||
},
|
},
|
||||||
markSkillCharacter:function(target,name,content,id){
|
markSkillCharacter:function(id,target,name,content){
|
||||||
if(typeof target=='object'){
|
if(typeof target=='object'){
|
||||||
target=target.name;
|
target=target.name;
|
||||||
}
|
}
|
||||||
if(this.marks[id]){
|
game.broadcastAll(function(player,target,name,content,id){
|
||||||
if(this.marks[id]._name==target){
|
if(player.marks[id]){
|
||||||
return this;
|
if(player.marks[id]._name==target){
|
||||||
}
|
return player;
|
||||||
this.marks[id].name=name+'_charactermark';
|
}
|
||||||
this.marks[id]._name=target;
|
player.marks[id].name=name+'_charactermark';
|
||||||
this.marks[id].info={
|
player.marks[id]._name=target;
|
||||||
name:name,
|
player.marks[id].info={
|
||||||
content:content
|
name:name,
|
||||||
};
|
content:content
|
||||||
this.marks[id].setBackground(target,'character');
|
};
|
||||||
game.addVideo('changeMarkCharacter',this,{
|
player.marks[id].setBackground(target,'character');
|
||||||
id:id,
|
game.addVideo('changeMarkCharacter',player,{
|
||||||
name:name,
|
id:id,
|
||||||
content:content,
|
name:name,
|
||||||
target:target
|
content:content,
|
||||||
});
|
target:target
|
||||||
}
|
});
|
||||||
else{
|
}
|
||||||
this.marks[id]=this.markCharacter(target,{
|
else{
|
||||||
name:name,
|
player.marks[id]=player.markCharacter(target,{
|
||||||
content:content
|
name:name,
|
||||||
});
|
content:content
|
||||||
this.marks[id]._name=target;
|
});
|
||||||
game.addVideo('markCharacter',this,{
|
player.marks[id]._name=target;
|
||||||
name:name,
|
game.addVideo('markCharacter',player,{
|
||||||
content:content,
|
name:name,
|
||||||
id:id,
|
content:content,
|
||||||
target:target
|
id:id,
|
||||||
});
|
target:target
|
||||||
}
|
});
|
||||||
|
}
|
||||||
|
},this,target,name,content,id);
|
||||||
return this;
|
return this;
|
||||||
},
|
},
|
||||||
markCharacter:function(name,info,learn,learn2){
|
markCharacter:function(name,info,learn,learn2){
|
||||||
|
@ -13504,7 +13554,7 @@
|
||||||
}
|
}
|
||||||
},
|
},
|
||||||
addVideo:function(type,player,content){
|
addVideo:function(type,player,content){
|
||||||
if(_status.video) return;
|
if(_status.video||game.online) return;
|
||||||
if(!_status.videoInited) return;
|
if(!_status.videoInited) return;
|
||||||
if(type=='storage'&&player&&player.updateMarks){
|
if(type=='storage'&&player&&player.updateMarks){
|
||||||
player.updateMarks();
|
player.updateMarks();
|
||||||
|
@ -23011,6 +23061,14 @@
|
||||||
},
|
},
|
||||||
};
|
};
|
||||||
var get={
|
var get={
|
||||||
|
mode:function(){
|
||||||
|
if(_status.connectMode){
|
||||||
|
return lib.configOL.mode;
|
||||||
|
}
|
||||||
|
else{
|
||||||
|
return lib.config.mode;
|
||||||
|
}
|
||||||
|
},
|
||||||
idDialog:function(id){
|
idDialog:function(id){
|
||||||
for(var i=0;i<ui.dialogs.length;i++){
|
for(var i=0;i<ui.dialogs.length;i++){
|
||||||
if(ui.dialogs[i].videoId==id){
|
if(ui.dialogs[i].videoId==id){
|
||||||
|
@ -23037,11 +23095,12 @@
|
||||||
skill=player;
|
skill=player;
|
||||||
player=null;
|
player=null;
|
||||||
}
|
}
|
||||||
if(lib.config.mode=='identity'){
|
var mode=get.mode();
|
||||||
|
if(mode=='identity'){
|
||||||
if(skill&&!game.zhu.get('s').contains(skill)) return null;
|
if(skill&&!game.zhu.get('s').contains(skill)) return null;
|
||||||
if(game.zhu.isZhu) return game.zhu;
|
if(game.zhu.isZhu) return game.zhu;
|
||||||
}
|
}
|
||||||
else if(lib.config.mode=='versus'&&_status.mode=='four'){
|
else if(mode=='versus'&&_status.mode=='four'){
|
||||||
for(var i=0;i<game.players.length;i++){
|
for(var i=0;i<game.players.length;i++){
|
||||||
if(game.players[i].isZhu){
|
if(game.players[i].isZhu){
|
||||||
if(skill&&!(game.players[i].get('s').contains(skill))) continue;
|
if(skill&&!(game.players[i].get('s').contains(skill))) continue;
|
||||||
|
@ -23382,7 +23441,8 @@
|
||||||
return 0;
|
return 0;
|
||||||
},
|
},
|
||||||
objtype:function(obj){
|
objtype:function(obj){
|
||||||
if(Object.prototype.toString.call(obj) === '[object Array]') return 'array';
|
if(Object.prototype.toString.call(obj) === '[object Array]') return 'array';
|
||||||
|
if(Object.prototype.toString.call(obj) === '[object Object]') return 'object';
|
||||||
if(Object.prototype.toString.call(obj) === '[object HTMLDivElement]') return 'div';
|
if(Object.prototype.toString.call(obj) === '[object HTMLDivElement]') return 'div';
|
||||||
if(Object.prototype.toString.call(obj) === '[object HTMLTableElement]') return 'table';
|
if(Object.prototype.toString.call(obj) === '[object HTMLTableElement]') return 'table';
|
||||||
if(Object.prototype.toString.call(obj) === '[object HTMLTableRowElement]') return 'tr';
|
if(Object.prototype.toString.call(obj) === '[object HTMLTableRowElement]') return 'tr';
|
||||||
|
@ -23663,7 +23723,7 @@
|
||||||
}
|
}
|
||||||
}
|
}
|
||||||
if(get.itemtype(str)=='card'&&str.suit&&str.number){
|
if(get.itemtype(str)=='card'&&str.suit&&str.number){
|
||||||
str2+='【'+get.translation(get.suit(str))+get.number(str)+'】'
|
str2+='【'+get.translation(str.suit)+str.number+'】'
|
||||||
}
|
}
|
||||||
return str2;
|
return str2;
|
||||||
}
|
}
|
||||||
|
|
|
@ -20,7 +20,7 @@ mode.identity={
|
||||||
lib.configOL.number=lib.configOL.player_number;
|
lib.configOL.number=lib.configOL.player_number;
|
||||||
}
|
}
|
||||||
lib.configOL.characterPack=['standard'];
|
lib.configOL.characterPack=['standard'];
|
||||||
lib.configOL.cardPack=['standard','ex','extra'];
|
lib.configOL.cardPack=['standard','ex','extra','refresh','mingzhong'];
|
||||||
lib.configOL.mode='identity';
|
lib.configOL.mode='identity';
|
||||||
var cardPackList=[];
|
var cardPackList=[];
|
||||||
for(var i=0;i<lib.configOL.cardPack.length;i++){
|
for(var i=0;i<lib.configOL.cardPack.length;i++){
|
||||||
|
@ -1099,6 +1099,7 @@ mode.identity={
|
||||||
element:{
|
element:{
|
||||||
player:{
|
player:{
|
||||||
$dieAfter:function(){
|
$dieAfter:function(){
|
||||||
|
if(_status.video) return;
|
||||||
if(!this.node.dieidentity){
|
if(!this.node.dieidentity){
|
||||||
var node=ui.create.div('.damage.dieidentity',get.translation(this.identity+'2'),this);
|
var node=ui.create.div('.damage.dieidentity',get.translation(this.identity+'2'),this);
|
||||||
ui.refresh(node);
|
ui.refresh(node);
|
||||||
|
|
Loading…
Reference in New Issue