This commit is contained in:
parent
10643f521a
commit
d16422b69c
|
@ -3732,10 +3732,10 @@ character.hearth={
|
||||||
if(result.bool){
|
if(result.bool){
|
||||||
player.logSkill('shijie',result.targets);
|
player.logSkill('shijie',result.targets);
|
||||||
var target=result.targets[0];
|
var target=result.targets[0];
|
||||||
player.gain(target.get('h').randomGet(),target);
|
var card=target.get('h').randomGet()
|
||||||
|
player.gain(card,target);
|
||||||
event.target=target;
|
event.target=target;
|
||||||
target.$give(1,player);
|
target.$giveAuto(card,player);
|
||||||
game.delay();
|
|
||||||
event.target.draw();
|
event.target.draw();
|
||||||
}
|
}
|
||||||
},
|
},
|
||||||
|
|
|
@ -272,11 +272,18 @@ character.refresh={
|
||||||
if(result.bool){
|
if(result.bool){
|
||||||
player.logSkill('retuxi',result.targets);
|
player.logSkill('retuxi',result.targets);
|
||||||
for(var i=0;i<result.targets.length;i++){
|
for(var i=0;i<result.targets.length;i++){
|
||||||
player.gain(result.targets[i].get('h').randomGet(),result.targets[i]);
|
var card=result.targets[i].get('h').randomGet();
|
||||||
result.targets[i].$give(1,player);
|
player.gain(card,result.targets[i]).delay=false;
|
||||||
|
result.targets[i].$giveAuto(card,player);
|
||||||
}
|
}
|
||||||
trigger.num-=result.targets.length
|
trigger.num-=result.targets.length;
|
||||||
|
game.delay();
|
||||||
}
|
}
|
||||||
|
else{
|
||||||
|
event.finish();
|
||||||
|
}
|
||||||
|
"step 2"
|
||||||
|
if(trigger.num<=0) game.delay();
|
||||||
},
|
},
|
||||||
ai:{
|
ai:{
|
||||||
threaten:1.6,
|
threaten:1.6,
|
||||||
|
|
|
@ -801,11 +801,15 @@ character.shenhua={
|
||||||
}
|
}
|
||||||
"step 2"
|
"step 2"
|
||||||
for(var i=0;i<event.targets.length;i++){
|
for(var i=0;i<event.targets.length;i++){
|
||||||
player.gain(event.targets[i].get('h').randomGet(),event.targets[i]);
|
var gainedcard=event.targets[i].get('h').randomGet();
|
||||||
event.targets[i].$give(1,player);
|
player.gain(gainedcard,event.targets[i]).delay=false;
|
||||||
|
event.targets[i].$giveAuto(gainedcard,player);
|
||||||
}
|
}
|
||||||
trigger.finish();
|
trigger.finish();
|
||||||
trigger.untrigger();
|
trigger.untrigger();
|
||||||
|
game.delay();
|
||||||
|
"step 3"
|
||||||
|
game.delay();
|
||||||
},
|
},
|
||||||
ai:{
|
ai:{
|
||||||
expose:0.2
|
expose:0.2
|
||||||
|
|
|
@ -6767,8 +6767,9 @@ character.sp={
|
||||||
return event.target.num('h')>0;
|
return event.target.num('h')>0;
|
||||||
},
|
},
|
||||||
content:function(){
|
content:function(){
|
||||||
player.gain(trigger.target.get('h').randomGet(),trigger.target);
|
var card=trigger.target.get('h').randomGet();
|
||||||
trigger.target.$give(1,player);
|
player.gain(card,trigger.target);
|
||||||
|
trigger.target.$giveAuto(card,player);
|
||||||
game.delay();
|
game.delay();
|
||||||
}
|
}
|
||||||
},
|
},
|
||||||
|
@ -6780,8 +6781,9 @@ character.sp={
|
||||||
return event.source&&event.source.num('h')>0;
|
return event.source&&event.source.num('h')>0;
|
||||||
},
|
},
|
||||||
content:function(){
|
content:function(){
|
||||||
player.gain(trigger.source.get('h').randomGet(),trigger.source);
|
var card=trigger.source.get('h').randomGet();
|
||||||
trigger.source.$give(1,player);
|
player.gain(card,trigger.source);
|
||||||
|
trigger.source.$giveAuto(card,player);
|
||||||
game.delay();
|
game.delay();
|
||||||
}
|
}
|
||||||
},
|
},
|
||||||
|
|
|
@ -270,14 +270,19 @@ character.standard={
|
||||||
if(result.bool){
|
if(result.bool){
|
||||||
player.logSkill('tuxi',result.targets);
|
player.logSkill('tuxi',result.targets);
|
||||||
for(var i=0;i<result.targets.length;i++){
|
for(var i=0;i<result.targets.length;i++){
|
||||||
player.gain(result.targets[i].get('h').randomGet(),result.targets[i]);
|
var card=result.targets[i].get('h').randomGet();
|
||||||
result.targets[i].$give(1,player);
|
player.gain(card,result.targets[i]).set('delay',false);
|
||||||
|
result.targets[i].$giveAuto(card,player);
|
||||||
}
|
}
|
||||||
trigger.finish();
|
trigger.finish();
|
||||||
trigger.untrigger();
|
trigger.untrigger();
|
||||||
|
game.delay();
|
||||||
|
}
|
||||||
|
else{
|
||||||
|
event.finish();
|
||||||
}
|
}
|
||||||
"step 2"
|
"step 2"
|
||||||
if(result.bool) game.delay();
|
game.delay();
|
||||||
},
|
},
|
||||||
ai:{
|
ai:{
|
||||||
threaten:2,
|
threaten:2,
|
||||||
|
|
|
@ -1019,8 +1019,8 @@ character.xianjian={
|
||||||
if(result.bool){
|
if(result.bool){
|
||||||
player.gain(event.card,target);
|
player.gain(event.card,target);
|
||||||
target.gain(result.cards,player);
|
target.gain(result.cards,player);
|
||||||
player.$give(1,target);
|
player.$giveAuto(result.cards,target);
|
||||||
target.$give(1,player);
|
target.$giveAuto(event.card,player);
|
||||||
game.log(player,'与',target,'交换了一张手牌');
|
game.log(player,'与',target,'交换了一张手牌');
|
||||||
}
|
}
|
||||||
},
|
},
|
||||||
|
|
|
@ -1123,8 +1123,9 @@ character.yxs={
|
||||||
'step 1'
|
'step 1'
|
||||||
if(result.bool){
|
if(result.bool){
|
||||||
player.logSkill('xiadao',result.targets);
|
player.logSkill('xiadao',result.targets);
|
||||||
result.targets[0].gain(trigger.player.get('h').randomGet(),trigger.player);
|
var card=trigger.player.get('h').randomGet();
|
||||||
trigger.player.$give(1,result.targets[0]);
|
result.targets[0].gain(card,trigger.player);
|
||||||
|
trigger.player.$giveAuto(card,result.targets[0]);
|
||||||
}
|
}
|
||||||
},
|
},
|
||||||
ai:{
|
ai:{
|
||||||
|
@ -1638,11 +1639,18 @@ character.yxs={
|
||||||
}
|
}
|
||||||
"step 2"
|
"step 2"
|
||||||
if(event.targets.length){
|
if(event.targets.length){
|
||||||
var target=event.targets.shift();
|
for(var i=0;i<event.targets.length;i++){
|
||||||
player.gain(target.get('h').randomGet(),target);
|
var gainedcard=event.targets[i].get('h').randomGet();
|
||||||
target.$give(1,player);
|
player.gain(gainedcard,event.targets[i]).delay=false;
|
||||||
event.redo();
|
event.targets[i].$giveAuto(gainedcard,player);
|
||||||
|
}
|
||||||
|
game.delay();
|
||||||
}
|
}
|
||||||
|
else{
|
||||||
|
event.finish();
|
||||||
|
}
|
||||||
|
"step 3"
|
||||||
|
game.delay();
|
||||||
}
|
}
|
||||||
},
|
},
|
||||||
seyou:{
|
seyou:{
|
||||||
|
|
44
game/game.js
44
game/game.js
|
@ -8128,20 +8128,25 @@
|
||||||
cards.push(event.result.links[i]);
|
cards.push(event.result.links[i]);
|
||||||
}
|
}
|
||||||
event.cards=cards;
|
event.cards=cards;
|
||||||
var hs=[],oths=[];
|
if(!_status.connectMode&&(target.isUnderControl(true)||player.isUnderControl(true))){
|
||||||
for(var i=0;i<cards.length;i++){
|
target.$give(cards,player);
|
||||||
if(get.position(cards[i])=='h'){
|
|
||||||
hs.push(cards[i]);
|
|
||||||
}
|
|
||||||
else{
|
|
||||||
oths.push(cards[i]);
|
|
||||||
}
|
|
||||||
}
|
}
|
||||||
if(hs.length){
|
else{
|
||||||
target.$give(hs.length,player);
|
var hs=[],oths=[];
|
||||||
}
|
for(var i=0;i<cards.length;i++){
|
||||||
if(oths.length){
|
if(get.position(cards[i])=='h'){
|
||||||
target.$give(oths,player);
|
hs.push(cards[i]);
|
||||||
|
}
|
||||||
|
else{
|
||||||
|
oths.push(cards[i]);
|
||||||
|
}
|
||||||
|
}
|
||||||
|
if(hs.length){
|
||||||
|
target.$give(hs.length,player);
|
||||||
|
}
|
||||||
|
if(oths.length){
|
||||||
|
target.$give(oths,player);
|
||||||
|
}
|
||||||
}
|
}
|
||||||
"step 4"
|
"step 4"
|
||||||
player.gain(event.cards,target);
|
player.gain(event.cards,target);
|
||||||
|
@ -13678,6 +13683,19 @@
|
||||||
lib.listenEnd(node);
|
lib.listenEnd(node);
|
||||||
return node;
|
return node;
|
||||||
},
|
},
|
||||||
|
$giveAuto:function(card,player){
|
||||||
|
var args=Array.from(arguments);
|
||||||
|
if(_status.connectMode||(!this.isUnderControl(true)&&!player.isUnderControl(true))){
|
||||||
|
if(Array.isArray(card)){
|
||||||
|
card=card.length;
|
||||||
|
}
|
||||||
|
else{
|
||||||
|
card=1;
|
||||||
|
}
|
||||||
|
args[0]=card;
|
||||||
|
}
|
||||||
|
return this.$give.apply(this,args);
|
||||||
|
},
|
||||||
$give:function(card,player,log,init){
|
$give:function(card,player,log,init){
|
||||||
if(init!==false){
|
if(init!==false){
|
||||||
game.broadcast(function(source,card,player,init){
|
game.broadcast(function(source,card,player,init){
|
||||||
|
|
|
@ -2596,13 +2596,15 @@ mode.boss={
|
||||||
var players=get.players(player);
|
var players=get.players(player);
|
||||||
players.remove(player);
|
players.remove(player);
|
||||||
event.players=players;
|
event.players=players;
|
||||||
|
player.line(players,'green');
|
||||||
"step 1"
|
"step 1"
|
||||||
if(event.players.length){
|
if(event.players.length){
|
||||||
var current=event.players.shift();
|
var current=event.players.shift();
|
||||||
var hs=current.get('h')
|
var hs=current.get('h')
|
||||||
if(hs.length){
|
if(hs.length){
|
||||||
player.gain(hs.randomGet(),current);
|
var card=hs.randomGet();
|
||||||
current.$give(1,player);
|
player.gain(card,current);
|
||||||
|
current.$giveAuto(card,player);
|
||||||
}
|
}
|
||||||
event.redo();
|
event.redo();
|
||||||
}
|
}
|
||||||
|
|
|
@ -4524,13 +4524,15 @@ mode.chess={
|
||||||
var players=get.players(player);
|
var players=get.players(player);
|
||||||
players.remove(player);
|
players.remove(player);
|
||||||
event.players=players;
|
event.players=players;
|
||||||
|
player.line(players,'green');
|
||||||
"step 1"
|
"step 1"
|
||||||
if(event.players.length){
|
if(event.players.length){
|
||||||
var current=event.players.shift();
|
var current=event.players.shift();
|
||||||
var hs=current.get('h')
|
var hs=current.get('h')
|
||||||
if(hs.length){
|
if(hs.length){
|
||||||
player.gain(hs.randomGet(),current);
|
var card=hs.randomGet();
|
||||||
current.$give(1,player);
|
player.gain(card,current);
|
||||||
|
current.$giveAuto(card,player);
|
||||||
}
|
}
|
||||||
event.redo();
|
event.redo();
|
||||||
}
|
}
|
||||||
|
|
Loading…
Reference in New Issue