This commit is contained in:
libccy 2017-01-23 00:20:59 +08:00
parent f05a9c12f3
commit 336d30f6c8
5 changed files with 289 additions and 28 deletions

View File

@ -12,10 +12,258 @@ character.gujian={
gjqt_xiayize:['male','qun',3,['xuanning','liuguang','yangming']],
gjqt_aruan:['female','wu',3,['zhaolu','jiehuo','yuling']],
// gjqt_xunfang:['female','shu',3,['zhaolu','jiehuo','yuling']],
// gjqt_ouyangshaogong:['male','shu',3,['zhaolu','jiehuo','yuling']],
gjqt_xunfang:['female','shu',3,['qingwu','xfanghua']],
gjqt_ouyangshaogong:['male','shu',3,['yunyin','shishui','duhun']],
},
skill:{
qingwu:{
trigger:{global:'phaseEnd'},
check:function(event,player){
return ai.get.attitude(player,event.player)>0;
},
filter:function(event,player){
var nh=event.player.num('h');
for(var i=0;i<game.players.length;i++){
if(game.players[i]!=event.player&&game.players[i].num('h')<nh){
return false;
}
}
return true;
},
logTarget:'player',
content:function(){
trigger.player.draw();
},
ai:{
expose:0.1
}
},
xfanghua:{
trigger:{target:'useCardToBegin'},
priority:-1,
filter:function(event,player){
return get.color(event.card)=='red'&&player.isDamaged();
},
frequent:true,
content:function(){
player.recover();
},
ai:{
effect:{
target:function(card,player,target,current){
if(get.color(card)=='red'&&target.isDamaged()) return [1,1];
}
}
}
},
duhun:{
enable:'chooseToUse',
filter:function(event,player){
if(event.type!='dying') return false;
if(player!=event.dying) return false;
if(player.maxHp<=1) return false;
if(player.num('h')==0) return false;
return true;
},
filterTarget:function(card,player,target){
return target!=player&&target.num('h')>0&&target.hp>0&&target.hp<=player.maxHp;
},
content:function(){
'step 0'
player.chooseToCompare(target);
'step 1'
if(!result.bool){
player.die();
event.finish();
}
else{
event.num=target.hp-player.hp;
player.loseMaxHp();
}
'step 2'
player.changeHp(event.num);
'step 3'
event.target.changeHp(-event.num);
'step 4'
if(event.target.hp<=0){
event.target.dying({source:player});
}
},
ai:{
order:1,
skillTagFilter:function(player){
if(player.maxHp<=1) return false;
if(player.hp>0) return false;
if(player.num('h')==0) return false;
},
save:true,
result:{
target:-1,
player:1
},
threaten:2
},
},
yunyin:{
trigger:{player:'phaseEnd'},
direct:true,
subSkill:{
count:{
trigger:{player:'useCard'},
forced:true,
popup:false,
silent:true,
filter:function(event,player){
return _status.currentPhase==player;
},
content:function(){
if(!player.storage.yunyin){
player.storage.yunyin=[];
}
var suit=get.suit(trigger.card);
if(suit){
player.storage.yunyin.add(suit);
}
}
},
set:{
trigger:{player:'phaseAfter'},
forced:true,
popup:false,
silent:true,
content:function(){
delete player.storage.yunyin;
}
}
},
filter:function(event,player){
if(!player.storage.yunyin) return true;
var hs=player.get('h');
for(var i=0;i<hs.length;i++){
if(!player.storage.yunyin.contains(get.suit(hs[i]))) return true;
}
return false;
},
group:['yunyin_count','yunyin_set'],
content:function(){
'step 0'
player.chooseToDiscard('he',get.prompt('yunyin'),function(card){
if(!player.storage.yunyin) return true;
return !player.storage.yunyin.contains(get.suit(card));
}).set('logSkill','yunyin').ai=function(card){
return 9-ai.get.value(card);
}
'step 1'
if(!result.bool){
event.finish();
return;
}
var list=[];
for(var i=0;i<lib.inpile.length;i++){
var name=lib.inpile[i];
var type=get.type(name);
if(type=='trick'||type=='basic'){
if(lib.filter.cardEnabled({name:name},player)){
list.push([get.translation(type),'',name]);
}
}
}
var dialog=ui.create.dialog('云音',[list,'vcard']);
player.chooseButton(dialog).ai=function(button){
var name=button.link[2];
var taoyuan=0,nanman=0;
for(var i=0;i<game.players.length;i++){
var eff1=ai.get.effect(game.players[i],{name:'taoyuan'},player,player);
var eff2=ai.get.effect(game.players[i],{name:'nanman'},player,player);
if(eff1>0){
taoyuan++;
}
else if(eff1<0){
taoyuan--;
}
if(eff2>0){
nanman++;
}
else if(eff2<0){
nanman--;
}
}
if(Math.max(taoyuan,nanman)>1){
if(taoyuan>nanman) return name=='taoyuan'?1:0;
return name=='nanman'?1:0;
}
if(player.num('h')<player.hp&&player.hp>=2){
return name=='wuzhong'?1:0;
}
if(player.hp<player.maxHp&&player.hp<3){
return name=='tao'?1:0;
}
return name=='zengbin'?1:0;
}
'step 2'
if(result.bool){
var name=result.links[0][2];
var info=lib.card[name];
var card={name:name};
if(info.selectTarget==-1){
var targets=[];
for(var i=0;i<game.players.length;i++){
if(lib.filter.filterTarget(card,player,game.players[i])){
targets.push(game.players[i]);
}
}
if(targets.length){
targets.sort(lib.sort.seat);
player.useCard(card,targets);
}
event.finish();
}
else{
var next=player.chooseTarget('选择'+get.translation(name)+'的目标');
next._get_card=card;
next.filterTarget=lib.filter.filterTarget;
next.ai=ai.get.effect;
if(typeof info.selectTarget=='function'){
next.selectTarget=info.selectTarget;
}
else{
next.selectTarget=get.select(info.selectTarget);
}
event.card=card;
}
}
else{
event.finish();
}
'step 3'
if(result.bool){
player.useCard(event.card,result.targets);
}
},
ai:{
threaten:1.5,
}
},
shishui:{
trigger:{player:'useCardToBegin'},
filter:function(event,player){
return event.target&&get.color(event.card)=='red';
},
forced:true,
check:function(event,player){
return ai.get.attitude(player,event.player)<0;
},
content:function(){
trigger.target.loseHp();
},
ai:{
effect:{
player:function(card,player,target,current){
if(get.color(card)=='red') return [1,0,1,-2];
}
}
}
},
chizhen:{
trigger:{player:'phaseUseBegin'},
frequent:true,
@ -206,7 +454,7 @@ character.gujian={
if(target[get.subtype(card)]&&target[get.subtype(card)]!=card){
value2=ai.get.value(target[get.subtype(card)],target);
}
return Math.max(0,value1-value2);
return Math.max(0,value1-value2)/5;
}
}
}
@ -1332,11 +1580,24 @@ character.gujian={
gjqt_yinqianshang:'尹千觞',
gjqt_hongyu:'红玉',
gjqt_ouyangshaogong:'欧阳少恭',
gjqt_xunfang:'巽芳',
gjqt_yuewuyi:'乐无异',
gjqt_wenrenyu:'闻人羽',
gjqt_xiayize:'夏夷则',
gjqt_aruan:'阿阮',
qingwu:'轻舞',
qingwu_info:'在一名角色的回合结束阶段,若其手牌数为全场最少或之一,你可以令其摸一张牌',
xfanghua:'芳华',
xfanghua_info:'每当你成为红色牌的目标后,你可以回复一点体力',
yunyin:'云音',
yunyin_info:'回合结束阶段,你可以弃置一张与本回合使用过的卡牌花色均不相同的手牌,视为使用一张基本牌或非延时锦囊牌',
shishui:'逝水',
shishui_info:'锁定技,每当你使用一张红色牌,你令目标流失一点体力',
duhun:'渡魂',
duhun_info:'濒死阶段,你可以与一名体力值不超过你的体力上限的角色拼点,若你赢,你失去一点体力上限并与该角色交换体力值;若你没赢,你立即死亡',
chizhen:'驰阵',
chizhen_info:'出牌阶段开始时你可以摸X张牌并弃置X张牌若你弃置了杀可以视为使用一张决斗X为你已损失的体力值且至少为1',
xidie:'戏蝶',

View File

@ -58,6 +58,7 @@ window.characterRank={
'hs_alakir',
'hs_morgl',
'ow_luxiao',
'gjqt_ouyangshaogong',
],
a:[
'hs_aya',
@ -134,6 +135,7 @@ window.characterRank={
'yxs_luobinhan',
'hs_alleria',
'pal_wenhui',
'gjqt_xunfang',
],
am:[
'swd_duanmeng',

View File

@ -7053,22 +7053,14 @@ character.swd={
"step 0"
target.damage();
"step 1"
if(target.isAlive()){
target.turnOver();
}
else{
event.finish();
}
"step 2"
target.draw(target.maxHp-target.hp);
var he=target.get('he');
target.discard(he.randomGets(target.maxHp-target.hp));
},
ai:{
expose:0.3,
result:{
target:function(player,target){
var eff=ai.get.damageEffect(target,player);
if(target.hp==1) return eff;
return target.maxHp-target.hp-2+eff;
return ai.get.damageEffect(target,player)-(target.maxHp-target.hp)/2;
}
},
order:5
@ -7138,7 +7130,7 @@ character.swd={
}
},
multitarget:true,
line:false,
multiline:true,
selectTarget:[1,3],
ai:{
order:function(){
@ -8871,7 +8863,7 @@ character.swd={
jifeng_info:'你的杀和单体锦囊可以额外指定任意个目标,若如此做,此卡牌有一定机率失效,指定的目标越多失效的概率越大',
mohua_info:'锁定技在身份局中当你进入濒死状态时你立即变身为撒旦体力上限变为现存角色数至少为4并成为其他所有角色的共同敌人',
miles_xueyi_info:'锁定技,你防止即将受到的伤害,然后流失一点体力',
duanyi_info:'出牌阶段限一次,你可以弃置两张杀,对一名角色造成一点伤害,然后其翻面并摸X张牌X为其已损失的体力值',
duanyi_info:'出牌阶段限一次,你可以弃置两张杀,对一名角色造成一点伤害,然后其随机弃置X张牌X为其已损失的体力值',
guxing_info:'出牌阶段你可以将最后至多X张手牌当杀使用此杀无视距离且可以指定至多3个目标每造成一次伤害你摸一张牌为你已损失的体力值且至少为。',
tianlun_info:'任意一名角色的判定生效前,你可以弃置一张场上角色的判定牌代替之',
hlongyin_info:'出牌阶段,你可以弃置任意张颜色相同且点数不同的牌,并获得逆时针座位距离与卡牌点数相同的角色区域内的一张牌。每阶段限一次',

View File

@ -60,7 +60,6 @@
updateURL:'https://raw.githubusercontent.com/libccy/noname/$version$/',
assetURL:'',
hallURL:'websha.cn',
reserveSkillName:['others','zhu','zhuSkill'],
changeLog:[],
updates:[],
canvasUpdates:[],
@ -5274,7 +5273,7 @@
targets.add(game.me);
source.useCard(game.createCard(card.name,card.suit,card.number,card.nature),targets);
},
rank:function(){
r:function(){
var list=lib.rank.s.concat(lib.rank.ap).concat(lib.rank.a).concat(lib.rank.am).
concat(lib.rank.bp).concat(lib.rank.b).concat(lib.rank.bm).concat(lib.rank.c).concat(lib.rank.d);
for(var i in lib.character){
@ -5424,7 +5423,7 @@
cheat.z('liushan');
},
lb:function(){
cheat.z('liubei');
cheat.z('re_liubei');
}
},
translate:{
@ -7020,10 +7019,10 @@
str+='个目标';
}
event.dialog=ui.create.dialog(str);
event.dialog.add('0/'+get.numStr(event.selectTarget[1]));
event.dialog.add('0/'+get.numStr(get.select(event.selectTarget)[1]));
event.custom.add.target=function(){
_status.event.dialog.content.childNodes[1].innerHTML=
ui.selected.targets.length+'/'+get.numStr(_status.event.selectTarget[1]);
ui.selected.targets.length+'/'+get.numStr(get.select(event.selectTarget)[1]);
}
}
else if(get.itemtype(event.dialog)=='dialog'){
@ -14693,6 +14692,9 @@
storage:{},
unequip:{},
undist:{},
others:{},
zhu:{},
zhuSkill:{},
mad:{
mark:true,
intro:{
@ -20332,7 +20334,7 @@
if(target[get.subtype(card)]&&target[get.subtype(card)]!=card){
value2=ai.get.value(target[get.subtype(card)],target);
}
return Math.max(0,value1-value2);
return Math.max(0,value1-value2)/5;
});
}(i));
}
@ -25245,14 +25247,14 @@
name=name[0];
if(currentButton){
if(currentButton.link!=name){
if(lib.reserveSkillName.contains(name)||lib.skill[name]||page.content.pack.skill[name]){
if(lib.skill[name]||page.content.pack.skill[name]){
editnode.classList.add('disabled');
return;
}
}
}
else{
if(lib.reserveSkillName.contains(name)||lib.skill[name]||page.content.pack.skill[name]){
if(lib.skill[name]||page.content.pack.skill[name]){
editnode.classList.add('disabled');
return;
}
@ -25587,7 +25589,7 @@
name=name[0];
if(currentButton){
if(currentButton.link!=name){
if(lib.reserveSkillName.contains(name)||lib.skill[name]||page.content.pack.skill[name]){
if(lib.skill[name]||page.content.pack.skill[name]){
alert('技能名与现有技能重复,请更改\n提示技能名格式为id+|+中文名其中id必须惟一');
return;
}
@ -25598,7 +25600,7 @@
}
}
else{
if(lib.reserveSkillName.contains(name)||lib.skill[name]||page.content.pack.skill[name]){
if(lib.skill[name]||page.content.pack.skill[name]){
alert('技能名与现有技能重复,请更改\n提示技能名格式为id+|+中文名其中id必须惟一');
return;
}
@ -32517,6 +32519,9 @@
var card=get.info(_status.event.skill).viewAs;
if(card) return card;
}
if(_status.event._get_card){
return _status.event._get_card;
}
return ui.selected.cards[0];
},
player:function(){

View File

@ -5,8 +5,9 @@ window.noname_update={
'bug修复',
],
files:[
// 'game/server.js',
// 'character/swd.js',
'game/game.js',
'character/gujian.js',
'character/swd.js',
'character/rank.js',
'character/xianjian.js',
'card/swd.js',