This commit is contained in:
libccy 2018-08-13 10:34:59 +08:00
parent 80f21c8ac8
commit 79a861d142
10 changed files with 212 additions and 72 deletions

View File

@ -5,7 +5,7 @@ game.import('character',function(lib,game,ui,get,ai,_status){
character:{
gjqt_bailitusu:['male','shu',4,['xuelu','fanshi','shahun']],
gjqt_fengqingxue:['female','wu',3,['qinglan','yuehua','swd_wuxie']],
gjqt_xiangling:['female','wu',3,['qianhuan','meihu','xidie']],
gjqt_xiangling:['female','wu',3,['xlqianhuan','meihu','xidie']],
gjqt_fanglansheng:['male','wu',3,['fanyin','mingkong','fumo']],
gjqt_yinqianshang:['male','qun',4,['zuiji','zuizhan']],
gjqt_hongyu:['female','shu',4,['jianwu','meiying']],
@ -673,7 +673,7 @@ game.import('character',function(lib,game,ui,get,ai,_status){
}
}
},
qianhuan:{
xlqianhuan:{
trigger:{player:'phaseAfter'},
check:function(event,player){
return player.hp==1||player.isTurnedOver();
@ -1568,8 +1568,8 @@ game.import('character',function(lib,game,ui,get,ai,_status){
meiying_info:'一名其他角色的回合结束时,若其未于此回合内使用过指定另一名角色为目标的牌,你可以弃置一张红色牌视为对其使用一张杀',
zuizhan:'乱斩',
zuizhan_info:'每当你使用一张杀,可以摸一张牌,然后此杀随机增加一个额外目标',
qianhuan:'千幻',
qianhuan_info:'回合结束后,若你已受伤,你可以回复一点体力并将武将牌翻面。若你的武将牌背面朝上,你不能使用卡牌,也不能成为卡牌的目标',
xlqianhuan:'千幻',
xlqianhuan_info:'回合结束后,若你已受伤,你可以回复一点体力并将武将牌翻面。若你的武将牌背面朝上,你不能使用卡牌,也不能成为卡牌的目标',
fumo:'伏魔',
fumo_info:'每当你受到一次伤害,可以弃置两张颜色相同的手牌并对伤害来源造成一点雷电伤害',
fanyin:'梵音',

View File

@ -3450,7 +3450,7 @@ game.import('character',function(lib,game,ui,get,ai,_status){
fullborder:'gold',
vanish:true,
derivation:'gw_diandian',
image:'character/gw_yioufeisisp',
image:'character:gw_yioufeisisp',
enable:function(){
return game.countPlayer()>2;
},
@ -3489,7 +3489,7 @@ game.import('character',function(lib,game,ui,get,ai,_status){
fullborder:'gold',
vanish:true,
derivation:'gw_diandian',
image:'character/gw_luoqi',
image:'character:gw_luoqi',
enable:true,
filterTarget:function(card,player,target){
return player.canUse('sha',target,false);
@ -3532,7 +3532,7 @@ game.import('character',function(lib,game,ui,get,ai,_status){
fullborder:'gold',
vanish:true,
derivation:'gw_diandian',
image:'character/gw_jieluote',
image:'character:gw_jieluote',
enable:true,
filterTarget:true,
content:function(){
@ -3586,7 +3586,7 @@ game.import('character',function(lib,game,ui,get,ai,_status){
fullborder:'gold',
vanish:true,
derivation:'gw_diandian',
image:'character/gw_yenaifa',
image:'character:gw_yenaifa',
enable:true,
notarget:true,
content:function(){
@ -3619,7 +3619,7 @@ game.import('character',function(lib,game,ui,get,ai,_status){
fullborder:'gold',
vanish:true,
derivation:'gw_diandian',
image:'character/gw_telisi',
image:'character:gw_telisi',
enable:true,
notarget:true,
content:function(){
@ -3654,7 +3654,7 @@ game.import('character',function(lib,game,ui,get,ai,_status){
fullborder:'gold',
vanish:true,
derivation:'gw_diandian',
image:'character/gw_hengsaite',
image:'character:gw_hengsaite',
enable:true,
notarget:true,
content:function(){
@ -3694,7 +3694,7 @@ game.import('character',function(lib,game,ui,get,ai,_status){
fullborder:'gold',
vanish:true,
derivation:'gw_diandian',
image:'character/gw_fuertaisite',
image:'character:gw_fuertaisite',
enable:true,
filterTarget:true,
selectTarget:[1,2],
@ -3729,7 +3729,7 @@ game.import('character',function(lib,game,ui,get,ai,_status){
fullborder:'gold',
vanish:true,
derivation:'gw_diandian',
image:'character/gw_laduoweide',
image:'character:gw_laduoweide',
enable:true,
filterTarget:true,
content:function(){
@ -3761,7 +3761,7 @@ game.import('character',function(lib,game,ui,get,ai,_status){
fullborder:'gold',
vanish:true,
derivation:'gw_diandian',
image:'character/gw_enxier',
image:'character:gw_enxier',
enable:true,
filterTarget:function(card,player,target){
return Math.abs(target.countCards('h')-player.countCards('h'))<=1;
@ -3793,7 +3793,7 @@ game.import('character',function(lib,game,ui,get,ai,_status){
fullborder:'gold',
vanish:true,
derivation:'gw_diandian',
image:'character/gw_fulisi',
image:'character:gw_fulisi',
enable:true,
filterTarget:function(card,player,target){
return target!=player&&target.countCards('h');
@ -3846,7 +3846,7 @@ game.import('character',function(lib,game,ui,get,ai,_status){
fullborder:'gold',
vanish:true,
derivation:'gw_diandian',
image:'character/gw_kaerweite',
image:'character:gw_kaerweite',
enable:true,
filterTarget:function(card,player,target){
return target!=player&&target.countCards('h');
@ -3881,7 +3881,7 @@ game.import('character',function(lib,game,ui,get,ai,_status){
fullborder:'gold',
vanish:true,
derivation:'gw_diandian',
image:'character/gw_bulanwang',
image:'character:gw_bulanwang',
enable:true,
notarget:true,
content:function(){
@ -3921,7 +3921,7 @@ game.import('character',function(lib,game,ui,get,ai,_status){
fullborder:'gold',
vanish:true,
derivation:'gw_diandian',
image:'character/gw_kuite',
image:'character:gw_kuite',
enable:true,
filterTarget:function(card,player,target){
return target.countCards('h')>=player.countCards('h')&&player.canUse('juedou',target);
@ -3955,7 +3955,7 @@ game.import('character',function(lib,game,ui,get,ai,_status){
fullborder:'gold',
vanish:true,
derivation:'gw_diandian',
image:'character/gw_haluo',
image:'character:gw_haluo',
enable:true,
filterTarget:function(card,player,target){
return target.isMinHp();
@ -3986,7 +3986,7 @@ game.import('character',function(lib,game,ui,get,ai,_status){
fullborder:'gold',
vanish:true,
derivation:'gw_diandian',
image:'character/gw_dagong',
image:'character:gw_dagong',
enable:true,
content:function(){
target.addSkill('gw_ciguhanshuang');
@ -4024,7 +4024,7 @@ game.import('character',function(lib,game,ui,get,ai,_status){
fullborder:'gold',
vanish:true,
derivation:'gw_diandian',
image:'character/gw_gaier',
image:'character:gw_gaier',
enable:true,
filterTarget:true,
content:function(){
@ -4070,7 +4070,7 @@ game.import('character',function(lib,game,ui,get,ai,_status){
fullborder:'gold',
vanish:true,
derivation:'gw_diandian',
image:'character/gw_airuiting',
image:'character:gw_airuiting',
enable:true,
filterTarget:function(card,player,target){
return target!=player;
@ -4114,7 +4114,7 @@ game.import('character',function(lib,game,ui,get,ai,_status){
fullborder:'gold',
vanish:true,
derivation:'gw_diandian',
image:'character/gw_aisinie',
image:'character:gw_aisinie',
enable:true,
notarget:true,
content:function(){
@ -4152,7 +4152,7 @@ game.import('character',function(lib,game,ui,get,ai,_status){
fullborder:'gold',
vanish:true,
derivation:'gw_diandian',
image:'character/gw_falanxisika',
image:'character:gw_falanxisika',
enable:true,
notarget:true,
content:function(){
@ -4195,7 +4195,7 @@ game.import('character',function(lib,game,ui,get,ai,_status){
fullborder:'gold',
vanish:true,
derivation:'gw_diandian',
image:'character/gw_huoge',
image:'character:gw_huoge',
enable:true,
notarget:true,
content:function(){

View File

@ -762,7 +762,7 @@ game.import('character',function(lib,game,ui,get,ai,_status){
lib.card[cardname]=lib.card[cardname]||{
enable:true,
type:'character',
image:'character/'+name,
image:'character:'+name,
fullimage:true,
vanish:true,
skills:skills,

View File

@ -887,7 +887,7 @@ game.import('character',function(lib,game,ui,get,ai,_status){
else{
var next=player.chooseToDiscard(get.prompt('qiaobian'),'弃置一张手牌并跳过判定阶段');
next.set('ai',get.unuseful2);
next.set('logSkill','qiaobian');
next.set('logSkill','qiaobian1');
}
"step 1"
if(result.bool){
@ -921,7 +921,7 @@ game.import('character',function(lib,game,ui,get,ai,_status){
player.chooseToDiscard(get.prompt('qiaobian'),'弃置一张手牌并跳过摸牌阶段,然后可以获得至多两名角色各一张手牌',lib.filter.cardDiscardable).set('ai',function(card){
if(!_status.event.check) return 0;
return 7-get.value(card);
}).set('check',check).set('logSkill','qiaobian');
}).set('check',check).set('logSkill','qiaobian2');
"step 1"
if(result.bool){
trigger.cancel();
@ -984,7 +984,7 @@ game.import('character',function(lib,game,ui,get,ai,_status){
player.chooseToDiscard(get.prompt('qiaobian'),'弃置一张手牌并跳过出牌阶段,然后可以移动场上的一张牌',lib.filter.cardDiscardable).set('ai',function(card){
if(!_status.event.check) return 0;
return 7-get.value(card);
}).set('check',check).set('logSkill','qiaobian');
}).set('check',check).set('logSkill','qiaobian3');
"step 1"
if(result.bool){
trigger.cancel();
@ -1008,7 +1008,7 @@ game.import('character',function(lib,game,ui,get,ai,_status){
content:function(){
"step 0"
var discard=player.countCards('h')>player.hp;
var next=player.chooseToDiscard(get.prompt('qiaobian'),'弃置一张手牌并跳过弃牌阶段');
var next=player.chooseToDiscard(get.prompt('qiaobian4'),'弃置一张手牌并跳过弃牌阶段');
next.logSkill='qiaobian';
next.ai=function(card){
if(discard){
@ -1342,11 +1342,11 @@ game.import('character',function(lib,game,ui,get,ai,_status){
},
guzheng:{
audio:2,
unique:true,
gainable:true,
// unique:true,
// gainable:true,
trigger:{global:'discardAfter'},
filter:function(event,player){
if(event.player!=player&&event.player.classList.contains('dead')==false&&
if(event.player!=player&&event.player.isIn()&&
event.cards&&event.cards.length&&event.getParent(2).name=='phaseDiscard'){
for(var i=0;i<event.cards.length;i++){
if(get.position(event.cards[i])=='d'){
@ -1497,6 +1497,7 @@ game.import('character',function(lib,game,ui,get,ai,_status){
},
get:function(player,num){
if(typeof num!='number') num=1;
var list=[];
while(num--){
var name=player.storage.huashen.list.randomRemove();
var skills=lib.character[name][3].slice(0);
@ -1509,9 +1510,20 @@ game.import('character',function(lib,game,ui,get,ai,_status){
player.storage.huashen.owned[name]=skills;
// player.popup(name);
game.log(player,'获得了一个化身');
if(player.isUnderControl(true)){
player.flashAvatar('huashen',name);
list.push(name);
}
if(player.isUnderControl(true)){
var cards=[];
for(var i=0;i<list.length;i++){
var cardname='huashen_card_'+list[i];
lib.card[cardname]={
fullimage:true,
image:'character:'+list[i]
}
lib.translate[cardname]=lib.translate[list[i]];
cards.push(game.createCard(cardname,'',''));
}
player.$draw(cards);
}
},
group:['huashen1','huashen2'],

View File

@ -6035,7 +6035,7 @@ game.import('character',function(lib,game,ui,get,ai,_status){
content:function(){
"step 0"
player.awakenSkill('fuli');
player.recover(player.maxHp);
player.recover(player.maxHp-player.hp);
"step 1"
player.turnOver();
player.storage.fuli=true;
@ -6126,6 +6126,7 @@ game.import('character',function(lib,game,ui,get,ai,_status){
}
return false;
},
logTarget:'player',
content:function(){
if(trigger.player.countGainableCards(player,'ej')){
player.gainPlayerCard(trigger.player,'ej',true);

View File

@ -1,5 +1,5 @@
window.noname_asset_list=[
'1.9.54',
'1.9.55',
'audio/background/music_danji.mp3',
'audio/background/music_default.mp3',
'audio/background/music_diaochan.mp3',
@ -2881,6 +2881,7 @@ window.noname_skin_list={
yuanshu:4,
yuejin:3,
yufan:1,
yuji:1,
yujin:1,
zhangbao:1,
zhangchunhua:4,
@ -2901,4 +2902,4 @@ window.noname_skin_list={
zhuran:1,
zhurong:3,
zuoci:4
};
};

View File

@ -12749,6 +12749,7 @@
event.delayed=false;
event.num=0;
event.cardlist=[];
event.cards=[];
'step 1'
player.gainPlayerCard(targets[num],event.position,true).set('boolline',false).set('chooseonly',true);
'step 2'
@ -12758,6 +12759,7 @@
card=result.cards[0];
}
if(card){
event.cards.add(card);
current.lose(card,ui.special).set('type','gain');
}
event.cardlist[num]=card||null;
@ -12771,7 +12773,7 @@
'step 3'
var current=targets[num];
var card=event.cardlist[num];
if(card){
if(card&&event.cards.contains(card)){
if(current==game.me||current.isOnline()||(player==game.me&&!event.delayed)){
player.gain(card,current);
event.delayed=true;
@ -18681,6 +18683,10 @@
if(this.hasSkillTag('respondShan',true,null,true)) return true;
return false;
},
mayHaveShan:function(){
return this.hasShan();
// modify: later
},
hasCard:function(name,position){
if(typeof name=='function'){
var hs=this.getCards(position);
@ -20320,7 +20326,12 @@
}
}
else if(lib.card[bg].image){
this.setBackground(lib.card[bg].image);
if(lib.card[bg].image.indexOf('character:')==0){
this.setBackground(lib.card[bg].image.slice(10),'character');
}
else{
this.setBackground(lib.card[bg].image);
}
}
else{
var cardPack=lib.cardPack['mode_'+get.mode()];
@ -45270,6 +45281,9 @@
return get.translation(content);
}
}
if(Array.isArray(content)&&!content.length){
return '没有卡牌';
}
return false;
}
case 'player':case 'players':{

View File

@ -1,26 +1,17 @@
window.noname_update={
version:'1.9.54.1',
update:'1.9.53.1',
version:'1.9.55',
update:'1.9.54.1',
changeLog:[
'变包武将',
'bug修复'
],
files:[
'card/standard.js',
'card/guozhan.js',
'character/diy.js',
'character/extra.js',
'character/gujian.js',
'character/gwent.js',
'character/hearth.js',
'character/refresh.js',
'character/shenhua.js',
'character/sp.js',
'character/yijiang.js',
'character/standard.js',
'character/xianjian.js',
'game/asset.js',
'game/game.js',
'game/directory.js',
'layout/default/layout.css',
'mode/guozhan.js'
]
};
};

BIN
image/skin/yuji/1.jpg Normal file

Binary file not shown.

After

Width:  |  Height:  |  Size: 38 KiB

View File

@ -215,6 +215,7 @@ game.import('mode',function(lib,game,ui,get,ai,_status){
gz_menghuo:['male','shu',4,['huoshou','zaiqi']],
gz_zhurong:['female','shu',4,['juxiang','lieren']],
gz_ganfuren:['female','shu',3,['shushen','shenzhi']],
gz_yuji:['male','qun',3,['qianhuan']],
gz_sunquan:['male','wu',4,['gzzhiheng']],
gz_ganning:['male','wu',4,['qixi']],
@ -280,6 +281,109 @@ game.import('mode',function(lib,game,ui,get,ai,_status){
}
},
skill:{
qianhuan:{
group:['qianhuan_add','qianhuan_use'],
init:function(player){
player.storage.qianhuan=[];
},
intro:{
content:'cards'
},
subSkill:{
add:{
trigger:{global:'damageEnd'},
filter:function(event,player){
var suits=[];
for(var i=0;i<player.storage.qianhuan.length;i++){
suits.add(get.suit(player.storage.qianhuan[i]));
}
return event.player.sameIdentityAs(player)&&player.countCards('h',function(card){
return !suits.contains(get.suit(card));
});
},
direct:true,
content:function(){
'step 0'
var suits=[];
for(var i=0;i<player.storage.qianhuan.length;i++){
suits.add(get.suit(player.storage.qianhuan[i]));
}
player.chooseCard('he',get.prompt2('qianhuan'),function(card){
return !_status.event.suits.contains(get.suit(card));
}).set('ai',function(card){
if(!_status.event.temp){
return 9-get.value(card);
}
return 0;
}).set('temp',!player.hasStockSkill('qianhuan')).set('suits',suits);
'step 1'
if(result.bool){
var card=result.cards[0]
player.storage.qianhuan.add(card);
player.lose(card,ui.special);
player.$give(card,player);
player.markSkill('qianhuan',true);
player.logSkill('qianhuan');
}
}
},
use:{
trigger:{global:'useCardToBefore'},
filter:function(event,player){
if(!['basic','trick'].contains(get.type(event.card,'trick'))) return false;
return event.target&&event.target.sameIdentityAs(player)&&event.targets.length==1&&player.storage.qianhuan.length;
},
direct:true,
content:function(){
'step 0'
var goon=get.effect(trigger.target,trigger.card,trigger.player,player)<0;
if(goon){
if(['tiesuo','diaohulishan','lianjunshengyan','zhibi','chiling','lulitongxin'].contains(trigger.card.name)){
goon=false;
}
else if(trigger.card.name=='sha'){
if(trigger.target.mayHaveShan()||trigger.target.hp>=3){
goon=false;
}
}
else if(trigger.card.name=='guohe'){
if(trigger.target.countCards('he')>=3||!trigger.target.countCards('h')){
goon=false;
}
}
else if(trigger.card.name=='shuiyanqijunx'){
if(trigger.target.countCards('e')<=1||trigger.target.hp>=3){
goon=false;
}
}
else if(get.tag(trigger.card,'damage')&&trigger.target.hp>=3){
goon=false;
}
}
player.chooseButton().set('goon',goon).set('ai',function(button){
if(_status.event.goon) return 1;
return 0;
}).set('createDialog',[get.prompt('qianhuan'),'<div class="text center">移去一张“千幻”牌令'+
get.translation(trigger.player)+'对'+get.translation(trigger.target)+'的'+get.translation(trigger.card)+'失效</div>',player.storage.qianhuan]);
'step 1'
if(result.bool){
var card=result.links[0];
player.storage.qianhuan.remove(card);
if(player.storage.qianhuan.length){
player.updateMarks('qianhuan');
}
else{
player.unmarkSkill('qianhuan');
}
card.discard();
player.$throw(card);
player.logSkill('qianhuan',trigger.player);
trigger.cancel();
}
}
}
}
},
gzjili:{
subSkill:{
count:{
@ -692,6 +796,9 @@ game.import('mode',function(lib,game,ui,get,ai,_status){
if(get.type(event.shown[i],'trick')==type){
list.push(event.shown[i]);
}
else{
event.shown[i].discard();
}
}
if(list.length){
player.gain(list,'gain2');
@ -794,7 +901,10 @@ game.import('mode',function(lib,game,ui,get,ai,_status){
check:function(card){
var num=7-get.value(card);
if(get.position(card)=='h'){
num+=3;
if(zhu.storage.yuanjiangfenghuotu>=5){
return num-3;
}
return num+3;
}
else{
var player=_status.event.player;
@ -1126,10 +1236,10 @@ game.import('mode',function(lib,game,ui,get,ai,_status){
},
gzxinsheng:{
trigger:{player:'damageEnd'},
frequent:true,
// frequent:true,
content:function(){
game.log(player,'获得了一张','#g化身');
lib.skill.gzhuashen.addCharacter(player,_status.characterlist.randomGet());
lib.skill.gzhuashen.addCharacter(player,_status.characterlist.randomGet(),true);
game.delayx();
}
},
@ -1192,7 +1302,7 @@ game.import('mode',function(lib,game,ui,get,ai,_status){
}
return skills;
},
addCharacter:function(player,name){
addCharacter:function(player,name,show){
var skills=lib.skill.gzhuashen.filterSkill(name);
if(skills.length){
player.storage.gzhuashen_map[name]=skills;
@ -1203,6 +1313,26 @@ game.import('mode',function(lib,game,ui,get,ai,_status){
player.storage.gzhuashen.add(name);
player.updateMarks('gzhuashen');
_status.characterlist.remove(name);
if(show){
lib.skill.gzhuashen.drawCharacter(player,[name]);
}
},
drawCharacter:function(player,list){
game.broadcastAll(function(player,list){
if(player.isUnderControl(true)){
var cards=[];
for(var i=0;i<list.length;i++){
var cardname='huashen_card_'+list[i];
lib.card[cardname]={
fullimage:true,
image:'character:'+list[i]
}
lib.translate[cardname]=lib.translate[list[i]];
cards.push(game.createCard(cardname,'',''));
}
player.$draw(cards);
}
},player,list);
},
removeCharacter:function(player,name){
var skills=lib.skill.gzhuashen.filterSkill(name);
@ -1256,6 +1386,7 @@ game.import('mode',function(lib,game,ui,get,ai,_status){
for(var i=0;i<result.links.length;i++){
lib.skill.gzhuashen.addCharacter(player,result.links[i]);
}
lib.skill.gzhuashen.drawCharacter(player,result.links.slice(0));
game.delayx();
player.addTempSkill('gzhuashen_triggered');
game.log(player,'获得了'+get.cnNumber(result.links.length)+'张','#g化身');
@ -1284,7 +1415,7 @@ game.import('mode',function(lib,game,ui,get,ai,_status){
player.logSkill('gzhuashen');
game.log(player,'替换了一张','#g化身');
lib.skill.gzhuashen.removeCharacter(player,result.links[0]);
lib.skill.gzhuashen.addCharacter(player,_status.characterlist.randomGet());
lib.skill.gzhuashen.addCharacter(player,_status.characterlist.randomGet(),true);
game.delayx();
}
}
@ -1363,23 +1494,9 @@ game.import('mode',function(lib,game,ui,get,ai,_status){
if(!event.directresult&&result&&result.links[0]){
event.directresult=result.links[0];
}
// game.broadcastAll(function(name){
// var img=name;
// if(img.indexOf('gz_')==0){
// img=name.slice(3);
// }
// lib.card['gzhuashen_'+name]={
// fullborder:'bronze',
// image:'character/'+img
// }
// lib.translate['gzhuashen_'+name]=lib.translate[name];
// },event.directresult);
// 'step 2'
var name=event.directresult;
lib.skill.gzhuashen.removeCharacter(player,name);
// player.$throw(game.createCard('gzhuashen_'+name),'','');
game.log(player,'移除了化身牌','#g'+get.translation(name));
// game.delayx(2);
}
}
},
@ -3992,7 +4109,11 @@ game.import('mode',function(lib,game,ui,get,ai,_status){
gz_lvfan:'吕范',
gz_shamoke:'沙摩柯',
gz_masu:'马谡',
gz_yuji:'于吉',
qianhuan:'千幻',
qianhuan_bg:'幻',
qianhuan_info:'当与你势力相同的一名角色受到伤害后,你可以将一张与你武将牌上花色均不同的牌置于你的武将牌上。当一名与你势力相同的角色成为基本牌或锦囊牌的唯一目标时,你可以移去一张“千幻”牌,取消之。',
gzjili:'蒺藜',
gzjili_info:'当你于一回合内使用或打出第X张牌时你可以摸X张牌X为你的攻击范围。',
gzzhiman:'制蛮',