新卡、牌堆

This commit is contained in:
libccy 2015-09-16 15:31:41 +08:00
parent 1e9830fb9d
commit 926d643187
8 changed files with 457 additions and 25 deletions

View File

@ -4,26 +4,13 @@ card.compensate={
['club',8,'guohe'], ['club',8,'guohe'],
['spade',13,'guohe'], ['spade',13,'guohe'],
["heart",4,"huogong","fire"], ['diamond',8,'shunshou'],
["diamond",5,"huogong","fire"], ['heart',5,'shunshou'],
["diamond",10,"huogong","fire"],
["diamond",13,"huogong","fire"],
["heart",1,"juedou"],
["diamond",1,"juedou"],
["club",1,"juedou"],
["heart",12,"wuzhong"],
["diamond",3,"wuzhong"],
["club",10,"wuxie"], ["club",10,"wuxie"],
["spade",10,"wuxie"], ["spade",10,"wuxie"],
["spade",11,"wuxie"], ["spade",11,"wuxie"],
// ['heart',5,'jiu'],
// ['spade',9,'jiu'],
// ['spade',2,'jiu'],
['heart',8,'tao'], ['heart',8,'tao'],
['heart',10,'tao'], ['heart',10,'tao'],

View File

@ -449,6 +449,7 @@ card.extra={
huogong:'火攻', huogong:'火攻',
tiesuo:'铁锁连环', tiesuo:'铁锁连环',
huogong_bg:'攻', huogong_bg:'攻',
huogong_info:'目标角色展示一张手牌然后若你能弃掉一张与所展示牌相同花色的手牌则火攻对该角色造成1点火焰伤害。',
tiesuo_bg:'锁', tiesuo_bg:'锁',
_chongzhu:'重铸', _chongzhu:'重铸',
_lianhuan:'连环', _lianhuan:'连环',
@ -514,7 +515,7 @@ card.extra={
["spade",2,"tengjia",'fire'], ["spade",2,"tengjia",'fire'],
["club",2,"tengjia",'fire'], ["club",2,"tengjia",'fire'],
["spade",1,"guding"], ["spade",1,"guding"],
["diamond",2,"zhuque",'fire'], ["diamond",1,"zhuque",'fire'],
["heart",2,"huogong","fire"], ["heart",2,"huogong","fire"],
["heart",3,"huogong","fire"], ["heart",3,"huogong","fire"],

View File

@ -249,5 +249,8 @@ card.guozhan={
['diamond',6,'wuliu'], ['diamond',6,'wuliu'],
['diamond',12,'sanjian'], ['diamond',12,'sanjian'],
['heart',3,'jingfanma'], ['heart',3,'jingfanma'],
["spade",4,'shunshou'],
["spade",12,'guohe'],
["spade",11,'wuxie'],
], ],
} }

View File

