This commit is contained in:
parent
fa5a9573ce
commit
7353e06bba
|
@ -1443,6 +1443,7 @@ game.import('character',function(lib,game,ui,get,ai,_status){
|
||||||
},
|
},
|
||||||
logTarget:'player',
|
logTarget:'player',
|
||||||
check:function(event,player){
|
check:function(event,player){
|
||||||
|
if(event.player.hasSkill('subplayer')) return false;
|
||||||
if(get.attitude(player,event.player)<0){
|
if(get.attitude(player,event.player)<0){
|
||||||
if(event.player.hp==1) return false;
|
if(event.player.hp==1) return false;
|
||||||
return true;
|
return true;
|
||||||
|
|
33
game/game.js
33
game/game.js
|
@ -8988,35 +8988,37 @@
|
||||||
},
|
},
|
||||||
element:{
|
element:{
|
||||||
content:{
|
content:{
|
||||||
|
toggleSubPlayer:function(){
|
||||||
|
|
||||||
|
},
|
||||||
exitSubPlayer:function(){
|
exitSubPlayer:function(){
|
||||||
'step 0'
|
'step 0'
|
||||||
if(player.storage.subplayer){
|
if(player.storage.subplayer){
|
||||||
var current=player.storage.subplayer.name2;
|
var current=player.storage.subplayer.name2;
|
||||||
|
if(event.remove){
|
||||||
|
player.lose(player.getCards('he'),ui.discardPile)._triggered=null;
|
||||||
|
}
|
||||||
|
else{
|
||||||
|
player.storage[current].hp=player.hp;
|
||||||
|
player.storage[current].maxHp=player.maxHp;
|
||||||
|
player.storage[current].hs=player.getCards('h');
|
||||||
|
player.storage[current].es=player.getCards('e');
|
||||||
|
player.lose(player.getCards('he'),ui.special)._triggered=null;
|
||||||
|
}
|
||||||
player.reinit(current,player.storage.subplayer.name,[
|
player.reinit(current,player.storage.subplayer.name,[
|
||||||
player.storage.subplayer.hp,
|
player.storage.subplayer.hp,
|
||||||
player.storage.subplayer.maxHp
|
player.storage.subplayer.maxHp
|
||||||
]);
|
]);
|
||||||
player.update();
|
player.update();
|
||||||
if(event.remove){
|
if(event.remove){
|
||||||
delete player.storage.subplayer.storage[current];
|
delete player.storage[current];
|
||||||
player.storage.subplayer.skills.remove(current);
|
player.storage.subplayer.skills.remove(current);
|
||||||
game.log(player,'牺牲了随从','#g'+current);
|
game.log(player,'牺牲了随从','#g'+current);
|
||||||
}
|
}
|
||||||
else{
|
else{
|
||||||
game.log(player,'收回了随从','#g'+current);
|
game.log(player,'收回了随从','#g'+current);
|
||||||
}
|
}
|
||||||
for(var i in player.storage.subplayer.storage){
|
|
||||||
player.storage[i]=player.storage.subplayer.storage[i];
|
|
||||||
}
|
|
||||||
player.addSkill(player.storage.subplayer.skills);
|
player.addSkill(player.storage.subplayer.skills);
|
||||||
if(event.remove){
|
|
||||||
player.lose(player.getCards('he'),ui.discardPile)._triggered=null;
|
|
||||||
}
|
|
||||||
else{
|
|
||||||
player.storage[current].hs=player.getCards('h');
|
|
||||||
player.storage[current].es=player.getCards('e');
|
|
||||||
player.lose(player.getCards('he'),ui.special)._triggered=null;
|
|
||||||
}
|
|
||||||
}
|
}
|
||||||
'step 1'
|
'step 1'
|
||||||
if(player.storage.subplayer){
|
if(player.storage.subplayer){
|
||||||
|
@ -9058,11 +9060,6 @@
|
||||||
}
|
}
|
||||||
}
|
}
|
||||||
if(event.directresult){
|
if(event.directresult){
|
||||||
var storage={};
|
|
||||||
for(var i=0;i<event.list.length;i++){
|
|
||||||
var skill=event.list[i];
|
|
||||||
storage[skill]=player.storage[skill];
|
|
||||||
}
|
|
||||||
var cfg=player.storage[event.directresult];
|
var cfg=player.storage[event.directresult];
|
||||||
var source=cfg.source||player.name;
|
var source=cfg.source||player.name;
|
||||||
var name=event.directresult;
|
var name=event.directresult;
|
||||||
|
@ -9073,7 +9070,6 @@
|
||||||
hp:player.hp,
|
hp:player.hp,
|
||||||
maxHp:player.maxHp,
|
maxHp:player.maxHp,
|
||||||
skills:event.list.slice(0),
|
skills:event.list.slice(0),
|
||||||
storage:storage,
|
|
||||||
hs:player.getCards('h'),
|
hs:player.getCards('h'),
|
||||||
es:player.getCards('e'),
|
es:player.getCards('e'),
|
||||||
intro2:cfg.intro2
|
intro2:cfg.intro2
|
||||||
|
@ -16894,7 +16890,6 @@
|
||||||
content:cfg.intro||''
|
content:cfg.intro||''
|
||||||
},
|
},
|
||||||
mark:'character',
|
mark:'character',
|
||||||
onremove:true,
|
|
||||||
subplayer:cfg.skill,
|
subplayer:cfg.skill,
|
||||||
ai:{
|
ai:{
|
||||||
subplayer:true
|
subplayer:true
|
||||||
|
|
Loading…
Reference in New Issue