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