removed most getEquip
This commit is contained in:
parent
2bf3b11d8e
commit
4006d7d324
|
@ -399,7 +399,7 @@ game.import('card',function(lib,game,ui,get,ai,_status){
|
||||||
ai:{
|
ai:{
|
||||||
value:function(card,player,index,method){
|
value:function(card,player,index,method){
|
||||||
if(player.isDisabled(2)) return 0.01;
|
if(player.isDisabled(2)) return 0.01;
|
||||||
if(card==player.getEquip(2)){
|
if(player.getEquips('tengjia').contains(card)){
|
||||||
if(player.hasSkillTag('noDirectDamage')) return 10;
|
if(player.hasSkillTag('noDirectDamage')) return 10;
|
||||||
if(game.hasPlayer(function(current){
|
if(game.hasPlayer(function(current){
|
||||||
return current!=player&&get.attitude(current,player)<0&¤t.hasSkillTag('fireAttack',null,null,true);
|
return current!=player&&get.attitude(current,player)<0&¤t.hasSkillTag('fireAttack',null,null,true);
|
||||||
|
@ -788,7 +788,7 @@ game.import('card',function(lib,game,ui,get,ai,_status){
|
||||||
//if(card.name=='nanman'||card.name=='wanjian'||card.name=='chuqibuyi') return 'zerotarget';
|
//if(card.name=='nanman'||card.name=='wanjian'||card.name=='chuqibuyi') return 'zerotarget';
|
||||||
if(card.name=='nanman'||card.name=='wanjian') return 'zerotarget';
|
if(card.name=='nanman'||card.name=='wanjian') return 'zerotarget';
|
||||||
if(card.name=='sha'){
|
if(card.name=='sha'){
|
||||||
var equip1=player.getEquip(1);
|
var equip1=player.getEquip('zhuque');
|
||||||
if(equip1&&equip1.name=='zhuque') return 1.9;
|
if(equip1&&equip1.name=='zhuque') return 1.9;
|
||||||
if(!card.nature) return 'zerotarget';
|
if(!card.nature) return 'zerotarget';
|
||||||
}
|
}
|
||||||
|
|
|
@ -47,7 +47,7 @@ game.import('card',function(lib,game,ui,get,ai,_status){
|
||||||
enable:true,
|
enable:true,
|
||||||
filterTarget:function(card,player,target){
|
filterTarget:function(card,player,target){
|
||||||
if(target==player) return false;
|
if(target==player) return false;
|
||||||
if(target.getEquip(5)){
|
if(target.getEquips(5).length){
|
||||||
return target.countCards('e')>1;
|
return target.countCards('e')>1;
|
||||||
}
|
}
|
||||||
else{
|
else{
|
||||||
|
@ -467,11 +467,11 @@ game.import('card',function(lib,game,ui,get,ai,_status){
|
||||||
trigger:{player:'damageBegin4'},
|
trigger:{player:'damageBegin4'},
|
||||||
forced:true,
|
forced:true,
|
||||||
filter:function(event,player){
|
filter:function(event,player){
|
||||||
return event.card&&event.card.name=='sha'&&player.getEquip('lanyinjia');
|
return event.card&&event.card.name=='sha'&&player.getEquips('lanyinjia').length>0;
|
||||||
},
|
},
|
||||||
content:function(){
|
content:function(){
|
||||||
var card=player.getEquip('lanyinjia');
|
var card=player.getEquips('lanyinjia');
|
||||||
if(card){
|
if(card.length){
|
||||||
player.discard(card);
|
player.discard(card);
|
||||||
}
|
}
|
||||||
},
|
},
|
||||||
|
|
|
@ -809,7 +809,7 @@ game.import('card',function(lib,game,ui,get,ai,_status){
|
||||||
forced:true,
|
forced:true,
|
||||||
filter:function(event,player){
|
filter:function(event,player){
|
||||||
if(event.card.name!='sha') return false;
|
if(event.card.name!='sha') return false;
|
||||||
var cards=player.getEquip('wufengjian');
|
var cards=player.getEquips('wufengjian');
|
||||||
return player.hasCard(function(card){
|
return player.hasCard(function(card){
|
||||||
return !cards.contains(card);
|
return !cards.contains(card);
|
||||||
},'he');
|
},'he');
|
||||||
|
|
|
@ -718,7 +718,7 @@ game.import('character',function(lib,game,ui,get,ai,_status){
|
||||||
},
|
},
|
||||||
forced:true,
|
forced:true,
|
||||||
filter:function(event,player){
|
filter:function(event,player){
|
||||||
return (event.name!='phase'||game.phaseNumber==0)&&player.hasEquipableSlot(1);
|
return (event.name!='phase'||game.phaseNumber==0)&&player.hasEquipableSlot(1)&&!player.getEquips('ruyijingubang').length;
|
||||||
},
|
},
|
||||||
content:function(){
|
content:function(){
|
||||||
var card=game.createCard2('ruyijingubang','heart',9);
|
var card=game.createCard2('ruyijingubang','heart',9);
|
||||||
|
@ -804,10 +804,12 @@ game.import('character',function(lib,game,ui,get,ai,_status){
|
||||||
content:function(){
|
content:function(){
|
||||||
var num=lib.skill.ruyijingubang_skill_backup.num;
|
var num=lib.skill.ruyijingubang_skill_backup.num;
|
||||||
player.storage.ruyijingubang_skill=num;
|
player.storage.ruyijingubang_skill=num;
|
||||||
var card=player.getEquip(1);
|
var card=player.getEquips(1);
|
||||||
if(card&&card.name=='ruyijingubang'){
|
for(var card of cards){
|
||||||
card.storage.ruyijingubang_skill=num;
|
if(card&&card.name=='ruyijingubang'){
|
||||||
game.log(player,'将',card,'的攻击范围改为'+num)
|
card.storage.ruyijingubang_skill=num;
|
||||||
|
game.log(player,'将',card,'的攻击范围改为'+num)
|
||||||
|
}
|
||||||
}
|
}
|
||||||
player.markSkill('ruyijingubang_skill');
|
player.markSkill('ruyijingubang_skill');
|
||||||
},
|
},
|
||||||
|
|
|
@ -3405,7 +3405,7 @@ game.import('character',function(lib,game,ui,get,ai,_status){
|
||||||
forced:true,
|
forced:true,
|
||||||
direct:true,
|
direct:true,
|
||||||
filter:function(event,player){
|
filter:function(event,player){
|
||||||
return event.source&&event.source.isIn()&&event.source.getEquip(1);
|
return event.source&&event.source.isIn()&&event.source.getEquips(1).length>0;
|
||||||
},
|
},
|
||||||
content:function(){
|
content:function(){
|
||||||
'step 0'
|
'step 0'
|
||||||
|
|
|
@ -5026,11 +5026,13 @@ game.import('character',function(lib,game,ui,get,ai,_status){
|
||||||
check:function(button){
|
check:function(button){
|
||||||
var player=_status.event.player;
|
var player=_status.event.player;
|
||||||
if(typeof button.link=='number'){
|
if(typeof button.link=='number'){
|
||||||
var card=player.getEquip(button.link);
|
if(!player.hasEmptySlot(button.link)){
|
||||||
if(card){
|
var card=player.getEquip(button.link);
|
||||||
var val=get.value(card);
|
if(card){
|
||||||
if(val>0) return 0;
|
var val=get.value(card);
|
||||||
return 5-val;
|
if(val>0) return 0;
|
||||||
|
return 5-val;
|
||||||
|
}
|
||||||
}
|
}
|
||||||
switch(button.link){
|
switch(button.link){
|
||||||
case 3:return 4.5;break;
|
case 3:return 4.5;break;
|
||||||
|
|
|
@ -1323,13 +1323,13 @@ game.import('character',function(lib,game,ui,get,ai,_status){
|
||||||
filter:function(event,player){
|
filter:function(event,player){
|
||||||
if(event.responded||event.shouli||event.type=='wuxie') return false;
|
if(event.responded||event.shouli||event.type=='wuxie') return false;
|
||||||
if(game.hasPlayer(function(current){
|
if(game.hasPlayer(function(current){
|
||||||
return current.getEquip(4);
|
return current.getCards('e',card=>get.subtype(card)=='equip4').length>0;
|
||||||
})&&event.filterCard({
|
})&&event.filterCard({
|
||||||
name:'sha',
|
name:'sha',
|
||||||
storage:{shouli:true},
|
storage:{shouli:true},
|
||||||
},player,event)) return true;
|
},player,event)) return true;
|
||||||
if(game.hasPlayer(function(current){
|
if(game.hasPlayer(function(current){
|
||||||
return current.getEquip(3);
|
return current.getCards('e',card=>get.subtype(card)=='equip3').length>0;
|
||||||
})&&event.filterCard({
|
})&&event.filterCard({
|
||||||
name:'shan',
|
name:'shan',
|
||||||
storage:{shouli:true},
|
storage:{shouli:true},
|
||||||
|
@ -1341,23 +1341,24 @@ game.import('character',function(lib,game,ui,get,ai,_status){
|
||||||
filterTarget:function(card,player,target){
|
filterTarget:function(card,player,target){
|
||||||
var event=_status.event,evt=event;
|
var event=_status.event,evt=event;
|
||||||
if(event._backup) evt=event._backup;
|
if(event._backup) evt=event._backup;
|
||||||
var equip3=target.getEquip(3);
|
var equip3=target.getCards('e',card=>get.subtype(card,false)=='equip3');
|
||||||
var equip4=target.getEquip(4);
|
var equip4=target.getCards('e',card=>get.subtype(card,false)=='equip4');
|
||||||
if(equip3&&evt.filterCard(get.autoViewAs({
|
if(equip3.length&&equip3.some(card=>evt.filterCard(get.autoViewAs({
|
||||||
name:'shan',
|
name:'shan',
|
||||||
storage:{shouli:true},
|
storage:{shouli:true},
|
||||||
},[equip3]),player,event)) return true;
|
},[card]),player,event))) return true;
|
||||||
var sha=get.autoViewAs({
|
return equip4.some(card=>{
|
||||||
name:'sha',
|
var sha=get.autoViewAs({
|
||||||
storage:{shouli:true},
|
name:'sha',
|
||||||
},[equip4]);
|
storage:{shouli:true},
|
||||||
if(equip4&&evt.filterCard(sha,player,event)){
|
},[card]);
|
||||||
if(!evt.filterTarget) return true;
|
if(evt.filterCard(sha,player,event)){
|
||||||
return game.hasPlayer(function(current){
|
if(!evt.filterTarget) return true;
|
||||||
return evt.filterTarget(sha,player,current);
|
return game.hasPlayer(function(current){
|
||||||
})
|
return evt.filterTarget(sha,player,current);
|
||||||
};
|
})
|
||||||
return false;
|
};
|
||||||
|
})
|
||||||
},
|
},
|
||||||
prompt:'将场上的一张坐骑牌当做【杀】或【闪】使用或打出',
|
prompt:'将场上的一张坐骑牌当做【杀】或【闪】使用或打出',
|
||||||
content:function(){
|
content:function(){
|
||||||
|
@ -1365,32 +1366,45 @@ game.import('character',function(lib,game,ui,get,ai,_status){
|
||||||
var evt=event.getParent(2);
|
var evt=event.getParent(2);
|
||||||
evt.set('shouli',true);
|
evt.set('shouli',true);
|
||||||
var list=[];
|
var list=[];
|
||||||
var equip3=target.getEquip(3);
|
var equip3=target.getCards('e',card=>get.subtype(card,false)=='equip3');
|
||||||
var equip4=target.getEquip(4);
|
var equip4=target.getCards('e',card=>get.subtype(card,false)=='equip4');
|
||||||
var backupx=_status.event;
|
var backupx=_status.event;
|
||||||
_status.event=evt;
|
_status.event=evt;
|
||||||
try{
|
try{
|
||||||
if(equip3){
|
if(equip3.length&&equip3.some(card=>{
|
||||||
var shan=get.autoViewAs({
|
var shan=get.autoViewAs({
|
||||||
name:'shan',
|
name:'shan',
|
||||||
storage:{shouli:true},
|
storage:{shouli:true},
|
||||||
},[equip3]);
|
},[card]);
|
||||||
if(evt.filterCard(shan,player,event)) list.push('shan');
|
if(evt.filterCard(shan,player,event)) return true;
|
||||||
|
return false;
|
||||||
|
})){
|
||||||
|
list.push('shan');
|
||||||
}
|
}
|
||||||
if(equip4){
|
if(equip4.length&&equip4.some(card=>{
|
||||||
var sha=get.autoViewAs({
|
var sha=get.autoViewAs({
|
||||||
name:'sha',
|
name:'sha',
|
||||||
storage:{shouli:true},
|
storage:{shouli:true},
|
||||||
},[equip4]);
|
},[card]);
|
||||||
if(evt.filterCard(sha,player,evt)&&(!evt.filterTarget||game.hasPlayer(function(current){
|
if(evt.filterCard(sha,player,evt)&&(!evt.filterTarget||game.hasPlayer(function(current){
|
||||||
return evt.filterTarget(sha,player,current);
|
return evt.filterTarget(sha,player,current);
|
||||||
}))) list.push('sha');
|
}))) return true;
|
||||||
|
return false;
|
||||||
|
})){
|
||||||
|
list.push('sha');
|
||||||
};
|
};
|
||||||
}catch(e){game.print(e)};
|
}catch(e){game.print(e)};
|
||||||
_status.event=backupx;
|
_status.event=backupx;
|
||||||
if(list.length==1) event._result={
|
if(list.length==1){
|
||||||
bool:true,
|
event.cardName=list[0];
|
||||||
links:[list[0]=='shan'?equip3:equip4],
|
var cards=list[0]=='shan'?equip3:equip4;
|
||||||
|
if(cards.length==1) event._result={
|
||||||
|
bool:true,
|
||||||
|
links:[cards[0]],
|
||||||
|
}
|
||||||
|
else player.choosePlayerCard(true,target,'e').set('filterButton',function(button){
|
||||||
|
return _status.event.cards.contains(button.link);
|
||||||
|
}).set('cards',cards)
|
||||||
}
|
}
|
||||||
else player.choosePlayerCard(true,target,'e').set('filterButton',function(button){
|
else player.choosePlayerCard(true,target,'e').set('filterButton',function(button){
|
||||||
var type=get.subtype(button.link);
|
var type=get.subtype(button.link);
|
||||||
|
@ -1399,7 +1413,7 @@ game.import('character',function(lib,game,ui,get,ai,_status){
|
||||||
'step 1'
|
'step 1'
|
||||||
var evt=event.getParent(2);
|
var evt=event.getParent(2);
|
||||||
if(result.bool&&result.links&&result.links.length){
|
if(result.bool&&result.links&&result.links.length){
|
||||||
var name=get.subtype(result.links[0])=='equip3'?'shan':'sha';
|
var name=(event.cardName||(get.subtype(result.links[0])=='equip4'?'sha':'shan'));
|
||||||
if(evt.name=='chooseToUse'){
|
if(evt.name=='chooseToUse'){
|
||||||
game.broadcastAll(function(result,name){
|
game.broadcastAll(function(result,name){
|
||||||
lib.skill.shouli_backup.viewAs={
|
lib.skill.shouli_backup.viewAs={
|
||||||
|
@ -1443,7 +1457,7 @@ game.import('character',function(lib,game,ui,get,ai,_status){
|
||||||
skillTagFilter:function(player,tag){
|
skillTagFilter:function(player,tag){
|
||||||
var subtype=(tag=='respondSha'?'equip4':'equip3');
|
var subtype=(tag=='respondSha'?'equip4':'equip3');
|
||||||
return game.hasPlayer(function(current){
|
return game.hasPlayer(function(current){
|
||||||
return current.getEquip(subtype);
|
return current.hasCard(card=>get.subtype(card,false)==subtype,'e');
|
||||||
});
|
});
|
||||||
},
|
},
|
||||||
order:2,
|
order:2,
|
||||||
|
@ -3392,7 +3406,7 @@ game.import('character',function(lib,game,ui,get,ai,_status){
|
||||||
filter:function(event,player){
|
filter:function(event,player){
|
||||||
var players=game.filterPlayer();
|
var players=game.filterPlayer();
|
||||||
for(var i=0;i<players.length;i++){
|
for(var i=0;i<players.length;i++){
|
||||||
if(players[i]!=player&&players[i].getEquip('qinggang')){
|
if(players[i]!=player&&players[i].getEquips('qinggang').length>0){
|
||||||
return true;
|
return true;
|
||||||
}
|
}
|
||||||
}
|
}
|
||||||
|
@ -3401,10 +3415,10 @@ game.import('character',function(lib,game,ui,get,ai,_status){
|
||||||
var players=game.filterPlayer();
|
var players=game.filterPlayer();
|
||||||
for(var i=0;i<players.length;i++){
|
for(var i=0;i<players.length;i++){
|
||||||
if(players[i]!=player){
|
if(players[i]!=player){
|
||||||
var e=players[i].getEquip('qinggang');
|
var e=players[i].getEquips('qinggang');
|
||||||
if(e){
|
if(e.length>0){
|
||||||
player.line(players[i],'green');
|
player.line(players[i],'green');
|
||||||
players[i].give(e,player);
|
player.gain(e,players[i],'give','bySelf');
|
||||||
}
|
}
|
||||||
}
|
}
|
||||||
}
|
}
|
||||||
|
|
|
@ -6485,7 +6485,7 @@ game.import('character',function(lib,game,ui,get,ai,_status){
|
||||||
for(var i of list){
|
for(var i of list){
|
||||||
if(player.hasEnabledSlot(i)){
|
if(player.hasEnabledSlot(i)){
|
||||||
var card=player.getEquip(i);
|
var card=player.getEquip(i);
|
||||||
if(!card) return true;
|
if(!card||player.hasEmptySlot(i)) return true;
|
||||||
if(get.value(card,player)<=0) return true;
|
if(get.value(card,player)<=0) return true;
|
||||||
}
|
}
|
||||||
}
|
}
|
||||||
|
@ -6499,7 +6499,7 @@ game.import('character',function(lib,game,ui,get,ai,_status){
|
||||||
for(var i of list){
|
for(var i of list){
|
||||||
if(player.hasEnabledSlot(i)){
|
if(player.hasEnabledSlot(i)){
|
||||||
var card=player.getEquip(i);
|
var card=player.getEquip(i);
|
||||||
if(!card) return 'equip'+i;
|
if(!card||player.hasEmptySlot(i)) return 'equip'+i;
|
||||||
if(get.value(card,player)<=0) return 'equip'+i;
|
if(get.value(card,player)<=0) return 'equip'+i;
|
||||||
}
|
}
|
||||||
}
|
}
|
||||||
|
|
|
@ -6504,17 +6504,21 @@ game.import('character',function(lib,game,ui,get,ai,_status){
|
||||||
filter:function(event,player){
|
filter:function(event,player){
|
||||||
var source=event.source;
|
var source=event.source;
|
||||||
if(!source) return false;
|
if(!source) return false;
|
||||||
var card=source.getEquip(1);
|
var cards=source.getEquips(1);
|
||||||
return card&&get.itemtype(card)=='card'&&lib.filter.canBeGained(card,player,source);
|
return cards.length&&cards.some(card=>lib.filter.canBeGained(card,player,source));
|
||||||
},
|
},
|
||||||
prompt2:function(event){
|
prompt2:function(event){
|
||||||
return '获得其装备区中的'+get.translation(event.source.getEquip(1));
|
var source=event.source;
|
||||||
|
var cards=source.getEquips(1).filter(card=>lib.filter.canBeGained(card,player,source));
|
||||||
|
return '获得其装备区中的'+get.translation(cards);
|
||||||
},
|
},
|
||||||
check:function(event,player){
|
check:function(event,player){
|
||||||
return (get.attitude(player,event.source)+0.1)*get.value(event.source.getEquip(1),event.source);
|
return (get.attitude(player,event.source)+0.1)*get.value(event.source.getEquip(1),event.source);
|
||||||
},
|
},
|
||||||
content:function(){
|
content:function(){
|
||||||
player.gain(trigger.source.getEquip(1),trigger.source,'give','bySelf');
|
var source=trigger.source;
|
||||||
|
var cards=source.getEquips(1).filter(card=>lib.filter.canBeGained(card,player,source));
|
||||||
|
player.gain(cards,source,'give','bySelf');
|
||||||
},
|
},
|
||||||
},
|
},
|
||||||
xinanjian:{
|
xinanjian:{
|
||||||
|
@ -9466,14 +9470,20 @@ game.import('character',function(lib,game,ui,get,ai,_status){
|
||||||
},
|
},
|
||||||
mod:{
|
mod:{
|
||||||
cardUsable:function(card,player,num){
|
cardUsable:function(card,player,num){
|
||||||
var cardx=player.getEquip('rewrite_zhuge');
|
var cards=player.getEquips('rewrite_zhuge')
|
||||||
if(card.name=='sha'&&(!cardx||player.hasSkill('rw_zhuge_skill',null,false)||(!_status.rw_zhuge_temp&&!ui.selected.cards.contains(cardx)))){
|
if(card.name=='sha'){
|
||||||
return Infinity;
|
if(!cards.length||player.hasSkill('rw_zhuge_skill',null,false)||cards.some(card=>(card!=_status.rw_zhuge_temp&&!ui.selected.cards.contains(card)))){
|
||||||
|
if(get.is.versus()||get.is.changban()){
|
||||||
|
return num+3;
|
||||||
|
}
|
||||||
|
return Infinity;
|
||||||
|
}
|
||||||
}
|
}
|
||||||
},
|
},
|
||||||
cardEnabled2:function(card,player){
|
cardEnabled2:function(card,player){
|
||||||
if(!_status.event.addCount_extra||player.hasSkill('rw_zhuge_skill',null,false)) return;
|
if(!_status.event.addCount_extra||player.hasSkill('rw_zhuge_skill',null,false)) return;
|
||||||
if(card&&card==player.getEquip('rewrite_zhuge')){
|
var cards=player.getEquips('rewrite_zhuge');
|
||||||
|
if(card&&cards.contains(card)){
|
||||||
try{
|
try{
|
||||||
var cardz=get.card();
|
var cardz=get.card();
|
||||||
}
|
}
|
||||||
|
@ -9481,7 +9491,7 @@ game.import('character',function(lib,game,ui,get,ai,_status){
|
||||||
return;
|
return;
|
||||||
}
|
}
|
||||||
if(!cardz||cardz.name!='sha') return;
|
if(!cardz||cardz.name!='sha') return;
|
||||||
_status.rw_zhuge_temp=true;
|
_status.rw_zhuge_temp=card;
|
||||||
var bool=lib.filter.cardUsable(get.autoViewAs({name:'sha'},ui.selected.cards.concat([card])),player);
|
var bool=lib.filter.cardUsable(get.autoViewAs({name:'sha'},ui.selected.cards.concat([card])),player);
|
||||||
delete _status.rw_zhuge_temp;
|
delete _status.rw_zhuge_temp;
|
||||||
if(!bool) return false;
|
if(!bool) return false;
|
||||||
|
@ -11222,22 +11232,20 @@ game.import('character',function(lib,game,ui,get,ai,_status){
|
||||||
var next=player.chooseTarget(2,function(card,player,target){
|
var next=player.chooseTarget(2,function(card,player,target){
|
||||||
if(ui.selected.targets.length){
|
if(ui.selected.targets.length){
|
||||||
if(!_status.event.ingame){
|
if(!_status.event.ingame){
|
||||||
var cards=ui.selected.targets[0].getEquip(2);
|
var cards=ui.selected.targets[0].getEquips(2);
|
||||||
return target.canEquip(card)
|
return cards.some(card=>target.canEquip(card))
|
||||||
}
|
}
|
||||||
var from=ui.selected.targets[0];
|
var from=ui.selected.targets[0];
|
||||||
if(target.isMin()) return false;
|
if(target.isMin()) return false;
|
||||||
var es=from.getCards('e');
|
var es=from.getCards('e');
|
||||||
for(var i=0;i<es.length;i++){
|
for(var i=0;i<es.length;i++){
|
||||||
if(['equip3','equip4'].contains(get.subtype(es[i]))&&target.getEquip('liulongcanjia')) continue;
|
|
||||||
if(es[i].name=='liulongcanjia'&&target.countCards('e',{subtype:['equip3','equip4']})>1) continue;
|
|
||||||
if(target.canEquip(es[i])) return true;
|
if(target.canEquip(es[i])) return true;
|
||||||
}
|
}
|
||||||
return false;
|
return false;
|
||||||
}
|
}
|
||||||
else{
|
else{
|
||||||
if(!event.ingame){
|
if(!event.ingame){
|
||||||
if(target.getEquip(2)) return true;
|
if(target.getEquips(2).length) return true;
|
||||||
return false;
|
return false;
|
||||||
}
|
}
|
||||||
return target.countCards('e')>0;
|
return target.countCards('e')>0;
|
||||||
|
@ -11253,9 +11261,7 @@ game.import('character',function(lib,game,ui,get,ai,_status){
|
||||||
if(get.attitude(player,current)>0){
|
if(get.attitude(player,current)>0){
|
||||||
var es=target.getCards('e');
|
var es=target.getCards('e');
|
||||||
for(var i=0;i<es.length;i++){
|
for(var i=0;i<es.length;i++){
|
||||||
if(['equip3','equip4'].contains(get.subtype(es[i]))&¤t.getEquip('liulongcanjia')) continue;
|
if(current.canEquip(es[i])) return true;
|
||||||
else if(es[i].name=='liulongcanjia'&&target.countCards('e',{subtype:['equip3','equip4']})>1) continue;
|
|
||||||
else if(current.canEquip(es[i])) return true;
|
|
||||||
}
|
}
|
||||||
return false;
|
return false;
|
||||||
}
|
}
|
||||||
|
@ -11267,8 +11273,6 @@ game.import('character',function(lib,game,ui,get,ai,_status){
|
||||||
var es=ui.selected.targets[0].getCards('e');
|
var es=ui.selected.targets[0].getCards('e');
|
||||||
var i;
|
var i;
|
||||||
for(i=0;i<es.length;i++){
|
for(i=0;i<es.length;i++){
|
||||||
if(['equip3','equip4'].contains(get.subtype(es[i]))&&target.getEquip('liulongcanjia')) continue;
|
|
||||||
if(es[i].name=='liulongcanjia'&&target.countCards('e',{subtype:['equip3','equip4']})>1) continue;
|
|
||||||
if(target.canEquip(es[i])) break;
|
if(target.canEquip(es[i])) break;
|
||||||
}
|
}
|
||||||
if(i==es.length) return 0;
|
if(i==es.length) return 0;
|
||||||
|
@ -11289,21 +11293,28 @@ game.import('character',function(lib,game,ui,get,ai,_status){
|
||||||
'step 3'
|
'step 3'
|
||||||
if(targets.length==2){
|
if(targets.length==2){
|
||||||
if(!event.ingame){
|
if(!event.ingame){
|
||||||
event._result={
|
var cards=targets[0].getEquips(2);
|
||||||
|
if(cards.length==1) event._result={
|
||||||
bool:true,
|
bool:true,
|
||||||
links:[targets[0].getEquip(2)],
|
links:cards,
|
||||||
};
|
}
|
||||||
|
else{
|
||||||
|
player.choosePlayerCard('e',true,function(button){
|
||||||
|
return get.equipValue(button.link);
|
||||||
|
},targets[0]).set('targets0',targets[0]).set('targets1',targets[1]).set('filterButton',function(button){
|
||||||
|
if(!get.subtypes(button.link,false).contains('equip2')) return false;
|
||||||
|
var targets1=_status.event.targets1;
|
||||||
|
return targets1.canEquip(button.link);
|
||||||
|
});
|
||||||
|
}
|
||||||
}
|
}
|
||||||
else{
|
else{
|
||||||
player.choosePlayerCard('e',true,function(button){
|
player.choosePlayerCard('e',true,function(button){
|
||||||
return get.equipValue(button.link);
|
return get.equipValue(button.link);
|
||||||
},targets[0]).set('targets0',targets[0]).set('targets1',targets[1]).set('filterButton',function(button){
|
},targets[0]).set('targets0',targets[0]).set('targets1',targets[1]).set('filterButton',function(button){
|
||||||
var targets1=_status.event.targets1;
|
var targets1=_status.event.targets1;
|
||||||
if(['equip3','equip4'].contains(get.subtype(button.link))&&targets1.getEquip('liulongcanjia')) return false;
|
return targets1.canEquip(button.link);
|
||||||
if(button.link.name=='liulongcanjia'&&targets1.countCards('e',{subtype:['equip3','equip4']})>1) return false;
|
});
|
||||||
return !targets1.countCards('e',{subtype:get.subtype(button.link)});
|
|
||||||
|
|
||||||
});
|
|
||||||
}
|
}
|
||||||
}
|
}
|
||||||
else event.finish();
|
else event.finish();
|
||||||
|
@ -12405,7 +12416,7 @@ game.import('character',function(lib,game,ui,get,ai,_status){
|
||||||
trigger:{player:'damageEnd'},
|
trigger:{player:'damageEnd'},
|
||||||
forced:true,
|
forced:true,
|
||||||
filter:function(event,player){
|
filter:function(event,player){
|
||||||
return !player.getEquip('ly_piliche');
|
return !player.getEquips('ly_piliche').length;
|
||||||
},
|
},
|
||||||
content:function(){
|
content:function(){
|
||||||
'step 0'
|
'step 0'
|
||||||
|
@ -12419,7 +12430,7 @@ game.import('character',function(lib,game,ui,get,ai,_status){
|
||||||
});
|
});
|
||||||
if(card) player.chooseUseTarget(card,true,'nopopup');
|
if(card) player.chooseUseTarget(card,true,'nopopup');
|
||||||
'step 3'
|
'step 3'
|
||||||
if(event.count>0&&!player.getEquip('ly_piliche')) event.goto(1);
|
if(event.count>0&&!player.getEquips('ly_piliche').length) event.goto(1);
|
||||||
},
|
},
|
||||||
},
|
},
|
||||||
},
|
},
|
||||||
|
|
|
@ -381,30 +381,33 @@ game.import('character',function(lib,game,ui,get,ai,_status){
|
||||||
relinglong:{
|
relinglong:{
|
||||||
audio:2,
|
audio:2,
|
||||||
trigger:{
|
trigger:{
|
||||||
player:'loseAfter',
|
player:['loseAfter','disableEquipAfter','enableEquipAfter'],
|
||||||
global:['equipAfter','addJudgeAfter','gainAfter','loseAsyncAfter','addToExpansionAfter','phaseBefore'],
|
global:['equipAfter','addJudgeAfter','gainAfter','loseAsyncAfter','addToExpansionAfter','phaseBefore'],
|
||||||
},
|
},
|
||||||
forced:true,
|
forced:true,
|
||||||
onremove:true,
|
onremove:true,
|
||||||
derivation:'reqicai',
|
derivation:'reqicai',
|
||||||
filter:function(event,player){
|
filter:function(event,player){
|
||||||
if(event.name!='phase'&&(event.name!='equip'||event.player!=player)){
|
if(event.name=='disableEquip'||event.name=='enableEquip'){
|
||||||
|
if(!event.slots.contains('equip5')) return false;
|
||||||
|
}
|
||||||
|
else if(event.name!='phase'&&(event.name!='equip'||event.player!=player)){
|
||||||
var evt=event.getl(player);
|
var evt=event.getl(player);
|
||||||
if(!evt||!evt.es||!evt.es.some(i=>get.subtype(i)=='equip5')) return false;
|
if(!evt||!evt.es||!evt.es.some(i=>get.subtypes(i).contains('equip5'))) return false;
|
||||||
}
|
}
|
||||||
var skills=player.additionalSkills['relinglong'];
|
var skills=player.additionalSkills['relinglong'];
|
||||||
return skills&&skills.length&&player.getEquip(5)||!(skills&&skills.length)&&!player.getEquip(5);
|
return (skills&&skills.length>0)!=player.hasEmptySlot(5);
|
||||||
},
|
},
|
||||||
content:function(){
|
content:function(){
|
||||||
player.removeAdditionalSkill('relinglong');
|
player.removeAdditionalSkill('relinglong');
|
||||||
if(!player.getEquip(5)){
|
if(player.hasEmptySlot(5)){
|
||||||
player.addAdditionalSkill('relinglong',['reqicai']);
|
player.addAdditionalSkill('relinglong',['reqicai']);
|
||||||
}
|
}
|
||||||
},
|
},
|
||||||
group:['linglong_bagua','relinglong_directhit'],
|
group:['linglong_bagua','relinglong_directhit'],
|
||||||
mod:{
|
mod:{
|
||||||
maxHandcard:function(player,num){
|
maxHandcard:function(player,num){
|
||||||
if(player.getEquip(3)||player.getEquip(4)||player.getEquip(6)) return;
|
if(!player.hasEmptySlot(3)||!player.hasEmptySlot(4)) return;
|
||||||
return num+2;
|
return num+2;
|
||||||
},
|
},
|
||||||
},
|
},
|
||||||
|
@ -415,8 +418,8 @@ game.import('character',function(lib,game,ui,get,ai,_status){
|
||||||
forced:true,
|
forced:true,
|
||||||
filter:function(event,player){
|
filter:function(event,player){
|
||||||
if(event.card.name!='sha'&&get.type(event.card,false)!='trick') return false;
|
if(event.card.name!='sha'&&get.type(event.card,false)!='trick') return false;
|
||||||
for(var i=2;i<=6;i++){
|
for(var i=2;i<6;i++){
|
||||||
if(player.getEquip(i)) return false;
|
if(!player.hasEmptySlot(i)) return false;
|
||||||
}
|
}
|
||||||
return true;
|
return true;
|
||||||
},
|
},
|
||||||
|
@ -428,8 +431,8 @@ game.import('character',function(lib,game,ui,get,ai,_status){
|
||||||
directHit_ai:true,
|
directHit_ai:true,
|
||||||
skillTagFilter:function(player,tag,arg){
|
skillTagFilter:function(player,tag,arg){
|
||||||
if(!arg||!arg.card||!arg.target||(arg.card.name!='sha'&&get.type(arg.card,false)!='trick')) return false;
|
if(!arg||!arg.card||!arg.target||(arg.card.name!='sha'&&get.type(arg.card,false)!='trick')) return false;
|
||||||
for(var i=2;i<=6;i++){
|
for(var i=2;i<6;i++){
|
||||||
if(player.getEquip(i)) return false;
|
if(!player.hasEmptySlot(i)) return false;
|
||||||
}
|
}
|
||||||
return true;
|
return true;
|
||||||
},
|
},
|
||||||
|
@ -969,7 +972,8 @@ game.import('character',function(lib,game,ui,get,ai,_status){
|
||||||
trigger:{source:'damageSource'},
|
trigger:{source:'damageSource'},
|
||||||
forced:true,
|
forced:true,
|
||||||
filter:function(event,player){
|
filter:function(event,player){
|
||||||
return event.player.isIn()&&event.card&&event.card.name=='sha'&&event.cards.filterInD('od').length&&event.notLink()&&[2,3,4,6].some(i=>event.player.getEquip(i));
|
return event.player.isIn()&&event.card&&event.card.name=='sha'&&event.cards.filterInD('od').length&&
|
||||||
|
event.notLink()&&[2,3,4].some(i=>event.player.getEquips(i).length>0);
|
||||||
},
|
},
|
||||||
group:'remoshi_retrieve',
|
group:'remoshi_retrieve',
|
||||||
content:function(){
|
content:function(){
|
||||||
|
@ -983,23 +987,25 @@ game.import('character',function(lib,game,ui,get,ai,_status){
|
||||||
global:['loseAfter','equipAfter','addJudgeAfter','gainAfter','loseAsyncAfter','addToExpansionAfter'],
|
global:['loseAfter','equipAfter','addJudgeAfter','gainAfter','loseAsyncAfter','addToExpansionAfter'],
|
||||||
},
|
},
|
||||||
filter:function(event,player){
|
filter:function(event,player){
|
||||||
|
var keys=['equip2','equip3','equip4'];
|
||||||
return game.hasPlayer(current=>{
|
return game.hasPlayer(current=>{
|
||||||
if(event.name=='gain'&¤t==player) return false;
|
if(event.name=='gain'&¤t==player) return false;
|
||||||
var cards=current.getExpansions('remoshi_stuck');
|
var cards=current.getExpansions('remoshi_stuck');
|
||||||
if(!cards.length) return false;
|
if(!cards.length) return false;
|
||||||
var evt=event.getl(current);
|
var evt=event.getl(current);
|
||||||
if(evt&&evt.cards2&&evt.cards2.some(i=>['equip2','equip3','equip4','equip6'].contains(get.subtype(i)))) return true;
|
if(evt&&evt.cards2&&evt.cards2.some(i=>get.subtypes(i).some(slot=>keys.contains(slot)))) return true;
|
||||||
});
|
});
|
||||||
},
|
},
|
||||||
direct:true,
|
direct:true,
|
||||||
forced:true,
|
forced:true,
|
||||||
content:function(){
|
content:function(){
|
||||||
'step 0'
|
'step 0'
|
||||||
|
var keys=['equip2','equip3','equip4'];
|
||||||
var targets=game.filterPlayer(current=>{
|
var targets=game.filterPlayer(current=>{
|
||||||
var cards=current.getExpansions('remoshi_stuck');
|
var cards=current.getExpansions('remoshi_stuck');
|
||||||
if(!cards.length) return false;
|
if(!cards.length) return false;
|
||||||
var evt=trigger.getl(current);
|
var evt=trigger.getl(current);
|
||||||
if(evt&&evt.cards2&&evt.cards2.some(i=>['equip2','equip3','equip4','equip6'].contains(get.subtype(i)))) return true;
|
if(evt&&evt.cards2&&evt.cards2.some(i=>get.subtypes(i).some(slot=>keys.contains(slot)))) return true;
|
||||||
});
|
});
|
||||||
event.targets=targets;
|
event.targets=targets;
|
||||||
'step 1'
|
'step 1'
|
||||||
|
@ -7915,7 +7921,7 @@ game.import('character',function(lib,game,ui,get,ai,_status){
|
||||||
regongji:{
|
regongji:{
|
||||||
mod:{
|
mod:{
|
||||||
attackRangeBase:function(player){
|
attackRangeBase:function(player){
|
||||||
if(player.getEquip(3)||player.getEquip(4)||player.getEquip(6)) return Infinity;
|
if(player.getEquips(3).length>0||player.getEquips(4).length>0) return Infinity;
|
||||||
},
|
},
|
||||||
},
|
},
|
||||||
enable:'phaseUse',
|
enable:'phaseUse',
|
||||||
|
@ -14660,7 +14666,7 @@ game.import('character',function(lib,game,ui,get,ai,_status){
|
||||||
rejiqiao:'机巧',
|
rejiqiao:'机巧',
|
||||||
rejiqiao_info:'出牌阶段开始时,你可以弃置任意张牌,然后亮出牌堆顶X张牌(X为你以此法弃置的牌数与其中装备牌数之和),你获得其中所有非装备牌。',
|
rejiqiao_info:'出牌阶段开始时,你可以弃置任意张牌,然后亮出牌堆顶X张牌(X为你以此法弃置的牌数与其中装备牌数之和),你获得其中所有非装备牌。',
|
||||||
relinglong:'玲珑',
|
relinglong:'玲珑',
|
||||||
relinglong_info:'锁定技。若你的装备区:没有防具牌,视为你装备【八卦阵】;没有坐骑牌,你的手牌上限+2;没有宝物牌,你视为拥有〖奇才〗;以上均满足:你使用的【杀】或普通锦囊牌不可被响应。',
|
relinglong_info:'锁定技。若你的装备区:有空置的防具栏,你视为拥有〖八卦阵〗;有空置的两种坐骑栏,你的手牌上限+2;有空置的宝物栏,你视为拥有〖奇才〗;以上均满足:你使用的【杀】或普通锦囊牌不可被响应。',
|
||||||
ol_zhangzhang:'界张昭张纮',
|
ol_zhangzhang:'界张昭张纮',
|
||||||
olzhijian:'直谏',
|
olzhijian:'直谏',
|
||||||
olzhijian_info:'出牌阶段,你可以将一张装备牌置于其他角色的装备区(可替换原装备),然后摸一张牌。',
|
olzhijian_info:'出牌阶段,你可以将一张装备牌置于其他角色的装备区(可替换原装备),然后摸一张牌。',
|
||||||
|
|
|
@ -2016,7 +2016,7 @@ game.import('character',function(lib,game,ui,get,ai,_status){
|
||||||
if(card.name=='sha') return Infinity;
|
if(card.name=='sha') return Infinity;
|
||||||
},
|
},
|
||||||
targetInRange:function(card,player,target){
|
targetInRange:function(card,player,target){
|
||||||
if(card.name=='sha'&&player.getEquip(1)) return true;
|
if(card.name=='sha'&&player.getEquips(1).length>0) return true;
|
||||||
},
|
},
|
||||||
},
|
},
|
||||||
trigger:{player:'useCard'},
|
trigger:{player:'useCard'},
|
||||||
|
@ -4088,9 +4088,9 @@ game.import('character',function(lib,game,ui,get,ai,_status){
|
||||||
sbliegong:{
|
sbliegong:{
|
||||||
audio:2,
|
audio:2,
|
||||||
mod:{
|
mod:{
|
||||||
cardnature:function(card,player){
|
cardnature:function(card,player){
|
||||||
if(!player.getEquip(1)&&get.name(card,player)=='sha') return false;
|
if(player.hasEmptySlot(1)&&get.name(card,player)=='sha') return false;
|
||||||
},
|
},
|
||||||
},
|
},
|
||||||
trigger:{player:'useCardToPlayered'},
|
trigger:{player:'useCardToPlayered'},
|
||||||
filter:function(event,player){
|
filter:function(event,player){
|
||||||
|
|
|
@ -1203,7 +1203,7 @@ game.import('character',function(lib,game,ui,get,ai,_status){
|
||||||
filter:function(event,player){
|
filter:function(event,player){
|
||||||
return event.card&&event.card.name=='sha'&&
|
return event.card&&event.card.name=='sha'&&
|
||||||
event.source&&event.source.isIn()&&player!=event.source
|
event.source&&event.source.isIn()&&player!=event.source
|
||||||
&&event.cards.filterInD().length>0&&player.getEquip(1);
|
&&event.cards.filterInD().length>0&&player.getEquips(1).length>0;
|
||||||
},
|
},
|
||||||
check:function(event,player){
|
check:function(event,player){
|
||||||
var card={
|
var card={
|
||||||
|
@ -1222,7 +1222,7 @@ game.import('character',function(lib,game,ui,get,ai,_status){
|
||||||
return hs.contains(i);
|
return hs.contains(i);
|
||||||
}).length==cards.length&&player.canUse({name:'sha',cards:cards},target,false)){
|
}).length==cards.length&&player.canUse({name:'sha',cards:cards},target,false)){
|
||||||
var next=player.useCard({name:'sha'},cards,target,false);
|
var next=player.useCard({name:'sha'},cards,target,false);
|
||||||
if(!target.getEquip(1)) next.baseDamage=2;
|
if(!target.getEquips(1).length) next.baseDamage=2;
|
||||||
}
|
}
|
||||||
},
|
},
|
||||||
},
|
},
|
||||||
|
@ -1241,11 +1241,11 @@ game.import('character',function(lib,game,ui,get,ai,_status){
|
||||||
if(card) player.gain(card,'gain2');
|
if(card) player.gain(card,'gain2');
|
||||||
else{
|
else{
|
||||||
var targets=game.filterPlayer(function(current){
|
var targets=game.filterPlayer(function(current){
|
||||||
return current.getEquip(1);
|
return current.getEquips(1).length>0;
|
||||||
});
|
});
|
||||||
if(targets.length){
|
if(targets.length){
|
||||||
var target=targets.randomGet();
|
var target=targets.randomGet();
|
||||||
player.gain(target.getEquip(1),target,'give','bySelf');
|
player.gain(target.getEquips(1),target,'give','bySelf');
|
||||||
}
|
}
|
||||||
}
|
}
|
||||||
},
|
},
|
||||||
|
@ -5170,7 +5170,7 @@ game.import('character',function(lib,game,ui,get,ai,_status){
|
||||||
chooseControl:function(event,player){
|
chooseControl:function(event,player){
|
||||||
var list=[];
|
var list=[];
|
||||||
for(var i=1;i<6;i++){
|
for(var i=1;i<6;i++){
|
||||||
if(player.getEquip(i)) list.push('equip'+i);
|
if(player.getEquips(i).length>0) list.push('equip'+i);
|
||||||
}
|
}
|
||||||
list.push('cancel2');
|
list.push('cancel2');
|
||||||
return list;
|
return list;
|
||||||
|
|
|
@ -7594,7 +7594,7 @@ game.import('character',function(lib,game,ui,get,ai,_status){
|
||||||
getNum:function(player,target){
|
getNum:function(player,target){
|
||||||
var num=0;
|
var num=0;
|
||||||
if(target.isHealthy()) num++;
|
if(target.isHealthy()) num++;
|
||||||
if(target.getEquip(2)) num++;
|
if(target.getEquips(2).length) num++;
|
||||||
var countSkill=function(player){
|
var countSkill=function(player){
|
||||||
return player.getSkills(null,false,false).filter(function(skill){
|
return player.getSkills(null,false,false).filter(function(skill){
|
||||||
var info=get.info(skill);
|
var info=get.info(skill);
|
||||||
|
@ -7991,11 +7991,11 @@ game.import('character',function(lib,game,ui,get,ai,_status){
|
||||||
var name='zhuangshu_'+get.type2(result.cards[0],result.cards[0].original=='h'?player:false);
|
var name='zhuangshu_'+get.type2(result.cards[0],result.cards[0].original=='h'?player:false);
|
||||||
if(lib.card[name]&&trigger.player.isIn&&trigger.player.hasEmptySlot(5)){
|
if(lib.card[name]&&trigger.player.isIn&&trigger.player.hasEmptySlot(5)){
|
||||||
var target=game.findPlayer(function(current){
|
var target=game.findPlayer(function(current){
|
||||||
var equip=current.getEquip(5);
|
var equip=current.getEquip(name);
|
||||||
return equip&&equip.name==name;
|
return equip&&equip.name==name;
|
||||||
});
|
});
|
||||||
if(target){
|
if(target){
|
||||||
var card=target.getEquip(5);
|
var card=target.getEquip(name);
|
||||||
target.$give(card,trigger.player,false);
|
target.$give(card,trigger.player,false);
|
||||||
}
|
}
|
||||||
else{
|
else{
|
||||||
|
@ -8045,8 +8045,8 @@ game.import('character',function(lib,game,ui,get,ai,_status){
|
||||||
if(event.type!='discard'||event.getlx===false) return false;
|
if(event.type!='discard'||event.getlx===false) return false;
|
||||||
return game.hasPlayer(function(current){
|
return game.hasPlayer(function(current){
|
||||||
if(player!=current){
|
if(player!=current){
|
||||||
var card=current.getEquip(5);
|
var cards=current.getEquips(5);
|
||||||
if(!card||card.name.indexOf('zhuangshu_')!=0) return false;
|
if(!cards.some(card=>card.name.indexOf('zhuangshu_')==0)) return false;
|
||||||
}
|
}
|
||||||
var evt=event.getl(current);
|
var evt=event.getl(current);
|
||||||
if(!evt||!evt.cards2) return false;
|
if(!evt||!evt.cards2) return false;
|
||||||
|
@ -8061,8 +8061,8 @@ game.import('character',function(lib,game,ui,get,ai,_status){
|
||||||
var cards=[];
|
var cards=[];
|
||||||
game.countPlayer(function(current){
|
game.countPlayer(function(current){
|
||||||
if(player!=current){
|
if(player!=current){
|
||||||
var card=current.getEquip(5);
|
var cards=current.getEquips(5);
|
||||||
if(!card||card.name.indexOf('zhuangshu_')!=0) return false;
|
if(!cards.some(card=>card.name.indexOf('zhuangshu_')==0)) return false;
|
||||||
}
|
}
|
||||||
var evt=trigger.getl(current);
|
var evt=trigger.getl(current);
|
||||||
for(var i of evt.cards2){
|
for(var i of evt.cards2){
|
||||||
|
@ -10705,17 +10705,17 @@ game.import('character',function(lib,game,ui,get,ai,_status){
|
||||||
return lib.filter.filterTarget.apply(this,arguments);
|
return lib.filter.filterTarget.apply(this,arguments);
|
||||||
}).set('sourcex',targets[1]).set('addCount',false);
|
}).set('sourcex',targets[1]).set('addCount',false);
|
||||||
'step 2'
|
'step 2'
|
||||||
var card=targets[0].getEquip(1);
|
var cards=targets[0].getEquips(1);
|
||||||
if(!result.bool&&card){
|
if(!result.bool&&cards.length){
|
||||||
event.card=card;
|
event.cards=cards;
|
||||||
player.chooseTarget(true,'将'+get.translation(card)+'交给一名其他角色').set('ai',function(target){
|
player.chooseTarget(true,'将'+get.translation(cards)+'交给一名其他角色').set('ai',function(target){
|
||||||
var card=_status.event.getParent().card;
|
var card=_status.event.getParent().cards;
|
||||||
return (target.hasSkillTag('nogain')?0:get.attitude(_status.event.player,target))*Math.max(0.1,target.getUseValue(card));
|
return (target.hasSkillTag('nogain')?0:get.attitude(_status.event.player,target))*Math.max(0.1,target.getUseValue(cards[0]));
|
||||||
});
|
});
|
||||||
}
|
}
|
||||||
else event.finish();
|
else event.finish();
|
||||||
'step 3'
|
'step 3'
|
||||||
result.targets[0].gain(card,result.targets[0],'give').giver=player;
|
result.targets[0].gain(cards,result.targets[0],'give').giver=player;
|
||||||
},
|
},
|
||||||
ai:{
|
ai:{
|
||||||
order:4,
|
order:4,
|
||||||
|
@ -12023,7 +12023,7 @@ game.import('character',function(lib,game,ui,get,ai,_status){
|
||||||
content:function (){
|
content:function (){
|
||||||
'step 0'
|
'step 0'
|
||||||
player.chooseTarget(get.prompt('new_mumu'),'弃置一名角色装备区内的一张牌,或者获得一名角色装备区内的防具牌',function(card,player,target){
|
player.chooseTarget(get.prompt('new_mumu'),'弃置一名角色装备区内的一张牌,或者获得一名角色装备区内的防具牌',function(card,player,target){
|
||||||
if(target==player) return target.getEquip(2)!=undefined;
|
if(target==player) return target.getEquips(2).length>0;
|
||||||
return target.countCards('e')>0;
|
return target.countCards('e')>0;
|
||||||
}).set('ai',function(target){
|
}).set('ai',function(target){
|
||||||
var player=_status.event.player;
|
var player=_status.event.player;
|
||||||
|
@ -12038,12 +12038,12 @@ game.import('character',function(lib,game,ui,get,ai,_status){
|
||||||
event.target=result.targets[0];
|
event.target=result.targets[0];
|
||||||
player.logSkill('new_mumu',event.target);
|
player.logSkill('new_mumu',event.target);
|
||||||
player.line(event.target,'green');
|
player.line(event.target,'green');
|
||||||
var e=event.target.getEquip(2);
|
var e=event.target.getEquips(2);
|
||||||
event.e=e;
|
event.e=e;
|
||||||
if(target==player) event.choice='获得一张防具牌';
|
if(target==player) event.choice='获得一张防具牌';
|
||||||
else if(e){
|
else if(e.length>0){
|
||||||
player.chooseControl('弃置一张装备牌','获得一张防具牌').set('ai',function(){
|
player.chooseControl('弃置一张装备牌','获得一张防具牌').set('ai',function(){
|
||||||
if(_status.event.player.getEquip(2)){
|
if(_status.event.player.getEquips(2).length>0){
|
||||||
return '弃置一张装备牌';
|
return '弃置一张装备牌';
|
||||||
}
|
}
|
||||||
return '获得一张防具牌';
|
return '获得一张防具牌';
|
||||||
|
@ -12052,7 +12052,8 @@ game.import('character',function(lib,game,ui,get,ai,_status){
|
||||||
else{
|
else{
|
||||||
event.choice='弃置一张装备牌';
|
event.choice='弃置一张装备牌';
|
||||||
}
|
}
|
||||||
}else event.finish();
|
}
|
||||||
|
else event.finish();
|
||||||
'step 2'
|
'step 2'
|
||||||
var choice=event.choice||result.control;
|
var choice=event.choice||result.control;
|
||||||
if(choice=='弃置一张装备牌'){
|
if(choice=='弃置一张装备牌'){
|
||||||
|
@ -12826,8 +12827,8 @@ game.import('character',function(lib,game,ui,get,ai,_status){
|
||||||
target.gain(card,'gain2');
|
target.gain(card,'gain2');
|
||||||
}
|
}
|
||||||
'step 2'
|
'step 2'
|
||||||
var equip1=target.getEquip(1);
|
var equip1=target.getEquips(1);
|
||||||
if(equip1){
|
if(equip1.length){
|
||||||
game.delay();
|
game.delay();
|
||||||
target.give(equip1,player);
|
target.give(equip1,player);
|
||||||
target.line(player);
|
target.line(player);
|
||||||
|
@ -12864,8 +12865,8 @@ game.import('character',function(lib,game,ui,get,ai,_status){
|
||||||
event.list=result.targets.slice(0);
|
event.list=result.targets.slice(0);
|
||||||
}
|
}
|
||||||
'step 2'
|
'step 2'
|
||||||
var equip1=player.getEquip(1);
|
var equip1=player.getEquips(1);
|
||||||
if(equip1){
|
if(equip1.length){
|
||||||
for(var i=0;i<event.list.length;i++){
|
for(var i=0;i<event.list.length;i++){
|
||||||
if(event.list[i].isDead()) event.list.splice(i--,1);
|
if(event.list[i].isDead()) event.list.splice(i--,1);
|
||||||
}
|
}
|
||||||
|
@ -16275,20 +16276,20 @@ game.import('character',function(lib,game,ui,get,ai,_status){
|
||||||
group:'linglong_bagua',
|
group:'linglong_bagua',
|
||||||
mod:{
|
mod:{
|
||||||
cardUsable:function(card,player,num){
|
cardUsable:function(card,player,num){
|
||||||
if(card.name=='sha'&&!player.getEquip(1)) return num+1;
|
if(card.name=='sha'&&player.hasEmptySlot(1)) return num+1;
|
||||||
},
|
},
|
||||||
maxHandcard:function(player,num){
|
maxHandcard:function(player,num){
|
||||||
if(player.getEquip(3)||player.getEquip(4)||player.getEquip(6)) return;
|
if(!player.hasEmptySlot(3)||!player.hasEmptySlot(4)) return;
|
||||||
return num+1;
|
return num+1;
|
||||||
},
|
},
|
||||||
targetInRange:function(card,player,target,now){
|
targetInRange:function(card,player,target,now){
|
||||||
if(player.getEquip(5)) return;
|
if(!player.hasEmptySlot(5)) return;
|
||||||
var type=get.type(card);
|
var type=get.type(card);
|
||||||
if(type=='trick'||type=='delay') return true;
|
if(type=='trick'||type=='delay') return true;
|
||||||
},
|
},
|
||||||
canBeDiscarded:function (card,source,player){
|
canBeDiscarded:function (card,source,player){
|
||||||
if(player.getEquip(5)) return;
|
if(!player.hasEmptySlot(5)) return;
|
||||||
if(get.position(card)=='e'&&['equip2','equip5'].contains(get.subtype(card))) return false;
|
if(get.position(card)=='e'&&get.subtypes(card).some(slot=>slot=='equip2'||slot=='equip5')) return false;
|
||||||
},
|
},
|
||||||
/*cardDiscardable:function (card,player){
|
/*cardDiscardable:function (card,player){
|
||||||
if(player.getEquip(5)) return;
|
if(player.getEquip(5)) return;
|
||||||
|
@ -16863,15 +16864,15 @@ game.import('character',function(lib,game,ui,get,ai,_status){
|
||||||
},
|
},
|
||||||
filterTarget:function(card,player,target){
|
filterTarget:function(card,player,target){
|
||||||
if(target==player) return false;
|
if(target==player) return false;
|
||||||
return target.getEquip(1)||target.getEquip(2);
|
return target.getEquips(1).length>0||target.getEquips(2).length>0;
|
||||||
},
|
},
|
||||||
content:function(){
|
content:function(){
|
||||||
'step 0'
|
'step 0'
|
||||||
var e1=target.getEquip(1);
|
var e1=target.getEquips(1);
|
||||||
var e2=target.getEquip(2);
|
var e2=target.getEquips(2);
|
||||||
event.e1=e1;
|
event.e1=e1;
|
||||||
event.e2=e2;
|
event.e2=e2;
|
||||||
if(e1&&e2){
|
if(e1.length&&e2.length){
|
||||||
player.chooseControl('武器牌','防具牌').set('ai',function(){
|
player.chooseControl('武器牌','防具牌').set('ai',function(){
|
||||||
if(_status.event.player.getEquip(2)){
|
if(_status.event.player.getEquip(2)){
|
||||||
return '武器牌';
|
return '武器牌';
|
||||||
|
@ -16879,7 +16880,7 @@ game.import('character',function(lib,game,ui,get,ai,_status){
|
||||||
return '防具牌';
|
return '防具牌';
|
||||||
});
|
});
|
||||||
}
|
}
|
||||||
else if(e1){
|
else if(e1.length){
|
||||||
event.choice='武器牌';
|
event.choice='武器牌';
|
||||||
}
|
}
|
||||||
else{
|
else{
|
||||||
|
@ -18868,7 +18869,7 @@ game.import('character',function(lib,game,ui,get,ai,_status){
|
||||||
player.turnOver();
|
player.turnOver();
|
||||||
"step 1"
|
"step 1"
|
||||||
var num=game.countPlayer(function(current){
|
var num=game.countPlayer(function(current){
|
||||||
return current.getEquip(1);
|
return current.getEquips(1).length;
|
||||||
});
|
});
|
||||||
player.draw(2+num);
|
player.draw(2+num);
|
||||||
player.addSkill('kuiwei2');
|
player.addSkill('kuiwei2');
|
||||||
|
@ -18887,7 +18888,7 @@ game.import('character',function(lib,game,ui,get,ai,_status){
|
||||||
audio:false,
|
audio:false,
|
||||||
content:function(){
|
content:function(){
|
||||||
var num=game.countPlayer(function(current){
|
var num=game.countPlayer(function(current){
|
||||||
return current.getEquip(1);
|
return current.getEquips(1).length;
|
||||||
});
|
});
|
||||||
if(num>=player.countCards('he')){
|
if(num>=player.countCards('he')){
|
||||||
player.discard(player.getCards('he'));
|
player.discard(player.getCards('he'));
|
||||||
|
|
|
@ -5,8 +5,8 @@ game.import('character',function(lib,game,ui,get,ai,_status){
|
||||||
connect:true,
|
connect:true,
|
||||||
characterSort:{
|
characterSort:{
|
||||||
standard:{
|
standard:{
|
||||||
standard_2008:["caocao","simayi","xiahoudun","zhangliao","xuzhu","guojia","zhenji","liubei","guanyu","zhangfei","zhugeliang","zhaoyun","machao","huangyueying","sunquan","ganning","lvmeng","huanggai","zhouyu","daqiao","luxun","sunshangxiang","huatuo","lvbu","diaochan","re_lidian"],
|
standard_2008:["caocao","simayi","xiahoudun","zhangliao","xuzhu","guojia","zhenji","liubei","guanyu","zhangfei","zhugeliang","zhaoyun","machao","huangyueying","sunquan","ganning","lvmeng","huanggai","zhouyu","daqiao","luxun","sunshangxiang","huatuo","lvbu","diaochan"],
|
||||||
standard_2013:["huaxiong","re_yuanshu","re_xushu"],
|
standard_2013:["huaxiong","re_yuanshu","re_xushu","re_lidian"],
|
||||||
standard_2019:["gongsunzan","xf_yiji"],
|
standard_2019:["gongsunzan","xf_yiji"],
|
||||||
standard_2023:["std_panfeng"],
|
standard_2023:["std_panfeng"],
|
||||||
},
|
},
|
||||||
|
@ -2223,8 +2223,8 @@ game.import('character',function(lib,game,ui,get,ai,_status){
|
||||||
},
|
},
|
||||||
content:function(){
|
content:function(){
|
||||||
player.awakenSkill('zhanshen');
|
player.awakenSkill('zhanshen');
|
||||||
var card=player.getEquip(1);
|
var card=player.getEquips(1);
|
||||||
if(card) player.discard(card);
|
if(cards.length) player.discard(card);
|
||||||
player.loseMaxHp();
|
player.loseMaxHp();
|
||||||
player.addSkill('mashu');
|
player.addSkill('mashu');
|
||||||
player.addSkill('shenji');
|
player.addSkill('shenji');
|
||||||
|
|
|
@ -5960,7 +5960,7 @@ game.import('character',function(lib,game,ui,get,ai,_status){
|
||||||
player:['enterGame','phaseZhunbeiBegin']
|
player:['enterGame','phaseZhunbeiBegin']
|
||||||
},
|
},
|
||||||
filter:function(event,player){
|
filter:function(event,player){
|
||||||
if(player.getEquip(1)) return false;
|
if(player.getEquips(1).length) return false;
|
||||||
return event.name!='phase'||game.phaseNumber==0;
|
return event.name!='phase'||game.phaseNumber==0;
|
||||||
},
|
},
|
||||||
forced:true,
|
forced:true,
|
||||||
|
@ -6000,7 +6000,7 @@ game.import('character',function(lib,game,ui,get,ai,_status){
|
||||||
audio:2,
|
audio:2,
|
||||||
trigger:{player:'phaseZhunbeiBegin'},
|
trigger:{player:'phaseZhunbeiBegin'},
|
||||||
filter:function(event,player){
|
filter:function(event,player){
|
||||||
if(!player.getEquip(1)) return false;
|
if(!player.getEquips(1).length) return false;
|
||||||
return game.hasPlayer(function(current){
|
return game.hasPlayer(function(current){
|
||||||
return player.inRange(current)&&player.canCompare(current);
|
return player.inRange(current)&&player.canCompare(current);
|
||||||
});
|
});
|
||||||
|
@ -6052,8 +6052,8 @@ game.import('character',function(lib,game,ui,get,ai,_status){
|
||||||
}
|
}
|
||||||
}
|
}
|
||||||
else if(!result.tie){
|
else if(!result.tie){
|
||||||
var card=player.getEquip(1);
|
var card=player.getEquips(1);
|
||||||
if(card) target.gain(card,player,'give');
|
if(card.length) target.gain(card,player,'give');
|
||||||
}
|
}
|
||||||
},
|
},
|
||||||
mod:{
|
mod:{
|
||||||
|
@ -6073,7 +6073,7 @@ game.import('character',function(lib,game,ui,get,ai,_status){
|
||||||
audio:'twjianwei',
|
audio:'twjianwei',
|
||||||
trigger:{player:'compare',target:'compare'},
|
trigger:{player:'compare',target:'compare'},
|
||||||
filter:function(event,player){
|
filter:function(event,player){
|
||||||
if(!player.getEquip(1)||player.getAttackRange()<=0) return false;
|
if(!player.getEquips(1).length||player.getAttackRange()<=0) return false;
|
||||||
if(event.player==player) return !event.iwhile;
|
if(event.player==player) return !event.iwhile;
|
||||||
return true;
|
return true;
|
||||||
},
|
},
|
||||||
|
@ -6112,8 +6112,8 @@ game.import('character',function(lib,game,ui,get,ai,_status){
|
||||||
'step 2'
|
'step 2'
|
||||||
if(!result.tie){
|
if(!result.tie){
|
||||||
if(result.bool){
|
if(result.bool){
|
||||||
var card=player.getEquip(1);
|
var card=player.getEquips(1);
|
||||||
if(card) trigger.player.gain(card,player,'give');
|
if(card.length) trigger.player.gain(card,player,'give');
|
||||||
}
|
}
|
||||||
else {
|
else {
|
||||||
var num=0;
|
var num=0;
|
||||||
|
@ -12160,7 +12160,7 @@ game.import('character',function(lib,game,ui,get,ai,_status){
|
||||||
}
|
}
|
||||||
else{
|
else{
|
||||||
var card=get.cardPile(function(card){
|
var card=get.cardPile(function(card){
|
||||||
return card.name=='meiyingqiang'&&card!=player.getEquip(1);
|
return card.name=='meiyingqiang'&&!player.getEquips(1).contains(card);
|
||||||
},'field');
|
},'field');
|
||||||
if(card) player.equip(card);
|
if(card) player.equip(card);
|
||||||
}
|
}
|
||||||
|
|
|
@ -2952,15 +2952,15 @@ game.import('character',function(lib,game,ui,get,ai,_status){
|
||||||
return lib.filter.filterTarget.apply(this,arguments);
|
return lib.filter.filterTarget.apply(this,arguments);
|
||||||
}).set('addCount',false).set('source',player).set('prompt2','对除'+get.translation(player)+'外的一名角色使用一张【杀】,并将装备区内的武器牌交给其中一名目标角色;或点击“取消”,令'+get.translation(player)+'视为对你使用一张【杀】,并获得你装备区内的武器牌');
|
}).set('addCount',false).set('source',player).set('prompt2','对除'+get.translation(player)+'外的一名角色使用一张【杀】,并将装备区内的武器牌交给其中一名目标角色;或点击“取消”,令'+get.translation(player)+'视为对你使用一张【杀】,并获得你装备区内的武器牌');
|
||||||
'step 2'
|
'step 2'
|
||||||
var card=targets[0].getEquip(1);
|
var card=targets[0].getEquips(1);
|
||||||
if(result.bool){
|
if(result.bool){
|
||||||
player.addSkill('dclianji_1');
|
player.addSkill('dclianji_1');
|
||||||
if(card&&result.targets.filter(target=>target.isIn()).length>0){
|
if(card.length&&result.targets.filter(target=>target.isIn()).length>0){
|
||||||
event.card=card;
|
event.card=card;
|
||||||
targets[0].chooseTarget(true,'将'+get.translation(card)+'交给一名目标角色',(card,player,target)=>{
|
targets[0].chooseTarget(true,'将'+get.translation(card)+'交给一名目标角色',(card,player,target)=>{
|
||||||
return _status.event.targets.contains(target);
|
return _status.event.targets.contains(target);
|
||||||
}).set('ai',function(target){
|
}).set('ai',function(target){
|
||||||
var card=_status.event.getParent().card;
|
var card=_status.event.getParent().card[0];
|
||||||
return (target.hasSkillTag('nogain')?0:get.attitude(_status.event.player,target))*Math.max(0.1,target.getUseValue(card));
|
return (target.hasSkillTag('nogain')?0:get.attitude(_status.event.player,target))*Math.max(0.1,target.getUseValue(card));
|
||||||
}).set('targets',result.targets);
|
}).set('targets',result.targets);
|
||||||
} else event.finish();
|
} else event.finish();
|
||||||
|
@ -2975,8 +2975,8 @@ game.import('character',function(lib,game,ui,get,ai,_status){
|
||||||
'step 4'
|
'step 4'
|
||||||
player.useCard({name:'sha',isCard:true},targets[0],false);
|
player.useCard({name:'sha',isCard:true},targets[0],false);
|
||||||
'step 5'
|
'step 5'
|
||||||
var card=targets[0].getEquip(1);
|
var card=targets[0].getEquips(1);
|
||||||
if(card) targets[0].give(card,player,'give');
|
if(card.length) targets[0].give(card,player,'give');
|
||||||
},
|
},
|
||||||
ai:{
|
ai:{
|
||||||
order:4,
|
order:4,
|
||||||
|
|
|
@ -6231,7 +6231,7 @@ game.import('character',function(lib,game,ui,get,ai,_status){
|
||||||
'step 0'
|
'step 0'
|
||||||
var num=Math.min(game.countPlayer(function(current){
|
var num=Math.min(game.countPlayer(function(current){
|
||||||
return player.inRange(current);
|
return player.inRange(current);
|
||||||
}),player.getEquip(1)?4:2);
|
}),player.getEquips(1).length?4:2);
|
||||||
if(trigger.target.countCards('h')<num){
|
if(trigger.target.countCards('h')<num){
|
||||||
event.directfalse=true;
|
event.directfalse=true;
|
||||||
}
|
}
|
||||||
|
@ -6256,8 +6256,8 @@ game.import('character',function(lib,game,ui,get,ai,_status){
|
||||||
}
|
}
|
||||||
'step 1'
|
'step 1'
|
||||||
if(!event.directfalse&&result.bool){
|
if(!event.directfalse&&result.bool){
|
||||||
var e1=player.getEquip(1);
|
var e1=player.getEquips(1);
|
||||||
if(e1){
|
if(e1.length){
|
||||||
player.discard(e1,'notBySelf');
|
player.discard(e1,'notBySelf');
|
||||||
}
|
}
|
||||||
event.finish();
|
event.finish();
|
||||||
|
@ -6318,14 +6318,18 @@ game.import('character',function(lib,game,ui,get,ai,_status){
|
||||||
return get.attitude(player,event.player)<0;
|
return get.attitude(player,event.player)<0;
|
||||||
},
|
},
|
||||||
filter:function(event,player){
|
filter:function(event,player){
|
||||||
return event.getParent().name=='sha'&&player.getEquip(1);
|
return event.getParent().name=='sha'&&player.getEquips(1).length>0;
|
||||||
},
|
},
|
||||||
content:function(){
|
content:function(){
|
||||||
'step 0'
|
'step 0'
|
||||||
var num=1;
|
var num=0,cards=player.getEquips(1);
|
||||||
var info=get.info(player.getEquip(1));
|
for(var card of cards){
|
||||||
if(info&&info.distance&&info.distance.attackFrom){
|
var numz=1;
|
||||||
num-=info.distance.attackFrom;
|
var info=get.info(card,false);
|
||||||
|
if(info&&info.distance&&info.distance.attackFrom){
|
||||||
|
numz-=info.distance.attackFrom;
|
||||||
|
}
|
||||||
|
num+=numz;
|
||||||
}
|
}
|
||||||
if(trigger.player.countCards('h')<num){
|
if(trigger.player.countCards('h')<num){
|
||||||
event.directfalse=true;
|
event.directfalse=true;
|
||||||
|
@ -6351,8 +6355,8 @@ game.import('character',function(lib,game,ui,get,ai,_status){
|
||||||
}
|
}
|
||||||
'step 1'
|
'step 1'
|
||||||
if(!event.directfalse&&result.bool){
|
if(!event.directfalse&&result.bool){
|
||||||
var e1=player.getEquip(1);
|
var e1=player.getEquips(1);
|
||||||
if(e1){
|
if(e1.length){
|
||||||
player.discard(e1,'notBySelf');
|
player.discard(e1,'notBySelf');
|
||||||
}
|
}
|
||||||
}
|
}
|
||||||
|
@ -8966,7 +8970,7 @@ game.import('character',function(lib,game,ui,get,ai,_status){
|
||||||
content:function(){
|
content:function(){
|
||||||
'step 0'
|
'step 0'
|
||||||
var prompt='弃置一张牌'
|
var prompt='弃置一张牌'
|
||||||
if(trigger.source.getEquip(1)) prompt+=(',然后获得'+get.translation(trigger.source)+'装备区中的'+get.translation(trigger.source.getEquip(1)));
|
if(trigger.source.getEquips(1).length) prompt+=(',然后获得'+get.translation(trigger.source)+'装备区中的'+get.translation(trigger.source.getEquips(1)));
|
||||||
var next=player.chooseToDiscard('he',get.prompt('duodao',trigger.source),prompt);
|
var next=player.chooseToDiscard('he',get.prompt('duodao',trigger.source),prompt);
|
||||||
next.logSkill=['duodao',trigger.source];
|
next.logSkill=['duodao',trigger.source];
|
||||||
next.set('ai',function(card){
|
next.set('ai',function(card){
|
||||||
|
@ -8977,8 +8981,8 @@ game.import('character',function(lib,game,ui,get,ai,_status){
|
||||||
return 0;
|
return 0;
|
||||||
});
|
});
|
||||||
'step 1'
|
'step 1'
|
||||||
if(result.bool&&trigger.source.getEquip(1)){
|
if(result.bool&&trigger.source.getEquips(1).length){
|
||||||
player.gain(trigger.source.getEquip(1),trigger.source,'give','bySelf');
|
player.gain(trigger.source.getEquips(1),trigger.source,'give','bySelf');
|
||||||
}
|
}
|
||||||
},
|
},
|
||||||
ai:{
|
ai:{
|
||||||
|
@ -9058,27 +9062,27 @@ game.import('character',function(lib,game,ui,get,ai,_status){
|
||||||
reduodao:{
|
reduodao:{
|
||||||
trigger:{target:'useCardToTargeted'},
|
trigger:{target:'useCardToTargeted'},
|
||||||
filter:function(event,player){
|
filter:function(event,player){
|
||||||
return event.card.name=='sha'&&(get.color(event.card)=='red'?event.player.getEquip(1):player.countCards('he')>0);
|
return event.card.name=='sha'&&(get.color(event.card)=='red'?event.player.getEquips(1).length>0:player.countCards('he')>0);
|
||||||
},
|
},
|
||||||
direct:true,
|
direct:true,
|
||||||
audio:2,
|
audio:2,
|
||||||
content:function(){
|
content:function(){
|
||||||
'step 0'
|
'step 0'
|
||||||
var prompt='弃置一张牌'
|
var prompt='弃置一张牌'
|
||||||
if(trigger.player.getEquip(1)) prompt+=(',然后获得'+get.translation(trigger.player)+'装备区中的'+get.translation(trigger.player.getEquip(1)));
|
if(trigger.player.getEquips(1).length) prompt+=(',然后获得'+get.translation(trigger.player)+'装备区中的'+get.translation(trigger.player.getEquips(1)));
|
||||||
var next=player.chooseToDiscard('he',get.prompt('reduodao',trigger.player),prompt);
|
var next=player.chooseToDiscard('he',get.prompt('reduodao',trigger.player),prompt);
|
||||||
next.logSkill=['reduodao',trigger.player];
|
next.logSkill=['reduodao',trigger.player];
|
||||||
next.set('ai',function(card){
|
next.set('ai',function(card){
|
||||||
if(!_status.event.getTrigger().player.getEquip(1)) return 0;
|
if(!_status.event.getTrigger().player.getEquips(1).length) return 0;
|
||||||
if(get.attitude(_status.event.player,_status.event.getTrigger().player)*get.value(_status.event.getTrigger().player.getEquip(1))<=0){
|
if(get.attitude(_status.event.player,_status.event.getTrigger().player)*get.value(_status.event.getTrigger().player.getEquips(1))<=0){
|
||||||
return 6-get.value(card);
|
return 6-get.value(card);
|
||||||
}
|
}
|
||||||
return 0;
|
return 0;
|
||||||
});
|
});
|
||||||
'step 1'
|
'step 1'
|
||||||
if(result.bool&&trigger.player.getEquip(1)){
|
if(result.bool&&trigger.player.getEquips(1).length){
|
||||||
if(!result.cards||!result.cards.length) player.logSkill('reduodao',trigger.player);
|
if(!result.cards||!result.cards.length) player.logSkill('reduodao',trigger.player);
|
||||||
player.gain(trigger.player.getEquip(1),trigger.player,'give','bySelf');
|
player.gain(trigger.player.getEquips(1),trigger.player,'give','bySelf');
|
||||||
}
|
}
|
||||||
},
|
},
|
||||||
},
|
},
|
||||||
|
@ -11827,7 +11831,7 @@ game.import('character',function(lib,game,ui,get,ai,_status){
|
||||||
forced:true,
|
forced:true,
|
||||||
audio:2,
|
audio:2,
|
||||||
filter:function(event,player){
|
filter:function(event,player){
|
||||||
if(player.getEquip(2)) return false;
|
if(!player.hasEmptySlot(2)) return false;
|
||||||
return (event.card.name=='sha'&&get.color(event.card)=='black')
|
return (event.card.name=='sha'&&get.color(event.card)=='black')
|
||||||
},
|
},
|
||||||
content:function(){
|
content:function(){
|
||||||
|
@ -11836,10 +11840,10 @@ game.import('character',function(lib,game,ui,get,ai,_status){
|
||||||
ai:{
|
ai:{
|
||||||
effect:{
|
effect:{
|
||||||
target:function(card,player,target){
|
target:function(card,player,target){
|
||||||
if(player==target&&get.subtype(card)=='equip2'){
|
if(player==target&&get.subtypes(card).contains('equip2')){
|
||||||
if(get.equipValue(card)<=8) return 0;
|
if(get.equipValue(card)<=8) return 0;
|
||||||
}
|
}
|
||||||
if(target.getEquip(2)) return;
|
if(!player.hasEmptySlot(2)) return;
|
||||||
if(card.name=='sha'&&get.color(card)=='black') return 'zerotarget';
|
if(card.name=='sha'&&get.color(card)=='black') return 'zerotarget';
|
||||||
}
|
}
|
||||||
}
|
}
|
||||||
|
|
|
@ -1945,7 +1945,7 @@ game.import('character',function(lib,game,ui,get,ai,_status){
|
||||||
enable:'phaseUse',
|
enable:'phaseUse',
|
||||||
derivation:['cheliji_sichengliangyu','cheliji_tiejixuanyu','cheliji_feilunzhanyu'],
|
derivation:['cheliji_sichengliangyu','cheliji_tiejixuanyu','cheliji_feilunzhanyu'],
|
||||||
filter:function(event,player){
|
filter:function(event,player){
|
||||||
return !player.getEquip(5)&&player.countCards('he',{color:'black'})>0;
|
return !player.getEquips(5).length&&player.countCards('he',{color:'black'})>0;
|
||||||
},
|
},
|
||||||
filterCard:{color:'black'},
|
filterCard:{color:'black'},
|
||||||
position:'he',
|
position:'he',
|
||||||
|
@ -2011,7 +2011,7 @@ game.import('character',function(lib,game,ui,get,ai,_status){
|
||||||
qiangshou:{
|
qiangshou:{
|
||||||
mod:{
|
mod:{
|
||||||
globalFrom:function(player,target,distance){
|
globalFrom:function(player,target,distance){
|
||||||
if(player.getEquip(5)) return distance-1;
|
if(player.getEquips(5).length) return distance-1;
|
||||||
}
|
}
|
||||||
},
|
},
|
||||||
},
|
},
|
||||||
|
|
63
game/game.js
63
game/game.js
|
@ -10703,6 +10703,7 @@
|
||||||
cooperation_use:'戮力',
|
cooperation_use:'戮力',
|
||||||
cooperation_use_info:'双方累计使用至少4种花色的牌',
|
cooperation_use_info:'双方累计使用至少4种花色的牌',
|
||||||
charge:'蓄力值',
|
charge:'蓄力值',
|
||||||
|
expandedSlots:'扩展装备栏',
|
||||||
},
|
},
|
||||||
element:{
|
element:{
|
||||||
content:{
|
content:{
|
||||||
|
@ -10782,7 +10783,7 @@
|
||||||
if(!player.expandedSlots[slot]) player.expandedSlots[slot]=0;
|
if(!player.expandedSlots[slot]) player.expandedSlots[slot]=0;
|
||||||
player.expandedSlots[slot]+=expand;
|
player.expandedSlots[slot]+=expand;
|
||||||
}
|
}
|
||||||
player.$syncDisable();
|
player.$syncExpand();
|
||||||
},
|
},
|
||||||
//选择顶装备要顶的牌
|
//选择顶装备要顶的牌
|
||||||
replaceEquip:function(){
|
replaceEquip:function(){
|
||||||
|
@ -18468,6 +18469,18 @@
|
||||||
isDisabledJudge:function(){
|
isDisabledJudge:function(){
|
||||||
return Boolean(this.storage._disableJudge);
|
return Boolean(this.storage._disableJudge);
|
||||||
},
|
},
|
||||||
|
//同步显示扩展装备区状态
|
||||||
|
$syncExpand:function(map){
|
||||||
|
var player=this;
|
||||||
|
if(!map){
|
||||||
|
map=(player.expandedSlots||{});
|
||||||
|
}
|
||||||
|
game.broadcast(function(player,map){
|
||||||
|
player.expandedSlots=map;
|
||||||
|
player.$syncExpand(map);
|
||||||
|
},player,map);
|
||||||
|
player.markSkill('expandedSlots');
|
||||||
|
},
|
||||||
//同步装备区废除牌显示状态
|
//同步装备区废除牌显示状态
|
||||||
$syncDisable:function(map){
|
$syncDisable:function(map){
|
||||||
var player=this;
|
var player=this;
|
||||||
|
@ -28871,6 +28884,36 @@
|
||||||
}
|
}
|
||||||
},
|
},
|
||||||
skill:{
|
skill:{
|
||||||
|
expandedSlots:{
|
||||||
|
markimage:'image/card/expandedSlots.png',
|
||||||
|
intro:{
|
||||||
|
markcount:function(storage,player){
|
||||||
|
var all=0,storage=player.expandedSlots;
|
||||||
|
if(!storage) return 0;
|
||||||
|
for(var key in storage){
|
||||||
|
var num=storage[key];
|
||||||
|
if(typeof num=='number'&&num>0){
|
||||||
|
all+=num;
|
||||||
|
}
|
||||||
|
}
|
||||||
|
return all;
|
||||||
|
},
|
||||||
|
content:function(storage,player){
|
||||||
|
storage=player.expandedSlots;
|
||||||
|
if(!storage) return '当前没有扩展装备栏';
|
||||||
|
var keys=Object.keys(storage).sort();
|
||||||
|
var str='';
|
||||||
|
for(var key of keys){
|
||||||
|
var num=storage[key];
|
||||||
|
if(typeof num=='number'&&num>0){
|
||||||
|
str+='<li>'+get.translation(key)+'栏:'+num+'个<br>'
|
||||||
|
}
|
||||||
|
}
|
||||||
|
if(str.length) return str.slice(0,str.length-4);
|
||||||
|
return '当前没有扩展装备栏';
|
||||||
|
},
|
||||||
|
},
|
||||||
|
},
|
||||||
charge:{
|
charge:{
|
||||||
markimage:'image/card/charge.png',
|
markimage:'image/card/charge.png',
|
||||||
intro:{
|
intro:{
|
||||||
|
@ -37586,8 +37629,9 @@
|
||||||
var name=arguments[arguments.length-2];
|
var name=arguments[arguments.length-2];
|
||||||
var skills=arguments[arguments.length-1];
|
var skills=arguments[arguments.length-1];
|
||||||
if(skills.getSkills){
|
if(skills.getSkills){
|
||||||
if(name!='cardname') skills=skills.getSkills();
|
//if(name!='cardname') skills=skills.getSkills();
|
||||||
else skills=skills.getSkills(null,false);
|
//else skills=skills.getSkills(null,false);
|
||||||
|
skills=skills.getSkills();
|
||||||
}
|
}
|
||||||
skills=skills.concat(lib.skill.global);
|
skills=skills.concat(lib.skill.global);
|
||||||
game.expandSkills(skills);
|
game.expandSkills(skills);
|
||||||
|
@ -56709,11 +56753,14 @@
|
||||||
}
|
}
|
||||||
var value1=get.equipValue(card,target);
|
var value1=get.equipValue(card,target);
|
||||||
var value2=0;
|
var value2=0;
|
||||||
var current=target.getEquip(card);
|
if(!player.canEquip(card)){
|
||||||
if(current&¤t!=card){
|
if(!player.canEquip(card,true)) return 0;
|
||||||
value2=get.equipValue(current,target);
|
var current=target.getEquip(card);
|
||||||
if(value2>0&&!target.needsToDiscard()&&!get.tag(card,'valueswap')){
|
if(current&¤t!=card){
|
||||||
return 0;
|
value2=get.equipValue(current,target);
|
||||||
|
if(value2>0&&!target.needsToDiscard()&&!get.tag(card,'valueswap')){
|
||||||
|
return 0;
|
||||||
|
}
|
||||||
}
|
}
|
||||||
}
|
}
|
||||||
return Math.max(0,value1-value2)/5;
|
return Math.max(0,value1-value2)/5;
|
||||||
|
|
Binary file not shown.
Before Width: | Height: | Size: 8.9 KiB After Width: | Height: | Size: 9.0 KiB |
Binary file not shown.
After Width: | Height: | Size: 7.9 KiB |
Loading…
Reference in New Issue