commit
911ad85703
|
@ -159,7 +159,7 @@ game.import('card',function(lib,game,ui,get,ai,_status){
|
|||
if(event.shanRequired>1&&target.mayHaveShan(target,'use',null,'count')<event.shanRequired-(event.shanIgnored||0)) return false;
|
||||
if(event.baseDamage+event.extraDamage>=target.hp+
|
||||
((player.hasSkillTag('jueqing',false,target)||target.hasSkill('gangzhi'))?target.hujia:0)) return true;
|
||||
if(get.damageEffect(target,player,target,get.nature(event.card))>=0) return false;
|
||||
if(!game.hasNature(event.card, 'ice')&&get.damageEffect(target,player,target,get.nature(event.card))>=0) return false;
|
||||
return true;
|
||||
})());
|
||||
//next.autochoose=lib.filter.autoRespondShan;
|
||||
|
|
|
@ -305,9 +305,13 @@ game.import('character',function(lib,game,ui,get,ai,_status){
|
|||
return typeof num=='number'&&num>0;
|
||||
},
|
||||
check:function(event,player){
|
||||
var num=get.cardNameLength(event.card);
|
||||
if(num>=player.getDamagedHp()) return true;
|
||||
return player.getHistory('useSkill',evt=>evt.skill=='clanhuanghan').length&&player.hasSkill('clanbaozu',null,false,false)&&player.awakenedSkills.includes('clanbaozu');
|
||||
let num=get.cardNameLength(event.card)-player.getDamagedHp();
|
||||
if(num>=0) return true;
|
||||
if(num<-1) return false;
|
||||
if(player.hasSkill('clanbaozu',null,false,false)&&player.awakenedSkills.includes('clanbaozu')&&player.getHistory('useSkill',evt=>{
|
||||
return evt.skill=='clanhuanghan';
|
||||
}).length) return true;
|
||||
return false;
|
||||
},
|
||||
content:function(){
|
||||
'step 0'
|
||||
|
@ -320,7 +324,16 @@ game.import('character',function(lib,game,ui,get,ai,_status){
|
|||
game.log(player,'恢复了技能','#【保族】');
|
||||
}
|
||||
},
|
||||
ai:{threaten:3},
|
||||
ai:{
|
||||
threaten:3,
|
||||
effect:{
|
||||
target:(card,player,target)=>{
|
||||
if(!get.tag(card,'damage')||player.hasSkillTag('jueqing',false,target)) return;
|
||||
let num=get.cardNameLength(card)-target.getDamagedHp();
|
||||
if(num>0) return [1,num+0.1];
|
||||
}
|
||||
}
|
||||
},
|
||||
},
|
||||
//族钟会
|
||||
clanyuzhi:{
|
||||
|
|
|
@ -3413,7 +3413,8 @@ game.import('character',function(lib,game,ui,get,ai,_status){
|
|||
trigger:{global:'useCard'},
|
||||
forced:true,
|
||||
filter:function(event,player){
|
||||
return (event.card.name=='qizhengxiangsheng'||get.zhinangs().includes(event.card.name)||player.getStorage('dinghan').includes(event.card.name))&&event.card.isCard&&event.cards.length==1;
|
||||
if(!event.card.isCard||!event.cards||event.cards.length!==1) return false;
|
||||
return event.card.name=='qizhengxiangsheng'||get.zhinangs().includes(event.card.name)||player.getStorage('dinghan').includes(event.card.name);
|
||||
},
|
||||
content:function(){
|
||||
player.draw();
|
||||
|
|
|
@ -2179,6 +2179,19 @@ game.import('character',function(lib,game,ui,get,ai,_status){
|
|||
}
|
||||
}
|
||||
}
|
||||
},
|
||||
count:{
|
||||
intro:{
|
||||
content:function(s,p){
|
||||
let str='此阶段已转化过的卡牌花色:';
|
||||
for(let i=0;i<s.length;i++){
|
||||
str+=get.translation(s[i]);
|
||||
}
|
||||
return str;
|
||||
}
|
||||
},
|
||||
charlotte:true,
|
||||
onremove:true
|
||||
}
|
||||
}
|
||||
},
|
||||
|
|
|
@ -1126,6 +1126,14 @@ game.import('character',function(lib,game,ui,get,ai,_status){
|
|||
},player,evt);
|
||||
},
|
||||
check:function(button){
|
||||
if(button.link[2]==='tao'){
|
||||
let dying=_status.event.getParent(2).dying;
|
||||
if(dying) return get.effect(dying,{
|
||||
name:'tao',
|
||||
isCard:true,
|
||||
storage:{jsrgfenjian:true},
|
||||
},_status.event.player);
|
||||
}
|
||||
return _status.event.player.getUseValue({
|
||||
name:button.link[2],
|
||||
isCard:true,
|
||||
|
@ -1167,7 +1175,12 @@ game.import('character',function(lib,game,ui,get,ai,_status){
|
|||
order:function(item,player){
|
||||
return Math.max(get.order({name:'juedou'}),get.order({name:'tao'}))+0.2;
|
||||
},
|
||||
result:{player:1},
|
||||
result:{
|
||||
player:(player)=>{
|
||||
if(_status.event.dying) return 2*get.sgnAttitude(player,_status.event.dying);
|
||||
return 1;
|
||||
}
|
||||
}
|
||||
},
|
||||
subSkill:{
|
||||
effect:{
|
||||
|
|
|
@ -749,7 +749,7 @@ game.import('character',function(lib,game,ui,get,ai,_status){
|
|||
audio:2,
|
||||
trigger:{player:['phaseZhunbeiBegin','phaseJieshuBegin']},
|
||||
filter:function(event,player){
|
||||
var bool=player.hasCards(card=>card.hasGaintag('sbguanxing'),'s');
|
||||
var bool=player.hasCard(card=>card.hasGaintag('sbguanxing'),'s');
|
||||
if(event.name=='phaseZhunbei'){
|
||||
var num=player.countMark('sbguanxingx');
|
||||
return bool||num<=3;
|
||||
|
|
|
@ -6247,11 +6247,10 @@ game.import('character',function(lib,game,ui,get,ai,_status){
|
|||
direct:true,
|
||||
content:function(){
|
||||
"step 0"
|
||||
var check= player.countCards('h')>2;
|
||||
player.chooseTarget(get.prompt("shensu"),"跳过判定阶段和摸牌阶段,视为对一名其他角色使用一张【杀】",function(card,player,target){
|
||||
if(player==target) return false;
|
||||
return player.canUse({name:'sha'},target,false);
|
||||
}).set('check',check).set('ai',function(target){
|
||||
}).set('check',player.countCards('h')>2).set('ai',function(target){
|
||||
if(!_status.event.check) return 0;
|
||||
return get.effect(target,{name:'sha'},_status.event.player);
|
||||
}).setHiddenSkill('shensu1');
|
||||
|
@ -6280,7 +6279,6 @@ game.import('character',function(lib,game,ui,get,ai,_status){
|
|||
},
|
||||
content:function(){
|
||||
"step 0"
|
||||
var check=player.needsToDiscard();
|
||||
player.chooseCardTarget({
|
||||
prompt:get.prompt('shensu'),
|
||||
prompt2:"弃置一张装备牌并跳过出牌阶段,视为对一名其他角色使用一张【杀】",
|
||||
|
@ -6300,7 +6298,9 @@ game.import('character',function(lib,game,ui,get,ai,_status){
|
|||
if(_status.event.check) return 0;
|
||||
return get.effect(target,{name:'sha'},_status.event.player);
|
||||
},
|
||||
check:check
|
||||
check:player.countCards('hs',i=>{
|
||||
return player.hasValueTarget(i,null,true);
|
||||
})>player.hp-1
|
||||
}).setHiddenSkill('shensu2');
|
||||
"step 1"
|
||||
if(result.bool){
|
||||
|
|
|
@ -5972,7 +5972,7 @@ game.import('character',function(lib,game,ui,get,ai,_status){
|
|||
target:(card,player,target)=>{
|
||||
if(player===target) return;
|
||||
if(game.hasPlayer2(current=>{
|
||||
return current.hasHistory('useCard',evt=>evt.card.name==card.name&&evt.targets&&evt.targets.includes(player));
|
||||
return current.hasHistory('useCard',evt=>evt.card.name==card.name&&evt.targets&&evt.targets.includes(target));
|
||||
})&&(card.name=='sha'||get.type(card)=='trick')) return 'zeroplayertarget';
|
||||
}
|
||||
}
|
||||
|
|
|
@ -113,7 +113,10 @@ game.import('character',function(lib,game,ui,get,ai,_status){
|
|||
player:'damageBegin3',
|
||||
},
|
||||
filter:function(event,player){
|
||||
return event.source!=event.player;
|
||||
if(event.source===event.player) return false;
|
||||
if(!event.card||!event.cards||!event.cards.length) return true;
|
||||
let target=event[player===event.source?'player':'source'];
|
||||
return target&&target.isIn();
|
||||
},
|
||||
forced:true,
|
||||
content:function*(event,map){
|
||||
|
|
|
@ -8055,6 +8055,7 @@ export class Player extends HTMLDivElement {
|
|||
let count = 0;
|
||||
if ((this.hp > 2 || !this.isZhu && this.hp > 1) && this.hasSkillTag('respondSha', true, type, true)) {
|
||||
if (rvt === 'count') count++;
|
||||
else if (rvt === 'odds') return 1;
|
||||
else return true;
|
||||
}
|
||||
if (get.itemtype(viewer) !== 'player') viewer = _status.event.player;
|
||||
|
@ -8074,17 +8075,18 @@ export class Player extends HTMLDivElement {
|
|||
return false;
|
||||
});
|
||||
count += cards.length;
|
||||
if (count && rvt !== 'count') return true;
|
||||
if (count && rvt !== 'count') return rvt === 'odds' ? 1 : true;
|
||||
let hs = this.getCards('hs').filter(i => !cards.includes(i)).length;
|
||||
if (!hs) {
|
||||
if (rvt === 'count') return count;
|
||||
else if (rvt === 'odds') return 0;
|
||||
return false;
|
||||
}
|
||||
if (rvt === 'count') {
|
||||
if (this.isPhaseUsing()) return count + hs / 4;
|
||||
return count + hs / 4.8;
|
||||
}
|
||||
if (this.isPhaseUsing()) count += Math.pow(2 + hs, 2) / 40;
|
||||
if (hs > 9 || this.isPhaseUsing()) count += Math.pow(2 + hs, 2) / 40;
|
||||
else count += -1.5 * Math.log(1 - hs / 10);
|
||||
if (rvt === 'odds') return Math.min(1, count);
|
||||
return count > _status.event.getRand('mayHaveSha' + hs + this.playerid);
|
||||
|
@ -8098,6 +8100,7 @@ export class Player extends HTMLDivElement {
|
|||
let count = 0;
|
||||
if ((this.hp > 2 || !this.isZhu && this.hp > 1) && this.hasSkillTag('respondShan', true, type, true)) {
|
||||
if (rvt === 'count') count++;
|
||||
else if (rvt === 'odds') return 1;
|
||||
else return true;
|
||||
}
|
||||
if (get.itemtype(viewer) !== 'player') viewer = _status.event.player;
|
||||
|
@ -8117,10 +8120,11 @@ export class Player extends HTMLDivElement {
|
|||
return false;
|
||||
});
|
||||
count += cards.length;
|
||||
if (count && rvt !== 'count') return true;
|
||||
if (count && rvt !== 'count') return rvt === 'odds' ? 1 : true;
|
||||
let hs = this.getCards('hs').filter(i => !cards.includes(i)).length;
|
||||
if (!hs) {
|
||||
if (rvt === 'count') return count;
|
||||
else if (rvt === 'odds') return 0;
|
||||
return false;
|
||||
}
|
||||
if (rvt === 'count') {
|
||||
|
|
Loading…
Reference in New Issue