@ -1,7 +1,407 @@
'use strict'; 'use strict';
card.hearth={ card.hearth={
card:{ card:{
jihuocard:{
type:'basic',
enable:true,
filterTarget:function(card,player,target){
return player==target;
},
selectTarget:-1,
content:function(){
target.skip('phaseDiscard');
if(target.num('h')<=target.hp){
target.draw();
}
},
ai:{
order:1,
result:{
target:1
}
}
},
zhaomingdan:{
type:'trick',
chongzhu:true,
enable:function(card,player){
for(var i=0;i<game.players.length;i++){
if(game.players[i]!=player&&game.players[i].num('j')) return true;
}
return false;
},
filterTarget:function(card,player,target){
return player!=target&&target.num('j')>0;
},
content:function(){
target.discard(target.get('j'));
},
ai:{
order:9.5,
value:1,
result:{
target:function(player,target){
var js=target.get('j');
var num=0;
for(var i=0;i<js.length;i++){
var jj=js[i].viewAs?{name:js[i].viewAs}:js[i];
if(jj.name=='zhaomingdan') num++;
else if(js.length==1&&ai.get.effect(target,jj,target,player)>=0){
num--;
}
else{
num++;
}
}
return num;
}
}
}
},
yexinglanghun:{
enable:true,
type:'trick',
filterTarget:function(card,player,target){
return !target.isMin();
},
content:function(){
'step 0'
var cards=[];
for(var i=0;i<2;i++){
var card=get.cardPile(function(card){
return get.type(card)=='equip';
});
if(card){
ui.special.appendChild(card);
cards.push(card);
}
}
switch(cards.length){
case 1:{
target.$gain(cards[0]);
game.delay();
break;
}
case 2:{
target.$gain(cards[0]);
setTimeout(function(){
target.$gain(cards[1]);
},250);
game.delay();
break;
}
}
event.cards=cards;
'step 1'
if(event.cards.length){
target.equip(event.cards.shift());
game.delay(0.5);
if(event.cards.length){
event.redo();
}
}
'step 2'
game.delay(0.5);
'step 3'
var hs=player.get('h');
if(hs.length){
player.discard(hs.randomGet());
}
},
ai:{
order:9,
value:6,
useful:2,
result:{
target:function(player,target){
return Math.max(0,2-target.num('e'));
},
player:-0.5
}
}
},
shandianjian:{
type:'trick',
enable:true,
filterTarget:function(card,player,target){
if(player!=game.me&&player.num('h')<2) return false;
return target.num('h')>0;
},
content:function(){
"step 0"
if(target.get('h').length==0){
event.finish();
return;
}
var rand=Math.random()<0.5;
target.chooseCard(true).ai=function(card){
if(rand) return Math.random();
return ai.get.value(card);
};
"step 1"
event.dialog=ui.create.dialog(get.translation(target.name)+'展示的手牌',result.cards);
event.card2=result.cards[0];
game.log(get.translation(target.name)+'展示了'+get.translation(event.card2));
player.chooseToDiscard(function(card){
return get.suit(card)==get.suit(_status.event.parent.card2);
},function(card){
if(ai.get.damageEffect(target,player,player,'thunder')>0){
return 6-ai.get.value(card,_status.event.player);
}
return -1;
}).prompt=false;
game.delay(2);
"step 2"
if(result.bool){
target.damage('thunder');
}
else{
target.addTempSkill('shandianjian2','phaseBegin');
}
event.dialog.close();
},
ai:{
basic:{
order:4,
value:[3,1],
useful:1,
},
result:{
player:function(player){
var nh=player.num('h');
if(nh<=player.hp&&_status.event.name=='chooseToUse'){
if(_status.event.filterCard&&
_status.event.filterCard({name:'shandianjian'})){
return -10;
}
if(_status.event.skill){
var viewAs=get.info(_status.event.skill).viewAs;
if(viewAs=='shandianjian') return -10;
if(viewAs&&viewAs.name=='shandianjian') return -10;
}
}
return 0;
},
target:function(player,target){
if(target.skills.contains('shandianjian2')||target.num('h')==0) return 0;
if(target==player){
if(_status.event.filterCard&&
_status.event.filterCard({name:'shandianjian'})){
return -1.5;
}
if(_status.event.skill){
var viewAs=get.info(_status.event.skill).viewAs;
if(viewAs=='shandianjian') return -1.5;
if(viewAs&&viewAs.name=='shandianjian') return -1.5;
}
return 0;
}
return -1.5;
}
},
tag:{
damage:1,
thunderDamage:1,
natureDamage:1,
}
}
},
shihuawuqi:{
type:'basic',
enable:true,
usable:1,
filterTarget:function(card,player,target){
return player==target;
},
selectTarget:-1,
content:function(){
player.addTempSkill('shihuawuqi','phaseAfter');
if(!player.num('h','sha')){
var card=get.cardPile('sha');
if(card){
player.gain(card,'gain2');
}
}
},
ai:{
value:4,
useful:2,
order:8,
result:{
target:function(player,target){
return target.num('h','sha')?0:1;
}
}
}
},
siwangchanrao:{
enable:true,
type:'trick',
filterTarget:function(card,player,target){
return player!=target&&target.num('h')>0;
},
selectTarget:1,
content:function(){
'step 0'
var hs=target.get('h');
if(hs.length){
target.discard(hs.randomGet());
}
'step 1'
if(!target.num('h')){
player.draw();
}
},
ai:{
order:9,
value:4,
useful:1,
result:{
target:-1,
player:function(player,target){
if(target.num('h')==1) return 1;
}
}
}
},
dunpaigedang:{
enable:true,
type:'trick',
filterTarget:function(card,player,target){
return player==target;
},
selectTarget:-1,
content:function(){
target.changeHujia();
target.draw();
},
ai:{
order:8.5,
value:7,
useful:3,
result:{
target:1
}
}
},
chuansongmen:{
type:'basic',
enable:true,
discard:false,
selectTarget:-1,
filterTarget:function(card,player,target){
return target==player;
},
usable:3,
content:function(){
'step 0'
ui.special.appendChild(cards[0]);
player.storage.chuansongmen=cards[0];
var gained=get.cards()[0];
target.gain(gained,'gain2');
if(lib.filter.filterCard(gained,player,event.parent.parent)){
var next=player.chooseToUse();
next.filterCard=function(card){
return card==gained;
};
next.prompt='是否使用'+get.translation(gained)+'';
}
else{
ui.discardPile.appendChild(cards[0]);
event.finish();
}
'step 1'
if(result.bool){
player.gain(cards,'gain2');
}
else{
ui.discardPile.appendChild(cards[0]);
}
},
ai:{
order:9.5,
value:7,
useful:2,
result:{
target:1
}
}
},
tanshezhiren:{
type:'trick',
enable:function(){
for(var i=0;i<game.players.length;i++){
if(game.players[i].num('h')) return true;
}
return false;
},
filterTarget:function(card,player,target){
return target.num('h')>0;
},
selectTarget:-1,
multitarget:true,
multiline:true,
content:function(){
'step 0'
for(var i=0;i<targets.length;i++){
if(!targets[i].num('h')) target.splice(i--,1);
}
if(targets.contains(player)){
event.current=player;
}
else{
event.current=targets.randomGet();
}
if(!targets.length) event.finish();
'step 1'
var current=targets.randomGet(event.current);
event.current.line(current);
var hs=current.get('h');
if(hs.length){
current.discard(hs.randomGet());
}
if(hs.length>1){
event.current=current;
event.redo();
}
},
ai:{
order:8,
result:{
target:-1
}
}
},
xingjiegoutong:{
type:'basic',
enable:true,
selectTarget:-1,
filterTarget:function(card,player,target){return player==target},
content:function(){
target.gainMaxHp();
target.loseHp();
},
ai:{
basic:{
useful:[1,1],
value:[1,1],
},
order:1,
result:{
target:function(player,target){
if(target.hp==target.maxHp){
if(target.num('h','tao')) return 1;
if(target.num('h','caoyao')) return 1;
if(target.num('h','zhiliaobo')) return 1;
if(target.num('h')<target.hp) return 1;
}
return 0;
},
},
}
},
shenenshu:{ shenenshu:{
fullskin:true,
enable:true, enable:true,
usable:1, usable:1,
filterTarget:function(card,player,target){ filterTarget:function(card,player,target){
@ -131,7 +531,14 @@ card.hearth={
} }
}, },
skill:{ skill:{
shihuawuqi:{
mod:{
attackFrom:function(from,to,distance){
return distance-2;
}
}
},
shandianjian2:{},
}, },
translate:{ translate:{
shenenshu:'神恩术', shenenshu:'神恩术',
@ -140,6 +547,26 @@ card.hearth={
zhiliaobo_info:'对一名受伤角色使用,令其回复一点体力,若其仍处于受伤状态,则进行一次判定,若结果为红色则再回复一点体力', zhiliaobo_info:'对一名受伤角色使用,令其回复一点体力,若其仍处于受伤状态,则进行一次判定,若结果为红色则再回复一点体力',
yuansuhuimie:'元素毁灭', yuansuhuimie:'元素毁灭',
yuansuhuimie_info:'对所有有手牌的角色使用令目标弃置1~2张牌并受到2-X点雷电伤害X为其弃置的手牌数', yuansuhuimie_info:'对所有有手牌的角色使用令目标弃置1~2张牌并受到2-X点雷电伤害X为其弃置的手牌数',
xingjiegoutong:'星界沟通',
xingjiegoutong_info:'增加一点体力上限,然后流失一点体力',
tanshezhiren:'弹射之刃',
tanshezhiren_info:'弃置一名随机角色的手牌,重复此过程直到有一名角色失去最后一张手牌',
chuansongmen:'传送门',
chuansongmen_info:'摸一张牌若你能立即使用之则将此牌回手每回合最多使用3次',
dunpaigedang:'盾牌格挡',
dunpaigedang_info:'获得一点护甲值,摸一张牌',
siwangchanrao:'死亡缠绕',
siwangchanrao_info:'弃置一名其他角色的一张手牌,若其此时没有手牌,则你摸一张牌',
shihuawuqi:'石化武器',
shihuawuqi_info:'本回合内攻击范围+2若你手牌中没有杀则从牌堆中获得一张杀',
shandianjian:'闪电箭',
shandianjian_info:'目标角色展示一张手牌然后若你能弃掉一张与所展示牌相同花色的手牌则对该角色造成1点雷电伤害。',
yexinglanghun:'野性狼魂',
yexinglanghun_info:'目标随机装备牌堆中的两张装备牌,使用者随机弃置一张手牌',
zhaomingdan:'照明弹',
zhaomingdan_info:'弃置一名其他角色判定区内的所有牌',
jihuocard:'激活',
jihuocard_info:'跳过本回合的弃牌阶段,若你手牌数不大于当前体力值,则摸一张牌',
}, },
list:[ list:[
['heart',2,'shenenshu'], ['heart',2,'shenenshu'],
@ -147,5 +574,19 @@ card.hearth={
['club',7,'zhiliaobo'], ['club',7,'zhiliaobo'],
['spade',1,'zhiliaobo'], ['spade',1,'zhiliaobo'],
['spade',13,'yuansuhuimie'], ['spade',13,'yuansuhuimie'],
['spade',13,'xingjiegoutong'],
['diamond',2,'tanshezhiren'],
['diamond',2,'chuansongmen'],
['heart',2,'chuansongmen'],
['club',3,'dunpaigedang'],
['club',1,'siwangchanrao'],
['club',3,'shihuawuqi'],
['spade',10,'shihuawuqi'],
['club',3,'shandianjian'],
['spade',1,'shandianjian'],
['spade',7,'yexinglanghun'],
['diamond',5,'zhaomingdan'],
['heart',10,'zhaomingdan'],
['diamond',2,'jihuocard'],
], ],
} }

View File

@ -1413,7 +1413,7 @@ card.standard={
shandian:'闪电', shandian:'闪电',
shandian_bg:'电', shandian_bg:'电',
sha_info:'出牌阶段,对攻击范围内的一名角色使用,令其打出一张【闪】或受到一点伤害。', sha_info:'出牌阶段,对攻击范围内的一名角色使用,令其打出一张【闪】或受到一点伤害。',
shan_info:'', shan_info:'闪避一张杀',
tao_info:'出牌阶段,对自己使用,回复一点体力。', tao_info:'出牌阶段,对自己使用,回复一点体力。',
bagua_info:'每当你需要使用或打出一张【闪】时,你可以进行一次判定,若判定结果为红色,视为你使用或打出了一张【闪】。', bagua_info:'每当你需要使用或打出一张【闪】时,你可以进行一次判定,若判定结果为红色,视为你使用或打出了一张【闪】。',
bagua_skill_info:'每当你需要使用或打出一张【闪】时,你可以进行一次判定,若判定结果为红色,视为你使用或打出了一张【闪】。', bagua_skill_info:'每当你需要使用或打出一张【闪】时,你可以进行一次判定,若判定结果为红色,视为你使用或打出了一张【闪】。',
@ -1548,8 +1548,8 @@ card.standard={
["spade",3,'guohe'], ["spade",3,'guohe'],
["spade",4,'guohe'], ["spade",4,'guohe'],
["spade",12,'guohe'], ["spade",12,'guohe'],
["diamond",3,'guohe'], ["club",3,'guohe'],
["diamond",4,'guohe'], ["club",4,'guohe'],
["heart",12,'guohe'], ["heart",12,'guohe'],
["club",12,'jiedao'], ["club",12,'jiedao'],
["club",13,'jiedao'], ["club",13,'jiedao'],

View File

@ -717,8 +717,7 @@ character.hearth={
for(var i=0;i<hs.length;i++){ for(var i=0;i<hs.length;i++){
if(hs[i].name!=event.card.name){ if(hs[i].name!=event.card.name){
var card=hs[i]; var card=hs[i];
if(card.name=='caoyao'||card.name=='dujian'||card.name=='sha'||card.name=='jiu'|| if(get.type(card)=='basic'&&get.info(card.enable)){
card.name=='tianxianjiu'||card.name=='tao'||card.name=='xiangyuye'){
return true; return true;
} }
} }
@ -732,8 +731,9 @@ character.hearth={
var att=ai.get.attitude(player,trigger.player); var att=ai.get.attitude(player,trigger.player);
player.chooseCard('是否发动【变形】?',function(card){ player.chooseCard('是否发动【变形】?',function(card){
if(card.name!=trigger.card.name){ if(card.name!=trigger.card.name){
return card.name=='caoyao'||card.name=='dujian'||card.name=='sha'||card.name=='jiu'|| if(get.type(card)=='basic'&&get.info(card).enable){
card.name=='tianxianjiu'||card.name=='tao'||card.name=='xiangyuye'||card.name=='zhufangshenshi'; return true;
}
} }
return false; return false;
}).ai=function(card){ }).ai=function(card){

View File

@ -32,7 +32,7 @@ card.pack={
swd:'轩辕剑', swd:'轩辕剑',
shenqi:'上古神器', shenqi:'上古神器',
hearth:'炉石传说', hearth:'炉石传说',
// compensate:'补充卡牌', compensate:'补充卡牌',
}; };
play.pack={ play.pack={
character:'武将卡牌', character:'武将卡牌',

BIN
image/card/shenenshu.png Normal file

Binary file not shown.

After

Width:  |  Height:  |  Size: 44 KiB