数学家孟优

This commit is contained in:
Spmario233 2023-10-09 18:28:14 +08:00
parent 2b6656d9b8
commit 234b8ca3a1
3 changed files with 87 additions and 8 deletions

View File

@ -178,7 +178,8 @@ game.import('character',function(lib,game,ui,get,ai,_status){
ns_chengpu:['male','wu',4,['decadelihuo','decadechunlao']],
ns_sundeng:['male','wu',4,['xinkuangbi']],
ns_duji:['male','wei',3,['xinfu_andong','xinyingshi']],
old_majun:["male","wei",3,["xinfu_jingxie1","xinfu_qiaosi"],[]],
old_majun:["male","wei",3,["xinfu_jingxie1","xinfu_qiaosi"]],
ns_mengyou:['male','qun',4,['nsmanzhi']],
old_jiakui:['male','wei',4,['tongqu','xinwanlan']],
ol_guohuai:['male','wei',3,['rejingce']],
@ -219,7 +220,7 @@ game.import('character',function(lib,game,ui,get,ai,_status){
"ns_chentai","ns_huangwudie","ns_sunyi","ns_zhangning","ns_yanghu"],
diy_yijiang3:['ns_ruanji','ns_zanghong','ns_limi','ns_zhonglimu','prp_zhugeliang','key_seira','key_kiyu','key_tomoyo','key_minagi','key_michiru'],
diy_tieba:["ns_zuoci","ns_lvzhi","ns_wangyun","ns_nanhua","ns_nanhua_left","ns_nanhua_right","ns_huamulan","ns_huangzu","ns_jinke","ns_yanliang","ns_wenchou","ns_caocao","ns_caocaosp","ns_zhugeliang","ns_wangyue","ns_yuji","ns_xinxianying","ns_guanlu","ns_simazhao","ns_sunjian","ns_duangui","ns_zhangbao","ns_masu","ns_zhangxiu","ns_lvmeng","ns_shenpei","ns_yujisp","ns_yangyi","ns_liuzhang","ns_xinnanhua","ns_luyusheng"],
diy_fakenews:["diy_wenyang","ns_zhangwei","ns_caimao","ns_chengpu",'ns_sundeng','ns_duji'],
diy_fakenews:["diy_wenyang","ns_zhangwei","ns_caimao","ns_chengpu",'ns_sundeng','ns_duji','ns_mengyou'],
diy_xushi:["diy_feishi","diy_hanlong","diy_liufu","diy_liuyan","diy_liuzan","diy_tianyu","diy_xizhenxihong","diy_yangyi","diy_zaozhirenjun"],
diy_default:["diy_yuji","diy_caiwenji","diy_lukang","diy_zhenji","old_majun"],
diy_noname:['noname'],
@ -373,6 +374,7 @@ game.import('character',function(lib,game,ui,get,ai,_status){
ns_zhangxiu:'#p本因坊神策',
ns_yangyi:'#p本因坊神策',
ns_liuzhang:'#r矮子剑薄荷糖',
ns_mengyou:'#g残昼厄夜',
},
card:{
kano_paibingbuzhen:{
@ -17953,6 +17955,74 @@ game.import('character',function(lib,game,ui,get,ai,_status){
},
},
},
nsmanzhi:{
audio:'dcmanzhi',
trigger:{player:['phaseZhunbeiBegin','phaseJieshuBegin']},
direct:true,
filter:function(event,player){
var nums=[];
game.countPlayer(current=>{
nums.add(current.hp);
nums.add(current.maxHp);
nums.add(current.countCards('h'));
nums.add(current.countCards('e'));
nums.add(current.countCards('j'));
});
for(var a of nums){
for(var b of nums){
if((0.5*a*a)+(2.5*b)-game.roundNumber==game.countPlayer()) return true;
}
}
return false;
},
content:function(){
'step 0'
var nums=[];
game.countPlayer(current=>{
nums.add(current.hp);
nums.add(current.maxHp);
nums.add(current.countCards('h'));
nums.add(current.countCards('e'));
nums.add(current.countCards('j'));
});
nums.sort((a,b)=>a-b);
player.chooseButton(2,[
'蛮智请选择让下列等式成立的A与B的值',
'<div class="text center">目标等式</div>',
`0.5 × A² + 2.5 × B - ${game.roundNumber} = ${game.countPlayer()}`,
'<div class="text center">A的可选值</div>',
[nums.map(i=>{
return [
`A|${i}`,
i.toString(),
]
}),'tdnodes'],
'<div class="text center">B的可选值</div>',
[nums.map(i=>{
return [
`B|${i}`,
i.toString(),
]
}),'tdnodes'],
]).set('filterButton',function(button){
if(!ui.selected.buttons.length) return true;
return button.link[0]!=ui.selected.buttons[0].link[0];
}).set('filterOk',function(){
if(ui.selected.buttons.length!=2) return false;
let a,b;
for(let i of ui.selected.buttons){
if(i.link[0]=='A') a=parseInt(i.link.slice(2));
else b=parseInt(i.link.slice(2));
}
return (0.5*a*a)+(2.5*b)-game.roundNumber==game.countPlayer();
});
'step 1'
if(result.bool){
player.logSkill('nsmanzhi');
player.draw(game.countPlayer());
}
},
},
},
dynamicTranslate:{
nsjiquan:function(player){
@ -19030,6 +19100,20 @@ game.import('character',function(lib,game,ui,get,ai,_status){
junk_huangyueying_prefix:'旧界',
old_majun:'骰子马钧',
old_majun_prefix:'骰子',
ns_mengyou:'数学孟优',
ns_mengyou_prefix:'数学',
ns_mengyou_ab:'孟优',
nsmanzhi:'蛮智',
nsmanzhi_info:'准备阶段或结束阶段开始时你可以将场上出现的数字代入等式中的A和B。若此等式成立你摸Y张牌。等式为Y=0.5A²+2.5B-X其中X为游戏轮数Y为存活人数',
ns_chengpu:'铁索程普',
ns_chengpu_prefix:'铁索',
ns_chengpu_ab:'程普',
ns_sundeng:'画饼孙登',
ns_sundeng_prefix:'画饼',
ns_sundeng_ab:'孙登',
ns_duji:'画饼杜畿',
ns_duji_prefix:'画饼',
ns_duji_ab:'杜畿',
diy_tieba:'吧友设计',
diy_xushi:'玩点论杀·虚实篇',
@ -19041,12 +19125,6 @@ game.import('character',function(lib,game,ui,get,ai,_status){
diy_yijiang3:'设计比赛2022',
diy_fakenews:'杀海流言',
diy_trashbin:'垃圾桶',
ns_chengpu:'铁索程普',
ns_chengpu_ab:'程普',
ns_sundeng:'画饼孙登',
ns_sundeng_ab:'孙登',
ns_duji:'画饼杜畿',
ns_duji_ab:'杜畿',
},
pinyins:{
加藤うみ:['Kato','Umi'],

View File

@ -10090,6 +10090,7 @@ game.import('character',function(lib,game,ui,get,ai,_status){
sp_jiaxu:['sp_jiaxu','dc_sp_jiaxu','yj_jiaxu'],
qiaorui:['qiaorui','tw_qiaorui'],
mamidi:['mamidi','xin_mamidi'],
mengyou:['mengyou','ns_mengyou'],
},
translate:{
re_panfeng:'潘凤',

Binary file not shown.

After

Width:  |  Height:  |  Size: 97 KiB