This commit is contained in:
libccy 2016-06-25 14:30:34 +08:00
parent 22c84dea26
commit c4535e7d99
21 changed files with 790 additions and 160 deletions

View File

@ -6,6 +6,7 @@ card.extra={
fullskin:true,
type:"basic",
enable:true,
lianheng:true,
savable:function(card,player,dying){
return dying==player;
},
@ -513,9 +514,6 @@ card.extra={
huogong_bg:'攻',
huogong_info:'目标角色展示一张手牌然后若你能弃掉一张与所展示牌相同花色的手牌则火攻对该角色造成1点火焰伤害。',
tiesuo_bg:'锁',
_chongzhu:'重铸',
_lianhuan:'连环',
_lianhuan2:'连环',
bingliang:'兵粮寸断',
hualiu:'骅骝',
zhuque:'朱雀羽扇',

View File

@ -2,11 +2,360 @@
card.guozhan={
connect:true,
card:{
yuxi:{
mode:['guozhan'],
fullskin:true,
type:'equip',
subtype:'equip5',
skills:['yuxi_skill'],
ai:{
equipValue:9
}
},
xietianzi:{
fullskin:true,
type:'trick',
lianheng:true,
enable:function(card,player){
if(get.mode()=='guozhan'&&!player.isMajor()) return false;
return _status.event.getParent().name=='phaseUse';
},
filterTarget:function(card,player,target){
return player==target;
},
selectTarget:-1,
content:function(){
var evt=_status.event;
for(var i=0;i<10;i++){
if(evt&&evt.getParent){
evt=evt.getParent();
}
if(evt.name=='phaseUse'){
evt.skipped=true;
break;
}
}
target.addSkill('xietianzi');
},
ai:{
order:0.5,
result:{
target:function(player,target){
if(target.num('he')>=2) return 1;
return 0;
}
}
}
},
shuiyanqijunx:{
fullskin:true,
type:'trick',
filterTarget:function(card,player,target){
return target!=player&&target.num('e')>0;
},
enable:true,
content:function(){
'step 0'
target.chooseControl('discard_card','take_damage',function(event,player){
if(ai.get.damageEffect(player,event.player,player,'thunder')>=0){
return 'take_damage';
}
if(player.hp>=3&&player.num('e')>=2){
return 'take_damage';
}
return 'discard_card';
});
'step 1'
if(result.control=='discard_card'){
target.discard(target.get('e'));
}
else{
target.damage('thunder');
}
},
ai:{
result:{
target:function(player,target){
return ai.get.damageEffect(target,player,target,'thunder')*target.num('e');
}
}
}
},
lulitongxin:{
fullskin:true,
type:'trick',
enable:function(card,player){
for(var i=0;i<game.players.length;i++){
if(game.players[i].isMajor()) return true;
}
return false;
},
mode:['guozhan'],
filterTarget:true,
chongzhu:true,
changeTarget:function(player,targets){
var target=targets[0];
for(var i=0;i<game.players.length;i++){
if(game.players[i].isMajor()==target.isMajor()&&game.players[i]!=target){
targets.push(game.players[i]);
}
}
},
content:function(){
if(target.isLinked()){
target.draw();
}
else{
target.link();
}
},
ai:{
order:7.5,
wuxie:function(){
return 0;
},
result:{
player:function(player,target){
var num=0;
for(var i=0;i<game.players.length;i++){
if(target.isMajor()==game.players[i].isMajor()){
if(target.isLinked){
num+=ai.get.attitude(player,target);
}
else{
num-=ai.get.attitude(player,target)*0.8;
}
}
}
return num;
}
}
}
},
lianjunshengyan:{
fullskin:true,
type:'trick',
enable:function(card,player){
return !player.isUnseen();
},
mode:['guozhan'],
filterTarget:function(card,player,target){
return target.identity!='unknown'&&(target.identity!=player.identity||target.identity=='ye');
},
changeTarget:function(player,targets){
var target=targets[0];
targets.push(player);
if(target.identity!='ye'){
for(var i=0;i<game.players.length;i++){
if(target!=game.players[i]&&target.identity==game.players[i].identity){
targets.push(game.players[i]);
}
}
}
},
content:function(){
'step 0'
if(target==player){
target.draw(targets.length-1);
event.finish();
}
else if(target.hp==target.maxHp){
event.directdraw=true;
}
else{
target.chooseControl('draw_card','recover_hp',function(event,target){
if(target.hp>=2||target.hp>=target.maxHp-1) return 'draw_card';
if(target.hp==2&&target.num('h')==0) return 'draw_card';
return 'recover_hp';
});
}
'step 1'
if(!event.directdraw&&result&&result.control=='recover_hp'){
target.recover();
event.finish();
}
else{
target.draw();
}
'step 2'
if(target.isLinked()){
target.link();
}
},
ai:{
order:3,
result:{
player:0.8,
target:1
}
}
},
chiling:{
fullskin:true,
type:'trick',
enable:true,
mode:['guozhan'],
filterTarget:function(card,player,target){
return target.isUnseen();
},
selectTarget:-1,
content:function(){
'step 0'
if(target.num('he',{type:'equip'})){
target.chooseControl('选项一','选项二','选项三',function(){
return Math.random()<0.5?'选项一':'选项二';
}).set('prompt','敕令<br><br><div class="text">选项一:明置一张武将牌,然后摸一张牌</div><br><div class="text">选项二失去1点体力</div><br><div class="text">选项三:弃置一张装备牌</div>');
}
else{
target.chooseControl('选项一','选项二',function(){
if(_status.event.player.hp>=3&&Math.random()<=0.3){
return '选项二';
}
return '选项一';
}).set('prompt','敕令<br><br><div class="text">选项一:明置一张武将牌,然后摸一张牌</div><br><div class="text">选项二失去1点体力</div>');
}
'step 1'
if(result.control=='选项一'){
target.showCharacter(2);
target.draw();
}
else if(result.control=='选项二'){
target.loseHp();
}
else{
target.chooseToDiscard('he',{type:'equip'},true);
}
}
},
diaohulishan:{
fullskin:true,
type:'trick',
lianheng:true,
enable:true,
filterTarget:function(card,player,target){
return target!=player;
},
content:function(){
target.addTempSkill('diaohulishan','phaseAfter');
},
ai:{
order:10,
result:{
player:1,
target:function(player,target){
for(var i=0;i<game.players.length;i++){
if(game.players[i]==target) continue;
if(ai.get.attitude(player,game.players[i])<=ai.get.attitude(player,target)){
if(target==player.next||target==player.previous){
return -1.5;
}
return -1;
}
}
return 0;
}
}
}
},
huxinjing:{
lianheng:true,
fullskin:true,
type:"equip",
subtype:"equip2",
skills:['huxinjing'],
ai:{
basic:{
equipValue:6
},
},
},
huoshaolianying:{
fullskin:true,
type:'trick',
lianheng:true,
filterTarget:function(card,player,target){
if(get.mode()=='guozhan'){
var next=player.getNext();
return target==next||target.inline(next);
}
if(player==target) return false;
var link=false;
for(var i=0;i<game.players.length;i++){
if(game.players[i].isLinked()&&game.players[i]!=player){
link=true;break;
}
}
if(link){
if(!target.isLinked()) return false;
var distance=get.distance(player,target,'absolute');
for(var i=0;i<game.players.length;i++){
if(target!=game.players[i]&&
game.players[i]!=player&&
game.players[i].isLinked()){
if(get.distance(player,game.players[i],'absolute')<distance){
return false;
}
if(get.distance(player,game.players[i],'absolute')==distance&&
parseInt(game.players[i].dataset.position)<parseInt(target.dataset.position)){
return false;
}
}
}
return true;
}
else{
var dist=get.distance(player,target);
for(var i=0;i<game.players.length;i++){
if(game.players[i]!=player&&get.distance(player,game.players[i])<dist) return false;
}
return true;
}
},
enable:true,
selectTarget:-1,
content:function(){
target.damage('fire');
},
ai:{
order:5,
value:6,
tag:{
damage:1,
natureDamage:1,
fireDamage:1,
},
result:{
target:function(player,target){
if(target.hasSkillTag('nofire')||target.hasSkillTag('nodamage')) return 0;
if(target.skills.contains('xuying')&&target.num('h')==0) return 0;
if(!target.isLinked()){
return ai.get.damageEffect(target,player,target,'fire');
}
var num=0;
for(var i=0;i<game.players.length;i++){
if(game.players[i].isLinked()){
var eff=ai.get.damageEffect(game.players[i],player,target,'fire');
if(eff>0){
num++;
}
else if(eff<0){
num--;
}
}
}
return num;
}
}
}
},
yuanjiao:{
audio:true,
fullskin:true,
type:'trick',
enable:true,
enable:function(card,player){
if(get.mode()=='guozhan'&&player.isUnseen()) return false;
return true;
},
filterTarget:function(card,player,target){
if(get.mode()!='guozhan') return player!=target;
if(target.identity=='unknown'||player.identity=='unknown') return false;
@ -171,10 +520,254 @@ card.guozhan={
fullskin:true,
type:'equip',
subtype:'equip4',
lianheng:true,
distance:{globalFrom:-1},
},
},
skill:{
yuxi_skill:{
trigger:{player:'phaseDrawBegin'},
forced:true,
content:function(){
trigger.num++;
},
ai:{
threaten:1.3
},
group:'yuxi_skill2'
},
yuxi_skill2:{
trigger:{player:'phaseUseBegin'},
forced:true,
filter:function(event,player){
for(var i=0;i<game.players.length;i++){
if(player.canUse({name:'zhibi'},game.players[i])) return true;
}
return false;
},
content:function(){
'step 0'
player.chooseTarget('玉玺:选择知己知彼的目标',function(card,player,target){
return player.canUse({name:'zhibi'},target);
},true).set('ai',function(target){
var player=_status.event.player;
return ai.get.effect(target,{name:'zhibi'},player,player);
});
'step 1'
if(result.bool){
player.useCard({name:'zhibi'},result.targets);
}
}
},
xietianzi:{
trigger:{player:'phaseAfter'},
filter:function(event,player){
return player.num('he')>0;
},
forced:true,
popup:false,
content:function(){
"step 0"
player.removeSkill('xietianzi');
player.chooseToDiscard('he','是否弃置一张牌并获得一个额外回合?').set('ai',function(card){
return 10-ai.get.value(card);
});
"step 1"
if(result.bool){
player.phase();
}
},
},
_chiling1:{
mode:['guozhan'],
trigger:{player:'discardAfter'},
filter:function(event,player){
for(var i=0;i<event.cards.length;i++){
if(event.cards[i].name=='chiling'&&get.position(event.cards[i])=='d'){
return true;
}
}
return false;
},
forced:true,
popup:false,
content:function(){
var cards=[];
for(var i=0;i<trigger.cards.length;i++){
if(trigger.cards[i].name=='chiling'&&get.position(trigger.cards[i])=='d'){
cards.push(trigger.cards[i]);
}
}
if(cards.length){
for(var i=0;i<cards.length;i++){
cards[i].remove();
}
_status.chiling=true;
player.popup('敕令');
}
},
},
_chiling2:{
mode:['guozhan'],
trigger:{player:'judgeAfter'},
forced:true,
popup:false,
filter:function(event,player){
if(event.result.card.parentNode.id!='discardPile') return false;
return event.result.card.name=='chiling';
},
content:function(){
_status.chiling=true;
trigger.result.card.remove();
player.popup('敕令');
}
},
_chiling3:{
mode:['guozhan'],
trigger:{player:'phaseAfter'},
forced:true,
popup:false,
filter:function(){
return _status.chiling;
},
content:function(){
'step 0'
var targets=game.filterPlayer(function(target){
return target.isUnseen();
});
targets.sort(lib.sort.seat);
event.targets=targets;
'step 1'
if(event.targets.length){
var target=event.targets.shift();
event.current=target;
if(target.num('he',{type:'equip'})){
target.chooseControl('选项一','选项二','选项三',function(){
return Math.random()<0.5?'选项一':'选项二';
}).set('prompt','敕令<br><br><div class="text">选项一:明置一张武将牌,然后摸一张牌</div><br><div class="text">选项二失去1点体力</div><br><div class="text">选项三:弃置一张装备牌</div>');
}
else{
target.chooseControl('选项一','选项二',function(){
if(_status.event.player.hp>=3&&Math.random()<=0.3){
return '选项二';
}
return '选项一';
}).set('prompt','敕令<br><br><div class="text">选项一:明置一张武将牌,然后摸一张牌</div><br><div class="text">选项二失去1点体力</div>');
}
}
else{
event.finish();
}
'step 2'
var target=event.current;
if(result.control=='选项一'){
target.showCharacter(2);
target.draw();
}
else if(result.control=='选项二'){
target.loseHp();
}
else{
target.chooseToDiscard('he',{type:'equip'},true);
}
'step 3'
event.goto(1);
}
},
_diaohulishan:{
trigger:{player:'useCardAfter'},
forced:true,
popup:false,
filter:function(event,player){
return event.card.name=='diaohulishan';
},
content:function(){
player.draw();
}
},
diaohulishan:{
mod:{
cardEnabled:function(){
return false;
},
targetEnabled:function(){
return false;
}
},
mark:true,
intro:{
content:'不计入距离的计算且不能使用牌且不是牌的合法目标'
},
group:'undist'
},
huxinjing:{
trigger:{player:'damageBegin'},
priority:10,
forced:true,
filter:function(event){
return event.num>0;
},
content:function(){
trigger.num--;
player.addSkill('huxinjing2');
}
},
huxinjing2:{
trigger:{player:'damageEnd'},
priority:10,
forced:true,
popup:false,
content:function(){
var cards=player.get('e','huxinjing');
if(cards.length){
player.discard(cards);
}
}
},
_lianheng:{
mode:['guozhan'],
enable:'phaseUse',
prompt:'将可连横的牌交给一名与你势力不同的角色,或未确定势力的角色,若你交给与你势力不同的角色,则你摸一张牌',
filter:function(event,player){
return (player.get('h',function(card){
return get.info(card).lianheng;
}).length);
},
filterCard:function(card){
return get.info(card).lianheng;
},
filterTarget:function(card,player,target){
if(target==player) return false;
if(player.isUnseen()) return target.isUnseen();
if(player.identity=='ye') return true;
return target.identity!=player.identity;
},
prepare:function(cards,player,targets){
player.$give(cards,targets[0]);
},
discard:false,
delay:0.5,
content:function(){
"step 0"
target.gain(cards);
"step 1"
if(!target.isUnseen()){
player.draw();
}
},
ai:{
basic:{
order:2
},
result:{
player:function(player,target){
if(target.isUnseen()) return 0;
return 0.5;
},
target:1
},
}
},
wuliu_skill:{},
_wuliu_skill2:{
mod:{
@ -230,13 +823,37 @@ card.guozhan={
},
},
translate:{
yuxi_skill:'玉玺',
yuxi_skill2:'玉玺',
yuxi:'玉玺',
yuxi_info:'锁定技,若你有明置的武将牌,你的势力视为唯一的大势力;锁定技,摸牌阶段,若你有明置的武将牌,你多摸一张牌;锁定技,出牌阶段开始时,若你有明置的武将牌,你视为使用【知己知彼】',
xietianzi:'挟令',
xietianzi_info:'出牌阶段,对自己使用。你结束出牌阶段,若如此做,此回合结束时,你可以弃置一张牌,获得一个额外的回合',
xietianzi_info_guozhan:'出牌阶段,对为大势力角色的你使用。你结束出牌阶段,若如此做,此回合结束时,你可以弃置一张牌,获得一个额外的回合',
shuiyanqijunx:'水淹七军',
shuiyanqijunx_info:'出牌阶段对一名装备区里有牌的其他角色使用。目标角色选择一项1、弃置装备区里的所有牌2、受到你造成的1点雷电伤害',
lulitongxin:'勠力同心',
lulitongxin_info:'出牌阶段,对所有大势力角色或所有小势力角色使用。若目标角色:不处于“连环状态”,其横置;处于“连环状态”,其摸一张牌',
lianjunshengyan:'联军盛宴',
lianjunshengyan_info:'出牌阶段对你和你选择的除你的势力外的一个势力的所有角色。若目标角色为你你摸X张牌X为该势力的角色数不为你其选择一项1、回复1点体力2、摸一张牌然后重置',
chiling:'敕令',
chiling_info:'出牌阶段对所有没有势力的角色使用。目标角色选择一项1、明置一张武将牌然后摸一张牌2、弃置一张装备牌3、失去1点体力。当【敕令】因判定或弃置而置入弃牌堆时系统将之移出游戏然后系统于当前回合结束后视为对所有没有势力的角色使用【敕令】',
diaohulishan:'调虎离山',
diaohulishan_info:'出牌阶段,对至多两名其他角色使用。目标角色于此回合结束之前不计入距离的计算且不能使用牌且不是牌的合法目标。此牌结算结束时,你摸一张牌',
_lianheng:'连横',
huoshaolianying:'火烧连营',
huoshaolianying_bg:'烧',
huoshaolianying_info_guozhan:'出牌阶段,对你的下家和与其处于同一队列的角色使用,每名角色受到一点火焰伤害',
huoshaolianying_info:'对离你最近的一名横置角色使用(若无横置角色则改为对距离你最近的所有角色使用),对目标造成一点火焰伤害',
yuanjiao:'远交近攻',
yuanjiao_info:'对一名不同势力的角色使用对方摸一张牌然后你摸3张牌非国战模式中改为摸1张',
yuanjiao_info_guozhan:'对一名不同势力的角色使用对方摸一张牌然后你摸3张牌',
yuanjiao_info:'对一名其他角色使用,你与其各摸一张牌',
yuanjiao_bg:'交',
zhibi:'知己知彼',
zhibi_info:'出牌阶段对一名其他角色使用,观看其手牌或装备牌',
zhibi_info:'出牌阶段对一名其他角色使用,观看其手牌或武将牌',
yiyi:'以逸待劳',
yiyi_info:'对与自己势力相同的所有角色使用,摸两张牌然后弃置两张牌(非国战模式改为任意指定三名角色)',
yiyi_info_guozhan:'对与自己势力相同的所有角色使用,摸两张牌然后弃置两张牌',
yiyi_info:'对与任意三名角色使用,摸两张牌然后弃置两张牌',
yiyi_bg:'逸',
wuliu:'吴六剑',
wuliu_info:'其他与装备者势力相同的角色攻击范围+1',
@ -247,6 +864,9 @@ card.guozhan={
jingfanma_bg:'-马',
jingfanma:'惊帆',
jingfanma_info:'其他角色与你的距离-1',
huxinjing_bg:'镜',
huxinjing:'护心镜',
huxinjing_info:'抵消一点伤害',
},
list:[
['heart',9,'yuanjiao'],
@ -260,5 +880,21 @@ card.guozhan={
["spade",4,'shunshou'],
["spade",12,'guohe'],
["spade",11,'wuxie'],
['spade',3,'huoshaolianying','fire'],
['club',11,'huoshaolianying','fire'],
['heart',12,'huoshaolianying','fire'],
['club',2,'huxinjing'],
['heart',2,'diaohulishan'],
['diamond',10,'diaohulishan'],
['heart',1,'lianjunshengyan'],
['club',3,'chiling'],
['spade',12,'lulitongxin'],
['club',10,'lulitongxin'],
['club',12,'shuiyanqijunx'],
['heart',13,'shuiyanqijunx'],
['spade',1,'xietianzi'],
['diamond',1,'xietianzi'],
['diamond',4,'xietianzi'],
['club',1,'yuxi'],
],
}

View File

@ -17,17 +17,6 @@ card.yunchou={
},
},
},
huxinjing:{
fullskin:true,
type:"equip",
subtype:"equip2",
skills:['huxinjing'],
ai:{
basic:{
equipValue:6
},
},
},
chenhuodajie:{
fullskin:true,
type:'trick',
@ -86,80 +75,6 @@ card.yunchou={
}
}
},
huoshaolianying:{
fullskin:true,
type:'trick',
filterTarget:function(card,player,target){
if(player==target) return false;
var link=false;
for(var i=0;i<game.players.length;i++){
if(game.players[i].isLinked()&&game.players[i]!=player){
link=true;break;
}
}
if(link){
if(!target.isLinked()) return false;
var distance=get.distance(player,target,'absolute');
for(var i=0;i<game.players.length;i++){
if(target!=game.players[i]&&
game.players[i]!=player&&
game.players[i].isLinked()){
if(get.distance(player,game.players[i],'absolute')<distance){
return false;
}
if(get.distance(player,game.players[i],'absolute')==distance&&
parseInt(game.players[i].dataset.position)<parseInt(target.dataset.position)){
return false;
}
}
}
return true;
}
else{
var dist=get.distance(player,target);
for(var i=0;i<game.players.length;i++){
if(game.players[i]!=player&&get.distance(player,game.players[i])<dist) return false;
}
return true;
}
},
enable:true,
selectTarget:-1,
content:function(){
target.damage('fire');
},
ai:{
order:5,
value:6,
tag:{
damage:1,
natureDamage:1,
fireDamage:1,
},
result:{
target:function(player,target){
if(target.hasSkillTag('nofire')||target.hasSkillTag('nodamage')) return 0;
if(target.skills.contains('xuying')&&target.num('h')==0) return 0;
if(!target.isLinked()){
return ai.get.damageEffect(target,player,target,'fire');
}
var num=0;
for(var i=0;i<game.players.length;i++){
if(game.players[i].isLinked()){
var eff=ai.get.damageEffect(game.players[i],player,target,'fire');
if(eff>0){
num++;
}
else if(eff<0){
num--;
}
}
}
return num;
}
}
}
},
yihuajiemu:{
fullskin:true,
type:'trick',
@ -756,31 +671,6 @@ card.yunchou={
},
},
skill:{
huxinjing:{
trigger:{player:'damageBegin'},
priority:10,
forced:true,
filter:function(event){
return event.num>0;
},
content:function(){
trigger.num--;
player.addSkill('huxinjing2');
// player.discard(player.get('e','2'));
}
},
huxinjing2:{
trigger:{player:'damageEnd'},
priority:10,
forced:true,
popup:false,
content:function(){
var cards=player.get('e','huxinjing');
if(cards.length){
player.discard(cards);
}
}
},
suolianjia:{
trigger:{player:'damageBefore'},
filter:function(event){
@ -883,9 +773,6 @@ card.yunchou={
suolianjia:'锁链甲',
suolianjia_info:'锁定技,你防止即将受到的属性伤害,当装备时进入连环状态,当卸下时解除连环状态',
suolianjia_bg:'链',
huxinjing_bg:'镜',
huxinjing:'护心镜',
huxinjing_info:'抵消一点伤害',
geanguanhuo:'隔岸观火',
geanguanhuo_info:'指定任意两名角色进行拚点拚点输的一方掉1点血若点数一样则使用该锦囊的角色掉1点血。拚点的牌不用丢弃。',
toulianghuanzhu:'偷梁换柱',
@ -895,13 +782,10 @@ card.yunchou={
yihuajiemu_info:'将一名角色的宝物牌转移至另一名角色',
fudichouxin:'釜底抽薪',
fudichouxin_info:'与一名角色进行拼点,若成功则获得双方拼点牌',
shuiyanqijun:'水淹七军',
shuiyanqijun:'水',
shuiyanqijun_info:'令所有有装备的角色各弃置一张装备牌',
shushangkaihua:'树上开花',
shushangkaihua_info:'使用者与手牌数最少的所有角色各摸一张牌',
huoshaolianying:'火烧连营',
huoshaolianying_bg:'烧',
huoshaolianying_info:'对离你最近的一名横置角色使用(若无横置角色则改为对距离你最近的所有角色使用),对目标造成一点火焰伤害',
chenhuodajie:'趁火打劫',
chenhuodajie_info:'任意一名其他角色受到伤害时对其使用,获得其一张牌',
huoshan:'火山',
@ -949,8 +833,6 @@ card.yunchou={
['club',10,'toulianghuanzhu'],
['spade',11,'toulianghuanzhu'],
['spade',13,'guohe'],
['heart',7,'huoshaolianying','fire'],
['diamond',12,'huoshaolianying','fire'],
['heart',6,'shushangkaihua'],
['club',1,'shushangkaihua'],
['diamond',6,'chenhuodajie'],
@ -958,6 +840,5 @@ card.yunchou={
['club',3,'chenhuodajie'],
['club',13,'suolianjia'],
['spade',9,'huxinjing'],
],
}

View File

@ -52,14 +52,14 @@ card.zhenfa={
tianfuzhen:{
type:'zhenfa',
chongzhu:true,
enable:true,
enable:function(){
for(var i=0;i<game.players.length;i++){
if(game.players[i].isMajor()) return true;
}
return false;
},
filterTarget:function(card,player,target){
if(target.get('he').length==0) return false;
if(target.identity=='unknown'||target.identity=='ye') return false;
var wei=get.population('wei'),shu=get.population('shu'),wu=get.population('wu'),qun=get.population('qun');
if(wei<=1&&shu<=1&&wu<=1&&qun<=1) return false;
var max=Math.max(wei,shu,wu,qun);
return get.population(target.identity)==max;
return target.isMajor()&&target.num('he')>0;
},
selectTarget:-1,
content:function(){
@ -79,16 +79,16 @@ card.zhenfa={
dizaizhen:{
type:'zhenfa',
chongzhu:true,
enable:true,
enable:function(){
for(var i=0;i<game.players.length;i++){
if(game.players[i].isMinor()) return true;
}
return false;
},
multitarget:true,
multiline:true,
filterTarget:function(card,player,target){
if(target.identity=='unknown') return false;
var wei=get.population('wei'),shu=get.population('shu'),wu=get.population('wu'),qun=get.population('qun');
if(wei<=1&&shu<=1&&wu<=1&&qun<=1) return false;
if(target.identity=='ye') return true;
var max=Math.max(wei,shu,wu,qun);
return get.population(target.identity)!=max;
return target.isMinor();
},
selectTarget:-1,
content:function(){
@ -363,10 +363,10 @@ card.zhenfa={
shepanzhen_info:'令我方所有角色进入队列状态',
yunchuizhen_info:'令所有围攻角色获得技能【无双】,直到其首次造成伤害',
fengyangzhen_info:'令所有被围攻角色获得技能【飞影】,直到其首次受到伤害',
dizaizhen_info:'令势力数不是最多的所有角色摸一张牌',
dizaizhen_info:'所有小势力角色摸一张牌',
changshezhen_info:'与你同一队列的所有角色摸一张牌',
pozhenjue_info:'将所有角色的顺序随机重排',
tianfuzhen_info:'令势力数最多的所有角色弃置一张牌'
tianfuzhen_info:'所有大势力角色弃置一张牌'
},
list:[
["diamond",1,'changshezhen'],

View File

@ -81,6 +81,39 @@ character.hearth={
hs_malfurion:['hs_malorne'],
},
skill:{
wzhanyi:{
trigger:{player:'phaseUseBefore'},
check:function(event,player){
return player.num('h')+2<=player.hp;
},
content:function(){
'step 0'
event.cards=get.cards(3);
trigger.untrigger();
trigger.finish();
player.$draw(event.cards.slice(0));
for(var i=0;i<event.cards.length;i++){
if(get.type(event.cards[i])=='equip'){
player.equip(event.cards[i]);
event.cards.splice(i--,1);
}
}
player.gain(event.cards);
'step 1'
if(player.num('h','sha')){
player.chooseToUse('战意:使用一张杀').filterCard=function(card){
return card.name=='sha'&&get.itemtype(card)=='card';
}
}
else{
event.finish();
}
'step 2'
if(result.bool){
event.goto(1);
}
}
},
shengteng:{
trigger:{source:'damageEnd'},
forced:true,
@ -4574,7 +4607,7 @@ character.hearth={
hs_xialikeer:'夏克里尔',
wzhanyi:'战意',
wzhanyi_info:'你可以跳过出牌阶段,改为摸三张牌,然后可以使用你摸到的牌',
wzhanyi_info:'你可以跳过出牌阶段,改为摸三张牌并展示之,将摸到的装备牌置于装备区,然后可以使用手牌中的杀',
shengteng:'升腾',
shengteng_info:'锁定技,每当你使用锦囊牌造成伤害,你增加一点体力上限并回复一点体力',
yuansu:'元素',

View File

@ -1016,7 +1016,12 @@ character.sp={
player.storage.xunzhi=0;
},
filter:function(event,player){
return player.hp!=player.previousSeat.hp&&player.hp!=player.nextSeat.hp;
var previous=player.getPrevious();
var next=player.getNext();
if(previous&&next){
return player.hp!=previous.hp&&player.hp!=next.hp;
}
return false;
},
check:function(event,player){
return player.hp>=3&&player.num('h')>player.hp+1;
@ -4045,6 +4050,7 @@ character.sp={
trigger:{player:'phaseUseBegin'},
forced:true,
popup:false,
silent:true,
content:function(){
delete player.storage.qiangwu;
}

View File

@ -450,7 +450,7 @@ character.swd={
return -att/2;
};
"step 1"
if(result.bool){
if(result.bool&&result.targets[0]){
var target=result.targets[0];
player.logSkill('guozao',target);
var cards=target.get('h');

View File

@ -1060,7 +1060,7 @@ character.yijiang={
'step 1'
player.chooseControl('选项一','选项二',function(){
return Math.random()<0.5?'选项一':'选项二';
}).set('prompt','督粮<br><br><div class="text">选项一:令其观看牌堆顶的两张牌,然后获得其中的基本牌</div><br><div class="text">选项二:令其于下个摸牌阶段额外摸一张牌</br>');
}).set('prompt','督粮<br><br><div class="text">选项一:令其观看牌堆顶的两张牌,然后获得其中的基本牌</div><br><div class="text">选项二:令其于下个摸牌阶段额外摸一张牌</div>');
'step 2'
if(result.control=='选项一'){
var cards=get.cards(2);

View File

@ -22,6 +22,7 @@ window.noname_asset_list=[
'image/card/cixiong.png',
'image/card/dawan.png',
'image/card/dilu.png',
'image/card/diaohulishan.png',
'image/card/donghuangzhong.png',
'image/card/dujian.png',
'image/card/dujian1.png',
@ -80,8 +81,10 @@ window.noname_asset_list=[
'image/card/langeguaiyi.png',
'image/card/lebu.png',
'image/card/lianyaohu.png',
'image/card/lianjunshengyan.png',
'image/card/linghunzhihuo.png',
'image/card/liuxinghuoyu.png',
'image/card/lulitongxin.png',
'image/card/muniu.png',
'image/card/nanman.png',
'image/card/nvwashi.png',
@ -98,6 +101,7 @@ window.noname_asset_list=[
'image/card/shan.png',
'image/card/shandian.png',
'image/card/shandianjian.png',
'image/card/chiling.png',
'image/card/shenenshu.png',
'image/card/shengdong.png',
'image/card/shennongding.png',
@ -105,6 +109,7 @@ window.noname_asset_list=[
'image/card/shihuawuqi.png',
'image/card/shijieshu.png',
'image/card/shuiyanqijun.png',
'image/card/shuiyanqijunx.png',
'image/card/shunshou.png',
'image/card/shushangkaihua.png',
'image/card/spell_ansezhadan.jpg',
@ -256,6 +261,7 @@ window.noname_asset_list=[
'image/card/wuxingpan.png',
'image/card/wuzhong.png',
'image/card/xiangyuye.png',
'image/card/xietianzi.png',
'image/card/xingjiegoutong.png',
'image/card/xingjunyan.png',
'image/card/xixueguizhihuan.png',
@ -263,6 +269,7 @@ window.noname_asset_list=[
'image/card/yihuajiemu.png',
'image/card/yiyi.png',
'image/card/yuanjiao.png',
'image/card/yuxi.png',
'image/card/yuansuhuimie.png',
'image/card/yufulu.png',
'image/card/zengbin.png',

View File

@ -56,7 +56,7 @@
};
var lib={
configprefix:'noname_0.9_',
versionOL:11,
versionOL:12,
updateURL:localStorage.getItem('noname_update_url')||'http://websha.cn/',
assetURL:'',
hallURL:'websha.cn',
@ -3658,9 +3658,9 @@
}
});
}
if(lib.config.debug&&window.require){
window.require('remote').getCurrentWindow().openDevTools();
}
// if(lib.config.debug&&window.require){
// window.require('remote').getCurrentWindow().openDevTools();
// }
ui.background=ui.create.div('.background');
ui.background.style.backgroundSize="cover";
if(lib.config.image_background&&lib.config.image_background!='default'&&lib.config.image_background!='custom'){
@ -4619,7 +4619,8 @@
mad:'混乱',
mad_bg:'疯',
draw_card:'摸牌',
discard_card:'弃牌',
discard_card:'弃牌',
take_damage:'受伤害',
reset_character:'重置武将牌',
recover_hp:'回复体力',
lose_hp:'流失体力',
@ -4650,6 +4651,9 @@
eight:'八',
nine:'九',
ten:'十',
_chongzhu:'重铸',
_lianhuan:'连环',
_lianhuan2:'连环',
},
element:{
playerproto:{
@ -4730,7 +4734,7 @@
"step 0";
player.chooseToUse();
"step 1"
if(result.bool){
if(result.bool&&!event.skipped){
event.goto(0);
}
game.broadcastAll(function(){
@ -7779,6 +7783,26 @@
}(i));
}
},
getNext:function(){
var target=this;
for(var i=0;i<game.players.length-1;i++){
target=target.next;
if(!target.hasSkill('undist')){
return target;
}
}
return null;
},
getPrevious:function(){
var target=this;
for(var i=0;i<game.players.length-1;i++){
target=target.previous;
if(!target.hasSkill('undist')){
return target;
}
}
return null;
},
get:function(arg1,arg2,arg3,arg4){
var i,j;
if(arg1=='s'){
@ -8663,6 +8687,9 @@
if(!next.targets){
next.targets=[];
}
if(next.card&&get.info(next.card)&&get.info(next.card).changeTarget){
get.info(next.card).changeTarget(next.player,next.targets);
}
for(var i=0;i<next.targets.length;i++){
if(ai.get.attitude(this,next.targets[i])>=-1&&ai.get.attitude(this,next.targets[i])<0){
if(!this.ai.tempIgnore) this.ai.tempIgnore=[];
@ -9813,7 +9840,7 @@
return false;
},
hasSkill:function(skill){
return this.get('s').contains(skill);
return game.expandSkills(this.get('s')).contains(skill);
},
hasSkillTag:function(tag,hidden){
var skills=game.expandSkills(this.get('s',hidden));
@ -12085,6 +12112,7 @@
global:[],
storage:{},
unequip:{},
undist:{},
mad:{
mark:true,
intro:{
@ -17769,7 +17797,11 @@
finishCards:function(){
_status.cardsFinished=true;
var i,j,k;
var mode=get.mode();
for(i in lib.card){
if(lib.translate[i+'_info_'+mode]){
lib.translate[i+'_info']=lib.translate[i+'_info_'+mode];
}
var card=lib.card[i];
if(card.type=='equip'){
if(card.enable==undefined) card.enable=true;
@ -17826,14 +17858,17 @@
}
}
for(i in lib.skill){
if(lib.skill[i].forbid&&lib.skill[i].forbid.contains(get.mode())){
if(lib.translate[i+'_info_'+mode]){
lib.translate[i+'_info']=lib.translate[i+'_info_'+mode];
}
if(lib.skill[i].forbid&&lib.skill[i].forbid.contains(mode)){
lib.skill[i]={};
if(lib.translate[i+'_info']){
lib.translate[i+'_info']='此模式下不可用';
}
continue;
}
if(lib.skill[i].mode&&lib.skill[i].mode.contains(get.mode())==false){
if(lib.skill[i].mode&&lib.skill[i].mode.contains(mode)==false){
lib.skill[i]={};
if(lib.translate[i+'_info']){
lib.translate[i+'_info']='此模式下不可用';
@ -21622,7 +21657,7 @@
}
if(!ui.arena.classList.contains('menupaused')){
ui.click.configMenu();
ui.click.menuTab('帮助');
ui.click.menuTab('其它');
}
var proceed=function(){
@ -27119,14 +27154,14 @@
for(var iwhile=0;iwhile<totalPopulation;iwhile++){
if(player.nextSeat!=to){
player=player.nextSeat;
if(player.isAlive()&&!player.isOut()&&!player.isMin(true)) n++;
if(player.isAlive()&&!player.isOut()&&!player.hasSkill('undist')&&!player.isMin(true)) n++;
}
else{
break;
}
}
for(i=0;i<game.players.length;i++){
if(game.players[i].isOut()||game.players[i].isMin(true)) length--;
if(game.players[i].isOut()||game.players[i].hasSkill('undist')||game.players[i].isMin(true)) length--;
}
if(method=='absolute') return n;
if(from.isDead()) length++;

View File

@ -1,14 +1,23 @@
window.noname_update={
version:'1.8.15.5',
version:'1.8.16',
changeLog:[
'修bug',
'新卡(国战)',
],
files:{
global:[
'character/rank.js',
'character/ow.js',
'character/sp.js',
'character/hearth.js',
'character/yijiang.js',
'card/swd.js',
'card/extra.js',
'card/zhenfa.js',
'card/hearth.js',
'card/guozhan.js',
'card/yunchou.js',
'mode/guozhan.js',
'mode/chess.js',
'mode/identity.js',
'game/game.js',

BIN
image/card/chiling.png Normal file

Binary file not shown.

After

Width:  |  Height:  |  Size: 210 KiB

Binary file not shown.

Before

Width:  |  Height:  |  Size: 26 KiB

After

Width:  |  Height:  |  Size: 37 KiB

BIN
image/card/diaohulishan.png Normal file

Binary file not shown.

After

Width:  |  Height:  |  Size: 218 KiB

Binary file not shown.

Before

Width:  |  Height:  |  Size: 40 KiB

After

Width:  |  Height:  |  Size: 62 KiB

Binary file not shown.

After

Width:  |  Height:  |  Size: 222 KiB

BIN
image/card/lulitongxin.png Normal file

Binary file not shown.

After

Width:  |  Height:  |  Size: 221 KiB

Binary file not shown.

After

Width:  |  Height:  |  Size: 238 KiB

BIN
image/card/xietianzi.png Normal file

Binary file not shown.

After

Width:  |  Height:  |  Size: 223 KiB

BIN
image/card/yuxi.png Normal file

Binary file not shown.

After

Width:  |  Height:  |  Size: 92 KiB

View File

@ -992,6 +992,31 @@ mode.guozhan={
}
return true;
},
isMajor:function(){
if(this.identity=='ye'||this.identity=='unknown') return false;
var list=[];
for(var i=0;i<game.players.length;i++){
if(game.players[i].num('e','yuxi')){
if(game.players[i].identity!='ye'&&game.players[i].identity!='unknown'){
list.add(game.players[i].identity);
}
}
}
if(list.length){
return list.contains(this.identity);
}
var wei=get.population('wei'),shu=get.population('shu'),wu=get.population('wu'),qun=get.population('qun');
if(wei<=1&&shu<=1&&wu<=1&&qun<=1) return false;
return get.population(this.identity)==Math.max(wei,shu,wu,qun);
},
isMinor:function(){
for(var i=0;i<game.players.length;i++){
if(game.players[i].isMajor()){
return !this.isMajor();
}
}
return false;
},
logAi:function(targets,card){
if(this.ai.shown==1) return;
if(typeof targets=='number'){