This commit is contained in:
libccy 2015-12-31 10:35:28 +08:00
parent 9a43095754
commit 007eaf0f1d
6 changed files with 94 additions and 90 deletions

View File

@ -60,8 +60,8 @@ card.extra={
if(lib.config.mode=='stone'&&!player.isMin()){
if(player.getActCount()+1>=player.actcount) return false;
}
var shas=target.get('h','sha');
if(player.num('h','sha')>1){
var shas=player.get('h','sha');
if(shas.length>1){
if(player.num('e','zhuge')) return 0;
if(player.skills.contains('paoxiao')) return 0;
if(player.skills.contains('fengnu')) return 0;

View File

@ -10,6 +10,91 @@ character.extra={
shen_lvbu:['male','qun',5,['baonu','wuqian','shenfen']],
},
skill:{
qinyin:{
audio:2,
trigger:{player:'phaseDiscardEnd'},
direct:true,
filter:function(event,player){
return event.cards&&event.cards.length>1
},
content:function(){
"step 0"
if(typeof event.count!='number'){
// event.count=trigger.cards.length-1;
event.count=1;
}
var recover=0,lose=0;
for(var i=0;i<game.players.length;i++){
if(!game.players[i].isOut()){
if(game.players[i].hp<game.players[i].maxHp){
if(ai.get.attitude(player,game.players[i])>0){
if(game.players[i].hp<2){
lose--;
recover+=0.5;
}
lose--;
recover++;
}
else if(ai.get.attitude(player,game.players[i])<0){
if(game.players[i].hp<2){
lose++;
recover-=0.5;
}
lose++;
recover--;
}
}
else{
if(ai.get.attitude(player,game.players[i])>0){
lose--;
}
else if(ai.get.attitude(player,game.players[i])<0){
lose++;
}
}
}
}
var prompt='是否发动【琴音】(剩余'+get.cnNumber(event.count)+'次)';
player.chooseControl('失去体力','回复体力','cancel',
ui.create.dialog('是否发动【琴音】?','hidden')).ai=function(){
// console.log(lose,recover);
if(lose>recover&&lose>0) return 0;
if(lose<recover&&recover>0) return 1;
return 2;
}
"step 1"
if(result.bool==false||result.control=='cancel'){
event.finish();
}
else{
player.logSkill('qinyin');
event.bool=(result.control=='回复体力');
event.num=0;
event.players=game.players.slice(0);
}
"step 2"
if(event.num<event.players.length){
var target=event.players[event.num];
if(event.bool){
target.recover();
}
else{
target.loseHp();
}
event.num++;
event.redo();
}
"step 3"
if(event.count>1){
event.count--;
event.goto(0);
}
},
ai:{
expose:0.1,
threaten:2
}
},
lianpo:{
audio:true,
trigger:{source:'dieAfter'},

View File

@ -970,6 +970,9 @@ character.mountain={
var add=false;
for(var j=0;j<lib.character[i][3].length;j++){
var info=lib.skill[lib.character[i][3][j]];
if(!info){
continue;
}
if(info.gainable||!info.unique){
add=true;break;
}

View File

@ -2918,91 +2918,6 @@ character.swd={
player.draw(2);
},
},
qinyin:{
audio:2,
trigger:{player:'phaseDiscardEnd'},
direct:true,
filter:function(event,player){
return event.cards&&event.cards.length>1
},
content:function(){
"step 0"
if(typeof event.count!='number'){
// event.count=trigger.cards.length-1;
event.count=1;
}
var recover=0,lose=0;
for(var i=0;i<game.players.length;i++){
if(!game.players[i].isOut()){
if(game.players[i].hp<game.players[i].maxHp){
if(ai.get.attitude(player,game.players[i])>0){
if(game.players[i].hp<2){
lose--;
recover+=0.5;
}
lose--;
recover++;
}
else if(ai.get.attitude(player,game.players[i])<0){
if(game.players[i].hp<2){
lose++;
recover-=0.5;
}
lose++;
recover--;
}
}
else{
if(ai.get.attitude(player,game.players[i])>0){
lose--;
}
else if(ai.get.attitude(player,game.players[i])<0){
lose++;
}
}
}
}
var prompt='是否发动【琴音】(剩余'+get.cnNumber(event.count)+'次)';
player.chooseControl('失去体力','回复体力','cancel',
ui.create.dialog('是否发动【琴音】?','hidden')).ai=function(){
// console.log(lose,recover);
if(lose>recover&&lose>0) return 0;
if(lose<recover&&recover>0) return 1;
return 2;
}
"step 1"
if(result.bool==false||result.control=='cancel'){
event.finish();
}
else{
player.logSkill('qinyin');
event.bool=(result.control=='回复体力');
event.num=0;
event.players=game.players.slice(0);
}
"step 2"
if(event.num<event.players.length){
var target=event.players[event.num];
if(event.bool){
target.recover();
}
else{
target.loseHp();
}
event.num++;
event.redo();
}
"step 3"
if(event.count>1){
event.count--;
event.goto(0);
}
},
ai:{
expose:0.1,
threaten:2
}
},
wangchen:{
trigger:{player:'phaseDiscardEnd'},
direct:true,

View File

@ -899,7 +899,7 @@ character.yijiang={
target.draw();
}
else{
player.discardPlayerCard(target,'he',true);
target.discard(target.get('h').randomGet());
}
}
},
@ -5491,7 +5491,7 @@ character.yijiang={
huaiyi:'怀异',
huaiyi_info:'出牌阶段限一次你可以展示所有手牌若其中包含不止一种颜色则你选择一种颜色并弃置该颜色的所有手牌然后你可以获得至多X名角色的各一张牌X为你以此法弃置的手牌数。若你以此法获得的牌不少于两张则你失去1点体力',
yaoming:'邀名',
yaoming_info:'每回合限一次当你造成或受到伤害后你可以选择一项1. 弃置手牌数大于你的一名角色的一张2. 令手牌数小于你的一名角色摸一张牌',
yaoming_info:'每回合限一次当你造成或受到伤害后你可以选择一项1. 弃置手牌数大于你的一名角色的一张2. 令手牌数小于你的一名角色摸一张牌',
anguo:'安国',
anguo_info:'出牌阶段限一次,你可以选择一名其他角色装备区里的一张牌,令其将此牌收回手牌。然后若该角色攻击范围内的角色数因此减少,则你摸一张牌',
yanzhu:'宴诛',

View File

@ -364,7 +364,8 @@ mode.stone={
}
lib.card[name]={
image:'character/'+i,
stoneact:lib.character[i][5][0]
stoneact:lib.character[i][5][0],
career:lib.character[i][5][2]||null
};
for(j in lib.card.stonecharacter){
lib.card[name][j]=lib.card.stonecharacter[j];