This commit is contained in:
libccy 2016-05-10 18:45:06 +08:00
parent 4e5996c0a0
commit 179e58dad5
7 changed files with 253 additions and 34 deletions

View File

@ -89,8 +89,17 @@ character.refresh={
list.push('cancel');
player.chooseControl(list,function(){
var controls=_status.event.controls;
var player=_status.event.player;
if(controls.contains('tao')) return 'tao';
if(controls.contains('sha')) return 'sha';
if(controls.contains('sha')){
for(var i=0;i<game.players.length;i++){
if(player.canUse('sha',game.players[i],true,true)){
if(ai.get.effect(game.players[i],{name:'sha'},player,player)>0){
return 'sha';
}
}
}
}
return 'cancel';
}).set('prompt','是否视为使用一张基本牌?');
}
@ -111,7 +120,10 @@ character.refresh={
if(result.control=='sha'){
player.chooseTarget(function(card,player,target){
return player.canUse({name:'sha'},target,true,true);
},true,'选择出杀目标');
},true,'选择出杀目标').set('ai',function(target){
var player=_status.event.player;
return ai.get.effect(target,{name:'sha'},player,player);
});
}
else{
player.useCard({name:result.control},player);

View File

@ -51,14 +51,14 @@ character.sp={
wenpin:['male','wei',4,['zhenwei']],
daxiaoqiao:['female','wu',3,['xingwu','luoyan']],
sp_daqiao:['female','wu',3,['yanxiao','anxian']],
//from here
sp_ganning:['male','wu',4,['yinling','junwei']],
sp_xiahoudun:['male','wei',4,['fenyong','xuehen']],
sp_lvmeng:['male','wu',4,['tanhu','mouduan']],
wangji:['male','wei',3,['qizhi','jinqu']],
guansuo:['male','wei',3,['qizhi','jinqu']],
tadun:['male','wei',3,['qizhi','jinqu']],
yanbaihu:['male','wei',3,['qizhi','jinqu']],
guansuo:['male','shu',4,['zhengnan','xiefang']],
tadun:['male','qun',4,['luanzhan']],
// yanbaihu:['male','qun',4,['zhidao','jili']],
},
perfectPair:{
zhugejin:['zhugeke'],
@ -5541,7 +5541,20 @@ character.sp={
jsp_huangyueying:'sp黄月英',
sp_lvmeng:'sp吕蒙',
wangji:'王基',
guansuo:'关索',
tadun:'蹋顿',
yanbaihu:'严白虎',
zhidao:'雉盗',
zhidao_info:'锁定技,当你于出牌阶段内第一次对区域里有牌的其他角色造成伤害后,你获得其手牌、装备区和判定区里的各一张牌,然后直到回合结束,其他角色不能被选择为你使用牌的目标',
jili:'寄篱',
jili_info:'锁定技当一名其他角色成为红色基本牌或红色非延时类锦囊牌的目标时若其与你的距离为1且你既不是此牌的使用者也不是目标你也成为此牌的目标',
luanzhan:'乱战',
luanzhan_info:'你使用【杀】或黑色非延时类锦囊牌可以额外选择X名角色为目标当你使用【杀】或黑色非延时类锦囊牌指定目标后若此牌的目标角色数小于X则X减至0。X为你于本局游戏内造成过伤害的次数',
zhengnan:'征南',
zhengnan_info:'当其他角色死亡后,你可以摸三张牌。若如此做,你获得下列技能中的任意一个:“武圣”、 “当先”和“制蛮”',
xiefang:'撷芳',
xiefang_info:'锁定技,你计算与其他角色的距离-XX为女性角色数',
qizhi:'奇制',
qizhi_info:'当你于回合内使用基本牌或锦囊牌指定目标后,你可以弃置不是此牌目标的一名角色的一张牌。若如此做,其摸一张牌',
jinqu:'进趋',

View File

@ -66,10 +66,10 @@ character.yijiang={
xin_yujin:['male','wei',4,['jieyue']],
xin_liru:['male','qun',3,['xinjuece','xinmieji','xinfencheng']],
guohuanghou:['female','qun',3,[]],
liuyu:['female','qun',3,[]],
liyan:['female','qun',3,[]],
sundeng:['female','qun',3,[]],
// guohuanghou:['female','wei',3,['jiaozhao','danxin']],
// liuyu:['male','qun',2,['zhige','zongzuo']],
liyan:['male','shu',3,['duliang','fulin']],
sundeng:['male','wu',4,['kuangbi']],
},
perfectPair:{
wuguotai:['sunjian','sunshangxiang'],
@ -88,6 +88,171 @@ character.yijiang={
guanping:['guanyu'],
},
skill:{
kuangbi:{
enable:'phaseUse',
usable:1,
filterTarget:function(card,player,target){
return target!=player&&target.num('he')>0;
},
content:function(){
'step 0'
target.chooseCard('he',[1,3],'匡弼将1〜3张牌置于'+get.translation(player)+'的武将牌上').set('ai',function(card){
if(ai.get.attitude(_status.event.player,_status.event.getParent().player)>0){
return 7-ai.get.value(card);
}
return 0;
});
'step 1'
if(result.bool){
target.$give(result.cards,player);
target.lose(result.cards,ui.special);
player.storage.kuangbi_draw=result.cards;
player.storage.kuangbi_draw_source=target;
player.syncStorage('kuangbi_draw');
player.addSkill('kuangbi_draw');
game.delay();
}
},
ai:{
order:1,
result:{
target:function(player,target){
if(ai.get.attitude(player,target)>0){
return Math.sqrt(target.num('he'));
}
return 0;
},
player:1
}
},
subSkill:{
draw:{
trigger:{player:'phaseBegin'},
forced:true,
mark:true,
intro:{
content:'cards'
},
content:function(){
var cards=player.storage.kuangbi_draw;
if(cards){
player.gain(cards,'gain2');
var target=player.storage.kuangbi_draw_source;
if(target&&target.isAlive()){
target.draw(cards.length);
}
}
delete player.storage.kuangbi_draw;
delete player.storage.kuangbi_draw_source;
player.removeSkill('kuangbi_draw');
}
}
}
},
fulin:{
mod:{
maxHandcard:function(player,num){
if(player.storage.fulin&&player.storage.fulin.length){
var hs=player.get('h');
for(var i=0;i<player.storage.fulin.length;i++){
if(hs.contains(player.storage.fulin[i])){
num++;
}
}
return num;
}
}
},
group:['fulin_count','fulin_reset'],
subSkill:{
reset:{
trigger:{player:['phaseBegin','phaseEnd']},
forced:true,
popup:false,
silent:true,
priority:10,
content:function(){
player.storage.fulin=[];
}
},
count:{
trigger:{player:'gainEnd'},
forced:true,
popup:false,
silent:true,
filter:function(event,player){
return _status.currentPhase==player;
},
content:function(){
if(!player.storage.fulin){
player.storage.fulin=[];
}
for(var i=0;i<trigger.cards.length;i++){
player.storage.fulin.add(trigger.cards[i]);
}
}
}
}
},
duliang:{
enable:'phaseUse',
usable:1,
filterTarget:function(card,player,target){
return player!=target&&target.num('h')>0;
},
content:function(){
'step 0'
player.gain(target.get('h').randomGet());
target.$give(1,player);
'step 1'
player.chooseControl('选项一','选项二',function(){
return Math.random()<0.5?'选项一':'选项二';
}).set('prompt','督粮<br><br><div class="text">选项一:令其观看牌堆顶的两张牌,然后获得其中的基本牌</div><br><div class="text">选项二:令其于下个摸牌阶段额外摸一张牌</br>');
'step 2'
if(result.control=='选项一'){
var cards=get.cards(2);
target.viewCards('督粮',cards);
event.cards2=[];
for(var i=0;i<cards.length;i++){
if(get.type(cards[i])=='basic'){
ui.special.appendChild(cards[i]);
event.cards2.push(cards[i]);
}
else{
ui.discardPile.appendChild(cards[i]);
}
}
}
else{
target.addSkill('duliang2');
event.finish();
}
'step 3'
if(event.cards2&&event.cards2.length){
target.gain(event.cards2,'draw');
game.log(target,'获得了'+get.cnNumber(event.cards2.length)+'张牌');
}
},
ai:{
order:4,
result:{
target:-1,
player:0.1
}
}
},
duliang2:{
trigger:{player:'phaseDrawBegin'},
forced:true,
mark:true,
intro:{
content:'下个摸牌阶段额外摸一张牌'
},
content:function(){
trigger.num++;
player.removeSkill('duliang2');
}
},
xinfencheng:{
skillAnimation:'epic',
animationColor:'fire',
@ -6101,7 +6266,26 @@ character.yijiang={
gaoshun:'高顺',
xin_yujin:'新于禁',
xin_liru:'新李儒',
guohuanghou:'郭皇后',
liuyu:'刘虞',
sundeng:'孙登',
liyan:'李严',
jiaozhao:'矫诏',
jiaozhao_info:'出牌阶段限一次,你可以展示一张手牌,然后选择距离最近的一名其他角色,该角色声明一张基本牌的牌名。直到回合结束,你可以将此手牌当声明的牌使用且你不能被选择为目标',
danxin:'殚心',
danxin_info:'当你受到伤害后你可以摸一张牌或对“矫诏”的描述依次执行下列一项修改1.将“基本牌”改为“基本牌或非延时类锦囊牌”2.将“选择距离最近的一名其他角色,该角色”改为“你”',
duliang:'督粮',
duliang2:'督粮',
duliang_info:'出牌阶段限一次你可以获得一名其他角色的一张手牌然后选择一项1.令其观看牌堆顶的两张牌然后获得其中的基本牌2.令其于下个摸牌阶段额外摸一张牌',
fulin:'腹鳞',
fulin_info:'锁定技,弃牌阶段内,你于此回合内获得的牌不计入你的手牌数',
kuangbi:'匡弼',
kuangbi_info:'出牌阶段限一次,你可以选择一名有牌的其他角色,该角色将其至多三张牌置于你的武将牌上。若如此做,你的下回合开始时,你获得武将牌上的所有牌,然后其摸等量的牌',
zhige:'止戈',
zhige_info:'出牌阶段限一次,若你的手牌数大于你的体力值,你可以选择攻击范围内含有你的一名其他角色,除非该角色使用一张【杀】,否则其将其装备区里的一张牌交给你',
zongzuo:'宗祚',
zongzuo_info:'锁定技游戏的第一个回合开始前你加X点体力上限和体力X为全场势力数当一名角色死亡后若没有与其势力相同的角色你减1点体力上限',
xinjuece:'绝策',
xinjuece_info:'结束阶段开始时你可以对没有手牌的一名角色造成1点伤害',
xinmieji:'灭计',

View File

@ -5462,6 +5462,7 @@
}
game.pause();
game.countChoose();
event.choosing=true;
}
else if(event.isOnline()){
event.send();
@ -5479,6 +5480,7 @@
}
else event.result.control=event.controls[event.choice];
}
event.choosing=false;
_status.imchoosing=false;
if(event.dialog&&event.dialog.close) event.dialog.close();
if(event.controlbar) event.controlbar.close();
@ -5505,6 +5507,7 @@
}
game.pause();
game.countChoose();
event.choosing=true;
}
else if(event.isOnline()){
event.send();
@ -5520,6 +5523,7 @@
event.result={bool:event.choice};
}
_status.imchoosing=false;
event.choosing=false;
if(event.dialog) event.dialog.close();
},
choosePlayerCard:function(){
@ -5832,14 +5836,15 @@
game.broadcast('closeDialog',event.dialogid);
event.dialog.close();
},
viewHandcards:function(){
viewCards:function(){
"step 0"
if(player==game.me&&target){
event.dialog=ui.create.dialog(get.translation(target.name)+'的手牌',target.get('h'));
if(player==game.me){
event.dialog=ui.create.dialog(event.str,event.cards);
if(event.isMine()){
game.pause();
ui.create.confirm('o');
game.countChoose();
event.choosing=true;
}
else{
event.finish();
@ -5859,6 +5864,7 @@
"step 1"
event.result='viewed';
_status.imchoosing=false;
event.choosing=false;
if(event.dialog) event.dialog.close();
},
useCard:function(){
@ -8489,11 +8495,12 @@
next.content=lib.element.playerproto.showCards;
next._args=Array.from(arguments);
},
viewHandcards:function(target){
var next=game.createEvent('viewHandcards');
viewCards:function(str,cards){
var next=game.createEvent('viewCards');
next.player=this;
next.target=target;
next.content=lib.element.playerproto.viewHandcards;
next.str=str;
next.cards=cards;
next.content=lib.element.playerproto.viewCards;
next._args=Array.from(arguments);
return next;
},
@ -16222,7 +16229,12 @@
var custom=event.custom||{};
var ok=true,auto=true;
var player=event.player;
if(!event.filterButton&&!event.filterCard&&!event.filterTarget&&!event.skill) return;
if(!event.filterButton&&!event.filterCard&&!event.filterTarget&&!event.skill){
if(event.choosing){
_status.imchoosing=true;
}
return;
}
if(event.filterButton){
var dialog=event.dialog;
range=get.select(event.selectButton);
@ -24712,7 +24724,6 @@
else if(_status.event.switchToAuto){
_status.event.switchToAuto();
}
if(game.online){
game.send('auto');
}

Binary file not shown.

Before

Width:  |  Height:  |  Size: 33 KiB

After

Width:  |  Height:  |  Size: 34 KiB

View File

@ -552,13 +552,7 @@ mode.versus={
event.list=[];
event.filterChoice=function(name){
if(get.config('enable_all')) return false;
if(['yuanshu','re_yuanshu','zhangxingcai','hetaiyou','wenpin','yuji',
'xunyu','lusu','guanping','zhangzong','zhoutai','sp_zhangjiao','zhangjiao',
'shixie','zhanglu','chenlin','mayunlu','yangxiu','zhugeke','chengyu',
'zhangbao','zhangliang','sunhao','wutugu','zhugeguo','liuzan','lingcao',
'sunru','lingju','lifeng','hanba','sunluyu','zhuling','daxiaoqiao',
'sp_zhaoyun','sp_diaochan','sp_pangtong','sp_caoren','sp_daqiao',
'sp_ganning','sp_zhangfei','sp_xiahoudun'].contains(name)){
if(lib.banFour.contains(name)){
return true;
}
if(lib.characterPack.refresh[name]) return false;
@ -1206,13 +1200,7 @@ mode.versus={
}
var filterChoice=function(name){
if(name=='zuoci') return true;
if(['yuanshu','re_yuanshu','zhangxingcai','hetaiyou','wenpin','yuji',
'xunyu','lusu','guanping','zhangzong','zhoutai','sp_zhangjiao','zhangjiao',
'shixie','zhanglu','chenlin','mayunlu','yangxiu','zhugeke','chengyu',
'zhangbao','zhangliang','sunhao','wutugu','zhugeguo','liuzan','lingcao',
'sunru','lingju','lifeng','hanba','sunluyu','zhuling','daxiaoqiao',
'sp_zhaoyun','sp_diaochan','sp_pangtong','sp_caoren','sp_daqiao',
'sp_ganning','sp_zhangfei','sp_xiahoudun'].contains(name)){
if(lib.banFour.contains(name)){
return true;
}
if(lib.characterPack.refresh&&lib.characterPack.refresh[name]){
@ -2283,6 +2271,17 @@ mode.versus={
ctx.stroke();
},
},
banFour:[
'yuanshu','re_yuanshu','zhangxingcai','hetaiyou','wenpin','yuji',
'lusu','guanping','zhangzong','zhoutai','sp_zhangjiao','zhangjiao',
'shixie','zhanglu','chenlin','mayunlu','yangxiu','zhugeke','chengyu',
'zhangbao','zhangliang','sunhao','wutugu','zhugeguo','liuzan','lingcao',
'sunru','lingju','lifeng','hanba','sunluyu','zhuling','daxiaoqiao',
'sp_zhaoyun','sp_diaochan','sp_pangtong','sp_caoren','sp_daqiao',
'sp_ganning','sp_zhangfei','sp_xiahoudun',
'zuoci','yuanshao','caopi','zhangzhang',
'huaxiong','guanzhang','liuxie','fuwan','sp_sunshangxiang','hanhaoshihuan',
],
translate:{
zhu:'主',
zhong:'忠',

View File

@ -322,7 +322,7 @@ play.soldier={
"step 1"
if(result.bool){
player.logSkill('chihou');
player.viewHandcards(result.targets[0]);
player.viewCards(get.translation(result.targets[0])+'的手牌',result.targets[0].get('h'));
}
}
},