v1.9.92.1.1
This commit is contained in:
parent
dd637532d4
commit
578fa44787
|
@ -509,21 +509,21 @@ game.import('card',function(lib,game,ui,get,ai,_status){
|
|||
}
|
||||
},
|
||||
tengjia3:{
|
||||
audio:'tengjia1',
|
||||
trigger:{target:'shaBegin'},
|
||||
forced:true,
|
||||
filter:function(event,player){
|
||||
if(event.player.hasSkillTag('unequip',false,{
|
||||
audio:'tengjia1',
|
||||
trigger:{target:'shaBegin'},
|
||||
forced:true,
|
||||
filter:function(event,player){
|
||||
if(event.player.hasSkillTag('unequip',false,{
|
||||
name:event.card?event.card.name:null,
|
||||
target:player,
|
||||
card:event.card
|
||||
})) return false;
|
||||
if(event.card.name=='sha'&&!event.card.nature) return true;
|
||||
return false;
|
||||
},
|
||||
content:function(){
|
||||
trigger.cancel();
|
||||
},
|
||||
},
|
||||
content:function(){
|
||||
trigger.cancel();
|
||||
},
|
||||
},
|
||||
baiyin_skill:{
|
||||
trigger:{player:'damageBegin'},
|
||||
|
|
|
@ -738,11 +738,11 @@ game.import('card',function(lib,game,ui,get,ai,_status){
|
|||
},
|
||||
skill:{
|
||||
liulongcanjia:{
|
||||
mod:{
|
||||
targetEnabled:function(card,player,target){
|
||||
if(['equip3','equip4'].contains(get.subtype(card))) return false;
|
||||
},
|
||||
},
|
||||
mod:{
|
||||
targetEnabled:function(card,player,target){
|
||||
if(['equip3','equip4'].contains(get.subtype(card))) return false;
|
||||
},
|
||||
},
|
||||
},
|
||||
minguangkai_cancel:{
|
||||
trigger:{target:'useCardToBefore'},
|
||||
|
|
|
@ -943,18 +943,18 @@ game.import('card',function(lib,game,ui,get,ai,_status){
|
|||
else{
|
||||
if(result.bool){
|
||||
if(event.turn==target){
|
||||
if(result.cards) event.targetCards.addArray(result.cards);
|
||||
event.turn=player;
|
||||
if(result.cards) event.targetCards.addArray(result.cards);
|
||||
event.turn=player;
|
||||
}
|
||||
else{
|
||||
if(result.cards) event.playerCards.addArray(result.cards);
|
||||
event.turn=target;
|
||||
if(result.cards) event.playerCards.addArray(result.cards);
|
||||
event.turn=target;
|
||||
}
|
||||
event.goto(1);
|
||||
}
|
||||
else{
|
||||
if(event.turn==target){
|
||||
target.damage(event.baseDamage+event.extraDamage);
|
||||
target.damage(event.baseDamage+event.extraDamage);
|
||||
}
|
||||
else{
|
||||
player.damage(target,event.baseDamage+event.extraDamage);
|
||||
|
@ -1418,7 +1418,7 @@ game.import('card',function(lib,game,ui,get,ai,_status){
|
|||
return event.card&&event.card.name=='sha'&&event.notLink()&&event.player.getCards('he').length>0;
|
||||
},
|
||||
check:function(event,player){
|
||||
var target=event.player;
|
||||
var target=event.player;
|
||||
var eff=get.damageEffect(target,player,player);
|
||||
if(get.attitude(player,target)>0){
|
||||
if(eff>=0) return false;
|
||||
|
@ -1443,7 +1443,7 @@ game.import('card',function(lib,game,ui,get,ai,_status){
|
|||
trigger.cancel();
|
||||
"step 1"
|
||||
if(trigger.player.countDiscardableCards(player,'he')){
|
||||
player.line(trigger.player);
|
||||
player.line(trigger.player);
|
||||
player.discardPlayerCard('he',trigger.player,true);
|
||||
}
|
||||
"step 2"
|
||||
|
|
588
character/diy.js
588
character/diy.js
|
@ -123,191 +123,189 @@ game.import('character',function(lib,game,ui,get,ai,_status){
|
|||
},
|
||||
skill:{
|
||||
ns_chuanshu:{
|
||||
audio:["xingshuai",2],
|
||||
trigger:{
|
||||
global:"dying",
|
||||
},
|
||||
priority:8,
|
||||
unique:true,
|
||||
skillAnimation:true,
|
||||
animationColor:"water",
|
||||
filter:function (event,player){
|
||||
return event.player.hp<=0&&event.player!=player;
|
||||
},
|
||||
check:function (event,player){
|
||||
return get.attitude(player,event.player)>0;
|
||||
},
|
||||
logTarget:"player",
|
||||
content:function (){
|
||||
'step 0'
|
||||
// player.logSkill('ns_chuanshu',trigger.player);
|
||||
trigger.player.chooseControl('releiji','guidao').set('prompt',''+get.translation(trigger.player)+'获得一项技能');
|
||||
goon=true;
|
||||
|
||||
if(!goon){
|
||||
event.finish();
|
||||
}
|
||||
'step 1'
|
||||
trigger.player.addSkillLog(result.control);
|
||||
trigger.player.recover(1-trigger.player.hp);
|
||||
trigger.player.draw(2);
|
||||
trigger.player.storage.ns_chuanshu2=player;
|
||||
trigger.player.addSkill('ns_chuanshu2');
|
||||
//game.broadcastAll()+trigger.player.node.avatar.setBackgroundImage('extension/群英会/ns_zhangjiao.jpg');
|
||||
//player.removeSkill('ns_chuanshu');
|
||||
player.awakenSkill('ns_chuanshu');
|
||||
},
|
||||
},
|
||||
ns_xiandao1:{
|
||||
audio:["huashen",2],
|
||||
forced:true,
|
||||
// noLose:true,
|
||||
// locked:true,
|
||||
// noRemove:true,
|
||||
// noDisable:true,
|
||||
priority:10,
|
||||
trigger:{
|
||||
global:"gameStart",
|
||||
player:["phaseEnd","enterGame"],
|
||||
},
|
||||
filter:function (event,player){
|
||||
return player.isAlive();
|
||||
},
|
||||
content:function (){
|
||||
var n=[1,2].randomGet();
|
||||
if(n==1){
|
||||
player.addTempSkill("releiji",{player:"phaseUseBegin"});
|
||||
player.markSkill("releiji",{player:"phaseUseBegin"});
|
||||
};
|
||||
if(n==2){
|
||||
player.addTempSkill("guidao",{player:"phaseUseBegin"});
|
||||
player.markSkill("guidao",{player:"phaseUseBegin"});
|
||||
};
|
||||
},
|
||||
},
|
||||
ns_xiandao2:{
|
||||
audio:["huashen",2],
|
||||
forced:true,
|
||||
// noLose:true,
|
||||
// locked:true,
|
||||
// noRemove:true,
|
||||
// noDisable:true,
|
||||
trigger:{
|
||||
player:"damageBefore",
|
||||
},
|
||||
filter:function (event,player){
|
||||
if(!event.nature) return false;
|
||||
return true;
|
||||
},
|
||||
content:function (){
|
||||
trigger.cancel();
|
||||
event.finish();
|
||||
},
|
||||
},
|
||||
ns_xiandao:{
|
||||
forced:true,
|
||||
// noLose:true,
|
||||
// locked:true,
|
||||
noRemove:true,
|
||||
// noDisable:true,
|
||||
group:["ns_xiandao1","ns_xiandao2"],
|
||||
},
|
||||
ns_chuanshu2:{
|
||||
audio:["songwei",2],
|
||||
mark:"character",
|
||||
intro:{
|
||||
content:"当你造成或受到一次伤害后,$摸一张牌",
|
||||
},
|
||||
nopop:true,
|
||||
trigger:{
|
||||
source:"damageEnd",
|
||||
player:"damageEnd",
|
||||
},
|
||||
forced:true,
|
||||
popup:false,
|
||||
filter:function (event,player){
|
||||
return player.storage.ns_chuanshu2&&player.storage.ns_chuanshu2.isIn()&&event.num>0;
|
||||
},
|
||||
content:function (){
|
||||
'step 0'
|
||||
game.delayx();
|
||||
'step 1'
|
||||
var target=player.storage.ns_chuanshu2;
|
||||
player.line(target,'green');
|
||||
target.draw();
|
||||
game.delay();
|
||||
},
|
||||
onremove:true,
|
||||
group:"ns_chuanshu3",
|
||||
},
|
||||
ns_chuanshu3:{
|
||||
audio:"ext:群英会:1",
|
||||
trigger:{
|
||||
player:"dieBegin",
|
||||
},
|
||||
silent:true,
|
||||
onremove:true,
|
||||
filter:function (event,player){
|
||||
return player.storage.ns_chuanshu2&&player.storage.ns_chuanshu2.isIn();
|
||||
},
|
||||
content:function (){
|
||||
'step 0'
|
||||
game.delayx();
|
||||
'step 1'
|
||||
var target=player.storage.ns_chuanshu2;
|
||||
player.line(target,'green');
|
||||
//target.addSkill('ns_chuanshu');
|
||||
target.restoreSkill('ns_chuanshu');
|
||||
target.update();
|
||||
},
|
||||
forced:true,
|
||||
popup:false,
|
||||
},
|
||||
ns_xiuzheng:{
|
||||
audio:["xinsheng",2],
|
||||
enable:"phaseUse",
|
||||
usable:1,
|
||||
priority:10,
|
||||
filter:function (event,player){
|
||||
return (ui.cardPile.childElementCount+ui.discardPile.childElementCount)>=2;
|
||||
},
|
||||
filterTarget:function (card,player,target){
|
||||
return player!=target;
|
||||
},
|
||||
content:function (){
|
||||
"step 0"
|
||||
event.cards=get.cards(2);
|
||||
player.showCards(event.cards);
|
||||
"step 1"
|
||||
if(get.color(event.cards[0])=='red'&&get.color(event.cards[1])=='red'){
|
||||
target.damage('fire');
|
||||
}
|
||||
if(get.color(event.cards[0])!=get.color(event.cards[1])){
|
||||
player.discardPlayerCard(target,"he",true);
|
||||
}
|
||||
if(get.color(event.cards[0])=='black'&&get.color(event.cards[1])=='black'){
|
||||
target.damage('thunder');
|
||||
}
|
||||
"step 2"
|
||||
if(event.cards.length){
|
||||
player.gain(event.cards,'gain2');
|
||||
game.delay();
|
||||
}
|
||||
"step 3"
|
||||
player.chooseToDiscard(2,'he','请弃置两张牌',true).ai=function(card){
|
||||
return 7-get.value(card);
|
||||
};
|
||||
},
|
||||
ai:{
|
||||
threaten:0.5,
|
||||
order:13,
|
||||
result:{
|
||||
target:function (player,target){
|
||||
return get.damageEffect(target,player);
|
||||
},
|
||||
},
|
||||
},
|
||||
},
|
||||
audio:["xingshuai",2],
|
||||
trigger:{
|
||||
global:"dying",
|
||||
},
|
||||
priority:8,
|
||||
unique:true,
|
||||
skillAnimation:true,
|
||||
animationColor:"water",
|
||||
filter:function (event,player){
|
||||
return event.player.hp<=0&&event.player!=player;
|
||||
},
|
||||
check:function (event,player){
|
||||
return get.attitude(player,event.player)>0;
|
||||
},
|
||||
logTarget:"player",
|
||||
content:function (){
|
||||
'step 0'
|
||||
// player.logSkill('ns_chuanshu',trigger.player);
|
||||
trigger.player.chooseControl('releiji','guidao').set('prompt',''+get.translation(trigger.player)+'获得一项技能');
|
||||
goon=true;
|
||||
|
||||
if(!goon){
|
||||
event.finish();
|
||||
}
|
||||
'step 1'
|
||||
trigger.player.addSkillLog(result.control);
|
||||
trigger.player.recover(1-trigger.player.hp);
|
||||
trigger.player.draw(2);
|
||||
trigger.player.storage.ns_chuanshu2=player;
|
||||
trigger.player.addSkill('ns_chuanshu2');
|
||||
//game.broadcastAll()+trigger.player.node.avatar.setBackgroundImage('extension/群英会/ns_zhangjiao.jpg');
|
||||
//player.removeSkill('ns_chuanshu');
|
||||
player.awakenSkill('ns_chuanshu');
|
||||
},
|
||||
},
|
||||
ns_xiandao1:{
|
||||
audio:["huashen",2],
|
||||
forced:true,
|
||||
//noLose:true,
|
||||
//locked:true,
|
||||
//noRemove:true,
|
||||
//noDisable:true,
|
||||
priority:10,
|
||||
trigger:{
|
||||
global:"gameStart",
|
||||
player:["phaseEnd","enterGame"],
|
||||
},
|
||||
//filter:function (event,player){
|
||||
// return player.isAlive();
|
||||
//},
|
||||
content:function (){
|
||||
var n=[1,2].randomGet();
|
||||
if(n==1){
|
||||
player.addTempSkill("releiji",{player:"phaseUseBegin"});
|
||||
player.markSkill("releiji",{player:"phaseUseBegin"});
|
||||
};
|
||||
if(n==2){
|
||||
player.addTempSkill("guidao",{player:"phaseUseBegin"});
|
||||
player.markSkill("guidao",{player:"phaseUseBegin"});
|
||||
};
|
||||
},
|
||||
},
|
||||
ns_xiandao2:{
|
||||
audio:["huashen",2],
|
||||
forced:true,
|
||||
//noLose:true,
|
||||
//locked:true,
|
||||
//noRemove:true,
|
||||
//noDisable:true,
|
||||
trigger:{
|
||||
player:"damageBefore",
|
||||
},
|
||||
filter:function (event,player){
|
||||
if(!event.nature) return false;
|
||||
return true;
|
||||
},
|
||||
content:function (){
|
||||
trigger.cancel();
|
||||
//event.finish();
|
||||
},
|
||||
},
|
||||
ns_xiandao:{
|
||||
forced:true,
|
||||
//noLose:true,
|
||||
//locked:true,
|
||||
noRemove:true,
|
||||
//noDisable:true,
|
||||
group:["ns_xiandao1","ns_xiandao2"],
|
||||
},
|
||||
ns_chuanshu2:{
|
||||
audio:["songwei",2],
|
||||
mark:"character",
|
||||
intro:{
|
||||
content:"当你造成或受到一次伤害后,$摸一张牌",
|
||||
},
|
||||
nopop:true,
|
||||
trigger:{
|
||||
source:"damageEnd",
|
||||
player:"damageEnd",
|
||||
},
|
||||
forced:true,
|
||||
popup:false,
|
||||
filter:function (event,player){
|
||||
return player.storage.ns_chuanshu2&&player.storage.ns_chuanshu2.isIn()&&event.num>0;
|
||||
},
|
||||
content:function (){
|
||||
'step 0'
|
||||
game.delayx();
|
||||
'step 1'
|
||||
var target=player.storage.ns_chuanshu2;
|
||||
player.line(target,'green');
|
||||
target.draw();
|
||||
game.delay();
|
||||
},
|
||||
onremove:true,
|
||||
group:"ns_chuanshu3",
|
||||
},
|
||||
ns_chuanshu3:{
|
||||
audio:1,
|
||||
trigger:{
|
||||
player:"dieBegin",
|
||||
},
|
||||
silent:true,
|
||||
onremove:true,
|
||||
filter:function (event,player){
|
||||
return player.storage.ns_chuanshu2&&player.storage.ns_chuanshu2.isIn();
|
||||
},
|
||||
content:function (){
|
||||
'step 0'
|
||||
game.delayx();
|
||||
'step 1'
|
||||
var target=player.storage.ns_chuanshu2;
|
||||
player.line(target,'green');
|
||||
//target.addSkill('ns_chuanshu');
|
||||
target.restoreSkill('ns_chuanshu');
|
||||
target.update();
|
||||
},
|
||||
forced:true,
|
||||
popup:false,
|
||||
},
|
||||
ns_xiuzheng:{
|
||||
audio:["xinsheng",2],
|
||||
enable:"phaseUse",
|
||||
usable:1,
|
||||
priority:10,
|
||||
filter:function (event,player){
|
||||
return (ui.cardPile.childElementCount+ui.discardPile.childElementCount)>=2;
|
||||
},
|
||||
filterTarget:function (card,player,target){
|
||||
return player!=target;
|
||||
},
|
||||
content:function (){
|
||||
"step 0"
|
||||
event.cards=get.cards(2);
|
||||
player.showCards(event.cards);
|
||||
"step 1"
|
||||
if(get.color(event.cards[0])=='red'&&get.color(event.cards[1])=='red'){
|
||||
target.damage('fire');
|
||||
}
|
||||
if(get.color(event.cards[0])!=get.color(event.cards[1])){
|
||||
player.discardPlayerCard(target,"he",true);
|
||||
}
|
||||
if(get.color(event.cards[0])=='black'&&get.color(event.cards[1])=='black'){
|
||||
target.damage('thunder');
|
||||
}
|
||||
"step 2"
|
||||
if(event.cards.length){
|
||||
player.gain(event.cards,'gain2');
|
||||
game.delay();
|
||||
}
|
||||
"step 3"
|
||||
player.chooseToDiscard(2,'he','请弃置两张牌',true);
|
||||
},
|
||||
ai:{
|
||||
threaten:0.5,
|
||||
order:13,
|
||||
result:{
|
||||
target:function (player,target){
|
||||
return get.damageEffect(target,player);
|
||||
},
|
||||
},
|
||||
},
|
||||
},
|
||||
nsanruo:{
|
||||
unique:true,
|
||||
init:function(player){
|
||||
|
@ -3322,13 +3320,13 @@ game.import('character',function(lib,game,ui,get,ai,_status){
|
|||
},
|
||||
},
|
||||
liangji:{
|
||||
audio:["liangji",2],
|
||||
enable:"phaseUse",
|
||||
usable:1,
|
||||
filterTarget:function (card,player,target){
|
||||
audio:["liangji",2],
|
||||
enable:"phaseUse",
|
||||
usable:1,
|
||||
filterTarget:function (card,player,target){
|
||||
return target!=player;
|
||||
},
|
||||
content:function (){
|
||||
content:function (){
|
||||
'step 0'
|
||||
player.chooseCard('h','环计:将1张牌置于'+get.translation(target)+'的武将牌上',true).set('ai',function(card){
|
||||
if(get.attitude(_status.event.player,_status.event.getParent().player)>0){
|
||||
|
@ -3346,63 +3344,62 @@ game.import('character',function(lib,game,ui,get,ai,_status){
|
|||
target.addSkill('liangji_1');
|
||||
}
|
||||
},
|
||||
ai:{
|
||||
order:1,
|
||||
result:{
|
||||
target:function (player,target){
|
||||
ai:{
|
||||
order:1,
|
||||
result:{
|
||||
target:function (player,target){
|
||||
if(get.attitude(player,target)>0){
|
||||
return Math.sqrt(target.countCards('he'));
|
||||
}
|
||||
return 0;
|
||||
},
|
||||
player:1,
|
||||
},
|
||||
},
|
||||
subSkill:{
|
||||
"1":{
|
||||
trigger:{
|
||||
player:"phaseDrawBegin",
|
||||
},
|
||||
forced:true,
|
||||
mark:true,
|
||||
intro:{
|
||||
content:"cards",
|
||||
},
|
||||
content:function (){
|
||||
'step 0'
|
||||
var cards=player.storage.liangji_1;
|
||||
if(cards){
|
||||
player.gain(cards,'gain2');
|
||||
}
|
||||
player.storage.liangji_1=0;
|
||||
|
||||
'step 1'
|
||||
if(player.sex=='male')player.addTempSkill('wushuang');
|
||||
if(player.sex=='female')player.addTempSkill('lijian');
|
||||
player.removeSkill('liangji_1');
|
||||
player:1,
|
||||
},
|
||||
},
|
||||
subSkill:{
|
||||
"1":{
|
||||
trigger:{
|
||||
player:"phaseDrawBegin",
|
||||
},
|
||||
forced:true,
|
||||
mark:true,
|
||||
intro:{
|
||||
content:"cards",
|
||||
},
|
||||
content:function (){
|
||||
'step 0'
|
||||
var cards=player.storage.liangji_1;
|
||||
if(cards){
|
||||
player.gain(cards,'gain2');
|
||||
}
|
||||
player.storage.liangji_1=0;
|
||||
'step 1'
|
||||
if(player.sex=='male')player.addTempSkill('wushuang');
|
||||
if(player.sex=='female')player.addTempSkill('lijian');
|
||||
player.removeSkill('liangji_1');
|
||||
},
|
||||
sub:true,
|
||||
},
|
||||
},
|
||||
},
|
||||
jugong:{
|
||||
audio:["jingong",2],
|
||||
trigger:{
|
||||
global:"damageEnd",
|
||||
},
|
||||
usable:1,
|
||||
frequent:true,
|
||||
locked:false,
|
||||
notemp:true,
|
||||
marktext:"功",
|
||||
init:function (player){
|
||||
audio:["jingong",2],
|
||||
trigger:{
|
||||
global:"damageEnd",
|
||||
},
|
||||
usable:1,
|
||||
frequent:true,
|
||||
locked:false,
|
||||
notemp:true,
|
||||
marktext:"功",
|
||||
init:function (player){
|
||||
player.storage.jugong=[];
|
||||
},
|
||||
filter:function (event,player){
|
||||
return event.card&&(event.card.name=='sha'||event.card.name=='juedou')&&event.notLink()
|
||||
filter:function (event,player){
|
||||
return event.card&&(event.card.name=='sha'||event.card.name=='juedou')&&event.notLink()
|
||||
&&_status.currentPhase!=player;
|
||||
},
|
||||
content:function (){
|
||||
content:function (){
|
||||
"step 0"
|
||||
player.draw();
|
||||
"step 1"
|
||||
|
@ -3421,17 +3418,17 @@ game.import('character',function(lib,game,ui,get,ai,_status){
|
|||
game.log(player,'将',result.cards,'置于武将牌上作为“功”');
|
||||
}
|
||||
},
|
||||
intro:{
|
||||
content:"cards",
|
||||
},
|
||||
group:"jugong_1",
|
||||
subSkill:{
|
||||
"1":{
|
||||
trigger:{
|
||||
player:"damageBegin",
|
||||
},
|
||||
filter:function (event,player){
|
||||
return player.storage.jugong.length>1;
|
||||
intro:{
|
||||
content:"cards",
|
||||
},
|
||||
group:"jugong_1",
|
||||
subSkill:{
|
||||
"1":{
|
||||
trigger:{
|
||||
player:"damageBegin",
|
||||
},
|
||||
filter:function (event,player){
|
||||
return player.storage.jugong.length>1;
|
||||
},
|
||||
content:function (){
|
||||
"step 0"
|
||||
|
@ -3446,24 +3443,25 @@ game.import('character',function(lib,game,ui,get,ai,_status){
|
|||
player.syncStorage('jugong');
|
||||
if(!player.storage.jugong.length){
|
||||
player.unmarkSkill('jugong');
|
||||
}
|
||||
else{
|
||||
player.markSkill('jugong');
|
||||
}
|
||||
player.$throw(links);
|
||||
game.log(player,'被移去了',links);
|
||||
for(var i=0;i<links.length;i++){
|
||||
ui.discardPile.appendChild(links[i]);}
|
||||
}
|
||||
else{
|
||||
player.markSkill('jugong');
|
||||
}
|
||||
player.$throw(links);
|
||||
game.log(player,'被移去了',links);
|
||||
for(var i=0;i<links.length;i++){
|
||||
ui.discardPile.appendChild(links[i]);
|
||||
}
|
||||
}
|
||||
"step 2"
|
||||
trigger.cancel();
|
||||
trigger.cancel();
|
||||
},
|
||||
sub:true,
|
||||
},
|
||||
},
|
||||
ai:{
|
||||
effect:{
|
||||
target:function (card,player,target){
|
||||
},
|
||||
},
|
||||
ai:{
|
||||
effect:{
|
||||
target:function (card,player,target){
|
||||
if(get.tag(card,'damage')){
|
||||
if(player.hasSkillTag('jueqing',false,target)) return [1,-2];
|
||||
if(!target.hasFriend()) return;
|
||||
|
@ -3473,30 +3471,30 @@ game.import('character',function(lib,game,ui,get,ai,_status){
|
|||
if(target.hp==2) return [0.1,get.tag(card,'damage')*0.1];
|
||||
}
|
||||
},
|
||||
},
|
||||
},
|
||||
},
|
||||
},
|
||||
},
|
||||
},
|
||||
chengmou:{
|
||||
audio:["moucheng",2],
|
||||
trigger:{
|
||||
player:"phaseDrawBegin",
|
||||
},
|
||||
frequent:true,
|
||||
filter:function (event,player){
|
||||
return player.storage.jugong.length>0;
|
||||
},
|
||||
content:function (){
|
||||
audio:["moucheng",2],
|
||||
trigger:{
|
||||
player:"phaseDrawBegin",
|
||||
},
|
||||
frequent:true,
|
||||
filter:function (event,player){
|
||||
return player.storage.jugong.length>0;
|
||||
},
|
||||
content:function (){
|
||||
'step 0'
|
||||
if(player.storage.jugong.length>2) player.loseHp();
|
||||
'step 1'
|
||||
var cards=player.storage.jugong;
|
||||
if(cards){
|
||||
player.gain(cards,'gain2');
|
||||
}
|
||||
player.storage.jugong=[];
|
||||
var cards=player.storage.jugong;
|
||||
if(cards){
|
||||
player.gain(cards,'gain2');
|
||||
}
|
||||
player.storage.jugong=[];
|
||||
'step 2'
|
||||
trigger.cancel();
|
||||
},
|
||||
trigger.cancel();
|
||||
},
|
||||
},
|
||||
nsxinsheng:{
|
||||
trigger:{source:'damageEnd'},
|
||||
|
@ -4813,20 +4811,20 @@ game.import('character',function(lib,game,ui,get,ai,_status){
|
|||
ns_liuzhang:'刘璋',
|
||||
ns_xinnanhua:'南华老仙',
|
||||
|
||||
ns_chuanshu:'传术',
|
||||
ns_chuanshu_info:'<span class=yellowtext>限定技</span> 当一名其他角色进入濒死状态时,你可以令其选择获得技能【雷击】或【鬼道】,其回复体力至1并摸两张牌。当该被【传术】的角色造成或受到一次伤害后,你摸一张牌。其阵亡后,你重置技能【传术】',
|
||||
ns_xiandao1:'仙道',
|
||||
ns_xiandao1_info:'<font color=#f00>锁定技</font> 游戏开始和回合结束阶段,你随机获得技能【雷击】或【鬼道】,直到下个出牌阶段开始',
|
||||
ns_xiandao2:'仙道',
|
||||
ns_xiandao2_info:'<font color=#f00>锁定技</font> 你防止受到任何属性伤害',
|
||||
ns_xiandao:'仙道',
|
||||
ns_xiandao_info:'<font color=#f00>锁定技</font> 游戏开始、你进入游戏时和回合结束阶段,你随机获得技能【雷击】或【鬼道】,直到下个出牌阶段阶段开始。你防止受到任何属性伤害',
|
||||
ns_chuanshu2:'术',
|
||||
ns_chuanshu2_info:'<font color=#f00>锁定技</font> 当你造成或受到一次伤害后,南华老仙摸一张牌',
|
||||
ns_chuanshu3:'术',
|
||||
ns_chuanshu3_info:'<font color=#f00>锁定技</font> 当你【传术】的角色阵亡后,你重置技能【传术】',
|
||||
ns_xiuzheng:'修真',
|
||||
ns_xiuzheng_info:'出牌阶段限一次,你可选择一名其他角色,然后展示牌堆顶的两张牌,若同为红色,则其受到一点火焰伤害;若同为黑色,其受到一点雷电伤害;若颜色不相同,你弃置其一张牌。然后你获得这两张展示的牌后再弃置两张牌',
|
||||
ns_chuanshu:'传术',
|
||||
ns_chuanshu_info:'<span class=yellowtext>限定技</span> 当一名其他角色进入濒死状态时,你可以令其选择获得技能【雷击】或【鬼道】,其回复体力至1并摸两张牌。当该被【传术】的角色造成或受到一次伤害后,你摸一张牌。其阵亡后,你重置技能【传术】',
|
||||
ns_xiandao1:'仙道',
|
||||
ns_xiandao1_info:'<font color=#f00>锁定技</font> 游戏开始和回合结束阶段,你随机获得技能【雷击】或【鬼道】,直到下个出牌阶段开始',
|
||||
ns_xiandao2:'仙道',
|
||||
ns_xiandao2_info:'<font color=#f00>锁定技</font> 你防止受到任何属性伤害',
|
||||
ns_xiandao:'仙道',
|
||||
ns_xiandao_info:'<font color=#f00>锁定技</font> 游戏开始、你进入游戏时和回合结束阶段,你随机获得技能【雷击】或【鬼道】,直到下个出牌阶段阶段开始。你防止受到任何属性伤害',
|
||||
ns_chuanshu2:'术',
|
||||
ns_chuanshu2_info:'<font color=#f00>锁定技</font> 当你造成或受到一次伤害后,南华老仙摸一张牌',
|
||||
ns_chuanshu3:'术',
|
||||
ns_chuanshu3_info:'<font color=#f00>锁定技</font> 当你【传术】的角色阵亡后,你重置技能【传术】',
|
||||
ns_xiuzheng:'修真',
|
||||
ns_xiuzheng_info:'出牌阶段限一次,你可选择一名其他角色,然后展示牌堆顶的两张牌,若同为红色,则其受到一点火焰伤害;若同为黑色,其受到一点雷电伤害;若颜色不相同,你弃置其一张牌。然后你获得这两张展示的牌后再弃置两张牌',
|
||||
nsanruo:'暗弱',
|
||||
nsanruo_info:'锁定技,你手牌中的[杀]和普通锦囊牌(借刀杀人等带有指向目标的锦囊除外)均对你不可见。但你可以正常使用之',
|
||||
nsxunshan:'循善',
|
||||
|
@ -4946,11 +4944,11 @@ game.import('character',function(lib,game,ui,get,ai,_status){
|
|||
yiesheng:'回雪',
|
||||
yiesheng_info:'出牌阶段,你可以弃置任意数量的黑色手牌,然后摸等量的牌。',
|
||||
liangji:'环计',
|
||||
liangji_info:'出牌阶段限一次,你可以选择一名其他角色并将一张手牌置于其武将牌上。目标角色于摸牌阶段开始时,获得此牌。若其为男性角色,则获得技能【无双】,若其为女性角色,则获得技能【离间】,直到回合结束。',
|
||||
chengmou:'逞谋',
|
||||
chengmou_info:'摸牌阶段开始时,若你有“功”牌,你获得之并跳过摸牌阶段,若你所获得的“功”牌多于两张,你须失去一点体力。',
|
||||
jugong:'居功',
|
||||
jugong_info:'回合外每名角色的回合限一次,每当场上有角色因受到【杀】或【决斗】造成的伤害,你可以摸一张牌并且将一张手牌置于你的武将牌上,称之为“功”。在你即将受到伤害时,你可以弃置两张“功”,防止此伤害。',
|
||||
liangji_info:'出牌阶段限一次,你可以选择一名其他角色并将一张手牌置于其武将牌上。目标角色于摸牌阶段开始时,获得此牌。若其为男性角色,则获得技能【无双】,若其为女性角色,则获得技能【离间】,直到回合结束。',
|
||||
chengmou:'逞谋',
|
||||
chengmou_info:'摸牌阶段开始时,若你有“功”牌,你获得之并跳过摸牌阶段,若你所获得的“功”牌多于两张,你须失去一点体力。',
|
||||
jugong:'居功',
|
||||
jugong_info:'回合外每名角色的回合限一次,每当场上有角色因受到【杀】或【决斗】造成的伤害,你可以摸一张牌并且将一张手牌置于你的武将牌上,称之为“功”。在你即将受到伤害时,你可以弃置两张“功”,防止此伤害。',
|
||||
nsxinsheng:'新生',
|
||||
nsxinsheng_info:'每当你对其他角色造成伤害后,若你未受伤,则你可以增加X点体力上限并摸X张牌,X为伤害点数',
|
||||
nsdunxing:'遁形',
|
||||
|
|
1394
character/extra.js
1394
character/extra.js
File diff suppressed because it is too large
Load Diff
|
@ -26,19 +26,17 @@ game.import('character',function(lib,game,ui,get,ai,_status){
|
|||
simazhao:["male","wei",3,["xinfu_daigong","xinfu_zhaoxin"],[]],
|
||||
wangyuanji:["female","wei",3,["xinfu_qianchong","xinfu_shangjian"],[]],
|
||||
pangdegong:["male","qun",3,["xinfu_pingcai","xinfu_pdgyingshi"],[]],
|
||||
re_sp_zhugeliang:["male","shu",3,["rehuoji","rekanpo","bazhen"],[]],
|
||||
re_xunyu:["male","wei",3,["quhu","rejieming"],[]],
|
||||
re_dianwei:["male","wei",4,["reqiangxi"],[]],
|
||||
re_yanwen:["male","qun",4,["reshuangxiong"],[]],
|
||||
re_pangtong:['male','shu',3,['xinlianhuan','niepan'],[]],
|
||||
xin_yuanshao:['male','qun',4,['reluanji','xueyi'],['zhu']],
|
||||
old_caochun:['male','wei',4,['shanjia']],
|
||||
old_yuanshu:['male','qun',4,['xinyongsi','yjixi']],
|
||||
},
|
||||
characterFilter:{
|
||||
},
|
||||
skill:{
|
||||
re_sp_zhugeliang:["male","shu",3,["rehuoji","rekanpo","bazhen"],[]],
|
||||
re_xunyu:["male","wei",3,["quhu","rejieming"],[]],
|
||||
re_dianwei:["male","wei",4,["reqiangxi"],[]],
|
||||
re_yanwen:["male","qun",4,["reshuangxiong"],[]],
|
||||
re_pangtong:['male','shu',3,['xinlianhuan','niepan'],[]],
|
||||
xin_yuanshao:['male','qun',4,['reluanji','xueyi'],['zhu']],
|
||||
old_caochun:['male','wei',4,['shanjia']],
|
||||
old_yuanshu:['male','qun',4,['xinyongsi','yjixi']],
|
||||
},
|
||||
characterFilter:{},
|
||||
skill:{},
|
||||
translate:{
|
||||
re_jikang:"新嵇康",
|
||||
old_bulianshi:'新步练师',
|
||||
|
|
|
@ -39,7 +39,6 @@ game.import('character',function(lib,game,ui,get,ai,_status){
|
|||
re_lidian:'字曼成,曹操麾下将领。李典深明大义,不与人争功,崇尚学习与高贵儒雅,尊重博学之士,在军中被称为长者。李典有长者之风,官至破虏将军,三十六岁去世。魏文帝曹丕继位后追谥号为愍侯。',
|
||||
},
|
||||
skill:{
|
||||
|
||||
reqiangxi:{
|
||||
subSkill:{
|
||||
off:{
|
||||
|
@ -49,39 +48,39 @@ game.import('character',function(lib,game,ui,get,ai,_status){
|
|||
audio:"qiangxi",
|
||||
enable:"phaseUse",
|
||||
filterCard:function (card){
|
||||
return get.subtype(card)=='equip1';
|
||||
},
|
||||
return get.subtype(card)=='equip1';
|
||||
},
|
||||
selectCard:function (){
|
||||
return [0,1];
|
||||
},
|
||||
return [0,1];
|
||||
},
|
||||
filterTarget:function (card,player,target){
|
||||
if(player==target) return false;
|
||||
if(target.hasSkill('reqiangxi_off')) return false;
|
||||
return get.distance(player,target,'attack')<=1;
|
||||
},
|
||||
if(player==target) return false;
|
||||
if(target.hasSkill('reqiangxi_off')) return false;
|
||||
return get.distance(player,target,'attack')<=1;
|
||||
},
|
||||
content:function (){
|
||||
"step 0"
|
||||
if(cards.length==0){
|
||||
player.loseHp();
|
||||
}
|
||||
"step 1"
|
||||
target.addTempSkill('reqiangxi_off');
|
||||
target.damage('nocard');
|
||||
},
|
||||
"step 0"
|
||||
if(cards.length==0){
|
||||
player.loseHp();
|
||||
}
|
||||
"step 1"
|
||||
target.addTempSkill('reqiangxi_off');
|
||||
target.damage('nocard');
|
||||
},
|
||||
check:function (card){
|
||||
return 10-get.value(card);
|
||||
},
|
||||
return 10-get.value(card);
|
||||
},
|
||||
position:"he",
|
||||
ai:{
|
||||
order:8.5,
|
||||
result:{
|
||||
target:function (player,target){
|
||||
if(!player.countCards('he',{type:'equip'})){
|
||||
if(player.hp<2) return 0;
|
||||
if(target.hp>=player.hp) return 0;
|
||||
}
|
||||
return get.damageEffect(target,player);
|
||||
},
|
||||
if(!player.countCards('he',{type:'equip'})){
|
||||
if(player.hp<2) return 0;
|
||||
if(target.hp>=player.hp) return 0;
|
||||
}
|
||||
return get.damageEffect(target,player);
|
||||
},
|
||||
},
|
||||
},
|
||||
threaten:1.5,
|
||||
|
@ -91,23 +90,23 @@ game.import('character',function(lib,game,ui,get,ai,_status){
|
|||
audio:"huoji",
|
||||
enable:"chooseToUse",
|
||||
filterCard:function (card){
|
||||
return get.color(card)=='red';
|
||||
},
|
||||
return get.color(card)=='red';
|
||||
},
|
||||
viewAs:{
|
||||
name:"huogong",
|
||||
nature:"fire",
|
||||
},
|
||||
viewAsFilter:function (player){
|
||||
if(!player.countCards('h',{color:'red'})) return false;
|
||||
},
|
||||
if(!player.countCards('h',{color:'red'})) return false;
|
||||
},
|
||||
prompt:"将一张红色牌当火攻使用",
|
||||
check:function (card){
|
||||
var player=_status.currentPhase;
|
||||
if(player.countCards('h')>player.hp){
|
||||
return 6-get.value(card);
|
||||
}
|
||||
return 4-get.value(card)
|
||||
},
|
||||
var player=_status.currentPhase;
|
||||
if(player.countCards('h')>player.hp){
|
||||
return 6-get.value(card);
|
||||
}
|
||||
return 4-get.value(card)
|
||||
},
|
||||
ai:{
|
||||
basic:{
|
||||
order:4,
|
||||
|
@ -115,41 +114,41 @@ game.import('character',function(lib,game,ui,get,ai,_status){
|
|||
useful:1,
|
||||
},
|
||||
wuxie:function (target,card,player,current,state){
|
||||
if(get.attitude(current,player)>=0&&state>0) return false;
|
||||
},
|
||||
if(get.attitude(current,player)>=0&&state>0) return false;
|
||||
},
|
||||
result:{
|
||||
player:function (player){
|
||||
var nh=player.countCards('h');
|
||||
if(nh<=player.hp&&nh<=4&&_status.event.name=='chooseToUse'){
|
||||
if(typeof _status.event.filterCard=='function'&&
|
||||
_status.event.filterCard({name:'huogong'})){
|
||||
return -10;
|
||||
}
|
||||
if(_status.event.skill){
|
||||
var viewAs=get.info(_status.event.skill).viewAs;
|
||||
if(viewAs=='huogong') return -10;
|
||||
if(viewAs&&viewAs.name=='huogong') return -10;
|
||||
}
|
||||
}
|
||||
return 0;
|
||||
},
|
||||
var nh=player.countCards('h');
|
||||
if(nh<=player.hp&&nh<=4&&_status.event.name=='chooseToUse'){
|
||||
if(typeof _status.event.filterCard=='function'&&
|
||||
_status.event.filterCard({name:'huogong'})){
|
||||
return -10;
|
||||
}
|
||||
if(_status.event.skill){
|
||||
var viewAs=get.info(_status.event.skill).viewAs;
|
||||
if(viewAs=='huogong') return -10;
|
||||
if(viewAs&&viewAs.name=='huogong') return -10;
|
||||
}
|
||||
}
|
||||
return 0;
|
||||
},
|
||||
target:function (player,target){
|
||||
if(target.hasSkill('huogong2')||target.countCards('h')==0) return 0;
|
||||
if(player.countCards('h')<=1) return 0;
|
||||
if(target==player){
|
||||
if(typeof _status.event.filterCard=='function'&&
|
||||
_status.event.filterCard({name:'huogong'})){
|
||||
return -1.5;
|
||||
}
|
||||
if(_status.event.skill){
|
||||
var viewAs=get.info(_status.event.skill).viewAs;
|
||||
if(viewAs=='huogong') return -1.5;
|
||||
if(viewAs&&viewAs.name=='huogong') return -1.5;
|
||||
}
|
||||
return 0;
|
||||
}
|
||||
return -1.5;
|
||||
},
|
||||
if(target.hasSkill('huogong2')||target.countCards('h')==0) return 0;
|
||||
if(player.countCards('h')<=1) return 0;
|
||||
if(target==player){
|
||||
if(typeof _status.event.filterCard=='function'&&
|
||||
_status.event.filterCard({name:'huogong'})){
|
||||
return -1.5;
|
||||
}
|
||||
if(_status.event.skill){
|
||||
var viewAs=get.info(_status.event.skill).viewAs;
|
||||
if(viewAs=='huogong') return -1.5;
|
||||
if(viewAs&&viewAs.name=='huogong') return -1.5;
|
||||
}
|
||||
return 0;
|
||||
}
|
||||
return -1.5;
|
||||
},
|
||||
},
|
||||
tag:{
|
||||
damage:1,
|
||||
|
@ -164,11 +163,11 @@ game.import('character',function(lib,game,ui,get,ai,_status){
|
|||
position:"he",
|
||||
enable:"chooseToUse",
|
||||
filterCard:function (card){
|
||||
return get.color(card)=='black';
|
||||
},
|
||||
return get.color(card)=='black';
|
||||
},
|
||||
viewAsFilter:function (player){
|
||||
return player.countCards('he',{color:'black'})>0;
|
||||
},
|
||||
return player.countCards('he',{color:'black'})>0;
|
||||
},
|
||||
viewAs:{
|
||||
name:"wuxie",
|
||||
},
|
||||
|
@ -193,56 +192,56 @@ game.import('character',function(lib,game,ui,get,ai,_status){
|
|||
},
|
||||
direct:true,
|
||||
content:function (){
|
||||
"step 0"
|
||||
event.count=trigger.num;
|
||||
"step 1"
|
||||
player.chooseTarget(get.prompt('rejieming')).set('ai',function(target){
|
||||
var att=get.attitude(_status.event.player,target);
|
||||
if(att>2){
|
||||
if((target.maxHp-target.countCards('h'))>2) return 2*att;
|
||||
return att;
|
||||
}
|
||||
return att/3;
|
||||
});
|
||||
"step 2"
|
||||
if(result.bool){
|
||||
event.current=result.targets[0];
|
||||
player.logSkill('rejieming',event.current);
|
||||
player.line(event.current,'thunder');
|
||||
event.current.draw(2);
|
||||
event.count--;
|
||||
}
|
||||
else event.finish();
|
||||
"step 3"
|
||||
if(event.current.countCards('h')<event.current.maxHp){
|
||||
player.draw();
|
||||
}
|
||||
if(event.count>0) event.goto(1);
|
||||
},
|
||||
"step 0"
|
||||
event.count=trigger.num;
|
||||
"step 1"
|
||||
player.chooseTarget(get.prompt('rejieming')).set('ai',function(target){
|
||||
var att=get.attitude(_status.event.player,target);
|
||||
if(att>2){
|
||||
if((target.maxHp-target.countCards('h'))>2) return 2*att;
|
||||
return att;
|
||||
}
|
||||
return att/3;
|
||||
});
|
||||
"step 2"
|
||||
if(result.bool){
|
||||
event.current=result.targets[0];
|
||||
player.logSkill('rejieming',event.current);
|
||||
player.line(event.current,'thunder');
|
||||
event.current.draw(2);
|
||||
event.count--;
|
||||
}
|
||||
else event.finish();
|
||||
"step 3"
|
||||
if(event.current.countCards('h')<event.current.maxHp){
|
||||
player.draw();
|
||||
}
|
||||
if(event.count>0) event.goto(1);
|
||||
},
|
||||
ai:{
|
||||
maixie:true,
|
||||
"maixie_hp":true,
|
||||
effect:{
|
||||
target:function (card,player,target,current){
|
||||
if(get.tag(card,'damage')&&target.hp>1){
|
||||
if(player.hasSkillTag('jueqing',false,target)) return [1,-2];
|
||||
var max=0;
|
||||
var players=game.filterPlayer();
|
||||
for(var i=0;i<players.length;i++){
|
||||
if(get.attitude(target,players[i])>0){
|
||||
max=Math.max(Math.min(5,players[i].hp)-players[i].countCards('h'),max);
|
||||
}
|
||||
}
|
||||
switch(max){
|
||||
case 0:return 2;
|
||||
case 1:return 1.5;
|
||||
case 2:return [1,2];
|
||||
default:return [0,max];
|
||||
}
|
||||
}
|
||||
if((card.name=='tao'||card.name=='caoyao')&&
|
||||
target.hp>1&&target.countCards('h')<=target.hp) return [0,0];
|
||||
},
|
||||
if(get.tag(card,'damage')&&target.hp>1){
|
||||
if(player.hasSkillTag('jueqing',false,target)) return [1,-2];
|
||||
var max=0;
|
||||
var players=game.filterPlayer();
|
||||
for(var i=0;i<players.length;i++){
|
||||
if(get.attitude(target,players[i])>0){
|
||||
max=Math.max(Math.min(5,players[i].hp)-players[i].countCards('h'),max);
|
||||
}
|
||||
}
|
||||
switch(max){
|
||||
case 0:return 2;
|
||||
case 1:return 1.5;
|
||||
case 2:return [1,2];
|
||||
default:return [0,max];
|
||||
}
|
||||
}
|
||||
if((card.name=='tao'||card.name=='caoyao')&&
|
||||
target.hp>1&&target.countCards('h')<=target.hp) return [0,0];
|
||||
},
|
||||
},
|
||||
},
|
||||
},
|
||||
|
@ -253,61 +252,61 @@ game.import('character',function(lib,game,ui,get,ai,_status){
|
|||
group:"reshuangxiong2",
|
||||
audio:"shuangxiong",
|
||||
check:function (event,player){
|
||||
if(player.countCards('h')>player.hp) return true;
|
||||
if(player.countCards('h')>3) return true;
|
||||
return false;
|
||||
},
|
||||
if(player.countCards('h')>player.hp) return true;
|
||||
if(player.countCards('h')>3) return true;
|
||||
return false;
|
||||
},
|
||||
content:function (){
|
||||
"step 0"
|
||||
trigger.cancel();
|
||||
event.cards=get.cards(2);
|
||||
event.videoId=lib.status.videoId++;
|
||||
game.broadcastAll(function(player,id,cards){
|
||||
var str;
|
||||
if(player==game.me&&!_status.auto){
|
||||
str='【双雄】选择获得其中一张牌';
|
||||
}
|
||||
else{
|
||||
str='双雄';
|
||||
}
|
||||
var dialog=ui.create.dialog(str,cards);
|
||||
dialog.videoId=id;
|
||||
},player,event.videoId,event.cards);
|
||||
event.time=get.utc();
|
||||
game.addVideo('showCards',player,['双雄',get.cardsInfo(event.cards)]);
|
||||
game.addVideo('delay',null,2);
|
||||
"step 1"
|
||||
var next=player.chooseButton([1,1],true);
|
||||
next.set('dialog',event.videoId);
|
||||
next.set('ai',function(button){
|
||||
var player=_status.event.player;
|
||||
var color=get.color(button.link);
|
||||
var value=get.value(button.link,player);
|
||||
if(player.countCards('h',{color:color})>player.countCards('h',['red','black'].remove(color)[0])) value+=5;
|
||||
return value;
|
||||
});
|
||||
"step 2"
|
||||
if(result.bool&&result.links){
|
||||
var cards2=[];
|
||||
for(var i=0;i<result.links.length;i++){
|
||||
cards2.push(result.links[i]);
|
||||
cards.remove(result.links[i]);
|
||||
}
|
||||
game.cardsDiscard(cards);
|
||||
event.card2=cards2[0];
|
||||
}
|
||||
var time=1000-(get.utc()-event.time);
|
||||
if(time>0){
|
||||
game.delay(0,time);
|
||||
}
|
||||
"step 3"
|
||||
game.broadcastAll('closeDialog',event.videoId);
|
||||
var card2=event.card2;
|
||||
player.gain(card2,'gain2');
|
||||
player.addTempSkill('shuangxiong2');
|
||||
player.storage.shuangxiong=get.color(card2);
|
||||
game.delay();
|
||||
},
|
||||
"step 0"
|
||||
trigger.cancel();
|
||||
event.cards=get.cards(2);
|
||||
event.videoId=lib.status.videoId++;
|
||||
game.broadcastAll(function(player,id,cards){
|
||||
var str;
|
||||
if(player==game.me&&!_status.auto){
|
||||
str='【双雄】选择获得其中一张牌';
|
||||
}
|
||||
else{
|
||||
str='双雄';
|
||||
}
|
||||
var dialog=ui.create.dialog(str,cards);
|
||||
dialog.videoId=id;
|
||||
},player,event.videoId,event.cards);
|
||||
event.time=get.utc();
|
||||
game.addVideo('showCards',player,['双雄',get.cardsInfo(event.cards)]);
|
||||
game.addVideo('delay',null,2);
|
||||
"step 1"
|
||||
var next=player.chooseButton([1,1],true);
|
||||
next.set('dialog',event.videoId);
|
||||
next.set('ai',function(button){
|
||||
var player=_status.event.player;
|
||||
var color=get.color(button.link);
|
||||
var value=get.value(button.link,player);
|
||||
if(player.countCards('h',{color:color})>player.countCards('h',['red','black'].remove(color)[0])) value+=5;
|
||||
return value;
|
||||
});
|
||||
"step 2"
|
||||
if(result.bool&&result.links){
|
||||
var cards2=[];
|
||||
for(var i=0;i<result.links.length;i++){
|
||||
cards2.push(result.links[i]);
|
||||
cards.remove(result.links[i]);
|
||||
}
|
||||
game.cardsDiscard(cards);
|
||||
event.card2=cards2[0];
|
||||
}
|
||||
var time=1000-(get.utc()-event.time);
|
||||
if(time>0){
|
||||
game.delay(0,time);
|
||||
}
|
||||
"step 3"
|
||||
game.broadcastAll('closeDialog',event.videoId);
|
||||
var card2=event.card2;
|
||||
player.gain(card2,'gain2');
|
||||
player.addTempSkill('shuangxiong2');
|
||||
player.storage.shuangxiong=get.color(card2);
|
||||
game.delay();
|
||||
},
|
||||
},
|
||||
"reshuangxiong2":{
|
||||
trigger:{
|
||||
|
@ -317,24 +316,24 @@ game.import('character',function(lib,game,ui,get,ai,_status){
|
|||
silent:true,
|
||||
popup:false,
|
||||
filter:function (event,player){
|
||||
return event.parent.skill=='shuangxiong2'&&event.parent.targetCards.length>0;
|
||||
},
|
||||
return event.parent.skill=='shuangxiong2'&&event.parent.targetCards.length>0;
|
||||
},
|
||||
content:function (){
|
||||
"step 0"
|
||||
var cards=trigger.parent.targetCards.slice(0);
|
||||
for(var i=0;i<cards.length;i++){
|
||||
if(get.position(cards[i])!='d') cards.remove(cards[i--]);
|
||||
}
|
||||
if(!cards.length) event.finish();
|
||||
else{
|
||||
event.cards=cards;
|
||||
player.chooseBool('是否获得'+get.translation(event.cards)+'?').ai=function(){
|
||||
return true;
|
||||
};
|
||||
}
|
||||
"step 1"
|
||||
if(result.bool) player.gain(cards,'gain2');
|
||||
},
|
||||
"step 0"
|
||||
var cards=trigger.parent.targetCards.slice(0);
|
||||
for(var i=0;i<cards.length;i++){
|
||||
if(get.position(cards[i])!='d') cards.remove(cards[i--]);
|
||||
}
|
||||
if(!cards.length) event.finish();
|
||||
else{
|
||||
event.cards=cards;
|
||||
player.chooseBool('是否获得'+get.translation(event.cards)+'?').ai=function(){
|
||||
return true;
|
||||
};
|
||||
}
|
||||
"step 1"
|
||||
if(result.bool) player.gain(cards,'gain2');
|
||||
},
|
||||
},
|
||||
|
||||
"new_yajiao":{
|
||||
|
@ -352,18 +351,18 @@ game.import('character',function(lib,game,ui,get,ai,_status){
|
|||
player.showCards(event.card);
|
||||
event.same=false;
|
||||
if(get.type(event.card[0],'trick')==get.type(trigger.card,'trick')) event.same=true;
|
||||
player.chooseTarget('选择获得此牌的角色',true).set('ai',function(target){
|
||||
var att=get.attitude(_status.event.player,target);
|
||||
if(_status.event.du){
|
||||
if(target.hasSkillTag('nodu')) return 0;
|
||||
return -att;
|
||||
}
|
||||
if(!_status.event.same) att+=target==_status.event.player?1:0;
|
||||
if(att>0){
|
||||
return att+Math.max(0,5-target.countCards('h'));
|
||||
}
|
||||
return att;
|
||||
}).set('du',event.card.name=='du').set('same',event.same);
|
||||
player.chooseTarget('选择获得此牌的角色',true).set('ai',function(target){
|
||||
var att=get.attitude(_status.event.player,target);
|
||||
if(_status.event.du){
|
||||
if(target.hasSkillTag('nodu')) return 0;
|
||||
return -att;
|
||||
}
|
||||
if(!_status.event.same) att+=target==_status.event.player?1:0;
|
||||
if(att>0){
|
||||
return att+Math.max(0,5-target.countCards('h'));
|
||||
}
|
||||
return att;
|
||||
}).set('du',event.card.name=='du').set('same',event.same);
|
||||
"step 1"
|
||||
if(result.targets){
|
||||
player.line(result.targets,'green');
|
||||
|
|
3304
character/shenhua.js
3304
character/shenhua.js
File diff suppressed because it is too large
Load Diff
1555
character/sp.js
1555
character/sp.js
File diff suppressed because it is too large
Load Diff
|
@ -29,9 +29,7 @@ game.import('character',function(lib,game,ui,get,ai,_status){
|
|||
liuyao:"刘繇(yáo,一读yóu)(156年-197年),字正礼。东莱牟平(今山东牟平)人。东汉末年宗室、大臣,汉末群雄之一,齐悼惠王刘肥之后,太尉刘宠之侄。<br>刘繇最初被推举为孝廉,授郎中。任下邑县长时,因拒郡守请托而弃官。后被征辟为司空掾属,除授侍御史,因战乱而不到任,避居淮浦。兴平元年(194年),被任命为扬州刺史。他先后与袁术、孙策交战,一度被朝廷加授为扬州牧、振武将军,但最终还是败归丹徒。此后,刘繇又击破反叛的笮融,旋即病逝,年四十二。",
|
||||
liuyan:"刘焉(?-194年),字君郎(《华阳国志》又作君朗)。江夏郡竟陵县(今湖北省天门市)人。东汉末年宗室、军阀,汉末群雄之一,西汉鲁恭王刘余之后。<br>刘焉初以汉朝宗室身份,拜为中郎,历任雒阳令、冀州刺史、南阳太守、宗正、太常等官。因益州刺史郄俭在益州大肆聚敛,贪婪成风,加上当时天下大乱。刘焉欲取得一安身立命之所,割据一方,于是向朝廷求为益州牧,封阳城侯,前往益州整饬吏治。郄俭为黄巾军所杀,刘焉进入益州,派张鲁盘踞汉中,张鲁截断交通,斩杀汉使,从此益州与中央道路不通。刘焉进一步对内打击地方豪强,巩固自身势力,益州因而处于半独立的状态。兴平元年(194年),刘焉因背疮迸发而逝世,其子刘璋继领益州牧。",
|
||||
},
|
||||
characterTitle:{
|
||||
//lijue:"体力上限:6",
|
||||
},
|
||||
characterTitle:{},
|
||||
perfectPair:{
|
||||
lijue:['guosi','jiaxu'],
|
||||
zhangji:['zhangxiu','drlt_zhangxiu','zoushi'],
|
||||
|
@ -682,7 +680,7 @@ game.import('character',function(lib,game,ui,get,ai,_status){
|
|||
}
|
||||
else{
|
||||
ui.cardPile.appendChild(cards[i]);
|
||||
}
|
||||
}
|
||||
}
|
||||
game.updateRoundNumber();
|
||||
game.log(player,'把',get.cnNumber(cards.length),'张牌放在了牌堆里');
|
||||
|
@ -1076,7 +1074,7 @@ game.import('character',function(lib,game,ui,get,ai,_status){
|
|||
event.card=result[0];
|
||||
if(event.card&&get.owner(event.card)==player&&(event.ablers.length>1||event.ablers[0]!=player)){
|
||||
player.chooseTarget('是否将'+get.translation(event.card)+'交给其他角色?',function(card,player,target){
|
||||
return event.ablers.contains(target)&&target!=player;
|
||||
return event.ablers.contains(target)&&target!=player;
|
||||
}).ai=function(){
|
||||
return false;
|
||||
};
|
||||
|
@ -1356,7 +1354,7 @@ game.import('character',function(lib,game,ui,get,ai,_status){
|
|||
content:"mark",
|
||||
},
|
||||
filter:function(event,player){
|
||||
return player.storage.xinfu_xionghuo>0;
|
||||
return player.storage.xinfu_xionghuo>0;
|
||||
},
|
||||
filterTarget:function (card,player,target){
|
||||
if(target.storage.xionghuo!=undefined&&target.storage.xionghuo>0) return false;
|
||||
|
@ -2200,20 +2198,20 @@ game.import('character',function(lib,game,ui,get,ai,_status){
|
|||
var attitude=get.attitude(player,trigger.player);
|
||||
if(attitude==0||(resulth==0&&results==0)) return '取消';
|
||||
if(attitude>0){
|
||||
if(results>0){
|
||||
if(resulth>results) return '红桃5';
|
||||
return '黑桃5';
|
||||
}
|
||||
else if(resulth>0) return '红桃5';
|
||||
return '取消';
|
||||
if(results>0){
|
||||
if(resulth>results) return '红桃5';
|
||||
return '黑桃5';
|
||||
}
|
||||
else if(resulth>0) return '红桃5';
|
||||
return '取消';
|
||||
}
|
||||
else{
|
||||
if(results<0){
|
||||
if(resulth<results) return '红桃5';
|
||||
return '黑桃5';
|
||||
}
|
||||
else if(resulth<0) return '红桃5';
|
||||
return '取消';
|
||||
if(resulth<results) return '红桃5';
|
||||
return '黑桃5';
|
||||
}
|
||||
else if(resulth<0) return '红桃5';
|
||||
return '取消';
|
||||
}
|
||||
}).set('judging',trigger.player.judging[0]);
|
||||
"step 1"
|
||||
|
@ -2967,7 +2965,7 @@ game.import('character',function(lib,game,ui,get,ai,_status){
|
|||
effect:{
|
||||
target:function (card,player,target,current){
|
||||
if(get.type(card)=='equip'&&player==target&&player==_status.currentPhase) return [1,3];
|
||||
},
|
||||
},
|
||||
},
|
||||
},
|
||||
},
|
||||
|
@ -3020,7 +3018,7 @@ game.import('character',function(lib,game,ui,get,ai,_status){
|
|||
effect:{
|
||||
target:function (card,player,target,current){
|
||||
if(get.type(card)=='equip'&&player==target&&player==_status.currentPhase&&get.subtype(card)=='equip1') return [1,3];
|
||||
},
|
||||
},
|
||||
},
|
||||
},
|
||||
audio:2,
|
||||
|
@ -4367,7 +4365,7 @@ game.import('character',function(lib,game,ui,get,ai,_status){
|
|||
}
|
||||
else{
|
||||
if(!event.ingame){
|
||||
if(target.getEquip(2)) return true;
|
||||
if(target.getEquip(2)) return true;
|
||||
return false;
|
||||
}
|
||||
return target.countCards('e')>0;
|
||||
|
@ -4631,7 +4629,7 @@ game.import('character',function(lib,game,ui,get,ai,_status){
|
|||
filter:function (event,player){
|
||||
if(!player.storage.yizan&&player.countCards('he')<2) return false;
|
||||
if(event.filterCard({name:'sha'},player,event)||
|
||||
event.filterCard({name:'jiu'},player,event)||
|
||||
event.filterCard({name:'jiu'},player,event)||
|
||||
event.filterCard({name:'tao'},player,event)){
|
||||
return player.hasCard(function(card){
|
||||
return get.type(card)=='basic';
|
||||
|
@ -4911,10 +4909,10 @@ game.import('character',function(lib,game,ui,get,ai,_status){
|
|||
'将'+get.cnNumber(event.num)+'张牌交给一名其他角色',
|
||||
'弃置'+get.cnNumber(event.num)+'张牌',
|
||||
]).set('ai',function(){
|
||||
if(game.hasPlayer(function(current){
|
||||
return current!=player&&get.attitude(player,current)>2;
|
||||
})) return 0;
|
||||
return 1;
|
||||
if(game.hasPlayer(function(current){
|
||||
return current!=player&&get.attitude(player,current)>2;
|
||||
})) return 0;
|
||||
return 1;
|
||||
});
|
||||
'step 3'
|
||||
if(result.index==0){
|
||||
|
@ -5123,7 +5121,7 @@ game.import('character',function(lib,game,ui,get,ai,_status){
|
|||
if(result.bool){
|
||||
player.storage.xinfu_zhaoxin.remove(event.card);
|
||||
player.$give(event.card,trigger.player);
|
||||
trigger.player.gain(event.card,'fromStorage');
|
||||
trigger.player.gain(event.card,'fromStorage');
|
||||
if(player.storage.xinfu_zhaoxin.length) player.markSkill('xinfu_zhaoxin');
|
||||
else player.unmarkSkill('xinfu_zhaoxin');
|
||||
player.chooseBool('是否对'+get.translation(trigger.player)+'造成一点伤害?').ai=function(){
|
||||
|
|
|
@ -200,64 +200,64 @@ game.import('character',function(lib,game,ui,get,ai,_status){
|
|||
usable:1,
|
||||
position:'he',
|
||||
filterTarget:function (card,player,target){
|
||||
return target!=player;
|
||||
},
|
||||
return target!=player;
|
||||
},
|
||||
complexCard:true,
|
||||
complexSelect:true,
|
||||
selectTarget:function (){
|
||||
return ui.selected.cards.length;
|
||||
},
|
||||
return ui.selected.cards.length;
|
||||
},
|
||||
filterCard:true,
|
||||
selectCard:function (){
|
||||
var player=_status.event.player;
|
||||
return [1,player.hp];
|
||||
},
|
||||
var player=_status.event.player;
|
||||
return [1,player.hp];
|
||||
},
|
||||
check:function (cardx){
|
||||
var player=_status.event.player;
|
||||
var number=game.countPlayer(function(target){
|
||||
if(player==target) return false;
|
||||
var pe=player.countCards('e',function(card){
|
||||
return card!=cardx&&ui.selected.cards.contains(card)==false;
|
||||
});
|
||||
var te=target.countCards('e');
|
||||
if(pe>te&&target.isDamaged()&&get.attitude(player,target)>2) return true;
|
||||
else if(pe==te&&get.attitude(player,target)>2) return true;
|
||||
else if(pe<te&&get.attitude(player,target)<0) return true;
|
||||
return false;
|
||||
});
|
||||
if(ui.selected.cards.length<number) return 7-get.value(cardx);
|
||||
else return 0;
|
||||
},
|
||||
var player=_status.event.player;
|
||||
var number=game.countPlayer(function(target){
|
||||
if(player==target) return false;
|
||||
var pe=player.countCards('e',function(card){
|
||||
return card!=cardx&&ui.selected.cards.contains(card)==false;
|
||||
});
|
||||
var te=target.countCards('e');
|
||||
if(pe>te&&target.isDamaged()&&get.attitude(player,target)>2) return true;
|
||||
else if(pe==te&&get.attitude(player,target)>2) return true;
|
||||
else if(pe<te&&get.attitude(player,target)<0) return true;
|
||||
return false;
|
||||
});
|
||||
if(ui.selected.cards.length<number) return 7-get.value(cardx);
|
||||
else return 0;
|
||||
},
|
||||
targetprompt:function (target){
|
||||
var pe=_status.event.player.countCards('e',function(card){
|
||||
return ui.selected.cards.contains(card)==false;
|
||||
});
|
||||
var te=target.countCards('e');
|
||||
if(pe>te) return "回复体力";
|
||||
else if(pe==te) return "摸一张牌";
|
||||
else if(pe<te) return "失去体力";
|
||||
},
|
||||
line:"thunder",
|
||||
content:function (){
|
||||
var pe=player.countCards('e');
|
||||
var te=target.countCards('e');
|
||||
if(pe>te) target.recover();
|
||||
else if(pe==te) target.draw();
|
||||
else if(pe<te) target.loseHp();
|
||||
},
|
||||
var pe=_status.event.player.countCards('e',function(card){
|
||||
return ui.selected.cards.contains(card)==false;
|
||||
});
|
||||
var te=target.countCards('e');
|
||||
if(pe>te) return "回复体力";
|
||||
else if(pe==te) return "摸一张牌";
|
||||
else if(pe<te) return "失去体力";
|
||||
},
|
||||
line:"thunder",
|
||||
content:function (){
|
||||
var pe=player.countCards('e');
|
||||
var te=target.countCards('e');
|
||||
if(pe>te) target.recover();
|
||||
else if(pe==te) target.draw();
|
||||
else if(pe<te) target.loseHp();
|
||||
},
|
||||
ai:{
|
||||
order:10,
|
||||
result:{
|
||||
target:function (player,target){
|
||||
var pe=player.countCards('e',function(card){
|
||||
return ui.selected.cards.contains(card)==false;
|
||||
});
|
||||
var te=target.countCards('e');
|
||||
if(pe>te&&target.isDamaged()) return 2;
|
||||
else if(pe==te) return 1;
|
||||
else if(pe<te) return -2.5;
|
||||
else return 0;
|
||||
},
|
||||
var pe=player.countCards('e',function(card){
|
||||
return ui.selected.cards.contains(card)==false;
|
||||
});
|
||||
var te=target.countCards('e');
|
||||
if(pe>te&&target.isDamaged()) return 2;
|
||||
else if(pe==te) return 1;
|
||||
else if(pe<te) return -2.5;
|
||||
else return 0;
|
||||
},
|
||||
},
|
||||
},
|
||||
},
|
||||
|
@ -271,42 +271,42 @@ game.import('character',function(lib,game,ui,get,ai,_status){
|
|||
skillAnimation:true,
|
||||
derivation:["new_canyun"],
|
||||
content:function (){
|
||||
"step 0"
|
||||
player.chooseTarget('【绝响】:是否令一名其他角色获得技能〖残韵〗?',function(card,player,target){
|
||||
return target!=player;
|
||||
}).set('ai',function(target){
|
||||
var att=get.attitude(_status.event.player,target);
|
||||
if(target.countCards('ej',{suit:'club'})) att=att*2;
|
||||
return 10+att;
|
||||
});
|
||||
"step 1"
|
||||
var next=game.createEvent('new_juexiang',null,trigger.parent);
|
||||
next.player=trigger.source;
|
||||
next.playerx=player;
|
||||
if(result.bool) next.target=result.targets[0];
|
||||
next.setContent(lib.skill.new_juexiang.contentx);
|
||||
},
|
||||
"step 0"
|
||||
player.chooseTarget('【绝响】:是否令一名其他角色获得技能〖残韵〗?',function(card,player,target){
|
||||
return target!=player;
|
||||
}).set('ai',function(target){
|
||||
var att=get.attitude(_status.event.player,target);
|
||||
if(target.countCards('ej',{suit:'club'})) att=att*2;
|
||||
return 10+att;
|
||||
});
|
||||
"step 1"
|
||||
var next=game.createEvent('new_juexiang',null,trigger.parent);
|
||||
next.player=trigger.source;
|
||||
next.playerx=player;
|
||||
if(result.bool) next.target=result.targets[0];
|
||||
next.setContent(lib.skill.new_juexiang.contentx);
|
||||
},
|
||||
contentx:function (){
|
||||
"step 0"
|
||||
if(player||target)event.playerx.logSkill('new_juexiang');
|
||||
if(player){
|
||||
player.discard(player.getCards('e'));
|
||||
player.loseHp();
|
||||
}
|
||||
if(target){
|
||||
event.playerx.line(target,'thunder');
|
||||
target.addSkill('new_canyun');
|
||||
target.discardPlayerCard('是否弃置自己区域内的一张梅花牌,获得技能〖绝响〗?',target,'hej').set('ai',function(card){
|
||||
if(get.position(card)=='j') return 100+get.value(card);
|
||||
return 100-get.value(card);
|
||||
}).set('visible',true).set('filterButton',function(card){
|
||||
return get.suit(card.link)=='club';
|
||||
});
|
||||
}
|
||||
else event.finish()
|
||||
"step 1"
|
||||
if(result.bool) target.addSkill('new_juexiang');
|
||||
},
|
||||
"step 0"
|
||||
if(player||target)event.playerx.logSkill('new_juexiang');
|
||||
if(player){
|
||||
player.discard(player.getCards('e'));
|
||||
player.loseHp();
|
||||
}
|
||||
if(target){
|
||||
event.playerx.line(target,'thunder');
|
||||
target.addSkill('new_canyun');
|
||||
target.discardPlayerCard('是否弃置自己区域内的一张梅花牌,获得技能〖绝响〗?',target,'hej').set('ai',function(card){
|
||||
if(get.position(card)=='j') return 100+get.value(card);
|
||||
return 100-get.value(card);
|
||||
}).set('visible',true).set('filterButton',function(card){
|
||||
return get.suit(card.link)=='club';
|
||||
});
|
||||
}
|
||||
else event.finish()
|
||||
"step 1"
|
||||
if(result.bool) target.addSkill('new_juexiang');
|
||||
},
|
||||
},
|
||||
"new_canyun":{
|
||||
group:["qingxian_draw"],
|
||||
|
@ -314,88 +314,88 @@ game.import('character',function(lib,game,ui,get,ai,_status){
|
|||
complexSelect:true,
|
||||
marktext:"韵",
|
||||
init:function (player,skill){
|
||||
if(!player.storage[skill]) player.storage[skill]=[];
|
||||
},
|
||||
if(!player.storage[skill]) player.storage[skill]=[];
|
||||
},
|
||||
intro:{
|
||||
content:function (storage){
|
||||
var str='';
|
||||
var str2='<li>出牌阶段限一次,你可以弃置至多X张牌并选择等量的其他角色(不能选择已经成为过〖残韵〗目标的角色)。这些角色中,装备区内牌数少于你的回复1点体力,等于你的摸一张牌,多于你的失去1点体力。若你以此法指定的角色数等于X,则你摸一张牌。(X为你的体力值)';
|
||||
if(storage.length>0){
|
||||
for(var i=0;i<storage.length;i++){
|
||||
str+='、';
|
||||
str+=get.translation(storage[i]);
|
||||
};
|
||||
str=str.slice(1);
|
||||
str2+=('<br><li>已对'+str+'发动过〖残韵〗');
|
||||
}
|
||||
return str2;
|
||||
},
|
||||
var str='';
|
||||
var str2='<li>出牌阶段限一次,你可以弃置至多X张牌并选择等量的其他角色(不能选择已经成为过〖残韵〗目标的角色)。这些角色中,装备区内牌数少于你的回复1点体力,等于你的摸一张牌,多于你的失去1点体力。若你以此法指定的角色数等于X,则你摸一张牌。(X为你的体力值)';
|
||||
if(storage.length>0){
|
||||
for(var i=0;i<storage.length;i++){
|
||||
str+='、';
|
||||
str+=get.translation(storage[i]);
|
||||
};
|
||||
str=str.slice(1);
|
||||
str2+=('<br><li>已对'+str+'发动过〖残韵〗');
|
||||
}
|
||||
return str2;
|
||||
},
|
||||
},
|
||||
mark:true,
|
||||
enable:"phaseUse",
|
||||
usable:1,
|
||||
check:function (cardx){
|
||||
var player=_status.event.player;
|
||||
var number=game.countPlayer(function(target){
|
||||
if(player==target) return false;
|
||||
var pe=player.countCards('e',function(card){
|
||||
return card!=cardx&&ui.selected.cards.contains(card)==false;
|
||||
});
|
||||
var te=target.countCards('e');
|
||||
if(pe>te&&target.isDamaged()&&get.attitude(player,target)>2) return true;
|
||||
else if(pe<te&&get.attitude(player,target)<0) return true;
|
||||
return false;
|
||||
});
|
||||
if(ui.selected.cards.length<number) return 6-get.value(cardx);
|
||||
else return 0;
|
||||
},
|
||||
var player=_status.event.player;
|
||||
var number=game.countPlayer(function(target){
|
||||
if(player==target) return false;
|
||||
var pe=player.countCards('e',function(card){
|
||||
return card!=cardx&&ui.selected.cards.contains(card)==false;
|
||||
});
|
||||
var te=target.countCards('e');
|
||||
if(pe>te&&target.isDamaged()&&get.attitude(player,target)>2) return true;
|
||||
else if(pe<te&&get.attitude(player,target)<0) return true;
|
||||
return false;
|
||||
});
|
||||
if(ui.selected.cards.length<number) return 6-get.value(cardx);
|
||||
else return 0;
|
||||
},
|
||||
filter:function (event,player){
|
||||
if(!player.storage.new_canyun) player.storage.new_canyun=[];
|
||||
return game.hasPlayer(function(current){
|
||||
return current!=player&&!player.storage.new_canyun.contains(current);
|
||||
});
|
||||
},
|
||||
if(!player.storage.new_canyun) player.storage.new_canyun=[];
|
||||
return game.hasPlayer(function(current){
|
||||
return current!=player&&!player.storage.new_canyun.contains(current);
|
||||
});
|
||||
},
|
||||
filterTarget:function (card,player,target){
|
||||
return target!=player&&!player.storage.new_canyun.contains(target);
|
||||
},
|
||||
return target!=player&&!player.storage.new_canyun.contains(target);
|
||||
},
|
||||
selectTarget:function (){
|
||||
return ui.selected.cards.length;
|
||||
},
|
||||
return ui.selected.cards.length;
|
||||
},
|
||||
filterCard:true,
|
||||
selectCard:function (){
|
||||
var player=_status.event.player;
|
||||
return [1,player.hp];
|
||||
},
|
||||
var player=_status.event.player;
|
||||
return [1,player.hp];
|
||||
},
|
||||
targetprompt:function (target){
|
||||
var pe=_status.event.player.countCards('e',function(card){
|
||||
return ui.selected.cards.contains(card)==false;
|
||||
});
|
||||
var te=target.countCards('e');
|
||||
if(pe>te) return "回复体力";
|
||||
else if(pe==te) return "摸一张牌";
|
||||
else if(pe<te) return "失去体力";
|
||||
},
|
||||
var pe=_status.event.player.countCards('e',function(card){
|
||||
return ui.selected.cards.contains(card)==false;
|
||||
});
|
||||
var te=target.countCards('e');
|
||||
if(pe>te) return "回复体力";
|
||||
else if(pe==te) return "摸一张牌";
|
||||
else if(pe<te) return "失去体力";
|
||||
},
|
||||
line:"thunder",
|
||||
position:"he",
|
||||
content:function (){
|
||||
player.storage.new_canyun.push(target);
|
||||
var pe=player.countCards('e');
|
||||
var te=target.countCards('e');
|
||||
if(pe>te) target.recover();
|
||||
else if(pe==te) target.draw();
|
||||
else if(pe<te) target.loseHp();
|
||||
},
|
||||
player.storage.new_canyun.push(target);
|
||||
var pe=player.countCards('e');
|
||||
var te=target.countCards('e');
|
||||
if(pe>te) target.recover();
|
||||
else if(pe==te) target.draw();
|
||||
else if(pe<te) target.loseHp();
|
||||
},
|
||||
ai:{
|
||||
order:10,
|
||||
result:{
|
||||
target:function (player,target){
|
||||
var pe=player.countCards('e');
|
||||
var te=target.countCards('e');
|
||||
if(pe>te&&target.isDamaged()) return 2;
|
||||
else if(pe==te) return 1;
|
||||
else if(pe<te) return -2.5;
|
||||
else return 0;
|
||||
},
|
||||
var pe=player.countCards('e');
|
||||
var te=target.countCards('e');
|
||||
if(pe>te&&target.isDamaged()) return 2;
|
||||
else if(pe==te) return 1;
|
||||
else if(pe<te) return -2.5;
|
||||
else return 0;
|
||||
},
|
||||
},
|
||||
},
|
||||
},
|
||||
|
@ -407,11 +407,11 @@ game.import('character',function(lib,game,ui,get,ai,_status){
|
|||
popup:false,
|
||||
silent:false,
|
||||
filter:function (event,player){
|
||||
return event.target==event.targets[event.targets.length-1]&&event.targets.length==player.hp;
|
||||
},
|
||||
return event.target==event.targets[event.targets.length-1]&&event.targets.length==player.hp;
|
||||
},
|
||||
content:function (){
|
||||
player.draw();
|
||||
},
|
||||
player.draw();
|
||||
},
|
||||
},
|
||||
zhenjun:{
|
||||
audio:"jieyue",
|
||||
|
@ -427,7 +427,7 @@ game.import('character',function(lib,game,ui,get,ai,_status){
|
|||
content:function (){
|
||||
'step 0'
|
||||
player.chooseTarget(get.prompt2('zhenjun'),function(card,player,target){
|
||||
return target.countCards('h')>target.hp;
|
||||
return target.countCards('h')>target.hp;
|
||||
}).ai=function(target){
|
||||
return -get.attitude(_status.event.player,target)*(target.countCards('e')+1);
|
||||
};
|
||||
|
@ -2427,7 +2427,7 @@ game.import('character',function(lib,game,ui,get,ai,_status){
|
|||
},
|
||||
chooseButton:{
|
||||
dialog:function(event,player){
|
||||
var list=[];
|
||||
var list=[];
|
||||
for(var i=0;i<lib.inpile.length;i++){
|
||||
var name=lib.inpile[i];
|
||||
if(player.storage.taoluan.contains(name)) continue;
|
||||
|
@ -3587,12 +3587,12 @@ game.import('character',function(lib,game,ui,get,ai,_status){
|
|||
ui.cardPile.insertBefore(cards[0],ui.cardPile.firstChild);
|
||||
game.updateRoundNumber();
|
||||
'step 2'
|
||||
target.chooseToDiscard(true).prompt='请弃置一张锦囊牌,或依次弃置两张非锦囊牌。';
|
||||
target.chooseToDiscard('he',true).prompt='请弃置一张锦囊牌,或依次弃置两张非锦囊牌。';
|
||||
'step 3'
|
||||
if((!result.cards||get.type(result.cards[0],'trick')!='trick')&&target.countCards('he',function(card){
|
||||
return get.type(card,'trick')!='trick';
|
||||
})){
|
||||
target.chooseToDiscard(true,function(card){
|
||||
target.chooseToDiscard('he',true,function(card){
|
||||
return get.type(card,'trick')!='trick';
|
||||
}).prompt='请弃置第二张非锦囊牌';
|
||||
}
|
||||
|
@ -7022,7 +7022,7 @@ game.import('character',function(lib,game,ui,get,ai,_status){
|
|||
skillAnimation:true,
|
||||
audio:3,
|
||||
unique:true,
|
||||
juexingji:true,
|
||||
juexingji:true,
|
||||
trigger:{player:'phaseBegin'},
|
||||
forced:true,
|
||||
filter:function(event,player){
|
||||
|
@ -7374,15 +7374,15 @@ game.import('character',function(lib,game,ui,get,ai,_status){
|
|||
direct:true,
|
||||
skillAnimation:true,
|
||||
content:function(){
|
||||
var next=game.createEvent('zhuiyi',null,trigger.parent);
|
||||
next.forceDie=true;
|
||||
next.player=player;
|
||||
if(trigger.source) next.source=trigger.source;
|
||||
next.setContent(lib.skill.zhuiyi.contentx);
|
||||
var next=game.createEvent('zhuiyi',null,trigger.parent);
|
||||
next.forceDie=true;
|
||||
next.player=player;
|
||||
if(trigger.source) next.source=trigger.source;
|
||||
next.setContent(lib.skill.zhuiyi.contentx);
|
||||
},
|
||||
contentx:function(){
|
||||
"step 0"
|
||||
player.chooseTarget(get.prompt2('zhuiyi'),function(card,player,target){
|
||||
"step 0"
|
||||
player.chooseTarget(get.prompt2('zhuiyi'),function(card,player,target){
|
||||
return player!=target&&_status.event.source!=target;
|
||||
}).set('forceDie',true).set('ai',function(target){
|
||||
var num=get.attitude(_status.event.player,target);
|
||||
|
@ -7398,9 +7398,9 @@ game.import('character',function(lib,game,ui,get,ai,_status){
|
|||
}).set('source',event.source);
|
||||
"step 1"
|
||||
if(result.bool){
|
||||
var target=result.targets[0];
|
||||
player.logSkill('zhuiyi',target);
|
||||
player.line(target,'green');
|
||||
var target=result.targets[0];
|
||||
player.logSkill('zhuiyi',target);
|
||||
player.line(target,'green');
|
||||
target.recover();
|
||||
target.draw(3);
|
||||
}
|
||||
|
@ -9111,7 +9111,7 @@ game.import('character',function(lib,game,ui,get,ai,_status){
|
|||
"step 0"
|
||||
var next=player.chooseCard(get.prompt('yuce'));
|
||||
next.set('ai',function(card){
|
||||
if(get.type(card)=='basic') return 1;
|
||||
if(get.type(card)=='basic') return 1;
|
||||
return get.value(card);
|
||||
});
|
||||
"step 1"
|
||||
|
|
300
game/game.js
300
game/game.js
|
@ -4505,14 +4505,14 @@
|
|||
intro:'第一个明置武将牌的角色可获得首亮奖励'
|
||||
},
|
||||
connect_aozhan:{
|
||||
name:'鏖战模式',
|
||||
init:true,
|
||||
intro:'若开启此选项,则将在游戏中引入“鏖战模式”的规则:<br>当游戏中仅剩四名或更少角色时(七人以下游戏时改为三名或更少),若此时全场没有超过一名势力相同的角色,则从一个新的回合开始,游戏进入鏖战模式直至游戏结束。<br>◇在鏖战模式下,【桃】只能当做【杀】或【闪】使用或打出,不能用来回复体力。<br>注:进入鏖战模式后,即使之后有两名或者更多势力相同的角色出现,仍然不会取消鏖战模式。',
|
||||
name:'鏖战模式',
|
||||
init:true,
|
||||
intro:'若开启此选项,则将在游戏中引入“鏖战模式”的规则:<br>当游戏中仅剩四名或更少角色时(七人以下游戏时改为三名或更少),若此时全场没有超过一名势力相同的角色,则从一个新的回合开始,游戏进入鏖战模式直至游戏结束。<br>◇在鏖战模式下,【桃】只能当做【杀】或【闪】使用或打出,不能用来回复体力。<br>注:进入鏖战模式后,即使之后有两名或者更多势力相同的角色出现,仍然不会取消鏖战模式。',
|
||||
},
|
||||
connect_viewnext:{
|
||||
name:'观看下家副将',
|
||||
init:false,
|
||||
intro:'若开启此选项,所有的玩家将在挑选武将后,分发起始手牌之前,分别观看自己下家的副将。',
|
||||
name:'观看下家副将',
|
||||
init:false,
|
||||
intro:'若开启此选项,所有的玩家将在挑选武将后,分发起始手牌之前,分别观看自己下家的副将。',
|
||||
},
|
||||
connect_zhulian:{
|
||||
name:'珠联璧合',
|
||||
|
@ -4595,27 +4595,27 @@
|
|||
intro:'第一个明置身份牌的角色可获得摸牌奖励'
|
||||
},
|
||||
aozhan:{
|
||||
name:'鏖战模式',
|
||||
init:true,
|
||||
intro:'若开启此选项,则将在游戏中引入“鏖战模式”的规则:<br>当游戏中仅剩四名或更少角色时(七人以下游戏时改为三名或更少),若此时全场没有超过一名势力相同的角色,则从一个新的回合开始,游戏进入鏖战模式直至游戏结束。<br>◇在鏖战模式下,【桃】只能当做【杀】或【闪】使用或打出,不能用来回复体力。<br>注:进入鏖战模式后,即使之后有两名或者更多势力相同的角色出现,仍然不会取消鏖战模式。',
|
||||
name:'鏖战模式',
|
||||
init:true,
|
||||
intro:'若开启此选项,则将在游戏中引入“鏖战模式”的规则:<br>当游戏中仅剩四名或更少角色时(七人以下游戏时改为三名或更少),若此时全场没有超过一名势力相同的角色,则从一个新的回合开始,游戏进入鏖战模式直至游戏结束。<br>◇在鏖战模式下,【桃】只能当做【杀】或【闪】使用或打出,不能用来回复体力。<br>注:进入鏖战模式后,即使之后有两名或者更多势力相同的角色出现,仍然不会取消鏖战模式。',
|
||||
},
|
||||
viewnext:{
|
||||
name:'观看下家副将',
|
||||
init:false,
|
||||
intro:'若开启此选项,所有的玩家将在挑选武将后,分发起始手牌之前,分别观看自己下家的副将。',
|
||||
name:'观看下家副将',
|
||||
init:false,
|
||||
intro:'若开启此选项,所有的玩家将在挑选武将后,分发起始手牌之前,分别观看自己下家的副将。',
|
||||
},
|
||||
aozhan_bgm:{
|
||||
name:'鏖战背景音乐',
|
||||
item:{
|
||||
disabled:'不启用',
|
||||
online:'Online',
|
||||
chaoming:'潮鸣',
|
||||
},
|
||||
init:'chaoming',
|
||||
onclick:function(item){
|
||||
game.saveConfig('aozhan_bgm',item,this._link.config.mode);
|
||||
if(_status._aozhan==true) game.playBackgroundMusic();
|
||||
},
|
||||
name:'鏖战背景音乐',
|
||||
item:{
|
||||
disabled:'不启用',
|
||||
online:'Online',
|
||||
chaoming:'潮鸣',
|
||||
},
|
||||
init:'chaoming',
|
||||
onclick:function(item){
|
||||
game.saveConfig('aozhan_bgm',item,this._link.config.mode);
|
||||
if(_status._aozhan==true) game.playBackgroundMusic();
|
||||
},
|
||||
},
|
||||
zhulian:{
|
||||
name:'珠联璧合',
|
||||
|
@ -9481,59 +9481,59 @@
|
|||
}
|
||||
},
|
||||
chooseToEnable:function(){
|
||||
'step 0'
|
||||
var list=[];
|
||||
for(var i=1;i<6;i++){
|
||||
if(!player.isDisabled(i)) continue;
|
||||
list.push('equip'+i);
|
||||
}
|
||||
if(!list.length) event.finish();
|
||||
else{
|
||||
event.list=list;
|
||||
var next=player.chooseControl(list);
|
||||
next.prompt='请选择恢复一个装备栏';
|
||||
if(!event.ai) event.ai=function(event,player,list){
|
||||
return list.randomGet();
|
||||
}
|
||||
event.ai=event.ai(event.getParent(),player,list);
|
||||
next.ai=function(){
|
||||
return event.ai;
|
||||
};
|
||||
}
|
||||
'step 1'
|
||||
event.result={control:result.control};
|
||||
player.enableEquip(result.control);
|
||||
},
|
||||
chooseToDisable:function(){
|
||||
'step 0'
|
||||
var list=[];
|
||||
for(var i=1;i<7;i++){
|
||||
if((i==3||i==4)&&event.horse) continue;
|
||||
if(i==6&&!event.horse) continue;
|
||||
if(player.isDisabled(i)) continue;
|
||||
list.push('equip'+i);
|
||||
}
|
||||
if(!list.length) event.finish();
|
||||
else{
|
||||
event.list=list;
|
||||
var next=player.chooseControl(list);
|
||||
next.prompt='请选择废除一个装备栏';
|
||||
if(!event.ai) event.ai=function(event,player,list){
|
||||
return list.randomGet();
|
||||
}
|
||||
event.ai=event.ai(event.getParent(),player,list);
|
||||
next.ai=function(){
|
||||
return event.ai;
|
||||
};
|
||||
}
|
||||
'step 1'
|
||||
event.result={control:result.control};
|
||||
if(result.control=='equip6'){
|
||||
player.disableEquip(3);
|
||||
player.disableEquip(4);
|
||||
}
|
||||
else player.disableEquip(result.control);
|
||||
},
|
||||
'step 0'
|
||||
var list=[];
|
||||
for(var i=1;i<6;i++){
|
||||
if(!player.isDisabled(i)) continue;
|
||||
list.push('equip'+i);
|
||||
}
|
||||
if(!list.length) event.finish();
|
||||
else{
|
||||
event.list=list;
|
||||
var next=player.chooseControl(list);
|
||||
next.prompt='请选择恢复一个装备栏';
|
||||
if(!event.ai) event.ai=function(event,player,list){
|
||||
return list.randomGet();
|
||||
}
|
||||
event.ai=event.ai(event.getParent(),player,list);
|
||||
next.ai=function(){
|
||||
return event.ai;
|
||||
};
|
||||
}
|
||||
'step 1'
|
||||
event.result={control:result.control};
|
||||
player.enableEquip(result.control);
|
||||
},
|
||||
chooseToDisable:function(){
|
||||
'step 0'
|
||||
var list=[];
|
||||
for(var i=1;i<7;i++){
|
||||
if((i==3||i==4)&&event.horse) continue;
|
||||
if(i==6&&!event.horse) continue;
|
||||
if(player.isDisabled(i)) continue;
|
||||
list.push('equip'+i);
|
||||
}
|
||||
if(!list.length) event.finish();
|
||||
else{
|
||||
event.list=list;
|
||||
var next=player.chooseControl(list);
|
||||
next.prompt='请选择废除一个装备栏';
|
||||
if(!event.ai) event.ai=function(event,player,list){
|
||||
return list.randomGet();
|
||||
}
|
||||
event.ai=event.ai(event.getParent(),player,list);
|
||||
next.ai=function(){
|
||||
return event.ai;
|
||||
};
|
||||
}
|
||||
'step 1'
|
||||
event.result={control:result.control};
|
||||
if(result.control=='equip6'){
|
||||
player.disableEquip(3);
|
||||
player.disableEquip(4);
|
||||
}
|
||||
else player.disableEquip(result.control);
|
||||
},
|
||||
swapEquip:function(){
|
||||
"step 0"
|
||||
game.log(player,'和',target,'交换了装备区中的牌')
|
||||
|
@ -9557,7 +9557,7 @@
|
|||
if(event.cards[1].length) target.$give(event.cards[1],player);
|
||||
"step 2"
|
||||
for(var i=0;i<event.cards[1].length;i++){
|
||||
player.equip(event.cards[1][i]);
|
||||
player.equip(event.cards[1][i]);
|
||||
}
|
||||
for(var i=0;i<event.cards[0].length;i++){
|
||||
target.equip(event.cards[0][i]);
|
||||
|
@ -9570,8 +9570,8 @@
|
|||
//player.markSkill('_disableEquip');
|
||||
player.syncStorage('_disableEquip');
|
||||
if(player.getEquip(event.pos)) player.discard(player.getEquip(event.pos)).delay=false;
|
||||
game.log(player,'废除了',get.translation(event.pos),'栏');
|
||||
player.$disableEquip(event.pos);
|
||||
game.log(player,'废除了',get.translation(event.pos),'栏');
|
||||
player.$disableEquip(event.pos);
|
||||
}
|
||||
},
|
||||
enableEquip:function(){
|
||||
|
@ -10039,9 +10039,9 @@
|
|||
return lib.filter.filterTrigger(trigger,info[1],event.triggername,info[0]);
|
||||
}
|
||||
event.filter2=function(info2){
|
||||
var info=lib.skill[info2[0]];
|
||||
if(!lib.translate[info2[0]]||info2[0].indexOf('_')==0||info.popup===false||info.silent) return false;
|
||||
return true;
|
||||
var info=lib.skill[info2[0]];
|
||||
if(!lib.translate[info2[0]]||info2[0].indexOf('_')==0||info.popup===false||info.silent) return false;
|
||||
return true;
|
||||
}
|
||||
event.filter3=function(info,info2){
|
||||
return event.filter2(info2)&&event.filter1(info2)&&info2[1]==info[1]&&info[2]==info2[2]&&info[1].hasSkill(info2[0],true);
|
||||
|
@ -14666,10 +14666,10 @@
|
|||
},
|
||||
isEmpty:function(num){
|
||||
if(num==6||num=='equip6'){
|
||||
if(!this.isEmpty(3)||!this.isEmpty(4)) return false;
|
||||
if(!this.isEmpty(3)||!this.isEmpty(4)) return false;
|
||||
}
|
||||
else if([3,4,'equip3','equip4'].contains(num)){
|
||||
if(this.getEquip(6)) return false;
|
||||
if(this.getEquip(6)) return false;
|
||||
}
|
||||
return !this.isDisabled(num)&&!this.getEquip(num);
|
||||
},
|
||||
|
@ -17401,7 +17401,7 @@
|
|||
next.log=true;
|
||||
}
|
||||
else if(arguments[i]=='fromStorage'){
|
||||
next.fromStorage=true;
|
||||
next.fromStorage=true;
|
||||
}
|
||||
else if(typeof arguments[i]=='string'){
|
||||
next.animate=arguments[i];
|
||||
|
@ -17458,7 +17458,7 @@
|
|||
next.position=arguments[i];
|
||||
}
|
||||
else if(arguments[i]=='toStorage'){
|
||||
next.toStorage=true;
|
||||
next.toStorage=true;
|
||||
}
|
||||
}
|
||||
if(next.cards){
|
||||
|
@ -22042,32 +22042,32 @@
|
|||
return this.getParent().name!='_lianhuan'&&this.getParent().name!='_lianhuan2';
|
||||
},
|
||||
addTrigger:function(skill,player){
|
||||
if(!player) return;
|
||||
var evt=this.getParent('arrangeTrigger');
|
||||
if(!evt||evt.name!='arrangeTrigger'||!evt.list) return;
|
||||
if(typeof skill=='string') skill=[skill];
|
||||
game.expandSkills(skill);
|
||||
var filter=function(content){
|
||||
if(typeof content=='string') return content==triggername;
|
||||
return content.contains(triggername);
|
||||
};
|
||||
var trigger=evt._trigger;
|
||||
var triggername=evt.triggername;
|
||||
var func=function(skillx){
|
||||
var info=lib.skill[skillx];
|
||||
var bool=false;
|
||||
for(var i in info.trigger){
|
||||
if(i!='global'&&trigger[i]!=player) continue;
|
||||
if(filter(info.trigger[i])){bool=true;break}
|
||||
}
|
||||
if(!bool) return;
|
||||
if(!player) return;
|
||||
var evt=this.getParent('arrangeTrigger');
|
||||
if(!evt||evt.name!='arrangeTrigger'||!evt.list) return;
|
||||
if(typeof skill=='string') skill=[skill];
|
||||
game.expandSkills(skill);
|
||||
var filter=function(content){
|
||||
if(typeof content=='string') return content==triggername;
|
||||
return content.contains(triggername);
|
||||
};
|
||||
var trigger=evt._trigger;
|
||||
var triggername=evt.triggername;
|
||||
var func=function(skillx){
|
||||
var info=lib.skill[skillx];
|
||||
var bool=false;
|
||||
for(var i in info.trigger){
|
||||
if(i!='global'&&trigger[i]!=player) continue;
|
||||
if(filter(info.trigger[i])){bool=true;break}
|
||||
}
|
||||
if(!bool) return;
|
||||
var priority=0;
|
||||
if(info.priority){
|
||||
priority=info.priority*100;
|
||||
}
|
||||
if(!lib.translate[skillx]||skillx.indexOf('_')==0||info.popup===false||info.silent){
|
||||
if(info.priority){
|
||||
priority=info.priority*100;
|
||||
}
|
||||
if(!lib.translate[skillx]||skillx.indexOf('_')==0||info.popup===false||info.silent){
|
||||
priority++;
|
||||
}
|
||||
}
|
||||
var toadd=[skillx,player,priority];
|
||||
if(evt.used){
|
||||
for(var i=0;i<evt.used.length;i++){
|
||||
|
@ -23602,7 +23602,7 @@
|
|||
if(!trigger.notLink()) event.finish();
|
||||
"step 1"
|
||||
event.targets=game.filterPlayer(function(current){
|
||||
return current!=event.player&¤t.isLinked();
|
||||
return current!=event.player&¤t.isLinked();
|
||||
});
|
||||
lib.tempSortSeat=_status.currentPhase||player;
|
||||
event.targets.sort(lib.sort.seat);
|
||||
|
@ -23612,9 +23612,9 @@
|
|||
else event._args.push("nosource");
|
||||
"step 2"
|
||||
if(event.targets.length){
|
||||
var target=event.targets.shift();
|
||||
target.damage.apply(target,event._args.slice(0));
|
||||
event.redo();
|
||||
var target=event.targets.shift();
|
||||
target.damage.apply(target,event._args.slice(0));
|
||||
event.redo();
|
||||
}
|
||||
},
|
||||
},
|
||||
|
@ -23635,7 +23635,7 @@
|
|||
if(!trigger.notLink()) event.finish();
|
||||
"step 1"
|
||||
event.targets=game.filterPlayer(function(current){
|
||||
return current.isLinked();
|
||||
return current.isLinked();
|
||||
});
|
||||
lib.tempSortSeat=_status.currentPhase||trigger.player;
|
||||
event.targets.sort(lib.sort.seat);
|
||||
|
@ -23645,9 +23645,9 @@
|
|||
else event._args.push("nosource");
|
||||
"step 2"
|
||||
if(event.targets.length){
|
||||
var target=event.targets.shift();
|
||||
target.damage.apply(target,event._args.slice(0));
|
||||
event.redo();
|
||||
var target=event.targets.shift();
|
||||
target.damage.apply(target,event._args.slice(0));
|
||||
event.redo();
|
||||
}
|
||||
}
|
||||
},
|
||||
|
@ -25294,8 +25294,8 @@
|
|||
ui.backgroundMusic.src='';
|
||||
}
|
||||
else if(get.mode()=='guozhan'&&_status._aozhan==true&&lib.config.mode_config.guozhan.aozhan_bgm!='disabled'){
|
||||
var aozhan=lib.config.mode_config.guozhan.aozhan_bgm;
|
||||
ui.backgroundMusic.src=lib.assetURL+'audio/background/aozhan_'+aozhan+'.mp3';
|
||||
var aozhan=lib.config.mode_config.guozhan.aozhan_bgm;
|
||||
ui.backgroundMusic.src=lib.assetURL+'audio/background/aozhan_'+aozhan+'.mp3';
|
||||
}
|
||||
else{
|
||||
var music=lib.config.background_music;
|
||||
|
@ -30318,9 +30318,9 @@
|
|||
});
|
||||
},
|
||||
updateRoundNumber:function(){
|
||||
game.broadcastAll(function(num1,num2){
|
||||
if(ui.cardPileNumber) ui.cardPileNumber.innerHTML=num1+'轮 剩余牌: '+num2;
|
||||
},game.roundNumber,ui.cardPile.childNodes.length);
|
||||
game.broadcastAll(function(num1,num2){
|
||||
if(ui.cardPileNumber) ui.cardPileNumber.innerHTML=num1+'轮 剩余牌: '+num2;
|
||||
},game.roundNumber,ui.cardPile.childNodes.length);
|
||||
},
|
||||
asyncDraw:function(players,num,drawDeck,bottom){
|
||||
for(var i=0;i<players.length;i++){
|
||||
|
@ -30338,8 +30338,8 @@
|
|||
players[i].draw(num2,false,drawDeck);
|
||||
}
|
||||
else{
|
||||
if(bottom) players[i].draw(num2,'nodelay','bottom');
|
||||
else players[i].draw(num2,'nodelay');
|
||||
if(bottom) players[i].draw(num2,'nodelay','bottom');
|
||||
else players[i].draw(num2,'nodelay');
|
||||
}
|
||||
}
|
||||
},
|
||||
|
@ -41077,7 +41077,7 @@
|
|||
}
|
||||
lib.inpile.sort(lib.sort.card);
|
||||
game.broadcastAll(function(num){
|
||||
if(ui.cardPileNumber) ui.cardPileNumber.innerHTML='0轮 剩余牌: '+num;
|
||||
if(ui.cardPileNumber) ui.cardPileNumber.innerHTML='0轮 剩余牌: '+num;
|
||||
},ui.cardPile.childNodes.length);
|
||||
},
|
||||
},
|
||||
|
@ -42531,7 +42531,7 @@
|
|||
},500);
|
||||
}
|
||||
else if(_status._swipeorigin&&!_status.paused2&&!_status.mousedragging&&_status._swipeorigin.touches&&!_status.filterCharacter){
|
||||
if(get.utc()-_status._swipeorigin.time<500){
|
||||
if(get.utc()-_status._swipeorigin.time<500){
|
||||
var dx=_status._swipeorigin.touches.clientX/game.documentZoom-_status._swipeorigin.clientX/game.documentZoom;
|
||||
var dy=_status._swipeorigin.touches.clientY/game.documentZoom-_status._swipeorigin.clientY/game.documentZoom;
|
||||
var goswipe=function(action){
|
||||
|
@ -42573,17 +42573,17 @@
|
|||
}
|
||||
else if(dy>200){
|
||||
goswipe(lib.config.swipe_down);
|
||||
}
|
||||
}
|
||||
else if(Math.abs(dy)<100){
|
||||
if(dx<-200){
|
||||
}
|
||||
}
|
||||
else if(Math.abs(dy)<100){
|
||||
if(dx<-200){
|
||||
goswipe(lib.config.swipe_left);
|
||||
}
|
||||
else if(dx>200){
|
||||
goswipe(lib.config.swipe_right);
|
||||
}
|
||||
}
|
||||
}
|
||||
}
|
||||
}
|
||||
}
|
||||
}
|
||||
var tmpflag=false;
|
||||
_status.mousedown=false;
|
||||
|
@ -43900,14 +43900,14 @@
|
|||
else{
|
||||
delete lib.config.skin[nameskin];
|
||||
if(gzbool&&lib.character[nameskin2][4].contains('gzskin')&&lib.config.mode_config.guozhan.guozhanSkin){
|
||||
bg.setBackground(nameskin2,'character');
|
||||
if(sourcenode) sourcenode.setBackground(nameskin2,'character');
|
||||
if(avatar) avatar.setBackground(nameskin2,'character');
|
||||
bg.setBackground(nameskin2,'character');
|
||||
if(sourcenode) sourcenode.setBackground(nameskin2,'character');
|
||||
if(avatar) avatar.setBackground(nameskin2,'character');
|
||||
}
|
||||
else{
|
||||
bg.setBackground(nameskin,'character');
|
||||
if(sourcenode) sourcenode.setBackground(nameskin,'character');
|
||||
if(avatar) avatar.setBackground(nameskin,'character');
|
||||
bg.setBackground(nameskin,'character');
|
||||
if(sourcenode) sourcenode.setBackground(nameskin,'character');
|
||||
if(avatar) avatar.setBackground(nameskin,'character');
|
||||
}
|
||||
game.saveConfig('skin',lib.config.skin);
|
||||
}
|
||||
|
@ -45049,18 +45049,18 @@
|
|||
};
|
||||
var get={
|
||||
infoHp:function(hp){
|
||||
if(typeof hp=='number') return hp;
|
||||
else if(typeof hp=='string'&&hp.indexOf('/')!=-1){
|
||||
return parseInt(hp.slice(0,hp.indexOf('/')));
|
||||
}
|
||||
return 0;
|
||||
if(typeof hp=='number') return hp;
|
||||
else if(typeof hp=='string'&&hp.indexOf('/')!=-1){
|
||||
return parseInt(hp.slice(0,hp.indexOf('/')));
|
||||
}
|
||||
return 0;
|
||||
},
|
||||
infoMaxHp:function(hp){
|
||||
if(typeof hp=='number') return hp;
|
||||
else if(typeof hp=='string'&&hp.indexOf('/')!=-1){
|
||||
return parseInt(hp.slice(hp.indexOf('/')+1));
|
||||
}
|
||||
return 0;
|
||||
if(typeof hp=='number') return hp;
|
||||
else if(typeof hp=='string'&&hp.indexOf('/')!=-1){
|
||||
return parseInt(hp.slice(hp.indexOf('/')+1));
|
||||
}
|
||||
return 0;
|
||||
},
|
||||
is:{
|
||||
converted:function(event){
|
||||
|
|
|
@ -1,24 +1,25 @@
|
|||
window.noname_update={
|
||||
version:'1.9.92.1',
|
||||
update:'1.9.92',
|
||||
version:'1.9.92.1.1',
|
||||
update:'1.9.92.1',
|
||||
changeLog:[
|
||||
'新增武将张菖蒲,许贡,忙牙长',
|
||||
'添加武将小包分包和批量AI禁选',
|
||||
'代码缩进对齐',
|
||||
'BUG修复',
|
||||
'players://["zhangchangpu","xugong","mangyachang"]',
|
||||
],
|
||||
files:[
|
||||
'card/extra.js',
|
||||
'card/guozhan.js',
|
||||
'card/standard.js',
|
||||
'character/diy.js',
|
||||
'character/extra.js',
|
||||
'character/mobile.js',
|
||||
'character/old.js',
|
||||
//'character/old.js',
|
||||
'character/refresh.js',
|
||||
'character/shenhua.js',
|
||||
'character/sp.js',
|
||||
'character/standard.js',
|
||||
'character/xinghuoliaoyuan.js',
|
||||
'character/yijiang.js',
|
||||
'mode/boss.js',
|
||||
'mode/doudizhu.js',
|
||||
'mode/identity.js',
|
||||
'mode/guozhan.js',
|
||||
'game/game.js',
|
||||
]
|
||||
|
|
402
mode/boss.js
402
mode/boss.js
|
@ -1956,8 +1956,8 @@ game.import('mode',function(lib,game,ui,get,ai,_status){
|
|||
wuqi:{
|
||||
mod:{
|
||||
cardUsable:function(card,player,num){
|
||||
if(player.getEquip(1)&&card.name=='sha') return num+1;
|
||||
},
|
||||
if(player.getEquip(1)&&card.name=='sha') return num+1;
|
||||
},
|
||||
},
|
||||
sub:true,
|
||||
},
|
||||
|
@ -1966,12 +1966,12 @@ game.import('mode',function(lib,game,ui,get,ai,_status){
|
|||
player:"damageBegin",
|
||||
},
|
||||
forced:true,
|
||||
filter:function (event,player){
|
||||
return player.getEquip(2)&&event.num>1;
|
||||
},
|
||||
content:function (){
|
||||
trigger.num=1;
|
||||
},
|
||||
filter:function (event,player){
|
||||
return player.getEquip(2)&&event.num>1;
|
||||
},
|
||||
content:function (){
|
||||
trigger.num=1;
|
||||
},
|
||||
sub:true,
|
||||
},
|
||||
zuoji:{
|
||||
|
@ -1979,12 +1979,12 @@ game.import('mode',function(lib,game,ui,get,ai,_status){
|
|||
player:"phaseDrawBegin",
|
||||
},
|
||||
forced:true,
|
||||
filter:function (event,player){
|
||||
return (player.getEquip(3)||player.getEquip(4));
|
||||
},
|
||||
filter:function (event,player){
|
||||
return (player.getEquip(3)||player.getEquip(4));
|
||||
},
|
||||
content:function(){
|
||||
trigger.num++;
|
||||
},
|
||||
trigger.num++;
|
||||
},
|
||||
sub:true,
|
||||
},
|
||||
baowu:{
|
||||
|
@ -1993,12 +1993,12 @@ game.import('mode',function(lib,game,ui,get,ai,_status){
|
|||
},
|
||||
forced:true,
|
||||
filter:function (event,player){
|
||||
return player.getEquip(5);
|
||||
},
|
||||
return player.getEquip(5);
|
||||
},
|
||||
content:function (){
|
||||
trigger.cancel();
|
||||
game.log(player,'跳过了判定阶段');
|
||||
},
|
||||
trigger.cancel();
|
||||
game.log(player,'跳过了判定阶段');
|
||||
},
|
||||
sub:true,
|
||||
},
|
||||
},
|
||||
|
@ -2009,55 +2009,55 @@ game.import('mode',function(lib,game,ui,get,ai,_status){
|
|||
},
|
||||
direct:true,
|
||||
content:function(){
|
||||
"step 0"
|
||||
player.chooseTarget(get.prompt('shufazijinguan'),function(card,player,target){
|
||||
return player!=target;
|
||||
}).ai=function(target){
|
||||
return get.damageEffect(target,player,player);
|
||||
}
|
||||
"step 1"
|
||||
if(result.bool){
|
||||
player.line(result.targets,'white');
|
||||
result.targets[0].damage();
|
||||
}
|
||||
},
|
||||
"step 0"
|
||||
player.chooseTarget(get.prompt('shufazijinguan'),function(card,player,target){
|
||||
return player!=target;
|
||||
}).ai=function(target){
|
||||
return get.damageEffect(target,player,player);
|
||||
}
|
||||
"step 1"
|
||||
if(result.bool){
|
||||
player.line(result.targets,'white');
|
||||
result.targets[0].damage();
|
||||
}
|
||||
},
|
||||
},
|
||||
"linglongshimandai_skill":{
|
||||
trigger:{
|
||||
global:["useCard"],
|
||||
},
|
||||
filter:function(event,player){
|
||||
if(event.targets&&event.targets.length>1) return false;
|
||||
var evt=event.getParent();
|
||||
if(evt.player&&evt.player.hasSkillTag('unequip',false,{
|
||||
name:evt.card?evt.card.name:null,
|
||||
target:player,
|
||||
card:evt.card
|
||||
})) return false;
|
||||
return event.targets.contains(player)&&event.player!=player;
|
||||
},
|
||||
audio:"ext:新虎牢关:true",
|
||||
if(event.targets&&event.targets.length>1) return false;
|
||||
var evt=event.getParent();
|
||||
if(evt.player&&evt.player.hasSkillTag('unequip',false,{
|
||||
name:evt.card?evt.card.name:null,
|
||||
target:player,
|
||||
card:evt.card
|
||||
})) return false;
|
||||
return event.targets.contains(player)&&event.player!=player;
|
||||
},
|
||||
audio:true,
|
||||
check:function(event,player){
|
||||
if(get.attitude(player,event.player)>2) return false;
|
||||
return true;
|
||||
},
|
||||
if(get.attitude(player,event.player)>2) return false;
|
||||
return true;
|
||||
},
|
||||
content:function(){
|
||||
"step 0"
|
||||
player.judge('linglongshimandai',function(card){return (get.suit(card)=='heart')?1.5:-0.5});
|
||||
"step 1"
|
||||
if(result.judge>0){
|
||||
trigger.cancel();
|
||||
}
|
||||
},
|
||||
"step 0"
|
||||
player.judge('linglongshimandai',function(card){return (get.suit(card)=='heart')?1.5:-0.5});
|
||||
"step 1"
|
||||
if(result.judge>0){
|
||||
trigger.cancel();
|
||||
}
|
||||
},
|
||||
ai:{
|
||||
effect:{
|
||||
target:function(card,player,target,effect){
|
||||
if(player.hasSkillTag('unequip',false,{
|
||||
name:card?card.name:null,
|
||||
target:player,
|
||||
card:card
|
||||
})) return;
|
||||
},
|
||||
if(player.hasSkillTag('unequip',false,{
|
||||
name:card?card.name:null,
|
||||
target:player,
|
||||
card:card
|
||||
})) return;
|
||||
},
|
||||
},
|
||||
},
|
||||
},
|
||||
|
@ -2066,29 +2066,29 @@ game.import('mode',function(lib,game,ui,get,ai,_status){
|
|||
player:"damageBefore",
|
||||
},
|
||||
filter:function(event,player){
|
||||
if(event.source&&event.source.hasSkillTag('unequip',false,{
|
||||
name:event.card?event.card.name:null,
|
||||
target:player,
|
||||
card:event.card
|
||||
})) return;
|
||||
if(event.nature) return true;
|
||||
},
|
||||
if(event.source&&event.source.hasSkillTag('unequip',false,{
|
||||
name:event.card?event.card.name:null,
|
||||
target:player,
|
||||
card:event.card
|
||||
})) return;
|
||||
if(event.nature) return true;
|
||||
},
|
||||
forced:true,
|
||||
content:function(){
|
||||
trigger.cancel();
|
||||
},
|
||||
trigger.cancel();
|
||||
},
|
||||
ai:{
|
||||
nofire:true,
|
||||
nothunder:true,
|
||||
effect:{
|
||||
target:function(card,player,target,current){
|
||||
if(player.hasSkillTag('unequip',false,{
|
||||
name:card?card.name:null,
|
||||
target:player,
|
||||
card:card
|
||||
})) return;
|
||||
if(get.tag(card,'natureDamage')) return 'zerotarget';
|
||||
},
|
||||
if(player.hasSkillTag('unequip',false,{
|
||||
name:card?card.name:null,
|
||||
target:player,
|
||||
card:card
|
||||
})) return;
|
||||
if(get.tag(card,'natureDamage')) return 'zerotarget';
|
||||
},
|
||||
},
|
||||
},
|
||||
},
|
||||
|
@ -2097,41 +2097,41 @@ game.import('mode',function(lib,game,ui,get,ai,_status){
|
|||
source:"damageAfter",
|
||||
},
|
||||
filter:function(event,player){
|
||||
return event.card&&event.card.name=='sha';
|
||||
},
|
||||
return event.card&&event.card.name=='sha';
|
||||
},
|
||||
check:function(event,player){
|
||||
return true;
|
||||
},
|
||||
return true;
|
||||
},
|
||||
content:function(){
|
||||
'step 0'
|
||||
player.line(trigger.player,'white');
|
||||
if(!trigger.player.countCards('he')){
|
||||
event.goto(1);
|
||||
}else{
|
||||
event.goto(2);
|
||||
}
|
||||
'step 1'
|
||||
player.draw();
|
||||
event.finish();
|
||||
'step 2'
|
||||
player.chooseControl('摸一张牌','弃置其一张牌',function(event,player){
|
||||
if(get.attitude(player,trigger.player)>2) return '摸一张牌';
|
||||
return '弃置其一张牌';
|
||||
});
|
||||
'step 3'
|
||||
if(result.control=='摸一张牌'){
|
||||
player.draw();
|
||||
event.finish();
|
||||
}
|
||||
else{
|
||||
player.discardPlayerCard(trigger.player,'he',true);
|
||||
event.finish();
|
||||
}
|
||||
},
|
||||
'step 0'
|
||||
player.line(trigger.player,'white');
|
||||
if(!trigger.player.countCards('he')){
|
||||
event.goto(1);
|
||||
}else{
|
||||
event.goto(2);
|
||||
}
|
||||
'step 1'
|
||||
player.draw();
|
||||
event.finish();
|
||||
'step 2'
|
||||
player.chooseControl('摸一张牌','弃置其一张牌',function(event,player){
|
||||
if(get.attitude(player,trigger.player)>2) return '摸一张牌';
|
||||
return '弃置其一张牌';
|
||||
});
|
||||
'step 3'
|
||||
if(result.control=='摸一张牌'){
|
||||
player.draw();
|
||||
event.finish();
|
||||
}
|
||||
else{
|
||||
player.discardPlayerCard(trigger.player,'he',true);
|
||||
event.finish();
|
||||
}
|
||||
},
|
||||
},
|
||||
|
||||
boss_yaoshou:{
|
||||
mod:{
|
||||
mod:{
|
||||
globalFrom:function(from,to,distance){
|
||||
return distance-2;
|
||||
},
|
||||
|
@ -2152,17 +2152,17 @@ game.import('mode',function(lib,game,ui,get,ai,_status){
|
|||
global:'boss_shedu',
|
||||
mod:{
|
||||
cardEnabled:function (card,player){
|
||||
if(_status.event.skill!='boss_duqu_sha'&&get.owner(card)!=undefined&&card.name=='tao') return false;
|
||||
},
|
||||
if(_status.event.skill!='boss_duqu_sha'&&get.owner(card)!=undefined&&card.name=='tao') return false;
|
||||
},
|
||||
cardUsable:function (card,player){
|
||||
if(_status.event.skill!='boss_duqu_sha'&&get.owner(card)!=undefined&&card.name=='tao') return false;
|
||||
},
|
||||
if(_status.event.skill!='boss_duqu_sha'&&get.owner(card)!=undefined&&card.name=='tao') return false;
|
||||
},
|
||||
cardRespondable:function (card,player){
|
||||
if(_status.event.skill!='boss_duqu_sha'&&get.owner(card)!=undefined&&card.name=='tao') return false;
|
||||
},
|
||||
if(_status.event.skill!='boss_duqu_sha'&&get.owner(card)!=undefined&&card.name=='tao') return false;
|
||||
},
|
||||
cardSavable:function (card,player){
|
||||
if(_status.event.skill!='boss_duqu_sha'&&get.owner(card)!=undefined&&card.name=='tao') return false;
|
||||
},
|
||||
if(_status.event.skill!='boss_duqu_sha'&&get.owner(card)!=undefined&&card.name=='tao') return false;
|
||||
},
|
||||
},
|
||||
group:["boss_duqu_sha"],
|
||||
subSkill:{
|
||||
|
@ -2175,61 +2175,17 @@ game.import('mode',function(lib,game,ui,get,ai,_status){
|
|||
name:"sha",
|
||||
},
|
||||
viewAsFilter:function (player){
|
||||
if(!player.countCards('h','tao')) return false;
|
||||
},
|
||||
if(!player.countCards('h','tao')) return false;
|
||||
},
|
||||
prompt:"将一张桃当杀使用或打出",
|
||||
check:function (){return 1},
|
||||
ai:{
|
||||
effect:{
|
||||
target:function (card,player,target,current){
|
||||
if(get.tag(card,'respondSha')&¤t<0) return 0.6
|
||||
},
|
||||
},
|
||||
respondSha:true,
|
||||
skillTagFilter:function (player){
|
||||
if(!player.countCards('h','tao')) return false;
|
||||
},
|
||||
if(!player.countCards('h','tao')) return false;
|
||||
},
|
||||
order:function (){
|
||||
return get.order({name:'sha'})-0.1;
|
||||
},
|
||||
useful:-1,
|
||||
value:-1,
|
||||
basic:{
|
||||
useful:[5,1],
|
||||
value:[5,1],
|
||||
},
|
||||
result:{
|
||||
target:function (player,target){
|
||||
if(player.hasSkill('jiu')&&!target.getEquip('baiyin')){
|
||||
if(get.attitude(player,target)>0){
|
||||
return -6;
|
||||
}
|
||||
else{
|
||||
return -3;
|
||||
}
|
||||
}
|
||||
return -1.5;
|
||||
},
|
||||
},
|
||||
tag:{
|
||||
respond:1,
|
||||
respondShan:1,
|
||||
damage:function (card){
|
||||
if(card.nature=='poison') return;
|
||||
return 1;
|
||||
},
|
||||
natureDamage:function (card){
|
||||
if(card.nature) return 1;
|
||||
},
|
||||
fireDamage:function (card,nature){
|
||||
if(card.nature=='fire') return 1;
|
||||
},
|
||||
thunderDamage:function (card,nature){
|
||||
if(card.nature=='thunder') return 1;
|
||||
},
|
||||
poisonDamage:function (card,nature){
|
||||
if(card.nature=='poison') return 1;
|
||||
},
|
||||
return get.order({name:'sha'})-0.1;
|
||||
},
|
||||
},
|
||||
sub:true,
|
||||
|
@ -2260,20 +2216,20 @@ game.import('mode',function(lib,game,ui,get,ai,_status){
|
|||
},
|
||||
},
|
||||
boss_jiushou:{
|
||||
mod:{
|
||||
maxHandcard:function(player,num){
|
||||
mod:{
|
||||
maxHandcard:function(player,num){
|
||||
return num-player.hp+9;
|
||||
},
|
||||
},
|
||||
trigger:{player:['phaseUseBegin','phaseAfter','phaseDrawBegin']},
|
||||
forced:true,
|
||||
filter:function(event,player){
|
||||
return event.name=='phaseDraw'||player.countCards('h')<9;
|
||||
},
|
||||
content:function(){
|
||||
if(trigger.name=='phaseDraw') trigger.cancel();
|
||||
else player.draw(9-player.countCards('h'));
|
||||
},
|
||||
},
|
||||
trigger:{player:['phaseUseBegin','phaseAfter','phaseDrawBegin']},
|
||||
forced:true,
|
||||
filter:function(event,player){
|
||||
return event.name=='phaseDraw'||player.countCards('h')<9;
|
||||
},
|
||||
content:function(){
|
||||
if(trigger.name=='phaseDraw') trigger.cancel();
|
||||
else player.draw(9-player.countCards('h'));
|
||||
},
|
||||
},
|
||||
boss_echou_switch:{
|
||||
unique:true,
|
||||
|
@ -2336,13 +2292,13 @@ game.import('mode',function(lib,game,ui,get,ai,_status){
|
|||
player.storage.boss_juyuan=player.hp;
|
||||
},
|
||||
mod:{
|
||||
selectTarget:function (card,player,range){
|
||||
if(card.name!='sha') return;
|
||||
if(range[1]==-1) return;
|
||||
if(player.hp>=player.storage.boss_juyuan) return;
|
||||
range[1]+=2;
|
||||
},
|
||||
},
|
||||
selectTarget:function (card,player,range){
|
||||
if(card.name!='sha') return;
|
||||
if(range[1]==-1) return;
|
||||
if(player.hp>=player.storage.boss_juyuan) return;
|
||||
range[1]+=2;
|
||||
},
|
||||
},
|
||||
},
|
||||
boss_xushi_switch:{
|
||||
unique:true,
|
||||
|
@ -2379,8 +2335,8 @@ game.import('mode',function(lib,game,ui,get,ai,_status){
|
|||
content:function(){
|
||||
'step 0'
|
||||
if(trigger.name=='phaseUse'){
|
||||
player.turnOver();
|
||||
event.finish();
|
||||
player.turnOver();
|
||||
event.finish();
|
||||
}
|
||||
else{
|
||||
event.list=game.filterPlayer(function(current){
|
||||
|
@ -2418,43 +2374,43 @@ game.import('mode',function(lib,game,ui,get,ai,_status){
|
|||
},
|
||||
boss_honglianx:{
|
||||
mod:{
|
||||
ignoredHandcard:function (card,player){
|
||||
if(get.color(card)=='red'){
|
||||
return true;
|
||||
}
|
||||
},
|
||||
cardDiscardable:function (card,player,name){
|
||||
if(name=='phaseDiscard'&&get.color(card)=='red') return false;
|
||||
},
|
||||
},
|
||||
forced:true,
|
||||
trigger:{player:'phaseBefore'},
|
||||
content:function(){
|
||||
'step 0'
|
||||
event.num1=3;
|
||||
event.num2=[0,1,2,3].randomGet();
|
||||
event.togain=[];
|
||||
while(event.togain.length<event.num2){
|
||||
var card=get.cardPile(function(card){
|
||||
return get.color(card)=='red';
|
||||
});
|
||||
if(card) event.togain.push(card);
|
||||
else break;
|
||||
}
|
||||
event.num1-=event.togain.length;
|
||||
if(event.togain.length) player.gain(event.togain,'draw');
|
||||
if(event.num1==0) event.finish();
|
||||
else{
|
||||
event.list=game.filterPlayer(function(current){
|
||||
return current!=player;
|
||||
}).randomGets(event.num1).sortBySeat();
|
||||
player.line(event.list,'fire');
|
||||
}
|
||||
'step 1'
|
||||
ignoredHandcard:function (card,player){
|
||||
if(get.color(card)=='red'){
|
||||
return true;
|
||||
}
|
||||
},
|
||||
cardDiscardable:function (card,player,name){
|
||||
if(name=='phaseDiscard'&&get.color(card)=='red') return false;
|
||||
},
|
||||
},
|
||||
forced:true,
|
||||
trigger:{player:'phaseBefore'},
|
||||
content:function(){
|
||||
'step 0'
|
||||
event.num1=3;
|
||||
event.num2=[0,1,2,3].randomGet();
|
||||
event.togain=[];
|
||||
while(event.togain.length<event.num2){
|
||||
var card=get.cardPile(function(card){
|
||||
return get.color(card)=='red';
|
||||
});
|
||||
if(card) event.togain.push(card);
|
||||
else break;
|
||||
}
|
||||
event.num1-=event.togain.length;
|
||||
if(event.togain.length) player.gain(event.togain,'draw');
|
||||
if(event.num1==0) event.finish();
|
||||
else{
|
||||
event.list=game.filterPlayer(function(current){
|
||||
return current!=player;
|
||||
}).randomGets(event.num1).sortBySeat();
|
||||
player.line(event.list,'fire');
|
||||
}
|
||||
'step 1'
|
||||
var target=event.list.shift();
|
||||
target.damage('fire');
|
||||
if(event.list.length) event.redo();
|
||||
},
|
||||
},
|
||||
},
|
||||
boss_yanyu_switch:{
|
||||
unique:true,
|
||||
|
@ -2522,7 +2478,7 @@ game.import('mode',function(lib,game,ui,get,ai,_status){
|
|||
},
|
||||
content:function(){
|
||||
var list=game.filterPlayer(function(current){
|
||||
return current!=player&¤t.countCards('hej');
|
||||
return current!=player&¤t.countCards('hej');
|
||||
});
|
||||
if(list.length){
|
||||
var target=list.randomGet();
|
||||
|
@ -2575,23 +2531,23 @@ game.import('mode',function(lib,game,ui,get,ai,_status){
|
|||
}
|
||||
},
|
||||
cardUsable:function (card,player){
|
||||
var sc=_status.currentPhase;
|
||||
var sc=_status.currentPhase;
|
||||
if(sc&&sc!=player&&sc.isPhaseUsing()&&sc.hasSkill('boss_sipu')&&!sc.hasSkill('boss_sipu_switch')&&sc.countUsed()<3){
|
||||
return false;
|
||||
}
|
||||
},
|
||||
cardRespondable:function (card,player){
|
||||
var sc=_status.currentPhase;
|
||||
},
|
||||
cardRespondable:function (card,player){
|
||||
var sc=_status.currentPhase;
|
||||
if(sc&&sc!=player&&sc.isPhaseUsing()&&sc.hasSkill('boss_sipu')&&!sc.hasSkill('boss_sipu_switch')&&sc.countUsed()<3){
|
||||
return false;
|
||||
}
|
||||
},
|
||||
cardSavable:function (card,player){
|
||||
var sc=_status.currentPhase;
|
||||
},
|
||||
cardSavable:function (card,player){
|
||||
var sc=_status.currentPhase;
|
||||
if(sc&&sc!=player&&sc.isPhaseUsing()&&sc.hasSkill('boss_sipu')&&!sc.hasSkill('boss_sipu_switch')&&sc.countUsed()<3){
|
||||
return false;
|
||||
}
|
||||
},
|
||||
},
|
||||
},
|
||||
},
|
||||
/*----分界线----*/
|
||||
|
|
|
@ -224,9 +224,9 @@ game.import('mode',function(lib,game,ui,get,ai,_status){
|
|||
player.init(lib.config.test_game);
|
||||
}
|
||||
if(get.config('choose_group')&&player.group=='shen'){
|
||||
var list=lib.group.slice(0);
|
||||
list.remove('shen');
|
||||
if(list.length) player.group=list.randomGet();
|
||||
var list=lib.group.slice(0);
|
||||
list.remove('shen');
|
||||
if(list.length) player.group=list.randomGet();
|
||||
}
|
||||
player.node.name.dataset.nature=get.groupnature(player.group);
|
||||
}
|
||||
|
@ -549,7 +549,7 @@ game.import('mode',function(lib,game,ui,get,ai,_status){
|
|||
var chooseGroup=false;
|
||||
if(event.chosen.length){
|
||||
if(lib.character[event.chosen[0]][1]=='shen'){
|
||||
chooseGroup=true;
|
||||
chooseGroup=true;
|
||||
}
|
||||
}
|
||||
else if(event.modchosen){
|
||||
|
@ -560,13 +560,13 @@ game.import('mode',function(lib,game,ui,get,ai,_status){
|
|||
event.choosed=[result.buttons[0].link,result.buttons[1].link];
|
||||
game.addRecentCharacter(result.buttons[0].link,result.buttons[1].link);
|
||||
if(lib.character[event.choosed[0]][1]=='shen'){
|
||||
chooseGroup=true;
|
||||
chooseGroup=true;
|
||||
}
|
||||
}
|
||||
else{
|
||||
event.choosed=[result.buttons[0].link];
|
||||
if(lib.character[event.choosed[0]][1]=='shen'){
|
||||
chooseGroup=true;
|
||||
chooseGroup=true;
|
||||
}
|
||||
game.addRecentCharacter(result.buttons[0].link);
|
||||
}
|
||||
|
|
4152
mode/guozhan.js
4152
mode/guozhan.js
File diff suppressed because it is too large
Load Diff
Loading…
Reference in New Issue