This commit is contained in:
Spmario233 2020-01-11 20:17:57 +08:00 committed by GitHub
parent 2a1a3df473
commit 8f298bba57
No known key found for this signature in database
GPG Key ID: 4AEE18F83AFDEB23
21 changed files with 907 additions and 150 deletions

Binary file not shown.

Binary file not shown.

Binary file not shown.

Binary file not shown.

Binary file not shown.

Binary file not shown.

View File

@ -263,7 +263,7 @@ game.import('card',function(lib,game,ui,get,ai,_status){
return target.hp<target.maxHp;
},
content:function(){
target.recover();
target.recover(event.baseDamage||1);
},
ai:{
basic:{
@ -1555,6 +1555,16 @@ game.import('card',function(lib,game,ui,get,ai,_status){
},
zhuge_skill:{
equipSkill:true,
audio:true,
firstDo:true,
trigger:{player:'useCard1'},
forced:true,
filter:function(event,player){
return !event.audioed&&event.card.name=='sha'&&player.countUsed('sha',true)>1&&event.getParent().type=='phase';
},
content:function(){
trigger.audioed=true;
},
mod:{
cardUsable:function(card,player,num){
if(card.name=='sha'){
@ -1719,12 +1729,32 @@ game.import('card',function(lib,game,ui,get,ai,_status){
fangtian_skill:{
equipSkill:true,
audio:true,
trigger:{player:'useCard1'},
forced:true,
firstDo:true,
filter:function(event,player){
if(event.card.name!='sha'||get.mode()=='guozhan') return false;
var card=event.card;
var range;
var select=get.copy(get.info(card).selectTarget);
if(select==undefined){
if(get.info(card).filterTarget==undefined) return false;
range=[1,1];
}
else if(typeof select=='number') range=[select,select];
else if(get.itemtype(select)=='select') range=select;
else if(typeof select=='function') range=select(card,player);
game.checkMod(card,player,range,'selectTarget',player);
return range[1]!=-1&&event.targets.length>range[1];
},
content:function(){},
mod:{
selectTarget:function(card,player,range){
if(card.name!='sha') return;
if(get.mode()=='guozhan') return;
if(range[1]==-1) return;
var cards=player.getCards('h');
if(!cards.length) return;
for(var i=0;i<cards.length;i++){
if(cards[i].classList.contains('selected')==false)
return;

View File

@ -28,9 +28,20 @@ game.import('character',function(lib,game,ui,get,ai,_status){
//shen_ganning:"体力上限6",
},
skill:{
wuhun21:{audio:true},
wuhun22:{
audio:true,
skillAnimation:true,
animationColor:'soil',
},
wuhun23:{
audio:true,
skillAnimation:true,
animationColor:'soil',
},
"new_wuhun":{
audio:"wuhun2",
group:["new_wuhun_mark","new_wuhun_die"],
audio:"wuhun21",
group:["new_wuhun_mark","new_wuhun_die","wuhun22","wuhun23"],
trigger:{
player:"damageEnd",
},
@ -48,7 +59,7 @@ game.import('character',function(lib,game,ui,get,ai,_status){
},
subSkill:{
die:{
audio:"wuhun2",
//audio:"wuhun2",
skillAnimation:true,
animationColor:'soil',
trigger:{
@ -56,7 +67,7 @@ game.import('character',function(lib,game,ui,get,ai,_status){
},
forced:true,
forceDie:true,
popup:false,
direct:true,
filter:function (event,player){
return game.hasPlayer(function(current){
return current!=player&&current.storage.new_wuhun_mark!=undefined;
@ -80,7 +91,7 @@ game.import('character',function(lib,game,ui,get,ai,_status){
if(result.bool&&result.targets&&result.targets.length){
var target=result.targets[0];
event.target=target;
player.logSkill('new_wuhun_die',target);
player.logSkill(Math.random()<0.5?'wuhun22':'wuhun23',target);
player.line(target,{color:[255, 255, 0]});
game.delay(2);
}
@ -843,6 +854,14 @@ game.import('character',function(lib,game,ui,get,ai,_status){
}
},
audio:2,
trigger:{player:['useCard1','respond']},
firstDo:true,
forced:true,
filter:function(event,player){
return event.card.name=='sha'&&!event.skill&&
event.cards.length==1&&get.suit(event.cards[0])=='heart';
},
content:function(){},
ai:{
effect:{
target:function(card,player,target,current){
@ -861,7 +880,7 @@ game.import('character',function(lib,game,ui,get,ai,_status){
},
//alter:true,
filter:function (event,player){
if(event.source==undefined) return false
if(event.source==undefined) return false;
if(!get.is.altered('wuhun')) return false
return true;
},
@ -2593,6 +2612,9 @@ game.import('character',function(lib,game,ui,get,ai,_status){
wushen:'武神',
wushen_info:'锁定技,你的红桃手牌视为杀;锁定技,你使用红桃杀时无距离限制。',
wuhun:'武魂',
wuhun21:'武魂',
wuhun22:'武魂',
wuhun23:'武魂',
wuhun2:'武魂',
wuhun3:'武魂',
wuhun_info_alter:'锁定技当你受到1点伤害后你令伤害来源获得1枚“梦魇”标记当你死亡时你令拥有最多“梦魇”标记的一名其他角色判定若结果不为【桃】或【桃园结义】则该角色死亡。',

View File

@ -27,7 +27,7 @@ game.import('character',function(lib,game,ui,get,ai,_status){
re_machao:['male','shu',4,['mashu','retieji']],
re_xushu:['male','shu',4,['zhuhai','qianxin']],
re_zhouyu:['male','wu',3,['reyingzi','refanjian']],
re_lvmeng:['male','wu',4,['keji','qinxue']],
re_lvmeng:['male','wu',4,['keji','qinxue','botu']],
re_ganning:['male','wu',4,['qixi','fenwei']],
re_luxun:['male','wu',3,['reqianxun','relianying']],
re_daqiao:['female','wu',3,['reguose','liuli']],

View File

@ -1401,7 +1401,7 @@ game.import('character',function(lib,game,ui,get,ai,_status){
nzry_lijun2:{},
"nzry_lijun1":{
audio:2,
forceaudio:true,
//forceaudio:true,
trigger:{
player:'useCardAfter'
},
@ -1436,7 +1436,8 @@ game.import('character',function(lib,game,ui,get,ai,_status){
else{
player.addTempSkill('nzry_lijun2','phaseUseEnd');
var zhu=result.targets[0];
player.logSkill('nzry_lijun1',zhu);
player.line(zhu,'green');
zhu.logSkill('nzry_lijun1');
var list=[];
for(var i=0;i<trigger.cards.length;i++){
if(get.position(trigger.cards[i],true)=='o'){
@ -4015,7 +4016,7 @@ game.import('character',function(lib,game,ui,get,ai,_status){
},
songwei:{
unique:true,
global:'songwei2',
group:'songwei2',
audio:"songwei2",
zhuSkill:true,
},
@ -4023,37 +4024,22 @@ game.import('character',function(lib,game,ui,get,ai,_status){
audio:2,
audioname:['re_caopi'],
forceaudio:true,
trigger:{player:'judgeEnd'},
trigger:{global:'judgeEnd'},
filter:function(event,player){
if(player.group!='wei') return false;
if(get.color(event.result.card)!='black') return false;
return game.hasPlayer(function(target){
return player!=target&&target.hasZhuSkill('songwei',player);
});
if(event.player==player||event.player.group!='wei') return false;
if(event.result.color!='black') return false;
return player.hasZhuSkill('songwei',event.player);
},
direct:true,
content:function(){
'step 0'
var list=game.filterPlayer(function(current){
return current!=player&&current.hasZhuSkill('songwei',player);
});
list.sortBySeat();
event.list=list;
trigger.player.chooseBool('是否发动【颂威】,令'+get.translation(player)+'摸一张牌?').set('choice',get.attitude(trigger.player,player)>0);
'step 1'
if(event.list.length){
var current=event.list.shift();
event.current=current;
player.chooseBool('是否发动【颂威】,令'+get.translation(current)+'摸一张牌?').set('choice',get.attitude(player,current)>0);
}
else{
event.finish();
}
'step 2'
if(result.bool){
player.logSkill('songwei',event.current);
event.current.draw();
player.logSkill('songwei2');
trigger.player.line(player,'green');
player.draw();
}
event.goto(1);
}
},
jiezi:{
@ -4494,54 +4480,39 @@ game.import('character',function(lib,game,ui,get,ai,_status){
},
baonue:{
unique:true,
global:'baonue2',
group:'baonue2',
audio:'baonue2',
zhuSkill:true,
},
baonue2:{
audio:2,
audioname:['re_dongzhuo'],
forceaudio:true,
trigger:{source:'damageSource'},
//forceaudio:true,
trigger:{global:'damageSource'},
filter:function(event,player){
if(player.group!='qun') return false;
return game.hasPlayer(function(target){
return player!=target&&target.hp<target.maxHp&&target.hasZhuSkill('baonue',player);
});
if(player==event.source||event.player.group!='qun') return false;
return player.hasZhuSkill('baonue',event.player);
},
direct:true,
content:function(){
'step 0'
var list=game.filterPlayer(function(target){
return player!=target&&target.hp<target.maxHp&&target.hasZhuSkill('baonue',player);
});
list.sortBySeat();
event.list=list;
trigger.player.chooseBool(get.prompt('baonue',player)).set('choice',get.attitude(trigger.player,player)>0);
'step 1'
if(event.list.length){
var current=event.list.shift();
event.current=current;
player.chooseBool(get.prompt('baonue',current)).set('choice',get.attitude(player,current)>0);
}
else{
event.finish();
}
'step 2'
if(result.bool){
player.logSkill('baonue',event.current);
player.judge(function(card){
player.logSkill('baonue');
trigger.player.line(player,'green')
trigger.player.judge(function(card){
if(get.suit(card)=='spade') return 4;
return 0;
});
}
else{
event.goto(1);
event.finish();
}
'step 3'
if(result.suit=='spade'){
event.current.recover();
player.recover();
}
event.goto(1);
}
},
luanwu:{
@ -6395,16 +6366,20 @@ game.import('character',function(lib,game,ui,get,ai,_status){
huangtian:{
unique:true,
audio:'huangtian2',
audioname:['zhangjiao','re_zhangjiao'],
global:'huangtian2',
zhuSkill:true,
},
huangtian2:{
audio:2,
audioname:['zhangjiao'],
enable:'phaseUse',
discard:false,
line:true,
prepare:'give',
direct:true,
prepare:function(cards,player,targets){
targets[0].logSkill('huangtian');
player.$give(cards,targets[0]);
},
prompt:function(){
var player=_status.event.player;
var list=game.filterPlayer(function(target){
@ -6418,19 +6393,22 @@ game.import('character',function(lib,game,ui,get,ai,_status){
if(player.group!='qun') return false;
if(player.countCards('h','shan')+player.countCards('h','shandian')==0) return 0;
return game.hasPlayer(function(target){
return target!=player&&target.hasZhuSkill('huangtian',player);
return target!=player&&target.hasZhuSkill('huangtian',player)&&!target.hasSkill('huangtian3');
});
},
filterCard:function(card){
return (card.name=='shan'||card.name=='shandian')
},
log:false,
visible:true,
filterTarget:function(card,player,target){
return target!=player&&target.hasZhuSkill('huangtian',player);
return target!=player&&target.hasZhuSkill('huangtian',player)&&!target.hasSkill('huangtian3');
},
usable:1,
forceaudio:true,
//usable:1,
//forceaudio:true,
content:function(){
target.gain(cards,player);
target.addTempSkill('huangtian3','phaseUseEnd');
},
ai:{
expose:0.3,
@ -6439,7 +6417,8 @@ game.import('character',function(lib,game,ui,get,ai,_status){
target:5
}
}
}
},
huangtian3:{},
},
//废除装备栏时显示的卡牌
card:{

View File

@ -7149,8 +7149,8 @@ game.import('character',function(lib,game,ui,get,ai,_status){
filterTarget:function(card,player,target){
if(target==player) return false;
if(ui.selected.targets.length){
return !ui.selected.targets[0].hasSkillTag('noCompareSource')&&target.countCards('h')
&&!target.hasSkillTag('noCompareTarget')&&target.distanceTo(ui.selected.targets[0])<=1;
return ui.selected.targets[0]!=target&&!ui.selected.targets[0].hasSkillTag('noCompareSource')&&target.countCards('h')
&&!target.hasSkillTag('noCompareTarget');
}
return true;
},
@ -7204,7 +7204,7 @@ game.import('character',function(lib,game,ui,get,ai,_status){
audio:2,
unique:true,
limited:true,
trigger:{player:'damageEnd'},
trigger:{player:'phaseZhunbeiBegin'},
animationColor:'thunder',
skillAnimation:'legend',
filter:function(event,player){
@ -7246,6 +7246,7 @@ game.import('character',function(lib,game,ui,get,ai,_status){
player.logSkill('yongdi',result.targets);
var target=result.targets[0];
target.gainMaxHp(true);
target.recover();
var mode=get.mode();
if(mode=='identity'||(mode=='versus'&&_status.mode=='four')){
if(target.name&&lib.character[target.name]){
@ -9633,8 +9634,53 @@ game.import('character',function(lib,game,ui,get,ai,_status){
player.awakenSkill('fenxin_old');
}
},
xisheng:{
enable:'chooseToUse',
usable:1,
viewAs:{name:'tao'},
viewAsFilter:function(player){
return player!=_status.currentPhase&&player.countCards('he')>1;
},
selectCard:2,
filterCard:true,
position:'he',
ai:{
save:true,
skillTagFilter:function(){
return lib.skill.xisheng.viewAsFilter.apply(this,arguments)
},
},
},
shulv:{
inherit:'zhiheng',
prompt:'弃置一张牌并摸一张牌',
selectCard:1,
filter:function(event,player){
return player.countCards('h')>player.hp;
},
},
qingyi:{
group:['qingyi1','qingyi2']
audio:'qingyi1',
trigger:{player:'phaseJudgeBefore'},
direct:true,
content:function(){
"step 0"
var check= player.countCards('h')>2;
player.chooseTarget(get.prompt("qingyi"),"跳过判定阶段和摸牌阶段,视为对一名其他角色使用一张【杀】",function(card,player,target){
if(player==target) return false;
return player.canUse({name:'sha'},target,false);
}).set('check',check).set('ai',function(target){
if(!_status.event.check) return 0;
return get.effect(target,{name:'sha'},_status.event.player);
});
"step 1"
if(result.bool){
player.logSkill('qingyi',result.targets);
player.useCard({name:'sha'},result.targets[0],false);
trigger.cancel();
player.skip('phaseDraw');
}
},
},
qingyi1:{
audio:true,
@ -14058,9 +14104,9 @@ game.import('character',function(lib,game,ui,get,ai,_status){
zhenlue:'缜略',
zhenlue_info:'锁定技,你使用的普通锦囊牌不能被无懈可击响应;你不能成为其他角色的延时类锦囊的目标',
jianshu:'间书',
jianshu_info:'限定技,出牌阶段,你可以将一张黑色手牌交给一名其他角色,并选择一名攻击范围内含有其的另一名其他角色,然后令这两名角色拼点,赢的角色弃置两张牌,没赢的角色失去一点体力',
jianshu_info:'限定技,出牌阶段,你可以将一张黑色手牌交给一名其他角色,并选择另一名其他角色,然后令这两名角色拼点,赢的角色弃置两张牌,没赢的角色失去一点体力',
yongdi:'拥嫡',
yongdi_info:'限定技,当你受到伤害后,你可令一名其他男性角色增加一点体力上限,然后若该角色的武将牌上有主公技且其不为主公,其获得此主公技',
yongdi_info:'限定技,准备阶段开始时,你可令一名其他男性角色增加一点体力上限并回复1点体力,然后若该角色的武将牌上有主公技且其不为主公,其获得此主公技',
gushe:'鼓舌',
gushe_bg:'舌',
gushe_info:'出牌阶段限一次你可以用一张手牌与至多三名角色同时拼点然后依次结算拼点结果没赢的角色选择一项1.弃置一张牌2.令你摸一张牌。若你没赢你获得一个“饶舌”标记你有7个饶舌标记时你死亡',
@ -14171,7 +14217,11 @@ game.import('character',function(lib,game,ui,get,ai,_status){
qingyi:'轻逸',
qingyi1:'轻逸',
qingyi2:'轻逸',
qingyi_info:'你可以跳过摸牌阶段,或跳过出牌阶段并弃置一张装备牌,若如此则视为对任意一名使用一张【杀】',
qingyi_info:'你可以跳过判定阶段和摸牌阶段,视为对任意一名角色使用一张【杀】。',
shulv:'熟虑',
shulv_info:'出牌阶段限一次,若你的手牌数大于体力值,则你可以弃置一张牌并摸一张牌。',
xisheng:'牺牲',
xisheng_info:'每名其他角色的回合限一次,你可以将两张牌当做【桃】使用。',
dujin:'独进',
dujin_info:'摸牌阶段你可以额外摸X+1张牌X为你装备区里牌数的一半且向下取整',
yuhua:'羽化',

View File

@ -876,13 +876,16 @@ game.import('character',function(lib,game,ui,get,ai,_status){
},
paoxiao:{
audio:2,
firstDo:true,
audioname:['re_zhangfei','guanzhang','xiahouba'],
trigger:{player:'useCard'},
trigger:{player:'useCard1'},
forced:true,
filter:function(event,player){
return event.card.name=='sha'&&player.getStat().card.sha>1&&event.getParent().type=='phase';
return !event.audioed&&event.card.name=='sha'&&player.countUsed('sha',true)>1&&event.getParent().type=='phase';
},
content:function(){
trigger.audioed=true;
},
content:function(){},
mod:{
cardUsable:function(card,player,num){
if(card.name=='sha') return Infinity;
@ -1650,12 +1653,11 @@ game.import('character',function(lib,game,ui,get,ai,_status){
filter:function(event,player){
if(event.player==player) return false;
if(!player.hasZhuSkill('jiuyuan')) return false;
if(player.hp>0) return false;
if(event.player.group!='wu') return false;
return true;
},
content:function(){
player.recover();
trigger.baseDamage++;
}
},
xinjiuyuan:{

View File

@ -4860,7 +4860,16 @@ game.import('character',function(lib,game,ui,get,ai,_status){
if(!player.countCards('h','jiu')) return false;
},
respondSha:true,
}
},
audio:2,
trigger:{player:['useCard1','respond']},
firstDo:true,
forced:true,
filter:function(event,player){
return event.card.name=='sha'&&!event.skill&&
event.cards.length==1&&event.cards[0].name=='jiu';
},
content:function(){},
},
xinxianzhen:{
audio:'xianzhen',
@ -6014,7 +6023,16 @@ game.import('character',function(lib,game,ui,get,ai,_status){
if(player.hp!=1) return false;
},
respondSha:true,
}
},
audio:2,
trigger:{player:['useCard1','respond']},
firstDo:true,
forced:true,
filter:function(event,player){
return event.card.name=='sha'&&!event.skill&&
event.cards.length==1&&event.cards[0].name=='shan';
},
content:function(){},
},
wurong:{
enable:'phaseUse',

192
game/NoSleep.js Normal file

File diff suppressed because one or more lines are too long

View File

@ -1,5 +1,5 @@
window.noname_asset_list=[
'1.9.96.9',
'1.9.97',
'audio/background/aozhan_chaoming.mp3',
'audio/background/aozhan_online.mp3',
'audio/background/aozhan_rewrite.mp3',
@ -810,6 +810,8 @@ window.noname_asset_list=[
'audio/skill/hongyuan2.mp3',
'audio/skill/huaiyi1.mp3',
'audio/skill/huaiyi2.mp3',
'audio/skill/huangtian2_re_zhangjiao1.mp3',
'audio/skill/huangtian2_re_zhangjiao2.mp3',
'audio/skill/huangtian2_zhangjiao1.mp3',
'audio/skill/huangtian2_zhangjiao2.mp3',
'audio/skill/huangtian21.mp3',
@ -2002,8 +2004,8 @@ window.noname_asset_list=[
'audio/skill/sibian2.mp3',
'audio/skill/songshu1.mp3',
'audio/skill/songshu2.mp3',
'audio/skill/songwei_re_caopi1.mp3',
'audio/skill/songwei_re_caopi2.mp3',
'audio/skill/songwei2_re_caopi1.mp3',
'audio/skill/songwei2_re_caopi2.mp3',
'audio/skill/tianxiang_re_xiaoqiao1.mp3',
'audio/skill/tianxiang_re_xiaoqiao2.mp3',
'audio/skill/tiaoxin_re_jiangwei1.mp3',

View File

@ -126,16 +126,21 @@
name:'屏幕常亮',
init:false,
unfrequent:true,
intro:'防止屏幕自动关闭',
intro:'防止屏幕自动关闭<br>注旧版本通过NoSleep.js实现的屏幕常亮可能会影响外置音频的音量',
onclick:function(bool){
game.saveConfig('keep_awake',bool);
if(window.plugins&&window.plugins.insomnia){
if(bool){
window.plugins.insomnia.keepAwake();
if(window.plugins&&window.plugins.insomnia) window.plugins.insomnia.keepAwake();
else if(window.noSleep){
document.addEventListener(lib.config.touchscreen?'touchend':'click', function enableNoSleepX() {
document.removeEventListener(lib.config.touchscreen?'touchend':'click', enableNoSleepX, false);
window.noSleep.enable();
}, false);
}
}
else{
window.plugins.insomnia.allowSleepAgain();
}
if(window.plugins&&window.plugins.insomnia) window.plugins.insomnia.allowSleepAgain();
else if(window.noSleep) window.noSleep.disable();
}
}
},
@ -40943,8 +40948,18 @@
if(lib.config.show_statusbar_ios=='overlay'){
document.body.classList.add('statusbar');
}
if(lib.config.keep_awake&&window.plugins&&window.plugins.insomnia){
window.plugins.insomnia.keepAwake();
if(lib.config.keep_awake){
if(window.plugins&&window.plugins.insomnia) window.plugins.insomnia.keepAwake();
else{
lib.init.js(lib.assetURL+'game','NoSleep',function(){
var noSleep = new NoSleep();
document.addEventListener(lib.config.touchscreen?'touchend':'click', function enableNoSleep() {
document.removeEventListener(lib.config.touchscreen?'touchend':'click', enableNoSleep, false);
noSleep.enable();
window.noSleep=noSleep;
}, false);
});
}
}
lib.init.cssstyles();

View File

@ -38,6 +38,7 @@ window.noname_source_list=[
'game/game.js',
'game/http.js',
'game/jszip.js',
'game/NoSleep.js',
'game/package.js',
'game/phantom.js',
'game/pressure.js',

View File

@ -1,19 +1,21 @@
window.noname_update={
version:'1.9.96.9.1',
update:'1.9.96.9',
version:'1.9.97',
update:'1.9.96.9.1',
changeLog:[
'界吕蒙SP贾诩调整',
'屏幕常亮全版本适配',
'BUG修复',
],
files:[
//'card/extra.js',
//'card/huanlekapai.js',
//'card/sp.js',
//'card/standard.js',
'card/standard.js',
//'card/swd.js',
//'card/guozhan.js',
//'card/gwent.js',
//'character/diy.js',
//'character/extra.js',
'character/extra.js',
//'character/hearth.js',
//'character/gujian.js',
//'character/gwent.js',
@ -22,9 +24,9 @@ window.noname_update={
//'character/old.js',
'character/refresh.js',
'character/shenhua.js',
//'character/sp.js',
'character/sp.js',
//'character/tw.js',
//'character/standard.js',
'character/standard.js',
//'character/swd.js',
//'character/xianjian.js',
//'character/xinghuoliaoyuan.js',
@ -34,15 +36,17 @@ window.noname_update={
//'layout/default/layout.css',
//'mode/identity.js',
//'mode/doudizhu.js',
//'mode/guozhan.js',
'mode/guozhan.js',
//'mode/single.js',
//'mode/stone.js',
//'mode/versus.js',
'mode/brawl.js'
'mode/versus.js',
//'mode/boss.js',
'game/game.js',
'game/NoSleep.js',
//'game/config.js',
//'game/package.js',
//'game/asset.js',
//'game/source.js',
'game/source.js',
]
};

View File

@ -368,6 +368,432 @@ game.import('mode',function(lib,game,ui,get,ai,_status){
lib.init.onfree();
},
brawl:{
/*
huanhuazhizhan:{
name:'幻化之战',
mode:'identity',
intro:[
'游戏目标:杀死所有其他角色,成为最后的存活者',
'所有角色改为三血白板,依靠灵力值获得技能灵力值可以通过各种方式获得,除用于换取技能外,还可以在出牌阶段换取一张牌',
'这玩意还没做完 所以先注释了 想玩的可以自己解注释',
],
showcase:function(init){
if(init){
this.nodes=[];
}
else{
while(this.nodes.length){
this.nodes.shift().remove();
}
}
var lx=this.offsetWidth/2-120;
var ly=Math.min(lx,this.offsetHeight/2-60);
var setPos=function(node){
var i=node.index;
var deg=Math.PI/4*i;
var dx=Math.round(lx*Math.cos(deg));
var dy=Math.round(ly*Math.sin(deg));
node.style.transform='translate('+dx+'px,'+dy+'px)';
}
var characterz=['guyong','litong','mazhong','fuwan','chengpu','liaohua','xinxianying','liuyu'];
for(var i=0;i<8;i++){
var node=ui.create.player(null,true);
this.nodes.push(node);
node.init(characterz[i]);
node.classList.add('minskin');
node.node.marks.remove();
node.node.hp.remove();
node.node.count.remove();
node.style.left='calc(50% - 60px)';
node.style.top='calc(50% - 60px)';
node.index=i;
node.style.borderRadius='100%';
node.node.avatar.style.borderRadius='100%';
node.node.name.remove();
setPos(node);
this.appendChild(node);
}
var nodes=this.nodes;
this.showcaseinterval=setInterval(function(){
for(var i=0;i<nodes.length;i++){
nodes[i].index++;
if(nodes[i].index>7){
nodes[i].index=0;
}
setPos(nodes[i]);
}
},1000);
},
init:function(){},
content:{
chooseCharacterBefore:function(){
var skills=[];
var banned=[];
var characters=[];
for(var name in lib.character){
if(!lib.character[name]) continue;
if(lib.filter.characterDisabled(name)) continue;
var skillsx=lib.character[name][3].slice(0);
lib.character[name][2]=3;
lib.character[name][3]=[];
characters.push(name);
var list=skillsx.slice(0);
for(var j=0;j<skillsx.length;j++){
var info=get.info(skillsx[j]);
if(!info){
skillsx.splice(j,1);
list.splice(j--,1);
continue;
}
if(typeof info.derivation=='string') list.push(info.derivation);
else if(Array.isArray(info.derivation)) list.addArray(info.derivation);
}
for(var j=0;j<list.length;j++){
if(skills.contains(list[j])||banned.contains(list[j])) continue;
var info=get.info(list[j]);
if(!info||info.zhuSkill||info.juexingji||info.charlotte||info.limited) continue;
skills.push(list[j]);
}
}
_status.characterlist=characters;
var pack={
skills:skills,
pack:{
character:{
},
skill:{
_lingli:{
mark:true,
intro:{
content:'共有#点灵力',
},
trigger:{
player:'phaseBeginStart',
},
popup:false,
forced:true,
filter:function(event,player){
return player.storage._lingli>1;
},
content:function(){
'step 0'
event.skills=lib.huanhuazhizhan.skills;
var skills=event.skills;
skills.randomSort();
var list=[];
for(var i=0;i<skills[i].length;i++){
if(!player.skillH.contains(skills[i])) list.push(skills[i]);
if(list.length==3) break;
}
if(!list.length){event.finish();return;}
var dialog=game.getSkillDialog(list,'是否消耗2点灵力值获得一个技能');
list.push('cancel2')
if(player.storage._lingli>2) list.push('刷新');
player.chooseControl(list).set('ai',function(){
if(player.skillH.length>2) return 'cancel2';
return 0;
}).dialog=dialog;
'step 1'
if(result.control=='cancel2') event.finish();
else if(result.control=='刷新'){
player.changeLingli(-1);
event.goto(0)
}
else{
event.skill=result.control;
player.changeLingli(-2);
if(player.skillH.length==3){
event.lose=true;
player.chooseControl(player.skillH).prompt='选择失去1个已有技能';
}
}
'step 2'
if(event.lose) player.removeSkillH(result.control);
player.addSkillH(event.skill);
},
},
_lingli_round:{
trigger:{global:'roundStart'},
forced:true,
popup:false,
filter:function(event,player){
return _status._aozhan!=true;
},
content:function(){
player.changeLingli(1);
},
},
_lingli_draw:{
enable:'phaseUse',
filter:function(event,player){
return player.storage._lingli>0;
},
content:function(){
player.changeLingli(-1);
player.draw();
},
},
ai:{
order:10,
result:{
player:function(player){
return (player.storage._lingli-2*(3-player.skillH.length))>0?1:0;
},
},
},
_lingli_save:{
trigger:{target:'useCardToTargeted'},
forced:true,
popup:false,
filter:function(event,player){
return event.card.name=='tao'&&player==_status.toSave;
},
content:function(){
trigger.player.changeLingli(1);
},
},
_hhzz_qiankunbagua:{
trigger:{player:'phaseAfter'},
forced:true,
forceDie:true,
popup:false,
filter:function(event,player){
return event._lastDead!=undefined;
},
content:function(){
var type=get.rand(1,8);
switch(type){
case 1:{
game.countPlayer(function(current){
current.loseHp();
});
break;
}
case 2:{
game.countPlayer(function(current){
current.draw(2);
});
break;
}
case 3:{
trigger._lastDead.revive(3);
trigger._lastDead.draw(3);
break;
}
case 4:{
game.countPlayer(function(current){
var he=current.getCards('he');
if(he.length) current.discard(he.randomGet());
});
break;
}
case 5:{
game.countPlayer(function(current){
current.changeLingli(1);
});
break;
}
case 6:{
var cards=[];
game.countPlayer(function(current){
var card=get.cardPile(function(card){
return !cards.contains(card)&&get.type(card)=='equip';
});
if(card){
cards.push(card);
current.$gain(card,'gain2')
current.gain(card);
}
});
break;
}
case 7:{
game.countPlayer(function(current){
if(current.skillH.length<3){
var skills=lib.huanhuazhizhan.skills;
skills.randomSort();
for(var i=0;i<skills.length;i++){
if(!current.skillH.contains(skills[i])){
current.addSkillH(skills[i]);
break;
}
}
}
});
break;
}
case 8:{
game.log('Unfinished');
break;
}
}
},
},
},
translate:{
_lingli:'灵力',
_lingli_draw:'灵力摸牌',
},
},
get:{
rawAttitude:function(from,to){
if(from==to) return 10;
if(to==_status.toKill) return -20;
return -10;
}
},
eltc:{
gameDraw:function(){
var end=player;
var numx;
var num=function(player){
return player._hSeat>5?5:4;
};
do{
if(typeof num=='function'){
numx=num(player);
}
if(player._hSeat>6) player.changeLingli(1);
player.directgain(get.cards(numx));
player=player.next;
}
while(player!=end);
},
},
eltp:{
addSkillH:function(skill){
this.skillH.add(skill);
this.addSkillLog.apply(this,arguments);
},
removeSkillH:function(skill){
this.skillH.remove(skill);
game.log(this,'失去了技能','#g【'+get.translation(skill)+'】');
this.removeSkill(skill);
},
dieAfter:function(){
var evt=_status.event.getParent('phase');
if(evt) evt._lastDead=this;
if(game.playerx().length==1) game.over(game.me.isAlive());
},
$dieAfter:function(){},
dieAfter2:function(source){
if(source&&!['h_takaranomo1','h_takaramono2','h_female1','h_female2'].contains(this.name)){
source.draw();
source.changeLingli(this==_status.toKill?3:1);
}
if(game.players.length<=4&&!_status._aozhan){
delete _status.toKill;
delete _status.toSave;
ui.huanhuazhizhan.innerHTML='死战模式';
_status._aozhan=true;
game.playBackgroundMusic();
this.$fullscreenpop('死战模式',get.groupnature(this.group,'raw')||'fire');
}
else game.randomMission();
},
logAi:function(){},
hasZhuSkill:function(){return false},
changeLingli:function(num){
if(typeof num!='number') num=1;
if(num>0){
game.log(this,'获得了','#y'+get.cnNumber(num)+'点','灵力');
}
else{
if(-num>this.storage._lingli) num=-this.storage._lingli;
if(num==0) return;
game.log(this,'失去了','#y'+get.cnNumber(-num)+'点','灵力');
}
this.storage._lingli+=num;
this.markSkill('_lingli');
},
},
game:{
playerx:function(){
return game.filterPlayer(function(current){
return true;
});
},
randomMission:function(){
if(_status._aozhan) return;
var list=game.playerx().randomSort();
_status.toKill=list[0];
_status.toSave=list[1];
if(!ui.huanhuazhizhan){
ui.huanhuazhizhan=ui.create.div('.touchinfo.left',ui.window);
if(ui.time3) ui.time3.style.display='none';
}
ui.huanhuazhizhan.innerHTML='击杀'+get.translation(list[0])+',保护'+get.translation(list[1]);
},
getSkillDialog:function(skills,prompt){
var dialog=ui.create.dialog('hidden','forcebutton');
if(prompt) dialog.addText(prompt);
for(var i=0;i<skills.length;i++){
dialog.add('<div class="popup pointerdiv" style="width:80%;display:inline-block"><div class="skill">【'+get.translation(skills[i])+'】</div><div>'+lib.translate[skills[i]+'_info']+'</div></div>');
}
dialog.addText(' <br> ');
return dialog;
},
chooseCharacter:function(){
var next=game.createEvent('chooseCharacter',false);
next.showConfig=true;
next.setContent(function(){
'step 0'
game.zhu=game.players.randomGet();
var i=1;
var current=game.zhu;
while(true){
current.skillH=[];
current._hSeat=i;
current.ai.shown=1;
current.setNickname(get.cnNumber(i,true)+'号位');
for(var ii in lib.huanhuazhizhan.eltp) current[ii]=lib.huanhuazhizhan.eltp[ii];
current=current.next;
i++;
if(current==game.zhu) break;
}
ui.arena.classList.add('choose-character');
game.me.chooseButton(['请选择角色形象',[_status.characterlist.randomRemove(5),'character']],true).onfree=true;
'step 1'
game.me.init(result.links[0]);
var list=['qingyi','shulv','xisheng'];
game.me.chooseControl(list).dialog=game.getSkillDialog(list,'选择要获得的初始技能');
'step 2'
var list=['_lingli','_lingli_round','_lingli_draw','_lingli_save','_hhzz_qiankunbagua'];
for(var i=0;i<list.length;i++){
game.addGlobalSkill(list[i]);
}
game.me.addSkillH(result.control);
game.countPlayer(function(current){
current.storage._lingli=0;
if(!current.name){
current.init(_status.characterlist.randomRemove(1)[0]);
current.addSkillH(['qingyi','shulv','xisheng'].randomGet());
}
});
'step 3'
game.randomMission();
'step 4'
setTimeout(function(){
ui.arena.classList.remove('choose-character');
},500);
});
},
},
};
for(var i in pack.pack){
for(var j in pack.pack[i]) lib[i][j]=pack.pack[i][j];
}
for(var i in pack.eltc) lib.element.content[i]=pack.eltc[i];
for(var i in pack.eltp) lib.element.player[i]=pack.eltp[i];
for(var i in pack.game) game[i]=pack.game[i];
for(var i in pack.get) get[i]=pack.get[i];
lib.huanhuazhizhan=pack;
},
},
},
*/
duzhansanguo:{
name:'毒战三国',
mode:'identity',
@ -547,7 +973,7 @@ game.import('mode',function(lib,game,ui,get,ai,_status){
init:function(){
for(var i in lib.character){
var skills=lib.character[i][3]
if(skills.contains('jizhi')||skills.contains('rejizhi')||skills.contains('lingzhou')){
if(skills.contains('jizhi')||skills.contains('rejizhi')||skills.contains('lingzhou')||skills.contains('sbaiyin')){
delete lib.character[i];
}
}
@ -855,7 +1281,7 @@ game.import('mode',function(lib,game,ui,get,ai,_status){
},
showcase:function(init){
var node=this;
var list=['caoxiu','wenpin','caohong','zhanghe','xiahouyuan','xuhuang','re_xuzhu'];
var list=['caoxiu','wenpin','caohong','zhanghe','re_xiahouyuan','re_xuhuang','re_xuzhu'];
list.randomSort();
list.push('re_caocao');
var func=function(){
@ -954,7 +1380,7 @@ game.import('mode',function(lib,game,ui,get,ai,_status){
}
},
submode:'normal',
list:['caoxiu','wenpin','caohong','zhanghe','xiahouyuan','xuhuang','re_xuzhu'],
list:['caoxiu','wenpin','caohong','zhanghe','re_xiahouyuan','re_xuhuang','re_xuzhu'],
chooseCharacterFixed:true,
chooseCharacterAi:function(player){
if(player==game.zhu){

View File

@ -2446,7 +2446,11 @@ game.import('mode',function(lib,game,ui,get,ai,_status){
},
filter:function (event,player){
if(_status.currentPhase!=player) return false;
return event.card.name=='sha'&&(get.cardCount({name:'sha'},player)==2);
if(event.card.name!='sha') return false;
var history=player.getHistory('useCard',function(evt){
return evt.card.name=='sha';
});
return history&&history.indexOf(event)==1;
},
forced:true,
content:function (){

View File

@ -3787,32 +3787,44 @@ game.import('mode',function(lib,game,ui,get,ai,_status){
["club",4,"bingliang"],
],
choiceThree:[
'zhenji','zhugeliang','sunquan','diaochan',
're_ganning','re_daqiao','re_zhangfei','re_machao','re_simayi','re_zhangliao','re_xuzhu','re_guojia','re_lidian',
//'zhenji','zhugeliang','diaochan','liyan','xuezong','simalang','quyi','re_guojia',
'sunquan',
're_ganning','re_daqiao','re_zhangfei','re_machao','re_simayi','re_zhangliao','re_xuzhu',
're_lidian',
'jiangwei','sunce',
'dianwei','dengai','re_pangde',
'xusheng','chengong','xin_masu',
'madai','lingtong','yufan',
'wangji','yanyan','wangping',
'guyong','jushou','caifuren','zhoucang','liuchen','liyan',
'caiyong','xuezong',
'zhugejin','simalang','sp_sunshangxiang','luzhi','sp_liuqi','quyi',
'mazhong','mayunlu','litong','wenpin'
'guyong','jushou','caifuren','zhoucang','liuchen',
'caiyong',
'zhugejin',
'sp_sunshangxiang','luzhi','sp_liuqi',
'mazhong','mayunlu','litong','wenpin',
'zhugeke','dingfeng',
],
choiceFour:[
'sunquan','zhenji','diaochan','zhugeliang','sunshangxiang','huangyueying',
'sunquan','zhenji','re_diaochan','zhugeliang','sunshangxiang','re_huangyueying',
're_caocao','re_liubei','re_simayi','re_guanyu','re_zhouyu','re_lvbu','re_daqiao','re_zhangfei','re_zhangliao','re_zhaoyun','re_xuzhu','re_machao','re_ganning','re_guojia','re_lidian','re_xiahoudun','re_xushu','re_lvmeng',
're_xiahouyuan','re_xiaoqiao','re_huangzhong',
'yanwen','dianwei','pangtong','taishici','sp_zhugeliang','re_pangde',
'dongzhuo','jiaxu','sunjian','xuhuang','zhurong','jiangwei','sunce',
'wangping','sunliang','wangji','yanyan',
'chengong','zhangchunhua','xin_fazheng','lingtong','wuguotai','caozhi','xusheng',
'xunyou','zhonghui','xin_wangyi','madai','bulianshi','handang','liubiao',
'fuhuanghou','xin_liru','jianyong','panzhangmazhong','yufan','liufeng',
'yj_jushou','caifuren','guyong','zhoucang',
'gongsunyuan','liuchen','xiahoushi','sunxiu','quancong','guotupangji',
'liyan','sundeng','cenhun','guohuanghou','caiyong','xuecong',
'xunyou','zhonghui','xin_wangyi','madai',//'bulianshi',
'handang','liubiao',
'fuhuanghou','xin_liru',//'jianyong',
'panzhangmazhong','yufan','liufeng',
'yj_jushou','caifuren','guyong','zhoucang','sunluban',
'gongsunyuan','liuchen','xiahoushi','sunxiu',//'quancong',
'guotupangji',
'liyan',//'sundeng','cenhun','guohuanghou',
'caiyong','wuxian',//'xuecong',
'liuxie','yuejin','caoang','hetaihou','simalang','mayunlu','zhugejin','sp_machao','zhugeke','sp_caoren',
'dingfeng','heqi','chengyu','wenpin','guanyinping','kanze',
'sp_sunshangxiang','quyi','sp_jiangwei','dongbai','litong','yangxiu','sunqian','sunhao','xiahouba','liuqi','luzhi',
'sp_sunshangxiang','quyi','sp_jiangwei','dongbai',//'litong',
'yangxiu','sunqian','sunhao','xiahouba','liuqi','luzhi',
'zhugeguo','guosi','xf_tangzi','xf_sufei','caohong','mazhong',
],
translate:{
zhu:'主',